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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
de7fb88dee42f39ba6de4ec9bb8ab4daaabad8ed | 73f05e7f0eb4f1c7c073263b58f0182c21fbda00 | /mogu_commons/src/main/java/com/moxi/mogublog/commons/entity/User.java | 27ef3eca260e45aa78fa67a59304874d109281a7 | [
"Apache-2.0"
] | permissive | tianxing91/mogu_blog_v2 | d8b83cf5b82f97356c34131d44e07e1f56c04837 | 88daca99f9655ef9062f460e5e284fbd1af77565 | refs/heads/master | 2022-12-31T22:22:10.197375 | 2020-10-16T03:27:51 | 2020-10-16T03:29:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,959 | java | package com.moxi.mogublog.commons.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.moxi.mougblog.base.entity.SuperEntity;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* <p>
* 管理员表
* </p>
*
* @author xuzhixiang
* @since 2018-09-04
*/
@Data
@TableName("t_user")
public class User extends SuperEntity<User> {
private static final long serialVersionUID = 1L;
/**
* 用户名
*/
private String userName;
/**
* 密码
*/
private String passWord;
/**
* 昵称
*/
private String nickName;
/**
* 性别(1:男2:女)
*/
private String gender;
/**
* 个人头像(UID)
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String avatar;
/**
* 邮箱
*/
private String email;
/**
* 出生年月日
*/
@DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date birthday;
/**
* 手机
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String mobile;
/**
* QQ号
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String qqNumber;
/**
* 微信号
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String weChat;
/**
* 职业
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String occupation;
/**
* 自我简介最多150字
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
private String summary;
/**
* 登录次数
*/
private Integer loginCount;
/**
* 验证码
*/
private String validCode;
/**
* 资料来源
*/
private String source;
/**
* 平台uuid
*/
private String uuid;
/**
* 最后登录时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date lastLoginTime;
/**
* 最后登录IP
*/
private String lastLoginIp;
/**
* 评论状态,0 禁言, 1 正常
*/
private Integer commentStatus;
/**
* 开启邮件通知: 0:关闭, 1:开启
*/
private Integer startEmailNotification;
/**
* 操作系统
*/
private String os;
/**
* 浏览器
*/
private String browser;
/**
* ip来源
*/
private String ipSource;
/**
* 用户标签 0:普通,1:管理员,2:博主
*/
private Integer userTag;
// 以下字段不存入数据库
/**
* 用户头像
*/
@TableField(exist = false)
private String photoUrl;
}
| [
"xzx19950624@qq.com"
] | xzx19950624@qq.com |
3ac1f7bd6965d3a5db8a95062ded4958ad1e59c0 | 3c73a700a7d89b1028f6b5f907d4d0bbe640bf9a | /android/src/main/kotlin/lib/org/bouncycastle/pqc/jcajce/spec/RainbowPublicKeySpec.java | 1d28a2fbdb6c21b9513b3ca7f54ad53f88b2b0fa | [] | no_license | afterlogic/flutter_crypto_stream | 45efd60802261faa28ab6d10c2390a84231cf941 | 9d5684d5a7e63d3a4b2168395d454474b3ca4683 | refs/heads/master | 2022-11-02T02:56:45.066787 | 2021-03-25T17:45:58 | 2021-03-25T17:45:58 | 252,140,910 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,441 | java | package lib.org.bouncycastle.pqc.jcajce.spec;
import java.security.spec.KeySpec;
/**
* This class provides a specification for a RainbowSignature public key.
*
* @see KeySpec
*/
public class RainbowPublicKeySpec
implements KeySpec
{
private short[][] coeffquadratic;
private short[][] coeffsingular;
private short[] coeffscalar;
private int docLength; // length of possible document to sign
/**
* Constructor
*
* @param docLength
* @param coeffquadratic
* @param coeffSingular
* @param coeffScalar
*/
public RainbowPublicKeySpec(int docLength,
short[][] coeffquadratic, short[][] coeffSingular,
short[] coeffScalar)
{
this.docLength = docLength;
this.coeffquadratic = coeffquadratic;
this.coeffsingular = coeffSingular;
this.coeffscalar = coeffScalar;
}
/**
* @return the docLength
*/
public int getDocLength()
{
return this.docLength;
}
/**
* @return the coeffquadratic
*/
public short[][] getCoeffQuadratic()
{
return coeffquadratic;
}
/**
* @return the coeffsingular
*/
public short[][] getCoeffSingular()
{
return coeffsingular;
}
/**
* @return the coeffscalar
*/
public short[] getCoeffScalar()
{
return coeffscalar;
}
}
| [
"princesakenny98@gmail.com"
] | princesakenny98@gmail.com |
ba98e0db6f8ff1412c11115c5bafbaab50a1f553 | 792385632cab03b9b602ff18bb56f64e8da76607 | /app/build/generated/source/apt/debug/com/mvvmdemo/data/remote/ApiHeader_PublicApiHeader_Factory.java | 0708a491fe03a1553d52f032a59a709e6dff884f | [] | no_license | sunilparmar04/MVVMDemoAndroid | d6004c1296d6d80eb06c098750c828fda8ca7180 | 7b65a013f265cbf35f3af2250634ddc0a34a4182 | refs/heads/master | 2020-03-28T23:15:26.259369 | 2018-09-20T10:52:36 | 2018-09-20T10:52:36 | 149,283,338 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 720 | java | // Generated by Dagger (https://google.github.io/dagger).
package com.mvvmdemo.data.remote;
import dagger.internal.Factory;
import javax.inject.Provider;
public final class ApiHeader_PublicApiHeader_Factory implements Factory<ApiHeader.PublicApiHeader> {
private final Provider<String> apiKeyProvider;
public ApiHeader_PublicApiHeader_Factory(Provider<String> apiKeyProvider) {
this.apiKeyProvider = apiKeyProvider;
}
@Override
public ApiHeader.PublicApiHeader get() {
return new ApiHeader.PublicApiHeader(apiKeyProvider.get());
}
public static ApiHeader_PublicApiHeader_Factory create(Provider<String> apiKeyProvider) {
return new ApiHeader_PublicApiHeader_Factory(apiKeyProvider);
}
}
| [
"parmarsunil09@gmail.com"
] | parmarsunil09@gmail.com |
44be98919d402e1c52b2b1ca2a07221e616583ae | e182b99beedee9805a236228928c5cfdd8cdbc6a | /src/ua/edu/ukma/ykrukovska/unit5/practice/CarData.java | e6682a7d45a14fb25eaf1b394b72b7bd8ee219a0 | [] | no_license | YanaKrukovska/CS106A_Java_Term2 | 679114d44ca96e89053bf4211e530f27681476a7 | 78f835bf58550b07c1f58fff4071d41081a2b59b | refs/heads/master | 2021-07-11T19:05:55.809483 | 2020-07-03T12:00:52 | 2020-07-03T12:00:52 | 166,672,355 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,183 | java | package ua.edu.ukma.ykrukovska.unit5.practice;
public abstract class CarData {
protected int year;
protected String vin;
protected int distanceCovered;
protected int timeOfDriving;
public CarData(int year, String vin) {
this.year = year;
this.vin = vin;
}
public String getData(){
return "year: "+ getYear() + " . Vin: " + getVin() + " . Distance covered: " +
getDistanceCovered() + " . Time of driving: " + getTimeOfDriving();
}
public int getTimeOfDriving() {
return timeOfDriving;
}
public void setTimeOfDriving(int timeOfDriving) {
this.timeOfDriving = timeOfDriving;
}
public int getYear() {
return year;
}
public void setYear(int year) {
this.year = year;
}
public String getVin() {
return vin;
}
public int getDistanceCovered() {
return distanceCovered;
}
public String showDistanceCovered() {
return "Distance: " + distanceCovered + ". Time: " + timeOfDriving ;
}
public void setDistanceCovered(int distanceCovered) {
this.distanceCovered = distanceCovered;
}
}
| [
"jana.krua@gmail.com"
] | jana.krua@gmail.com |
c475edab4e4997a0ab36ee3daf6e01941d81b643 | 26183990a4c6b9f6104e6404ee212239da2d9f62 | /components/data_validation/src/java/tests/com/topcoder/util/datavalidator/integer/IsOddIntegerValidatorTestCases.java | d3cd392b1a947700318776e53d8719c69695d9d7 | [] | no_license | topcoder-platform/tc-java-components | 34c5798ece342a9f1804daeb5acc3ea4b0e0765b | 51b204566eb0df3902624c15f4fb69b5f99dc61b | refs/heads/dev | 2023-08-08T22:09:32.765506 | 2022-02-25T06:23:56 | 2022-02-25T06:23:56 | 138,811,944 | 0 | 8 | null | 2022-02-23T21:06:12 | 2018-06-27T01:10:36 | Rich Text Format | UTF-8 | Java | false | false | 7,388 | java | /*
* Copyright (C) 2007 TopCoder Inc., All Rights Reserved.
*/
package com.topcoder.util.datavalidator.integer;
import com.topcoder.util.datavalidator.AbstractIntegerValidatorTestCases;
import com.topcoder.util.datavalidator.AbstractObjectValidator;
import com.topcoder.util.datavalidator.BundleInfo;
import com.topcoder.util.datavalidator.IntegerValidator;
/**
* <p>
* Test the functionality of class <code>IntegerValidator</code>.
* </p>
*
* @author telly12
* @version 1.1
*/
public class IsOddIntegerValidatorTestCases extends AbstractIntegerValidatorTestCases {
/**
* <p>
* A <code>String</code> represents the message that the validation integer is not odd.
* </p>
*/
private static String NOT_ODD = "not odd";
/**
* <p>
* Sets up the test environment.
* </p>
*
* @throws Exception to JUnit
*/
protected void setUp() throws Exception {
super.setUp();
integerValidator = IntegerValidator.isOdd(bundleInfo);
integerValidator = IntegerValidator.isOdd();
}
/**
* <p>
* Tear down the test environment.
* </p>
*
* @throws Exception to JUnit
*/
protected void tearDown() throws Exception {
super.tearDown();
}
/**
* <p>
* Accuracy test case for method 'getMessage()'.<br>
* The result should be unsuccessful when validating an even integer.
* </p>
*/
public void testGetMessage_Object_Accuracy1() {
String msg = integerValidator.getMessage("1026");
assertEquals("Test accuracy for method getMessage() failed.", NOT_ODD, msg);
}
/**
* <p>
* Accuracy test case for method 'getMessage()'.<br>The result should be successful when validating an odd integer.
* </p>
*/
public void testGetMessage_Object_Accuracy2() {
String msg = integerValidator.getMessage("1023");
assertNull("Test accuracy for method getMessage() failed.", msg);
}
/**
* <p>
* Accuracy test case for method 'getMessage()'.<br>
* The result should be unsuccessful when validating an even integer.
* </p>
*/
public void testGetMessage_int_Accuracy1() {
String msg = integerValidator.getMessage(1026);
assertEquals("Test accuracy for method getMessage() failed.", NOT_ODD, msg);
}
/**
* <p>
* Accuracy test case for method 'getMessage()'.<br>The result should be successful when validating an odd integer.
* </p>
*/
public void testGetMessage_int_Accuracy2() {
String msg = integerValidator.getMessage(1023);
assertNull("Test accuracy for method getMessage() failed.", msg);
}
/**
* <p>
* Accuracy test case for method 'valid()'.<br>The result should be unsuccessful when validating an even integer.
* </p>
*/
public void testValid_Object_Accuracy1() {
assertFalse("Test accuracy for method valid() failed.", integerValidator.valid("1026"));
}
/**
* <p>
* Accuracy test case for method 'valid()'.<br>The result should be successful when validating an odd integer.
* </p>
*/
public void testValid_Object_Accuracy2() {
assertTrue("Test accuracy for method valid() failed.", integerValidator.valid("1023"));
}
/**
* <p>
* Accuracy test case for method 'valid()'.<br>
* <br>
* The result should be unsuccessful when validating an even integer.
* </p>
*/
public void testValid_int_Accuracy1() {
assertFalse("Test accuracy for method valid() failed.", integerValidator.valid(1026));
}
/**
* <p>
* Accuracy test case for method 'valid()'.<br>The result should be successful when validating an odd integer.
* </p>
*/
public void testValid_int_Accuracy2() {
assertTrue("Test accuracy for method valid() failed.", integerValidator.valid(1023));
}
/**
* <p>
* Accuracy test case for method 'getMessages()'.<br>
* The result should be unsuccessful when validating an even integer.
* </p>
*/
public void testGetMessages_Object_Accuracy1() {
String[] msg = integerValidator.getMessages("1026");
assertEquals("Test accuracy for method getMessages() failed.", 1, msg.length);
assertEquals("Test accuracy for method getMessages() failed.", NOT_ODD, msg[0]);
}
/**
* <p>
* Accuracy test case for method 'getMessages()'.<br>
* The result should be successful when validating an odd integer.
* </p>
*/
public void testGetMessages_Object_Accuracy2() {
String[] msg = integerValidator.getMessages("1023");
assertNull("Test accuracy for method getMessages() failed.", msg);
}
/**
* <p>
* Accuracy test case for method 'getAllMessages()'.<br>
* The result should be unsuccessful when validating an even integer.
* </p>
*/
public void testGetAllMessages_Object_Accuracy1() {
String[] msg = integerValidator.getAllMessages("1026");
assertEquals("Test accuracy for method getAllMessages() failed.", 1, msg.length);
assertEquals("Test accuracy for method getAllMessages() failed.", NOT_ODD, msg[0]);
}
/**
* <p>
* Accuracy test case for method 'getAllMessages()'.<br>
* The result should be successful when validating an odd integer.
* </p>
*/
public void testGetAllMessages_Object_Accuracy2() {
String[] msg = integerValidator.getAllMessages("1023");
assertNull("Test accuracy for method getAllMessages() failed.", msg);
}
/**
* <p>
* Accuracy test case for method 'getAllMessages()'.<br>
* The result should be unsuccessful when validating an even integer.
* </p>
*/
public void testGetAllMessages_ObjectInt_Accuracy1() {
String[] msg = integerValidator.getAllMessages("1024", 2);
assertEquals("Test accuracy for method getAllMessages() failed.", 1, msg.length);
assertEquals("Test accuracy for method getAllMessages() failed.", NOT_ODD, msg[0]);
}
/**
* <p>
* Accuracy test case for method 'getAllMessages()'.<br>
* The result should be successful when validating an odd integer.
* </p>
*/
public void testGetAllMessages_ObjectInt_Accuracy2() {
String[] msg = integerValidator.getAllMessages("1023", 1);
assertNull("Test accuracy for method getAllMessages() failed.", msg);
}
/**
* <p>
* Creates an instance of <code>AbstractObjectValidator.</code>
* </p>
*
* @return the <code>AbstractObjectValidator</code> instance.
*/
public AbstractObjectValidator createObjectValidator() {
return IntegerValidator.isOdd();
}
/**
* <p>
* Create an instance of <code>AbstractObjectValidator.</code>
* </p>
*
* @param bundleInfo name of the bundle to use
*
* @return the <code>AbstractObjectValidator</code> instance.
*/
public AbstractObjectValidator createObjectValidator(BundleInfo bundleInfo) {
return IntegerValidator.isOdd(bundleInfo);
}
}
| [
"pvmagacho@gmail.com"
] | pvmagacho@gmail.com |
4db2f9c75385bb483e4f9cbd2ac0d31a9841813b | 0cf378b7320592a952d5343a81b8a67275ab5fab | /webprotege-server-core/src/main/java/edu/stanford/bmir/protege/web/server/issues/CommentConverter.java | 6815ca70558e617f9d7fc8d5ebb97fec7f4ac890 | [
"BSD-2-Clause"
] | permissive | curtys/webprotege-attestation | 945de9f6c96ca84b7022a60f4bec4886c81ab4f3 | 3aa909b4a8733966e81f236c47d6b2e25220d638 | refs/heads/master | 2023-04-11T04:41:16.601854 | 2023-03-20T12:18:44 | 2023-03-20T12:18:44 | 297,962,627 | 0 | 0 | MIT | 2021-08-24T08:43:21 | 2020-09-23T12:28:24 | Java | UTF-8 | Java | false | false | 1,720 | java | package edu.stanford.bmir.protege.web.server.issues;
import edu.stanford.bmir.protege.web.server.persistence.DocumentConverter;
import edu.stanford.bmir.protege.web.shared.issues.Comment;
import edu.stanford.bmir.protege.web.shared.issues.CommentId;
import edu.stanford.bmir.protege.web.shared.user.UserId;
import org.bson.Document;
import javax.annotation.Nonnull;
import javax.inject.Inject;
import java.util.Optional;
/**
* Matthew Horridge
* Stanford Center for Biomedical Informatics Research
* 5 Oct 2016
*/
public class CommentConverter implements DocumentConverter<Comment> {
private static final String CREATED_BY = "createdBy";
private static final String CREATED_AT = "createdAt";
private static final String BODY = "body";
private static final String UPDATED_AT = "updatedAt";
@Inject
public CommentConverter() {
}
@Override
public Document toDocument(@Nonnull Comment object) {
Document document = new Document();
document.append(CREATED_BY, object.getCreatedBy().getUserName());
document.append(CREATED_AT, object.getCreatedAt());
object.getUpdatedAt().ifPresent(l -> document.append(UPDATED_AT, l));
document.append(BODY, object.getBody());
return document;
}
@Override
public Comment fromDocument(@Nonnull Document document) {
UserId createdBy = UserId.getUserId(document.getString(CREATED_BY));
long createdAt = document.getLong(CREATED_AT);
Optional<Long> updatedAt = Optional.ofNullable(document.getLong(UPDATED_AT));
String body = document.getString(BODY);
return new Comment(CommentId.create(), createdBy, createdAt, updatedAt, body, body);
}
}
| [
"matthew.horridge@stanford.edu"
] | matthew.horridge@stanford.edu |
2dadab92ab15080ccfd16aa0cf6246ec13588244 | 799cce351010ca320625a651fb2e5334611d2ebf | /Data Set/Manual/Before/before_1130.java | a3067e3ebf7ff17b7bfa1e7fd0493cb09a98d1d4 | [] | no_license | dareenkf/SQLIFIX | 239be5e32983e5607787297d334e5a036620e8af | 6e683aa68b5ec2cfe2a496aef7b467933c6de53e | refs/heads/main | 2023-01-29T06:44:46.737157 | 2020-11-09T18:14:24 | 2020-11-09T18:14:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 476 | java | public class Dummy{
@Override
public int deleteTeamById(int id) {
int result = -1;
String query = "DELETE FROM Team WHERE teamId= '" + id + "'";
System.out.println("Delete query: " + query);
try {
Statement stmt = con.createStatement();
stmt.setQueryTimeout(5);
result = stmt.executeUpdate(query);
stmt.close();
} catch (SQLException e) {
System.out.println("Delete exception: " + e);
}
return (result);
}}
| [
"jahin99@gmail.com"
] | jahin99@gmail.com |
851c762a4dd40e79763ddf2ab33c4656864745a6 | 650fb61802df0b7338e72d83da63f4f400b9bd4f | /app/src/main/java/com/hayukleung/view/SonarInfiniteLoadingView/SonarInfiniteLoadingViewActivity.java | 59370969df554de71141f6775b60a381a91b1529 | [] | no_license | sazewdfcvg16/View | 0242fb5c0b47cfe439724a569ca5a6171e5fff90 | 3b85035b946cd478c18332c62e0eae07b5e5f74e | refs/heads/master | 2022-03-30T13:54:08.800010 | 2020-01-14T08:48:13 | 2020-01-14T08:48:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 610 | java | package com.hayukleung.view.SonarInfiniteLoadingView;
import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import com.hayukleung.view.R;
/**
* View
* com.hayukleung.view.SonarInfiniteLoadingView
* SonarInfiniteLoadingViewActivity.java
*
* by hayukleung
* at 2016-12-23 16:36
*/
public class SonarInfiniteLoadingViewActivity extends AppCompatActivity {
@Override protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sonar_infinite_loading_view);
}
}
| [
"hayukleung@gmail.com"
] | hayukleung@gmail.com |
f9788ffae7e80da3d540d4d0decf029ebbd1007c | b7fa352c328ad105e66f066ebce9e68bd5728ac2 | /src/main/java/com/erp/biz/api/model/mp/CertificateNumber.java | 9dcbcf983a50d0240c15e62b5ef2ec2a9273e5db | [
"MIT"
] | permissive | diwang011/erp | c9582b07be3ebb157223955ba0de156605fed188 | 401238ffd1182b16bd998c75fe403476d97bb6a1 | refs/heads/master | 2020-04-05T12:38:30.798693 | 2017-07-20T09:27:54 | 2017-07-20T09:27:54 | 95,205,973 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,669 | java | //
// 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.11 生成的
// 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// 在重新编译源模式时, 对此文件的所有修改都将丢失。
// 生成时间: 2017.05.23 时间 11:38:50 AM CST
//
package com.erp.biz.api.model.mp;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* If the item has a certificate, enter the certificate number here. Separate multiple values by semicolons.
*
* <p>CertificateNumber complex type的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
*
* <pre>
* <complexType name="CertificateNumber">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="certificateNumberValue" maxOccurs="unbounded">
* <simpleType>
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <maxLength value="100"/>
* <minLength value="1"/>
* </restriction>
* </simpleType>
* </element>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CertificateNumber", propOrder = {
"certificateNumberValue"
})
public class CertificateNumber {
@XmlElement(required = true)
protected List<String> certificateNumberValue;
/**
* Gets the value of the certificateNumberValue property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the certificateNumberValue property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getCertificateNumberValue().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getCertificateNumberValue() {
if (certificateNumberValue == null) {
certificateNumberValue = new ArrayList<String>();
}
return this.certificateNumberValue;
}
}
| [
"feizhou@omniselling.net"
] | feizhou@omniselling.net |
f1acff7365c7fc6308ee34070165945627a3df71 | 10861d659456bf799056164df1d7aa49c4ff807d | /SWIFTMatching/src/main/java/com/prowidesoftware/swift/model/field/Field82J.java | 2756bcf2f666e4786f934838ce0530dc2512ac18 | [] | no_license | mavrk/brainwaves2019 | 061e783ada97bbb25ac4f8422f539e75dfc676a7 | 5aad21487d29b191cd9673d92604a19ef4341050 | refs/heads/master | 2020-04-29T06:59:07.977333 | 2019-03-17T03:11:26 | 2019-03-17T03:11:26 | 175,937,269 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,987 | java | /*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*/
package com.prowidesoftware.swift.model.field;
import java.io.Serializable;
import org.apache.commons.lang.StringUtils;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.utils.SwiftFormatUtils;
/**
* Field 82J<br /><br />
*
* validation pattern: <PARTYFLD/J><br />
* parser pattern: S<br />
* components pattern: S<br />
*
* <h1>Components Data types</h1>
* <ul>
* <li>component1: <code>String</code></li>
* </ul>
*
* <em>NOTE: this source code has been generated from template</em>
*
* @author www.prowidesoftware.com
*
*/
@SuppressWarnings("unused")
public class Field82J extends Field implements Serializable {
private static final long serialVersionUID = 1L;
/**
* Constant with the field name 82J
*/
public static final String NAME = "82J";
/**
* same as NAME, intended to be clear when using static imports
*/
public static final String F_82J = "82J";
public static final String PARSER_PATTERN ="S";
public static final String COMPONENTS_PATTERN = "S";
/**
* Create a Tag with this field name and the given value.
* Shorthand for <code>new Tag(NAME, value)</code>
* @see #NAME
* @since 7.5
*/
public static Tag tag(final String value) {
return new Tag(NAME, value);
}
/**
* Create a Tag with this field name and an empty string as value
* Shorthand for <code>new Tag(NAME, "")</code>
* @see #NAME
* @since 7.5
*/
public static Tag emptyTag() {
return new Tag(NAME, "");
}
/**
* Default constructor
*/
public Field82J() {
super(1);
}
/**
* Creates the field parsing the parameter value into fields' components
* @param value
*/
public Field82J(String value) {
this();
setComponent1(value);
}
/**
* Serializes the fields' components into the single string value (SWIFT format)
*/
@Override
public String getValue() {
final StringBuilder result = new StringBuilder();
result.append(StringUtils.trimToEmpty(getComponent1()));
return result.toString();
}
/**
* Get the component1
* @return the component1
*/
public String getComponent1() {
return getComponent(1);
}
/**
* Same as getComponent(1)
*/
@Deprecated
public java.lang.String getComponent1AsString() {
return getComponent(1);
}
/**
* Set the component1.
* @param component1 the component1 to set
*/
public Field82J setComponent1(String component1) {
setComponent(1, component1);
return this;
}
/**
* Given a component number it returns true if the component is optional,
* regardless of the field being mandatory in a particular message.<br />
* Being the field's value conformed by a composition of one or several
* internal component values, the field may be present in a message with
* a proper value but with some of its internal components not set.
*
* @param component component number, first component of a field is referenced as 1
* @return true if the component is optional for this field, false otherwise
*/
@Override
public boolean isOptional(int component) {
return false;
}
/**
* Returns true if the field is a GENERIC FIELD as specified by the standard.
*
* @return true if the field is generic, false otherwise
*/
@Override
public boolean isGeneric() {
return false;
}
public String componentsPattern() {
return COMPONENTS_PATTERN;
}
public String parserPattern() {
return PARSER_PATTERN;
}
/**
* @deprecated use constant Field82J */
@Override
public String getName() {
return NAME;
}
/**
* Get the first occurrence form the tag list or null if not found.
* @return null if not found o block is null or empty
* @param block may be null or empty
*/
public static Field82J get(final SwiftTagListBlock block) {
if (block == null || block.isEmpty()) {
return null;
}
return (Field82J) block.getFieldByName(NAME);
}
/**
* Get the first instance of Field82J in the given message.
* @param msg may be empty or null
* @return null if not found or msg is empty or null
* @see #get(SwiftTagListBlock)
*/
public static Field82J get(final SwiftMessage msg) {
if (msg == null || msg.getBlock4()==null || msg.getBlock4().isEmpty())
return null;
return get(msg.getBlock4());
}
/**
* Get a list of all occurrences of the field Field82J in the given message
* an empty list is returned if none found.
* @param msg may be empty or null in which case an empty list is returned
* @see #getAll(SwiftTagListBlock)
*/
public static java.util.List<Field82J> getAll(final SwiftMessage msg) {
if (msg == null || msg.getBlock4()==null || msg.getBlock4().isEmpty())
return null;
return getAll(msg.getBlock4());
}
/**
* Get a list of all occurrences of the field Field82J from the given block
* an empty list is returned if none found.
*
* @param block may be empty or null in which case an empty list is returned
*/
public static java.util.List<Field82J> getAll(final SwiftTagListBlock block) {
if (block == null || block.isEmpty()) {
return null;
}
final Field[] arr = block.getFieldsByName(NAME);
if (arr != null && arr.length>0) {
final java.util.ArrayList<Field82J> result = new java.util.ArrayList<Field82J>(arr.length);
for (final Field f : arr) {
result.add((Field82J) f);
}
return result;
}
return java.util.Collections.emptyList();
}
}
| [
"sanatt.abrol.in@gmail.com"
] | sanatt.abrol.in@gmail.com |
efe5e2cb45bc63ba1d9c52ad87a78948d7023a27 | 784835911f40bbb1d051a8613dfcf2bcad46ba7e | /ECommerceJSF/src/main/java/br/edu/unitri/util/ReportUtil.java | 16b8ec4bf3323f7b5bc69fc076b8612d60888fd1 | [] | no_license | marcosfba/workJava | 701f56f8b73b1a427ae4c79c8e8d1ff30903ce9e | e83d556dbc1813b29d722b74665e9a409e8d9c6d | refs/heads/master | 2021-01-10T18:49:52.570469 | 2015-12-14T10:12:17 | 2015-12-14T10:12:17 | 40,247,444 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,416 | java | /**
*
*/
package br.edu.unitri.util;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import javax.faces.context.FacesContext;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import net.sf.jasperreports.engine.JRDataSource;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRExporterParameter;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.engine.export.JRPdfExporter;
import net.sf.jasperreports.engine.xml.JRXmlLoader;
/**
* @author Marcos
*
*/
public class ReportUtil {
public static void geraArquivoRelatorio(String reportFileName,
JRDataSource dataSource) throws JRException, FileNotFoundException {
String caminho = UtilBean.getReportResource() + reportFileName
+ ".jrxml";
// System.out.println(caminho);
InputStream input = null;
try {
input = new FileInputStream(caminho);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
JasperDesign jasperDesign = null;
JasperReport jasperReport = null;
JasperPrint jasperPrint = null;
try {
jasperDesign = JRXmlLoader.load(input);
} catch (Exception e) {
e.printStackTrace();
}
try {
jasperReport = JasperCompileManager.compileReport(jasperDesign);
} catch (Exception e) {
e.printStackTrace();
}
HashMap<String, Object> parametros = new HashMap<String, Object>();
try {
jasperPrint = JasperFillManager.fillReport(jasperReport,
parametros, dataSource);
} catch (Exception e) {
e.printStackTrace();
}
try {
createReport(reportFileName, jasperPrint);
} catch (IOException e) {
e.printStackTrace();
}
}
private static void createReport(String arquivo, JasperPrint jasperPrint)
throws IOException {
FacesContext facesContext = FacesContext.getCurrentInstance();
facesContext.responseComplete();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
JRPdfExporter exporter = new JRPdfExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos);
ServletOutputStream outputStream = null;
try {
exporter.exportReport();
byte[] bytes = baos.toByteArray();
if (bytes != null && bytes.length > 0) {
HttpServletResponse response = (HttpServletResponse) facesContext
.getExternalContext().getResponse();
response.setContentType("application/pdf");
response.setHeader("Content-disposition", "inline; filename=\""
+ arquivo + ".pdf\"");
response.setContentLength(bytes.length);
outputStream = response.getOutputStream();
outputStream.write(bytes, 0, bytes.length);
}
} catch (IOException e) {
throw new IOException(e);
} catch (JRException e) {
throw new IOException(e);
} finally {
try {
outputStream.flush();
outputStream.close();
} catch (IOException e) {
throw new IOException(e);
}
}
}
}
| [
"marcosfba.algar@gmail.com"
] | marcosfba.algar@gmail.com |
1dc52d7ef97660d407aae97e3cc653adb13f3b87 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/32/32_004d9c4b6a1b00500d874378008021131d8e3e1c/InterceptorStack/32_004d9c4b6a1b00500d874378008021131d8e3e1c_InterceptorStack_s.java | 81198fe735f24a38d9052535857890bd315b7eb0 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 6,949 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.openejb.core.interceptor;
import static org.apache.openejb.util.Join.join;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Stack;
import javax.interceptor.InvocationContext;
import org.apache.openejb.core.Operation;
import org.apache.openejb.core.ThreadContext;
import org.apache.openejb.util.Classes;
import org.apache.openejb.util.LogCategory;
import org.apache.openejb.util.Logger;
/**
* @version $Rev$ $Date$
*/
public class InterceptorStack {
private static final Logger logger = Logger.getInstance(LogCategory.OPENEJB, "org.apache.openejb.util.resources");
private final Object beanInstance;
private final List<Interceptor> interceptors;
private final Method targetMethod;
private final Operation operation;
public InterceptorStack(Object beanInstance, Method targetMethod, Operation operation, List<InterceptorData> interceptorDatas, Map<String, Object> interceptorInstances) {
if (interceptorDatas == null) throw new NullPointerException("interceptorDatas is null");
if (interceptorInstances == null) throw new NullPointerException("interceptorInstances is null");
this.beanInstance = beanInstance;
this.targetMethod = targetMethod;
this.operation = operation;
interceptors = new ArrayList<Interceptor>(interceptorDatas.size());
// try {
// interceptors.add(new Interceptor(new Debug(), Debug.class.getMethod("invoke", InvocationContext.class)));
// } catch (Throwable e) {
// }
for (InterceptorData interceptorData : interceptorDatas) {
Class interceptorClass = interceptorData.getInterceptorClass();
Object interceptorInstance = interceptorInstances.get(interceptorClass.getName());
if (interceptorInstance == null) {
throw new IllegalArgumentException("No interceptor of type " + interceptorClass.getName());
}
Set<Method> methods = interceptorData.getMethods(operation);
for (Method method : methods) {
Interceptor interceptor = new Interceptor(interceptorInstance, method);
interceptors.add(interceptor);
}
}
}
private static final ThreadLocal<Stack> stack = new ThreadLocal<Stack>();
private class Debug {
private Stack stack() {
Stack s = stack.get();
if (s == null){
s = new Stack();
stack.set(s);
}
return s;
}
public Object invoke(InvocationContext context) throws Exception {
try {
StringBuilder sb = new StringBuilder();
ThreadContext threadContext = ThreadContext.getThreadContext();
String txPolicy = threadContext.getTransactionPolicy().getClass().getSimpleName();
String ejbName = threadContext.getBeanContext().getEjbName();
String methodName = targetMethod.getName() + "(" + join(", ", Classes.getSimpleNames(targetMethod.getParameterTypes())) + ")";
sb.append(join("", stack()));
sb.append(ejbName).append(".");
sb.append(methodName).append(" <").append(txPolicy).append("> {");
synchronized (System.out){
System.out.println(sb.toString());
}
} catch (Throwable e) {
}
try {
stack().push(" ");
return context.proceed();
} finally {
stack().pop();
StringBuilder sb = new StringBuilder();
sb.append(join("", stack()));
sb.append("}");
synchronized (System.out){
System.out.println(sb.toString());
}
}
}
}
public InvocationContext createInvocationContext(Object... parameters) {
InvocationContext invocationContext = new ReflectionInvocationContext(operation, interceptors, beanInstance, targetMethod, parameters);
return invocationContext;
}
public Object invoke(Object... parameters) throws Exception {
try {
InvocationContext invocationContext = createInvocationContext(parameters);
if (ThreadContext.getThreadContext() != null) {
ThreadContext.getThreadContext().set(InvocationContext.class, invocationContext);
}
Object value = invocationContext.proceed();
return value;
} finally {
if (ThreadContext.getThreadContext() != null) {
ThreadContext.getThreadContext().remove(InvocationContext.class);
}
}
}
public Object invoke(javax.xml.ws.handler.MessageContext messageContext, Object... parameters) throws Exception {
try {
InvocationContext invocationContext = new JaxWsInvocationContext(operation, interceptors, beanInstance, targetMethod, messageContext, parameters);
ThreadContext.getThreadContext().set(InvocationContext.class, invocationContext);
Object value = invocationContext.proceed();
return value;
} finally {
ThreadContext.getThreadContext().remove(InvocationContext.class);
}
}
public Object invoke(javax.xml.rpc.handler.MessageContext messageContext, Object... parameters) throws Exception {
try {
InvocationContext invocationContext = new JaxRpcInvocationContext(operation, interceptors, beanInstance, targetMethod, messageContext, parameters);
ThreadContext.getThreadContext().set(InvocationContext.class, invocationContext);
Object value = invocationContext.proceed();
return value;
} finally {
ThreadContext.getThreadContext().remove(InvocationContext.class);
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
70b5a312539c4831c92db57fe91d5142eddd9690 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mobileqqi/classes.jar/chx.java | ffcd623ce0a1d6058892523fbcb48a389317299a | [] | 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 | 541 | java | import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import com.tencent.mobileqq.activity.DiscussionMemberActivity;
public class chx
implements View.OnClickListener
{
public chx(DiscussionMemberActivity paramDiscussionMemberActivity) {}
public void onClick(View paramView)
{
this.a.a.setText("");
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mobileqqi\classes2.jar
* Qualified Name: chx
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
561365ba4c9bf01127d5c4551464c6aa1d5bd0f3 | ddcf14f5681a2b511749017f4ff5514748c93940 | /family_service_platform/src/main/java/com/msb/controller/base/FyPublicBoxUserController.java | 96ec8b5cbffe91c595a2db32ccd87355c6b48d0d | [] | no_license | leiyungit/property-server | f811f61c7bb1a57c90de340089a5a9cdd8b3393d | a28934935c6d029df54f45affa0c26bef7e0bc98 | refs/heads/main | 2023-01-06T12:36:35.742747 | 2020-11-14T14:36:59 | 2020-11-14T14:36:59 | 305,880,106 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 344 | java | package com.msb.controller.base;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
/**
* <p>
* 公表关联用户 前端控制器
* </p>
*
* @author leiy
* @since 2020-10-21
*/
@Controller
@RequestMapping("/fyPublicBoxUser")
public class FyPublicBoxUserController {
}
| [
"744561873@qq.com"
] | 744561873@qq.com |
9678fc61904767f53aba9b6c7e49b334f36c2a93 | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /large-multiproject/project12/src/test/java/org/gradle/test/performance12_4/Test12_346.java | b39caf6bc3524cae1979cef3dec851a3f11a3a3c | [] | no_license | gradle/performance-comparisons | b0d38db37c326e0ce271abebdb3c91769b860799 | e53dc7182fafcf9fedf07920cbbea8b40ee4eef4 | refs/heads/master | 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null | UTF-8 | Java | false | false | 292 | java | package org.gradle.test.performance12_4;
import static org.junit.Assert.*;
public class Test12_346 {
private final Production12_346 production = new Production12_346("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
cc84849931888c1c3e7bad102713c263c4ee1d49 | 9e9610df2de50fe3bc16d1865d7d503e0b4277a0 | /common/src/main/java/cn/sohu/jack/thinking/java/chapeter21concurrent/ExplicitPairManager2.java | 5074f59dc07d7cf43c931036bcf4a4c360ad5ad5 | [] | no_license | JackAbel/voyage | aba80e324dce768b212bffab747cca8f7e0a46ed | e7acbb4d3645a5e5bdbf05eb741f4e53561010de | refs/heads/master | 2022-12-01T21:26:16.392513 | 2020-09-28T11:49:03 | 2020-09-28T11:49:03 | 173,219,466 | 0 | 0 | null | 2022-11-16T05:51:51 | 2019-03-01T02:14:50 | Java | UTF-8 | Java | false | false | 602 | java | package cn.sohu.jack.thinking.java.chapeter21concurrent;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
/**
* @description:
* @author: Xiangbao Jin
* @since 2019/8/23 2:47 PM
*/
public class ExplicitPairManager2 extends PairManager {
private Lock lock = new ReentrantLock();
public synchronized void increment() {
Pair temp;
lock.lock();
try {
p.incrementX();
p.incrementY();
temp = getPair();
} finally {
lock.unlock();
}
store(getPair());
}
}
| [
"xiangbaojin215867@sohu-inc.com"
] | xiangbaojin215867@sohu-inc.com |
468c245cd2a9f8d25af48bfb66f987d3be6daf81 | 701e0e470785e8cd0abe3ad81da3f5e0333b6f12 | /CF/B551.java | 423c1c86918aa353ee88e46e07bd9830e85ea213 | [] | no_license | Omarkojak/competitive-programming-solutions | 684d2ea6b1496f63b040d444e26c017cd490347a | 5dfac7ba8a6d7521e14d9a3376f0997710c37ccb | refs/heads/master | 2020-05-26T12:20:01.550217 | 2017-03-22T13:49:49 | 2017-03-22T13:49:49 | 84,997,697 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,606 | java | package CF;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class B551 {
public static void main(String[] args) throws IOException {
Scanner in = new Scanner(System.in);
StringBuilder sb = new StringBuilder();
String a = in.nextLine();
String b = in.nextLine();
String c = in.nextLine();
int[] cnta = new int[26];
int[] cntb = new int[26];
int[] cntc = new int[26];
for (int i = 0; i < a.length(); i++)
cnta[a.charAt(i) - 'a']++;
for (int i = 0; i < b.length(); i++)
cntb[b.charAt(i) - 'a']++;
for (int i = 0; i < c.length(); i++)
cntc[c.charAt(i) - 'a']++;
while (true) {
int c1 = (int) 1e7;
for (int i = 0; i < 26; i++)
if (cntb[i] != 0)
c1 = Math.min(cnta[i] / cntb[i], c1);
int c2 = (int) 1e7;
for (int i = 0; i < 26; i++)
if (cntc[i] != 0)
c2 = Math.min(cnta[i] / cntc[i], c2);
if (c1 == 0 && c2 == 0)
break;
if (c1 > c2) {
for (int i = 0; i < b.length(); i++)
cnta[b.charAt(i) - 'a']--;
sb.append(b);
} else {
for (int i = 0; i < c.length(); i++)
cnta[c.charAt(i) - 'a']--;
sb.append(c);
}
}
for (int i = 0; i < 26; i++) {
char k = (char) ('a' + i);
while (cnta[i]-- > 0)
sb.append(k);
}
System.out.println(sb);
}
static class Scanner {
StringTokenizer st;
BufferedReader br;
public Scanner(InputStream s) {
br = new BufferedReader(new InputStreamReader(s));
}
public String next() throws IOException {
while (st == null || !st.hasMoreTokens())
st = new StringTokenizer(br.readLine());
return st.nextToken();
}
public int nextInt() throws IOException {
return Integer.parseInt(next());
}
public long nextLong() throws IOException {
return Long.parseLong(next());
}
public String nextLine() throws IOException {
return br.readLine();
}
public double nextDouble() throws IOException {
String x = next();
StringBuilder sb = new StringBuilder("0");
double res = 0, f = 1;
boolean dec = false, neg = false;
int start = 0;
if (x.charAt(0) == '-') {
neg = true;
start++;
}
for (int i = start; i < x.length(); i++)
if (x.charAt(i) == '.') {
res = Long.parseLong(sb.toString());
sb = new StringBuilder("0");
dec = true;
} else {
sb.append(x.charAt(i));
if (dec)
f *= 10;
}
res += Long.parseLong(sb.toString()) / f;
return res * (neg ? -1 : 1);
}
public boolean ready() throws IOException {
return br.ready();
}
}
} | [
"omarkojaks@gmail.com"
] | omarkojaks@gmail.com |
0497224c2f8d5f1c09a57753c94efffcc109380a | f39a93222b1ba17a4d1cb8ae8340186d51bf5590 | /src/collection/linked_list/LinkedListImpl.java | e323d72a8f9be986409cb04c20c6ecd6f6d3bda9 | [] | no_license | cocodas/javaBasic | c625b88d5f65c30e4dbe6281ed850b960217acd1 | 22bae8817742ca98d05bb0a7ffe572f1682b5990 | refs/heads/master | 2018-12-28T21:48:50.420389 | 2015-09-12T09:13:02 | 2015-09-12T09:13:17 | 25,062,807 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,490 | java | package collection.linked_list;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
public class LinkedListImpl<E> {
private LinkedList<E> linkedList;
public LinkedListImpl()
{
linkedList = new LinkedList<E>();
}
public LinkedListImpl(Collection<? extends E> c)
{
linkedList = new LinkedList<E>(c);
}
public boolean add(E e)
{
return linkedList.add(e);
}
public void add(int index, E element)
{
linkedList.add(index, element);
}
public boolean addAll(Collection<? extends E> c)
{
return linkedList.addAll(c);
}
public boolean addAll(int index, Collection<? extends E> c)
{
return linkedList.addAll(index, c);
}
public void addFirst(E e)
{
linkedList.addFirst(e);
}
public void addLast(E e)
{
linkedList.addLast(e);
}
public void clear()
{
linkedList.clear();
}
public Object clone()
{
return linkedList.clone();
}
public boolean contains(Object o)
{
return linkedList.contains(o);
}
public Iterator<E> descendingIterator()
{
return linkedList.descendingIterator();
}
public E element()
{
return linkedList.element();
}
public E get(int index)
{
return linkedList.get(index);
}
public E getFirst()
{
return linkedList.getFirst();
}
public E getLast()
{
return linkedList.getLast();
}
public int indexOf(Object o)
{
return linkedList.indexOf(o);
}
public boolean isEmpty()
{
return linkedList.isEmpty();
}
public Iterator<E> iterator()
{
return linkedList.iterator();
}
public int lastIndexOf(Object o)
{
return linkedList.lastIndexOf(o);
}
public ListIterator<E> listIterator()
{
return linkedList.listIterator();
}
public ListIterator<E> listIterator(int index)
{
return linkedList.listIterator(index);
}
public boolean offer(E e)
{
return linkedList.offer(e);
}
public boolean offerFirst(E e)
{
return linkedList.offerFirst(e);
}
public boolean offerLast(E e)
{
return linkedList.offerLast(e);
}
public E peek()
{
return linkedList.peek();
}
public E peekFirst()
{
return linkedList.peekFirst();
}
public E peekLast()
{
return linkedList.peekLast();
}
public E poll()
{
return linkedList.poll();
}
public E pollFirst()
{
return linkedList.pollFirst();
}
public E pollLast()
{
return linkedList.peekLast();
}
public E pop()
{
return linkedList.pop();
}
public void push(E e)
{
linkedList.push(e);
}
public E remove(int index)
{
return linkedList.remove(index);
}
public boolean remove(Object o)
{
return linkedList.remove(o);
}
public boolean removeAll(Collection<?> c)
{
return linkedList.removeAll(c);
}
public E removeFirst()
{
return linkedList.removeFirst();
}
public boolean removeFirstOccurence(Object o)
{
return linkedList.removeFirstOccurrence(o);
}
public E removeLast()
{
return linkedList.removeLast();
}
public boolean removeLastOccurence(Object o)
{
return linkedList.removeLastOccurrence(o);
}
public boolean retainAll(Collection<?> c)
{
return linkedList.removeAll(c);
}
public E set(int index, E element)
{
return linkedList.set(index, element);
}
public int size()
{
return linkedList.size();
}
public List<E> subList(int fromIndex, int toIndex)
{
return linkedList.subList(fromIndex, toIndex);
}
public Object[] toArray()
{
return linkedList.toArray();
}
public <T> T[] toArray(T[] a)
{
return linkedList.toArray(a);
}
}
| [
"sunq0011@gmail.com"
] | sunq0011@gmail.com |
a471ea7548ac20c0b3fd7ce5ef8f35ae2c04c3ac | 97fd02f71b45aa235f917e79dd68b61c62b56c1c | /src/main/java/com/tencentcloudapi/cdb/v20170320/models/CloseCDBProxyRequest.java | d18ae80ddc402139c575a67a7359217ff2b12e05 | [
"Apache-2.0"
] | permissive | TencentCloud/tencentcloud-sdk-java | 7df922f7c5826732e35edeab3320035e0cdfba05 | 09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec | refs/heads/master | 2023-09-04T10:51:57.854153 | 2023-09-01T03:21:09 | 2023-09-01T03:21:09 | 129,837,505 | 537 | 317 | Apache-2.0 | 2023-09-13T02:42:03 | 2018-04-17T02:58:16 | Java | UTF-8 | Java | false | false | 3,607 | java | /*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.cdb.v20170320.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class CloseCDBProxyRequest extends AbstractModel{
/**
* 实例ID
*/
@SerializedName("InstanceId")
@Expose
private String InstanceId;
/**
* 代理组ID
*/
@SerializedName("ProxyGroupId")
@Expose
private String ProxyGroupId;
/**
* 是否只关闭读写分离,取值:"true" | "false",默认为"false"
*/
@SerializedName("OnlyCloseRW")
@Expose
private Boolean OnlyCloseRW;
/**
* Get 实例ID
* @return InstanceId 实例ID
*/
public String getInstanceId() {
return this.InstanceId;
}
/**
* Set 实例ID
* @param InstanceId 实例ID
*/
public void setInstanceId(String InstanceId) {
this.InstanceId = InstanceId;
}
/**
* Get 代理组ID
* @return ProxyGroupId 代理组ID
*/
public String getProxyGroupId() {
return this.ProxyGroupId;
}
/**
* Set 代理组ID
* @param ProxyGroupId 代理组ID
*/
public void setProxyGroupId(String ProxyGroupId) {
this.ProxyGroupId = ProxyGroupId;
}
/**
* Get 是否只关闭读写分离,取值:"true" | "false",默认为"false"
* @return OnlyCloseRW 是否只关闭读写分离,取值:"true" | "false",默认为"false"
*/
public Boolean getOnlyCloseRW() {
return this.OnlyCloseRW;
}
/**
* Set 是否只关闭读写分离,取值:"true" | "false",默认为"false"
* @param OnlyCloseRW 是否只关闭读写分离,取值:"true" | "false",默认为"false"
*/
public void setOnlyCloseRW(Boolean OnlyCloseRW) {
this.OnlyCloseRW = OnlyCloseRW;
}
public CloseCDBProxyRequest() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public CloseCDBProxyRequest(CloseCDBProxyRequest source) {
if (source.InstanceId != null) {
this.InstanceId = new String(source.InstanceId);
}
if (source.ProxyGroupId != null) {
this.ProxyGroupId = new String(source.ProxyGroupId);
}
if (source.OnlyCloseRW != null) {
this.OnlyCloseRW = new Boolean(source.OnlyCloseRW);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "InstanceId", this.InstanceId);
this.setParamSimple(map, prefix + "ProxyGroupId", this.ProxyGroupId);
this.setParamSimple(map, prefix + "OnlyCloseRW", this.OnlyCloseRW);
}
}
| [
"tencentcloudapi@tencent.com"
] | tencentcloudapi@tencent.com |
abbbf5266fe82b60eaf26517e6dfdcab12c9a8ec | d664922140376541680caeff79873f21f64eb5aa | /tags/qagesa/v2.3fe/GAP/src/net/sf/gap/AbstractGAP.java | 0d2c7281fab4377b314b862af6ad99c26c2c1835 | [] | no_license | gnovelli/gap | 7d4b6e2eb7e1c0e62e86d26147c5de9c558d62f7 | fd1cac76504d10eb96294a768833a9bdb102e66f | refs/heads/master | 2021-01-10T20:11:00.977571 | 2012-02-23T20:19:44 | 2012-02-23T20:19:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,038 | java | /*
****************************************************************************************
* Copyright © Giovanni Novelli
* All Rights Reserved.
****************************************************************************************
*
* Title: AbstractGAP Simulator
* Description: AbstractGAP (Grid Agents Platform) Toolkit for Modeling and Simulation
* of Mobile Agents on Grids
* License: GPL - http://www.gnu.org/copyleft/gpl.html
*
* AbstractGAP.java
*
* Created on 16 August 2006, 21.47 by Giovanni Novelli
*
****************************************************************************************
*
* $Revision: 441 $
* $Id: AbstractGAP.java 441 2008-02-15 15:20:14Z gnovelli $
* $HeadURL: https://gap.svn.sourceforge.net/svnroot/gap/tags/qagesa/v2.3fe/GAP/src/net/sf/gap/AbstractGAP.java $
*
*****************************************************************************************
*/
package net.sf.gap;
import org.junit.Assert;
import eduni.simjava.Sim_system;
import gridsim.GridSim;
/**
* This class is mainly responsible in initialization, running and stopping of
* the overall simulation, adding a simple unifying abstraction for such actions
* above of GridSim and SimJava2.
*
* @author Giovanni Novelli
* @see gridsim.GridSim
*
*/
public abstract class AbstractGAP {
/**
* Used for no resource ID associated to an agent (its AID isn't alive or
* never lived)
*/
public static final int NOWHERE = -1;
/**
* Platform's Start Time
*/
private static double platformStartTime;
/**
* Simulation's Start Time
*/
private static double startTime;
/**
* Simulation's End Time
*/
private static double endTime;
/**
* Flag about generating Graphs
*/
private static boolean graphing;
protected static boolean isGraphing() {
return graphing;
}
public static void setGraphing(boolean aGraphing) {
graphing = aGraphing;
}
/**
* Creates a new instance of AbstractGAP
*/
public AbstractGAP() {
AbstractGAP.setGraphing(true);
}
/**
* Creates a new instance of AbstractGAP indicating preference about
* graphing
*/
public AbstractGAP(boolean aGraphing) {
AbstractGAP.setGraphing(aGraphing);
}
/**
* Static initialization
*/
static {
AbstractGAP.setPlatformStartTime(100.0);
AbstractGAP.setStartTime(200.0);
AbstractGAP.setEndTime(500.0);
Assert.assertFalse(AbstractGAP.getPlatformStartTime() > AbstractGAP
.getStartTime());
Assert.assertFalse(AbstractGAP.getStartTime() > AbstractGAP
.getEndTime());
}
protected static void startSimulation() {
Sim_system.set_report_detail(true, true);
Sim_system.generate_graphs(AbstractGAP.isGraphing());
GridSim.startGridSimulation();
}
protected static void stopSimulation() {
GridSim.stopGridSimulation();
}
/**
* @return true if a AbstractGAP simulation is running
*/
public static final boolean isRunning() {
return (GridSim.clock() < AbstractGAP.getEndTime());
}
/**
* @return AbstractGAP Simulation start time
*/
public static final double getStartTime() {
return startTime;
}
/**
* @param aStartTime
* sets AbstractGAP Simulation start time
*/
public static final void setStartTime(double aStartTime) {
startTime = aStartTime;
}
/**
* @return AbstractGAP Simulation end time
*/
public static final double getEndTime() {
return endTime;
}
/**
* @param aEndTime
* sets AbstractGAP Simulation end time
*/
public static final void setEndTime(double aEndTime) {
endTime = aEndTime;
}
/**
* @return AbstractGAP Simulation platform start time
*/
public static double getPlatformStartTime() {
return platformStartTime;
}
/**
* @param aPlatformStartTime
* sets AbstractGAP Simulation platform start time
*/
public static void setPlatformStartTime(double aPlatformStartTime) {
platformStartTime = aPlatformStartTime;
}
}
| [
"giovanni.novelli@gmail.com"
] | giovanni.novelli@gmail.com |
53f4b07a85ca8fc01ece591a15654d6f084a297e | df7202a99c5125da03a3f29d9aac6a1a261dc18a | /src/main/java/lab/zlren/xunwu/entity/User.java | 01d6bcf58110054b49f43c57883eea4097ebc078 | [] | no_license | zlren/xunwu | 300b475f255b62b18536b4a1844052fe6a293e84 | b3c3a34358331563de46f9a96b1238c2fe65a743 | refs/heads/master | 2021-09-03T11:06:50.856945 | 2018-01-08T15:01:10 | 2018-01-08T15:01:10 | 116,553,410 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,367 | java | package lab.zlren.xunwu.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
/**
* 用户基本信息表
*
* @author zlren
* @since 2018-01-07
*/
@Data
@Accessors(chain = true)
public class User implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 用户唯一id
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 用户名
*/
private String name;
/**
* 电子邮箱
*/
private String email;
/**
* 电话号码
*/
@TableField("phone_number")
private String phoneNumber;
/**
* 密码
*/
private String password;
/**
* 用户状态 0-正常 1-封禁
*/
private Integer status;
/**
* 用户账号创建时间
*/
@TableField("create_time")
private Date createTime;
/**
* 上次登录时间
*/
@TableField("last_login_time")
private Date lastLoginTime;
/**
* 上次更新记录时间
*/
@TableField("last_update_time")
private Date lastUpdateTime;
/**
* 头像
*/
private String avatar;
}
| [
"zlren2012@163.com"
] | zlren2012@163.com |
d5e8d50c1318b8a8510e59cdca7931eb48bd4cd4 | 32f38cd53372ba374c6dab6cc27af78f0a1b0190 | /app/src/main/java/com/autonavi/minimap/basemap/tips/TipInfo.java | eeb45f1c306e783f47a9f6c84d436ed88e4261c8 | [] | no_license | shuixi2013/AmapCode | 9ea7aefb42e0413f348f238f0721c93245f4eac6 | 1a3a8d4dddfcc5439df8df570000cca12b15186a | refs/heads/master | 2023-06-06T23:08:57.391040 | 2019-08-29T04:36:02 | 2019-08-29T04:36:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 580 | java | package com.autonavi.minimap.basemap.tips;
import android.view.View;
public final class TipInfo {
public String a;
public View b;
public View c;
public int d;
public int e;
public int f;
public int g;
public Direction h;
public Gravity i;
public Runnable j;
public int k;
public String l;
public int m;
public Runnable n;
public enum Direction {
LEFT,
TOP,
RIGHT,
BOTTOM
}
public enum Gravity {
LEFT,
TOP,
RIGHT,
BOTTOM,
CENTER
}
}
| [
"hubert.yang@nf-3.com"
] | hubert.yang@nf-3.com |
8e486c356623986a44e4d2fe73caa7b4b957fb30 | ccb80fd76f16884ab6c3b28998a3526ac38ec321 | /ctakes-ytex-uima/src/main/java/org/apache/ctakes/ytex/uima/lookup/ae/StemmedLookupAnnotationToJCasAdapter.java | 1da12717d0f442378b94c7ee0e053e397bda7f55 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | apache/ctakes | 5d5c35a7c8c906e21d52488396adeb40ebd7034e | def3dea5602945dfbec260d4faaabfbc0a2a2ad4 | refs/heads/main | 2023-07-02T18:28:53.754174 | 2023-05-18T00:00:51 | 2023-05-18T00:00:51 | 26,951,043 | 97 | 77 | Apache-2.0 | 2022-10-18T23:28:24 | 2014-11-21T08:00:09 | Java | UTF-8 | Java | false | false | 2,463 | java | /**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.ctakes.ytex.uima.lookup.ae;
import org.apache.ctakes.dictionary.lookup.vo.LookupAnnotation;
import org.apache.ctakes.dictionary.lookup.vo.LookupToken;
import org.apache.ctakes.typesystem.type.syntax.WordToken;
import org.apache.ctakes.ytex.tools.SetupAuiFirstWord;
import org.apache.uima.jcas.tcas.Annotation;
import java.util.HashMap;
import java.util.Map;
/**
* allow dictionary lookup with stemmed words
*
* @author vijay
*
*/
public class StemmedLookupAnnotationToJCasAdapter implements LookupAnnotation,
LookupToken {
private Map<String, String> iv_attrMap = new HashMap<String, String>();
private Annotation iv_jcasAnnotObj;
public StemmedLookupAnnotationToJCasAdapter(Annotation jcasAnnotObj) {
iv_jcasAnnotObj = jcasAnnotObj;
}
public void addStringAttribute(String attrKey, String attrVal) {
iv_attrMap.put(attrKey, attrVal);
}
public int getEndOffset() {
return iv_jcasAnnotObj.getEnd();
}
public int getLength() {
return getStartOffset() - getEndOffset();
}
public int getStartOffset() {
return iv_jcasAnnotObj.getBegin();
}
public String getStringAttribute(String attrKey) {
return (String) iv_attrMap.get(attrKey);
}
/**
* if this is a word, return the stemmed word, if available - i.e. canonicalForm not null and not empty.
* else return the covered text.
* @see SetupAuiFirstWord
*/
public String getText() {
if (iv_jcasAnnotObj instanceof WordToken) {
WordToken wt = (WordToken) iv_jcasAnnotObj;
if (wt.getCanonicalForm() != null && wt.getCanonicalForm().length() > 0)
return wt.getCanonicalForm();
}
return iv_jcasAnnotObj.getCoveredText();
}
} | [
"sean.finan@childrens.harvard.edu"
] | sean.finan@childrens.harvard.edu |
043c37a1ff72bf19e3d64ca78cd6a105f13d02c4 | 70583bbcf0d17588e08dabd73387274385066bea | /src/main/java/history/POHistoryController.java | 7f059f1abe13fc7099ec75dd42b9761b8548a112 | [
"MIT"
] | permissive | ivantha/pos-system | 9e653022289a58e7bbda28af018e90d8de45b490 | ca8016901e63a5f4dd2206573b7d8ad23cc46da1 | refs/heads/master | 2022-11-08T09:17:09.835212 | 2020-07-03T06:00:18 | 2020-07-03T06:00:18 | 110,659,001 | 0 | 0 | MIT | 2020-07-03T05:50:48 | 2017-11-14T08:01:58 | Java | UTF-8 | Java | false | false | 3,202 | java | /*
* Copyright © 02.10.2015 by O.I.Mudannayake. All Rights Reserved.
*/
package history;
import purchaseorder.NewPOController;
import database.sql.type.PurchaseOrderSQL;
import java.awt.event.ActionEvent;
import javax.swing.table.DefaultTableModel;
import controller.Controller;
import ui.support.Frame;
import controller.ControllerFactory;
import controller.Interface;
import database.sql.SQLStatement;
import database.sql.SQLFactory;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import javax.swing.event.InternalFrameAdapter;
import javax.swing.event.InternalFrameEvent;
import ui.support.Info;
/**
*
* @author Ivantha
*/
public class POHistoryController implements Controller{
private final POHistory view = new POHistory();
private final PurchaseOrderSQL purchaseOrderSQL = (PurchaseOrderSQL) SQLFactory.getSQLStatement(SQLStatement.PURCHASE_ORDER);
private String poNoSearchPhrase = "";
private String supplierSearchPhrase = "";
private String employeeSearchPhrase = "";
private String greaterThanSearchPhrase = "";
private String lessThanSearchPhrase = "";
public POHistoryController() {
//Update view
view.updateViewInternalFrameListener(new InternalFrameAdapter() {
@Override
public void internalFrameActivated(InternalFrameEvent e) {
POHistoryController.this.updateView();
}
});
//New button
view.addNewButtonActionListener((ActionEvent e) -> {
NewPOController newPOController = (NewPOController) ControllerFactory.getController(Interface.NEW_PO);
newPOController.showView();
});
//Edit button
view.addEditButtonActionListener((ActionEvent e) -> {
Info.error("Invalid function", "This feature is not yet implemented");
});
//Remove button
view.addRemoveButtonActionListener((ActionEvent e) -> {
Info.error("Invalid function", "This feature is not yet implemented");
});
//Search
view.addSearchKeyListener(new KeyAdapter() {
@Override
public void keyReleased(KeyEvent e) {
poNoSearchPhrase = view.poNoTextField.getText().trim();
supplierSearchPhrase = view.supplierTextField.getText().trim();
employeeSearchPhrase = view.employeeTextField.getText().trim();
greaterThanSearchPhrase = view.greaterThanTextField.getText().trim();
lessThanSearchPhrase = view.lessThanTextField.getText().trim();
POHistoryController.this.updateView();
}
});
view.addSearchActionlistener((ActionEvent e) -> {
POHistoryController.this.updateView();
});
}
@Override
public void showView(){
this.updateView();
Frame.showInternalFrame(view);
}
@Override
public void updateView(){
DefaultTableModel dtm = (DefaultTableModel) view.poTable.getModel();
dtm.setRowCount(0);
purchaseOrderSQL.showPO(dtm);
}
@Override
public void clearView() {}
} | [
"oshan.ivantha@gmail.com"
] | oshan.ivantha@gmail.com |
8eb88500b1f4b02c1f98c6a70861d7f2052e1023 | 7016cec54fb7140fd93ed805514b74201f721ccd | /src/java/com/echothree/util/common/command/CommandResult.java | ad43e3d4ed00ea308c3df0e83afff116a9a62ed6 | [
"MIT",
"Apache-1.1",
"Apache-2.0"
] | permissive | echothreellc/echothree | 62fa6e88ef6449406d3035de7642ed92ffb2831b | bfe6152b1a40075ec65af0880dda135350a50eaf | refs/heads/master | 2023-09-01T08:58:01.429249 | 2023-08-21T11:44:08 | 2023-08-21T11:44:08 | 154,900,256 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,324 | java | // --------------------------------------------------------------------------------
// Copyright 2002-2023 Echo Three, LLC
//
// 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.echothree.util.common.command;
import com.echothree.util.common.form.ValidationResult;
import com.echothree.util.common.message.Messages;
import java.io.Serializable;
public class CommandResult
implements Serializable {
SecurityResult securityResult;
ValidationResult validationResult;
ExecutionResult executionResult;
/** Creates a new instance of CommandResult */
public CommandResult(SecurityResult securityResult, ValidationResult validationResult, ExecutionResult executionResult) {
this.securityResult = securityResult;
this.validationResult = validationResult;
this.executionResult = executionResult;
}
public boolean hasSecurityMessages() {
return securityResult == null ? false : securityResult.getHasMessages();
}
public boolean hasValidationErrors() {
return validationResult == null ? false : validationResult.getHasErrors();
}
public boolean hasExecutionWarnings() {
return executionResult == null ? false : executionResult.getHasWarnings();
}
public boolean hasExecutionErrors() {
return executionResult == null ? false : executionResult.getHasErrors();
}
public boolean hasErrors() {
return hasSecurityMessages() || hasValidationErrors() || hasExecutionErrors();
}
public Boolean getHasErrors() {
return hasErrors();
}
public boolean hasWarnings() {
return hasExecutionWarnings();
}
public Boolean getHasWarnings() {
return hasWarnings();
}
public SecurityResult getSecurityResult() {
return securityResult;
}
public ValidationResult getValidationResult() {
return validationResult;
}
public ExecutionResult getExecutionResult() {
return executionResult;
}
public boolean containsSecurityMessage(String key) {
boolean result;
if(securityResult != null) {
Messages securityMessages = securityResult.getSecurityMessages();
if(securityMessages != null) {
result = securityMessages.containsKey(Messages.SECURITY_MESSAGE, key);
} else {
result = false;
}
} else {
result = false;
}
return result;
}
public boolean containsExecutionWarning(String key) {
boolean result;
if(executionResult != null) {
Messages executionWarnings = executionResult.getExecutionWarnings();
if(executionWarnings != null) {
result = executionWarnings.containsKey(Messages.EXECUTION_WARNING, key);
} else {
result = false;
}
} else {
result = false;
}
return result;
}
public boolean containsExecutionError(String key) {
boolean result;
if(executionResult != null) {
Messages executionErrors = executionResult.getExecutionErrors();
if(executionErrors != null) {
result = executionErrors.containsKey(Messages.EXECUTION_ERROR, key);
} else {
result = false;
}
} else {
result = false;
}
return result;
}
@Override
public String toString() {
return new StringBuilder().append("{ securityResult = ").append(securityResult).append(", validationResult = ").append(validationResult).append(", executionResult = ").append(executionResult).append(" }").toString();
}
}
| [
"rich@echothree.com"
] | rich@echothree.com |
497a9d5cbed43f4431add1c8c59b6ca604bfe01d | e884dff4ca310592aadc43ac0d6dd0540cb1246e | /src/main/java/org/springframework/data/ldap/repository/support/LdapAnnotationProcessor.java | 0e502777f11b1f1e56ffc77e429280096e8d775f | [
"LicenseRef-scancode-generic-cla"
] | no_license | spring-operator/spring-data-ldap | b57afa874770b9a4dd6a1dfc132abc9ee7d3aef5 | b5110b8fc49ff28e4dc52e8501acc9e042bb24c9 | refs/heads/master | 2020-04-27T05:20:31.862560 | 2019-02-28T17:06:34 | 2019-02-28T17:06:34 | 174,078,735 | 0 | 0 | null | 2019-03-06T05:37:19 | 2019-03-06T05:37:19 | null | UTF-8 | Java | false | false | 2,328 | java | /*
* Copyright 2016-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.ldap.repository.support;
import java.util.Collections;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import javax.tools.Diagnostic;
import org.springframework.ldap.odm.annotations.Entry;
import org.springframework.ldap.odm.annotations.Transient;
import com.querydsl.apt.AbstractQuerydslProcessor;
import com.querydsl.apt.Configuration;
import com.querydsl.apt.DefaultConfiguration;
import com.querydsl.core.annotations.QueryEntities;
/**
* QueryDSL Annotation Processor to generate QueryDSL classes for entity classes annotated with {@link Entry}.
*
* @author Mattias Hellborg Arthursson
* @author Eddu Melendez
* @author Mark Paluch
*/
@SupportedAnnotationTypes("org.springframework.ldap.odm.annotations.*")
@SupportedSourceVersion(SourceVersion.RELEASE_6)
public class LdapAnnotationProcessor extends AbstractQuerydslProcessor {
/* (non-Javadoc)
* @see com.querydsl.apt.AbstractQuerydslProcessor#createConfiguration(javax.annotation.processing.RoundEnvironment)
*/
@Override
protected Configuration createConfiguration(RoundEnvironment roundEnv) {
processingEnv.getMessager().printMessage(Diagnostic.Kind.NOTE, "Running " + getClass().getSimpleName());
DefaultConfiguration configuration = new DefaultLdapAnnotationProcessorConfiguration(roundEnv,
processingEnv.getOptions(), Collections.emptySet(), QueryEntities.class, Entry.class, null, null, null,
Transient.class);
configuration.setUseFields(true);
configuration.setUseGetters(false);
return configuration;
}
}
| [
"mpaluch@pivotal.io"
] | mpaluch@pivotal.io |
e9f6229c6b57f75b56dd71f03f1f66c904e57b33 | 7e713646a0619267b421aafa41a9afeeaf7a0108 | /src/main/java/com/gdztyy/inca/mapper/BmsGoodsSortRuleDefMapper.java | af27a857074ced8aebce386af3c35de1f1e86870 | [] | no_license | liutaota/ipl | 4757e35d1100ca892f2137b690ee4b43b908dc19 | 9d53b9044ba56b6ea65f1347a779d4b66e075bea | refs/heads/master | 2023-03-21T11:28:42.663574 | 2021-03-05T08:49:33 | 2021-03-05T08:49:33 | 344,747,852 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 311 | java | package com.gdztyy.inca.mapper;
import com.gdztyy.inca.entity.BmsGoodsSortRuleDef;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author peiqy
* @since 2020-08-18
*/
public interface BmsGoodsSortRuleDefMapper extends BaseMapper<BmsGoodsSortRuleDef> {
}
| [
"liutao@qq.com"
] | liutao@qq.com |
41ace792fc0dd63951feb706ef8fa767b3a0f1d9 | ad861e0ba1acb3333acf0a60adbdf2f3a8a8b23c | /src/com/cn/javass/dp/bridge/example6/Client.java | fe77382ad3a6e9f3f22d9348328472167afc9e83 | [] | no_license | qingziguanjun/datastructure | 2b0487ee2196a32628425ae398daa06700f786e0 | 74fab15e932599bac8e8a9d15ec848fe9fd88154 | refs/heads/master | 2021-07-05T16:08:32.839758 | 2021-05-06T06:52:11 | 2021-05-06T06:52:11 | 234,649,789 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 908 | java | package com.cn.javass.dp.bridge.example6;
public class Client {
public static void main(String[] args) {
//创建具体的实现对象
MessageImplementor impl = new MessageSMS();
//创建一个普通消息对象
AbstractMessage m = new CommonMessage(impl);
m.sendMessage("请喝一杯茶", "小李");
//创建一个紧急消息对象
m = new UrgencyMessage(impl);
m.sendMessage("请喝一杯茶", "小李");
//创建一个特急消息对象
m = new SpecialUrgencyMessage(impl);
m.sendMessage("请喝一杯茶", "小李");
//把实现方式切换成手机短消息,然后再实现一遍
impl = new MessageMobile();
m = new CommonMessage(impl);
m.sendMessage("请喝一杯茶", "小李");
m = new UrgencyMessage(impl);
m.sendMessage("请喝一杯茶", "小李");
m = new SpecialUrgencyMessage(impl);
m.sendMessage("请喝一杯茶", "小李");
}
}
| [
"songyi@meituan.com"
] | songyi@meituan.com |
35117476cf4f5de2d68e72e0b6f091bce486ecc7 | 43c182c690d19c78f2058635f596b9cc25cef28b | /ec-seller-domain/src/main/java/com/ec/seller/domain/OrderDetail.java | f0b8d882b25d6713d8df325ef8b4f2aa65ba73f0 | [] | no_license | 15550141/ec-seller | f003427e11c852836244d5127db8660cff0a5d7a | 594e67dd225ff73f185026a94d826e5df180d879 | refs/heads/master | 2020-04-16T18:26:14.815084 | 2018-04-21T19:18:34 | 2018-04-21T19:18:34 | 48,567,785 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,103 | java | package com.ec.seller.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang.StringUtils;
/**
* 订单购物车
*
*/
public class OrderDetail implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
/** 自增ID */
private Integer id;
/** 订单ID */
private Integer orderId;
/** SKU_ID */
private Integer skuId;
/** item_id */
private Integer itemId;
/** 商品名称 */
private String itemName;
/**
* 销售属性
*/
private String salesProperty;
/**
* 销售属性名称
*/
private String salesPropertyName;
/** 价格 */
private Integer price;
/** 数量 */
private Integer num;
/** 商品图片 */
private String itemImage;
/** 创建时间 */
private Date created;
/** 修改时间 */
private Date modified;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getOrderId() {
return orderId;
}
public void setOrderId(Integer orderId) {
this.orderId = orderId;
}
public Integer getSkuId() {
return skuId;
}
public void setSkuId(Integer skuId) {
this.skuId = skuId;
}
public Integer getPrice() {
return price;
}
public void setPrice(Integer price) {
this.price = price;
}
public Integer getNum() {
return num;
}
public void setNum(Integer num) {
this.num = num;
}
public String getItemName() {
return itemName;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
public String getItemImage() {
return itemImage;
}
public void setItemImage(String itemImage) {
this.itemImage = itemImage;
}
public Date getCreated() {
return created;
}
public void setCreated(Date created) {
this.created = created;
}
public Date getModified() {
return modified;
}
public void setModified(Date modified) {
this.modified = modified;
}
public String getSalesProperty() {
return salesProperty;
}
public void setSalesProperty(String salesProperty) {
this.salesProperty = salesProperty;
}
public Integer getItemId() {
return itemId;
}
public void setItemId(Integer itemId) {
this.itemId = itemId;
}
public String getSalesPropertyName(){
return this.salesPropertyName;
}
public List<String> getSalesPropertyNameList(){
if(StringUtils.isBlank(this.salesPropertyName)){
return null;
}
String[] arr = this.salesPropertyName.split("\\^");
List<String> list = new ArrayList<String>();
for(int i=0;i<arr.length;i++){
list.add(arr[i]);
}
return list;
}
public BigDecimal getBigDecimalPrice(){
if(this.price == null){
return new BigDecimal(0);
}
return new BigDecimal(this.price).divide(new BigDecimal(100));
}
} | [
"15550141@qq.com"
] | 15550141@qq.com |
860b9e2f0e2079258a0009aa9534cc8ec6490abe | 2c16007de25b78fa7f010cf8d471606b1bb31b2e | /aspects/src/test/java/test/patterns/readwritelock/Account.java | f1579a8e974f950cdf7cb0a250ee60c8e3ccc705 | [] | no_license | stalep/jboss-aop | 24e1c64acb48540dca858fa3b093861b91f724eb | f9d6e15fc724f9e1c07a98aa301a52b4273a882f | refs/heads/master | 2022-07-08T04:31:18.718343 | 2009-01-28T03:01:01 | 2009-01-28T03:01:01 | 116,122 | 3 | 2 | null | 2022-07-01T22:17:50 | 2009-01-27T22:31:04 | Java | UTF-8 | Java | false | false | 1,938 | java | /*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt 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 test.patterns.readwritelock;
/**
* @version <tt>$Revision$</tt>
* @author <a href="mailto:chussenet@yahoo.com">{Claude Hussenet Independent Consultant}</a>.
*/
public class Account
{
private float balance;
public Account(float balance)
{
this.balance=balance;
}
public void debit(float amount)
{
float currentBalance = balance;
process(amount);
this.balance = currentBalance-amount;
}
public void credit(float amount)
{
float currentBalance = balance;
process(amount);
this.balance = currentBalance+amount;
}
public String toString()
{
return new StringBuffer("Balance: $").append(this.balance).toString();
}
public float getBalance()
{
return balance;
}
public void process(float ll)
{
try {
Thread.sleep((long)ll);
}
catch (Exception e)
{
System.out.println(e);
}
}
}
| [
"kabir.khan@jboss.com@84be2c1e-ba19-0410-b317-a758671a6fc1"
] | kabir.khan@jboss.com@84be2c1e-ba19-0410-b317-a758671a6fc1 |
463186c5b87e813e3df018949901a4aabb12b769 | 57a690002af777c892d566942de706368613fd00 | /src/main/java/org/tyaa/wildflyservice/repository/UserRepository.java | 13a68077392ac5411d3a28b4ba42c389c90504f5 | [] | no_license | YuriiTrofimenko/JavaWildFlyService | 2e1c3fdd2490dc0171be6dca8295f5c640ea192c | c51b4c427b2c522bd30b02bdfd3e244521a89e23 | refs/heads/master | 2020-04-05T20:31:22.847014 | 2018-11-12T08:59:53 | 2018-11-12T08:59:53 | 157,184,056 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,828 | 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 org.tyaa.wildflyservice.repository;
import java.util.List;
import java.util.logging.Logger;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.persistence.EntityManager;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;
import org.tyaa.wildflyservice.entity.User;
/**
*
* @author Yurii
*/
@ApplicationScoped
public class UserRepository {
@Inject
private Logger logger;
@Inject
private EntityManager entityManager;
public User getById(long id){
logger.info("Get User by id: " + id);
return entityManager.find(User.class, id);
}
public User getByUserName(String nick_name){
logger.info("Get users by nick_name: " + nick_name);
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
CriteriaQuery<User> criteriaQuery = criteriaBuilder.createQuery(User.class);
Root<User> element = criteriaQuery.from(User.class);
criteriaQuery.select(element)
.where(criteriaBuilder.equal(element.get("nick_name"), nick_name));
return entityManager.createQuery(criteriaQuery).getSingleResult();
}
public List<User> getAll() {
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
CriteriaQuery<User> criteria = criteriaBuilder.createQuery(User.class);
Root<User> element = criteria.from(User.class);
return entityManager.createQuery(criteria).getResultList();
}
}
| [
"tyaa@ukr.net"
] | tyaa@ukr.net |
2ae6f40f5f0a6cf9b3ea183e0b96b9f5ddc4bfd5 | 9b8cf8ac14b85c5a4a1e40a22ffd97a0b28eb656 | /pad/YanxiuBaseCore/src/main/java/com/yanxiu/basecore/impl/YanxiuHttpAsyncTaskInterface.java | de2fb8b84b205e5d7a9ee53dab201bc8283e7648 | [] | no_license | Dwti/yxyl_old | 901ce917591eab2d2d556a719bff8b69669128f6 | b91be2c16ad42ef99356a75fdb5923c03d3a4d73 | refs/heads/master | 2020-03-17T20:08:17.738647 | 2018-05-18T03:03:50 | 2018-05-18T03:03:50 | 133,894,755 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 529 | java | package com.yanxiu.basecore.impl;
import com.yanxiu.basecore.bean.YanxiuBaseBean;
import com.yanxiu.basecore.bean.YanxiuDataHull;
/**
* 异步任务接口类(网络任务)
*/
public interface YanxiuHttpAsyncTaskInterface<T extends YanxiuBaseBean> {
/**
* 异步任务开始前
*/
public boolean onPreExecute();
/**
* 异步任务执行
*/
public YanxiuDataHull<T> doInBackground();
/**
* 异步任务完成
*/
public void onPostExecute(int updateId, T result);
}
| [
"yangjunjian@yanxiu.com"
] | yangjunjian@yanxiu.com |
7f9bce55524925ccb1efcc5fbcb954ab7df009af | de077e29e6f63f6df43ec119d9b2a3318563e221 | /core/src/main/java/xdi2/core/xri3/impl/parser/Rule$xri_sub_delims.java | 9fda03233d774f3794e95219e3ab46f3d17ce038 | [
"MIT"
] | permissive | prashaantt/xdi2 | 8a0eb292355118218fb06aa28c2c5857d58b8933 | 48c0d4d0fa554120294ebe59676bfa574495881e | refs/heads/master | 2021-01-18T16:50:48.042723 | 2012-11-06T09:55:31 | 2012-11-06T09:55:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,916 | java | /* -----------------------------------------------------------------------------
* Rule$xri_sub_delims.java
* -----------------------------------------------------------------------------
*
* Producer : com.parse2.aparse.Parser 2.2
* Produced : Fri Oct 19 08:29:48 CEST 2012
*
* -----------------------------------------------------------------------------
*/
package xdi2.core.xri3.impl.parser;
import java.util.ArrayList;
final public class Rule$xri_sub_delims extends Rule
{
private Rule$xri_sub_delims(String spelling, ArrayList<Rule> rules)
{
super(spelling, rules);
}
public Object accept(Visitor visitor)
{
return visitor.visit(this);
}
public static Rule$xri_sub_delims parse(ParserContext context)
{
context.push("xri-sub-delims");
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 = Terminal$StringValue.parse(context, "&");
if ((f1 = rule != null))
{
e1.add(rule);
c1++;
}
}
parsed = c1 == 1;
}
if (parsed)
e0.addAll(e1);
else
context.index = s1;
}
}
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 = Terminal$StringValue.parse(context, ";");
if ((f1 = rule != null))
{
e1.add(rule);
c1++;
}
}
parsed = c1 == 1;
}
if (parsed)
e0.addAll(e1);
else
context.index = s1;
}
}
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 = Terminal$StringValue.parse(context, ",");
if ((f1 = rule != null))
{
e1.add(rule);
c1++;
}
}
parsed = c1 == 1;
}
if (parsed)
e0.addAll(e1);
else
context.index = s1;
}
}
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 = Terminal$StringValue.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$xri_sub_delims(context.text.substring(s0, context.index), e0);
else
context.index = s0;
context.pop("xri-sub-delims", parsed);
return (Rule$xri_sub_delims)rule;
}
}
/* -----------------------------------------------------------------------------
* eof
* -----------------------------------------------------------------------------
*/
| [
"markus.sabadello@gmail.com"
] | markus.sabadello@gmail.com |
50121106d101409687f15acbb99b5d76e0cc8d14 | 5e933e35df0998d51584b84341cdded343bd8f70 | /AndEngine/src/org/andengine/input/sensor/acceleration/IAccelerationListener.java | eb612e701a9362f563413ef0c3f95e36d4e1e23a | [] | no_license | nullpoin7er/Funky-Domino | 4b783b7da0dbe96bf50e47d240f55b46215bf44d | 870f010f787f19814c3be11974253764292fb497 | refs/heads/master | 2021-01-17T12:41:30.133134 | 2012-02-26T12:33:36 | 2012-02-26T12:33:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 804 | java | package org.andengine.input.sensor.acceleration;
/**
* (c) 2010 Nicolas Gramlich
* (c) 2011 Zynga Inc.
*
* @author Nicolas Gramlich
* @since 16:58:38 - 10.03.2010
*/
public interface IAccelerationListener {
// ===========================================================
// Constants
// ===========================================================
// ===========================================================
// Methods
// ===========================================================
/**
*
* @param pAccelerationData
*/
public void onAccelerationAccuracyChanged(final AccelerationData pAccelerationData);
/**
*
* @param pAccelerationData
*/
public void onAccelerationChanged(final AccelerationData pAccelerationData);
}
| [
"guillaumepoiriermorency@gmail.com"
] | guillaumepoiriermorency@gmail.com |
5281d15e7f4ac633145ae3fcfba81b87724c904a | 3fcb8a44e8406b1340412392660d0a89b111413a | /BME/src/main/java/medizin/client/managed/ui/QuestionTypeSetEditor.java | 86f27751c9d0f522b91b8b8f2c8866b708efae58 | [] | no_license | nikotsunami/bme | 6426e37d7f5a53a8addca9cc74579983424a7330 | 9c14e496f57b3764679a4222fdc313fc8a2ab600 | refs/heads/master | 2016-08-08T04:36:43.693418 | 2011-10-22T13:50:36 | 2011-10-22T13:50:36 | 2,615,618 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 6,630 | java | // WARNING: DO NOT EDIT THIS FILE. THIS FILE IS MANAGED BY SPRING ROO.
package medizin.client.managed.ui;
import com.google.gwt.core.client.GWT;
import com.google.gwt.editor.client.Editor;
import com.google.gwt.editor.client.Editor.Ignore;
import com.google.gwt.editor.client.EditorDelegate;
import com.google.gwt.editor.client.LeafValueEditor;
import com.google.gwt.editor.client.ValueAwareEditor;
import com.google.gwt.editor.client.adapters.EditorSource;
import com.google.gwt.editor.client.adapters.ListEditor;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.requestfactory.client.RequestFactoryEditorDriver;
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.ValueListBox;
import com.google.gwt.user.client.ui.Widget;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import medizin.client.managed.request.QuestionTypeProxy;
import medizin.client.managed.ui.QuestionTypeSetEditor.Style;
import medizin.client.scaffold.ui.CollectionRenderer;
public class QuestionTypeSetEditor extends QuestionTypeSetEditor_Roo_Gwt {
@UiField
FlowPanel container;
@UiField(provided = true)
@Ignore
ValueListBox<QuestionTypeProxy> picker = new ValueListBox<QuestionTypeProxy>(medizin.client.managed.ui.QuestionTypeProxyRenderer.instance(), new com.google.gwt.requestfactory.ui.client.EntityProxyKeyProvider<QuestionTypeProxy>());
@UiField
Button add;
@UiField
HTMLPanel editorPanel;
@UiField
Button clickToEdit;
@UiField
HTMLPanel viewPanel;
@UiField
Label viewLabel;
@UiField
Style style;
boolean editing = false;
private Set<QuestionTypeProxy> values;
private final List<QuestionTypeProxy> displayedList;
public QuestionTypeSetEditor() {
initWidget(GWT.<Binder>create(Binder.class).createAndBindUi(this));
Driver driver = GWT.<Driver>create(Driver.class);
ListEditor<QuestionTypeProxy, NameLabel> editor = ListEditor.of(new NameLabelSource());
ListEditor<QuestionTypeProxy, NameLabel> listEditor = editor;
driver.initialize(listEditor);
driver.display(new ArrayList<QuestionTypeProxy>());
displayedList = listEditor.getList();
editing = false;
}
@UiHandler("add")
public void addClicked(ClickEvent e) {
if (!displayedList.contains(picker.getValue())) {
displayedList.add(picker.getValue());
viewLabel.setText(makeFlatList(displayedList));
}
}
@UiHandler("clickToEdit")
public void clickToEditClicked(ClickEvent e) {
toggleEditorMode();
}
@Override
public void flush() {
}
@Override
public Set<medizin.client.managed.request.QuestionTypeProxy> getValue() {
if (values == null && displayedList.size() == 0) {
return null;
}
return new HashSet<QuestionTypeProxy>(displayedList);
}
public void onLoad() {
makeEditable(false);
}
@Override
public void onPropertyChange(String... strings) {
}
public void setAcceptableValues(Collection<QuestionTypeProxy> proxies) {
picker.setAcceptableValues(proxies);
}
@Override
public void setDelegate(EditorDelegate<Set<QuestionTypeProxy>> editorDelegate) {
}
@Override
public void setValue(Set<QuestionTypeProxy> values) {
this.values = values;
makeEditable(editing = false);
if (displayedList != null) {
displayedList.clear();
}
if (values != null) {
for (QuestionTypeProxy e : values) {
displayedList.add(e);
}
}
viewLabel.setText(makeFlatList(values));
}
private void makeEditable(boolean editable) {
if (editable) {
editorPanel.setStylePrimaryName(style.editorPanelVisible());
viewPanel.setStylePrimaryName(style.viewPanelHidden());
clickToEdit.setText("Done");
} else {
editorPanel.setStylePrimaryName(style.editorPanelHidden());
viewPanel.setStylePrimaryName(style.viewPanelVisible());
clickToEdit.setText("Edit");
}
}
private String makeFlatList(Collection<QuestionTypeProxy> values) {
return CollectionRenderer.of(medizin.client.managed.ui.QuestionTypeProxyRenderer.instance()).render(values);
}
private void toggleEditorMode() {
editing = !editing;
makeEditable(editing);
}
interface Binder extends UiBinder<Widget, QuestionTypeSetEditor> {
}
interface Driver extends RequestFactoryEditorDriver<List<QuestionTypeProxy>, ListEditor<QuestionTypeProxy, NameLabel>> {
}
class NameLabel extends Composite implements ValueAwareEditor<QuestionTypeProxy> {
final Label questionTypeNameEditor = new Label();
public NameLabel() {
this(null);
}
public NameLabel(EventBus eventBus) {
initWidget(questionTypeNameEditor);
}
public void flush() {
}
@Override
public void onPropertyChange(String... strings) {
}
@Override
public void setDelegate(EditorDelegate<QuestionTypeProxy> editorDelegate) {
}
@Override
public void setValue(QuestionTypeProxy proxy) {
}
}
interface Style extends CssResource {
String editorPanelHidden();
String editorPanelVisible();
String viewPanelHidden();
String viewPanelVisible();
}
private class NameLabelSource extends EditorSource<NameLabel> {
@Override
public NameLabel create(int index) {
NameLabel label = new NameLabel();
container.insert(label, index);
return label;
}
@Override
public void dispose(NameLabel subEditor) {
subEditor.removeFromParent();
}
@Override
public void setIndex(NameLabel editor, int index) {
container.insert(editor, index);
}
}
}
| [
"nikotsunami@gmail.com"
] | nikotsunami@gmail.com |
3c4ca8373f0372e24239ca4b2a46a02d4eef04f7 | 5616c6d85cce13e6a2362865a09ea39dee00ac89 | /com/sun/corba/se/PortableActivationIDL/InvalidORBidHolder.java | c6f24fcae145b600f4ea0922685f27c79b52eee9 | [] | no_license | Wyc92/jdkLearn | b44bf61b3036ae39a2eb1f2f8964c8175f5f22a0 | 3f532e3e9f5a4cfdf311546d33e1d31388e9d63f | refs/heads/master | 2023-03-04T01:38:22.371356 | 2021-01-11T05:34:06 | 2021-01-11T05:34:06 | 337,035,082 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,143 | java | package com.sun.corba.se.PortableActivationIDL;
/**
* com/sun/corba/se/PortableActivationIDL/InvalidORBidHolder.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /scratch/jenkins/workspace/8-2-build-linux-amd64/jdk8u271/605/corba/src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl
* Wednesday, September 16, 2020 5:02:54 PM GMT
*/
public final class InvalidORBidHolder implements org.omg.CORBA.portable.Streamable
{
public com.sun.corba.se.PortableActivationIDL.InvalidORBid value = null;
public InvalidORBidHolder ()
{
}
public InvalidORBidHolder (com.sun.corba.se.PortableActivationIDL.InvalidORBid initialValue)
{
value = initialValue;
}
public void _read (org.omg.CORBA.portable.InputStream i)
{
value = com.sun.corba.se.PortableActivationIDL.InvalidORBidHelper.read (i);
}
public void _write (org.omg.CORBA.portable.OutputStream o)
{
com.sun.corba.se.PortableActivationIDL.InvalidORBidHelper.write (o, value);
}
public org.omg.CORBA.TypeCode _type ()
{
return com.sun.corba.se.PortableActivationIDL.InvalidORBidHelper.type ();
}
}
| [
"1092317465@qq.com"
] | 1092317465@qq.com |
ad4acf45b1825a8a2e75637878c455fdb24ad2ad | 28b32f3098bdcaed5cb876c6f25cb121dab7d85e | /src/main/java/sample/SpringRebootedApplication.java | 83b0350659126716f8527c743bf1f110f1ad6a96 | [] | no_license | rwinch/spring-rebooted | e23853a0459a0e03ec7809e25cb90e9d54f0a99f | 13e829f831f48ad7d0fd07c8b6c5fbb10e508a99 | refs/heads/master | 2020-04-19T03:54:03.080146 | 2016-08-26T00:55:04 | 2016-08-26T00:57:58 | 66,373,562 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 856 | java | package sample;
import javax.sql.DataSource;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.security.provisioning.JdbcUserDetailsManager;
@SpringBootApplication
public class SpringRebootedApplication {
@Bean
JdbcUserDetailsManager userDetailsManager(DataSource dataSource) {
JdbcUserDetailsManager jdbc = new JdbcUserDetailsManager();
jdbc.setDataSource(dataSource);
jdbc.setUsersByUsernameQuery("select username, password, true from user where username = ?");
jdbc.setAuthoritiesByUsernameQuery("select username, 'ROLE_USER' from user where username = ?");
return jdbc;
}
public static void main(String[] args) {
SpringApplication.run(SpringRebootedApplication.class, args);
}
}
| [
"rwinch@gopivotal.com"
] | rwinch@gopivotal.com |
1ae2b9938f795340492232a37af5679183cfff17 | 45f20bf4597b5f89e5293c35e223204159310956 | /quickfixj-core/src/main/java/quickfix/field/EndMaturityMonthYear.java | 0cf599761f12e389a0de74106e0f2a421130c1a3 | [
"BSD-2-Clause",
"LicenseRef-scancode-public-domain"
] | permissive | lloydchan/quickfixj | 9d42924c8e9d4cc0a96821faa4006fcd4b0d21c4 | e26446c775b3f63d93bb4e8d6f02fde8a22d73fc | refs/heads/master | 2020-07-31T21:20:20.178481 | 2019-09-26T14:40:49 | 2019-09-26T14:40:49 | 210,757,360 | 0 | 0 | null | 2019-09-25T04:46:02 | 2019-09-25T04:46:01 | null | UTF-8 | Java | false | false | 1,161 | java | /* Generated Java Source File */
/*******************************************************************************
* Copyright (c) quickfixengine.org All rights reserved.
*
* This file is part of the QuickFIX FIX Engine
*
* This file may be distributed under the terms of the quickfixengine.org
* license as defined by quickfixengine.org and appearing in the file
* LICENSE included in the packaging of this file.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING
* THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE.
*
* See http://www.quickfixengine.org/LICENSE for licensing information.
*
* Contact ask@quickfixengine.org if any conditions of this licensing
* are not clear to you.
******************************************************************************/
package quickfix.field;
import quickfix.StringField;
public class EndMaturityMonthYear extends StringField {
static final long serialVersionUID = 20050617;
public static final int FIELD = 1226;
public EndMaturityMonthYear() {
super(1226);
}
public EndMaturityMonthYear(String data) {
super(1226, data);
}
}
| [
"lloyd.khc.chan@gmail.com"
] | lloyd.khc.chan@gmail.com |
e77f43d315ea8b51bf51c097246eb2b792553ea1 | eaec8c87fb8a6af57b5d6f18e15c127d1e829f56 | /src/main/java/groupnet/algorithm/bezier/Cyclic.java | 7003366a6e7c1bec96606eaf73b5a19fe8ba41b2 | [
"Apache-2.0"
] | permissive | AlmasB/D2020 | 23f7493124ab4b7f45bb30b129c23d95fc9440f3 | 4aaa9de60ecdba5b9402b809e1e6e62489a1d790 | refs/heads/master | 2022-11-20T16:21:12.808291 | 2020-05-11T10:08:39 | 2020-05-11T10:08:39 | 174,802,362 | 0 | 0 | Apache-2.0 | 2022-11-16T08:45:59 | 2019-03-10T09:26:02 | Kotlin | UTF-8 | Java | false | false | 4,376 | java | /*
* The MIT License (MIT)
*
* FXGL - JavaFX Game Library
*
* Copyright (c) 2015-2017 AlmasB (almaslvl@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 groupnet.algorithm.bezier;
/**
* Adapted from https://www.codeproject.com/Articles/33776/Draw-Closed-Smooth-Curve-with-Bezier-Spline
*
* @author Almas Baimagambetov (almaslvl@gmail.com)
*/
/// <summary>
/// Solves the cyclic set of linear equations.
/// </summary>
/// <remarks>
/// The cyclic set of equations have the form
/// ---------------------------
/// b0 c0 0 · · · · · · ß
/// a1 b1 c1 · · · · · · ·
/// · · · · · · · · · · ·
/// · · · a[n-2] b[n-2] c[n-2]
/// a · · · · 0 a[n-1] b[n-1]
/// ---------------------------
/// This is a tridiagonal system, except for the matrix elements
/// a and ß in the corners.
/// </remarks>
public class Cyclic
{
/// <summary>
/// Solves the cyclic set of linear equations.
/// </summary>
/// <remarks>
/// All vectors have size of n although some elements are not used.
/// The input is not modified.
/// </remarks>
/// <param name="a">Lower diagonal vector of size n; a[0] not used.</param>
/// <param name="b">Main diagonal vector of size n.</param>
/// <param name="c">Upper diagonal vector of size n; c[n-1] not used.</param>
/// <param name="alpha">Bottom-left corner value.</param>
/// <param name="beta">Top-right corner value.</param>
/// <param name="rhs">Right hand side vector.</param>
/// <returns>The solution vector of size n.</returns>
public static double[] Solve(double[] a, double[] b,
double[] c, double alpha, double beta, double[] rhs)
{
// a, b, c and rhs vectors must have the same size.
if (a.length != b.length || c.length != b.length ||
rhs.length != b.length)
throw new IllegalArgumentException
("Diagonal and rhs vectors must have the same size.");
int n = b.length;
if (n <= 2)
throw new IllegalArgumentException
("n too small in Cyclic; must be greater than 2.");
double gamma = -b[0]; // Avoid subtraction error in forming bb[0].
// Set up the diagonal of the modified tridiagonal system.
double[] bb = new double[n];
bb[0] = b[0] - gamma;
bb[n-1] = b[n - 1] - alpha * beta / gamma;
for (int i = 1; i < n - 1; ++i)
bb[i] = b[i];
// Solve A · x = rhs.
double[] solution = Tridiagonal.Solve(a, bb, c, rhs);
double[] x = new double[n];
for (int k = 0; k < n; ++k)
x[k] = solution[k];
// Set up the vector u.
double[] u = new double[n];
u[0] = gamma;
u[n-1] = alpha;
for (int i = 1; i < n - 1; ++i)
u[i] = 0.0;
// Solve A · z = u.
solution = Tridiagonal.Solve(a, bb, c, u);
double[] z = new double[n];
for (int k = 0; k < n; ++k)
z[k] = solution[k];
// Form v · x/(1 + v · z).
double fact = (x[0] + beta * x[n - 1] / gamma)
/ (1.0 + z[0] + beta * z[n - 1] / gamma);
// Now get the solution vector x.
for (int i = 0; i < n; ++i)
x[i] -= fact * z[i];
return x;
}
}
| [
"almaslvl@gmail.com"
] | almaslvl@gmail.com |
453665829adba11c2bb476a45755412d1f193640 | a1d90d8bca6a678e5bba275a4a1a11ea0f1dbc40 | /src/ktp/KTP.java | f76fb31ac3af766cac89bb0ec1a318778b1a0d39 | [] | no_license | MochRiswan/KTP_Hadiah | 0ebc2777c45986aa01edc532a3e770db2bda6f20 | 43bf214914d7f8e16133607881eb348df21054c2 | refs/heads/master | 2022-12-31T06:45:17.291599 | 2020-10-20T02:24:08 | 2020-10-20T02:24:08 | 305,558,203 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,275 | 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 ktp;
import java.util.Scanner;
public class KTP {
public static void main(String[] args) {
String pr,ko,Ttl,kl,al,D,k,Ag,pk,pkr,pkn,N;
Double R;
Scanner Input = new Scanner(System.in);
System.out.print("Masukkan provinsi ");
pr = Input.nextLine();
System.out.print("Masukkan kota/kabupaten ");
ko = Input.nextLine();
System.out.print("Masukkan tempat/Tgl.Lahir ");
Ttl = Input.nextLine();
System.out.print("Masukkan jenis kelamin ");
kl = Input.nextLine();
System.out.print("Masukkan alamat ");
al = Input.nextLine();
System.out.print("Masukkan desa ");
D = Input.nextLine();
System.out.print("Masukkan kecamatan ");
k = Input.nextLine();
System.out.print("Masukkan agama ");
Ag = Input.nextLine();
System.out.print("Masukkan Status perkawinan ");
pk = Input.nextLine();
System.out.print("Masukkan pekerjaan ");
pkr = Input.nextLine();
System.out.print("Masukkan kewarganegaraan ");
pkn = Input.nextLine();
System.out.print("Masukkan NIK ");
N = Input.next();
System.out.print("Masukkan Rt,Rw ");
R = Input.nextDouble();
{
System.out.println("--------------------------------");
System.out.println(" PROVINSI "+pr);
System.out.println(" "+ko);
System.out.println("NIK : "+N);
System.out.println("Tempat/Tgl lahir : "+Ttl);
System.out.println("Jenis Kelamin : "+kl);
System.out.println("Alamat : "+al);
System.out.println(" Rt/Rw : "+R);
System.out.println(" Desa : "+D);
System.out.println(" Kecamatan : "+k);
System.out.println("Agama : "+Ag);
System.out.println("Status perkawinan: "+pk);
System.out.println("Pekerjaan : "+pkr);
System.out.println("Kewarganegaraan : "+pkn);
}
}
}
| [
"you@example.com"
] | you@example.com |
cad33faf5f6f1751003d8fd57170acbb2e18a9a0 | d60e287543a95a20350c2caeabafbec517cabe75 | /LACCPlus/ActiveMQ/449_1.java | 990d54b6b7f71e3b68f0aad7e5d19afe0202eca9 | [
"MIT"
] | permissive | sgholamian/log-aware-clone-detection | 242067df2db6fd056f8d917cfbc143615c558b2c | 9993cb081c420413c231d1807bfff342c39aa69a | refs/heads/main | 2023-07-20T09:32:19.757643 | 2021-08-27T15:02:50 | 2021-08-27T15:02:50 | 337,837,827 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,155 | java | //,temp,TransactionTest.java,59,113,temp,TransactionRollbackOrderTest.java,64,150
//,3
public class xxx {
public void testTransaction() throws Exception {
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
connection = factory.createConnection();
queue = new ActiveMQQueue(getClass().getName() + "." + getName());
producerSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
consumerSession = connection.createSession(true, 0);
producer = producerSession.createProducer(queue);
consumer = consumerSession.createConsumer(queue);
consumer.setMessageListener(new MessageListener() {
@Override
public void onMessage(Message m) {
try {
TextMessage tm = (TextMessage)m;
receivedText = tm.getText();
latch.countDown();
LOG.info("consumer received message :" + receivedText);
consumerSession.commit();
LOG.info("committed transaction");
} catch (JMSException e) {
try {
consumerSession.rollback();
LOG.info("rolled back transaction");
} catch (JMSException e1) {
LOG.info(e1.toString());
e1.printStackTrace();
}
LOG.info(e.toString());
e.printStackTrace();
}
}
});
connection.start();
TextMessage tm = null;
try {
tm = producerSession.createTextMessage();
tm.setText("Hello, " + new Date());
producer.send(tm);
LOG.info("producer sent message :" + tm.getText());
} catch (JMSException e) {
e.printStackTrace();
}
LOG.info("Waiting for latch");
latch.await(2,TimeUnit.SECONDS);
assertNotNull(receivedText);
LOG.info("test completed, destination=" + receivedText);
}
}; | [
"SHOSHIN\\sgholamian@shoshin.uwaterloo.ca"
] | SHOSHIN\sgholamian@shoshin.uwaterloo.ca |
bde7e7dd226027fc9f6004bf4720380a5e009ab8 | 3cfea2514e52d7a07b6f49dfaecf688ed3be5431 | /MyDemoSpringBoot/src/main/java/com/max/springboot/model/EmpService.java | 20dc5524000c112dca0fc76a87f0bb5034f18182 | [] | no_license | KyoKusanagii/MySpringBootWithMyBatis | 346f55230138cae16cbcc06bc3dcc8807faeb1df | 8457d55c15d8239289dc30a406a503d77a09d071 | refs/heads/master | 2020-05-04T01:19:11.710028 | 2019-04-18T10:58:06 | 2019-04-18T10:58:06 | 178,902,306 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 207 | java | package com.max.springboot.model;
import com.max.springboot.bean.EmpVO;
import java.util.List;
public interface EmpService {
public List<EmpVO> getAllEmps();
public void delete(String empno);
}
| [
"44694954+KyoKusanagii@users.noreply.github.com"
] | 44694954+KyoKusanagii@users.noreply.github.com |
6ddeac2ced16713a6e85a95962082573d5b7d51c | 479fd54a5f5e5ee2aa67b578718814669bc374c8 | /src/nhom1/servlet_controller/LogOut.java | 34fb7c13fe445782b908723e3fd70062690c0bfa | [] | no_license | lebaohuan1998/Flash.git.io | 7df98112b1efbc1ddbe26bc5758c0d21eff09c64 | 8ba32aed35ff72bbc614783e3ff24df850c23d0b | refs/heads/master | 2023-04-20T09:43:43.240054 | 2021-04-27T08:46:44 | 2021-04-27T08:46:44 | 333,389,645 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,485 | java | package nhom1.servlet_controller;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
/**
* Servlet implementation class LogOut
*/
@WebServlet("/LogOut")
public class LogOut extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public void init() {
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//invalidate the session if exists
HttpSession session = request.getSession(false);
// System.out.println("User="+session.getAttribute("user"));
if(session.getAttribute("user") != null){
session.invalidate();
response.sendRedirect(request.getContextPath() + "/HomePageServlet");
} else {
response.sendRedirect(request.getContextPath() + "/HomePageServlet");
}
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
}
}
| [
"="
] | = |
6a58bafa4ffd1046bcce7e3f4aacc7b39e1be59c | 2d5e54e4dd6612aeb19904fcdf8757680c5bfd79 | /metamodel.implementation/src/org/modelio/metamodel/impl/diagrams/ActivityDiagramImpl.java | c30204769edac97e83893bf6fc9f20831b53815c | [] | no_license | mondo-project/hawk-modelio | 1ef504dde30ce4e43b5db8d7936adbc04851e058 | 4da0f70dfeddb0451eec8b2f361586e07ad3dab9 | refs/heads/master | 2021-01-10T06:09:58.281311 | 2015-11-06T11:08:15 | 2015-11-06T11:08:15 | 45,675,632 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,745 | java | /*
* Copyright 2013 Modeliosoft
*
* This file is part of Modelio.
*
* Modelio 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.
*
* Modelio 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 Modelio. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* WARNING: GENERATED FILE - DO NOT EDIT */
/* Metamodel version: 9022 */
/* SemGen version : 2.0.07.9012 */
package org.modelio.metamodel.impl.diagrams;
import java.util.ArrayList;
import java.util.Collections;
import com.modeliosoft.modelio.javadesigner.annotations.objid;
import org.eclipse.emf.common.util.EList;
import org.modelio.metamodel.data.diagrams.ActivityDiagramData;
import org.modelio.metamodel.diagrams.ActivityDiagram;
import org.modelio.metamodel.visitors.IModelVisitor;
import org.modelio.vcore.smkernel.SmConstrainedList;
import org.modelio.vcore.smkernel.SmDepVal;
import org.modelio.vcore.smkernel.SmList;
import org.modelio.vcore.smkernel.SmObjectImpl;
import org.modelio.vcore.smkernel.mapi.MClass;
import org.modelio.vcore.smkernel.mapi.MVisitor;
import org.modelio.vcore.smkernel.meta.SmClass;
@objid ("0067fa70-c4bf-1fd8-97fe-001ec947cd2a")
public class ActivityDiagramImpl extends BehaviorDiagramImpl implements ActivityDiagram {
@objid ("8e32b97f-251b-4a43-bc44-8381a92e1a11")
@Override
public boolean isIsVertical() {
return (Boolean) getAttVal(ActivityDiagramData.Metadata.IsVerticalAtt());
}
@objid ("339f4d70-f451-4e33-825e-2c87437c6c07")
@Override
public void setIsVertical(boolean value) {
setAttVal(ActivityDiagramData.Metadata.IsVerticalAtt(), value);
}
@objid ("35990317-7cc8-41bd-9f75-6a59220e1f26")
@Override
public SmObjectImpl getCompositionOwner() {
SmObjectImpl obj;
return super.getCompositionOwner();
}
@objid ("6e9d1987-bb65-4962-a389-ec660c23b4a3")
@Override
public SmDepVal getCompositionRelation() {
SmObjectImpl obj;
return super.getCompositionRelation();
}
@objid ("d7750d05-370c-4cae-a5c3-eac2837dcbd4")
public Object accept(MVisitor v) {
if (v instanceof IModelVisitor)
return ((IModelVisitor)v).visitActivityDiagram(this);
else
return null;
}
}
| [
"antonio.garcia-dominguez@york.ac.uk"
] | antonio.garcia-dominguez@york.ac.uk |
d407dfaf41d1cc6fb7e5833cd1c136cb90ac8bb0 | dff1127ec023fa044a90eb6a2134e8d93b25d23a | /sandbox/coconut-cache/coconut-cache-pocket/src/main/java/org/coconut/cache/pocket/ValueLoader.java | 7fe01aa823984bc6183237389ef4b1bd517b36f8 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | codehaus/coconut | 54d98194e401bd98659de4bb72e12b7e24ba71e4 | f2bc1fc516c65a9d0fd76ffb3bb148309ef1ba76 | refs/heads/master | 2023-08-31T00:18:48.501510 | 2008-04-24T09:28:52 | 2008-04-24T09:28:52 | 36,364,856 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,767 | java | /* Copyright 2004 - 2007 Kasper Nielsen <kasper@codehaus.org> Licensed under
* the Apache 2.0 License, see http://coconut.codehaus.org/license.
*/
package org.coconut.cache.pocket;
/**
* A <code>ValueLoader</code> is used for transparant loading or creation of
* values by a cache. Instead of the user first checking if a value for a given
* key exist in the cache and if that is not the case; create the value and add
* it to the cache. A cache implementation can use a value loader for lazily
* creating values for missing entries making this process transparent for the
* user.
* <p>
* Usage example, a loader that for each key (String) loads the file for that
* given path.
*
* <pre>
* class FileLoader implements ValueLoader {
* public byte[] load(String s) {
* File f = new File(s);
* byte[] bytes = new byte[(int) f.length()];
* (new RandomAccessFile(f, "r")).read(bytes);
* return bytes;
* }
* }
* </pre>
*
* When a user requests a value for a particular key that is not present in the
* cache. The cache will automatically call the supplied value loader to fetch
* the value. The cache will then insert the key-value pair into the cache and
* return the value.
* <p>
* Another usage of a value loader is for lazily creating new values. For
* example, a cache that caches <code>Patterns</code>.
*
* <pre>
* class PatternLoader implements ValueLoader<String, Pattern> {
* public Pattern load(String s) {
* return Pattern.compile(s);
* }
* }
* </pre>
*
* <p>
* ValueLoader instances <tt>MUST</tt> be thread-safe. Allowing multiple
* threads to simultaneous create or load new values.
* <p>
* Any <tt>cache</tt> implementation that makes use of value loaders should,
* for performance reasons, make sure that if two threads are simultaneous
* requesting a value for the same key. Only one of them do the actual loading.
* <p>
* Only the two following methods on a Cache instance will trigger the cache
* loader: {@link PocketCache#get(Object)}, and
* {@link PocketCache#getAll(Collection)}.
*
* @author <a href="mailto:kasper@codehaus.org">Kasper Nielsen</a>
* @version $Id$
* @param <K>
* the type of keys used for loading values
* @param <V>
* the type of values that are loaded
*/
public interface ValueLoader<K, V> {
/**
* Loads a single value.
*
* @param key
* the key whose associated value is to be returned.
* @return the value to which the specified should be mapped, or <tt>null</tt> if the
* corresponding value could not be found.
*/
V load(K key);
}
| [
"kasper@0b154b62-a015-0410-9c24-a35e082c6f94"
] | kasper@0b154b62-a015-0410-9c24-a35e082c6f94 |
00ac3cf9264ce7a5bb8bea060e346211514f970b | 8be75850ec7823a92bc86b5488487813cbdb7214 | /ReecycleViewHeader/src/main/java/com/czy/reecycleviewheader/MyFragment.java | 2c28036057c6bf52fe49c602276095f60297a1af | [] | no_license | shihyu/AndroidDemo | 5f60e783b1d56f02e71734300177fff1d424689c | be0c073e7b40efff0ce85e9e7a945fa18a071160 | refs/heads/master | 2020-03-28T17:51:11.816591 | 2016-12-16T12:01:08 | 2016-12-16T12:01:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,226 | java | package com.czy.reecycleviewheader;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.imczy.common_util.adapter.RecycleViewAdapter;
/**
* Created by chenzhiyong on 15/12/6.
*/
public class MyFragment extends Fragment implements ScrollableHelper.ScrollableContainer {
public final static String TAG = "MyFragment";
public final static String SaveInstanceStateEXTRA = "SaveInstanceStateEXTRA";
RecyclerView mRecyclerView;
SwipeRefreshLayout mSwipeRefreshLayout;
private Handler mHandler = new Handler();
public static MyFragment getInstances() {
MyFragment myFragment = new MyFragment();
return myFragment;
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
String str = "";
if (savedInstanceState != null) {
str = savedInstanceState.getString("SaveInstanceStateEXTRA");
}
// 这里必须是null
View item = inflater.inflate(R.layout.item_1, null);
mRecyclerView = (RecyclerView) item.findViewById(R.id.rv_list);
mSwipeRefreshLayout = (SwipeRefreshLayout) item.findViewById(R.id.refresh);
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
mRecyclerView.setAdapter(new RecycleViewAdapter(getContext()));
mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
mSwipeRefreshLayout.setRefreshing(false);
}
}, 2000);
}
});
return item;
}
@Override
public View getScrollableView() {
return mRecyclerView;
}
}
| [
"chen.zhiyong@zuimeia.biz"
] | chen.zhiyong@zuimeia.biz |
1aff6ed8f3bd75fbdb605d46b10d902444b3bb53 | c5c843dc0c4d7b657c7436f4255848c50fea852d | /src/comparator/circle/CircleComparator.java | a5f701fc9916efe64ca47561a65254afef2eeb26 | [] | no_license | AlexWoo176/Comparator-Circle | e968f3243d0a297b771e57e3522d91615aef2b9b | 0ccbf4f0fa3524cee8c00e54657dc2ba3361a462 | refs/heads/master | 2021-05-17T03:24:36.115583 | 2020-03-28T05:26:08 | 2020-03-28T05:26:08 | 250,597,283 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 365 | java | package comparator.circle;
import java.util.Comparator;
public class CircleComparator implements Comparator <Circle> {
@Override
public int compare(Circle o1, Circle o2) {
if (o1.getRadius() > o2.getRadius())
return 1;
else if (o1.getRadius() < o2.getRadius())
return -1;
else
return 0;
}
}
| [
"phuong.tuan2012@gmail.com"
] | phuong.tuan2012@gmail.com |
24b0dff11e937661ae537d9d6d52440542ab8eac | 0fca6240a045687a771bb0e743555f1b74f69e1c | /WebSeivices/2.SOAP/lesson_18/Flights_WS_lesson18_h/src/java/ru/javabegin/training/flight/interfaces/impls/SearchImpl.java | 0bb949147ed67c676dd3faeb74a0ec52c1c37f45 | [] | no_license | Abergaz/JavaBeginWork-WEB | 88fabec28f4b3275b21e1113a34cbc18c67ec5ef | b721f2d49ddf260acf4e43a22025959270d023ae | refs/heads/master | 2022-12-08T10:49:54.358706 | 2020-03-12T13:16:57 | 2020-03-12T13:16:57 | 227,131,968 | 0 | 0 | null | 2022-11-24T07:19:43 | 2019-12-10T13:48:08 | TSQL | UTF-8 | Java | false | false | 1,133 | java | package ru.javabegin.training.flight.interfaces.impls;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.logging.Level;
import java.util.logging.Logger;
import ru.javabegin.training.flight.database.FlightDB;
import ru.javabegin.training.flight.interfaces.Search;
import ru.javabegin.training.flight.objects.Flight;
import ru.javabegin.training.flight.spr.objects.City;
import ru.javabegin.training.flight.utils.GMTCalendar;
public class SearchImpl implements Search {
private FlightDB flightDB = FlightDB.getInstance();
@Override
public ArrayList<Flight> searchFlight(long date, City cityFrom, City cityTo) {
ArrayList<Flight> list = new ArrayList<>();
try {
Calendar c = GMTCalendar.getInstance();
c.setTimeInMillis(date);
list.addAll(flightDB.executeList(flightDB.getStmt(c, cityFrom, cityTo)));
} catch (SQLException ex) {
Logger.getLogger(SearchImpl.class.getName()).log(Level.SEVERE, null, ex);
}
return list;
}
}
| [
"zagreba@gmail.com"
] | zagreba@gmail.com |
0498eccfc05885beb22cbd61b01def5619535a23 | dccb8ce0e4c507ae1bc396d66749b660e2ad38d5 | /net/minecraft/client/renderer/entity/RenderOcelot.java | a5e72a733a79f753766d6e7e0635e1c6e68d7f2f | [] | no_license | Saxalinproject/Java_Mod_Effections_Set | 27cb3116a548295ff70c8585c4c802392e370f44 | 1799f11d74ecff594e1742a94df1ddc926be38a6 | refs/heads/master | 2020-04-08T22:10:29.373716 | 2013-11-04T13:33:01 | 2013-11-04T13:33:01 | 14,109,890 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,599 | java | package net.minecraft.client.renderer.entity;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.model.ModelBase;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
public class RenderOcelot extends RenderLiving
{
private static final ResourceLocation field_110877_a = new ResourceLocation("textures/entity/cat/black.png");
private static final ResourceLocation field_110875_f = new ResourceLocation("textures/entity/cat/ocelot.png");
private static final ResourceLocation field_110876_g = new ResourceLocation("textures/entity/cat/red.png");
private static final ResourceLocation field_110878_h = new ResourceLocation("textures/entity/cat/siamese.png");
public RenderOcelot(ModelBase par1ModelBase, float par2)
{
super(par1ModelBase, par2);
}
public void renderLivingOcelot(EntityOcelot par1EntityOcelot, double par2, double par4, double par6, float par8, float par9)
{
super.doRenderLiving(par1EntityOcelot, par2, par4, par6, par8, par9);
}
protected ResourceLocation func_110874_a(EntityOcelot par1EntityOcelot)
{
switch (par1EntityOcelot.getTameSkin())
{
case 0:
default:
return field_110875_f;
case 1:
return field_110877_a;
case 2:
return field_110876_g;
case 3:
return field_110878_h;
}
}
/**
* Pre-Renders the Ocelot.
*/
protected void preRenderOcelot(EntityOcelot par1EntityOcelot, float par2)
{
super.preRenderCallback(par1EntityOcelot, par2);
if (par1EntityOcelot.isTamed())
{
GL11.glScalef(0.8F, 0.8F, 0.8F);
}
}
public void doRenderLiving(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9)
{
this.renderLivingOcelot((EntityOcelot)par1EntityLiving, par2, par4, par6, par8, par9);
}
/**
* Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
* entityLiving, partialTickTime
*/
protected void preRenderCallback(EntityLivingBase par1EntityLivingBase, float par2)
{
this.preRenderOcelot((EntityOcelot)par1EntityLivingBase, par2);
}
public void renderPlayer(EntityLivingBase par1EntityLivingBase, double par2, double par4, double par6, float par8, float par9)
{
this.renderLivingOcelot((EntityOcelot)par1EntityLivingBase, par2, par4, par6, par8, par9);
}
protected ResourceLocation func_110775_a(Entity par1Entity)
{
return this.func_110874_a((EntityOcelot)par1Entity);
}
/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
*/
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
{
this.renderLivingOcelot((EntityOcelot)par1Entity, par2, par4, par6, par8, par9);
}
}
| [
"pein-t-m@mail.ru"
] | pein-t-m@mail.ru |
34505dbfd863f22336b9415e2153911fe80cdd4c | 57bccc9613f4d78acd0a6ede314509692f2d1361 | /pbk-core-lib/src/main/java/ru/armd/pbk/core/utils/validation/BaseValidator.java | 593b600e56a8ffc422d7467c1cceabfc135a4a8d | [] | no_license | mannyrobin/Omnecrome | 70f27fd80a9150b89fe3284d5789e4348cba6a11 | 424d484a9858b30c11badae6951bccf15c2af9cb | refs/heads/master | 2023-01-06T16:20:50.181849 | 2020-11-06T14:37:14 | 2020-11-06T14:37:14 | 310,620,098 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 760 | java | package ru.armd.pbk.core.utils.validation;
import javax.validation.ConstraintValidatorContext;
import javax.validation.ConstraintValidatorContext.ConstraintViolationBuilder;
/**
* Базовый валидатор.
*/
public class BaseValidator {
/**
* Метод добавления валидационного сообщения.
*
* @param constraintContext constraintContext
* @param message сообщение
*/
protected void addConstraintViolation(ConstraintValidatorContext constraintContext, String message) {
constraintContext.disableDefaultConstraintViolation();
ConstraintViolationBuilder builder = constraintContext.
buildConstraintViolationWithTemplate(message);
builder.addConstraintViolation();
}
}
| [
"malike@hipcreativeinc.com"
] | malike@hipcreativeinc.com |
5da63456083675bfc5511a6a5478ab33c12ca7b2 | 8e0364bd73bcb874c5a458109cc89c0230251445 | /src/com/lwl/cj/day19/StaticMethod.java | 91d957d0deed0aff54325b570c8a96fd405812e1 | [] | no_license | learnwithlakshman/corejava_b_3 | a0f1941e1e9f0e138bf6dd0b11c6529c86f03e4d | eb29ba79fb1d1d0be4cb0e4b819d5808912c5b27 | refs/heads/master | 2022-08-02T02:32:21.167540 | 2020-06-05T04:08:38 | 2020-06-05T04:08:38 | 257,771,788 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 753 | java | package com.lwl.cj.day19;
class Employee {
String ename;
double salary;
static int count = 0;
{
count++;
}
public Employee() {
super();
}
public Employee(String ename) {
this.ename = ename;
}
public Employee(String ename, double salary) {
super();
this.ename = ename;
this.salary = salary;
}
}
public class StaticMethod {
static int code = 100;
public static void showMessage() {
System.out.println("This is Special message from Special person...." + code);
}
public static void main(String[] args) {
Employee emp1 = new Employee();
Employee emp2 = new Employee("ALN", 7654567);
Employee emp3 = new Employee("GLN", 7854567);
System.out.println(emp3.count);
}
}
| [
"tanvi.avula@outlook.com"
] | tanvi.avula@outlook.com |
aa2b871cd791f2cb928452e6f39d8a70f77b4225 | 6ed05610a0fc7a86afe52267fc2570abc272dd4a | /openapi-spring-webjars-ui/src/main/java/org/wapache/openapi/spring/webmvc/ui/OpenApiWelcome.java | baf42c348020fef3ba7810052680eed5c3639426 | [
"Apache-2.0"
] | permissive | Zjd12138/wapadoc | f2226fc93bbcac98d59812c3a404121c31dcb0d9 | ae258cd5d719ce3d5e0a45210bfae7182c229940 | refs/heads/master | 2023-03-01T13:57:51.909077 | 2021-02-07T04:05:03 | 2021-02-07T04:05:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,052 | java | /*
*
* *
* * * Copyright 2019-2020 the original author or authors.
* * *
* * * Licensed under the Apache License, Version 2.0 (the "License");
* * * you may not use this file except in compliance with the License.
* * * You may obtain a copy of the License at
* * *
* * * https://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.wapache.openapi.spring.webmvc.ui;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
import org.springframework.web.servlet.view.UrlBasedViewResolver;
import org.springframework.web.util.UriComponentsBuilder;
import org.wapache.openapi.spring.core.SpringDocConfigProperties;
import org.wapache.openapi.spring.core.SpringDocConfiguration;
import org.wapache.openapi.spring.core.ui.OpenApiUiConfigParameters;
import org.wapache.openapi.spring.core.ui.OpenApiUiConfigProperties;
import org.wapache.openapi.spring.ui.AbstractOpenApiWelcome;
import org.wapache.openapi.v3.annotations.Operation;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;
import static org.springframework.util.AntPathMatcher.DEFAULT_PATH_SEPARATOR;
import static org.wapache.openapi.spring.core.Constants.*;
/**
* The type OpenAPI welcome.
* @author bnasslahsen
*/
@Controller
public class OpenApiWelcome extends AbstractOpenApiWelcome {
/**
* The Mvc servlet path.
*/
// To keep compatiblity with spring-boot 1 - WebMvcProperties changed package from srping 4 to spring 5
@Value(MVC_SERVLET_PATH)
private String mvcServletPath;
/**
* Instantiates a new OpenApi welcome.
*
* @param openApiUiConfig the openApi ui config
* @param springDocConfigProperties the spring doc config properties
* @param openApiUiConfigParameters the openApi ui config parameters
*/
public OpenApiWelcome(
OpenApiUiConfigProperties openApiUiConfig,
SpringDocConfigProperties springDocConfigProperties,
OpenApiUiConfigParameters openApiUiConfigParameters
) {
super(openApiUiConfig, springDocConfigProperties, openApiUiConfigParameters);
}
/**
* Redirect to ui string.
*
* @param request the request
* @return the string
*/
@Operation(hidden = true)
@GetMapping(OPENAPI_UI_PATH)
public String redirectToUi(HttpServletRequest request) {
buildConfigUrl(request.getContextPath(), ServletUriComponentsBuilder.fromCurrentContextPath());
String sbUrl = openApiUiConfigParameters.getUiRootPath() + OPENAPI_UI_URL;
UriComponentsBuilder uriBuilder = getUriComponentsBuilder(sbUrl);
return UrlBasedViewResolver.REDIRECT_URL_PREFIX + uriBuilder.build().encode().toString();
}
/**
* Openapi yaml map.
*
* @param request the request
* @return the map
*/
@Operation(hidden = true)
@GetMapping(value = OPENAPI_CONFIG_URL, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public Map<String, Object> openapiJson(HttpServletRequest request) {
buildConfigUrl(request.getContextPath(), ServletUriComponentsBuilder.fromCurrentContextPath());
return openApiUiConfigParameters.getConfigParameters();
}
@Override
protected void calculateUiRootPath(StringBuilder... sbUrls) {
StringBuilder sbUrl = new StringBuilder();
if (StringUtils.isNotBlank(mvcServletPath))
sbUrl.append(mvcServletPath);
if (ArrayUtils.isNotEmpty(sbUrls))
sbUrl = sbUrls[0];
String openApiPath = openApiUiConfigParameters.getPath();
if (openApiPath.contains(DEFAULT_PATH_SEPARATOR))
sbUrl.append(openApiPath, 0, openApiPath.lastIndexOf(DEFAULT_PATH_SEPARATOR));
openApiUiConfigParameters.setUiRootPath(sbUrl.toString());
}
@Override
protected String buildUrl(String contextPath, final String docsUrl) {
if (StringUtils.isNotBlank(mvcServletPath))
contextPath += mvcServletPath;
return super.buildUrl(contextPath, docsUrl);
}
@Override
protected void calculateOauth2RedirectUrl(UriComponentsBuilder uriComponentsBuilder) {
if (!openApiUiConfigParameters.isValidUrl(openApiUiConfigParameters.getOauth2RedirectUrl()))
openApiUiConfigParameters.setOauth2RedirectUrl(uriComponentsBuilder
.path(openApiUiConfigParameters.getUiRootPath())
.path(openApiUiConfigParameters.getOauth2RedirectUrl())
.build().toString());
}
} | [
"ykuang@wapache.org"
] | ykuang@wapache.org |
7d4994e1a5c030152e6a9984a91aac0aeb86f937 | ae5fb8e762559c13d09c0724f95f8e0dbbe6a58d | /metier/esco-core/src/main/java/org/esco/grouperui/domaine/beans/Subject.java | 66904735340158e23d71dd3ffcaeb9cb0e55a2f0 | [
"Apache-2.0"
] | permissive | GIP-RECIA/esco-grouper-ui | 1b840844aa18ea6a752399b4ba8441fd08766aa1 | d48ad3cb0a71d5811bbd49f9e6911ee778af1c78 | refs/heads/master | 2021-01-10T17:30:30.880810 | 2014-09-02T08:11:55 | 2014-09-02T08:11:55 | 8,556,656 | 0 | 1 | null | 2014-09-02T08:11:55 | 2013-03-04T14:01:17 | Java | UTF-8 | Java | false | false | 6,147 | java | /**
* Copyright (C) 2009 GIP RECIA http://www.recia.fr
* @Author (C) 2009 GIP RECIA <contact@recia.fr>
* @Contributor (C) 2009 SOPRA http://www.sopragroup.com/
* @Contributor (C) 2011 Pierre Legay <pierre.legay@recia.fr>
*
* 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.esco.grouperui.domaine.beans;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/**
* Class Subject. Requirement(s): [RECIA-ESCO-L1-008]
*
* @author ctrimoreau
*/
public class Subject extends Sortable implements Cloneable {
/**
* The serialVersionUID of the class.
*/
private static final long serialVersionUID = -190659575594052559L;
/** The id of the subject. */
private String idSubject;
/** The attributes list of the subject. */
private List < SimpleValue > attributes;
/**
* Default constructor.
*/
public Subject() {
this.attributes = new ArrayList < SimpleValue >();
}
/**
* Getter for id.
*
* @return the id to get.
*/
public final String getId() {
return this.getValueFormCol("id");
}
/**
* Setter for id.
*
* @param theId
* the id to set.
*/
public final void setId(final String theId) {
this.idSubject = theId;
this.addMappingFieldCol("id", this.idSubject);
}
/**
* Getter for attributes.
*
* @return the attributes to get.
*/
public final List < SimpleValue > getAttributes() {
return this.attributes;
}
/**
* setter for property attributes.
*
* @param theAttributes
* the attributes to set
*/
public void setAttributes(final List < SimpleValue > theAttributes) {
this.attributes = theAttributes;
SimpleValue simpleValue = null;
Iterator < SimpleValue > itAttr = this.attributes.iterator();
while (itAttr.hasNext()) {
simpleValue = itAttr.next();
this.addMappingFieldCol(simpleValue.getKey(), simpleValue.getValue());
}
}
/**
* Add a new SimpleValue to the list of attributes.
*
* @param theSimpleValue
* the SimpleValue to add.
*/
public final void addAttribute(final SimpleValue theSimpleValue) {
this.attributes.add(theSimpleValue);
this.addMappingFieldCol(theSimpleValue.getKey(), theSimpleValue.getValue());
}
/**
* Getter for hasStem.
*
* @return the hasStem to get.
*/
public final Boolean getHasStem() {
return "true".equals(this.getValueFormCol("hasStem"));
}
/**
* Getter for hasCreate.
*
* @return the hasCreate to get.
*/
public final Boolean getHasCreate() {
return "true".equals(this.getValueFormCol("hasCreate"));
}
/**
* Setter for hasStem.
*
* @param theHasStem
* the hasStem to set.
*/
public final void setHasStem(final Boolean theHasStem) {
this.addMappingFieldCol("hasStem", theHasStem.toString());
}
/**
* Setter for hasCreate.
*
* @param theHasCreate
* the hasCreate to set.
*/
public final void setHasCreate(final Boolean theHasCreate) {
this.addMappingFieldCol("hasCreate", theHasCreate.toString());
}
/**
* Getter for optin.
*
* @return the optin to get.
*/
public final Boolean getOptin() {
return "true".equals(this.getValueFormCol("canOptin"));
}
/**
* Setter for optin.
*
* @param theOptin
* the optin to set.
*/
public final void setOptin(final Boolean theOptin) {
this.addMappingFieldCol("canOptin", theOptin.toString());
}
/**
* Getter for optout.
*
* @return the optout to get.
*/
public final Boolean getOptout() {
return "true".equals(this.getValueFormCol("canOptout"));
}
/**
* Setter for optout.
*
* @param theOptout
* the optout to set.
*/
public final void setOptout(final Boolean theOptout) {
this.addMappingFieldCol("canOptout", theOptout.toString());
}
/**
* Getter for subjectRight.
*
* @return the subjectRight to get.
*/
public final GroupPrivilegeEnum getSubjectRight() {
return GroupPrivilegeEnum.fromValue(this.getValueFormCol("userRight"));
}
/**
* Setter for subjectRight.
*
* @param theSubjectRight
* the subjectRight to set.
*/
public final void setSubjectRight(final GroupPrivilegeEnum theSubjectRight) {
this.addMappingFieldCol("userRight", theSubjectRight.getName());
}
/**
* {@inheritDoc}
*/
@Override
public String getValueFormCol(final String theIndexCol) {
return this.getMappingFieldCol().get(theIndexCol);
}
/**
* {@inheritDoc}
*/
@Override
public Object clone() {
Subject newObject = new Subject();
newObject.setAttributes(this.getAttributes());
Map < String, String > aux = this.getMappingFieldCol();
for (String key : aux.keySet()) {
newObject.addMappingFieldCol(key, aux.get(key));
}
newObject.setTypeEnum(this.getTypeEnum());
return newObject;
}
}
| [
"julien.gribonvald@gmail.com"
] | julien.gribonvald@gmail.com |
3db94d53979877911c33602ba4e4bb6488c25b01 | 29345337bf86edc938f3b5652702d551bfc3f11a | /core/src/main/java/com/alibaba/alink/operator/local/nlp/TokenizerLocalOp.java | ed3ab56b4da2893ccae235710ff967ae16d84570 | [
"Apache-2.0"
] | permissive | vacaly/Alink | 32b71ac4572ae3509d343e3d1ff31a4da2321b6d | edb543ee05260a1dd314b11384d918fa1622d9c1 | refs/heads/master | 2023-07-21T03:29:07.612507 | 2023-07-12T12:41:31 | 2023-07-12T12:41:31 | 283,079,072 | 0 | 0 | Apache-2.0 | 2020-07-28T02:46:14 | 2020-07-28T02:46:13 | null | UTF-8 | Java | false | false | 902 | java | package com.alibaba.alink.operator.local.nlp;
import org.apache.flink.ml.api.misc.param.Params;
import com.alibaba.alink.common.annotation.NameCn;
import com.alibaba.alink.common.annotation.ParamSelectColumnSpec;
import com.alibaba.alink.common.annotation.TypeCollections;
import com.alibaba.alink.operator.common.nlp.TokenizerMapper;
import com.alibaba.alink.operator.local.utils.MapLocalOp;
import com.alibaba.alink.params.nlp.TokenizerParams;
/**
* Transform all words into lower case, and remove extra space.
*/
@ParamSelectColumnSpec(name = "selectedCol", allowedTypeCollections = TypeCollections.STRING_TYPES)
@NameCn("文本分解")
public final class TokenizerLocalOp extends MapLocalOp <TokenizerLocalOp>
implements TokenizerParams <TokenizerLocalOp> {
public TokenizerLocalOp() {
this(null);
}
public TokenizerLocalOp(Params params) {
super(TokenizerMapper::new, params);
}
}
| [
"shaomeng.wang.w@gmail.com"
] | shaomeng.wang.w@gmail.com |
cf5660a72cff0c540adb2836276afe681b6fed3d | 7eeb9c9d1b26c814523dcf56ba8f7c8c4163cf38 | /siden-core/src/main/java/ninja/siden/Request.java | 18c7557fd80e2a86949d64930d4f0aab8fcd2d16 | [
"Apache-2.0"
] | permissive | no-glue/siden | 356260e1a86bbace1b93e7fa15e52c23f1578772 | 0399bf40cc398daa0b7fda8240683e4fbb7a300f | refs/heads/master | 2021-01-15T09:28:18.042796 | 2015-02-13T05:04:10 | 2015-02-13T05:04:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,812 | java | /*
* Copyright 2014 SATO taichi
*
* 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 ninja.siden;
import io.undertow.server.HttpServerExchange;
import java.io.File;
import java.util.List;
import java.util.Map;
import java.util.Optional;
/**
* @author taichi
*/
public interface Request extends AttributeContainer {
HttpMethod method();
String path();
/**
* get path parameter
*
* @param key
* @return
*/
Optional<String> params(String key);
Map<String, String> params();
/**
* get query parameter
*
* @param key
* @return
*/
Optional<String> query(String key);
Optional<String> header(String name);
List<String> headers(String name);
Map<String, List<String>> headers();
Map<String, Cookie> cookies();
Optional<Cookie> cookie(String name);
Optional<String> form(String key);
List<String> forms(String key);
Map<String, List<String>> forms();
Optional<File> file(String key);
List<File> files(String key);
Map<String, List<File>> files();
/**
* get current session or create new session.
*
* @return session
*/
Session session();
/**
* get current session
*
* @return session or empty
*/
Optional<Session> current();
boolean xhr();
String protocol();
String scheme();
HttpServerExchange raw();
}
| [
"ryushi@gmail.com"
] | ryushi@gmail.com |
7ffd765fa8e3c0c7c551644af0c7138379f3b8a0 | 3cae205ef68128ede7a6fe20bc41b584681b81c0 | /src/main/java/com/ets/business/nb_iot/cmdinfo/iotinit/IntiClient.java | 62ad43346ad5ce2e226b4075ee1c7636e8e762d4 | [] | no_license | TangLiTao2810020131/NB-WATER1.0 | feaef3f235210958a9e2d85908f458d2d3847bf0 | 28cc13004a5fdc9a9d81b42b1c275e4cba35391d | refs/heads/master | 2022-12-22T02:00:19.406585 | 2019-08-15T06:22:54 | 2019-08-15T06:29:04 | 202,485,328 | 1 | 1 | null | 2022-12-16T11:54:07 | 2019-08-15T06:21:02 | Java | UTF-8 | Java | false | false | 3,643 | java | package com.ets.business.nb_iot.cmdinfo.iotinit;
import com.iotplatform.client.NorthApiClient;
import com.iotplatform.client.NorthApiException;
import com.iotplatform.client.dto.AuthOutDTO;
import com.iotplatform.client.dto.ClientInfo;
import com.iotplatform.client.dto.SSLConfig;
import com.iotplatform.client.invokeapi.Authentication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author 姚轶文
* @create 2018- 11-13 11:13
*/
@Service
public class IntiClient {
@Autowired
private NbIotConfig nbIotConfig;
private static NorthApiClient northApiClient = null;
private static Authentication authentication;
private void init()
{
/* SSLConfig sslconfig = new SSLConfig();
sslconfig.setTrustCAPath("D:/wuhao/work/MyEclipseWorkSpaces/MyEclipse2017/nb-water/src/main/resources/ca.jks");
sslconfig.setTrustCAPwd("Huawei@123");
sslconfig.setSelfCertPath("D:/wuhao/work/MyEclipseWorkSpaces/MyEclipse2017/nb-water/src/main/resources/outgoing.CertwithKey.pkcs12");
sslconfig.setSelfCertPwd("IoM@1234");*/
ClientInfo clientInfo = new ClientInfo();
clientInfo.setPlatformIp(nbIotConfig.getIp());
clientInfo.setPlatformPort(nbIotConfig.getPort());
clientInfo.setAppId(nbIotConfig.getAppId());
clientInfo.setSecret(nbIotConfig.getAppKey());
try {
northApiClient.setClientInfo(clientInfo);
northApiClient.initSSLConfig();//默认使用测试证书,且不进行主机名校验
authentication = new Authentication(northApiClient);
authentication.startRefreshTokenTimer();
} catch (NorthApiException e) {
e.printStackTrace();
}
}
public synchronized NorthApiClient GetNorthApiClient()
{
if(northApiClient == null)
{
northApiClient = new NorthApiClient();
init();
}
//System.out.println("IP="+nbIotConfig.getIp());
//System.out.println("Port="+nbIotConfig.getPort());
//System.out.println("AppId="+nbIotConfig.getAppId());
//System.out.println("AppKey="+nbIotConfig.getAppKey());
return northApiClient;
}
public String getAccessToken() {
synchronized(this)
{
if(northApiClient == null)
{
northApiClient = new NorthApiClient();
init();
}
}
AuthOutDTO authOutDTO = null;//获取权限模型
try {
authOutDTO = authentication.getAuthToken();
} catch (NorthApiException e) {
e.printStackTrace();
}
String accessToken = authOutDTO.getAccessToken(); //获取令牌
return accessToken;
}
// public String refreshAuthToken(){
// if(northApiClient == null)
// {
// northApiClient = new NorthApiClient();
// init();
// }
// Authentication authentication = new Authentication(northApiClient);
// AuthRefreshOutDTO refreshOutDTO = null;//获取权限模型
// try {
// AuthRefreshInDTO arInDTO = new AuthRefreshInDTO();
// arInDTO.setAppId(nbIotConfig.getAppId());
// arInDTO.setSecret(nbIotConfig.getAppKey());
// arInDTO.setRefreshToken(getAccessToken());
// refreshOutDTO = authentication.refreshAuthToken(arInDTO);
// } catch (NorthApiException e) {
// e.printStackTrace();
// }
// String accessToken = refreshOutDTO.getAccessToken(); //获取令牌
// return accessToken;
// }
}
| [
"2810020131@qq.com"
] | 2810020131@qq.com |
7582f6556d4c932c1c8b13440274da83388ef905 | 4a4c7a2d4045138596397be542b939f16b5ada79 | /java/com/ginko/activity/im/ImDownloadManager.java | 6ffb117f2365e51d327e60897105fc0d4c85b9d7 | [] | no_license | codementor726/Ginko_Android | 571d8b817cebd7eca6e80a8ec963ec90cef7e5b9 | 87f8fcf4d9eb5c9cdb5538ed1dc657b44f9e0df1 | refs/heads/master | 2023-06-08T18:22:34.858153 | 2019-03-20T02:02:44 | 2019-03-20T02:02:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,359 | java | package com.ginko.activity.im;
import com.ginko.vo.MultimediaMessageVO;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
public class ImDownloadManager {
private final int MAX_CONCURRENT_DOWNLOAD_THREAD_COUNT = 10;
private int nCurrentDownloadThreadCount = 0;
private Object lockObj = new Object();
private Queue<MultimediaMessageVO> downloadQueue;
private Queue<String> downloadFilePathQueue;
private HashMap<Long , MultimediaMessageVO> downloadMessagesMap;
public interface ImDownloadListener{
public void onImMessageFileDownloaded();
}
private List<ImDownloadListener> downloadListeners;
public ImDownloadManager()
{
downloadQueue = new LinkedList<MultimediaMessageVO>();
downloadFilePathQueue = new LinkedList<String>();
downloadMessagesMap = new HashMap<Long , MultimediaMessageVO>();
downloadListeners = new ArrayList<ImDownloadListener>();
}
public synchronized void registerDownloadListener(ImDownloadListener _downloadListener)
{
//
boolean alreadyExist = false;//block the double registration
for(int i=0;i<downloadListeners.size();i++)
{
if(downloadListeners.get(i) == _downloadListener)
{
alreadyExist = true;
break;
}
}
if(alreadyExist == false)
this.downloadListeners.add(_downloadListener);
}
public synchronized void unregisterDownloadListener(ImDownloadListener _downloadListener)
{
//
for(int i=0;i<downloadListeners.size();i++)
{
if(downloadListeners.get(i) == _downloadListener)
{
this.downloadListeners.remove(i);
break;
}
}
}
public synchronized void addMessageToDownloadQueue(MultimediaMessageVO message , String filePath)
{
synchronized (lockObj) {
try {
downloadQueue.offer(message);
downloadFilePathQueue.offer(filePath);
downloadMessagesMap.put(message.getMsgId(), message);
}catch(Exception e)
{
e.printStackTrace();
}
}
launchDownloadThreadFromQueue(null);
}
private synchronized void launchDownloadThreadFromQueue(MultimediaMessageVO prevDownloadedMessage)
{
if(prevDownloadedMessage!=null) {
nCurrentDownloadThreadCount--;
if (nCurrentDownloadThreadCount < 0) nCurrentDownloadThreadCount = 0;
if(downloadMessagesMap.containsKey(prevDownloadedMessage.getMsgId()))
downloadMessagesMap.remove(prevDownloadedMessage.getMsgId());
}
if(nCurrentDownloadThreadCount<MAX_CONCURRENT_DOWNLOAD_THREAD_COUNT)
{
MultimediaMessageVO message = null;
String filePath = null;
if (downloadQueue.size() > 0){
message = downloadQueue.poll();
filePath = downloadFilePathQueue.poll();
}
if(message!=null)
{
nCurrentDownloadThreadCount++;
new DownloadThread(message , filePath).start();
}
}
}
public synchronized boolean isMessageInDownloadQueue(MultimediaMessageVO msg)
{
return downloadMessagesMap.containsKey(msg.getMsgId());
}
//Download file from server and save
public void DownloadFromUrl(String DownloadUrl, String filePath) throws Exception{
InputStream input = null;
OutputStream output = null;
HttpURLConnection connection = null;
URL url = new URL(DownloadUrl); //you can write here any link
File file = new File(filePath);
long startTime = System.currentTimeMillis();
/* Open a connection to that URL. */
connection = (HttpURLConnection) url.openConnection();
connection.connect();
// expect HTTP 200 OK, so we don't mistakenly save error report
// instead of the file
if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
return;
}
int fileLength = connection.getContentLength();
// download the file
input = connection.getInputStream();
output = new FileOutputStream(filePath);
byte data[] = new byte[1024*64];
long total = 0;
int count;
while ((count = input.read(data)) != -1) {
// allow canceling with back button
//if (isCancelled()) {
// input.close();
// return null;
//}
total += count;
//System.out.println("----FileDownload Progress =" + String.valueOf(total)+ " ------");
// publishing the progress....
//if (fileLength > 0) // only if total length is known
// publishProgress((int) (total * 100 / fileLength));
output.write(data, 0, count);
}
if (output != null)
output.close();
if (input != null)
input.close();
if (connection != null)
connection.disconnect();
/*
// Define InputStreams to read from the URLConnection.
InputStream is = ucon.getInputStream();
BufferedInputStream bis = new BufferedInputStream(is);
// Read bytes to the Buffer until there is nothing more to read(-1).
ByteArrayBuffer baf = new ByteArrayBuffer(5000);
int current = 0;
while ((current = bis.read()) != -1) {
baf.append((byte) current);
}
// Convert the Bytes read to a String.
FileOutputStream fos = new FileOutputStream(file);
fos.write(baf.toByteArray());
fos.flush();
fos.close();
Log.d("DownloadManager", "download ready in" + ((System.currentTimeMillis() - startTime) / 1000) + " sec");*/
}
class DownloadThread extends Thread{
private MultimediaMessageVO message = null;
private String strDownloadSavePath = null;
public DownloadThread(MultimediaMessageVO msg , String path)
{
this.message = msg;
this.strDownloadSavePath = path;
}
@Override
public void run() {
try
{
DownloadFromUrl(message.getFileUrl() , strDownloadSavePath);
message.setFile(strDownloadSavePath);
}catch(Exception e)
{
System.out.println("----FileDownload Exception----");
e.printStackTrace();
message.setFile("");
}
if(downloadListeners != null && downloadListeners.size()>0) {
for(ImDownloadListener downlodListener : downloadListeners) {
if(downlodListener!=null)
downlodListener.onImMessageFileDownloaded();
}
}
//check another message from queue and relaunch thread
launchDownloadThreadFromQueue(message);
}
}
}
| [
"35169408+leeyang0629@users.noreply.github.com"
] | 35169408+leeyang0629@users.noreply.github.com |
a8e26f8492ff72a23f92e7ac8c3b9bbbe29bbdee | b3fd2546327e1b3d798fd0f9c9deabf5152eb386 | /src/main/java/com/mycmv/server/service/exam/SelectQuestionOptionService.java | 28addb2100263ba309d4d4e118d5368c5c52de57 | [] | no_license | oudi2012/cmv-server | 67ca1fec358f1e6fdde56c27ccd5327c7f2a1c99 | 2a330edf2b8f70f635ae5e284b0d37129cb70cb5 | refs/heads/master | 2023-01-02T17:12:33.860702 | 2020-10-21T07:03:01 | 2020-10-21T07:03:01 | 296,192,254 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 980 | java | package com.mycmv.server.service.exam;
import com.mycmv.server.model.exam.entry.SelectQuestionOption;
import java.util.List;
import java.util.Map;
/***
* SelectQuestionOption
* @author oudi
*/
public interface SelectQuestionOptionService extends ExamService<SelectQuestionOption> {
/***
* 获取列表
* @param questionId questionId
* @return List
*/
List<SelectQuestionOption> listByQuestionId(Long questionId);
/***
* 获取列表
* @param questionIdList questionIdList
* @return List
*/
List<SelectQuestionOption> listByQuestionIds(List<Long> questionIdList);
/***
* 获取列表
* @param questionIdList questionIdList
* @return Map
*/
Map<Long, List<SelectQuestionOption>> mapByQuestionIds(List<Long> questionIdList);
/***
* 根据问题编号,删除选择项
* @param questionId questionId
* @return int
*/
int deleteByQuestionId(Long questionId);
}
| [
"wanghaikuo000@163.com"
] | wanghaikuo000@163.com |
3c576ee8cad91bd0a8cdd183348b6053d348450e | 4f8dfcdd6f1494b59684438b8592c6c5c2e63829 | /DiffTGen-result/output/patch3-Lang-38-Jaid/Lang_38_3_jaid/target/0/14/evosuite-tests/org/apache/commons/lang3/time/FastDateFormat_ESTest_scaffolding.java | 5a0fa46a489e875b0883b3070d8bb005fa9ffbfb | [] | no_license | IntHelloWorld/Ddifferent-study | fa76c35ff48bf7a240dbe7a8b55dc5a3d2594a3b | 9782867d9480e5d68adef635b0141d66ceb81a7e | refs/heads/master | 2021-04-17T11:40:12.749992 | 2020-03-31T23:58:19 | 2020-03-31T23:58:19 | 249,439,516 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,982 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Mar 30 08:15:59 GMT 2020
*/
package org.apache.commons.lang3.time;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
import static org.evosuite.shaded.org.mockito.Mockito.*;
@EvoSuiteClassExclude
public class FastDateFormat_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.lang3.time.FastDateFormat";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {}
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("file.encoding", "UTF-8");
java.lang.System.setProperty("java.awt.headless", "true");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
java.lang.System.setProperty("user.country", "US");
java.lang.System.setProperty("user.dir", "/home/hewitt/work/DiffTGen-master/output/patch3-Lang-38-Jaid/Lang_38_3_jaid/target/0/14");
java.lang.System.setProperty("user.home", "/home/hewitt");
java.lang.System.setProperty("user.language", "en");
java.lang.System.setProperty("user.name", "hewitt");
java.lang.System.setProperty("user.timezone", "Asia/Chongqing");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(FastDateFormat_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.lang3.time.FastDateFormat$PaddedNumberField",
"org.apache.commons.lang3.time.FastDateFormat$TimeZoneNumberRule",
"org.apache.commons.lang3.time.FastDateFormat$Rule",
"org.apache.commons.lang3.time.FastDateFormat$Pair",
"org.apache.commons.lang3.time.FastDateFormat$UnpaddedNumberField",
"org.apache.commons.lang3.time.FastDateFormat$NumberRule",
"org.apache.commons.lang3.time.FastDateFormat$TwentyFourHourField",
"org.apache.commons.lang3.time.FastDateFormat$TwoDigitMonthField",
"org.apache.commons.lang3.time.FastDateFormat$StringLiteral",
"org.apache.commons.lang3.time.FastDateFormat",
"org.apache.commons.lang3.time.FastDateFormat$TextField",
"org.apache.commons.lang3.time.FastDateFormat$TwelveHourField",
"org.apache.commons.lang3.time.FastDateFormat$TwoDigitNumberField",
"org.apache.commons.lang3.time.FastDateFormat$CharacterLiteral",
"org.apache.commons.lang3.Validate",
"org.apache.commons.lang3.time.FastDateFormat$UnpaddedMonthField",
"org.apache.commons.lang3.time.FastDateFormat$TimeZoneNameRule",
"org.apache.commons.lang3.time.FastDateFormat$TwoDigitYearField",
"org.apache.commons.lang3.time.FastDateFormat$TimeZoneDisplayKey"
);
}
private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException {
mock(Class.forName("java.text.Format$Field", false, FastDateFormat_ESTest_scaffolding.class.getClassLoader()));
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(FastDateFormat_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.apache.commons.lang3.time.FastDateFormat",
"org.apache.commons.lang3.time.FastDateFormat$TextField",
"org.apache.commons.lang3.time.FastDateFormat$UnpaddedNumberField",
"org.apache.commons.lang3.time.FastDateFormat$TwoDigitNumberField",
"org.apache.commons.lang3.time.FastDateFormat$PaddedNumberField",
"org.apache.commons.lang3.time.FastDateFormat$TwelveHourField",
"org.apache.commons.lang3.time.FastDateFormat$TwentyFourHourField",
"org.apache.commons.lang3.time.FastDateFormat$TimeZoneNameRule",
"org.apache.commons.lang3.time.FastDateFormat$TimeZoneDisplayKey",
"org.apache.commons.lang3.time.FastDateFormat$CharacterLiteral",
"org.apache.commons.lang3.time.FastDateFormat$StringLiteral",
"org.apache.commons.lang3.time.FastDateFormat$Pair",
"org.apache.commons.lang3.time.FastDateFormat$TwoDigitYearField",
"org.apache.commons.lang3.time.FastDateFormat$TwoDigitMonthField",
"org.apache.commons.lang3.time.FastDateFormat$UnpaddedMonthField",
"org.apache.commons.lang3.time.FastDateFormat$TimeZoneNumberRule",
"org.apache.commons.lang3.Validate"
);
}
}
| [
"1009479460@qq.com"
] | 1009479460@qq.com |
a04d479fc793d8b10643aafda8ff6042b07d4da5 | 0a3095b238b3cf906a29dbdbd9d6d360e01748ad | /webtack/jsinterop-generator/src/test/fixtures/dictionary_sequenceTypes/output/j2cl/main/java/com/example/Sub1.java | 33159fd910a8cff3f11ce0d4f71d78d8aef1f77a | [
"Apache-2.0"
] | permissive | akasha/akasha | ca5e3c63384eff0178bbbeea7dbe79325a85cd94 | 4f44423952a404d951a899c4c7055bef547069d8 | refs/heads/master | 2023-08-16T07:04:16.446671 | 2023-08-14T12:13:19 | 2023-08-14T12:13:19 | 245,569,208 | 24 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,701 | java | package com.example;
import javax.annotation.Generated;
import javax.annotation.Nonnull;
import jsinterop.annotations.JsNonNull;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
import jsinterop.base.Any;
import jsinterop.base.Js;
import jsinterop.base.JsPropertyMap;
@Generated("org.realityforge.webtack")
@JsType(
isNative = true,
namespace = JsPackage.GLOBAL,
name = "Sub1"
)
public interface Sub1 extends Base {
@JsOverlay
@Nonnull
static Builder of() {
return Js.uncheckedCast( JsPropertyMap.of() );
}
@JsProperty(
name = "others"
)
JsArray<Base> others();
@JsProperty
void setOthers(@JsNonNull JsArray<Base> others);
@JsOverlay
default void setOthers(@Nonnull final Base... others) {
setOthers( Js.<JsArray<Base>>uncheckedCast( others ) );
}
@JsType(
isNative = true,
namespace = JsPackage.GLOBAL,
name = "Sub1"
)
interface Builder extends Sub1 {
@JsOverlay
@Nonnull
default Builder others(@Nonnull final JsArray<Base> others) {
setOthers( others );
return this;
}
@JsOverlay
@Nonnull
default Builder others(@Nonnull final Base... others) {
setOthers( others );
return this;
}
@JsOverlay
@Nonnull
default Builder optionalFeatures(@Nonnull final JsArray<Any> optionalFeatures) {
setOptionalFeatures( optionalFeatures );
return this;
}
@JsOverlay
@Nonnull
default Builder optionalFeatures(@Nonnull final Any... optionalFeatures) {
setOptionalFeatures( optionalFeatures );
return this;
}
}
}
| [
"peter@realityforge.org"
] | peter@realityforge.org |
94319a580e071c1be6c4f5b8dbdcff251bec8f3b | 9369a58b11736cc98c0f7208cd8f706bb78a9790 | /project1019/ArrayTest1.java | 43311e9955a112bc1018874397d6df7c5df64985 | [] | no_license | zino1187/java_workspace | 791fcf3d149c4950160afa92ee95decfa1a5834e | f42ca93b94bf2ca1779bf1b3f3fc6b3d1c5bfbb3 | refs/heads/master | 2023-01-14T15:02:52.174426 | 2020-11-27T08:16:10 | 2020-11-27T08:16:10 | 305,320,095 | 3 | 1 | null | null | null | null | UHC | Java | false | false | 1,010 | java | /*
자바도 다른 언어와 마찬가지로 배열을 지원한다...
단, 자바는 인터프리터방식이 아닌 컴파일 기반의 응용프로그램으로서,
배열 선언시 반드시 자료형을 선언해야 한다..(js와는 틀림)
*/
class ArrayTest1{
public static void main(String[] args){
//int형 배열 선언
//var arr = new Array();
//자바스크립트와는 달리, 자바에서는 배열에 데이터형을 섞어 넣을 수 없고
//반드시 한 종류의 데이터 타입만 담을 수 있다...
int[] arr = new int[3]; //반드시(must) 자료형 및 크기명시해야 됨!!
arr[0]=7;
arr[1]=23;
arr[2]=9;
for(int i=0;i<arr.length;i++){
System.out.println(arr[i]);
}
//var arr = ["사과","바나나","딸기"];
String[] fruit = {"사과","바나나","딸기"}; //배열 선언과 동시에 초기화
System.out.println("과일의 갯수 "+fruit.length);
for(int i=0;i<fruit.length;i++){
System.out.println(fruit[i]);
}
}
}
| [
"zino1187@gmail.com"
] | zino1187@gmail.com |
5fc165cbb3ec9e5be3ba4b2812ca077b2359a11c | 7d966c22c83258cc21ffc040271d62aea122d658 | /MegaMek/src/megamek/common/weapons/ISTHBUAC10.java | 64eda31cf291251b030c28014b79cadd6880eb8b | [] | no_license | Ayamin0x539/MegaMek | 5f1f2db42f01a907b8467cefc95cf56d697bdf8f | 9ea4712f2ddf5a7af8c65b9e09211d7b76904f8e | refs/heads/master | 2021-01-09T11:42:01.513443 | 2015-12-03T02:04:04 | 2015-12-03T02:04:04 | 59,911,944 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,796 | java | /**
* MegaMek - Copyright (C) 2004,2005 Ben Mazur (bmazur@sev.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.
*
* 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.
*/
/*
* Created on Oct 1, 2004
*
*/
package megamek.common.weapons;
import megamek.common.AmmoType;
import megamek.common.TechConstants;
/**
* @author Andrew Hunter
*/
public class ISTHBUAC10 extends UACWeapon {
/**
*
*/
private static final long serialVersionUID = -8651956434662071593L;
/**
*
*/
public ISTHBUAC10() {
super();
this.techLevel.put(3071, TechConstants.T_IS_UNOFFICIAL);
this.name = "Ultra AC/10 (THB)";
this.setInternalName("ISUltraAC10 (THB)");
this.addLookupName("IS Ultra AC/10 (THB)");
this.heat = 4;
this.damage = 10;
this.rackSize = 10;
this.ammoType = AmmoType.T_AC_ULTRA_THB;
this.shortRange = 7;
this.mediumRange = 14;
this.longRange = 21;
this.extremeRange = 28;
this.tonnage = 13.0f;
this.criticals = 7;
this.bv = 245;
this.cost = 400000;
//Since this are the Tactical Handbook Weapons I'm using the TM Stats.
introDate = 3057;
techLevel.put(3057, techLevel.get(3071));
availRating = new int[] { RATING_X, RATING_X, RATING_E };
techRating = RATING_E;
}
}
| [
"tms08012@dds-227.ad.engr.uconn.edu"
] | tms08012@dds-227.ad.engr.uconn.edu |
cc6d98030ba4815a0073cdc5be5b1e5258ff25b1 | 1c6fe1c9ad917dc9dacaf03eade82d773ccf3c8a | /acm-auth-server/src/main/java/com/wisdom/auth/server/configuration/AuthConfiguration.java | 85e0571b0802e38bf7d734abcc4e0bf8f6c7edc2 | [
"Apache-2.0"
] | permissive | daiqingsong2021/ord_project | 332056532ee0d3f7232a79a22e051744e777dc47 | a8167cee2fbdc79ea8457d706ec1ccd008f2ceca | refs/heads/master | 2023-09-04T12:11:51.519578 | 2021-10-28T01:58:43 | 2021-10-28T01:58:43 | 406,659,566 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 408 | java | package com.wisdom.auth.server.configuration;
import com.wisdom.base.common.handler.GlobalExceptionHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
*
*/
@Configuration
public class AuthConfiguration {
@Bean
public GlobalExceptionHandler getGlobalExceptionHandler(){
return new GlobalExceptionHandler();
}
}
| [
"homeli@126.com"
] | homeli@126.com |
6567a6ac8a23334d319e9515cf72174c7cb12267 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/22/22_aaae2d24fa86fa66def99e60dc10dce33e3db6e7/ConceptServiceTest/22_aaae2d24fa86fa66def99e60dc10dce33e3db6e7_ConceptServiceTest_s.java | 4b66b41793bdaf9ddd22f1ac76ce8c944e1f65ca | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 5,186 | java | package websiteschema.mpsegment.web.api.service;
import org.junit.Test;
import org.springframework.transaction.annotation.Transactional;
import websiteschema.mpsegment.web.UsingFixtures;
import websiteschema.mpsegment.web.api.model.Concept;
import websiteschema.mpsegment.web.api.model.PartOfSpeech;
import websiteschema.mpsegment.web.api.model.dto.ConceptDto;
import javax.persistence.EntityTransaction;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@Transactional
public class ConceptServiceTest extends UsingFixtures {
private ConceptService conceptService = resolve("conceptServiceImpl", ConceptService.class);
@Test
public void should_add_concept_in_database() {
String c = uniq("Concept");
Concept concept = addConcept(c, posN, null);
Concept actualConcept = conceptService.getById(concept.getId());
assertNotNull(actualConcept);
assertEquals("N", actualConcept.getPartOfSpeech().getName());
assertEquals(c, actualConcept.getName());
}
@Test
public void should_add_parent_concept() {
String c1 = uniq("Concept1");
String c2 = uniq("Concept2");
String c3 = uniq("Concept3");
Concept concept1 = addConcept(c1, posN, null);
Concept concept2 = addConcept(c2, posT, concept1);
Concept concept3 = addConcept(c3, posT, concept2);
Concept actualConcept = conceptService.getById(concept3.getId());
assertNotNull(actualConcept);
assertEquals("N", actualConcept.getParent().getParent().getPartOfSpeech().getName());
assertEquals("T", actualConcept.getParent().getPartOfSpeech().getName());
assertEquals(c1, actualConcept.getParent().getParent().getName());
assertEquals(c2, actualConcept.getParent().getName());
assertEquals(c3, actualConcept.getName());
}
@Test
public void should_return_all_concepts_order_by_id_asc() {
String c1 = uniq("Concept");
String c2 = uniq("Concept");
String c3 = uniq("Concept");
Concept concept1 = addConcept(c1, posN, null);
Concept concept2 = addConcept(c2, posT, concept1);
Concept concept3 = addConcept(c3, posT, concept2);
List<Concept> conceptList = conceptService.list();
assertEquals(c1, conceptList.get(conceptList.size() - 3).getName());
assertEquals(c2, conceptList.get(conceptList.size() - 2).getName());
assertEquals(c3, conceptList.get(conceptList.size() - 1).getName());
Concept grandChild = conceptList.get(conceptList.size() - 1);
assertNotNull(grandChild);
assertEquals("N", grandChild.getParent().getParent().getPartOfSpeech().getName());
assertEquals("T", grandChild.getParent().getPartOfSpeech().getName());
assertEquals(c1, grandChild.getParent().getParent().getName());
assertEquals(c2, grandChild.getParent().getName());
assertEquals(c3, grandChild.getName());
}
@Test
public void should_build_concept_tree() {
clearDatabase();
String c1 = uniq("Concept");
String c2 = uniq("Concept");
String c3 = uniq("Concept");
Concept concept1 = addConcept(c1, posN, null);
Concept concept2 = addConcept(c2, posT, concept1);
Concept concept3 = addConcept(c3, posT, concept2);
ConceptDto root = conceptService.getConceptTree();
assertNotNull(root);
assertEquals("root", root.name);
assertEquals(c1, root.children.get(0).name);
assertEquals(1, root.children.size());
assertEquals(c2, root.children.get(0).children.get(0).name);
assertEquals(1, root.children.get(0).children.size());
assertEquals(c3, root.children.get(0).children.get(0).children.get(0).name);
assertEquals(1, root.children.get(0).children.get(0).children.size());
}
@Test
public void should_return_children_of_concept() {
String c1 = uniq("Concept");
String c2 = uniq("Concept");
String c3 = uniq("Concept");
Concept concept1 = addConcept(c1, posN, null);
Concept concept2 = addConcept(c2, posT, concept1);
Concept concept3 = addConcept(c3, posT, concept1);
List<Concept> children = conceptService.getChildren(concept1.getId());
assertEquals(2, children.size());
assertEquals(c2, children.get(0).getName());
assertEquals(c3, children.get(1).getName());
}
private void clearDatabase() {
EntityTransaction tx = em.getTransaction();
tx.begin();
em.createQuery("DELETE from Concept Where Id > 0")
.executeUpdate();
tx.commit();
}
private Concept addConcept(String c, PartOfSpeech pos, Concept parent) {
Concept concept = new Concept();
concept.setName(c);
concept.setNote(uniq("Note"));
concept.setPartOfSpeech(pos);
concept.setParent(parent);
conceptService.add(concept);
return concept;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
c2fac16ddd677a20e5d7919b8f1bead7e712d3e4 | 2fd9d77d529e9b90fd077d0aa5ed2889525129e3 | /DecompiledViberSrc/app/src/main/java/com/yandex/mobile/ads/mediation/nativeads/i.java | 188a19913bc54ec737a252868f600710f9c4291b | [] | no_license | cga2351/code | 703f5d49dc3be45eafc4521e931f8d9d270e8a92 | 4e35fb567d359c252c2feca1e21b3a2a386f2bdb | refs/heads/master | 2021-07-08T15:11:06.299852 | 2021-05-06T13:22:21 | 2021-05-06T13:22:21 | 60,314,071 | 1 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,300 | java | package com.yandex.mobile.ads.mediation.nativeads;
import android.content.Context;
import com.yandex.mobile.ads.impl.as;
import com.yandex.mobile.ads.impl.av;
import com.yandex.mobile.ads.impl.aw;
import com.yandex.mobile.ads.impl.ax;
import com.yandex.mobile.ads.impl.ay;
import com.yandex.mobile.ads.impl.bb;
import com.yandex.mobile.ads.impl.eo;
import com.yandex.mobile.ads.impl.lm;
import com.yandex.mobile.ads.impl.v;
import com.yandex.mobile.ads.nativeads.t;
public final class i
implements o
{
private final MediatedNativeAdapterListener a;
private final as<MediatedNativeAdapter, MediatedNativeAdapterListener> b;
public i(t paramt, bb parambb)
{
eo localeo = paramt.r();
aw localaw = new aw(localeo);
ay localay = new ay(localeo);
g localg = new g(new av(parambb, localaw, localay));
ax localax = new ax(paramt, parambb);
this.b = new as(new h(), localay, localg, localax);
this.a = new n(paramt, this.b);
}
public final void a(Context paramContext, v<lm> paramv)
{
this.b.a(paramContext, this.a);
}
}
/* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_4_dex2jar.jar
* Qualified Name: com.yandex.mobile.ads.mediation.nativeads.i
* JD-Core Version: 0.6.2
*/ | [
"yu.liang@navercorp.com"
] | yu.liang@navercorp.com |
8c9f98798e7a4bca736eee1cde79bc4f5e471afb | 3287552769c6f1dc735fe4cd70c429eec3f8759a | /codelabor-system-file/src/main/java/org/codelabor/system/file/web/spring/command/FileList.java | 6b7dece0a9aa8504a7c9732e229e5b16e51fbf87 | [
"Apache-2.0"
] | permissive | kwbaek/codelabor | bbe4e4a8852dcb74ffed0cac38e810560eab2106 | 14e1a623a00d03e924557bf16ddd9b6640dae1d1 | refs/heads/master | 2020-05-20T10:02:27.014587 | 2015-07-26T16:16:35 | 2015-07-26T16:16:35 | 42,217,187 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,448 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codelabor.system.file.web.spring.command;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import org.springframework.web.multipart.MultipartFile;
/**
* 파일 List Command
*
* @author Shin Sang-jae
*
*/
public class FileList implements Serializable {
/**
* 시리얼 버전 UID
*/
private static final long serialVersionUID = -7498417407011918047L;
/**
* 파일 List
*/
private List<MultipartFile> file = new ArrayList<MultipartFile>();
/**
* Map Id
*/
private String mapId;
/**
* 파일 저장 방식
*/
private String repositoryType;
/**
* Map Id를 가져온다.
*
* @return Map Id
*/
public String getMapId() {
return mapId;
}
/**
* Map Id를 설정한다.
*
* @param mapId
* Map Id
*/
public void setMapId(String mapId) {
this.mapId = mapId;
}
/**
* 파일 저장 방식을 가져온다.
*
* @return 파일 저장 방식
*/
public String getRepositoryType() {
return repositoryType;
}
/**
* 파일 저장 방식을 설정한다.
*
* @param repositoryType
* 파일 저장 방식
*/
public void setRepositoryType(String repositoryType) {
this.repositoryType = repositoryType;
}
/**
* 파일을 가져온다.
*
* @return 파일 목록
*/
public List<MultipartFile> getFile() {
return file;
}
/**
* 파일을 설정한다.
*
* @param file
* 파일 목록
*/
public void setFile(List<MultipartFile> file) {
this.file = file;
}
}
| [
"codelabor@28bd6c16-bb75-11dd-ad1f-f1f9622dbc98"
] | codelabor@28bd6c16-bb75-11dd-ad1f-f1f9622dbc98 |
6ab77dc12015109f26b2b5b28a584a64957d882d | 02e523d8b7e9853e6c109957f45b4e196d0a3876 | /src/main/java/com/rogy/smarte/fsu/message/MessageBodyBreakerFault.java | 531ac3e579729ba9453cfb98bbb5017bf533d102 | [] | no_license | ocean-wave/smarte | 5061012bc608ddb0bbe9c34bf4ef257dddcefd7f | 973c83fde384afdb124d9e290053904e4d9912f1 | refs/heads/master | 2020-06-16T12:04:28.540778 | 2019-06-06T13:02:19 | 2019-06-06T13:02:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,166 | java | package com.rogy.smarte.fsu.message;
import com.rogy.smarte.fsu.VirtualFsuUtil;
import com.rogy.smarte.util.UInt32;
import java.nio.ByteOrder;
/**
* 查询断路器故障应答消息体对象
*/
public class MessageBodyBreakerFault {
private byte[] code = new byte[6]; // 地址
private long codeValue; // 地址数值
private long fault = 0; // 故障码
private MessageBodyBreakerFault(){};
/**
* 从字节数组解析MessageBodyBreakerFault对象。
* @param bo 字节序。
* @param src 包含对象内容的源字节数组。
* @return 解析得到的MessageBodyBreakerFault对象。null表示失败。
*/
public static MessageBodyBreakerFault create(ByteOrder bo, byte[] src) {
return create(bo, src, 0, src.length);
}
/**
* 从字节数组解析MessageBodyBreakerFault对象。
* @param bo 字节序。
* @param src 包含对象内容的源字节数组。
* @param begin 对象内容起始字节索引。
* @param len 对象内容长度。
* @return 解析得到的MessageBodyBreakerFault对象。null表示失败。
*/
public static MessageBodyBreakerFault create(ByteOrder bo, byte[] src, int begin, int len) {
MessageBodyBreakerFault flt = new MessageBodyBreakerFault();
int pos = begin;
pos += flt.setCode(src, pos);
flt.fault = UInt32.get(bo, src, pos);
pos += 4;
return flt;
}
/**
* 设置地址。
* @param src 包含地址的字节数组。
* @param srcBegin 地址内容的起始字节索引。
* @return 地址的字节长度。
*/
public int setCode(byte[] src, int srcBegin) {
// 拷贝地址内容
System.arraycopy(src, srcBegin, code, 0, code.length);
// 计算地址数值
codeValue = VirtualFsuUtil.calcCodeValue(code, 0, code.length);
return code.length;
}
public final byte[] getCode() {
return code;
}
public long getCodeValue() {
return codeValue;
}
public long getFault() {
return fault;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{code=");
sb.append(String.format("%012X", codeValue));
sb.append(" fault=");
sb.append(fault);
sb.append("}");
return sb.toString();
}
}
| [
"420785022@qq.com"
] | 420785022@qq.com |
003ef723df27cbaf15f301eb31923e82dde13efd | 32b72e1dc8b6ee1be2e80bb70a03a021c83db550 | /ast_results/scoute-dich_K9-MailClient/k9mail/src/main/java/com/fsck/k9/ui/message/LocalMessageExtractorLoader.java | 3a6f171497f5fbe871015608211697d183906c5f | [] | no_license | cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning | d90c41a17e88fcd99d543124eeb6e93f9133cb4a | 0564143d92f8024ff5fa6b659c2baebf827582b1 | refs/heads/master | 2020-07-13T13:53:40.297493 | 2019-01-11T11:51:18 | 2019-01-11T11:51:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,925 | java | // isComment
package com.fsck.k9.ui.message;
import android.content.AsyncTaskLoader;
import android.content.Context;
import android.support.annotation.Nullable;
import android.support.annotation.WorkerThread;
import android.util.Log;
import com.fsck.k9.K9;
import com.fsck.k9.mail.Message;
import com.fsck.k9.mailstore.LocalMessage;
import com.fsck.k9.mailstore.MessageViewInfoExtractor;
import com.fsck.k9.mailstore.MessageViewInfo;
import com.fsck.k9.ui.crypto.MessageCryptoAnnotations;
public class isClassOrIsInterface extends AsyncTaskLoader<MessageViewInfo> {
private static final MessageViewInfoExtractor isVariable = isNameExpr.isMethod();
private final Message isVariable;
private MessageViewInfo isVariable;
@Nullable
private MessageCryptoAnnotations isVariable;
public isConstructor(Context isParameter, Message isParameter, @Nullable MessageCryptoAnnotations isParameter) {
super(isNameExpr);
this.isFieldAccessExpr = isNameExpr;
this.isFieldAccessExpr = isNameExpr;
}
@Override
protected void isMethod() {
if (isNameExpr != null) {
super.isMethod(isNameExpr);
}
if (isMethod() || isNameExpr == null) {
isMethod();
}
}
@Override
public void isMethod(MessageViewInfo isParameter) {
this.isFieldAccessExpr = isNameExpr;
super.isMethod(isNameExpr);
}
@Override
@WorkerThread
public MessageViewInfo isMethod() {
try {
return isNameExpr.isMethod(isNameExpr, isNameExpr);
} catch (Exception isParameter) {
isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, "isStringConstant", isNameExpr);
return null;
}
}
public boolean isMethod(LocalMessage isParameter, MessageCryptoAnnotations isParameter) {
return isNameExpr == isNameExpr && isNameExpr.isMethod(isNameExpr);
}
}
| [
"matheus@melsolucoes.net"
] | matheus@melsolucoes.net |
705a32665f27f4422c2814953018e2c266e9a95d | b529c47385d5a70a49ea2ec4307c70c25bfccd14 | /core/src/main/java/io/onedev/server/search/entity/pullrequest/HasPendingReviewsCriteria.java | 5c63259e47e57d1ee6ed9065a8362790433cb8f8 | [
"MIT"
] | permissive | 4RnD/onedev | 69edd817e2a39327f92980c5e89e251ae1c3001c | 882b544ead21750967e660aadfbc77afbe0e6eb7 | refs/heads/master | 2020-05-22T06:02:54.716955 | 2019-05-11T13:30:35 | 2019-05-11T13:30:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,681 | java | package io.onedev.server.search.entity.pullrequest;
import javax.persistence.criteria.From;
import javax.persistence.criteria.Path;
import javax.persistence.criteria.Predicate;
import io.onedev.server.model.Project;
import io.onedev.server.model.PullRequest;
import io.onedev.server.model.PullRequestReview;
import io.onedev.server.model.User;
import io.onedev.server.search.entity.EntityQuery;
import io.onedev.server.search.entity.QueryBuildContext;
import io.onedev.server.util.PullRequestConstants;
public class HasPendingReviewsCriteria extends PullRequestCriteria {
private static final long serialVersionUID = 1L;
@Override
public Predicate getPredicate(Project project, QueryBuildContext<PullRequest> context, User user) {
From<?, ?> join = context.getJoin(PullRequestConstants.ATTR_REVIEWS);
Path<?> userPath = EntityQuery.getPath(join, PullRequestReview.ATTR_USER);
Path<?> excludeDatePath = EntityQuery.getPath(join, PullRequestReview.ATTR_EXCLUDE_DATE);
Path<?> approvedPath = EntityQuery.getPath(join, PullRequestReview.ATTR_RESULT_APPROVED);
return context.getBuilder().and(
context.getBuilder().isNotNull(userPath),
context.getBuilder().isNull(excludeDatePath),
context.getBuilder().isNull(approvedPath));
}
@Override
public boolean matches(PullRequest request, User user) {
for (PullRequestReview review: request.getReviews()) {
if (review.getExcludeDate() == null && review.getResult() == null)
return true;
}
return false;
}
@Override
public boolean needsLogin() {
return false;
}
@Override
public String toString() {
return PullRequestQuery.getRuleName(PullRequestQueryLexer.HasPendingReviews);
}
}
| [
"robin@pmease.com"
] | robin@pmease.com |
6fc21b9e85237b2bfb9faf557b29da1c6b04bb3d | 46ef04782c58b3ed1d5565f8ac0007732cddacde | /platform.core/metamodel.emfapi/src/org/modelio/metamodel/uml/informationFlow/DataFlow.java | 54cca934a1c22ea6ed29fbced6650adb2323b306 | [] | no_license | daravi/modelio | 844917412abc21e567ff1e9dd8b50250515d6f4b | 1787c8a836f7e708a5734d8bb5b8a4f1a6008691 | refs/heads/master | 2020-05-26T17:14:03.996764 | 2019-05-23T21:30:10 | 2019-05-23T21:30:45 | 188,309,762 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,992 | java | /*
* Copyright 2013-2018 Modeliosoft
*
* This file is part of Modelio.
*
* Modelio 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.
*
* Modelio 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 Modelio. If not, see <http://www.gnu.org/licenses/>.
*
*/
/* WARNING: GENERATED FILE - DO NOT EDIT
Metamodel: Standard, version 2.3.00, by Modeliosoft
Generator version: 3.8.00
Generated on: Sep 7, 2018
*/
package org.modelio.metamodel.uml.informationFlow;
import com.modeliosoft.modelio.javadesigner.annotations.objid;
import org.modelio.metamodel.uml.behavior.commonBehaviors.Signal;
import org.modelio.metamodel.uml.infrastructure.UmlModelElement;
import org.modelio.metamodel.uml.statik.NameSpace;
/**
* DataFlow v0.0.9054
*
*
* DataFlows are the representation of all types of information that can be transmitted between elements. For example, DataFlows can be objects or requests.
*
* A DataFlow between elements expresses that the kind of information that it represents (defined through its ModelSignal) can circulate between the connected elements. This can provide high level (system level) information exchange diagrams.
*/
@objid ("00645dc0-c4bf-1fd8-97fe-001ec947cd2a")
public interface DataFlow extends UmlModelElement {
/**
* The metaclass simple name.
*/
@objid ("31739a3f-07b1-4781-a059-0f73c62a55e8")
public static final String MNAME = "DataFlow";
/**
* The metaclass qualified name.
*/
@objid ("85632579-4280-4520-8174-53d11999f109")
public static final String MQNAME = "Standard.DataFlow";
/**
* Getter for relation 'DataFlow->Destination'
*
* Metamodel description:
* <i>Designates the NameSpaces (Packages, Classes, and so on) that are targeted by the DataFlow.</i>
*/
@objid ("cb85610a-2b7a-4fe6-82b8-265f1181c182")
NameSpace getDestination();
/**
* Setter for relation 'DataFlow->Destination'
*
* Metamodel description:
* <i>Designates the NameSpaces (Packages, Classes, and so on) that are targeted by the DataFlow.</i>
*/
@objid ("f686905d-0f36-42e1-b528-731b7e19b571")
void setDestination(NameSpace value);
/**
* Getter for relation 'DataFlow->Origin'
*
* Metamodel description:
* <i>null</i>
*/
@objid ("bdb182d5-020e-427e-8a2c-4c2cfd51b425")
NameSpace getOrigin();
/**
* Setter for relation 'DataFlow->Origin'
*
* Metamodel description:
* <i>null</i>
*/
@objid ("e165e2fd-e42c-4eb2-9d6c-6ea0fc1bc25d")
void setOrigin(NameSpace value);
/**
* Getter for relation 'DataFlow->Owner'
*
* Metamodel description:
* <i>null</i>
*/
@objid ("10216a1f-a118-4a0c-92f5-02c495339c5d")
NameSpace getOwner();
/**
* Setter for relation 'DataFlow->Owner'
*
* Metamodel description:
* <i>null</i>
*/
@objid ("c01a778a-dfb1-42eb-8feb-b336860cdd3d")
void setOwner(NameSpace value);
/**
* Getter for relation 'DataFlow->SModel'
*
* Metamodel description:
* <i>Defines the DataFlow as being an instance of the associated Signal.</i>
*/
@objid ("80909ac5-15f1-432f-92cc-4d9a6f266f52")
Signal getSModel();
/**
* Setter for relation 'DataFlow->SModel'
*
* Metamodel description:
* <i>Defines the DataFlow as being an instance of the associated Signal.</i>
*/
@objid ("2a253688-e37c-47a0-a1e4-0bcc85b4fd4c")
void setSModel(Signal value);
}
| [
"puya@motionmetrics.com"
] | puya@motionmetrics.com |
2e52acb75ffeda8253df618dd46b47aa701287a2 | 39cfb88e657e1b20601a5044ea51dcfa3bd36da6 | /HelloWorld.java | 171334592a609ea2f088be0213fe6d85a88e6d04 | [] | no_license | Mulisheng/demo | a7959d03bceb72110114ae88b1b6b8ec0e18809a | d44cd1fc32af71324be305410b329c4da2ddd500 | refs/heads/master | 2022-07-24T20:05:29.936588 | 2020-05-13T10:05:15 | 2020-05-13T10:05:15 | 263,508,479 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 305 | java | public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
System.out.println("1");
System.out.println("2");
System.out.println("Hello World");
System.out.println("Test other");
System.out.println("1");
System.out.println("2");
}
} | [
"="
] | = |
419bc836a5038618c25b3f39376a52b84542413f | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/3/3_3fd3f126911e5fb4ac72952adc89863178714346/ClaimsSet/3_3fd3f126911e5fb4ac72952adc89863178714346_ClaimsSet_t.java | 8dee30f73e7dd446d3b544771dc746e6dc4bbf3f | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 4,524 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.oltu.oauth2.jwt;
import static java.lang.String.format;
/**
* Represents the Claims Set as defined in the 6.1 section of the JWT specification.
*
* @see http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-06#section-6.1
*/
public final class ClaimsSet {
/**
* The {@code iss} JWT Claims Set parameter.
*/
private final String issuer;
/**
* The {@code sub} JWT Claims Set parameter.
*/
private final String subject;
/**
* The {@code aud} JWT Claims Set parameter.
*/
private final String audience;
/**
* The {@code exp} JWT Claims Set parameter.
*/
private final long expirationTime;
/**
* The {@code nbf} JWT Claims Set parameter.
*/
private final String notBefore;
/**
* The {@code iat} JWT Claims Set parameter.
*/
private final long issuedAt;
/**
* The {@code jti} JWT Claims Set parameter.
*/
private final String jwdId;
/**
* The {@code typ} JWT Claims Set parameter.
*/
private final String type;
ClaimsSet(String issuer,
String subject,
String audience,
long expirationTime,
String notBefore,
long issuedAt,
String jwdId,
String type) {
this.issuer = issuer;
this.subject = subject;
this.audience = audience;
this.expirationTime = expirationTime;
this.notBefore = notBefore;
this.issuedAt = issuedAt;
this.jwdId = jwdId;
this.type = type;
}
/**
* Returns the {@code iss} JWT Claims Set parameter.
*
* @return the {@code iss} JWT Claims Set parameter.
*/
public String getIssuer() {
return issuer;
}
/**
* Returns the {@code sub} JWT Claims Set parameter.
*
* @return the {@code sub} JWT Claims Set parameter.
*/
public String getSubject() {
return subject;
}
/**
* Returns the {@code aud} JWT Claims Set parameter.
*
* @return the {@code aud} JWT Claims Set parameter.
*/
public String getAudience() {
return audience;
}
/**
* Returns the {@code exp} JWT Claims Set parameter.
*
* @return the {@code exp} JWT Claims Set parameter.
*/
public long getExpirationTime() {
return expirationTime;
}
/**
* Returns the {@code nbf} JWT Claims Set parameter.
*
* @return the {@code nbf} JWT Claims Set parameter.
*/
public String getNotBefore() {
return notBefore;
}
/**
* Returns the {@code iat} JWT Claims Set parameter.
*
* @return the {@code iat} JWT Claims Set parameter.
*/
public long getIssuedAt() {
return issuedAt;
}
/**
* Returns the {@code jti} JWT Claims Set parameter.
*
* @return the {@code jti} JWT Claims Set parameter.
*/
public String getJwdId() {
return jwdId;
}
/**
* Returns the {@code typ} JWT Claims Set parameter.
*
* @return the {@code typ} JWT Claims Set parameter.
*/
public String getType() {
return type;
}
@Override
public String toString() {
System.out.println("np");
return format("{\"iss\": \"%s\", \"sub\": \"%s\", \"aud\": \"%s\", \"exp\": %s, \"nbf\": \"%s\", \"iat\": %s, \"jti\": \"%s\", \"typ\": \"%s\" }",
issuer, subject, audience, expirationTime, notBefore, issuedAt, jwdId, type);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
9aa7146e929edb2bfafb640ccc314130f514efdd | b2a635e7cc27d2df8b1c4197e5675655add98994 | /b/g/m/a.java | 76178012050ebe40301f528868a0b040cd0580b4 | [] | no_license | history-purge/LeaveHomeSafe-source-code | 5f2d87f513d20c0fe49efc3198ef1643641a0313 | 0475816709d20295134c1b55d77528d74a1795cd | refs/heads/master | 2023-06-23T21:38:37.633657 | 2021-07-28T13:27:30 | 2021-07-28T13:27:30 | 390,328,492 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,621 | java | package b.g.m;
import android.os.Build;
import android.os.Bundle;
import android.text.style.ClickableSpan;
import android.util.SparseArray;
import android.view.View;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.accessibility.AccessibilityNodeProvider;
import b.g.c;
import b.g.m.e0.c;
import b.g.m.e0.d;
import java.lang.ref.WeakReference;
import java.util.Collections;
import java.util.List;
public class a {
private static final View.AccessibilityDelegate c = new View.AccessibilityDelegate();
private final View.AccessibilityDelegate a;
private final View.AccessibilityDelegate b;
public a() {
this(c);
}
public a(View.AccessibilityDelegate paramAccessibilityDelegate) {
this.a = paramAccessibilityDelegate;
this.b = new a(this);
}
private boolean a(int paramInt, View paramView) {
SparseArray sparseArray = (SparseArray)paramView.getTag(c.tag_accessibility_clickable_spans);
if (sparseArray != null) {
WeakReference<ClickableSpan> weakReference = (WeakReference)sparseArray.get(paramInt);
if (weakReference != null) {
ClickableSpan clickableSpan = weakReference.get();
if (a(clickableSpan, paramView)) {
clickableSpan.onClick(paramView);
return true;
}
}
}
return false;
}
private boolean a(ClickableSpan paramClickableSpan, View paramView) {
if (paramClickableSpan != null) {
ClickableSpan[] arrayOfClickableSpan = c.i(paramView.createAccessibilityNodeInfo().getText());
for (int i = 0; arrayOfClickableSpan != null && i < arrayOfClickableSpan.length; i++) {
if (paramClickableSpan.equals(arrayOfClickableSpan[i]))
return true;
}
}
return false;
}
static List<c.a> b(View paramView) {
List<?> list2 = (List)paramView.getTag(c.tag_accessibility_actions);
List<?> list1 = list2;
if (list2 == null)
list1 = Collections.emptyList();
return (List)list1;
}
View.AccessibilityDelegate a() {
return this.b;
}
public d a(View paramView) {
if (Build.VERSION.SDK_INT >= 16) {
AccessibilityNodeProvider accessibilityNodeProvider = this.a.getAccessibilityNodeProvider(paramView);
if (accessibilityNodeProvider != null)
return new d(accessibilityNodeProvider);
}
return null;
}
public void a(View paramView, int paramInt) {
this.a.sendAccessibilityEvent(paramView, paramInt);
}
public void a(View paramView, c paramc) {
this.a.onInitializeAccessibilityNodeInfo(paramView, paramc.x());
}
public boolean a(View paramView, int paramInt, Bundle paramBundle) {
List<c.a> list = b(paramView);
boolean bool2 = false;
int i = 0;
while (true) {
bool1 = bool2;
if (i < list.size()) {
c.a a1 = list.get(i);
if (a1.a() == paramInt) {
bool1 = a1.a(paramView, paramBundle);
break;
}
i++;
continue;
}
break;
}
bool2 = bool1;
if (!bool1) {
bool2 = bool1;
if (Build.VERSION.SDK_INT >= 16)
bool2 = this.a.performAccessibilityAction(paramView, paramInt, paramBundle);
}
boolean bool1 = bool2;
if (!bool2) {
bool1 = bool2;
if (paramInt == c.accessibility_action_clickable_span)
bool1 = a(paramBundle.getInt("ACCESSIBILITY_CLICKABLE_SPAN_ID", -1), paramView);
}
return bool1;
}
public boolean a(View paramView, AccessibilityEvent paramAccessibilityEvent) {
return this.a.dispatchPopulateAccessibilityEvent(paramView, paramAccessibilityEvent);
}
public boolean a(ViewGroup paramViewGroup, View paramView, AccessibilityEvent paramAccessibilityEvent) {
return this.a.onRequestSendAccessibilityEvent(paramViewGroup, paramView, paramAccessibilityEvent);
}
public void b(View paramView, AccessibilityEvent paramAccessibilityEvent) {
this.a.onInitializeAccessibilityEvent(paramView, paramAccessibilityEvent);
}
public void c(View paramView, AccessibilityEvent paramAccessibilityEvent) {
this.a.onPopulateAccessibilityEvent(paramView, paramAccessibilityEvent);
}
public void d(View paramView, AccessibilityEvent paramAccessibilityEvent) {
this.a.sendAccessibilityEventUnchecked(paramView, paramAccessibilityEvent);
}
static final class a extends View.AccessibilityDelegate {
final a a;
a(a param1a) {
this.a = param1a;
}
public boolean dispatchPopulateAccessibilityEvent(View param1View, AccessibilityEvent param1AccessibilityEvent) {
return this.a.a(param1View, param1AccessibilityEvent);
}
public AccessibilityNodeProvider getAccessibilityNodeProvider(View param1View) {
d d = this.a.a(param1View);
return (d != null) ? (AccessibilityNodeProvider)d.a() : null;
}
public void onInitializeAccessibilityEvent(View param1View, AccessibilityEvent param1AccessibilityEvent) {
this.a.b(param1View, param1AccessibilityEvent);
}
public void onInitializeAccessibilityNodeInfo(View param1View, AccessibilityNodeInfo param1AccessibilityNodeInfo) {
c c = c.a(param1AccessibilityNodeInfo);
c.k(v.L(param1View));
c.i(v.F(param1View));
c.f(v.f(param1View));
this.a.a(param1View, c);
c.a(param1AccessibilityNodeInfo.getText(), param1View);
List<c.a> list = a.b(param1View);
for (int i = 0; i < list.size(); i++)
c.a(list.get(i));
}
public void onPopulateAccessibilityEvent(View param1View, AccessibilityEvent param1AccessibilityEvent) {
this.a.c(param1View, param1AccessibilityEvent);
}
public boolean onRequestSendAccessibilityEvent(ViewGroup param1ViewGroup, View param1View, AccessibilityEvent param1AccessibilityEvent) {
return this.a.a(param1ViewGroup, param1View, param1AccessibilityEvent);
}
public boolean performAccessibilityAction(View param1View, int param1Int, Bundle param1Bundle) {
return this.a.a(param1View, param1Int, param1Bundle);
}
public void sendAccessibilityEvent(View param1View, int param1Int) {
this.a.a(param1View, param1Int);
}
public void sendAccessibilityEventUnchecked(View param1View, AccessibilityEvent param1AccessibilityEvent) {
this.a.d(param1View, param1AccessibilityEvent);
}
}
}
/* Location: /home/yc/Downloads/LeaveHomeSafe.jar!/b/g/m/a.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/ | [
"game0427game@gmail.com"
] | game0427game@gmail.com |
aea93e5d481977bbf4a39911a82f5763e10dd095 | 1e8a5381b67b594777147541253352e974b641c5 | /com/google/android/gms/tagmanager/zzch.java | d5de5753ff97c9d473d4a604c1e7685e25f2fec4 | [] | no_license | jramos92/Verify-Prueba | d45f48829e663122922f57720341990956390b7f | 94765f020d52dbfe258dab9e36b9bb8f9578f907 | refs/heads/master | 2020-05-21T14:35:36.319179 | 2017-03-11T04:24:40 | 2017-03-11T04:24:40 | 84,623,529 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 436 | java | package com.google.android.gms.tagmanager;
import com.google.android.gms.internal.zzag.zza;
abstract interface zzch
{
public abstract void zzd(zzag.zza paramzza);
public abstract zzcj zzeU(String paramString);
}
/* Location: C:\Users\julian\Downloads\Veryfit 2 0_vV2.0.28_apkpure.com-dex2jar.jar!\com\google\android\gms\tagmanager\zzch.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"ramos.marin92@gmail.com"
] | ramos.marin92@gmail.com |
e159faf72cc0ea3fb72d22757b0de91bd7382276 | aaac30301a5b18e8b930d9932a5e11d514924c7e | /demos/myairbattle/src/me/maiz/game/myairbattle/model/SmallPlane.java | 2c652d247fbf3ab0406d27c69f23a52f251444ac | [] | no_license | stickgoal/trainning | 9206e30fc0b17c817c5826a6e212ad25a3b9d8a6 | 58348f8a3d21e91cad54d0084078129e788ea1f4 | refs/heads/master | 2023-03-14T12:29:11.508957 | 2022-12-01T09:17:50 | 2022-12-01T09:17:50 | 91,793,279 | 1 | 0 | null | 2023-02-22T06:55:38 | 2017-05-19T10:06:01 | JavaScript | UTF-8 | Java | false | false | 2,046 | java | package me.maiz.game.myairbattle.model;
import java.awt.Graphics;
import me.maiz.game.myairbattle.config.Config;
import me.maiz.game.myairbattle.config.EnemyPlaneType;
import me.maiz.game.myairbattle.ui.GamePlayingScreen;
import me.maiz.game.myairbattle.util.ImageConstants;
import me.maiz.game.myairbattle.util.ImageStore;
public class SmallPlane extends EnemyPlane {
public SmallPlane(GamePlayingScreen getPlayingPanel, EnemyPlaneType enemyType) {
super(getPlayingPanel, enemyType);
}
@Override
public void drawFighting(Graphics g) {
new Thread(new DrawFighting(g)).start();
}
private void drawFightingRun(Graphics g) {
this.setPlaneImage(ImageStore.SMALL_PLANE_FIGHTING_IMG);
this.setWidth(ImageConstants.SMALL_PLANE_FIGHTING_WIDTH);
this.setHeight(ImageConstants.SMALL_PLANE_FIGHTING_HEIGHT);
super.draw(g);
try {
Thread.sleep(Config.SMALL_PLANE_STATUS_CHANGE_INTERVAL);
} catch (InterruptedException e) {
}
}
@Override
public void drawKilled(Graphics g) {
new Thread(new DrawKilled(g)).start();
}
private void drawKilledRun(Graphics g) {
this.setPlaneImage(ImageStore.SMALL_PLANE_KILLED_IMG);
this.setWidth(ImageConstants.SMALL_PLANE_KILLED_WIDTH);
this.setHeight(ImageConstants.SMALL_PLANE_KILLED_HEIGHT);
super.draw(g);
try {
Thread.sleep(Config.SMALL_PLANE_STATUS_CHANGE_INTERVAL);
} catch (InterruptedException e) {
}
this.setPlaneImage(ImageStore.SMALL_PLANE_ASHED_IMG);
this.setWidth(ImageConstants.SMALL_PLANE_ASHED_WIDTH);
this.setHeight(ImageConstants.SMALL_PLANE_ASHED_HEIGHT);
super.draw(g);
try {
Thread.sleep(Config.SMALL_PLANE_STATUS_CHANGE_INTERVAL);
} catch (InterruptedException e) {
}
}
class DrawFighting implements Runnable {
private Graphics g;
DrawFighting(Graphics g) {
this.g = g;
}
@Override
public void run() {
drawFightingRun(g);
}
}
class DrawKilled implements Runnable {
private Graphics g;
DrawKilled(Graphics g) {
this.g = g;
}
@Override
public void run() {
drawKilledRun(g);
}
}
}
| [
"stick.goal@163.com"
] | stick.goal@163.com |
4b11d291d7fe87616c8a41d4d74cfeaa1c8698c9 | 092c76fcc6c411ee77deef508e725c1b8277a2fe | /hybris/bin/ext-commerce/chineselogisticservices/src/de/hybris/platform/chineselogisticservices/delivery/DeliveryTimeSlotService.java | aaaaca459661171af9d6ea68fce7643ae716fe0d | [
"MIT"
] | permissive | BaggaShivanshu2/hybris-bookstore-tutorial | 4de5d667bae82851fe4743025d9cf0a4f03c5e65 | 699ab7fd8514ac56792cb911ee9c1578d58fc0e3 | refs/heads/master | 2022-11-28T12:15:32.049256 | 2020-08-05T11:29:14 | 2020-08-05T11:29:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,258 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2000-2015 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*/
package de.hybris.platform.chineselogisticservices.delivery;
import de.hybris.platform.chineselogisticservices.model.DeliveryTimeSlotModel;
import de.hybris.platform.core.model.order.CartModel;
import java.util.List;
/**
* Providing some services about DeliveryTimeSlot
*/
public interface DeliveryTimeSlotService
{
/**
* Getting all of the DeliveryTimeSlots
*
* @return List<DeliveryTimeSlotModel>
*/
List<DeliveryTimeSlotModel> getAllDeliveryTimeSlots();
/**
* Getting the DeliveryTimeSlot by code
*
* @param code
* the code of the DeliveryTimeSlotModel
* @return DeliveryTimeSlotModel
*/
DeliveryTimeSlotModel getDeliveryTimeSlotByCode(String code);
/**
* Setting the DeliveryTimeSlot into the cartmodel
*
* @param cartModel
* @param deliveryTimeSlot
*/
void setDeliveryTimeSlot(CartModel cartModel, String deliveryTimeSlot);
}
| [
"xelilim@hotmail.com"
] | xelilim@hotmail.com |
f06177ef4ae30191f302509dc13545f7eec2c891 | 96854348abc6d3b06d89f9d479256b61e3c39184 | /src/main/java/com/monto/api/demo/repository/UserRepositories/ConfirmationTokenRepository.java | 4f1f7456dfbb1ecce983949487d1ee94260c85bf | [] | no_license | svenugoban/Monto-api | 4bad6baee685abe9de504a227020c3b63878a1e2 | 4e21fe9c186364c4e085a71e1bdcbbe357724df3 | refs/heads/master | 2023-03-24T10:51:13.147257 | 2021-03-19T15:13:24 | 2021-03-19T15:13:24 | 349,462,191 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 360 | java | package com.monto.api.demo.repository.UserRepositories;
import com.monto.api.demo.model.userModel.ConfirmationToken;
import org.springframework.data.mongodb.repository.MongoRepository;
public interface ConfirmationTokenRepository extends MongoRepository<ConfirmationToken,String> {
ConfirmationToken findByConfirmationToken(String confirmationToken);
}
| [
"you@example.com"
] | you@example.com |
e06950fca9983665a14f06141eab4cf7773e0508 | e9886898f83a441cfb6d6e7bbbb2813847c4574c | /collection/src/main/java/in/softsolutionzone/provider/services/impl/ChannelPartnerProviderServicesImpl.java | 133cc4658a44465c012c21bc2409a95eca0f8970 | [] | no_license | msmartpay/proxima | 3f792d1d49dd9ae5526c0567e7439c2f96220ba1 | a4d2969c5eac96b6b2bb0cab439723220183bb6c | refs/heads/main | 2023-04-19T18:40:22.362280 | 2021-05-04T12:23:44 | 2021-05-04T12:27:40 | 302,057,747 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,253 | java | package in.softsolutionzone.provider.services.impl;
import java.util.HashMap;
import java.util.Map;
import javax.ws.rs.core.MediaType;
import org.json.JSONException;
import org.json.JSONObject;
import org.modelmapper.ModelMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import in.softsolutionzone.provider.call.ProviderCall;
import in.softsolutionzone.provider.services.ChannelPartnerProviderServices;
import in.softsolutionzone.util.ICICIEncryption;
import in.softsolutionzone.util.ProjectConstants;
@Service
public class ChannelPartnerProviderServicesImpl implements ChannelPartnerProviderServices {
private static final Logger logger = LoggerFactory.getLogger(ChannelPartnerProviderServicesImpl.class);
@Autowired
ProviderCall providerCall;
@Autowired
ModelMapper mapper;
@Override
public JSONObject ecollection(JSONObject request) {
// TODO Auto-generated method stub
JSONObject transaction=null;
try {
//TODO encryption of request
logger.info("ecollection : "+request);
String[] MSMARTPAY_URLS=ProjectConstants.MSMARTPAY_URLS;
if(MSMARTPAY_URLS!=null && MSMARTPAY_URLS.length>0) {
for (int i = 0; i < MSMARTPAY_URLS.length; i++) {
String url=MSMARTPAY_URLS[i];
String method="POST";
Map<String,String> headerMaps=new HashMap<String, String>();
headerMaps.put("content-type",MediaType.APPLICATION_JSON);
headerMaps.put("APIKEY", ProjectConstants.MSMARTPAY_KEY);
String iciciResponse=providerCall.apiCallWithStringResponse(url, request.toString(), method, headerMaps);
logger.info("ICICIPayoutResponseModel iciciResponse : "+iciciResponse);
if(iciciResponse!=null) {
String decryptedResponse=ICICIEncryption.decrypt(iciciResponse);
logger.info("ICICIPayoutResponseModel decryptedResponse : "+decryptedResponse);
transaction=new JSONObject(decryptedResponse);
}
}
}
} catch (JSONException e) {
// TODO Auto-generated catch block
logger.error("JSONException", e);
}catch (Exception e) {
// TODO Auto-generated catch block
logger.error("Exception", e);
}
return transaction;
}
}
| [
"care@softsolutionzone.in"
] | care@softsolutionzone.in |
71262928523805804b84cd7b5d37ad48d3e8cbb0 | cd2ef82fb7f18d31f316da82bc94a76a497c4ab0 | /api-backend/3scale-library/src/main/java/com/hisense/gateway/library/repository/DomainRepository.java | 767bba2600dc92dbaa070320570ed6cb1752867c | [] | no_license | xiongliang1/3scale-api-2.0.0 | 3b6a45f196f44235fd9da336e09ecbf4b7f854b4 | 2843b45d8639d10b75b0477e3e63786136bf23d3 | refs/heads/master | 2023-03-23T06:51:31.839019 | 2021-03-24T03:40:24 | 2021-03-24T03:40:24 | 350,931,316 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 675 | java | /*
* Licensed Materials - Property of tenxcloud.com
* (C) Copyright 2019 TenxCloud. All Rights Reserved.
*
* 2019-11-24 @author jinshan
*/
package com.hisense.gateway.library.repository;
import com.hisense.gateway.library.model.pojo.base.Domain;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
public interface DomainRepository extends CommonQueryRepository<Domain, Integer> {
/**
* 根据租户查询
*
* @param name
* @return
*/
@Query("select a from Domain a where a.name = :name order by a.createTime desc")
Domain searchDomainByName(@Param("name") String name);
}
| [
"chaoyang.beijing"
] | chaoyang.beijing |
26fcce0c911c3d6a17bec24d8a7c72582ec3dd45 | ccf3b9914a04e121a323de4050dc8a1c450bf21b | /10_JAVA_Training_Projects/80_Level_25_BIG_TASK_REFACTORING/human/StudentsDataBase.java | 6422f480e4de757bcace94d667b918e7d146fb57 | [] | no_license | PetrBelmst/JavaRush_Course_Rep | 81333e65963bb69ee2f032acbaab025580cc5bde | 39e6fb64f8d5fc9b5284c8477b70cd1c62a769d5 | refs/heads/master | 2021-05-23T14:20:51.674509 | 2020-05-05T05:45:25 | 2020-05-05T05:45:25 | 253,335,289 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,498 | java | package com.company.human;
import java.util.ArrayList;
import java.util.List;
public class StudentsDataBase {
public static List<Student> students = new ArrayList<>();
public static void addInfoAboutStudent(Student student) {
students.add(student);
printInfoAboutStudent(student);
}
public static void printInfoAboutStudent(Student student) {
System.out.println("Имя: " + student.getName() + " Возраст: " + student.getAge());
}
public static void removeStudent(int index) {
if (index > students.size() || index < 0) {
return;
} else
students.remove(index);
}
public static void findDimaOrSasha() {
for (int i = 0; i < students.size(); i++) {
if (students.get(i).getName().equals("Dima")) {
System.out.println("Студент Dima есть в базе.");
break;
}
if (students.get(i).getName().equals("Sasha")) {
System.out.println("Студент Sasha есть в базе.");
break;
}
}
}
}
/*
Рефакторинг (8)
public static void removeStudent(int index) {
if (index > students.size() || index < 0) {
return;
} else
students.remove(index);
}
public static void findDimaOrSasha() {
for (int i = 0; i < students.size(); i++) {
if (students.get(i).getName().equals("Dima")) {
System.out.println("Студент Dima есть в базе.");
break;
}
if (students.get(i).getName().equals("Sasha")) {
System.out.println("Студент Sasha есть в базе.");
break;
}
}
}
*/
/*
Рефакторинг (7)
public static void addInfoAboutStudent(Student student) {
students.add(student);
printInfoAboutStudent(student);
}
public static void printInfoAboutStudent(Student student) {
System.out.println("Имя: " + student.getName() + " Возраст: " + student.getAge());
}
*/
/*
import java.util.ArrayList;
import java.util.List;
public class StudentsDataBase {
public static List<Student> students = new ArrayList<>();
public static void addInfoAboutStudent(String name, int age, double averageGrade) {
Student student = new Student(name, age, averageGrade);
students.add(student);
printInfoAboutStudent(student.getName(), student);
}
public static void printInfoAboutStudent(String name, Student student) {
System.out.println("Имя: " + name + " Возраст: " + student.getAge());
}
public static void removeStudent(int index) throws IndexOutOfBoundsException {
students.remove(index);
}
public static void findDimaOrSasha() {
boolean found = false;
for (int i = 0; i < students.size(); i++) {
if (!found) {
if (students.get(i).getName().equals("Dima")) {
System.out.println("Студент Dima есть в базе.");
found = true;
}
if (students.get(i).getName().equals("Sasha")) {
System.out.println("Студент Sasha есть в базе.");
found = true;
}
}
}
}
}
*/ | [
"PetrBelmst@users.noreply.github.com"
] | PetrBelmst@users.noreply.github.com |
a0416d935c3174fedd22777ae759c3ef85d0819f | b50cb4f1a1681ecf79c5fe6e58cc807708b1f772 | /core/src/main/java/com/wuxp/payment/PaymentConfigurationProvider.java | a1118fa0461fb3e1c43c38399df5c122d85273fd | [] | no_license | fengwuxp/fengwuxp-payment-plugins | 34d23a4c52a2aca21ab9f1eea0a38cbaf0a7e829 | 36fd73b97d6d40a2e5939167ccb35f878a40ba31 | refs/heads/master | 2020-12-15T14:54:19.295053 | 2020-07-15T07:03:36 | 2020-07-15T07:03:36 | 235,146,484 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 423 | java | package com.wuxp.payment;
import com.wuxp.payment.model.PlatformPaymentPartnerIdentity;
/**
* 支付配置提供者
* @see PaymentConfiguration
* @author wuxp
*/
public interface PaymentConfigurationProvider {
/**
* 获取支付配置
*
* @param <T>
* @param identity
* @return
*/
<T extends PaymentConfiguration> T getPaymentConfig(PlatformPaymentPartnerIdentity identity);
}
| [
"1109695647@qq.com"
] | 1109695647@qq.com |
a46addee78d8d6eb9aebbd83609e1b6f5eb22912 | 2bc2eadc9b0f70d6d1286ef474902466988a880f | /tags/mule-1.4.4/transports/xfire/src/test/java/org/mule/providers/soap/xfire/XFireAddClientServiceInterfaceTestCase.java | d973614749a96d33e1715fa23d619a22143afcd2 | [] | 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 | 1,434 | 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 CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.providers.soap.xfire;
import org.mule.MuleManager;
import org.mule.impl.MuleDescriptor;
import org.mule.tck.AbstractMuleTestCase;
import java.util.ArrayList;
import java.util.List;
public class XFireAddClientServiceInterfaceTestCase extends AbstractMuleTestCase
{
protected MuleDescriptor descriptor;
protected XFireConnector connector;
protected void doSetUp() throws Exception
{
getManager(true);
MuleManager.getInstance().start();
connector = new XFireConnector();
List clientServices = new ArrayList();
clientServices.add("org.mule.components.simple.EchoService");
connector.setClientServices(clientServices);
connector.initialise();
}
protected void doTearDown() throws Exception
{
if (!connector.isDisposed())
{
connector.dispose();
}
}
public void testXfireAddClientServiceInterface() throws Exception
{
assertNotNull(connector.getXfire().getServiceRegistry().getService("EchoService"));
}
}
| [
"dirk.olmes@bf997673-6b11-0410-b953-e057580c5b09"
] | dirk.olmes@bf997673-6b11-0410-b953-e057580c5b09 |
d70207beab7845c4c6d4b69c00b6fd51c1be546f | 258de8e8d556901959831bbdc3878af2d8933997 | /utopia-service/utopia-business/utopia-business-api/src/main/java/com/voxlearning/utopia/mapper/TeacherRewardMapper.java | 96a4c277f69e794338ef5b8eb1e7f6b2e78fb7bc | [] | no_license | Explorer1092/vox | d40168b44ccd523748647742ec376fdc2b22160f | 701160b0417e5a3f1b942269b0e7e2fd768f4b8e | refs/heads/master | 2020-05-14T20:13:02.531549 | 2019-04-17T06:54:06 | 2019-04-17T06:54:06 | 181,923,482 | 0 | 4 | null | 2019-04-17T15:53:25 | 2019-04-17T15:53:25 | null | UTF-8 | Java | false | false | 371 | java | package com.voxlearning.utopia.mapper;
import lombok.Data;
import java.io.Serializable;
/**
* 老师奖励mapper,目前包括智慧课堂和星星奖励
* Created by Shuai Huan on 2015/7/14.
*/
@Data
public class TeacherRewardMapper implements Serializable {
private String rewardContent;
private String date;
private String type;
}
| [
"wangahai@300.cn"
] | wangahai@300.cn |
c9f41d23c0f063488e73e5b010896ab2a4104dba | 24d8cf871b092b2d60fc85d5320e1bc761a7cbe2 | /SQuirrel_SQL/rev4007-4394/right-trunk-4394/app/src/net/sourceforge/squirrel_sql/client/gui/session/ToolsPopupCompletionInfo.java | 17383cf286ab78d5d32409a3d24ff071c119f7f9 | [] | no_license | joliebig/featurehouse_fstmerge_examples | af1b963537839d13e834f829cf51f8ad5e6ffe76 | 1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad | refs/heads/master | 2016-09-05T10:24:50.974902 | 2013-03-28T16:28:47 | 2013-03-28T16:28:47 | 9,080,611 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,158 | java | package net.sourceforge.squirrel_sql.client.gui.session;
import net.sourceforge.squirrel_sql.fw.completion.CompletionInfo;
import net.sourceforge.squirrel_sql.fw.util.Resources;
import net.sourceforge.squirrel_sql.client.action.SquirrelAction;
import javax.swing.*;
public class ToolsPopupCompletionInfo extends CompletionInfo
{
private String _selectionString;
private Action _action;
private int _maxCandidateSelectionStringName;
private String _description;
public ToolsPopupCompletionInfo(String selectionString, Action action)
{
_selectionString = selectionString;
_action = action;
}
public String getCompareString()
{
return _selectionString;
}
public String getCompletionString()
{
return "";
}
public Action getAction()
{
return _action;
}
public String toString()
{
return _selectionString + getDist() + getDescription();
}
private Object getDescription()
{
if(null == _description)
{
if(null != _action.getValue(Action.SHORT_DESCRIPTION))
{
_description = _action.getValue(Action.SHORT_DESCRIPTION).toString();
}
else
{
_description = "";
}
if( false == _action instanceof SquirrelAction
&& null != _action.getValue(Resources.ACCELERATOR_STRING)
&& 0 != _action.getValue(Resources.ACCELERATOR_STRING).toString().trim().length())
{
_description += " (" + _action.getValue(Resources.ACCELERATOR_STRING) + ")";
}
}
return _description;
}
private String getDist()
{
int len = _maxCandidateSelectionStringName - _selectionString.length() + 4;
StringBuffer ret = new StringBuffer();
for(int i=0; i < len; ++i)
{
ret.append(' ');
}
return ret.toString();
}
public void setMaxCandidateSelectionStringName(int maxCandidateSelectionStringName)
{
_maxCandidateSelectionStringName = maxCandidateSelectionStringName;
}
public String getSelectionString()
{
return _selectionString;
}
}
| [
"joliebig@fim.uni-passau.de"
] | joliebig@fim.uni-passau.de |
156a8259a81d5e8ea56262fdad604268918a00dc | 09d0ddd512472a10bab82c912b66cbb13113fcbf | /TestApplications/TF-BETA-THERMATK-v5.7.1/DecompiledCode/Fernflower/src/main/java/org/telegram/messenger/_$$Lambda$MessagesController$lgHhjVycSWp0O6n3iqFJOy3XH1A.java | ee61919e2e0f8a0010895e8457a07fa0b2277467 | [] | no_license | sgros/activity_flow_plugin | bde2de3745d95e8097c053795c9e990c829a88f4 | 9e59f8b3adacf078946990db9c58f4965a5ccb48 | refs/heads/master | 2020-06-19T02:39:13.865609 | 2019-07-08T20:17:28 | 2019-07-08T20:17:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 926 | java | package org.telegram.messenger;
import org.telegram.tgnet.TLRPC;
import org.telegram.ui.ActionBar.BaseFragment;
// $FF: synthetic class
public final class _$$Lambda$MessagesController$lgHhjVycSWp0O6n3iqFJOy3XH1A implements Runnable {
// $FF: synthetic field
private final MessagesController f$0;
// $FF: synthetic field
private final TLRPC.TL_error f$1;
// $FF: synthetic field
private final BaseFragment f$2;
// $FF: synthetic field
private final TLRPC.TL_messages_editChatAdmin f$3;
// $FF: synthetic method
public _$$Lambda$MessagesController$lgHhjVycSWp0O6n3iqFJOy3XH1A(MessagesController var1, TLRPC.TL_error var2, BaseFragment var3, TLRPC.TL_messages_editChatAdmin var4) {
this.f$0 = var1;
this.f$1 = var2;
this.f$2 = var3;
this.f$3 = var4;
}
public final void run() {
this.f$0.lambda$null$50$MessagesController(this.f$1, this.f$2, this.f$3);
}
}
| [
"crash@home.home.hr"
] | crash@home.home.hr |
26436aa303de7ec1116373a647832e63997ba7c9 | 082e26b011e30dc62a62fae95f375e4f87d9e99c | /docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/protocal/protobuf/asf.java | c7bb4dceae49fb4eb22cb46bbd259f16d5243ae7 | [] | no_license | xsren/AndroidReverseNotes | 9631a5aabc031006e795a112b7ac756a8edd4385 | 9202c276fe9f04a978e4e08b08e42645d97ca94b | refs/heads/master | 2021-04-07T22:50:51.072197 | 2019-07-16T02:24:43 | 2019-07-16T02:24:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,846 | java | package com.tencent.p177mm.protocal.protobuf;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.p177mm.p205bt.C1331a;
import java.util.LinkedList;
import p690e.p691a.p692a.C6087a;
import p690e.p691a.p692a.p693a.C6086a;
import p690e.p691a.p692a.p695b.p697b.C6091a;
import p690e.p691a.p692a.p698c.C6093a;
/* renamed from: com.tencent.mm.protocal.protobuf.asf */
public final class asf extends bsr {
public String kBE;
public String nSX;
public String nZe;
/* renamed from: op */
public final int mo4669op(int i, Object... objArr) {
AppMethodBeat.m2504i(56840);
int ix;
if (i == 0) {
C6093a c6093a = (C6093a) objArr[0];
if (this.BaseRequest != null) {
c6093a.mo13479iy(1, this.BaseRequest.computeSize());
this.BaseRequest.writeFields(c6093a);
}
if (this.nSX != null) {
c6093a.mo13475e(2, this.nSX);
}
if (this.kBE != null) {
c6093a.mo13475e(3, this.kBE);
}
if (this.nZe != null) {
c6093a.mo13475e(4, this.nZe);
}
AppMethodBeat.m2505o(56840);
return 0;
} else if (i == 1) {
if (this.BaseRequest != null) {
ix = C6087a.m9557ix(1, this.BaseRequest.computeSize()) + 0;
} else {
ix = 0;
}
if (this.nSX != null) {
ix += C6091a.m9575f(2, this.nSX);
}
if (this.kBE != null) {
ix += C6091a.m9575f(3, this.kBE);
}
if (this.nZe != null) {
ix += C6091a.m9575f(4, this.nZe);
}
AppMethodBeat.m2505o(56840);
return ix;
} else if (i == 2) {
C6086a c6086a = new C6086a((byte[]) objArr[0], unknownTagHandler);
for (ix = C1331a.getNextFieldNumber(c6086a); ix > 0; ix = C1331a.getNextFieldNumber(c6086a)) {
if (!super.populateBuilderWithField(c6086a, this, ix)) {
c6086a.ems();
}
}
AppMethodBeat.m2505o(56840);
return 0;
} else if (i == 3) {
C6086a c6086a2 = (C6086a) objArr[0];
asf asf = (asf) objArr[1];
int intValue = ((Integer) objArr[2]).intValue();
switch (intValue) {
case 1:
LinkedList Vh = c6086a2.mo13445Vh(intValue);
int size = Vh.size();
for (intValue = 0; intValue < size; intValue++) {
byte[] bArr = (byte[]) Vh.get(intValue);
C7267hl c7267hl = new C7267hl();
C6086a c6086a3 = new C6086a(bArr, unknownTagHandler);
for (boolean z = true; z; z = c7267hl.populateBuilderWithField(c6086a3, c7267hl, C1331a.getNextFieldNumber(c6086a3))) {
}
asf.BaseRequest = c7267hl;
}
AppMethodBeat.m2505o(56840);
return 0;
case 2:
asf.nSX = c6086a2.BTU.readString();
AppMethodBeat.m2505o(56840);
return 0;
case 3:
asf.kBE = c6086a2.BTU.readString();
AppMethodBeat.m2505o(56840);
return 0;
case 4:
asf.nZe = c6086a2.BTU.readString();
AppMethodBeat.m2505o(56840);
return 0;
default:
AppMethodBeat.m2505o(56840);
return -1;
}
} else {
AppMethodBeat.m2505o(56840);
return -1;
}
}
}
| [
"alwangsisi@163.com"
] | alwangsisi@163.com |
8ad2df6cd7cdb6a3012556fa36af28a22c27690b | 7fc7b8ea77698230ac6fa6710fc872a7e5ea16cf | /menggeba/mall-base-service/src/main/java/com/vivebest/mall/dao/AdminDao.java | 3969288cfb5aed6ffce089354f9092625abde237 | [] | no_license | 1473478496/JavaMaven | 1c8f82868a3cd08e40ddc16e478678d50b2fcc6a | 6affc09c8207103f2481957f850ecbbecd6d2936 | refs/heads/master | 2020-03-07T16:54:07.660234 | 2018-04-01T04:48:32 | 2018-04-01T04:48:32 | 127,591,841 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 766 | java | /*
* Copyright 2005-2013 www.mgb.cn. All rights reserved.
* Support: http://www.mgb.cn
* License: http://www.mgb.cn/license
*/
package com.vivebest.mall.dao;
import com.vivebest.mall.core.dao.BaseDao;
import com.vivebest.mall.entity.Admin;
/**
* Dao - 管理员
*
* @author vnb shop Team
* @version 3.0
*/
public interface AdminDao extends BaseDao<Admin, Long> {
/**
* 判断用户名是否存在
*
* @param username
* 用户名(忽略大小写)
* @return 用户名是否存在
*/
boolean usernameExists(String username);
/**
* 根据用户名查找管理员
*
* @param username
* 用户名(忽略大小写)
* @return 管理员,若不存在则返回null
*/
Admin findByUsername(String username);
} | [
"1473478496@qq.com"
] | 1473478496@qq.com |
6331cdfe52439008719891a59741eed6773e412a | ac59fc1c266333322745039c8d3e4a3db4fc8a78 | /java/com/hmdzl/spspd/windows/WndSadGhost.java | 8ca2ebc2b0207de51a1ffa6d391a02e53121f836 | [] | no_license | user00100-bug/SPS-PD | 3186d3f31ec44089af498fac60c59425878d29b8 | 8b47d7c7d45e22833ee5f32ad64745c5ad8ede20 | refs/heads/master | 2023-01-07T06:20:16.019858 | 2020-10-25T12:28:50 | 2020-10-25T12:28:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,420 | java | /*
* Pixel Dungeon
* Copyright (C) 2012-2014 Oleg Dolya
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.hmdzl.spspd.windows;
import com.hmdzl.spspd.Dungeon;
import com.hmdzl.spspd.actors.mobs.npcs.Ghost;
import com.hmdzl.spspd.items.Item;
import com.hmdzl.spspd.messages.Messages;
import com.hmdzl.spspd.scenes.PixelScene;
import com.hmdzl.spspd.sprites.FetidRatSprite;
import com.hmdzl.spspd.sprites.GnollTricksterSprite;
import com.hmdzl.spspd.sprites.GreatCrabSprite;
import com.hmdzl.spspd.ui.RedButton;
import com.hmdzl.spspd.ui.RenderedTextMultiline;
import com.hmdzl.spspd.ui.Window;
public class WndSadGhost extends Window {
private static final int WIDTH = 120;
private static final int BTN_HEIGHT = 20;
private static final float GAP = 2;
public WndSadGhost(final Ghost ghost, final int type) {
super();
IconTitle titlebar = new IconTitle();
RenderedTextMultiline message;
switch (type) {
case 1:
default:
titlebar.icon(new FetidRatSprite());
titlebar.label( Messages.get(this, "rat_title") );
message = PixelScene.renderMultiline(Messages.get(this, "rat")+Messages.get(this, "give_item"), 6 );
break;
case 2:
titlebar.icon(new GnollTricksterSprite());
titlebar.label(Messages.get(this, "gnoll_title"));
message = PixelScene.renderMultiline( Messages.get(this, "gnoll")+Messages.get(this, "give_item"), 6 );
break;
case 3:
titlebar.icon(new GreatCrabSprite());
titlebar.label( Messages.get(this, "crab_title"));
message = PixelScene.renderMultiline( Messages.get(this, "crab")+Messages.get(this, "give_item"), 6 );
break;
}
titlebar.setRect(0, 0, WIDTH, 0);
add(titlebar);
message.maxWidth(WIDTH);
message.setPos(0,titlebar.bottom() + GAP);
add(message);
RedButton btnWeapon = new RedButton( Messages.get(this, "weapon")) {
@Override
protected void onClick() {
selectReward(ghost, Ghost.Quest.weapon);
}
};
btnWeapon.setRect(0, message.top() + message.height() + GAP, WIDTH,
BTN_HEIGHT);
add(btnWeapon);
RedButton btnArmor = new RedButton( Messages.get(this, "armor")) {
@Override
protected void onClick() {
selectReward(ghost, Ghost.Quest.armor);
}
};
btnArmor.setRect(0, btnWeapon.bottom() + GAP, WIDTH, BTN_HEIGHT);
add(btnArmor);
RedButton btnPet = new RedButton( Messages.get(this, "pet")) {
@Override
protected void onClick() {
selectReward(ghost, Ghost.Quest.pet);
}
};
btnPet.setRect(0, btnArmor.bottom() + GAP, WIDTH, BTN_HEIGHT);
add(btnPet);
resize(WIDTH, (int) btnPet.bottom());
}
private void selectReward(Ghost ghost, Item reward) {
hide();
Dungeon.level.drop(reward, ghost.pos).sprite.drop();
ghost.yell(Messages.get(this, "farewell"));
ghost.die(null);
Ghost.Quest.complete();
}
}
| [
"295754791@qq.com"
] | 295754791@qq.com |
f471aa9b673d1c8d3754bed8c420fcc5966581c0 | e2b768c14ac30d1412430f25b3d0b6871848e52e | /SinaStorageSDK/scs-java-sdk/src/main/java/com/sina/cloudstorage/services/scs/internal/S3MetadataResponseHandler.java | bfe666e02e132caa2da51ffa274441479d0a2d0d | [] | no_license | SinaCloudStorage/SinaStorage-SDK-Android | 3de2d343143dabd2580bb392f9204ba9dd8650b1 | 59ad1098733fc42d5c189ca96ec41d33a055b2b7 | refs/heads/master | 2020-06-02T04:05:53.868306 | 2015-05-14T07:14:33 | 2015-05-14T07:14:33 | 24,451,274 | 7 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,527 | java | /*
* Copyright 2010-2013 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.sina.cloudstorage.services.scs.internal;
import com.sina.cloudstorage.SCSWebServiceResponse;
import com.sina.cloudstorage.http.HttpResponse;
import com.sina.cloudstorage.services.scs.model.ObjectMetadata;
/**
* S3 response handler that knows how to pull S3 object metadata out of a
* response and unmarshall it into an S3ObjectMetadata object.
*/
public class S3MetadataResponseHandler extends AbstractS3ResponseHandler<ObjectMetadata> {
/**
* @see com.amazonaws.http.HttpResponseHandler#handle(com.amazonaws.http.HttpResponse)
*/
public SCSWebServiceResponse<ObjectMetadata> handle(HttpResponse response) throws Exception {
ObjectMetadata metadata = new ObjectMetadata();
populateObjectMetadata(response, metadata);
SCSWebServiceResponse<ObjectMetadata> awsResponse = parseResponseMetadata(response);
awsResponse.setResult(metadata);
return awsResponse;
}
}
| [
"poorevil@gmail.com"
] | poorevil@gmail.com |
cf3bd417f021b7cf612e96bb633c98f01cacf48b | cb4e96db361aa27ebf2573642cbbf9f7e2c47a96 | /wingtool-parent/wingtoolparent/wingtool-extra/src/main/java/com/orangehaswing/extra/tokenizer/engine/word/WordWord.java | 7dfc2f6a860cc404da105e4efb7e9655e015e34a | [] | no_license | orangehaswing/wingtool | 5242fb3929185b2c8c8c8f81ffd2a53959104829 | a8851360e40a4b1c9b24345f0aeb332e50ed8c5a | refs/heads/master | 2020-05-03T12:49:44.276966 | 2019-04-16T13:16:41 | 2019-04-16T13:16:41 | 178,637,437 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 685 | java | package com.orangehaswing.extra.tokenizer.engine.word;
import com.orangehaswing.extra.tokenizer.Word;
/**
* Word分词中的一个单词包装
*
* @author looly
*
*/
public class WordWord implements Word {
private org.apdplat.word.segmentation.Word word;
/**
* 构造
*
* @param word {@link org.apdplat.word.segmentation.Word}
*/
public WordWord(org.apdplat.word.segmentation.Word word) {
this.word = word;
}
@Override
public String getText() {
return word.getText();
}
@Override
public int getStartOffset() {
return -1;
}
@Override
public int getEndOffset() {
return -1;
}
@Override
public String toString() {
return getText();
}
}
| [
"673556024@qq.com"
] | 673556024@qq.com |
abc3836baf644d91f9f96ebe6ab95fef10f486e5 | 3af5305388a7955696a5c38081f0e0a292dde88e | /core/src/main/java/org/jboss/osgi/framework/internal/BundleReferenceClassLoader.java | db8e0b09137b3ae02b0cbe111f8392e9db9dabd8 | [] | no_license | gspandy/jbosgi-framework | 3fd9504a83b8a0d9ffc5742fea99f92007d78085 | b96c625ab5141861728980f0bb185b07e5c0952a | refs/heads/master | 2023-08-09T20:26:00.986632 | 2012-04-30T19:38:58 | 2012-04-30T19:38:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,314 | java | /*
* JBoss, Home of Professional Open Source
* Copyright 2009, Red Hat Middleware LLC, 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.jboss.osgi.framework.internal;
import org.jboss.modules.ModuleClassLoader;
import org.jboss.modules.ModuleClassLoaderFactory;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleReference;
/**
* A {@link ModuleClassLoader} that hosld a reference to the underlying bundle.
*
* @author thomas.diesler@jboss.com
* @since 16-Dec-2010
*/
class BundleReferenceClassLoader<T extends AbstractBundleState> extends ModuleClassLoader implements BundleReference {
private final T bundleState;
BundleReferenceClassLoader(Configuration configuration, T bundleState) {
super(configuration);
assert bundleState != null : "Null bundleState";
this.bundleState = bundleState;
}
@Override
public Bundle getBundle() {
return bundleState;
}
T getBundleState() {
return bundleState;
}
static class Factory<T extends AbstractBundleState> implements ModuleClassLoaderFactory {
private T bundleState;
public Factory(T bundleState) {
this.bundleState = bundleState;
}
@Override
public ModuleClassLoader create(Configuration configuration) {
return new BundleReferenceClassLoader<T>(configuration, bundleState);
}
}
}
| [
"thomas.diesler@jboss.com"
] | thomas.diesler@jboss.com |
08543a9f31461726698f77257466fba7179bf2fb | 15f0514701a78e12750f68ba09d68095172493ee | /Java/930.java | 339d1f271169e1b9f170e0f6d60cba8aee0556cd | [
"MIT"
] | permissive | strengthen/LeetCode | 5e38c8c9d3e8f27109b9124ae17ef8a4139a1518 | 3ffa6dcbeb787a6128641402081a4ff70093bb61 | refs/heads/master | 2022-12-04T21:35:17.872212 | 2022-11-30T06:23:24 | 2022-11-30T06:23:24 | 155,958,163 | 936 | 365 | MIT | 2021-11-15T04:02:45 | 2018-11-03T06:47:38 | null | UTF-8 | Java | false | false | 3,529 | java | __________________________________________________________________________________________________
sample 1 ms submission
class Solution {
public int numSubarraysWithSum(int[] A, int S) {
return solution2(A, S);
}
public int solution1(int[] a, int s){
int i=0, j=0, k=0, len=a.length, count=0, n=0;
for(i=0; i<len; i++){ if(a[i]==1){ a[j++]=i; } }
//Replace the ones with the index numbers
if(j<len) a[j]=-1;
// System.out.println(Arrays.toString(a));
// System.out.println(a.length);
if(j==0) if(s==0) return len*(len+1)/2; else return 0;
if(j==len) if(s!=0) return len-s+1; else return 0;
//Using a sentinel value to decide end of array
if(s>j) return 0; //There aren't enough ones
else{
if(s==0){
//we have to count the zeroes between ones and use n*(n+1)/2
for(k=0; k<j; k++){
//number of zeroes between a[k-1] and a[k] are a[k]-a[k-1]-1
n=a[k]-(k-1==-1?0:a[k-1]+1);
if(n!=0) count+=n*(n+1)/2;
// System.out.println("k is "+k+" and n is "+n);
}
n=len-a[k-1]-1;
if(n!=0) count+=n*(n+1)/2;
// System.out.println("k is "+k+" and n is "+n);
}
// Now use a sliding window of length k
else {
for(k=s-1; k<j; k++){
// System.out.println("k is "+k);
//start of the window is at a[k-s+1]
//end of the window is at a[k]
//zeroes before the window are a[k-s+1]-a[k-s] accounting for extra one
//zeroes after the window are a[k+1]-a[k] accounting for extra one
//so total number of ways is (a[k-s+1]-a[k-s])*(a[k+1]-a[k])
//need to handle the ending conditions where k-s<0 and k+1=j
count+=(a[k-s+1]-(k-s<0?-1:a[k-s]))*((k+1==j?len:a[k+1])-a[k]);
}
}
}
return count;
}
public int solution2(int[] a, int s){
int j = 0, k = 0, len = a.length, count = 0, n = 0;
for (int i = 0; i < len; i++) {
if (a[i] == 1) {
a[j++] = i;
}
}
if (j < len)
a[j] = -1;
if (j == 0)
if (s == 0)
return len * (len + 1) / 2;
else
return 0;
if (j == len)
if (s != 0)
return len - s + 1;
else
return 0;
if (s > j)
return 0;
else {
if (s == 0) {
for (k = 0; k < j; k++) {
n = a[k] - (k == 0 ? 0 : a[k - 1] + 1);
if (n != 0)
count += n * (n + 1) / 2;
}
n = len - a[k - 1] - 1;
if (n != 0)
count += n * (n + 1) / 2;
} else {
for (k = s - 1; k < j; k++) {
count += (a[k - s + 1] - (k - s < 0 ? -1 : a[k - s])) * ((k + 1 == j ? len : a[k + 1]) - a[k]);
}
}
}
return count;
}
}
__________________________________________________________________________________________________
sample 39888 kb submission
class Solution {
public int numSubarraysWithSum(int[] A, int S) {
int[] count = new int[A.length+1];
count[0] = 1;
int cur = 0;
int res = 0;
for (int a : A) {
cur += a;
if (cur - S >= 0) {
res += count[cur - S];
}
count[cur] ++;
}
return res;
}
}
__________________________________________________________________________________________________
| [
"strengthen@users.noreply.github.com"
] | strengthen@users.noreply.github.com |
82e3454696d02bf8fa16dd95aa5ba478125d7c0b | e61a1cf870b8fd0ae8f90d400242b75c420faccb | /common/src/main/java/com/xgame/common/var/IDestructor.java | f72462b473579b37d328283aa0765063d256b2b0 | [] | no_license | wangyong0716/XGameAndroid | c9f5ed57e7c438f40f6892f594eb3bce8fa7d64a | 51a3fcb81674256829c8dd5927e69c0dbed44332 | refs/heads/master | 2020-04-15T12:04:16.138794 | 2019-01-08T13:53:26 | 2019-01-08T13:53:26 | 164,658,690 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 195 | java | package com.xgame.common.var;
/**
* Copyright (C) 2013, Xiaomi Inc. All rights reserved.
*
* Created by jackwang
* on 18-1-24.
*/
public interface IDestructor {
void destructor();
}
| [
"wangyong5@xiaomi.com"
] | wangyong5@xiaomi.com |
4347c0546944da7096a8f6b1845d0e43d21bf526 | e047870136e1958ce80dad88fa931304ada49a1b | /eu.cessar.ct.core.platform/src/eu/cessar/ct/core/platform/CESSARPreferencesAccessor.java | 6d8b9385b6ec73d579a46a0cdb6fbdc94a16aaad | [] | no_license | ONagaty/SEA-ModellAR | f4994a628459a20b9be7af95d41d5e0ff8a21f77 | a0f6bdbb072503ea584d72f872f29a20ea98ade5 | refs/heads/main | 2023-06-04T07:07:02.900503 | 2021-06-19T20:54:47 | 2021-06-19T20:54:47 | 376,735,297 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,431 | java | /**
* <copyright>
*
* Copyright (c) Continental Engineering Services and others. http://www.conti-engineering.com All rights reserved.
*
* File created by uidl6458 Aug 5, 2010 3:39:03 PM </copyright>
*/
package eu.cessar.ct.core.platform;
import org.artop.aal.common.metamodel.AutosarMetaModelVersionData;
import org.eclipse.core.resources.IProject;
/**
* @author uidl6458
*
* @Review uidl6458 - 12.04.2012
*/
public class CESSARPreferencesAccessor extends AbstractPreferencesAccessor
{
/**
* Namespace used by accessor
*/
public static final String NAMESPACE = "eu.cessar.ct.core.platform"; //$NON-NLS-1$
/**
*
*/
public static final String EDITING_NAMESPACE = "eu.cessar.ct.edit.ui"; //$NON-NLS-1$
/**
* Key used in the case the options are project specific
*/
public static final String KEY_PROJECT_SPECIFIC = "projectSpecific";//$NON-NLS-1$
/**
* Key used for the enablement of the Filter on key pressed option
*/
public static final String KEY_ENABLEMENT_OF_FILTER_LIMIT_VALUE = "EnablementOfFilterOnKeyPressed"; //$NON-NLS-1$
/**
* Key used for the value of limit when the Filter on key pressed option is disabled
*/
public static final String KEY_FILTER_LIMIT_VALUE = "FilterOnKeyPressedLimitValue"; //$NON-NLS-1$
/**
* Key to store the configuration variant inside the preference
*/
public static final String KEY_CONFIGURATION_VARIANT = "configuration.variant"; //$NON-NLS-1$
/**
* Return the compatibility mode of the project. For metamodel 3.1.5 {@link ECompatibilityMode#FULL} will returned
* for anything else {@link ECompatibilityMode#NONE} will be returned, never null
*
* @param project
* @return the compatibility mode
*/
public static ECompatibilityMode getCompatibilityMode(IProject project)
{
AutosarMetaModelVersionData data = getAutosarVersionData(project);
if (data != null && data.getMajor() == 3 && data.getMinor() == 1)
{
return ECompatibilityMode.FULL;
}
else
{
return ECompatibilityMode.NONE;
}
}
/**
* @param project
* @return project variant:DEVELOPMENT or PRODUCTION. If the project is null, return DEVELOPMENT
*/
public static EProjectVariant getProjectVariant(IProject project)
{
// return getEnumPref(project, NAMESPACE, KEY_CONFIGURATION_VARIANT, EProjectVariant.class,
// EProjectVariant.OTHER);
if (project == null)
{
return EProjectVariant.DEVELOPMENT;
}
String stringPref = getStringPref(project, NAMESPACE, KEY_CONFIGURATION_VARIANT,
EProjectVariant.DEVELOPMENT.toString());
EProjectVariant projectVariant = EProjectVariant.getProjectVariant(stringPref);
return projectVariant;
}
/**
* @param project
* @param variant
*/
public static void setProjectVariant(IProject project, EProjectVariant variant)
{
setEnumPref(project, NAMESPACE, KEY_CONFIGURATION_VARIANT, variant);
}
/**
* Gets the project specific preference for the Enablement of FilterOnKeyPressed
*
* @param project
* - the project on which the preference exists
* @return - the state of FilterOnKeyPressed
*/
public static boolean getEnablementOfFilterOnKeyPressed(IProject project)
{
return getBooleanPrefWithWSDefault(project, EDITING_NAMESPACE, KEY_PROJECT_SPECIFIC,
KEY_ENABLEMENT_OF_FILTER_LIMIT_VALUE, false);
}
/**
* Gets the project specific preference for the FilterOnKeyPressedLimitValue
*
* @param project
* - the project on which the preference exists
* @return - the value at which the FilterOnKeyPressed will be disabled
*/
public static String getFilterOnKeyPressedLimitValue(IProject project)
{
return getStringPrefWithWSDefault(project, EDITING_NAMESPACE, KEY_PROJECT_SPECIFIC, KEY_FILTER_LIMIT_VALUE,
"30"); //$NON-NLS-1$
}
/**
* @param project
* - the project on which the preference is set
* @param value
* - the state of FilterOnKeyPressed
*/
public static void setEnablementOfFilterOnKeyPressedInProject(IProject project, boolean value)
{
setBooleanPref(project, EDITING_NAMESPACE, KEY_ENABLEMENT_OF_FILTER_LIMIT_VALUE, value);
}
/**
* @param project
* - the project on which the preference is set
* @param filterLimitValue
* - the value at which the FilterOnKeyPressed will be disabled
*/
public static void setFilterOnKeyPressedLimitValueInProject(IProject project, String filterLimitValue)
{
setStringPref(project, EDITING_NAMESPACE, KEY_FILTER_LIMIT_VALUE, filterLimitValue);
}
/**
* @param selection
* - the state of FilterOnKeyPressed
*/
public static void setEnablementOfFilterOnKeyPressedInWs(boolean selection)
{
setWorkspaceBooleanPref(EDITING_NAMESPACE, KEY_ENABLEMENT_OF_FILTER_LIMIT_VALUE, selection);
}
/**
* @param filterLimitValue
* - the value at which the FilterOnKeyPressed will be disabled
*/
public static void setFilterOnKeyPressedLimitValueInWs(String filterLimitValue)
{
setWorkspaceStringPref(EDITING_NAMESPACE, KEY_FILTER_LIMIT_VALUE, filterLimitValue);
}
/**
* Sets the project specific Flag. If the flag is true, the preferences will be returned from the Project preference
* store, if the flag is false the preferences will be returned from the workspace preference store
*
* @param project
* @param value
*/
public static void setProjectSpecific(IProject project, boolean value)
{
setBooleanPref(project, EDITING_NAMESPACE, KEY_PROJECT_SPECIFIC, value);
}
}
| [
"onagaty@a5sol.com"
] | onagaty@a5sol.com |
4c4dababb77024311ae87307f2040e854e13e146 | 343c79e2c638fe5b4ef14de39d885bc5e1e6aca5 | /MyApplication/app/src/main/java/cmcm/com/myapplication/hc.java | 6b2cd58a6e5bd08e5bd425827ab6752936175da2 | [] | no_license | Leonilobayang/AndroidDemos | 05a76647b8e27582fa56e2e15d4195c2ff9b9c32 | 6ac06c3752dfa9cebe81f7c796525a17df620663 | refs/heads/master | 2022-04-17T06:56:52.912639 | 2016-07-01T07:48:50 | 2016-07-01T07:48:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 654 | java | package cmcm.com.myapplication;
import android.view.View;
abstract interface hc
{
public abstract void a(gt paramgt, View paramView);
public abstract void a(gt paramgt, View paramView, float paramFloat);
public abstract void a(gt paramgt, View paramView, long paramLong);
public abstract void a(gt paramgt, View paramView, hf paramhf);
public abstract void b(gt paramgt, View paramView);
public abstract void b(gt paramgt, View paramView, float paramFloat);
public abstract void c(gt paramgt, View paramView, float paramFloat);
}
/* Location: classes-dex2jar.jar
* Qualified Name: hc
* JD-Core Version: 0.6.2
*/ | [
"1004410930@qq.com"
] | 1004410930@qq.com |
75ad4caff3ac382185d6959cef1f61b4047bd06c | 49b4cb79c910a17525b59d4b497a09fa28a9e3a8 | /parserValidCheck/src/main/java/com/ke/css/cimp/ffr/ffr7/Rule_MESSAGE_TYPE.java | f6d6b7d8e0027782e58c0456075d684a6e6e0a8f | [] | no_license | ganzijo/koreanair | a7d750b62cec2647bfb2bed4ca1bf8648d9a447d | e980fb11bc4b8defae62c9d88e5c70a659bef436 | refs/heads/master | 2021-04-26T22:04:17.478461 | 2018-03-06T05:59:32 | 2018-03-06T05:59:32 | 124,018,887 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,262 | java | package com.ke.css.cimp.ffr.ffr7;
/* -----------------------------------------------------------------------------
* Rule_MESSAGE_TYPE.java
* -----------------------------------------------------------------------------
*
* Producer : com.parse2.aparse.Parser 2.5
* Produced : Fri Feb 23 14:31:14 KST 2018
*
* -----------------------------------------------------------------------------
*/
import java.util.ArrayList;
final public class Rule_MESSAGE_TYPE extends Rule
{
public Rule_MESSAGE_TYPE(String spelling, ArrayList<Rule> rules)
{
super(spelling, rules);
}
public Object accept(Visitor visitor)
{
return visitor.visit(this);
}
public static Rule_MESSAGE_TYPE parse(ParserContext context)
{
context.push("MESSAGE_TYPE");
boolean parsed = true;
int s0 = context.index;
ParserAlternative a0 = new ParserAlternative(s0);
ArrayList<ParserAlternative> as1 = new ArrayList<ParserAlternative>();
parsed = false;
{
int s1 = context.index;
ParserAlternative a1 = new ParserAlternative(s1);
parsed = true;
if (parsed)
{
boolean f1 = true;
@SuppressWarnings("unused")
int c1 = 0;
for (int i1 = 0; i1 < 4 && f1; i1++)
{
Rule rule = Rule_Typ_Alpha.parse(context);
if ((f1 = rule != null))
{
a1.add(rule, context.index);
c1++;
}
}
parsed = true;
}
if (parsed)
{
as1.add(a1);
}
context.index = s1;
}
ParserAlternative b = ParserAlternative.getBest(as1);
parsed = b != null;
if (parsed)
{
a0.add(b.rules, b.end);
context.index = b.end;
}
Rule rule = null;
if (parsed)
{
rule = new Rule_MESSAGE_TYPE(context.text.substring(a0.start, a0.end), a0.rules);
}
else
{
context.index = s0;
}
context.pop("MESSAGE_TYPE", parsed);
return (Rule_MESSAGE_TYPE)rule;
}
}
/* -----------------------------------------------------------------------------
* eof
* -----------------------------------------------------------------------------
*/
| [
"wrjo@wrjo-PC"
] | wrjo@wrjo-PC |
7d54036d1239a4714215d3639f26aeebfac030c0 | 8f94a20418f259e5062f3e4b2b45ebe67bd45af5 | /src/test/java/org/elasticsearch/hadoop/integration/cascading/CascadingLocalJsonSearchTest.java | f72d8174ce11687a7d263e6a6083eec8174a73d6 | [
"Apache-2.0"
] | permissive | w2ogroup/elasticsearch-hadoop | 5ee5f215ab701bfed87e23dfb7a3334c6bcf8a7c | 476d1c51e13f476cff11a1feb96b2f0be403a1de | refs/heads/master | 2021-01-21T08:32:39.578350 | 2014-02-04T12:55:18 | 2014-02-04T12:55:18 | 16,517,963 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,015 | java | /*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.hadoop.integration.cascading;
import java.io.OutputStream;
import java.util.Collection;
import java.util.Properties;
import org.elasticsearch.hadoop.cascading.EsTap;
import org.elasticsearch.hadoop.cfg.ConfigurationOptions;
import org.elasticsearch.hadoop.integration.QueryTestParams;
import org.elasticsearch.hadoop.integration.Stream;
import org.elasticsearch.hadoop.util.RestUtils;
import org.elasticsearch.hadoop.util.StringUtils;
import org.elasticsearch.hadoop.util.TestSettings;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import cascading.flow.local.LocalFlowConnector;
import cascading.operation.AssertionLevel;
import cascading.operation.aggregator.Count;
import cascading.operation.assertion.AssertSizeLessThan;
import cascading.operation.filter.FilterNotNull;
import cascading.pipe.Each;
import cascading.pipe.Every;
import cascading.pipe.GroupBy;
import cascading.pipe.Pipe;
import cascading.scheme.local.TextLine;
import cascading.tap.Tap;
import cascading.tuple.Fields;
@RunWith(Parameterized.class)
public class CascadingLocalJsonSearchTest {
@Parameters
public static Collection<Object[]> queries() {
return QueryTestParams.localParams();
}
private final String indexPrefix = "json-";
private final String query;
public CascadingLocalJsonSearchTest(String query) {
this.query = query;
}
private OutputStream OUT = Stream.NULL.stream();
@Test
public void testReadFromES() throws Exception {
Tap in = new EsTap(indexPrefix + "cascading-local/artists");
Pipe pipe = new Pipe("copy");
pipe = new Each(pipe, new FilterNotNull());
pipe = new Each(pipe, AssertionLevel.STRICT, new AssertSizeLessThan(5));
// can't select when using unknown
//pipe = new Each(pipe, new Fields("name"), AssertionLevel.STRICT, new AssertNotNull());
pipe = new GroupBy(pipe);
pipe = new Every(pipe, new Count());
// print out
Tap out = new OutputStreamTap(new TextLine(), OUT);
new LocalFlowConnector(cfg()).connect(in, out, pipe).complete();
}
@Test
public void testNestedField() throws Exception {
String data = "{ \"data\" : { \"map\" : { \"key\" : [ 10, 20 ] } } }";
RestUtils.putData(indexPrefix + "cascading-local/nestedmap", StringUtils.toUTF(data));
RestUtils.refresh(indexPrefix + "cascading-local");
Properties cfg = cfg();
cfg.setProperty("es.mapping.names", "nested:data.map.key");
Tap in = new EsTap(indexPrefix + "cascading-local/nestedmap", new Fields("nested"));
Pipe pipe = new Pipe("copy");
pipe = new Each(pipe, new FilterNotNull());
pipe = new Each(pipe, AssertionLevel.STRICT, new AssertSizeLessThan(2));
// print out
Tap out = new OutputStreamTap(new TextLine(), OUT);
new LocalFlowConnector(cfg).connect(in, out, pipe).complete();
}
private Properties cfg() {
Properties props = new TestSettings().getProperties();
props.put(ConfigurationOptions.ES_QUERY, query);
return props;
}
} | [
"costin.leau@gmail.com"
] | costin.leau@gmail.com |
782eae05371c175b4b32ea59386cd21f3e87c585 | 930c207e245c320b108e9699bbbb036260a36d6a | /BRICK-RDF4J/generatedCode/src/main/java/brickschema/org/schema/_1_0_2/BrickFrame/ILocation.java | 3080b039ebc0aae12b1f38e0e7f98f227823ff7c | [] | no_license | InnovationSE/BRICK-Generated-By-OLGA | 24d278f543471e1ce622f5f45d9e305790181fff | 7874dfa450a8a2b6a6f9927c0f91f9c7d2abd4d2 | refs/heads/master | 2021-07-01T14:13:11.302860 | 2017-09-21T12:44:17 | 2017-09-21T12:44:17 | 104,251,784 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 411 | java | /**
* This file is automatically generated by OLGA
* @author OLGA
* @version 1.0
*/
package brickschema.org.schema._1_0_2.BrickFrame;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.vocabulary.RDF;
import brickschema.org.schema._1_0_2.BrickFrame.ITaggable;
public interface ILocation extends ITaggable {
public IRI iri();
}
| [
"Andre.Ponnouradjane@non.schneider-electric.com"
] | Andre.Ponnouradjane@non.schneider-electric.com |
a1930bf895911ac9c277173b0d9ae239bb3eb33a | ae5eb1a38b4d22c82dfd67c86db73592094edc4b | /project467/src/main/java/org/gradle/test/performance/largejavamultiproject/project467/p2339/Production46783.java | 2d4e6eadc120b88f1d5f4ca309159b0a990bfb44 | [] | no_license | big-guy/largeJavaMultiProject | 405cc7f55301e1fd87cee5878a165ec5d4a071aa | 1cd6a3f9c59e9b13dffa35ad27d911114f253c33 | refs/heads/main | 2023-03-17T10:59:53.226128 | 2021-03-04T01:01:39 | 2021-03-04T01:01:39 | 344,307,977 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,971 | java | package org.gradle.test.performance.largejavamultiproject.project467.p2339;
public class Production46783 {
private Production46780 property0;
public Production46780 getProperty0() {
return property0;
}
public void setProperty0(Production46780 value) {
property0 = value;
}
private Production46781 property1;
public Production46781 getProperty1() {
return property1;
}
public void setProperty1(Production46781 value) {
property1 = value;
}
private Production46782 property2;
public Production46782 getProperty2() {
return property2;
}
public void setProperty2(Production46782 value) {
property2 = value;
}
private String property3;
public String getProperty3() {
return property3;
}
public void setProperty3(String value) {
property3 = value;
}
private String property4;
public String getProperty4() {
return property4;
}
public void setProperty4(String value) {
property4 = value;
}
private String property5;
public String getProperty5() {
return property5;
}
public void setProperty5(String value) {
property5 = value;
}
private String property6;
public String getProperty6() {
return property6;
}
public void setProperty6(String value) {
property6 = value;
}
private String property7;
public String getProperty7() {
return property7;
}
public void setProperty7(String value) {
property7 = value;
}
private String property8;
public String getProperty8() {
return property8;
}
public void setProperty8(String value) {
property8 = value;
}
private String property9;
public String getProperty9() {
return property9;
}
public void setProperty9(String value) {
property9 = value;
}
} | [
"sterling.greene@gmail.com"
] | sterling.greene@gmail.com |
0154cdaa08e160025cf8e73eae6605911495a77a | 49c1781740d756adfdf2fba0f9e7d2e4fd09c082 | /mall-module/mall-ums/src/main/java/com/qin/mall/ums/controller/UserController.java | 7ef0975a0c2b463223d235ae6d6d73f36ff8cd2b | [] | no_license | qinchunabng/QMall | ffb8d5f85a59c3d16dc0c45e294b6360eebacdee | 1018568de4617545d20bea00b88b6cad06685f07 | refs/heads/main | 2022-12-30T09:43:38.748283 | 2020-10-22T10:05:52 | 2020-10-22T10:05:52 | 304,268,617 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 882 | java | package com.qin.mall.ums.controller;
import com.qin.mall.common.domain.Result;
import com.qin.mall.common.domain.bo.AdminUserDetails;
import com.qin.mall.ums.service.UmsAdminService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api("用户管理")
@RestController
@RequestMapping("/user")
public class UserController {
@Autowired
private UmsAdminService umsAdminService;
@ApiOperation("获取用户信息")
@GetMapping("/getDetail")
public Result<AdminUserDetails> getDetailByName(String username){
return Result.success(umsAdminService.getDetail(username));
}
}
| [
"373413704@qq.com"
] | 373413704@qq.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.