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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3bc72aa693df59d2b0f4b7df6ad9bea8b4445849 | f7f773ab56f61a83032682e66019372e6e853ec9 | /framework/common/src/cc/alcina/framework/common/client/actions/JobResource.java | 13aa0ee1c1a69a5f1e5cef9a4f6fbd6f26259eef | [] | no_license | sp2020jarvan3/alcina | b4025b71375e0c0cdcda3d52400f8cba22bfb795 | 40f5089c710d37542d04fde1bcd9a5b681ca901d | refs/heads/main | 2023-03-23T11:49:38.184094 | 2021-03-22T17:33:24 | 2021-03-22T17:33:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 434 | java | package cc.alcina.framework.common.client.actions;
import java.util.Collections;
import java.util.List;
public interface JobResource {
void acquire();
default List<JobResource> asSingleton() {
return Collections.singletonList(this);
}
default String getPath() {
return "";
}
default boolean isSharedWithChildren() {
return false;
}
default boolean isSharedWithSubsequents() {
return false;
}
void release();
} | [
"nick.reddel@gmail.com"
] | nick.reddel@gmail.com |
cdce7abd853573144a7c6ba1954f98d41dc94d1c | df0d0e0433f813f442014f9babda2d171139ca94 | /src/main/java/org/wildfly/security/manager/action/GetAccessControlContextAction.java | cbcd687211b2348479db716254631465cbe01eb9 | [] | no_license | wildfly-security/security-manager | 9685ec8d102e656ba572680963c2b5016f368234 | 297ef3f6b5cc18e48715456d9f6df1d338e19468 | refs/heads/master | 2021-06-03T13:38:42.808819 | 2015-07-13T20:55:10 | 2015-07-13T20:55:21 | 10,243,438 | 0 | 3 | null | 2020-10-13T02:27:10 | 2013-05-23T12:40:08 | Java | UTF-8 | Java | false | false | 1,898 | java | /*
* JBoss, Home of Professional Open Source.
* Copyright 2013, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.wildfly.security.manager.action;
import java.security.AccessControlContext;
import java.security.AccessController;
import java.security.PrivilegedAction;
/**
* A privileged action to get the current access control context.
*
* @author <a href="mailto:david.lloyd@redhat.com">David M. Lloyd</a>
*/
public final class GetAccessControlContextAction implements PrivilegedAction<AccessControlContext> {
private static final GetAccessControlContextAction INSTANCE = new GetAccessControlContextAction();
/**
* Get the singleton instance.
*
* @return the singleton instance of this action
*/
public static GetAccessControlContextAction getInstance() {
return INSTANCE;
}
private GetAccessControlContextAction() {
}
public AccessControlContext run() {
return AccessController.getContext();
}
}
| [
"david.lloyd@redhat.com"
] | david.lloyd@redhat.com |
f15e0f1098e105bb4161fe89b51a314a35c68969 | ad46944db3a2c9811426862c900b2c02d8da7fa6 | /ex04/src/ex04/Ch04Ex02_02.java | 5464ad4f55c89e3fd1f325eaf48938c3bfae6e3c | [] | no_license | choimyeongkwun/work_java | d70e52c4fe6580bf947092124ffd7054a3de6cc9 | 57ff2184719f2bedf2370c41a2913d2608b07bca | refs/heads/master | 2020-03-18T03:44:25.573494 | 2018-08-04T08:50:57 | 2018-08-04T08:50:57 | 134,253,141 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 484 | java | package ex04;
import java.util.Scanner;
public class Ch04Ex02_02 {
public static void main(String[] args) {
// TODO Auto-generated method stub
int sum = 0; //총합을 저장할 변수
int i = 1; // while문을 반복할때마다 1씩 증가하는 변수
Scanner scanner = new Scanner(System.in);
String input = scanner.nextLine();
int num = Integer.parseInt(input);
while(i<=num) {
sum += i;
i++;
}
System.out.println(sum);
}
}
| [
"KOITT@KOITT-PC"
] | KOITT@KOITT-PC |
9a5c7c81cada492ff0d3ea1e89774f17f0f573f4 | db08d5f745fd3f2ccc253e1ad23210bb17a10760 | /open-bidder-master/open-bidder-ui/src/main/java/com/google/openbidder/ui/controller/support/RootResourceController.java | e3ac2accb481cfe61da9ee3621c256eb6cbd85d1 | [
"Apache-2.0"
] | permissive | Essens/openbidder | ade2b73152dcca0ddedab9fba46ec9c2f04d94a0 | 59f724fe6e3dd969934b77ff5b059c97dc7d1d9c | refs/heads/Initial | 2021-01-22T01:42:40.351068 | 2015-08-30T06:15:46 | 2015-08-30T06:15:46 | 49,961,489 | 10 | 8 | null | 2016-01-19T15:20:14 | 2016-01-19T15:20:13 | null | UTF-8 | Java | false | false | 4,134 | java | /*
* Copyright 2012 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.openbidder.ui.controller.support;
import com.google.common.base.Preconditions;
import com.google.openbidder.ui.resource.RootResourceService;
import com.google.openbidder.ui.resource.support.ExternalResource;
import com.google.openbidder.ui.util.validation.Create;
import com.google.openbidder.ui.util.validation.Update;
import com.google.openbidder.ui.util.web.WebUtils;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
/**
* Resource controller for root-level {@link ExternalResource}s using a
* {@link com.google.openbidder.ui.resource.RootResourceService}.
*/
public class RootResourceController<T extends ExternalResource>
extends AbstractResourceController<T> {
private final RootResourceService<T> rootResourceService;
public RootResourceController(RootResourceService<T> rootResourceService) {
this.rootResourceService = Preconditions.checkNotNull(rootResourceService);
}
@RequestMapping(
value = "/{resourceName}",
method = RequestMethod.GET,
produces = "application/json")
@ResponseBody
public T get(
HttpServletRequest request,
@PathVariable("resourceName") String resourceName) {
return rootResourceService.get(resourceName, WebUtils.convertParameters(request));
}
@RequestMapping(
method = RequestMethod.GET,
produces = "application/json")
@ResponseBody
public List<? extends T> list(HttpServletRequest request) {
return rootResourceService.list(WebUtils.convertParameters(request));
}
@RequestMapping(
method = RequestMethod.POST,
consumes = "application/json",
produces = "application/json")
@ResponseBody
public T createFromJson(@Validated(Create.class) @RequestBody T newResource) {
return rootResourceService.create(newResource);
}
@RequestMapping(
method = RequestMethod.POST,
produces = "application/json")
@ResponseBody
public ResponseEntity<?> createFromForm(
HttpServletRequest request,
@Validated(Create.class) T newResource,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return bindingErrorResponse(request, bindingResult);
}
return new ResponseEntity<>(rootResourceService.create(newResource), HttpStatus.OK);
}
@RequestMapping(
value = "/{resourceName}",
method = RequestMethod.PUT,
consumes = "application/json",
produces = "application/json")
@ResponseBody
public ResponseEntity<?> update(
HttpServletRequest request,
@PathVariable("resourceName") String resourceName,
@Validated(Update.class) @RequestBody T updatedResource) {
return new ResponseEntity<>(
rootResourceService.update(resourceName, updatedResource),
HttpStatus.OK);
}
@RequestMapping(
value = "/{resourceName}",
method = RequestMethod.DELETE)
@ResponseBody
public void delete(@PathVariable("resourceName") String resourceName) {
rootResourceService.delete(resourceName);
}
}
| [
"aakif@mobitrans.net"
] | aakif@mobitrans.net |
86f1097a79ac3760d5c92df238d84cb8136734a7 | 3637342fa15a76e676dbfb90e824de331955edb5 | /2s/pojo/src/main/java/com/bcgogo/user/dto/VehicleModifyLogDTO.java | 0a93563699bb2b26e97fc555b78803505cdc11a2 | [] | no_license | BAT6188/bo | 6147f20832263167101003bea45d33e221d0f534 | a1d1885aed8cf9522485fd7e1d961746becb99c9 | refs/heads/master | 2023-05-31T03:36:26.438083 | 2016-11-03T04:43:05 | 2016-11-03T04:43:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,171 | java | package com.bcgogo.user.dto;
import com.bcgogo.enums.StatProcessStatus;
import com.bcgogo.enums.VehicleModifyFields;
import com.bcgogo.enums.VehicleModifyOperations;
import com.bcgogo.utils.StringUtil;
import java.util.ArrayList;
import java.util.List;
/**
* Created by IntelliJ IDEA.
* User: Jimuchen
* Date: 12-11-13
* Time: 上午9:05
*/
public class VehicleModifyLogDTO {
private Long id;
private Long creationDate;
private Long vehicleId;
private Long shopId;
private Long userId;
private Long operationId;
private VehicleModifyOperations operationType;
private VehicleModifyFields fieldName;
private String oldValue;
private String newValue;
private StatProcessStatus statProcessStatus;
private String brand;
private String model;
//车型变动监听时使用
private String oldBrand;
private String newBrand;
private String oldModel;
private String newModel;
public static List<VehicleModifyLogDTO> compare(VehicleModifyLogDTO oldLog, VehicleModifyLogDTO newLog){
List<VehicleModifyLogDTO> list = new ArrayList<VehicleModifyLogDTO>();
if (!StringUtil.compareSame(oldLog.getBrand(), newLog.getBrand()) || !StringUtil.compareSame(oldLog.getModel(), newLog.getModel())) {
//车型统计需获取每次改动的新旧值
VehicleModifyLogDTO dto = new VehicleModifyLogDTO();
dto.setFieldName(VehicleModifyFields.brand);
dto.setOldValue(oldLog.getBrand());
dto.setNewValue(newLog.getBrand());
list.add(dto);
dto = new VehicleModifyLogDTO();
dto.setFieldName(VehicleModifyFields.model);
dto.setOldValue(oldLog.getModel());
dto.setNewValue(newLog.getModel());
list.add(dto);
}
return list;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCreationDate() {
return creationDate;
}
public void setCreationDate(Long creationDate) {
this.creationDate = creationDate;
}
public Long getVehicleId() {
return vehicleId;
}
public void setVehicleId(Long vehicleId) {
this.vehicleId = vehicleId;
}
public Long getShopId() {
return shopId;
}
public void setShopId(Long shopId) {
this.shopId = shopId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getOperationId() {
return operationId;
}
public void setOperationId(Long operationId) {
this.operationId = operationId;
}
public VehicleModifyOperations getOperationType() {
return operationType;
}
public void setOperationType(VehicleModifyOperations operationType) {
this.operationType = operationType;
}
public VehicleModifyFields getFieldName() {
return fieldName;
}
public void setFieldName(VehicleModifyFields fieldName) {
this.fieldName = fieldName;
}
public String getOldValue() {
return oldValue;
}
public void setOldValue(String oldValue) {
this.oldValue = oldValue;
}
public String getNewValue() {
return newValue;
}
public void setNewValue(String newValue) {
this.newValue = newValue;
}
public StatProcessStatus getStatProcessStatus() {
return statProcessStatus;
}
public void setStatProcessStatus(StatProcessStatus statProcessStatus) {
this.statProcessStatus = statProcessStatus;
}
public String getBrand() {
return brand;
}
public void setBrand(String brand) {
this.brand = brand;
}
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model;
}
public String getOldBrand() {
return oldBrand;
}
public void setOldBrand(String oldBrand) {
this.oldBrand = oldBrand;
}
public String getNewBrand() {
return newBrand;
}
public void setNewBrand(String newBrand) {
this.newBrand = newBrand;
}
public String getOldModel() {
return oldModel;
}
public void setOldModel(String oldModel) {
this.oldModel = oldModel;
}
public String getNewModel() {
return newModel;
}
public void setNewModel(String newModel) {
this.newModel = newModel;
}
}
| [
"ndong211@163.com"
] | ndong211@163.com |
b83ab399db7924d516c3898be43a853f8f35c93d | f97ba375da68423d12255fa8231365104867d9b0 | /study-notes/algorithm/06-二叉搜索树/src/com/coderZsq/Main.java | 0668f470e18300a6f37867097a287a70d609aac9 | [
"MIT"
] | permissive | lei720/coderZsq.practice.server | 7a728612e69c44e0877c0153c828b50d8ea7fa7c | 4ddf9842cd088d4a0c2780ac22d41d7e6229164b | refs/heads/master | 2023-07-16T11:21:26.942849 | 2021-09-08T04:38:07 | 2021-09-08T04:38:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,629 | java | package com.coderZsq;
import com.coderZsq.file.Files;
import com.coderZsq.printer.BinaryTreeInfo;
import com.coderZsq.printer.BinaryTrees;
import com.coderZsq.tree.BST;
import com.coderZsq.tree.BinarySearchTree;
import com.coderZsq.tree.BinaryTree;
import java.util.Comparator;
public class Main {
private static class PersonComparator implements Comparator<Person> {
public int compare(Person e1, Person e2) {
return e1.getAge() - e2.getAge();
}
}
private static class PersonComparator2 implements Comparator<Person> {
public int compare(Person e1, Person e2) {
return e2.getAge() - e1.getAge();
}
}
static void test1() {
Integer data[] = new Integer[] {
7, 4, 9, 2, 5, 8, 11, 3, 12, 1
};
BinarySearchTree<Integer> bst = new BinarySearchTree<>();
for (int i = 0; i < data.length; i++) {
bst.add(data[i]);
}
BinaryTrees.println(bst);
}
static void test2() {
Integer data[] = new Integer[] {
7, 4, 9, 2, 5, 8, 11, 3, 12, 1
};
BinarySearchTree<Person> bst1 = new BinarySearchTree<>(new PersonComparator());
for (int i = 0; i < data.length; i++) {
bst1.add(new Person(data[i]));
}
BinaryTrees.println(bst1);
/*
* Java的匿名类, 类似于iOS中的Block, JS中的闭包 (function)
*/
BinarySearchTree<Person> bst2 = new BinarySearchTree<>(new Comparator<Person>(){
@Override
public int compare(Person e1, Person e2) {
return e2.getAge() - e1.getAge();
}
});
for (int i = 0; i < data.length; i++) {
bst2.add(new Person(data[i]));
}
BinaryTrees.println(bst2);
}
static void test3() {
BinarySearchTree<Integer> bst = new BinarySearchTree<>();
for (int i = 0; i < 30; i++) {
bst.add((int)(Math.random() * 100));
}
String str = BinaryTrees.printString(bst);
str += "\n";
Files.writeToFile("/Users/zhushuangquan/Desktop/bst.txt", str, true);
// BinaryTrees.println(bst);
}
static void test4() {
BinaryTrees.println(new BinaryTreeInfo() {
@Override
public Object root() {
return "A";
}
@Override
public Object left(Object node) {
if (node.equals("A")) return "B";
if (node.equals("C")) return "E";
return null;
}
@Override
public Object right(Object node) {
if (node.equals("A")) return "C";
if (node.equals("C")) return "D";
return null;
}
@Override
public Object string(Object node) {
return node.toString() + "_";
}
});
}
static void test5() {
BinarySearchTree<Person> bst = new BinarySearchTree<>();
bst.add(new Person(10, "jack"));
bst.add(new Person(12, "rose"));
bst.add(new Person(6, "jim"));
bst.add(new Person(10, "michael"));
BinaryTrees.println(bst);
}
static void test6() {
Integer data[] = new Integer[] {
7, 4, 9, 2, 5
};
BinarySearchTree<Integer> bst = new BinarySearchTree<>();
for (int i = 0; i < data.length; i++) {
bst.add(data[i]);
}
// BinarySearchTree<Integer> bst = new BinarySearchTree<>();
// for (int i = 0; i < 40; i++) {
// bst.add((int)(Math.random() * 100));
// }
BinaryTrees.println(bst);
// bst.preorderTraversal();
// bst.inorderTraversal();
// bst.postorderTraversal();
// bst.levelOrderTraversal();
// bst.levelOrder(new BinarySearchTree.Visitor<Integer>() {
// @Override
// public void visit(Integer element) {
// System.out.print("_" + element + "_ ");
// }
// });
// bst.inorder(new BinarySearchTree.Visitor<Integer>() {
// @Override
// public void visit(Integer element) {
// System.out.print("_" + element + "_ ");
// }
// });
// System.out.println(bst.height());
System.out.println(bst.isComplete());
}
static void test7() {
Integer data[] = new Integer[] {
7, 4, 9, 2, 5, 8, 11, 3, 12, 1
};
BinarySearchTree<Integer> bst = new BinarySearchTree<>();
for (int i = 0; i < data.length; i++) {
bst.add(data[i]);
}
BinaryTrees.println(bst);
bst.remove(7);
BinaryTrees.println(bst);
}
static void test8() {
Integer data[] = new Integer[] {
7, 4, 9, 2, 1
};
BST<Integer> bst = new BST<>();
for (int i = 0; i < data.length; i++) {
bst.add(data[i]);
}
BinaryTrees.println(bst);
System.out.println(bst.isComplete());
}
static void test9() {
Integer data[] = new Integer[] {
7, 4, 9, 2, 1
};
BST<Integer> bst = new BST<>();
for (int i = 0; i < data.length; i++) {
bst.add(data[i]);
}
BinaryTrees.println(bst);
bst.preorder(new BinaryTree.Visitor<Integer>() {
@Override
public boolean visit(Integer element) {
System.out.print(element + " ");
return element == 2 ? true : false;
}
});
System.out.println();
bst.inorder(new BinaryTree.Visitor<Integer>() {
@Override
public boolean visit(Integer element) {
System.out.print(element + " ");
return element == 4 ? true : false;
}
});
System.out.println();
bst.postorder(new BinaryTree.Visitor<Integer>() {
@Override
public boolean visit(Integer element) {
System.out.print(element + " ");
return element == 4 ? true : false;
}
});
System.out.println();
bst.levelOrder(new BinaryTree.Visitor<Integer>() {
@Override
public boolean visit(Integer element) {
System.out.print(element + " ");
return element == 9 ? true : false;
}
});
}
public static void main(String[] args) {
test9();
}
}
| [
"a13701777868@yahoo.com"
] | a13701777868@yahoo.com |
aa8cde0e58f3b3c9e8b0fbb14eec87b1f8a448bf | 7d05e603eef7728255bc60eaf244882ac5ffd22c | /easy-spring-practice/08-aware-bean/src/test/java/cn/duktig/springframework/test/bean/UserService.java | b033cd97a03038f5ca2f814f6d96e85c4693bccb | [
"Apache-2.0"
] | permissive | duktig666/easy-spring | be620699c9044234ceef10cf64dfb0d8a53698ba | df973ae00b3b57447ef78c87bc521d434258ff39 | refs/heads/main | 2023-07-18T07:44:20.525859 | 2021-08-26T14:24:06 | 2021-08-26T14:24:06 | 399,673,002 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,354 | java | package cn.duktig.springframework.test.bean;
import cn.duktig.springframework.beans.BeansException;
import cn.duktig.springframework.beans.factory.BeanClassLoaderAware;
import cn.duktig.springframework.beans.factory.BeanFactory;
import cn.duktig.springframework.beans.factory.BeanFactoryAware;
import cn.duktig.springframework.beans.factory.BeanNameAware;
import cn.duktig.springframework.context.ApplicationContext;
import cn.duktig.springframework.context.ApplicationContextAware;
/**
* description:测试的用户业务类
*
* @author RenShiWei
* Date: 2021/8/25 14:41
**/
public class UserService implements BeanNameAware, BeanClassLoaderAware, ApplicationContextAware, BeanFactoryAware {
private ApplicationContext applicationContext;
private BeanFactory beanFactory;
private String uId;
private String company;
private String location;
private UserDao userDao;
@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
this.beanFactory = beanFactory;
}
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
this.applicationContext = applicationContext;
}
@Override
public void setBeanName(String name) {
System.out.println("Bean Name is:" + name);
}
@Override
public void setBeanClassLoader(ClassLoader classLoader) {
System.out.println("ClassLoader:" + classLoader);
}
public String queryUserInfo() {
return userDao.queryUserName(uId) + "," + company + "," + location;
}
public String getuId() {
return uId;
}
public void setuId(String uId) {
this.uId = uId;
}
public String getCompany() {
return company;
}
public void setCompany(String company) {
this.company = company;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public UserDao getUserDao() {
return userDao;
}
public void setUserDao(UserDao userDao) {
this.userDao = userDao;
}
public ApplicationContext getApplicationContext() {
return applicationContext;
}
public BeanFactory getBeanFactory() {
return beanFactory;
}
}
| [
"1487660836@qq.com"
] | 1487660836@qq.com |
64c4cae6ba393c031bfb102c24da0275829c95a8 | e70abc02efbb8a7637eb3655f287b0a409cfa23b | /hyjf-app/src/main/java/com/hyjf/app/project/BorrowProjectInfoBean.java | 4599368b823a58bed8b4211ed9359b723203edc3 | [] | no_license | WangYouzheng1994/hyjf | ecb221560460e30439f6915574251266c1a49042 | 6cbc76c109675bb1f120737f29a786fea69852fc | refs/heads/master | 2023-05-12T03:29:02.563411 | 2020-05-19T13:49:56 | 2020-05-19T13:49:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,155 | java | /**
* Description:项目详情查询所用vo
* Copyright: Copyright (HYJF Corporation) 2015
* Company: HYJF Corporation
* @author: 王坤
* @version: 1.0
* Created at: 2015年11月11日 下午2:17:31
* Modification History:
* Modified by :
*/
package com.hyjf.app.project;
import java.io.Serializable;
public class BorrowProjectInfoBean implements Serializable {
/** 序列化id */
private static final long serialVersionUID = -2913028255458205989L;
/**
* 项目剩余金额
* number
* example: 1000000
*/
private String borrowRemain;
/**
* 项目进度 (不带百分号)
* string
* example: 53
*/
private String borrowProgress;
/**
* 开标时间
* string
* example: 2017-10-10 10:10
*/
private String onTime;
/**
* 项目金额 (总金额)
* number
* example: 1000000
*/
private String account;
/**
* 项目历史年回报率
* number
* example: 8.5
*/
private String borrowApr;
/**
* 项目编号
* string
* example: ZXH17071271
*/
private String borrowId;
/**
* 计息时间
* string
* example: 复审成功立即计息
*/
private String onAccrual;
/**
* 项目进行状态 如 1:复审中
* number
* example: 1
*/
private String status;
/**
* 项目进度状态 0:审核 1:信息发布 2:出借 3:计息 4:回款
* number
* example: 2
*/
private String borrowProgressStatus;
/**
* 项目期限
* number
* example: 30
*/
private String borrowPeriod;
/**
* 项目期限单位
* number
* example: 天
*/
private String borrowPeriodUnit;
/**
* 项目类型 对应号待查 如 RTB:融通宝
* string
* example: RTB
*/
private String type;
/**
* 项目类型标签
* string
* example: 尊享
*/
private String tag;
/**
* 还款方式
* string
* example: 等额本息
*/
private String repayStyle;
/**
* 产品加息率
*/
private String borrowExtraYield;
public BorrowProjectInfoBean() {
super();
}
public String getBorrowRemain() {
return borrowRemain;
}
public void setBorrowRemain(String borrowRemain) {
this.borrowRemain = borrowRemain;
}
public String getBorrowProgress() {
return borrowProgress;
}
public void setBorrowProgress(String borrowProgress) {
this.borrowProgress = borrowProgress;
}
public String getOnTime() {
return onTime;
}
public void setOnTime(String onTime) {
this.onTime = onTime;
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public String getBorrowApr() {
return borrowApr;
}
public void setBorrowApr(String borrowApr) {
this.borrowApr = borrowApr;
}
public String getBorrowId() {
return borrowId;
}
public void setBorrowId(String borrowId) {
this.borrowId = borrowId;
}
public String getOnAccrual() {
return onAccrual;
}
public void setOnAccrual(String onAccrual) {
this.onAccrual = onAccrual;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getBorrowProgressStatus() {
return borrowProgressStatus;
}
public void setBorrowProgressStatus(String borrowProgressStatus) {
this.borrowProgressStatus = borrowProgressStatus;
}
public String getBorrowPeriod() {
return borrowPeriod;
}
public void setBorrowPeriod(String borrowPeriod) {
this.borrowPeriod = borrowPeriod;
}
public String getBorrowPeriodUnit() {
return borrowPeriodUnit;
}
public void setBorrowPeriodUnit(String borrowPeriodUnit) {
this.borrowPeriodUnit = borrowPeriodUnit;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getTag() {
return tag;
}
public void setTag(String tag) {
this.tag = tag;
}
public String getRepayStyle() {
return repayStyle;
}
public void setRepayStyle(String repayStyle) {
this.repayStyle = repayStyle;
}
public String getBorrowExtraYield() {
return borrowExtraYield;
}
public void setBorrowExtraYield(String borrowExtraYield) {
this.borrowExtraYield = borrowExtraYield;
}
}
| [
"heshuying@hyjf.com"
] | heshuying@hyjf.com |
973f5e04843bbe16f2dce86606ac7a6f0aa491e3 | 3fddbe5fbcc51f4e4d092e45ac17a4ac17894d69 | /usef-build/usef-core/usef-core-transport/src/main/java/energy/usef/core/service/mdb/IncomingQueueMDB.java | 134e0af5e906008b7fe55314cbaf5faf3264f0dd | [
"Apache-2.0"
] | permissive | Drimpac2020eu/usef | a77cd3abc5e3ae9f29b46b65d23778cfceab6498 | 65acaef8248da98df45a4ba7507f017dfc903906 | refs/heads/master | 2022-12-22T16:59:47.959244 | 2020-05-08T11:12:51 | 2020-05-08T11:12:51 | 241,834,155 | 0 | 0 | Apache-2.0 | 2022-12-14T20:26:07 | 2020-02-20T08:43:30 | HTML | UTF-8 | Java | false | false | 2,607 | java | /*
* Copyright 2015-2016 USEF Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package energy.usef.core.service.mdb;
import energy.usef.core.constant.USEFLogCategory;
import energy.usef.core.exception.BusinessException;
import energy.usef.core.exception.TechnicalException;
import energy.usef.core.service.helper.DispatcherHelperService;
import javax.inject.Inject;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* This Message Driven Bean asynchronously receives and processes the messages that are sent to the in queue.
*/
public class IncomingQueueMDB implements MessageListener {
private static final Logger LOGGER = LoggerFactory.getLogger(IncomingQueueMDB.class);
private static final Logger LOGGER_CONFIDENTIAL = LoggerFactory.getLogger(USEFLogCategory.CONFIDENTIAL);
@Inject
private DispatcherHelperService dispatcherService;
/**
* Passes a message to the listener.
*
* @param messageReceived the message passed to the listener
*/
@Override
public void onMessage(Message messageReceived) {
try {
if (messageReceived instanceof TextMessage) {
TextMessage message = (TextMessage) messageReceived;
LOGGER_CONFIDENTIAL.debug("Received Message from queue: {}", message.getText());
dispatcherService.dispatch(message.getText());
} else {
String errorStr = "Message of wrong type: "
+ messageReceived.getClass().getName();
LOGGER.error(errorStr);
throw new TechnicalException(errorStr);
}
} catch (BusinessException e) {
LOGGER.error("Error processing incoming XML: {}", e.getBusinessError().getError());
throw new TechnicalException(e);
} catch (JMSException e) {
LOGGER.error("Error receiving a message", e);
throw new TechnicalException(e);
}
}
}
| [
"drimpac.2020eu@gmail.com"
] | drimpac.2020eu@gmail.com |
ba049edcee877b78cf805c1e6c6cb957d3c92d00 | 09810fc60b0d6e68df6bfa49652be078e5bfefd9 | /module2/src/_18_string_and_regex/thuc_hanh/crawl_danh_sach_bai_hat/CrawlSongExample.java | 946d12f19a14496d9c2fa01e575b06828f0080e0 | [] | no_license | C0920G1-NguyenQuangHoaiLinh/C0920G1-NguyenQuangHoaiLinh | 18323fe752648daa7acaad0aa567c16d5ca30804 | 21f2061dc0e5df53dfdec73381b3b65a5e81e841 | refs/heads/master | 2023-03-29T21:22:50.560687 | 2021-04-07T04:43:15 | 2021-04-07T04:43:15 | 297,220,239 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,354 | java | package _18_string_and_regex.thuc_hanh.crawl_danh_sach_bai_hat;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class CrawlSongExample {
public static void main(String[] args) {
try {
URL url = new URL("https://www.nhaccuatui.com/bai-hat/nhac-tre-moi.html");
// open the stream and put it into BufferedReader
Scanner scanner = new Scanner(new InputStreamReader(url.openStream()));
scanner.useDelimiter("\\Z");
String content = scanner.next();
// close scanner
scanner.close();
// remove all new line
content = content.replaceAll("\\n+", "");
// regex
Pattern p = Pattern.compile("name_song\">(.*?)</a>");
Matcher m = p.matcher(content);
while (m.find()) {
System.out.println(m.group(1));
}
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
| [
"you@example.com"
] | you@example.com |
83f5a0e0eee4b94b9f85e56b6303719067c7b89e | de1f94643567aca0cbf023233eb61f1de871b47d | /calculator/src/scu/edu/ch27interpreter/Expression.java | 77917d063d0446a7abe1d4edba917f5912f5a42d | [] | no_license | xingyiyang/designpatterns | a54afc6e6a5e5e0a216e9a040f4bd49f437b5b95 | 5ff8715773e9bd8c83fd15e7c69c285098dcc48d | refs/heads/master | 2021-07-09T05:31:15.194351 | 2017-10-08T04:28:32 | 2017-10-08T04:28:32 | 106,149,971 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 586 | java | package scu.edu.ch27interpreter;
public abstract class Expression {
public void Interpret(PlayContext context) {
if (context.getText().length() == 0) {
return;
} else {
String playKey = context.getText().substring(0, 1);
context.setText(context.getText().substring(2));
double playValue =Double.parseDouble(context.getText().substring(0,
context.getText().indexOf(" ")));
context.setText(context.getText().substring(context.getText().indexOf(" ") + 1));
Execute(playKey,playValue);
}
}
public abstract void Execute(String key,double value);
}
| [
"532956941@qq.com"
] | 532956941@qq.com |
eabeffce18cc3dbfa25fcf98d051f9af1f064a52 | eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3 | /tags/2010-09-08/seasar2-2.4.43/s2jdbc-gen/s2jdbc-gen/src/main/java/org/seasar/extension/jdbc/gen/internal/util/DefaultExcludesFilenameFilter.java | f31840fe62f0528af0fdd59f7a28e5a0d78c609f | [
"Apache-2.0"
] | permissive | svn2github/s2container | 54ca27cf0c1200a93e1cb88884eb8226a9be677d | 625adc6c4e1396654a7297d00ec206c077a78696 | refs/heads/master | 2020-06-04T17:15:02.140847 | 2013-08-09T09:38:15 | 2013-08-09T09:38:15 | 10,850,644 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,047 | java | /*
* Copyright 2004-2010 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.seasar.extension.jdbc.gen.internal.util;
import java.io.File;
import java.io.FilenameFilter;
import java.util.regex.Pattern;
/**
* 一般的に除外すべき名前をフィルタする{@link FilenameFilter}の実装クラスです。
*
* @author taedium
*/
public class DefaultExcludesFilenameFilter implements FilenameFilter {
/** 除外すべき名前を表すデフォルトの正規表現 */
protected static String defaultFilterRegex = "^(.*~|#.*#|\\.#.*|%.*%|\\._.*|CVS|\\.cvsignore|SCCS|vssver\\.scc|\\.svn|\\.DS_Store)$";
/** 除外名のパターン */
protected static Pattern filterPattern;
static {
resetFilterPattern();
}
/**
* 除外すべき名前を表すデフォルトの正規表現でフィルタパターンをリセットします。
*/
public static void resetFilterPattern() {
filterPattern = Pattern.compile(defaultFilterRegex);
}
/**
* 除外すべき名前を表す正規表現を設定します。
*
* @param filterRegex
* 除外すべき名前を表す正規表現
*/
public static void setFilterRegex(String filterRegex) {
filterPattern = Pattern.compile(filterRegex);
}
public boolean accept(File dir, String name) {
return !filterPattern.matcher(name).matches();
}
}
| [
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] | koichik@319488c0-e101-0410-93bc-b5e51f62721a |
0657a1b453b476db900f52904bcdcd9c89d55c0e | 6af2ba478c7a1ca2e68f75e385a0d9b1ff56cdc6 | /Day32_NetworkProgramming/src/com/tcwgq/demo2/SendDemo.java | 8ee9d19531c1859204ea8d982b923c6bed864902 | [] | no_license | tcwgq/learn-java-base | 20f2a8c895cf8719730beada81b069d857a4ac37 | e483ba3cbe6353dc1e16fded257eecf59321331e | refs/heads/master | 2022-01-10T07:57:49.167924 | 2019-06-16T01:36:59 | 2019-06-16T01:36:59 | 104,757,290 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 559 | java | package com.tcwgq.demo2;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
public class SendDemo {
public static void main(String[] args) throws IOException {
// 创建发送端的Socket对象
DatagramSocket ds = new DatagramSocket();
// 创建数据并打包
byte[] bys = "helloworld".getBytes();
DatagramPacket dp = new DatagramPacket(bys, bys.length, InetAddress.getByName("192.168.1.100"), 12345);
// 发送数据
ds.send(dp);
// 释放资源
ds.close();
}
}
| [
"tcwgq@outlook.com"
] | tcwgq@outlook.com |
57226d8208a11952f4712efd12a2fdefbffe3f84 | dc993c94c60f7b10423abde74690cf18d374d2ad | /IdeaProjects/niukewang/src/Main4.java | d6e4f6e3716159a1c79d00f901400b58f45241bd | [] | no_license | chenyi136/leetcode | 65ed7bd7c2bf8698dc1be2eb6d89510d41c7e869 | 8fcbe9dce203502598e28c0fa54dfaf5ff815ccf | refs/heads/master | 2022-12-21T03:35:50.641520 | 2019-11-29T03:01:56 | 2019-11-29T03:01:56 | 224,765,104 | 0 | 0 | null | 2022-12-16T05:54:46 | 2019-11-29T02:50:45 | CSS | UTF-8 | Java | false | false | 949 | java | import java.util.Scanner;
/**
* @ClassNameMain4
* @Author jianwen
* @Date 19-9-27 下午9:24
* @Version V1.0
*/
public class Main4 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int contain=sc.nextInt();
int[] weights=new int[n];
int[] value=new int[n];
for(int i=0;i<n;i++){
weights[i]=sc.nextInt();
}
for(int i=0;i<n;i++){
value[i]=sc.nextInt();
}
System.out.println(getValue(weights,value,contain));
}
public static int getValue(int[] weights,int[] values,int contain){
int res=0;
int n=weights.length;
int[] dp=new int[contain+1];
for(int i=1;i<n+1;i++){
for(int j=contain;j>=weights[i-1];j--){
dp[j]=Math.max(dp[j-weights[i-1]]+values[i-1],dp[j]);
}
}
return dp[contain];
}
}
| [
"1369495295@qq.com"
] | 1369495295@qq.com |
03feed1457701c8959107e0fa8d54d5edba3fa36 | 8aa75ac5c2c4cd6b852f533cf7a4f32d8c88d3c2 | /Weixin/src/com/weixin/pojo/WeixinOauth2Token.java | 7b822492641306c2f0a3e067446921445030ed18 | [] | no_license | xxd763955430/Weixin | b3ef8a486d9cd8697e5e9699185286cd43f8ba8f | d9c5c14f31db65ed826270e1ad2cd5d21682e96f | refs/heads/master | 2021-08-07T04:55:00.513549 | 2017-11-07T14:58:32 | 2017-11-07T14:58:32 | 109,837,099 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,050 | java | package com.weixin.pojo;
/**
* 网页授权信息
*
* @author liufeng
* @date 2013-11-09
*/
public class WeixinOauth2Token {
// 网页授权接口调用凭证
private String accessToken;
// 凭证有效时长
private int expiresIn;
// 用于刷新凭证
private String refreshToken;
// 用户标识
private String openId;
// 用户授权作用域
private String scope;
public String getAccessToken() {
return accessToken;
}
public void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}
public int getExpiresIn() {
return expiresIn;
}
public void setExpiresIn(int expiresIn) {
this.expiresIn = expiresIn;
}
public String getRefreshToken() {
return refreshToken;
}
public void setRefreshToken(String refreshToken) {
this.refreshToken = refreshToken;
}
public String getOpenId() {
return openId;
}
public void setOpenId(String openId) {
this.openId = openId;
}
public String getScope() {
return scope;
}
public void setScope(String scope) {
this.scope = scope;
}
}
| [
"test@runoob.com"
] | test@runoob.com |
aac0c9c83e889330f31d724b39ced640cc475fcf | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/JetBrains--intellij-community/0205cd51d0601666e23acc3833ace828d5f744a7/before/GrNewConsoleAction.java | 74dd0c51564276871ff7545514aa5f611780e2de | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,989 | java | /*
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.plugins.groovy.console.actions;
import com.intellij.execution.console.ConsoleHistoryController;
import com.intellij.ide.scratch.ScratchFileService;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.fileEditor.FileEditorManager;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleManager;
import com.intellij.openapi.module.ModuleUtilCore;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.groovy.console.GroovyConsole;
import org.jetbrains.plugins.groovy.console.GroovyConsoleRootType;
import org.jetbrains.plugins.groovy.util.ModuleChooserUtil;
import java.util.Arrays;
import java.util.List;
import static org.jetbrains.plugins.groovy.console.GroovyConsoleUtil.APPLICABLE_MODULE;
public class GrNewConsoleAction extends AnAction {
@Override
public void update(AnActionEvent e) {
e.getPresentation().setEnabledAndVisible(getModule(e) != null);
}
@Override
public void actionPerformed(AnActionEvent e) {
final Project project = e.getProject();
final Module module = getModule(e);
if (project == null || module == null) return;
final VirtualFile contentFile = ConsoleHistoryController.getContentFile(
GroovyConsoleRootType.getInstance(),
GroovyConsoleRootType.CONTENT_ID,
ScratchFileService.Option.create_new_always
);
assert contentFile != null;
GroovyConsole.createConsole(project, contentFile, module);
FileEditorManager.getInstance(project).openFile(contentFile, true);
}
@Nullable
protected Module getModule(AnActionEvent e) {
final Project project = e.getProject();
if (project == null) return null;
final VirtualFile file = CommonDataKeys.VIRTUAL_FILE.getData(e.getDataContext());
if (file != null) {
final Module moduleForFile = ModuleUtilCore.findModuleForFile(file, project);
if (moduleForFile != null) return moduleForFile;
}
final List<Module> modules = ModuleChooserUtil.filterGroovyCompatibleModules(
Arrays.asList(ModuleManager.getInstance(project).getModules()), APPLICABLE_MODULE);
return modules.isEmpty() ? null : modules.get(0);
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
6f127d481326155e7c0b9082287dd2c2057618b7 | 64ca0fda972992e1acb37113fa40aa8bf5e79931 | /kie-wb-common-services/kie-wb-common-services-backend/src/test/java/org/kie/workbench/common/services/backend/whitelist/PackageNameSearchProviderTest.java | 4fb9021d25d02fe69b10f69d4cb92d2cf7ba5bf0 | [
"Apache-2.0"
] | permissive | scandihealth/kie-wb-common | e1fa2e0a47773300b3650c81eb76d4b13f390ad2 | 1d211047f25ec48c626be3472ed939374f38a797 | refs/heads/6.5.0.csc | 2023-04-14T09:12:53.423909 | 2023-04-12T13:32:14 | 2023-04-12T13:32:14 | 77,842,445 | 0 | 1 | Apache-2.0 | 2020-05-20T08:44:17 | 2017-01-02T15:21:34 | Java | UTF-8 | Java | false | false | 5,716 | java | /*
* Copyright 2015 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* 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.kie.workbench.common.services.backend.whitelist;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import org.guvnor.common.services.project.model.Dependency;
import org.guvnor.common.services.project.model.GAV;
import org.guvnor.common.services.project.model.POM;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.kie.workbench.common.services.backend.builder.NoBuilderFoundException;
import org.kie.workbench.common.services.shared.dependencies.DependencyService;
import org.mockito.Mock;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.stubbing.Answer;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;
@RunWith(MockitoJUnitRunner.class)
public class PackageNameSearchProviderTest {
@Mock
private DependencyService dependencyService;
private PackageNameSearchProvider packageNameSearchProvider;
@Before
public void setUp() throws Exception {
packageNameSearchProvider = new PackageNameSearchProvider( dependencyService );
}
private HashMap<Dependency, Set<String>> setUpDependencyService( POM pom ) throws NoBuilderFoundException {
final HashMap<Dependency, Set<String>> map = new HashMap<Dependency, Set<String>>();
when( dependencyService.loadDependencies( pom.getGav() ) ).thenAnswer( new Answer<Collection>() {
@Override public Collection answer( InvocationOnMock invocationOnMock ) throws Throwable {
return map.keySet();
}
} );
when( dependencyService.loadPackageNames( any( GAV.class ) ) ).thenAnswer( new Answer<Collection>() {
@Override public Collection answer( InvocationOnMock invocationOnMock ) throws Throwable {
return map.get( invocationOnMock.getArguments()[0] );
}
} );
return map;
}
@Test
public void testLoadTopLevelDependencies() throws Exception {
POM pom = new POM( new GAV( "artifactID",
"groupID",
"version" ) );
pom.getDependencies().add( getDependency( "drools-core", "org.drools", "6.3.0" ) );
pom.getDependencies().add( getDependency( "junit", "org.junit", "4.11" ) );
HashMap<Dependency, Set<String>> map = setUpDependencyService( pom );
map.put( getGAV( "drools-core", "org.drools", "6.3.0" ), toSet( "org.drools.a",
"org.drools.b",
"org.drools.c" ) );
map.put( getGAV( "junit", "org.junit", "4.11" ), toSet( "junit.a",
"junit.b" ) );
Set<String> packageNames = packageNameSearchProvider.newTopLevelPackageNamesSearch( pom ).search();
assertEquals( 5, packageNames.size() );
assertTrue( packageNames.contains( "org.drools.a" ) );
assertTrue( packageNames.contains( "org.drools.b" ) );
assertTrue( packageNames.contains( "org.drools.c" ) );
assertTrue( packageNames.contains( "junit.a" ) );
assertTrue( packageNames.contains( "junit.b" ) );
}
@Test
public void testLoadTopLevelDependenciesWhenIncompleteDependenciesInPOM() throws Exception {
POM pom = new POM( new GAV( "artifactID",
"groupID",
"version" ) );
pom.getDependencies().add( getDependency( "drools-core", "org.drools", null ) );
pom.getDependencies().add( getDependency( null, null, null ) );
HashMap<Dependency, Set<String>> map = setUpDependencyService( pom );
map.put( getGAV( "drools-core", "org.drools", "6.3.0" ), toSet( "org.drools.a",
"org.drools.b",
"org.drools.c" ) );
Set<String> packageNames = packageNameSearchProvider.newTopLevelPackageNamesSearch( pom ).search();
assertEquals( 3, packageNames.size() );
assertTrue( packageNames.contains( "org.drools.a" ) );
assertTrue( packageNames.contains( "org.drools.b" ) );
assertTrue( packageNames.contains( "org.drools.c" ) );
}
private HashSet<String> toSet( String... items ) {
return new HashSet<String>( Arrays.asList( items ) );
}
private Dependency getGAV( final String artifactID,
final String groupID,
final String version ) {
return new Dependency( new GAV( groupID,
artifactID,
version ) );
}
private Dependency getDependency( final String artifactID, final String groupID, final String version ) {
return new Dependency( new GAV( groupID, artifactID, version ) );
}
} | [
"christian.sadilek@gmail.com"
] | christian.sadilek@gmail.com |
146b8e70921ce850479952416416102be6558606 | c29612c1cfa7edfa94597545c1e1d7e99d446131 | /src/main/java/mods/railcraft/common/blocks/signals/MaterialStructure.java | 832fd3601a0788e10800ba1eae2cf165964b1a51 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | Cchenxinran/Railcraft | 657af37fae5122d3c735359a7d31684c579c667b | b73597ce0fb9ad2aaa962f2e912108ef5e8689fc | refs/heads/master | 2021-01-17T05:23:46.565588 | 2015-05-31T23:26:10 | 2015-05-31T23:26:10 | 37,012,840 | 1 | 0 | null | 2015-06-07T10:40:49 | 2015-06-07T10:40:49 | null | UTF-8 | Java | false | false | 567 | java | /*
* Copyright (c) CovertJaguar, 2014 http://railcraft.info
*
* This code is the property of CovertJaguar
* and may only be used with explicit written
* permission unless otherwise specified on the
* license page at http://railcraft.info/wiki/info:license.
*/
package mods.railcraft.common.blocks.signals;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
public class MaterialStructure extends Material
{
public MaterialStructure()
{
super(MapColor.ironColor);
setRequiresTool();
}
}
| [
"covertjaguar@gmail.com"
] | covertjaguar@gmail.com |
f43c9403c1aadbacd00ad96934ec9119ff32833e | 16343979cce9cd8de52537d554e9b37a3533e3e6 | /GameBladePlugin/src/main/java/org/stormdev/gbplugin/plugin/commands/CreateVillagerCommand.java | a7ccd23a93c78f5e00273844d921723773b57595 | [] | no_license | storm345dev/GameBladePlugin | 5b5d4f5dcde898cd3eb6bb41204cf30c29092642 | 0868ed47771f950ab584ba795fe6a9fd7a8fef6d | refs/heads/master | 2020-12-24T15:05:28.629978 | 2015-05-20T17:53:50 | 2015-05-20T17:53:50 | 21,213,117 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,147 | java | package org.stormdev.gbplugin.plugin.commands;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.stormdev.gbplugin.plugin.core.GameBlade;
public class CreateVillagerCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command cmd, String alias,
String[] args) {
if(args.length < 1){
return false;
}
if(!(sender instanceof Player)){
sender.sendMessage(ChatColor.RED+"Players only!");
return true;
}
Player player = (Player) sender;
Location loc = player.getLocation();
StringBuilder sb = new StringBuilder(args[0]);
for(int i=1;i<args.length;i++){
sb.append(" ").append(args[i]);
}
String name = sb.toString();
if(name.equalsIgnoreCase("cosmetics")){
name = "Cosmetics";
}
GameBlade.api.getMenuVillagerManager().spawnVillager(name, loc);
sender.sendMessage(ChatColor.GREEN+"Successfully Spawned! (Make sure they cannot escape the desired area)");
return true;
}
}
| [
"storm345dev@gmail.com"
] | storm345dev@gmail.com |
b2ab7309a28d9be6f1d88baaa6d582442a72c8fe | 9b5053db1b5a03c8f72d87a5054688a50287efe2 | /android/support/v4/app/FragmentController.java | 263e14f32fbc24fc74cd03bfdd9bd957580dcb17 | [] | no_license | steamguard-totp/steam-mobile | f8d612b5c767248c3a29e29c0b9328e5d244c079 | f94cd2ec0404bfab69b00a582f90457295cccabb | refs/heads/master | 2021-09-04T07:04:22.229386 | 2018-01-16T23:39:37 | 2018-01-16T23:39:37 | 117,756,434 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,993 | java | package android.support.v4.app;
import android.content.Context;
import android.content.res.Configuration;
import android.os.Parcelable;
import android.support.v4.util.SimpleArrayMap;
import android.util.AttributeSet;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import java.io.FileDescriptor;
import java.io.PrintWriter;
public class FragmentController {
private final FragmentHostCallback<?> mHost;
public static final FragmentController createController(FragmentHostCallback<?> callbacks) {
return new FragmentController(callbacks);
}
private FragmentController(FragmentHostCallback<?> callbacks) {
this.mHost = callbacks;
}
public FragmentManager getSupportFragmentManager() {
return this.mHost.getFragmentManagerImpl();
}
public LoaderManager getSupportLoaderManager() {
return this.mHost.getLoaderManagerImpl();
}
public Fragment findFragmentByWho(String who) {
return this.mHost.mFragmentManager.findFragmentByWho(who);
}
public void attachHost(Fragment parent) {
this.mHost.mFragmentManager.attachController(this.mHost, this.mHost, parent);
}
public View onCreateView(View parent, String name, Context context, AttributeSet attrs) {
return this.mHost.mFragmentManager.onCreateView(parent, name, context, attrs);
}
public void noteStateNotSaved() {
this.mHost.mFragmentManager.noteStateNotSaved();
}
public Parcelable saveAllState() {
return this.mHost.mFragmentManager.saveAllState();
}
public void restoreAllState(Parcelable state, FragmentManagerNonConfig nonConfig) {
this.mHost.mFragmentManager.restoreAllState(state, nonConfig);
}
public FragmentManagerNonConfig retainNestedNonConfig() {
return this.mHost.mFragmentManager.retainNonConfig();
}
public void dispatchCreate() {
this.mHost.mFragmentManager.dispatchCreate();
}
public void dispatchActivityCreated() {
this.mHost.mFragmentManager.dispatchActivityCreated();
}
public void dispatchStart() {
this.mHost.mFragmentManager.dispatchStart();
}
public void dispatchResume() {
this.mHost.mFragmentManager.dispatchResume();
}
public void dispatchPause() {
this.mHost.mFragmentManager.dispatchPause();
}
public void dispatchStop() {
this.mHost.mFragmentManager.dispatchStop();
}
public void dispatchReallyStop() {
this.mHost.mFragmentManager.dispatchReallyStop();
}
public void dispatchDestroy() {
this.mHost.mFragmentManager.dispatchDestroy();
}
public void dispatchMultiWindowModeChanged(boolean isInMultiWindowMode) {
this.mHost.mFragmentManager.dispatchMultiWindowModeChanged(isInMultiWindowMode);
}
public void dispatchPictureInPictureModeChanged(boolean isInPictureInPictureMode) {
this.mHost.mFragmentManager.dispatchPictureInPictureModeChanged(isInPictureInPictureMode);
}
public void dispatchConfigurationChanged(Configuration newConfig) {
this.mHost.mFragmentManager.dispatchConfigurationChanged(newConfig);
}
public void dispatchLowMemory() {
this.mHost.mFragmentManager.dispatchLowMemory();
}
public boolean dispatchCreateOptionsMenu(Menu menu, MenuInflater inflater) {
return this.mHost.mFragmentManager.dispatchCreateOptionsMenu(menu, inflater);
}
public boolean dispatchPrepareOptionsMenu(Menu menu) {
return this.mHost.mFragmentManager.dispatchPrepareOptionsMenu(menu);
}
public boolean dispatchOptionsItemSelected(MenuItem item) {
return this.mHost.mFragmentManager.dispatchOptionsItemSelected(item);
}
public boolean dispatchContextItemSelected(MenuItem item) {
return this.mHost.mFragmentManager.dispatchContextItemSelected(item);
}
public void dispatchOptionsMenuClosed(Menu menu) {
this.mHost.mFragmentManager.dispatchOptionsMenuClosed(menu);
}
public boolean execPendingActions() {
return this.mHost.mFragmentManager.execPendingActions();
}
public void doLoaderStart() {
this.mHost.doLoaderStart();
}
public void doLoaderStop(boolean retain) {
this.mHost.doLoaderStop(retain);
}
public void doLoaderDestroy() {
this.mHost.doLoaderDestroy();
}
public void reportLoaderStart() {
this.mHost.reportLoaderStart();
}
public SimpleArrayMap<String, LoaderManager> retainLoaderNonConfig() {
return this.mHost.retainLoaderNonConfig();
}
public void restoreLoaderNonConfig(SimpleArrayMap<String, LoaderManager> loaderManagers) {
this.mHost.restoreLoaderNonConfig(loaderManagers);
}
public void dumpLoaders(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
this.mHost.dumpLoaders(prefix, fd, writer, args);
}
}
| [
"jessejesse123@gmail.com"
] | jessejesse123@gmail.com |
6fa4ae890d8958830e8f8d99ee2ec1f422edf44a | b9afc95430f29a12ebb72b7f12331f6f9e9b30df | /src/main/java/com/elytradev/correlated/storage/WirelessTerminal.java | 6b4bb016db4ba304d06dd153157fe770030aaadc | [
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | tyra314/Correlated | f2ec697ccd6807e21fb19f26355ad0fecb4b88b2 | f1287ca25da6e99c10cc9d9810248e0e34efcabb | refs/heads/1.11.2 | 2021-01-01T06:35:04.442999 | 2017-06-12T11:59:28 | 2017-06-12T12:01:22 | 97,458,453 | 0 | 0 | null | 2017-07-17T09:22:36 | 2017-07-17T09:22:36 | null | UTF-8 | Java | false | false | 3,400 | java | package com.elytradev.correlated.storage;
import java.util.Collections;
import java.util.List;
import com.elytradev.correlated.CorrelatedWorldData;
import com.elytradev.correlated.helper.ItemStacks;
import com.elytradev.correlated.item.ItemHandheldTerminal;
import com.elytradev.correlated.network.ChangeAPNMessage;
import com.elytradev.correlated.wifi.Station;
import com.elytradev.correlated.wifi.WirelessManager;
import com.google.common.base.Strings;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.util.Constants.NBT;
public class WirelessTerminal implements ITerminal {
private World world;
private EntityPlayer player;
private ItemHandheldTerminal iwt;
private ItemStack stack = ItemStack.EMPTY;
public WirelessTerminal(World world, EntityPlayer player, ItemHandheldTerminal iwt, ItemStack stack) {
this.world = world;
this.player = player;
this.iwt = iwt;
this.stack = stack;
}
@Override
public UserPreferences getPreferences(EntityPlayer player) {
String id = player.getGameProfile().getId().toString();
NBTTagCompound prefs = stack.getOrCreateSubCompound("Preferences");
if (!prefs.hasKey(id, NBT.TAG_COMPOUND)) {
prefs.setTag(id, new NBTTagCompound());
}
return new NBTUserPreferences(prefs.getCompoundTag(id));
}
@Override
public IDigitalStorage getStorage() {
String apn = getAPN();
if (apn == null) return null;
Iterable<Station> li = CorrelatedWorldData.getFor(world).getWirelessManager().allStationsInChunk(world.getChunkFromBlockCoords(player.getPosition()));
for (Station s : li) {
if (s.getAPNs().contains(apn) && s.isInRange(player.posX, player.posY+player.getEyeHeight(), player.posZ)) {
List<IDigitalStorage> storages = s.getStorages(apn);
if (storages.size() == 1) {
return storages.get(0);
} else {
return new CompoundDigitalStorage(storages);
}
}
}
return null;
}
@Override
public boolean hasStorage() {
return getStorage() != null;
}
@Override
public boolean hasMaintenanceSlot() {
return false;
}
@Override
public void setMaintenanceSlotContent(ItemStack stack) {
}
@Override
public ItemStack getMaintenanceSlotContent() {
return ItemStack.EMPTY;
}
@Override
public boolean canContinueInteracting(EntityPlayer player) {
return true;
}
@Override
public void markUnderlyingStorageDirty() {
}
@Override
public int getSignalStrength() {
WirelessManager wm = CorrelatedWorldData.getFor(player.world).getWirelessManager();
return wm.getSignalStrength(player.posX, player.posY+player.getEyeHeight(), player.posZ, getAPN());
}
@Override
public void setAPN(String apn) {
if (world.isRemote) {
new ChangeAPNMessage(apn == null ? Collections.emptyList() : Collections.singleton(apn)).sendToServer();
} else {
if (apn == null) {
if (stack.hasTagCompound()) {
stack.getTagCompound().removeTag("APN");
}
} else {
ItemStacks.ensureHasTag(stack);
stack.getTagCompound().setString("APN", apn);
}
}
}
@Override
public String getAPN() {
return stack.hasTagCompound() ? Strings.emptyToNull(stack.getTagCompound().getString("APN")) : null;
}
@Override
public BlockPos getPosition() {
return player.getPosition();
}
}
| [
"aesen@unascribed.com"
] | aesen@unascribed.com |
96ad0a4bdb4a9bd348177966d9a371c2fa2de3b0 | ffeaf567e9b1aadb4c00d95cd3df4e6484f36dcd | /Hotgram/org/telegram/messenger/-$$Lambda$MessagesStorage$6DjTa3Y8ttX-Dp7Qv5PkUZt09LA.java | b62bb718be5bdbb9d1e1a2e4151ed97c38a57a3f | [] | no_license | danielperez9430/Third-party-Telegram-Apps-Spy | dfe541290c8512ca366e401aedf5cc5bfcaa6c3e | f6fc0f9c677bd5d5cd3585790b033094c2f0226d | refs/heads/master | 2020-04-11T23:26:06.025903 | 2018-12-18T10:07:20 | 2018-12-18T10:07:20 | 162,166,647 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 355 | java | package org.telegram.messenger;
public final class -$$Lambda$MessagesStorage$6DjTa3Y8ttX-Dp7Qv5PkUZt09LA implements Runnable {
public -$$Lambda$MessagesStorage$6DjTa3Y8ttX-Dp7Qv5PkUZt09LA(MessagesStorage arg1) {
super();
this.f$0 = arg1;
}
public final void run() {
MessagesStorage.lambda$null$35(this.f$0);
}
}
| [
"dpefe@hotmail.es"
] | dpefe@hotmail.es |
dfb66bd8bd0ddd128365faf8bd01488b87b5c6ad | fa1408365e2e3f372aa61e7d1e5ea5afcd652199 | /src/testcases/CWE129_Improper_Validation_of_Array_Index/s03/CWE129_Improper_Validation_of_Array_Index__getParameter_Servlet_array_size_75b.java | d0ca896f8a535757f09a609a9df422d3b50d6c2c | [] | no_license | bqcuong/Juliet-Test-Case | 31e9c89c27bf54a07b7ba547eddd029287b2e191 | e770f1c3969be76fdba5d7760e036f9ba060957d | refs/heads/master | 2020-07-17T14:51:49.610703 | 2019-09-03T16:22:58 | 2019-09-03T16:22:58 | 206,039,578 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 7,758 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE129_Improper_Validation_of_Array_Index__getParameter_Servlet_array_size_75b.java
Label Definition File: CWE129_Improper_Validation_of_Array_Index.label.xml
Template File: sources-sinks-75b.tmpl.java
*/
/*
* @description
* CWE: 129 Improper Validation of Array Index
* BadSource: getParameter_Servlet Read data from a querystring using getParameter()
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: array_size
* GoodSink: data is used to set the size of the array and it must be greater than 0
* BadSink : data is used to set the size of the array, but it could be set to 0
* Flow Variant: 75 Data flow: data passed in a serialized object from one method to another in different source files in the same package
*
* */
package testcases.CWE129_Improper_Validation_of_Array_Index.s03;
import testcasesupport.*;
import java.io.ByteArrayInputStream;
import java.io.ObjectInputStream;
import java.io.IOException;
import java.util.logging.Level;
import javax.servlet.http.*;
public class CWE129_Improper_Validation_of_Array_Index__getParameter_Servlet_array_size_75b
{
public void badSink(byte[] dataSerialized , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
/* unserialize data */
ByteArrayInputStream streamByteArrayInput = null;
ObjectInputStream streamObjectInput = null;
try
{
streamByteArrayInput = new ByteArrayInputStream(dataSerialized);
streamObjectInput = new ObjectInputStream(streamByteArrayInput);
int data = (Integer)streamObjectInput.readObject();
int array[] = null;
/* POTENTIAL FLAW: Verify that data is non-negative, but still allow it to be 0 */
if (data >= 0)
{
array = new int[data];
}
else
{
IO.writeLine("Array size is negative");
}
/* do something with the array */
array[0] = 5;
IO.writeLine(array[0]);
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "IOException in deserialization", exceptIO);
}
catch (ClassNotFoundException exceptClassNotFound)
{
IO.logger.log(Level.WARNING, "ClassNotFoundException in deserialization", exceptClassNotFound);
}
finally
{
/* clean up stream reading objects */
try
{
if (streamObjectInput != null)
{
streamObjectInput.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing ObjectInputStream", exceptIO);
}
try
{
if (streamByteArrayInput != null)
{
streamByteArrayInput.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing ByteArrayInputStream", exceptIO);
}
}
}
/* goodG2B() - use GoodSource and BadSink */
public void goodG2BSink(byte[] dataSerialized , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
/* unserialize data */
ByteArrayInputStream streamByteArrayInput = null;
ObjectInputStream streamObjectInput = null;
try {
streamByteArrayInput = new ByteArrayInputStream(dataSerialized);
streamObjectInput = new ObjectInputStream(streamByteArrayInput);
int data = (Integer)streamObjectInput.readObject();
int array[] = null;
/* POTENTIAL FLAW: Verify that data is non-negative, but still allow it to be 0 */
if (data >= 0)
{
array = new int[data];
}
else
{
IO.writeLine("Array size is negative");
}
/* do something with the array */
array[0] = 5;
IO.writeLine(array[0]);
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "IOException in deserialization", exceptIO);
}
catch (ClassNotFoundException exceptClassNotFound)
{
IO.logger.log(Level.WARNING, "ClassNotFoundException in deserialization", exceptClassNotFound);
}
finally
{
/* clean up stream reading objects */
try
{
if (streamObjectInput != null)
{
streamObjectInput.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing ObjectInputStream", exceptIO);
}
try
{
if (streamByteArrayInput != null)
{
streamByteArrayInput.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing ByteArrayInputStream", exceptIO);
}
}
}
/* goodB2G() - use BadSource and GoodSink */
public void goodB2GSink(byte[] dataSerialized , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
/* unserialize data */
ByteArrayInputStream streamByteArrayInput = null;
ObjectInputStream streamObjectInput = null;
try
{
streamByteArrayInput = new ByteArrayInputStream(dataSerialized);
streamObjectInput = new ObjectInputStream(streamByteArrayInput);
int data = (Integer)streamObjectInput.readObject();
/* Need to ensure that the array is of size > 3 and < 101 due to the GoodSource and the large_fixed BadSource */
int array[] = null;
/* FIX: Verify that data is non-negative AND greater than 0 */
if (data > 0)
{
array = new int[data];
}
else
{
IO.writeLine("Array size is negative");
}
/* do something with the array */
array[0] = 5;
IO.writeLine(array[0]);
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "IOException in deserialization", exceptIO);
}
catch (ClassNotFoundException exceptClassNotFound)
{
IO.logger.log(Level.WARNING, "ClassNotFoundException in deserialization", exceptClassNotFound);
}
finally
{
/* clean up stream reading objects */
try
{
if (streamObjectInput != null)
{
streamObjectInput.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing ObjectInputStream", exceptIO);
}
try
{
if (streamByteArrayInput != null)
{
streamByteArrayInput.close();
}
}
catch (IOException exceptIO)
{
IO.logger.log(Level.WARNING, "Error closing ByteArrayInputStream", exceptIO);
}
}
}
}
| [
"bqcuong2212@gmail.com"
] | bqcuong2212@gmail.com |
1fde17a879c03815b7b3eb86ca8c72a21cde6b17 | 1d32aa38e4e0e0c93fbb0cc259bc3ab3b1385afc | /app/src/main/java/com/bigpumpkin/app/ddng_android/activity/Details_farmActivity.java | 914b52c1a87fd83e4ce27796ff22a65b8b233f63 | [] | no_license | GuYou957641694/ddng_android | 196df72fde36a64108a3cbb6fe980a3a256f1d86 | 70ff91b03001db3c3a69d63ab86a89ade013115c | refs/heads/master | 2020-07-11T16:07:17.255963 | 2019-12-12T03:01:59 | 2019-12-12T03:01:59 | 204,591,311 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 412 | java | package com.bigpumpkin.app.ddng_android.activity;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import com.bigpumpkin.app.ddng_android.R;
public class Details_farmActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_details_farm);
}
}
| [
"j957641694@163.com"
] | j957641694@163.com |
c305ab96c5a7d9d7a6c71afd2eaa957483cba61f | 0eeea8f93b4f154db22e98a1b1a72ae5adba8dba | /src/cn/osworks/aos/system/dao/mapper/Depot_hjMapper.java | 3dde1c19f5dc3b5f8c920a2fc9ff0e64ed6e5f33 | [] | no_license | atguigu2020dfbb/aosyb | 497dc3b79b3f73441338e97b2f7072644c984efb | 16c031ac63cc30235ed114a8b0a4b8870ece2328 | refs/heads/master | 2023-01-10T08:16:20.744253 | 2020-11-16T08:16:35 | 2020-11-16T08:16:35 | 313,138,331 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,517 | java | package cn.osworks.aos.system.dao.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import cn.osworks.aos.core.annotation.Mapper;
import cn.osworks.aos.core.typewrap.Dto;
import cn.osworks.aos.system.dao.po.Depot_hjPO;
/**
* <b>depot_hj[depot_hj]数据访问接口</b>
*
* <p>
* 注意:此文件由AOS平台自动生成-禁止手工修改
* </p>
*
* @author Shq
* @date 2020-09-09 15:44:43
*/
@Mapper
public interface Depot_hjMapper {
/**
* 插入一个数据持久化对象(插入字段为传入PO实体的非空属性)
* <p> 防止DB字段缺省值需要程序中再次赋值
*
* @param depot_hjPO
* 要插入的数据持久化对象
* @return 返回影响行数
*/
int insert(Depot_hjPO depot_hjPO);
/**
* 插入一个数据持久化对象(含所有字段)
*
* @param depot_hjPO
* 要插入的数据持久化对象
* @return 返回影响行数
*/
int insertAll(Depot_hjPO depot_hjPO);
/**
* 根据主键修改数据持久化对象
*
* @param depot_hjPO
* 要修改的数据持久化对象
* @return int 返回影响行数
*/
int updateByKey(Depot_hjPO depot_hjPO);
/**
* 根据主键查询并返回数据持久化对象
*
* @return Depot_hjPO
*/
Depot_hjPO selectByKey(@Param(value = "id_") String id_);
/**
* 根据唯一组合条件查询并返回数据持久化对象
*
* @return Depot_hjPO
*/
Depot_hjPO selectOne(Dto pDto);
/**
* 根据Dto查询并返回数据持久化对象集合
*
* @return List<Depot_hjPO>
*/
List<Depot_hjPO> list(Dto pDto);
/**
* 根据Dto查询并返回分页数据持久化对象集合
*
* @return List<Depot_hjPO>
*/
List<Depot_hjPO> listPage(Dto pDto);
/**
* 根据Dto模糊查询并返回数据持久化对象集合(字符型字段模糊匹配,其余字段精确匹配)
*
* @return List<Depot_hjPO>
*/
List<Depot_hjPO> like(Dto pDto);
/**
* 根据Dto模糊查询并返回分页数据持久化对象集合(字符型字段模糊匹配,其余字段精确匹配)
*
* @return List<Depot_hjPO>
*/
List<Depot_hjPO> likePage(Dto pDto);
/**
* 根据主键删除数据持久化对象
*
* @return 影响行数
*/
int deleteByKey(@Param(value = "id_") String id_);
/**
* 根据Dto统计行数
*
* @param pDto
* @return
*/
int rows(Dto pDto);
/**
* 根据数学表达式进行数学运算
*
* @param pDto
* @return String
*/
String calc(Dto pDto);
}
| [
"eclipse_user@atguigu.com"
] | eclipse_user@atguigu.com |
bafc0aed2346010f7dc2d1742802515e73e419a5 | 774d36285e48bd429017b6901a59b8e3a51d6add | /sources/com/google/android/exoplayer2/C3036d.java | e440bf83dac1f46d2687138f7ecf0842f4756142 | [] | no_license | jorge-luque/hb | 83c086851a409e7e476298ffdf6ba0c8d06911db | b467a9af24164f7561057e5bcd19cdbc8647d2e5 | refs/heads/master | 2023-08-25T09:32:18.793176 | 2020-10-02T11:02:01 | 2020-10-02T11:02:01 | 300,586,541 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 166 | java | package com.google.android.exoplayer2;
/* renamed from: com.google.android.exoplayer2.d */
/* compiled from: ExoPlayer */
public interface C3036d extends C3040h {
}
| [
"jorge.luque@taiger.com"
] | jorge.luque@taiger.com |
a72e5820050ad3f79021c8e73d72fddfbac5cb3c | b85b2e744829d7dfe5d28babb4c3644ad67f6aa9 | /DataConservancyCode/dcs-ui/stripes-dcwebapp/src/main/java/org/dataconservancy/ui/stripes/LoginActionBean.java | 1c70ea9f9e3389bf314833c0c6c6416b0537f574 | [] | no_license | Data-to-Insight-Center/sead-virtual-archive | 850bcc22a0e6a6beef50e59b6f6397b9b57a725d | 5aecb3512f4942d0f4c1273cdae8419ee7d5577f | refs/heads/master | 2020-04-14T13:13:55.011374 | 2020-02-01T16:22:23 | 2020-02-01T16:22:23 | 14,767,215 | 0 | 1 | null | 2020-02-01T16:22:28 | 2013-11-28T03:50:23 | Java | UTF-8 | Java | false | false | 3,985 | java | /*
* Copyright 2012 Johns Hopkins University
*
* 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.dataconservancy.ui.stripes;
import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.ForwardResolution;
import net.sourceforge.stripes.action.LocalizableMessage;
import net.sourceforge.stripes.action.Message;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.action.UrlBinding;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.web.WebAttributes;
import javax.servlet.http.HttpSession;
import java.util.List;
/**
* Stripes ActionBean for the login page. It is responsible for rendering the login form, and displaying errors that
* occurred on previous authentication attempts, if any. Spring security processes the form submission and is
* responsible for user authentication throughout the application.
* <p/>
* Authentication error messages are placed into the flash scope keyed by {@link #AUTHENTICATION_ERROR_KEY}. The content
* of error messages are localized in {@code StripesResources.properties}, and are keyed by the class name of the
* authentication exception.
*
* @see <a href="http://static.springsource.org/spring-security/site/docs/3.0.x/reference/springsecurity.html">Spring Security 3.0.x Reference Documentation</a>
*/
@UrlBinding("/login/login.action")
public class LoginActionBean extends BaseActionBean {
/**
* This is the key used when placing authentication error messages into the flash scope. The view layer can
* use this key to display the messages, like so:
* <code>
* <stripes:messages key="authentication.failure"/>
* </code>
*/
public static String AUTHENTICATION_ERROR_KEY = "authentication.failure";
/**
* The path to the login form JSP which is rendered when a user is prompted to authenticate.
*/
public static String LOGIN_FORM_PATH = "/pages/login.jsp";
private Logger log = LoggerFactory.getLogger(this.getClass());
/**
* Simply renders the login form located at {@link #LOGIN_FORM_PATH}. Places authentication errors into
* flash scope.
*
* @return forward resolution to the login form
*/
@DefaultHandler
public Resolution renderLoginForm() {
// check the request, then the session, for an authentication exception
Exception authE = (Exception) getContext().getRequest().getAttribute(WebAttributes.AUTHENTICATION_EXCEPTION);
if (authE == null) {
HttpSession s = getContext().getRequest().getSession(false);
if (s != null) {
synchronized (s) {
authE = (Exception) s.getAttribute(WebAttributes.AUTHENTICATION_EXCEPTION);
// then clear the exception
s.removeAttribute(WebAttributes.AUTHENTICATION_EXCEPTION);
}
}
}
// if there was an authentication exception, put a failure message in the flash
if (authE != null) {
List<Message> failures = getContext().getMessages(AUTHENTICATION_ERROR_KEY);
failures.add(new LocalizableMessage(this.getClass().getName() + ".loginError"));
failures.add(new LocalizableMessage(authE.getClass().getName()));
}
// TODO: if (loggedIn) render message else render login form
return new ForwardResolution(LOGIN_FORM_PATH);
}
}
| [
"kavchand@indiana.edu"
] | kavchand@indiana.edu |
a4231e29e03118d9dc689ee0429aa589e4bdfa2a | 38b1903b99eefc3d83667127407519f580ed6158 | /.history/src/main/java/PDF/Generator/PDFgenerator/service/IdentityCardServiceImpl_20200906121329.java | 215cbad275f7da2a5d6c0dd8efb187319333b032 | [] | no_license | Len2/Topic4 | 7ecb28810338db7f1970fdf706018926502b7ad2 | fde63a4ec8438b83be0d3d2f25da530fafe46c5a | refs/heads/master | 2022-12-13T18:20:11.446382 | 2020-09-07T13:46:18 | 2020-09-07T13:46:18 | 293,315,896 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 404 | java | package PDF.Generator.PDFgenerator.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import PDF.Generator.PDFgenerator.repo.IdentityCardServiceRepo;
@Service
public class IdentityCardServiceImpl implements IdentityCardService {
@Autowired
private IdentityCardServiceRepo identityCardRepo;
@Override
public Li
}
| [
"lendritshala3@gmail.com"
] | lendritshala3@gmail.com |
613dab4ea1c37cdfe8e22d414a55432f8242cf1f | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.minihd.qq/assets/exlibs.1.jar/classes.jar/NS_MOBILE_NEWEST_FEEDS/newest_feeds_rsp.java | 9e75751ef95a3cebb441aa5db84572b6fbfdf62f | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 1,892 | java | package NS_MOBILE_NEWEST_FEEDS;
import com.qq.taf.jce.JceInputStream;
import com.qq.taf.jce.JceOutputStream;
import com.qq.taf.jce.JceStruct;
import java.util.ArrayList;
public final class newest_feeds_rsp
extends JceStruct
{
static ArrayList cache_vec_feed_info;
public int code = 0;
public long last_feed_time = 0L;
public String str_attach = "";
public ArrayList vec_feed_info = null;
public newest_feeds_rsp() {}
public newest_feeds_rsp(int paramInt, ArrayList paramArrayList, long paramLong, String paramString)
{
this.code = paramInt;
this.vec_feed_info = paramArrayList;
this.last_feed_time = paramLong;
this.str_attach = paramString;
}
public void readFrom(JceInputStream paramJceInputStream)
{
this.code = paramJceInputStream.read(this.code, 0, false);
if (cache_vec_feed_info == null)
{
cache_vec_feed_info = new ArrayList();
feed_info localfeed_info = new feed_info();
cache_vec_feed_info.add(localfeed_info);
}
this.vec_feed_info = ((ArrayList)paramJceInputStream.read(cache_vec_feed_info, 1, false));
this.last_feed_time = paramJceInputStream.read(this.last_feed_time, 2, false);
this.str_attach = paramJceInputStream.readString(3, false);
}
public void writeTo(JceOutputStream paramJceOutputStream)
{
paramJceOutputStream.write(this.code, 0);
if (this.vec_feed_info != null) {
paramJceOutputStream.write(this.vec_feed_info, 1);
}
paramJceOutputStream.write(this.last_feed_time, 2);
if (this.str_attach != null) {
paramJceOutputStream.write(this.str_attach, 3);
}
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.1.jar\classes.jar
* Qualified Name: NS_MOBILE_NEWEST_FEEDS.newest_feeds_rsp
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
b229a04c2fa116cd01a52773556ec15912dbc923 | f1d13f82702a0fa613a57002bb28a9d79387565a | /app/src/main/java/com/journals/biobulletin/ui/adapter/CurrentIssuesAdapter1.java | db7bbf4b9377116b4f576aea8b327189166ae279 | [] | no_license | suresh429/BioBulletin | c584f6efa72a4b0a94c24049c04f524ea8901932 | 421ced731f09c0fefbe85a14207d85f8acd3bc71 | refs/heads/master | 2023-03-31T22:00:28.598040 | 2021-04-05T06:03:01 | 2021-04-05T06:03:01 | 354,736,205 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,722 | java | package com.journals.biobulletin.ui.adapter;
import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Bundle;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.navigation.Navigation;
import androidx.recyclerview.widget.RecyclerView;
import com.journals.biobulletin.R;
import com.journals.biobulletin.databinding.CurrentIssueItem1Binding;
import com.journals.biobulletin.model.CurrentIssueResponse;
import java.util.List;
import static com.journals.biobulletin.helper.utils.viewInBrowser;
public class CurrentIssuesAdapter1 extends RecyclerView.Adapter<CurrentIssuesAdapter1.ViewHolder> {
List<CurrentIssueResponse.CurrentissueDetailsBean> modelList;
Context context;
public CurrentIssuesAdapter1(List<CurrentIssueResponse.CurrentissueDetailsBean> modelList,Context context) {
this.modelList = modelList;
this.context = context;
}
@NonNull
@Override
public CurrentIssuesAdapter1.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return new ViewHolder(CurrentIssueItem1Binding.inflate(LayoutInflater.from(parent.getContext()), parent, false));
}
@SuppressLint("SetTextI18n")
@Override
public void onBindViewHolder(@NonNull CurrentIssuesAdapter1.ViewHolder holder, int position) {
if (modelList.get(position).getArt_type() != null && !modelList.get(position).getArt_type().equalsIgnoreCase("null")
&& !modelList.get(position).getArt_type().isEmpty() ) {
holder.rowItemBinding.txtIssueType.setText(modelList.get(position).getArt_type());
} else {
holder.rowItemBinding.txtIssueType.setVisibility(View.GONE);
}
if (modelList.get(position).getTitle() != null && !modelList.get(position).getTitle().equalsIgnoreCase("null")
&& !modelList.get(position).getTitle().isEmpty() ) {
holder.rowItemBinding.txtIssueTitle.setText(modelList.get(position).getTitle());
} else {
holder.rowItemBinding.txtIssueTitle.setVisibility(View.GONE);
}
if (modelList.get(position).getAuthor_names() != null && !modelList.get(position).getAuthor_names().equalsIgnoreCase("null")
&& !modelList.get(position).getAuthor_names().isEmpty() ) {
holder.rowItemBinding.txtIssueAuthor.setText(Html.fromHtml(modelList.get(position).getAuthor_names()));
} else {
holder.rowItemBinding.txtIssueAuthor.setVisibility(View.GONE);
}
if (modelList.get(position).getDoi_num() != null && !modelList.get(position).getDoi_num().equalsIgnoreCase("null")
&& !modelList.get(position).getDoi_num().isEmpty() ) {
holder.rowItemBinding.txtIssueDOI.setText("DOI : " + modelList.get(position).getDoi_num());
} else {
holder.rowItemBinding.txtIssueDOI.setVisibility(View.GONE);
}
if (modelList.get(position).getAbstractlink() != null && !modelList.get(position).getAbstractlink().equalsIgnoreCase("null") && !modelList.get(position).getAbstractlink().isEmpty() ) {
holder.rowItemBinding.txtAbstract.setVisibility(View.VISIBLE);
} else {
holder.rowItemBinding.txtAbstract.setVisibility(View.GONE);
}
if (modelList.get(position).getPdflink() != null && !modelList.get(position).getPdflink().equalsIgnoreCase("null") && !modelList.get(position).getPdflink().isEmpty() ) {
holder.rowItemBinding.txtPDF.setVisibility(View.VISIBLE);
} else {
holder.rowItemBinding.txtPDF.setVisibility(View.GONE);
}
if (modelList.get(position).getFulltextlink() != null && !modelList.get(position).getFulltextlink().equalsIgnoreCase("null") && !modelList.get(position).getFulltextlink().isEmpty() ) {
holder.rowItemBinding.txtFullText.setVisibility(View.VISIBLE);
} else {
holder.rowItemBinding.txtFullText.setVisibility(View.GONE);
}
holder.rowItemBinding.txtAbstract.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Bundle bundle = new Bundle();
bundle.putString("abstractlink", modelList.get(position).getAbstractlink());
bundle.putString("ActionBarTitle","Abstract");
Navigation.findNavController(v).navigate(R.id.abstractDisplayFragment,bundle);
}
});
holder.rowItemBinding.txtPDF.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
viewInBrowser(context,modelList.get(position).getPdflink(),"Not Found");
}
});
holder.rowItemBinding.txtFullText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
viewInBrowser(context,modelList.get(position).getFulltextlink(),"Not Found");
}
});
}
@Override
public int getItemCount() {
return modelList.size();
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public int getItemViewType(int position) {
return position;
}
public static class ViewHolder extends RecyclerView.ViewHolder {
CurrentIssueItem1Binding rowItemBinding;
public ViewHolder(@NonNull CurrentIssueItem1Binding rowItemBinding) {
super(rowItemBinding.getRoot());
this.rowItemBinding = rowItemBinding;
}
}
}
| [
"ksuresh.unique@gmail.com"
] | ksuresh.unique@gmail.com |
efeb873542e721e7665cd360343c6d64e371fb82 | b6bae06ad042ff642fe235ffdc33fa0374c8a735 | /src/main/java/com/example/Service/JugadorService.java | 97afbe06aa277bec9b75118d84f4f9999015ac32 | [] | no_license | ERICCC95/LigaBasquet | f2d93ff62a05e0ceb61598eabef2f13d5d913744 | 3117e405486b8638de333010bb779dd28916d3f2 | refs/heads/master | 2021-01-10T17:08:10.838729 | 2015-11-26T19:36:59 | 2015-11-26T19:36:59 | 44,333,390 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,524 | java | package com.example.Service;
import com.example.Model.Equipo;
import com.example.Model.Jugador;
import com.example.repository.EquipoRepository;
import com.example.repository.JugadorRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;
import javax.transaction.Transactional;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Set;
/**
* Created by jhipster on 8/10/15.
*/
@Service
@Transactional
public class JugadorService {
@Autowired
JugadorRepository jugadorRepository;
@Autowired
EquipoRepository equipoRepository;
public void testJugador(){
Calendar calendar = GregorianCalendar.getInstance();
Equipo equipo = equipoRepository.findBynombre("Barca").get(0);
Equipo equipo2 = equipoRepository.findBynombre("Podemos").get(0);
calendar.set(1999, Calendar.JANUARY, 01);
Jugador jugador1 = new Jugador(equipo, "Alex", calendar.getTime(), 99, 50, 0, "Alero");
jugadorRepository.save(jugador1);
calendar.set(1995, Calendar.SEPTEMBER, 15);
Jugador jugador2 = new Jugador(equipo, "Eric", calendar.getTime(), 20, 30, 5, "Base");
jugadorRepository.save(jugador2);
calendar.set(1999, Calendar.AUGUST, 01);
Jugador jugador3 = new Jugador(equipo, "Joquim", calendar.getTime(), 150, 90, 54, "Pivot");
jugadorRepository.save(jugador3);
calendar.set(1950, Calendar.APRIL, 03);
Jugador jugador4 = new Jugador(equipo, "Jaime", calendar.getTime(), 120, 55, 100, "Alero");
jugadorRepository.save(jugador4);
Jugador jugador5 = new Jugador(equipo, "Alex2", calendar.getTime(), 99, 50, 0, "Alero");
jugadorRepository.save(jugador5);
calendar.set(1995, Calendar.SEPTEMBER, 15);
Jugador jugador6 = new Jugador(equipo, "Eric2", calendar.getTime(), 20, 30, 5, "Base");
jugadorRepository.save(jugador6);
calendar.set(1999, Calendar.AUGUST, 01);
Jugador jugador7 = new Jugador(equipo, "Joquim2", calendar.getTime(), 150, 90, 54, "Pivot");
jugadorRepository.save(jugador7);
calendar.set(1950, Calendar.APRIL, 03);
Jugador jugador8 = new Jugador(equipo, "Jaime2", calendar.getTime(), 120, 55, 100, "Alero");
jugadorRepository.save(jugador8);
Jugador jugador9 = new Jugador(equipo, "Joquim3", calendar.getTime(), 150, 90, 54, "Pivot");
jugadorRepository.save(jugador9);
calendar.set(1950, Calendar.APRIL, 03);
Jugador jugador10 = new Jugador(equipo, "Jaime3", calendar.getTime(), 120, 55, 100, "Alero");
jugadorRepository.save(jugador10);
Jugador jugador11 = new Jugador(equipo2, "pablo1", calendar.getTime(), 120, 55, 100, "Alero");
jugadorRepository.save(jugador11);
Jugador jugador12 = new Jugador(equipo2, "pablo2", calendar.getTime(), 120, 55, 100, "Alero");
jugadorRepository.save(jugador12);
Jugador jugador13 = new Jugador(equipo2, "pablo3", calendar.getTime(), 120, 55, 100, "Alero");
jugadorRepository.save(jugador13);
Jugador jugador14 = new Jugador(equipo2, "pablo4", calendar.getTime(), 120, 55, 100, "Alero");
jugadorRepository.save(jugador14);
Jugador jugador15 = new Jugador(equipo2, "pablo5", calendar.getTime(), 120, 55, 100, "Alero");
jugadorRepository.save(jugador15);
Jugador jugador16 = new Jugador(equipo2, "pablo6", calendar.getTime(), 120, 55, 100, "Alero");
jugadorRepository.save(jugador16);
Jugador jugador17 = new Jugador(equipo2, "pablo7", calendar.getTime(), 120, 55, 100, "Alero");
jugadorRepository.save(jugador17);
Jugador jugador18 = new Jugador(equipo2, "pablo8", calendar.getTime(), 120, 55, 100, "Alero");
jugadorRepository.save(jugador18);
Jugador jugador19 = new Jugador(equipo2, "pablo9", calendar.getTime(), 120, 55, 100, "Alero");
jugadorRepository.save(jugador19);
Jugador jugador20 = new Jugador(equipo2, "pablo10", calendar.getTime(), 120, 55, 100, "Alero");
jugadorRepository.save(jugador20);
System.out.println(jugadorRepository.findBynombreLike("Alex"));
System.out.println(jugadorRepository.findByposicionCampo("Pivot"));
calendar.set(1999, Calendar.APRIL, 06);
System.out.println(jugadorRepository.findByFechaNacimientoLessThan(calendar.getTime()));
System.out.println(jugadorRepository.findByasistenciasTotalesBetween(0, 50));
System.out.println(jugadorRepository.findBycanastasTotalesGreaterThanEqual(50));
System.out.println(jugadorRepository.findBycanastasTotalesGreaterThanEqualAndFechaNacimientoLessThan(10, calendar.getTime()));
System.out.println(jugadorRepository.findBycanastasTotalesGreaterThanEqualAndFechaNacimientoLessThan(10, calendar.getTime()));
System.out.println(jugadorRepository.findByEquipoNombre("Barca"));
System.out.println(jugadorRepository.findByEquipoNombreAndPosicionCampo("Barca", "Alero"));
System.out.println("el jugador con mas canastas es " + jugadorRepository.findTopByOrderByCanastasTotalesDesc());
System.out.println("Los jugadores con mas asistencias es " + jugadorRepository.findFirst5ByOrderByAsistenciasTotalesDesc());
System.out.println("El mejor jugador dl barça es: " + jugadorRepository.findByEquipoNombreAndTopCanastasTotales("Barca", new PageRequest(0, 1)));
}
}
| [
"alfredoru@gmail.com"
] | alfredoru@gmail.com |
71ae80d4ea83662a4c07a2108d1869b2a783185a | e5fcecd08dc30e947cf11d1440136994226187c6 | /SpagoBIUtils/src/main/java/it/eng/spagobi/tools/dataset/common/datawriter/SourceBeanDataWriter.java | 8394e31eb064333596120e86b5a0b614554d622b | [] | no_license | skoppe/SpagoBI | 16851fa5a6949b5829702eaea2724cee0629560b | 7a295c096e3cca9fb53e5c125b9566983472b259 | refs/heads/master | 2021-05-05T10:18:35.120113 | 2017-11-27T10:26:44 | 2017-11-27T10:26:44 | 104,053,911 | 0 | 0 | null | 2017-09-19T09:19:44 | 2017-09-19T09:19:43 | null | UTF-8 | Java | false | false | 751 | java | /* SpagoBI, the Open Source Business Intelligence suite
* Copyright (C) 2012 Engineering Ingegneria Informatica S.p.A. - SpagoBI Competency Center
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0, without the "Incompatible With Secondary Licenses" notice.
* If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package it.eng.spagobi.tools.dataset.common.datawriter;
import it.eng.spagobi.tools.dataset.common.datastore.IDataStore;
/**
* @author Andrea Gioia (andrea.gioia@eng.it)
*/
public class SourceBeanDataWriter implements IDataWriter {
public Object write(IDataStore dataStore) {
// TODO Auto-generated method stub
return null;
}
}
| [
"mail@skoppe.eu"
] | mail@skoppe.eu |
9bd65d6249938a7746da2419f241b8907503836e | b175b8ec89e7f6be3443b51c2f7c0c42f7cbae7b | /erp/erpsrc/src/com/tanry/business/module/lc/stock/action/CreatePackingAction.java | 7bc7bf4fb6dd5c92ec0c56227fe38dfcacca4745 | [] | no_license | chenjuntao/jonoerp | 84230a8681471cac7ccce1251316ab51b3d753b1 | 572994ebe7942b062d91a0802b2c2e2325da2a1d | refs/heads/master | 2021-07-22T00:48:09.648040 | 2020-10-30T04:01:57 | 2020-10-30T04:01:57 | 227,536,826 | 0 | 0 | null | 2020-08-27T08:50:21 | 2019-12-12T06:32:23 | JavaScript | UTF-8 | Java | false | false | 4,649 | java | /**
* Copyright (c) 2014
* Tanry Electronic Technology Co., Ltd.
* ChangSha, China
*
* All Rights Reserved.
*
* First created on Dec 16, 2014 by liyzh
* Last edited on Dec 16, 2014 by liyzh
*
* 说明: 物流中心装箱单创建
*/
package com.tanry.business.module.lc.stock.action;
import java.io.IOException;
import java.sql.SQLException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import logic.NoConnection;
import logic.module.lc.CreatePackingBean;
import logic.store.BranchBean;
import net.sf.json.JSONObject;
import pojo.form.PackingDetail;
import pojo.form.PackingHeader;
import action.common.BaseAction;
import com.tanry.business.module.lc.stock.service.PackingService;
import com.tanry.business.module.lc.stock.util.PackInstance;
import com.tanry.framework.acl.NoPrivilegeException;
import com.tanry.framework.util.DateTimeUtil;
public class CreatePackingAction extends BaseAction {
private static final long serialVersionUID = 1L;
private BranchBean branchBean;
public void setBranchBean(BranchBean branchBean) {
this.branchBean = branchBean;
}
private CreatePackingBean createPackingBean;
private PackingService packingService;
private PackingHeader packingHeader;
/**
* 装箱单编号
*/
private String formId;
/**
* 捡货单编号
*/
private String formRefId;
private Map<String, Map<String, Object>> boxMap;
private Date formTime;
private Date startDate;
private Date endDate;
private Date businessDate;
public String execute() throws NoPrivilegeException, SQLException, NoConnection {
businessDate = branchBean.GetBranchById(getLoginBranchId()).getBusinessDate();// 获取物流中心当前的营业时间
endDate = DateTimeUtil.getMonthLastDay(businessDate);
startDate = DateTimeUtil.getMonthFristDay(businessDate);
return SUCCESS;
}
public String createView() throws NoPrivilegeException, SQLException, NoConnection {
packingHeader = new PackingHeader();
packingHeader.setFormMakerId(getLoginUserId());
packingHeader.setFormMaker(getLoginUsername());
formTime = branchBean.GetBranchById(getLoginBranchId()).getBusinessDate();
List<PackingDetail> itemLst = createPackingBean.queryPacking(formRefId);
boxMap = PackInstance.iterate(itemLst);
return SUCCESS;
}
/**
* 根据捡货单构造装箱数据
*/
public void queryDetail() throws NoPrivilegeException, SQLException, NoConnection {
List<PackingDetail> itemLst = createPackingBean.queryPacking(formRefId);
Map<String, Map<String, Object>> boxMap = PackInstance.iterate(itemLst);
JSONObject result = JSONObject.fromObject(boxMap);
result.put("msg", "ok");
try {
this.outJS(result.toString());
} catch (IOException e) {
e.printStackTrace();
}
}
public void createPackingBill() throws NoPrivilegeException, SQLException, NoConnection {
List<PackingDetail> itemLst = createPackingBean.queryPacking(formRefId);
boxMap = PackInstance.iterate(itemLst);
packingHeader.setFormRefId(formRefId);
packingHeader.setPackingBranchId(getLoginBranchId());
formId = packingService.createBill(getLoginUserId(), packingHeader, boxMap);
JSONObject result = new JSONObject();
result.put("formId", formId);
result.put("msg", "ok");
try {
this.outJS(result.toString());
} catch (IOException e) {
e.printStackTrace();
}
}
public String getFormTime() {
return DateTimeUtil.getDateStr(formTime);
}
public PackingHeader getPackingHeader() {
return packingHeader;
}
public void setPackingHeader(PackingHeader packingHeader) {
this.packingHeader = packingHeader;
}
public String getFormId() {
return formId;
}
public void setFormId(String formId) {
this.formId = formId;
}
public String getFormRefId() {
return formRefId;
}
public void setFormRefId(String formRefId) {
this.formRefId = formRefId;
}
public Map<String, Map<String, Object>> getBoxMap() {
return boxMap;
}
public void setCreatePackingBean(CreatePackingBean createPackingBean) {
this.createPackingBean = createPackingBean;
}
public void setPackingService(PackingService packingService) {
this.packingService = packingService;
}
public String getStartDate() {
return DateTimeUtil.getDateStr(startDate);
}
public String getEndDate() {
return DateTimeUtil.getDateStr(endDate);
}
public String getBusinessDate() {
return DateTimeUtil.getDateStr(businessDate);
}
public void setBusinessDate(Date businessDate) {
this.businessDate = businessDate;
}
}
| [
"cjtlp2006@163.com"
] | cjtlp2006@163.com |
faa725482ff22d46c1578694749446c7c44379cc | 4e7c597e78f01fe1c14fc4cbb67dc4379a8c5939 | /mambo-protocol/src/main/java/org/mambo/protocol/types/InteractiveElementSkill.java | ce6c31f8b170cb33d992fa2a816420422c7ac57a | [] | no_license | Guiedo/Mambo | c24e4836f20a1028e61cb7987ad6371348aaf0fe | 8fb946179b6b00798010bda8058430789644229d | refs/heads/master | 2021-01-18T11:29:43.048990 | 2013-05-25T17:33:37 | 2013-05-25T17:33:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,306 | java |
// Generated on 05/08/2013 19:38:02
package org.mambo.protocol.types;
import java.util.*;
import org.mambo.protocol.enums.*;
import org.mambo.protocol.*;
import org.mambo.core.io.*;
public class InteractiveElementSkill extends NetworkType {
public static final short TYPE_ID = 219;
@Override
public short getTypeId() {
return TYPE_ID;
}
public int skillId;
public int skillInstanceUid;
public InteractiveElementSkill() { }
public InteractiveElementSkill(int skillId, int skillInstanceUid) {
this.skillId = skillId;
this.skillInstanceUid = skillInstanceUid;
}
@Override
public void serialize(Buffer buf) {
buf.writeInt(skillId);
buf.writeInt(skillInstanceUid);
}
@Override
public void deserialize(Buffer buf) {
skillId = buf.readInt();
if (skillId < 0)
throw new RuntimeException("Forbidden value on skillId = " + skillId + ", it doesn't respect the following condition : skillId < 0");
skillInstanceUid = buf.readInt();
if (skillInstanceUid < 0)
throw new RuntimeException("Forbidden value on skillInstanceUid = " + skillInstanceUid + ", it doesn't respect the following condition : skillInstanceUid < 0");
}
}
| [
"blackrushx@gmail.com"
] | blackrushx@gmail.com |
58426a534579edbde7034b1fe1ae01133fd9defc | 8540efa7e6cfbf76dedaa239d175336a92a60f5f | /sipservice/src/main/java/org/pjsip/pjsua2/pjsua_stun_use.java | c1c783d78fdcf9c5bee5f169e816c07164132fd3 | [] | no_license | wblt/wephone | cc7c705604f9926b890c1fe1a178fc6b4d76b41c | 7e9ea2e5f1422294261babb1b999658ce0c04528 | refs/heads/master | 2020-04-16T13:34:26.843227 | 2019-01-16T07:03:47 | 2019-01-16T07:03:47 | 165,633,298 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,998 | java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.10
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package org.pjsip.pjsua2;
public final class pjsua_stun_use {
public final static pjsua_stun_use PJSUA_STUN_USE_DEFAULT = new pjsua_stun_use("PJSUA_STUN_USE_DEFAULT");
public final static pjsua_stun_use PJSUA_STUN_USE_DISABLED = new pjsua_stun_use("PJSUA_STUN_USE_DISABLED");
public final static pjsua_stun_use PJSUA_STUN_RETRY_ON_FAILURE = new pjsua_stun_use("PJSUA_STUN_RETRY_ON_FAILURE");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static pjsua_stun_use swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + pjsua_stun_use.class + " with value " + swigValue);
}
private pjsua_stun_use(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private pjsua_stun_use(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private pjsua_stun_use(String swigName, pjsua_stun_use swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static pjsua_stun_use[] swigValues = { PJSUA_STUN_USE_DEFAULT, PJSUA_STUN_USE_DISABLED, PJSUA_STUN_RETRY_ON_FAILURE };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
| [
"940422068@qq.com"
] | 940422068@qq.com |
97a4db497d03859209fd725e86d158845c27009c | a2a418ea62ccb5faf9acc9f37a610dd7e9e2e32a | /projects/project_sds/cla/edg/project/sds/gen/graphquery/RequestParameter.java | 929ff271a97102ed5691d8eb04f1fe0d918a15a8 | [
"BSD-2-Clause"
] | permissive | Clariones/event-driven-generation | b5b3115629cb8ded115cd14463dcbb123ffcc9ce | f5525f5af980807a6c9983065b465f19ad6bab31 | refs/heads/master | 2021-11-12T22:31:22.171488 | 2021-03-15T09:49:52 | 2021-03-15T09:49:52 | 164,572,933 | 2 | 1 | BSD-2-Clause | 2020-07-17T02:46:35 | 2019-01-08T05:51:45 | Java | UTF-8 | Java | false | false | 2,012 | java | package cla.edg.project.sds.gen.graphquery;
import java.util.Map;
import cla.edg.modelbean.*;
public class RequestParameter extends BaseModelBean{
public String getFullClassName() {
return "com.cla.sds.requestparameter.RequestParameter";
}
// 枚举对象
// 引用的对象
public RequestElement request() {
RequestElement member = new RequestElement();
member.setModelTypeName("request_element");
member.setName("request");
member.setMemberName("request");
member.setReferDirection(true);
member.setRelationName("request");
append(member);
return member;
}
// 被引用的对象
// 普通属性
public StringAttribute id(){
StringAttribute member = new StringAttribute();
member.setModelTypeName("string");
// member.setName("id");
member.setName("id");
useMember(member);
return member;
}
public StringAttribute chineseName(){
StringAttribute member = new StringAttribute();
member.setModelTypeName("string");
// member.setName("chineseName");
member.setName("chinese_name");
useMember(member);
return member;
}
public StringAttribute englishName(){
StringAttribute member = new StringAttribute();
member.setModelTypeName("string");
// member.setName("englishName");
member.setName("english_name");
useMember(member);
return member;
}
public StringAttribute dataType(){
StringAttribute member = new StringAttribute();
member.setModelTypeName("string");
// member.setName("dataType");
member.setName("data_type");
useMember(member);
return member;
}
public NumberAttribute displayOrder(){
NumberAttribute member = new NumberAttribute();
member.setModelTypeName("int");
// member.setName("displayOrder");
member.setName("display_order");
useMember(member);
return member;
}
public NumberAttribute version(){
NumberAttribute member = new NumberAttribute();
member.setModelTypeName("int");
// member.setName("version");
member.setName("version");
useMember(member);
return member;
}
}
| [
"clariones@163.com"
] | clariones@163.com |
c9a67d2e6f574a92c433a68c3da1bedc3cc5ab66 | f20af063f99487a25b7c70134378c1b3201964bf | /appengine/src/main/java/com/dereekb/gae/model/general/time/validation/EncodedWeekSpanValidator.java | 322630e63e22ebfbf8b5ea5d52151a5a2ada3f70 | [] | no_license | dereekb/appengine | d45ad5c81c77cf3fcca57af1aac91bc73106ccbb | d0869fca8925193d5a9adafd267987b3edbf2048 | refs/heads/master | 2022-12-19T22:59:13.980905 | 2020-01-26T20:10:15 | 2020-01-26T20:10:15 | 165,971,613 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 692 | java | package com.dereekb.gae.model.general.time.validation;
import java.util.List;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import com.dereekb.gae.model.general.time.WeekSpan;
/**
* Validates an encoded {@link WeekSpan}.
*
* @author dereekb
*
*/
public class EncodedWeekSpanValidator
implements ConstraintValidator<ValidEncodedWeekSpan, List<Integer>> {
@Override
public void initialize(ValidEncodedWeekSpan constraintAnnotation) {}
@Override
public boolean isValid(List<Integer> values,
ConstraintValidatorContext context) {
// TODO: Validate input week span values.
return true;
}
}
| [
"dereekb@gmail.com"
] | dereekb@gmail.com |
0508f0e9cb38b3bcc16b08a4369f3d7144173ad1 | feba5f4eb48d3ebeeb21b02375d7f1ef13b0ba60 | /ideaworks/basic_code/day05/src/cn/day05/demo/DemoArrayArray.java | cb57bd4fd441cf607dfd95e990eda29de1426cc4 | [] | no_license | 1123762330/idea_works | 585eb009bbe4e4adcac355449ee9067ef7562c42 | 8a2bdf4bddcdf3ab7d63d3d32c93ff579c49b156 | refs/heads/master | 2022-12-21T08:47:09.217103 | 2019-12-18T04:39:06 | 2019-12-18T04:39:06 | 228,755,276 | 0 | 0 | null | 2022-12-16T04:39:35 | 2019-12-18T04:06:38 | Java | UTF-8 | Java | false | false | 530 | java | package cn.day05.demo;
public class DemoArrayArray {
public static void main(String[] args) {
int[][] arr2 = { {1,2},{3,4,5},{6,7,8,9,10} };
int sum2 = 0;
for (int i=0; i<arr2.length; i++) {//外层循环
for (int j=0; j<arr2[i].length; j++) {
System.out.print(arr2[i][j]);//输出二维数组所有数据
sum2 += arr2[i][j];//所有数据之和
}
System.out.println();
}
System.out.println("sum2= "+ sum2);
}
}
| [
"1123762330@qq.com"
] | 1123762330@qq.com |
481d247991997386a59059c8f13c2de8736de493 | cba19e890dda7f1e2c661c8b1823b5e1152143aa | /SchoolForumRoom/src/main/java/schoolforumroom/controllers/ClassesController.java | d200eb7ae7f02be30b59c01a01fbeaeff7a7abeb | [] | no_license | MyAuntIsPost90s/SchoolForum | 9bf6e813f243eda851c5df2f01dbda7ee1ade88d | 8421fbe32177ad358958b6e845a993e7f115bcde | refs/heads/master | 2021-09-08T06:43:18.231437 | 2018-03-08T01:42:34 | 2018-03-08T01:42:34 | 119,859,833 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,660 | java | package schoolforumroom.controllers;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import lingshi.web.model.RequestHolder;
import schoolforum.base.models.Classes;
import schoolforumroom.common.RandomNum;
import schoolforumroom.models.EUIPageList;
import schoolforumroom.models.EUITree;
import schoolforumroom.services.ClassesService;
@Controller
@RequestMapping("Classes")
public class ClassesController {
@Resource
private ClassesService classesService;
/**
* 单个班级
*
* @param request
* @param response
*/
@ResponseBody
@RequestMapping("Single")
public void single(HttpServletRequest request, HttpServletResponse response, String id) {
RequestHolder requestHolder = RequestHolder.get(request, response);
try {
requestHolder.success(classesService.getSingle(id));
} catch (Exception e) {
requestHolder.err("获取信息失败", e);
}
}
/**
* 班级集合
*/
@ResponseBody
@RequestMapping("List")
public void list(HttpServletRequest request, HttpServletResponse response, int page, int rows, Classes classes) {
RequestHolder requestHolder = RequestHolder.get(request, response);
try {
EUIPageList<Classes> list = classesService.getListWithPage(classes, page, rows);
requestHolder.success(list);
} catch (Exception e) {
requestHolder.err("获取集合失败", e);
}
}
/**
* 班级集合树
*/
@ResponseBody
@RequestMapping("Tree")
public void tree(HttpServletRequest request, HttpServletResponse response) {
RequestHolder requestHolder = RequestHolder.get(request, response);
try {
List<EUITree> list = classesService.getTrees();
requestHolder.success(list);
} catch (Exception e) {
requestHolder.err("获取集合失败", e);
}
}
/**
* 班级信息修改
*
* @param request
* @param response
* @param page
* @param rows
* @param users
*/
@ResponseBody
@RequestMapping("Update")
public void update(HttpServletRequest request, HttpServletResponse response, Classes classes) {
RequestHolder requestHolder = RequestHolder.get(request, response);
try {
classesService.update(classes);
requestHolder.success("操作成功");
} catch (Exception e) {
requestHolder.err("操作失败", e);
}
}
/**
* 添加
*
* @param request
* @param response
* @param majors
*/
@ResponseBody
@RequestMapping("Add")
public void add(HttpServletRequest request, HttpServletResponse response, Classes classes) {
RequestHolder requestHolder = RequestHolder.get(request, response);
try {
classes.setClassid(RandomNum.getCID());
classesService.add(classes);
requestHolder.success("操作成功");
} catch (Exception e) {
requestHolder.err("操作失败", e);
}
}
/**
* 批量删除
*
* @param request
* @param response
* @param ids
*/
@ResponseBody
@RequestMapping("BatchDelete")
public void batchDelete(HttpServletRequest request, HttpServletResponse response, @RequestBody List<String> ids) {
RequestHolder requestHolder = RequestHolder.get(request, response);
try {
classesService.delete(ids);
requestHolder.success("删除成功");
} catch (Exception e) {
requestHolder.err("删除失败", e);
}
}
}
| [
"1126670571@qq.com"
] | 1126670571@qq.com |
b386e373557e2bbbd04c80b96d076742641bb987 | fd0d65c7ee45896906e0f428df8ba24879333949 | /microblog-common/src/main/java/com/microblog/common/auth/anno/NeedAuth.java | e666e93c486b82c60afc34a9bd86c9c725790af1 | [] | no_license | lgjlife/micro-blog | d1e04e2433781e81666f78c30f18247ffde1a13a | b405ae3913eded607d8b7d2579946fbb864147ed | refs/heads/master | 2022-12-04T02:34:53.486588 | 2020-07-17T09:27:51 | 2020-07-17T09:27:51 | 170,787,235 | 29 | 17 | null | 2022-11-16T12:29:48 | 2019-02-15T02:07:09 | Java | UTF-8 | Java | false | false | 185 | java | package com.microblog.common.auth.anno;
import java.lang.annotation.*;
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface NeedAuth {
}
| [
"liang_gj17@163.com"
] | liang_gj17@163.com |
6c44d70ed6ce2955827f015b20076e3ecd1fd61d | 5148293c98b0a27aa223ea157441ac7fa9b5e7a3 | /Method_Scraping/xml_scraping/NicadOutputFile_t1_beam_new2/Nicad_t1_beam_new2577.java | 80499004bfd4eea3a12e56009b78e050edecc919 | [] | no_license | ryosuke-ku/TestCodeSeacherPlus | cfd03a2858b67a05ecf17194213b7c02c5f2caff | d002a52251f5461598c7af73925b85a05cea85c6 | refs/heads/master | 2020-05-24T01:25:27.000821 | 2019-08-17T06:23:42 | 2019-08-17T06:23:42 | 187,005,399 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 603 | java | // clone pairs:3441:90%
// 4073:beam/runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/stableinput/BufferedElements.java
public class Nicad_t1_beam_new2577
{
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Timer timer = (Timer) o;
return timerId.equals(timer.timerId)
&& window.equals(timer.window)
&& timestamp.equals(timer.timestamp)
&& timeDomain == timer.timeDomain;
}
} | [
"naist1020@gmail.com"
] | naist1020@gmail.com |
b2f9546cd8868ba0b21b47d06085746854b66a91 | f46891cca8db8bb3b4b7a1acdf4b60e50f709b0b | /thirdparty-osgi/cayenne/cayenne-1.1RC3/src/cayenne/org/objectstyle/cayenne/util/XMLEncoder.java | 8ed1847a339bc87ebebbaa3afa9b5a7339ba47b2 | [] | no_license | BackupTheBerlios/osgirepo | 7778117c9850bbde753e5a470fd546b1ed39063d | 581645f2d269a577c76c4bdc40cc01cd68bffbd3 | refs/heads/master | 2021-01-19T14:58:47.088987 | 2005-07-29T09:18:00 | 2005-07-29T09:18:00 | 40,255,705 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,815 | java | /* ====================================================================
*
* The ObjectStyle Group Software License, version 1.1
* ObjectStyle Group - http://objectstyle.org/
*
* Copyright (c) 2002-2004, Andrei (Andrus) Adamchik and individual authors
* of the software. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if any,
* must include the following acknowlegement:
* "This product includes software developed by independent contributors
* and hosted on ObjectStyle Group web site (http://objectstyle.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "ObjectStyle Group" and "Cayenne" must not be used to endorse
* or promote products derived from this software without prior written
* permission. For written permission, email
* "andrus at objectstyle dot org".
*
* 5. Products derived from this software may not be called "ObjectStyle"
* or "Cayenne", nor may "ObjectStyle" or "Cayenne" appear in their
* names without prior written permission.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE OBJECTSTYLE GROUP 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.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals and hosted on ObjectStyle Group web site. For more
* information on the ObjectStyle Group, please see
* <http://objectstyle.org/>.
*/
package org.objectstyle.cayenne.util;
import java.io.PrintWriter;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
/**
* A helper class to encode objects to XML.
*
* @since 1.1
* @author Andrei Adamchik
*/
public class XMLEncoder {
protected String indent;
protected PrintWriter out;
protected boolean indentLine;
protected int indentTimes;
public XMLEncoder(PrintWriter out) {
this.out = out;
}
public XMLEncoder(PrintWriter out, String indent) {
this.indent = indent;
this.out = out;
}
public PrintWriter getPrintWriter() {
return out;
}
public void indent(int i) {
indentTimes += i;
if (indentTimes < 0) {
indentTimes = 0;
}
}
/**
* Utility method that prints all map values,
* assuming they are XMLSerializable objects.
*/
public void print(Map map) {
Iterator it = map.entrySet().iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
((XMLSerializable) entry.getValue()).encodeAsXML(this);
}
}
/**
* Utility method that prints all map values,
* assuming they are XMLSerializable objects.
*/
public void print(Collection c) {
Iterator it = c.iterator();
while (it.hasNext()) {
((XMLSerializable) it.next()).encodeAsXML(this);
}
}
/**
* Prints a common XML element - property with name and value.
*/
public void printProperty(String name, String value) {
printIndent();
out.print("<property name=\"");
out.print(name);
out.print("\" value=\"");
out.print(value);
out.println("\"/>");
indentLine = true;
}
/**
* Prints a common XML element - property with name and value.
*/
public void printProperty(String name, boolean b) {
printProperty(name, String.valueOf(b));
}
/**
* Prints a common XML element - property with name and value.
*/
public void printProperty(String name, int i) {
printProperty(name, String.valueOf(i));
}
public void print(String text) {
printIndent();
out.print(text);
}
public void print(char c) {
printIndent();
out.print(c);
}
public void print(boolean b) {
printIndent();
out.print(b);
}
public void print(int i) {
printIndent();
out.print(i);
}
public void println(String text) {
printIndent();
out.println(text);
indentLine = true;
}
public void println(char c) {
printIndent();
out.println(c);
indentLine = true;
}
private void printIndent() {
if (indentLine) {
indentLine = false;
if (indentTimes > 0 && indent != null) {
for (int i = 0; i < indentTimes; i++) {
out.print(indent);
}
}
}
}
}
| [
"afrei"
] | afrei |
f5c886c56105480c6b8e18f98c79ce7736472bd0 | 98ef39b91b0ce5a30a72648ddf5caa31d487abb6 | /src/org/adligo/i/log/shared/I_LogFactory.java | 1b94b0b45effdee9d37325c292739c95ccf0b3a5 | [
"Apache-2.0"
] | permissive | adligo/i_log.adligo.org | ee6caed19d23dcb37ae880360590382bde680a31 | 22b7a672af510af0951ed1d8a7b6685e5e254032 | refs/heads/master | 2021-12-14T09:05:13.631214 | 2021-12-10T16:07:37 | 2021-12-10T16:07:37 | 33,228,952 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,677 | java | package org.adligo.i.log.shared;
import org.adligo.i.util.shared.I_Collection;
import org.adligo.i.util.shared.I_ImmutableMap;
/**
* I suggest synchronizeing on these methods as well
*
* @author scott
*
*/
public interface I_LogFactory {
/**
* since the apache commons logging stuff wouln't easily port to
* CLDC (cell phones), or GWT (Web Browsers JavaScript) this is my solution have a custom
* log factory api that can in turn get delegated to log4j or something
* else
*
* @param c
* @return
*/
public I_LogDelegate getLog(Class clazz);
public I_LogDelegate getLog(String name);
/**
* the name (usually classname) of this log factory
* @return
*/
public String getName();
/**
* re read config file on disk
*/
public void resetLogLevels();
/**
* most impls are not GWT in particular
* but log4j is
* @return
*/
public boolean isStaticInit();
/**
* for static init logs (log4j and utilLog)
* set the log levels for the I_LogDelegate's that were obtained
* before the static init block was called
*
* collection of ProxyLog
* @param i_proxyLogs
*/
public void setInitalLogLevels(I_Collection i_proxyLogs);
/**
* for static init logs (log4j and utilLog)
* send the log messages that were logged before the
* log delegates were set up
*
* collection of LogMessages
*
* @param i_logMessages
*/
public void sendPreInitMessages(I_Collection i_logMessages);
/**
* this is the adligo_log.properties file
* or other log file name when its loaded by the
* Log Platform
* @param props
* @param p
*/
public void setInitalLogLevels(I_ImmutableMap props, I_LogFactory p);
}
| [
"scott@adligo.com"
] | scott@adligo.com |
2b6215368464d1092690ea7d3a86be73543c8078 | 70cbaeb10970c6996b80a3e908258f240cbf1b99 | /WiFi万能钥匙dex1-dex2jar.jar.src/com/tencent/mm/sdk/a/a.java | 390cbaa84b469639f603f9f556fe5755b42322d1 | [] | no_license | nwpu043814/wifimaster4.2.02 | eabd02f529a259ca3b5b63fe68c081974393e3dd | ef4ce18574fd7b1e4dafa59318df9d8748c87d37 | refs/heads/master | 2021-08-28T11:11:12.320794 | 2017-12-12T03:01:54 | 2017-12-12T03:01:54 | 113,553,417 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,377 | java | package com.tencent.mm.sdk.a;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.tencent.mm.sdk.a.a.b;
import com.tencent.mm.sdk.b.e;
public final class a
{
public static boolean a(Context paramContext, a parama)
{
boolean bool = false;
if ((paramContext == null) || (parama == null)) {
com.tencent.mm.sdk.b.a.a("MicroMsg.SDK.MMessageAct", "send fail, invalid argument");
}
for (;;)
{
return bool;
if (e.j(parama.k))
{
com.tencent.mm.sdk.b.a.a("MicroMsg.SDK.MMessageAct", "send fail, invalid targetPkgName, targetPkgName = " + parama.k);
}
else
{
if (e.j(parama.l)) {
parama.l = (parama.k + ".wxapi.WXEntryActivity");
}
com.tencent.mm.sdk.b.a.d("MicroMsg.SDK.MMessageAct", "send, targetPkgName = " + parama.k + ", targetClassName = " + parama.l);
Intent localIntent = new Intent();
localIntent.setClassName(parama.k, parama.l);
if (parama.n != null) {
localIntent.putExtras(parama.n);
}
String str = paramContext.getPackageName();
localIntent.putExtra("_mmessage_sdkVersion", 570490883);
localIntent.putExtra("_mmessage_appPackage", str);
localIntent.putExtra("_mmessage_content", parama.m);
localIntent.putExtra("_mmessage_checksum", b.a(parama.m, 570490883, str));
if (parama.flags == -1) {
localIntent.addFlags(268435456).addFlags(134217728);
}
for (;;)
{
try
{
paramContext.startActivity(localIntent);
com.tencent.mm.sdk.b.a.d("MicroMsg.SDK.MMessageAct", "send mm message, intent=" + localIntent);
bool = true;
}
catch (Exception paramContext)
{
com.tencent.mm.sdk.b.a.a("MicroMsg.SDK.MMessageAct", "send fail, ex = %s", new Object[] { paramContext.getMessage() });
}
localIntent.setFlags(parama.flags);
}
}
}
}
public static final class a
{
public int flags = -1;
public String k;
public String l;
public String m;
public Bundle n;
}
}
/* Location: /Users/hanlian/Downloads/WiFi万能钥匙dex1-dex2jar.jar!/com/tencent/mm/sdk/a/a.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"lianh@jumei.com"
] | lianh@jumei.com |
5ecc7d4af719cb6ba25278a73500c62c57661cc5 | b1621113a49a2dbcc4a74a36a57a41a672ea3c06 | /core/server/common/src/main/java/alluxio/master/transport/GrpcMessagingServerConnection.java | 50e4c7d726cc722bb6ee996c661ccf674f8b995b | [
"LicenseRef-scancode-free-unknown",
"MIT",
"EPL-1.0",
"LicenseRef-scancode-proprietary-license",
"CC0-1.0",
"Apache-2.0",
"Unlicense",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-2-Clause",
"BSD-3-Clause",
"CC-PDDC",
"LicenseRef-scancode-public-domain"
] | permissive | alecwanggithub/alluxio | dc999f409ecade373f5318765174a4acdbe1a24f | 85fde44f76845147c2e72c2fd7fed4ec0dc672c7 | refs/heads/master | 2022-11-16T10:54:01.287267 | 2020-06-28T06:31:52 | 2020-06-28T06:31:52 | 275,471,829 | 1 | 0 | Apache-2.0 | 2020-06-28T06:31:53 | 2020-06-27T23:43:27 | null | UTF-8 | Java | false | false | 1,397 | java | /*
* The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
* (the "License"). You may not use this work except in compliance with the License, which is
* available at www.apache.org/licenses/LICENSE-2.0
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied, as more fully set forth in the License.
*
* See the NOTICE file distributed with this work for information regarding copyright ownership.
*/
package alluxio.master.transport;
import io.atomix.catalyst.concurrent.ThreadContext;
import java.util.concurrent.ExecutorService;
/**
* {@link GrpcMessagingConnection} implementation for server.
*/
public class GrpcMessagingServerConnection extends GrpcMessagingConnection {
/**
* Creates a messaging connection for server.
*
* Note: {@link #setTargetObserver} should be called explicitly before using the connection.
*
* @param transportId transport Id for this connection
* @param context copycat thread context
* @param executor transport executor
* @param requestTimeoutMs timeout in milliseconds for requests
*/
public GrpcMessagingServerConnection(String transportId, ThreadContext context,
ExecutorService executor, long requestTimeoutMs) {
super(ConnectionOwner.SERVER, transportId, context, executor, requestTimeoutMs);
}
}
| [
"bot@alluxio.com"
] | bot@alluxio.com |
bfaef03b5e402daa0e32bf7b7038dd45f7dd1399 | 573a66e4f4753cc0f145de8d60340b4dd6206607 | /JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/1438167/pmd-src-4.0/pmd-4.0/src/net/sourceforge/pmd/renderers/YAHTMLRenderer.java | bad5c8e17bf42f9b10b6a662d134fc43f83fe45f | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | mkaouer/Code-Smells-Detection-in-JavaScript | 3919ec0d445637a7f7c5f570c724082d42248e1b | 7130351703e19347884f95ce6d6ab1fb4f5cfbff | refs/heads/master | 2023-03-09T18:04:26.971934 | 2022-03-23T22:04:28 | 2022-03-23T22:04:28 | 73,915,037 | 8 | 3 | null | 2023-02-28T23:00:07 | 2016-11-16T11:47:44 | null | UTF-8 | Java | false | false | 604 | java | package net.sourceforge.pmd.renderers;
import java.io.IOException;
import java.io.Writer;
import net.sourceforge.pmd.Report;
import net.sourceforge.pmd.dfa.report.ReportHTMLPrintVisitor;
import net.sourceforge.pmd.dfa.report.ReportTree;
public class YAHTMLRenderer extends AbstractRenderer {
public void render(Writer writer, Report report) throws IOException {
ReportTree tree = report.getViolationTree();
tree.getRootNode().accept(new ReportHTMLPrintVisitor());
writer.write("<h3 align=\"center\">The HTML files are created above the project directory.</h3>");
}
}
| [
"mmkaouer@umich.edu"
] | mmkaouer@umich.edu |
33bb2804548c4b4135eabdd92a18ff8d3276702a | 5148293c98b0a27aa223ea157441ac7fa9b5e7a3 | /Method_Scraping/xml_scraping/NicadOutputFile_t1_flink_new2/Nicad_t1_flink_new25380.java | bd9f857b266300f0a8e658629a20a2b94c40227e | [] | no_license | ryosuke-ku/TestCodeSeacherPlus | cfd03a2858b67a05ecf17194213b7c02c5f2caff | d002a52251f5461598c7af73925b85a05cea85c6 | refs/heads/master | 2020-05-24T01:25:27.000821 | 2019-08-17T06:23:42 | 2019-08-17T06:23:42 | 187,005,399 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 575 | java | // clone pairs:23371:90%
// 34681:flink/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/TaskManagerLocation.java
public class Nicad_t1_flink_new25380
{
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
else if (obj != null && obj.getClass() == TaskManagerLocation.class) {
TaskManagerLocation that = (TaskManagerLocation) obj;
return this.resourceID.equals(that.resourceID) &&
this.inetAddress.equals(that.inetAddress) &&
this.dataPort == that.dataPort;
}
else {
return false;
}
}
} | [
"naist1020@gmail.com"
] | naist1020@gmail.com |
44f9587d164954bcd645189dad8fbcf36ccbf4ca | eec7bf6b543dd8b961d8bd08b506e8bb38d949ab | /src/main/java/net/sf/ehcache/event/CacheManagerEventListenerRegistry.java | f54dc7b44edd11207b8ffa6ff1db42c7533a9f21 | [] | no_license | ystory/ehcache-core-2.6.11 | 70de1feff3c321898937ee70df30dc9ce39c228c | 3d7440fe1478450b16d3ccb8ed20b303659140ce | refs/heads/master | 2022-07-25T17:34:51.803015 | 2015-03-06T15:28:38 | 2015-03-06T15:28:38 | 39,236,553 | 4 | 3 | null | 2022-06-29T19:26:06 | 2015-07-17T05:29:08 | Java | UTF-8 | Java | false | false | 7,411 | java | /**
* Copyright Terracotta, Inc.
*
* 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 net.sf.ehcache.event;
import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
import net.sf.ehcache.Status;
/**
* Registered listeners for registering and unregistering CacheManagerEventListeners and sending notifications to registrants.
* <p/>
* There is one of these per CacheManager. It is a composite listener.
*
* @author Greg Luck
* @version $Id$
* @since 1.3
*/
public class CacheManagerEventListenerRegistry implements CacheManagerEventListener {
private volatile Status status;
/**
* A Set of CacheEventListeners keyed by listener instance.
* CacheEventListener implementations that will be notified of this cache's events.
*
* @see CacheManagerEventListener
*/
private Set listeners;
/**
* Construct a new registry
*/
public CacheManagerEventListenerRegistry() {
status = Status.STATUS_UNINITIALISED;
listeners = new CopyOnWriteArraySet();
}
/**
* Adds a listener to the notification service. No guarantee is made that listeners will be
* notified in the order they were added.
*
* @param cacheManagerEventListener the listener to add. Can be null, in which case nothing happens
* @return true if the listener is being added and was not already added
*/
public final boolean registerListener(CacheManagerEventListener cacheManagerEventListener) {
if (cacheManagerEventListener == null) {
return false;
}
return listeners.add(cacheManagerEventListener);
}
/**
* Removes a listener from the notification service.
*
* @param cacheManagerEventListener the listener to remove
* @return true if the listener was present
*/
public final boolean unregisterListener(CacheManagerEventListener cacheManagerEventListener) {
return listeners.remove(cacheManagerEventListener);
}
/**
* Returns whether or not at least one cache manager event listeners has been registered.
*
* @return true if a one or more listeners have registered, otherwise false
*/
public boolean hasRegisteredListeners() {
return listeners.size() > 0;
}
/**
* Gets a Set of the listeners registered to this class
*
* @return a set of type <code>CacheManagerEventListener</code>
*/
public Set getRegisteredListeners() {
return listeners;
}
/**
* Initialises the listeners, ready to receive events.
*/
public void init() {
//init once
Iterator iterator = listeners.iterator();
while (iterator.hasNext()) {
CacheManagerEventListener cacheManagerEventListener = (CacheManagerEventListener) iterator.next();
cacheManagerEventListener.init();
}
status = Status.STATUS_ALIVE;
}
/**
* Returns the listener status.
*
* @return the status at the point in time the method is called
*/
public Status getStatus() {
return status;
}
/**
* Tell listeners to dispose themselves.
* Because this method is only ever called from a synchronized cache method, it does not itself need to be
* synchronized.
*/
public void dispose() {
Iterator iterator = listeners.iterator();
while (iterator.hasNext()) {
CacheManagerEventListener cacheManagerEventListener = (CacheManagerEventListener) iterator.next();
cacheManagerEventListener.dispose();
}
listeners.clear();
status = Status.STATUS_SHUTDOWN;
}
/**
* Called immediately after a cache has been added and activated.
* <p/>
* Note that the CacheManager calls this method from a synchronized method. Any attempt to
* call a synchronized method on CacheManager from this method will cause a deadlock.
* <p/>
* Note that activation will also cause a CacheEventListener status change notification
* from {@link net.sf.ehcache.Status#STATUS_UNINITIALISED} to
* {@link net.sf.ehcache.Status#STATUS_ALIVE}. Care should be taken on processing that
* notification because:
* <ul>
* <li>the cache will not yet be accessible from the CacheManager.
* <li>the addCaches methods which cause this notification are synchronized on the
* CacheManager. An attempt to call {@link net.sf.ehcache.CacheManager#getEhcache(String)}
* will cause a deadlock.
* </ul>
* The calling method will block until this method returns.
* <p/>
*
* @param cacheName the name of the <code>Cache</code> the operation relates to
* @see CacheEventListener
*/
public void notifyCacheAdded(String cacheName) {
Iterator iterator = listeners.iterator();
while (iterator.hasNext()) {
CacheManagerEventListener cacheManagerEventListener = (CacheManagerEventListener) iterator.next();
cacheManagerEventListener.notifyCacheAdded(cacheName);
}
}
/**
* Called immediately after a cache has been disposed and removed. The calling method will
* block until this method returns.
* <p/>
* Note that the CacheManager calls this method from a synchronized method. Any attempt to
* call a synchronized method on CacheManager from this method will cause a deadlock.
* <p/>
* Note that a {@link CacheEventListener} status changed will also be triggered. Any
* attempt from that notification to access CacheManager will also result in a deadlock.
*
* @param cacheName the name of the <code>Cache</code> the operation relates to
*/
public void notifyCacheRemoved(String cacheName) {
Iterator iterator = listeners.iterator();
while (iterator.hasNext()) {
CacheManagerEventListener cacheManagerEventListener = (CacheManagerEventListener) iterator.next();
cacheManagerEventListener.notifyCacheRemoved(cacheName);
}
}
/**
* Returns a string representation of the object. In general, the
* <code>toString</code> method returns a string that
* "textually represents" this object. The result should
* be a concise but informative representation that is easy for a
* person to read.
*
* @return a string representation of the object.
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder(" cacheManagerEventListeners: ");
for (Iterator iterator = listeners.iterator(); iterator.hasNext();) {
CacheManagerEventListener cacheManagerEventListener = (CacheManagerEventListener) iterator.next();
sb.append(cacheManagerEventListener.getClass().getName()).append(" ");
}
return sb.toString();
}
}
| [
"cruise@b9324663-ca0f-0410-8574-be9b3887307d"
] | cruise@b9324663-ca0f-0410-8574-be9b3887307d |
99f4b360a673d9d1131cbbad6c7e9a123fcfffcb | 679d3eb9e9346c32723152861040a1da89aef9ef | /src/tests/Tests_Print.java | 143d4d54b40a9d5807150366810c581fe7d2fc57 | [] | no_license | maany/ThunderBolt | 821402011b2269927cfe7fa9357847b82274c9f8 | c57d0f604ce54363f29f0014e890fe3931dd9a3f | refs/heads/master | 2021-01-10T22:11:01.733128 | 2014-03-14T17:12:31 | 2014-03-14T17:12:31 | 16,720,450 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 6,145 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package tests;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.print.*;
/**
*
* @author MAYANK
*/
public class Tests_Print extends javax.swing.JFrame implements Printable{
/**
* Creates new form Tests_Print
*/
public Tests_Print() {
initComponents();
}
/**
* 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() {
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
jButton1 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setBackground(new java.awt.Color(255, 255, 255));
jTable1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
"Title 1", "Title 2", "Title 3", "Title 4"
}
));
jScrollPane1.setViewportView(jTable1);
jButton1.setText("Print");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(73, 73, 73)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(257, 257, 257)
.addComponent(jButton1)))
.addContainerGap(92, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 253, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 27, Short.MAX_VALUE)
.addComponent(jButton1)
.addGap(20, 20, 20))
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
PrinterJob pj = PrinterJob.getPrinterJob();
pj.setPrintable(this);
if(pj.printDialog())
{
try{
pj.print();
}catch(PrinterException e)
{
e.printStackTrace();
}
}
}//GEN-LAST:event_jButton1ActionPerformed
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(Tests_Print.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(Tests_Print.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(Tests_Print.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(Tests_Print.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new Tests_Print().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable jTable1;
// End of variables declaration//GEN-END:variables
@Override
public int print(Graphics g, PageFormat pf, int page) throws PrinterException {
if (page > 0) {
return NO_SUCH_PAGE;
}
Graphics2D g2d = (Graphics2D)g;
g2d.translate(pf.getImageableX(), pf.getImageableY());
// Print the entire visible contents of a
// java.awt.Frame.
this.printAll(g2d);
return PAGE_EXISTS;
}
}
| [
"imptodefeat@gmail.com"
] | imptodefeat@gmail.com |
4360377b37d562ccac979e0e4ddcd0095c63cd95 | a8b30e3c49bcdf6db1c0994831316ccebc613dba | /is/src/main/java/com/zxtech/is/ui/team/adapter/AddBlacklistPhotoAdapter.java | 6ecfb377ca9398e4d2f55014beb92379a70d3d90 | [] | no_license | jerry5213/eai | 48d3265808397a0554c9fcb5ead91a9e3882b83e | a5b828754e65c80c86ed82782db433a64f84cea3 | refs/heads/master | 2020-03-25T17:26:29.967693 | 2018-08-09T09:19:51 | 2018-08-09T09:19:51 | 143,977,737 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,355 | java | package com.zxtech.is.ui.team.adapter;
import android.graphics.Bitmap;
import android.support.annotation.Nullable;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zxtech.is.BuildConfig;
import com.zxtech.is.R;
import com.zxtech.is.R2;
import com.zxtech.is.model.attach.Attach;
import java.util.List;
/**
* Created by syp600 on 2018/4/20.
*/
public class AddBlacklistPhotoAdapter extends BaseQuickAdapter<String, BaseViewHolder> {
public AddBlacklistPhotoAdapter(int layoutResId, @Nullable List<String> data) {
super(layoutResId, data);
}
@Override
protected void convert(BaseViewHolder helper, String item) {
helper.addOnClickListener(R.id.common_img_close).addOnClickListener(R.id.common_img_iv);
String fileType = item.substring(item.lastIndexOf(".") + 1);
switch (fileType) {
case "doc":
break;
case "xlsx":
break;
case "txt":
break;
case "pdf":
break;
case "jpg":
case "png":
Glide.with(mContext).load(item).into(((ImageView) helper.getView(R.id.common_img_iv)));
break;
}
}
}
| [
"SYP521@neuxa.com"
] | SYP521@neuxa.com |
0be14b93f6283ea66bce2516175678d6c5554df7 | 183732491ccf0693b044163c3eb9a0e657fcce94 | /phloc-commons/src/main/java/com/phloc/commons/microdom/convert/MicroTypeConverter.java | 39882897d9d06fa4cb908f4b5e0f66293d4c0e6c | [] | no_license | phlocbg/phloc-commons | 9b0d6699af33d67ee832c14e0594c97cef44c05d | 6f86abe9c4bb9f9f94fe53fc5ba149356f88a154 | refs/heads/master | 2023-04-23T22:25:52.355734 | 2023-03-31T18:09:10 | 2023-03-31T18:09:10 | 41,243,446 | 0 | 0 | null | 2022-07-01T22:17:52 | 2015-08-23T09:19:38 | Java | UTF-8 | Java | false | false | 3,857 | java | /**
* Copyright (C) 2006-2015 phloc systems
* http://www.phloc.com
* office[at]phloc[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.phloc.commons.microdom.convert;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;
import com.phloc.commons.ValueEnforcer;
import com.phloc.commons.annotations.Nonempty;
import com.phloc.commons.annotations.PresentForCodeCoverage;
import com.phloc.commons.microdom.IMicroElement;
import com.phloc.commons.typeconvert.TypeConverterException;
import com.phloc.commons.typeconvert.TypeConverterException.EReason;
/**
* A utility class for converting objects from and to {@link IMicroElement}.<br>
* The functionality is a special case of the
* {@link com.phloc.commons.typeconvert.TypeConverter} as we need a parameter
* for conversion in this case.<br>
* All converters are registered in the {@link MicroTypeConverterRegistry}.
*
* @author Philip Helger
*/
@ThreadSafe
public final class MicroTypeConverter
{
@SuppressWarnings ("unused")
@PresentForCodeCoverage
private static final MicroTypeConverter s_aInstance = new MicroTypeConverter ();
private MicroTypeConverter ()
{}
@Nullable
public static IMicroElement convertToMicroElement (@Nullable final Object aObject,
@Nonnull @Nonempty final String sTagName)
{
// Use a null namespace
return convertToMicroElement (aObject, null, sTagName);
}
@Nullable
public static IMicroElement convertToMicroElement (@Nullable final Object aObject,
@Nullable final String sNamespaceURI,
@Nonnull @Nonempty final String sTagName) throws TypeConverterException
{
ValueEnforcer.notEmpty (sTagName, "TagName");
if (aObject == null)
return null;
// Lookup converter
final Class <?> aSrcClass = aObject.getClass ();
final IMicroTypeConverter aConverter = MicroTypeConverterRegistry.getConverterToMicroElement (aSrcClass);
if (aConverter == null)
throw new TypeConverterException (aSrcClass, IMicroElement.class, EReason.NO_CONVERTER_FOUND);
// Perform conversion
final IMicroElement ret = aConverter.convertToMicroElement (aObject, sNamespaceURI, sTagName);
if (ret == null)
throw new TypeConverterException (aSrcClass, IMicroElement.class, EReason.CONVERSION_FAILED);
return ret;
}
@Nullable
public static <DSTTYPE> DSTTYPE convertToNative (@Nullable final IMicroElement aElement,
@Nonnull final Class <DSTTYPE> aDstClass) throws TypeConverterException
{
ValueEnforcer.notNull (aDstClass, "DestClass");
if (aElement == null)
return null;
// Lookup converter
final IMicroTypeConverter aConverter = MicroTypeConverterRegistry.getConverterToNative (aDstClass);
if (aConverter == null)
throw new TypeConverterException (IMicroElement.class, aDstClass, EReason.NO_CONVERTER_FOUND);
// Perform conversion
final DSTTYPE ret = aDstClass.cast (aConverter.convertToNative (aElement));
if (ret == null)
throw new TypeConverterException (IMicroElement.class, aDstClass, EReason.CONVERSION_FAILED);
return ret;
}
}
| [
"bg@phloc.com"
] | bg@phloc.com |
47926c0cf895260b91044c21bd62f9738d6248b3 | 99e267dfdc08bfd956bcc62421265eacf291480e | /javan/src/mohit/echoserver.java | be3dd5131ee6731c5c51d1e7c422022536882122 | [] | no_license | agarwalmohit43/Java-Practice | 70906101ebe31a003a3401500114303c6fa847df | 73b305da3f6777a036fc11e19b689f09d29374bf | refs/heads/master | 2021-01-19T16:45:53.028435 | 2017-09-12T12:11:41 | 2017-09-12T12:11:41 | 101,024,586 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,092 | java | package mohit;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
public class echoserver {
public static void main(String[] args)throws Exception {
ServerSocket s=null;
try{
s=new ServerSocket(10007);
}catch(Exception e){
System.out.println("can't listen on 10007");
e.printStackTrace();
}
Socket client=null;
System.out.println("listining for connection...");
try{
client=s.accept();
}catch(Exception e){
e.printStackTrace();
}
System.out.println("connected successfully");
System.out.println("listining for input..");
PrintWriter pw=new PrintWriter(client.getOutputStream(),true);
BufferedReader ip=new BufferedReader(new InputStreamReader(client.getInputStream()));
String inputline;
while((inputline=ip.readLine())!=null){
System.out.println("Server:"+inputline);
pw.println(inputline);
if(inputline.equals("Bye")){
break;
}
ip.close();
pw.close();
client.close();
s.close();
}
}
}
| [
"agarwalmohit43@gmail.com"
] | agarwalmohit43@gmail.com |
2705438a2d7e686605c7ae67a546ce0462792934 | 809b0e78d1665230a2c3df179501fd6d4f3e089a | /datastructure-amazonQuestions/datastrucuture/src/com/practise/java8/FunctionalInterfaces/ConsumerDemo.java | e2fe4f4c696a9e806fd2a0f513b37ad535ce89be | [] | no_license | vinay25788/datastructure-amazonQuestions | c4b67cbd783c9990e7335c1dce1225b4bce988a5 | 7de42100f3b70492984b98aebc9fd44dfa17a415 | refs/heads/master | 2020-05-20T04:25:02.347694 | 2020-01-19T08:23:13 | 2020-01-19T08:23:13 | 185,382,625 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 717 | java | package com.practise.java8.FunctionalInterfaces;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Consumer;import java.util.stream.Collector;
import java.util.stream.Collectors;
public class ConsumerDemo {
public static void main(String[] args) {
List<String> list = new ArrayList<>();
list.add("vinay");
list.add("kumar");
Consumer<List<String>> con =(a)->
{
System.out.println(a);
};
Integer[] ar = {1,2,3,4,5,6,7};
List<Integer> li = Arrays.asList(ar);
List<Integer> re = li.stream().filter(i->i>2).map(i->i+2).collect(Collectors.toList());
boolean re = li.stream().findAny().;
System.out.println(re);
con.accept(list);
}
}
| [
"vinay25788@gmail.com"
] | vinay25788@gmail.com |
1c17ab8d0b08cbf6648b974a5ea488008373d832 | 574afb819e32be88d299835d42c067d923f177b0 | /src/net/minecraft/client/renderer/block/model/package-info.java | ed2359135f2b6e87d8be510b584f3263c79f7de3 | [] | no_license | SleepyKolosLolya/WintWare-Before-Zamorozka | 7a474afff4d72be355e7a46a38eb32376c79ee76 | 43bff58176ec7422e826eeaf3ab8e868a0552c56 | refs/heads/master | 2022-07-30T04:20:18.063917 | 2021-04-25T18:16:01 | 2021-04-25T18:16:01 | 361,502,972 | 6 | 0 | null | null | null | null | UTF-8 | Java | false | false | 263 | java | package net.minecraft.client.renderer.block.model;
import javax.annotation.ParametersAreNonnullByDefault;
import mcp.MethodsReturnNonnullByDefault;
// $FF: synthetic class
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
interface package-info {
}
| [
"ask.neverhide@gmail.com"
] | ask.neverhide@gmail.com |
9ac0b0279dabc031af2cc65bae72a2507326b748 | 3778a2f4f2a4f3c20981d13dd5e94e1d7f6d7b5c | /sdk/src/main/java/com/sensorsdata/analytics/android/sdk/WrapperAdapterViewOnItemSelectedListener.java | 1bd5c356e52659793ac0da492b42148f1a8ae171 | [
"Apache-2.0"
] | permissive | wangzhzh/AutoTrackAppClick4 | 6d57b68a093636f0e2fd43e55eee4f345f656c34 | 3c9be69527aa3b9c594ee27f5cdb12b02d19daf6 | refs/heads/master | 2021-06-23T20:15:15.406431 | 2019-07-10T05:43:01 | 2019-07-10T05:43:01 | 146,418,531 | 4 | 3 | null | null | null | null | UTF-8 | Java | false | false | 871 | java | package com.sensorsdata.analytics.android.sdk;
import android.view.View;
import android.widget.AdapterView;
public class WrapperAdapterViewOnItemSelectedListener implements AdapterView.OnItemSelectedListener {
private AdapterView.OnItemSelectedListener source;
WrapperAdapterViewOnItemSelectedListener(AdapterView.OnItemSelectedListener source) {
this.source = source;
}
@Override
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id) {
if (source != null) {
source.onItemSelected(adapterView, view, position, id);
}
SensorsDataPrivate.trackAdapterView(adapterView, view, position);
}
@Override
public void onNothingSelected(AdapterView<?> adapterView) {
if (source != null) {
source.onNothingSelected(adapterView);
}
}
}
| [
"wangzhuozhou@sensorsdata.cn"
] | wangzhuozhou@sensorsdata.cn |
1ad0f3e1e17f139fd2dfa0fe8d4cf109b912374a | ba74038a0d3a24d93e6dbd1f166530f8cb1dd641 | /teamclock/src/java/com/fivesticks/time/calendar/DailyBinDisplayWrapper.java | 43482b5fcbc3fa2c66af4721c5f5d5470753475d | [] | no_license | ReidCarlberg/teamclock | 63ce1058c62c0a00d63a429bac275c4888ada79a | 4ac078610be86cf0902a73b1ba2a697f9dcf4e3c | refs/heads/master | 2016-09-05T23:46:28.600606 | 2009-09-18T07:25:37 | 2009-09-18T07:25:37 | 32,190,901 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,748 | java | package com.fivesticks.time.calendar;
import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Collection;
import com.fivesticks.time.settings.FstxTimeSettings;
import com.fstx.stdlib.common.simpledate.SimpleDate;
/**
* @author Reid
*
*/
public class DailyBinDisplayWrapper implements
Serializable {
private final DailyBin bin;
private static final DateFormat dateFormat = new SimpleDateFormat("h:mm a");
protected static final DateFormat monthDayFormat = new SimpleDateFormat("MM/d");
public DailyBinDisplayWrapper(final DailyBin bin) {
this.bin = bin;
}
/**
* @return
*/
public DailyBin getBin() {
return bin;
}
public String getBinRange() {
StringBuffer ret = new StringBuffer();
DateFormat df = DateFormat.getTimeInstance();
ret.append(df.format(bin.getLowerBound()));
ret.append(" - ");
ret.append(df.format(bin.getUpperBound()));
return ret.toString();
}
public String getBinLower() {
return dateFormat.format(bin.getLowerBound());
}
public String getBinUpper() {
return dateFormat.format(bin.getUpperBound());
}
public String getDayOfMonth() {
String dayOfMonth = ""
+ SimpleDate.factory.build(bin.getLowerBound()).getCalendar()
.get(Calendar.DAY_OF_MONTH);
return dayOfMonth;
}
/*
* 2006-06-28 reid needs to be using resolved date.
* pushed it down into the bin.
*/
public boolean isToday() {
return bin.isToday();
}
public String getFormattedDate() {
return SimpleDate.factory.build(bin.getLowerBound()).getMmddyyyy();
}
public boolean isSaturday() {
return SimpleDate.factory.build(bin.getLowerBound()).isSaturday();
}
public boolean isRegularDay(FstxTimeSettings settings) {
// boolean ret = false;
// /*
// * what is a regular day?
// */
//
// SimpleDate binLower = SimpleDate.factory.build(bin.getLowerBound());
//
// SimpleDate binUpper = SimpleDate.factory.build(bin.getUpperBound());
// if (binLower.getCalendar().get(Calendar.HOUR_OF_DAY) >= settings.getCalendarNormalDayStart()
// && binUpper.getCalendar().get(Calendar.HOUR_OF_DAY) < settings.getCalendarNormalDayEnds()) {
// ret = true;
// }
//RSC 2005-11-17
return true;
}
public Collection getDisplayCalendars() {
return bin.getCalendars();
}
} | [
"reidcarlberg@c917f71e-a3f3-11de-ba6e-69e41c8db662"
] | reidcarlberg@c917f71e-a3f3-11de-ba6e-69e41c8db662 |
412d65cb2fccd46e22032becfbfef67433f8aa40 | 3fb48ff486d5c9497256cbdcc6807236b80c8ed5 | /semiProject/src/SemiProject/MainForm_TreeTab.java | 5083368cc25aca01cb76048cb7d985fb32307b63 | [] | no_license | bym90/SemiProject | e2c0c7ff644976f6654376741f6a067b4542608a | 5113a060a3cdea41e7e194791ad59496308cee3b | refs/heads/master | 2020-12-25T15:18:13.498634 | 2016-10-26T01:30:41 | 2016-10-26T01:30:41 | 66,424,732 | 0 | 0 | null | null | null | null | UHC | Java | false | false | 895 | java | package SemiProject;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
class ThreeTab extends JPanel{
ThreeTab(){
JLabel l1 = new JLabel("지역");
JComboBox box1= new JComboBox();
box1.addItem("구로");
box1.addItem("안양");
box1.addItem("강남");
box1.addItem("홍대");
box1.addItem("신도림");
JLabel l2 = new JLabel("메뉴");
JComboBox box2= new JComboBox();
box2.addItem("한식");
box2.addItem("중식");
box2.addItem("양식");
box2.addItem("일식");
JTextField field = new JTextField(5);
JButton btn1 = new JButton("찾기");
JButton btn2 = new JButton("스케줄러 입력");
this.add(l1);
this.add(box1);
this.add(l2);
this.add(box2);
this.add(field);
this.add(btn1);
this.add(btn2);
}
} | [
"qodudals90@naver.com"
] | qodudals90@naver.com |
8638ac590c430571818476b61f05c41c7f012725 | d16f17f3b9d0aa12c240d01902a41adba20fad12 | /src/leetcode/leetcode24xx/leetcode2406/Solution.java | 00507f321733896cc5b30815af918ec407f2bab5 | [] | no_license | redsun9/leetcode | 79f9293b88723d2fd123d9e10977b685d19b2505 | 67d6c16a1b4098277af458849d352b47410518ee | refs/heads/master | 2023-06-23T19:37:42.719681 | 2023-06-09T21:11:39 | 2023-06-09T21:11:39 | 242,967,296 | 38 | 3 | null | null | null | null | UTF-8 | Java | false | false | 717 | java | package leetcode.leetcode24xx.leetcode2406;
import java.util.Arrays;
import java.util.Comparator;
import java.util.PriorityQueue;
public class Solution {
public int minGroups(int[][] intervals) {
int n = intervals.length;
if (n < 2) return n;
Arrays.sort(intervals, Comparator.comparingInt(x -> x[0]));
int ans = 1;
PriorityQueue<int[]> pq = new PriorityQueue<>(Comparator.comparingInt(x -> x[1]));
for (int[] interval : intervals) {
int threshold = interval[0];
while (!pq.isEmpty() && pq.peek()[1] < threshold) pq.poll();
pq.offer(interval);
ans = Math.max(ans, pq.size());
}
return ans;
}
}
| [
"mokeev.vladimir@gmail.com"
] | mokeev.vladimir@gmail.com |
d9f5df4a04c967208aec517e31e0b0764e2fbb3a | 10b7c05a76903964e412a55f155544ba29db498f | /app/app/src/main/java/com/vassar/unifiedapp/err/ProjectSubmissionException.java | 5d9ffad0476bbc7d6f96e5d4bd8709960a463f72 | [] | no_license | srikanth-vl/jenkins-flutter-test | ba678eee7c3e4dd09915d6a4d1efe5b73ec6d303 | 9835d22d88394c403c3c95955dc890826de03382 | refs/heads/master | 2023-01-31T04:32:06.109480 | 2020-02-25T12:09:22 | 2020-02-25T12:09:22 | 242,687,371 | 0 | 0 | null | 2023-01-07T22:18:34 | 2020-02-24T08:50:01 | Java | UTF-8 | Java | false | false | 447 | java | package com.vassar.unifiedapp.err;
public class ProjectSubmissionException extends UAException {
public ProjectSubmissionException(String errorCode) {
super(errorCode);
}
public ProjectSubmissionException(String errorCode, String message) {
super(errorCode, message);
}
public ProjectSubmissionException(String errorCode, String message, Throwable cause) {
super(errorCode, message, cause);
}
}
| [
"kmunshi.97@gmail.com"
] | kmunshi.97@gmail.com |
fce8acbe7f2c1545abc2cf6ef64fbc8a7c542f9d | 0c15e0d4ac6d777434001e5aa63579bfc3ee303b | /src/main/java/io/github/emtest/application/config/CloudDatabaseConfiguration.java | 1d09fa49faad5651c7ea4bb90f77b0fae53f9e18 | [] | no_license | jayasvision/EmTest | d38958260094aaaef78b21af98bbaf9e79f417ca | 6dc95273150663abe41de82b9de0a955ca31e303 | refs/heads/master | 2021-01-20T21:41:50.638805 | 2017-08-29T16:33:01 | 2017-08-29T16:33:01 | 101,783,280 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,207 | java | package io.github.emtest.application.config;
import com.github.mongobee.Mongobee;
import io.github.jhipster.config.JHipsterConstants;
import io.github.jhipster.domain.util.JSR310DateConverters.*;
import io.github.emtest.application.config.oauth2.OAuth2AuthenticationReadConverter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.Cloud;
import org.springframework.cloud.CloudException;
import org.springframework.cloud.config.java.AbstractCloudConfig;
import org.springframework.cloud.service.ServiceInfo;
import org.springframework.cloud.service.common.MongoServiceInfo;
import org.springframework.context.annotation.*;
import org.springframework.core.convert.converter.Converter;
import org.springframework.data.mongodb.MongoDbFactory;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.convert.CustomConversions;
import org.springframework.data.mongodb.core.mapping.event.ValidatingMongoEventListener;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
import java.util.ArrayList;
import java.util.List;
@Configuration
@EnableMongoRepositories("io.github.emtest.application.repository")
@Profile(JHipsterConstants.SPRING_PROFILE_CLOUD)
public class CloudDatabaseConfiguration extends AbstractCloudConfig {
private final Logger log = LoggerFactory.getLogger(CloudDatabaseConfiguration.class);
@Bean
public MongoDbFactory mongoFactory() {
return connectionFactory().mongoDbFactory();
}
@Bean
public LocalValidatorFactoryBean validator() {
return new LocalValidatorFactoryBean();
}
@Bean
public ValidatingMongoEventListener validatingMongoEventListener() {
return new ValidatingMongoEventListener(validator());
}
@Bean
public CustomConversions customConversions() {
List<Converter<?, ?>> converterList = new ArrayList<>();
converterList.add(new OAuth2AuthenticationReadConverter());
converterList.add(DateToZonedDateTimeConverter.INSTANCE);
converterList.add(ZonedDateTimeToDateConverter.INSTANCE);
return new CustomConversions(converterList);
}
@Bean
public Mongobee mongobee(MongoDbFactory mongoDbFactory, MongoTemplate mongoTemplate, Cloud cloud) {
log.debug("Configuring Cloud Mongobee");
List<ServiceInfo> matchingServiceInfos = cloud.getServiceInfos(MongoDbFactory.class);
if (matchingServiceInfos.size() != 1) {
throw new CloudException("No unique service matching MongoDbFactory found. Expected 1, found "
+ matchingServiceInfos.size());
}
MongoServiceInfo info = (MongoServiceInfo) matchingServiceInfos.get(0);
Mongobee mongobee = new Mongobee(info.getUri());
mongobee.setDbName(mongoDbFactory.getDb().getName());
mongobee.setMongoTemplate(mongoTemplate);
// package to scan for migrations
mongobee.setChangeLogsScanPackage("io.github.emtest.application.config.dbmigrations");
mongobee.setEnabled(true);
return mongobee;
}
}
| [
"jhipster-bot@users.noreply.github.com"
] | jhipster-bot@users.noreply.github.com |
64b4850c30bf6ed89815b497bbb698dc300c1edc | 601a37bda610da0f5b16dd9500618a202b7a7f0f | /cat7/app/src/main/java/jianqiang/com/mockrxjava/Callback.java | 3278ee0448f9c5ffd633fc6ce772c1296f47b216 | [
"MIT"
] | permissive | tsingtaoywm/rxjavademo | ac843fc3686111cf9aab0b87debf1ad3dd825ad9 | 817525b3c8683ea0d73fe8e3f8404c330080ff58 | refs/heads/master | 2021-01-23T15:23:18.204560 | 2017-05-02T11:51:49 | 2017-05-02T11:51:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 182 | java | package jianqiang.com.mockrxjava;
import java.util.Collections;
import java.util.List;
public interface Callback<T> {
void onSuccess(T result);
void onError(Exception e);
} | [
"16230091@qq.com"
] | 16230091@qq.com |
a42b6ee816a9a1d9a356ba873dd5315bfd601b36 | 05a03dd170dfbf873a9b73410f950f1dad3e1485 | /src/main/java/org/web3j/quorum/tx/ClientTransactionManager.java | e54560c5b7d9bab425db550c05b873df73cb84ea | [
"Apache-2.0"
] | permissive | vjrantal/web3j-quorum | c3582d9224169599af067002508f37ac71ee45c4 | 2599010697aefc25df689c412c90f06ebbc6292f | refs/heads/master | 2021-01-20T15:12:47.359309 | 2017-03-07T08:47:11 | 2017-03-07T08:47:11 | 90,733,917 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,207 | java | package org.web3j.quorum.tx;
import java.math.BigInteger;
import java.util.List;
import java.util.concurrent.ExecutionException;
import org.web3j.protocol.Web3j;
import org.web3j.protocol.core.methods.response.EthSendTransaction;
import org.web3j.protocol.exceptions.TransactionTimeoutException;
import org.web3j.quorum.Quorum;
import org.web3j.quorum.methods.request.PrivateTransaction;
import org.web3j.tx.TransactionManager;
/**
* TransactionManager implementation for using a Quorum node to transact.
*/
public class ClientTransactionManager extends TransactionManager {
private static final int SLEEP_DURATION = 1000;
private static final int ATTEMPTS = 20;
private final Quorum quorum;
private final String fromAddress;
private List<String> privateFor;
public ClientTransactionManager(
Web3j web3j, String fromAddress, List<String> privateFor,
int attempts, int sleepDuration) {
super(web3j, attempts, sleepDuration);
if (!(web3j instanceof Quorum)) {
throw new UnsupportedOperationException("Quorum quorum instance must be used");
}
this.quorum = (Quorum) web3j;
this.fromAddress = fromAddress;
this.privateFor = privateFor;
}
public ClientTransactionManager(
Web3j web3j, String fromAddress, List<String> privateFor) {
this(web3j, fromAddress, privateFor, ATTEMPTS, SLEEP_DURATION);
}
public List<String> getPrivateFor() {
return privateFor;
}
public void setPrivateFor(List<String> privateFor) {
this.privateFor = privateFor;
}
@Override
public String getFromAddress() {
return fromAddress;
}
@Override
public EthSendTransaction sendTransaction(
BigInteger gasPrice, BigInteger gasLimit, String to,
String data, BigInteger value)
throws ExecutionException, InterruptedException, TransactionTimeoutException {
PrivateTransaction transaction = new PrivateTransaction(
fromAddress, null, gasLimit, to, value, data, privateFor);
return quorum.ethSendTransaction(transaction)
.sendAsync().get();
}
}
| [
"conor10@gmail.com"
] | conor10@gmail.com |
33b225017d951b70cdac35fb495845f8d5562880 | db2ca48fffaf6689c9db439abaf9d98729548e0b | /minsu-web-ups/src/main/java/com/ziroom/minsu/ups/dao/CurrentuserRoleDao.java | 4e27237c2cfe2ff122799c894d8f26dd2d7b782f | [] | no_license | majinwen/sojourn | 46a950dbd64442e4ef333c512eb956be9faef50d | ab98247790b1951017fc7dd340e1941d5b76dc39 | refs/heads/master | 2020-03-22T07:07:05.299160 | 2018-03-18T13:45:23 | 2018-03-18T13:45:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,877 | java | package com.ziroom.minsu.ups.dao;
import com.asura.framework.dao.mybatis.base.MybatisDaoContext;
import com.ziroom.minsu.entity.sys.CurrentuserRoleEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* <p>角色测试</p>
* <p/>
* <PRE>
* <BR> 修改记录
* <BR>-----------------------------------------------
* <BR> 修改日期 修改人 修改内容
* </PRE>
*
* @author afi on 2016/3/12.
* @version 1.0
* @since 1.0
*/
@Repository("ups.currentuserRoleDao")
public class CurrentuserRoleDao {
private String SQLID="ups.currentuserRoleDao.";
@Autowired
@Qualifier("ups.MybatisDaoContext")
private MybatisDaoContext mybatisDaoContext;
/**
*
* 插入用户关系表
*
* @author afi
* @created 2016年3月12日
*
* @param currentuserRoleEntity
*/
public void insertCurrentuserRole(CurrentuserRoleEntity currentuserRoleEntity){
mybatisDaoContext.save(SQLID+"insertCurrentuserRole", currentuserRoleEntity);
}
/**
*
* 删除用户角色关系表
*
* @author afi
* @created 2016年3月12日
*
* @param userFid
*/
public void delCurrentuserRoleByUserFid(String userFid){
Map<String,Object> par = new HashMap<>();
par.put("userFid",userFid);
mybatisDaoContext.delete(SQLID + "delCurrentuserRoleByUserFid", par);
}
/**
* 根据用户fid 查询角色fid集合
* @author yd
* @created
* @param
* @return
*/
public List<String> queryRoleFidsByCurFid(String curFid){
return mybatisDaoContext.findAll(SQLID+"queryRoleFidsByCurFid",String.class,curFid);
}
}
| [
"068411Lsp"
] | 068411Lsp |
d62f97629c017a87dc9a6855c4228370b083cca6 | 745b525c360a2b15b8d73841b36c1e8d6cdc9b03 | /jun_java_plugins/jun_multicluster/doc/src_code/com/caland/common/web/springmvc/SimpleFreeMarkerView.java | 92cd7d6313763ba0356eff0d85f298f2e2e5373d | [] | no_license | wujun728/jun_java_plugin | 1f3025204ef5da5ad74f8892adead7ee03f3fe4c | e031bc451c817c6d665707852308fc3b31f47cb2 | refs/heads/master | 2023-09-04T08:23:52.095971 | 2023-08-18T06:54:29 | 2023-08-18T06:54:29 | 62,047,478 | 117 | 42 | null | 2023-08-21T16:02:15 | 2016-06-27T10:23:58 | Java | UTF-8 | Java | false | false | 3,636 | java | package com.caland.common.web.springmvc;
import java.io.IOException;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.context.ApplicationContextException;
import org.springframework.web.servlet.view.AbstractTemplateView;
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfig;
import freemarker.core.ParseException;
import freemarker.template.Configuration;
/**
* 轻量级的FreemarkerView
*
* 不支持jsp标签、不支持request、session、application等对象,可用于前台模板页面。
*/
public class SimpleFreeMarkerView extends AbstractTemplateView {
/**
* 部署路径调用名称
*/
public static final String CONTEXT_PATH = "base";
private Configuration configuration;
public void setConfiguration(Configuration configuration) {
this.configuration = configuration;
}
protected Configuration getConfiguration() {
return this.configuration;
}
/**
* 自动检测FreeMarkerConfig
*
* @return
* @throws BeansException
*/
protected FreeMarkerConfig autodetectConfiguration() throws BeansException {
try {
return (FreeMarkerConfig) BeanFactoryUtils
.beanOfTypeIncludingAncestors(getApplicationContext(),
FreeMarkerConfig.class, true, false);
} catch (NoSuchBeanDefinitionException ex) {
throw new ApplicationContextException(
"Must define a single FreeMarkerConfig bean in this web application context "
+ "(may be inherited): FreeMarkerConfigurer is the usual implementation. "
+ "This bean may be given any name.", ex);
}
}
/**
* Invoked on startup. Looks for a single FreeMarkerConfig bean to find the
* relevant Configuration for this factory.
* <p>
* Checks that the template for the default Locale can be found: FreeMarker
* will check non-Locale-specific templates if a locale-specific one is not
* found.
*
* @see freemarker.cache.TemplateCache#getTemplate
*/
protected void initApplicationContext() throws BeansException {
super.initApplicationContext();
if (getConfiguration() == null) {
FreeMarkerConfig config = autodetectConfiguration();
setConfiguration(config.getConfiguration());
}
checkTemplate();
}
/**
* Check that the FreeMarker template used for this view exists and is
* valid.
* <p>
* Can be overridden to customize the behavior, for example in case of
* multiple templates to be rendered into a single view.
*
* @throws ApplicationContextException
* if the template cannot be found or is invalid
*/
protected void checkTemplate() throws ApplicationContextException {
try {
// Check that we can get the template, even if we might subsequently
// get it again.
getConfiguration().getTemplate(getUrl());
} catch (ParseException ex) {
throw new ApplicationContextException(
"Failed to parse FreeMarker template for URL [" + getUrl()
+ "]", ex);
} catch (IOException ex) {
throw new ApplicationContextException(
"Could not load FreeMarker template for URL [" + getUrl()
+ "]", ex);
}
}
@SuppressWarnings("unchecked")
@Override
protected void renderMergedTemplateModel(Map model,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
model.put(CONTEXT_PATH, request.getContextPath());
getConfiguration().getTemplate(getUrl()).process(model,
response.getWriter());
}
}
| [
"wujun728@163.com"
] | wujun728@163.com |
63074b621a5422543b122ac8791c2de302d99b90 | 11e0c5f5f178d3f1c21b2acfc0516cbe882c4095 | /contribs/ev/src/main/java/org/matsim/contrib/ev/charging/ChargingPower.java | a6298f8e6c71aad38b10f0d4ac90c74e695fe10b | [] | no_license | matsim-org/matsim-libs | 53bd7e9afb7e64b2b43a6e17a005742d34d00351 | ed0cec62cc9f455a827801a5efa02fa4c501fda7 | refs/heads/master | 2023-09-01T15:53:30.490410 | 2023-09-01T13:02:09 | 2023-09-01T13:02:09 | 39,812,341 | 186 | 222 | null | 2023-09-14T15:50:10 | 2015-07-28T04:03:23 | Java | UTF-8 | Java | false | false | 2,242 | java | /*
* *********************************************************************** *
* project: org.matsim.*
* *********************************************************************** *
* *
* copyright : (C) 2019 by the members listed in the COPYING, *
* LICENSE and WARRANTY file. *
* email : info at matsim dot org *
* *
* *********************************************************************** *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* See also COPYING, LICENSE and WARRANTY file *
* *
* *********************************************************************** *
*/
package org.matsim.contrib.ev.charging;
import org.matsim.contrib.ev.fleet.ElectricVehicle;
import org.matsim.contrib.ev.infrastructure.ChargerSpecification;
/**
* In order to simulate charging, we only need ChargingPower (no need to implement BatteryCharging), which is easier
* to implement (and faster to compute). It works well if we simulate charging with relatively small time steps.
* <p>
* BatteryCharging extends ChargingPower and introduces methods for computing charging times/energies in a longer time
* horizon (e.g. charging time until the SoC reaches 90%, or recharged energy given 1 hour of charging).
* These additional methods are useful for instance in the eVRP context, where we need to plan charging along
* with other tasks.
*
* @author Michal Maciejewski (michalm)
*/
public interface ChargingPower {
interface Factory {
ChargingPower create(ElectricVehicle electricVehicle);
}
double calcChargingPower(ChargerSpecification charger);
}
| [
"michal.mac@gmail.com"
] | michal.mac@gmail.com |
d136bcdbe138bbe2975ce0b3b658c3b84573b08f | 4fdec25e8fb18424592d8075c1452c0ad06fe447 | /services/assets/src/main/java/com/tenio/mmorpg/assets/configurations/DatabaseConfig.java | 05f45fdb684bf9071c9271174b6cd23268c0c7d4 | [
"MIT"
] | permissive | congcoi123/tenio-mmorpg | da1f6f476bad9ab0be2c8772f32cd79c963244a4 | 2d30cf308734b1bfeb7beaddda68cc5bca9b1b74 | refs/heads/master | 2023-08-16T06:02:21.844367 | 2021-10-24T01:12:54 | 2021-10-24T01:12:54 | 420,264,581 | 6 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,700 | java | /*
The MIT License
Copyright (c) 2016-2021 kong <congcoi123@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
package com.tenio.mmorpg.assets.configurations;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.jdbc.datasource.DriverManagerDataSource;
@Configuration
@ComponentScan
public class DatabaseConfig {
@Value("${jdbc.driverClassName}")
private String driverClassName;
@Value("${jdbc.url}")
private String url;
@Value("${jdbc.username}")
private String username;
@Value("${jdbc.password}")
private String password;
@Profile("development")
@Bean
public DataSource devDatabaseConnection() {
DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setDriverClassName(driverClassName);
dataSource.setUrl(url);
dataSource.setUsername(username);
dataSource.setPassword(password);
return dataSource;
}
@Profile("testing")
@Bean
public String testDatabaseConnection() {
System.out.println("DB Connection to RDS_TEST - Low Cost Instance");
System.out.println(driverClassName);
System.out.println(url);
return "DB Connection to RDS_TEST - Low Cost Instance";
}
@Profile("production")
@Bean
public String prodDatabaseConnection() {
System.out.println("DB Connection to RDS_PROD - High Performance Instance");
System.out.println(driverClassName);
System.out.println(url);
return "DB Connection to RDS_PROD - High Performance Instance";
}
}
| [
"congcoi123@gmail.com"
] | congcoi123@gmail.com |
e4f3a6e05b56d20a72133884746513df27473884 | bfac99890aad5f43f4d20f8737dd963b857814c2 | /reg3/v1/xwiki-platform-core/xwiki-platform-office/xwiki-platform-office-test/xwiki-platform-office-test-tests/src/test/it/org/xwiki/officeimporter/test/ui/AllTests.java | c8dc41aead1aad038122a115d2b785b4530529c4 | [] | no_license | STAMP-project/dbug | 3b3776b80517c47e5cac04664cc07112ea26b2a4 | 69830c00bba4d6b37ad649aa576f569df0965c72 | refs/heads/master | 2021-01-20T03:59:39.330218 | 2017-07-12T08:03:40 | 2017-07-12T08:03:40 | 89,613,961 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,211 | java | /*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.xwiki.officeimporter.test.ui;
import org.junit.runner.RunWith;
import org.xwiki.test.ui.PageObjectSuite;
/**
* Runs all functional tests found in the classpath.
*
* @version $Id: 1428ecff8218d962d5ddbb6d5f7df2d6d8310ed6 $
* @since 7.3M1
*/
@RunWith(PageObjectSuite.class)
public class AllTests
{
}
| [
"caroline.landry@inria.fr"
] | caroline.landry@inria.fr |
e5725933f4b4997db1a4a431ab15e2d8234c0af5 | 7d56dbdef726acdef5c699a1bd2d3e777929b9cd | /src/main/java/org/yx/db/DB.java | 74cf5f4966ac9a89fc3e091b2649d9f4d25743d3 | [
"Apache-2.0"
] | permissive | HarrisonDing/sumk | 2425b837b29acd5244e0f989707ac2d0d0020546 | a20de8f8e02232c3d4b11cb9b3eefd2a3a454a19 | refs/heads/master | 2021-07-17T17:34:32.306930 | 2017-10-22T11:26:42 | 2017-10-22T11:26:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,661 | java | /**
* Copyright (C) 2016 - 2017 youtongluan.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.yx.db;
import java.sql.SQLException;
import org.yx.db.conn.ConnectionPool;
import org.yx.db.sql.Delete;
import org.yx.db.sql.Insert;
import org.yx.db.sql.Select;
import org.yx.db.sql.Update;
import org.yx.db.visit.Visitors;
/**
* ORM的入口。 本类如果使用Map做参数,map中的key一律是java字段名。<BR>
* 大小写敏感性的原则是:数据库字段大小写不敏感,java字段大小写敏感。所以本类中的参数大小写敏感
*
* @author 游夏
*
*/
public class DB {
/**
* 进行插入,如果主键是单主键,并且主键是Long类型。 可以不用显示设置主键,系统会自动生成主键<BR>
* 要执行execute方法才能生效
*
* @return
*/
public static Insert insert() {
return new Insert(Visitors.modifyVisitor);
}
/**
* 将pojo插入到数据库中<BR>
* 要执行execute方法才能生效
*
* @param pojo
* pojo对象或pojo所对应的class对象
* @return
*/
public static Insert insert(Object pojo) {
if (Class.class.isInstance(pojo)) {
return insert().tableClass((Class<?>) pojo);
}
return insert().insert(pojo);
}
/**
* 默认是局部更新,要调用fullUpdate(),才能进行全部更新。所有的更新都只能根据主键或者redis主键<BR>
* 要执行execute方法才能生效<BR>
* 如果显式指定where条件,每个条件里都必须包含所有的redis主键字段
*
* @return
*/
public static Update update() {
return new Update(Visitors.modifyVisitor);
}
/**
* 默认是局部更新,要调用fullUpdate(),才能进行全部更新。<BR>
* 要执行execute方法才能生效<BR>
* 如果显式指定where条件,每个条件里都必须包含所有的redis主键字段
*
* @param pojo
* 修改后的pojo值,如果没有显式设置where条件,那么它的条件就是数据库主键或者redis主键
* @return
*/
public static Update update(Object pojo) {
if (Class.class.isInstance(pojo)) {
return update().tableClass((Class<?>) pojo);
}
return update().updateTo(pojo);
}
public static Delete delete() {
return new Delete(Visitors.modifyVisitor);
}
/**
* 删除(包括软删除)pojo对象定义<BR>
* 要执行execute方法才能生效
*
* @param pojo
* @return
*/
public static Delete delete(Object pojo) {
if (Class.class.isInstance(pojo)) {
return delete().tableClass((Class<?>) pojo);
}
return delete().delete(pojo);
}
public static Select select() {
return new Select(Visitors.queryVisitorForORM);
}
public static Select select(Object pojo) {
if (Class.class.isInstance(pojo)) {
return select().tableClass((Class<?>) pojo);
}
return select().addEqual(pojo);
}
public static void commit() throws SQLException {
ConnectionPool.get().commit();
}
public static void rollback() throws SQLException {
ConnectionPool.get().rollback();
}
}
| [
"Administrator@youxia"
] | Administrator@youxia |
7544501d6eb7ec712b986c4b2241a204192b27b4 | 23a96a03e550ee22a14b8fe9ed2ce44b6341de18 | /examples/cardreg_55/target/generated-sources/clarion/clarion/Previewqueue.java | 174cdc6b72ad0b2fa4a404fe98bbc81a8ede904c | [] | no_license | polarisltd/jClarion | 29782a3ed0a144943c6d99dd81f6c16ef0a504d8 | 37e57590cb9cc41448fdd09fda91c9094b0dd057 | refs/heads/master | 2020-12-31T07:33:15.586952 | 2016-04-28T13:51:58 | 2016-04-28T13:55:40 | 57,305,055 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 323 | java | package clarion;
import org.jclarion.clarion.Clarion;
import org.jclarion.clarion.ClarionQueue;
import org.jclarion.clarion.ClarionString;
public class Previewqueue extends ClarionQueue
{
public ClarionString fileName=Clarion.newString(128);
public Previewqueue()
{
this.addVariable("Filename",this.fileName);
}
}
| [
"polarisltd@gmail.com"
] | polarisltd@gmail.com |
2bf560084feeefb0c6720e1b698b12b4005811a7 | 85986e4d862e6fd257eb1c3db6f6b9c82bc6c4d5 | /prjClienteSIC/src/main/java/ec/com/smx/sic/cliente/mdl/dto/id/DescuentoProveedorClasificacionID.java | faf9d9b818e32c0d43c2be7cf2eccfe210950c82 | [] | no_license | SebasBenalcazarS/RepoAngularJS | 1d60d0dec454fe4f1b1a8c434b656d55166f066f | 5c3e1d5bb4a624e30cba0d518ff0b0cda14aa92c | refs/heads/master | 2016-08-03T23:21:26.639859 | 2015-08-19T16:05:00 | 2015-08-19T16:05:00 | 40,517,374 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,117 | java | package ec.com.smx.sic.cliente.mdl.dto.id;
import java.io.Serializable;
import java.sql.Types;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import ec.com.kruger.utilitario.dao.commons.annotations.Cast;
import ec.com.kruger.utilitario.dao.commons.annotations.SequenceDataBaseValue;
import ec.com.smx.sic.cliente.common.articulo.SICArticuloConstantes;
import ec.com.smx.sic.cliente.persistencia.secuencia.DescriptorSecuenciasSIC;
/**
* Clase que encapsula a las propiedades Identificadoras de la clase DescuentoProveedorClasificacion
*
* @see ec.com.smx.sic.cliente.mdl.dto.DescuentoProveedorClasificacion
*
* @author kruger
*/
@SuppressWarnings("serial")
@Embeddable
public class DescuentoProveedorClasificacionID implements Serializable {
/**
* Codigo de la companía
*/
@Column(name = "CODIGOCOMPANIA", nullable = false)
private Integer codigoCompania;
/**
* Secuencial del descuento proveedor Clasificacion
*/
@Column(name = "SECUENCIALDESPROCLA", nullable = false)
@SequenceDataBaseValue(descriptorClass=DescriptorSecuenciasSIC.class , name = SICArticuloConstantes.SECUENCIAL_DESCUENTO_ARTICULO_PROVEEDOR_CLASIFICACION, castTo=@Cast(sqlType=Types.BIGINT))
private Long secuencialDescuentoProveedorClasificacion;
/**
* Retorna valor de propiedad <code>codigoCompania</code>
*
* @return Retorna valor de propiedad <code>codigoCompania</code>
*/
public Integer getCodigoCompania() {
return this.codigoCompania;
}
/**
* Establece un nuevo valor para la propiedad <code>codigoCompania</code>.
*
* @param codigoCompania1
* El valor a establecer para la propiedad <code>codigoCompania</code>.
*/
public void setCodigoCompania(Integer codigoCompania1) {
this.codigoCompania = codigoCompania1;
}
public Long getSecuencialDescuentoProveedorClasificacion() {
return secuencialDescuentoProveedorClasificacion;
}
public void setSecuencialDescuentoProveedorClasificacion(Long secuencialDescuentoProveedorClasificacion) {
this.secuencialDescuentoProveedorClasificacion = secuencialDescuentoProveedorClasificacion;
}
}
| [
"nbenalcazar@kruger.com.ec"
] | nbenalcazar@kruger.com.ec |
d8c9c9e3fe8e108876bf28de311d4e2fb1a438d5 | 42c82feb99d5bddbb98da54418d0251fd0476886 | /java-player/javaclient2/xdr/XdrUnion.java | f223c4c356a254a03a5da3edfec979ec40570081 | [] | no_license | buzzer/JavaPlayer | f78a4bee57145bc7eb24a882897ab690acd3fec3 | 27cfb2d1d13f3725997338812db503f7d19cac8f | refs/heads/master | 2016-09-10T14:59:11.991568 | 2011-09-05T13:06:04 | 2011-09-05T13:06:04 | 1,061,959 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 8,067 | java | /*
* Player Java Client 2 - XdrUnion.java
* Copyright (C) 2002-2006 Radu Bogdan Rusu, Maxim Batalin
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* $Id: XdrUnion.java 39 2006-02-20 22:44:57Z veedee $
*
*/
/*
* Copyright (c) 1999, 2000
* Lehrstuhl fuer Prozessleittechnik (PLT), RWTH Aachen
* D-52064 Aachen, Germany.
* All rights reserved.
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this program (see the file COPYING.LIB for more
* details); if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
package javaclient2.xdr;
import java.io.IOException;
import java.io.InvalidClassException;
/**
* The abstract base class <code>XdrUnion</code> helps (de-)serializing
* polymorphic classes. This class should not be confused with C unions in
* general. Instead <code>XdrUnion</code> is an object-oriented construct
* which helps in deploying polymorphism. For examples on how to use this,
* please take a look at the "ACPLTea Java Library" package, which is also
* available from <code>www.acplt.org/ks</code>. As a sidenote, the
* serialization scheme implemented by <code>XdrUnion</code> is only a question
* of getting used to it: after serializing the type code of the polymorphic
* class, the variant part is serialized first before the common part. This
* behaviour stems from the ACPLT C++ Communication Library and has been
* retained for compatibility reasons. As it doesn't hurt, you won't mind
* anyway.
*
* <p>To use polymorphism with XDR streams, you'll have to derive your own base
* class (let's call it <code>foo</code> from <code>XdrUnion</code>
* and implement the two methods
* {@link #xdrEncodeCommon(XdrEncodingStream)} and
* {@link #xdrDecodeCommon(XdrDecodingStream)}. Do not overwrite
* the methods xdrEncode and xdrDecode!
*
* <p>Then, in your <code>foo</code>-derived classes, like <code>bar</code>
* and <code>baz</code>, implement the other two methods
* {@link #xdrEncodeVariant(XdrEncodingStream)} and
* {@link #xdrDecodeVariant(XdrDecodingStream)}. In addition, implement
* {@link #getXdrTypeCode} to return an int, uniquely identifying your
* class. Note that this identifier only needs to be unique within the scope
* of your <code>foo</code> class.
*
* @version $Revision: 39 $ $Date: 2006-02-20 23:44:57 +0100 (Mo, 20 Feb 2006) $ $State$ $Locker$
* @author Harald Albrecht
*/
public abstract class XdrUnion implements XdrAble {
/**
* Returns the so-called type code which identifies a derived class when
* encoded or decoded. Note that the type code is not globally unique, but
* rather it is only unique within the derived classes of a direct descend
* of XdrUnion. If <code>foo</code> is derived from <code>XdrUnion</code>
* and <code>foo</code> is the base class for <code>bar</code> and
* <code>baz</code>, then the type code needs only be unique between
* <code>bar</code> and <code>baz</code>.
*
* @return Type code identifying an object's class when encoding or
* decoding the object into or from a XDR stream.
*/
public abstract int getXdrTypeCode();
/**
* Encodes -- that is: serializes -- an object into a XDR stream in
* compliance to RFC 1832.
*
* @throws OncRpcException if an ONC/RPC error occurs.
* @throws IOException if an I/O error occurs.
*/
public void xdrEncode(XdrEncodingStream xdr)
throws OncRpcException, IOException {
//
// For historial reasons (read: "for dumb and pure idiotic reasons")
// and compatibility with the ACPLT/KS C++ Communication Library we
// encode/decode the variant part *first* before encoding/decoding
// the common part.
//
xdr.xdrEncodeInt(getXdrTypeCode());
xdrEncodeVariant(xdr);
xdrEncodeCommon(xdr);
}
/**
* Decodes -- that is: deserializes -- an object from a XDR stream in
* compliance to RFC 1832.
*
* @throws OncRpcException if an ONC/RPC error occurs.
* @throws IOException if an I/O error occurs.
*/
public void xdrDecode(XdrDecodingStream xdr)
throws OncRpcException, IOException {
//
// Make sure that when deserializing this object's state that
// the stream provides state information indeed intended for this
// particular class.
//
int xdrTypeCode = xdr.xdrDecodeInt();
if ( xdrTypeCode != getXdrTypeCode() ) {
throw(new InvalidClassException(this.getClass().getName(),
"non-matching XDR type code received."));
}
//
// For historial reasons (read: "for dumb and pure idiotic reasons")
// and compatibility with the ACPLT/KS C++ Communication Library we
// encode/decode the variant part *first* before encoding/decoding
// the common part.
//
xdrDecodeVariant(xdr);
xdrDecodeCommon(xdr);
}
/**
* Encodes -- that is: serializes -- the common part of an object into
* a XDR stream in compliance to RFC 1832. Note that the common part is
* deserialized after the variant part.
*
* @throws OncRpcException if an ONC/RPC error occurs.
* @throws IOException if an I/O error occurs.
*/
public abstract void xdrEncodeCommon(XdrEncodingStream xdr)
throws OncRpcException, IOException;
/**
* Decodes -- that is: deserializes -- the common part of an object from
* a XDR stream in compliance to RFC 1832. Note that the common part is
* deserialized after the variant part.
*
* @throws OncRpcException if an ONC/RPC error occurs.
* @throws IOException if an I/O error occurs.
*/
public abstract void xdrDecodeCommon(XdrDecodingStream xdr)
throws OncRpcException, IOException;
/**
* Encodes -- that is: serializes -- the variant part of an object into
* a XDR stream in compliance to RFC 1832. Note that the variant part is
* deserialized before the common part.
*
* @throws OncRpcException if an ONC/RPC error occurs.
* @throws IOException if an I/O error occurs.
*/
public abstract void xdrEncodeVariant(XdrEncodingStream xdr)
throws OncRpcException, IOException;
/**
* Decodes -- that is: deserializes -- the variant part of an object from
* a XDR stream in compliance to RFC 1832. Note that the variant part is
* deserialized before the common part.
*
* @throws OncRpcException if an ONC/RPC error occurs.
* @throws IOException if an I/O error occurs.
*/
public abstract void xdrDecodeVariant(XdrDecodingStream xdr)
throws OncRpcException, IOException;
}
// End of XdrUnion.java
| [
"sebastianrockel@gmail.com"
] | sebastianrockel@gmail.com |
6c0bc2e4bb809a015a597c91a94bcba8bb07abf4 | c24999a8c5aef3b483a6f5ecc50c172c714d357f | /SMT/src/main/java/smt/controller/rest/FileHistoryRecordRestController.java | 53476268598bd47a0318be6af4ec20f7b973bc55 | [] | no_license | dmh-moph/SMT | 858b0c33a890b8c199416621984f82a23b8fd5c0 | 5b852648c8e4606dce9df2982cd06af634df59f2 | refs/heads/master | 2021-01-10T22:14:02.723677 | 2016-01-31T16:52:33 | 2016-01-31T16:52:33 | 24,030,782 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,551 | java | package smt.controller.rest;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.JsonNode;
import smt.auth.model.Activeuser;
import smt.auth.model.SecurityUser;
import smt.model.Situation;
import smt.service.EntityService;
import smt.webUI.DomainCountTuple;
import smt.webUI.ResponseJSend;
@RestController
@RequestMapping("/REST/FileHistoryRecord")
public class FileHistoryRecordRestController {
public static Logger logger = LoggerFactory.getLogger(FileHistoryRecordRestController.class);
@Autowired
private EntityService entityService;
@RequestMapping(value="/stat/{domain}/findHistoryCountBetween")
public Iterable<DomainCountTuple> findHistoryCountBetween(
@PathVariable String domain,
@RequestParam String start,
@RequestParam String end) {
logger.debug("domain: "+ domain);
logger.debug("start: "+ start);
logger.debug("end: "+ end);
return entityService.findHistoryCountBetween(domain, start, end);
}
}
| [
"dbuaklee@hotmail.com"
] | dbuaklee@hotmail.com |
491e57ff706c9b8284ae36f9529174e8d7c39431 | 58df55b0daff8c1892c00369f02bf4bf41804576 | /src/android/support/v13/app/FragmentTabHost.java | 996df1ddd3702eb9dd00e2b41d442307507d67c4 | [] | no_license | gafesinremedio/com.google.android.gm | 0b0689f869a2a1161535b19c77b4b520af295174 | 278118754ea2a262fd3b5960ef9780c658b1ce7b | refs/heads/master | 2020-05-04T15:52:52.660697 | 2016-07-21T03:39:17 | 2016-07-21T03:39:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,351 | java | package android.support.v13.app;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.content.Context;
import android.os.Parcelable;
import android.widget.TabHost;
import android.widget.TabHost.OnTabChangeListener;
import ei;
import java.util.ArrayList;
public final class FragmentTabHost
extends TabHost
implements TabHost.OnTabChangeListener
{
private final ArrayList<ei> a;
private Context b;
private FragmentManager c;
private int d;
private TabHost.OnTabChangeListener e;
private ei f;
private boolean g;
private final FragmentTransaction a(String paramString, FragmentTransaction paramFragmentTransaction)
{
Object localObject = null;
int i = 0;
if (i < a.size())
{
ei localei = (ei)a.get(i);
if (!a.equals(paramString)) {
break label213;
}
localObject = localei;
}
label200:
label213:
for (;;)
{
i += 1;
break;
if (localObject == null) {
throw new IllegalStateException("No tab known for tag " + paramString);
}
paramString = paramFragmentTransaction;
if (f != localObject)
{
paramString = paramFragmentTransaction;
if (paramFragmentTransaction == null) {
paramString = c.beginTransaction();
}
if ((f != null) && (f.d != null)) {
paramString.detach(f.d);
}
if (localObject != null)
{
if (d != null) {
break label200;
}
d = Fragment.instantiate(b, b.getName(), c);
paramString.add(d, d, a);
}
}
for (;;)
{
f = ((ei)localObject);
return paramString;
paramString.attach(d);
}
}
}
protected final void onAttachedToWindow()
{
super.onAttachedToWindow();
String str = getCurrentTabTag();
Object localObject1 = null;
int i = 0;
if (i < a.size())
{
ei localei = (ei)a.get(i);
d = c.findFragmentByTag(a);
Object localObject2 = localObject1;
if (d != null)
{
localObject2 = localObject1;
if (!d.isDetached())
{
if (!a.equals(str)) {
break label108;
}
f = localei;
localObject2 = localObject1;
}
}
for (;;)
{
i += 1;
localObject1 = localObject2;
break;
label108:
localObject2 = localObject1;
if (localObject1 == null) {
localObject2 = c.beginTransaction();
}
((FragmentTransaction)localObject2).detach(d);
}
}
g = true;
localObject1 = a(str, (FragmentTransaction)localObject1);
if (localObject1 != null)
{
((FragmentTransaction)localObject1).commit();
c.executePendingTransactions();
}
}
protected final void onDetachedFromWindow()
{
super.onDetachedFromWindow();
g = false;
}
protected final void onRestoreInstanceState(Parcelable paramParcelable)
{
if (!(paramParcelable instanceof FragmentTabHost.SavedState))
{
super.onRestoreInstanceState(paramParcelable);
return;
}
paramParcelable = (FragmentTabHost.SavedState)paramParcelable;
super.onRestoreInstanceState(paramParcelable.getSuperState());
setCurrentTabByTag(a);
}
protected final Parcelable onSaveInstanceState()
{
FragmentTabHost.SavedState localSavedState = new FragmentTabHost.SavedState(super.onSaveInstanceState());
a = getCurrentTabTag();
return localSavedState;
}
public final void onTabChanged(String paramString)
{
if (g)
{
FragmentTransaction localFragmentTransaction = a(paramString, null);
if (localFragmentTransaction != null) {
localFragmentTransaction.commit();
}
}
if (e != null) {
e.onTabChanged(paramString);
}
}
public final void setOnTabChangedListener(TabHost.OnTabChangeListener paramOnTabChangeListener)
{
e = paramOnTabChangeListener;
}
@Deprecated
public final void setup()
{
throw new IllegalStateException("Must call setup() that takes a Context and FragmentManager");
}
}
/* Location:
* Qualified Name: android.support.v13.app.FragmentTabHost
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
66772ff1103b9b0cad0b95654007128be9a6ed60 | 7a699656fee75c43d493497510c081093cf2de56 | /bos_parent/bos_web/src/main/java/com/hafele/bos/web/action/NoticebillAction.java | 1fe5964aee6b276bb2e3244c2c9e0155cc3f8836 | [] | no_license | wenMN1994/BOS | 715e60f8db3973203538a8e78411e58bfbadaec3 | 559abda0c8fece16a0f052c1b363298d97b6e27c | refs/heads/master | 2020-03-27T19:40:09.625215 | 2018-09-21T03:05:57 | 2018-09-21T03:05:57 | 147,004,302 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,510 | java | package com.hafele.bos.web.action;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import com.hafele.bos.domain.Noticebill;
import com.hafele.bos.service.INoticebillService;
import com.hafele.bos.web.action.base.BaseAction;
import com.hafele.crm.Customer;
import com.hafele.crm.ICustomerService;
/**
* <p>Title: NoticebillAction</p>
* <p>Description: 业务通知单管理Action</p>
* @author Dragon.Wen
* @date Aug 16, 2018
*/
@Controller
@Scope("prototype")
public class NoticebillAction extends BaseAction<Noticebill> {
/**
* serialVersionUID
*/
private static final long serialVersionUID = 76499374672299285L;
@Autowired
private INoticebillService noticebillService;
@Autowired
private ICustomerService customerServiceProxy;
/**
* <p>Title: findCustomerByTelephone</p>
* <p>Description: 调用crm服务,根据手机号码查询客户信息</p>
* @return
*/
public String findCustomerByTelephone() {
String telephone = model.getTelephone();
Customer customer = customerServiceProxy.findCustomerByTelephone(telephone);
this.java2Json(customer, new String[] {});
return NONE;
}
/**
* <p>Title: add</p>
* <p>Description: 保存业务通知单,尝试自动分单</p>
* @return
*/
public String add() {
noticebillService.save(model);
return "noticebill_add";
}
}
| [
"18475536452@163.com"
] | 18475536452@163.com |
72437a146a76299af7d3737ab67769fbe3f94246 | e22c5caebbdbbcff78b5534a38cec5799e970fc5 | /aws-java-sdk-route53/src/main/java/com/amazonaws/services/route53/model/ListTagsForResourceRequest.java | abdb0cf1c86f97040054b8030d9b1dcfac2ec61e | [
"Apache-2.0",
"JSON"
] | permissive | Cris464/aws-sdk-java | f27ee24d5ba241f94a0aa9c090f8e2c2c9067ef3 | 22474af252f3401cb8566966c53015db297280ee | refs/heads/master | 2021-01-16T20:39:17.133080 | 2015-02-11T00:43:30 | 2015-02-11T00:43:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,454 | java | /*
* Copyright 2010-2015 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.amazonaws.services.route53.model;
import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;
/**
* Container for the parameters to the {@link com.amazonaws.services.route53.AmazonRoute53#listTagsForResource(ListTagsForResourceRequest) ListTagsForResource operation}.
*
*
* @see com.amazonaws.services.route53.AmazonRoute53#listTagsForResource(ListTagsForResourceRequest)
*/
public class ListTagsForResourceRequest extends AmazonWebServiceRequest implements Serializable {
/**
* The type of the resource. The resource type for health checks is
* <code>healthcheck</code>.
* <p>
* <b>Constraints:</b><br/>
* <b>Allowed Values: </b>healthcheck
*/
private String resourceType;
/**
* The ID of the resource for which you want to retrieve tags.
* <p>
* <b>Constraints:</b><br/>
* <b>Length: </b>0 - 64<br/>
*/
private String resourceId;
/**
* The type of the resource. The resource type for health checks is
* <code>healthcheck</code>.
* <p>
* <b>Constraints:</b><br/>
* <b>Allowed Values: </b>healthcheck
*
* @return The type of the resource. The resource type for health checks is
* <code>healthcheck</code>.
*
* @see TagResourceType
*/
public String getResourceType() {
return resourceType;
}
/**
* The type of the resource. The resource type for health checks is
* <code>healthcheck</code>.
* <p>
* <b>Constraints:</b><br/>
* <b>Allowed Values: </b>healthcheck
*
* @param resourceType The type of the resource. The resource type for health checks is
* <code>healthcheck</code>.
*
* @see TagResourceType
*/
public void setResourceType(String resourceType) {
this.resourceType = resourceType;
}
/**
* The type of the resource. The resource type for health checks is
* <code>healthcheck</code>.
* <p>
* Returns a reference to this object so that method calls can be chained together.
* <p>
* <b>Constraints:</b><br/>
* <b>Allowed Values: </b>healthcheck
*
* @param resourceType The type of the resource. The resource type for health checks is
* <code>healthcheck</code>.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*
* @see TagResourceType
*/
public ListTagsForResourceRequest withResourceType(String resourceType) {
this.resourceType = resourceType;
return this;
}
/**
* The type of the resource. The resource type for health checks is
* <code>healthcheck</code>.
* <p>
* <b>Constraints:</b><br/>
* <b>Allowed Values: </b>healthcheck
*
* @param resourceType The type of the resource. The resource type for health checks is
* <code>healthcheck</code>.
*
* @see TagResourceType
*/
public void setResourceType(TagResourceType resourceType) {
this.resourceType = resourceType.toString();
}
/**
* The type of the resource. The resource type for health checks is
* <code>healthcheck</code>.
* <p>
* Returns a reference to this object so that method calls can be chained together.
* <p>
* <b>Constraints:</b><br/>
* <b>Allowed Values: </b>healthcheck
*
* @param resourceType The type of the resource. The resource type for health checks is
* <code>healthcheck</code>.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*
* @see TagResourceType
*/
public ListTagsForResourceRequest withResourceType(TagResourceType resourceType) {
this.resourceType = resourceType.toString();
return this;
}
/**
* The ID of the resource for which you want to retrieve tags.
* <p>
* <b>Constraints:</b><br/>
* <b>Length: </b>0 - 64<br/>
*
* @return The ID of the resource for which you want to retrieve tags.
*/
public String getResourceId() {
return resourceId;
}
/**
* The ID of the resource for which you want to retrieve tags.
* <p>
* <b>Constraints:</b><br/>
* <b>Length: </b>0 - 64<br/>
*
* @param resourceId The ID of the resource for which you want to retrieve tags.
*/
public void setResourceId(String resourceId) {
this.resourceId = resourceId;
}
/**
* The ID of the resource for which you want to retrieve tags.
* <p>
* Returns a reference to this object so that method calls can be chained together.
* <p>
* <b>Constraints:</b><br/>
* <b>Length: </b>0 - 64<br/>
*
* @param resourceId The ID of the resource for which you want to retrieve tags.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public ListTagsForResourceRequest withResourceId(String resourceId) {
this.resourceId = resourceId;
return this;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getResourceType() != null) sb.append("ResourceType: " + getResourceType() + ",");
if (getResourceId() != null) sb.append("ResourceId: " + getResourceId() );
sb.append("}");
return sb.toString();
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode());
hashCode = prime * hashCode + ((getResourceId() == null) ? 0 : getResourceId().hashCode());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (obj instanceof ListTagsForResourceRequest == false) return false;
ListTagsForResourceRequest other = (ListTagsForResourceRequest)obj;
if (other.getResourceType() == null ^ this.getResourceType() == null) return false;
if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false) return false;
if (other.getResourceId() == null ^ this.getResourceId() == null) return false;
if (other.getResourceId() != null && other.getResourceId().equals(this.getResourceId()) == false) return false;
return true;
}
}
| [
"aws@amazon.com"
] | aws@amazon.com |
f562217e318b3c254c56859c84bcf70c5f300862 | 0d183f64948b847e5fc04bc5d14745b2cbeb3afa | /JTree/src/com/zhangwei/parser/Rule_cmdIfLe.java | c2ff423d4ccdd90670580c8ca1dcbe43c78657d0 | [] | no_license | zhangweihust/JTree | 75c509a9bec9053564ca44a6e7f2dd785012b3f8 | a6ce3c585cdab2d4d603018d7ec856f5c9391596 | refs/heads/master | 2016-09-06T15:42:19.271640 | 2016-02-05T03:59:08 | 2016-02-05T03:59:08 | 12,106,870 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 6,982 | java | /* -----------------------------------------------------------------------------
* Rule_cmdIfLe.java
* -----------------------------------------------------------------------------
*
* Producer : com.parse2.aparse.Parser 2.3
* Produced : Mon Jan 11 14:51:33 CST 2016
*
* -----------------------------------------------------------------------------
*/
package com.zhangwei.parser;
import java.util.ArrayList;
final public class Rule_cmdIfLe extends Rule
{
private Rule_cmdIfLe(String spelling, ArrayList<Rule> rules)
{
super(spelling, rules);
}
public Object accept(Visitor visitor)
{
return visitor.visit(this);
}
public static Rule_cmdIfLe parse(ParserContext context)
{
context.push("cmdIfLe");
boolean parsed = true;
int s0 = context.index;
ArrayList<Rule> e0 = new ArrayList<Rule>();
Rule rule;
parsed = false;
if (!parsed)
{
{
ArrayList<Rule> e1 = new ArrayList<Rule>();
int s1 = context.index;
parsed = true;
if (parsed)
{
boolean f1 = true;
int c1 = 0;
for (int i1 = 0; i1 < 1 && f1; i1++)
{
rule = Rule_optPadding.parse(context);
if ((f1 = rule != null))
{
e1.add(rule);
c1++;
}
}
parsed = c1 == 1;
}
if (parsed)
{
boolean f1 = true;
int c1 = 0;
for (int i1 = 0; i1 < 1 && f1; i1++)
{
rule = Terminal_StringValue.parse(context, "if-le");
if ((f1 = rule != null))
{
e1.add(rule);
c1++;
}
}
parsed = c1 == 1;
}
if (parsed)
{
boolean f1 = true;
int c1 = 0;
for (int i1 = 0; i1 < 1 && f1; i1++)
{
rule = Rule_padding.parse(context);
if ((f1 = rule != null))
{
e1.add(rule);
c1++;
}
}
parsed = c1 == 1;
}
if (parsed)
{
boolean f1 = true;
int c1 = 0;
for (int i1 = 0; i1 < 1 && f1; i1++)
{
rule = Rule_codeRegister.parse(context);
if ((f1 = rule != null))
{
e1.add(rule);
c1++;
}
}
parsed = c1 == 1;
}
if (parsed)
{
boolean f1 = true;
int c1 = 0;
for (int i1 = 0; i1 < 1 && f1; i1++)
{
rule = Rule_listSeparator.parse(context);
if ((f1 = rule != null))
{
e1.add(rule);
c1++;
}
}
parsed = c1 == 1;
}
if (parsed)
{
boolean f1 = true;
int c1 = 0;
for (int i1 = 0; i1 < 1 && f1; i1++)
{
rule = Rule_codeRegister.parse(context);
if ((f1 = rule != null))
{
e1.add(rule);
c1++;
}
}
parsed = c1 == 1;
}
if (parsed)
{
boolean f1 = true;
int c1 = 0;
for (int i1 = 0; i1 < 1 && f1; i1++)
{
rule = Rule_listSeparator.parse(context);
if ((f1 = rule != null))
{
e1.add(rule);
c1++;
}
}
parsed = c1 == 1;
}
if (parsed)
{
boolean f1 = true;
int c1 = 0;
for (int i1 = 0; i1 < 1 && f1; i1++)
{
rule = Rule_codeLabel.parse(context);
if ((f1 = rule != null))
{
e1.add(rule);
c1++;
}
}
parsed = c1 == 1;
}
if (parsed)
{
boolean f1 = true;
int c1 = 0;
for (int i1 = 0; i1 < 1 && f1; i1++)
{
rule = Rule_optPadding.parse(context);
if ((f1 = rule != null))
{
e1.add(rule);
c1++;
}
}
parsed = c1 == 1;
}
if (parsed)
{
boolean f1 = true;
@SuppressWarnings("unused")
int c1 = 0;
for (int i1 = 0; i1 < 1 && f1; i1++)
{
int g1 = context.index;
parsed = false;
if (!parsed)
{
{
ArrayList<Rule> e2 = new ArrayList<Rule>();
int s2 = context.index;
parsed = true;
if (parsed)
{
boolean f2 = true;
int c2 = 0;
for (int i2 = 0; i2 < 1 && f2; i2++)
{
rule = Rule_padding.parse(context);
if ((f2 = rule != null))
{
e2.add(rule);
c2++;
}
}
parsed = c2 == 1;
}
if (parsed)
{
boolean f2 = true;
int c2 = 0;
for (int i2 = 0; i2 < 1 && f2; i2++)
{
rule = Rule_commentSequence.parse(context);
if ((f2 = rule != null))
{
e2.add(rule);
c2++;
}
}
parsed = c2 == 1;
}
if (parsed)
e1.addAll(e2);
else
context.index = s2;
}
}
f1 = context.index > g1;
if (parsed) c1++;
}
parsed = true;
}
if (parsed)
{
boolean f1 = true;
int c1 = 0;
for (int i1 = 0; i1 < 1 && f1; i1++)
{
rule = Rule_CRLF.parse(context);
if ((f1 = rule != null))
{
e1.add(rule);
c1++;
}
}
parsed = c1 == 1;
}
if (parsed)
e0.addAll(e1);
else
context.index = s1;
}
}
rule = null;
if (parsed)
rule = new Rule_cmdIfLe(context.text.substring(s0, context.index), e0);
else
context.index = s0;
context.pop("cmdIfLe", parsed);
return (Rule_cmdIfLe)rule;
}
}
/* -----------------------------------------------------------------------------
* eof
* -----------------------------------------------------------------------------
*/
| [
"zhangweihust@gmail.com"
] | zhangweihust@gmail.com |
5b6cb0962cdc2186768c60bca10088bbe199aff6 | fc6c869ee0228497e41bf357e2803713cdaed63e | /weixin6519android1140/src/sourcecode/com/tencent/mm/plugin/report/kvdata/SubDirInfo.java | f5767a4b36c0eca9a55189a56675fd908a881ddf | [] | no_license | hyb1234hi/reverse-wechat | cbd26658a667b0c498d2a26a403f93dbeb270b72 | 75d3fd35a2c8a0469dbb057cd16bca3b26c7e736 | refs/heads/master | 2020-09-26T10:12:47.484174 | 2017-11-16T06:54:20 | 2017-11-16T06:54:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,808 | java | package com.tencent.mm.plugin.report.kvdata;
import com.tencent.gmtrace.GMTrace;
public class SubDirInfo
extends com.tencent.mm.bm.a
{
public long dirCount_;
public long fileCount_;
public long fileLenInvalidCount;
public int tag_;
public long totalSize_;
public SubDirInfo()
{
GMTrace.i(17507763093504L, 130443);
GMTrace.o(17507763093504L, 130443);
}
protected final int a(int paramInt, Object... paramVarArgs)
{
GMTrace.i(17507897311232L, 130444);
if (paramInt == 0)
{
paramVarArgs = (b.a.a.c.a)paramVarArgs[0];
paramVarArgs.fk(1, this.tag_);
paramVarArgs.T(2, this.totalSize_);
paramVarArgs.T(3, this.dirCount_);
paramVarArgs.T(4, this.fileCount_);
paramVarArgs.T(5, this.fileLenInvalidCount);
GMTrace.o(17507897311232L, 130444);
return 0;
}
if (paramInt == 1)
{
paramInt = b.a.a.a.fh(1, this.tag_);
int i = b.a.a.a.S(2, this.totalSize_);
int j = b.a.a.a.S(3, this.dirCount_);
int k = b.a.a.a.S(4, this.fileCount_);
int m = b.a.a.a.S(5, this.fileLenInvalidCount);
GMTrace.o(17507897311232L, 130444);
return paramInt + 0 + i + j + k + m;
}
if (paramInt == 2)
{
paramVarArgs = new b.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler);
for (paramInt = com.tencent.mm.bm.a.a(paramVarArgs); paramInt > 0; paramInt = com.tencent.mm.bm.a.a(paramVarArgs)) {
if (!super.a(paramVarArgs, this, paramInt)) {
paramVarArgs.csW();
}
}
GMTrace.o(17507897311232L, 130444);
return 0;
}
if (paramInt == 3)
{
b.a.a.a.a locala = (b.a.a.a.a)paramVarArgs[0];
SubDirInfo localSubDirInfo = (SubDirInfo)paramVarArgs[1];
switch (((Integer)paramVarArgs[2]).intValue())
{
default:
GMTrace.o(17507897311232L, 130444);
return -1;
case 1:
localSubDirInfo.tag_ = locala.yqV.nj();
GMTrace.o(17507897311232L, 130444);
return 0;
case 2:
localSubDirInfo.totalSize_ = locala.yqV.nk();
GMTrace.o(17507897311232L, 130444);
return 0;
case 3:
localSubDirInfo.dirCount_ = locala.yqV.nk();
GMTrace.o(17507897311232L, 130444);
return 0;
case 4:
localSubDirInfo.fileCount_ = locala.yqV.nk();
GMTrace.o(17507897311232L, 130444);
return 0;
}
localSubDirInfo.fileLenInvalidCount = locala.yqV.nk();
GMTrace.o(17507897311232L, 130444);
return 0;
}
GMTrace.o(17507897311232L, 130444);
return -1;
}
}
/* Location: D:\tools\apktool\weixin6519android1140\jar\classes-dex2jar.jar!\com\tencent\mm\plugin\report\kvdata\SubDirInfo.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"robert0825@gmail.com"
] | robert0825@gmail.com |
346d8e1f3feff72bd2bd271c5b74d3416fbf0b66 | 3026c7b29b3f1679087eb1c1305d71b7e7b011cf | /db/src/main/java/org/solovyev/android/db/properties/PropertyByIdDbQuery.java | 4940960260efb4df4383b29ff0dc360dd815f529 | [] | no_license | HamedMP/android-common | 02ea7b714e059e1ef9224752fa5930e794bd2725 | 65c2877814803a39a5abe96bbfaafb0eaf9e9592 | refs/heads/master | 2021-01-17T05:48:29.184339 | 2013-04-14T12:47:27 | 2013-04-14T12:47:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,290 | java | /*
* Copyright 2013 serso aka se.solovyev
*
* 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.
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Contact details
*
* Email: se.solovyev@gmail.com
* Site: http://se.solovyev.org
*/
package org.solovyev.android.db.properties;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import javax.annotation.Nonnull;
import org.solovyev.android.properties.AProperty;
import org.solovyev.android.db.AbstractDbQuery;
import org.solovyev.android.db.ListMapper;
import java.util.List;
/**
* User: serso
* Date: 5/30/12
* Time: 7:24 PM
*/
public class PropertyByIdDbQuery extends AbstractDbQuery<List<AProperty>> {
@Nonnull
private String tableName;
@Nonnull
private String idColumnName;
@Nonnull
private Object id;
public PropertyByIdDbQuery(@Nonnull Context context,
@Nonnull SQLiteOpenHelper sqliteOpenHelper,
@Nonnull String tableName,
@Nonnull String idColumnName,
@Nonnull Object id) {
super(context, sqliteOpenHelper);
this.tableName = tableName;
this.idColumnName = idColumnName;
this.id = id;
}
@Nonnull
@Override
public Cursor createCursor(@Nonnull SQLiteDatabase db) {
return db.query(tableName, null, idColumnName + " = ? ", new String[]{String.valueOf(id)}, null, null, null);
}
@Nonnull
@Override
public List<AProperty> retrieveData(@Nonnull Cursor cursor) {
return new ListMapper<AProperty>(APropertyMapper.getInstance()).convert(cursor);
}
}
| [
"se.solovyev@gmail.com"
] | se.solovyev@gmail.com |
dd650a52c3a60004dc2f0d18ec1bc3a3807e9f7f | 8b4acacda36c6a252c557988edc110377148c50b | /aliyun-java-sdk-dts/src/main/java/com/aliyuncs/dts/model/v20200101/DeleteConsumerGroupRequest.java | a449a678921b36105acea1cd6b2384d85a6d5808 | [
"Apache-2.0"
] | permissive | huangbncly/aliyun-openapi-java-sdk | f8cb1bb7b124976a7ef18afd47bbd5fcb6d8ea19 | d22f77c6d5b08c720b9ce56afe22ea6e2744b03c | refs/heads/master | 2021-07-21T12:55:22.159198 | 2020-07-24T08:29:31 | 2020-07-24T08:29:31 | 199,572,334 | 0 | 0 | NOASSERTION | 2020-05-15T04:59:44 | 2019-07-30T04:07:24 | Java | UTF-8 | Java | false | false | 2,260 | java | /*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.dts.model.v20200101;
import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.http.MethodType;
/**
* @author auto create
* @version
*/
public class DeleteConsumerGroupRequest extends RpcAcsRequest<DeleteConsumerGroupResponse> {
private String consumerGroupID;
private String subscriptionInstanceId;
private String ownerId;
private String accountId;
public DeleteConsumerGroupRequest() {
super("Dts", "2020-01-01", "DeleteConsumerGroup");
setMethod(MethodType.POST);
}
public String getConsumerGroupID() {
return this.consumerGroupID;
}
public void setConsumerGroupID(String consumerGroupID) {
this.consumerGroupID = consumerGroupID;
if(consumerGroupID != null){
putQueryParameter("ConsumerGroupID", consumerGroupID);
}
}
public String getSubscriptionInstanceId() {
return this.subscriptionInstanceId;
}
public void setSubscriptionInstanceId(String subscriptionInstanceId) {
this.subscriptionInstanceId = subscriptionInstanceId;
if(subscriptionInstanceId != null){
putQueryParameter("SubscriptionInstanceId", subscriptionInstanceId);
}
}
public String getOwnerId() {
return this.ownerId;
}
public void setOwnerId(String ownerId) {
this.ownerId = ownerId;
if(ownerId != null){
putQueryParameter("OwnerId", ownerId);
}
}
public String getAccountId() {
return this.accountId;
}
public void setAccountId(String accountId) {
this.accountId = accountId;
if(accountId != null){
putQueryParameter("AccountId", accountId);
}
}
@Override
public Class<DeleteConsumerGroupResponse> getResponseClass() {
return DeleteConsumerGroupResponse.class;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
7d1584353535e8b9b13b900efada77169170a315 | 2bc2eadc9b0f70d6d1286ef474902466988a880f | /tags/mule-1.3.1/mule/core/src/main/java/org/mule/transaction/lookup/GenericTransactionManagerLookupFactory.java | 248a03df6f2a6f2582de237255ae31193061a25a | [] | no_license | OrgSmells/codehaus-mule-git | 085434a4b7781a5def2b9b4e37396081eaeba394 | f8584627c7acb13efdf3276396015439ea6a0721 | refs/heads/master | 2022-12-24T07:33:30.190368 | 2020-02-27T19:10:29 | 2020-02-27T19:10:29 | 243,593,543 | 0 | 0 | null | 2022-12-15T23:30:00 | 2020-02-27T18:56:48 | null | UTF-8 | Java | false | false | 4,194 | java | /*
* $Id$
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
*
* The software in this package is published under the terms of the MuleSource MPL
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.transaction.lookup;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.mule.config.i18n.Message;
import org.mule.config.i18n.Messages;
import org.mule.impl.container.JndiContextHelper;
import org.mule.umo.lifecycle.InitialisationException;
import org.mule.umo.manager.UMOTransactionManagerFactory;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.transaction.TransactionManager;
import java.util.Map;
/**
* A factory performing a JNDI lookup for TransactionManager. <p/> NOTE: Java EE 1.4
* specification does not mandate application server vendors to expose a
* TransactionManager for direct use, nor does it name the standard way to locate it.
* For some servers the TransactionManager is not even available in the global JNDI
* namespace, so your only bet is to run Mule in the same JVM as the application
* server.
*
* @author <a href="mailto:aperepel@gmail.com">Andrew Perepelytsya</a>
*/
public class GenericTransactionManagerLookupFactory implements UMOTransactionManagerFactory
{
protected final Log logger = LogFactory.getLog(getClass());
protected Context context;
private Map environment;
private TransactionManager txManager;
private String jndiName;
public String getJndiName()
{
return jndiName;
}
public void setJndiName(final String jndiName)
{
this.jndiName = jndiName;
}
public TransactionManager getTxManager()
{
return txManager;
}
public void setTxManager(final TransactionManager txManager)
{
this.txManager = txManager;
}
public Map getEnvironment()
{
return environment;
}
public void setEnvironment(final Map environment)
{
this.environment = environment;
}
public Context getContext()
{
return context;
}
public void setContext(final Context context)
{
this.context = context;
}
/**
* @see org.mule.umo.manager.UMOTransactionManagerFactory#create()
*/
public TransactionManager create() throws Exception
{
// implementing the Initilisable interface does not call it??
initialise();
if (txManager == null)
{
txManager = (TransactionManager)context.lookup(jndiName);
}
return txManager;
}
/**
* Method used to perform any initialisation work. If a fatal error occurs during
* initialisation an <code>InitialisationException</code> should be thrown,
* causing the Mule instance to shutdown. If the error is recoverable, say by
* retrying to connect, a <code>RecoverableException</code> should be thrown.
* There is no guarantee that by throwing a Recoverable exception that the Mule
* instance will not shut down.
*
* @throws org.mule.umo.lifecycle.InitialisationException if a fatal error occurs
* causing the Mule instance to shutdown
* @throws org.mule.umo.lifecycle.RecoverableException if an error occurs that
* can be recovered from
*/
public void initialise() throws InitialisationException
{
if (txManager == null && StringUtils.isEmpty(StringUtils.trim(jndiName)))
{
throw new InitialisationException(new Message(Messages.PROPERTIES_X_NOT_SET, "jndiName"), this);
}
try
{
if (context == null)
{
context = JndiContextHelper.initialise(getEnvironment());
}
}
catch (NamingException e)
{
throw new InitialisationException(new Message(Messages.FAILED_TO_CREATE_X, "Jndi context"), e,
this);
}
}
}
| [
"lajos@bf997673-6b11-0410-b953-e057580c5b09"
] | lajos@bf997673-6b11-0410-b953-e057580c5b09 |
61a752e55392e4e6c32e50be558e4b7966dc0430 | 254f1cd80a1252670c0f048938100def2d3c34d0 | /collect-core/src/generated/java/org/openforis/collect/persistence/jooq/tables/pojos/OfcUser.java | 7272417249d5b82afa4ecb9cab8f071526737e9a | [
"MIT"
] | permissive | AWS-BugBust-82/collect-82 | 9e3af4e049b8567783e78bc2790fc99f267372b5 | c1c71ab85717dc4799aeb0b4adf0b513f5ebcd2d | refs/heads/master | 2023-08-29T19:39:06.752636 | 2021-11-15T23:28:22 | 2021-11-15T23:28:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,482 | java | /**
* This class is generated by jOOQ
*/
package org.openforis.collect.persistence.jooq.tables.pojos;
import java.io.Serializable;
import javax.annotation.Generated;
/**
* This class is generated by jOOQ.
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.6.2"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class OfcUser implements Serializable {
private static final long serialVersionUID = -1463248731;
private Integer id;
private String username;
private String password;
private String enabled;
public OfcUser() {}
public OfcUser(OfcUser value) {
this.id = value.id;
this.username = value.username;
this.password = value.password;
this.enabled = value.enabled;
}
public OfcUser(
Integer id,
String username,
String password,
String enabled
) {
this.id = id;
this.username = username;
this.password = password;
this.enabled = enabled;
}
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
public String getUsername() {
return this.username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return this.password;
}
public void setPassword(String password) {
this.password = password;
}
public String getEnabled() {
return this.enabled;
}
public void setEnabled(String enabled) {
this.enabled = enabled;
}
}
| [
"fefrain@users.noreply.github.com"
] | fefrain@users.noreply.github.com |
9692b9358e5ec47dfb01de6ff652da2e43ae2d8b | 691a7cd2c9d35826a108a5d606741b8c9efdf300 | /osgi-container/src/main/java/com/hz/container/Utils.java | 2d157d7b275e61424f09e29b6e4c06b68b3ba0fa | [] | no_license | mp2930696631/my-osgi | 0ca8db4d976bcc1cb1c4d8dd87d640abf7915d50 | 311c548055ba44437bebf89a9dc0087fc56419bf | refs/heads/master | 2023-04-24T18:09:46.014147 | 2021-05-03T17:07:12 | 2021-05-03T17:07:12 | 363,989,733 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,798 | java | package com.hz.container;
import com.hz.container.classLoader.OsgiClassLoader;
import com.hz.container.constant.Constant;
import com.hz.container.entity.MetadataObj;
import com.hz.core.BundleContext;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
/**
* @author zehua
* @date 2021/5/3 14:53
*
* 大杂烩。。工具包
*/
public class Utils {
// 用于保存bundle jar路径-》classLoader的映射
public static Map<String, ClassLoader> bundlePathClassLoaderMap = new HashMap<>();
// 每个bundle的application.properties可能有export.package属性,这个map对象用于保存packageName-》classLoader的映射,方便根据包名获取对应的ClassLoader
public static Map<String, ClassLoader> exportPkNameClassLoaderMap = new HashMap<>();
// activator标识-》classLoader的映射,方便进行activator反射调用(activator标识=jar包的名称+,+activator 类的完全限定名)
public static Map<String, ClassLoader> activatorClassLoaderMap = new HashMap<>();
// 保存context对象
public static BundleContext bundleContext;
// 多播器
public static Multicast multicast = new Multicast();
// 自增
private static AtomicInteger atomicInteger = new AtomicInteger();
// 为每个osgiClassLoader都分配一个id
public static int getId() {
return atomicInteger.incrementAndGet();
}
// 获取jar包所在的路径
public static String getDeployPath() {
final String path =
Utils.class.getResource("").getPath();
final int i = path.lastIndexOf(Constant.MAIN_JAR_NAME);
return path.substring(Constant.PREFIX.length(), i) + Constant.DEPLOY + "/";
// idea中运行使用这个
// return "F:/zehua/test/deploy/";
}
// 获取某路径下的所有jar包的URL
public static URL[] findResourceURLs(String baseDir) throws MalformedURLException {
File file = new File(baseDir);
URL[] urls = null;
if (file.isDirectory()) {
final File[] files = file.listFiles((File dir, String name) -> name.endsWith(".jar"));
urls = new URL[files.length];
for (int i = 0; i < files.length; i++) {
urls[i] = files[i].toURI().toURL();
}
}
return urls;
}
// 获取某路径下面的所有jar包的绝对路径
public static String[] getJarsAbsPath(String baseDir) {
File file = new File(baseDir);
String[] jarsPath = null;
if (file.isDirectory()) {
final File[] files = file.listFiles((File dir, String name) -> name.endsWith(".jar"));
jarsPath = new String[files.length];
for (int i = 0; i < files.length; i++) {
jarsPath[i] = files[i].getAbsolutePath();
}
}
return jarsPath;
}
// 构建Utils.bundlePathClassLoaderMap
public static void setBundleClassLoaderMap() {
final String deployPath = getDeployPath();
try {
final URL[] resourceURLs = findResourceURLs(deployPath);
for (int i = 0; i < resourceURLs.length; i++) {
final String path = resourceURLs[i].getPath();
bundlePathClassLoaderMap.put(path, new OsgiClassLoader(resourceURLs[i]));
}
} catch (MalformedURLException e) {
e.printStackTrace();
}
}
// 解析bundle的resources/META_INF/MANIFEST.MF文件
public static void resolveMetadata(Map<String, ClassLoader> bundleClassLoaderMap) {
final String deployPath = getDeployPath();
try {
final URL[] resourceURLs = findResourceURLs(deployPath);
for (int i = 0; i < resourceURLs.length; i++) {
String jarPath = resourceURLs[i].getPath().substring(1);
final OsgiClassLoader classLoader = (OsgiClassLoader) bundleClassLoaderMap.get(resourceURLs[i].getPath());
doResolveMetadata(classLoader, jarPath);
}
} catch (Exception e) {
e.printStackTrace();
}
}
// 解析bundle的resources/META_INF/MANIFEST.MF文件
public static void doResolveMetadata(OsgiClassLoader osgiClassLoader, String jarPath) throws IOException {
JarFile jarFile = new JarFile(jarPath);
final Enumeration<JarEntry> entries = jarFile.entries();
while (entries.hasMoreElements()) {
final JarEntry jarEntry = entries.nextElement();
jarEntry.clone();
if (jarEntry.getName().endsWith(Constant.APPLICATION_PROPERTIES)) {
final InputStream inputStream = jarFile.getInputStream(jarEntry);
Properties properties = new Properties();
properties.load(inputStream);
inputStream.close();
MetadataObj metadataObj = new MetadataObj(jarPath);
// import.package解析
final String importPk = properties.getProperty(Constant.IMPORT_PACKAGE);
if (importPk != null) {
final String[] importPks = importPk.split(",");
final ArrayList<String> importPkList = arrayToList(importPks);
metadataObj.setImportPkNames(importPkList);
}
// export.package解析
final String exportPk = properties.getProperty(Constant.EXPORT_PACKAGE);
if (exportPk != null) {
final String[] exportPks = exportPk.split(",");
final ArrayList<String> exportPkList = arrayToList(exportPks);
metadataObj.setExportPkName(exportPkList);
for (int i = 0; i < exportPks.length; i++) {
exportPkNameClassLoaderMap.put(exportPks[i], osgiClassLoader);
}
}
osgiClassLoader.setMetadataObj(metadataObj);
// activator.class解析
final String activatorClassName = properties.getProperty(Constant.ACTIVATOR_CLASS);
String jarName = jarPath.substring(jarPath.lastIndexOf("/") + 1);
activatorClassLoaderMap.put(jarName + "," + activatorClassName, osgiClassLoader);
break;
}
}
jarFile.close();
}
private static ArrayList<String> arrayToList(String[] strs) {
ArrayList<String> al = new ArrayList<>();
for (int i = 0; i < strs.length; i++) {
al.add(strs[i]);
}
return al;
}
}
| [
"891393221@qq.com"
] | 891393221@qq.com |
f8b5dd1be126619e92c9024eb80f502184bf106a | 09b9ef9f4d622d8c4aedb82be4d520f92a683d0f | /net.sf.anathema.view.valuelist/src/net/sf/anathema/view/valuelist/UpdateRunnable.java | 0ecb1b02befa7064443085648b93bf48b7a1d2c7 | [] | no_license | anathema/anathema-rcp | a10491b7b3eae5d6cce2c7eb480110f741a86dd4 | 558a47659a96a7065ab703d43740a353b43e96de | refs/heads/master | 2020-02-26T14:50:50.304707 | 2009-10-20T11:12:27 | 2009-10-20T11:12:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 690 | java | package net.sf.anathema.view.valuelist;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import net.sf.anathema.lib.ui.IUpdatable;
public final class UpdateRunnable implements Runnable {
private List<IUpdatable> allUpdateable = new ArrayList<IUpdatable>();
public UpdateRunnable(IUpdatable... updateable) {
addUpdatables(updateable);
}
public void addUpdatables(IUpdatable... updateable) {
allUpdateable.addAll(Arrays.asList(updateable));
}
@Override
public void run() {
for (IUpdatable updateable : this.allUpdateable) {
if (updateable != null) {
updateable.update();
}
}
}
} | [
"sandra.sieroux@googlemail.com"
] | sandra.sieroux@googlemail.com |
39d1e48b4aed81a77d4cab66ec41bdef262e7806 | 47f8932482882af4ccd06262c7b33eb938935245 | /opencga-storage/opencga-storage-hadoop/opencga-storage-hadoop-core/src/main/java/org/opencb/opencga/storage/hadoop/variant/index/IndexUtils.java | d3016d51db47c7f5d7d2645bed5c65e81431874c | [
"Apache-2.0"
] | permissive | drfranknlee/opencga | 8eae1f3bce04997bbde61e17a2a8bab95e22b480 | 2798031b3e0f9ba849054c9f95fbcc80c18863eb | refs/heads/master | 2023-08-24T07:43:28.947806 | 2021-09-30T02:31:03 | 2021-09-30T02:31:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,560 | java | package org.opencb.opencga.storage.hadoop.variant.index;
import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.phoenix.schema.types.PUnsignedInt;
import org.opencb.opencga.storage.core.variant.adaptors.VariantQueryException;
import org.opencb.opencga.storage.hadoop.variant.index.core.RangeIndexField;
import org.opencb.opencga.storage.hadoop.variant.index.family.GenotypeCodec;
/**
* Created on 01/02/19.
*
* @author Jacobo Coll <jacobo167@gmail.com>
*/
public final class IndexUtils {
public static final byte EMPTY_MASK = 0;
private IndexUtils() {
}
public static String byteToString(byte b) {
return binaryToString(b, Byte.SIZE);
}
public static String bytesToString(byte[] bytes) {
StringBuilder sb = new StringBuilder("[ ");
for (int i = 0; i < bytes.length; i++) {
byte b = bytes[i];
sb.append(byteToString(b));
sb.append(" , ");
}
return sb.append(" ]").toString();
}
public static String shortToString(short s) {
return binaryToString(s, Short.SIZE);
}
public static String intToString(int i) {
return binaryToString(i, Integer.SIZE);
}
public static String binaryToString(int number, int bits) {
String str = Integer.toBinaryString(number);
if (str.length() > bits) {
str = str.substring(str.length() - bits);
}
return StringUtils.leftPad(str, bits, '0');
}
public static String maskToString(byte[] maskAndIndex) {
return maskToString(maskAndIndex[0], maskAndIndex[1]);
}
/**
* Merge the mask and the index into one single string.
*
* Mask : 00101110
* Index : 00100100
* Result : **1*010*
*
* @param mask Mask
* @param index Index
* @return String representation
*/
public static String maskToString(byte mask, byte index) {
String maskStr = byteToString(mask);
String indexStr = byteToString(index);
StringBuilder sb = new StringBuilder(8);
for (int i = 0; i < 8; i++) {
if (maskStr.charAt(i) == '1') {
sb.append(indexStr.charAt(i));
} else {
sb.append('*');
}
}
return sb.toString();
}
public static boolean testParentsGenotypeCode(byte parentsCode, boolean[] fatherFilter, boolean[] motherFilter) {
byte[] split = GenotypeCodec.split(parentsCode);
return fatherFilter[split[0]] && motherFilter[split[1]];
}
public static String parentFilterToString(boolean[] filter) {
StringBuilder sb = new StringBuilder();
for (boolean b : filter) {
sb.append(b ? "1" : "0");
}
return sb.toString();
}
public static boolean testIndex(byte indexValue, byte indexMask, byte indexFilter) {
return (indexValue & indexMask) == indexFilter;
}
public static boolean testIndexAny(byte indexValue, byte indexMask) {
return indexMask == 0 || (indexValue & indexMask) != 0;
}
public static boolean testIndexAny(short indexValue, short indexMask) {
return indexMask == 0 || (indexValue & indexMask) != 0;
}
public static boolean testIndexAny(int indexValue, int indexMask) {
return indexMask == 0 || (indexValue & indexMask) != 0;
}
public static boolean testIndexAny(byte[] index, int indexPosition, short indexMask) {
return (Bytes.toShort(index, indexPosition * Short.BYTES, Short.BYTES) & indexMask) != 0;
}
/**
* Check if an index can be used given an Operator and a Value.
*
* <code>
* -----------=========== --> Index covering
* 0000000000011111111111 --> Index values
*
* Operator "="
* -----------xxxxxQxxxxx --> Positive index covers partially
* xxxxxQxxxxx----------- --> Negated index covers partially
*
* Operator "<"
* QQQQQQxxxxx----------- --> Negated index covers partially.
* QQQQQQQQQQQ######----- --> Can not use index!
*
* Operator ">"
* -----------xxxQQQQQQQQ --> Positive index covers partially.
* -----######QQQQQQQQQQQ --> Can not use index!
*
* = : Values where the index filter is true
* Q : Requested values
* x : Extra returned values
* # : Requested but missing values. Invalid index if any
* </code>
*
*
* @param op Query operator
* @param value Query value
* @param indexThreshold Index threshold
* @return Null if the index can not be applied. True or False to indicate how to use the index.
*/
public static Boolean intersectIndexGreaterThan(String op, double value, double indexThreshold) {
switch (op) {
case "":
case "=":
case "==":
if (value > indexThreshold) {
return Boolean.TRUE;
} else {
return Boolean.FALSE;
}
case "<=":
case "<<=":
// No need to add DELTA to value, as the index negated is already covering the "<=" operator
case "<":
case "<<":
if (value <= indexThreshold) {
return Boolean.FALSE;
} else {
return null;
}
case ">=":
case ">>=":
// Index is using operator ">". To use ">=" operator, need to subtract a DELTA to the value
value -= RangeIndexField.DELTA;
case ">":
case ">>":
if (value >= indexThreshold) {
return Boolean.TRUE;
} else {
return null;
}
default:
throw new VariantQueryException("Unknown query operator" + op);
}
}
public static byte[] countPerBitToBytes(int[] counts) {
byte[] bytes = new byte[8 * Bytes.SIZEOF_INT];
int offset = 0;
for (int count : counts) {
offset += PUnsignedInt.INSTANCE.getCodec().encodeInt(count, bytes, offset);
}
return bytes;
}
public static int[] countPerBitToObject(byte[] bytes) {
return countPerBitToObject(bytes, 0, bytes.length);
}
public static int[] countPerBitToObject(byte[] bytes, int offset, int length) {
int[] counts = new int[8];
for (int i = 0; i < counts.length; i++) {
counts[i] = Bytes.toInt(bytes, offset);
offset += Bytes.SIZEOF_INT;
}
return counts;
}
public static int[] countPerBit(byte[] bytes) {
int[] counts = new int[8];
for (byte b : bytes) {
counts[0] += (b >>> 0) & 1;
counts[1] += (b >>> 1) & 1;
counts[2] += (b >>> 2) & 1;
counts[3] += (b >>> 3) & 1;
counts[4] += (b >>> 4) & 1;
counts[5] += (b >>> 5) & 1;
counts[6] += (b >>> 6) & 1;
counts[7] += (b >>> 7) & 1;
}
return counts;
}
public static int getByte1(int v) {
return v & 0xFF;
}
public static int getByte2(int v) {
return getByte1(v >> Byte.SIZE);
}
public static int log2(int i) {
return 31 - Integer.numberOfLeadingZeros(i);
}
}
| [
"jacobo167@gmail.com"
] | jacobo167@gmail.com |
a536f678fa8760242cc04035eb3147199dd468b1 | ca030864a3a1c24be6b9d1802c2353da4ca0d441 | /classes10.dex_source_from_JADX/com/facebook/instantshopping/view/widget/media/TiltToPanPlugin.java | a98ffa068306e22f857ad8b23fa79837fe4d5fb8 | [] | no_license | pxson001/facebook-app | 87aa51e29195eeaae69adeb30219547f83a5b7b1 | 640630f078980f9818049625ebc42569c67c69f7 | refs/heads/master | 2020-04-07T20:36:45.758523 | 2018-03-07T09:04:57 | 2018-03-07T09:04:57 | 124,208,458 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,417 | java | package com.facebook.instantshopping.view.widget.media;
import android.animation.Animator;
import android.animation.Animator.AnimatorListener;
import android.graphics.Point;
import android.graphics.Rect;
import android.net.Uri;
import android.view.Display;
import android.view.WindowManager;
import com.facebook.common.callercontext.CallerContext;
import com.facebook.richdocument.view.transition.ViewLayout;
import com.facebook.richdocument.view.widget.RichDocumentImageView;
import com.facebook.richdocument.view.widget.media.MediaFrame;
import com.facebook.richdocument.view.widget.media.plugins.BaseMediaFramePlugin;
/* compiled from: SERVER_ERROR */
public class TiltToPanPlugin extends BaseMediaFramePlugin<Void> {
public MediaFrame f23945a;
public RichDocumentImageView f23946b;
public TiltToPanDraweeView f23947c;
private final Display f23948d;
public final Point f23949e;
public boolean f23950f = false;
/* compiled from: SERVER_ERROR */
public class C34321 implements AnimatorListener {
final /* synthetic */ TiltToPanPlugin f23944a;
public C34321(TiltToPanPlugin tiltToPanPlugin) {
this.f23944a = tiltToPanPlugin;
}
public void onAnimationStart(Animator animator) {
}
public void onAnimationEnd(Animator animator) {
this.f23944a.f23950f = true;
}
public void onAnimationCancel(Animator animator) {
}
public void onAnimationRepeat(Animator animator) {
}
}
public TiltToPanPlugin(MediaFrame mediaFrame) {
super(mediaFrame);
this.f23945a = mediaFrame;
this.f23946b = (RichDocumentImageView) this.f23945a.b().findViewById(2131563004);
this.f23947c = (TiltToPanDraweeView) this.f23945a.b().findViewById(2131563257);
this.f23948d = ((WindowManager) getContext().getSystemService("window")).getDefaultDisplay();
this.f23949e = new Point();
this.f23948d.getSize(this.f23949e);
}
public final void m25218a() {
if (this.f23947c != null) {
Object obj;
if (this.f23946b.getMediaAspectRatio() > ((float) this.f23949e.x) / ((float) this.f23949e.y)) {
obj = 1;
} else {
obj = null;
}
if (obj != null && !this.f23950f) {
this.f23947c.m25217b(Uri.parse("https://lookaside.facebook.com/assets/519288584920644/"), CallerContext.a(getClass()));
if (this.f23947c != null) {
this.f23947c.setAlpha(1.0f);
this.f23947c.setVisibility(0);
this.f23947c.animate().alpha(0.0f).setDuration(3000);
this.f23947c.animate().setListener(new C34321(this));
}
this.f23947c.setVisibility(0);
}
}
}
public final void m25220k() {
if (this.f23947c != null) {
this.f23947c.setVisibility(8);
this.f23950f = false;
}
}
public final void m25219a(ViewLayout viewLayout) {
if (this.f23947c != null) {
this.f23945a.a(this.f23947c, new Rect((this.f23949e.x - this.f23947c.getMeasuredWidth()) / 2, (this.f23949e.y - this.f23947c.getMeasuredHeight()) / 2, (this.f23949e.x + this.f23947c.getMeasuredWidth()) / 2, (this.f23949e.y + this.f23947c.getMeasuredHeight()) / 2));
}
}
}
| [
"son.pham@jmango360.com"
] | son.pham@jmango360.com |
ecb744c59cd71dfe7cbc429826055dc666fdc79b | 4277f4cf6dbace9c7743d1cd280e61789f6f96a1 | /java/com/polis/gameserver/model/zone/type/L2LandingZone.java | 3a5a4d796acec4c6069fe55957cc06e6a4d23309 | [] | no_license | polis77/polis_server_h5 | cad220828de29e5b5a2267e2870095145d56179d | 7e8789baa7255065962b5fdaa1aa7f379d74ff84 | refs/heads/master | 2021-01-23T21:53:34.935991 | 2017-02-25T07:35:03 | 2017-02-25T07:35:03 | 83,112,850 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,379 | java | /*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server 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 com.polis.gameserver.model.zone.type;
import com.polis.gameserver.model.actor.L2Character;
import com.polis.gameserver.model.zone.L2ZoneType;
import com.polis.gameserver.model.zone.ZoneId;
/**
* A landing zone
* @author Kerberos
*/
public class L2LandingZone extends L2ZoneType
{
public L2LandingZone(int id)
{
super(id);
}
@Override
protected void onEnter(L2Character character)
{
if (character.isPlayer())
{
character.setInsideZone(ZoneId.LANDING, true);
}
}
@Override
protected void onExit(L2Character character)
{
if (character.isPlayer())
{
character.setInsideZone(ZoneId.LANDING, false);
}
}
}
| [
"policelazo@gmail.com"
] | policelazo@gmail.com |
a99b470c283843ab024b66336243d01c9807a9ab | 1031a2b073b83fe665ebda716e9a8b97378f6bcf | /ch11/src/sec15/SimpleDateFormatExample.java | d4acbad4774dd8bfcb2dfdd65f6c051522c5e637 | [] | no_license | nya49/Java-Lecture | 7f0cc70c9ec140e97f8823f60c9491bf76c4560d | 90777656f6acdc97ece34be9aaeb294fb096fd24 | refs/heads/master | 2020-04-28T19:51:11.734155 | 2019-05-30T07:35:58 | 2019-05-30T07:35:58 | 175,524,428 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 760 | java | package sec15;
import java.text.SimpleDateFormat;
import java.util.Date;
public class SimpleDateFormatExample {
public static void main(String[] args) {
Date now = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
System.out.println(sdf.format(now));
sdf = new SimpleDateFormat("yyyy년 MM월 dd일");
System.out.println(sdf.format(now));
sdf = new SimpleDateFormat("yyyy.MM.dd a HH:mm:ss");
System.out.println(sdf.format(now));
sdf = new SimpleDateFormat("E요일");
System.out.println(sdf.format(now));
sdf = new SimpleDateFormat("올해의 D번째 날");
System.out.println(sdf.format(now));
sdf = new SimpleDateFormat("이달의 d번째 날");
System.out.println(sdf.format(now));
}
}
| [
"nya49@naver.com"
] | nya49@naver.com |
581987b85e45522bbb09202e91cab7088196021e | 5a0bfac7ad00c079fe8e0bdf1482f4271c46eeab | /app/src/main/wechat6.5.3/ct/cc.java | b558ea36d1d19ef52cb22956eade768ae2de3e5a | [] | no_license | newtonker/wechat6.5.3 | 8af53a870a752bb9e3c92ec92a63c1252cb81c10 | 637a69732afa3a936afc9f4679994b79a9222680 | refs/heads/master | 2020-04-16T03:32:32.230996 | 2017-06-15T09:54:10 | 2017-06-15T09:54:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,815 | java | package ct;
import android.os.Handler;
import android.os.Message;
import android.os.SystemClock;
import android.util.Pair;
import com.tencent.map.geolocation.internal.TencentLogImpl;
import com.tencent.mmdb.database.SQLiteDatabase;
import com.tencent.tencentmap.lbssdk.service.e;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Iterator;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.zip.GZIPOutputStream;
final class cc {
final LinkedBlockingQueue<a> a = new LinkedBlockingQueue(3);
final bk b;
long c;
long d;
long e;
long f;
volatile boolean g;
class AnonymousClass1 implements Runnable {
private /* synthetic */ Handler a;
private /* synthetic */ cc b;
AnonymousClass1(cc ccVar, Handler handler) {
this.b = ccVar;
this.a = handler;
}
public final void run() {
Throwable e;
Throwable th;
this.b.a.clear();
cc ccVar = this.b;
Handler handler = this.a;
LinkedBlockingQueue linkedBlockingQueue = ccVar.a;
a aVar = null;
while (ccVar.g) {
a aVar2;
try {
aVar2 = (a) linkedBlockingQueue.take();
try {
if (a.d == aVar2) {
ct.b.a.a("TxRequestSender", "run: state=[shutdown]");
return;
}
ct.b.a.a("request:" + aVar2.b);
long currentTimeMillis = System.currentTimeMillis();
String a = ccVar.b.a(aVar2.g, aVar2.f);
long currentTimeMillis2 = System.currentTimeMillis() - currentTimeMillis;
ct.b.a.a("cost:" + currentTimeMillis2 + "request:" + a);
ccVar.c++;
ccVar.d += (long) aVar2.f.length;
byte[] a2 = ct.b.a.a(a.getBytes());
ccVar.e += (long) (a2 != null ? a2.length : 0);
Message obtainMessage = handler.obtainMessage();
obtainMessage.arg1 = (int) currentTimeMillis2;
aVar2.c = currentTimeMillis;
if (1 == aVar2.e) {
obtainMessage.obj = Pair.create(a, aVar2);
obtainMessage.what = 4999;
obtainMessage.sendToTarget();
}
aVar = aVar2;
} catch (InterruptedException e2) {
e = e2;
ct.b.a.a("TxRequestSender", "run: thread is interrupted", e);
aVar = aVar2;
} catch (IOException e3) {
e = e3;
ct.b.a.a("TxRequestSender", "cost:" + (System.currentTimeMillis() - 0) + ",run: io error", e);
ccVar.a(aVar2);
ct.b.a.b("TxRequestSender", "Send timeout");
handler.sendEmptyMessageDelayed(4998, 0);
aVar = aVar2;
}
} catch (Throwable e4) {
th = e4;
aVar2 = aVar;
e = th;
ct.b.a.a("TxRequestSender", "run: thread is interrupted", e);
aVar = aVar2;
} catch (Throwable e42) {
th = e42;
aVar2 = aVar;
e = th;
ct.b.a.a("TxRequestSender", "cost:" + (System.currentTimeMillis() - 0) + ",run: io error", e);
ccVar.a(aVar2);
ct.b.a.b("TxRequestSender", "Send timeout");
handler.sendEmptyMessageDelayed(4998, 0);
aVar = aVar2;
}
}
}
}
static class a {
public static final a d = new a();
final Object a;
public String b;
public long c;
private final int e;
private final byte[] f;
private final String g;
private int h;
private a() {
this.h = 1;
this.e = 0;
this.f = null;
this.g = null;
this.a = null;
}
a(int i, byte[] bArr, String str, Object obj) {
this.h = 1;
this.e = i;
this.f = bArr;
this.g = str;
this.a = obj;
}
}
cc(bk bkVar) {
this.b = bkVar;
}
static byte[] a(byte[] bArr) {
byte[] bArr2 = null;
try {
OutputStream byteArrayOutputStream = new ByteArrayOutputStream(bArr.length);
GZIPOutputStream gZIPOutputStream = new GZIPOutputStream(byteArrayOutputStream);
gZIPOutputStream.write(bArr);
gZIPOutputStream.close();
bArr2 = byteArrayOutputStream.toByteArray();
byteArrayOutputStream.close();
return bArr2;
} catch (Exception e) {
return bArr2;
} catch (Error e2) {
return bArr2;
}
}
public final void a(String str, ci ciVar, int i) {
SystemClock.elapsedRealtime();
try {
byte[] a = ct.b.a.a(str.getBytes("GBK"));
a aVar = new a(1, a, a(a, i), ciVar);
aVar.b = str;
boolean z = false;
if (aVar.f != null) {
z = this.a.offer(aVar);
}
if (!z) {
this.a.clear();
this.a.offer(aVar);
ct.b.a.b("TxRequestSender", "postLocationRequest: failed to add request,because the queue has full,so we delete the first");
}
} catch (Throwable e) {
ct.b.a.a("TxRequestSender", SQLiteDatabase.KeyEmpty, e);
}
}
final void a(a aVar) {
Object obj;
aVar.h = aVar.h - 1;
Iterator it = this.a.iterator();
while (it.hasNext()) {
if (((a) it.next()).e == aVar.e) {
obj = 1;
break;
}
}
obj = null;
if (aVar.h > 0 && r0 == null) {
ct.b.a.a("TxRequestSender", "retryIfNeed: times=" + aVar.h);
this.a.offer(aVar);
}
}
private static String a(byte[] bArr, int i) {
if (!(TencentLogImpl.isDebugEnabled() || bArr == null)) {
try {
if (e.o(bArr, 1) >= 0) {
return bu.a(i, 1);
}
} catch (UnsatisfiedLinkError e) {
return null;
}
}
return bu.a(i, 0);
}
}
| [
"zhangxhbeta@gmail.com"
] | zhangxhbeta@gmail.com |
2dd3c18f6173d08462be478326a5a22600ee466a | 95e1ddd7adc76bd08249d784cf346e9b8cddcc9f | /3.JavaMultithreading/src/com/javarush/task/task29/task2909/human/Human.java | a896a018dd75822cf46860bae64dd03284f36c19 | [] | no_license | script972/JavaRush | 2f7190e1ce20826bfab6045aee23c6b9e36d3a72 | 225b5802bd2116f41e2e1ccc57c7427b05ef9a07 | refs/heads/master | 2021-01-19T18:32:38.809418 | 2017-10-07T21:44:26 | 2017-10-07T21:44:26 | 78,306,557 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,107 | java | package com.javarush.task.task29.task2909.human;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class Human implements Alive {
private static int nextId = 0;
private int id;
protected int age;
protected String name;
private List<Human> children = new ArrayList<>();
protected Size size;
public class Size {
public int height;
public int weight;
}
private BloodGroup bloodGroup;
public void setBloodGroup(BloodGroup bloodGroup) {
/*
switch (code) {
case 1:
bloodGroup = BloodGroup.first();
break;
case 2:
bloodGroup = BloodGroup.second();
break;
case 3:
bloodGroup = BloodGroup.third();
break;
case 4:
bloodGroup = BloodGroup.fourth();
break;
}*/
this.bloodGroup = bloodGroup;
}
public BloodGroup getBloodGroup() {
return bloodGroup;
}
public Human(String name, int age) {
this.id = nextId;
nextId++;
this.name = name;
this.age = age;
}
public String getPosition() {
return "Человек";
}
public void printData() {
System.out.println(getPosition() + ": " + name);
}
@Override
public void live() {
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getId() {
return id;
}
public void printSize() {
System.out.println("Рост: " + size.height + " Вес: " + size.weight);
}
public List<Human> getChildren() {
return Collections.unmodifiableList(children);
}
public void addChild(Human human) {
children.add(human);
}
public void removeChild(Human human) {
children.remove(human);
}
} | [
"script972@gmail.com"
] | script972@gmail.com |
b3389c889f6973c4b97eeaa30758e743ac8e4a2f | 2b9cc2c6ddd3540b4b2276fccac23c28d37e5c06 | /src/main/java/com/microwise/msp/hardware/service/impl/DeviceServiceImpl.java | a3e458726e2bbee02952309fbf193cb117842178 | [] | no_license | algsun/blueplanet-daemon | 864e5af9477d8e69ffa742deb3bbe141711d30a6 | 318c790e0eb7753b6ce8b3ba3cd41c539fe7746c | refs/heads/master | 2020-03-15T19:47:44.247689 | 2018-05-31T07:25:02 | 2018-05-31T07:25:02 | 132,317,533 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,772 | java | package com.microwise.msp.hardware.service.impl;
import com.microwise.msp.hardware.businessbean.DeviceBean;
import com.microwise.msp.hardware.cache.AppCache;
import com.microwise.msp.hardware.dao.BaseDao;
import com.microwise.msp.hardware.dao.DeviceDao;
import com.microwise.msp.hardware.service.DeviceService;
import com.microwise.msp.platform.bean.NodeInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author gaohui
* @date 13-9-16 13:19
*/
@Service
@Scope("prototype")
@Transactional
public class DeviceServiceImpl implements DeviceService {
@Qualifier("BaseDao")
@Autowired
private BaseDao baseDao;
@Autowired
private DeviceDao deviceDao;
@Autowired
private AppCache appCache;
@Override
public List<DeviceBean> findByType(int deviceType) {
List<DeviceBean> matchedDevices = new ArrayList<DeviceBean>();
Map<String, Integer> devices = baseDao.getDeviceList();
for (Map.Entry<String, Integer> entry : devices.entrySet()) {
if (entry.getValue() == deviceType) {
DeviceBean device = deviceDao.findById(entry.getKey());
matchedDevices.add(device);
}
}
return matchedDevices;
}
@Override
public List<DeviceBean> findBySiteId(String siteId) {
List<DeviceBean> matchedDevices = new ArrayList<DeviceBean>();
Map<String, Integer> devices = baseDao.getDeviceList();
for (Map.Entry<String, Integer> entry : devices.entrySet()) {
if (entry.getKey().startsWith(siteId)) {
DeviceBean device = deviceDao.findById(entry.getKey());
matchedDevices.add(device);
}
}
return matchedDevices;
}
public List<NodeInfo> findBySiteId2(String siteId) {
return deviceDao.findBySiteId(siteId);
}
@Override
public DeviceBean findDeviceById(String deviceId) {
return deviceDao.findById(deviceId);
}
@Override
public String findZoneName(String deviceId) {
return deviceDao.findZoneName(deviceId);
}
@Override
public boolean setHumCompensate(String deviceId, int flag) {
boolean result = false;
DeviceBean device = appCache.loadDevice(deviceId);
if (device != null && deviceDao.setHumCompensate(deviceId, flag)) {
device.setHumCompensate(flag);
result = true;
}
return result;
}
}
| [
"algtrue@163.com"
] | algtrue@163.com |
d6f36c1305ef273a3ef27be6849a59a381c18aea | 69780b0a780339c4846f0fed9b8920451688353c | /CrazyBird/src/com/Bird/Crazy/Crazybird/Bird.java | 4fa39e94a845dc2841abcdde0fcc00650ab9f3f0 | [] | no_license | tsoglani/Crazy_Bird | 8d9b8fb31ea9fb1ad91c67a71150d5e0b6f84ffe | d2c8b0922cf49c34cd254c4d827e3988d12a834a | refs/heads/master | 2020-04-06T07:02:50.030886 | 2016-09-07T19:41:02 | 2016-09-07T19:41:02 | 63,444,635 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,397 | java | package com.Bird.Crazy.Crazybird;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.view.ViewGroup;
public class Bird extends ViewGroup implements Runnable {
private int posY, posX;
private boolean goingDown = true;
private GameActivity context;
public static final int startingPositionY = 100;
public int distance = 0;
public static int recordDistance;
private int extraSleep = 0;
private boolean isSleedRising = false;
private final int maxSleep = 14;
public Bird(GameActivity context) {
super(context);
this.context = (GameActivity) context;
distance = 0;
setBackgroundResource(R.drawable.bird2);
setWillNotDraw(false);
setX(this.context.getWindowManager().getDefaultDisplay().getWidth() / 30);
}
private void resetTubeAndEggCounter() {
Tube.counterOfPassTube = 0;
Egg.counterOfPassEgg = 0;
}
public float getY() {
return posY;
}
public boolean isGoingDown() {
return goingDown;
}
public void setY(float y) {
// super.setY(y);
this.posY = posY + (int) y;
if (posY <= 0) {
posY = 0;
}
try {
ViewGroup parentView = (ViewGroup) Bird.this.getParent();
if (parentView != null
&& posY + getHeight() > parentView.getHeight()
&& getHeight() > 0 && posY + getHeight() > 0) {
// posY = startingPositionY;
// gameOver = true;
getGmPlayView().gameOver();
}
this.layout(posX, posY, posX + getWidth(), posY + getHeight());
} catch (NullPointerException e) {
e.printStackTrace();
}
}
public GamePlay getGmPlayView() {
GamePlay gp = null;
gp = (GamePlay) getParent();
return gp;
}
public void setX(float x) {
// super.setY(y);
this.posX = posX + (int) x;
if (posX <= 0) {
posX = 0;
}
ViewGroup parentView = (ViewGroup) Bird.this.getParent();
this.layout(posX, posY, posX + getWidth(), posY + getHeight());
}
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
}
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
}
public Rect getBounds() {
int x = (int) getX() + getWidth() / 4, y = (int) getY() + 3
* getHeight() / 10, w = (int) getX() + (int) getWidth()
- getWidth() / 5, h = (int) getY() + getHeight() - getHeight()
/ 4;
Rect rec = new Rect(x, y, w, h);
return rec;
}
public Rect getTopBounds() {
int x = (int) getX() + getWidth() / 2, y = (int)getY()+getHeight()/5+getHeight()/25, w = x+getWidth()/6, h = (int) getY() + 3* getHeight() / 10;
Rect rec = new Rect(x, y, w, h);
return rec;
}public Rect getBottomBounds() {
int x = (int) getX() + getWidth() / 3+getWidth()/17,
y = (int) getY() + getHeight() - getHeight()/ 3,
w = x+ getWidth() / 4,
h = y+ getHeight()/ 6- getHeight()/35;
Rect rec = new Rect(x, y, w, h);
return rec;
}
public int getDistance() {
return distance;
}
public void start() {
new Thread(this).start();
}
public void setGoingDown(final boolean goingDown) {
if (goingDown) {
isSleedRising = true;
} else {
isSleedRising = false;
extraSleep=0;
this.goingDown = goingDown;
}
}
@Override
public synchronized void run() {
distance = 0;
final GamePlay gp = (GamePlay) getParent();
int counter = 0;
while (true) {
try {
if (extraSleep >= maxSleep) {
// Log.e("extraSleep >= maxSleep","extraSleep >= maxSleep");
isSleedRising = false;
goingDown = true;
}
if (isSleedRising) {
extraSleep++;
// Log.e("isSleedRising","isSleedRising");
} else {
if (extraSleep > 0) {
// Log.e("not SleedRising","not SleedRising");
extraSleep--;
}
}
//Log.e("extraSleep = ",Integer.toString(extraSleep));
//Log.e("maxSleep = ",Integer.toString(maxSleep));
Thread.sleep(GamePlay.birdSleep + extraSleep);
counter++;
if (counter % 100 == 0) {
distance++;
}
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (GamePlay.isGameOver) {
break;
}
context.runOnUiThread(new Thread() {
public void run() {
try {
gp.setDistance(distance);
gp.invalidate();
gp.postInvalidate();
// if (Egg.eggs.isEmpty()) {
// gp.eggPointer.setY(getY());
// }
} catch (Exception e) {
}
if (context.getGamePlay().hasSuperControll) {
if (GamePlay.superControllDirection != null
&& GamePlay.superControllDirection.equals("UP")) {
setY(-1);
} else if (GamePlay.superControllDirection != null
&& GamePlay.superControllDirection
.equals("DOWN")) {
setY(1);
}
} else {
if (goingDown && !GamePlay.isGameOver) {
setY(1);
} else if (!GamePlay.isGameOver) {
setY(-1);
}
}
Rect bound = getBounds();
if (bound != null) {
// Log.e("bird bound",bound.toString());
try {
for (Enemy enemy : GamePlay.enemies) {
try {
if (gp != null && enemy.intersect(bound)) {
gp.gameOver();
break;
}if (gp != null && enemy.intersect(getTopBounds())) {
gp.gameOver();
break;
}if (gp != null && enemy.intersect(getBottomBounds())) {
gp.gameOver();
break;
}
} catch (Exception e) {
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
});
}
}
}
| [
"mrtsoglanakos@hotmail.com"
] | mrtsoglanakos@hotmail.com |
c02bd4316990ce7a37a231e95d3da13607507c80 | 22671c118b4917f838124336e488d66ea8b57fb5 | /app/src/main/java/megvii/testfacepass/beans/LingShiSubject.java | c475987ecaecc633a59ea66b413b18d362ea8773 | [] | no_license | yoyo89757001/xinshuangpingji | 03ee2482d80e014c0fb2744e9bb401eb5eb1b360 | 4c5edf03498b6d26f78e87421a16e899e03e6ac3 | refs/heads/master | 2020-03-29T02:25:50.864540 | 2018-10-11T13:33:24 | 2018-10-11T13:33:24 | 149,436,125 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,570 | java | package megvii.testfacepass.beans;
public class LingShiSubject {
private long id;
private String sid;
private String name;// 姓名
private String companyId; // 公司ID
private String companyName; // 公司名称
private String workNumber; // 工号
private String sex; // 性别
private String phone;// 手机号
private String peopleType;// 人员类型
private String email;// 电子邮箱
private String position; // 职位
private int employeeStatus; // 是否在职
private int quitType; // 离职类型
private String remark;// 备注
private String photo;// 照片
private String storeId;// 门店ID
private String storeName;// 门店名称
private String entryTime; // 入职时间
private String birthday; // 生日
private byte[] teZhengMa;
private String departmentName;
private int daka;
private String shijian;
private String displayPhoto;
public String getDisplayPhoto() {
return displayPhoto;
}
public void setDisplayPhoto(String displayPhoto) {
this.displayPhoto = displayPhoto;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getSid() {
return sid;
}
public void setSid(String sid) {
this.sid = sid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCompanyId() {
return companyId;
}
public void setCompanyId(String companyId) {
this.companyId = companyId;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName;
}
public String getWorkNumber() {
return workNumber;
}
public void setWorkNumber(String workNumber) {
this.workNumber = workNumber;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getPeopleType() {
return peopleType;
}
public void setPeopleType(String peopleType) {
this.peopleType = peopleType;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
public int getEmployeeStatus() {
return employeeStatus;
}
public void setEmployeeStatus(int employeeStatus) {
this.employeeStatus = employeeStatus;
}
public int getQuitType() {
return quitType;
}
public void setQuitType(int quitType) {
this.quitType = quitType;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getPhoto() {
return photo;
}
public void setPhoto(String photo) {
this.photo = photo;
}
public String getStoreId() {
return storeId;
}
public void setStoreId(String storeId) {
this.storeId = storeId;
}
public String getStoreName() {
return storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
}
public String getEntryTime() {
return entryTime;
}
public void setEntryTime(String entryTime) {
this.entryTime = entryTime;
}
public String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
public byte[] getTeZhengMa() {
return teZhengMa;
}
public void setTeZhengMa(byte[] teZhengMa) {
this.teZhengMa = teZhengMa;
}
public String getDepartmentName() {
return departmentName;
}
public void setDepartmentName(String departmentName) {
this.departmentName = departmentName;
}
public int getDaka() {
return daka;
}
public void setDaka(int daka) {
this.daka = daka;
}
public String getShijian() {
return shijian;
}
public void setShijian(String shijian) {
this.shijian = shijian;
}
}
| [
"332663557@qq.com"
] | 332663557@qq.com |
c856c05b1ff5566178799f785b3daf8b26ad3a46 | e09d79b030cf788a8131bd38d5e8138ec469a903 | /examples/example.java2graph/src/javamm/SuperMethodInvocation.java | ac2edc5dfb62b5590016c2a815aeb5e9336e67e5 | [] | no_license | anatlyzer/a2l | 3c28b71804c1bdd5c378a7cf85e9a04498d8869a | 74f2c3ca81e45233a44461e95a4898ba1f237983 | refs/heads/master | 2021-01-16T04:34:21.940706 | 2020-02-25T23:35:00 | 2020-02-25T23:35:00 | 242,977,197 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,936 | java | package javamm;
import blackboard.IdentifiableElement;
import java.io.Serializable;
@SuppressWarnings("serial")public class SuperMethodInvocation implements Serializable, IdentifiableElement, ISuperMethodInvocation, javamm.IAbstractTypeQualifiedExpression, javamm.IAbstractMethodInvocation {
String id, trgId, modelName_;
public String getId() { return id;} public void setId(String id) { this.id = id;}public String getTrgId() { return trgId;}public void setTrgId(String trgId) { this.trgId = trgId;}public String getModelName() { return modelName_;}public void setModelName(String modelName) { this.modelName_ = modelName;}@Override public Object clone() throws CloneNotSupportedException { return super.clone(); }public String getTypeId() { return "SuperMethodInvocation"; }
public SuperMethodInvocation() { }public SuperMethodInvocation(String id_,String[] comments, String originalCompilationUnit, String originalClassFile, String qualifier, String method, String[] arguments, String[] typeArguments){
setId(id_);
setComments(comments);
setOriginalCompilationUnit(originalCompilationUnit);
setOriginalClassFile(originalClassFile);
setQualifier(qualifier);
setMethod(method);
setArguments(arguments);
setTypeArguments(typeArguments);
}
@lintra.utils.Reference
String[] comments= new String[0];public void setComments(String[] v) {
this.comments = v;
}
public String[] getComments() {
return this.comments;
}
@lintra.utils.Reference
String originalCompilationUnit;public void setOriginalCompilationUnit(String v) {
this.originalCompilationUnit = v;
}
public String getOriginalCompilationUnit() {
return this.originalCompilationUnit;
}
@lintra.utils.Reference
String originalClassFile;public void setOriginalClassFile(String v) {
this.originalClassFile = v;
}
public String getOriginalClassFile() {
return this.originalClassFile;
}
@lintra.utils.Reference
String qualifier;public void setQualifier(String v) {
this.qualifier = v;
}
public String getQualifier() {
return this.qualifier;
}
@lintra.utils.Reference
String method;public void setMethod(String v) {
this.method = v;
}
public String getMethod() {
return this.method;
}
@lintra.utils.Reference
String[] arguments= new String[0];public void setArguments(String[] v) {
this.arguments = v;
}
public String[] getArguments() {
return this.arguments;
}
@lintra.utils.Reference
String[] typeArguments= new String[0];public void setTypeArguments(String[] v) {
this.typeArguments = v;
}
public String[] getTypeArguments() {
return this.typeArguments;
}
public String toString() {
String s = "SuperMethodInvocation_"+this.id;s+=" comments="+ java.util.Arrays.toString(comments);s+=" originalCompilationUnit="+originalCompilationUnit;s+=" originalClassFile="+originalClassFile;s+=" qualifier="+qualifier;s+=" method="+method;s+=" arguments="+ java.util.Arrays.toString(arguments);s+=" typeArguments="+ java.util.Arrays.toString(typeArguments);return s;}} | [
"jesus.sanchez.cuadrado@gmail.com"
] | jesus.sanchez.cuadrado@gmail.com |
ec4120ab38ae20f918078a43d0b4c32297137e6b | 06780aeb787b2dd60e6872631b9dfea4c846545d | /KalturaClient/src/main/java/com/kaltura/client/types/ImageFlavorParams.java | 7094778fe0f64db3af0e27bbd7843bb1b676d559 | [] | no_license | fossabot/KalturaGeneratedAPIClientsAndroid | e74d31a9c86ca06f63cd5107bf3bda5fc4763a92 | ad556110aebe9bebde7b5bf41d5a6332ba9033b8 | refs/heads/master | 2020-05-30T07:01:09.265490 | 2019-05-31T12:42:51 | 2019-05-31T12:42:51 | 189,592,106 | 0 | 0 | null | 2019-05-31T12:42:46 | 2019-05-31T12:42:45 | null | UTF-8 | Java | false | false | 5,591 | java | // ===================================================================================================
// _ __ _ _
// | |/ /__ _| | |_ _ _ _ _ __ _
// | ' </ _` | | _| || | '_/ _` |
// |_|\_\__,_|_|\__|\_,_|_| \__,_|
//
// This file is part of the Kaltura Collaborative Media Suite which allows users
// to do with audio, video, and animation what Wiki platfroms allow them to do with
// text.
//
// Copyright (C) 2006-2019 Kaltura Inc.
//
// 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/>.
//
// @ignore
// ===================================================================================================
package com.kaltura.client.types;
import android.os.Parcel;
import com.google.gson.JsonObject;
import com.kaltura.client.Params;
import com.kaltura.client.utils.GsonParser;
import com.kaltura.client.utils.request.MultiRequestBuilder;
/**
* This class was generated using generate.php
* against an XML schema provided by Kaltura.
*
* MANUAL CHANGES TO THIS CLASS WILL BE OVERWRITTEN.
*/
@SuppressWarnings("serial")
@MultiRequestBuilder.Tokenizer(ImageFlavorParams.Tokenizer.class)
public class ImageFlavorParams extends FlavorParams {
public interface Tokenizer extends FlavorParams.Tokenizer {
String densityWidth();
String densityHeight();
String sizeWidth();
String sizeHeight();
String depth();
}
private Integer densityWidth;
private Integer densityHeight;
private Integer sizeWidth;
private Integer sizeHeight;
private Integer depth;
// densityWidth:
public Integer getDensityWidth(){
return this.densityWidth;
}
public void setDensityWidth(Integer densityWidth){
this.densityWidth = densityWidth;
}
public void densityWidth(String multirequestToken){
setToken("densityWidth", multirequestToken);
}
// densityHeight:
public Integer getDensityHeight(){
return this.densityHeight;
}
public void setDensityHeight(Integer densityHeight){
this.densityHeight = densityHeight;
}
public void densityHeight(String multirequestToken){
setToken("densityHeight", multirequestToken);
}
// sizeWidth:
public Integer getSizeWidth(){
return this.sizeWidth;
}
public void setSizeWidth(Integer sizeWidth){
this.sizeWidth = sizeWidth;
}
public void sizeWidth(String multirequestToken){
setToken("sizeWidth", multirequestToken);
}
// sizeHeight:
public Integer getSizeHeight(){
return this.sizeHeight;
}
public void setSizeHeight(Integer sizeHeight){
this.sizeHeight = sizeHeight;
}
public void sizeHeight(String multirequestToken){
setToken("sizeHeight", multirequestToken);
}
// depth:
public Integer getDepth(){
return this.depth;
}
public void setDepth(Integer depth){
this.depth = depth;
}
public void depth(String multirequestToken){
setToken("depth", multirequestToken);
}
public ImageFlavorParams() {
super();
}
public ImageFlavorParams(JsonObject jsonObject) throws APIException {
super(jsonObject);
if(jsonObject == null) return;
// set members values:
densityWidth = GsonParser.parseInt(jsonObject.get("densityWidth"));
densityHeight = GsonParser.parseInt(jsonObject.get("densityHeight"));
sizeWidth = GsonParser.parseInt(jsonObject.get("sizeWidth"));
sizeHeight = GsonParser.parseInt(jsonObject.get("sizeHeight"));
depth = GsonParser.parseInt(jsonObject.get("depth"));
}
public Params toParams() {
Params kparams = super.toParams();
kparams.add("objectType", "KalturaImageFlavorParams");
kparams.add("densityWidth", this.densityWidth);
kparams.add("densityHeight", this.densityHeight);
kparams.add("sizeWidth", this.sizeWidth);
kparams.add("sizeHeight", this.sizeHeight);
kparams.add("depth", this.depth);
return kparams;
}
public static final Creator<ImageFlavorParams> CREATOR = new Creator<ImageFlavorParams>() {
@Override
public ImageFlavorParams createFromParcel(Parcel source) {
return new ImageFlavorParams(source);
}
@Override
public ImageFlavorParams[] newArray(int size) {
return new ImageFlavorParams[size];
}
};
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
dest.writeValue(this.densityWidth);
dest.writeValue(this.densityHeight);
dest.writeValue(this.sizeWidth);
dest.writeValue(this.sizeHeight);
dest.writeValue(this.depth);
}
public ImageFlavorParams(Parcel in) {
super(in);
this.densityWidth = (Integer)in.readValue(Integer.class.getClassLoader());
this.densityHeight = (Integer)in.readValue(Integer.class.getClassLoader());
this.sizeWidth = (Integer)in.readValue(Integer.class.getClassLoader());
this.sizeHeight = (Integer)in.readValue(Integer.class.getClassLoader());
this.depth = (Integer)in.readValue(Integer.class.getClassLoader());
}
}
| [
"community@kaltura.com"
] | community@kaltura.com |
2e63075f23ef6350ef0160d83a0ffd2e633ff7b0 | 62588c60809ea3268f5bead7c5335ce7fb562a40 | /java/ec3/common/tile/TileColdDistillator.java | 9a89a452894c74db1de3714eb8be3c6e258036ca | [] | no_license | DarkxElocius/EssentialCraft3 | 1d163881441ee2e37d7b9ba4427b6588363fd89d | 3fd25a97cd271d0102ce59ff492a74a30323b87c | refs/heads/master | 2021-01-17T23:32:34.082390 | 2015-05-16T20:11:20 | 2015-05-16T20:11:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,508 | java | package ec3.common.tile;
import java.util.List;
import DummyCore.Utils.DataStorage;
import DummyCore.Utils.DummyData;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraftforge.common.config.Configuration;
import ec3.api.ApiCore;
import ec3.api.IColdBlock;
public class TileColdDistillator extends TileMRUGeneric{
public static float balanceProduced = 0F;
public static float cfgMaxMRU = ApiCore.GENERATOR_MAX_MRU_GENERIC*10;
public static boolean harmEntities = true;
public TileColdDistillator()
{
super();
this.maxMRU = (int) cfgMaxMRU;
}
public boolean canGenerateMRU()
{
return false;
}
@Override
public void updateEntity()
{
super.updateEntity();
this.balance = balanceProduced;
if(!this.worldObj.isRemote)
{
if(!this.worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord))
{
int mruGenerated = CgetMru();
this.setMRU((int) (this.getMRU()+mruGenerated));
if(this.getMRU() > this.getMaxMRU())
this.setMRU(this.getMaxMRU());
if(harmEntities)
CdamageAround();
}
}
}
@SuppressWarnings("unchecked")
public void CdamageAround()
{
List<EntityLivingBase> l = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord+1, yCoord+1, zCoord+1).expand(3D, 3D, 3D));
if(!l.isEmpty())
{
EntityLivingBase e = l.get(this.worldObj.rand.nextInt(l.size()));
if(e instanceof EntityPlayer && !((EntityPlayer)e).capabilities.isCreativeMode)
{
e.addPotionEffect(new PotionEffect(Potion.digSlowdown.id,3000,2));
e.addPotionEffect(new PotionEffect(Potion.weakness.id,3000,2));
e.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id,3000,2));
if(e.worldObj.rand.nextFloat() < 0.2F && !e.worldObj.isRemote)
{
e.attackEntityFrom(DamageSource.starve, 1);
}
}else if(!(e instanceof EntityPlayer))
{
e.addPotionEffect(new PotionEffect(Potion.digSlowdown.id,3000,2));
e.addPotionEffect(new PotionEffect(Potion.weakness.id,3000,2));
e.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id,3000,2));
if(e.worldObj.rand.nextFloat() < 0.2F && !e.worldObj.isRemote)
{
e.attackEntityFrom(DamageSource.starve, 1);
}
}
}
}
public int CgetMru()
{
float i = 0;
for(int x = -3; x <= 3; ++x)
{
for(int z = -3; z <= 3; ++z)
{
for(int y = -3; y <= 3; ++y)
{
if(this.worldObj.getBlock(xCoord+x, yCoord+y, zCoord+z) == Blocks.ice)
{
i += 0.15F;
}
if(this.worldObj.getBlock(xCoord+x, yCoord+y, zCoord+z) == Blocks.snow)
{
i += 0.2F;
}
if(this.worldObj.getBlock(xCoord+x, yCoord+y, zCoord+z) == Blocks.snow_layer)
{
i += 0.05F;
}
if(this.worldObj.getBlock(xCoord+x, yCoord+y, zCoord+z) == Blocks.packed_ice)
{
i += 0.3F;
}
Block b = this.worldObj.getBlock(xCoord+x, yCoord+y, zCoord+z);
if(b != null && b instanceof IColdBlock)
{
i += ((IColdBlock)b).getColdModifier(this.worldObj,xCoord+x, yCoord+y, zCoord+z,this.worldObj.getBlockMetadata(xCoord+x, yCoord+y, zCoord+z));
}
}
}
}
return (int) i;
}
public static void setupConfig(Configuration cfg)
{
try
{
cfg.load();
String[] cfgArrayString = cfg.getStringList("ColdDistillatorSettings", "tileentities", new String[]{"Produced Balance:0.0","Max MRU:"+ApiCore.GENERATOR_MAX_MRU_GENERIC*10,"Damage Entities Around:true"}, "Settings of the given Device.");
String dataString="";
for(int i = 0; i < cfgArrayString.length; ++i)
dataString+="||"+cfgArrayString[i];
DummyData[] data = DataStorage.parseData(dataString);
balanceProduced = Float.parseFloat(data[0].fieldValue);
cfgMaxMRU = (int)Float.parseFloat(data[1].fieldValue);
harmEntities=Boolean.parseBoolean(data[2].fieldValue);
cfg.save();
}catch(Exception e)
{
return;
}
}
}
| [
"Modbder@gmail.com"
] | Modbder@gmail.com |
19452e33af61a11045cc5b71ae75a3d3ede2548b | 74a9a90ee7064a1da77e1831f12f0485df0ed5a8 | /src/NowCoder/Hard/exercise/No_code56.java | f7d489fd0518fbe18f7822fadc9b71afaa005603 | [] | no_license | Lemon-362/NowCoder | 4191e83bc8d8f6a973e46a7537c43fa453f7477a | 979fa190c2a06a0e84159646df21d2f2193deff2 | refs/heads/master | 2022-12-04T10:48:09.092038 | 2020-08-17T09:19:46 | 2020-08-17T09:19:46 | 261,641,899 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,698 | java | package NowCoder.Hard.exercise;
public class No_code56 {
public static class Node {
private int value;
private Node next;
public Node(int value) {
this.value = value;
}
}
public static Node deleteDuplication(Node head) {
if (head == null) {
return null;
}
Node newHead = new Node(Integer.MIN_VALUE);
newHead.next = head;
Node cur = newHead;
Node pre = newHead;
while (cur != null){
if (cur.next != null && cur.value == cur.next.value){
while (cur.next != null && cur.value == cur.next.value){
cur = cur.next;
}
cur = cur.next;
pre.next = cur;
}else {
pre = cur;
cur = cur.next;
}
}
Node res = newHead.next;
newHead.next = null;
return res;
}
public static void print(Node head) {
if (head == null) {
return;
}
while (head != null) {
System.out.print(head.value + " ");
head = head.next;
}
System.out.println();
}
public static void main(String[] args) {
Node head = new Node(1);
head.next = new Node(2);
head.next.next = new Node(3);
head.next.next.next = new Node(3);
head.next.next.next.next = new Node(4);
head.next.next.next.next.next = new Node(4);
head.next.next.next.next.next.next = new Node(5);
print(head); // 1 2 3 3 4 4 5
Node newHead = deleteDuplication(head);
print(newHead); // 1 2 5
}
}
| [
"18362086897@sina.cn"
] | 18362086897@sina.cn |
00a156950efd6a6ed1375e56706ccf643972f298 | 8782061b1e1223488a090f9f3f3b8dfe489e054a | /storeMongoDB/projects/ABCD/AOKP_packages_providers_ContactsProvider/test/23Test.java | dd0b3bffe95bf4b1d04aae4a0254a8a8f3599272 | [] | no_license | ryosuke-ku/TCS_init | 3cb79a46aa217e62d8fff13d600f2a9583df986c | e1207d68bdc9d2f1eed63ef44a672b5a37b45633 | refs/heads/master | 2020-08-08T18:40:17.929911 | 2019-10-18T01:06:32 | 2019-10-18T01:06:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,488 | java | public void testStatusUpdateInsert() {
long rawContactId = RawContactUtil.createRawContact(mResolver);
Uri imUri = insertImHandle(rawContactId, Im.PROTOCOL_AIM, null, "aim");
long dataId = ContentUris.parseId(imUri);
ContentValues values = new ContentValues();
values.put(StatusUpdates.DATA_ID, dataId);
values.put(StatusUpdates.PROTOCOL, Im.PROTOCOL_AIM);
values.putNull(StatusUpdates.CUSTOM_PROTOCOL);
values.put(StatusUpdates.IM_HANDLE, "aim");
values.put(StatusUpdates.PRESENCE, StatusUpdates.INVISIBLE);
values.put(StatusUpdates.STATUS, "Hiding");
values.put(StatusUpdates.STATUS_TIMESTAMP, 100);
values.put(StatusUpdates.STATUS_RES_PACKAGE, "a.b.c");
values.put(StatusUpdates.STATUS_ICON, 1234);
values.put(StatusUpdates.STATUS_LABEL, 2345);
Uri resultUri = mResolver.insert(StatusUpdates.CONTENT_URI, values);
assertStoredValues(resultUri, values);
long contactId = queryContactId(rawContactId);
Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
values.clear();
values.put(Contacts.CONTACT_PRESENCE, StatusUpdates.INVISIBLE);
values.put(Contacts.CONTACT_STATUS, "Hiding");
values.put(Contacts.CONTACT_STATUS_TIMESTAMP, 100);
values.put(Contacts.CONTACT_STATUS_RES_PACKAGE, "a.b.c");
values.put(Contacts.CONTACT_STATUS_ICON, 1234);
values.put(Contacts.CONTACT_STATUS_LABEL, 2345);
assertStoredValues(contactUri, values);
values.clear();
values.put(StatusUpdates.DATA_ID, dataId);
values.put(StatusUpdates.STATUS, "Cloaked");
values.put(StatusUpdates.STATUS_TIMESTAMP, 200);
values.put(StatusUpdates.STATUS_RES_PACKAGE, "d.e.f");
values.put(StatusUpdates.STATUS_ICON, 4321);
values.put(StatusUpdates.STATUS_LABEL, 5432);
mResolver.insert(StatusUpdates.CONTENT_URI, values);
values.clear();
values.put(Contacts.CONTACT_PRESENCE, StatusUpdates.INVISIBLE);
values.put(Contacts.CONTACT_STATUS, "Cloaked");
values.put(Contacts.CONTACT_STATUS_TIMESTAMP, 200);
values.put(Contacts.CONTACT_STATUS_RES_PACKAGE, "d.e.f");
values.put(Contacts.CONTACT_STATUS_ICON, 4321);
values.put(Contacts.CONTACT_STATUS_LABEL, 5432);
assertStoredValues(contactUri, values);
}
| [
"naist1020@gmail.com"
] | naist1020@gmail.com |
4b7e5b9311eaf118d7271bcbdb5ec87b4e695f5a | 6581fdf98dfd0368429bf840084a2a3b3d0595fb | /src/main/java/nl/knaw/dans/dccd/web/datapanels/LinkSeriesPanel.java | 7b02192cfb186d1b5f91c1510ad44c6fced45978 | [
"Apache-2.0"
] | permissive | DANS-KNAW/dccd-webui | 3708d6c898add557fa0bf4c24ab015ae4183f6f5 | e7ae645742164b6f5f4dbd0da7f3b390031afa7b | refs/heads/master | 2020-05-27T21:42:48.319279 | 2018-10-01T13:28:08 | 2018-10-01T13:28:08 | 37,195,019 | 0 | 2 | Apache-2.0 | 2018-10-01T13:28:09 | 2015-06-10T12:11:40 | Java | UTF-8 | Java | false | false | 3,536 | java | /*******************************************************************************
* Copyright 2015 DANS - Data Archiving and Networked Services
*
* 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 nl.knaw.dans.dccd.web.datapanels;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
import nl.knaw.dans.dccd.model.EntityAttribute;
import nl.knaw.dans.dccd.model.UIMapEntry;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.tridas.schema.SeriesLink;
import org.tridas.schema.SeriesLinks;
/**
* TODO Change this to handle SeriesLinks, that have a list of SeriesLink's
*
* @author paulboon
*/
public class LinkSeriesPanel extends EntityAttributePanel {
private static final long serialVersionUID = 1672393763055417182L;
private static Logger logger = Logger.getLogger(LinkSeriesPanel.class);
public LinkSeriesPanel(String id, IModel model) {
super(id, model, false);
}
public LinkSeriesPanel(String id, IModel model, boolean editable) {
super(id, model, editable);
//super(id, model, false); // disable editing
}
public class LinkSeriesPanelView extends Panel {
private static final long serialVersionUID = 479232927125835442L;
public LinkSeriesPanelView(String id, IModel model) {
super(id, model);
EntityAttribute attr = (EntityAttribute) this.getDefaultModelObject();
// get the Tridas object
SeriesLinks linkSeries = (SeriesLinks) attr.getEntryObject();
List<?> list = new ArrayList<SeriesLink>();
if (linkSeries != null && linkSeries.isSetSeries()) {
list = linkSeries.getSeries();
}
logger.debug("Number of series links: " + list.size());
// fill the list
ListView view = new ListView("linkseries", list) {
private static final long serialVersionUID = -5118760071162867209L;
@Override
protected void populateItem(ListItem item) {
EntityAttribute attr = new EntityAttribute(item, new UIMapEntry("linkSeries", "modelObject"));
item.add(new SeriesLinkPanel("linkseries_panel", new Model(attr), isEditable()));
}
};
add(view);
}
}
public class LinkSeriesPanelEdit extends Panel {
private static final long serialVersionUID = 6398899324697341656L;
public LinkSeriesPanelEdit(String id, IModel model) {
super(id, model);
EntityAttribute attr = (EntityAttribute) this.getDefaultModelObject();
// get the Tridas object
SeriesLinks linkSeries = (SeriesLinks) attr.getEntryObject();
EntityAttribute seriesAttr = new EntityAttribute(linkSeries, "series");
EntityAttributeRepeaterPanel repeaterPanel =
new EntityAttributeRepeaterPanel(SeriesLinkPanel.class, "linkseries", new Model(seriesAttr), isEditable());
add(repeaterPanel);
}
}
}
| [
"jan.van.mansum@dans.knaw.nl"
] | jan.van.mansum@dans.knaw.nl |
b25dcbd49053f78f2343cd75d4b6924c10ab78a9 | 4f60b217ff46cd69aea6567a4d21a5e74cd384bb | /plugin/core/src/com/perl5/lang/perl/idea/annotators/PerlCriticErrorDescriptor.java | a4f7d341a5c6412fb7b25d37312e14e393c95299 | [
"Apache-2.0"
] | permissive | barusanov/Perl5-IDEA | 39f642d24f2aa60fb37eb7bb58156db6f476602f | 445078d27b4a237b75c0978820c8ea9df491e9a9 | refs/heads/master | 2020-08-08T17:41:10.016892 | 2019-10-04T10:54:44 | 2019-10-04T10:54:44 | 213,879,711 | 0 | 0 | NOASSERTION | 2019-10-09T09:44:45 | 2019-10-09T09:44:43 | null | UTF-8 | Java | false | false | 1,925 | java | /*
* Copyright 2015-2019 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.idea.annotators;
import org.jetbrains.annotations.Nullable;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class PerlCriticErrorDescriptor {
public static final Pattern PERL_CRITIC_MESSAGE_PATTERN = Pattern.compile("(.+?) at line (\\d+), column (\\d+)\\.\\s*( .+)");
private final int myLine;
private final int myCol;
private StringBuilder myMessage;
private PerlCriticErrorDescriptor(StringBuilder message, int line, int col) {
myMessage = message;
myCol = col;
myLine = line;
}
public String getMessage() {
return myMessage.toString();
}
public void append(String text) {
if (text != null) {
myMessage.append(text);
}
}
public int getLine() {
return myLine;
}
public int getCol() {
return myCol;
}
@Nullable
public static PerlCriticErrorDescriptor getFromString(String message) {
Matcher m = PERL_CRITIC_MESSAGE_PATTERN.matcher(message);
if (m.matches()) {
StringBuilder realMessage = new StringBuilder();
realMessage.append(m.group(1));
realMessage.append(m.group(4));
int line = Integer.parseInt(m.group(2));
int pos = Integer.parseInt(m.group(3));
return new PerlCriticErrorDescriptor(realMessage, line, pos);
}
return null;
}
}
| [
"hurricup@gmail.com"
] | hurricup@gmail.com |
ae94ffdc7ff72b2e55532fefa50142218d098552 | 83d56024094d15f64e07650dd2b606a38d7ec5f1 | /sicc_druida/fuentes/java/SegDeptoEmpreConectorCreate.java | d207a7df17a3406812817444041c24f6a923b7a4 | [] | no_license | cdiglesias/SICC | bdeba6af8f49e8d038ef30b61fcc6371c1083840 | 72fedb14a03cb4a77f62885bec3226dbbed6a5bb | refs/heads/master | 2021-01-19T19:45:14.788800 | 2016-04-07T16:20:51 | 2016-04-07T16:20:51 | null | 0 | 0 | null | null | null | null | WINDOWS-1250 | Java | false | false | 1,922 | java |
import org.w3c.dom.*;
import java.util.ArrayList;
public class SegDeptoEmpreConectorCreate implements es.indra.druida.base.ObjetoXML {
private ArrayList v = new ArrayList();
public Element getXML (Document doc){
getXML0(doc);
return (Element)v.get(0);
}
/* Primer nodo */
private void getXML0(Document doc) {
v.add(doc.createElement("CONECTOR"));
((Element)v.get(0)).setAttribute("TIPO","EJB" );
((Element)v.get(0)).setAttribute("NOMBRE","mare.mln.BusinessFacade" );
((Element)v.get(0)).setAttribute("METODO","execute" );
((Element)v.get(0)).setAttribute("REVISION","3.1" );
((Element)v.get(0)).setAttribute("OBSERVACIONES","Conector para la inserción de un nuevo elemento sobre la entidad SegDeptoEmpre" );
/* Empieza nodo:1 / Elemento padre: 0 */
v.add(doc.createElement("ENTRADA"));
((Element)v.get(0)).appendChild((Element)v.get(1));
/* Empieza nodo:2 / Elemento padre: 1 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(2)).setAttribute("NOMBRE","MMGSegDeptoEmpreCreateID" );
((Element)v.get(2)).setAttribute("TIPO","OBJETO" );
((Element)v.get(2)).setAttribute("LONGITUD","50" );
((Element)v.get(1)).appendChild((Element)v.get(2));
/* Termina nodo:2 */
/* Empieza nodo:3 / Elemento padre: 1 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(3)).setAttribute("NOMBRE","MMGSegDeptoEmpreCreateDTO" );
((Element)v.get(3)).setAttribute("TIPO","OBJETO" );
((Element)v.get(3)).setAttribute("LONGITUD","50" );
((Element)v.get(1)).appendChild((Element)v.get(3));
/* Termina nodo:3 */
/* Termina nodo:1 */
/* Empieza nodo:4 / Elemento padre: 0 */
v.add(doc.createElement("SALIDA"));
((Element)v.get(0)).appendChild((Element)v.get(4));
/* Termina nodo:4 */
}
}
| [
"hp.vega@hotmail.com"
] | hp.vega@hotmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.