blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 390 | content_id stringlengths 40 40 | detected_licenses listlengths 0 35 | license_type stringclasses 2 values | repo_name stringlengths 6 132 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 539 values | visit_date timestamp[us]date 2016-08-02 21:09:20 2023-09-06 10:10:07 | revision_date timestamp[us]date 1990-01-30 01:55:47 2023-09-05 21:45:37 | committer_date timestamp[us]date 2003-07-12 18:48:29 2023-09-05 21:45:37 | github_id int64 7.28k 684M ⌀ | star_events_count int64 0 77.7k | fork_events_count int64 0 48k | gha_license_id stringclasses 13 values | gha_event_created_at timestamp[us]date 2012-06-11 04:05:37 2023-09-14 21:59:18 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-28 02:39:21 ⌀ | gha_language stringclasses 62 values | src_encoding stringclasses 26 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 128 12.8k | extension stringclasses 11 values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 79 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
47a6650e513032e2fe2ac15d835290173ac4557f | 15b260ccada93e20bb696ae19b14ec62e78ed023 | /v2/src/main/java/com/alipay/api/domain/AlipayUserCertDocDrivingLicense.java | f6110060b5c7ee9fb72c348a22492c42fe3fcfde | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-java-all | df461d00ead2be06d834c37ab1befa110736b5ab | 8cd1750da98ce62dbc931ed437f6101684fbb66a | refs/heads/master | 2023-08-27T03:59:06.566567 | 2023-08-22T14:54:57 | 2023-08-22T14:54:57 | 132,569,986 | 470 | 207 | Apache-2.0 | 2022-12-25T07:37:40 | 2018-05-08T07:19:22 | Java | UTF-8 | Java | false | false | 2,194 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 电子证件产品-驾驶证
*
* @author auto create
* @since 1.0, 2017-06-01 16:05:07
*/
public class AlipayUserCertDocDrivingLicense extends AlipayObject {
private static final long serialVersionUID = 2833968621782974715L;
/**
* 准驾车型
*/
@ApiField("clazz")
private String clazz;
/**
* 证号
*/
@ApiField("driving_license_no")
private String drivingLicenseNo;
/**
* base64后的主页照片
*/
@ApiField("encoded_img_main")
private String encodedImgMain;
/**
* base64编码后的副页图片
*/
@ApiField("encoded_img_vice")
private String encodedImgVice;
/**
* 失效日期
*/
@ApiField("expire_date")
private String expireDate;
/**
* 档案编号
*/
@ApiField("file_no")
private String fileNo;
/**
* 姓名
*/
@ApiField("name")
private String name;
/**
* 生效日期
*/
@ApiField("valide_date")
private String valideDate;
public String getClazz() {
return this.clazz;
}
public void setClazz(String clazz) {
this.clazz = clazz;
}
public String getDrivingLicenseNo() {
return this.drivingLicenseNo;
}
public void setDrivingLicenseNo(String drivingLicenseNo) {
this.drivingLicenseNo = drivingLicenseNo;
}
public String getEncodedImgMain() {
return this.encodedImgMain;
}
public void setEncodedImgMain(String encodedImgMain) {
this.encodedImgMain = encodedImgMain;
}
public String getEncodedImgVice() {
return this.encodedImgVice;
}
public void setEncodedImgVice(String encodedImgVice) {
this.encodedImgVice = encodedImgVice;
}
public String getExpireDate() {
return this.expireDate;
}
public void setExpireDate(String expireDate) {
this.expireDate = expireDate;
}
public String getFileNo() {
return this.fileNo;
}
public void setFileNo(String fileNo) {
this.fileNo = fileNo;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getValideDate() {
return this.valideDate;
}
public void setValideDate(String valideDate) {
this.valideDate = valideDate;
}
}
| [
"auto-publish"
] | auto-publish |
758dd2fffdf6dcd067ecba02ff34a25cd7b0a9a8 | 868bf400c0143e6a13c9dc2804726449816e4b68 | /java-course-master/JavaSE/src/Countdown.java | 9630f17277d4421a017fed11cb3a9e0434ca774d | [] | no_license | EngrDevDom/Java-Codes | 7d39efd8fc7f5d9589c34f98adaa71fc923308b9 | ab6934cbe5a3e0330b64cca53738180675a1f74a | refs/heads/master | 2022-12-02T08:14:58.380076 | 2020-08-11T16:02:18 | 2020-08-11T16:02:18 | 286,783,520 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 406 | java | public class Countdown {
public static void main(String[] args) {
for (int i = 30; i >= 0; i--) {
System.out.println(i);
//напишите тут ваш код
try {
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
System.out.println("Бум!");
}
}
| [
"60880034+EngrDevDom@users.noreply.github.com"
] | 60880034+EngrDevDom@users.noreply.github.com |
ea45a16b254e7202d4614d01b11a3e25d0ff997d | d3034b794a82797d94810c3bd06c1cfbd6b0e4a6 | /src/main/java/com/hendisantika/springbootehcache/repository/ProductRepository.java | a1be7da44232eb1cca0f63274ad7119c261a586a | [] | no_license | hendisantika/springboot-ehcache | 5c983a56234936a6bcda01240e772bf6eee4f22e | b7658f0e76feb32ca5e0617d35267060dcc1588f | refs/heads/master | 2023-06-07T15:32:19.309022 | 2023-05-25T12:16:18 | 2023-05-25T12:16:18 | 197,659,965 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 442 | java | package com.hendisantika.springbootehcache.repository;
import com.hendisantika.springbootehcache.model.Product;
import org.springframework.data.repository.CrudRepository;
/**
* Created by IntelliJ IDEA.
* Project : springboot-ehcache
* User: hendisantika
* Email: hendisantika@gmail.com
* Telegram : @hendisantika34
* Date: 2019-07-19
* Time: 05:12
*/
public interface ProductRepository extends CrudRepository<Product, Integer> {
}
| [
"hendisantika@yahoo.co.id"
] | hendisantika@yahoo.co.id |
f5585e76dac40ac2485d8acd3a1dace3bae8161f | 7d3a7140b5aa8986e6b274ef44e4f067ae210141 | /Mathmatics/src/test/Test.java | abfa60225280037ecda210fd5fcf4f38f6777bd9 | [] | no_license | careermasud/UVA | 432ec0420f18fc5025384b39b5e784451f623a04 | 0a65c8036eaeda990bec12948ce4c73ccc75884d | refs/heads/master | 2021-01-01T15:50:05.334069 | 2013-05-14T11:52:56 | 2013-05-14T11:52:56 | 8,895,964 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 384 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package test;
import java.math.BigInteger;
/**
*
* @author Masudul Haque
*/
public class Test {
public static void main(String[] args) {
BigInteger first= new BigInteger("A4C", 15);
String res=first.toString(11);
System.out.println(res);
}
}
| [
"masud.cse.05@gmail.com"
] | masud.cse.05@gmail.com |
9f3ae5ff672f89946a0433542513c7f87c3a962a | 95c49f466673952b465e19a5ee3ae6eff76bee00 | /src/main/java/com/zhihu/android/app/feed/p1083ui/fragment/$$Lambda$FeedsHotListFragment$wkUFYYH27P6yZsjqyMKEDorzUw0.java | 8217fece01182835fa6528343a0f0017c4dc52e5 | [] | no_license | Phantoms007/zhihuAPK | 58889c399ae56b16a9160a5f48b807e02c87797e | dcdbd103436a187f9c8b4be8f71bdf7813b6d201 | refs/heads/main | 2023-01-24T01:34:18.716323 | 2020-11-25T17:14:55 | 2020-11-25T17:14:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 874 | java | package com.zhihu.android.app.feed.p1083ui.fragment;
import com.zhihu.android.api.model.ZHObject;
import java8.util.p2234b.AbstractC32239o;
/* renamed from: com.zhihu.android.app.feed.ui.fragment.-$$Lambda$FeedsHotListFragment$wkUFYYH27P6yZsjqyMKEDorzUw0 reason: invalid class name */
/* compiled from: lambda */
public final /* synthetic */ class $$Lambda$FeedsHotListFragment$wkUFYYH27P6yZsjqyMKEDorzUw0 implements AbstractC32239o {
public static final /* synthetic */ $$Lambda$FeedsHotListFragment$wkUFYYH27P6yZsjqyMKEDorzUw0 INSTANCE = new $$Lambda$FeedsHotListFragment$wkUFYYH27P6yZsjqyMKEDorzUw0();
private /* synthetic */ $$Lambda$FeedsHotListFragment$wkUFYYH27P6yZsjqyMKEDorzUw0() {
}
@Override // java8.util.p2234b.AbstractC32239o
public final boolean test(Object obj) {
return FeedsHotListFragment.m59903b((ZHObject) obj);
}
}
| [
"seasonpplp@qq.com"
] | seasonpplp@qq.com |
9830341a06600003792e6af4475054e01ddaed4b | 936258f6462329cb6c83be2e67f2b6c540b0a490 | /Android/app/src/main/java/io/github/project_travel_mate/utilities/ChecklistEntry.java | 39ce4ea3e075958d00322ad8fdc579a9cda0acae | [
"MIT"
] | permissive | JaydipRadadiya/Travel-Mate | e7021426b73ff1993e89af85395dd33b32d96ad2 | dea7f6aa9819fe27928078a626aa42169a0f7d29 | refs/heads/master | 2020-03-19T21:02:25.842199 | 2018-06-09T20:11:27 | 2018-06-09T20:11:27 | 136,927,010 | 1 | 0 | null | 2018-06-11T13:01:45 | 2018-06-11T13:01:44 | null | UTF-8 | Java | false | false | 490 | java | package io.github.project_travel_mate.utilities;
import android.provider.BaseColumns;
/**
* Created by Swati garg on 30-06-2015.
* <p>
* Constants for database column names
*/
public abstract class ChecklistEntry implements BaseColumns {
public static final String TABLE_NAME = "events_new";
public static final String COLUMN_NAME_ID = "id";
public static final String COLUMN_NAME = "name";
public static final String COLUMN_NAME_ISDONE = "isdone";
}
| [
"swati4star@gmail.com"
] | swati4star@gmail.com |
d7babeec53583cd2064562e7902a5d26d50f509b | bf7b4c21300a8ccebb380e0e0a031982466ccd83 | /middlewareConcepts2014-master/Assignment3/lib/jacorb-3.4/src/generated/org/omg/CosTypedNotifyChannelAdmin/TypedProxyPullSupplier.java | 76feecbb25763964757df943ec384e7ed4c618d9 | [] | no_license | Puriakshat/Tuberlin | 3fe36b970aabad30ed95e8a07c2f875e4912a3db | 28dcf7f7edfe7320c740c306b1c0593a6c1b3115 | refs/heads/master | 2021-01-19T07:30:16.857479 | 2014-11-06T18:49:16 | 2014-11-06T18:49:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 445 | java | package org.omg.CosTypedNotifyChannelAdmin;
/**
* Generated from IDL interface "TypedProxyPullSupplier".
*
* @author JacORB IDL compiler V @project.version@
* @version generated at 27-May-2014 20:14:30
*/
public interface TypedProxyPullSupplier
extends TypedProxyPullSupplierOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity, org.omg.CosNotifyChannelAdmin.ProxySupplier, org.omg.CosTypedNotifyComm.TypedPullSupplier
{
}
| [
"puri.akshat@gmail.com"
] | puri.akshat@gmail.com |
b879dd54b4bceb37bd6b9fc83b77284025d6efcd | 5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1 | /Code Snippet Repository/Hibernate/Hibernate4450.java | 166d4c4630a7d84e59ceb3124a85f05d554c8f50 | [] | no_license | saber13812002/DeepCRM | 3336a244d4852a364800af3181e03e868cf6f9f5 | be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9 | refs/heads/master | 2023-03-16T00:08:06.473699 | 2018-04-18T05:29:50 | 2018-04-18T05:29:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 224 | java | @Override
protected FromImplementor<O, X> createCorrelationDelegate() {
return new SingularAttributeJoin<O,X>(
criteriaBuilder(),
getJavaType(),
getPathSource(),
getAttribute(),
getJoinType()
);
}
| [
"Qing.Mi@my.cityu.edu.hk"
] | Qing.Mi@my.cityu.edu.hk |
9e0b63a92db6f96826eb476c773776a9767f728d | 37a299a537df6b795795fbdbc8fb02da2ca0ff34 | /src/main/java/org/yx/http/handler/InvokeHandler.java | 6a461904c13e7858f61b0ea354fc8f217d058b3c | [
"Apache-2.0"
] | permissive | zhitongjob/sumk | 375ea98c07953beb3a75d09f8c4271c9efafb538 | ce9c9f395d744608c0b07d864d2b811f85380541 | refs/heads/master | 2021-01-21T14:17:10.093427 | 2017-06-25T05:21:33 | 2017-06-25T05:21:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,065 | java | /**
* Copyright (C) 2016 - 2017 youtongluan.
*
* 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.yx.http.handler;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.yx.bean.IOC;
import org.yx.common.BizExcutor;
import org.yx.exception.HttpException;
import org.yx.http.HttpGson;
import org.yx.http.Web;
import org.yx.http.filter.HttpBizFilter;
import org.yx.validate.ParamInfo;
public class InvokeHandler implements HttpHandler {
private static final Object STOP = new Object();
@Override
public boolean accept(Web web) {
return true;
}
@Override
public boolean handle(WebContext ctx) throws Throwable {
HttpNode info = ctx.getHttpNode();
if (!String.class.isInstance(ctx.getData())) {
HttpException.throwException(this.getClass(), ctx.getData().getClass().getName() + " is not String");
}
Object ret = info.accept(http -> {
if (http.argClz == null || http.argTypes == null || http.argTypes.length == 0) {
return exec(http.method, http.obj, null, null, ctx);
}
Object[] params = new Object[http.argTypes.length];
Object argObj = HttpGson.gson().fromJson((String) ctx.getData(), http.argClz);
for (int i = 0, k = 0; i < params.length; i++) {
if (argObj == null) {
params[i] = null;
continue;
}
Field f = http.fields[k++];
params[i] = f.get(argObj);
}
return exec(http.method, http.obj, params, info.paramInfos, ctx);
});
if (STOP == ret) {
return true;
}
ctx.setResult(ret);
return false;
}
private static Object exec(Method m, Object obj, Object[] params, ParamInfo[] paramInfos, WebContext ctx)
throws Throwable {
List<HttpBizFilter> list = IOC.getBeans(HttpBizFilter.class);
if (list == null || list.isEmpty()) {
return BizExcutor.exec(m, obj, params, paramInfos);
}
HttpServletRequest req = ctx.getHttpRequest();
try {
for (HttpBizFilter f : list) {
if (!f.beforeInvoke(req, ctx.getHttpResponse(), ctx.getCharset())) {
return STOP;
}
}
Object ret = BizExcutor.exec(m, obj, params, paramInfos);
for (HttpBizFilter f : list) {
if (!f.afterInvoke(req, ctx.getHttpResponse(), ctx.getCharset(), ret)) {
return STOP;
}
}
return ret;
} catch (Exception e) {
for (HttpBizFilter f : list) {
Exception e2 = f.error(req, e);
if (e2 != null) {
e = e2;
}
}
throw e;
}
}
}
| [
"Administrator@youxia"
] | Administrator@youxia |
2078512505911afb1779fd1d81131b16c60c5c29 | d00af6c547e629983ff777abe35fc9c36b3b2371 | /jboss-all/jmx/src/main/test/compliance/loading/support/Trivial.java | 54d2a54db7049fd7d806c3119f05a8a6274cf9a1 | [] | no_license | aosm/JBoss | e4afad3e0d6a50685a55a45209e99e7a92f974ea | 75a042bd25dd995392f3dbc05ddf4bbf9bdc8cd7 | refs/heads/master | 2023-07-08T21:50:23.795023 | 2013-03-20T07:43:51 | 2013-03-20T07:43:51 | 8,898,416 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 520 | java | /*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package test.compliance.loading.support;
/**
* Goes into MyMBeans.jar
*/
public class Trivial implements TrivialMBean
{
private String something = null;
private boolean anAttribute = true;
public void setSomething(String thing)
{
this.something = thing;
}
public String getSomething()
{
return something;
}
public void doOperation(String arg)
{
}
}
| [
"rasmus@dll.nu"
] | rasmus@dll.nu |
4e176f763b33ce4c954c84a659bb945d747d381e | d2b686f3f145e9f91637c25de298fcb639dfa778 | /zipkin-distributed-tracing/svcb-service/src/main/java/com/josedab/example/config/SvcbServiceConfiguration.java | e0e1d17f19d1963238b39e174048fd106d419c58 | [
"MIT"
] | permissive | vaquarkhan/spring-cloud-microservice | c55005d43d75ab47ee8f00b0ee71b6c8c578f87d | 724e70b429996dce142afe4aebd36e6fc7a857b7 | refs/heads/master | 2021-01-09T05:45:58.530969 | 2017-02-03T04:58:21 | 2017-02-03T04:58:21 | 80,798,404 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 368 | java | package com.josedab.example.config;
import org.springframework.cloud.sleuth.sampler.AlwaysSampler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class SvcbServiceConfiguration {
@Bean
public AlwaysSampler defaultSampler() {
return new AlwaysSampler();
}
}
| [
"josedab@gmail.com"
] | josedab@gmail.com |
97829dada1a87523e7ec187fc0d73e93b2c4a77b | 0082d066d69e9e78b7c6ba6a6b87dc906a4c9f63 | /impl/GroupSubList.java | d5759f51fab752b9198ad5275e5bcf11e9abfabb | [] | no_license | GridOPTICS/com.powerdata.openpa | 91e0b95e89bcbef2677f510a7ee3e3ee644ee78f | 9d68c07b70987143c026a61c30840dc04d359a85 | refs/heads/master | 2021-01-18T02:08:57.831998 | 2015-01-17T04:48:06 | 2015-01-17T04:48:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,900 | java | package com.powerdata.openpa.impl;
import com.powerdata.openpa.Bus;
import com.powerdata.openpa.BusList;
import com.powerdata.openpa.GenList;
import com.powerdata.openpa.Group;
import com.powerdata.openpa.GroupListIfc;
import com.powerdata.openpa.LineList;
import com.powerdata.openpa.LoadList;
import com.powerdata.openpa.PAModelException;
import com.powerdata.openpa.PhaseShifterList;
import com.powerdata.openpa.SVCList;
import com.powerdata.openpa.SeriesCapList;
import com.powerdata.openpa.SeriesReacList;
import com.powerdata.openpa.ShuntCapList;
import com.powerdata.openpa.ShuntReacList;
import com.powerdata.openpa.SwitchList;
import com.powerdata.openpa.TransformerList;
import com.powerdata.openpa.TwoTermDCLineList;
import gnu.trove.map.hash.TIntIntHashMap;
public abstract class GroupSubList<T extends Group> extends SubList<T> implements GroupListIfc<T>
{
GroupListIfc<T> _src;
TIntIntHashMap _grp;
public GroupSubList(GroupListIfc<T> src, int[] ndx)
{
super(src, ndx);
_src = src;
_grp = new TIntIntHashMap(_size, 0.5f, -1, -1);
for(int i=0; i < _size; ++i)
{
_grp.put(_ndx[i], i);
}
}
@Override
public BusList getBuses(int ndx) throws PAModelException
{
return _src.getBuses(_ndx[ndx]);
}
@Override
public SwitchList getSwitches(int ndx) throws PAModelException
{
return _src.getSwitches(_ndx[ndx]);
}
@Override
public LineList getLines(int ndx) throws PAModelException
{
return _src.getLines(_ndx[ndx]);
}
@Override
public SeriesReacList getSeriesReactors(int ndx) throws PAModelException
{
return _src.getSeriesReactors(_ndx[ndx]);
}
@Override
public SeriesCapList getSeriesCapacitors(int ndx) throws PAModelException
{
return _src.getSeriesCapacitors(_ndx[ndx]);
}
@Override
public TransformerList getTransformers(int ndx) throws PAModelException
{
return _src.getTransformers(_ndx[ndx]);
}
@Override
public PhaseShifterList getPhaseShifters(int ndx) throws PAModelException
{
return _src.getPhaseShifters(_ndx[ndx]);
}
@Override
public TwoTermDCLineList getTwoTermDCLines(int ndx) throws PAModelException
{
return _src.getTwoTermDCLines(_ndx[ndx]);
}
@Override
public GenList getGenerators(int ndx) throws PAModelException
{
return _src.getGenerators(_ndx[ndx]);
}
@Override
public LoadList getLoads(int ndx) throws PAModelException
{
return _src.getLoads(_ndx[ndx]);
}
@Override
public ShuntReacList getShuntReactors(int ndx) throws PAModelException
{
return _src.getShuntReactors(_ndx[ndx]);
}
@Override
public ShuntCapList getShuntCapacitors(int ndx) throws PAModelException
{
return _src.getShuntCapacitors(_ndx[ndx]);
}
@Override
public SVCList getSVCs(int ndx) throws PAModelException
{
return _src.getSVCs(_ndx[ndx]);
}
@Override
public T getByBus(Bus b)
{
int bgx = _grp.get(getByBus(b).getIndex());
return (bgx == -1) ? null : get(bgx);
}
}
| [
"chris@powerdata.com"
] | chris@powerdata.com |
747ba19ffa0cca76282fe15d560d3f615e94ea9b | 1dd03ae1cdd0f80d5b07114e0cba3faee331b425 | /BadgeSample/app/src/main/java/com/changxiao/badgesample/utils/BadgeUtil.java | 7d563a7b248ad93daf75a4e2755958694b9c8c83 | [] | no_license | xiaoqianchang/AndroidStudioProjects | 94392371a7d53c7866132842d47753c048ba2d2b | f5b256df3404f56ad53e80c818c551114555950e | refs/heads/master | 2020-08-10T00:51:53.251036 | 2019-10-10T15:16:00 | 2019-10-10T15:16:00 | 214,214,308 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,966 | java | package com.changxiao.badgesample.utils;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Build;
import android.widget.Toast;
import java.lang.reflect.Field;
/**
* 应用启动图标未读消息数显示 工具类 (效果如:QQ、微信、未读短信 等应用图标)<br/>
* 依赖于第三方手机厂商(如:小米、三星)的Launcher定制、原生系统不支持该特性<br/>
* 该工具类 支持的设备有 小米、三星、索尼【其中小米、三星亲测有效、索尼未验证】
* @author ice_zhengbin@163.com
*
* <p/>
* Created by Chang.Xiao on 2016/6/7.
*
* @version 1.0
*/
public class BadgeUtil {
/**
* Set badge count<br/>
* 针对 Samsung / xiaomi / sony 手机有效
* @param context The context of the application package.
* @param count Badge count to be set
*/
public static void setBadgeCount(Context context, int count) {
if (count <= 0) {
count = 0;
} else {
count = Math.max(0, Math.min(count, 99));
}
if (Build.MANUFACTURER.equalsIgnoreCase("Xiaomi")) {
sendToXiaoMi(context, count);
} else if (Build.MANUFACTURER.equalsIgnoreCase("sony")) {
sendToSony(context, count);
} else if (Build.MANUFACTURER.toLowerCase().contains("samsung")) {
sendToSamsumg(context, count);
} else {
Toast.makeText(context, "Not Support", Toast.LENGTH_LONG).show();
}
}
/**
* 向小米手机发送未读消息数广播
* @param count
*/
private static void sendToXiaoMi(Context context, int count) {
try {
Class miuiNotificationClass = Class.forName("android.app.MiuiNotification");
Object miuiNotification = miuiNotificationClass.newInstance();
Field field = miuiNotification.getClass().getDeclaredField("messageCount");
field.setAccessible(true);
field.set(miuiNotification, String.valueOf(count == 0 ? "" : count)); // 设置信息数-->这种发送必须是miui 6才行
} catch (Exception e) {
e.printStackTrace();
// miui 6之前的版本
Intent localIntent = new Intent(
"android.intent.action.APPLICATION_MESSAGE_UPDATE");
localIntent.putExtra(
"android.intent.extra.update_application_component_name",
context.getPackageName() + "/" + getLauncherClassName(context));
localIntent.putExtra(
"android.intent.extra.update_application_message_text", String.valueOf(count == 0 ? "" : count));
context.sendBroadcast(localIntent);
}
}
/**
* 向索尼手机发送未读消息数广播<br/>
* 据说:需添加权限:<uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE" /> [未验证]
* @param count
*/
private static void sendToSony(Context context, int count){
String launcherClassName = getLauncherClassName(context);
if (launcherClassName == null) {
return;
}
boolean isShow = true;
if (count == 0) {
isShow = false;
}
Intent localIntent = new Intent();
localIntent.setAction("com.sonyericsson.home.action.UPDATE_BADGE");
localIntent.putExtra("com.sonyericsson.home.intent.extra.badge.SHOW_MESSAGE",isShow);//是否显示
localIntent.putExtra("com.sonyericsson.home.intent.extra.badge.ACTIVITY_NAME",launcherClassName );//启动页
localIntent.putExtra("com.sonyericsson.home.intent.extra.badge.MESSAGE", String.valueOf(count));//数字
localIntent.putExtra("com.sonyericsson.home.intent.extra.badge.PACKAGE_NAME", context.getPackageName());//包名
context.sendBroadcast(localIntent);
}
/**
* 向三星手机发送未读消息数广播
* @param count
*/
private static void sendToSamsumg(Context context, int count){
String launcherClassName = getLauncherClassName(context);
if (launcherClassName == null) {
return;
}
Intent intent = new Intent("android.intent.action.BADGE_COUNT_UPDATE");
intent.putExtra("badge_count", count);
intent.putExtra("badge_count_package_name", context.getPackageName());
intent.putExtra("badge_count_class_name", launcherClassName);
context.sendBroadcast(intent);
}
/**
* 重置、清除Badge未读显示数<br/>
* @param context
*/
public static void resetBadgeCount(Context context) {
setBadgeCount(context, 0);
}
/**
* Retrieve launcher activity name of the application from the context
*
* @param context The context of the application package.
* @return launcher activity name of this application. From the
* "android:name" attribute.
*/
private static String getLauncherClassName(Context context) {
PackageManager packageManager = context.getPackageManager();
Intent intent = new Intent(Intent.ACTION_MAIN);
// To limit the components this Intent will resolve to, by setting an
// explicit package name.
intent.setPackage(context.getPackageName());
intent.addCategory(Intent.CATEGORY_LAUNCHER);
// All Application must have 1 Activity at least.
// Launcher activity must be found!
ResolveInfo info = packageManager
.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
// get a ResolveInfo containing ACTION_MAIN, CATEGORY_LAUNCHER
// if there is no Activity which has filtered by CATEGORY_DEFAULT
if (info == null) {
info = packageManager.resolveActivity(intent, 0);
}
return info.activityInfo.name;
}
}
| [
"qianchang.xiao@gmail.com"
] | qianchang.xiao@gmail.com |
c2c019b0c65bba693a6a0a0451bc366d8ea134cf | 9f69eb7de9968552877458f6b44b7b700d725683 | /app/src/main/java/com/app/greenttaxi/mvp/activity_login_presenter/ActivityLoginPresenter.java | ccaa3b2704e3264f372d1422357e8d1fbffcbb00 | [] | no_license | MotawroonProjects/GreentTaxi | ae4e97c83922e5118c167142034ebd2fa40239b6 | 5a15a4956eb36f476c9fe6185e90b5ecf6a4ac9c | refs/heads/master | 2023-05-01T03:03:58.206869 | 2021-05-09T10:26:41 | 2021-05-09T10:26:41 | 365,695,370 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,582 | java | package com.app.greenttaxi.mvp.activity_login_presenter;
import android.app.ProgressDialog;
import android.content.Context;
import android.util.Log;
import com.app.greenttaxi.R;
import com.app.greenttaxi.models.LoginModel;
import com.app.greenttaxi.models.UserModel;
import com.app.greenttaxi.remote.Api;
import com.app.greenttaxi.share.Common;
import com.app.greenttaxi.tags.Tags;
import java.io.IOException;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class ActivityLoginPresenter {
private Context context;
private ActivityLoginView view;
private LoginModel model;
public ActivityLoginPresenter(Context context, ActivityLoginView view) {
this.context = context;
this.view = view;
}
public void checkData(LoginModel loginModel) {
this.model = loginModel;
if (model.isDataValid(context)) {
login();
}
}
private void login() {
ProgressDialog dialog = Common.createProgressDialog(context, context.getString(R.string.wait));
dialog.setCancelable(false);
dialog.setCanceledOnTouchOutside(false);
dialog.show();
Api.getService(Tags.base_url)
.login(model.getAccess_code())
.enqueue(new Callback<UserModel>() {
@Override
public void onResponse(Call<UserModel> call, Response<UserModel> response) {
dialog.dismiss();
if (response.isSuccessful() && response.body() != null && response.body().getStatus() == 200) {
view.onUserFound(response.body());
} else if (response.isSuccessful() && response.body() != null && response.body().getStatus() == 404) {
view.onUserNoFound();
Log.e("error", response.body().getStatus() +"lkdkkd");
} else {
dialog.dismiss();
try {
Log.e("error", response.code() + response.errorBody().string());
} catch (IOException e) {
e.printStackTrace();
}
if (response.code() == 500) {
// view.onFailed("Server Error");
} else {
// view.onFailed(context.getString(R.string.failed));
}
}
}
@Override
public void onFailure(Call<UserModel> call, Throwable t) {
try {
dialog.dismiss();
if (t.getMessage() != null) {
Log.e("msg_category_error", t.getMessage() + "__");
if (t.getMessage().toLowerCase().contains("failed to connect") || t.getMessage().toLowerCase().contains("unable to resolve host")) {
// view.onFailed(context.getString(R.string.something));
} else {
// view.onFailed(context.getString(R.string.failed));
}
}
} catch (Exception e) {
Log.e("Error", e.getMessage() + "__");
}
}
});
}
}
| [
"ahmedmohamed23345@gmail.com"
] | ahmedmohamed23345@gmail.com |
7dc3aa9ad77be64f76a45a3f6646311d97abd89f | b864b992187e2e1c5c8da6fdabeeab5040058fe9 | /Android Example/Layout/LayoutContainerExamples/src/com/androidbook/layout/TrackPointList.java | a022dbc8b2891598c468f94cf64ec568f18ec3d9 | [] | no_license | Mr-Phoebe/ProgramLanguage | 5384afeef20c8a12cd89cf3720beb0337bd38fc9 | 1588aea62e15304339efb73d55653be1b4e57156 | refs/heads/master | 2023-02-06T11:59:06.272680 | 2023-02-06T04:00:14 | 2023-02-06T04:00:14 | 65,252,634 | 52 | 37 | null | null | null | null | UTF-8 | Java | false | false | 925 | java | package com.androidbook.layout;
import android.app.ListActivity;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.widget.ListAdapter;
import android.widget.SimpleCursorAdapter;
public class TrackPointList extends ListActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Uri tpp = Uri
.parse("content://com.mamlambo.gpx.TrackPointProvider/points");
String[] viewColumns = {
"timestamp", "latitude", "longitude",
"elevation",
};
Cursor names = managedQuery(tpp, null, null,
null, null);
startManagingCursor(names);
setContentView(R.layout.points_layout);
ListAdapter adapter = new SimpleCursorAdapter(
this, R.layout.points_item, names,
viewColumns, new int[] {
R.id.timestamp, R.id.latitude,
R.id.longitude, R.id.elevation,
});
setListAdapter(adapter);
}
}
| [
"whn289467822@outlook.com"
] | whn289467822@outlook.com |
bff7e60874551d7a7b71298994d35685111daee5 | 19599ad278e170175f31f3544f140a8bc4ee6bab | /src/com/ametis/cms/util/automation/SuspendReleaseProcessor.java | 58f5fa471fc72a545feea82df5d6810ed1c18914 | [] | no_license | andreHer/owlexaGIT | a2a0df83cd64a399e1c57bb6451262434e089631 | 426df1790443e8e8dd492690d6b7bd8fd37fa3d7 | refs/heads/master | 2021-01-01T04:26:16.039616 | 2016-05-12T07:37:20 | 2016-05-12T07:37:20 | 58,693,624 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 868 | java | package com.ametis.cms.util.automation;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.scheduling.quartz.QuartzJobBean;
import com.ametis.cms.util.automation.task.SuspendReleaseProcessorTask;
public class SuspendReleaseProcessor extends QuartzJobBean{
private SuspendReleaseProcessorTask suspendProcessorTask;
public SuspendReleaseProcessorTask getSuspendProcessorTask() {
return suspendProcessorTask;
}
public void setSuspendProcessorTask(SuspendReleaseProcessorTask suspendProcessorTask) {
this.suspendProcessorTask = suspendProcessorTask;
}
@Override
protected void executeInternal(JobExecutionContext arg0) throws JobExecutionException {
// TODO Auto-generated method stub
suspendProcessorTask.releaseMemberSuspend();
suspendProcessorTask.releaseGroupSuspend();
}
}
| [
"mashuri@7a4bab5d-9f4e-4b47-a10f-b21823e054b7"
] | mashuri@7a4bab5d-9f4e-4b47-a10f-b21823e054b7 |
713f8f28a2ba4fb66786ad51d2de2d60fe401d74 | 13496701ebeafb7eb840f409d8d196f2a1dd20bf | /isuite-core-ui/src/main/java/gov/nwcg/isuite/core/domain/impl/ContractorNameHistoryImpl.java | c1d779e4d668c0c2d9cdc7532698001588013710 | [] | no_license | paulduong222/development | 9a79c65e79bdf3fb35e505355e7bd66652f3817c | ace0e056d7e6f2f056daa3dd34b7cdbea983612b | refs/heads/master | 2023-01-09T23:01:17.546717 | 2019-09-19T21:49:27 | 2019-09-19T21:49:27 | 209,649,814 | 0 | 0 | null | 2023-01-07T09:56:09 | 2019-09-19T21:15:13 | Java | UTF-8 | Java | false | false | 3,620 | java | package gov.nwcg.isuite.core.domain.impl;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import gov.nwcg.isuite.core.domain.Contractor;
import gov.nwcg.isuite.core.domain.ContractorNameHistory;
import gov.nwcg.isuite.framework.core.domain.impl.PersistableImpl;
@Entity
@SequenceGenerator(name="SEQ_CONTRACTOR_NAME_HISTORY", sequenceName="SEQ_CONTRACTOR_NAME_HISTORY")
@Table(name = "isw_contractor_name_history")
public class ContractorNameHistoryImpl extends PersistableImpl implements ContractorNameHistory {
@Id
@GeneratedValue(strategy=GenerationType.AUTO, generator="SEQ_CONTRACTOR_NAME_HISTORY")
private Long id = 0L;
@ManyToOne(targetEntity=ContractorImpl.class, fetch=FetchType.LAZY,cascade=CascadeType.ALL)
@JoinColumn(name = "CONTRACTOR_ID", insertable = true, updatable = true, unique = false, nullable = true)
private Contractor contractor;
@Column(name="CONTRACTOR_ID", insertable = false, updatable = false, nullable = true)
private Long contractorId;
@Column(name="REASON_TEXT", length=255)
private String reasonText;
@Column(name="NEW_CONTRACTOR_NAME", length=50)
private String newContractorName;
@Column(name="OLD_CONTRACTOR_NAME", length=50)
private String oldContractorName;
public ContractorNameHistoryImpl() {
}
/**
* Returns the id.
*
* @return
* the id to return
*/
public Long getId() {
return id;
}
/**
* Sets the id.
*
* @param id
* the id to set
*/
public void setId(Long id) {
this.id = id;
}
/**
* Returns the contractor
*
* @return
* the contractor to return
*/
public Contractor getContractor() {
return contractor;
}
/**
* Returns the contractorId
*
* @return
* the contractorId to return
*/
public Long getContractorId() {
return contractorId;
}
/**
* Returns the newContractorName
*
* @return
* the newContractorName to return
*/
public String getNewContractorName() {
return newContractorName;
}
/**
* Returns the oldContractorName
*
* @return
* the oldContractorName to return
*/
public String getOldContractorName() {
return oldContractorName;
}
/**
* Returns the reasonText
*
* @return
* the reastonText to return
*/
public String getReasonText() {
return reasonText;
}
/**
* Sets the contractor
*
* @param contractor
* the contractor to set
*/
public void setContractor(Contractor contractor) {
this.contractor = contractor;
}
/**
* Sets the contractorId
*
* @param contractorId
* the contractorId to set
*/
public void setContractorId(Long contractorId) {
this.contractorId = contractorId;
}
/**
* Sets the newContractorName
*
* @param newContractorName
* the newContractorName to set
*/
public void setNewContractorName(String newContractorName) {
this.newContractorName = newContractorName;
}
/**
* Sets the oldContractorName
*
* @param oldContractorName
* the oldContractorName to set
*/
public void setOldContractorName(String oldContractorName) {
this.oldContractorName = oldContractorName;
}
/**
* Sets the reasonText
*
* @param reasonText
* the reasonText to set
*/
public void setReasonText(String reasonText) {
this.reasonText = reasonText;
}
}
| [
"paulduong@yahoo.com"
] | paulduong@yahoo.com |
3d33b31514ad0a156e3e19b812cc15761a1d17ec | d018a686f37a0c2d8b08f9d675facddb164edb94 | /examples/statistics/EvolutionChamber/src/java/com/fray/evo/action/build/EcActionBuildHydraliskDen.java | 7b1daff5f436c70dd1702ca6bd85f0aed9ae5476 | [] | no_license | Mestway/Patl4J | 9b7edc204afb3c55763b66254561d8390237d87f | b8985fdcc818fdb78c14e1831382f15475e186c0 | refs/heads/master | 2020-12-24T05:54:50.632299 | 2016-07-22T09:07:50 | 2016-07-22T09:07:50 | 29,904,381 | 8 | 2 | null | null | null | null | UTF-8 | Java | false | false | 367 | java | package com.fray.evo.action.build;
import java.io.Serializable;
import com.fray.evo.util.ZergBuildingLibrary;
public final class EcActionBuildHydraliskDen extends EcActionBuildBuilding implements Serializable
{
private static final long serialVersionUID = 1L;
public EcActionBuildHydraliskDen()
{
super(ZergBuildingLibrary.HydraliskDen);
}
}
| [
"xgd_smileboy@163.com"
] | xgd_smileboy@163.com |
e5bb85b5c7895584d4782e4642225e250ac64729 | ff8b51d42e91e741677fbe0cd0473b1f5283ebfc | /streamcomputer/src/main/java/com/jdcloud/sdk/service/streamcomputer/model/GetStorageListResponse.java | 97ab4eae51b2dcd15f58ebebcf8408cf803441eb | [
"Apache-2.0"
] | permissive | apatriot/jdcloud-sdk-java | cb25c96dfe188e6c3df45e82ee63c9053083920e | d2c6f365fe336b2ebcd83a2919d09318156114e8 | refs/heads/master | 2020-03-26T07:27:09.199169 | 2018-08-06T08:05:42 | 2018-08-06T08:05:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,106 | java | /*
* Copyright 2018 JDCLOUD.COM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:#www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* NameSpace相关 API
* 流数据总线NameSpace相关信息接口
*
* OpenAPI spec version: v1
* Contact:
*
* NOTE: This class is auto generated by the jdcloud code generator program.
*/
package com.jdcloud.sdk.service.streamcomputer.model;
import com.jdcloud.sdk.service.JdcloudResponse;
/**
* 创建或者更新storage
*/
public class GetStorageListResponse extends JdcloudResponse<GetStorageListResult> implements java.io.Serializable {
private static final long serialVersionUID = 1L;
} | [
"oulinbao@jd.com"
] | oulinbao@jd.com |
82aa37d3a3152f69612af4260fa35fd4e8922059 | a3e19a5a1c7e5f7d1db92c5503178f891acca4a9 | /bb300_ManagerFunction/src/main/java/www/dream/com/party/control/PartyController.java | 0c416b1ea1a98616922d501b18179f0c8fcc5628 | [] | no_license | rkdntm1/SpringProject | c05abda3a6a6360228a1b70dd6dea0b5216a6933 | 309d1db8bba08d3ef412a0c0b0431310fface692 | refs/heads/main | 2023-06-21T22:25:32.423684 | 2021-07-13T11:50:53 | 2021-07-13T11:50:53 | 368,929,072 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,188 | java | package www.dream.com.party.control;
import java.io.IOException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.core.Authentication;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.access.AccessDeniedHandler;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import www.dream.com.party.model.Member;
import www.dream.com.party.service.PartyService;
@Controller
@RequestMapping("/party/*")
public class PartyController implements AuthenticationSuccessHandler, AccessDeniedHandler {
@Autowired
private PartyService partyService;
@Autowired
private PasswordEncoder pwEncoder;
@GetMapping(value="list")
public void getList(Model model) {
model.addAttribute("listParty", partyService.getList());
}
@GetMapping(value="customLogin")
public void loginInput(String error, String logout, Model model) {
if (error != null) {
model.addAttribute("error", "로그인 실패. 재시도 바람");
}
if (logout != null) {
model.addAttribute("logout", "안녕히 가세요.");
}
}
@GetMapping(value="customLogout")
public void processLogout() {
}
@PostMapping(value="customLogout")
public void processLogoutPost() {
}
@GetMapping(value="showCurUser")
public void showCurUser() {
}
@GetMapping("joinMember")
public void joinMember(Model model) {
model.addAttribute("listCPType", partyService.getCPTypeList());
model.addAttribute("memberType", partyService.getMemberType());
}
@PostMapping("joinMember")
public String joinMember(Member newBie, @DateTimeFormat(pattern = "yyyy-MM-dd") Date birthDate) {
//회원가입시 비밀번호 암호화
newBie.setUserPwd(pwEncoder.encode(newBie.getUserPwd()));
partyService.joinMember(newBie);
return "redirect:/";
}
@ResponseBody
@PostMapping(value = "idCheck", produces="text/plane")
public String ID_Check(@RequestBody String paramData) throws ParseException {
//클라이언트가 보낸 ID값
String ID = paramData.trim();
int dto = partyService.IDDuplicateCheck(ID);
if(dto > 0) {//결과 값이 있으면 아이디 존재
return "-1";
} else { //없으면 아이디 존재 X
System.out.println("null");
return "0";
}
}
/**
* 로그인 성공 시 각 사용자의 권한 유형에 따라 개인화된 화면을 연동시켜주기 위한 기능을 이곳에서 개발 합니다
*/
@Override
public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response,
Authentication authentication) throws IOException, ServletException {
List<String> roleNames = new ArrayList<>();
authentication.getAuthorities().forEach(authority -> {
roleNames.add(authority.getAuthority());
});
if (roleNames.contains("manager")) {
response.sendRedirect("/party/showCurUser");
return;
}
if (roleNames.contains("admin")) {
response.sendRedirect("/post/listBySearch?boardId=1");
return;
}
if (roleNames.contains("manager")) {
response.sendRedirect("/post/listBySearch?boardId=2");
return;
}
response.sendRedirect("/post/listBySearch?boardId=3");
}
@Override
public void handle(HttpServletRequest request, HttpServletResponse response,
AccessDeniedException accessDeniedException) throws IOException, ServletException {
response.sendRedirect("/party/accessError");
}
} | [
"rkdntm1@gmail.com"
] | rkdntm1@gmail.com |
e9de1b7088c7cc5257a14ea98d553b72ffa00e4d | 901aec9c9408a737cf382d6c3549e44eb3d0f167 | /base-aop-an/src/com/ocean/spring/aop/VlidationAspect.java | 74dcc6f8564b462aaa129858a15e31d1d54ffd45 | [] | no_license | zhangjunfang/architecture | a32f1d3e5dfd528517ed8dc4fd2e6b32a0a12e2d | 709cbc68a8381d93e7af779470025a1d8a27de4e | refs/heads/master | 2016-09-15T08:41:37.899666 | 2016-03-05T11:23:52 | 2016-03-05T11:23:52 | 33,911,525 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 548 | java | package com.ocean.spring.aop;
import java.util.Arrays;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
@Order(1)
@Aspect
@Component
public class VlidationAspect {
@Before("com.atguigu.spring.aop.LoggingAspect.declareJointPointExpression()")
public void validateArgs(JoinPoint joinPoint){
System.out.println("-->validate:" + Arrays.asList(joinPoint.getArgs()));
}
}
| [
"zhangjunfang0505@163.com"
] | zhangjunfang0505@163.com |
da79e5d5a26c4579e067b49514da363050207b74 | eb2556a43cc0a8d1c525fb21bb00d5a6158da4ad | /basex-core/src/main/java/org/basex/query/func/convert/ConvertIntegerToBase.java | e82ecc1afc6f1158da80b249260094459d034a4c | [
"BSD-3-Clause"
] | permissive | SirOlrac/basex | ee22c8336f2430ae38e962399f1cdc89c9a657d3 | b97a3bbf961178d0c3dc8c65d389c8299fc5d517 | refs/heads/master | 2020-06-13T20:08:21.217244 | 2016-12-02T21:48:49 | 2016-12-02T21:48:49 | 75,557,973 | 1 | 0 | null | 2016-12-04T19:08:45 | 2016-12-04T19:08:45 | null | UTF-8 | Java | false | false | 2,425 | java | package org.basex.query.func.convert;
import static org.basex.query.QueryError.*;
import static org.basex.util.Token.*;
import java.math.*;
import org.basex.query.*;
import org.basex.query.func.*;
import org.basex.query.value.item.*;
import org.basex.util.*;
import org.basex.util.list.*;
/**
* Function implementation.
*
* @author BaseX Team 2005-16, BSD License
* @author Christian Gruen
*/
public final class ConvertIntegerToBase extends StandardFunc {
/** BigInteger representing 2 * ({@link Long#MAX_VALUE} + 1). */
private static final BigInteger MAX_ULONG = BigInteger.ONE.shiftLeft(64);
/** Digits used in base conversion. */
private static final byte[] DIGITS = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b',
'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
};
@Override
public Item item(final QueryContext qc, final InputInfo ii) throws QueryException {
final long num = toLong(exprs[0], qc), base = toLong(exprs[1], qc);
if(base < 2 || base > 36) throw BXCO_INVBASE_X.get(info, base);
// use fast variant for powers of two
for(int i = 1, p = 2; i < 6; i++, p <<= 1)
if(base == p) return toBaseFast(num, i);
final ByteList tb = new ByteList();
long n = num;
if(n < 0) {
// unsigned value doesn't fit in any native type...
final BigInteger[] dr = BigInteger.valueOf(n).add(MAX_ULONG).divideAndRemainder(
BigInteger.valueOf(base));
n = dr[0].longValue();
tb.add(DIGITS[dr[1].intValue()]);
} else {
tb.add(DIGITS[(int) (n % base)]);
n /= base;
}
while(n != 0) {
tb.add(DIGITS[(int) (n % base)]);
n /= base;
}
final byte[] res = tb.finish();
Array.reverse(res);
return Str.get(res);
}
/**
* Converts the given number to a string, using base
* 2<sup>shift</sup>.
* @param num number item
* @param shift number of bits to use for one digit
* @return string representation of the given number
*/
private static Str toBaseFast(final long num, final int shift) {
final byte[] bytes = new byte[(64 + shift - 1) / shift];
final int mask = (1 << shift) - 1;
long n = num;
int pos = bytes.length;
do {
bytes[--pos] = DIGITS[(int) (n & mask)];
n >>>= shift;
} while(n != 0);
return Str.get(substring(bytes, pos));
}
}
| [
"christian.gruen@gmail.com"
] | christian.gruen@gmail.com |
8919c788fcbf714c1ae4f45d77cebb3e8bedd15e | a285d476dc6898794bf9128c7505a4a63320e38f | /src/test/java/gbsio/functional/request/authenticated/wallet/CharacterWalletJournalRequestTest.java | fdbe03ca7370a79b2fc70cfb782970ec059d0a3d | [
"MIT"
] | permissive | querns/esiclient | da1265ddcfb9fbdeaaf8914859f5f08216ebdca5 | 33031ba068b186e5e6716b29cc068ac60c9eb770 | refs/heads/master | 2020-03-27T20:07:10.718855 | 2018-09-02T00:04:04 | 2018-09-02T00:28:35 | 147,040,383 | 2 | 1 | MIT | 2018-09-13T09:55:41 | 2018-09-01T23:45:02 | Java | UTF-8 | Java | false | false | 925 | java | package gbsio.functional.request.authenticated.wallet;
import com.google.common.collect.ImmutableList;
import gbsio.esiclient.api.domain.response.wallet.JournalEntry;
import gbsio.esiclient.api.response.Response;
import gbsio.esiclient.client.request.wallet.CharacterWalletJournalRequest;
import gbsio.functional.FunctionalTestHarness;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import static org.junit.jupiter.api.Assertions.*;
class CharacterWalletJournalRequestTest extends FunctionalTestHarness {
@Test
void request() throws IOException {
final Response<ImmutableList<JournalEntry>> response = getClient().sendRequest(new CharacterWalletJournalRequest(
getPropertyAsInt("querns_id"),
getAccessToken("querns_token")
)).join();
final ImmutableList<JournalEntry> list = assertResponseExistsAndGet(response);
assertNotNull(list);
}
} | [
"querns@gbs.io"
] | querns@gbs.io |
29a89bd3545039c0b1bad942e52f66d0a3a08664 | e08a57885cb3a7f09b631e116ddb8dbbb9e454ff | /app/src/main/java/com/weique/overhaul/v2/di/component/InformationDynamicFormSelectComponent.java | 0b07e874764a307893cd17b7218172dcfb8fb6fe | [
"Apache-2.0"
] | permissive | coypanglei/zongzhi | b3fbdb3bb283778b49cba1e56b9955fd19dc17d4 | bc31d496533a342f0b6804ad6f7dc81c7314690b | refs/heads/main | 2023-02-28T07:20:18.249292 | 2021-02-07T07:04:17 | 2021-02-07T07:04:17 | 336,143,136 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,553 | java | package com.weique.overhaul.v2.di.component;
import dagger.BindsInstance;
import dagger.Component;
import com.jess.arms.di.component.AppComponent;
import com.weique.overhaul.v2.di.module.InformationDynamicFormSelectModule;
import com.weique.overhaul.v2.mvp.contract.InformationDynamicFormSelectContract;
import com.jess.arms.di.scope.ActivityScope;
import com.weique.overhaul.v2.mvp.ui.activity.information.InformationDynamicFormSelectActivity;
/**
* ================================================
* Description:
* <p>
* Created by MVPArmsTemplate on 11/27/2019 16:20
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
* <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
* <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
* ================================================
*/
@ActivityScope
@Component(modules = InformationDynamicFormSelectModule.class, dependencies = AppComponent.class)
public interface InformationDynamicFormSelectComponent {
void inject(InformationDynamicFormSelectActivity activity);
@Component.Builder
interface Builder {
@BindsInstance
InformationDynamicFormSelectComponent.Builder view(InformationDynamicFormSelectContract.View view);
InformationDynamicFormSelectComponent.Builder appComponent(AppComponent appComponent);
InformationDynamicFormSelectComponent build();
}
} | [
"434604925@qq.com"
] | 434604925@qq.com |
9acb6a39581f353871369a71497509444869adfa | 4f2cc25fe6363cf267cfeb92a5d2632cfe81499b | /app/src/main/java/com/shoppay/hshyly/adapter/TimeChoseAdapter.java | 384cd961de781783125f5ab9bf376e630b2fe7a8 | [] | no_license | yy471101598/huangshanhuyouleyuan | efb3f34766965e943236979d22874224784dec4d | 96c5977b1d7c1cbcc50183876dfdd20d4f86a39b | refs/heads/master | 2020-04-05T18:16:00.898773 | 2020-03-09T14:39:00 | 2020-03-09T14:39:00 | 157,094,525 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,834 | java | package com.shoppay.hshyly.adapter;
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.shoppay.hshyly.R;
import java.util.List;
/**
* Created by songxiaotao on 2017/7/2.
*/
public class TimeChoseAdapter extends BaseAdapter {
LayoutInflater inflater;
List<String> items;
public TimeChoseAdapter(Context context, List<String> items) {
super();
this.inflater = LayoutInflater.from(context);
this.items = items;
}
@Override
public int getCount() {
// TODO Auto-generated method stub
return items.size();
}
@Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return items.get(position);
}
@Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
}
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
@Override
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
ViewHolder holder;
if (convertView == null) {
convertView = inflater.inflate(R.layout.item_timechose, null);
holder = new ViewHolder();
holder.tv_car = (TextView) convertView
.findViewById(R.id.item_carlist_car);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
String item = items.get(position);
holder.tv_car.setText(item);
return convertView;
}
static class ViewHolder {
TextView tv_car;
}
}
| [
"471101598@qq.com"
] | 471101598@qq.com |
08ce230e9a9bff8be2e55b16e6c2a49404fca82d | 5b8ecfcf397b85c35abce50d60d7f11c5d8d91d8 | /core/src/test/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortInfoPreparatorTest.java | e0c444b3bf61affecf81cb5b131d3bf1715f3e64 | [
"Apache-2.0"
] | permissive | debugger87/incubator-carbondata | dafacfd4a8e5dc3f9d8b24ea606db323c21294de | a68fd0cbc048764e32fd55b92cc475f616ec7299 | refs/heads/master | 2020-06-10T16:30:17.421031 | 2017-01-02T03:53:48 | 2017-01-02T03:53:48 | 75,935,858 | 1 | 0 | null | 2016-12-08T12:30:37 | 2016-12-08T12:30:37 | null | UTF-8 | Java | false | false | 4,140 | 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.carbondata.core.writer.sortindex;
import java.util.ArrayList;
import java.util.List;
import org.apache.carbondata.core.cache.dictionary.Dictionary;
import org.apache.carbondata.core.cache.dictionary.DictionaryChunksWrapper;
import org.apache.carbondata.core.carbon.metadata.datatype.DataType;
import org.apache.carbondata.core.util.CarbonUtilException;
import mockit.Mock;
import mockit.MockUp;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
/**
* The class tests the CarbonDictionarySortInfoPreparator class that prepares the column sort info ie sortIndex
* and inverted sort index info
*/
public class CarbonDictionarySortInfoPreparatorTest {
private static CarbonDictionarySortInfoPreparator carbonDictionarySortInfoPreparator = null;
@BeforeClass public static void setUp() {
carbonDictionarySortInfoPreparator = new CarbonDictionarySortInfoPreparator();
}
/**
* Tests the getDictionarySortInfo method
*
* @throws CarbonUtilException
*/
@Test public void testGetDictionarySortInfo() throws CarbonUtilException {
List<String> newDistinctValues = new ArrayList<>();
newDistinctValues.add("abc");
newDistinctValues.add("xyz");
Dictionary dictionary = new MockUp<Dictionary>() {
@Mock public DictionaryChunksWrapper getDictionaryChunks() {
List<byte[]> data = new ArrayList<>();
data.add(new byte[] { 1, 2 });
List<List<byte[]>> dictionaryChunks = new ArrayList<>();
dictionaryChunks.add(data);
return new DictionaryChunksWrapper(dictionaryChunks);
}
}.getMockInstance();
new MockUp<DictionaryChunksWrapper>() {
@Mock public int getSize() {
return 1;
}
};
CarbonDictionarySortInfo carbonDictionarySortInfo = carbonDictionarySortInfoPreparator
.getDictionarySortInfo(newDistinctValues, dictionary, DataType.ARRAY);
int expectedGetSortIndexValue = 1;
int expectedGetSortInvertedIndexLength = 3;
int actualGetSortIndexValue = carbonDictionarySortInfo.getSortIndex().get(0);
int actualGetSortInvertedIndexLength = carbonDictionarySortInfo.getSortIndexInverted().size();
assertEquals(actualGetSortIndexValue, expectedGetSortIndexValue);
assertEquals(actualGetSortInvertedIndexLength, expectedGetSortInvertedIndexLength);
}
/**
* Tests getDictionarySortInfo when dictionary is null
*
* @throws CarbonUtilException
*/
@Test public void testGetDictionarySortInfoDictionaryNullCase() throws CarbonUtilException {
List<String> newDistinctValues = new ArrayList<>();
newDistinctValues.add("abc");
newDistinctValues.add("xyz");
Dictionary dictionary = null;
CarbonDictionarySortInfo carbonDictionarySortInfo = carbonDictionarySortInfoPreparator
.getDictionarySortInfo(newDistinctValues, dictionary, DataType.ARRAY);
int expectedGetSortIndexValue = 1;
int expectedGetSortInvertedIndexLength = 2;
int actualGetSortIndexValue = carbonDictionarySortInfo.getSortIndex().get(0);
int actualGetSortInvertedIndexLength = carbonDictionarySortInfo.getSortIndexInverted().size();
assertEquals(actualGetSortIndexValue, expectedGetSortIndexValue);
assertEquals(actualGetSortInvertedIndexLength, expectedGetSortInvertedIndexLength);
}
}
| [
"ravi.pesala@gmail.com"
] | ravi.pesala@gmail.com |
e93d74e9e884f0df37fe9bafeb82907fc9513e88 | 377e5e05fb9c6c8ed90ad9980565c00605f2542b | /.gitignore/bin/ext-content/cmscockpit/testsrc/de/hybris/platform/cmscockpit/util/TestURLCOMInjectionSanitizer.java | 074d288b227bd10d10d23bb5b18520259521a9bf | [] | no_license | automaticinfotech/HybrisProject | c22b13db7863e1e80ccc29774f43e5c32e41e519 | fc12e2890c569e45b97974d2f20a8cbe92b6d97f | refs/heads/master | 2021-07-20T18:41:04.727081 | 2017-10-30T13:24:11 | 2017-10-30T13:24:11 | 108,957,448 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,249 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2000-2016 SAP SE or an SAP affiliate company.
* All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.cmscockpit.util;
import de.hybris.bootstrap.annotations.IntegrationTest;
import de.hybris.platform.servicelayer.ServicelayerTest;
import org.apache.commons.lang.StringUtils;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
/**
* Created on 2014-12-02.
*/
@IntegrationTest
public class TestURLCOMInjectionSanitizer extends ServicelayerTest {
@Test
public void url_is_encoded_for_executing_command_with_pipe()
{
final String url = URLCOMInjectionSanitizer.sanitize("http://sensitive/cgi-bin/userData.pl?doc=/bin/ls|");
assertThat(StringUtils.contains(url, "|"), is(false));
assertThat(StringUtils.contains(url, "%7C"), is(true));
}
@Test
public void url_is_encoded_for_executing_command_with_semicolon()
{
final String url = URLCOMInjectionSanitizer.sanitize("http://sensitive/cgi-bin/userData.pl?doc=/bin/ls;");
System.out.print(url);
assertThat(StringUtils.contains(url, ";"), is(false));
assertThat(StringUtils.contains(url, "&"), is(false));
}
@Test
public void url_is_encoded_for_executing_command_with_two_semicolon()
{
final String url = URLCOMInjectionSanitizer.sanitize("http://sensitive/cgi-bin/userData.pl?doc=/bin/ls;/bin/ls;");
System.out.print(url);
assertThat(StringUtils.contains(url, ";"), is(false));
assertThat(StringUtils.contains(url, "&"), is(true));
}
@Test
public void url_is_encoded_for_executing_command_in_double_quotes()
{
final String url = URLCOMInjectionSanitizer.sanitize("http://sensitive/cgi-bin/userData.pl?doc=/\"`ls`\"");
assertThat(StringUtils.contains(url, "\""), is(false));
assertThat(StringUtils.contains(url, "%22"), is(true));
}
@Test
public void url_is_encoded_for_executing_command_in_single_quotes()
{
final String url = URLCOMInjectionSanitizer.sanitize("http://sensitive/cgi-bin/userData.pl?doc=/\"`ls`\"");
assertThat(StringUtils.contains(url, "`"), is(false));
assertThat(StringUtils.contains(url, "%60"), is(true));
}
@Test
public void url_is_encoded_for_executing_command_with_dollarsign_and_brackets()
{
final String url = URLCOMInjectionSanitizer.sanitize("http://sensitive/cgi-bin/userData.pl?doc=/\"$(ls)\"");
assertThat(StringUtils.contains(url, "&"), is(true));
assertThat(StringUtils.contains(url, "("), is(false));
assertThat(StringUtils.contains(url, ")"), is(false));
assertThat(StringUtils.contains(url, "%28"), is(true));
assertThat(StringUtils.contains(url, "%29"), is(true));
}
@Test
public void url_is_encoded_for_executing_command_with_two_ampersand()
{
final String url = URLCOMInjectionSanitizer.sanitize("http://sensitive/cgi-bin/userData.pl?doc=&&/bin/ls");
assertThat(StringUtils.countMatches(url, "&"), is(1));
}
@Test
public void url_is_encoded_for_executing_command_with_greater_than_sign()
{
final String url = URLCOMInjectionSanitizer.sanitize("http://sensitive/cgi-bin/userData.pl?doc=/bin/ls>tom.txt");
assertThat(StringUtils.contains(url, ">"), is(false));
assertThat(StringUtils.contains(url, "%3E"), is(true));
}
@Test
public void url_is_encoded_for_executing_command_with_two_greater_than_signs()
{
final String url = URLCOMInjectionSanitizer.sanitize("http://sensitive/cgi-bin/userData.pl?doc=/bin/ls>>tom.txt");
assertThat(StringUtils.contains(url, ">>"), is(false));
assertThat(StringUtils.contains(url, "%3E%3E"), is(true));
}
@Test
public void url_is_encoded_for_executing_command_with_less_than_sign()
{
final String url = URLCOMInjectionSanitizer.sanitize("http://sensitive/cgi-bin/userData.pl?doc=<tom.txt");
assertThat(StringUtils.contains(url, "<"), is(false));
assertThat(StringUtils.contains(url, "%3C"), is(true));
}
@Test
public void url_is_encoded_for_executing_command_with_curly_brackets()
{
final String url = URLCOMInjectionSanitizer.sanitize("http://sensitive/cgi-bin/userData.pl?doc={ls}");
assertThat(StringUtils.contains(url, "{"), is(false));
assertThat(StringUtils.contains(url, "}"), is(false));
assertThat(StringUtils.contains(url, "%7B"), is(true));
assertThat(StringUtils.contains(url, "%7D"), is(true));
}
@Test
public void url_is_encoded_for_executing_command_xml_encoding_ampersand_removed()
{
final String url = URLCOMInjectionSanitizer.sanitize("http://www.domain.com?balh=&;blah=blah");
assertThat(StringUtils.contains(url, ";"), is(false));
assertThat(StringUtils.countMatches(url, "&"), is(1));
}
}
| [
"santosh.kshirsagar@automaticinfotech.com"
] | santosh.kshirsagar@automaticinfotech.com |
3f13b155cd735818f7b3f352734b641b1c88bb67 | fe5d86481efdfe242d90398ecb98986286d55e17 | /data/search/APIzator13259563.java | 37b25e28a85656a730ecc93d1a349fa91d657f5a | [
"CC-BY-4.0"
] | permissive | pasqualesalza/apization | 0923a438ac3b963d6efa8d779cce614e04bc0193 | 941ae03b2a9177875d00feec651dd27e7bdd5e29 | refs/heads/main | 2022-07-30T04:33:10.078103 | 2021-08-23T14:08:35 | 2021-08-23T14:08:35 | 399,110,560 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 568 | java | package com.stackoverflow.api;
import java.util.LinkedHashSet;
import java.util.Set;
import java.util.TreeSet;
/**
* How to maintain a Unique List in Java?
*
* @author APIzator
* @see <a href="https://stackoverflow.com/a/13259563">https://stackoverflow.com/a/13259563</a>
*/
public class APIzator13259563 {
public static void maintainList(
Set<Integer> linkedHashSet,
Set<Integer> treeSet
) throws Exception {
for (int i : linkedHashSet) {
System.out.println(i);
}
for (int i : treeSet) {
System.out.println(i);
}
}
}
| [
"pasquale.salza@gmail.com"
] | pasquale.salza@gmail.com |
9c079c6e450e48dcce99f1482417c8bdbacd0464 | a602903c73834edbd6b1161dd202d1e36428a7ca | /Java/datawarehouse/src/main/java/com/sandata/models/interfaces/alt_evv_generic/visit/Calls.java | 536d197bebcd78c53e5e89b868dfde088f3ca894 | [] | no_license | PharahPhat/Selenium | e5e0ce5ca91708f63005fe205b061f23f1cd2c8e | 572fcf773c9e70b7ac168752d11c11b24837cab9 | refs/heads/master | 2022-12-08T12:59:52.010706 | 2020-04-01T04:49:04 | 2020-04-01T04:49:04 | 143,975,962 | 0 | 0 | null | 2022-12-06T00:44:30 | 2018-08-08T07:20:16 | Java | UTF-8 | Java | false | false | 3,308 | java | package com.sandata.models.interfaces.alt_evv_generic.visit;
import com.sandata.models.GenericModel;
public class Calls extends GenericModel {
private String CallExternalID;
private String CallDateTime;
private String CallAssignment;
private String CallType;
private String ProcedureCode;
private String ClientIdentifierOnCall;
private String MobileLogin;
private String CallLatitude;
private String CallLongitude;
private String Location;
private String TelephonyPIN;
private String OriginatingPhoneNumber;
private String ErrorCode;
private String ErrorMessage;
public String getCallExternalID() {
return CallExternalID;
}
public void setCallExternalID(String callExternalID) {
CallExternalID = callExternalID;
}
public String getCallDateTime() {
return CallDateTime;
}
public void setCallDateTime(String callDateTime) {
CallDateTime = callDateTime;
}
public String getCallAssignment() {
return CallAssignment;
}
public void setCallAssignment(String callAssignment) {
CallAssignment = callAssignment;
}
public String getCallType() {
return CallType;
}
public void setCallType(String callType) {
CallType = callType;
}
public String getProcedureCode() {
return ProcedureCode;
}
public void setProcedureCode(String procedureCode) {
ProcedureCode = procedureCode;
}
public String getClientIdentifierOnCall() {
return ClientIdentifierOnCall;
}
public void setClientIdentifierOnCall(String clientIdentifierOnCall) {
ClientIdentifierOnCall = clientIdentifierOnCall;
}
public String getMobileLogin() {
return MobileLogin;
}
public void setMobileLogin(String mobileLogin) {
MobileLogin = mobileLogin;
}
public String getCallLatitude() {
return CallLatitude;
}
public void setCallLatitude(String callLatitude) {
CallLatitude = callLatitude;
}
public String getCallLongitude() {
return CallLongitude;
}
public void setCallLongitude(String callLongitude) {
CallLongitude = callLongitude;
}
public String getLocation() {
return Location;
}
public void setLocation(String location) {
Location = location;
}
public String getTelephonyPIN() {
return TelephonyPIN;
}
public void setTelephonyPIN(String telephonyPIN) {
TelephonyPIN = telephonyPIN;
}
public String getOriginatingPhoneNumber() {
return OriginatingPhoneNumber;
}
public void setOriginatingPhoneNumber(String originatingPhoneNumber) {
OriginatingPhoneNumber = originatingPhoneNumber;
}
public String getErrorCode() {
return ErrorCode;
}
public void setErrorCode(String errorCode) {
ErrorCode = errorCode;
}
public String getErrorMessage() {
return ErrorMessage;
}
public void setErrorMessage(String errorMessage) {
ErrorMessage = errorMessage;
}
@Override
public boolean verifyFieldValue(Object obj) {
return false;
}
@Override
public boolean verifyFieldsNotNull() {
return false;
}
}
| [
"phattnguyen@kms-technology.com"
] | phattnguyen@kms-technology.com |
fa4613300e88dec0e6622140f389eb9126522669 | ed638310e7ccdbc21746448ba0c7c4e3a25289c5 | /SeleniumProject/src/day3/LinksEg2.java | 8e0fb417d0d033525290fa28835421c1d7bd1bfe | [] | no_license | shaath/Mohan_Monika | cf4846ab7c4a0326035cae68d459baea85435e04 | 5f53f214ad5dea4d6680354a312215e8880a8421 | refs/heads/master | 2020-05-25T09:48:00.494832 | 2019-05-21T02:26:07 | 2019-05-21T02:26:07 | 187,745,656 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 847 | java | package day3;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class LinksEg2 {
public static void main(String[] args)
{
int count=0;
WebDriver driver=new FirefoxDriver();
driver.get("http://bing.com");
driver.manage().window().maximize();
List<WebElement> links=driver.findElements(By.tagName("a"));
System.out.println("The total links count "+links.size());
for (int i = 0; i < links.size(); i++)
{
String name=links.get(i).getText();
// System.out.println(name);
if (!name.equals(""))
{
count=count+1;
}
}
System.out.println("The visible links count is "+count);
System.out.println("This invisible count is "+(links.size()-count));
}
}
| [
"you@example.com"
] | you@example.com |
7581e6b51172d7b06cb1144e755e1052e4887c7e | ea4b2e14a0d00d8dd03dd5a69ff56da1e693dcd4 | /Java-Examples-WORKSPACE/CoreJavaExamples/src/com/removelastcharacterinstring_15/RemoveChar_1.java | 4fa634c04a5d8d40492a60e16bcbeb194c7cc795 | [] | no_license | umeshkilkile/java | c69aa244a3f62988cee94337b1b47581a35d1764 | 0879eecf56faae8842bcde7aebccb42b52c6d189 | refs/heads/master | 2020-04-09T22:36:28.326660 | 2019-01-04T11:02:49 | 2019-01-04T11:02:49 | 160,633,177 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 624 | java | package com.removelastcharacterinstring_15;
import java.util.Optional;
public class RemoveChar_1 {
public static void main(String[] args) {
String s = "Ramesh";
System.out.println(removeLastChar(s));
System.out.println(removeLastCharOptional(s));
}
public static String removeLastChar(String s) {
return (s == null || s.length() == 0) ? null : (s.substring(0, s.length() - 1));
}
// Refactor the code and use Java 8
public static String removeLastCharOptional(String s) {
return Optional.ofNullable(s).filter(str -> str.length() != 0).map(str -> str.substring(0, str.length() - 1))
.orElse(s);
}
}
| [
"umeshsubhash.kilkile@lowes.com"
] | umeshsubhash.kilkile@lowes.com |
cbde47e35256cb029c67c0aaaf9b9ab25aef5ddd | 85ad7dc49f09a744139df64506954565d814e32c | /src/java/com/bytecode/entities/Loan.java | b2988dc38b748ded3b85daaccaa90d1e2ec9b54d | [] | no_license | lawale4me/BankingCoreV2 | 79bf5f95ebc5d1cc6250b7cbac82f573f3d3c233 | 3cee3468f11adb763ab9bba8fb3f5ff52170bbd3 | refs/heads/master | 2021-01-19T04:41:15.322386 | 2016-09-27T13:49:23 | 2016-09-27T13:49:23 | 69,361,731 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,810 | 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.bytecode.entities;
import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
/**
*
* @author Ahmed
*/
@Entity
@Table(name = "loan")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Loan.findAll", query = "SELECT l FROM Loan l"),
@NamedQuery(name = "Loan.findByLoanid", query = "SELECT l FROM Loan l WHERE l.loanid = :loanid"),
@NamedQuery(name = "Loan.findByAmount", query = "SELECT l FROM Loan l WHERE l.amount = :amount"),
@NamedQuery(name = "Loan.findByApprovedby", query = "SELECT l FROM Loan l WHERE l.approvedby = :approvedby"),
@NamedQuery(name = "Loan.findByDeniedby", query = "SELECT l FROM Loan l WHERE l.deniedby = :deniedby"),
@NamedQuery(name = "Loan.findByEnddate", query = "SELECT l FROM Loan l WHERE l.enddate = :enddate"),
@NamedQuery(name = "Loan.findByInstallments", query = "SELECT l FROM Loan l WHERE l.installments = :installments"),
@NamedQuery(name = "Loan.findByLoanaccountno", query = "SELECT l FROM Loan l WHERE l.loanaccountno = :loanaccountno"),
@NamedQuery(name = "Loan.findByLoandate", query = "SELECT l FROM Loan l WHERE l.loandate = :loandate"),
@NamedQuery(name = "Loan.findByRequestdate", query = "SELECT l FROM Loan l WHERE l.requestdate = :requestdate"),
@NamedQuery(name = "Loan.findByStatus", query = "SELECT l FROM Loan l WHERE l.status = :status")})
public class Loan implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "loanid")
private Integer loanid;
@Size(max = 255)
@Column(name = "amount")
private String amount;
@Size(max = 255)
@Column(name = "approvedby")
private String approvedby;
@Size(max = 255)
@Column(name = "deniedby")
private String deniedby;
@Column(name = "enddate")
@Temporal(TemporalType.TIMESTAMP)
private Date enddate;
@Size(max = 255)
@Column(name = "installments")
private String installments;
@Size(max = 255)
@Column(name = "loanaccountno")
private String loanaccountno;
@Column(name = "loandate")
@Temporal(TemporalType.TIMESTAMP)
private Date loandate;
@Column(name = "requestdate")
@Temporal(TemporalType.TIMESTAMP)
private Date requestdate;
@Column(name = "status")
private Integer status;
@JoinColumn(name = "accountid", referencedColumnName = "accountid")
@ManyToOne
private Account accountid;
@JoinColumn(name = "loanproductid", referencedColumnName = "loanproductid")
@ManyToOne
private Loanproduct loanproductid;
@OneToMany(mappedBy = "loanId")
private Collection<Guarantor> guarantorCollection;
public Loan() {
}
public Loan(Integer loanid) {
this.loanid = loanid;
}
public Integer getLoanid() {
return loanid;
}
public void setLoanid(Integer loanid) {
this.loanid = loanid;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getApprovedby() {
return approvedby;
}
public void setApprovedby(String approvedby) {
this.approvedby = approvedby;
}
public String getDeniedby() {
return deniedby;
}
public void setDeniedby(String deniedby) {
this.deniedby = deniedby;
}
public Date getEnddate() {
return enddate;
}
public void setEnddate(Date enddate) {
this.enddate = enddate;
}
public String getInstallments() {
return installments;
}
public void setInstallments(String installments) {
this.installments = installments;
}
public String getLoanaccountno() {
return loanaccountno;
}
public void setLoanaccountno(String loanaccountno) {
this.loanaccountno = loanaccountno;
}
public Date getLoandate() {
return loandate;
}
public void setLoandate(Date loandate) {
this.loandate = loandate;
}
public Date getRequestdate() {
return requestdate;
}
public void setRequestdate(Date requestdate) {
this.requestdate = requestdate;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Account getAccountid() {
return accountid;
}
public void setAccountid(Account accountid) {
this.accountid = accountid;
}
public Loanproduct getLoanproductid() {
return loanproductid;
}
public void setLoanproductid(Loanproduct loanproductid) {
this.loanproductid = loanproductid;
}
@XmlTransient
public Collection<Guarantor> getGuarantorCollection() {
return guarantorCollection;
}
public void setGuarantorCollection(Collection<Guarantor> guarantorCollection) {
this.guarantorCollection = guarantorCollection;
}
@Override
public int hashCode() {
int hash = 0;
hash += (loanid != null ? loanid.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Loan)) {
return false;
}
Loan other = (Loan) object;
if ((this.loanid == null && other.loanid != null) || (this.loanid != null && !this.loanid.equals(other.loanid))) {
return false;
}
return true;
}
@Override
public String toString() {
return "com.bytecode.entities.Loan[ loanid=" + loanid + " ]";
}
}
| [
"ahmed.oladele@vanso.com"
] | ahmed.oladele@vanso.com |
4df4fa710e9fa948db74a570ae35c1b0e1fec6a3 | 6d12c170fb6c0adae2b226482a097a0dc2850086 | /lib/src/us/kbase/kbasefeaturevalues/ExportMatrixParams.java | 567d187995d681fe9e9173d951bb8b0a108ea74c | [
"MIT"
] | permissive | kbaseapps/FeatureValues | 4579957f71c60f0a9c381747da128701f3c5e4ae | 83424c92de0efe2228700de6ef2af72a57a97435 | refs/heads/master | 2021-06-13T23:37:26.580679 | 2021-03-30T23:35:12 | 2021-03-30T23:35:12 | 67,832,935 | 0 | 14 | MIT | 2021-03-30T23:35:13 | 2016-09-09T21:10:02 | Java | UTF-8 | Java | false | false | 1,571 | java |
package us.kbase.kbasefeaturevalues;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* <p>Original spec-file type: ExportMatrixParams</p>
*
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@Generated("com.googlecode.jsonschema2pojo")
@JsonPropertyOrder({
"input_ref"
})
public class ExportMatrixParams {
@JsonProperty("input_ref")
private String inputRef;
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
@JsonProperty("input_ref")
public String getInputRef() {
return inputRef;
}
@JsonProperty("input_ref")
public void setInputRef(String inputRef) {
this.inputRef = inputRef;
}
public ExportMatrixParams withInputRef(String inputRef) {
this.inputRef = inputRef;
return this;
}
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperties(String name, Object value) {
this.additionalProperties.put(name, value);
}
@Override
public String toString() {
return ((((("ExportMatrixParams"+" [inputRef=")+ inputRef)+", additionalProperties=")+ additionalProperties)+"]");
}
}
| [
"rsutormin@lbl.gov"
] | rsutormin@lbl.gov |
c300871d7c216ffa012aa2414bc22e57ebe4a520 | 78f284cd59ae5795f0717173f50e0ebe96228e96 | /factura-negocio/src/cl/stotomas/factura/negocio/training_8/copy/TestingTry.java | bf2bc3cc1b6022be1753de3abff845fb30811abb | [] | no_license | Pattricio/Factura | ebb394e525dfebc97ee2225ffc5fca10962ff477 | eae66593ac653f85d05071b6ccb97fb1e058502d | refs/heads/master | 2020-03-16T03:08:45.822070 | 2018-05-07T15:29:25 | 2018-05-07T15:29:25 | 132,481,305 | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 1,258 | java | package cl.stotomas.factura.negocio.training_8.copy;
import java.applet.Applet;
public class TestingTry {
// Inclusión de funcionalidades de esfera de control que no es de confianza
// Un atacante puede insertar funcionalidades maliciosas dentro de este programa.
// Las Applet comprometen la seguridad. ya que sus funcionalidades se pueden adaptar a la Web
// Ademas la entrega de acceso de credenciales es engorrosa para el cliente.
public final class TestApplet extends Applet {
private static final long serialVersionUID = 1L;
}
//Comparación de referencias de objeto en lugar de contenido de objeto
// El if dentro de este código no se ejecutará.
// porque se prioriza el String a mostrar.
public final class compareStrings{
public String str1;
public String str2;
public void comparar()
{
if (str1 == str2)
{
System.out.println("str1 == str2");
}
}
// RECOMENDACIÓN VERACODE
// Utilizar equals para realizar la comparación.
// public void comprar()
// {
// if (str1.equals (str2))
// {
// System.out.println ("str1 es igual a str2");
// }
// }
}
}
| [
"Adriana Molano@DESKTOP-GQ96FK8"
] | Adriana Molano@DESKTOP-GQ96FK8 |
4735c8b42eea97e070c94943896a5c1256e35be2 | 1a3bebad0ebda492b69ee08ef05826b83dee5896 | /Decaf.java | 3e69c4e9adf2e1eb473fcb1e26f19a09c8ce95c2 | [] | no_license | maryannnnn/Decorator | 2b2d090248e6c86ec20683435c7a284248836c46 | 530421f3c94a513da424e6f156271cbe18e763e9 | refs/heads/master | 2020-12-29T16:43:15.726440 | 2020-02-06T11:33:30 | 2020-02-06T11:33:30 | 238,673,302 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 190 | java | package Patterns.Decorator;
public class Decaf extends Beverage {
public Decaf() {
description = "Decaf Coffee";
}
public double cost() {
return 1.45;
}
}
| [
"you@example.com"
] | you@example.com |
67f0befce66c47ee930589d4fec4f68bd8c12749 | e728a645244ec41d3f693b19361366cd2059cf49 | /02. Encapsulation/p_04_first_and_reserve_team/Person.java | a67de1d30f197ea0452a485607a9aadfbe553936 | [] | no_license | VTheodore/Java-OOP-Basics | 6dee2fc4fda2694302f8d8306f074f0398eccb77 | a83e50dabe0d9eac81ff6d5b3c36d6cf774a5ab3 | refs/heads/master | 2020-03-19T22:45:19.357604 | 2018-08-29T17:10:04 | 2018-08-29T17:10:04 | 136,980,532 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 470 | java | package L02_Encapsulation.p_04_first_and_reserve_team;
public class Person {
private String firstName;
private String lastName;
private Integer age;
private Double salary;
public Person(String firstName, String lastName, Integer age, Double salary) {
this.firstName = firstName;
this.lastName = lastName;
this.age = age;
this.salary = salary;
}
public Integer getAge() {
return this.age;
}
}
| [
"theodorevezenkov@gmail.com"
] | theodorevezenkov@gmail.com |
7b5c6eb3ee8ba6e714c885907badb6f6d92a75bc | 9d6089379238e00c0a5fb2949c1a6e7c19b50958 | /bin/ext-template/yatddtests/testsrc/de/hybris/platform/generated/helloworld/Hello_World.java | 1b716a9b0e915bacf88a228d5c0d2124027f3340 | [] | no_license | ChintalaVenkat/learning_hybris | 55ce582b4796a843511d0ea83f4859afea52bd88 | 6d29f59578512f9fa44a3954dc67d0f0a5216f9b | refs/heads/master | 2021-06-18T17:47:12.173132 | 2021-03-26T11:00:09 | 2021-03-26T11:00:09 | 193,689,090 | 0 | 0 | null | 2019-06-25T10:46:40 | 2019-06-25T10:46:39 | null | UTF-8 | Java | false | false | 4,754 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2000-2013 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.generated.helloworld;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import de.hybris.bootstrap.annotations.IntegrationTest;
import de.hybris.platform.core.Registry;
import de.hybris.platform.atddengine.framework.RobotSettings;
import de.hybris.platform.atddengine.framework.RobotTest;
import de.hybris.platform.atddengine.framework.RobotTestResult;
import de.hybris.platform.atddengine.framework.RobotTestSuite;
import de.hybris.platform.atddengine.framework.RobotTestSuiteFactory;
import de.hybris.platform.atddengine.framework.impl.DefaultPythonProvider;
import de.hybris.platform.atddengine.framework.impl.PythonAware;
import de.hybris.platform.atddengine.framework.impl.PythonRobotTestSuiteFactory;
import de.hybris.platform.atddengine.keywords.ImpExAdaptorAware;
import de.hybris.platform.atddengine.keywords.KeywordLibraryContext;
import de.hybris.platform.atddengine.keywords.KeywordLibraryContextHolder;
import de.hybris.platform.atddengine.keywords.RobotTestContext;
import de.hybris.platform.atddengine.keywords.RobotTestContextAware;
import de.hybris.platform.atddengine.keywords.impl.DefaultImpExAdaptor;
import de.hybris.platform.servicelayer.ServicelayerTest;
import de.hybris.platform.servicelayer.model.ModelService;
import de.hybris.platform.util.Config;
import java.io.File;
import java.io.IOException;
import javax.annotation.Resource;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Test;
/*
* This is a generated class. Do not edit, changes will be overriden.
*/
@SuppressWarnings("PMD")
@IntegrationTest
public class Hello_World extends ServicelayerTest implements RobotTestContext
{
public static RobotTestSuite robotTestSuite;
private ModelService modelService;
public static void startSuite() throws IOException
{
if (robotTestSuite == null)
{
final PythonAware pythonAware = new DefaultPythonProvider(Config.getParameter("atddengine.libraries-path"));
final RobotSettings robotSettings = new RobotSettings();
robotSettings.setOutputDir(new File(Config.getParameter("atddengine.report-path"), "helloworld"));
robotSettings.setLogName("Hello_World-log");
robotSettings.setOutputName("Hello_World-output");
robotSettings.setReportName("Hello_World-report");
final RobotTestSuiteFactory robotTestSuiteFactory = new PythonRobotTestSuiteFactory(pythonAware);
robotTestSuite = robotTestSuiteFactory.parseTestSuite(robotSettings, new File(
"/home/bamboouser/agent/agent-home/xml-data/build-dir/HYM-ATDD2-JOB1/source/yatddtests/genresources/robottests/Hello_World.txt"));
}
if (!robotTestSuite.isStarted())
{
robotTestSuite.start();
}
}
@AfterClass
public static void tearDownSuite()
{
robotTestSuite.close();
}
private RobotTest currentRobotTest;
@Resource(name = "impExAdaptorHolder")
private ImpExAdaptorAware impExAdaptorHolder;
@Resource(name = "keywordLibraryContext")
private KeywordLibraryContext keywordLibraryContext;
@Resource(name = "robotTestContextHolder")
private RobotTestContextAware robotTestContextHolder;
/*
* (non-Javadoc)
*
* @see de.hybris.platform.atddengine.keywords.RobotTestContext#getCurrentRobotTest()
*/
@Override
public RobotTest getCurrentRobotTest()
{
return currentRobotTest;
}
/*
* (non-Javadoc)
*
* @see de.hybris.platform.atddengine.keywords.RobotTestContext#getProjectName()
*/
@Override
public String getProjectName()
{
return "helloworld";
}
@Before
public void setUp() throws IOException
{
impExAdaptorHolder.setImpExAdaptor(new DefaultImpExAdaptor());
robotTestContextHolder.setRobotTestContext(this);
KeywordLibraryContextHolder.setKeywordLibraryContext(keywordLibraryContext);
modelService = (ModelService)Registry.getApplicationContext().getBean("modelService");
startSuite();
}
@Test
public void Test_Hello_World()
{
modelService.detachAll();
final String robotTestName = "Test_Hello_World";
final RobotTest robotTest = robotTestSuite.getRobotTest(robotTestName);
currentRobotTest = robotTestSuite.getRobotTest(robotTestName);
assertNotNull("Robot test: '" + robotTestName + "' not found", currentRobotTest);
final RobotTestResult robotTestResult = robotTest.run();
assertTrue(robotTestResult.getMessage(), robotTestResult.isSuccess());
}
}
| [
"a.basov@aimprosoft.com"
] | a.basov@aimprosoft.com |
17e96a765cdcfffffd5a2ea5d7ca44e9a46f1f65 | 365b59229710d5b387e00f924ac0087102cb97c9 | /referencia/rhtutorial_parent/rhtutorial/src/main/java/com/empresa/rhtutorial/controller/factory/AppServiceFactory.java | e6213e5a8d63192415da5a18c91966f54d732ec1 | [] | no_license | iecker/jaguar615 | a8045ad4729b8fe572d13cb91239b9cca81d5383 | 4b2658738dac4fb93dd52489de640c7f3de4e782 | refs/heads/master | 2020-04-21T15:20:20.126020 | 2018-05-25T15:14:03 | 2018-05-25T15:14:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 827 | java | /* Jaguar-jCompany Developer Suite. Powerlogic 2010-2014. Please read licensing information or contact Powerlogic
* for more information or contribute with this project: suporte@powerlogic.com.br - www.powerlogic.com.br */
package com.empresa.rhtutorial.controller.factory;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Named;
/**
* Classe de factory para servir como fábrica de criação de classes utilitárias
*/
@Named("AppServiceFactory")
@ApplicationScoped
public class AppServiceFactory {
/**
*
* jCompany 6.0.0 - Exemplo de método para gerar PlcEntityUtil
*
@Factory(value="entityComunsUtil")
public PlcEntityUtil geraEntidadeService() {
return (PlcEntityUtil)Component.getInstance("AppMinhaEntidadeService",true);
}
*/
}
| [
"josivan.silva@castgroup.com.br"
] | josivan.silva@castgroup.com.br |
fa719cd5b965737609cd8d09f509865d08525300 | bd0a160ae9df2695d400080604f3bb944493e369 | /src/main/java/com/enfernuz/quik/lua/rpc/serde/protobuf/UnsubscribeLevel2QuotesArgsPbSerializer.java | 6fa6badd560fa89f95322eccb117fddc30aae52b | [] | no_license | Enfernuz/quik-lua-rpc-java-client | c2380301d31445fd671577cf1db8f82318af1fe7 | 7dbe225f60c671af91a08eb9ad02e94a5ce4e956 | refs/heads/master | 2023-06-22T02:24:40.449136 | 2022-04-04T03:37:22 | 2022-04-04T03:37:22 | 109,439,391 | 7 | 7 | null | 2023-06-14T22:51:31 | 2017-11-03T20:22:31 | Java | UTF-8 | Java | false | false | 942 | java | package com.enfernuz.quik.lua.rpc.serde.protobuf;
import com.enfernuz.quik.lua.rpc.api.messages.UnsubscribeLevel2Quotes;
import com.enfernuz.quik.lua.rpc.serde.Serializer;
import org.jetbrains.annotations.NotNull;
import qlua.rpc.UnsubscribeLevelIIQuotes;
enum UnsubscribeLevel2QuotesArgsPbSerializer implements Serializer<UnsubscribeLevel2Quotes.Args>, ToPbConverter<UnsubscribeLevel2Quotes.Args, UnsubscribeLevelIIQuotes.Args> {
INSTANCE;
@NotNull
@Override
public byte[] serialize(@NotNull final UnsubscribeLevel2Quotes.Args args) {
return convert(args).toByteArray();
}
@NotNull
@Override
public UnsubscribeLevelIIQuotes.Args convert(@NotNull final UnsubscribeLevel2Quotes.Args args) {
return UnsubscribeLevelIIQuotes.Args.newBuilder()
.setClassCode( args.getClassCode() )
.setSecCode( args.getSecCode() )
.build();
}
}
| [
"asnerushev@gmail.com"
] | asnerushev@gmail.com |
778b171def418f256f59416bcfb7a89d87ae8661 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/thinkaurelius--titan/76469e0497df2c3790bbe3bdfeb7f4fd790646a7/before/TitanKey.java | 8b48782a7c657ac9abd90ccc214f66aa6b5f967f | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,286 | java |
package com.thinkaurelius.titan.core;
import com.tinkerpop.blueprints.Element;
/**
* TitanKey is an extension of {@link TitanType} for properties.
* <p/>
* In addition to {@link TitanType}, TitanKey defines:
* <ul>
* <li><strong>Data Type:</strong> The accepted types of attribute values.</li>
* <li><strong>Index:</strong> Whether attribute values are indexed. If a property key is configured to be indexed,
* then all properties with that key are indexed which means one can retrieve vertices for that key and a value
* via {@link com.thinkaurelius.titan.core.TitanTransaction#query()}. The type of index can be configured individually
* for each key and each element type. For instance, one can define only vertices to be indexed for a particular key.</li>
* </ul>
*
* @author Matthias Bröcheler (me@matthiasb.com)
* @see TitanType
*/
public interface TitanKey extends TitanType {
/**
* Returns the data type for this property key.
* The attributes of all properties of this type must be an instance of this data type.
*
* @return Data type for this property key.
*/
public Class<?> getDataType();
/**
* The {@link Cardinality} of this property key.
* @return
*/
public Cardinality getCardinality();
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
ad664e64b76a230f019b6fecdf886dbced5e79e5 | 5e1cd8074734f6ff6248d533ac986162bd1e71bd | /fundamentals/CriminalIntent_1/app/src/test/java/com/bignerdranch/android/criminalintent_1/ExampleUnitTest.java | 1e55240813249e4a8739c1330e6468d76f3f7092 | [] | no_license | ltt19921124/AndroidF | 661a61df93ad8364879520175b1486d4b2093ead | 5151fec813052858429590bf79fcca90ae561cb2 | refs/heads/master | 2020-07-14T01:01:21.640189 | 2018-02-07T03:23:00 | 2018-02-07T03:23:00 | 94,291,988 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 419 | java | package com.bignerdranch.android.criminalintent_1;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
} | [
"ltt19921124@163.com"
] | ltt19921124@163.com |
6b1c68d060c6855e82cafb401b970c8672b2aba0 | 6c1066df4b3ab9a046b1bfd95b06965d2f7e94be | /src/test/java/at/molindo/esi4j/rebuild/util/BulkIndexHelperTest.java | c988c8071195c85fdce898a40ae75c5e8af20a4d | [
"Apache-2.0"
] | permissive | msparer/esi4j | 20e8dc8393d040542bd9a644debd5376f837a81b | be6be2d24843f7fe6f35b36f1862fbd3f01d79ee | refs/heads/master | 2021-01-18T05:44:16.681160 | 2014-10-14T07:23:47 | 2014-10-14T07:23:47 | 25,204,883 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,246 | java | /**
* Copyright 2010 Molindo GmbH
*
* 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 at.molindo.esi4j.rebuild.util;
import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import org.junit.Test;
import at.molindo.esi4j.core.Esi4J;
import at.molindo.esi4j.core.Esi4JIndex;
import at.molindo.esi4j.core.internal.InternalIndex;
import at.molindo.esi4j.test.util.TestUtils;
import at.molindo.esi4j.test.util.Tweet;
import at.molindo.esi4j.test.util.TweetTypeMapping;
public class BulkIndexHelperTest {
@Test
public void test() throws Exception {
Esi4J esi4j = TestUtils.newEsi4j();
Esi4JIndex index = esi4j.getIndex();
((InternalIndex) index).addTypeMapping(new TweetTypeMapping("tweet"));
BulkIndexHelper helper = new BulkIndexHelper();
BulkIndexHelper.IResponseHandler handler = createMock(BulkIndexHelper.IResponseHandler.class);
handler.handle("1", "index");
handler.handle("1", "delete");
helper.setResponseHandler(handler);
replay(handler);
Tweet tweet = new Tweet(1, 4, "bob", "hello world");
helper.newSession(index, 10).index(tweet).submit().await();
assertEquals(1, helper.getSucceeded());
assertEquals(0, helper.getFailed());
index.refresh();
assertEquals(tweet, index.get(Tweet.class, tweet.getId()).actionGet().getObject());
helper.newSession(index, 10).delete(tweet).submit().await();
assertEquals(2, helper.getSucceeded());
assertEquals(0, helper.getFailed());
index.refresh();
assertNull(index.get(Tweet.class, tweet.getId()).actionGet().getObject());
verify(handler);
esi4j.close();
}
}
| [
"stf+git@molindo.at"
] | stf+git@molindo.at |
c0565ec9952aebf7b50dcb08b4d42f11dc92d89d | 5f5675ee0429b504eaaa1d4f8a5451e36c434850 | /plugins/org.jkiss.dbeaver.model/src/org/jkiss/dbeaver/model/impl/SimpleTypedObject.java | b3e48b7b54430117206c53bb9ee6a703670311e5 | [
"Apache-2.0",
"EPL-2.0"
] | permissive | tianguanghui/dbeaver | 6f09f16bd752a3581008f9e674fc7bf70ca53e2e | 24538a0a327ff94895b5b8091f7a29031ec394bc | refs/heads/devel | 2022-11-13T17:04:10.795431 | 2020-06-28T14:05:02 | 2020-06-28T14:05:02 | 275,745,610 | 1 | 0 | Apache-2.0 | 2020-06-29T06:08:55 | 2020-06-29T06:08:54 | null | UTF-8 | Java | false | false | 1,649 | java | /*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2020 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.model.impl;
import org.jkiss.dbeaver.model.DBPDataKind;
import org.jkiss.dbeaver.model.struct.DBSTypedObject;
/**
* SimpleTypedObject
*/
public class SimpleTypedObject implements DBSTypedObject {
public static final SimpleTypedObject DEFAULT_TYPE = new SimpleTypedObject("Object");
private String typeName;
public SimpleTypedObject(String typeName) {
this.typeName = typeName;
}
@Override
public String getTypeName() {
return typeName;
}
@Override
public String getFullTypeName() {
return getTypeName();
}
@Override
public int getTypeID() {
return 0;
}
@Override
public DBPDataKind getDataKind() {
return DBPDataKind.OBJECT;
}
@Override
public Integer getScale() {
return null;
}
@Override
public Integer getPrecision() {
return null;
}
@Override
public long getMaxLength() {
return 0;
}
} | [
"serge@jkiss.org"
] | serge@jkiss.org |
a2cb2e387413ebd2fb7f93943a54242e7a46ab46 | dd136daa4dc7dcc34d670236f6a9b3d5fd1a35d8 | /app/src/main/java/network/minter/bipwallet/internal/helpers/DisplayHelper.java | 52706577cdfb24abed919b564cc4a58c86ec8a25 | [
"MIT"
] | permissive | Al293/minter-android-wallet | 011281603a0d6bcc79c251a652f1974fc6b5c342 | 26e6ff5b5bdaa81e5c42ca18ac71e951c47153a7 | refs/heads/master | 2021-02-07T13:08:21.436080 | 2019-12-09T13:39:10 | 2019-12-09T13:39:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,645 | java | /*
* Copyright (C) by MinterTeam. 2018
* @link <a href="https://github.com/MinterTeam">Org Github</a>
* @link <a href="https://github.com/edwardstock">Maintainer Github</a>
*
* The MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package network.minter.bipwallet.internal.helpers;
import android.content.Context;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import androidx.annotation.DimenRes;
import androidx.annotation.FloatRange;
import androidx.annotation.Px;
import network.minter.bipwallet.internal.common.annotations.Dp;
import network.minter.bipwallet.internal.common.annotations.Sp;
import network.minter.bipwallet.internal.helpers.data.Vec2;
/**
* minter-android-wallet. 2018
* @author Eduard Maximovich <edward.vstock@gmail.com>
*/
public class DisplayHelper {
private Context mContext;
public DisplayHelper(final Context context) {
mContext = context;
}
public int getColumns(@Dp float columnWidthDp) {
DisplayMetrics displayMetrics = mContext.getResources().getDisplayMetrics();
float dpWidth = displayMetrics.widthPixels / displayMetrics.density;
return (int) (dpWidth / columnWidthDp);
}
@Px
public int getWidth() {
DisplayMetrics displayMetrics = mContext.getResources().getDisplayMetrics();
return displayMetrics.widthPixels;
}
@Px
public int getHeight() {
DisplayMetrics displayMetrics = mContext.getResources().getDisplayMetrics();
return displayMetrics.heightPixels;
}
@Px
public int dpToPx(@Dp int integer) {
float pixels = getMetrics().density * integer;
return (int) (pixels + 0.5f);
}
public boolean isTablet() {
return false; //@TODO return mContext.getResources().getBoolean(R.bool.isTablet);
}
/**
* @param percent From 0.0 to infinite, where 100.0f is 100% of screen width
* @return
*/
@Px
public int widthPercent(@FloatRange(from = 0.0f) float percent) {
return (int) (getWidth() / 100 * percent);
}
public Vec2 getWidthAndHeightWithRatio(@DimenRes int fromWidthResId, @DimenRes int ratioWidthId, @DimenRes int ratioHeightId) {
final int width = px(fromWidthResId);
final int height = (int)
(
width /
(getDimen(ratioWidthId) / getDimen(ratioHeightId))
);
return new Vec2(width, height);
}
/**
* Как работает:
* К примеру у нас есть ширина: 100% экрана, к примеру 1000px
* нам нужна пропорциональная высота относительно известного кол-ва пикселей,
* Требуемый формат 1000x500
* Далее все просто.
* Берем 100% ширины делим на пропорцию формата (ширина/высота) и получаем нужную высоту=500px
* 1000 / (1000/500=2.0) = 500
* <p>
* если экран в ширину 800 пикселей, то получим следующую формулу:
* 800 / (1000/500=2.0) = 400
* @param widthPercent Ширина от которой отталкиваемся
* @param ratioWidthId id ширины
* @param ratioHeightId id высоты
* @return
* @see #getWidthAndHeightWithRatio(int, int, int)
*/
public Vec2 getWidthAndHeightWithRatio(
@FloatRange(from = 0.0f) float widthPercent,
@DimenRes int ratioWidthId,
@DimenRes int ratioHeightId) {
final int width = widthPercent(widthPercent);
final int height = (int)
(
width /
(getDimen(ratioWidthId) / getDimen(ratioHeightId))
);
return new Vec2(width, height);
}
public Vec2 getWidthAndHeightWithRatio(
@FloatRange(from = 0.0f) float widthPercent,
float ratioWidth,
float ratioHeight) {
final int width = widthPercent(widthPercent);
final int height = (int)
(
width /
(ratioWidth / ratioHeight)
);
return new Vec2(width, height);
}
@Px
public int heightPercent(@FloatRange(from = 0.0f) float percent) {
return (int) (getHeight() / 100 * percent);
}
@Px
public int dpToPx(@Dp float dps) {
float pixels = getMetrics().density * dps;
return (int) (pixels + 0.5f);
}
@Dp
public int pxToDp(@Px int px) {
return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, px, getMetrics());
}
@Px
public int px(@DimenRes int res) {
return dpToPx(mContext.getResources().getDimension(res));
}
public DisplayMetrics getMetrics() {
return mContext.getResources().getDisplayMetrics();
}
@Px
public int spToPx(@Sp int sp) {
return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, sp, getMetrics());
}
public int getStatusBarHeight() {
int result = 0;
int resourceId = mContext.getResources().getIdentifier("status_bar_height", "dimen", "android");
if (resourceId > 0) {
result = mContext.getResources().getDimensionPixelSize(resourceId);
}
return result;
}
public float getDimen(@DimenRes int resId) {
return mContext.getResources().getDimension(resId);
}
}
| [
"edward.vstock@gmail.com"
] | edward.vstock@gmail.com |
41fb7303cf1c8b7c62703597b2a24b8e3b1d4023 | 729097f21fc4fdceda6bae0421308797c06b59bb | /src/cn/clickvalue/cv2/test/ParserCommandB.java | 4d61fff837d2ab54a8b895afdc1f2eca8967301d | [] | no_license | qxev/cv2 | e1c32f666d016cd56ff79c56f1f9bcf9b4ba47bc | f7215337347fb4afa552987dbd79304debf6ecef | refs/heads/master | 2021-01-10T04:50:58.216626 | 2016-03-16T10:13:10 | 2016-03-16T10:13:10 | 54,020,600 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 337 | java | package cn.clickvalue.cv2.test;
import java.text.SimpleDateFormat;
public class ParserCommandB extends AbstractCommand {
@Override
public SimpleDateFormat getDateFormater() {
// 13 Jan 2007
SimpleDateFormat sdf = new SimpleDateFormat("dd MMM yyyy");
sdf.setLenient(false);
return sdf;
}
}
| [
"qqxev@hotmail.com"
] | qqxev@hotmail.com |
da89260bb12695a3ad18acd1a9443f50bd398b13 | 2c9e0541ed8a22bcdc81ae2f9610a118f62c4c4d | /harmony/tests/stress/qa/src/test/stress/org/apache/harmony/test/stress/threads/share/StressTestThreadSO.java | a0f4ec33c334afd035f1d386e0abeb3c4f08a6fa | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | JetBrains/jdk8u_tests | 774de7dffd513fd61458b4f7c26edd7924c7f1a5 | 263c74f1842954bae0b34ec3703ad35668b3ffa2 | refs/heads/master | 2023-08-07T17:57:58.511814 | 2017-03-20T08:13:25 | 2017-03-20T08:16:11 | 70,048,797 | 11 | 9 | null | null | null | null | UTF-8 | Java | false | false | 1,644 | 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.harmony.test.stress.threads.share;
import org.apache.harmony.share.DRLLogging;
/**
* Thread throws StackOverflowError in endless loop.
*/
public class StressTestThreadSO extends Thread {
/* Logger */
DRLLogging log;
public StressTestThreadSO(DRLLogging log) {
this.log = log;
}
public void run() {
while (true) {
try {
testRec();
} catch (StackOverflowError er) {
} catch (Throwable t) {
log.info("Unexpected error in StackOverflow thread: "
+ t.toString());
break;
}
}
}
/**
* Recursive method, used to invoke StackOverflowError.
*/
public static void testRec() throws StackOverflowError {
testRec();
}
}
| [
"vitaly.provodin@jetbrains.com"
] | vitaly.provodin@jetbrains.com |
a4076e3c38279e22002591c23987a904163190eb | 69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e | /methods/Method_17612.java | 2e3a5f9a9fb12efdbdce3a434c0e16a9e47e0ab8 | [] | no_license | P79N6A/icse_20_user_study | 5b9c42c6384502fdc9588430899f257761f1f506 | 8a3676bc96059ea2c4f6d209016f5088a5628f3c | refs/heads/master | 2020-06-24T08:25:22.606717 | 2019-07-25T15:31:16 | 2019-07-25T15:31:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 152 | java | public void record(long key){
int hint=sketch.frequency(key);
hinter.increment(hint);
sketch.increment(key);
estSkew.record(key);
sample++;
}
| [
"sonnguyen@utdallas.edu"
] | sonnguyen@utdallas.edu |
93b59c72a88071e461ae200e46a782efbfbaf186 | 3bab81792c722411c542596fedc8e4b1d086c1a9 | /src/main/java/com/gome/maven/lang/parameterInfo/UpdateParameterInfoContext.java | 5a7a63a760de3dd77853fa4abaf89ba096d95951 | [] | no_license | nicholas879110/maven-code-check-plugin | 80d6810cc3c12a3b6c22e3eada331136e3d9a03e | 8162834e19ed0a06ae5240b5e11a365c0f80d0a0 | refs/heads/master | 2021-04-30T07:09:42.455482 | 2018-03-01T03:21:21 | 2018-03-01T03:21:21 | 121,457,530 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,143 | java | /*
* Copyright 2000-2009 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gome.maven.lang.parameterInfo;
import com.gome.maven.psi.PsiElement;
public interface UpdateParameterInfoContext extends ParameterInfoContext {
void removeHint();
void setParameterOwner(final PsiElement o);
PsiElement getParameterOwner();
void setHighlightedParameter(final Object parameter);
void setCurrentParameter(final int index);
boolean isUIComponentEnabled(int index);
void setUIComponentEnabled(int index, boolean b);
int getParameterListStart();
Object[] getObjectsToView();
}
| [
"zhangliewei@gome.com.cn"
] | zhangliewei@gome.com.cn |
454c9bbf9c7ab68e6d901c0e43f00f1c627b97d7 | 3180c5a659d5bfdbf42ab07dfcc64667f738f9b3 | /src/com/zing/zalo/ui/BlackListActivity.java | c32dc7d065d692c75dfa01d3b200b96312dc0785 | [] | no_license | tinyx3k/ZaloRE | 4b4118c789310baebaa060fc8aa68131e4786ffb | fc8d2f7117a95aea98a68ad8d5009d74e977d107 | refs/heads/master | 2023-05-03T16:21:53.296959 | 2013-05-18T14:08:34 | 2013-05-18T14:08:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,372 | java | package com.zing.zalo.ui;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.Window;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import com.zing.zalo.a.c;
import com.zing.zalo.b.i;
import com.zing.zalo.b.j;
import com.zing.zalo.control.m;
import com.zing.zalo.h.v;
import com.zing.zalo.utils.b;
import com.zing.zalo.utils.p;
public final class BlackListActivity extends BetterActivity
{
private Resources KH;
private ImageView NT;
private ImageButton No;
private LinearLayout OD;
private final String TAG = BlackListActivity.class.getSimpleName();
private ProgressDialog Tx;
private String ZA = "";
private int ZB = -1;
private boolean ZC = false;
private i ZD = new j();
private com.zing.zalo.b.a ZE = new bg(this);
public boolean ZF = false;
private i ZG = new j();
private com.zing.zalo.b.a ZH = new bk(this);
private LinearLayout Zt;
private ImageButton Zu;
private Button Zv;
private TextView Zw;
private ListView Zx;
private c Zy;
private m Zz = new m();
private void i(String paramString, int paramInt)
{
if (this.ZF)
return;
this.ZF = true;
if ((this.Tx != null) && (!this.Tx.isShowing()) && (!isFinishing()))
this.Tx.show();
this.ZA = paramString;
this.ZG.a(this.ZH);
this.ZG.Y(paramString);
}
private void o(String paramString1, String paramString2, String paramString3)
{
try
{
if (this.ZC)
return;
this.OD.setVisibility(0);
this.NT.setImageDrawable(null);
this.Zt.setVisibility(8);
this.Zx.setVisibility(8);
this.ZC = true;
this.ZD.a(this.ZE);
this.ZD.o(paramString1, paramString2, paramString3);
return;
}
catch (Exception localException)
{
localException.printStackTrace();
}
}
public void j(String paramString, int paramInt)
{
this.ZA = paramString;
this.ZB = paramInt;
try
{
removeDialog(0);
showDialog(0);
return;
}
catch (Exception localException)
{
}
}
protected void onActivityResult(int paramInt1, int paramInt2, Intent paramIntent)
{
if ((paramInt1 == 1000) && (paramInt2 == -1))
o("75", "1", "500");
}
public void onCreate(Bundle paramBundle)
{
super.onCreate(paramBundle);
if (p.d(this))
return;
p.e(this);
try
{
setContentView(2130903050);
getWindow().setSoftInputMode(3);
this.KH = getResources();
this.Tx = new ProgressDialog(this);
this.Tx.setMessage(this.KH.getString(2131165349));
this.Tx.setCancelable(true);
this.Tx.setCanceledOnTouchOutside(false);
this.OD = ((LinearLayout)findViewById(2131296549));
this.Zt = ((LinearLayout)findViewById(2131296561));
this.NT = ((ImageView)findViewById(2131296552));
this.Zx = ((ListView)findViewById(2131296563));
this.Zw = ((TextView)findViewById(2131296540));
this.Zx.setOnScrollListener(new bm(this));
this.No = ((ImageButton)findViewById(2131296482));
this.No.setOnClickListener(new bn(this));
this.Zu = ((ImageButton)findViewById(2131296494));
this.Zu.setOnClickListener(new bo(this));
this.Zv = ((Button)findViewById(2131296562));
this.Zv.setOnClickListener(new bp(this));
this.Zy = new c(this, com.zing.zalo.g.a.DG);
this.Zx.setAdapter(this.Zy);
o("75", "1", "500");
label286: b.eB(this.TAG);
return;
}
catch (Exception localException)
{
break label286;
}
}
protected Dialog onCreateDialog(int paramInt)
{
switch (paramInt)
{
default:
return null;
case 0:
}
Resources localResources = getResources();
v localv = new v(this);
localv.bW(localResources.getString(2131165489)).bV(localResources.getString(2131165915)).h(localResources.getString(2131165233), new bq(this)).g(localResources.getString(2131165232), new br(this));
return localv.io();
}
}
/* Location: /home/danghvu/0day/Zalo/Zalo_1.0.8_dex2jar.jar
* Qualified Name: com.zing.zalo.ui.BlackListActivity
* JD-Core Version: 0.6.2
*/ | [
"danghvu@gmail.com"
] | danghvu@gmail.com |
7eb1dcad8f398b1af520aa065af12f39e160815e | 0de83a9c6f003392783ce0a1c7ae80fe2df95e71 | /src/main/java/chap2/InterruptedTest2.java | a7c4d7c24170a13f163694548c49858f4a3e3136 | [] | no_license | hjy628/concurrency-practice-design | cee599663267159373677c2c5fb3a4953918d4b9 | a8335198957667a9381371d5389d3b6da10824fe | refs/heads/master | 2021-05-13T19:41:18.985894 | 2018-02-27T02:24:03 | 2018-02-27T02:24:03 | 116,897,862 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 667 | java | package chap2;
import java.util.concurrent.TimeUnit;
/**
* Created by hjy on 18-1-11.
*/
public class InterruptedTest2 {
public static void main(String[] args) throws Exception{
Thread t1 = new Thread(){
@Override
public void run() {
while (true){
if (Thread.currentThread().isInterrupted()){
System.out.println("Interrupted!");
break;
}
Thread.yield();
}
}
};
t1.start();
TimeUnit.SECONDS.sleep(2);
t1.interrupt(); //中断有效
}
}
| [
"hjy628@gmail.com"
] | hjy628@gmail.com |
8e89f2181b3ba1a517a41bebdf1a7063285be614 | a5d01febfd8d45a61f815b6f5ed447e25fad4959 | /Source Code/5.5.1/sources/kotlin/reflect/jvm/internal/impl/load/kotlin/n.java | 154cfc66254d9b671bdf0bad680e7ac9ecd73d29 | [] | no_license | kkagill/Decompiler-IQ-Option | 7fe5911f90ed2490687f5d216cb2940f07b57194 | c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6 | refs/heads/master | 2020-09-14T20:44:49.115289 | 2019-11-04T06:58:55 | 2019-11-04T06:58:55 | 223,236,327 | 1 | 0 | null | 2019-11-21T18:17:17 | 2019-11-21T18:17:16 | null | UTF-8 | Java | false | false | 1,513 | java | package kotlin.reflect.jvm.internal.impl.load.kotlin;
import kotlin.reflect.jvm.internal.impl.descriptors.ai;
import kotlin.reflect.jvm.internal.impl.load.kotlin.header.KotlinClassHeader;
import kotlin.reflect.jvm.internal.impl.name.f;
/* compiled from: KotlinJvmBinaryClass.kt */
public interface n {
/* compiled from: KotlinJvmBinaryClass.kt */
public interface a {
b A(f fVar);
a a(f fVar, kotlin.reflect.jvm.internal.impl.name.a aVar);
void a(f fVar, Object obj);
void a(f fVar, kotlin.reflect.jvm.internal.impl.name.a aVar, f fVar2);
void visitEnd();
}
/* compiled from: KotlinJvmBinaryClass.kt */
public interface b {
void b(kotlin.reflect.jvm.internal.impl.name.a aVar, f fVar);
void cQ(Object obj);
void visitEnd();
}
/* compiled from: KotlinJvmBinaryClass.kt */
public interface c {
a a(kotlin.reflect.jvm.internal.impl.name.a aVar, ai aiVar);
void visitEnd();
}
/* compiled from: KotlinJvmBinaryClass.kt */
public interface d {
c a(f fVar, String str, Object obj);
e a(f fVar, String str);
}
/* compiled from: KotlinJvmBinaryClass.kt */
public interface e extends c {
a a(int i, kotlin.reflect.jvm.internal.impl.name.a aVar, ai aiVar);
}
void a(c cVar, byte[] bArr);
void a(d dVar, byte[] bArr);
KotlinClassHeader bap();
kotlin.reflect.jvm.internal.impl.name.a getClassId();
String getLocation();
}
| [
"yihsun1992@gmail.com"
] | yihsun1992@gmail.com |
26745357428752df8f44e8eac1f8f9e1a9138c5f | 086401d50df124164bc8c914c1d5b0710a0effb4 | /jeecms/src/com/jeecms/cms/manager/main/impl/CmsModelItemMngImpl.java | 686f602d8979e34320cc08bd25124027ce4c1b0c | [] | no_license | leoRui/jeecms | 2ba6453e8c4cfdec1b816a0d971e433c6964d97d | dcba632bd340f51beeaa761ebba614102d0f5282 | refs/heads/master | 2021-01-11T04:41:57.276283 | 2016-10-17T07:24:56 | 2016-10-17T07:24:56 | 71,110,852 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,478 | java | package com.jeecms.cms.manager.main.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jeecms.cms.dao.main.CmsModelItemDao;
import com.jeecms.cms.entity.main.CmsModelItem;
import com.jeecms.cms.manager.main.CmsModelItemMng;
import com.jeecms.cms.manager.main.CmsModelMng;
import com.jeecms.common.hibernate3.Updater;
@Service
@Transactional
public class CmsModelItemMngImpl implements CmsModelItemMng {
@Transactional(readOnly = true)
public List<CmsModelItem> getList(Integer modelId, boolean isChannel,
boolean hasDisabled) {
return dao.getList(modelId, isChannel, hasDisabled);
}
@Transactional(readOnly = true)
public CmsModelItem findById(Integer id) {
CmsModelItem entity = dao.findById(id);
return entity;
}
public CmsModelItem save(CmsModelItem bean, Integer modelId) {
bean.setModel(cmsModelMng.findById(modelId));
return save(bean);
}
public CmsModelItem save(CmsModelItem bean) {
bean.init();
dao.save(bean);
return bean;
}
public void saveList(List<CmsModelItem> list) {
for (CmsModelItem item : list) {
save(item);
}
}
public void updatePriority(Integer[] wids, Integer[] priority,
String[] label, Boolean[] single, Boolean[] display) {
CmsModelItem item;
for (int i = 0, len = wids.length; i < len; i++) {
item = findById(wids[i]);
item.setLabel(label[i]);
item.setPriority(priority[i]);
item.setSingle(single[i]);
item.setDisplay(display[i]);
}
}
public CmsModelItem update(CmsModelItem bean) {
Updater<CmsModelItem> updater = new Updater<CmsModelItem>(bean);
CmsModelItem entity = dao.updateByUpdater(updater);
entity.emptyToNull();
return entity;
}
public CmsModelItem deleteById(Integer id) {
CmsModelItem bean = dao.deleteById(id);
return bean;
}
public CmsModelItem[] deleteByIds(Integer[] ids) {
CmsModelItem[] beans = new CmsModelItem[ids.length];
for (int i = 0, len = ids.length; i < len; i++) {
beans[i] = deleteById(ids[i]);
}
return beans;
}
private CmsModelMng cmsModelMng;
private CmsModelItemDao dao;
@Autowired
public void setCmsModelMng(CmsModelMng cmsModelMng) {
this.cmsModelMng = cmsModelMng;
}
@Autowired
public void setDao(CmsModelItemDao dao) {
this.dao = dao;
}
} | [
"Administrator@USERUSE-5P6AB6M"
] | Administrator@USERUSE-5P6AB6M |
db23418f46eeb0be6023ba449534e20d5a42cb34 | 17e8438486cb3e3073966ca2c14956d3ba9209ea | /tc-messaging/branches/private/voltron/src/main/java/com/tc/entity/ServerEntityResponseMessageImpl.java | 8af61c3d5defdc95ed9a70242b26257a198f3468 | [] | no_license | sirinath/Terracotta | fedfc2c4f0f06c990f94b8b6c3b9c93293334345 | 00a7662b9cf530dfdb43f2dd821fa559e998c892 | refs/heads/master | 2021-01-23T05:41:52.414211 | 2015-07-02T15:21:54 | 2015-07-02T15:21:54 | 38,613,711 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,511 | java | package com.tc.entity;
import com.tc.bytes.TCByteBuffer;
import com.tc.io.TCByteBufferOutputStream;
import com.tc.net.protocol.tcm.MessageChannel;
import com.tc.net.protocol.tcm.MessageMonitor;
import com.tc.net.protocol.tcm.TCMessageHeader;
import com.tc.net.protocol.tcm.TCMessageType;
import com.tc.object.msg.DSOMessageBase;
import com.tc.object.session.SessionID;
import java.io.IOException;
/**
* @author twu
*/
public class ServerEntityResponseMessageImpl extends DSOMessageBase implements ServerEntityResponseMessage {
private static final byte RESPONSE_ID = 0;
private long responseId;
public ServerEntityResponseMessageImpl(SessionID sessionID, MessageMonitor monitor, TCByteBufferOutputStream out, MessageChannel channel, TCMessageType type) {
super(sessionID, monitor, out, channel, type);
}
public ServerEntityResponseMessageImpl(SessionID sessionID, MessageMonitor monitor, MessageChannel channel, TCMessageHeader header, TCByteBuffer[] data) {
super(sessionID, monitor, channel, header, data);
}
@Override
public void setResponseId(long responseId) {
this.responseId = responseId;
}
@Override
public long getResponseId() {
return responseId;
}
@Override
protected void dehydrateValues() {
putNVPair(RESPONSE_ID, responseId);
}
@Override
protected boolean hydrateValue(byte name) throws IOException {
if (name == RESPONSE_ID) {
responseId = getLongValue();
return true;
} else {
return false;
}
}
}
| [
"twu@7fc7bbf3-cf45-46d4-be06-341739edd864"
] | twu@7fc7bbf3-cf45-46d4-be06-341739edd864 |
91b424bb091861063f2763ee885f61b0e361b1c1 | b718686e4feb0fb7579af268f2037c737a1ceb9a | /src/main/java/com/mossle/auth/subscribe/UserCreatedSubscriber.java | 44edc55c22d76dc9246bdce605562bd5bb662daf | [
"Apache-2.0"
] | permissive | SuiteLHY/lemon | cc0ff01df0c16c3ffaebdf64ae4a7bf736e47dea | b2bfe0487adbc8cdd5042dab7e2a992c4bb36e53 | refs/heads/master | 2020-05-26T19:51:03.913796 | 2019-05-07T11:20:46 | 2019-05-07T11:20:46 | 188,353,423 | 1 | 0 | Apache-2.0 | 2019-05-24T04:42:42 | 2019-05-24T04:42:42 | null | UTF-8 | Java | false | false | 2,302 | java | package com.mossle.auth.subscribe;
import java.io.IOException;
import javax.annotation.Resource;
import com.mossle.api.user.UserDTO;
import com.mossle.auth.component.AuthCache;
import com.mossle.core.id.IdGenerator;
import com.mossle.core.mapper.JsonMapper;
import com.mossle.core.subscribe.Subscribable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@Transactional
@Component("com.mossle.auth.component.UserCreatedSubscriber")
public class UserCreatedSubscriber implements Subscribable<String> {
private static Logger logger = LoggerFactory
.getLogger(UserCreatedSubscriber.class);
private String insertSql = "INSERT INTO AUTH_USER_STATUS(ID,USERNAME,REF,STATUS,PASSWORD,USER_REPO_REF,TENANT_ID) VALUES(?,?,?,1,'',?,?)";
private JsonMapper jsonMapper = new JsonMapper();
private String destinationName = "queue.user.sync.created";
private JdbcTemplate jdbcTemplate;
private AuthCache authCache;
private IdGenerator idGenerator;
public void handleMessage(String message) {
try {
UserDTO userDto = jsonMapper.fromJson(message, UserDTO.class);
String tenantId = userDto.getUserRepoRef();
jdbcTemplate.update(insertSql, idGenerator.generateId(),
userDto.getUsername(), userDto.getId(), tenantId, tenantId);
logger.info("create user : {}", message);
authCache.evictUser(userDto.getId());
} catch (IOException ex) {
logger.error(ex.getMessage(), ex);
}
}
public boolean isTopic() {
return false;
}
public String getName() {
return destinationName;
}
public void setDestinationName(String destinationName) {
this.destinationName = destinationName;
}
@Resource
public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
this.jdbcTemplate = jdbcTemplate;
}
@Resource
public void setAuthCache(AuthCache authCache) {
this.authCache = authCache;
}
@Resource
public void setIdGenerator(IdGenerator idGenerator) {
this.idGenerator = idGenerator;
}
}
| [
"xyz20003@gmail.com"
] | xyz20003@gmail.com |
7cdbbffdf03bde1f63a29d79599c202b46847a56 | 14d4fa5f2eb32853f72f791de4bf92f76022b9da | /SimpleSDK/src/org/bouncycastle/crypto/params/DSAPublicKeyParameters.java | fec41ef09f599c93c09ff95e72bdcefb94094521 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"JSON",
"LicenseRef-scancode-warranty-disclaimer",
"EPL-1.0"
] | permissive | SKT-ThingPlug2/device-sdk-javame | 253ece8b8f41286256c27bae07a242dc551ff8c6 | 2a965a8d882b3a4e36753c7b81f152a9b56614d3 | refs/heads/master | 2021-05-02T12:52:01.394954 | 2018-03-09T08:22:25 | 2018-03-09T08:22:25 | 120,748,806 | 1 | 5 | Apache-2.0 | 2018-03-23T06:16:34 | 2018-02-08T10:48:43 | Java | UTF-8 | Java | false | false | 1,125 | java | package org.bouncycastle.crypto.params;
import javax.math.BigInteger;
public class DSAPublicKeyParameters
extends DSAKeyParameters
{
private static final BigInteger ONE = BigInteger.valueOf(1);
private static final BigInteger TWO = BigInteger.valueOf(2);
private BigInteger y;
public DSAPublicKeyParameters(
BigInteger y,
DSAParameters params)
{
super(false, params);
this.y = validate(y, params);
}
private BigInteger validate(BigInteger y, DSAParameters params)
{
if (params != null)
{
if (TWO.compareTo(y) <= 0 && params.getP().subtract(TWO).compareTo(y) >= 0
&& ONE.equals(y.modPow(params.getQ(), params.getP())))
{
return y;
}
throw new IllegalArgumentException("y value does not appear to be in correct group");
}
else
{
return y; // we can't validate without params, fortunately we can't use the key either...
}
}
public BigInteger getY()
{
return y;
}
}
| [
"lesmin@sk.com"
] | lesmin@sk.com |
3853ed33dfe7610011b8e367de8e54cf029d4b9e | a7210128b2ae776ae197319767de4cfbab33f21b | /model/src/main/java/com/onenetwork/model/sx/se/SE40RecordDataElement.java | b5413d5d7e14a56f5e3175460f3c0e4f9bd219b2 | [] | no_license | gigbat/onenetwork-parser | 5c213e38bc76661df267ec44e59b650d9735ee10 | cfb0aba33f8f06f846accc1b5031c3e0c8c9cbfb | refs/heads/master | 2023-06-25T04:53:06.640903 | 2021-07-22T16:18:08 | 2021-07-22T16:18:08 | 387,429,454 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,611 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.2
// See <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2021.07.22 at 07:16:43 PM EEST
//
package com.onenetwork.model.sx.se;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import com.onenetwork.model.position.Position;
/**
* <p>Java class for SE40RecordDataElement complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="SE40RecordDataElement">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="controlIdentifier" type="{http://www.model.onenetwork.com/position}Position"/>
* <element name="lineItemIdentifier" type="{http://www.model.onenetwork.com/position}Position"/>
* <element name="countryOfOrigin" type="{http://www.model.onenetwork.com/position}Position"/>
* <element name="commercialInvoiceDescription" type="{http://www.model.onenetwork.com/position}Position"/>
* <element name="defaultControlIdentifier" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="messageType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="endPositionOfControlIdentifier" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SE40RecordDataElement", propOrder = {
"controlIdentifier",
"lineItemIdentifier",
"countryOfOrigin",
"commercialInvoiceDescription",
"defaultControlIdentifier",
"messageType",
"endPositionOfControlIdentifier"
})
public class SE40RecordDataElement {
@XmlElement(required = true)
protected Position controlIdentifier;
@XmlElement(required = true)
protected Position lineItemIdentifier;
@XmlElement(required = true)
protected Position countryOfOrigin;
@XmlElement(required = true)
protected Position commercialInvoiceDescription;
@XmlElement(defaultValue = "SE40")
protected String defaultControlIdentifier;
@XmlElement(defaultValue = "SX")
protected String messageType;
@XmlElement(defaultValue = "4")
protected Integer endPositionOfControlIdentifier;
/**
* Gets the value of the controlIdentifier property.
*
* @return
* possible object is
* {@link Position }
*
*/
public Position getControlIdentifier() {
return controlIdentifier;
}
/**
* Sets the value of the controlIdentifier property.
*
* @param value
* allowed object is
* {@link Position }
*
*/
public void setControlIdentifier(Position value) {
this.controlIdentifier = value;
}
/**
* Gets the value of the lineItemIdentifier property.
*
* @return
* possible object is
* {@link Position }
*
*/
public Position getLineItemIdentifier() {
return lineItemIdentifier;
}
/**
* Sets the value of the lineItemIdentifier property.
*
* @param value
* allowed object is
* {@link Position }
*
*/
public void setLineItemIdentifier(Position value) {
this.lineItemIdentifier = value;
}
/**
* Gets the value of the countryOfOrigin property.
*
* @return
* possible object is
* {@link Position }
*
*/
public Position getCountryOfOrigin() {
return countryOfOrigin;
}
/**
* Sets the value of the countryOfOrigin property.
*
* @param value
* allowed object is
* {@link Position }
*
*/
public void setCountryOfOrigin(Position value) {
this.countryOfOrigin = value;
}
/**
* Gets the value of the commercialInvoiceDescription property.
*
* @return
* possible object is
* {@link Position }
*
*/
public Position getCommercialInvoiceDescription() {
return commercialInvoiceDescription;
}
/**
* Sets the value of the commercialInvoiceDescription property.
*
* @param value
* allowed object is
* {@link Position }
*
*/
public void setCommercialInvoiceDescription(Position value) {
this.commercialInvoiceDescription = value;
}
/**
* Gets the value of the defaultControlIdentifier property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDefaultControlIdentifier() {
return defaultControlIdentifier;
}
/**
* Sets the value of the defaultControlIdentifier property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDefaultControlIdentifier(String value) {
this.defaultControlIdentifier = value;
}
/**
* Gets the value of the messageType property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMessageType() {
return messageType;
}
/**
* Sets the value of the messageType property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMessageType(String value) {
this.messageType = value;
}
/**
* Gets the value of the endPositionOfControlIdentifier property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getEndPositionOfControlIdentifier() {
return endPositionOfControlIdentifier;
}
/**
* Sets the value of the endPositionOfControlIdentifier property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setEndPositionOfControlIdentifier(Integer value) {
this.endPositionOfControlIdentifier = value;
}
}
| [
"b.kostevich@gmail.com"
] | b.kostevich@gmail.com |
1b2795033274ea436de8aed529199401f55ebad3 | 1d64bf4b7cec44c8a12e4086ad2918e8df6dcc76 | /SpringRelatedJars/spring-framework-2.0.5/dist/org/springframework/web/servlet/view/xslt/XsltViewResolver.java | 77c33cf74eda26edf10f8ae42696a42d5b3f6b71 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | XerO00/AllJarFiles | 03472690fad55b5c2fcae530ac7de6294c54521e | d546337cfa29f4d33c3d3c5a4479a35063771612 | refs/heads/master | 2020-05-07T15:51:39.184855 | 2019-04-10T20:08:57 | 2019-04-10T20:08:57 | 180,655,268 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,590 | java | /*
* Copyright 2002-2007 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.web.servlet.view.xslt;
import java.util.Properties;
import javax.xml.transform.ErrorListener;
import javax.xml.transform.URIResolver;
import org.springframework.web.servlet.view.AbstractUrlBasedView;
import org.springframework.web.servlet.view.UrlBasedViewResolver;
/**
* {@link org.springframework.web.servlet.ViewResolver} implementation that
* resolves instances of {@link XsltView} by translating the supplied view name
* into the URL of the XSLT stylesheet.
*
* @author Rob Harrop
* @author Juergen Hoeller
* @since 2.0
*/
public class XsltViewResolver extends UrlBasedViewResolver {
private String sourceKey;
private URIResolver uriResolver;
private ErrorListener errorListener;
private boolean indent = true;
private Properties outputProperties;
private boolean cacheTemplates = true;
public XsltViewResolver() {
setViewClass(XsltView.class);
}
/**
* Set the name of the model attribute that represents the XSLT Source.
* If not specified, the model map will be searched for a matching value type.
* <p>The following source types are supported out of the box:
* {@link javax.xml.transform.Source}, {@link org.w3c.dom.Document},
* {@link org.w3c.dom.Node}, {@link java.io.Reader}, {@link java.io.InputStream}
* and {@link org.springframework.core.io.Resource}.
*/
public void setSourceKey(String sourceKey) {
this.sourceKey = sourceKey;
}
/**
* Set the URIResolver used in the transform.
* <p>The URIResolver handles calls to the XSLT <code>document()</code> function.
*/
public void setUriResolver(URIResolver uriResolver) {
this.uriResolver = uriResolver;
}
/**
* Set an implementation of the {@link javax.xml.transform.ErrorListener}
* interface for custom handling of transformation errors and warnings.
* <p>If not set, a default
* {@link org.springframework.util.xml.SimpleTransformErrorListener} is
* used that simply logs warnings using the logger instance of the view class,
* and rethrows errors to discontinue the XML transformation.
* @see org.springframework.util.xml.SimpleTransformErrorListener
*/
public void setErrorListener(ErrorListener errorListener) {
this.errorListener = errorListener;
}
/**
* Set whether the XSLT transformer may add additional whitespace when
* outputting the result tree.
* <p>Default is <code>true</code> (on); set this to <code>false</code> (off)
* to not specify an "indent" key, leaving the choice up to the stylesheet.
* @see javax.xml.transform.OutputKeys#INDENT
*/
public void setIndent(boolean indent) {
this.indent = indent;
}
/**
* Set arbitrary transformer output properties to be applied to the stylesheet.
* <p>Any values specified here will override defaults that this view sets
* programmatically.
* @see javax.xml.transform.Transformer#setOutputProperty
*/
public void setOutputProperties(Properties outputProperties) {
this.outputProperties = outputProperties;
}
/**
* Turn on/off the caching of the XSLT templates.
* <p>The default value is "true". Only set this to "false" in development,
* where caching does not seriously impact performance.
*/
public void setCacheTemplates(boolean cacheTemplates) {
this.cacheTemplates = cacheTemplates;
}
protected Class requiredViewClass() {
return XsltView.class;
}
protected AbstractUrlBasedView buildView(String viewName) throws Exception {
XsltView view = (XsltView) super.buildView(viewName);
view.setSourceKey(this.sourceKey);
if (this.uriResolver != null) {
view.setUriResolver(this.uriResolver);
}
if (this.errorListener != null) {
view.setErrorListener(this.errorListener);
}
view.setIndent(this.indent);
view.setOutputProperties(this.outputProperties);
view.setCacheTemplates(this.cacheTemplates);
return view;
}
}
| [
"prasannadandhalkar1@gmail.com"
] | prasannadandhalkar1@gmail.com |
76ce229972de8e8547e2c8e2926b00e10b0de067 | cd3ccc969d6e31dce1a0cdc21de71899ab670a46 | /agp-7.1.0-alpha01/tools/base/resource-repository/main/java/com/android/resources/base/BasicForeignAttrResourceItem.java | 95add07a801c841bc3e028bfbe32bdb6cee7ea4d | [
"Apache-2.0"
] | permissive | jomof/CppBuildCacheWorkInProgress | 75e76e1bd1d8451e3ee31631e74f22e5bb15dd3c | 9e3475f6d94cb3239f27ed8f8ee81b0abde4ef51 | refs/heads/main | 2023-05-28T19:03:16.798422 | 2021-06-10T20:59:25 | 2021-06-10T20:59:25 | 374,736,765 | 0 | 1 | Apache-2.0 | 2021-06-07T21:06:53 | 2021-06-07T16:44:55 | Java | UTF-8 | Java | false | false | 2,833 | java | /*
* Copyright (C) 2019 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.resources.base;
import com.android.ide.common.rendering.api.AttributeFormat;
import com.android.ide.common.rendering.api.ResourceNamespace;
import com.android.resources.ResourceVisibility;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Map;
import java.util.Set;
/**
* Resource item representing an attr resource that is defined in a namespace different from the namespace
* of the owning AAR.
*/
public class BasicForeignAttrResourceItem extends BasicAttrResourceItem {
@NotNull private final ResourceNamespace myNamespace;
/**
* Initializes the resource.
*
* @param namespace the namespace of the attr resource
* @param name the name of the resource
* @param sourceFile the source file containing definition of the resource
* @param description the description of the attr resource, if available
* @param groupName the name of the attr group, if available
* @param formats the allowed attribute formats
* @param valueMap the enum or flag integer values keyed by the value names. Some of the values in the
* map may be null. The map must contain the names of all declared values, even the ones that don't
* have corresponding numeric values.
* @param valueDescriptionMap the enum or flag value descriptions keyed by the value names
*/
public BasicForeignAttrResourceItem(@NotNull ResourceNamespace namespace,
@NotNull String name,
@NotNull ResourceSourceFile sourceFile,
@Nullable String description,
@Nullable String groupName,
@NotNull Set<AttributeFormat> formats,
@NotNull Map<String, Integer> valueMap,
@NotNull Map<String, String> valueDescriptionMap) {
super(name, sourceFile, ResourceVisibility.PUBLIC, description, groupName, formats, valueMap, valueDescriptionMap);
myNamespace = namespace;
}
@Override
@NotNull
public ResourceNamespace getNamespace() {
return myNamespace;
}
}
| [
"jomof@google.com"
] | jomof@google.com |
650371123b19326ed62ba2755109c7256bfe22b8 | 8cfc3d3140bf050005d5b401f0c57fc28f5b5c67 | /src/main/java/com/wth/automation/security/SecurityUtils.java | e2c9ab877aae21cd098c6d28a057b2026d9702a2 | [] | no_license | mpojeda84/hb_automation | 897430838054f16ac699713e3d01297f2b36cdcf | 4e08b3276d80570ea9671c829c6ddc8504100ebc | refs/heads/master | 2020-03-29T00:40:23.125418 | 2018-09-18T20:49:11 | 2018-09-18T20:49:11 | 149,350,365 | 0 | 0 | null | 2018-09-18T20:50:22 | 2018-09-18T20:49:03 | Java | UTF-8 | Java | false | false | 2,491 | java | package com.wth.automation.security;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import java.util.Optional;
/**
* Utility class for Spring Security.
*/
public final class SecurityUtils {
private SecurityUtils() {
}
/**
* Get the login of the current user.
*
* @return the login of the current user
*/
public static Optional<String> getCurrentUserLogin() {
SecurityContext securityContext = SecurityContextHolder.getContext();
return Optional.ofNullable(securityContext.getAuthentication())
.map(authentication -> {
if (authentication.getPrincipal() instanceof UserDetails) {
UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal();
return springSecurityUser.getUsername();
} else if (authentication.getPrincipal() instanceof String) {
return (String) authentication.getPrincipal();
}
return null;
});
}
/**
* Check if a user is authenticated.
*
* @return true if the user is authenticated, false otherwise
*/
public static boolean isAuthenticated() {
SecurityContext securityContext = SecurityContextHolder.getContext();
return Optional.ofNullable(securityContext.getAuthentication())
.map(authentication -> authentication.getAuthorities().stream()
.noneMatch(grantedAuthority -> grantedAuthority.getAuthority().equals(AuthoritiesConstants.ANONYMOUS)))
.orElse(false);
}
/**
* If the current user has a specific authority (security role).
* <p>
* The name of this method comes from the isUserInRole() method in the Servlet API
*
* @param authority the authority to check
* @return true if the current user has the authority, false otherwise
*/
public static boolean isCurrentUserInRole(String authority) {
SecurityContext securityContext = SecurityContextHolder.getContext();
return Optional.ofNullable(securityContext.getAuthentication())
.map(authentication -> authentication.getAuthorities().stream()
.anyMatch(grantedAuthority -> grantedAuthority.getAuthority().equals(authority)))
.orElse(false);
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
b5e08e89387338d30281d15ddf385bfbace03ad7 | 704b4104bb9a7de7e764b380c4b03b8cd058175e | /smartfinancial/src/main/java/com/manydesigns/elements/fields/PartitaIvaField.java | 8fd3e57f6e682b9d9f43854ceb2cba88ff7dc872 | [] | no_license | zhiqinghuang/SmartFinancial | 1017eb510cadb2e7e44ec3056f630b3189d4a21c | 5c65630ac5fca9a34c28338b6cd2198c0aba762e | refs/heads/master | 2021-01-16T01:01:36.068960 | 2015-05-11T02:02:45 | 2015-05-11T02:02:45 | 34,028,915 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 483 | java | package com.manydesigns.elements.fields;
import com.manydesigns.elements.Mode;
import com.manydesigns.elements.reflection.PropertyAccessor;
public class PartitaIvaField extends RegExpTextField {
public final static String partitaIvaRegExp = "[0-9]{11}";
public PartitaIvaField(PropertyAccessor accessor, Mode mode, String prefix) {
super(accessor, mode, prefix, partitaIvaRegExp);
setErrorString(getText("elements.error.field.partita.iva.format"));
}
} | [
"beahuang@hotmail.com"
] | beahuang@hotmail.com |
5e58892f0e6121c5dcfe4d1d2448b97f0b3c2519 | 1f3d84829b7e737e6946531d52e6ec4a2c2850e6 | /bus-extra/src/main/java/org/aoju/bus/extra/mail/InternalMail.java | a04007c6b48f6aaa980a14a616ff56d17647194f | [
"MIT"
] | permissive | ArnoldZhou/bus | 1a8acfb6936edaa92f4e3fd059c08272508d9000 | cdda4e470d4da79097a247176637a0e1b25fff9e | refs/heads/master | 2020-07-05T16:25:48.087330 | 2019-08-16T05:16:32 | 2019-08-16T05:16:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,579 | java | /*
* The MIT License
*
* Copyright (c) 2017, aoju.org All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.aoju.bus.extra.mail;
import org.aoju.bus.core.lang.exception.CommonException;
import org.aoju.bus.core.utils.ArrayUtils;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeUtility;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
/**
* 邮件内部工具类
*
* @author Kimi Liu
* @version 3.0.6
* @since JDK 1.8
*/
public class InternalMail {
/**
* 将多个字符串邮件地址转为{@link InternetAddress}列表
* 单个字符串地址可以是多个地址合并的字符串
*
* @param addrStrs 地址数组
* @param charset 编码(主要用于中文用户名的编码)
* @return 地址数组
* @since 4.0.3
*/
public static InternetAddress[] parseAddressFromStrs(String[] addrStrs, Charset charset) {
final List<InternetAddress> resultList = new ArrayList<>(addrStrs.length);
InternetAddress[] addrs;
for (int i = 0; i < addrStrs.length; i++) {
addrs = parseAddress(addrStrs[i], charset);
if (ArrayUtils.isNotEmpty(addrs)) {
for (int j = 0; j < addrs.length; j++) {
resultList.add(addrs[j]);
}
}
}
return resultList.toArray(new InternetAddress[resultList.size()]);
}
/**
* 解析第一个地址
*
* @param address 地址字符串
* @param charset 编码
* @return 地址列表
*/
public static InternetAddress parseFirstAddress(String address, Charset charset) {
final InternetAddress[] internetAddresses = parseAddress(address, charset);
if (ArrayUtils.isEmpty(internetAddresses)) {
try {
return new InternetAddress(address);
} catch (AddressException e) {
throw new CommonException(e);
}
}
return internetAddresses[0];
}
/**
* 将一个地址字符串解析为多个地址
* 地址间使用" "、","、";"分隔
*
* @param address 地址字符串
* @param charset 编码
* @return 地址列表
*/
public static InternetAddress[] parseAddress(String address, Charset charset) {
InternetAddress[] addresses;
try {
addresses = InternetAddress.parse(address);
} catch (AddressException e) {
throw new CommonException(e);
}
//编码用户名
if (ArrayUtils.isNotEmpty(addresses)) {
for (InternetAddress internetAddress : addresses) {
try {
internetAddress.setPersonal(internetAddress.getPersonal(), charset.name());
} catch (UnsupportedEncodingException e) {
throw new CommonException(e);
}
}
}
return addresses;
}
/**
* 编码中文字符
* 编码失败返回原字符串
*
* @param text 被编码的文本
* @param charset 编码
* @return 编码后的结果
*/
public static String encodeText(String text, Charset charset) {
try {
return MimeUtility.encodeText(text, charset.name(), null);
} catch (UnsupportedEncodingException e) {
// ignore
}
return text;
}
}
| [
"839536@QQ.COM"
] | 839536@QQ.COM |
c3569cae08355461dcefd201fb7aeb65d087f97c | 8e29bf5619f2581017e6b8a342eb0eae4acec9cf | /src/krasa/grepconsole/stats/GrepConsoleStatusBarWidget.java | 24406ee44575267aa2ba5be0dcc53408de14bf43 | [
"Apache-2.0"
] | permissive | daCyberpunk/GrepConsole | c8b506e8750dabe0bf3427b8f704e82ca44c846e | 4d879762d740f6aac42f8258172a17ceed4b001a | refs/heads/master | 2020-03-26T19:01:01.319786 | 2018-07-12T13:22:39 | 2018-07-12T13:22:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,952 | java | package krasa.grepconsole.stats;
import javax.swing.*;
import krasa.grepconsole.filter.GrepHighlightFilter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import com.intellij.execution.impl.ConsoleViewImpl;
import com.intellij.execution.ui.ConsoleView;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.wm.CustomStatusBarWidget;
import com.intellij.openapi.wm.IdeFrame;
import com.intellij.openapi.wm.StatusBar;
import com.intellij.openapi.wm.WindowManager;
public class GrepConsoleStatusBarWidget implements CustomStatusBarWidget {
private final String id;
private final Project project;
protected StatisticsStatusBarPanel statisticsPanel;
public GrepConsoleStatusBarWidget(ConsoleViewImpl console, GrepHighlightFilter lastGrepHighlightFilter) {
statisticsPanel = new StatisticsStatusBarPanel(console, lastGrepHighlightFilter) {
@Override
protected void hideStatusBar() {
dispose();
}
};
id = createId(console);
project = console.getProject();
}
public static String createId(ConsoleView console) {
return "GrepConsole" + Integer.toHexString(console.hashCode());
}
@Override
public JComponent getComponent() {
return statisticsPanel;
}
@NotNull
@Override
public String ID() {
return id;
}
@Nullable
@Override
public WidgetPresentation getPresentation(@NotNull PlatformType platformType) {
return null;
}
@Override
public void install(@NotNull StatusBar statusBar) {
}
public StatisticsStatusBarPanel getStatisticsPanel() {
return statisticsPanel;
}
@Override
public void dispose() {
IdeFrame ideFrame = WindowManager.getInstance().getIdeFrame(project);
if (ideFrame != null) {
final StatusBar statusBar = ideFrame.getStatusBar();
statusBar.removeWidget(ID());
statusBar.getComponent().revalidate();
}
if (statisticsPanel != null) {
statisticsPanel.cancelTimer();
statisticsPanel = null;
}
}
}
| [
"vojta.krasa@gmail.com"
] | vojta.krasa@gmail.com |
fa011d94484524a1dd592390be4a647972913f19 | ec745eb69f911ad9cb2211c947d153cd57761d8a | /src/main/java/com/example/testpatterns/servicelocator/App.java | ccd234eaf34be281758db41bddc5ad72a9984b19 | [] | no_license | lindong4067/test-demo | 4a831be13f966f0f238f962b532e3f33e4c7eed3 | 24a8f2c9e1949d8062609b8b47e82c91ab4b3d98 | refs/heads/master | 2021-06-03T14:50:18.305976 | 2019-12-26T04:19:15 | 2019-12-26T04:19:15 | 139,565,345 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,179 | java | /**
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.example.testpatterns.servicelocator;
/**
*
* The Service Locator pattern is a design pattern used in software development to encapsulate the
* processes involved in obtaining a service with a strong abstraction layer. This pattern uses a
* central registry known as the "service locator", which on request returns the information
* necessary to perform a certain task.
* <p>
* In this example we use the Service locator pattern to lookup JNDI-services and cache them for
* subsequent requests.
* <p>
*
* @author saifasif
*
*/
public class App {
/**
* Program entry point
*
* @param args command line args
*/
public static void main(String[] args) {
Service service = ServiceLocator.getService("jndi/serviceA");
service.execute();
service = ServiceLocator.getService("jndi/serviceB");
service.execute();
service = ServiceLocator.getService("jndi/serviceA");
service.execute();
service = ServiceLocator.getService("jndi/serviceA");
service.execute();
}
}
| [
"lindong.zhao@ericsson.com"
] | lindong.zhao@ericsson.com |
9e0a9ba7a555a83e50f9e26429a7f76ff5f2b01e | a9d02b431a24f766d275c494e82a003c7e372f73 | /cmdline/src/main/java/org/crsh/cmdline/matcher/LiteralValue.java | 49cecd92454ba4f11fef7512d31e63194e738c64 | [] | no_license | defrancea/crash | ddcd7ecf54e17dc7b4ffe9d74d280c597f6d6403 | a9eae84cb8ae941a338297e0045fce2156e601fc | refs/heads/master | 2020-12-24T09:52:35.332450 | 2012-07-25T12:47:11 | 2012-07-31T13:57:39 | 2,650,041 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,844 | java | /*
* Copyright (C) 2010 eXo Platform SAS.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.crsh.cmdline.matcher;
/**
* A literal value.
*
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
public final class LiteralValue {
/** . */
private final String rawValue;
/** . */
private final String value;
public LiteralValue(String rawValue, String value) {
if (rawValue == null) {
throw new NullPointerException();
}
if (value == null) {
throw new NullPointerException();
}
if (rawValue.length() == 0) {
throw new IllegalArgumentException();
}
this.rawValue = rawValue;
this.value = value;
}
/**
* Returns the value as expressed in the command line.
*
* @return the raw value
*/
public String getRawValue() {
return rawValue;
}
/**
* Returns the value as interpreted by the context.
*
* @return the value
*/
public String getValue() {
return value;
}
@Override
public String toString() {
return "Value[raw=" + rawValue + "]";
}
}
| [
"julien@julienviet.com"
] | julien@julienviet.com |
56550852007f640b76689e9bf4d773851515d4d2 | e9c2f8cdcee975a5900ecdc12e50aefc1f8be813 | /spring-framework/src/org/springframework/jca/cci/connection/DelegatingConnectionFactory.java | e6045f46906762eacd6a52a81d853557bfd3a9bf | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | z-dp/springsource | feee1c285667098b72ff65c95a5e8fa5e2aa4b07 | e217eeb091c27834409ac5ee55b690b8e669c2e8 | refs/heads/master | 2020-04-10T03:19:35.581789 | 2018-12-07T04:10:04 | 2018-12-07T04:10:04 | 160,766,989 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,048 | java | /*
* Copyright 2002-2006 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.jca.cci.connection;
import javax.naming.NamingException;
import javax.naming.Reference;
import javax.resource.ResourceException;
import javax.resource.cci.Connection;
import javax.resource.cci.ConnectionFactory;
import javax.resource.cci.ConnectionSpec;
import javax.resource.cci.RecordFactory;
import javax.resource.cci.ResourceAdapterMetaData;
import org.springframework.beans.factory.InitializingBean;
/**
* {@link ConnectionFactory} implementation that delegates all calls to a
* given target {@link ConnectionFactory}.
*
* <p>This class is meant to be subclassed, with subclasses overriding only
* those methods (such as {@link #getConnection()}) that should not simply
* delegate to the target {@link ConnectionFactory}.
*
* @author Juergen Hoeller
* @since 1.2
*/
public class DelegatingConnectionFactory implements ConnectionFactory, InitializingBean {
private ConnectionFactory targetConnectionFactory;
/**
* Set the target ConnectionFactory that this ConnectionFactory should delegate to.
*/
public void setTargetConnectionFactory(ConnectionFactory targetConnectionFactory) {
this.targetConnectionFactory = targetConnectionFactory;
}
/**
* Return the target ConnectionFactory that this ConnectionFactory should delegate to.
*/
public ConnectionFactory getTargetConnectionFactory() {
return targetConnectionFactory;
}
public void afterPropertiesSet() {
if (getTargetConnectionFactory() == null) {
throw new IllegalArgumentException("targetConnectionFactory is required");
}
}
public Connection getConnection() throws ResourceException {
return getTargetConnectionFactory().getConnection();
}
public Connection getConnection(ConnectionSpec connectionSpec) throws ResourceException {
return getTargetConnectionFactory().getConnection(connectionSpec);
}
public RecordFactory getRecordFactory() throws ResourceException {
return getTargetConnectionFactory().getRecordFactory();
}
public ResourceAdapterMetaData getMetaData() throws ResourceException {
return getTargetConnectionFactory().getMetaData();
}
public Reference getReference() throws NamingException {
return getTargetConnectionFactory().getReference();
}
public void setReference(Reference reference) {
getTargetConnectionFactory().setReference(reference);
}
}
| [
"zidp@cyclecentury.com"
] | zidp@cyclecentury.com |
5202ed5928df2eacb7bde89e3dc53578767ec716 | 48e835e6f176a8ac9ae3ca718e8922891f1e5a18 | /benchmark/training/org/apache/hadoop/hdfs/TestSetrepDecreasing.java | 68b81f1bae01185473b2ac52e2b2afe3ce14520c | [] | no_license | STAMP-project/dspot-experiments | f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5 | 121487e65cdce6988081b67f21bbc6731354a47f | refs/heads/master | 2023-02-07T14:40:12.919811 | 2019-11-06T07:17:09 | 2019-11-06T07:17:09 | 75,710,758 | 14 | 19 | null | 2023-01-26T23:57:41 | 2016-12-06T08:27:42 | null | UTF-8 | Java | false | false | 1,077 | java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hdfs;
import java.io.IOException;
import org.junit.Test;
public class TestSetrepDecreasing {
@Test(timeout = 120000)
public void testSetrepDecreasing() throws IOException {
TestSetrepIncreasing.setrep(5, 3, false);
}
}
| [
"benjamin.danglot@inria.fr"
] | benjamin.danglot@inria.fr |
65110804122aded6c86cef268d04cccadb796aa6 | b4b62c5c77ec817db61820ccc2fee348d1d7acc5 | /src/main/java/com/alipay/api/domain/AlipayUserAgreementQueryModel.java | 70e8d893b573b6cdd5ee98b761886dcace9191c9 | [
"Apache-2.0"
] | permissive | zhangpo/alipay-sdk-java-all | 13f79e34d5f030ac2f4367a93e879e0e60f335f7 | e69305d18fce0cc01d03ca52389f461527b25865 | refs/heads/master | 2022-11-04T20:47:21.777559 | 2020-06-15T08:31:02 | 2020-06-15T08:31:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,489 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 支付宝个人代扣协议查询接口
*
* @author auto create
* @since 1.0, 2019-12-18 19:24:21
*/
public class AlipayUserAgreementQueryModel extends AlipayObject {
private static final long serialVersionUID = 4756732685652524923L;
/**
* 支付宝系统中用以唯一标识用户签约记录的编号(用户签约成功后的协议号 ) ,如果传了该参数,其他参数会被忽略
*/
@ApiField("agreement_no")
private String agreementNo;
/**
* 用户的支付宝登录账号,支持邮箱或手机号码格式。本参数与alipay_user_id若都填写,则以alipay_user_id 为准。
*/
@ApiField("alipay_logon_id")
private String alipayLogonId;
/**
* 用户的支付宝账号对应 的支付宝唯一用户号,以 2088 开头的 16 位纯数字 组成。
本参数与alipay_logon_id若都填写,则以本参数为准,优先级高于 alipay_logon_id。
*/
@ApiField("alipay_user_id")
private String alipayUserId;
/**
* 代扣协议中标示用户的唯一签约号(确保在商户系统中
唯一)。
格式规则:支持大写小写字 母和数字,最长 32 位。
*/
@ApiField("external_agreement_no")
private String externalAgreementNo;
/**
* 协议产品码,商户和支付宝签约时确定,商户可咨询技术支持。
*/
@ApiField("personal_product_code")
private String personalProductCode;
/**
* 签约协议场景,商户和支付宝签约时确定,商户可咨询技术支持。
当传入商户签约号 external_agreement_no 时,场景不能为空或默认值 DEFAULT|DEFAULT。
该值需要与系统/页面签约接口调用时传入的值保持一 致。
*/
@ApiField("sign_scene")
private String signScene;
/**
* 签约第三方主体类型。对于三方协议,表示当前用户和哪一类的第三方主体进行签约。
取值范围:
取值范围:
1. PARTNER(平台商户);
2. MERCHANT(集团商户),集团下子商户可共享用户签约内容;
默认为PARTNER。
*/
@ApiField("third_party_type")
private String thirdPartyType;
public String getAgreementNo() {
return this.agreementNo;
}
public void setAgreementNo(String agreementNo) {
this.agreementNo = agreementNo;
}
public String getAlipayLogonId() {
return this.alipayLogonId;
}
public void setAlipayLogonId(String alipayLogonId) {
this.alipayLogonId = alipayLogonId;
}
public String getAlipayUserId() {
return this.alipayUserId;
}
public void setAlipayUserId(String alipayUserId) {
this.alipayUserId = alipayUserId;
}
public String getExternalAgreementNo() {
return this.externalAgreementNo;
}
public void setExternalAgreementNo(String externalAgreementNo) {
this.externalAgreementNo = externalAgreementNo;
}
public String getPersonalProductCode() {
return this.personalProductCode;
}
public void setPersonalProductCode(String personalProductCode) {
this.personalProductCode = personalProductCode;
}
public String getSignScene() {
return this.signScene;
}
public void setSignScene(String signScene) {
this.signScene = signScene;
}
public String getThirdPartyType() {
return this.thirdPartyType;
}
public void setThirdPartyType(String thirdPartyType) {
this.thirdPartyType = thirdPartyType;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
1a140cec408b881392e93aa939cc2d2787ae1efb | 02e0f9d42b280fda73f9cbd504696c3e35c0ea19 | /z3950/src/main/java/org/xbib/io/iso23950/v3/DeleteResultSetRequest.java | eebb84cddce456ade965b05b3d16b8c38d69b081 | [
"Apache-2.0"
] | permissive | vlad-mk/z3950 | 30e585c2f3d00a40c75e7a9f5ca5c2886782a7f1 | 832c86a73de7d1dc97a7abcb4623b5f566c227b9 | refs/heads/master | 2021-08-14T14:02:34.896144 | 2017-11-15T23:37:06 | 2017-11-15T23:37:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,293 | java | package org.xbib.io.iso23950.v3;
import org.xbib.asn1.ASN1Any;
import org.xbib.asn1.ASN1EncodingException;
import org.xbib.asn1.ASN1Exception;
import org.xbib.asn1.ASN1Integer;
import org.xbib.asn1.ASN1Sequence;
import org.xbib.asn1.BERConstructed;
import org.xbib.asn1.BEREncoding;
/**
* Class for representing a <code>DeleteResultSetRequest</code> from <code>Z39-50-APDU-1995</code>.
* <pre>
* DeleteResultSetRequest ::=
* SEQUENCE {
* referenceId ReferenceId OPTIONAL
* deleteFunction [32] IMPLICIT INTEGER
* resultSetList SEQUENCE OF ResultSetId OPTIONAL
* otherInfo OtherInformation OPTIONAL
* }
* </pre>
*/
public final class DeleteResultSetRequest extends ASN1Any {
// Enumerated constants for deleteFunction
public static final int E_LIST = 0;
public static final int E_ALL = 1;
public ReferenceId referenceId; // optional
public ASN1Integer sDeleteFunction;
public ResultSetId[] sResultSetList; // optional
public OtherInformation sOtherInfo; // optional
/**
* Constructor for a DeleteResultSetRequest from a BER encoding.
*
* @param ber the BER encoding.
* @param checkTag will check tag if true, use false
* if the BER has been implicitly tagged. You should
* usually be passing true.
* @throws ASN1Exception if the BER encoding is bad.
*/
public DeleteResultSetRequest(BEREncoding ber, boolean checkTag) throws ASN1Exception {
super(ber, checkTag);
}
/**
* Initializing object from a BER encoding.
* This method is for internal use only. You should use
* the constructor that takes a BEREncoding.
*
* @param ber the BER to decode.
* @param checkTag if the tag should be checked.
* @throws ASN1Exception if the BER encoding is bad.
*/
public void berDecode(BEREncoding ber, boolean checkTag) throws ASN1Exception {
BERConstructed berConstructed;
try {
berConstructed = (BERConstructed) ber;
} catch (ClassCastException e) {
throw new ASN1EncodingException("DeleteResultSetRequest: bad BER form");
}
int numParts = berConstructed.numberComponents();
int part = 0;
BEREncoding p;
if (numParts <= part) {
throw new ASN1Exception("DeleteResultSetRequest: incomplete");
}
p = berConstructed.elementAt(part);
try {
referenceId = new ReferenceId(p, true);
part++;
} catch (ASN1Exception e) {
referenceId = null;
}
if (numParts <= part) {
throw new ASN1Exception("DeleteResultSetRequest: incomplete");
}
p = berConstructed.elementAt(part);
if (p.tagGet() != 32 ||
p.tagTypeGet() != BEREncoding.CONTEXT_SPECIFIC_TAG) {
throw new ASN1EncodingException("DeleteResultSetRequest: bad tag in s_deleteFunction");
}
sDeleteFunction = new ASN1Integer(p, false);
part++;
sResultSetList = null;
sOtherInfo = null;
if (numParts <= part) {
return;
}
p = berConstructed.elementAt(part);
try {
try {
BERConstructed cons = (BERConstructed) p;
int parts = cons.numberComponents();
sResultSetList = new ResultSetId[parts];
int n;
for (n = 0; n < parts; n++) {
sResultSetList[n] = new ResultSetId(cons.elementAt(n), true);
}
} catch (ClassCastException e) {
throw new ASN1EncodingException("Bad BER");
}
part++;
} catch (ASN1Exception e) {
sResultSetList = null;
}
if (numParts <= part) {
return;
}
p = berConstructed.elementAt(part);
try {
sOtherInfo = new OtherInformation(p, true);
part++; // yes, consumed
} catch (ASN1Exception e) {
sOtherInfo = null; // no, not present
}
if (part < numParts) {
throw new ASN1Exception("DeleteResultSetRequest: bad BER: extra data " + part + "/" + numParts + " processed");
}
}
/**
* Returns a BER encoding of the DeleteResultSetRequest.
*
* @return The BER encoding.
* @throws ASN1Exception Invalid or cannot be encoded.
*/
public BEREncoding berEncode() throws ASN1Exception {
return berEncode(BEREncoding.UNIVERSAL_TAG, ASN1Sequence.SEQUENCE_TAG);
}
/**
* Returns a BER encoding of DeleteResultSetRequest, implicitly tagged.
*
* @param tagType The type of the implicit tag.
* @param tag The implicit tag.
* @return The BER encoding of the object.
* @throws ASN1Exception When invalid or cannot be encoded.
*/
public BEREncoding berEncode(int tagType, int tag) throws ASN1Exception {
int numFields = 1;
if (referenceId != null) {
numFields++;
}
if (sResultSetList != null) {
numFields++;
}
if (sOtherInfo != null) {
numFields++;
}
BEREncoding fields[] = new BEREncoding[numFields];
int x = 0;
BEREncoding f2[];
int p;
if (referenceId != null) {
fields[x++] = referenceId.berEncode();
}
fields[x++] = sDeleteFunction.berEncode(BEREncoding.CONTEXT_SPECIFIC_TAG, 32);
if (sResultSetList != null) {
f2 = new BEREncoding[sResultSetList.length];
for (p = 0; p < sResultSetList.length; p++) {
f2[p] = sResultSetList[p].berEncode();
}
fields[x++] = new BERConstructed(BEREncoding.UNIVERSAL_TAG, ASN1Sequence.SEQUENCE_TAG, f2);
}
if (sOtherInfo != null) {
fields[x] = sOtherInfo.berEncode();
}
return new BERConstructed(tagType, tag, fields);
}
/**
* Returns a new String object containing a text representing
* of the DeleteResultSetRequest.
*/
public String toString() {
int p;
StringBuilder str = new StringBuilder("{");
int outputted = 0;
if (referenceId != null) {
str.append("referenceId ");
str.append(referenceId);
outputted++;
}
if (0 < outputted) {
str.append(", ");
}
str.append("deleteFunction ");
str.append(sDeleteFunction);
outputted++;
if (sResultSetList != null) {
if (0 < outputted) {
str.append(", ");
}
str.append("resultSetList ");
str.append("{");
for (p = 0; p < sResultSetList.length; p++) {
if (p != 0) {
str.append(", ");
}
str.append(sResultSetList[p]);
}
str.append("}");
outputted++;
}
if (sOtherInfo != null) {
if (0 < outputted) {
str.append(", ");
}
str.append("otherInfo ");
str.append(sOtherInfo);
}
str.append("}");
return str.toString();
}
}
| [
"joergprante@gmail.com"
] | joergprante@gmail.com |
4722a9de6edaf9471cdf8b4bb1477d81c5868f0b | 5ab95c433ef08a4ac93bd95f6e1011ba9b79cc0e | /src/main/java/org/kuali/rice/kew/v2_0/PlaceInExceptionRouting.java | 31d079aca9a099f1edee10b0dd8454a6ddbf7b10 | [] | no_license | CU-CommunityApps/ksb-client | f98b5505937c95a32db86d7f3baa0f34b7427f68 | 2792c064bc90f50710e05ee5ba3d4c304d3a2999 | refs/heads/master | 2021-01-16T21:34:16.647538 | 2019-01-18T19:36:13 | 2019-01-18T19:36:13 | 17,973,861 | 0 | 0 | null | 2019-03-13T20:16:52 | 2014-03-21T09:00:48 | Java | UTF-8 | Java | false | false | 1,545 | java |
package org.kuali.rice.kew.v2_0;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for placeInExceptionRouting complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="placeInExceptionRouting">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="parameters" type="{http://rice.kuali.org/kew/v2_0}DocumentActionParametersType" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "placeInExceptionRouting", propOrder = {
"parameters"
})
public class PlaceInExceptionRouting {
protected DocumentActionParametersType parameters;
/**
* Gets the value of the parameters property.
*
* @return
* possible object is
* {@link DocumentActionParametersType }
*
*/
public DocumentActionParametersType getParameters() {
return parameters;
}
/**
* Sets the value of the parameters property.
*
* @param value
* allowed object is
* {@link DocumentActionParametersType }
*
*/
public void setParameters(DocumentActionParametersType value) {
this.parameters = value;
}
}
| [
"shawn.bower@gmail.com"
] | shawn.bower@gmail.com |
dedee0984cd23854307c3632b7fc08f1559a3571 | 070b9e745c5aad76fb310f5c9111ed77a1036291 | /Drona-Package/com/google/android/gms/package_8/formats/PublisherAdViewOptions.java | 1fb0c3d7c8ab591c1f5b239cc306d190946d01df | [] | no_license | Drona-team/Drona | 0f057e62e7f77babf112311734ee98c5824f166c | e33a9d92011ef7790c7547cc5a5380083f0dbcd7 | refs/heads/master | 2022-11-18T06:38:57.404528 | 2020-07-18T09:35:57 | 2020-07-18T09:35:57 | 280,390,561 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,589 | java | package com.google.android.gms.package_8.formats;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import androidx.annotation.Nullable;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelWriter;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable.Class;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable.Field;
import com.google.android.gms.internal.ads.zzaga;
import com.google.android.gms.internal.ads.zzagb;
import com.google.android.gms.internal.ads.zzard;
import com.google.android.gms.internal.ads.zzyf;
import com.google.android.gms.internal.ads.zzzs;
import com.google.android.gms.internal.ads.zzzt;
import com.google.android.gms.package_8.doubleclick.AppEventListener;
@zzard
@SafeParcelable.Class(creator="PublisherAdViewOptionsCreator")
public final class PublisherAdViewOptions
extends AbstractSafeParcelable
{
public static final Parcelable.Creator<com.google.android.gms.ads.formats.PublisherAdViewOptions> CREATOR = new VerticalProgressBar.SavedState.1();
@SafeParcelable.Field(getter="getManualImpressionsEnabled", id=1)
private final boolean zzbqn;
@Nullable
@SafeParcelable.Field(getter="getAppEventListenerBinder", id=2, type="android.os.IBinder")
private final zzzs zzbqo;
@Nullable
private AppEventListener zzbqp;
@Nullable
@SafeParcelable.Field(getter="getDelayedBannerAdListenerBinder", id=3)
private final IBinder zzbqq;
private PublisherAdViewOptions(Builder paramBuilder)
{
zzbqn = Builder.s(paramBuilder);
zzbqp = Builder.getSoundPath(paramBuilder);
if (zzbqp != null) {
paramBuilder = new zzyf(zzbqp);
} else {
paramBuilder = null;
}
zzbqo = paramBuilder;
zzbqq = null;
}
PublisherAdViewOptions(boolean paramBoolean, IBinder paramIBinder1, IBinder paramIBinder2)
{
zzbqn = paramBoolean;
if (paramIBinder1 != null) {
paramIBinder1 = zzzt.zzd(paramIBinder1);
} else {
paramIBinder1 = null;
}
zzbqo = paramIBinder1;
zzbqq = paramIBinder2;
}
public final AppEventListener getAppEventListener()
{
return zzbqp;
}
public final boolean getManualImpressionsEnabled()
{
return zzbqn;
}
public final void writeToParcel(Parcel paramParcel, int paramInt)
{
paramInt = SafeParcelWriter.beginObjectHeader(paramParcel);
SafeParcelWriter.writeBoolean(paramParcel, 1, getManualImpressionsEnabled());
IBinder localIBinder;
if (zzbqo == null) {
localIBinder = null;
} else {
localIBinder = zzbqo.asBinder();
}
SafeParcelWriter.writeIBinder(paramParcel, 2, localIBinder, false);
SafeParcelWriter.writeIBinder(paramParcel, 3, zzbqq, false);
SafeParcelWriter.finishObjectHeader(paramParcel, paramInt);
}
public final zzzs zzkt()
{
return zzbqo;
}
public final zzaga zzku()
{
return zzagb.zzu(zzbqq);
}
public final class Builder
{
private boolean zzbqn = false;
@Nullable
private AppEventListener zzbqp;
public Builder() {}
public final PublisherAdViewOptions build()
{
return new PublisherAdViewOptions(this, null);
}
public final Builder setAppEventListener(AppEventListener paramAppEventListener)
{
zzbqp = paramAppEventListener;
return this;
}
public final Builder setManualImpressionsEnabled(boolean paramBoolean)
{
zzbqn = paramBoolean;
return this;
}
}
}
| [
"samridh6759@gmail.com"
] | samridh6759@gmail.com |
0276603bb71dabd6e5faa05d7c04e0636b5a3595 | 4c32f2e91f2c4a2199c09e97c6109a70b301e804 | /src/main/java/org/iata/iata/edist/KeyWordType.java | 899b9e6fd6a5d67b9e4c58ccaa10db7392cddcd0 | [] | no_license | ejohnsonw/ndc-xsd-162 | 47f7b130b88d5af550a093529fa13a573ec628e0 | 76d0099233aad0c3d8663cc6e1c2cbf2435986f6 | refs/heads/master | 2020-12-30T13:28:16.667965 | 2017-05-14T02:56:01 | 2017-05-14T02:56:01 | 91,215,700 | 0 | 0 | null | 2017-05-14T02:47:21 | 2017-05-14T02:47:21 | null | UTF-8 | Java | false | false | 7,890 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2017.05.13 at 10:55:06 PM EDT
//
package org.iata.iata.edist;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlIDREF;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* KEYWORD/ VALUE PAIR object.
*
* <p>Java class for KeyWordType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="KeyWordType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Word" minOccurs="0">
* <complexType>
* <simpleContent>
* <extension base="<http://www.iata.org/IATA/EDIST>ProperNameSimpleType">
* </extension>
* </simpleContent>
* </complexType>
* </element>
* <element name="Value" maxOccurs="unbounded" minOccurs="0">
* <complexType>
* <simpleContent>
* <extension base="<http://www.iata.org/IATA/EDIST>ShortDescSimpleType">
* </extension>
* </simpleContent>
* </complexType>
* </element>
* </sequence>
* <attGroup ref="{http://www.iata.org/IATA/EDIST}ObjectKeyAttrGroup"/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "KeyWordType", propOrder = {
"word",
"value"
})
@XmlSeeAlso({
org.iata.iata.edist.AirShopReqAffinityQueryType.KeywordPreferences.KeywordPreference.class,
org.iata.iata.edist.StateProvQueryType.Keywords.KeyWord.class,
org.iata.iata.edist.KeyWord.class
})
public class KeyWordType {
@XmlElement(name = "Word")
protected KeyWordType.Word word;
@XmlElement(name = "Value")
protected List<KeyWordType.Value> value;
@XmlAttribute(name = "refs")
@XmlIDREF
protected List<Object> refs;
@XmlAttribute(name = "ObjectKey")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String objectKey;
/**
* Gets the value of the word property.
*
* @return
* possible object is
* {@link KeyWordType.Word }
*
*/
public KeyWordType.Word getWord() {
return word;
}
/**
* Sets the value of the word property.
*
* @param value
* allowed object is
* {@link KeyWordType.Word }
*
*/
public void setWord(KeyWordType.Word value) {
this.word = value;
}
/**
* Gets the value of the value property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the value property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getValue().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link KeyWordType.Value }
*
*
*/
public List<KeyWordType.Value> getValue() {
if (value == null) {
value = new ArrayList<KeyWordType.Value>();
}
return this.value;
}
/**
* Gets the value of the refs property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the refs property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRefs().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Object }
*
*
*/
public List<Object> getRefs() {
if (refs == null) {
refs = new ArrayList<Object>();
}
return this.refs;
}
/**
* Gets the value of the objectKey property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getObjectKey() {
return objectKey;
}
/**
* Sets the value of the objectKey property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setObjectKey(String value) {
this.objectKey = value;
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <simpleContent>
* <extension base="<http://www.iata.org/IATA/EDIST>ShortDescSimpleType">
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"value"
})
public static class Value {
@XmlValue
protected String value;
/**
* A data type for a Short Description size constraint.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <simpleContent>
* <extension base="<http://www.iata.org/IATA/EDIST>ProperNameSimpleType">
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"value"
})
public static class Word {
@XmlValue
protected String value;
/**
* A data type for Proper Name size constraint.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
}
}
| [
"ejohnson@ngeosone.com"
] | ejohnson@ngeosone.com |
afa8d8bc003dab5ae34e3f97dde2964c9e58a442 | cfe621e8c36e6ac5053a2c4f7129a13ea9f9f66b | /apps_final/names.of.allah/apk/com/google/android/gms/maps/model/GroundOverlayOptions.java | e805958ca5a471f84af60c071134c738bab59ec5 | [] | no_license | linux86/AndoirdSecurity | 3165de73b37f53070cd6b435e180a2cb58d6f672 | 1e72a3c1f7a72ea9cd12048d9874a8651e0aede7 | refs/heads/master | 2021-01-11T01:20:58.986651 | 2016-04-05T17:14:26 | 2016-04-05T17:14:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,906 | java | package com.google.android.gms.maps.model;
import android.os.IBinder;
import android.os.Parcel;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import com.google.android.gms.dynamic.d;
import com.google.android.gms.dynamic.d.a;
import com.google.android.gms.internal.hn;
import com.google.android.gms.maps.internal.v;
public final class GroundOverlayOptions
implements SafeParcelable
{
public static final GroundOverlayOptionsCreator CREATOR = new GroundOverlayOptionsCreator();
public static final float NO_DIMENSION = -1.0F;
private float aaA;
private LatLngBounds aaB;
private float aaC = 0.0F;
private float aaD = 0.5F;
private float aaE = 0.5F;
private float aan;
private float aau;
private boolean aav = true;
private BitmapDescriptor aax;
private LatLng aay;
private float aaz;
private final int xJ;
public GroundOverlayOptions()
{
xJ = 1;
}
GroundOverlayOptions(int paramInt, IBinder paramIBinder, LatLng paramLatLng, float paramFloat1, float paramFloat2, LatLngBounds paramLatLngBounds, float paramFloat3, float paramFloat4, boolean paramBoolean, float paramFloat5, float paramFloat6, float paramFloat7)
{
xJ = paramInt;
aax = new BitmapDescriptor(d.a.ag(paramIBinder));
aay = paramLatLng;
aaz = paramFloat1;
aaA = paramFloat2;
aaB = paramLatLngBounds;
aan = paramFloat3;
aau = paramFloat4;
aav = paramBoolean;
aaC = paramFloat5;
aaD = paramFloat6;
aaE = paramFloat7;
}
private GroundOverlayOptions a(LatLng paramLatLng, float paramFloat1, float paramFloat2)
{
aay = paramLatLng;
aaz = paramFloat1;
aaA = paramFloat2;
return this;
}
public final GroundOverlayOptions anchor(float paramFloat1, float paramFloat2)
{
aaD = paramFloat1;
aaE = paramFloat2;
return this;
}
public final GroundOverlayOptions bearing(float paramFloat)
{
aan = ((paramFloat % 360.0F + 360.0F) % 360.0F);
return this;
}
public final int describeContents()
{
return 0;
}
public final float getAnchorU()
{
return aaD;
}
public final float getAnchorV()
{
return aaE;
}
public final float getBearing()
{
return aan;
}
public final LatLngBounds getBounds()
{
return aaB;
}
public final float getHeight()
{
return aaA;
}
public final BitmapDescriptor getImage()
{
return aax;
}
public final LatLng getLocation()
{
return aay;
}
public final float getTransparency()
{
return aaC;
}
final int getVersionCode()
{
return xJ;
}
public final float getWidth()
{
return aaz;
}
public final float getZIndex()
{
return aau;
}
public final GroundOverlayOptions image(BitmapDescriptor paramBitmapDescriptor)
{
aax = paramBitmapDescriptor;
return this;
}
public final boolean isVisible()
{
return aav;
}
final IBinder jI()
{
return aax.ji().asBinder();
}
public final GroundOverlayOptions position(LatLng paramLatLng, float paramFloat)
{
boolean bool2 = true;
if (aaB == null)
{
bool1 = true;
hn.a(bool1, "Position has already been set using positionFromBounds");
if (paramLatLng == null) {
break label59;
}
bool1 = true;
label24:
hn.b(bool1, "Location must be specified");
if (paramFloat < 0.0F) {
break label64;
}
}
label59:
label64:
for (boolean bool1 = bool2;; bool1 = false)
{
hn.b(bool1, "Width must be non-negative");
return a(paramLatLng, paramFloat, -1.0F);
bool1 = false;
break;
bool1 = false;
break label24;
}
}
public final GroundOverlayOptions position(LatLng paramLatLng, float paramFloat1, float paramFloat2)
{
boolean bool2 = true;
if (aaB == null)
{
bool1 = true;
hn.a(bool1, "Position has already been set using positionFromBounds");
if (paramLatLng == null) {
break label81;
}
bool1 = true;
label27:
hn.b(bool1, "Location must be specified");
if (paramFloat1 < 0.0F) {
break label87;
}
bool1 = true;
label43:
hn.b(bool1, "Width must be non-negative");
if (paramFloat2 < 0.0F) {
break label93;
}
}
label81:
label87:
label93:
for (boolean bool1 = bool2;; bool1 = false)
{
hn.b(bool1, "Height must be non-negative");
return a(paramLatLng, paramFloat1, paramFloat2);
bool1 = false;
break;
bool1 = false;
break label27;
bool1 = false;
break label43;
}
}
public final GroundOverlayOptions positionFromBounds(LatLngBounds paramLatLngBounds)
{
if (aay == null) {}
for (boolean bool = true;; bool = false)
{
hn.a(bool, "Position has already been set using position: %s", new Object[] { aay });
aaB = paramLatLngBounds;
return this;
}
}
public final GroundOverlayOptions transparency(float paramFloat)
{
if ((paramFloat >= 0.0F) && (paramFloat <= 1.0F)) {}
for (boolean bool = true;; bool = false)
{
hn.b(bool, "Transparency must be in the range [0..1]");
aaC = paramFloat;
return this;
}
}
public final GroundOverlayOptions visible(boolean paramBoolean)
{
aav = paramBoolean;
return this;
}
public final void writeToParcel(Parcel paramParcel, int paramInt)
{
if (v.jG())
{
c.a(this, paramParcel, paramInt);
return;
}
GroundOverlayOptionsCreator.a(this, paramParcel, paramInt);
}
public final GroundOverlayOptions zIndex(float paramFloat)
{
aau = paramFloat;
return this;
}
}
/* Location:
* Qualified Name: com.google.android.gms.maps.model.GroundOverlayOptions
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"i@xuzhao.net"
] | i@xuzhao.net |
fe38ae643aa7e2a1e692d703cea0264728812678 | c1060179330a548905b3d1e3d86ffc946069878c | /AtcSwing/src/main/java/org/mmarini/atc/sim/PlaneFactory.java | c780c6eb7ede108eded7e2cf1ecdcad3ea4a8b28 | [
"MIT"
] | permissive | m-marini/atc | be5aa4d7acc19ca696bbc13d55d639a4268cf183 | 61c546af2e8656384f68b39a79f39f857c2c06f4 | refs/heads/master | 2021-06-12T04:36:12.045185 | 2021-01-12T18:40:46 | 2021-01-12T18:40:46 | 12,889,933 | 0 | 0 | MIT | 2021-06-07T18:02:31 | 2013-09-17T08:17:04 | TypeScript | UTF-8 | Java | false | false | 2,056 | java | /*
* PlaneFactory.java
*
* $Id: PlaneFactory.java,v 1.2 2008/02/15 18:06:59 marco Exp $
*
* 03/gen/08
*
* Copyright notice
*/
package org.mmarini.atc.sim;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
/**
* @author marco.marini@mmarini.org
* @version $Id: PlaneFactory.java,v 1.2 2008/02/15 18:06:59 marco Exp $
*
*/
public class PlaneFactory {
private List<PlaneModel> templateList;
private int count;
private Random random;
/**
*
*/
public PlaneFactory() {
random = new Random();
templateList = new ArrayList<>();
createPlaneModel("J", 0.25f, 0.8f, 300);
createPlaneModel("A", 0.2f, 0.5f, 150);
}
/**
*
* @return
*/
public Plane createPlane() {
int ct = getCount();
String id = String.valueOf((char) ('A' + (ct % 26))) + ct / 26;
ct = ct + 1;
setCount(ct);
PlaneModel model = selectModel();
DefaultPlane plane = new DefaultPlane();
plane.setId(id);
plane.setModel(model);
return plane;
}
/**
*
* @param classId
* @param lowSpeed
* @param highSpeed
* @param vSpeed
*/
private void createPlaneModel(String classId, float lowSpeed,
float highSpeed, int vSpeed) {
PlaneModel model = new PlaneModel();
model.setClassId(classId);
model.setLowSpeed(lowSpeed);
model.setHighSpeed(highSpeed);
model.setVSpeed(vSpeed);
templateList.add(model);
}
/**
* @return the count
*/
private int getCount() {
return count;
}
/**
* @return the random
*/
private Random getRandom() {
return random;
}
/**
* @return the templateList
*/
private List<PlaneModel> getTemplateList() {
return templateList;
}
/**
*
* @return
*/
private PlaneModel selectModel() {
List<PlaneModel> list = getTemplateList();
int idx = getRandom().nextInt(list.size());
return list.get(idx);
}
/**
* @param count
* the count to set
*/
private void setCount(int count) {
this.count = count;
}
}
| [
"marco.marini@mmarini.org"
] | marco.marini@mmarini.org |
14045fb52f9ced590364e9c795594bac5ffc29cb | 0b203cc77a222f4fb24750c79b6386c7f8b6bbb1 | /Android_Zone_Lib/src/and/utils/data/convert/de2encode/MD5Utils.java | e4e4f1cf6587fcc4e1f39c11d87486aca8e97e89 | [
"MIT"
] | permissive | RyanYans/Android-Utils | bdd9341041cd245a9e9529ab9a349e9aba04b7f8 | 47d1175a8f72f8720491d1db11f7391a6b71705e | refs/heads/master | 2021-01-22T11:04:01.377083 | 2017-05-15T02:00:32 | 2017-05-15T02:00:32 | 92,666,583 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 949 | java | package and.utils.data.convert.de2encode;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class MD5Utils {
//把key进行MD5加密
public static String hashKeyForDisk(String key) {
String cacheKey;
try {
final MessageDigest mDigest = MessageDigest.getInstance("MD5");
mDigest.update(key.getBytes());
cacheKey = bytesToHexString(mDigest.digest());
} catch (NoSuchAlgorithmException e) {
cacheKey = String.valueOf(key.hashCode());
}
return cacheKey;
}
private static String bytesToHexString(byte[] bytes) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < bytes.length; i++) {
String hex = Integer.toHexString(0xFF & bytes[i]);
if (hex.length() == 1) {
sb.append('0');
}
sb.append(hex);
}
return sb.toString();
}
}
| [
"1149324777@qq.com"
] | 1149324777@qq.com |
e6746058a3bd8faa80475e3622d3159b664ca974 | dfa6a7e03863e5f114b928618a83f1091b78df8b | /testJedis/src/main/java/hjg/cache2/RedisCacheDao.java | 44ac923242f7eb7ee796ffc9e5e53c1b9925aa5f | [] | no_license | zhaofeng555/integrationframework | 3d09fc5b032a8fac70451261b69614d3f7e89664 | af8b831d81bc3f3638e082ca66d8ae340f9c9e54 | refs/heads/master | 2021-01-01T19:42:15.333058 | 2017-07-19T07:34:19 | 2017-07-19T07:34:19 | 20,209,695 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,563 | java | package hjg.cache2;
import java.io.Serializable;
import java.util.List;
import redis.clients.jedis.ShardedJedisPool;
public interface RedisCacheDao {
public void setShardedJedisPool(ShardedJedisPool shardedJedisPool);
public String get(String key);
public Boolean set(String key, String value);
public Boolean exists(String key);
public Long delete(String key);
public Long modifyByNum(String key, Long n);
public Long setEmptyBeanId(String key);
public Long setEmptyBean(Class clazz);
public <T> Boolean existEmptyBean(Class<T> clazz);
public Boolean existEmptyBeanId(String allIdKey);
public <T> Boolean existsBean(Class<T> clazz, Serializable id);
public Long setBean(Object obj);
public Long setBeans(List objList);
public <T> T getBeanById(Class<T> clazz, Serializable id);
public <T> List<T> getBeansByIds(Class<T> clazz, Serializable... ids);
public <T> List<T> getAllBean(Class<T> clazz);
public <T> List<T> getBeans(Class<T> clazz, Integer start, Integer end);
public <T> Long countBeans(Class<T> clazz);
public Long countBeans(String allIdKey);
public <T> Long delBean(Serializable id, Class<T> clazz);
public <T> Long delBeanAll(Class<T> clazz);
public Long setBeanId(String key, Serializable id);
public List<String> getBeanIds(String key, Integer start, Integer end);
public Long delBeanId(String key, Serializable id);
public <T> String getBeanKey(Class<T> clazz, Serializable id);
public <T> String getBeanIdsKey(Class<T> clazz);
}
| [
"443842006@qq.com"
] | 443842006@qq.com |
c4526a4546243c65132718a55e4b2fa104158cff | 22cd38be8bf986427361079a2f995f7f0c1edeab | /src/main/java/core/erp/txm/web/TXMA0030Controller.java | 1d49e7a3d23088f7e7692fa44189144f5682e626 | [] | no_license | shaorin62/MIS | 97f51df344ab303c85acb2e7f90bb69944f85e0f | a188b02a73f668948246c133cd202fe091aa29c7 | refs/heads/master | 2021-04-05T23:46:52.422434 | 2018-03-09T06:41:04 | 2018-03-09T06:41:04 | 124,497,033 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,055 | java | package core.erp.txm.web;
import java.util.Map;
import javax.annotation.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import core.erp.txm.service.TXMA0030Service;
import core.ifw.cmm.request.CoreRequest;
import core.ifw.cmm.result.CoreResultData;
/**
* <pre>
* TXMA0030Controller - 예산과목코드 프로그램 컨트롤러 클래스
* <p><b>NOTE : </b></p>
* </pre>
*
* @author 황치웅
* @since 2016. 8. 3.
* @version 1.0
* @see {@link }
*
* <pre>
* == Modification Information ==
* Date Modifier Comment
* ====================================================
* 2016. 8. 3. 황치웅 Initial Created.
* 2016. 8. 3. 안윤준 수정
* ====================================================
* </pre>
*
* Copyright 1998-2016 By INBUS Co,Ltd. All rights reserved.
*/
@Controller
public class TXMA0030Controller {
private static final Logger LOGGER = LoggerFactory.getLogger(TXMA0030Controller.class);
@Resource(name="TXMA0030Service")
private TXMA0030Service tXMA0030Service;
/**
* <pre>
* 부가세자료집계처리 목록을 조회한다.
* </pre>
*
* @param coreRequest
* @param model
* @return
* @throws Exception
*/
@RequestMapping(value="/core/erp/txm/TXMA0030_SEARCH00.do")
@SuppressWarnings({ "rawtypes", "unchecked" })
public ModelAndView processSEARCH00(CoreRequest coreRequest, ModelMap model) throws Exception {
ModelAndView mav = new ModelAndView("coreReturnView");
CoreResultData coreResultData = new CoreResultData(coreRequest.getCALL_TYPE());
try {
Map searchVo = coreRequest.getMapVariableList();
coreResultData.setReturnDataMap((Map<String, Object>) tXMA0030Service.processSEARCH00(searchVo));
coreResultData.setResultMessageSuccessSelect();
} catch(Exception e) {
LOGGER.error("processSEARCH00 : " + e.getMessage());
coreResultData.setResultMessageFailSelect(e);
}
mav.addObject("FORM_DATA", coreResultData);
return mav;
}
/**
* <pre>
*부가세자료집계처리 목록을 수정/저장/삭제한다.
* </pre>
*
* @param param - 저장, 수정 할 자료
* @return 처리 건수
* @exception Exception - 처리 시 발생한 예외
*/
@RequestMapping(value = "/core/erp/txm/TXMA0030_SAVE00.do")
public ModelAndView processSAVE00(CoreRequest coreRequest, ModelMap model) throws Exception {
ModelAndView mav = new ModelAndView("coreReturnView");
CoreResultData coreResultData = new CoreResultData(coreRequest.getCALL_TYPE());
try {
tXMA0030Service.processSAVE00(coreRequest.getSaveDataSetAll(), coreRequest.getMapVariableList());
coreResultData.setResultMessageSuccessSave();
} catch(Exception e) {
LOGGER.error("processSAVE00 : " + e.getMessage());
coreResultData.setResultMessageFailSave(e);
}
mav.addObject("FORM_DATA", coreResultData);
return mav;
}
}
| [
"imosh@nate.com"
] | imosh@nate.com |
e3c304b0f57882113fc26f4bc0ee773fb721a7be | 572ab44a5612fa7c48c1c3b29b5f4375f3b08ed1 | /BIMfoBA.src/jsdai/SIfc4/EIfclightintensitydistribution.java | 58cc1f550cb6ac0646f705d84860d8498fb5bcff | [] | no_license | ren90/BIMforBA | ce9dd9e5c0b8cfd2dbd2b84f3e2bcc72bc8aa18e | 4a83d5ecb784b80a217895d93e0e30735dc83afb | refs/heads/master | 2021-01-12T20:49:32.561833 | 2015-03-09T11:00:40 | 2015-03-09T11:00:40 | 24,721,790 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,316 | java | /* Generated by JSDAI Express Compiler, version 4.3.2, build 500, 2011-12-13 */
// Java interface for entity IfcLightIntensityDistribution
package jsdai.SIfc4;
import jsdai.lang.*;
public interface EIfclightintensitydistribution extends EEntity {
// generateExplicitAttributeMethodDeclarations: 1
// attribute:LightDistributionCurve, base type: ENUMERATION
public boolean testLightdistributioncurve(EIfclightintensitydistribution type) throws SdaiException;
public int getLightdistributioncurve(EIfclightintensitydistribution type) throws SdaiException;
public void setLightdistributioncurve(EIfclightintensitydistribution type, int value) throws SdaiException;
public void unsetLightdistributioncurve(EIfclightintensitydistribution type) throws SdaiException;
// generateExplicitAttributeMethodDeclarations: 1
// methods for attribute: DistributionData, base type: LIST OF ENTITY
public boolean testDistributiondata(EIfclightintensitydistribution type) throws SdaiException;
public AIfclightdistributiondata getDistributiondata(EIfclightintensitydistribution type) throws SdaiException;
public AIfclightdistributiondata createDistributiondata(EIfclightintensitydistribution type) throws SdaiException;
public void unsetDistributiondata(EIfclightintensitydistribution type) throws SdaiException;
}
| [
"renato.filipe.vieira@gmail.com"
] | renato.filipe.vieira@gmail.com |
4e60ca6d66717a9fa8f0500518fb94c104409157 | 1db07f5643b062a6f4642428aa5caf307b07f3f3 | /drools.indepth.root/kie-server-performance/src/main/java/org/jackzeng/autobean/Bean106.java | e6cf8f55ba0c5aa8094610cf4605bc95117fd579 | [] | no_license | tracyzhu2014/JavaHub | b6d6c4e95bd1e6ca3849d989e9cd2c1aa53416fb | 4b66e2a6ee9f8d3bb433490f259d534ccce67a97 | refs/heads/master | 2023-05-07T22:23:03.545452 | 2020-12-18T01:57:44 | 2020-12-18T01:57:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,900 | java | package org.jackzeng.autobean;
public class Bean106 {
private String field107;
private double field108;
private boolean field109;
private int fild110;
public String getField107() {
return field107;
}
public void setField107(String field107) {
this.field107 = field107;
}
public double getField108() {
return field108;
}
public void setField108(double field108) {
this.field108 = field108;
}
public boolean isField109() {
return field109;
}
public void setField109(boolean field109) {
this.field109 = field109;
}
public int getFild110() {
return fild110;
}
public void setFild110(int fild110) {
this.fild110 = fild110;
}} | [
"zengxijin@qq.com"
] | zengxijin@qq.com |
6138dac3c02bf3e94860027e1124470842a01075 | aeb869adc9baea978bee38571b300cb73d4ee8b9 | /omni-entity/src/main/java/com/adms/entity/sale/TsrStatus.java | 48492a06bbfb28bffadedb489f12723265726b8f | [
"Apache-2.0"
] | permissive | AEGONTH/omni-chanel-project | 47ee20ff740c24450a51d95db57bc8917f4e268b | 8b3e15b40d2142f1c05738edac3efa223b65b3ef | refs/heads/master | 2021-01-13T00:41:35.776462 | 2016-04-11T07:16:43 | 2016-04-11T07:18:13 | 46,095,637 | 2 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,047 | java | package com.adms.entity.sale;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import com.adms.common.domain.BaseDomain;
@Entity
@Table(name = "S_TSR_STATUS")
public class TsrStatus extends BaseDomain {
private static final long serialVersionUID = -3709926666422678893L;
@Id
@Column(name = "ID")
private Long id;
@Column(name = "STATUS_CODE")
private String statusCode;
@Column(name = "STATUS_NAME")
private String statusName;
public Long getId()
{
return id;
}
public void setId(Long id)
{
this.id = id;
}
public String getStatusCode()
{
return statusCode;
}
public void setStatusCode(String statusCode)
{
this.statusCode = statusCode;
}
public String getStatusName()
{
return statusName;
}
public void setStatusName(String statusName)
{
this.statusName = statusName;
}
@Override
public String toString()
{
return "TsrStatus [id=" + id + ", statusCode=" + statusCode + ", statusName=" + statusName + "]";
}
}
| [
"moth.pc@gmail.com"
] | moth.pc@gmail.com |
d0ba5108dca448b3b5585a7e7934fc98acf73d6f | 8949086d4a541035bd7bda226c0a07532650661c | /src/main/java/info/beastsoftware/beastfactions/factions/gui/struct/ButtonAction.java | 5095eeac3fb35d80cc22a4f8456d278f230d35e9 | [] | no_license | Tominous/BeastFactionsWiki | 9d007e1b8b3e2014f681de4e152ece23d4119cd9 | 100e11584bf37c3663b6dcf824986ccd82e4831b | refs/heads/master | 2020-11-29T10:25:02.134354 | 2019-09-29T20:00:16 | 2019-09-29T20:00:16 | 230,090,324 | 1 | 0 | null | 2019-12-25T11:05:17 | 2019-12-25T11:05:17 | null | UTF-8 | Java | false | false | 338 | java | package info.beastsoftware.beastfactions.factions.gui.struct;
public enum ButtonAction {
TOP_BUTTON_CLICK,
RELATIONS_GUI_OPEN,
BACK,
NEXT_PAGE,
PREVIOUS_PAGE,
CLOSE,
NOTHING,
ROLES_GUI_OPEN,
HOME,
ROLE_MANAGE,
PLAYER_MANAGE,
RELATION_MANAGE,
WARP_TELEPORT,
PLAYERS_GUI_OPEN;
}
| [
"32720562+daniel097541@users.noreply.github.com"
] | 32720562+daniel097541@users.noreply.github.com |
ea89668c8273fa4120481b8a5c9c7c91951fe5fc | 95b3397fd148b1f5fba08ef8c9d34f59f0b7cd99 | /app/src/main/java/com/jinshan/application/util/ServiceDialog.java | 3ad574de7002ffd8235403b36c6e2c21ca28b917 | [] | no_license | wpf-191514617/jinshanapp | 4f344370a7ce5dfc004cc22f753fe3ea103a794b | 79f82a4c89e1fa2dad05a62cfe65d225f8b82cbb | refs/heads/master | 2020-04-28T10:59:35.834485 | 2019-03-12T14:04:50 | 2019-03-12T14:04:50 | 175,220,606 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,851 | java | package com.jinshan.application.util;
import android.app.Dialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.jinshan.application.Constant;
import com.jinshan.application.R;
import com.jinshan.application.entity.ServiceData;
import com.minilive.library.BaseAdapterUtil;
import com.minilive.library.util.DensityUtil;
import com.minilive.library.util.StringUtils;
public class ServiceDialog extends Dialog {
private int mIndex = 0;
private TextView tvTitle, tvContent;
private ImageView ivCode;
private Button btnPre , btnNext;
public ServiceDialog(Context context) {
super(context, R.style.customDialog);
initView();
}
private void initView() {
View view = LayoutInflater.from(getContext()).inflate(R.layout.layout_service, null);
Window dialogWindow = getWindow();
WindowManager.LayoutParams lp = dialogWindow.getAttributes();
lp.width = WindowManager.LayoutParams.MATCH_PARENT;
lp.height = DensityUtil.dip2px(getContext(), 357);
dialogWindow.setAttributes(lp);
setContentView(view);
setCanceledOnTouchOutside(true);
setCancelable(true);
tvTitle = view.findViewById(R.id.tvTitle);
tvContent = view.findViewById(R.id.tvContent);
ivCode = view.findViewById(R.id.ivCode);
view.findViewById(R.id.ivClose).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
dismiss();
}
});
btnPre = findViewById(R.id.btnPre);
btnPre.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mIndex--;
initImageView();
}
});
btnNext = findViewById(R.id.btnNext);
btnNext.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mIndex++;
initImageView();
}
});
btnPre.setVisibility(View.INVISIBLE);
}
private void initImageView() {
btnPre.setVisibility(View.VISIBLE);
btnNext.setVisibility(View.VISIBLE);
if (mIndex == 0){
btnPre.setVisibility(View.INVISIBLE);
}
if (mServiceData != null && BaseAdapterUtil.isListNotEmpty(mServiceData.getCustomerServiceList())){
if (mIndex == mServiceData.getCustomerServiceList().size() - 1){
btnNext.setVisibility(View.INVISIBLE);
}
ServiceData.CustomerServiceListBean customerServiceListBean = mServiceData.getCustomerServiceList().get(mIndex);
setText(tvTitle , customerServiceListBean.getName());
setText(tvContent , customerServiceListBean.getWorkingHours());
Glide.with(getContext()).load(Constant.BASEURL + customerServiceListBean.getImageUrl()).into(ivCode);
}
}
private ServiceData mServiceData;
public void setData(ServiceData data){
mServiceData = data;
ServiceData.CustomerServiceListBean customerServiceListBean = mServiceData.getCustomerServiceList().get(mIndex);
setText(tvTitle , customerServiceListBean.getName());
setText(tvContent , customerServiceListBean.getWorkingHours());
Glide.with(getContext()).load(Constant.BASEURL + customerServiceListBean.getImageUrl()).into(ivCode);
}
private void setText(TextView tv , String data){
if (StringUtils.isEmpty(data)){
data = "";
}
tv.setText(data);
}
}
| [
"15291967179@163.com"
] | 15291967179@163.com |
ca81b88e7ca043db6a150ba95658f1abdf9b6cc1 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/1/1_63c709b0a081f5435b8b3a045932ce42446dcb26/PromptAuthenticationProvider/1_63c709b0a081f5435b8b3a045932ce42446dcb26_PromptAuthenticationProvider_s.java | 34c6ea344ba3758977d98121030d515e0247743a | [] | 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,599 | java | /*
* Created on 25.06.2005
*/
package org.tigris.subversion.javahl;
import org.tmatesoft.svn.core.wc.ISVNAuthenticationManager;
import org.tmatesoft.svn.core.wc.ISVNAuthenticationProvider;
import org.tmatesoft.svn.core.wc.SVNAuthentication;
public class PromptAuthenticationProvider implements ISVNAuthenticationProvider {
PromptUserPassword myPrompt;
public PromptAuthenticationProvider(PromptUserPassword prompt){
myPrompt = prompt;
}
public SVNAuthentication requestClientAuthentication(String kind,
String realm, String userName, ISVNAuthenticationManager manager) {
if (myPrompt instanceof PromptUserPassword3) {
PromptUserPassword3 prompt3 = (PromptUserPassword3) myPrompt;
if(prompt3.prompt(realm, userName, manager.isAuthStorageEnabled())){
SVNAuthentication auth = new SVNAuthentication(kind, realm,
prompt3.getUsername(), prompt3.getPassword());
auth.setStorageAllowed(prompt3.userAllowedSave());
}
}else{
if(myPrompt.prompt(realm, userName)){
SVNAuthentication auth = new SVNAuthentication(kind, realm, myPrompt.getUsername(), myPrompt.getPassword());
return auth;
}
}
return null;
}
public int acceptServerAuthentication(SVNAuthentication authentication,
ISVNAuthenticationManager manager) {
return ISVNAuthenticationProvider.ACCEPTED;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
2357ed5c6058a1cedfe09f5f0dda1c2c9ab612e4 | c9d621643e225860f43df03f7cbf2e349bbf0d9d | /src/main/java/cloud/nativ/jakarta/JakartaResource.java | ae05c328c0f2cbeb8a90fabca8364816758b9a06 | [
"MIT"
] | permissive | lreimer/continuous-zapk8s | f5e509356171f7441c050e4026635dc29d2217c7 | a4564ac4820a6f62d92bc50a05ff4225648a2139 | refs/heads/main | 2023-04-11T23:26:15.925854 | 2021-05-11T14:21:05 | 2021-05-11T14:21:05 | 314,376,619 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 599 | java | package cloud.nativ.jakarta;
import javax.enterprise.context.ApplicationScoped;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.Collections;
import java.util.Map;
@ApplicationScoped
@Path("jakarta.ee")
@Produces({MediaType.APPLICATION_JSON})
public class JakartaResource {
@GET
@Path("8")
public Response index() {
Map<String, String> message = Collections.singletonMap("message", "Continuous Zap on K8s");
return Response.ok(message).build();
}
}
| [
"mario-leander.reimer@qaware.de"
] | mario-leander.reimer@qaware.de |
cecf0cc61a11141f092b2d776ec64c0f8eae73cb | 519e16535043ebd311ec10a86eaf646960616862 | /graphql-binding/src/main/java/se/l4/graphql/binding/annotations/GraphQLSubscription.java | d1f0abf017d0366aee3397860a00d0cc6b1f8366 | [
"Apache-2.0"
] | permissive | LevelFourAB/graphql-binding | eafb3e84eda260b88a671b3ed0994f15671f831f | 94e98c843d43c44dff8c0d595dffea868459c784 | refs/heads/master | 2021-06-26T04:20:06.570113 | 2021-01-27T10:52:00 | 2021-01-27T10:52:00 | 204,269,037 | 1 | 0 | Apache-2.0 | 2020-11-30T05:47:59 | 2019-08-25T08:47:21 | Java | UTF-8 | Java | false | false | 737 | java | package se.l4.graphql.binding.annotations;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import se.l4.graphql.binding.GraphQLBinder;
/**
* Mark a field or method in a class as being a GraphQL subscription. Such a
* field or method must return a {@link org.reactivestreams.Publisher}
* from {@code org.org.reactivestreams}.
*
* This annotation can only be used in root classes added via
* {@link GraphQLBinder#withRoot(Object)}.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.METHOD, ElementType.FIELD })
@Documented
public @interface GraphQLSubscription
{
}
| [
"a@holstenson.se"
] | a@holstenson.se |
3bd3b831405889bc8cff7d02e137b65fdd16edf4 | 82e3cc9ae9bebad1e5ec86353d489d36de7e2450 | /lib-gwt-common-controls/src/main/java/id/co/sigma/common/client/security/rpc/GroupRPCServiceAsync.java | edb2c7e463a7d39d5016f7d5da3d75ac15c9614d | [] | no_license | balicamp/balicamp-lib-gwt | ebb02d757f853c7e2fdb722ba43db1dd3265820b | 6ad623c632f27e2dfe20eaa08620978bb203a588 | refs/heads/master | 2021-01-21T11:46:43.422469 | 2014-10-06T01:26:57 | 2014-10-06T01:26:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,440 | java | package id.co.sigma.common.client.security.rpc;
import id.co.sigma.common.security.domain.UserGroup;
import id.co.sigma.common.client.security.rpc.impl.GroupRPCServiceAsyncImpl;
import id.co.sigma.common.data.PagedResultHolder;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
/**
* Group RPC Asyncronous
* @author I Gede Mahendra
* @since Nov 26, 2012, 3:57:47 PM
* @version $Id
*/
public interface GroupRPCServiceAsync {
public static class Util {
private static GroupRPCServiceAsync instance ;
public static GroupRPCServiceAsync getInstance() {
if (instance==null){
instance = GWT.create(GroupRPCServiceAsyncImpl.class);
// CommonGlobalVariableHolder.getInstance().fixTargetUrl((ServiceDefTarget)instance);
}
return instance;
}
}
/**
* Sample RPC
* @param comment
* @param callback
*/
void sampleRpc(String comment, AsyncCallback<String> callback);
/**
* Insert user group
* @param parameter
* @param callback
*/
void insert(UserGroup parameter, AsyncCallback<Void> callback);
/**
* Delete user group
* @param parameter
* @param callback
*/
void delete(Long parameter, AsyncCallback<Void> callback);
/**
* Update use group
* @param parameter
* @param callback
*/
void update(UserGroup parameter, AsyncCallback<Void> callback);
} | [
"gede.sutarsa@gmail.com"
] | gede.sutarsa@gmail.com |
3c63ac9ed233a6dd71cf6a37ea83b064c102fe18 | 9a52fe3bcdd090a396e59c68c63130f32c54a7a8 | /sources/com/google/android/gms/internal/drive/zze.java | 2b0250ab0e5f05a92c6ecd96042df6a971df1a57 | [] | no_license | mzkh/LudoKing | 19d7c76a298ee5bd1454736063bc392e103a8203 | ee0d0e75ed9fa8894ed9877576d8e5589813b1ba | refs/heads/master | 2022-04-25T06:08:41.916017 | 2020-04-14T17:00:45 | 2020-04-14T17:00:45 | 255,670,636 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,393 | java | package com.google.android.gms.internal.drive;
import com.google.android.gms.common.internal.Objects;
import com.google.android.gms.drive.events.zzk;
import com.google.android.gms.drive.events.zzm;
import java.util.Locale;
public final class zze implements zzk {
private final zzm zzct;
private final long zzcu;
private final long zzcv;
/* JADX WARNING: type inference failed for: r0v0, types: [com.google.android.gms.drive.events.zzm, com.google.android.gms.internal.drive.zzf] */
/* JADX WARNING: Multi-variable type inference failed. Error: jadx.core.utils.exceptions.JadxRuntimeException: No candidate types for var: r0v0, types: [com.google.android.gms.drive.events.zzm, com.google.android.gms.internal.drive.zzf]
assigns: [com.google.android.gms.internal.drive.zzf]
uses: [com.google.android.gms.drive.events.zzm]
mth insns count: 7
at jadx.core.dex.visitors.typeinference.TypeSearch.fillTypeCandidates(TypeSearch.java:237)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
at jadx.core.dex.visitors.typeinference.TypeSearch.run(TypeSearch.java:53)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.runMultiVariableSearch(TypeInferenceVisitor.java:99)
at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.visit(TypeInferenceVisitor.java:92)
at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:27)
at jadx.core.dex.visitors.DepthTraversal.lambda$visit$1(DepthTraversal.java:14)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)
at jadx.core.ProcessClass.process(ProcessClass.java:30)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:311)
at jadx.api.JavaClass.decompile(JavaClass.java:62)
at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:217)
*/
/* JADX WARNING: Unknown variable types count: 1 */
/* Code decompiled incorrectly, please refer to instructions dump. */
public zze(com.google.android.gms.internal.drive.zzh r3) {
/*
r2 = this;
r2.<init>()
com.google.android.gms.internal.drive.zzf r0 = new com.google.android.gms.internal.drive.zzf
r0.<init>(r3)
r2.zzct = r0
long r0 = r3.zzcu
r2.zzcu = r0
long r0 = r3.zzcv
r2.zzcv = r0
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.drive.zze.<init>(com.google.android.gms.internal.drive.zzh):void");
}
public final boolean equals(Object obj) {
if (obj != null && obj.getClass() == getClass()) {
if (obj == this) {
return true;
}
zze zze = (zze) obj;
return Objects.equal(this.zzct, zze.zzct) && this.zzcu == zze.zzcu && this.zzcv == zze.zzcv;
}
}
public final int hashCode() {
return Objects.hashCode(Long.valueOf(this.zzcv), Long.valueOf(this.zzcu), Long.valueOf(this.zzcv));
}
public final String toString() {
return String.format(Locale.US, "FileTransferProgress[FileTransferState: %s, BytesTransferred: %d, TotalBytes: %d]", new Object[]{this.zzct.toString(), Long.valueOf(this.zzcu), Long.valueOf(this.zzcv)});
}
}
| [
"mdkhnmm@amazon.com"
] | mdkhnmm@amazon.com |
c6c6032c2f82d358e74ae9a814c623e4d5e157e9 | 50c8fc4641d3d237d4e65afdee63803a1e76c98e | /src/com/fs/starfarer/api/impl/campaign/skills/FighterDoctrine.java | 9025d83ea49e5066464cc917cfd54c56a197ad62 | [] | no_license | jaghaimo/starsector-api | 7e8ea70471f45581c8d337e43b711a68f262f0ed | 5b1af3542e8ce257b2e6efa69e14d63a25746004 | refs/heads/master | 2023-06-07T00:48:29.078933 | 2023-06-01T19:14:30 | 2023-06-01T20:05:31 | 315,633,840 | 2 | 2 | null | 2022-04-20T15:11:11 | 2020-11-24T13:02:20 | Java | UTF-8 | Java | false | false | 6,218 | java | package com.fs.starfarer.api.impl.campaign.skills;
import java.awt.Color;
import com.fs.starfarer.api.GameState;
import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.campaign.FleetDataAPI;
import com.fs.starfarer.api.characters.CustomSkillDescription;
import com.fs.starfarer.api.characters.MutableCharacterStatsAPI;
import com.fs.starfarer.api.characters.ShipSkillEffect;
import com.fs.starfarer.api.characters.SkillSpecAPI;
import com.fs.starfarer.api.combat.MutableShipStatsAPI;
import com.fs.starfarer.api.combat.ShipAPI.HullSize;
import com.fs.starfarer.api.fleet.FleetMemberAPI;
import com.fs.starfarer.api.impl.campaign.ids.Stats;
import com.fs.starfarer.api.ui.TooltipMakerAPI;
import com.fs.starfarer.api.util.Misc;
public class FighterDoctrine {
public static final float FIGHTER_CREW_LOSS_REDUCTION = 15f;
public static final float FIGHTER_RAMAGE_REDUCTION = 15f;
public static final float FIGHTER_REPLACEMENT_RATE_BONUS = 15f;
public static class Test implements ShipSkillEffect, CustomSkillDescription {
protected float getReplacementRateBonus(MutableShipStatsAPI stats) {
FleetMemberAPI member = stats.getFleetMember();
if (member == null) return 0f;
FleetDataAPI data = member.getFleetDataForStats();
if (data == null) data = member.getFleetData();
if (data == null) return 0f;
return getReplacementRateBonus(data);
}
protected float getReplacementRateBonus(FleetDataAPI data) {
String key = "fd1";
Float bonus = (Float) data.getCacheClearedOnSync().get(key);
if (bonus != null) return bonus;
float bays = 0;
for (FleetMemberAPI curr : data.getMembersListCopy()) {
bays += curr.getNumFlightDecks();
}
bonus = (float) Math.round(300f / (Math.max(bays, 6)));
data.getCacheClearedOnSync().put(key, bonus);
return bonus;
}
public void apply(MutableShipStatsAPI stats, HullSize hullSize, String id, float level) {
float bonus = getReplacementRateBonus(stats);
float timeMult = 1f / ((100f + bonus) / 100f);
stats.getFighterRefitTimeMult().modifyMult(id, timeMult);
}
public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String id) {
stats.getFighterRefitTimeMult().unmodify(id);
}
public boolean hasCustomDescription() {
return true;
}
public void createCustomDescription(MutableCharacterStatsAPI stats, SkillSpecAPI skill,
TooltipMakerAPI info, float width) {
Color textColor = Misc.getTextColor();
Color highlightColor = Misc.getHighlightColor();
Color darkHighlightColor = Misc.setAlpha(highlightColor, 155);
int alpha = 255;
float level = stats.getSkillLevel(skill.getId());
if (level <= 0) {
textColor = Misc.getGrayColor();
highlightColor = darkHighlightColor;
alpha = 155;
}
if (Global.getCurrentState() == GameState.CAMPAIGN) {
float bonus = getReplacementRateBonus(Global.getSector().getPlayerFleet().getFleetData());
info.addPara("%s faster fighter replacements " +
"(based on number of fighter bays in fleet)", 0f, textColor, highlightColor,
"" + (int)(bonus) + "%");
}
}
public String getEffectDescription(float level) {
float bonus = getReplacementRateBonus(Global.getSector().getPlayerFleet().getFleetData());
return "" + (int)(bonus) + "% faster fighter replacements (based on number of fighter bays in fleet)";
}
public String getEffectPerLevelDescription() {
return null;
}
public ScopeDescription getScopeDescription() {
return ScopeDescription.ALL_SHIPS;
}
}
public static class Level1 implements ShipSkillEffect {
public void apply(MutableShipStatsAPI stats, HullSize hullSize, String id, float level) {
stats.getDynamic().getStat(Stats.FIGHTER_CREW_LOSS_MULT).modifyMult(id, 1f - FIGHTER_CREW_LOSS_REDUCTION / 100f);
}
public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String id) {
stats.getDynamic().getStat(Stats.FIGHTER_CREW_LOSS_MULT).unmodify(id);
}
public String getEffectDescription(float level) {
return "-" + (int)(FIGHTER_CREW_LOSS_REDUCTION) + "% crew lost due to fighter losses in combat";
}
public String getEffectPerLevelDescription() {
return null;
}
public ScopeDescription getScopeDescription() {
return ScopeDescription.ALL_SHIPS;
}
}
public static class Level2 implements ShipSkillEffect {
public void apply(MutableShipStatsAPI stats, HullSize hullSize, String id, float level) {
stats.getHullDamageTakenMult().modifyMult(id, 1f - FIGHTER_RAMAGE_REDUCTION / 100f);
stats.getArmorDamageTakenMult().modifyMult(id, 1f - FIGHTER_RAMAGE_REDUCTION / 100f);
stats.getShieldDamageTakenMult().modifyMult(id, 1f - FIGHTER_RAMAGE_REDUCTION / 100f);
}
public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String id) {
stats.getHullDamageTakenMult().unmodify(id);
stats.getArmorDamageTakenMult().unmodify(id);
stats.getShieldDamageTakenMult().unmodify(id);
}
public String getEffectDescription(float level) {
return "-" + (int)(FIGHTER_RAMAGE_REDUCTION) + "% damage taken";
}
public String getEffectPerLevelDescription() {
return null;
}
public ScopeDescription getScopeDescription() {
return ScopeDescription.ALL_FIGHTERS;
}
}
public static class Level3 implements ShipSkillEffect {
public void apply(MutableShipStatsAPI stats, HullSize hullSize, String id, float level) {
float timeMult = 1f / ((100f + FIGHTER_REPLACEMENT_RATE_BONUS) / 100f);
stats.getFighterRefitTimeMult().modifyMult(id, timeMult);
}
public void unapply(MutableShipStatsAPI stats, HullSize hullSize, String id) {
stats.getFighterRefitTimeMult().unmodify(id);
}
public String getEffectDescription(float level) {
return "" + (int)(FIGHTER_REPLACEMENT_RATE_BONUS) + "% faster fighter replacements";
}
public String getEffectPerLevelDescription() {
return null;
}
public ScopeDescription getScopeDescription() {
return ScopeDescription.ALL_SHIPS;
}
}
}
| [
"1764586+jaghaimo@users.noreply.github.com"
] | 1764586+jaghaimo@users.noreply.github.com |
3d3daf76d75792076f60b71b2a84ad103b24a634 | 64a57283d422fd17b9cdac0c4528059008002d5c | /Project-new-spring/boost-server-master/boost-server-api/src/main/java/com/qooco/boost/data/oracle/entities/PersonalAssessmentQuality.java | ad0e5907ac7cf0da83c4f5ccab2a1f84bb5f38f1 | [
"BSL-1.0"
] | permissive | dolynhan15/Java-spring-boot | b2ff6785b45577a5e16b016d8eeab00cf0dec56b | 3541b6ba1b0e6a2c254f29bf29cf90d7efd1479a | refs/heads/main | 2023-08-13T11:53:57.369574 | 2021-10-19T07:36:42 | 2021-10-19T07:36:42 | 397,813,627 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,229 | java | package com.qooco.boost.data.oracle.entities;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/*
* Copyright: Falcon Team - AxonActive
User: nhphuc
Date: 11/13/2018 - 11:15 AM
*/
@Setter @Getter
@Entity
@Table(name = "ASSESSMENT_QUALITY_TYPE")
public class PersonalAssessmentQuality extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "ASSESSMENT_QUALITY_TYPE_SEQUENCE")
@SequenceGenerator(sequenceName = "ASSESSMENT_QUALITY_TYPE_SEQ", allocationSize = 1, name = "ASSESSMENT_QUALITY_TYPE_SEQUENCE")
@NotNull
@Column(name = "ID")
private Long id;
@NotNull
@JoinColumn(name = "ASSESSMENT_PERSONAL_ID", referencedColumnName = "ID")
@ManyToOne(optional = false)
private PersonalAssessment personalAssessment;
@NotNull
@Basic(optional = false)
@Column(name = "NAME_EN_US", columnDefinition = "NVARCHAR2")
private String nameEnUs;
@Basic(optional = false)
@Column(name = "NAME_ZH_CN", columnDefinition = "NVARCHAR2")
private String nameZhCn;
@Column(name = "NAME_ZH_TW", columnDefinition = "NVARCHAR2")
private String nameZhTw;
@Column(name = "NAME_ID_ID", columnDefinition = "NVARCHAR2")
private String nameIdId;
@Column(name = "NAME_JA_JP", columnDefinition = "NVARCHAR2")
private String nameJaJp;
@Basic(optional = false)
@Column(name = "NAME_MS_MY", columnDefinition = "NVARCHAR2")
private String nameMsMy;
@Basic(optional = false)
@Column(name = "NAME_TH_TH", columnDefinition = "NVARCHAR2")
private String nameThTh;
@Basic(optional = false)
@Column(name = "NAME_VI_VN", columnDefinition = "NVARCHAR2")
private String nameViVn;
@Basic(optional = false)
@Column(name = "NAME_KO_KR", columnDefinition = "NVARCHAR2")
private String nameKoKr;
@Basic(optional = false)
@Column(name = "QUALITY_TYPE")
private int qualityType;
@Basic(optional = false)
@Column(name = "DEFAULT_VALUE")
private int defaultValue;
}
| [
"dolynhan15@gmail.com"
] | dolynhan15@gmail.com |
ef2ae21f41eb55097961a2b413957a77bc751c61 | 34443121adacb046be8376579146890ade2be4dc | /src/main/java/com/zwl/common/utils/BDException.java | 676534b970bd0748a6be306d276154acceda66b6 | [] | no_license | weiliangzhou/admin-boot | 45dd8b1886c3921098b5ee5dc0782058eaaa3f11 | 8a0c8c3a27b24932708d7428627c0c906b946c47 | refs/heads/master | 2020-04-18T21:13:02.982201 | 2019-01-27T05:48:06 | 2019-01-27T05:48:06 | 167,758,666 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 806 | java | package com.zwl.common.utils;
/**
* 自定义异常
*
*/
public class BDException extends RuntimeException {
private static final long serialVersionUID = 1L;
private String msg;
private int code = 500;
public BDException(String msg) {
super(msg);
this.msg = msg;
}
public BDException(String msg, Throwable e) {
super(msg, e);
this.msg = msg;
}
public BDException(String msg, int code) {
super(msg);
this.msg = msg;
this.code = code;
}
public BDException(String msg, int code, Throwable e) {
super(msg, e);
this.msg = msg;
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
}
| [
"382308664@qq.com"
] | 382308664@qq.com |
94cbf5f0082568bad1e853b1892a38012f36e142 | f38cc59518903e8ceef22f2153944279f0481134 | /rift_lib/src/rift_extractor/classgen/classes/_999541.java | 880938e743f86c4d4e7da8ef45745756ca548ccc | [] | no_license | imathrowback/riftools | 8de04a5efc906a1ecadf7913a9747091ef6706ec | a9c4021783c1b89c701fa227100260b359ae563d | refs/heads/master | 2023-03-31T10:45:49.780385 | 2023-03-24T07:46:59 | 2023-03-24T07:46:59 | 94,748,733 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 212 | java | package rift_extractor.classgen.classes;
import org.imathrowback.datparser.CObject;
import static rift_extractor.classgen.ClassUtils.*;
import rift_extractor.classgen.ClassUtils;
abstract public class _999541 {}
| [
"imathrowback@nowhere.com"
] | imathrowback@nowhere.com |
15680b73f751a0fe18d30b45573a10cc4cea7a44 | 629e42efa87f5539ff8731564a9cbf89190aad4a | /refactorInstances/eclipse.jdt.core/101/cloneInstance2.java | ec17d4c75802afb06b6600dcadd7a3a526fc2925 | [] | no_license | soniapku/CREC | a68d0b6b02ed4ef2b120fd0c768045424069e726 | 21d43dd760f453b148134bd526d71f00ad7d3b5e | refs/heads/master | 2020-03-23T04:28:06.058813 | 2018-08-17T13:17:08 | 2018-08-17T13:17:08 | 141,085,296 | 0 | 4 | null | null | null | null | UTF-8 | Java | false | false | 535 | java | public ReferenceBinding [] setSuperInterfaces(ReferenceBinding[] superInterfaces) {
this.superInterfaces = superInterfaces;
if ((this.tagBits & TagBits.HasAnnotatedVariants) != 0) {
TypeBinding [] annotatedTypes = this.environment.getAnnotatedTypes(this);
for (int i = 0, length = annotatedTypes == null ? 0 : annotatedTypes.length; i < length; i++) {
TypeVariableBinding annotatedType = (TypeVariableBinding) annotatedTypes[i];
annotatedType.superInterfaces = superInterfaces;
}
}
return superInterfaces;
}
| [
"sonia@pku.edu.cn"
] | sonia@pku.edu.cn |
d1e640cf192b4f61fe456ca59a84d2c7a849896f | 6dda5e16ebfba58d6208c5c8144499c100e9a481 | /swing/src/main/java/org/viewaframework/swing/binding/core/SelectionBinding.java | cfdbd4b4e5fff8897530e09dc537054ec0517fc7 | [] | no_license | mariogarcia/viewa | 7798ab745d8b99e5d0b8516ab973339fb08fa831 | c39f7f46dc39908bd23cd4ded0b60c5f555617b8 | refs/heads/master | 2020-12-24T13:17:32.964344 | 2014-11-03T22:27:23 | 2014-11-03T22:27:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 806 | java | package org.viewaframework.swing.binding.core;
/**
* @author Mario Garcia
*
* @param <SS>
* @param <SP>
* @param <TS>
* @param <TP>
*/
public interface SelectionBinding<SS,SP,TS,TP> extends Binding<SS>{
/**
* @return
*/
public BeanAdapter<SS> getSource();
/**
* @return
*/
public Property<SP> getSourceProperty();
/**
* @return
*/
public BeanAdapter<TS> getTarget();
/**
* @return
*/
public Property<TP> getTargetProperty();
/**
* @param source
*/
public void setSource(BeanAdapter<SS> source);
/**
* @param sourceProperty
*/
public void setSourceProperty(Property<SP> sourceProperty);
/**
* @param target
*/
public void setTarget(BeanAdapter<TS> target);
/**
* @param targetProperty
*/
public void setTargetProperty(Property<TP> targetProperty);
}
| [
"mario.ggar@gmail.com"
] | mario.ggar@gmail.com |
44fdfc586d5f0b43b34be7e35d71192f33ae740d | 8c2565b1d4f574fbf38cfcc8f7f3cbed368def44 | /wro4j-core/src/main/java/ro/isdc/wro/model/group/Group.java | 314e50f6a565e7261c604097b536eea639396d66 | [] | no_license | Filirom1/wro4j | 26c410cbb3f234d7678994de6528b0eb50ca0f09 | 7bd075599faaf724c72f9d9b2d27e2a8d858bba4 | refs/heads/master | 2021-01-25T02:28:57.901546 | 2011-08-01T20:04:53 | 2011-08-01T20:04:53 | 2,027,478 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,835 | java | /*
* Copyright (c) 2008. All rights reserved.
*/
package ro.isdc.wro.model.group;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.commons.lang.Validate;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ro.isdc.wro.model.resource.Resource;
import ro.isdc.wro.model.resource.ResourceType;
/**
* A group is an entity holding a list of resources.
*
* @author Alex Objelean
* @created Created on Oct 30, 2008
*/
public final class Group {
private static final Logger LOG = LoggerFactory.getLogger(Group.class);
/**
* Group name.
*/
private String name;
/**
* Resources of the group.
*/
private List<Resource> resources = new ArrayList<Resource>();
/**
* To be used by JSON serializer.
*/
public Group() {
}
/**
* Creates a group with a name.
*
* @param name
* of the group.
*/
public Group(final String name) {
Validate.notNull(name, "Group name cannot be null.");
this.name = name;
}
/**
* Check if the group has at least one resource of some type.
*
* @param resourceType type of the searched resource.
* @return true if at least one resource of some type exists.
*/
public final boolean hasResourcesOfType(final ResourceType resourceType) {
Validate.notNull(resourceType, "ResourceType cannot be null!");
for (final Resource resource : resources) {
if (resourceType.equals(resource.getType())) {
return true;
}
}
return false;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @return the readonly list of resources.
*/
public List<Resource> getResources() {
return Collections.unmodifiableList(resources);
}
/**
* Add a {@link Resource} to the collection of resources associated with this group.
*
* @param resource
* @return
*/
public Group addResource(final Resource resource) {
resources.add(resource);
return this;
}
/**
* This method will replace all earlier defined resources with the provided list of resources.
*
* @param resources
* the resources to set.
*/
public final void setResources(final List<Resource> resources) {
this.resources = resources;
}
/**
* Replace one resource with a list of other resources. The use case is related to wildcard exploder functionality,
* when resources containing wildcards are replaced with simple resources. The order of resources is preserved.
*
* @param resource
* to replace.
* @param explodedResources
* a list of resources to replace. If this list is empty, the result is similar to removing the resource from
* the group.
* @throws IllegalArgumentException
* when a missing resources is to be replaced.
*/
public void replace(final Resource resource, final List<Resource> explodedResources) {
LOG.debug("replace resource {} with exploded resources: {}", resource, explodedResources);
Validate.notNull(resource);
Validate.notNull(explodedResources);
boolean found = false;
final List<Resource> result = new ArrayList<Resource>();
for (final Resource resourceItem : resources) {
if (resourceItem.equals(resource)) {
found = true;
for (final Resource explodedResource : explodedResources) {
//preserve minimize flag.
explodedResource.setMinimize(resource.isMinimize());
}
result.addAll(explodedResources);
} else {
result.add(resourceItem);
}
}
//if no resources found, an invalid replace is performed
if (!found) {
throw new IllegalArgumentException("Cannot replace resource: " + resource + " for group: " + this
+ " because the resource is not a part of this group.");
}
//update resources with newly built list.
setResources(result);
}
/**
* {@inheritDoc}
*/
@Override
public boolean equals(final Object obj) {
// Because name is unique, we can consider two groups are equals if their name is the same
if (obj instanceof Group) {
final Group group = (Group)obj;
return getName().equals(group.getName());
}
return false;
}
/**
* {@inheritDoc}
*/
@Override
public int hashCode() {
return getName().hashCode();
}
/**
* {@inheritDoc}
*/
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
}
}
| [
"alex.objelean@gmail.com"
] | alex.objelean@gmail.com |
b5b3cdee103406a15c35e1d13015f09ea6a7c781 | a00326c0e2fc8944112589cd2ad638b278f058b9 | /src/main/java/000/136/276/CWE369_Divide_by_Zero__int_connect_tcp_divide_61a.java | 17326e58d64b63f8230e0fc674dfdefe0d56261b | [] | no_license | Lanhbao/Static-Testing-for-Juliet-Test-Suite | 6fd3f62713be7a084260eafa9ab221b1b9833be6 | b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68 | refs/heads/master | 2020-08-24T13:34:04.004149 | 2019-10-25T09:26:00 | 2019-10-25T09:26:00 | 216,822,684 | 0 | 1 | null | 2019-11-08T09:51:54 | 2019-10-22T13:37:13 | Java | UTF-8 | Java | false | false | 2,506 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE369_Divide_by_Zero__int_connect_tcp_divide_61a.java
Label Definition File: CWE369_Divide_by_Zero__int.label.xml
Template File: sources-sinks-61a.tmpl.java
*/
/*
* @description
* CWE: 369 Divide by zero
* BadSource: connect_tcp Read data using an outbound tcp connection
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: divide
* GoodSink: Check for zero before dividing
* BadSink : Dividing by a value that may be zero
* Flow Variant: 61 Data flow: data returned from one method to another in different classes in the same package
*
* */
public class CWE369_Divide_by_Zero__int_connect_tcp_divide_61a extends AbstractTestCase
{
public void bad() throws Throwable
{
int data = (new CWE369_Divide_by_Zero__int_connect_tcp_divide_61b()).badSource();
/* POTENTIAL FLAW: Zero denominator will cause an issue. An integer division will
result in an exception. */
IO.writeLine("bad: 100/" + data + " = " + (100 / data) + "\n");
}
public void good() throws Throwable
{
goodG2B();
goodB2G();
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
int data = (new CWE369_Divide_by_Zero__int_connect_tcp_divide_61b()).goodG2BSource();
/* POTENTIAL FLAW: Zero denominator will cause an issue. An integer division will
result in an exception. */
IO.writeLine("bad: 100/" + data + " = " + (100 / data) + "\n");
}
/* goodB2G() - use badsource and goodsink */
private void goodB2G() throws Throwable
{
int data = (new CWE369_Divide_by_Zero__int_connect_tcp_divide_61b()).goodB2GSource();
/* FIX: test for a zero denominator */
if (data != 0)
{
IO.writeLine("100/" + data + " = " + (100 / data) + "\n");
}
else
{
IO.writeLine("This would result in a divide by zero");
}
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
| [
"anhtluet12@gmail.com"
] | anhtluet12@gmail.com |
6ff1829661e5fb1b765f1fa0ba0186158eac3a39 | c26304a54824faa7c1b34bb7882ee7a335a8e7fb | /flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/inference/strategies/DecimalTimesTypeStrategy.java | d74413e0fb2e7b6f3b58ae64021397f4835c8057 | [
"BSD-3-Clause",
"OFL-1.1",
"ISC",
"MIT",
"Apache-2.0"
] | permissive | apache/flink | 905e0709de6389fc9212a7c48a82669706c70b4a | fbef3c22757a2352145599487beb84e02aaeb389 | refs/heads/master | 2023-09-04T08:11:07.253750 | 2023-09-04T01:33:25 | 2023-09-04T01:33:25 | 20,587,599 | 23,573 | 14,781 | Apache-2.0 | 2023-09-14T21:49:04 | 2014-06-07T07:00:10 | Java | UTF-8 | Java | false | false | 3,052 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.table.types.inference.strategies;
import org.apache.flink.annotation.Internal;
import org.apache.flink.table.types.DataType;
import org.apache.flink.table.types.inference.CallContext;
import org.apache.flink.table.types.inference.TypeStrategy;
import org.apache.flink.table.types.logical.DecimalType;
import org.apache.flink.table.types.logical.LegacyTypeInformationType;
import org.apache.flink.table.types.logical.LogicalType;
import org.apache.flink.table.types.logical.utils.LogicalTypeMerging;
import java.util.List;
import java.util.Optional;
import static org.apache.flink.table.types.inference.strategies.StrategyUtils.isDecimalComputation;
import static org.apache.flink.table.types.logical.utils.LogicalTypeChecks.getPrecision;
import static org.apache.flink.table.types.logical.utils.LogicalTypeChecks.getScale;
import static org.apache.flink.table.types.utils.TypeConversions.fromLogicalToDataType;
/**
* Type strategy that returns the product of an exact numeric multiplication that includes at least
* one decimal.
*/
@Internal
class DecimalTimesTypeStrategy implements TypeStrategy {
@Override
public Optional<DataType> inferType(CallContext callContext) {
final List<DataType> argumentDataTypes = callContext.getArgumentDataTypes();
final LogicalType factor1 = argumentDataTypes.get(0).getLogicalType();
final LogicalType factor2 = argumentDataTypes.get(1).getLogicalType();
// a hack to make legacy types possible until we drop them
if (factor1 instanceof LegacyTypeInformationType) {
return Optional.of(argumentDataTypes.get(0));
}
if (factor2 instanceof LegacyTypeInformationType) {
return Optional.of(argumentDataTypes.get(1));
}
if (!isDecimalComputation(factor1, factor2)) {
return Optional.empty();
}
final DecimalType decimalType =
LogicalTypeMerging.findMultiplicationDecimalType(
getPrecision(factor1),
getScale(factor1),
getPrecision(factor2),
getScale(factor2));
return Optional.of(fromLogicalToDataType(decimalType));
}
}
| [
"twalthr@apache.org"
] | twalthr@apache.org |
c34ec82182dc066dc46587bab2c31d0620b13f6b | 01b23223426a1eb84d4f875e1a6f76857d5e8cd9 | /icefaces/scratchpads/patches/ICE-5971/core/src/com/icesoft/faces/webapp/http/core/ReceivePing.java | 0d9ea9b9a002c7aba24859227dab7f5bf96e6ece | [] | no_license | numbnet/icesoft | 8416ac7e5501d45791a8cd7806c2ae17305cdbb9 | 2f7106b27a2b3109d73faf85d873ad922774aeae | refs/heads/master | 2021-01-11T04:56:52.145182 | 2016-11-04T16:43:45 | 2016-11-04T16:43:45 | 72,894,498 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,605 | java | /*
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* "The contents of this file are subject to the Mozilla Public License
* Version 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations under
* the License.
*
* The Original Code is ICEfaces 1.5 open source software code, released
* November 5, 2006. The Initial Developer of the Original Code is ICEsoft
* Technologies Canada, Corp. Portions created by ICEsoft are Copyright (C)
* 2004-2010 ICEsoft Technologies Canada, Corp. All Rights Reserved.
*
* Contributor(s): _____________________.
*
* Alternatively, the contents of this file may be used under the terms of
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"
* License), in which case the provisions of the LGPL License are
* applicable instead of those above. If you wish to allow use of your
* version of this file only under the terms of the LGPL License and not to
* allow others to use your version of this file under the MPL, indicate
* your decision by deleting the provisions above and replace them with
* the notice and other provisions required by the LGPL License. If you do
* not delete the provisions above, a recipient may use your version of
* this file under either the MPL or the LGPL License."
*/
package com.icesoft.faces.webapp.http.core;
import com.icesoft.faces.webapp.command.CommandQueue;
import com.icesoft.faces.webapp.command.Pong;
import com.icesoft.faces.webapp.http.common.Request;
import com.icesoft.faces.webapp.http.common.Response;
import com.icesoft.faces.webapp.http.common.ResponseHandler;
import com.icesoft.faces.webapp.http.common.Server;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import java.util.Map;
public class ReceivePing implements Server {
private static final Log LOG = LogFactory.getLog(ReceivePing.class);
private static final Pong PONG = new Pong();
private static final ResponseHandler CLOSE_RESPONSE = new ResponseHandler() {
public void respond(Response response) throws Exception {
//let the bridge know that this blocking connection should not be re-initialized
response.setHeader("X-Connection", "close");
response.setHeader("Content-Length", 0);
}
};
private Map commandQueues;
private PageTest pageTest;
public ReceivePing(final Map commandQueues, final PageTest pageTest) {
this.commandQueues = commandQueues;
this.pageTest = pageTest;
}
public void service(final Request request) throws Exception {
if (!pageTest.isLoaded()) {
request.respondWith(new ReloadResponse(""));
} else {
String viewIdentifier = request.getParameter("ice.view");
if (ViewIdVerifier.isValid(viewIdentifier)) {
CommandQueue queue = (CommandQueue) commandQueues.get(viewIdentifier);
if (queue != null) {
queue.put(PONG);
} else {
if (LOG.isWarnEnabled()) {
LOG.warn("could not get a valid queue for " + viewIdentifier);
}
}
}
request.respondWith(NOOPResponse.Handler);
}
}
public void shutdown() {
}
}
| [
"ted.goddard@8668f098-c06c-11db-ba21-f49e70c34f74"
] | ted.goddard@8668f098-c06c-11db-ba21-f49e70c34f74 |
b203d36aaec07d9db9deb318d99bd1b72975da12 | 4e3c5dc1cfd033b0e7c1bea625f9ee64ae12871a | /org/cocos2dx/utils/PSJNIHelper.java | 910903eac27e276f5dbbfb35b5108a4afda82182 | [] | no_license | haphan2014/idle_heroes | ced0f6301b7a618e470ebfa722bef3d4becdb6ba | 5bcc66f8e26bf9273a2a8da2913c27a133b7d60a | refs/heads/master | 2021-01-20T05:01:54.157508 | 2017-08-25T14:06:51 | 2017-08-25T14:06:51 | 101,409,563 | 1 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,223 | java | package org.cocos2dx.utils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Vector;
public class PSJNIHelper {
static ArrayList<String> mArrayList = null;
static HashMap<String, String> mHashMap = null;
static Vector<String> mVector = null;
public static void createHashMap() {
mHashMap = new HashMap();
}
public static HashMap<String, String> getHashMap() {
return mHashMap;
}
public static void pushHashMapElement(String key, String value) {
if (mHashMap != null) {
mHashMap.put(key, value);
}
}
public static void createVector() {
mVector = new Vector();
}
public static Vector<String> getVector() {
return mVector;
}
public static void pushVectorElement(String value) {
if (mVector != null) {
mVector.add(value);
}
}
public static void createArrayList() {
mArrayList = new ArrayList();
}
public static ArrayList<String> getArrayList() {
return mArrayList;
}
public static void pushArrayListElement(String value) {
if (mArrayList != null) {
mArrayList.add(value);
}
}
}
| [
"hien.bui@vietis.com.vn"
] | hien.bui@vietis.com.vn |
c5fad2e645979f1409bfa249ea4bb1ac58b9f468 | bf9a38484a3bc255be1d31f24612cbc5d563a7fa | /src/main/java/sn/diagne/gestionboutique/config/audit/AuditEventConverter.java | 205b601a4349a56b78204c48b521153be3fe225e | [] | no_license | Faaline/ApplicationDeGestionBoutique | 2bf6e54de6b0de50e25f7133846032e86c4ca541 | eb22578dc8f6fff23fa72560f3e9a6f0442419d7 | refs/heads/main | 2023-03-12T10:56:18.251549 | 2021-03-05T19:09:00 | 2021-03-05T19:09:00 | 344,908,574 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,341 | java | package sn.diagne.gestionboutique.config.audit;
import java.util.*;
import org.springframework.boot.actuate.audit.AuditEvent;
import org.springframework.security.web.authentication.WebAuthenticationDetails;
import org.springframework.stereotype.Component;
import sn.diagne.gestionboutique.domain.PersistentAuditEvent;
@Component
public class AuditEventConverter {
/**
* Convert a list of {@link PersistentAuditEvent}s to a list of {@link AuditEvent}s.
*
* @param persistentAuditEvents the list to convert.
* @return the converted list.
*/
public List<AuditEvent> convertToAuditEvent(Iterable<PersistentAuditEvent> persistentAuditEvents) {
if (persistentAuditEvents == null) {
return Collections.emptyList();
}
List<AuditEvent> auditEvents = new ArrayList<>();
for (PersistentAuditEvent persistentAuditEvent : persistentAuditEvents) {
auditEvents.add(convertToAuditEvent(persistentAuditEvent));
}
return auditEvents;
}
/**
* Convert a {@link PersistentAuditEvent} to an {@link AuditEvent}.
*
* @param persistentAuditEvent the event to convert.
* @return the converted list.
*/
public AuditEvent convertToAuditEvent(PersistentAuditEvent persistentAuditEvent) {
if (persistentAuditEvent == null) {
return null;
}
return new AuditEvent(
persistentAuditEvent.getAuditEventDate(),
persistentAuditEvent.getPrincipal(),
persistentAuditEvent.getAuditEventType(),
convertDataToObjects(persistentAuditEvent.getData())
);
}
/**
* Internal conversion. This is needed to support the current SpringBoot actuator {@code AuditEventRepository} interface.
*
* @param data the data to convert.
* @return a map of {@link String}, {@link Object}.
*/
public Map<String, Object> convertDataToObjects(Map<String, String> data) {
Map<String, Object> results = new HashMap<>();
if (data != null) {
for (Map.Entry<String, String> entry : data.entrySet()) {
results.put(entry.getKey(), entry.getValue());
}
}
return results;
}
/**
* Internal conversion. This method will allow to save additional data.
* By default, it will save the object as string.
*
* @param data the data to convert.
* @return a map of {@link String}, {@link String}.
*/
public Map<String, String> convertDataToStrings(Map<String, Object> data) {
Map<String, String> results = new HashMap<>();
if (data != null) {
for (Map.Entry<String, Object> entry : data.entrySet()) {
// Extract the data that will be saved.
if (entry.getValue() instanceof WebAuthenticationDetails) {
WebAuthenticationDetails authenticationDetails = (WebAuthenticationDetails) entry.getValue();
results.put("remoteAddress", authenticationDetails.getRemoteAddress());
results.put("sessionId", authenticationDetails.getSessionId());
} else {
results.put(entry.getKey(), Objects.toString(entry.getValue()));
}
}
}
return results;
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
d440e8ec684479bbcfee31726eb95fca4c7031f5 | 7b8056f4f92f3c53c0a55ba68309c11abb6c08e1 | /src/main/java/com/chucknorris/chucknorris/service/mail/EmailPreparation.java | 235fe237eca323e959901baf763b86a8225845e0 | [] | no_license | radoslaw-lazur/radoslaw-lazur-chuck-norris | 3f08e472e4951cb94eea4e164fb00acaa285436a | b64aff54871741229a8d507644c466d4e2459ec3 | refs/heads/master | 2022-04-22T17:22:45.919512 | 2020-04-13T14:44:48 | 2020-04-13T14:44:48 | 255,343,590 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,075 | java | package com.chucknorris.chucknorris.service.mail;
import com.chucknorris.chucknorris.domain.Mail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.javamail.MimeMessageHelper;
import org.springframework.mail.javamail.MimeMessagePreparator;
import org.springframework.stereotype.Service;
@Service
public class EmailPreparation {
private MailCreatorService mailCreatorService;
@Autowired
public EmailPreparation(MailCreatorService mailCreatorService) {
this.mailCreatorService = mailCreatorService;
}
public MimeMessagePreparator createMimeMessageJoke(final Mail mail) {
return mimeMessage -> {
MimeMessageHelper messageHelper = new MimeMessageHelper(mimeMessage);
messageHelper.setTo(mail.getMailTo());
messageHelper.setSubject(mail.getSubject());
messageHelper.setText(mail.getMessage(), true);
};
}
public String prepareJokeMail(final Mail mail) {
return mailCreatorService.buildJokeMail(mail.getMessage());
}
}
| [
"radoslaw.lazur@gmail.com"
] | radoslaw.lazur@gmail.com |
8f0b9e85f88daa80713c9cbf7d82422872b79098 | ed127c198e3a1d714668bdf61f2c1904d21888ff | /src/actions/Test4.java | 7f0471e08d207284dafe2fd4c97b49ec98a40a5d | [] | no_license | javaandselenium/SeleniumWeekendOff | 05f7e94fb4d2494859b6004d7ec565790a4a05ec | 6bd4162e68a806289bae622b5221e678297e326e | refs/heads/master | 2023-03-17T13:35:37.114789 | 2021-03-14T05:56:28 | 2021-03-14T05:56:28 | 343,053,792 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 888 | java | package actions;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.interactions.Actions;
public class Test4 {
public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.chrome.driver", "./software/chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.manage().window().maximize();
driver.get("https://jqueryui.com/slider/");
driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
driver.switchTo().frame(0);
WebElement ele = driver.findElement(By.id("slider"));
Actions a=new Actions(driver);
a.dragAndDropBy(ele,100,0).perform();
Thread.sleep(3000);
a.dragAndDropBy(ele,-100,0).perform();
}
}
| [
"QSP@DESKTOP-EVK9GMC"
] | QSP@DESKTOP-EVK9GMC |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.