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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a6a4372313c16932eb88fcbcff65b5d46abeb86d | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/39/org/apache/commons/math/ode/nonstiff/AdamsNordsieckTransformer_buildP_223.java | 704c1f3c203d439d63c75d7e0b8364113f7583ac | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 2,217 | java |
org apach common math od nonstiff
transform nordsieck vector adam integr
link adam bashforth integr adamsbashforthintegr adam bashforth
link adam moulton integr adamsmoultonintegr adam moulton integr convert
classic represent previou deriv nordsieck
represent higher order scale deriv
defin scale deriv step
pre
deriv
y'' deriv
y''' deriv
deriv
pre
previou definit classic represent multistep method
deriv handl
defin
pre
pre
omit index notat clariti
represent nordsieck vector
higher degre scale deriv step handl
defin
pre
pre
omit index notat clariti
taylor seri formula show index offset
comput formula exact
degre polynomi
pre
sum
pre
previou formula valu comput transform
classic represent nordsieck vector step end transform
result taylor seri formula
pre
pre
vector time matrix built
term
pre
pre
chang formula comput similar transform
classic represent nordsieck vector step start result matrix simpli
absolut matrix
link adam bashforth integr adamsbashforthintegr adam bashforth method nordsieck vector
step comput nordsieck vector step
row shift matrix lower left part ident matrix
pre
pre
link adam moulton integr adamsmoultonintegr adam moulton method predict nordsieck vector
step comput nordsieck vector step
predict vector correct vector comput
plusmn
upper repres
predict state lower
repres correct state
observ method similar updat formula case
vector matrix depend state
depend handl transform
version
adam nordsieck transform adamsnordsiecktransform
build matrix
matrix gener term shift term
pre
pre
param step nstep number step multistep method
exclud comput
matrix
field matrix fieldmatrix big fraction bigfract build buildp step nstep
big fraction bigfract data pdata big fraction bigfract step nstep step nstep
data pdata length
build matrix element taylor seri formula
big fraction bigfract data pdata
factor
factor
length
big fraction bigfract
factor
array2 row field matrix array2drowfieldmatrix big fraction bigfract data pdata
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
895ad9a83f77d3a4e5700bf54b52c74ee1e0bd36 | b7f3edb5b7c62174bed808079c3b21fb9ea51d52 | /chromecast/base/java/src/org/chromium/chromecast/base/Observers.java | 88b284aaabe0ce52a16ac8c3ce4abd737bf8cb25 | [
"BSD-3-Clause"
] | permissive | otcshare/chromium-src | 26a7372773b53b236784c51677c566dc0ad839e4 | 64bee65c921db7e78e25d08f1e98da2668b57be5 | refs/heads/webml | 2023-03-21T03:20:15.377034 | 2020-11-16T01:40:14 | 2020-11-16T01:40:14 | 209,262,645 | 18 | 21 | BSD-3-Clause | 2023-03-23T06:20:07 | 2019-09-18T08:52:07 | null | UTF-8 | Java | false | false | 1,954 | java | // Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chromecast.base;
import org.chromium.base.Consumer;
/**
* Helper functions for creating Observers, used by Observable.subscribe() to handle state changes.
*/
public final class Observers {
// Uninstantiable.
private Observers() {}
/**
* Shorthand for making a Observer that only has side effects on activation.
*
* @param <T> The type of the activation data.
*/
public static <T> Observer<T> onEnter(Consumer<? super T> consumer) {
return (T value) -> {
consumer.accept(value);
return Scopes.NO_OP;
};
}
/**
* Shorthand for making a Observer that only has side effects on deactivation.
*
* @param <T> The type of the activation data.
*/
public static <T> Observer<T> onExit(Consumer<? super T> consumer) {
return (T value) -> () -> consumer.accept(value);
}
/**
* Adapts a Observer-like function that takes two arguments into a true Observer that
* takes a Both object.
*
* @param <A> The type of the first argument (and the first item in the Both).
* @param <B> The type of the second argument (and the second item in the Both).
*
* For example, one can refactor the following:
*
* observableA.and(observableB).subscribe((Both<A, B> data) -> {
* A a = data.first;
* B b = data.second;
* ...
* });
*
* ... into this:
*
* observableA.and(observableB).subscribe(Observers.both((A a, B b) -> ...));
*/
public static <A, B> Observer<Both<A, B>> both(
BiFunction<? super A, ? super B, ? extends Scope> function) {
return (Both<A, B> data) -> function.apply(data.first, data.second);
}
}
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
c460779bab355b5c11d7a290efae2a2ae4716c76 | 12a99ab3fe76e5c7c05609c0e76d1855bd051bbb | /src/main/java/com/alipay/api/domain/KoubeiRetailWmsOutboundorderCreateModel.java | f33ba63fa01cfd4d56e64655c73c2682ce147892 | [
"Apache-2.0"
] | permissive | WindLee05-17/alipay-sdk-java-all | ce2415cfab2416d2e0ae67c625b6a000231a8cfc | 19ccb203268316b346ead9c36ff8aa5f1eac6c77 | refs/heads/master | 2022-11-30T18:42:42.077288 | 2020-08-17T05:57:47 | 2020-08-17T05:57:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,403 | java | package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 创建出库通知单
*
* @author auto create
* @since 1.0, 2018-06-01 17:19:09
*/
public class KoubeiRetailWmsOutboundorderCreateModel extends AlipayObject {
private static final long serialVersionUID = 1451426523413528854L;
/**
* 操作人信息
*/
@ApiField("operate_context")
private OperateContext operateContext;
/**
* 出库通知单货品明细列表
*/
@ApiListField("order_lines")
@ApiField("outbound_order_line")
private List<OutboundOrderLine> orderLines;
/**
* 出库通知单主体
*/
@ApiField("outbound_order")
private OutboundOrder outboundOrder;
public OperateContext getOperateContext() {
return this.operateContext;
}
public void setOperateContext(OperateContext operateContext) {
this.operateContext = operateContext;
}
public List<OutboundOrderLine> getOrderLines() {
return this.orderLines;
}
public void setOrderLines(List<OutboundOrderLine> orderLines) {
this.orderLines = orderLines;
}
public OutboundOrder getOutboundOrder() {
return this.outboundOrder;
}
public void setOutboundOrder(OutboundOrder outboundOrder) {
this.outboundOrder = outboundOrder;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
4ee739de4a4936666876a21b063ce800d171fa6e | 41738bbc29db248db606efe6e5dac01dbcfd7bb2 | /unit-tests/src/test/java/com/gs/collections/impl/lazy/iterator/SelectInstancesOfIteratorTest.java | 8f0178520b8a8afc9f72a21824188de83a914fb0 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | cnxtech/gs-collections | d27d7d28c45ba50e4a6a90e821315da9bf5e810d | fa8bf3e103689efa18bca2ab70203e71cde34b52 | refs/heads/master | 2022-05-22T07:44:42.234768 | 2016-02-19T17:18:59 | 2016-02-19T17:18:59 | 189,935,865 | 0 | 0 | Apache-2.0 | 2022-05-01T14:23:59 | 2019-06-03T04:46:55 | Java | UTF-8 | Java | false | false | 2,030 | java | /*
* Copyright 2014 Goldman Sachs.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gs.collections.impl.lazy.iterator;
import java.util.Iterator;
import java.util.NoSuchElementException;
import com.gs.collections.api.list.MutableList;
import com.gs.collections.impl.factory.Lists;
import com.gs.collections.impl.list.mutable.FastList;
import com.gs.collections.impl.test.Verify;
import org.junit.Assert;
import org.junit.Test;
public class SelectInstancesOfIteratorTest
{
@Test
public void iterator()
{
MutableList<Number> list = FastList.<Number>newListWith(null, 1, 2.0, null, 3, 4.0, 5, null);
this.assertElements(new SelectInstancesOfIterator<>(list.iterator(), Integer.class));
this.assertElements(new SelectInstancesOfIterator<>(list, Integer.class));
}
private void assertElements(Iterator<Integer> iterator)
{
MutableList<Integer> result = FastList.newList();
while (iterator.hasNext())
{
result.add(iterator.next());
}
Assert.assertEquals(FastList.newListWith(1, 3, 5), result);
}
@Test
public void noSuchElementException()
{
Verify.assertThrows(NoSuchElementException.class, () -> new SelectInstancesOfIterator<>(Lists.fixedSize.of(), Object.class).next());
}
@Test
public void remove()
{
Verify.assertThrows(UnsupportedOperationException.class, () -> new SelectInstancesOfIterator<>(Lists.fixedSize.of(), Object.class).remove());
}
}
| [
"craig.motlin@gs.com"
] | craig.motlin@gs.com |
51a9490285859196d9537e57eef17db2d6d67dfa | 6084786270f0e71dfd73e6e842d1e26b70a5a292 | /mall_zuul/src/main/java/com/djk/filter/AuthorityFilter.java | b309a94c7c04750f170d31739560ba694fe8130e | [
"Apache-2.0"
] | permissive | sunsure369/mall | 25e294bee78a04386547877e2a052a23428f28e6 | 52831db9170bf62863efe70a722823a9f5b81642 | refs/heads/master | 2020-03-24T23:06:10.967530 | 2018-07-31T13:48:49 | 2018-07-31T13:48:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,163 | java | package com.djk.filter;
import com.djk.TokenContextHandler;
import com.djk.authority.Authority;
import com.djk.authority.AuthorityRibbon;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import com.netflix.zuul.exception.ZuulException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* Created by dujinkai on 2018/7/11.
* 权限过滤器
*/
@Slf4j
@Component
public class AuthorityFilter extends ZuulFilter {
/**
* 忽略的url
*/
@Value("${ignore.authUrls}")
private String ignoreUrls;
/**
* 注入权限接口服务
*/
@Autowired
private AuthorityRibbon authorityRibbon;
@Override
public Object run() throws ZuulException {
RequestContext ctx = RequestContext.getCurrentContext();
HttpServletRequest request = ctx.getRequest();
// 判断是否需要过滤 不需要过滤 直接放通
if (!isNeedFilter(request.getRequestURI())) {
ctx.setSendZuulResponse(true);
return null;
}
// 没有权限 则直接返回
if (!hasAuthority(request.getRequestURI(), authorityRibbon.queryManagerAuthority(), request.getMethod())) {
log.error("you has no authority and uri:" + request.getRequestURI());
ctx.setResponseStatusCode(468);
ctx.setSendZuulResponse(false);
try {
ctx.getResponse().getWriter().write("you has no authority...");
ctx.getResponse().getWriter().close();
} catch (Exception e) {
log.error("fail...", e);
}
TokenContextHandler.remove();
return null;
}
TokenContextHandler.remove();
return null;
}
/**
* 判断是否需要过滤
*
* @param uri 请求的地址
* @return 需要过滤返回true 不需要过滤返回false
*/
private boolean isNeedFilter(String uri) {
log.debug("isNeedFilter and uri:{} \r\n ignoreUrls:{} ", uri, ignoreUrls);
// 没有忽略的url 直接返回
if (StringUtils.isEmpty(ignoreUrls)) {
log.info("ignoreUrls is empty....");
return true;
}
return !Stream.of(ignoreUrls.split(",")).filter(ignoreUrl -> uri.contains(ignoreUrl)).findAny().isPresent();
}
/**
* 判断是否有权限
*
* @param url 用户访问的url
* @param authorities 权限信息
* @param action 动作
* @return 有权限返回true 没有权限返回false
*/
private boolean hasAuthority(String url, Authority[] authorities, String action) {
if (ArrayUtils.isEmpty(authorities)) {
return false;
}
List a = Stream.of(authorities).filter(authority1 -> !StringUtils.isEmpty(authority1.getUrl())).collect(Collectors.toList());
// 匹配出所有满足的url
List<Authority> authorityList = Stream.of(authorities).filter(authority1 -> !StringUtils.isEmpty(authority1.getUrl())).filter(authority -> url.indexOf(authority.getUrl()) != -1).collect(Collectors.toList());
if (CollectionUtils.isEmpty(authorityList)) {
return false;
}
// 在满足的url上面匹配action (restful请求可能同一个url 但是method不同)
return !CollectionUtils.isEmpty(authorityList.stream().filter(authority -> action.equalsIgnoreCase(authority.getAction())).collect(Collectors.toList()));
}
@Override
public String filterType() {
return "pre";
}
@Override
public int filterOrder() {
return 2;
}
@Override
public boolean shouldFilter() {
return true;
}
}
| [
"admin@example.com"
] | admin@example.com |
62a33b8af53b7e6017c1201fec2df9153088a489 | ac3503b2d0c6e0706199b9a454933d09649583b6 | /src/main/java/com/husen/mall2/service/impl/LogisticsServiceImpl.java | 7b3d957761395f200d36f291ed132ee37e3f4156 | [] | no_license | IsSenHu/mall2 | bf65729ae401e45110410b57485e6813da9198bf | a378ef4ba706092bdd6735ca47a122990643b04f | refs/heads/master | 2020-03-18T16:21:03.172504 | 2018-05-26T12:51:52 | 2018-05-26T12:51:52 | 134,960,947 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,987 | java | package com.husen.mall2.service.impl;
import com.husen.mall2.model.*;
import com.husen.mall2.repository.LogisticsRecordRepository;
import com.husen.mall2.repository.OrderRepository;
import com.husen.mall2.service.LogisticsService;
import com.husen.mall2.vo.LogisticsVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
/**
* @author husen
*/
@Service
@Transactional
public class LogisticsServiceImpl implements LogisticsService {
private final static Logger LOGGER = LoggerFactory.getLogger(LogisticsServiceImpl.class);
@Autowired
private OrderRepository orderRepository;
@Autowired
private LogisticsRecordRepository logisticsRecordRepository;
@Override
public LogisticsVO logistics(Integer orderIdInt) {
Order order = orderRepository.findById(orderIdInt).get();
Logistics logistics = order.getLogistics();
LOGGER.info("查询到的物流信息为:{}", logistics);
LogisticsCompany company = logistics.getCompany();
Sort.Order sortOrder = new Sort.Order(Sort.Direction.DESC, "time");
Sort sort = new Sort(sortOrder);
List<LogisticsRecord> records = logisticsRecordRepository.findAllByLogistics_Id(logistics.getId(), sort);
List<String> notes = new ArrayList<>();
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
records.stream().forEach(x -> {
notes.add(simpleDateFormat.format(x.getTime()) + " " + x.getContent());
});
LogisticsVO vo = new LogisticsVO(logistics.getId(), company.getName(), logistics.getExpressNumber(), notes, company.getPhone(), logistics.getStatu());
return vo;
}
}
| [
"1178515826@qq.com"
] | 1178515826@qq.com |
36c723c789235c4480352bf12eaa1fb47650ebe8 | 596c7846eabd6e8ebb83eab6b83d6cd0801f5124 | /example-001-disruptor/example-001-disruptor-02-netty/src/main/java/com/github/bjlhx15/disruptor/demo/base/server/MessageConsumerImpl4Server.java | 0698bfe0e1621be7e80bfd3362bcbfba06b3da97 | [] | no_license | zzw0598/common | c219c53202cdb5e74a7c76d18f90e18eca983752 | 76abfb43c93da4090bbb8861d27bbcb990735b80 | refs/heads/master | 2023-03-10T02:30:44.310940 | 2021-02-19T07:59:16 | 2021-02-19T07:59:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,186 | java | package com.github.bjlhx15.disruptor.demo.base.server;
import com.github.bjlhx15.disruptor.demo.base.MessageConsumer;
import com.github.bjlhx15.disruptor.demo.base.TranslatorData;
import com.github.bjlhx15.disruptor.demo.base.TranslatorDataWapper;
import io.netty.channel.ChannelHandlerContext;
public class MessageConsumerImpl4Server extends MessageConsumer {
public MessageConsumerImpl4Server(String consumerId) {
super(consumerId);
}
@Override
public void onEvent(TranslatorDataWapper event) throws Exception {
TranslatorData request = event.getData();
ChannelHandlerContext ctx = event.getCtx();
//1.业务处理逻辑:
System.err.println("Sever端: id= " + request.getId()
+ ", name= " + request.getName()
+ ", message= " + request.getMessage());
//2.回送响应信息:
TranslatorData response = new TranslatorData();
response.setId("resp: " + request.getId());
response.setName("resp: " + request.getName());
response.setMessage("resp: " + request.getMessage());
//写出response响应信息:
ctx.writeAndFlush(response);
}
}
| [
"lihongxu6@jd.com"
] | lihongxu6@jd.com |
9af6b8392bead3c81d6736c0dab8f4c552bded25 | 4b40d85cb2f1a4bfc688d4cdf84736c222f73783 | /core/src/main/java/com/cv4j/netdiscovery/core/utils/BooleanUtils.java | 26222265abd96b463b365f11e7606f3a08feb6d1 | [
"Apache-2.0"
] | permissive | hhy5277/NetDiscovery | 6af7f3cdd8ebf13a02a4ebb0d0112cb68ec5c13b | 910b0c7f6889ab383304d03dd7960508d8c27998 | refs/heads/master | 2020-05-17T18:01:12.540262 | 2019-04-27T06:15:40 | 2019-04-27T06:15:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,082 | java | package com.cv4j.netdiscovery.core.utils;
import com.safframework.tony.common.utils.Preconditions;
/**
* Created by tony on 2019-01-17.
*/
public class BooleanUtils {
public static boolean toBoolean(final Boolean bool) {
return bool != null && bool.booleanValue();
}
public static boolean toBoolean(final String str) {
if (Preconditions.isNotBlank(str) && (str.equals("true")||str.equals("TRUE"))) {
return Boolean.TRUE;
}
return false;
}
public static boolean toBoolean(final String str,boolean defaultValue) {
if (Preconditions.isNotBlank(str)) {
if (str.equals("true")||str.equals("TRUE")) {
return Boolean.TRUE;
} else if (str.equals("false")||str.equals("FALSE")){
return Boolean.TRUE;
} else {
return defaultValue;
}
} else {
return defaultValue;
}
}
public static boolean isTrue(final Boolean bool) {
return Boolean.TRUE.equals(bool);
}
}
| [
"fengzhizi715@126.com"
] | fengzhizi715@126.com |
92e7713dda443c9172319ff1bfd005b6adab72eb | 92130273d2e7aeee0652e068d05c01dc96e2157c | /app/src/main/java/com/hr/videosplayertv/net/Service/UserService.java | 1748b212ce05b28a64628b6b82e2a140fd4b620f | [] | no_license | qlmgg/VideosPlayerTv | 671eed562a109ff178dabc1211fa4df907db66b0 | 05d7e67d2b912a67057ef6495bb7fd00d9de988d | refs/heads/master | 2020-05-17T18:05:03.074546 | 2018-08-10T02:41:52 | 2018-08-10T02:41:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,535 | java | package com.hr.videosplayertv.net.Service;
import com.hr.videosplayertv.net.base.BaseDataResponse;
import com.hr.videosplayertv.net.base.BaseResponse;
import com.hr.videosplayertv.net.entry.response.GetUserInfo;
import com.hr.videosplayertv.net.entry.response.InfoToken;
import com.hr.videosplayertv.net.entry.response.UserInfo;
import java.util.List;
import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.Response;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;
/**
* 用户服务
*/
public interface UserService {
//每个机顶盒内置一个加密的用户帐号,开启APP时,携带此加密账号登录,返回访问服务接口的token
@Headers({"Content-Type: application/json","Accept: application/json"})
@POST("User/UserAutoLogin")
Observable<Response<BaseResponse<InfoToken>>>
userAutoLogin(@Body RequestBody route);
//获取用户信息,传入登录时获取的token,及影院id(固定为1)
@Headers({"Content-Type: application/json","Accept: application/json"})
@POST("User/Validate")
Observable<Response<BaseResponse<BaseDataResponse<UserInfo>>>>
validate(@Body RequestBody route);
//获取用户的基本信息,用于用户中心的显示
@Headers({"Content-Type: application/json","Accept: application/json"})
@POST("User/GetUserInfo")
Observable<Response<BaseResponse<BaseDataResponse<GetUserInfo>>>>
GetUserInfo(@Body RequestBody route);
}
| [
"18203887023@163.com"
] | 18203887023@163.com |
f99d4ee5044f9cc73a9c4ac4df3627f40807b826 | ee461488c62d86f729eda976b421ac75a964114c | /trunk/flash/src/main/java/org/w3c/flex/forks/dom/svg/SVGPreserveAspectRatio.java | 358413863bc1820ecffee163aa6c9f4a9f38ffd5 | [] | no_license | svn2github/htmlunit | 2c56f7abbd412e6d9e0efd0934fcd1277090af74 | 6fc1a7d70c08fb50fef1800673671fd9cada4899 | refs/heads/master | 2023-09-03T10:35:41.987099 | 2015-07-26T13:12:45 | 2015-07-26T13:12:45 | 37,107,064 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,110 | 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.w3c.flex.forks.dom.svg;
import org.w3c.dom.DOMException;
public interface SVGPreserveAspectRatio {
// Alignment Types
public static final short SVG_PRESERVEASPECTRATIO_UNKNOWN = 0;
public static final short SVG_PRESERVEASPECTRATIO_NONE = 1;
public static final short SVG_PRESERVEASPECTRATIO_XMINYMIN = 2;
public static final short SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3;
public static final short SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4;
public static final short SVG_PRESERVEASPECTRATIO_XMINYMID = 5;
public static final short SVG_PRESERVEASPECTRATIO_XMIDYMID = 6;
public static final short SVG_PRESERVEASPECTRATIO_XMAXYMID = 7;
public static final short SVG_PRESERVEASPECTRATIO_XMINYMAX = 8;
public static final short SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9;
public static final short SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10;
// Meet-or-slice Types
public static final short SVG_MEETORSLICE_UNKNOWN = 0;
public static final short SVG_MEETORSLICE_MEET = 1;
public static final short SVG_MEETORSLICE_SLICE = 2;
public short getAlign( );
public void setAlign( short align )
throws DOMException;
public short getMeetOrSlice( );
public void setMeetOrSlice( short meetOrSlice )
throws DOMException;
}
| [
"asashour@5f5364db-9458-4db8-a492-e30667be6df6"
] | asashour@5f5364db-9458-4db8-a492-e30667be6df6 |
99049bfc30a3786269ff5225670026ec938abf66 | cfd346ab436b00ab9bfd98a5772e004d6a25451a | /dialog/mifesandbox/src/org/gsm/oneapi/server/mms/MMSDeliveryReportSubscriptionServlet.java | 25ac92f3dc3703346221d1e3d1c0259dadf01eb4 | [] | no_license | Shasthojoy/wso2telcohub | 74df08e954348c2395cb3bc4d59732cfae065dad | 0f5275f1226d66540568803282a183e1e584bf85 | refs/heads/master | 2021-04-09T15:37:33.245057 | 2016-03-08T05:44:30 | 2016-03-08T05:44:30 | 125,588,468 | 0 | 0 | null | 2018-03-17T02:03:11 | 2018-03-17T02:03:11 | null | UTF-8 | Java | false | false | 3,346 | java | package org.gsm.oneapi.server.mms;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.codehaus.jackson.map.ObjectMapper;
import org.gsm.oneapi.responsebean.mms.DeliveryReceiptSubscription;
import org.gsm.oneapi.server.OneAPIServlet;
import org.gsm.oneapi.server.ValidationRule;
/**
* Servlet implementing the OneAPI function for creating an MMS delivery report subscription
*/
public class MMSDeliveryReportSubscriptionServlet extends OneAPIServlet {
private static final long serialVersionUID = -7359556423074788912L;
static Logger logger=Logger.getLogger(MMSDeliveryReportSubscriptionServlet.class);
public void init() throws ServletException {
logger.debug("MMSDeliveryReportSubscriptionServlet initialised");
}
private final String[] validationRules={"1", "messaging", "outbound", "*", "subscriptions"};
public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException{
dumpRequestDetails(request, logger);
String[] requestParts=getRequestParts(request);
if (validateRequest(request, response, requestParts, validationRules)) {
logger.debug("MMS Delivery Report Subscriptions - url appears correctly formatted");
String senderAddress=requestParts[3];
/*
* Decode the service parameters - in this case it is an HTTP POST request
*/
String clientCorrelator=nullOrTrimmed(request.getParameter("clientCorrelator"));
String notifyURL=nullOrTrimmed(request.getParameter("notifyURL"));
String callbackData=nullOrTrimmed(request.getParameter("callbackData"));
logger.debug("senderAddress = "+senderAddress);
logger.debug("clientCorrelator = "+clientCorrelator);
logger.debug("notifyURL = "+notifyURL);
logger.debug("callbackData = "+callbackData);
String resourceURL=null;
ValidationRule[] rules={
new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL, "senderAddress", senderAddress),
new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_URL, "notifyURL", notifyURL),
new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "clientCorrelator", clientCorrelator),
new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "callbackData", callbackData),
};
if (checkRequestParameters(response, rules)) {
resourceURL=getRequestHostnameAndContext(request)+request.getServletPath()+"/1/messaging/outbound/subscriptions/sub789";
DeliveryReceiptSubscription receiptSubscription=new DeliveryReceiptSubscription();
receiptSubscription.setResourceURL(resourceURL);
DeliveryReceiptSubscription.CallbackReference callbackReference=new DeliveryReceiptSubscription.CallbackReference();
callbackReference.setNotifyURL(notifyURL);
callbackReference.setCallbackData(callbackData);
receiptSubscription.setCallbackReference(callbackReference);
ObjectMapper mapper=new ObjectMapper();
String jsonResponse="{\"deliveryReceiptSubscription\":"+mapper.writeValueAsString(receiptSubscription)+"}";
logger.debug("Sending response. ResourceURL="+resourceURL);
sendJSONResponse(response, jsonResponse, CREATED, resourceURL);
}
}
}
}
| [
"igunawardana@mitrai.com"
] | igunawardana@mitrai.com |
f9d31f54de22cbd3d96df365f50940f57257f474 | 490fca8b8020d55011a961bc9c52c2393a63a789 | /exampleapp-wear/src/main/java/io/cleaninsights/example/wear/DemoApp.java | c006cc0f7ee90d9b45a655f7428a591a9a37764d | [] | no_license | wedataintelligence/cleaninsights-android-sdk | 222de8f2373c7c6199d888cfba52b0b53949d38f | 4b9d462f45a9373e7208258433df1bf3e6110f14 | refs/heads/master | 2022-12-07T14:04:09.777164 | 2020-08-26T19:27:56 | 2020-08-26T19:27:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,011 | java | package io.cleaninsights.example.wear;
import info.guardianproject.netcipher.proxy.OrbotHelper;
import io.cleaninsights.sdk.piwik.CleanInsightsApplication;
import io.cleaninsights.sdk.CleanInsights;
public class DemoApp extends CleanInsightsApplication {
@Override
public String getMeasureUrl() {
return "https://demo.cleaninsights.io";
}
@Override
public String getMeasureUrlCertificatePin()
{
//generate your own using this tool: https://github.com/scottyab/ssl-pin-generator
return "sha256/ZG+5y3w2mxstotmn15d9tnJtwss591+L6EH/yJMF41I=";
}
@Override
public Integer getSiteId() {
return 1;
}
@Override
public void onCreate() {
super.onCreate();
initCleanInsights();
}
private void initCleanInsights() {
//First init CI
CleanInsights cim = CleanInsights.getInstance(this);
cim.initPwiki(this);
getMeasurer().setApplicationDomain("demo.cleaninsights.io");
}
} | [
"nathan@freitas.net"
] | nathan@freitas.net |
7814b2919ff60ca620a63909ee7dc04ab131c49a | 86cf61187d22b867d1e5d3c8a23d97e806636020 | /src/main/java/base/operators/operator/learner/functions/kernel/rvm/Model.java | de7ab8a87c9dd9ffadcaac4febadf803d569048d | [] | no_license | hitaitengteng/abc-pipeline-engine | f94bb3b1888ad809541c83d6923a64c39fef9b19 | 165a620b94fb91ae97647135cc15a66d212a39e8 | refs/heads/master | 2022-02-22T18:49:28.915809 | 2019-10-27T13:40:58 | 2019-10-27T13:40:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,721 | java | /**
* Copyright (C) 2001-2019 by RapidMiner and the contributors
*
* Complete list of developers available at our web site:
*
* http://rapidminer.com
*
* This program is free software: you can redistribute it and/or modify it under the terms of the
* GNU Affero General Public License as published by the Free Software Foundation, either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License along with this program.
* If not, see http://www.gnu.org/licenses/.
*/
package base.operators.operator.learner.functions.kernel.rvm;
import base.operators.operator.learner.functions.kernel.rvm.kernel.KernelBasisFunction;
import java.io.Serializable;
/**
* The lerned model.
*
* @author Piotr Kasprzak, Ingo Mierswa
*
*/
public class Model implements Serializable {
private static final long serialVersionUID = -8223343885533884477L;
private KernelBasisFunction[] kernels; // The unpruned kernels
private double[] weights; // Associated weights
private boolean bias; // Bias
private boolean regression; // Regression or classification model
/** Constructors */
public Model(double[] weights, KernelBasisFunction[] kernels, boolean bias, boolean regression) {
this.kernels = kernels;
this.weights = weights;
this.bias = bias;
this.regression = regression;
}
public int getNumberOfRelevanceVectors() {
return weights.length;
}
public double getWeight(int index) {
return weights[index];
}
/** Model application. Returns the function value, not a crisp prediction. */
public double applyToVector(double[] vector) {
int j;
double prediction;
if (bias) {
j = 1;
prediction = weights[0];
} else {
j = 0;
prediction = 0;
}
for (; j < weights.length; j++) {
prediction += weights[j] * kernels[j].eval(vector);
}
return prediction;
}
public double[] apply(double[][] inputVectors) {
double[] prediction = new double[inputVectors.length];
for (int i = 0; i < inputVectors.length; i++) {
prediction[i] = applyToVector(inputVectors[i]);
if (!regression) {
if (prediction[i] > 0.0) {
prediction[i] = 1.0;
} else {
prediction[i] = 0.0;
}
}
}
return prediction;
}
public double norm_l2(double[] vector) {
double result = 0;
for (int i = 0; i < vector.length; i++) {
result += vector[i] * vector[i];
}
return Math.sqrt(result);
}
}
| [
"wangj_lc@inspur.com"
] | wangj_lc@inspur.com |
5c2ff80c5959044f10d516267cb1551f632aca5e | ea95080c363676f0398a82500e5247a739811174 | /btkj-pojo/src/main/java/org/btkj/pojo/entity/Banner.java | 9ee69465bcb6c4e97b95f15ebb5dcdf8a6158df0 | [] | no_license | 723854867/btkj | 3cffff6e76d6e6d962436bec37953e71cd35df86 | a0ea9246ec0cd74afbc6248f3c47b94a75877a05 | refs/heads/master | 2020-05-30T13:34:01.238677 | 2017-04-07T08:55:27 | 2017-04-07T08:55:27 | 82,634,896 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,054 | java | package org.btkj.pojo.entity;
import org.rapid.data.storage.db.Entity;
public class Banner implements Entity<Integer> {
private static final long serialVersionUID = -6109714860502169183L;
private int id;
private int tid;
private int idx;
private String image;
private int created;
private int update;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getTid() {
return tid;
}
public void setTid(int tid) {
this.tid = tid;
}
public int getIdx() {
return idx;
}
public void setIdx(int idx) {
this.idx = idx;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
public int getCreated() {
return created;
}
public void setCreated(int created) {
this.created = created;
}
public int getUpdate() {
return update;
}
public void setUpdate(int update) {
this.update = update;
}
@Override
public Integer key() {
return id;
}
}
| [
"723854867@qq.com"
] | 723854867@qq.com |
a87f1551ef71a9739e625e5469caf56dab5b312f | 9de393f39b4381377c433293f309a70861f9406f | /src/java/org/yana/springacl/DefaultProjectAccess.java | ea9149ae6b31478e5ba907a71ab684415720397d | [] | no_license | yana/yana | 1e7b99b718d368d7c56d5b7b9d7f65cc0adacf6c | 3ccf0d9bc8a661620ccb4fafc606c5570df544d1 | refs/heads/master | 2021-01-01T16:35:30.998280 | 2013-05-14T23:24:22 | 2013-05-14T23:24:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,234 | java | package org.yana.springacl;/*
* Copyright 2012 DTO Labs, Inc. (http://dtolabs.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.
*
*/
/*
* DefaultProjectAccess.java
*
* User: Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
* Created: 8/6/12 2:57 PM
*
*/
/**
* Define the default project-level access required for all methods in a Controller class. Used by {@link org.yana.ProjectFilters}.
*/
@java.lang.annotation.Target({java.lang.annotation.ElementType.TYPE})
@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
@java.lang.annotation.Inherited
@java.lang.annotation.Documented
public @interface DefaultProjectAccess {
ProjectAccess.Level value();
}
| [
"greg.schueler@gmail.com"
] | greg.schueler@gmail.com |
eedf222fab5eebe491b2908ab35e010a033bc38a | 5c5da9225cd693734ecb68129ac91c12aee7d14a | /src/main/java/pl/sda/AdditionalTasks/Zoo/Main.java | 6e9e417122ad70e8409a0a105c00a409c63b5ad6 | [] | no_license | Radekj512/KursJava | 08b18adb77fe13eac1ef42325d2c07968b73166b | 92ee21a24ec75106955a7f6c0ef978dc3f1a44ea | refs/heads/master | 2020-04-22T01:13:35.020038 | 2019-04-14T12:17:57 | 2019-04-14T12:17:57 | 170,007,696 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,739 | java | package pl.sda.AdditionalTasks.Zoo;
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) {
Animal bear = new Bear("Yogi", 200, 40);
Animal tiger = new Tiger("Jataka", 150, 25);
Animal wolf = new Wolf("Howler", 70, 40);
Animal dog = new Dog("Scooby", 30);
List<Animal> animals = new ArrayList<>();
animals.add(bear);
animals.add(tiger);
animals.add(wolf);
animals.add(dog);
List<Animal> howlers = new ArrayList<>();
howlers.add(wolf);
howlers.add(dog);
System.out.println(bear.getId() + ": I'm a bear. My name is " + bear.getName() + ". I weight " + bear.getWeight()+".0 kg and my fur lenght is " + ((Bear) bear).getFurLenght()+".");
System.out.println(tiger.getId() + ": I'm a tiger. My name is " + tiger.getName() + ". I weight " + tiger.getWeight()+".0 kg and my claw lenght is " + ((Tiger) tiger).getClawLength()+".");
System.out.println(wolf.getId() + ": I'm a wolf. My name is " + wolf.getName() + ". I weight " + wolf.getWeight()+".0 kg and my fang lenght is " + ((Wolf) wolf).getFangLength()+".");
System.out.println(dog.getId() + ": I'm a dog. My name is " + dog.getName() + ". I weight " + dog.getWeight()+".0 kg.");
for (Animal a: howlers){
if (a instanceof Wolf){
System.out.print("My name is " + a.getName() + " and I am barking: "); ((Wolf) a).bark();
}
if (a instanceof Dog){
System.out.print("My name is " + a.getName() + " and I am barking: ");
((Dog) a).bark();
((Dog) a).sitPretty();
}
}
}
}
| [
"roszko.radek@gmail.com"
] | roszko.radek@gmail.com |
d9622bc5088c5114810c2007fefa2c31c20fd018 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XRENDERING-481-58-3-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/velocity/internal/DefaultVelocityEngine_ESTest.java | 8ac556bf817407d00abf363fadc9816d8056ef49 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 576 | java | /*
* This file was automatically generated by EvoSuite
* Fri Apr 03 13:08:58 UTC 2020
*/
package org.xwiki.velocity.internal;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DefaultVelocityEngine_ESTest extends DefaultVelocityEngine_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
69a5bf837e91d5b1838f6d491acb5b24cefccffc | ad2f91ce89f0cc43d07cd33977d02bc613cbcc9b | /siyue-platform-weixin-common/src/main/java/cn/siyue/platform/weixin/common/common/weixinmenu/WeixinMenuButtonVo.java | 5b9befc6460a49ee9015eef1c3d82a0834077bb1 | [] | no_license | zhouxhhn/weixin | 905cc4a398726391fb5839aa2fbd7ee7dbf544d0 | bc7cfd20c3033c42fa92b38db7be7e40284af15d | refs/heads/master | 2020-04-05T10:24:56.892136 | 2018-11-09T02:22:00 | 2018-11-09T02:22:00 | 156,797,885 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 277 | java | package cn.siyue.platform.weixin.common.common.weixinmenu;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
public class WeixinMenuButtonVo extends BaseWeixinMenuButtonVo {
private List<WeixinMenuButtonVo> subButtons = new ArrayList<>();
}
| [
"joey.zhou@siyue.cn"
] | joey.zhou@siyue.cn |
7ec40dbe11700efc2ec6682a3cb274f8e19241b6 | 8c1714913fb7b71f89d2676d0e8ba8cec29aebba | /OpModeLibrary/src/main/java/org/ftc/opmodes/HelloWorld.java | 2de477c08c5596453ed99270b03c7334fd15cab4 | [] | no_license | FVR5294/Xtensible-ftc_app | 0520d809d584081bf3f06e4f5bceff7588f1c94e | af650cde47710e005a8288d3f31b5f800be12f68 | refs/heads/master | 2021-01-12T19:51:54.114994 | 2015-09-29T04:34:27 | 2015-09-29T04:34:28 | 43,774,054 | 0 | 1 | null | 2015-10-06T19:39:54 | 2015-10-06T19:39:54 | null | UTF-8 | Java | false | false | 1,754 | java | package org.ftc.opmodes;
import org.ftccommunity.ftcxtensible.opmodes.Autonomous;
import org.ftccommunity.ftcxtensible.robot.ExtensibleOpMode;
import org.ftccommunity.ftcxtensible.robot.RobotContext;
import org.ftccommunity.ftcxtensible.robot.RobotStatus;
import java.util.Date;
import java.util.LinkedList;
import java.util.logging.Level;
@Autonomous(name = "Hello World Example")
public class HelloWorld extends ExtensibleOpMode {
@Override
public void init(RobotContext ctx, LinkedList<Object> out) throws Exception {
ctx.enableNetworking().startNetworking();
}
@Override
public void start(RobotContext ctx, LinkedList<Object> out) throws Exception {
ctx.telemetry().addData("TIME", "Start Date: " +
(new Date(System.nanoTime() / 1000)).toString());
}
@Override
public void loop(RobotContext ctx, LinkedList<Object> out) throws Exception {
ctx.status().log(Level.INFO, "LOOP", "Current loop count: " + getLoopCount());
ctx.telemetry().addData("MESS", "Hello, World!");
ctx.telemetry().addData("MESS", "How are you doing?");
}
@Override
public void stop(RobotContext ctx, LinkedList<Object> out) throws Exception {
ctx.status().log(Level.WARNING, "TIME", "End Date: " +
(new Date(System.nanoTime() / 1000)).toString() + "This ran for " + getRuntime());
}
@Override
public void onSuccess(RobotContext ctx, Object event, Object in) {
// Don't worry about this; it is used for the advanced stuff
}
@Override
public int onFailure(RobotContext ctx, RobotStatus.Type eventType, Object event, Object in) {
// Return the default value; for when things go south
return -1;
}
}
| [
"dmssargent@yahoo.com"
] | dmssargent@yahoo.com |
0a15e82e75756a3988811ccdcf1602077c6956d1 | f7751ff5cdf22fb0df1d97065382b473f58da1a0 | /Code9/src/com/brainmentors/games/Player.java | 25a08de63b89bea3af1ee2301a650d0aa3baa0e3 | [] | no_license | amitsrivastava4all/javabatchdec12to2 | eb28e203683d5b6952ba9755e83b301ebc4e2b06 | c264fb2be76f1cdc7e33031c48d564d75628ee32 | refs/heads/master | 2021-09-24T04:49:56.361450 | 2018-02-07T11:57:47 | 2018-02-07T11:57:47 | 115,182,668 | 1 | 1 | null | 2018-10-03T11:55:07 | 2017-12-23T08:38:10 | Java | UTF-8 | Java | false | false | 3,859 | java | package com.brainmentors.games;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.ArrayList;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import com.brainmentors.games.utils.GameConstants;
public class Player implements GameConstants {
private int x;
private int y;
private int w;
private int h;
private ImageIcon image;
private int speed ;
private int force;
private final int GRAVITY = 1;
private int state ;
private ArrayList<Bullet> bulletList = new ArrayList<>();
private BufferedImage playerImage ;
public int getState() {
return state;
}
public void setState(int state) {
this.state = state;
}
private void loadPlayerSprite(){
try {
playerImage = ImageIO.read(Player.class.getResource(PLAYER_IMG));
} catch (IOException e) {
// TODO Auto-generated catch block
System.out.println("Can't Load the Player... ");
System.exit(0);
//e.printStackTrace();
}
}
BufferedImage punch[] = new BufferedImage[2];
int currentPunchIndex = 0;
private void drawPunch(Graphics g){
g.drawImage(punch[currentPunchIndex],x,y,w,h,null);
if(counter==6){
currentPunchIndex++;
counter = 0;
}
counter++;
if(currentPunchIndex>1){
state = GameConstants.DEFAULT;
counter = currentPunchIndex = 0;
}
}
int counter = 0;
private void drawDefaultMove(Graphics g){
g.drawImage(defaultMove[currentDefaultMove],x,y,w,h,null);
if(counter==6){
currentDefaultMove++;
counter = 0;
}
counter++;
if(currentDefaultMove>2){
counter = currentDefaultMove = 0;
}
}
BufferedImage defaultMove[] = new BufferedImage[3];
int currentDefaultMove = 0;
private void loadDefault(){
defaultMove[0] = playerImage.getSubimage(6,18,41,82);
defaultMove[1] = playerImage.getSubimage(55,18,41,78);
defaultMove[2] = playerImage.getSubimage(255,16,35,80);
}
private void loadPunch(){
punch[0] = playerImage.getSubimage(8,131,39,79);
punch[1] = playerImage.getSubimage(57,133,51,79);
/*punch[0] = playerImage.getSubimage(8,131,w,h);
punch[0] = playerImage.getSubimage(8,131,w,h);
punch[0] = playerImage.getSubimage(8,131,w,h);
punch[0] = playerImage.getSubimage(8,131,w,h);
*/
}
public void drawPlayer(Graphics g){
if(this.getState()==PUNCH){
drawPunch(g);
}
else
if(this.getState()==DEFAULT) {
drawDefaultMove(g);
}
//Image playerSubImage = playerImage.getSubimage(8, 14, 41, 84);
//g.drawImage(playerSubImage, 60, GROUND, w,h,null);
//System.out.println("Player DRAW************************");
//g.drawImage(image.getImage(), x, y, w, h, null);
}
public void addBullet(Bullet bullet){
bulletList.add(bullet);
}
public int getW() {
return w;
}
public void setW(int w) {
this.w = w;
}
public int getH() {
return h;
}
public void setH(int h) {
this.h = h;
}
public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
public int getY() {
return y;
}
public void setY(int y) {
this.y = y;
}
public ArrayList<Bullet> getBulletList() {
return bulletList;
}
public void setBulletList(ArrayList<Bullet> bulletList) {
this.bulletList = bulletList;
}
public void move(){
x+=speed;
}
public Player(){
loadPlayerSprite();
speed = 0;
x = 50;
y = GROUND;
w = h = 40;
state = DEFAULT;
loadDefault();
loadPunch();
//image = new ImageIcon(Player.class.getResource(PLAYER_IMG));
}
private boolean isJumpStart ;
public void jump(){
if(!isJumpStart){
force = -10;
y+=force;
isJumpStart = true;
}
}
public void fall(){
if(y<GROUND){
force = force + GRAVITY;
y+=force;
}
if(y>=GROUND){
isJumpStart =false;
}
}
public int getSpeed() {
return speed;
}
public void setSpeed(int speed) {
this.speed = speed;
}
}
| [
"amit4alljava@gmail.com"
] | amit4alljava@gmail.com |
a4cbd883c3c5a3f105918f847c776586b2ac09f6 | dbad3213f6544564d580932e20dca31c7c1943da | /src/org/apache/coyote/http11/InternalNioInputBuffer.java | 53dd6e971d71b43c0e03c56c6f3e434c9bdb31c6 | [] | no_license | Lyon1994/MyTomcatServerApp | 0ef3db59bc3bc0ecdbd35e4d616ca75d082420be | 37304fdfa03a7d03f119ae7eaa54f13539021b50 | refs/heads/master | 2021-01-19T03:19:02.243034 | 2015-07-28T06:21:44 | 2015-07-28T06:58:51 | 39,816,568 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,045 | 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.coyote.http11;
import java.io.EOFException;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.Selector;
import org.apache.coyote.InputBuffer;
import org.apache.coyote.Request;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.ByteChunk;
import org.apache.tomcat.util.net.AbstractEndpoint;
import org.apache.tomcat.util.net.NioChannel;
import org.apache.tomcat.util.net.NioEndpoint;
import org.apache.tomcat.util.net.NioSelectorPool;
import org.apache.tomcat.util.net.SocketWrapper;
/**
* Implementation of InputBuffer which provides HTTP request header parsing as
* well as transfer decoding.
*/
public class InternalNioInputBuffer extends AbstractNioInputBuffer<NioChannel> {
private static final Log log =
LogFactory.getLog(InternalNioInputBuffer.class);
// ----------------------------------------------------------- Constructors
/**
* Alternate constructor.
*/
public InternalNioInputBuffer(Request request, int headerBufferSize) {
super(request, headerBufferSize);
inputStreamInputBuffer = new SocketInputBuffer();
}
/**
* Underlying socket.
*/
private NioChannel socket;
/**
* Selector pool, for blocking reads and blocking writes
*/
private NioSelectorPool pool;
// --------------------------------------------------------- Public Methods
@Override
protected final Log getLog() {
return log;
}
/**
* Recycle the input buffer. This should be called when closing the
* connection.
*/
@Override
public void recycle() {
super.recycle();
socket = null;
}
// ------------------------------------------------------ Protected Methods
@Override
protected void init(SocketWrapper<NioChannel> socketWrapper,
AbstractEndpoint<NioChannel> endpoint) throws IOException {
socket = socketWrapper.getSocket();
if (socket == null) {
// Socket has been closed in another thread
throw new IOException(sm.getString("iib.socketClosed"));
}
socketReadBufferSize =
socket.getBufHandler().getReadBuffer().capacity();
int bufLength = headerBufferSize + socketReadBufferSize;
if (buf == null || buf.length < bufLength) {
buf = new byte[bufLength];
}
pool = ((NioEndpoint)endpoint).getSelectorPool();
}
@Override
protected boolean fill(boolean block) throws IOException, EOFException {
if (parsingHeader) {
if (lastValid > headerBufferSize) {
throw new IllegalArgumentException
(sm.getString("iib.requestheadertoolarge.error"));
}
} else {
lastValid = pos = end;
}
int nRead = 0;
ByteBuffer readBuffer = socket.getBufHandler().getReadBuffer();
readBuffer.clear();
if ( block ) {
Selector selector = null;
try {
selector = pool.get();
} catch ( IOException x ) {
// Ignore
}
try {
NioEndpoint.KeyAttachment att =
(NioEndpoint.KeyAttachment) socket.getAttachment();
if (att == null) {
throw new IOException("Key must be cancelled.");
}
nRead = pool.read(readBuffer,
socket, selector,
socket.getIOChannel().socket().getSoTimeout());
} catch ( EOFException eof ) {
nRead = -1;
} finally {
if ( selector != null ) pool.put(selector);
}
} else {
nRead = socket.read(readBuffer);
}
if (nRead > 0) {
readBuffer.flip();
readBuffer.limit(nRead);
expand(nRead + pos);
readBuffer.get(buf, pos, nRead);
lastValid = pos + nRead;
} else if (nRead == -1) {
//return false;
throw new EOFException(sm.getString("iib.eof.error"));
}
return nRead > 0;
}
// ------------------------------------- InputStreamInputBuffer Inner Class
/**
* This class is an input buffer which will read its data from an input
* stream.
*/
protected class SocketInputBuffer
implements InputBuffer {
/**
* Read bytes into the specified chunk.
*/
@Override
public int doRead(ByteChunk chunk, Request req )
throws IOException {
if (pos >= lastValid) {
if (!fill(true)) //read body, must be blocking, as the thread is inside the app
return -1;
}
int length = lastValid - pos;
chunk.setBytes(buf, pos, length);
pos = lastValid;
return (length);
}
}
}
| [
"765211630@qq.com"
] | 765211630@qq.com |
9795d3009085472009788361bb9186ef913343a7 | 3bed323140ccfb7423fb1c2f475c4d784da4df8c | /system/service/mapper/DeptMapper.java | 2af8709791066be0253f023c4fa18bb26f16999d | [] | no_license | alvin198761/commom-projects | 62de923b51832276a1e65efd43518e9434cae79a | 5683459e77c416039f7a8592f26cbc282a3ad1ad | refs/heads/master | 2022-06-23T03:39:46.640149 | 2020-05-15T03:29:19 | 2020-05-15T03:29:19 | 246,055,383 | 0 | 0 | null | 2022-06-21T02:59:30 | 2020-03-09T14:18:54 | JavaScript | UTF-8 | Java | false | false | 456 | java | package org.luna.permission.modules.system.service.mapper;
import co.yixiang.modules.system.service.dto.DeptDTO;
import co.yixiang.base.BaseMapper;
import co.yixiang.modules.system.domain.Dept;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
/**
* @author Zheng Jie
* @date 2019-03-25
*/
@Mapper(componentModel = "spring",unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface DeptMapper extends BaseMapper<DeptDTO, Dept> {
} | [
"alvin198761@163.com"
] | alvin198761@163.com |
3053c0f13c9af264a6912b9c72cd5077bada5804 | 54c9e0e0a1668de62b8a2f174c4fae0d92ae0654 | /qpid/java/amqp-1-0-client-jms/src/main/java/org/apache/qpid/amqp_1_0/jms/impl/TopicSubscriberImpl.java | b89025a27b946aba87481016f45410b80d0c30c6 | [
"Python-2.0",
"Apache-2.0",
"MIT"
] | permissive | tas95757/Qpid | cca3156fca8f209ec3fa67c625b02abebb933992 | f66f177e39f5e7d42cae23952f53e83ecd9d209a | refs/heads/master | 2021-01-22T16:10:14.927617 | 2014-10-02T13:55:36 | 2014-10-02T13:55:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,224 | 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.qpid.amqp_1_0.jms.impl;
import java.util.Map;
import java.util.UUID;
import javax.jms.InvalidSelectorException;
import javax.jms.JMSException;
import org.apache.qpid.amqp_1_0.client.AcknowledgeMode;
import org.apache.qpid.amqp_1_0.client.ConnectionErrorException;
import org.apache.qpid.amqp_1_0.client.Receiver;
import org.apache.qpid.amqp_1_0.jms.Topic;
import org.apache.qpid.amqp_1_0.jms.TopicSubscriber;
import org.apache.qpid.amqp_1_0.type.Symbol;
import org.apache.qpid.amqp_1_0.type.messaging.Filter;
import org.apache.qpid.amqp_1_0.type.messaging.StdDistMode;
import org.apache.qpid.amqp_1_0.type.transport.AmqpError;
public class TopicSubscriberImpl extends MessageConsumerImpl implements TopicSubscriber
{
TopicSubscriberImpl(String name,
boolean durable,
final Topic destination,
final SessionImpl session,
final String selector,
final boolean noLocal)
throws JMSException
{
super(destination, session, selector, noLocal, name, durable);
setTopicSubscriber(true);
}
TopicSubscriberImpl(final Topic destination,
final SessionImpl session,
final String selector,
final boolean noLocal)
throws JMSException
{
super(destination, session, selector, noLocal);
setTopicSubscriber(true);
}
public TopicImpl getTopic() throws JMSException
{
return (TopicImpl) getDestination();
}
protected Receiver createClientReceiver() throws JMSException
{
try
{
String address = getSession().toAddress(getDestination());
String targetAddress = getDestination().getLocalTerminus() != null ? getDestination().getLocalTerminus() : UUID.randomUUID().toString();
Receiver receiver = getSession().getClientSession().createReceiver(address, targetAddress,
StdDistMode.COPY, AcknowledgeMode.ALO,
getLinkName(), isDurable(), getFilters(),
null);
String actualAddress = receiver.getAddress();
@SuppressWarnings("unchecked")
Map<Symbol, Filter> actualFilters = (Map<Symbol, Filter>) receiver.getFilter();
if(!address.equals(actualAddress) || !filtersEqual(getFilters(), actualFilters))
{
receiver.close();
if(isDurable())
{
receiver = getSession().getClientSession().createReceiver(address,
StdDistMode.COPY, AcknowledgeMode.ALO,
getLinkName(), false, getFilters(),
null);
receiver.close();
}
receiver = getSession().getClientSession().createReceiver(address,
StdDistMode.COPY, AcknowledgeMode.ALO,
getLinkName(), isDurable(), getFilters(),
null);
}
return receiver;
}
catch (ConnectionErrorException e)
{
org.apache.qpid.amqp_1_0.type.transport.Error error = e.getRemoteError();
if(AmqpError.INVALID_FIELD.equals(error.getCondition()))
{
throw new InvalidSelectorException(e.getMessage());
}
else
{
throw new JMSException(e.getMessage(), error.getCondition().getValue().toString());
}
}
}
private boolean filtersEqual(Map<Symbol, Filter> filters, Map<Symbol, Filter> actualFilters)
{
if(filters == null || filters.isEmpty())
{
return actualFilters == null || actualFilters.isEmpty();
}
else
{
return actualFilters != null && filters.equals(actualFilters);
}
}
protected void closeUnderlyingReceiver(Receiver receiver)
{
receiver.close();
}
}
| [
"rgodfrey@apache.org"
] | rgodfrey@apache.org |
e2cfd157381ced89e654bd858989cae2411c8391 | 5f1341521f5dfcd8e78f38c71aa759d87d93fe35 | /gnhzb/src/edu/zju/cims201/GOF/dao/knowledge/OwlWeblogDao.java | 3fd9c0c4c147cdc01ede0dd8efb5c9b8fcc9c5da | [] | no_license | bbl4229112/gnhzb | 7d021383725a7dff8763d00c9646ed2d4793e74a | 1ce6790f543c8170b961b58e758264d1860f3787 | refs/heads/master | 2021-01-17T23:17:44.026206 | 2015-07-20T08:09:28 | 2015-07-20T08:09:28 | 39,332,082 | 0 | 0 | null | 2015-07-19T11:53:06 | 2015-07-19T11:53:04 | null | UTF-8 | Java | false | false | 363 | java | package edu.zju.cims201.GOF.dao.knowledge;
import org.springframework.stereotype.Component;
import org.springside.modules.orm.hibernate.HibernateDao;
import edu.zju.cims201.GOF.hibernate.pojo.OwlWedlog;
/**
* 授权对象的泛型DAO.
*
* @author calvin
*/
@Component
public class OwlWeblogDao extends HibernateDao<OwlWedlog, Long> {
}
| [
"595612343@qq.com"
] | 595612343@qq.com |
071a0d3e7bafdfb80de4c40b30699a88ad1ebcac | 7ab9e2bb867b267d6cdb33b86b80915b456ff590 | /app/src/main/java/com/adam/food/domain/TgClassify.java | 32f64848dbd275e86c5860bc4de4386ebe06db08 | [
"MIT"
] | permissive | adamin1990/foodtherapy | bf300e1f3611037da13e8aba7c42d0c4078f13e1 | 01b31fcd4d8371d700f25c59d4c8576684030979 | refs/heads/master | 2021-01-21T04:27:15.955344 | 2016-04-20T08:01:44 | 2016-04-20T08:01:44 | 30,528,040 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,222 | java | package com.adam.food.domain;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
/**
* // o8888888o
* // 88" . "88
* // (| -_- |)
* // O\ = /O
* // ____/`---'\____
* // . ' \\| |// `.
* // / \\||| : |||// \
* // / _||||| -:- |||||- \
* // | | \\\ - /// | |
* // | \_| ''\---/'' | |
* // \ .-\__ `-` ___/-. /
* // ___`. .' /--.--\ `. . __
* // ."" '< `.___\_<|>_/___.' >'"".
* // | | : `- \`.;`\ _ /`;.`/ - ` : | |
* // \ \ `-. \_ __\ /__ _/ .-` / /
* // ======`-.____`-.___\_____/___.-`____.-'======
* // `=---='
* //
* // .............................................
* // 佛祖镇楼 BUG辟易
* // 佛曰:
* // 写字楼里写字间,写字间里程序员;
* // 程序人员写程序,又拿程序换酒钱。
* // 酒醒只在网上坐,酒醉还来网下眠;
* // 酒醉酒醒日复日,网上网下年复年。
* // 但愿老死电脑间,不愿鞠躬老板前;
* // 奔驰宝马贵者趣,公交自行程序员。
* // 别人笑我忒疯癫,我笑自己命太贱;
* // 不见满街漂亮妹,哪个归得程序员?
* //
* // Created by LiTao on 2016-03-09-15:38.
* // Company: QD24so
* // Email: 14846869@qq.com
* // WebSite: http://lixiaopeng.top
* //
*/
public class TgClassify {
@SerializedName(value="cookclass", alternate={"foodclass", "drugclass"})
@Expose
private Integer cookclass;
@SerializedName("description")
@Expose
private String description;
@SerializedName("id")
@Expose
private Integer id;
@SerializedName("keywords")
@Expose
private String keywords;
@SerializedName("name")
@Expose
private String name;
@SerializedName("seq")
@Expose
private Integer seq;
@SerializedName("title")
@Expose
private String title;
/**
*
* @return
* The cookclass
*/
public Integer getCookclass() {
return cookclass;
}
/**
*
* @param cookclass
* The cookclass
*/
public void setCookclass(Integer cookclass) {
this.cookclass = cookclass;
}
/**
*
* @return
* The description
*/
public String getDescription() {
return description;
}
/**
*
* @param description
* The description
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* @return
* The id
*/
public Integer getId() {
return id;
}
/**
*
* @param id
* The id
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
* @return
* The keywords
*/
public String getKeywords() {
return keywords;
}
/**
*
* @param keywords
* The keywords
*/
public void setKeywords(String keywords) {
this.keywords = keywords;
}
/**
*
* @return
* The name
*/
public String getName() {
return name;
}
/**
*
* @param name
* The name
*/
public void setName(String name) {
this.name = name;
}
/**
*
* @return
* The seq
*/
public Integer getSeq() {
return seq;
}
/**
*
* @param seq
* The seq
*/
public void setSeq(Integer seq) {
this.seq = seq;
}
/**
*
* @return
* The title
*/
public String getTitle() {
return title;
}
/**
*
* @param title
* The title
*/
public void setTitle(String title) {
this.title = title;
}
}
| [
"adamin1990@gmail.com"
] | adamin1990@gmail.com |
91ee4f29c7ccb90ff9788f139639e30e2326858b | 071a9fa7cfee0d1bf784f6591cd8d07c6b2a2495 | /corpus/class/sling/598.java | 74a1607a7629600e8d8fd7ff683834d0ae8a0c2c | [
"MIT"
] | permissive | masud-technope/ACER-Replication-Package-ASE2017 | 41a7603117f01382e7e16f2f6ae899e6ff3ad6bb | cb7318a729eb1403004d451a164c851af2d81f7a | refs/heads/master | 2021-06-21T02:19:43.602864 | 2021-02-13T20:44:09 | 2021-02-13T20:44:09 | 187,748,164 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,967 | 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.sling.installer.core.impl.tasks;
import java.util.Collections;
import org.apache.sling.installer.api.tasks.InstallTask;
import org.apache.sling.installer.api.tasks.InstallationContext;
import org.apache.sling.installer.api.tasks.ResourceState;
import org.apache.sling.installer.api.tasks.TaskResourceGroup;
import org.apache.sling.installer.core.impl.AbstractInstallTask;
import org.osgi.framework.Bundle;
/**
* Update the installer itself
*/
public class InstallerBundleUpdateTask extends AbstractInstallTask {
private static final String BUNDLE_UPDATE_ORDER = "02-";
private final Integer count;
public InstallerBundleUpdateTask(final TaskResourceGroup r, final TaskSupport taskSupport) {
super(r, taskSupport);
this.count = (Integer) this.getResource().getAttribute(InstallTask.ASYNC_ATTR_NAME);
}
/**
* @see org.apache.sling.installer.api.tasks.InstallTask#execute(org.apache.sling.installer.api.tasks.InstallationContext)
*/
public void execute(final InstallationContext ctx) {
final Bundle b = this.getBundleContext().getBundle();
if (this.count == null) {
try {
b.update(getResource().getInputStream());
ctx.log("Updated bundle {} from resource {}", b, getResource());
} catch (final Exception e) {
getLogger().info("Removing failing tasks - unable to retry: " + this, e);
this.setFinishedState(ResourceState.IGNORED);
ctx.asyncTaskFailed(this);
}
} else if (this.count == 1) {
// second step: refresh
this.getBundleRefresher().refreshBundles(ctx, Collections.singletonList(b), false);
} else {
// finished
this.getResource().setAttribute(ASYNC_ATTR_NAME, null);
this.setFinishedState(ResourceState.INSTALLED);
}
}
@Override
public boolean isAsynchronousTask() {
return this.count == null || this.count == 1;
}
@Override
public String getSortKey() {
return BUNDLE_UPDATE_ORDER + getResource().getEntityId();
}
}
| [
"masudcseku@gmail.com"
] | masudcseku@gmail.com |
d791ab2097d2bf81c036c0f62cb777899b09f327 | 065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be | /cobertura_cluster/1753/tar_1.java | 0038fc74ac4b551e02e3aea71f57e22c656dcd0b | [] | no_license | martinezmatias/GenPat-data-C3 | 63cfe27efee2946831139747e6c20cf952f1d6f6 | b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4 | refs/heads/master | 2022-04-25T17:59:03.905613 | 2020-04-15T14:41:34 | 2020-04-15T14:41:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,406 | java | /*
* Cobertura - http://cobertura.sourceforge.net/
*
* Copyright (C) 2003 jcoverage ltd.
* Copyright (C) 2005 Mark Doliner
*
* Cobertura is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation; either version 2 of the License,
* or (at your option) any later version.
*
* Cobertura is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Cobertura; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
package net.sourceforge.cobertura.check;
import gnu.getopt.Getopt;
import gnu.getopt.LongOpt;
import java.io.File;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.regex.Pattern;
import net.sourceforge.cobertura.coveragedata.ClassData;
import net.sourceforge.cobertura.coveragedata.CoverageDataFileHandler;
import net.sourceforge.cobertura.coveragedata.ProjectData;
import net.sourceforge.cobertura.util.Header;
import org.apache.log4j.Logger;
public class Main
{
private static final Logger logger = Logger.getLogger(Main.class);
Map minimumCoverageRates = new HashMap();
CoverageRate minimumCoverageRate;
File instrumentationDirectory = new File(System.getProperty("user.dir"));
void setInstrumentationDirectory(File instrumentationDirectory)
{
this.instrumentationDirectory = instrumentationDirectory;
}
double inRangeAndDivideByOneHundred(String coverageRateAsPercentage)
{
return inRangeAndDivideByOneHundred(Integer.valueOf(
coverageRateAsPercentage).intValue());
}
double inRangeAndDivideByOneHundred(int coverageRateAsPercentage)
{
if ((coverageRateAsPercentage >= 0)
&& (coverageRateAsPercentage <= 100))
{
return (double)coverageRateAsPercentage / 100;
}
throw new IllegalArgumentException(
"Invalid value, valid range is [0 .. 100]");
}
void setMinimumCoverageRate(String minimumCoverageRate)
{
StringTokenizer tokenizer = new StringTokenizer(minimumCoverageRate,
":");
minimumCoverageRates.put(Pattern.compile(tokenizer.nextToken()),
new CoverageRate(inRangeAndDivideByOneHundred(tokenizer
.nextToken()), inRangeAndDivideByOneHundred(tokenizer
.nextToken())));
}
CoverageRate findMinimumCoverageRate(String classname)
{
Iterator i = minimumCoverageRates.entrySet().iterator();
while (i.hasNext())
{
Map.Entry entry = (Map.Entry)i.next();
Pattern pattern = (Pattern)entry.getKey();
if (pattern.matcher(classname).matches())
{
return (CoverageRate)entry.getValue();
}
}
return minimumCoverageRate;
}
public Main(String[] args)
{
Header.print(System.out);
System.out.println("Cobertura coverage check");
LongOpt[] longOpts = new LongOpt[4];
longOpts[0] = new LongOpt("branch", LongOpt.REQUIRED_ARGUMENT, null,
'b');
longOpts[1] = new LongOpt("line", LongOpt.REQUIRED_ARGUMENT, null,
'l');
longOpts[2] = new LongOpt("directory", LongOpt.REQUIRED_ARGUMENT,
null, 'd');
longOpts[3] = new LongOpt("regex", LongOpt.REQUIRED_ARGUMENT, null,
'r');
Getopt g = new Getopt(getClass().getName(), args, ":b:l:d:r:",
longOpts);
int c;
double branchCoverageRate = 0.8;
double lineCoverageRate = 0.7;
while ((c = g.getopt()) != -1)
{
switch (c)
{
case 'b':
branchCoverageRate = inRangeAndDivideByOneHundred(g
.getOptarg());
break;
case 'l':
lineCoverageRate = inRangeAndDivideByOneHundred(g
.getOptarg());
break;
case 'd':
setInstrumentationDirectory(new File(g.getOptarg()));
break;
case 'r':
setMinimumCoverageRate(g.getOptarg());
break;
}
}
minimumCoverageRate = new CoverageRate(lineCoverageRate,
branchCoverageRate);
if (logger.isInfoEnabled())
{
logger.info("instrumentation directory: "
+ instrumentationDirectory);
}
File dataFile = new File(instrumentationDirectory,
CoverageDataFileHandler.FILE_NAME);
ProjectData projectData = CoverageDataFileHandler
.loadCoverageData(dataFile);
if (logger.isInfoEnabled())
{
logger.info("instrumentation has "
+ projectData.getNumberOfClasses() + " classes");
}
Iterator iter = projectData.getClasses().iterator();
while (iter.hasNext())
{
ClassData classData = (ClassData)iter.next();
CoverageRate coverageRate = findMinimumCoverageRate(classData
.getName());
if (logger.isInfoEnabled())
{
StringBuffer sb = new StringBuffer();
sb.append(classData.getName());
sb.append(", line: ");
sb.append(percentage(classData.getLineCoverageRate()));
sb.append("% (");
sb.append(percentage(classData.getLineCoverageRate()));
sb.append("%), branch: ");
sb.append(percentage(classData.getBranchCoverageRate()));
sb.append("% (");
sb.append(percentage(classData.getBranchCoverageRate()));
sb.append("%)");
logger.info(sb.toString());
}
if (classData.getLineCoverageRate() < coverageRate
.getLineCoverageRate())
{
StringBuffer sb = new StringBuffer();
sb.append(classData.getName());
sb.append(" line coverage rate of: ");
sb.append(percentage(classData.getLineCoverageRate()));
sb.append("% (required: ");
sb.append(percentage(coverageRate.getLineCoverageRate()));
sb.append("%)");
System.out.println(sb.toString());
}
if (classData.getBranchCoverageRate() < coverageRate
.getBranchCoverageRate())
{
StringBuffer sb = new StringBuffer();
sb.append(classData.getName());
sb.append(" branch coverage rate of: ");
sb.append(percentage(classData.getBranchCoverageRate()));
sb.append("% (required: ");
sb.append(percentage(coverageRate.getBranchCoverageRate()));
sb.append("%)");
System.out.println(sb.toString());
}
}
}
private String percentage(double coverateRate)
{
BigDecimal decimal = new BigDecimal(coverateRate * 100);
return decimal.setScale(1, BigDecimal.ROUND_DOWN).toString();
}
public static void main(String[] args)
{
new Main(args);
}
}
| [
"375833274@qq.com"
] | 375833274@qq.com |
9be5461fc6a1568bc77370954b1b243fec2e7317 | 40d844c1c780cf3618979626282cf59be833907f | /src/testcases/CWE129_Improper_Validation_of_Array_Index/s02/CWE129_Improper_Validation_of_Array_Index__getCookies_Servlet_array_read_no_check_72a.java | 06612e90e1e7a8c34b5f7cad680acf0317dc6dd6 | [] | no_license | rubengomez97/juliet | f9566de7be198921113658f904b521b6bca4d262 | 13debb7a1cc801977b9371b8cc1a313cd1de3a0e | refs/heads/master | 2023-06-02T00:37:24.532638 | 2021-06-23T17:22:22 | 2021-06-23T17:22:22 | 379,676,259 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,811 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE129_Improper_Validation_of_Array_Index__getCookies_Servlet_array_read_no_check_72a.java
Label Definition File: CWE129_Improper_Validation_of_Array_Index.label.xml
Template File: sources-sinks-72a.tmpl.java
*/
/*
* @description
* CWE: 129 Improper Validation of Array Index
* BadSource: getCookies_Servlet Read data from the first cookie using getCookies()
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: array_read_no_check
* GoodSink: Read from array after verifying index
* BadSink : Read from array without any verification of index
* Flow Variant: 72 Data flow: data passed in a Vector from one method to another in different source files in the same package
*
* */
package testcases.CWE129_Improper_Validation_of_Array_Index.s02;
import testcasesupport.*;
import java.util.Vector;
import javax.servlet.http.*;
import java.util.logging.Level;
public class CWE129_Improper_Validation_of_Array_Index__getCookies_Servlet_array_read_no_check_72a extends AbstractTestCaseServlet
{
public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* initialize data in case there are no cookies */
/* Read data from cookies */
{
Cookie cookieSources[] = request.getCookies();
if (cookieSources != null)
{
/* POTENTIAL FLAW: Read data from the first cookie value */
String stringNumber = cookieSources[0].getValue();
try
{
data = Integer.parseInt(stringNumber.trim());
}
catch(NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception reading data from cookie", exceptNumberFormat);
}
}
}
Vector<Integer> dataVector = new Vector<Integer>(5);
dataVector.add(0, data);
dataVector.add(1, data);
dataVector.add(2, data);
(new CWE129_Improper_Validation_of_Array_Index__getCookies_Servlet_array_read_no_check_72b()).badSink(dataVector , request, response );
}
public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
goodG2B(request, response);
goodB2G(request, response);
}
/* goodG2B() - use GoodSource and BadSink */
private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
Vector<Integer> dataVector = new Vector<Integer>(5);
dataVector.add(0, data);
dataVector.add(1, data);
dataVector.add(2, data);
(new CWE129_Improper_Validation_of_Array_Index__getCookies_Servlet_array_read_no_check_72b()).goodG2BSink(dataVector , request, response );
}
/* goodB2G() - use BadSource and GoodSink */
private void goodB2G(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* initialize data in case there are no cookies */
/* Read data from cookies */
{
Cookie cookieSources[] = request.getCookies();
if (cookieSources != null)
{
/* POTENTIAL FLAW: Read data from the first cookie value */
String stringNumber = cookieSources[0].getValue();
try
{
data = Integer.parseInt(stringNumber.trim());
}
catch(NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception reading data from cookie", exceptNumberFormat);
}
}
}
Vector<Integer> dataVector = new Vector<Integer>(5);
dataVector.add(0, data);
dataVector.add(1, data);
dataVector.add(2, data);
(new CWE129_Improper_Validation_of_Array_Index__getCookies_Servlet_array_read_no_check_72b()).goodB2GSink(dataVector , request, response );
}
/* 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);
}
}
| [
"you@example.com"
] | you@example.com |
1e97586175793f990b09a0447f186eea9a223ebe | b111b77f2729c030ce78096ea2273691b9b63749 | /db-example-large-multi-project/project26/src/main/java/org/gradle/test/performance/mediumjavamultiproject/project26/p134/Production2688.java | fabb7d0bc1aa8b01d7cea2e62e6699dfe4d25601 | [] | no_license | WeilerWebServices/Gradle | a1a55bdb0dd39240787adf9241289e52f593ccc1 | 6ab6192439f891256a10d9b60f3073cab110b2be | refs/heads/master | 2023-01-19T16:48:09.415529 | 2020-11-28T13:28:40 | 2020-11-28T13:28:40 | 256,249,773 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,896 | java | package org.gradle.test.performance.mediumjavamultiproject.project26.p134;
public class Production2688 {
private String property0;
public String getProperty0() {
return property0;
}
public void setProperty0(String value) {
property0 = value;
}
private String property1;
public String getProperty1() {
return property1;
}
public void setProperty1(String value) {
property1 = value;
}
private String property2;
public String getProperty2() {
return property2;
}
public void setProperty2(String value) {
property2 = value;
}
private String property3;
public String getProperty3() {
return property3;
}
public void setProperty3(String value) {
property3 = value;
}
private String property4;
public String getProperty4() {
return property4;
}
public void setProperty4(String value) {
property4 = value;
}
private String property5;
public String getProperty5() {
return property5;
}
public void setProperty5(String value) {
property5 = value;
}
private String property6;
public String getProperty6() {
return property6;
}
public void setProperty6(String value) {
property6 = value;
}
private String property7;
public String getProperty7() {
return property7;
}
public void setProperty7(String value) {
property7 = value;
}
private String property8;
public String getProperty8() {
return property8;
}
public void setProperty8(String value) {
property8 = value;
}
private String property9;
public String getProperty9() {
return property9;
}
public void setProperty9(String value) {
property9 = value;
}
} | [
"nateweiler84@gmail.com"
] | nateweiler84@gmail.com |
5e54cfd89c8b4b29f99677de23533e819d573e52 | 7c76db8235ca9aeff01ec0431aa3c9f733756cb0 | /src/main/java/collectionsAndMaps/list/listSubList/SubArrayList.java | 1b97ca3d70ce2c1fed9933e5fc2e81ae8b501687 | [] | no_license | jezhische/TrainingTasks | f98e94617b8c280ae3f715d66b350e37265d1aa8 | 03c1241bf76878248d24aef796006439b91f7dfd | refs/heads/master | 2020-05-21T19:52:09.674832 | 2017-08-22T01:56:23 | 2017-08-22T01:56:23 | 62,608,297 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,440 | java | package collectionsAndMaps.list.listSubList;
import swing._2Danimation.auxiliary.BubbleSort;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/**
* Created by WORK on 24.10.2016.
*/
public class SubArrayList {
ArrayList<Integer> arrayList = new ArrayList<>();
int count;
public ArrayList<Integer> getArrayList() {
for (int i = 0; i < count; i++)
arrayList.add(i);
Collections.shuffle(arrayList);
return arrayList;
}
public void printArrayList(int count) {
this.count = count;
ArrayList<Integer> list = getArrayList();
System.out.print("list = " + list);
ArrayList<Integer> leftSubList = new ArrayList<>(list.subList(0, count / 2));
System.out.print("\nleftSubList = " + leftSubList);
ArrayList<Integer> rightSubList = new ArrayList<>(list.subList(count / 2, count));
System.out.print("\nrightSubList = " + rightSubList);
ArrayList<Integer> joinSubList = new ArrayList<>(count);
joinSubList.addAll(leftSubList);
joinSubList.addAll(rightSubList);
System.out.print("\njoinSubList = " + joinSubList);
List<Integer> lll = BubbleSort.sort(list.subList(0, count / 2)); // NB: это перегруженный метод sort для List<>, а не для ArrayList<>
System.out.print("\nList<>!!! lll = " + lll);
System.out.print("\nlist = " + list); // и вот половина исходного листа уже отсортирована!
List<Integer> listlist = (List<Integer>) list;
System.out.print("\nlistlist = " + listlist);
list = (ArrayList<Integer>) listlist;
System.out.print("\nlist = " + list);
ArrayList<Integer> list3 = (ArrayList<Integer>) listlist;
System.out.print("\nlist3 = " + list3);
}
public static void main(String[] args) {
new SubArrayList().printArrayList(25);
List<String> stringList = new ArrayList<String>( Arrays.asList( "2", "1", "2", "4", "3", "5") );
stringList.subList(0, 5).clear(); //TODO: ЭЛЕМЕНТ С КОНЕЧНЫМ ИНДЕКСОМ НЕ ВКЛЮЧАЕТСЯ в subList
System.out.println();
for( String entry : stringList ){
System.out.print( entry );
}
}
}
| [
"jezhische@gmail.com"
] | jezhische@gmail.com |
9e7d5bfce1db0c35620e930e9bf409ee3a5e5d39 | b5f933bf4d2cfbc15c32cc1d2b122a28e75eab02 | /Maven Projects/SampleDemo/src/main/java/Demo.java | 1490ee44668a2acbe7712f6ecd2e55c5ef8829da | [] | no_license | Kaleakash/fullstacktrainingforzensar | d08744102acf4946113be6c9d32153d861c68f47 | 1671030b9fe777ebc4a3489f64d7c0418aef0b8e | refs/heads/main | 2023-03-13T08:08:42.244290 | 2021-03-09T14:51:34 | 2021-03-09T14:51:34 | 328,547,387 | 2 | 2 | null | null | null | null | UTF-8 | Java | false | false | 130 | java | package com;
public class Demo {
public static void main(String args[]) {
System.out.println("Welcome to Maven Project ");
}
} | [
"akash300383@gmail.com"
] | akash300383@gmail.com |
78b2980b7c8b09030fb8a0e1e9878d05263d31a0 | 74f231301c512ebcc6b47d61d035bcf8908c50c3 | /src/org/jetbrains/plugin/devkt/clojure/psi/impl/ClTildaAt.java | 1146de0ffea4bfced9536c87bf94403c3cf293e3 | [
"Apache-2.0"
] | permissive | devkt-plugins/la-clojure-devkt | 50d170e6f14a3c7cd2ed2d192bd305a1514e3aad | be06ec3c4666795e0b2bc2f910fcde87cff521f1 | refs/heads/master | 2020-03-10T20:27:23.092877 | 2018-09-15T03:28:12 | 2018-09-15T03:28:12 | 129,570,961 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 313 | java | package org.jetbrains.plugin.devkt.clojure.psi.impl;
import org.jetbrains.kotlin.com.intellij.lang.ASTNode;
import org.jetbrains.plugin.devkt.clojure.psi.ClojurePsiElementImpl;
/**
* @author ilyas
*/
public class ClTildaAt extends ClojurePsiElementImpl {
public ClTildaAt(ASTNode node) {
super(node);
}
}
| [
"ice1000kotlin@foxmail.com"
] | ice1000kotlin@foxmail.com |
6552dc708eec9eb86a3947b0b01f5c4c280f6bdd | 93f4ddae480d493a57fe3714eca08978303030f3 | /modules/flowable5-engine/src/main/java/org/activiti/engine/impl/history/HistoryLevel.java | 787cda380f3e555c73430b8d6cc31cdf762ba81f | [
"Apache-2.0"
] | permissive | relational-data-systems/flowable-engine | 5f58fda07ea5a7e48c77242ffb0710d783a08142 | beee29a3c3117212d83a8c783e0b971cf215a5ba | refs/heads/master | 2021-01-22T23:27:11.427285 | 2019-04-24T01:59:33 | 2019-04-24T01:59:33 | 85,639,360 | 0 | 0 | Apache-2.0 | 2018-09-12T01:16:28 | 2017-03-21T00:00:03 | Java | UTF-8 | Java | false | false | 1,996 | java | /* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.activiti.engine.impl.history;
import org.activiti.engine.ActivitiException;
import org.activiti.engine.ActivitiIllegalArgumentException;
/**
* Enum that contains all possible history-levels.
*
* @author Frederik Heremans
*/
public enum HistoryLevel {
NONE("none"), ACTIVITY("activity"), AUDIT("audit"), FULL("full");
private String key;
private HistoryLevel(String key) {
this.key = key;
}
/**
* @param key
* string representation of level
* @return {@link HistoryLevel} for the given key
* @throws ActivitiException
* when passed in key doesn't correspond to existing level
*/
public static HistoryLevel getHistoryLevelForKey(String key) {
for (HistoryLevel level : values()) {
if (level.key.equals(key)) {
return level;
}
}
throw new ActivitiIllegalArgumentException("Illegal value for history-level: " + key);
}
/**
* String representation of this history-level.
*/
public String getKey() {
return key;
}
/**
* Checks if the given level is the same as, or higher in order than the level this method is executed on.
*/
public boolean isAtLeast(HistoryLevel level) {
// Comparing enums actually compares the location of values declared in the enum
return this.compareTo(level) >= 0;
}
} | [
"tijs.rademakers@gmail.com"
] | tijs.rademakers@gmail.com |
af9cd3b74dba4261a7f892d099b6304c08e130e8 | 8f87065bc3cb6d96ea2e398a98aacda4fc4bbe43 | /src/Class00000043Worse.java | 976180957f04120b6a33e4e355e3e9bc4804c40a | [] | no_license | fracz/code-quality-benchmark | a243d345441582473532f9b013993f77d59e19ae | c23e76fe315f43bea899beabb856e61348c34e09 | refs/heads/master | 2020-04-08T23:40:36.408828 | 2019-07-31T17:54:53 | 2019-07-31T17:54:53 | 159,835,188 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 487 | java | // original filename: 00044089.txt
// before
public class Class00000043Worse {
@Override
public OPhysicalPosition[] read(OChannelBinaryAsynchClient network, OStorageRemoteSession session) throws IOException {
final int positionsCount = network.readInt();
if (positionsCount == 0) {
return OCommonConst.EMPTY_PHYSICAL_POSITIONS_ARRAY;
} else {
return OStorageRemote.readPhysicalPositions(network, positionsCount);
}
}
}
| [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
732a5e6ecec34153847a742bda422f351b44f07f | 6a15fbb56949ec66c40f0de697b620cd6a2b332e | /px_medical/main/com/bofan/publichealth/command/PersonInsanityRecoveryQueryInfo.java | 9bc0d3b90f1a53efd50f1072e31fe827cfa210c4 | [] | no_license | rojoan/C-gitLibrary | 2730fa7e9ff711248e0ce2731df65f87e7598095 | 861814595b0ce7397da7b354bb53eb4d1981ae1c | refs/heads/master | 2020-03-10T20:40:26.263347 | 2018-04-17T01:27:48 | 2018-04-17T01:27:48 | 129,575,347 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,956 | java | package com.bofan.publichealth.command;
import com.bofan.basesystem.common.command.BaseCommandInfo;
import com.bofan.infoql.QueryInfo;
import com.bofan.infoql.QueryOperator;
import com.bofan.infoql.QueryParam;
/**
* 重性精神病--症状查询参数
* @Description
* @author xlf
* 2017-10-26
*/
@QueryInfo(from = "com.bofan.publichealth.valueobject.PersonInsanityRecovery pir", orderBy = "pir.personInsanityRecoveryId asc")
public class PersonInsanityRecoveryQueryInfo extends BaseCommandInfo {
/**
*
*/
private static final long serialVersionUID = 9065496992044630401L;
@QueryParam(fieldName = "pir.personInsanityId", op = QueryOperator.EQU)
private Long personInsanityId;
@QueryParam(fieldName = "pir.personInsanityVisitId", op = QueryOperator.EQU)
private Long personInsanityVisitId;
@QueryParam(fieldName = "pir.personDetailId", op = QueryOperator.EQU)
private Long personDetailId;
/**
* @return the personInsanityId
*/
public Long getPersonInsanityId() {
return personInsanityId;
}
/**
* @param personInsanityId the personInsanityId to set
*/
public void setPersonInsanityId(Long personInsanityId) {
this.personInsanityId = personInsanityId;
}
/**
* @return the personInsanityVisitId
*/
public Long getPersonInsanityVisitId() {
return personInsanityVisitId;
}
/**
* @param personInsanityVisitId the personInsanityVisitId to set
*/
public void setPersonInsanityVisitId(Long personInsanityVisitId) {
this.personInsanityVisitId = personInsanityVisitId;
}
/**
* @return the personDetailId
*/
public Long getPersonDetailId() {
return personDetailId;
}
/**
* @param personDetailId the personDetailId to set
*/
public void setPersonDetailId(Long personDetailId) {
this.personDetailId = personDetailId;
}
}
| [
"534433956@qq.com"
] | 534433956@qq.com |
521b5314e94b13c313023090446a81bb3c6018a4 | 18253a57de2115ef10cc500ff87e95ee681193ca | /src/main/java/com/tencent/ads/container/AndroidChannelPackagesApiContainer.java | 96992ea039e2b5fc53c418a94d57851800f9b452 | [
"Apache-2.0"
] | permissive | ZhengJiaBin1208/marketing-api-java-sdk | 37307072cc5bae88681ce9dc37060db37c6cedf3 | 9e4e92d7b6840ea137e865a02a4bed21b75b0927 | refs/heads/master | 2023-02-21T05:28:01.334022 | 2021-01-22T02:09:15 | 2021-01-22T02:09:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,743 | java | /*
* Marketing API
* Marketing API
*
* OpenAPI spec version: 1.3
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.tencent.ads.container;
import com.google.inject.Inject;
import com.tencent.ads.ApiContainer;
import com.tencent.ads.ApiException;
import com.tencent.ads.anno.*;
import com.tencent.ads.api.AndroidChannelPackagesApi;
import com.tencent.ads.exception.TencentAdsResponseException;
import com.tencent.ads.model.AndroidChannelPackagesGetResponse;
import com.tencent.ads.model.AndroidChannelPackagesGetResponseData;
import java.util.List;
public class AndroidChannelPackagesApiContainer extends ApiContainer {
@Inject AndroidChannelPackagesApi api;
/**
* 获取应用宝渠道包
*
* @param accountId (required)
* @param myappAuthKey (required)
* @param androidAppId (required)
* @param page (optional)
* @param pageSize (optional)
* @param fields 返回参数的字段列表 (optional)
* @return AndroidChannelPackagesGetResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
* response body
*/
public AndroidChannelPackagesGetResponseData androidChannelPackagesGet(
Long accountId,
String myappAuthKey,
Long androidAppId,
Long page,
Long pageSize,
List<String> fields)
throws ApiException, TencentAdsResponseException {
AndroidChannelPackagesGetResponse resp =
api.androidChannelPackagesGet(
accountId, myappAuthKey, androidAppId, page, pageSize, fields);
handleResponse(gson.toJson(resp));
return resp.getData();
}
}
| [
"dennyqian@tencent.com"
] | dennyqian@tencent.com |
b471d50720661902c1c1c21a68ce8735e0117d7a | 92399ffdd82d8bb968316de00e8533bed1d7a610 | /demo/src/main/java/com/google/android/cameraview/demo/Response.java | 75ba799175b1eb387e30a0a75aa091f39fde1ae4 | [
"Apache-2.0"
] | permissive | AitGo/cameraview-master | a7cc4880feaefe2cdf7f53ff20bc10ed6e653577 | 2027738eee122279ab2fc20f66e228e683105390 | refs/heads/master | 2020-12-05T23:03:53.736991 | 2020-01-07T07:43:28 | 2020-01-07T07:43:28 | 232,271,192 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,356 | java | /*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.cameraview.demo;
/**
* @创建者 ly
* @创建时间 2019/4/15
* @描述 ${TODO}
* @更新者 $Author$
* @更新时间 $Date$
* @更新描述 ${TODO}
*/
public class Response<T> {
private int code; // 返回的code
private T data; // 具体的数据结果
private String msg; // message 可用来返回接口的说明
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
} | [
"ly490099@163.com"
] | ly490099@163.com |
8eab506bb2a25890ce98659db69f5504e2ae4a6f | 5ec76201d1717f95d5f77c8d0d183f35b33ad1a6 | /src/main/java/com/scm/gsoft/dao/inv/MaebodDetDaoImpl.java | 0d4607754e6e0a8c57ecb1f16872db0089e1463c | [] | no_license | KevinMendez7/G-Soft | 7da92a5a722d629a1ddef6c53f6d667514134314 | 0f43c2c5094dc5c55afbc8e9d3f4d0fc101ab873 | refs/heads/master | 2020-03-28T18:17:28.018515 | 2018-09-15T04:31:54 | 2018-09-15T04:31:54 | 148,868,460 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,347 | java | package com.scm.gsoft.dao.inv;
// Generated 26/08/2018 02:38:20 AM by Hibernate Tools 4.3.1
import java.util.List;
import javax.transaction.Transactional;
import org.springframework.stereotype.Repository;
import com.scm.gsoft.domain.inv.MaebodDet;
@Repository
@Transactional
public class MaebodDetDaoImpl extends AbstractSession implements MaebodDetDao {
@Override
public List<MaebodDet> getMaebodDetList(){
return (List<MaebodDet>) getCxcSession().createQuery("from MaebodDet").list();
}
@Override
public MaebodDet getMaebodDetById(Long idMaebodDet) {
// TODO Auto-generated method stub
return getCxcSession().get(MaebodDet.class, idMaebodDet);
}
@Override
public MaebodDet getMaebodDetByName(String nameMaebodDet) {
// TODO Auto-generated method stub
return (MaebodDet) getCxcSession().createQuery("from MaebodDet where nombre = :nameMaebodDet")
.setParameter("nameMaebodDet", nameMaebodDet).uniqueResult();
}
@Override
public void updateMaebodDet(MaebodDet maebodDet) {
getCxcSession().update(maebodDet);
}
@Override
public void createMaebodDet(MaebodDet maebodDet) {
getCxcSession().persist(maebodDet);
}
@Override
public void removeMaebodDet(Long idMaebodDet) {
MaebodDet maebodDet = getMaebodDetById(idMaebodDet);
if(maebodDet != null) {
getCxcSession().delete(maebodDet);
}
}
}
| [
"kevin_33_6@hotmail.com"
] | kevin_33_6@hotmail.com |
cfc820994c5599a47416d84ebcf8ca6abe6b2239 | b33483b3325a927d2fe281100fd46059650e3e20 | /component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/primitive/FloatPanelFactory.java | 8c946c28961b412723e97e7a3f900930db656ccb | [
"Apache-2.0"
] | permissive | alesj/isis | a9af7a8fa10ecfbc73f6def194eec2a93a0730af | 2bda80b88be3e804b0fbb8966fa556cb1c87824e | refs/heads/master | 2020-05-29T11:46:41.853146 | 2013-11-14T09:28:46 | 2013-11-14T09:28:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,575 | 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.isis.viewer.wicket.ui.components.scalars.primitive;
import org.apache.wicket.Component;
import org.apache.isis.viewer.wicket.model.models.ScalarModel;
import org.apache.isis.viewer.wicket.ui.ComponentFactory;
import org.apache.isis.viewer.wicket.ui.components.scalars.ComponentFactoryScalarAbstract;
/**
* {@link ComponentFactory} for {@link FloatPanel}.
*/
public class FloatPanelFactory extends ComponentFactoryScalarAbstract {
private static final long serialVersionUID = 1L;
public FloatPanelFactory() {
super(float.class, Float.class);
}
@Override
public Component createComponent(final String id, final ScalarModel scalarModel) {
return new FloatPanel(id, scalarModel);
}
}
| [
"danhaywood@apache.org"
] | danhaywood@apache.org |
8f97416ffe47ac5c644051b4a179a083f95989c6 | 96a76448027a263736641a85092120eac6cdd32d | /2.JavaCore/src/com/javarush/task/task15/task1512/Solution.java | a49d02dcc485e3c3162c381e2c399efc032bc0fb | [] | no_license | MartyMcAir/JavaRushTasks | 74ae3c11ef26f28204281a56321857e561946e86 | 94d5a544c887ed9e30bd7852b4d3a51af4e67b34 | refs/heads/master | 2022-02-09T08:26:55.283068 | 2022-02-01T12:19:26 | 2022-02-01T12:19:26 | 193,566,393 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 922 | java | package com.javarush.task.task15.task1512;
/*
Максимально простой код-2
*/
public class Solution {
public static void main(String[] args) {
SiamCat simka = new SiamCat("Simka");
NakedCat nakedSimka = simka.shave();
}
public static class NakedCat {
// public NakedCat() {
// super();
// }
}
public static class NormalCat extends NakedCat {
public NormalCat() {
// super();
}
// В классе NormalCat должен существовать конструктор без параметров.
public NormalCat(String name) {
System.out.println("My name is " + name);
}
public NakedCat shave() {
return this;
}
}
public static class SiamCat extends NormalCat {
public SiamCat(String name) {
super(name);
}
}
}
| [
"oth-corp@yandex.ru"
] | oth-corp@yandex.ru |
1bfc9f17a49ac26d64950618be69c0d6ce0198d3 | 183931eedd8ed7ff685e22cb055f86f12a54d707 | /otus/preJava/m43/src/main/java/ru/otus/ReaderWriterTest.java | 9b7a710a1abc4700190d59abb3e1b0132d33ee5c | [] | no_license | cynepCTAPuk/headFirstJava | 94a87be8f6958ab373cd1640a5bdb9c3cc3bf166 | 7cb45f6e2336bbc78852d297ad3474fd491e5870 | refs/heads/master | 2023-08-16T06:51:14.206516 | 2023-08-08T16:44:11 | 2023-08-08T16:44:11 | 154,661,091 | 0 | 1 | null | 2023-01-06T21:32:31 | 2018-10-25T11:40:54 | Java | UTF-8 | Java | false | false | 1,135 | java | package ru.otus;
import java.io.*;
public class ReaderWriterTest {
private static final String FILES_TEST_PATH = "files/text.txt";
private static final String TEST_LINE = "text line";
public static void main(String[] args) {
ReaderWriterTest readerWriterTest = new ReaderWriterTest();
// readerWriterTest.writeToFile();
readerWriterTest.readFromFile();
}
public void writeToFile() {
try (BufferedWriter out = new BufferedWriter(
new FileWriter((FILES_TEST_PATH)))) {
out.write(TEST_LINE);
} catch (IOException e) {
e.printStackTrace();
}
}
public String readFromFile() {
try {
BufferedReader in =
new BufferedReader(
new FileReader(FILES_TEST_PATH));
String line = in.readLine();
System.out.println(line);
return in.readLine();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
}
| [
"CTAPuk@gmail.com"
] | CTAPuk@gmail.com |
8e593c82e2a5a982b8f2866acf374d7ec8f938b5 | ffef9612d9926e59cefba3c26975e3550d2fa165 | /open-metadata-implementation/access-services/subject-area/subject-area-api/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/properties/classifications/Classification.java | 778482a30e3355787d8838ce9230a33b9c2b62d7 | [
"Apache-2.0"
] | permissive | JPWKU/egeria | 250f4fbce58969751340c2c3bc1f9a11911dc04f | 4dc404fd1b077c39a90e50fb195fb4977314ba5c | refs/heads/master | 2020-03-31T23:36:14.988487 | 2018-10-10T20:43:22 | 2018-10-10T20:43:22 | 152,662,400 | 0 | 0 | Apache-2.0 | 2018-10-11T22:17:19 | 2018-10-11T22:17:19 | null | UTF-8 | Java | false | false | 1,914 | java | /* SPDX-License-Identifier: Apache-2.0 */
package org.odpi.openmetadata.accessservices.subjectarea.properties.classifications;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.SystemAttributes;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
/**
* A Classification
*/
@JsonAutoDetect(getterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, setterVisibility= JsonAutoDetect.Visibility.PUBLIC_ONLY, fieldVisibility= JsonAutoDetect.Visibility.NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=true)
@XmlRootElement
@XmlAccessorType(XmlAccessType.PROPERTY)
abstract public class Classification implements Serializable {
protected static final long serialVersionUID = 1L;
public static long getSerialVersionUID() {
return serialVersionUID;
}
//system attributes
private SystemAttributes systemAttributes = null;
protected String classificationName = null;
/**
* Get the core attributes
* @return core attributes
*/
public SystemAttributes getSystemAttributes() {
return systemAttributes;
}
public void setSystemAttributes(SystemAttributes systemAttributes) {
this.systemAttributes = systemAttributes;
}
public String getClassificationName() {
return this.classificationName;
}
abstract public InstanceProperties obtainInstanceProperties();
}
| [
"david_radley@uk.ibm.com"
] | david_radley@uk.ibm.com |
387d649eeeee5897fbed542e27268d7760a04058 | e82c1473b49df5114f0332c14781d677f88f363f | /MED-CLOUD/med-data/src/main/java/nta/med/data/model/ihis/bass/LoadCbxLanguageInfo.java | f39df1d8f67c08f37b664144b785da0414c7eefa | [] | no_license | zhiji6/mih | fa1d2279388976c901dc90762bc0b5c30a2325fc | 2714d15853162a492db7ea8b953d5b863c3a8000 | refs/heads/master | 2023-08-16T18:35:19.836018 | 2017-12-28T09:33:19 | 2017-12-28T09:33:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,386 | java | package nta.med.data.model.ihis.bass;
import java.math.BigDecimal;
import java.sql.Timestamp;
public class LoadCbxLanguageInfo {
private Integer propertyId;
private String propertyCode;
private String propertyName;
private String propertyValue;
private String propertyType;
private String moduleType;
private BigDecimal defaultFlg;
private Integer sortNo;
private String description;
private String locale;
private String sysId;
private String updId;
private Timestamp created;
private Timestamp updated;
private BigDecimal activeFlg;
public LoadCbxLanguageInfo(Integer propertyId, String propertyCode, String propertyName, String propertyValue,
String propertyType, String moduleType, BigDecimal defaultFlg, Integer sortNo, String description,
String locale, String sysId, String updId, Timestamp created, Timestamp updated, BigDecimal activeFlg) {
super();
this.propertyId = propertyId;
this.propertyCode = propertyCode;
this.propertyName = propertyName;
this.propertyValue = propertyValue;
this.propertyType = propertyType;
this.moduleType = moduleType;
this.defaultFlg = defaultFlg;
this.sortNo = sortNo;
this.description = description;
this.locale = locale;
this.sysId = sysId;
this.updId = updId;
this.created = created;
this.updated = updated;
this.activeFlg = activeFlg;
}
public Integer getPropertyId() {
return propertyId;
}
public void setPropertyId(Integer propertyId) {
this.propertyId = propertyId;
}
public String getPropertyCode() {
return propertyCode;
}
public void setPropertyCode(String propertyCode) {
this.propertyCode = propertyCode;
}
public String getPropertyName() {
return propertyName;
}
public void setPropertyName(String propertyName) {
this.propertyName = propertyName;
}
public String getPropertyValue() {
return propertyValue;
}
public void setPropertyValue(String propertyValue) {
this.propertyValue = propertyValue;
}
public String getPropertyType() {
return propertyType;
}
public void setPropertyType(String propertyType) {
this.propertyType = propertyType;
}
public String getModuleType() {
return moduleType;
}
public void setModuleType(String moduleType) {
this.moduleType = moduleType;
}
public BigDecimal getDefaultFlg() {
return defaultFlg;
}
public void setDefaultFlg(BigDecimal defaultFlg) {
this.defaultFlg = defaultFlg;
}
public Integer getSortNo() {
return sortNo;
}
public void setSortNo(Integer sortNo) {
this.sortNo = sortNo;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getLocale() {
return locale;
}
public void setLocale(String locale) {
this.locale = locale;
}
public String getSysId() {
return sysId;
}
public void setSysId(String sysId) {
this.sysId = sysId;
}
public String getUpdId() {
return updId;
}
public void setUpdId(String updId) {
this.updId = updId;
}
public Timestamp getCreated() {
return created;
}
public void setCreated(Timestamp created) {
this.created = created;
}
public Timestamp getUpdated() {
return updated;
}
public void setUpdated(Timestamp updated) {
this.updated = updated;
}
public BigDecimal getActiveFlg() {
return activeFlg;
}
public void setActiveFlg(BigDecimal activeFlg) {
this.activeFlg = activeFlg;
}
}
| [
"duc_nt@nittsusystem-vn.com"
] | duc_nt@nittsusystem-vn.com |
0c4e816e1a5d96d0aaef2b2188840d065bd1dcab | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/serge-rider--dbeaver/0a22891949cff7f77d9bf2a1c0b1559637f13e71/after/MySQLTableManager.java | b68ee26c5ef7c153f6844fd8cc078403ac2602e8 | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,867 | java | /*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2016 Serge Rieder (serge@jkiss.org)
* Copyright (C) 2011-2012 Eugene Fradkin (eugene.fradkin@gmail.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License (version 2)
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package org.jkiss.dbeaver.ext.mysql.edit;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.edit.DBEPersistAction;
import org.jkiss.dbeaver.ext.mysql.model.*;
import org.jkiss.dbeaver.model.DBConstants;
import org.jkiss.dbeaver.model.DBUtils;
import org.jkiss.dbeaver.model.edit.DBECommandContext;
import org.jkiss.dbeaver.model.edit.DBEObjectRenamer;
import org.jkiss.dbeaver.model.exec.DBCException;
import org.jkiss.dbeaver.model.impl.DBSObjectCache;
import org.jkiss.dbeaver.model.impl.edit.SQLDatabasePersistAction;
import org.jkiss.dbeaver.model.impl.sql.edit.struct.SQLTableManager;
import org.jkiss.dbeaver.model.runtime.VoidProgressMonitor;
import org.jkiss.dbeaver.model.sql.SQLUtils;
import java.util.List;
/**
* MySQL table manager
*/
public class MySQLTableManager extends SQLTableManager<MySQLTableBase, MySQLCatalog> implements DBEObjectRenamer<MySQLTableBase> {
private static final Class<?>[] CHILD_TYPES = {
MySQLTableColumn.class,
MySQLTableConstraint.class,
MySQLTableForeignKey.class,
MySQLTableIndex.class
};
@Nullable
@Override
public DBSObjectCache<MySQLCatalog, MySQLTableBase> getObjectsCache(MySQLTableBase object)
{
return object.getContainer().getTableCache();
}
@Override
protected MySQLTable createDatabaseObject(DBECommandContext context, MySQLCatalog parent, Object copyFrom)
{
final MySQLTable table = new MySQLTable(parent);
try {
setTableName(parent, table);
final MySQLTable.AdditionalInfo additionalInfo = table.getAdditionalInfo(VoidProgressMonitor.INSTANCE);
additionalInfo.setEngine(parent.getDataSource().getDefaultEngine());
additionalInfo.setCharset(parent.getDefaultCharset());
additionalInfo.setCollation(parent.getDefaultCollation());
} catch (DBException e) {
// Never be here
log.error(e);
}
return table;
}
@Override
protected void addObjectModifyActions(List<DBEPersistAction> actionList, ObjectChangeCommand command)
{
StringBuilder query = new StringBuilder("ALTER TABLE "); //$NON-NLS-1$
query.append(command.getObject().getFullQualifiedName()).append(" "); //$NON-NLS-1$
appendTableModifiers(command.getObject(), command, query);
actionList.add(
new SQLDatabasePersistAction(query.toString())
);
}
@Override
protected void appendTableModifiers(MySQLTableBase tableBase, NestedObjectCommand tableProps, StringBuilder ddl)
{
if (tableBase instanceof MySQLTable) {
MySQLTable table =(MySQLTable)tableBase;
try {
final MySQLTable.AdditionalInfo additionalInfo = table.getAdditionalInfo(VoidProgressMonitor.INSTANCE);
if ((!table.isPersisted() || tableProps.getProperty("engine") != null) && additionalInfo.getEngine() != null) { //$NON-NLS-1$
ddl.append("\nENGINE=").append(additionalInfo.getEngine().getName()); //$NON-NLS-1$
}
if ((!table.isPersisted() || tableProps.getProperty("charset") != null) && additionalInfo.getCharset() != null) { //$NON-NLS-1$
ddl.append("\nDEFAULT CHARSET=").append(additionalInfo.getCharset().getName()); //$NON-NLS-1$
}
if ((!table.isPersisted() || tableProps.getProperty("collation") != null) && additionalInfo.getCollation() != null) { //$NON-NLS-1$
ddl.append("\nCOLLATE=").append(additionalInfo.getCollation().getName()); //$NON-NLS-1$
}
if ((!table.isPersisted() || tableProps.getProperty(DBConstants.PROP_ID_DESCRIPTION) != null) && table.getDescription() != null) {
ddl.append("\nCOMMENT='").append(SQLUtils.escapeString(table.getDescription())).append("'"); //$NON-NLS-1$ //$NON-NLS-2$
}
if ((!table.isPersisted() || tableProps.getProperty("autoIncrement") != null) && additionalInfo.getAutoIncrement() > 0) { //$NON-NLS-1$
ddl.append("\nAUTO_INCREMENT=").append(additionalInfo.getAutoIncrement()); //$NON-NLS-1$
}
} catch (DBCException e) {
log.error(e);
}
}
}
@Override
protected void addObjectRenameActions(List<DBEPersistAction> actions, ObjectRenameCommand command)
{
final MySQLDataSource dataSource = command.getObject().getDataSource();
actions.add(
new SQLDatabasePersistAction(
"Rename table",
"RENAME TABLE " + command.getObject().getFullQualifiedName() + //$NON-NLS-1$
" TO " + DBUtils.getQuotedIdentifier(command.getObject().getContainer()) + "." + DBUtils.getQuotedIdentifier(dataSource, command.getNewName())) //$NON-NLS-1$
);
}
@Override
public Class<?>[] getChildTypes()
{
return CHILD_TYPES;
}
@Override
public void renameObject(DBECommandContext commandContext, MySQLTableBase object, String newName) throws DBException
{
processObjectRename(commandContext, object, newName);
}
/*
public ITabDescriptor[] getTabDescriptors(IWorkbenchWindow workbenchWindow, final IDatabaseEditor activeEditor, final MySQLTable object)
{
if (object.getContainer().isSystem()) {
return null;
}
return new ITabDescriptor[] {
new PropertyTabDescriptor(
PropertiesContributor.CATEGORY_INFO,
"table.ddl", //$NON-NLS-1$
"DDL", //$NON-NLS-1$
DBIcon.SOURCES.getImage(),
new SectionDescriptor("default", "DDL") { //$NON-NLS-1$ //$NON-NLS-2$
public ISection getSectionClass()
{
return new MySQLDDLViewEditor(activeEditor);
}
})
};
}
*/
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
2e7e7bf184a077675b6e31cd584164a4a8ea465c | 69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e | /methods/Method_34009.java | b97215a33778e96a7f359555079b3f63642b11a2 | [] | 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 | 244 | java | public static boolean isOAuthConsumerAuth(SecurityExpressionRoot root){
Authentication authentication=root.getAuthentication();
if (authentication.getDetails() instanceof OAuthAuthenticationDetails) {
return true;
}
return false;
}
| [
"sonnguyen@utdallas.edu"
] | sonnguyen@utdallas.edu |
ea6bb7e3f41a0dd41982a1c8433ba4e12b6b8480 | 0874d515fb8c23ae10bf140ee5336853bceafe0b | /l2j-universe-lindvior/Lindvior Source/gameserver/src/main/java/l2p/gameserver/stats/conditions/ConditionPlayerPercentMp.java | 0364b77af12983dad77695ef72b2cb851e7eaa28 | [] | no_license | NotorionN/l2j-universe | 8dfe529c4c1ecf0010faead9e74a07d0bc7fa380 | 4d05cbd54f5586bf13e248e9c853068d941f8e57 | refs/heads/master | 2020-12-24T16:15:10.425510 | 2013-11-23T19:35:35 | 2013-11-23T19:35:35 | 37,354,291 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 378 | java | package l2p.gameserver.stats.conditions;
import l2p.gameserver.stats.Env;
public class ConditionPlayerPercentMp extends Condition {
private final double _mp;
public ConditionPlayerPercentMp(int mp) {
_mp = mp / 100.;
}
@Override
protected boolean testImpl(Env env) {
return env.character.getCurrentMpRatio() <= _mp;
}
} | [
"jmendezsr@gmail.com"
] | jmendezsr@gmail.com |
97a0add1211ae96503c698bc860b55d359197fb8 | c474b03758be154e43758220e47b3403eb7fc1fc | /apk/decompiled/com.tinder_2018-07-26_source_from_JADX/sources/com/tinder/recsads/analytics/C14737g.java | 1a9281eecb6609895e4d1e89d7298c1f9e965a22 | [] | no_license | EstebanDalelR/tinderAnalysis | f80fe1f43b3b9dba283b5db1781189a0dd592c24 | 941e2c634c40e5dbf5585c6876ef33f2a578b65c | refs/heads/master | 2020-04-04T09:03:32.659099 | 2018-11-23T20:41:28 | 2018-11-23T20:41:28 | 155,805,042 | 0 | 0 | null | 2018-11-18T16:02:45 | 2018-11-02T02:44:34 | null | UTF-8 | Java | false | false | 996 | java | package com.tinder.recsads.analytics;
import com.tinder.addy.Ad;
import com.tinder.analytics.fireworks.C2630h;
import com.tinder.etl.event.EtlEvent;
import com.tinder.recsads.analytics.AdEventFields.C14729c;
import rx.Completable;
/* renamed from: com.tinder.recsads.analytics.g */
public abstract class C14737g<REQUEST> {
/* renamed from: a */
private final C14729c f46313a;
/* renamed from: b */
private final C2630h f46314b;
/* renamed from: a */
protected abstract EtlEvent mo12150a(REQUEST request, AdEventFields adEventFields);
public C14737g(C2630h c2630h, C14729c c14729c) {
this.f46314b = c2630h;
this.f46313a = c14729c;
}
/* renamed from: a */
public Completable m56002a(REQUEST request, Ad ad) {
return Completable.a(new C18776h(this, ad, request));
}
/* renamed from: a */
final /* synthetic */ void m56003a(Ad ad, Object obj) {
this.f46314b.a(mo12150a(obj, this.f46313a.m55978a(ad)));
}
}
| [
"jdguzmans@hotmail.com"
] | jdguzmans@hotmail.com |
12554f680e801c5d1dca04ed168f6a5da23d7e2a | 51934a954934c21cae6a8482a6f5e6c3b3bd5c5a | /output/60931e885d1e4baf8289644b627cd5c3.java | 625af8b5badcfa2c216c3f0ee0c4c1b436d430a6 | [
"MIT",
"Apache-2.0"
] | permissive | comprakt/comprakt-fuzz-tests | e8c954d94b4f4615c856fd3108010011610a5f73 | c0082d105d7c54ad31ab4ea461c3b8319358eaaa | refs/heads/master | 2021-09-25T15:29:58.589346 | 2018-10-23T17:33:46 | 2018-10-23T17:33:46 | 154,370,249 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,774 | java | class DIEIbNryynvo {
}
class f4cxM {
}
class xYwjn6bHx {
}
class hTSsr {
}
class RtERK6Hk {
}
class kSGjkRsGqbvDo {
public static void yk (String[] flHS) {
return !!!null[ !null.UoPt2m2zoSAjNo()];
int[] wL6i67_y;
int[][] ok70d3u;
boolean eCtVvRU;
;
boolean[][][][] fXc = this[ -( new y6kuv1HVgg()[ !!!!true[ jwYS()[ null[ false.L58Scx]]]]).YgzplCN] = H_Ol6ictxb1()[ true[ -HFdDZUC999S.aW6nIpK]];
{
void MOzu_VYhG9Zn;
MzFV3V1_Ssf1 HmHMycg;
;
true[ -ZICA()[ !!--_sX()[ !-!this.Pyp1U0Sk()]]];
S3XJ[][][] ToY;
int n_zAY6De17xs;
;
{
xx61UJ90u hbIVV;
}
qclpo7e a;
void[][][][] rTRsFCSi;
if ( -false.O()) if ( CVwJj().r84) {
{
boolean[] XzV;
}
}
{
void d;
}
int[] vcVV6x6FGU6M;
}
boolean IusU892;
while ( !17664.d()) while ( 9524.JtEcZlJESS) return;
void[][][] xA8WlsyqDe61Hj;
while ( this[ !new I()[ null.z7Pmen495UP()]]) {
int[][][][] FhWMR2wHJg2cT;
}
while ( this[ -!!-!--!d8()._OsEkXuoh5WNR()]) while ( -Xw.EREzrR) !false[ null.e];
void[][] Mk;
void O69hIxB = 083057934[ new int[ hcDw1.OIZ()].bYiFdcnLh_()] = ( !false.VtIyNI).FUEDGtbLFZ4to;
if ( !false.OxKJ) kla.r;
void[][][][] C4jb4DHXB;
}
public int[] p1CC2;
public boolean[] wc_rTf;
public static void dkZnl8a (String[] l1b) throws gqxwp {
return;
WfecLetVwX[][][][][] CzpYvq9Gj1iuqN = false.G00AOr6OySI() = !null.fj();
A_uT2AJ9h rQdgHQoyxiXjYX = null.YMSbR9JdwZs8 = new Z05GwNB().W3dVc;
void HKQbEpJRyxGgI = ( -null[ ( true.YpWsTBYMnFcc).BT_T6R()]).OY() = this.TMAOcZgBqrrN();
NPsaQ5a H4eUQ = !-uDfHT().Dm4;
boolean UJ;
;
if ( -false.N5c_6eSdH9fHy()) {
;
}else {
{
this.qBviv9kWjJTR;
}
}
void ST;
true.Y;
sx0GUlnaP15hhi[] sL00NZ5dc0aDD = !-this[ OnTdE5e7Sjb.lCAWl23Q()];
new boolean[ this[ !null.f()]].wjBegIgc;
new boolean[ !this.mC4jMWnswh()].xPvF();
while ( new int[ -!true.CN8UHXYVsc].op4dv) return;
{
if ( !!bBroDOd9YaDop4[ new void[ RhDazLPCSJI()[ -null[ -this[ !--null.dQ1FBaPDTBRDkB]]]][ null.e]]) if ( !-null[ -19413.De0()]) if ( true.YwU5nFv) return;
void iH3zkRvriiCkWk;
boolean Te;
;
{
true._pipA682hWz1Q_;
}
return;
boolean azu6UyDrD;
Y4xQAUC16RSCdZ a9dZHVOV9r;
return;
void xAncYk9YEIOwS;
{
{
void miV0hoc0;
}
}
VM[] v79;
EYBM[] SfYkN4tJbGoK;
wa mCMP6SbPzlAG4E;
void KhH;
Lnwv[] k2UXTHd;
}
;
void[] VxcMUokw = true.yNBbWXSUVUGS();
boolean[] OWfjcZYWR = -new MbDB5tYyT()[ new c4yhW()[ -new xhkcMKR4v9()[ new boolean[ 56.F1nxLot].rA5UoanI()]]] = this.cWsM_VRsGPSSX;
}
public vIDIlScyw Y (void[] RQKgAVz5, H8zWE[][] YzufaS5lr_Axx, int[] z3BDFszm0LM3Nn, void[] Qahy8k6m, boolean[][][][] q0UB4yd, int G6kioy2LK9W, boolean[][][][][] IEKuc0eiRn) {
{
int[][] XM0;
boolean doTPJhWD;
!this.drvwWeArer3P;
void[] HzsW_Yquo3peP;
int rs;
int Qey;
;
{
if ( null.p72b) while ( !!Yp2q[ RCf5mTVuyMetP[ ( -true.VoAp_f()).sr]]) while ( false.u9mEb7Fo3AKtX()) -this[ new boolean[ 90264604[ !--!tOTgm()[ false.pU]]][ -false.JpHAvJr]];
}
boolean FE2_qJz5;
;
;
void lXnUmzJa;
return;
while ( --new LdqUmF7CHpBna().V8OF6OzpA5ulb) return;
while ( 690.lK4oZpKdpNgl2O) ;
H[][][] aGQEJQIkmWJU;
if ( true.HIeh8Up4) while ( 44.WV()) -!true.S9nI_v();
pE9tzB[][] OMUMZUF6Jc9;
if ( -( -Idwvu[ new PqGYdb8JMyz6_0().wA()]).ibRdIjVa) false.N9g259_t5gS_H();
void rLXVYZdIcrFFD;
}
boolean z2ZSIlTMQ = !( -( null.XWi_GXYk6Yr).zNM9ObErjrR)[ this.G3OROo9Co];
{
boolean Q2sBiB6bB7U34q;
boolean[][][][] Zp5nSyx;
Uskba7UBrNsUkb JpJbxgGjaOz;
}
scVCSXZ2sq9Hy H7xn3;
while ( -new PmWw6KyaoGv().zQj6VTVoI) return;
void fjKnnrK = !--null.YsxsY;
iiUCjpDnB k2Aqaw96V = false[ ( 969427.h1exHq9).lBpEBwPKuMvLsm] = !this[ new BWr8Ef[ T().g][ ICG().JhOUFN7hAGET]];
dQt84Nq[] WLVPifj;
return null.gVVO();
while ( !--null.HALfh()) {
;
}
_3gM64ix[] jUx = ( this.WEiRkww7L()).q5C9;
HZcM eGIS4gAAn;
if ( this.nwind9IqC00()) return;else new L0esq46NXY[ kII4().kUeMRX()][ new boolean[ -false.hv][ new boolean[ -!-this.Dt].A_kQ_obGK]];
int[][][][][][][] fTQMHsWh;
;
true.f4BcYeR();
int YA = new void[ new boolean[ new void[ this[ !-true.HJa]].f()][ new dQ3R6UuKRiO().egb5ZQQh]].eEZPBtpV;
void[] d;
}
}
class gsf1g {
}
class FJtLzKrh {
public BobIxqo9 OFXQnt_fv;
public boolean E08nJTOG4tYk () {
if ( !true[ ----new int[ new nE[ R().jJh0OUb_t6()][ 300[ this[ c5gR()[ new KQH().O1Hj8A]]]]].GgHOxfVjALp()]) true.ZjoYg;else -true[ -!MnE7i.nLlhdV];
boolean QbIQGdWItneR;
while ( -!--!!true.c4HA3qmaZ9CNV) if ( !false[ c_EqV()[ new boolean[ ( F.G7RhP()).YN6J].YMyEGeR]]) if ( ( new int[ -!true[ !-new void[ true.BLP1yEmQ5L()][ true[ !--685625[ -!!!-!true.sudqkIhA()]]]]].k0eaad_FCpS3BE).PtkbmjGLROt) ;
int[][] bVibc72daom;
;
}
public int wuRGDTAbnr0D;
public int[][][] x (void w1Us73tXcaMiBo, int[][] hDJN, dh7aHOwnFiCDMA X2nlbFYasA, boolean[] w3udfZUcI6, void[] lCTN6WtspC, void oyUbZ_Jt0YnHYe, void hv7UnaNcMzDcrO) throws Z {
!-xx72n0H[ this.xtt6L0z7WNVVh5];
if ( !!new smxeWuw().MY0GYj) if ( -bVP().mZlf()) return;else while ( !-this[ null.omzVVplCh0h]) ;
while ( -null.hh()) !new int[ new d4r5eFbgG40wO().UF43cvGu][ RfApugFpvv.i_ngjarPsnxa()];
while ( !-o().p) while ( this.wOWbFfP8E7fBq) null[ false.r274vnOVY5h2sq()];
;
H[] Y = !false[ !true.QtIEOFjEsyUF];
while ( true.kF0rJLL3()) ;
if ( new N().ynbxsj0g()) while ( new boolean[ !!!this[ new void[ this[ !--this[ this.Dft68njE]]][ --!this[ -new mlD34EV().h()]]]].OThm3oJMM()) if ( -new k9mhB8FKZ().atweHKh) return;
return -new boolean[ new boolean[ !true.K_x5EC()].HUpPo9o][ -!new int[ null.XOF][ ( !!--!false.zh())[ -true.QGFtn2ViUSDJUS]]];
;
boolean AVx;
return;
void ZJqHSsA8b = !true.p91UBbz0 = !-new boolean[ !null.hle()][ --02127.xWJk];
;
}
public void giDUEQ;
public int[][] Dw10 (boolean R, AtIV NoMQ0EaopO, dR6ISxK9g8[][] Y_H, void[][][][][][][] sF, int[] hPjP, void[] pTrf, KunQpIW G48jVruTzp) {
--21.Yt();
void Bs8 = 57394695.a36N8ZoLe6qT69 = -( !-false[ wAkq2XJiMpSKuc.uDNb()]).t8dEaJKq();
int KsrOhLHOvDn = false[ this[ null.TkWTS7xY]];
pmhmNNkDgR d = new int[ true.HEFq7Z7xVu_o].rO0YmG = !!new int[ new boolean[ !null[ true[ new u53XU().xlie()]]][ new s4JIT3UaWLTqw().k8L5NKqg7Lh]][ new void[ dPVuO8nQfYA.y8f3XqbBIEO6].ag2AT];
!-t3Dh10dBLkTnk().UsSyLWQKDYHB;
void qHpS2Cm71M0aU_;
boolean sW;
int[] oY4GHAgCa4;
Sad2XCXsXPltB UtCi;
}
}
| [
"hello@philkrones.com"
] | hello@philkrones.com |
42bc5aca54972b99932d7a0301055a36a5d047b8 | 3b91ed788572b6d5ac4db1bee814a74560603578 | /com/tencent/mm/plugin/game/d/ab.java | b927776e9ed8505b0037fe3dcf6670d20036f61b | [] | no_license | linsir6/WeChat_java | a1deee3035b555fb35a423f367eb5e3e58a17cb0 | 32e52b88c012051100315af6751111bfb6697a29 | refs/heads/master | 2020-05-31T05:40:17.161282 | 2018-08-28T02:07:02 | 2018-08-28T02:07:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,463 | java | package com.tencent.mm.plugin.game.d;
import com.tencent.mm.bk.a;
public final class ab extends a {
public String jOU;
public int jQq;
protected final int a(int i, Object... objArr) {
int fQ;
if (i == 0) {
f.a.a.c.a aVar = (f.a.a.c.a) objArr[0];
aVar.fT(1, this.jQq);
if (this.jOU != null) {
aVar.g(2, this.jOU);
}
return 0;
} else if (i == 1) {
fQ = f.a.a.a.fQ(1, this.jQq) + 0;
if (this.jOU != null) {
return fQ + f.a.a.b.b.a.h(2, this.jOU);
}
return fQ;
} else if (i == 2) {
f.a.a.a.a aVar2 = new f.a.a.a.a((byte[]) objArr[0], unknownTagHandler);
for (fQ = a.a(aVar2); fQ > 0; fQ = a.a(aVar2)) {
if (!super.a(aVar2, this, fQ)) {
aVar2.cJS();
}
}
return 0;
} else if (i != 3) {
return -1;
} else {
f.a.a.a.a aVar3 = (f.a.a.a.a) objArr[0];
ab abVar = (ab) objArr[1];
switch (((Integer) objArr[2]).intValue()) {
case 1:
abVar.jQq = aVar3.vHC.rY();
return 0;
case 2:
abVar.jOU = aVar3.vHC.readString();
return 0;
default:
return -1;
}
}
}
}
| [
"707194831@qq.com"
] | 707194831@qq.com |
6cdd92dc684df2917011d9d1b75f0a3bb38c004f | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module0452_public/tests/more/src/java/module0452_public_tests_more/a/IFoo0.java | 91c6d4c3dfbd23d78c0f0d192ee95572d1c06294 | [
"BSD-3-Clause"
] | permissive | salesforce/bazel-ls-demo-project | 5cc6ef749d65d6626080f3a94239b6a509ef145a | 948ed278f87338edd7e40af68b8690ae4f73ebf0 | refs/heads/master | 2023-06-24T08:06:06.084651 | 2023-03-14T11:54:29 | 2023-03-14T11:54:29 | 241,489,944 | 0 | 5 | BSD-3-Clause | 2023-03-27T11:28:14 | 2020-02-18T23:30:47 | Java | UTF-8 | Java | false | false | 880 | java | package module0452_public_tests_more.a;
import java.nio.file.*;
import java.sql.*;
import java.util.logging.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see javax.annotation.processing.Completion
* @see javax.lang.model.AnnotatedConstruct
* @see javax.management.Attribute
*/
@SuppressWarnings("all")
public interface IFoo0<E> extends java.util.concurrent.Callable<E> {
javax.naming.directory.DirContext f0 = null;
javax.net.ssl.ExtendedSSLSession f1 = null;
javax.rmi.ssl.SslRMIClientSocketFactory f2 = null;
String getName();
void setName(String s);
E get();
void set(E e);
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
acb8a1205077c8bcdfa925dd51c114869875bd5e | 0a4f3711ed4d65105a2f4eee5f03e3c95ea90001 | /app/src/main/java/com/example/admin/dayone/MainActivity.java | 87f3aff6e70c28e5c6b1236785fc3a15da07dd5a | [] | no_license | abdultanveer/Dayone | 08206136253f83436cf5013ff2d55fcf164cb8cc | ba09963323bea35758f68441614c46e082f21de3 | refs/heads/master | 2020-04-17T03:02:50.230857 | 2019-02-12T22:34:48 | 2019-02-12T22:34:48 | 166,164,031 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,876 | java | package com.example.admin.dayone;
import android.content.ContentResolver;
import android.database.Cursor;
import android.net.Uri;
import android.speech.tts.TextToSpeech;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ProgressBar;
import android.widget.TextView;
import java.util.Locale;
import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity implements TextToSpeech.OnInitListener {
public static String TAG = MainActivity.class.getSimpleName();
TextToSpeech textToSpeech;
String sms;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textToSpeech = new TextToSpeech(MainActivity.this, this);
Log.i(TAG, "onCreate");
/*ProgressBar progressBar = findViewById(R.id.progressBar);
DownloadTask downloadTask = new DownloadTask(progressBar);
downloadTask.execute(Integer.valueOf(100));*/
Uri tableName = Uri.parse("content://sms/inbox");
//Step1: connect to the content provider
ContentResolver contentResolver = getContentResolver();
//step 2: query the content provider
Cursor cursor = contentResolver.query(tableName, null, null, null, null);
cursor.moveToFirst();
int bodyColumnIndex = cursor.getColumnIndexOrThrow("body");
sms = cursor.getString(bodyColumnIndex);
//step3: get the data from cursor and show in the textview
TextView smsTextView = findViewById(R.id.textViewSms);
smsTextView.setText(sms);
smsTextView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
textToSpeech.speak(sms,TextToSpeech.QUEUE_FLUSH,null);
}
});
}
@Override
protected void onStart() {
super.onStart();
Log.d(TAG, "onStart");
int c = add(10, 20);
}
@Override
protected void onResume() {
super.onResume();
Log.w(TAG, "onResume");
}
private int add(int a, int b) {
return a + b;
}
@Override
protected void onPause() {
super.onPause();
Log.e(TAG, "onPause");
}
@Override
protected void onStop() {
super.onStop();
}
@Override
public void onInit(int status) {
if (status == TextToSpeech.SUCCESS) {
int result = textToSpeech.setLanguage(Locale.US);
if (result == TextToSpeech.LANG_MISSING_DATA
|| result == TextToSpeech.LANG_NOT_SUPPORTED) {
Log.e("TTS", "This Language is not supported");
} else {
}
} else {
Log.e("TTS", "Initilization Failed!");
}
}
}
| [
"abdul.tanveer@gmail.com"
] | abdul.tanveer@gmail.com |
e0a75a1fe378d56716fda507d2b973e96eac578a | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a001/A001049Test.java | 5b9f12fc33f21e8978328a05a1342f1bab9225c9 | [] | no_license | flywind2/joeis | c5753169cf562939b04dd246f8a2958e97f74558 | e5efd6971a0062ac99f4fae21a7c78c9f9e74fea | refs/heads/master | 2020-09-13T18:34:35.080552 | 2019-11-19T05:40:55 | 2019-11-19T05:40:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 195 | java | package irvine.oeis.a001;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A001049Test extends AbstractSequenceTest {
}
| [
"sairvin@gmail.com"
] | sairvin@gmail.com |
8a239d48105c845f9ecfaa340b43b2fab625a4e9 | 58ad4ae44a50d93be80d1ea60dd911f089c3ba82 | /java-client/src/main/java/co/elastic/clients/elasticsearch/ingest/DissectProcessor.java | ef9e01bbd79b666ab67d836a202206ef3fcb3cfe | [
"Apache-2.0"
] | permissive | elastic/elasticsearch-java | ef6aa0c91f8cd45225ecb7e2ba20eb59180b5293 | b2b0e4708df2979d38c58abbb85e98edb2bb6c77 | refs/heads/main | 2023-08-16T11:01:11.676949 | 2023-08-11T17:03:54 | 2023-08-11T17:03:54 | 365,244,061 | 318 | 165 | Apache-2.0 | 2023-09-13T20:19:15 | 2021-05-07T13:34:18 | Java | UTF-8 | Java | false | false | 5,873 | java | /*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. 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.
*/
//----------------------------------------------------
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
//----------------------------------------------------
package co.elastic.clients.elasticsearch.ingest;
import co.elastic.clients.json.JsonpDeserializable;
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.ObjectBuilderDeserializer;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.util.ApiTypeHelper;
import co.elastic.clients.util.ObjectBuilder;
import jakarta.json.stream.JsonGenerator;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Nullable;
// typedef: ingest._types.DissectProcessor
/**
*
* @see <a href="../doc-files/api-spec.html#ingest._types.DissectProcessor">API
* specification</a>
*/
@JsonpDeserializable
public class DissectProcessor extends ProcessorBase implements ProcessorVariant {
@Nullable
private final String appendSeparator;
private final String field;
@Nullable
private final Boolean ignoreMissing;
private final String pattern;
// ---------------------------------------------------------------------------------------------
private DissectProcessor(Builder builder) {
super(builder);
this.appendSeparator = builder.appendSeparator;
this.field = ApiTypeHelper.requireNonNull(builder.field, this, "field");
this.ignoreMissing = builder.ignoreMissing;
this.pattern = ApiTypeHelper.requireNonNull(builder.pattern, this, "pattern");
}
public static DissectProcessor of(Function<Builder, ObjectBuilder<DissectProcessor>> fn) {
return fn.apply(new Builder()).build();
}
/**
* Processor variant kind.
*/
@Override
public Processor.Kind _processorKind() {
return Processor.Kind.Dissect;
}
/**
* API name: {@code append_separator}
*/
@Nullable
public final String appendSeparator() {
return this.appendSeparator;
}
/**
* Required - API name: {@code field}
*/
public final String field() {
return this.field;
}
/**
* API name: {@code ignore_missing}
*/
@Nullable
public final Boolean ignoreMissing() {
return this.ignoreMissing;
}
/**
* Required - API name: {@code pattern}
*/
public final String pattern() {
return this.pattern;
}
protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
super.serializeInternal(generator, mapper);
if (this.appendSeparator != null) {
generator.writeKey("append_separator");
generator.write(this.appendSeparator);
}
generator.writeKey("field");
generator.write(this.field);
if (this.ignoreMissing != null) {
generator.writeKey("ignore_missing");
generator.write(this.ignoreMissing);
}
generator.writeKey("pattern");
generator.write(this.pattern);
}
// ---------------------------------------------------------------------------------------------
/**
* Builder for {@link DissectProcessor}.
*/
public static class Builder extends ProcessorBase.AbstractBuilder<Builder>
implements
ObjectBuilder<DissectProcessor> {
@Nullable
private String appendSeparator;
private String field;
@Nullable
private Boolean ignoreMissing;
private String pattern;
/**
* API name: {@code append_separator}
*/
public final Builder appendSeparator(@Nullable String value) {
this.appendSeparator = value;
return this;
}
/**
* Required - API name: {@code field}
*/
public final Builder field(String value) {
this.field = value;
return this;
}
/**
* API name: {@code ignore_missing}
*/
public final Builder ignoreMissing(@Nullable Boolean value) {
this.ignoreMissing = value;
return this;
}
/**
* Required - API name: {@code pattern}
*/
public final Builder pattern(String value) {
this.pattern = value;
return this;
}
@Override
protected Builder self() {
return this;
}
/**
* Builds a {@link DissectProcessor}.
*
* @throws NullPointerException
* if some of the required fields are null.
*/
public DissectProcessor build() {
_checkSingleUse();
return new DissectProcessor(this);
}
}
// ---------------------------------------------------------------------------------------------
/**
* Json deserializer for {@link DissectProcessor}
*/
public static final JsonpDeserializer<DissectProcessor> _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new,
DissectProcessor::setupDissectProcessorDeserializer);
protected static void setupDissectProcessorDeserializer(ObjectDeserializer<DissectProcessor.Builder> op) {
ProcessorBase.setupProcessorBaseDeserializer(op);
op.add(Builder::appendSeparator, JsonpDeserializer.stringDeserializer(), "append_separator");
op.add(Builder::field, JsonpDeserializer.stringDeserializer(), "field");
op.add(Builder::ignoreMissing, JsonpDeserializer.booleanDeserializer(), "ignore_missing");
op.add(Builder::pattern, JsonpDeserializer.stringDeserializer(), "pattern");
}
}
| [
"sylvain@elastic.co"
] | sylvain@elastic.co |
7bdfe834f937df724ecbf2123d7521706ba01e7b | 6437240eddd7c33372fccab081395d4c6d45aa92 | /ConsultoraNaturaAntigo2/consultoraNatura2/src/main/java/repcom/tela/listaedicao/base/PrecoProdutoListaEdicaoBase.java | 141a19fcf187a0411b19b73ce616b28e8ad0d980 | [] | no_license | paulofor/projeto-android-aplicacao | 49a530533496ec4a11dcb0a86ed9e9b75f2f9a4a | 2aa9c244a830f12cf120f45727d7474203619c59 | refs/heads/master | 2021-01-05T06:04:29.225920 | 2020-02-16T14:45:25 | 2020-02-16T14:45:25 | 240,908,240 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,641 | java |
package repcom.tela.listaedicao.base;
import repcom.app.R;
import repcom.modelo.*;
import repcom.modelo.agregado.*;
import repcom.servico.*;
import repcom.view.adapter.PrecoProdutoListAdapter;
import repcom.view.adapter.listaedicao.PrecoProdutoListEdicaoAdapter;
import repcom.modelo.vo.FabricaVo;
import repcom.servico.PrecoProdutoServico;
import android.widget.BaseAdapter;
import java.util.List;
import br.com.digicom.quadro.*;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.ListView;
import android.widget.Button;
import br.com.digicom.multimidia.AudioRecurso;
import br.com.digicom.activity.DigicomContexto;
import br.com.digicom.log.DCLog;
import br.com.digicom.layout.ResourceObj;
import br.com.digicom.animacao.TrocaQuadro;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.util.Log;
import br.com.digicom.modelo.DCIObjetoDominio;
import br.com.digicom.servico.ServicoLocal;
public abstract class PrecoProdutoListaEdicaoBase extends BaseListFragment implements IQuadroListaEdicao
{
public final static String ITEM_CLICK = "PrecoProdutoItemClick";
private PrecoProdutoListEdicaoAdapter adapt = null;
private List<PrecoProduto> lista = null;
private Button btnCriaItem = null;
private boolean salvaPreliminar = false;
private PrecoProdutoServico servico = null;
public BaseAdapter getAdapter() {
return adapt;
}
protected void setSalvaPreliminar(boolean valor) {
salvaPreliminar = valor;
}
protected PrecoProdutoServico getServico() {
return servico;
}
@Override
protected final void inicializaItensTelaBase() {
btnCriaItem = (Button) getTela().findViewById(R.id.btnCriaPrecoProduto);
}
@Override
protected final void inicializaListenersBase() {
btnCriaItem.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
chamaCriaItem();
}
});
}
@Override
protected final void inicializaServicosBase() {
servico = FabricaServico.getInstancia().getPrecoProdutoServico(FabricaServico.TIPO_SQLITE);
}
@Override
public void onToqueLongoTela(DCIObjetoDominio obj) {
IFragmentEdicao quadro = criaQuadroTrata();
quadro.setItem(obj);
quadro.setAlteracao();
this.alteraQuadro(quadro);
}
protected void atualizaListaTela() {
preencheLista(); // Talvez nao precise fazer isso sempre j? que existe o adapt.notifyDataSetChanged
adapt.notifyDataSetChanged(); // Colocar dentro do preencheLista ?
}
@Override
public void audioRawConcluido(AudioRecurso audioRecurso) {
}
protected String getPalavraChave() {
return ITEM_CLICK;
}
public void onStart() {
super.onStart();
atualizaListaTela();
// Ao se conhecer melhor o ciclo de vida dos fragments pensar em otimizar esse trecho
// evitar processar algo que n?o muda e evitar n?o processar algo que muda.
// Fazendo um algoritmo que sirva para fragments de smartphone, que fica um por tela
// Quanto de tablet que pode ficar mais de um
// Decidir ate 28-06-2014
}
@Override
protected ResourceObj getLayoutTela() {
ResourceObj recurso = new ResourceObj(R.layout.lista_preco_produto,"R.layout.lista_preco_produto");
return recurso;
}
// Dois metodos com mesmo objetivo. Excluir at? 21-07-2015 ( 3 meses )
// TelaListaUsoBase, TelaQuadroListaBase, ViewBase, TelaListaEdicaoBase
@Override
@Deprecated
public final ResourceObj getRecurso() {
return this.getLayoutTela();
}
// Delegando a cria??o de objeto ao inicializaItemTela na camada servico
public final void chamaCriaItem() {
IFragmentEdicao quadro = criaQuadroTrata();
//PrecoProduto nova = servico.inicializaItemTela(getContext());
PrecoProduto nova = FabricaVo.criaPrecoProduto();
nova = insereObjetoPrincipal(nova);
nova = (PrecoProduto) ((ServicoLocal)servico).atribuiUsuario(nova);
nova = servico.inicializaItemTela(nova,getContext());
quadro.setItem(nova);
if (salvaPreliminar) {
quadro.setAlteracao();
} else {
quadro.setInsercao();
}
this.alteraQuadro(quadro);
}
/*
protected PrecoProduto criaNova() {
return servico.inicializaItemTela(getContext());
//throw new UnsupportedOperationException("Fazer override de criaNova em PrecoProdutoQuadroLista retornando new PrecoProduto com inicializa??o de listas internas se necessario");
// Exemplo - Criar inicializando dados e listas internas
protected SerieTreino criaNova() {
SerieTreino nova = FabricaVo.criaSerieTreino();
nova.setDataInicial(UtilDatas.getTimestampAtual());
List<ItemSerie> lista = new ArrayList<ItemSerie>();
nova.setListaItemSerie_Possui(lista);
return nova;
}
}
*/
protected IFragmentEdicao criaQuadroTrata() {
throw new UnsupportedOperationException("Fazer override de criaQuadroTrata em PrecoProdutoListaEdicao retornando new PrecoProdutoQuadroTrata ou verificar se nao esta sendo chamada via super");
}
@Override
public void onToqueTela(DCIObjetoDominio obj) {
}
@Override
protected void inicializaItensTela() {
}
@Override
protected void inicializaListeners() {
}
@Override
protected void inicializaServicos() {
}
@Override
public void onAlteraQuadro() {
}
private void preencheLista() {
//ListView lista = (ListView) getActivity().findViewById(R.id.listViewPrincipal);
PrecoProdutoServico servico = FabricaServico.getInstancia().getPrecoProdutoServico(FabricaServico.TIPO_SQLITE);
DigicomContexto dContexto = getContext();
lista = getListaCorrente(dContexto.getContext(),servico);
DCLog.d(DCLog.SERVICO_QUADRO_LISTA, this, "preencheLista : List<PrecoProduto> -> " + lista.size() + " itens");
// Pode ser necessario um adapter customizado (diferenciar o editar e usar)
adapt = getAdapter(lista, dContexto);
//adapt.setRaiz(this);
setListAdapter(adapt);
}
private PrecoProdutoListEdicaoAdapter getAdapter(List<PrecoProduto> lista,DigicomContexto dContexto) {
return new PrecoProdutoListEdicaoAdapter(lista,this,dContexto.getContext());
}
public void alteraQuadro(IFragment quadro) {
TrocaQuadro.getInstancia().alteraQuadroListaParaDetalhe(quadro,getActivity());
}
private PrecoProduto insereObjetoPrincipal(PrecoProduto item) {
return item;
}
protected List<PrecoProduto> getListaCorrente(Context contexto,PrecoProdutoServico servico) {
List<PrecoProduto> saida = servico.getAllTela(contexto);
return saida;
}
} | [
"paulofore@gmail.com"
] | paulofore@gmail.com |
9f84562c2708bb3d8aab699940fb8ec0b7c50c8e | 68b0c58f9678f1994ef0ced908a427dfd5d0f33f | /StacksImplementationWithArrays/src/com/pankaj/algorithms/stacks/Main.java | 71e5257f7921c60d851053416280fcd5d338063e | [] | no_license | PankajSAgarwal/DataStructureAndAlgorithms | 9a32451059daf224a1592a4152eba517c59af728 | cd6129264e0cb370528806818fa2984e9ca785df | refs/heads/master | 2020-11-27T16:04:16.250094 | 2020-01-25T04:47:51 | 2020-01-25T04:47:51 | 229,522,107 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 723 | java | package com.pankaj.algorithms.stacks;
public class Main {
public static void main(String[] args) {
ArrayStack stack = new ArrayStack(10);
// push employees into stack
stack.push(new Employee("Jane","Jones",123));
stack.push(new Employee("John","Doe",4567));
stack.push(new Employee("Mary","Smith",22));
stack.push(new Employee("Mike","Wilson",3245));
stack.push(new Employee("Bill","End",78));
//stack.printStack();
// peek the top element in stack
System.out.println(stack.peek());
// Pop
System.out.println("Popped: " + stack.pop() );
System.out.println(stack.peek());
stack.printStack();
}
}
| [
"2005pank@gmail.com"
] | 2005pank@gmail.com |
eb3c640003784cdb6ce0b00d1edbe3dbc26e3704 | f3dbf320393f51bc76d277a3cb10c5f30f6cb474 | /spring-boot-only/spring-bank-customers-service/src/main/java/com/test/bank/branch/web/AccountController.java | 25ca9af49a62c412bc034de359bd103bd9981b2a | [] | no_license | rakeshpriyad/spring-microservices | 913f5784f4647a15a42f37ab3a0d4761285a1695 | ec5490cc90d3c4bdeed730d8c5e3006489198877 | refs/heads/master | 2022-07-18T03:11:57.066969 | 2020-07-21T11:25:15 | 2020-07-21T11:25:15 | 229,564,895 | 0 | 0 | null | 2022-06-29T23:30:56 | 2019-12-22T12:33:57 | Java | UTF-8 | Java | false | false | 2,353 | java | package com.test.bank.branch.web;
import com.test.bank.branch.model.AccountRepository;
import com.test.bank.branch.service.AccountService;
import io.micrometer.core.annotation.Timed;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import com.test.bank.branch.model.Account;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.List;
import java.util.Optional;
/**
*/
@RequestMapping("/account")
@RestController
@RequiredArgsConstructor
@Slf4j
public class AccountController {
//@Autowired
//private AccountRepository accountRepository;
private AccountService accountService;
@Autowired
public AccountController(AccountService accountService){
this.accountService = accountService;
}
/**
* Create Account
*/
@PostMapping
@ResponseStatus(HttpStatus.CREATED)
public Account createAccount(@Valid @RequestBody Account account) {
return accountService.save.apply(account);
}
/**
* Read single Account
*/
@GetMapping(value = "/{accountId}")
public Optional<Account> findAccount(@PathVariable("accountId") int accountId) {
return accountService.findById.apply(accountId);
}
/**
* Read List of Accounts
*/
@GetMapping
public List<Account> findAll() {
Integer i =accountService.sum.apply(5,7);
accountService.sayHelloMsg.accept("Rajesh");
return accountService.findAll.get();
}
/**
* Update Owner
*/
@PutMapping(value = "/{accountId}")
@ResponseStatus(HttpStatus.NO_CONTENT)
public void updateAccount(@PathVariable("accountId") int accountId, @Valid @RequestBody AccountRequest accountRequest) {
final Optional<Account> account = accountService.findById.apply(accountId);
final Account accountModel = account.orElseThrow(() -> new ResourceNotFoundException("Customer "+accountId+" not found"));
// This is done by hand for simplicity purpose. In a real life use-case we should consider using MapStruct.
accountModel.setAccountNo(accountRequest.getAccountNo());
log.info("Saving Account {}", accountModel);
accountService.save.apply(accountModel);
}
}
| [
"rakeshpriyad@gmail.com"
] | rakeshpriyad@gmail.com |
3a3b3d9ab67aee7517d3058f09ae0c6254d3b461 | 3b6a37e4ce71f79ae44d4b141764138604a0f2b9 | /phloc-schematron/jing/src/main/java/com/thaiopensource/validate/nvdl/SchemaReceiverImpl.java | 9cde35942519632734c3dab470fed0340471d200 | [
"Apache-2.0"
] | permissive | lsimons/phloc-schematron-standalone | b787367085c32e40d9a4bc314ac9d7927a5b83f1 | c52cb04109bdeba5f1e10913aede7a855c2e9453 | refs/heads/master | 2021-01-10T21:26:13.317628 | 2013-09-13T12:18:02 | 2013-09-13T12:18:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,575 | java | package com.thaiopensource.validate.nvdl;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import javax.xml.transform.sax.SAXSource;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import com.thaiopensource.util.PropertyId;
import com.thaiopensource.util.PropertyMap;
import com.thaiopensource.util.PropertyMapBuilder;
import com.thaiopensource.validate.IncorrectSchemaException;
import com.thaiopensource.validate.Option;
import com.thaiopensource.validate.Schema;
import com.thaiopensource.validate.SchemaReader;
import com.thaiopensource.validate.ValidateProperty;
import com.thaiopensource.validate.auto.AutoSchemaReader;
import com.thaiopensource.validate.auto.SchemaFuture;
import com.thaiopensource.validate.auto.SchemaReceiver;
import com.thaiopensource.validate.auto.SchemaReceiverFactory;
import com.thaiopensource.validate.prop.wrap.WrapProperty;
import com.thaiopensource.validate.rng.CompactSchemaReader;
import com.thaiopensource.validate.rng.SAXSchemaReader;
import com.thaiopensource.xml.util.Name;
/**
* Schema receiver implementation for NVDL scripts.
*/
class SchemaReceiverImpl implements SchemaReceiver
{
/**
* Relax NG schema for NVDL scripts.
*/
private static final String NVDL_SCHEMA = "nvdl.rng";
/**
* The type used for specifying RNC schemas.
*/
private static final String RNC_MEDIA_TYPE = "application/relax-ng-compact-syntax";
/**
* Legacy type used for specifying RNC schemas.
*/
static final String LEGACY_RNC_MEDIA_TYPE = "application/x-rnc";
/**
* Properties.
*/
private final PropertyMap properties;
/**
* Property indicating if we need to check only attributes, that means the
* root element is just a placeholder for the attributes.
*/
private final Name attributeOwner;
/**
* The schema reader capable of parsing the input schema file. It will be an
* auto schema reader as NVDL is XML.
*/
private final SchemaReader autoSchemaReader;
/**
* Schema object created by this schema receiver.
*/
private Schema nvdlSchema = null;
/**
* Properties that will be passed to sub-schemas.
*/
private static final PropertyId subSchemaProperties[] = { ValidateProperty.ERROR_HANDLER,
ValidateProperty.XML_READER_CREATOR,
ValidateProperty.ENTITY_RESOLVER,
ValidateProperty.URI_RESOLVER,
ValidateProperty.RESOLVER,
SchemaReceiverFactory.PROPERTY, };
/**
* Creates a schema receiver for NVDL schemas.
*
* @param properties
* Properties.
*/
public SchemaReceiverImpl (final PropertyMap properties)
{
this.attributeOwner = properties.get (WrapProperty.ATTRIBUTE_OWNER);
final PropertyMapBuilder builder = new PropertyMapBuilder ();
for (final PropertyId subSchemaPropertie : subSchemaProperties)
{
final Object value = properties.get (subSchemaPropertie);
if (value != null)
builder.put (subSchemaPropertie, value);
}
this.properties = builder.toPropertyMap ();
this.autoSchemaReader = new AutoSchemaReader (properties.get (SchemaReceiverFactory.PROPERTY));
}
public SchemaFuture installHandlers (final XMLReader xr)
{
final PropertyMapBuilder builder = new PropertyMapBuilder (properties);
if (attributeOwner != null)
builder.put (WrapProperty.ATTRIBUTE_OWNER, attributeOwner);
return new SchemaImpl (builder.toPropertyMap ()).installHandlers (xr, this);
}
Schema getNvdlSchema () throws IOException, IncorrectSchemaException, SAXException
{
if (nvdlSchema == null)
{
final String className = SchemaReceiverImpl.class.getName ();
final String resourceName = className.substring (0, className.lastIndexOf ('.')).replace ('.', '/') +
"/resources/" +
NVDL_SCHEMA;
final URL nvdlSchemaUrl = getResource (resourceName);
final InputStream stream = nvdlSchemaUrl.openStream ();
// this is just to ensure that there aren't any problems with the parser
// opening the schema resource
final InputSource inputSource = new InputSource (nvdlSchemaUrl.toString ());
inputSource.setByteStream (stream);
nvdlSchema = SAXSchemaReader.getInstance ().createSchema (inputSource, properties);
}
return nvdlSchema;
}
/**
* Get a resource using this class class loader.
*
* @param resourceName
* the resource.
* @return An URL pointing to the resource.
*/
private static URL getResource (final String resourceName)
{
final ClassLoader cl = SchemaReceiverImpl.class.getClassLoader ();
// XXX see if we should borrow 1.2 code from Service
if (cl == null)
return ClassLoader.getSystemResource (resourceName);
else
return cl.getResource (resourceName);
}
/**
* Get the properties.
*
* @return a PropertyMap.
*/
PropertyMap getProperties ()
{
return properties;
}
/**
* Creates a child schema. This schema is referred in a validate action.
*
* @param source
* the SAXSource for the schema.
* @param schemaType
* the schema type.
* @param options
* options specified for this schema in the NVDL script.
* @param isAttributesSchema
* flag indicating if the schema should be modified to check attributes
* only.
* @return
* @throws IOException
* In case of IO problems.
* @throws IncorrectSchemaException
* In case of invalid schema.
* @throws SAXException
* In case if XML problems while creating the schema.
*/
Schema createChildSchema (final SAXSource source,
final String schemaType,
final PropertyMap options,
final boolean isAttributesSchema) throws IOException,
IncorrectSchemaException,
SAXException
{
final SchemaReader reader = isRnc (schemaType) ? CompactSchemaReader.getInstance () : autoSchemaReader;
final PropertyMapBuilder builder = new PropertyMapBuilder (properties);
if (isAttributesSchema)
builder.put (WrapProperty.ATTRIBUTE_OWNER, ValidatorImpl.OWNER_NAME);
builder.add (options);
return reader.createSchema (source, builder.toPropertyMap ());
}
/**
* Get an option for the given URI.
*
* @param uri
* The URI for an option.
* @return Either the option from the auto schema reader or from the compact
* schema reader.
*/
Option getOption (final String uri)
{
final Option option = autoSchemaReader.getOption (uri);
if (option != null)
return option;
return CompactSchemaReader.getInstance ().getOption (uri);
}
/**
* Checks is a schema type is RNC.
*
* @param schemaType
* The schema type specification.
* @return true if the schema type refers to a RNC schema.
*/
private static boolean isRnc (String schemaType)
{
if (schemaType == null)
return false;
schemaType = schemaType.trim ();
return schemaType.equals (RNC_MEDIA_TYPE) || schemaType.equals (LEGACY_RNC_MEDIA_TYPE);
}
}
| [
"mail@leosimons.com"
] | mail@leosimons.com |
11da466d827ff281163b69e799ed26cb685bc261 | de8f06734ba4cadcdcc608a6dd0496b58c93da18 | /src/com/perl5/lang/perl/extensions/parser/PerlParserExtension.java | b9a3b7cb3495b42723defb5cb70badcede17610e | [
"Apache-2.0"
] | permissive | willt/Perl5-IDEA | 43ab19adfc6a2379a85fada7716fe64fe6813922 | d7ff056a2c5f176362dad8bba1ea27cad0345603 | refs/heads/master | 2021-08-10T20:16:03.683576 | 2017-11-12T07:02:59 | 2017-11-12T07:02:59 | 110,410,280 | 0 | 0 | null | 2017-11-12T06:21:53 | 2017-11-12T06:21:53 | null | UTF-8 | Java | false | false | 3,240 | java | /*
* Copyright 2015-2017 Alexandr Evstigneev
*
* 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.perl5.lang.perl.extensions.parser;
import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.openapi.util.Pair;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.tree.TokenSet;
import com.perl5.lang.perl.parser.builder.PerlBuilder;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
* Created by hurricup on 22.11.2015.
*/
public abstract class PerlParserExtension {
public static final ExtensionPointName<PerlParserExtension> EP_NAME = ExtensionPointName.create("com.perl5.parserExtension");
/**
* Returns a set of keywords and element types to lex.
*
* @return set of custom keywords
*/
@NotNull
public Map<String, IElementType> getCustomTokensMap() {
return Collections.emptyMap();
}
/**
* Returns list of extendable tokensets. Loader will attempt to add them into builder
* Should return list of pairs: token to extend - TokenSet of extended tokens
* Reqired to avoid extra TERM expressions in PSI tree
*
* @return list of pairs to extend
*/
@Nullable
public List<Pair<IElementType, TokenSet>> getExtensionSets() {
return null;
}
/**
* Returns tokenset, containing bare regex prefixesj like =~ or case
*
* @return list of pairs to extend
*/
@Nullable
public TokenSet getRegexPrefixTokenSet() {
return null;
}
/**
* Parse method. Attempt to parse beginning of statement
* You may re-use PerlParser static methods to implement native perl expressions
*
* @param b PerlBuilder
* @param l parsing level
* @return parsing result
*/
public boolean parseStatement(PerlBuilder b, int l) {
return false;
}
/**
* Parse method. Attempt to parse statement modifier
* You may re-use PerlParser static methods to implement native perl expressions
*
* @param b PerlBuilder
* @param l parsing level
* @return parsing result
*/
public boolean parseStatementModifier(PerlBuilder b, int l) {
return false;
}
/**
* Parse method. Attempt to parse term
* You may re-use PerlParser static methods to implement native perl expressions
*
* @param b PerlBuilder
* @param l parsing level
* @return parsing result
*/
public boolean parseTerm(PerlBuilder b, int l) {
return false;
}
/**
* Parses element in dereference sequence.
*
* @param b PerlBuilder
* @param l parsing level
* @return Parsing result
*/
public boolean parseNestedElement(PerlBuilder b, int l) {
return false;
}
}
| [
"hurricup@gmail.com"
] | hurricup@gmail.com |
57a29a03631c491ec816ae456e5bc15c0c09def4 | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /test/irvine/oeis/a256/A256329Test.java | 59fea14863ca2305abf09f57b328a310ec40a2e5 | [] | no_license | flywind2/joeis | c5753169cf562939b04dd246f8a2958e97f74558 | e5efd6971a0062ac99f4fae21a7c78c9f9e74fea | refs/heads/master | 2020-09-13T18:34:35.080552 | 2019-11-19T05:40:55 | 2019-11-19T05:40:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 195 | java | package irvine.oeis.a256;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A256329Test extends AbstractSequenceTest {
}
| [
"sairvin@gmail.com"
] | sairvin@gmail.com |
91b000c0cc0e2d4c94171999684bb441a903de00 | 6d75d4faed98defc08e9ac9cd2cb47b79daa77cd | /achieve-parent/achieve-summary/src/main/java/com/wei/designmodel/create/singleton/hungry/StaticHungrySingleton.java | 2dd0f5dad845c33e9844b428f474211a9541ccfa | [] | no_license | xingxingtx/common-parent | e37763444332ddb2fbca4254a9012226ab48ed76 | a6b26cf88fc94943881b6cba2aecaf2b19a93755 | refs/heads/main | 2023-06-16T20:23:45.412285 | 2021-07-14T12:04:07 | 2021-07-14T12:04:07 | 352,091,214 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 614 | java | package com.wei.designmodel.create.singleton.hungry;
/**
*@describe HungrySingletonTwo
*@author wei.peng
*@date 2020 05/14
* 饿汉模式,线程安全,不适合有大量单例创建的情况使用,浪费内存,能被反射或者反序列化获取多个实例
*/
public class StaticHungrySingleton {
private static StaticHungrySingleton singleton = null;
static {
if (singleton == null){
singleton = new StaticHungrySingleton();
}
}
private StaticHungrySingleton(){}
public static StaticHungrySingleton getInstance(){
return singleton;
}
}
| [
"982084398@qq.com"
] | 982084398@qq.com |
b81945d93a84320bd3af4a7946991d7128b135d1 | fc249fdee1cf8faa8bda0c593f44e5a781485d33 | /app/src/main/java/com/clicktech/snsktv/entity/WorksListBySingerReponse.java | ed53f085f01241d469c0601987ab7c01fa06e8d0 | [] | no_license | WooYu/Karaok | 320fbcc7d97904d8b20c352b4ffb9cb31bf55482 | 42120b10d4f5039307348976b508ccc89ff0f40b | refs/heads/master | 2020-04-08T11:30:29.288269 | 2018-11-27T09:28:22 | 2018-11-27T09:28:22 | 159,308,447 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 430 | java | package com.clicktech.snsktv.entity;
import com.clicktech.snsktv.arms.base.BaseResponse;
import java.util.List;
public class WorksListBySingerReponse extends BaseResponse {
private List<WorksListBySingerBeanEntity> songList;
public List<WorksListBySingerBeanEntity> getList() {
return songList;
}
public void setList(List<WorksListBySingerBeanEntity> list) {
this.songList = list;
}
}
| [
"wuyu@lcworld-inc.com"
] | wuyu@lcworld-inc.com |
d9119027b8d39e70a106fa0a2c859791125b5dd4 | a54bb73655149773e2a884e7bff518c902a3a5b2 | /java-core/src/com/source/com/sun/corba/se/spi/activation/RepositoryHelper.java | 86e9fa00fd38c1c098e4cdc5820576bdebd9e2f8 | [] | no_license | fredomli/java-standard | 071823b680555039f1284ce55a2909397392c989 | c6e296c8d8e4a8626faa69bf0732e0ac4b3bb360 | refs/heads/main | 2023-08-29T22:43:53.023691 | 2021-11-05T15:31:14 | 2021-11-05T15:31:14 | 390,624,004 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,886 | java | package com.sun.corba.se.spi.activation;
/**
* com/sun/corba/se/spi/activation/RepositoryHelper.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/jenkins/workspace/8-2-build-windows-amd64-cygwin/jdk8u291/1294/corba/src/share/classes/com/sun/corba/se/spi/activation/activation.idl
* Friday, April 9, 2021 12:03:36 AM PDT
*/
abstract public class RepositoryHelper
{
private static String _id = "IDL:activation/Repository:1.0";
public static void insert (org.omg.CORBA.Any a, com.sun.corba.se.spi.activation.Repository that)
{
org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
a.type (type ());
write (out, that);
a.read_value (out.create_input_stream (), type ());
}
public static com.sun.corba.se.spi.activation.Repository extract (org.omg.CORBA.Any a)
{
return read (a.create_input_stream ());
}
private static org.omg.CORBA.TypeCode __typeCode = null;
synchronized public static org.omg.CORBA.TypeCode type ()
{
if (__typeCode == null)
{
__typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (com.sun.corba.se.spi.activation.RepositoryHelper.id (), "Repository");
}
return __typeCode;
}
public static String id ()
{
return _id;
}
public static com.sun.corba.se.spi.activation.Repository read (org.omg.CORBA.portable.InputStream istream)
{
return narrow (istream.read_Object (_RepositoryStub.class));
}
public static void write (org.omg.CORBA.portable.OutputStream ostream, com.sun.corba.se.spi.activation.Repository value)
{
ostream.write_Object ((org.omg.CORBA.Object) value);
}
public static com.sun.corba.se.spi.activation.Repository narrow (org.omg.CORBA.Object obj)
{
if (obj == null)
return null;
else if (obj instanceof com.sun.corba.se.spi.activation.Repository)
return (com.sun.corba.se.spi.activation.Repository)obj;
else if (!obj._is_a (id ()))
throw new org.omg.CORBA.BAD_PARAM ();
else
{
org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
com.sun.corba.se.spi.activation._RepositoryStub stub = new com.sun.corba.se.spi.activation._RepositoryStub ();
stub._set_delegate(delegate);
return stub;
}
}
public static com.sun.corba.se.spi.activation.Repository unchecked_narrow (org.omg.CORBA.Object obj)
{
if (obj == null)
return null;
else if (obj instanceof com.sun.corba.se.spi.activation.Repository)
return (com.sun.corba.se.spi.activation.Repository)obj;
else
{
org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
com.sun.corba.se.spi.activation._RepositoryStub stub = new com.sun.corba.se.spi.activation._RepositoryStub ();
stub._set_delegate(delegate);
return stub;
}
}
}
| [
"fredomli@163.com"
] | fredomli@163.com |
a6073a2ded3610f385e78d2fad66df9f84ce1735 | e1520517adcdd4ee45fb7b19e7002fdd5a46a02a | /polardbx-executor/src/main/java/com/alibaba/polardbx/executor/operator/frame/RowUnboundedFollowingOverFrame.java | b1839cb5e214576c372adaf4c6acf45667abef06 | [
"Apache-2.0"
] | permissive | huashen/galaxysql | 7702969269d7f126d36f269e3331ed1c8da4dc20 | b6c88d516367af105d85c6db60126431a7e4df4c | refs/heads/main | 2023-09-04T11:40:36.590004 | 2021-10-25T15:43:14 | 2021-10-25T15:43:14 | 421,088,419 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,407 | java | /*
* Copyright [2013-2021], Alibaba Group Holding Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.polardbx.executor.operator.frame;
import com.alibaba.polardbx.optimizer.chunk.Chunk;
import com.alibaba.polardbx.optimizer.core.expression.calc.Aggregator;
import java.util.List;
/**
* The row unboundedFollowing window frame calculates frames with the following SQL form:
* ... ROW BETWEEN [window frame preceding] AND UNBOUNDED FOLLOWING
* [window frame preceding] ::= [unsigned_value_specification] PRECEDING | CURRENT ROW
*
* <p>e.g.: ... ROW BETWEEN 1 PRECEDING AND UNBOUNDED FOLLOWING.
*/
public class RowUnboundedFollowingOverFrame extends AbstractOverWindowFrame {
private int leftBound;
private int leftIndex;
private int rightIndex;
private boolean currentFrame;
public RowUnboundedFollowingOverFrame(
List<Aggregator> aggregator,
int leftBound) {
super(aggregator);
this.leftBound = leftBound;
}
@Override
public void updateIndex(int leftIndex, int rightIndex) {
this.leftIndex = leftIndex;
this.rightIndex = rightIndex - 1;
this.currentFrame = false;
}
@Override
public void processData(int index) {
// 比如 10 preceding and unbounded following,则前十行的处理结果是相同的;必须加状态判断,避免滑动到上一个partition
if (currentFrame && index - leftBound <= leftIndex) {
return;
}
currentFrame = true;
int realLeftIndex = Math.max(leftIndex, index - leftBound);
aggregators.forEach(t -> {
t.resetToInitValue(0);
for (int j = realLeftIndex; j <= rightIndex; j++) {
Chunk.ChunkRow row = chunksIndex.rowAt(j);
t.accumulate(0, row.getChunk(), row.getPosition());
}
});
}
}
| [
"chenmo.cm@alibaba-inc.com"
] | chenmo.cm@alibaba-inc.com |
6ebc19d188ec7e353329896e31469eb179de2175 | 5e0ec9c4ad9a381aa4605eea1f80bf41a26df28b | /dataset/median/593b954f9fee4dac5575c1fea4a0ff066cc0b79f3c2732f0dd9e60cacededa2145a70a481a3bfbc3d322abaf547ac4db3666b8461f7fc2e88f6d01f81b7c5f82/007/src/test/java/introclassJava/median_593b954f9fee4dac5575c1fea4a0ff066cc0b79f3c2732f0dd9e60cacededa2145a70a481a3bfbc3d322abaf547ac4db3666b8461f7fc2e88f6d01f81b7c5f82_007BlackboxTest.java | 8aac9105589bc2863db90230ad5feda75698e912 | [] | no_license | dufaux/IntroClassJava | 8d763bf225e8c4eec8426b919309f2ae0dc40c78 | a6ac9c2d4d71621d4841bfd308a51c3eb4511606 | refs/heads/master | 2021-01-14T14:18:57.699360 | 2015-09-23T15:00:46 | 2015-09-23T15:03:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,770 | java | package introclassJava;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class median_593b954f9fee4dac5575c1fea4a0ff066cc0b79f3c2732f0dd9e60cacededa2145a70a481a3bfbc3d322abaf547ac4db3666b8461f7fc2e88f6d01f81b7c5f82_007BlackboxTest {
@Test(timeout=1000)
public void test1() throws Exception {
median_593b954f9fee4dac5575c1fea4a0ff066cc0b79f3c2732f0dd9e60cacededa2145a70a481a3bfbc3d322abaf547ac4db3666b8461f7fc2e88f6d01f81b7c5f82_007 mainClass = new median_593b954f9fee4dac5575c1fea4a0ff066cc0b79f3c2732f0dd9e60cacededa2145a70a481a3bfbc3d322abaf547ac4db3666b8461f7fc2e88f6d01f81b7c5f82_007();
String expected = "Please enter 3 numbers separated by spaces > 6 is the median";
mainClass.scanner = new java.util.Scanner("2 6 8");
mainClass.exec();
String out = mainClass.output.replace("\n"," ").trim();
assertEquals(expected.replace(" ",""), out.replace(" ",""));
}
@Test(timeout=1000)
public void test2() throws Exception {
median_593b954f9fee4dac5575c1fea4a0ff066cc0b79f3c2732f0dd9e60cacededa2145a70a481a3bfbc3d322abaf547ac4db3666b8461f7fc2e88f6d01f81b7c5f82_007 mainClass = new median_593b954f9fee4dac5575c1fea4a0ff066cc0b79f3c2732f0dd9e60cacededa2145a70a481a3bfbc3d322abaf547ac4db3666b8461f7fc2e88f6d01f81b7c5f82_007();
String expected = "Please enter 3 numbers separated by spaces > 6 is the median";
mainClass.scanner = new java.util.Scanner("2 8 6");
mainClass.exec();
String out = mainClass.output.replace("\n"," ").trim();
assertEquals(expected.replace(" ",""), out.replace(" ",""));
}
@Test(timeout=1000)
public void test3() throws Exception {
median_593b954f9fee4dac5575c1fea4a0ff066cc0b79f3c2732f0dd9e60cacededa2145a70a481a3bfbc3d322abaf547ac4db3666b8461f7fc2e88f6d01f81b7c5f82_007 mainClass = new median_593b954f9fee4dac5575c1fea4a0ff066cc0b79f3c2732f0dd9e60cacededa2145a70a481a3bfbc3d322abaf547ac4db3666b8461f7fc2e88f6d01f81b7c5f82_007();
String expected = "Please enter 3 numbers separated by spaces > 6 is the median";
mainClass.scanner = new java.util.Scanner("6 2 8");
mainClass.exec();
String out = mainClass.output.replace("\n"," ").trim();
assertEquals(expected.replace(" ",""), out.replace(" ",""));
}
@Test(timeout=1000)
public void test4() throws Exception {
median_593b954f9fee4dac5575c1fea4a0ff066cc0b79f3c2732f0dd9e60cacededa2145a70a481a3bfbc3d322abaf547ac4db3666b8461f7fc2e88f6d01f81b7c5f82_007 mainClass = new median_593b954f9fee4dac5575c1fea4a0ff066cc0b79f3c2732f0dd9e60cacededa2145a70a481a3bfbc3d322abaf547ac4db3666b8461f7fc2e88f6d01f81b7c5f82_007();
String expected = "Please enter 3 numbers separated by spaces > 6 is the median";
mainClass.scanner = new java.util.Scanner("6 8 2");
mainClass.exec();
String out = mainClass.output.replace("\n"," ").trim();
assertEquals(expected.replace(" ",""), out.replace(" ",""));
}
@Test(timeout=1000)
public void test5() throws Exception {
median_593b954f9fee4dac5575c1fea4a0ff066cc0b79f3c2732f0dd9e60cacededa2145a70a481a3bfbc3d322abaf547ac4db3666b8461f7fc2e88f6d01f81b7c5f82_007 mainClass = new median_593b954f9fee4dac5575c1fea4a0ff066cc0b79f3c2732f0dd9e60cacededa2145a70a481a3bfbc3d322abaf547ac4db3666b8461f7fc2e88f6d01f81b7c5f82_007();
String expected = "Please enter 3 numbers separated by spaces > 6 is the median";
mainClass.scanner = new java.util.Scanner("8 2 6");
mainClass.exec();
String out = mainClass.output.replace("\n"," ").trim();
assertEquals(expected.replace(" ",""), out.replace(" ",""));
}
@Test(timeout=1000)
public void test6() throws Exception {
median_593b954f9fee4dac5575c1fea4a0ff066cc0b79f3c2732f0dd9e60cacededa2145a70a481a3bfbc3d322abaf547ac4db3666b8461f7fc2e88f6d01f81b7c5f82_007 mainClass = new median_593b954f9fee4dac5575c1fea4a0ff066cc0b79f3c2732f0dd9e60cacededa2145a70a481a3bfbc3d322abaf547ac4db3666b8461f7fc2e88f6d01f81b7c5f82_007();
String expected = "Please enter 3 numbers separated by spaces > 6 is the median";
mainClass.scanner = new java.util.Scanner("8 6 2");
mainClass.exec();
String out = mainClass.output.replace("\n"," ").trim();
assertEquals(expected.replace(" ",""), out.replace(" ",""));
}
@Test(timeout=1000)
public void test7() throws Exception {
median_593b954f9fee4dac5575c1fea4a0ff066cc0b79f3c2732f0dd9e60cacededa2145a70a481a3bfbc3d322abaf547ac4db3666b8461f7fc2e88f6d01f81b7c5f82_007 mainClass = new median_593b954f9fee4dac5575c1fea4a0ff066cc0b79f3c2732f0dd9e60cacededa2145a70a481a3bfbc3d322abaf547ac4db3666b8461f7fc2e88f6d01f81b7c5f82_007();
String expected = "Please enter 3 numbers separated by spaces > 9 is the median";
mainClass.scanner = new java.util.Scanner("9 9 9");
mainClass.exec();
String out = mainClass.output.replace("\n"," ").trim();
assertEquals(expected.replace(" ",""), out.replace(" ",""));
}
} | [
"durieuxthomas@hotmail.com"
] | durieuxthomas@hotmail.com |
ea91cec4eaeb3805ff30c6aee9a96af039c0dc8e | 80144cbbe03b94c9781d5aff6534c4a08cea9d98 | /app/src/main/java/com/shashiwang/shashiapp/view/IMainFragmentView.java | 8b033f03c55a34f7f4135e3a78d8074cc22cff76 | [] | no_license | 3441242166/ShaShiApp | 3c15d85a10ef25a45053b469986ee7eca9783cac | 03584dce89e05f024278f667bf05cc323226070f | refs/heads/master | 2020-05-22T13:20:05.873815 | 2019-05-01T02:18:59 | 2019-05-01T02:18:59 | 186,354,771 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 287 | java | package com.shashiwang.shashiapp.view;
import com.example.zhouwei.library.CustomPopWindow;
import com.shashiwang.shashiapp.base.IBaseView;
import com.shashiwang.shashiapp.bean.BannerBean;
import java.util.List;
public interface IMainFragmentView extends IBaseView<List<String>> {
}
| [
"3441242166@qq.com"
] | 3441242166@qq.com |
da47ece3506c197e02bfed983b16fb1307a30c24 | f40c5613a833bc38fca6676bad8f681200cffb25 | /kubernetes-model-generator/kubernetes-model-core/src/generated/java/io/fabric8/kubernetes/api/model/PhotonPersistentDiskVolumeSource.java | dfadf1617879c6178f64288d82dd2e7bcd6f4365 | [
"Apache-2.0"
] | permissive | rohanKanojia/kubernetes-client | 2d599e4ed1beedf603c79d28f49203fbce1fc8b2 | 502a14c166dce9ec07cf6adb114e9e36053baece | refs/heads/master | 2023-07-25T18:31:33.982683 | 2022-04-12T13:39:06 | 2022-04-13T05:12:38 | 106,398,990 | 2 | 3 | Apache-2.0 | 2023-04-28T16:21:03 | 2017-10-10T09:50:25 | Java | UTF-8 | Java | false | false | 2,425 | java |
package io.fabric8.kubernetes.api.model;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.sundr.builder.annotations.Buildable;
import lombok.EqualsAndHashCode;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"apiVersion",
"kind",
"metadata",
"fsType",
"pdID"
})
@ToString
@EqualsAndHashCode
@Setter
@Accessors(prefix = {
"_",
""
})
@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = true, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder")
public class PhotonPersistentDiskVolumeSource implements KubernetesResource
{
@JsonProperty("fsType")
private String fsType;
@JsonProperty("pdID")
private String pdID;
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
/**
* No args constructor for use in serialization
*
*/
public PhotonPersistentDiskVolumeSource() {
}
/**
*
* @param pdID
* @param fsType
*/
public PhotonPersistentDiskVolumeSource(String fsType, String pdID) {
super();
this.fsType = fsType;
this.pdID = pdID;
}
@JsonProperty("fsType")
public String getFsType() {
return fsType;
}
@JsonProperty("fsType")
public void setFsType(String fsType) {
this.fsType = fsType;
}
@JsonProperty("pdID")
public String getPdID() {
return pdID;
}
@JsonProperty("pdID")
public void setPdID(String pdID) {
this.pdID = pdID;
}
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
}
| [
"marc@marcnuri.com"
] | marc@marcnuri.com |
58be05d6c9c50db6d21af92afa7435df6787a59d | 1e2a3700115a42ce0bd71f56680d9ad550862b7f | /dist/game/data/scripts/quests/Q00369_CollectorOfJewels/Q00369_CollectorOfJewels.java | eac7e631f02eb14cffe5a4b65bb299cdf3e96236 | [] | no_license | toudakos/HighFive | 5a75313d43209193ad7bec89ce0f177bd7dddb6f | e76b6a497277f5e88093204b86f004101d0dca52 | refs/heads/master | 2021-04-23T00:34:59.390728 | 2020-03-25T04:17:38 | 2020-03-25T04:17:38 | 249,884,195 | 0 | 0 | null | 2020-03-25T04:08:31 | 2020-03-25T04:08:30 | null | UTF-8 | Java | false | false | 5,038 | java | /*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q00369_CollectorOfJewels;
import java.util.HashMap;
import java.util.Map;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.holders.QuestItemHolder;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
/**
* Collector of Jewels (369)
* @author Adry_85
*/
public final class Q00369_CollectorOfJewels extends Quest
{
// NPC
private static final int NELL = 30376;
// Items
private static final int FLARE_SHARD = 5882;
private static final int FREEZING_SHARD = 5883;
// Misc
private static final int MIN_LEVEL = 25;
// Mobs
private static final Map<Integer, QuestItemHolder> MOBS_DROP_CHANCES = new HashMap<>();
static
{
MOBS_DROP_CHANCES.put(20609, new QuestItemHolder(FLARE_SHARD, 75, 1)); // salamander_lakin
MOBS_DROP_CHANCES.put(20612, new QuestItemHolder(FLARE_SHARD, 91, 1)); // salamander_rowin
MOBS_DROP_CHANCES.put(20749, new QuestItemHolder(FLARE_SHARD, 100, 2)); // death_fire
MOBS_DROP_CHANCES.put(20616, new QuestItemHolder(FREEZING_SHARD, 81, 1)); // undine_lakin
MOBS_DROP_CHANCES.put(20619, new QuestItemHolder(FREEZING_SHARD, 87, 1)); // undine_rowin
MOBS_DROP_CHANCES.put(20747, new QuestItemHolder(FREEZING_SHARD, 100, 2)); // roxide
}
public Q00369_CollectorOfJewels()
{
super(369);
addStartNpc(NELL);
addTalkId(NELL);
addKillId(MOBS_DROP_CHANCES.keySet());
registerQuestItems(FLARE_SHARD, FREEZING_SHARD);
}
@Override
public boolean checkPartyMember(L2PcInstance member, L2Npc npc)
{
final QuestState st = getQuestState(member, false);
return ((st != null) && (st.isMemoState(1) || st.isMemoState(3)));
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState st = getQuestState(player, false);
if (st == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "30376-02.htm":
{
st.startQuest();
st.setMemoState(1);
htmltext = event;
break;
}
case "30376-05.html":
{
htmltext = event;
break;
}
case "30376-06.html":
{
if (st.isMemoState(2))
{
st.setMemoState(3);
st.setCond(3, true);
htmltext = event;
}
break;
}
case "30376-07.html":
{
st.exitQuest(true, true);
htmltext = event;
break;
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
{
final QuestItemHolder item = MOBS_DROP_CHANCES.get(npc.getId());
if (getRandom(100) < item.getChance())
{
final L2PcInstance luckyPlayer = getRandomPartyMember(player, npc);
if (luckyPlayer != null)
{
final QuestState st = getQuestState(luckyPlayer, false);
final int itemCount = (st.isMemoState(1) ? 50 : 200);
final int cond = (st.isMemoState(1) ? 2 : 4);
if (giveItemRandomly(luckyPlayer, npc, item.getId(), item.getCount(), itemCount, 1.0, true) //
&& (getQuestItemsCount(luckyPlayer, FLARE_SHARD, FREEZING_SHARD) >= (itemCount * 2)))
{
st.setCond(cond);
}
}
}
return super.onKill(npc, player, isSummon);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState st = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
if (st.isCreated())
{
htmltext = (player.getLevel() >= MIN_LEVEL) ? "30376-01.htm" : "30376-03.html";
}
else if (st.isStarted())
{
switch (st.getMemoState())
{
case 1:
{
if (getQuestItemsCount(player, FLARE_SHARD, FREEZING_SHARD) >= 100)
{
giveAdena(player, 31810, true);
takeItems(player, -1, FLARE_SHARD, FREEZING_SHARD);
st.setMemoState(2);
htmltext = "30376-04.html";
}
else
{
htmltext = "30376-08.html";
}
break;
}
case 2:
{
htmltext = "30376-09.html";
break;
}
case 3:
{
if (getQuestItemsCount(player, FLARE_SHARD, FREEZING_SHARD) >= 400)
{
giveAdena(player, 84415, true);
takeItems(player, -1, FLARE_SHARD, FREEZING_SHARD);
st.exitQuest(true, true);
htmltext = "30376-10.html";
}
else
{
htmltext = "30376-11.html";
}
break;
}
}
}
return htmltext;
}
}
| [
"danielbarionn@gmail.com"
] | danielbarionn@gmail.com |
53a650f3bc77fd3388cd315db926764a2d6209fc | ce1f43ad1cd2434ba1d65df57267aa84e3cadb50 | /scenarioeditor/src/de/peerthing/scenarioeditor/interchange/SICase.java | 2ebfb46b07305a83ca5d789af218dd3befaa4ac5 | [
"Apache-2.0"
] | permissive | rju/peerthing | 3387d049475d0049f8e3991d9a363ea48572ab7c | 7abe8d3be11f5e66c8413b780640c3892503ce16 | refs/heads/master | 2021-04-26T22:22:27.396478 | 2018-03-06T21:50:22 | 2018-03-06T21:50:22 | 124,080,294 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 462 | java | package de.peerthing.scenarioeditor.interchange;
import de.peerthing.scenarioeditor.model.ICase;
class SICase extends SICommandContainer implements ISICase {
ICase c;
public SICase(ICase c) {
super(c);
this.c = c;
}
public String getCondition() {
return c.getCondition();
}
public double getProbability() {
return c.getProbability();
}
public boolean isConditionUsed() {
return c.isConditionUsed();
}
}
| [
"reiner.jung@email.uni-kiel.de"
] | reiner.jung@email.uni-kiel.de |
f4d16beeb3d37300cef693208257b30fe1ce06de | deac36a2f8e8d4597e2e1934ab8a7dd666621b2b | /java源码的副本/src-1/java.corba/org/omg/Messaging/SYNC_WITH_TRANSPORT.java | b7dcce791c649073bfa3194c1f7d830fb6811ba0 | [] | no_license | ZytheMoon/First | ff317a11f12c4ec7714367994924ee9fb4649611 | 9078fb8be8537a98483c50928cb92cf9835aed1c | refs/heads/master | 2021-04-27T00:09:31.507273 | 2018-03-06T12:25:56 | 2018-03-06T12:25:56 | 123,758,924 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 548 | java | package org.omg.Messaging;
/**
* org/omg/Messaging/SYNC_WITH_TRANSPORT.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from t:/workspace/corba/src/java.corba/share/classes/org/omg/PortableInterceptor/Messaging.idl
* Tuesday, December 19, 2017 6:16:17 PM PST
*/
public interface SYNC_WITH_TRANSPORT
{
/**
* Constant, defined in the Messaging spec, to define how far the
* request shall progress before control is returned to the client.
*/
public static final short value = (short)(1);
}
| [
"2353653849@qq.com"
] | 2353653849@qq.com |
6cc4aa43d28c042f75f7550ba142f7bbe6d131d3 | c680a6d144c14759f0c41e24324ed509c5856726 | /src/main/java/co/aurasphere/facebot/model/threadsettings/SettingType.java | 1025cd9bf86f50656c18b654d6b1edd8409063c2 | [
"MIT"
] | permissive | viveksinha/facebot | 9a0dcd3f5fa1cae5e0abeb1ceda30e96fc581d53 | c5a27c0c55d07f841213bd1700a9d04f533ac5e9 | refs/heads/master | 2021-06-07T23:41:55.848555 | 2016-11-07T11:16:06 | 2016-11-07T11:16:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 512 | java | package co.aurasphere.facebot.model.threadsettings;
/**
* Enum for the Thread Setting to modify.
*
* @see <a href=
* "https://developers.facebook.com/docs/messenger-platform/thread-settings"
* >Facebook's Messenger Platform Thread Settings Documentation</a>
*
*
* @author Donato
* @date 08/ago/2016
*/
public enum SettingType {
/**
* Setting for the Greeting Text message.
*/
GREETING,
/**
* Setting for the Get Started Button or the Persistent Menu.
*/
CALL_TO_ACTIONS;
}
| [
"donatohan.rimenti@gmail.com"
] | donatohan.rimenti@gmail.com |
285249f8003fef302192374b316481b635fa9e39 | 4ed8a261dc1d7a053557c9c0bcec759978559dbd | /dlight/dlight.sendto/src/org/netbeans/modules/dlight/sendto/conifg/ui/ScriptPanel.java | 30f95c9f0fb2030713563693df0a0a9c092e8e83 | [
"Apache-2.0"
] | permissive | kaveman-/netbeans | 0197762d834aa497ad17dccd08a65c69576aceb4 | 814ad30e2d0a094f4aa3813bcbb5323a95a0b1d6 | refs/heads/master | 2021-01-04T06:49:41.139015 | 2020-02-06T15:13:37 | 2020-02-06T15:13:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,298 | java | /*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 2015 Oracle and/or its affiliates. All rights reserved.
*
* Oracle and Java are registered trademarks of Oracle and/or its affiliates.
* Other names may be trademarks of their respective owners.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common
* Development and Distribution License("CDDL") (collectively, the
* "License"). You may not use this file except in compliance with the
* License. You can obtain a copy of the License at
* http://www.netbeans.org/cddl-gplv2.html
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
* specific language governing permissions and limitations under the
* License. When distributing the software, include this License Header
* Notice in each file and include the License file at
* nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the
* License Header, with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* If you wish your version of this file to be governed by only the CDDL
* or only the GPL Version 2, indicate your decision by adding
* "[Contributor] elects to include this software in this distribution
* under the [CDDL or GPL Version 2] license." If you do not indicate a
* single choice of license, a recipient has the option to distribute
* your version of this file under either the CDDL, the GPL Version 2 or
* to extend the choice of license to its licensees as provided above.
* However, if you add GPL Version 2 code and therefore, elected the GPL
* Version 2 license, then the option applies only if the new code is
* made subject to such option by the copyright holder.
*
* Contributor(s):
*
* Portions Copyrighted 2015 Sun Microsystems, Inc.
*/
package org.netbeans.modules.dlight.sendto.conifg.ui;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JPanel;
import javax.swing.MutableComboBoxModel;
import org.openide.awt.Mnemonics;
/**
*
*/
public final class ScriptPanel extends JPanel {
public ScriptPanel(String label, String toolTip) {
initComponents();
Mnemonics.setLocalizedText(scriptLabel, label);
scriptFld.setToolTipText(toolTip);
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
scriptExecutor = new javax.swing.JComboBox();
scrollPane = new javax.swing.JScrollPane();
scriptFld = new javax.swing.JTextArea();
scriptLabel = new javax.swing.JLabel();
scriptExecutor.setEditable(true);
scriptFld.setColumns(20);
scriptFld.setRows(5);
scriptFld.setToolTipText(org.openide.util.NbBundle.getMessage(ScriptPanel.class, "ScriptPanel.scriptFld.toolTipText")); // NOI18N
scriptFld.setMargin(new java.awt.Insets(3, 3, 3, 3));
scrollPane.setViewportView(scriptFld);
scriptLabel.setLabelFor(scriptFld);
org.openide.awt.Mnemonics.setLocalizedText(scriptLabel, org.openide.util.NbBundle.getMessage(ScriptPanel.class, "ScriptPanel.scriptLabel.text")); // NOI18N
scriptLabel.setPreferredSize(new java.awt.Dimension(100, 18));
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(layout.createSequentialGroup()
.addComponent(scriptLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(scriptExecutor, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addComponent(scrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(scriptExecutor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(scriptLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(scrollPane))
);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JComboBox scriptExecutor;
private javax.swing.JTextArea scriptFld;
private javax.swing.JLabel scriptLabel;
private javax.swing.JScrollPane scrollPane;
// End of variables declaration//GEN-END:variables
public void setScript(String script) {
scriptFld.setText(script);
}
public String getScript() {
return scriptFld.getText();
}
public void setExecutor(String executor) {
scriptExecutor.setSelectedItem(executor);
}
public String getExecutor() {
String executor = (String) scriptExecutor.getSelectedItem();
if (scriptExecutor.getSelectedIndex() < 0) {
// new executor..
((MutableComboBoxModel) scriptExecutor.getModel()).insertElementAt(executor, 0);
}
return executor;
}
public void setExecutors(String[] executors) {
scriptExecutor.setModel(new DefaultComboBoxModel(executors));
}
}
| [
"geertjan@apache.org"
] | geertjan@apache.org |
a877c8e3a43290937fd746139ac21ea9e36513d1 | fecc94abb0bc1d1cdfcdeb48a031c24483969b80 | /src/_303区域和检索/Solution.java | af341d9784d20a7dd444faf5ec0d3b6efe02cdcb | [] | no_license | Iron-xin/Leetcode | 86670c9bba8f3efa7125da0af607e9e01df9d189 | 64e359c90a90965ed131a0ab96d0063ffb2652b9 | refs/heads/master | 2022-12-09T04:08:53.443331 | 2020-09-02T08:48:32 | 2020-09-02T08:48:32 | 292,228,669 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 813 | java | package _303区域和检索;
public class Solution {
int[][] ret;
public void numarray(int[] nums) {
ret = new int[nums.length][nums.length];
for (int m = 0; m < nums.length; m++) {
for (int n = m; n < nums.length; n++) {
if (m == n)
ret[m][n] = nums[m];
else
ret[m][n] = ret[m][n-1] + nums[n];
}
}
}
public int sumRange(int i, int j) {
return ret[i][j];
}
}
//压缩后
class NumArray {
int[] sum;
public NumArray(int[] nums) {
sum = new int[nums.length+1];
for (int i = 0; i < nums.length; i++) {
sum[i+1] = sum[i] + nums[i];
}
}
public int sumRange(int i, int j) {
return sum[j+1] - sum[i];
}
} | [
"497731829@qq.com"
] | 497731829@qq.com |
ff1a9d692bce763f1f15fb84e8099edba314ac4d | 49c1781740d756adfdf2fba0f9e7d2e4fd09c082 | /mall-module/mall-ums/src/main/java/com/qin/mall/ums/domain/UmsMenu.java | f95cefbcb211632f036949af389a73aa7734495e | [] | no_license | qinchunabng/QMall | ffb8d5f85a59c3d16dc0c45e294b6360eebacdee | 1018568de4617545d20bea00b88b6cad06685f07 | refs/heads/main | 2022-12-30T09:43:38.748283 | 2020-10-22T10:05:52 | 2020-10-22T10:05:52 | 304,268,617 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,965 | java | package com.qin.mall.ums.domain;
import java.util.Date;
public class UmsMenu {
/**
*
*/
private Long id;
/**
* 父级ID
*/
private Long parentId;
/**
* 创建时间
*/
private Date createTime;
/**
* 菜单名称
*/
private String title;
/**
* 菜单级数
*/
private Integer level;
/**
* 菜单排序
*/
private Integer sort;
/**
* 前端名称
*/
private String name;
/**
* 前端图标
*/
private String icon;
/**
* 前端隐藏
*/
private Integer hidden;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title == null ? null : title.trim();
}
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon == null ? null : icon.trim();
}
public Integer getHidden() {
return hidden;
}
public void setHidden(Integer hidden) {
this.hidden = hidden;
}
} | [
"373413704@qq.com"
] | 373413704@qq.com |
fce76ff541fe28bbd08a1a68adb8bcc7447eed8b | 354ed8b713c775382b1e2c4d91706eeb1671398b | /spring-orm/src/main/java/org/springframework/orm/jpa/JpaObjectRetrievalFailureException.java | 9eb0bd8cd280346927255b2b57e78be409bc7211 | [] | no_license | JessenPan/spring-framework | 8c7cc66252c2c0e8517774d81a083664e1ad4369 | c0c588454a71f8245ec1d6c12f209f95d3d807ea | refs/heads/master | 2021-06-30T00:54:08.230154 | 2019-10-08T10:20:25 | 2019-10-08T10:20:25 | 91,221,166 | 2 | 0 | null | 2017-05-14T05:01:43 | 2017-05-14T05:01:42 | null | UTF-8 | Java | false | false | 1,242 | java | /*
* Copyright 2002-2012 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.orm.jpa;
import org.springframework.orm.ObjectRetrievalFailureException;
import javax.persistence.EntityNotFoundException;
/**
* JPA-specific subclass of ObjectRetrievalFailureException.
* Converts JPA's EntityNotFoundException.
*
* @author Juergen Hoeller
* @see EntityManagerFactoryUtils#convertJpaAccessExceptionIfPossible
* @since 2.0
*/
@SuppressWarnings("serial")
public class JpaObjectRetrievalFailureException extends ObjectRetrievalFailureException {
public JpaObjectRetrievalFailureException(EntityNotFoundException ex) {
super(ex.getMessage(), ex);
}
}
| [
"jessenpan@qq.com"
] | jessenpan@qq.com |
1f27949e20367cfa2559cbcdc5090f362ae20ed8 | 015a212b7f269f60724c9149fa0c34b87a7f3e10 | /lib/src/main/java/com/sd/lib/scatter/service/model/response/api/ApiResponse.java | bdbc44845d381c07065d192833a5c81932587f28 | [] | no_license | zj565061763/scatter-service | 9b6793ff6e0dc509c2fe4afc2bf9011b2df817bb | 2dca4803bab1577fef1a5d1b1d906ccb27f50718 | refs/heads/master | 2020-04-03T01:29:49.104933 | 2018-10-30T10:08:14 | 2018-10-30T10:08:14 | 154,932,486 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 407 | java | package com.sd.lib.scatter.service.model.response.api;
import com.sd.lib.scatter.service.model.response.ScatterResponse;
public class ApiResponse<R> extends ScatterResponse
{
private R result;
public ApiResponse(String id)
{
super(id);
}
public R getResult()
{
return result;
}
public void setResult(R result)
{
this.result = result;
}
}
| [
"565061763@qq.com"
] | 565061763@qq.com |
dad628e8a5f1a052908bb7db1c0d478e9e0114b7 | 147fa24bc83a2f6952ce4ae2861f6d8973bbf528 | /src/vnmrj/src/vnmr/sms/GrkCompose.java | 508b962b23bcaa818bf143e96533543ae792a1d8 | [] | no_license | rodrigobmg/ovj3 | 6860c19f0469b8ddc51bee208b3c3a00e36af27d | ab92686b5d8f1eec98021acdd08688cfee651e7f | refs/heads/master | 2021-01-23T13:37:06.107967 | 2016-02-29T01:13:25 | 2016-02-29T01:13:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,347 | java | /*
* Copyright (C) 2015 University of Oregon
*
* You may distribute under the terms of either the GNU General Public
* License or the Apache License, as specified in the README file.
*
* For more information, see the README file.
*/
package vnmr.sms;
import java.util.*;
public class GrkCompose implements SmsDef
{
public String name;
public GrkCompose pnode;
public Vector<GrkCompose> compseList;
private Vector<GrkObj> objList;
public GrkCompose(GrkCompose p, String s) {
this.pnode = p;
this.name = s;
this.objList = new Vector<GrkObj>();
}
public GrkCompose(String s) {
this(null, s);
}
public void setParent(GrkCompose p) {
pnode = p;
}
public GrkCompose getParent() {
return pnode;
}
public void addCompose(GrkCompose comp) {
if (compseList == null)
compseList = new Vector<GrkCompose>();
compseList.add(comp);
}
public Vector<GrkCompose> getComposeList() {
return compseList;
}
public void addObj(float x, float y, String str) {
GrkObj obj = new GrkObj(x, y, str);
objList.add(obj);
}
public void addObj(float x, float y, float d) {
GrkObj obj = new GrkObj(x, y, d);
objList.add(obj);
}
public Vector<GrkObj> getObjList() {
return objList;
}
}
| [
"timburrow@me.com"
] | timburrow@me.com |
800818c473484ac1b3eb2f126342aef782465469 | 17e8438486cb3e3073966ca2c14956d3ba9209ea | /dso/tags/vicente-tp2/dso-l2/src/main/java/com/tc/objectserver/context/ServerMapEvictionContext.java | 14ee8e3820b88e455056fc63c27ea3d906d2ffdb | [] | 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 | 2,298 | java | /*
* All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved.
*/
package com.tc.objectserver.context;
import com.tc.async.api.EventContext;
import com.tc.object.ObjectID;
import com.tc.objectserver.api.EvictionTrigger;
import java.util.Map;
public class ServerMapEvictionContext implements EventContext {
private final EvictionTrigger trigger;
private final int targetMaxTotalCount;
private final int tti;
private final int ttl;
private final Map samples;
private final int overshoot;
private final String className;
private final String cacheName;
public ServerMapEvictionContext(final EvictionTrigger trigger, final int targetMaxTotalCount, final int tti, final int ttl,
final Map samples, final int overshoot, final String className, final String cacheName) {
this.trigger = trigger;
this.targetMaxTotalCount = targetMaxTotalCount;
this.tti = tti;
this.ttl = ttl;
this.samples = samples;
this.overshoot = overshoot;
this.className = className;
this.cacheName = cacheName;
}
public ServerMapEvictionContext(final EvictionTrigger trigger, final Map samples, final String className, final String cacheName) {
this.trigger = trigger;
this.targetMaxTotalCount = 0;
this.tti = 0;
this.ttl = 0;
this.samples = samples;
this.overshoot = 0;
this.className = className;
this.cacheName = cacheName;
}
public ObjectID getOid() {
return this.trigger.getId();
}
public int getTargetMaxTotalCount() {
return this.targetMaxTotalCount;
}
public int getTTISeconds() {
return this.tti;
}
public int getTTLSeconds() {
return this.ttl;
}
public Map getRandomSamples() {
return this.samples;
}
public int getOvershoot() {
return this.overshoot;
}
public String getClassName() {
return this.className;
}
public String getCacheName() {
return this.cacheName;
}
@Override
public String toString() {
return "ServerMapEvictionContext{" + "oid=" + trigger + ", targetMaxTotalCount=" + targetMaxTotalCount + ", samples=" + samples.size() + ", overshoot=" + overshoot + ", className=" + className + ", cacheName=" + cacheName + '}';
}
}
| [
"cruise@7fc7bbf3-cf45-46d4-be06-341739edd864"
] | cruise@7fc7bbf3-cf45-46d4-be06-341739edd864 |
351b01d9059a5f4a14a6300fcc1fba869e7d32d4 | 69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e | /methods/Method_1011927.java | 06bc13eeb289f4be6543792ebb7aa758e17ecf8a | [] | 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 | 295 | java | public Collection<IntentionExecutable> instances(final SNode node,final EditorContext context){
if (myCachedExecutable == null) {
myCachedExecutable=Collections.<IntentionExecutable>singletonList(new ConvertMyIfToIf_Intention.IntentionImplementation());
}
return myCachedExecutable;
}
| [
"sonnguyen@utdallas.edu"
] | sonnguyen@utdallas.edu |
81502d2a4f9bd8ed96b99e8d08e8e4f4c7167fe0 | 97fd02f71b45aa235f917e79dd68b61c62b56c1c | /src/main/java/com/tencentcloudapi/essbasic/v20201222/models/SendFlowResponse.java | e3a7a4aa3dad2003dc9f34ad11ee3d44a6bf8011 | [
"Apache-2.0"
] | permissive | TencentCloud/tencentcloud-sdk-java | 7df922f7c5826732e35edeab3320035e0cdfba05 | 09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec | refs/heads/master | 2023-09-04T10:51:57.854153 | 2023-09-01T03:21:09 | 2023-09-01T03:21:09 | 129,837,505 | 537 | 317 | Apache-2.0 | 2023-09-13T02:42:03 | 2018-04-17T02:58:16 | Java | UTF-8 | Java | false | false | 3,175 | java | /*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.essbasic.v20201222.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class SendFlowResponse extends AbstractModel{
/**
* 签署任务ID,标识每一次的流程发送
*/
@SerializedName("SignId")
@Expose
private String SignId;
/**
* 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
@SerializedName("RequestId")
@Expose
private String RequestId;
/**
* Get 签署任务ID,标识每一次的流程发送
* @return SignId 签署任务ID,标识每一次的流程发送
*/
public String getSignId() {
return this.SignId;
}
/**
* Set 签署任务ID,标识每一次的流程发送
* @param SignId 签署任务ID,标识每一次的流程发送
*/
public void setSignId(String SignId) {
this.SignId = SignId;
}
/**
* Get 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @return RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public String getRequestId() {
return this.RequestId;
}
/**
* Set 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @param RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public void setRequestId(String RequestId) {
this.RequestId = RequestId;
}
public SendFlowResponse() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public SendFlowResponse(SendFlowResponse source) {
if (source.SignId != null) {
this.SignId = new String(source.SignId);
}
if (source.RequestId != null) {
this.RequestId = new String(source.RequestId);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "SignId", this.SignId);
this.setParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
| [
"tencentcloudapi@tencent.com"
] | tencentcloudapi@tencent.com |
206a0704df2426ff3c2a7406c870be4b3e7871b9 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-14263-7-17-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/display/internal/AbstractDocumentTitleDisplayer_ESTest.java | 088b388041193d80abf28f12b509bd75b4a26020 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 593 | java | /*
* This file was automatically generated by EvoSuite
* Thu Apr 09 04:01:18 UTC 2020
*/
package org.xwiki.display.internal;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class AbstractDocumentTitleDisplayer_ESTest extends AbstractDocumentTitleDisplayer_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
c33e76c9d467aa40274ea909a9f02b38f7bdb659 | 591184fe8b21134c30b47fa86d5a275edd3a6208 | /openejb2/modules/openejb-itests/src/itest/org/openejb/test/stateful/StatefulTestClient.java | b4522f969fff462628af0b411c13d54f38ac8cc1 | [] | no_license | codehaus/openejb | 41649552c6976bf7d2e1c2fe4bb8a3c2b82f4dcb | c4cd8d75133345a23d5a13b9dda9cb4b43efc251 | refs/heads/master | 2023-09-01T00:17:38.431680 | 2006-09-14T07:14:22 | 2006-09-14T07:14:22 | 36,228,436 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,165 | java | /**
* Redistribution and use of this software and associated documentation
* ("Software"), with or without modification, are permitted provided
* that the following conditions are met:
*
* 1. Redistributions of source code must retain copyright
* statements and notices. Redistributions must also contain a
* copy of this document.
*
* 2. Redistributions in binary form must reproduce the
* above copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. The name "Exolab" must not be used to endorse or promote
* products derived from this Software without prior written
* permission of Exoffice Technologies. For written permission,
* please contact info@exolab.org.
*
* 4. Products derived from this Software may not be called "Exolab"
* nor may "Exolab" appear in their names without prior written
* permission of Exoffice Technologies. Exolab is a registered
* trademark of Exoffice Technologies.
*
* 5. Due credit should be given to the Exolab Project
* (http://www.exolab.org/).
*
* THIS SOFTWARE IS PROVIDED BY EXOFFICE TECHNOLOGIES AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
* NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
* EXOFFICE TECHNOLOGIES OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Copyright 1999 (C) Exoffice Technologies Inc. All Rights Reserved.
*
* $Id$
*/
package org.openejb.test.stateful;
import java.util.Properties;
import javax.ejb.EJBMetaData;
import javax.ejb.Handle;
import javax.ejb.HomeHandle;
import javax.naming.Context;
import javax.naming.InitialContext;
import org.openejb.test.TestManager;
/**
*
*/
public abstract class StatefulTestClient extends org.openejb.test.NamedTestCase {
protected InitialContext initialContext;
protected EJBMetaData ejbMetaData;
protected HomeHandle ejbHomeHandle;
protected Handle ejbHandle;
protected Integer ejbPrimaryKey;
public StatefulTestClient(String name) {
super("Stateful." + name);
}
/**
* Sets up the fixture, for example, open a network connection.
* This method is called before a test is executed.
*/
protected void setUp() throws Exception {
Properties properties = TestManager.getServer().getContextEnvironment();
properties.put(Context.SECURITY_PRINCIPAL, "STATEFUL_test00_CLIENT");
properties.put(Context.SECURITY_CREDENTIALS, "STATEFUL_test00_CLIENT");
initialContext = new InitialContext(properties);
}
}
| [
"dain@2b0c1533-c60b-0410-b8bd-89f67432e5c6"
] | dain@2b0c1533-c60b-0410-b8bd-89f67432e5c6 |
328940d363a550da024d7f82c6502ad1b19f79a3 | d60e49a29a020ee294b672a62e00e0ab116430f3 | /concurrent-trees/ConcurrentRadixTree/src/main/java/com/example/demo/DemoApplication.java | e9a140923237b9207cfe27b9bddbf99aa9f53e6a | [] | no_license | NuyrkcaB/java-data-structures | 1619f22ec1a7e23040230ebbf7bd0fefb3836f41 | e137cfcdef8cd97b7ac7fc6bbee206d3c6df26a4 | refs/heads/master | 2021-04-03T15:38:12.384094 | 2019-02-18T13:58:17 | 2019-02-18T13:58:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,796 | java | package com.example.demo;
import com.googlecode.concurrenttrees.common.PrettyPrinter;
import com.googlecode.concurrenttrees.radix.ConcurrentRadixTree;
import com.googlecode.concurrenttrees.radix.RadixTree;
import com.googlecode.concurrenttrees.radix.node.concrete.DefaultCharArrayNodeFactory;
import com.googlecode.concurrenttrees.radix.node.util.PrettyPrintable;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import java.util.stream.StreamSupport;
@SpringBootApplication
public class DemoApplication implements CommandLineRunner {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
@Override
public void run(String... args) throws Exception {
RadixTree<Integer> tree = new ConcurrentRadixTree<Integer>(new DefaultCharArrayNodeFactory());
tree.put("springboot", 1);
tree.put("springcloud", 2);
tree.put("springmvc", 3);
tree.put("sports", 77);
PrettyPrinter.prettyPrint((PrettyPrintable) tree, System.out);
//Exact 매칭
System.out.println("#1. Exact 매칭 테스트");
System.out.println("springboot (exact match): " + tree.getValueForExactKey("springboot"));
System.out.println("springcloud (exact match): " + tree.getValueForExactKey("springcloud"));
System.out.println("springmvc (exact match): " + tree.getValueForExactKey("springmvc"));
System.out.println("sports (exact match): " + tree.getValueForExactKey("sports"));
//Prefix 매칭
System.out.println("#2. Prefix 매칭 테스트");
System.out.println("spring (prefix match): ");
StreamSupport.stream(tree.getKeyValuePairsForKeysStartingWith("spring").spliterator(), false)
.forEach(System.out::println);
}
}
| [
"sieunkr@gmail.com"
] | sieunkr@gmail.com |
6160d9dec62e142e4a4b2dbe5cb6dd6a0b41a180 | 14746c4b8511abe301fd470a152de627327fe720 | /soroush-android-1.10.0_source_from_JADX/ir/pec/mpl/pecpayment/p209a/p210a/C2340b.java | 2c260a2697888af4db21b7be1cb107cc426a3aee | [] | no_license | maasalan/soroush-messenger-apis | 3005c4a43123c6543dbcca3dd9084f95e934a6f4 | 29867bf53a113a30b1aa36719b1c7899b991d0a8 | refs/heads/master | 2020-03-21T21:23:20.693794 | 2018-06-28T19:57:01 | 2018-06-28T19:57:01 | 139,060,676 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,911 | java | package ir.pec.mpl.pecpayment.p209a.p210a;
import android.util.Base64;
import java.io.StringReader;
import java.math.BigInteger;
import java.security.Key;
import java.security.KeyFactory;
import java.security.spec.RSAPublicKeySpec;
import java.util.HashMap;
import javax.crypto.Cipher;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserFactory;
public class C2340b {
public static HashMap<String, String> m6342a(String str) {
HashMap<String, String> hashMap = new HashMap();
try {
XmlPullParser newPullParser = XmlPullParserFactory.newInstance().newPullParser();
newPullParser.setInput(new StringReader(str));
for (int eventType = newPullParser.getEventType(); eventType != 1; eventType = newPullParser.next()) {
if (eventType == 2) {
str = newPullParser.getName();
if (str.equals("Modulus")) {
hashMap.put("Modulus", newPullParser.nextText());
}
if (str.equals("Exponent")) {
hashMap.put("Exponent", newPullParser.nextText());
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
return hashMap;
}
public String m6343a(String str, String str2, String str3) {
String str4 = "";
try {
Key generatePublic = KeyFactory.getInstance("RSA").generatePublic(new RSAPublicKeySpec(new BigInteger(1, Base64.decode(str2, 0)), new BigInteger(1, Base64.decode(str3, 0))));
Cipher instance = Cipher.getInstance("RSA/ECB/PKCS1Padding");
instance.init(1, generatePublic);
return Base64.encodeToString(instance.doFinal(str.getBytes()), 2);
} catch (Exception e) {
e.printStackTrace();
return str4;
}
}
}
| [
"Maasalan@riseup.net"
] | Maasalan@riseup.net |
52f17dd93e0043cf4bf64ad3ac558c654be6bba4 | a4a51084cfb715c7076c810520542af38a854868 | /src/main/java/com/tencent/liteav/audio/impl/Record/g.java | 539505111ec300b90697f76b01b2963438956494 | [] | no_license | BharathPalanivelu/repotest | ddaf56a94eb52867408e0e769f35bef2d815da72 | f78ae38738d2ba6c9b9b4049f3092188fabb5b59 | refs/heads/master | 2020-09-30T18:55:04.802341 | 2019-12-02T10:52:08 | 2019-12-02T10:52:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,234 | java | package com.tencent.liteav.audio.impl.Record;
import android.content.Context;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.tencent.liteav.audio.d;
import com.tencent.liteav.audio.impl.TXCTraeJNI;
import com.tencent.liteav.basic.log.TXCLog;
import com.tencent.liteav.basic.structs.a;
import java.lang.ref.WeakReference;
public class g extends c {
public void sendCustomPCMData(a aVar) {
}
public void sendCustomPCMData(byte[] bArr) {
}
public int startRecord(Context context) {
TXCLog.i("AudioCenter:TXCAudioTraeRecordController", "trae startRecord");
super.startRecord(context);
TXCTraeJNI.InitTraeEngineLibrary(this.mContext);
TXCTraeJNI.setTraeRecordListener(this.mWeakRecordListener);
TXCTraeJNI.nativeTraeStartRecord(context, this.mSampleRate, this.mChannels, this.mBits, this.mAudioFormat, this.mFrameLenMs);
TXCTraeJNI.nativeTraeSetChangerType(this.mVoiceKind, this.mVoiceEnvironment);
if (!(this.mWeakRecordListener == null || this.mWeakRecordListener.get() == null)) {
((d) this.mWeakRecordListener.get()).a(1, "TRAE-AEC,采样率(" + this.mSampleRate + "|" + this.mSampleRate + "),声道数" + this.mChannels);
}
if (this.mAudioFormat != 11) {
return 0;
}
TXCTraeJNI.nativeSetFecRatio(this.mFecRatio);
return 0;
}
public void SetID(String str) {
super.SetID(str);
}
public int stopRecord() {
TXCLog.i("AudioCenter:TXCAudioTraeRecordController", "trae stopRecord");
TXCTraeJNI.nativeTraeStopRecord(true);
TXCTraeJNI.setTraeRecordListener((WeakReference<d>) null);
this.mFecRatio = BitmapDescriptorFactory.HUE_RED;
return 0;
}
public boolean isRecording() {
return TXCTraeJNI.nativeTraeIsRecording();
}
public void setReverbType(int i) {
super.setReverbType(i);
TXCTraeJNI.nativeTraeSetRecordReverb(i);
}
public void setChangerType(int i, int i2) {
super.setChangerType(i, i2);
TXCTraeJNI.nativeTraeSetChangerType(i, i2);
}
public void setVolume(float f2) {
super.setVolume(f2);
TXCTraeJNI.nativeTraeSetVolume(f2);
}
public void setMute(boolean z) {
super.setMute(z);
TXCTraeJNI.nativeTraeSetRecordMute(z);
this.mIsMute = z;
}
public void setEncBitRate(int i) {
super.setEncBitRate(i);
TXCTraeJNI.nativeSetEncBitRate(i);
}
public void setEncFrameLenMs(int i) {
super.setEncFrameLenMs(i);
TXCTraeJNI.nativeSetEncFrameLenMs(i);
}
public void setEncInfo(int i, int i2) {
super.setEncInfo(i, i2);
TXCTraeJNI.nativeSetEncInfo(i, i2);
}
public void setFecRatio(float f2) {
super.setFecRatio(f2);
TXCTraeJNI.nativeSetFecRatio(this.mFecRatio);
}
public void setEnableVolumeLevel(boolean z) {
super.setEnableVolumeLevel(z);
TXCTraeJNI.nativeTraeSetEnableVolumeLevel(z);
}
public int getVolumeLevel() {
if (this.mEnableVolumeLevel) {
return TXCTraeJNI.nativeTraeGetVolumeLevel();
}
return 0;
}
}
| [
"noiz354@gmail.com"
] | noiz354@gmail.com |
39aac2faa2cfe62efec8397275819aefad68410c | 00c1e2cb248225c5c3071b681d169257d604b713 | /src/com/smanzana/templateeditor/editor/fields/ChildEditorField.java | c033909369919b1f513f97dbcd025dc0d4f14e8c | [] | no_license | Dove-Bren/TemplateEditor | 4e32d67c4ba5abc5b3970c608200802dfd517ca1 | 162d6573a5a1ae539c266249295bce4b2d323cfb | refs/heads/master | 2021-05-15T19:06:32.023706 | 2017-12-02T08:43:15 | 2017-12-02T08:43:15 | 107,754,122 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,190 | java | package com.smanzana.templateeditor.editor.fields;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.ListCellRenderer;
import com.smanzana.templateeditor.IEditorOwner;
import com.smanzana.templateeditor.api.FieldData;
import com.smanzana.templateeditor.editor.TemplateEditor;
import com.smanzana.templateeditor.uiutils.UIColor;
/**
* Special editor field which is actually a sub-editor.
* Made for creating one of a handful types of children.
* This works great for a class that has a reference to an abstract type
* (like Item) that has enumerable concrete children (Equipment, Junk, Weapon)
* that you'd like to be able to construct.
* <p>
* The idea here is you provide the editor with a list of 'types' and
* a map between type and type-specification information.
* That is, you provide a list of types and a map of type to submap between
* integer and field data.
* </p>
* You get a combo box for free to switch type. The field also takes care of
* displaying the correct fields to operate like a regular editor when
* given a data map.
* @author Skyler
*
*/
public class ChildEditorField<T, O> extends AEditorField<O> implements ItemListener, IEditorOwner {
public static interface GenericFactory<T, O> {
/**
* Take a type and map of data and construct an object from it.
* @param type The type the data corresponds to
* @param data The raw data map
* @return An object constructed from the data
*/
public O constructFromData(T type, Map<Integer, FieldData> data);
/**
* Like {@link #constructFromData(Object, Map)}, but without the data.
* Used internally to deal with null types. We have to do something!
* @param type
* @return
*/
public O constructDefault(T type);
/**
* Construct a clone object.
* @param original
* @return
*/
public O constructClone(O original);
}
public static interface TypeResolver<T, O> {
/**
* Resolve an object into it's subtype.
* @param obj
* @return
*/
public T resolve(O obj);
/**
* Take an object and produce the corresponding data map
* @param obj
* @return
*/
public Map<Integer, FieldData> breakdown(O obj);
}
private JPanel wrapper;
private Map<T, TemplateEditor<Integer>> typeEditors;
private T currentType;
private T defaultType;
private GenericFactory<T, O> factory;
private TypeResolver<T, O> resolver;
public ChildEditorField(List<T> types, Map<T, Map<Integer, FieldData>> maps,
GenericFactory<T, O> factory, O current) {
this(types, maps, factory, current, null, null);
}
public ChildEditorField(List<T> types, Map<T, Map<Integer, FieldData>> maps,
GenericFactory<T, O> factory, O current, TypeResolver<T, O> resolver) {
this(types, maps, factory, current, resolver, null);
}
public ChildEditorField(List<T> types, Map<T, Map<Integer, FieldData>> maps,
GenericFactory<T, O> factory, O current, TypeResolver<T, O> resolver,
ListCellRenderer<T> customRenderer){
this.factory = factory;
this.resolver = resolver;
typeEditors = new HashMap<>();
JComboBox<T> comboField = new JComboBox<>();
for (T t : types)
comboField.addItem(t);
defaultType = types.get(0);
comboField.setEditable(false);
if (customRenderer != null)
comboField.setRenderer(customRenderer);
comboField.addItemListener(this);
comboField.setMaximumSize(new Dimension(Short.MAX_VALUE, comboField.getPreferredSize().height));
wrapper = new JPanel();
wrapper.setLayout(new BoxLayout(wrapper, BoxLayout.PAGE_AXIS));
UIColor.setColors(wrapper, UIColor.Key.EDITOR_MAIN_PANE_FOREGROUND, UIColor.Key.EDITOR_MAIN_PANE_BACKGROUND);
wrapper.add(Box.createRigidArea(new Dimension(0, 10)));
JLabel label = new JLabel("Type");
label.setFont(label.getFont().deriveFont(Font.BOLD));
label.setHorizontalAlignment(JLabel.CENTER);
label.setAlignmentX(.5f);
UIColor.setColors(label, UIColor.Key.EDITOR_MAIN_PANE_FOREGROUND, UIColor.Key.EDITOR_MAIN_PANE_BACKGROUND);
wrapper.add(label);
wrapper.add(comboField);
wrapper.add(Box.createRigidArea(new Dimension(0, 20)));
for (T type : types) {
TemplateEditor<Integer> editor = new TemplateEditor<Integer>(
this, maps.get(type));
typeEditors.put(type, editor);
editor.setVisible(false);
wrapper.add(editor);
}
wrapper.add(Box.createRigidArea(new Dimension(0, 10)));
this.setObject(current);
comboField.setSelectedItem(currentType);
}
private void updateField(T newType) {
if (currentType != null)
typeEditors.get(currentType).setVisible(false);
typeEditors.get(newType).setVisible(true);
currentType = newType;
wrapper.setSize(new Dimension(wrapper.getWidth(), (int) wrapper.getPreferredSize().getHeight()));
wrapper.validate();
wrapper.repaint();
}
public JPanel getComponent() {
return wrapper;
}
@Override
public O getObject() {
return factory.constructFromData(currentType, typeEditors.get(currentType).fetchData());
}
@Override
public void setCurrentObject(O obj) {
T newType;
if (obj == null) {
//newType = defaultType;
obj = factory.constructDefault(defaultType);
}
// deduce type
if (resolver == null) {
System.err.println("Cannot set value of ChildEditorField as "
+ "no resolver was provided!");
return;
}
newType = resolver.resolve(obj);
wrapper.remove(typeEditors.get(newType));
TemplateEditor<Integer> editor = new TemplateEditor<Integer>(this, resolver.breakdown(obj));
typeEditors.put(newType, editor);
wrapper.add(editor);
updateField(newType);
}
@Override
public void itemStateChanged(ItemEvent arg0) {
if (arg0.getStateChange() != ItemEvent.SELECTED)
return;
@SuppressWarnings("unchecked")
T newType = (T) arg0.getItem();
if (newType == currentType)
return;
updateField(newType);
markDirty();
}
@Override
public void dirty() {
markDirty();
}
}
| [
"skymanzanares@hotmail.com"
] | skymanzanares@hotmail.com |
dc400d6621013d69a3e93b3562821b06de686047 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Chart/1/org/jfree/chart/renderer/xy/XYBoxAndWhiskerRenderer_XYBoxAndWhiskerRenderer_164.java | d800cf38592ec754c06b7d4c8a9e361cbefc7aca | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 1,691 | java |
org jfree chart render
render draw box whisker item link plot xyplot
render requir link box whisker dataset boxandwhiskerxydataset shown
gener code box whisker chart demo2 boxandwhiskerchartdemo2 java code program
includ free chart jfreechart demo collect
img src imag box whisker render sampl xyboxandwhiskerrenderersampl png
alt box whisker render sampl xyboxandwhiskerrenderersampl png
render includ code calcul crosshair point
box whisker render xyboxandwhiskerrender abstract item render abstractxyitemrender
creat render box whisker chart
box width prefer width calcul
automat
param box width boxwidth box width
box whisker render xyboxandwhiskerrender box width boxwidth
box width boxwidth box width boxwidth
box paint boxpaint color green
fill box fillbox
set base tool tip gener setbasetooltipgener box whisker tool tip gener boxandwhiskerxytooltipgener
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
cf29d5745ae6b2edd8595a4fedf59edf172db104 | 2266a4af60fa6d524a76f18ac21073bfc12f291d | /src/main/java/com/wise/controller/CommonControllerV105.java | e09cdb90e08eb6b574ca4cd3758891b2e8177134 | [] | no_license | zhechu/spring-boot-api-version-demo | 3f07cdb8c67e41e74263c63828856ed9856c5fc4 | d92e649273a48bd5d109ace50cd021ad297e8d49 | refs/heads/master | 2022-04-18T07:05:15.254323 | 2020-04-17T14:54:42 | 2020-04-17T14:54:42 | 256,525,646 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 917 | java | package com.wise.controller;
import com.wise.annotation.ApiVersion;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 1.0.5 版本控制器
*
* @author lingyuwang
* @date 2020-04-17 22:08
* @since 1.0.9
* @deprecated
* @see CommonControllerV106
*/
@RestController
@RequestMapping("/common")
@ApiVersion(value = "1.0.5")
@Deprecated
public class CommonControllerV105 {
@Value("${spring.profiles.active:dev}")
private String env;
/**
* 获取服务环境
*
* @return java.lang.String
* @author lingyuwang
* @date 2020-04-17 22:08
* @since 1.0.9
*/
@GetMapping("/env")
public String env() {
return String.format("%s_%s", env, "1.0.5");
}
}
| [
"ling-yu-wang@qq.com"
] | ling-yu-wang@qq.com |
0e9f21ada41ee7ac71d24b65e0c29b3013ee2c31 | 95e944448000c08dd3d6915abb468767c9f29d3c | /sources/com/p280ss/android/ugc/aweme/profile/widgets/C36900a.java | fb1d349bfcb0bf237c279381fcd6068273f2d63e | [] | no_license | xrealm/tiktok-src | 261b1faaf7b39d64bb7cb4106dc1a35963bd6868 | 90f305b5f981d39cfb313d75ab231326c9fca597 | refs/heads/master | 2022-11-12T06:43:07.401661 | 2020-07-04T20:21:12 | 2020-07-04T20:21:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 485 | java | package com.p280ss.android.ugc.aweme.profile.widgets;
import kotlin.jvm.internal.C7573i;
import kotlin.jvm.p357a.C7561a;
/* renamed from: com.ss.android.ugc.aweme.profile.widgets.a */
final class C36900a implements Runnable {
/* renamed from: a */
private final /* synthetic */ C7561a f96714a;
C36900a(C7561a aVar) {
this.f96714a = aVar;
}
public final /* synthetic */ void run() {
C7573i.m23582a(this.f96714a.invoke(), "invoke(...)");
}
}
| [
"65450641+Xyzdesk@users.noreply.github.com"
] | 65450641+Xyzdesk@users.noreply.github.com |
629940db988e72a1566feb4b77fe13c73b31562b | 587124198d4b31f256b751eeb101a65f1a4dd896 | /services/mtwilson-http-security-server/src/main/java/com/intel/mtwilson/security/core/RequestLog.java | 81c3ecf76a04b2f7e0b70ba943df82dcddbee8da | [
"BSD-3-Clause"
] | permissive | opencit/opencit | 2a66386bcb8a503ab45c129dd4c2159400539bcb | 069bb5082becd0da7435675f569b46d2178b70ac | refs/heads/release-cit-2.2 | 2021-05-24T01:48:03.262565 | 2019-11-20T01:24:36 | 2019-11-20T01:24:36 | 56,611,216 | 46 | 29 | NOASSERTION | 2021-03-22T23:48:17 | 2016-04-19T15:57:26 | Java | UTF-8 | Java | false | false | 605 | java | /*
* Copyright (C) 2011-2012 Intel Corporation
* All rights reserved.
*/
package com.intel.mtwilson.security.core;
import java.util.Date;
import java.util.List;
/**
* @since 1.2
* @author jbuhacoff
*/
public interface RequestLog {
// RequestInfo findRequestWithMd5Hash(byte[] md5_hash);
// RequestInfo findRequestWithMd5HashAfter(byte[] md5_hash, Date after); // finds requests received AFTER this date (not inclusive)
List<RequestInfo> findRequestFromSourceWithMd5HashAfter(String source, byte[] md5_hash, Date after);
void logRequestInfo(RequestInfo request);
}
| [
"jonathan.buhacoff@intel.com"
] | jonathan.buhacoff@intel.com |
20f72f557b029a3addaa4391fb4eb382f27f2122 | ad5cd983fa810454ccbb8d834882856d7bf6faca | /modules/b2b-accelerator-addons/savedorderforms/src/de/hybris/platform/savedorderforms/jalo/SavedorderformsManager.java | 8a29fd9177e4d77938bd4170ab3d5b33f781baba | [] | no_license | amaljanan/my-hybris | 2ea57d1a4391c9a81c8f4fef7c8ab977b48992b8 | ef9f254682970282cf8ad6d26d75c661f95500dd | refs/heads/master | 2023-06-12T17:20:35.026159 | 2021-07-09T04:33:13 | 2021-07-09T04:33:13 | 384,177,175 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 797 | java | /*
*
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
package de.hybris.platform.savedorderforms.jalo;
import de.hybris.platform.jalo.JaloSession;
import de.hybris.platform.jalo.extension.ExtensionManager;
import de.hybris.platform.savedorderforms.constants.SavedorderformsConstants;
import org.apache.log4j.Logger;
public class SavedorderformsManager extends GeneratedSavedorderformsManager
{
@SuppressWarnings("unused")
private static final Logger log = Logger.getLogger( SavedorderformsManager.class.getName() );
public static final SavedorderformsManager getInstance()
{
ExtensionManager em = JaloSession.getCurrentSession().getExtensionManager();
return (SavedorderformsManager) em.getExtension(SavedorderformsConstants.EXTENSIONNAME);
}
}
| [
"amaljanan333@gmail.com"
] | amaljanan333@gmail.com |
7df505302ab53668f51b6f68a23f368f115ff92c | b65d7e511c86c524e43f5952bee3f417c4c9aa31 | /Laboratorios/Lab03/src/com/facu/javastandard/ejercicio2/Cliente.java | a808453847dcfdca92854b7c110467cb69565d6c | [] | no_license | FMediotte96/Java-Standard | 1a4f5df8815a1ae1ace5f630a83de80b125e31be | dca059d66e1f0c5b30b4a260a3c2f1aa1fb1945a | refs/heads/master | 2021-05-09T09:42:13.007524 | 2020-10-05T16:40:20 | 2020-10-05T16:40:20 | 119,458,344 | 0 | 0 | null | 2020-08-17T00:03:20 | 2018-01-30T00:08:48 | HTML | UTF-8 | Java | false | false | 604 | java | package com.facu.javastandard.ejercicio2;
public class Cliente {
private String nombre;
private String dni;
public Cliente() {
}
public Cliente(String nombre, String dni) {
this.nombre = nombre;
this.dni = dni;
}
public String getNombre() {
return nombre;
}
public void setNombre(String nombre) {
this.nombre = nombre;
}
public String getDni() {
return dni;
}
public void setDni(String dni) {
this.dni = dni;
}
public boolean equals(Object obj) {
Cliente c = (Cliente) obj;
if(c.getDni().equals(this.getDni())) {
return true;
}
return false;
}
}
| [
"facumediotte@gmail.com"
] | facumediotte@gmail.com |
b61204e90dc94f166019ad2d4d306ecce6c87149 | eca4a253fe0eba19f60d28363b10c433c57ab7a1 | /apps/jacob.caretaker/java/jacob/event/screen/f_call_entry/callEntryCaretaker/CustomerSearch.java | 019fc0f87891d4b001ce684bf4f9d67b41f18636 | [] | no_license | freegroup/Open-jACOB | 632f20575092516f449591bf6f251772f599e5fc | 84f0a6af83876bd21c453132ca6f98a46609f1f4 | refs/heads/master | 2021-01-10T11:08:03.604819 | 2015-05-25T10:25:49 | 2015-05-25T10:25:49 | 36,183,560 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 439 | java | /*
* Created on 04.05.2004
*
*/
package jacob.event.screen.f_call_entry.callEntryCaretaker;
import jacob.common.gui.employee.ConstraintCustomerSearch;
/**
* @author achim
*
*/
public final class CustomerSearch extends ConstraintCustomerSearch
{
static public final transient String RCS_ID = "$Id: CustomerSearch.java,v 1.3 2004/07/09 10:25:41 herz Exp $";
static public final transient String RCS_REV = "$Revision: 1.3 $";
}
| [
"a.herz@freegroup.de"
] | a.herz@freegroup.de |
e8e57a4d2d8590ad5bbd278203d7241b5a4dcb4b | 60e0df102379296cd2c2f9572c61399d52b5565f | /Src/futureD/src/com/eoulu/dao/YieldDao.java | 4cb3c335e0b56eb6f0bf767f450e8c6e50149a25 | [] | no_license | LGDHuaOPER/dataAnalysis | db25d27b20009b1fb8e7ebe8cbe0ac40b528137c | c3eba3615d2bd482cdb4a06599917fab58382eae | refs/heads/master | 2020-03-31T08:45:27.595833 | 2019-01-04T10:47:21 | 2019-01-04T10:47:21 | 152,071,228 | 3 | 0 | null | 2018-12-17T11:05:10 | 2018-10-08T11:50:03 | JavaScript | UTF-8 | Java | false | false | 2,064 | java | /**
*
*/
package com.eoulu.dao;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.eoulu.util.DataBaseUtil;
/**
* @author mengdi
*
*
*/
public class YieldDao {
private DataBaseUtil db = new DataBaseUtil();
public Double getYieldPerParam(Connection conn,int waferId,String column,double left,double right){
String sql = "select format(count(*)/(select count(*) from dm_wafer_coordinate_data where wafer_id=? and (bin=1 or bin=255)),2) yield from dm_wafer_coordinate_data where wafer_id=? and (bin=1 or bin=255) and "+column+" between ? and ?";
Object result = db.queryResult(conn, sql, new Object[]{waferId,waferId,left,right});
return result==null?Double.NaN:Double.parseDouble(result.toString());
}
public String getWaferNO(Connection conn,int waferId){
String sql = "select wafer_number from dm_wafer where wafer_id=?";
Object result = db.queryResult(conn,sql, new Object[]{waferId});
return result==null?"":result.toString();
}
/**
* 上下限
* @param waferId 晶圆表主键
* @param conn
* @return
*/
public List<Double> getUpperAndLowerLimit(int waferId,String paramName,Connection conn) {
String sql = "select upper_limit,lower_limit from dm_wafer_parameter where wafer_id=? and parameter_name=?";
PreparedStatement ps;
List< Double> list = new ArrayList<>();
double left = Double.NaN,right = Double.NaN;
try {
ps = conn.prepareStatement(sql);
ps.setInt(1,waferId);
ps.setString(2, paramName);
ResultSet rs = ps.executeQuery();
while(rs.next()){
left = rs.getDouble(2);
right = rs.getDouble(1);
}
} catch (SQLException e) {
e.printStackTrace();
}
list.add(left);
list.add(right);
return list;
}
public List<Map<String,Object>> getWaferYield(Connection conn,String waferIdStr){
String sql = "";
return db.queryToList(conn, sql, new Object[]{waferIdStr});
}
}
| [
"LGD_HuaOPER@gmail.com"
] | LGD_HuaOPER@gmail.com |
113cead3a9d9007ca9c0daffc5491e2850897694 | f15889af407de46a94fd05f6226c66182c6085d0 | /newreco/src/test/java/com/nas/recovery/web/action/propertymanagement/PropertyManagementCompanyActionTestBase.java | 98cbe8c9a5c8575c1b79c8b6d60180fd54cf8a51 | [] | no_license | oreon/sfcode-full | 231149f07c5b0b9b77982d26096fc88116759e5b | bea6dba23b7824de871d2b45d2a51036b88d4720 | refs/heads/master | 2021-01-10T06:03:27.674236 | 2015-04-27T10:23:10 | 2015-04-27T10:23:10 | 55,370,912 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 898 | java | package com.nas.recovery.web.action.propertymanagement;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import org.jboss.seam.security.Identity;
import org.testng.annotations.Test;
import org.witchcraft.base.entity.*;
import org.hibernate.annotations.Filter;
import org.testng.annotations.BeforeClass;
import org.witchcraft.seam.action.BaseAction;
import com.nas.recovery.domain.propertymanagement.PropertyManagementCompany;
public class PropertyManagementCompanyActionTestBase
extends
org.witchcraft.action.test.BaseTest<PropertyManagementCompany> {
PropertyManagementCompanyAction propertyManagementCompanyAction = new PropertyManagementCompanyAction();
@BeforeClass
public void init() {
super.init();
}
@Override
public BaseAction<PropertyManagementCompany> getAction() {
return propertyManagementCompanyAction;
}
}
| [
"singhj@38423737-2f20-0410-893e-9c0ab9ae497d"
] | singhj@38423737-2f20-0410-893e-9c0ab9ae497d |
9876fc3429b91b07b55ebf0dfdbb5540c3a21a95 | 3a9141cbe3f7fccfab4be2eace283be2dc6455b1 | /src/main/java/com/belatrixsf/exercise/refactor/persistence/datasource/DataSource.java | 20526a7718327828b39483bab0eb7f75d8157ac1 | [] | no_license | Giancarlo2709/exercise-belatrix-refactor | d5547068d73ffd3e631a5a788c6898707386a6ac | 221114c936fcb8c8c9f244e6c27d97f21b7b3930 | refs/heads/master | 2022-01-29T08:04:32.015241 | 2020-01-13T06:14:02 | 2020-01-13T06:14:02 | 233,523,415 | 0 | 0 | null | 2022-01-21T23:36:17 | 2020-01-13T06:06:21 | Java | UTF-8 | Java | false | false | 640 | java | package com.belatrixsf.exercise.refactor.persistence.datasource;
import java.util.Properties;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
import com.belatrixsf.exercise.refactor.constants.Constans;
import com.belatrixsf.exercise.refactor.util.LoggerProperties;
public class DataSource {
public static javax.sql.DataSource getDataSource() {
Properties properties = LoggerProperties.getProperties();
return new DriverManagerDataSource(
properties.getProperty(Constans.DATABASE_URL),
properties.getProperty(Constans.DATABASE_USER),
properties.getProperty(Constans.DATABASE_PASSWORD));
}
}
| [
"giancarlo2709@gmail.com"
] | giancarlo2709@gmail.com |
8d149a97904caee8e7040695aab103f97aaace1f | 92f2df2289eb55810bccb30ea0b29ca3fbc84e79 | /BoosterCodeGenerator/src/main/java/com/hexacta/booster/codegeneration/warning/GetterMissingWarning.java | a01d7ac052584e0bea39c16cb483b0f0af107b9f | [] | no_license | ltenconi/hexacta-booster | b47fb01bee57cbd9c2041fd50b83e915293d41b4 | c130039f2b669c092ce97864b926916bce6e146d | refs/heads/master | 2021-05-09T02:14:33.793234 | 2018-02-20T15:43:13 | 2018-02-20T15:43:13 | 119,201,384 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 751 | java | /**
*
*/
package com.hexacta.booster.codegeneration.warning;
import com.hexacta.booster.codegeneration.metamodel.Class;
import com.hexacta.booster.codegeneration.metamodel.Field;
/**
* @author ltenconi
*
*/
public class GetterMissingWarning extends AccessorMethodMissingWarning {
/**
* @param message
* @param location
* @param field
*/
public GetterMissingWarning(final String message, final Class location, final Field field) {
super(message, location, field);
}
/*
* (non-Javadoc)
*
* @seecom.hexacta.booster.warning.AccessorMethodMissingWarning#
* isGetterMissingWarning()
*/
@Override
public boolean isGetterMissingWarning() {
return true;
}
}
| [
"ltenconi@gmail.com"
] | ltenconi@gmail.com |
d61ec8f96fa8c0ac0213cdfee247878ad70f6508 | f8471cde07593556927eaee5dac765c63c0826fb | /java-1/Assignments/Assignment 1/Assignment1/src/SmallLarge.java | b173f52666b66070f356a1b4879a15a51037097a | [] | no_license | johnkirch123/java | 6ccadcf4f3a27e6a392b349c4ad0d28f4cf76957 | 2f0928b3f76a2f8f7c22eccaae97b018fb332110 | refs/heads/master | 2020-02-26T14:48:02.199346 | 2017-08-28T01:31:06 | 2017-08-28T01:31:06 | 95,608,407 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,766 | 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.
*/
/**
*
* @author John Kirch
*/
import java.util.Scanner;
public class SmallLarge {
public static void main (String[] args) {
Scanner input = new Scanner (System.in);
int num1, num2, num3, sum, avg, product;
int smallest = 0;
int largest = 0;
System.out.println("Please input your first number: ");
num1 = input.nextInt();
System.out.println("Please input your second number: ");
num2 = input.nextInt();
System.out.println("Please input your third number: ");
num3 = input.nextInt();
sum = num1 + num2 + num3;
avg = sum / 3;
product = num1 * num2 * num3;
if (num1 < num2 && num1 < num3)
smallest = num1;
if (num2 < num1 && num2 < num3)
smallest = num2;
if (num3 < num2 && num3 < num1)
smallest = num3;
if (num1 > num2 && num1 > num3)
largest = num1;
if (num2 > num1 && num2 > num3)
largest = num2;
if (num3 > num2 && num3 > num1)
largest = num3;
System.out.println("The sum of these numbers is " + sum);
System.out.println("The average of these numbers is " + avg);
System.out.println("The product of these numbers is " + product);
System.out.println("The smallest of these numbers is " + smallest);
System.out.println("The largest of these numbers is " + largest);
}
}
| [
"john.kirch.business@gmail.com"
] | john.kirch.business@gmail.com |
4d7cc3c9fb918972198839790efcf4c1068a09d0 | 723cf379d4f5003337100548db3121081fe08504 | /java/io/InvalidObjectException.java | 0d6f5e576209a6bc0324226cf9f480fc66bc9846 | [] | no_license | zxlooong/jdk13120 | 719b53375da0a5a49cf74efb42345653ccd1e9c1 | f8bcd92167a3bf8dd9b1a77009d96d0f5653b825 | refs/heads/master | 2016-09-06T18:11:53.353084 | 2013-12-06T16:09:41 | 2013-12-06T16:09:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 754 | java | /*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package java.io;
/**
* Indicates that one or more deserialized objects failed validation
* tests. The argument should provide the reason for the failure.
*
* @see ObjectInputValidation
* @since JDK1.1
*
* @author unascribed
* @version 1.13, 02/06/02
* @since JDK1.1
*/
public class InvalidObjectException extends ObjectStreamException {
/**
* Constructs an <code>InvalidObjectException</code>.
* @param reason Detailed message explaing the reason for the failure.
*
* @see ObjectInputValidation
*/
public InvalidObjectException(String reason) {
super(reason);
}
}
| [
"zxlooong@gmail.com"
] | zxlooong@gmail.com |
6a00fe87ff57a054e4511f178171e2324a859cc9 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Chart/22/org/jfree/chart/renderer/category/LineAndShapeRenderer_setSeriesLinesVisible_277.java | 9d01ad2bbdca5ab97956cbad86000e363f60207c | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 1,379 | java |
org jfree chart render categori
render draw shape data item line data
item link categori plot categoryplot
line shape render lineandshaperender abstract categori item render abstractcategoryitemrender
set 'line visible' flag seri send
link render chang event rendererchangeev regist listen
param seri seri index base
param visibl flag
seri line visibl getserieslinesvis
set seri line visibl setserieslinesvis seri visibl
set seri line visibl setserieslinesvis seri boolean valueof visibl
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
b9e7adb86aeeb7e3902db50406e562d6504558a0 | 3f954c0b777cecfff80623c87bd4291292167afc | /test/junit/workbench/gui/editor/SyntaxUtilitiesTest.java | ca37d6c79a8c5cf1817522fccba452a1572a5e04 | [] | no_license | zippy1981/SqlWorkbenchJ | 67ba4dca04fb9ee69ca0992032c6ddfb69614f60 | 7b246fb0dadd6b5c47900dcbb2298cc5f0143b77 | refs/heads/master | 2021-01-10T01:47:54.963813 | 2016-02-14T23:14:10 | 2016-02-14T23:14:10 | 45,090,119 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,906 | java | /*
* This file is part of SQL Workbench/J, http://www.sql-workbench.net
*
* Copyright 2002-2016, Thomas Kellerer
*
* Licensed under a modified Apache License, Version 2.0
* that restricts the use for certain governments.
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://sql-workbench.net/manual/license.html
*
* 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.
*
* To contact the author please send an email to: support@sql-workbench.net
*/
package workbench.gui.editor;
import javax.swing.text.Segment;
import org.junit.Test;
import static org.junit.Assert.*;
/**
*
* @author Thomas Kellerer
*/
public class SyntaxUtilitiesTest
{
@Test
public void testRegionMatchStart()
{
String lineText = "this is a line with some text in it.";
Segment line = new Segment(lineText.toCharArray(), 0, lineText.length());
int pos = SyntaxUtilities.findMatch(line, "line", 0, true);
assertEquals(10, pos);
pos = SyntaxUtilities.findMatch(line, "xline", 0, true);
assertEquals(-1, pos);
pos = SyntaxUtilities.findMatch(line, "this", 0, true);
assertEquals(0, pos);
pos = SyntaxUtilities.findMatch(line, "it.", 0, true);
assertEquals(33, pos);
lineText = "Line 1 Text\nLine 2 foo\nLine 4 bar\n";
line = new Segment(lineText.toCharArray(), 0, 11);
pos = SyntaxUtilities.findMatch(line, "foo", 0, true);
assertEquals(-1, pos);
line.offset = 12;
line.count = 10;
pos = SyntaxUtilities.findMatch(line, "foo", 0, true);
assertEquals(7, pos);
}
}
| [
"tkellerer@6c36a7f0-0884-4472-89c7-80b7fa7b7f28"
] | tkellerer@6c36a7f0-0884-4472-89c7-80b7fa7b7f28 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.