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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f17484429c7ec7b27e24fad4c6d8f06d15f9ceca
|
72f750e4a5deb0a717245abd26699bd7ce06777f
|
/ehealth/src/main/java/jkt/hms/util/ComparatorForTwoFields.java
|
bfd6fbd05cde232ed4d4fbfee6d5b6471c86d0e1
|
[] |
no_license
|
vadhwa11/newproject3eh
|
1d68525a2dfbd7acb1a87f9d60f150cef4f12868
|
b28c7892e8b0c3f201abb3a730b21e75d9583ddf
|
refs/heads/master
| 2020-05-15T23:20:17.716904
| 2019-04-21T12:14:46
| 2019-04-21T12:14:46
| 182,526,354
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 942
|
java
|
package jkt.hms.util;
import java.io.Serializable;
import java.util.Comparator;
import java.util.TreeSet;
import jkt.hms.masters.business.DgSampleCollectionDetails;
public class ComparatorForTwoFields implements Serializable,
Comparator<DgSampleCollectionDetails> {
public int compare(DgSampleCollectionDetails m1,
DgSampleCollectionDetails m2) {
Integer int1 = m1.getInvestigation().getSubChargecode().getId();
Integer int2 = m2.getInvestigation().getSubChargecode().getId();
Integer sampleHeaderId1 = m1.getSampleCollectionHeader().getId();
Integer sampleHeaderId2 = m1.getSampleCollectionHeader().getId();
if (sampleHeaderId1 == sampleHeaderId2) {
return int1.compareTo(int2);
} else {
return sampleHeaderId1.compareTo(sampleHeaderId2);
}
}
public static TreeSet<DgSampleCollectionDetails> getApplicationTreeSet() {
return new TreeSet<DgSampleCollectionDetails>(
new ComparatorForTwoFields());
}
}
|
[
"vadhwa11@gmail.com"
] |
vadhwa11@gmail.com
|
8e0d7052329ff119edefa9b457aa7100250e1c7c
|
b766c0b6753f5443fd84c14e870ec316edc116bb
|
/java-basic/examples/ch11/ex4/Truck.java
|
1927ea4afe1204f2ef93cc6f5201233126d50d95
|
[] |
no_license
|
angelpjn/bitcamp
|
5a83b7493812ae5dd4a61b393743a673085b59b5
|
3c1fb28cda2ab15228bcaed53160aabd936df248
|
refs/heads/master
| 2021-09-06T20:31:18.846623
| 2018-02-11T05:23:07
| 2018-02-11T05:23:07
| 104,423,428
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 530
|
java
|
package bitcamp.java100.ch11.ex4;
public class Truck extends Car {
float weight;
@Deprecated
public void move() {
this.run();
}
@Override
public void run() {
System.out.println("간다.");
}
public void dump() {
weight = 0f;
System.out.printf("물건을 내린다.(%.1f톤)\n", this.weight);
}
public void load(float weight) {
this.weight = weight;
System.out.printf("물건을 싣는다.(%.1f톤)\n", this.weight);
}
}
|
[
"angelpjn@naver.com"
] |
angelpjn@naver.com
|
9848c35f664806d0b407e396bcb2bd9e1de2c0da
|
785b5780e27e3028ce1e84496d02080cd63617ee
|
/chap02_Architect_Aesthetic/chap02_02_MyBatis_Core_Principles/chap02_02_03_MyBatis_Spring/spring-mybatis3-lesson/src/main/java/cn/sitedev/crud/daosupport/EmployeeDaoImpl.java
|
7a3bcd01a7590802887960eb70f25b637c23e1b5
|
[] |
no_license
|
mrp321/java_architect_lesson_2020
|
52bbcee169ea527ff764ae2f6f200204d11ad705
|
890f11291681f5ade35ca6aeb23d4df8a8087df7
|
refs/heads/master
| 2022-06-27T09:22:05.278456
| 2020-06-25T15:55:52
| 2020-06-25T15:55:52
| 243,526,129
| 0
| 0
| null | 2022-06-17T02:58:42
| 2020-02-27T13:29:23
|
Java
|
UTF-8
|
Java
| false
| false
| 1,525
|
java
|
package cn.sitedev.crud.daosupport;
import cn.sitedev.crud.bean.Employee;
import cn.sitedev.crud.dao.EmployeeMapper;
import org.springframework.stereotype.Repository;
import java.util.HashMap;
import java.util.List;
@Repository
public class EmployeeDaoImpl extends BaseDao implements EmployeeMapper {
/**
* 暂时只实现了这一个方法
*
* @param empId
* @return
*/
@Override
public Employee selectByPrimaryKey(Integer empId) {
Employee emp = (Employee) this.selectOne("cn.sitedev.crud.dao.EmployeeMapper.selectByPrimaryKey", empId);
return emp;
}
@Override
public int deleteByPrimaryKey(Integer empId) {
return 0;
}
@Override
public int insert(Employee record) {
return 0;
}
@Override
public int updateBatch(List<Employee> list) {
return 0;
}
@Override
public int insertSelective(Employee record) {
return 0;
}
@Override
public int batchInsert(List<Employee> list) {
return 0;
}
@Override
public int updateByPrimaryKeySelective(Employee record) {
return 0;
}
@Override
public int updateByPrimaryKey(Employee record) {
return 0;
}
@Override
public void deleteByList(List<Integer> ids) {
}
@Override
public long countByMap(HashMap<String, String> map) {
return 0;
}
@Override
public List<Employee> selectByMap(HashMap<String, Object> map) {
return null;
}
}
|
[
"y7654f@gmail.com"
] |
y7654f@gmail.com
|
6284e03c69ca82a2e357b4144f8af97db0340eb5
|
be57f63aa618cfebf3b17ec8cbb67ce0c478638d
|
/src/main/java/com/moptra/go4wealth/prs/orderapi/in/bsestarmf/GetPassword.java
|
18a3ee80e600e500b7cd433158177f362790c4c1
|
[] |
no_license
|
gauravkatiyar6891/wealth_back_end
|
b67abe2d94fad555e9b5282020329bb1bd52bfc4
|
857ad22a994a13f5892d2e3023e555480ef6c2c2
|
refs/heads/master
| 2022-09-17T23:10:20.420394
| 2019-07-26T15:12:16
| 2019-07-26T15:12:16
| 199,013,982
| 0
| 0
| null | 2022-09-01T23:10:23
| 2019-07-26T12:37:29
|
Java
|
UTF-8
|
Java
| false
| false
| 3,428
|
java
|
package com.moptra.go4wealth.prs.orderapi.in.bsestarmf;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="UserId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Password" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="PassKey" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"userId",
"password",
"passKey"
})
@XmlRootElement(name = "getPassword")
public class GetPassword {
@XmlElementRef(name = "UserId", namespace = "http://bsestarmf.in/", type = JAXBElement.class)
protected JAXBElement<String> userId;
@XmlElementRef(name = "Password", namespace = "http://bsestarmf.in/", type = JAXBElement.class)
protected JAXBElement<String> password;
@XmlElementRef(name = "PassKey", namespace = "http://bsestarmf.in/", type = JAXBElement.class)
protected JAXBElement<String> passKey;
/**
* Gets the value of the userId property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getUserId() {
return userId;
}
/**
* Sets the value of the userId property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setUserId(JAXBElement<String> value) {
this.userId = ((JAXBElement<String> ) value);
}
/**
* Gets the value of the password property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getPassword() {
return password;
}
/**
* Sets the value of the password property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setPassword(JAXBElement<String> value) {
this.password = ((JAXBElement<String> ) value);
}
/**
* Gets the value of the passKey property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getPassKey() {
return passKey;
}
/**
* Sets the value of the passKey property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setPassKey(JAXBElement<String> value) {
this.passKey = ((JAXBElement<String> ) value);
}
}
|
[
"vinod.shukla@moptra.com"
] |
vinod.shukla@moptra.com
|
d4d3c84e247ece8e2086d50ca1867d7daffa9b8c
|
5e224ff6d555ee74e0fda6dfa9a645fb7de60989
|
/database/src/main/java/adila/db/fly5fiq4400_fly5fiq44005faf.java
|
677b246fd22dbedea91541484711e73978e1097d
|
[
"MIT"
] |
permissive
|
karim/adila
|
8b0b6ba56d83f3f29f6354a2964377e6197761c4
|
00f262f6d5352b9d535ae54a2023e4a807449faa
|
refs/heads/master
| 2021-01-18T22:52:51.508129
| 2016-11-13T13:08:04
| 2016-11-13T13:08:04
| 45,054,909
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 224
|
java
|
// This file is automatically generated.
package adila.db;
/*
* Fly Iris
*
* DEVICE: FLY_IQ4400
* MODEL: FLY_IQ4400_AF
*/
final class fly5fiq4400_fly5fiq44005faf {
public static final String DATA = "Fly|Iris|";
}
|
[
"keldeeb@gmail.com"
] |
keldeeb@gmail.com
|
3a9d04aad5e340ccd291615219b9cf0624c75ff9
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/org/jabref/logic/exporter/GroupSerializerTest.java
|
a5229acb42f31a45076968c6752a4b4f1ebf6948
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 7,395
|
java
|
package org.jabref.logic.exporter;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import javafx.scene.paint.Color;
import org.jabref.model.database.BibDatabase;
import org.jabref.model.groups.AllEntriesGroup;
import org.jabref.model.groups.AutomaticGroup;
import org.jabref.model.groups.AutomaticPersonsGroup;
import org.jabref.model.groups.ExplicitGroup;
import org.jabref.model.groups.GroupHierarchyType;
import org.jabref.model.groups.GroupTreeNode;
import org.jabref.model.groups.GroupTreeNodeTest;
import org.jabref.model.groups.KeywordGroup;
import org.jabref.model.groups.SearchGroup;
import org.jabref.model.groups.TexGroup;
import org.jabref.model.groups.WordKeywordGroup;
import org.jabref.model.util.DummyFileUpdateMonitor;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class GroupSerializerTest {
private GroupSerializer groupSerializer;
@Test
public void serializeSingleAllEntriesGroup() {
AllEntriesGroup group = new AllEntriesGroup("");
List<String> serialization = groupSerializer.serializeTree(GroupTreeNode.fromGroup(group));
Assertions.assertEquals(Collections.singletonList("0 AllEntriesGroup:"), serialization);
}
@Test
public void serializeSingleExplicitGroup() {
ExplicitGroup group = new ExplicitGroup("myExplicitGroup", GroupHierarchyType.INDEPENDENT, ',');
List<String> serialization = groupSerializer.serializeTree(GroupTreeNode.fromGroup(group));
Assertions.assertEquals(Collections.singletonList("0 StaticGroup:myExplicitGroup;0;1;;;;"), serialization);
}
@Test
public void serializeSingleExplicitGroupWithIconAndDescription() {
ExplicitGroup group = new ExplicitGroup("myExplicitGroup", GroupHierarchyType.INDEPENDENT, ',');
group.setIconName("test icon");
group.setExpanded(true);
group.setColor(Color.ALICEBLUE);
group.setDescription("test description");
List<String> serialization = groupSerializer.serializeTree(GroupTreeNode.fromGroup(group));
Assertions.assertEquals(Collections.singletonList("0 StaticGroup:myExplicitGroup;0;1;0xf0f8ffff;test icon;test description;"), serialization);
}
// For https://github.com/JabRef/jabref/issues/1681
@Test
public void serializeSingleExplicitGroupWithEscapedSlash() {
ExplicitGroup group = new ExplicitGroup("B{\\\"{o}}hmer", GroupHierarchyType.INDEPENDENT, ',');
List<String> serialization = groupSerializer.serializeTree(GroupTreeNode.fromGroup(group));
Assertions.assertEquals(Collections.singletonList("0 StaticGroup:B{\\\\\"{o}}hmer;0;1;;;;"), serialization);
}
@Test
public void serializeSingleSimpleKeywordGroup() {
WordKeywordGroup group = new WordKeywordGroup("name", GroupHierarchyType.INDEPENDENT, "keywords", "test", false, ',', false);
List<String> serialization = groupSerializer.serializeTree(GroupTreeNode.fromGroup(group));
Assertions.assertEquals(Collections.singletonList("0 KeywordGroup:name;0;keywords;test;0;0;1;;;;"), serialization);
}
@Test
public void serializeSingleRegexKeywordGroup() {
KeywordGroup group = new org.jabref.model.groups.RegexKeywordGroup("myExplicitGroup", GroupHierarchyType.REFINING, "author", "asdf", false);
List<String> serialization = groupSerializer.serializeTree(GroupTreeNode.fromGroup(group));
Assertions.assertEquals(Collections.singletonList("0 KeywordGroup:myExplicitGroup;1;author;asdf;0;1;1;;;;"), serialization);
}
@Test
public void serializeSingleSearchGroup() {
SearchGroup group = new SearchGroup("myExplicitGroup", GroupHierarchyType.INDEPENDENT, "author=harrer", true, true);
List<String> serialization = groupSerializer.serializeTree(GroupTreeNode.fromGroup(group));
Assertions.assertEquals(Collections.singletonList("0 SearchGroup:myExplicitGroup;0;author=harrer;1;1;1;;;;"), serialization);
}
@Test
public void serializeSingleSearchGroupWithRegex() {
SearchGroup group = new SearchGroup("myExplicitGroup", GroupHierarchyType.INCLUDING, "author=\"harrer\"", true, false);
List<String> serialization = groupSerializer.serializeTree(GroupTreeNode.fromGroup(group));
Assertions.assertEquals(Collections.singletonList("0 SearchGroup:myExplicitGroup;2;author=\"harrer\";1;0;1;;;;"), serialization);
}
@Test
public void serializeSingleAutomaticKeywordGroup() {
AutomaticGroup group = new org.jabref.model.groups.AutomaticKeywordGroup("myAutomaticGroup", GroupHierarchyType.INDEPENDENT, "keywords", ',', '>');
List<String> serialization = groupSerializer.serializeTree(GroupTreeNode.fromGroup(group));
Assertions.assertEquals(Collections.singletonList("0 AutomaticKeywordGroup:myAutomaticGroup;0;keywords;,;>;1;;;;"), serialization);
}
@Test
public void serializeSingleAutomaticPersonGroup() {
AutomaticPersonsGroup group = new AutomaticPersonsGroup("myAutomaticGroup", GroupHierarchyType.INDEPENDENT, "authors");
List<String> serialization = groupSerializer.serializeTree(GroupTreeNode.fromGroup(group));
Assertions.assertEquals(Collections.singletonList("0 AutomaticPersonsGroup:myAutomaticGroup;0;authors;1;;;;"), serialization);
}
@Test
public void serializeSingleTexGroup() throws Exception {
TexGroup group = new TexGroup("myTexGroup", GroupHierarchyType.INDEPENDENT, Paths.get("path", "To", "File"), new org.jabref.logic.auxparser.DefaultAuxParser(new BibDatabase()), new DummyFileUpdateMonitor());
List<String> serialization = groupSerializer.serializeTree(GroupTreeNode.fromGroup(group));
Assertions.assertEquals(Collections.singletonList("0 TexGroup:myTexGroup;0;path/To/File;1;;;;"), serialization);
}
@Test
public void getTreeAsStringInSimpleTree() throws Exception {
GroupTreeNode root = GroupTreeNodeTest.getRoot();
GroupTreeNodeTest.getNodeInSimpleTree(root);
List<String> expected = Arrays.asList("0 AllEntriesGroup:", "1 StaticGroup:ExplicitA;2;1;;;;", "1 StaticGroup:ExplicitParent;0;1;;;;", "2 StaticGroup:ExplicitNode;1;1;;;;");
Assertions.assertEquals(expected, groupSerializer.serializeTree(root));
}
@Test
public void getTreeAsStringInComplexTree() throws Exception {
GroupTreeNode root = GroupTreeNodeTest.getRoot();
GroupTreeNodeTest.getNodeInComplexTree(root);
List<String> expected = Arrays.asList("0 AllEntriesGroup:", "1 SearchGroup:SearchA;2;searchExpression;1;0;1;;;;", "1 StaticGroup:ExplicitA;2;1;;;;", "1 StaticGroup:ExplicitGrandParent;0;1;;;;", "2 StaticGroup:ExplicitB;1;1;;;;", "2 KeywordGroup:KeywordParent;0;searchField;searchExpression;1;0;1;;;;", "3 KeywordGroup:KeywordNode;0;searchField;searchExpression;1;0;1;;;;", "4 StaticGroup:ExplicitChild;1;1;;;;", "3 SearchGroup:SearchC;2;searchExpression;1;0;1;;;;", "3 StaticGroup:ExplicitC;1;1;;;;", "3 KeywordGroup:KeywordC;0;searchField;searchExpression;1;0;1;;;;", "2 SearchGroup:SearchB;2;searchExpression;1;0;1;;;;", "2 KeywordGroup:KeywordB;0;searchField;searchExpression;1;0;1;;;;", "1 KeywordGroup:KeywordA;0;searchField;searchExpression;1;0;1;;;;");
Assertions.assertEquals(expected, groupSerializer.serializeTree(root));
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
dbecf176706da611346b604e2a1e45010e0ebc2c
|
ddabdaa2cd5e1e44eaaf482176c81206395a96e2
|
/LiveRecord/src/main/java/dianfan/entities/CallVoice.java
|
516cc869f334a982995e4a3ac0d3ddc9c3a21392
|
[] |
no_license
|
shuzhen123/huijingschool
|
0778ea9409a3fdce04a896fe3df7c27b2ecc59b7
|
67cc0b786feae95271fcc79fa63db8cff013e2f6
|
refs/heads/master
| 2020-04-22T13:53:55.776934
| 2019-02-13T02:23:52
| 2019-02-13T02:23:52
| 170,425,383
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,442
|
java
|
package dianfan.entities;
import java.sql.Timestamp;
/**
* @ClassName CallVoice
* @Description 通话录音
* @author cjy
* @date 2018年3月10日 下午12:01:19
*/
public class CallVoice {
private String id; //varchar(50) NOT NULL COMMENT '主键id',
private String salerid; //varchar(50) DEFAULT NULL COMMENT '业务员id',
private String customerid; //varchar(50) DEFAULT NULL COMMENT '客户id',
private String telno; //varchar(50) DEFAULT NULL COMMENT '电话号码',
private Integer status; //varchar(1) DEFAULT NULL COMMENT '通话状态(0未接听,1已接通,未上传录音,2已接通,已上传录音)',
private Integer calltimes; //varchar(200) DEFAULT NULL COMMENT '通话时长',
private String voicetitle; //varchar(50) DEFAULT NULL COMMENT '通话声音标题【某某-日期.MP3】',
private String voicepath; //varchar(200) DEFAULT NULL COMMENT '通话声音服务器地址',
private Integer collectionflag; //varchar(1) DEFAULT NULL COMMENT '收藏flag',
private Timestamp starttime; //datetime DEFAULT NULL COMMENT '通话开始时间',
private Timestamp endtime; //datetime DEFAULT NULL COMMENT '通话结束时间',
private Timestamp createtime; //datetime DEFAULT NULL COMMENT '创建时间',
private Integer entkbn; //int(1) DEFAULT NULL COMMENT '数据有效区分',
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getSalerid() {
return salerid;
}
public void setSalerid(String salerid) {
this.salerid = salerid;
}
public String getCustomerid() {
return customerid;
}
public void setCustomerid(String customerid) {
this.customerid = customerid;
}
public String getTelno() {
return telno;
}
public void setTelno(String telno) {
this.telno = telno;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getCalltimes() {
return calltimes;
}
public void setCalltimes(Integer calltimes) {
this.calltimes = calltimes;
}
public String getVoicetitle() {
return voicetitle;
}
public void setVoicetitle(String voicetitle) {
this.voicetitle = voicetitle;
}
public String getVoicepath() {
return voicepath;
}
public void setVoicepath(String voicepath) {
this.voicepath = voicepath;
}
public Integer getCollectionflag() {
return collectionflag;
}
public void setCollectionflag(Integer collectionflag) {
this.collectionflag = collectionflag;
}
public Timestamp getStarttime() {
return starttime;
}
public void setStarttime(Timestamp starttime) {
this.starttime = starttime;
}
public Timestamp getEndtime() {
return endtime;
}
public void setEndtime(Timestamp endtime) {
this.endtime = endtime;
}
public Timestamp getCreatetime() {
return createtime;
}
public void setCreatetime(Timestamp createtime) {
this.createtime = createtime;
}
public Integer getEntkbn() {
return entkbn;
}
public void setEntkbn(Integer entkbn) {
this.entkbn = entkbn;
}
@Override
public String toString() {
return "CallVoice [id=" + id + ", salerid=" + salerid + ", customerid=" + customerid + ", telno=" + telno
+ ", status=" + status + ", calltimes=" + calltimes + ", voicetitle=" + voicetitle + ", voicepath="
+ voicepath + ", collectionflag=" + collectionflag + ", starttime=" + starttime + ", endtime=" + endtime
+ ", createtime=" + createtime + ", entkbn=" + entkbn + "]";
}
}
|
[
"shu.zhen@4lo.me"
] |
shu.zhen@4lo.me
|
fd3443ef1c1b91298169f87301f4365afa0d7d96
|
6baa09045c69b0231c35c22b06cdf69a8ce227d6
|
/modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201602/PublisherQueryLanguageSyntaxErrorReason.java
|
13391b4deb9557b03cff526093992db91e6967c8
|
[
"Apache-2.0"
] |
permissive
|
remotejob/googleads-java-lib
|
f603b47117522104f7df2a72d2c96ae8c1ea011d
|
a330df0799de8d8de0dcdddf4c317d6b0cd2fe10
|
refs/heads/master
| 2020-12-11T01:36:29.506854
| 2016-07-28T22:13:24
| 2016-07-28T22:13:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,213
|
java
|
package com.google.api.ads.dfp.jaxws.v201602;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for PublisherQueryLanguageSyntaxError.Reason.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="PublisherQueryLanguageSyntaxError.Reason">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="UNPARSABLE"/>
* <enumeration value="UNKNOWN"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "PublisherQueryLanguageSyntaxError.Reason")
@XmlEnum
public enum PublisherQueryLanguageSyntaxErrorReason {
/**
*
* Indicates that there was a PQL syntax error.
*
*
*/
UNPARSABLE,
/**
*
* The value returned if the actual value is not exposed by the requested API version.
*
*
*/
UNKNOWN;
public String value() {
return name();
}
public static PublisherQueryLanguageSyntaxErrorReason fromValue(String v) {
return valueOf(v);
}
}
|
[
"api.cseeley@gmail.com"
] |
api.cseeley@gmail.com
|
d164c9ae61079e92cbb96c6285a656e7b5698743
|
473fc28d466ddbe9758ca49c7d4fb42e7d82586e
|
/app/src/main/java/com/syd/source/aosp/external/r8/src/test/examples/classmerging/SubClassThatReferencesSuperMethod.java
|
c12804cca29f0da6a86f26783bb0d5da67e0fcf3
|
[] |
no_license
|
lz-purple/Source
|
a7788070623f2965a8caa3264778f48d17372bab
|
e2745b756317aac3c7a27a4c10bdfe0921a82a1c
|
refs/heads/master
| 2020-12-23T17:03:12.412572
| 2020-01-31T01:54:37
| 2020-01-31T01:54:37
| 237,205,127
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 432
|
java
|
// Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package classmerging;
public class SubClassThatReferencesSuperMethod extends SuperClassWithReferencedMethod {
@Override
public String referencedMethod() {
return "From sub: " + super.referencedMethod();
}
}
|
[
"997530783@qq.com"
] |
997530783@qq.com
|
5dc97e67e91bd0d0421fea1891f97af838912e7b
|
a456b870118fe3034eb72f4f94bde593e5c016d0
|
/src/com/innowhere/jnieasy/core/impl/rt/typedec/TypeNativePrimitiveObjectRuntime.java
|
2e3272328d8eaa1845b670ab7241dc72363209b3
|
[
"Apache-2.0"
] |
permissive
|
fengxiaochuang/jnieasy
|
0b0fed598e1d0ea2f24ab9a9e9476b58ec2fd510
|
e295b23ee7418c8e412b025b957e64ceaba40fac
|
refs/heads/master
| 2022-01-21T04:21:58.382039
| 2016-08-21T17:17:34
| 2016-08-21T17:17:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 368
|
java
|
/*
* TypeNativePrimitiveObjectRuntime.java
*
* Created on 3 de febrero de 2005, 13:35
*/
package com.innowhere.jnieasy.core.impl.rt.typedec;
import com.innowhere.jnieasy.core.typedec.TypeNativePrimitiveObject;
/**
*
* @author jmarranz
*/
public interface TypeNativePrimitiveObjectRuntime extends TypeCanBeNativeCapableRuntime,TypeNativePrimitiveObject
{
}
|
[
"jmarranz@innowhere.com"
] |
jmarranz@innowhere.com
|
c740ec82a5e2d4ec1f6a4356873c9a7c0583cf3e
|
2697031783e52e12ff66f81c963bf708d15b7dfa
|
/src/greycat/idea/GCMTemplatesFactory.java
|
d6def3e6abe00b748b0d838981804222bdfee09b
|
[
"Apache-2.0"
] |
permissive
|
lmouline/greycat-idea-plugin
|
6edf255c59cc5b2199900c99f22595a7f65e982a
|
4506c32886d2556a25e4705dde7c3ef0e257896b
|
refs/heads/master
| 2021-01-21T02:10:24.809283
| 2017-08-30T12:59:15
| 2017-08-30T12:59:15
| 101,881,190
| 0
| 0
| null | 2017-08-30T12:54:15
| 2017-08-30T12:54:15
| null |
UTF-8
|
Java
| false
| false
| 1,642
|
java
|
package greycat.idea;
import com.intellij.ide.fileTemplates.FileTemplateDescriptor;
import com.intellij.ide.fileTemplates.FileTemplateGroupDescriptor;
import com.intellij.ide.fileTemplates.FileTemplateGroupDescriptorFactory;
import com.intellij.psi.PsiDirectory;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.PsiFileFactory;
import java.io.File;
public class GCMTemplatesFactory implements FileTemplateGroupDescriptorFactory {
public enum Template {
GreyCatModel("GreyCatModel");
final String file;
Template(String file) {
this.file = file;
}
public String getFile() {
return file;
}
}
public FileTemplateGroupDescriptor getFileTemplatesDescriptor() {
String title = "GCM file templates";
final FileTemplateGroupDescriptor group =
new FileTemplateGroupDescriptor(title, GCMIcons.GCM_ICON_16x16);
for (Template template : Template.values()) {
group.addTemplate(new FileTemplateDescriptor(template.getFile(), GCMIcons.GCM_ICON_16x16));
}
return group;
}
public static PsiElement createFromTemplate(PsiDirectory directory, String fileName, Template template, String text2) {
final PsiFileFactory factory = PsiFileFactory.getInstance(directory.getProject());
if ((new File(fileName)).exists()) {
throw new RuntimeException("File already exists");
}
final PsiFile file = factory.createFileFromText(fileName, GCMLanguageType.INSTANCE, text2);
return directory.add(file);
}
}
|
[
"fouquet.f@gmail.com"
] |
fouquet.f@gmail.com
|
ea63bbc8ff436f41d57ad999be0d31530eb31b3d
|
548a7edfa86bcf9e3b2faa64e4f916a24e11a7a2
|
/src/main/java/net/shopxx/plugin/OssStoragePlugin.java
|
25d1fe14bcc64163c6b1adcf91678d310843192d
|
[] |
no_license
|
l1806858547/yhfc
|
b2d69d7b2bfaec1b25a5ae6f70055daa01b77016
|
9a62ba7b33864424f00f826640c9f4be9069aa18
|
refs/heads/master
| 2020-11-25T08:18:49.119747
| 2019-08-13T09:01:35
| 2019-08-13T09:01:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,457
|
java
|
/*
* Copyright 2008-2018 shopxx.net. All rights reserved.
* Support: http://www.shopxx.net
* License: http://www.shopxx.net/license
* FileId: HAjgyZpLYMaC3KdBhAIvU9ElinyCTE4U
*/
package net.shopxx.plugin;
import com.aliyun.oss.OSSClient;
import com.aliyun.oss.model.DeleteObjectsRequest;
import com.aliyun.oss.model.DeleteObjectsResult;
import com.aliyun.oss.model.ObjectMetadata;
import net.shopxx.entity.PluginConfig;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import java.io.*;
import java.util.List;
/**
* Plugin - 阿里云存储
*
* @author SHOP++ Team
* @version 6.1
*/
@Component("ossStoragePlugin")
public class OssStoragePlugin extends StoragePlugin {
private final static Logger logger = LoggerFactory.getLogger(OssStoragePlugin.class);
@Override
public String getName() {
return "阿里云存储";
}
@Override
public String getVersion() {
return "1.0";
}
@Override
public String getAuthor() {
return "jdsq360.com";
}
@Override
public String getSiteUrl() {
return "http://www.jdsq360.com";
}
@Override
public String getInstallUrl() {
return "/admin/plugin/oss_storage/install";
}
@Override
public String getUninstallUrl() {
return "/admin/plugin/oss_storage/uninstall";
}
@Override
public String getSettingUrl() {
return "/admin/plugin/oss_storage/setting";
}
@Override
public void upload(String path, File file, String contentType) {
PluginConfig pluginConfig = getPluginConfig();
if (pluginConfig != null) {
String endpoint = pluginConfig.getAttribute("endpoint");
String accessId = pluginConfig.getAttribute("accessId");
String accessKey = pluginConfig.getAttribute("accessKey");
String bucketName = pluginConfig.getAttribute("bucketName");
InputStream inputStream = null;
OSSClient ossClient = new OSSClient(endpoint, accessId, accessKey);
try {
inputStream = new BufferedInputStream(new FileInputStream(file));
ObjectMetadata objectMetadata = new ObjectMetadata();
objectMetadata.setContentType(contentType);
objectMetadata.setContentLength(file.length());
ossClient.putObject(bucketName, StringUtils.removeStart(path, "/"), inputStream, objectMetadata);
} catch (FileNotFoundException e) {
throw new RuntimeException(e.getMessage(), e);
} finally {
IOUtils.closeQuietly(inputStream);
ossClient.shutdown();
}
}
}
public void delete(List<String> filePathNames) {
if (filePathNames == null || filePathNames.size() > 0) {
logger.info("文件为空,删除失败");
return;
}
PluginConfig pluginConfig = getPluginConfig();
if (pluginConfig != null) {
String endpoint = pluginConfig.getAttribute("endpoint");
String accessId = pluginConfig.getAttribute("accessId");
String accessKey = pluginConfig.getAttribute("accessKey");
String bucketName = pluginConfig.getAttribute("bucketName");
OSSClient ossClient = new OSSClient(endpoint, accessId, accessKey);
try {
DeleteObjectsRequest delObj = new DeleteObjectsRequest(bucketName);
delObj.setKeys(filePathNames);
DeleteObjectsResult deleteObjectsResult = ossClient.deleteObjects(delObj);
if (deleteObjectsResult != null) {
List<String> dellist = deleteObjectsResult.getDeletedObjects();
logger.info("删除文件成功,{}", dellist != null ? dellist : "");
}
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
} finally {
ossClient.shutdown();
}
}
}
@Override
public String getUrl(String path) {
PluginConfig pluginConfig = getPluginConfig();
if (pluginConfig != null) {
String urlPrefix = pluginConfig.getAttribute("urlPrefix");
return urlPrefix + path;
}
return null;
}
}
|
[
"1198940389@qq.com"
] |
1198940389@qq.com
|
5522a991f7d6c8de58a59703f6b9a89b94a7ab9a
|
cb4e96db361aa27ebf2573642cbbf9f7e2c47a96
|
/wingtool-parent/wingtoolparent/wingtool-extra/src/main/java/com/orangehaswing/extra/template/engine/beetl/BeetlEngine.java
|
c2a98252493c2c952f33e9aadd0f88fd264b1581
|
[] |
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
| 3,020
|
java
|
package com.orangehaswing.extra.template.engine.beetl;
import com.orangehaswing.core.io.IORuntimeException;
import com.orangehaswing.extra.template.Template;
import com.orangehaswing.extra.template.TemplateConfig;
import com.orangehaswing.extra.template.TemplateEngine;
import org.beetl.core.Configuration;
import org.beetl.core.GroupTemplate;
import org.beetl.core.ResourceLoader;
import org.beetl.core.resource.*;
import java.io.IOException;
/**
* Beetl模板引擎封装
*
* @author looly
*/
public class BeetlEngine implements TemplateEngine {
private GroupTemplate engine;
// --------------------------------------------------------------------------------- Constructor start
/**
* 默认构造
*/
public BeetlEngine() {
this(new TemplateConfig());
}
/**
* 构造
*
* @param config 模板配置
*/
public BeetlEngine(TemplateConfig config) {
this(createEngine(config));
}
/**
* 构造
*
* @param engine {@link GroupTemplate}
*/
public BeetlEngine(GroupTemplate engine) {
this.engine = engine;
}
// --------------------------------------------------------------------------------- Constructor end
@Override
public Template getTemplate(String resource) {
return BeetlTemplate.wrap(engine.getTemplate(resource));
}
/**
* 创建引擎
*
* @param config 模板配置
* @return {@link GroupTemplate}
*/
private static GroupTemplate createEngine(TemplateConfig config) {
if (null == config) {
config = new TemplateConfig();
}
switch (config.getResourceMode()) {
case CLASSPATH:
return createGroupTemplate(new ClasspathResourceLoader(config.getPath(), config.getCharsetStr()));
case FILE:
return createGroupTemplate(new FileResourceLoader(config.getPath(), config.getCharsetStr()));
case WEB_ROOT:
return createGroupTemplate(new WebAppResourceLoader(config.getPath(), config.getCharsetStr()));
case STRING:
return createGroupTemplate(new StringTemplateResourceLoader());
case COMPOSITE:
//TODO 需要定义复合资源加载器
return createGroupTemplate(new CompositeResourceLoader());
default:
return new GroupTemplate();
}
}
/**
* 创建自定义的模板组 {@link GroupTemplate},配置文件使用全局默认<br>
* 此时自定义的配置文件可在ClassPath中放入beetl.properties配置
*
* @param loader {@link ResourceLoader},资源加载器
* @return {@link GroupTemplate}
* @since 3.2.0
*/
private static GroupTemplate createGroupTemplate(ResourceLoader loader) {
try {
return createGroupTemplate(loader, Configuration.defaultConfiguration());
} catch (IOException e) {
throw new IORuntimeException(e);
}
}
/**
* 创建自定义的 {@link GroupTemplate}
*
* @param loader {@link ResourceLoader},资源加载器
* @param conf {@link Configuration} 配置文件
* @return {@link GroupTemplate}
*/
private static GroupTemplate createGroupTemplate(ResourceLoader loader, Configuration conf) {
return new GroupTemplate(loader, conf);
}
}
|
[
"673556024@qq.com"
] |
673556024@qq.com
|
983a516378c934c749a3ace5a855ea044f03024a
|
b94cb8334ed604b1e72b47c46659a2f50cc176e6
|
/npWidget/src/main/java/npwidget/extra/kongzue/dialog/interfaces/OnBackClickListener.java
|
112726eb789e8c0ea8f1c801517cdb8afa1a0f81
|
[] |
no_license
|
nopointer/npWidget
|
063013ef18444d311725f85eebefcc06a3507ebd
|
5fdb4731a0b6a533a0c5eb4dc31df6720ae90414
|
refs/heads/master
| 2023-08-29T01:37:52.887171
| 2023-08-11T06:13:32
| 2023-08-11T06:13:32
| 199,801,673
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 280
|
java
|
package npwidget.extra.kongzue.dialog.interfaces;
/**
* @author: Kongzue
* @github: https://github.com/kongzue/
* @homepage: http://kongzue.com/
* @mail: myzcxhh@live.cn
* @createTime: 2019/11/15 15:31
*/
public interface OnBackClickListener {
boolean onBackClick();
}
|
[
"857508412@qq.com"
] |
857508412@qq.com
|
a74c157d5d1a8dacca2c0d8e57806a548ba820ae
|
31e50022d4c02739ae9f83a9d5139b21f1e00bee
|
/plugins/org.wso2.developerstudio.eclipse.gmf.esb.diagram/src/org/wso2/developerstudio/eclipse/gmf/esb/diagram/edit/helpers/CacheMediatorOutputConnectorEditHelper.java
|
f28f641615e746c9711329dcf42cfb58cce8770b
|
[
"Apache-2.0"
] |
permissive
|
wso2/devstudio-tooling-esb
|
d5ebc45a73e7c6090e230f0cb262dbfff5478b7d
|
a4004db3d576ce9e8f963a031d073508acbe8974
|
refs/heads/master
| 2023-06-28T18:28:44.267350
| 2021-01-04T06:46:30
| 2021-01-04T06:46:30
| 51,583,372
| 41
| 90
|
Apache-2.0
| 2021-03-09T05:02:56
| 2016-02-12T11:25:57
|
Java
|
UTF-8
|
Java
| false
| false
| 176
|
java
|
package org.wso2.developerstudio.eclipse.gmf.esb.diagram.edit.helpers;
/**
* @generated
*/
public class CacheMediatorOutputConnectorEditHelper extends EsbBaseEditHelper {
}
|
[
"harshana@wso2.com"
] |
harshana@wso2.com
|
0bb35385b0250be7357fac9d373b1804c83d3e19
|
d1a3766f13e8c271fbb20bfb2b11cf2ee9a0f1df
|
/algaworks/jpa_hibernate/locadora-veiculo-web/src/main/java/com/algaworks/curso/jpa2/controller/CadastroModeloCarroBean.java
|
edfd58e1acb1b164da5f33095f7946987b4e9001
|
[] |
no_license
|
jkavdev/jkavdev_rpo
|
0f12a07c7698e9e1208c3c2f544c6630dbb97a0c
|
be1aa040515bfb549c5c3a8c090f97474e500922
|
refs/heads/master
| 2020-04-06T07:05:03.026803
| 2016-09-15T15:07:42
| 2016-09-15T15:07:42
| 63,954,979
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,047
|
java
|
package com.algaworks.curso.jpa2.controller;
import java.io.Serializable;
import java.util.Arrays;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.faces.bean.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;
import com.algaworks.curso.jpa2.dao.FabricanteDAO;
import com.algaworks.curso.jpa2.modelo.Categoria;
import com.algaworks.curso.jpa2.modelo.Fabricante;
import com.algaworks.curso.jpa2.modelo.ModeloCarro;
import com.algaworks.curso.jpa2.service.CadastroModeloCarroService;
import com.algaworks.curso.jpa2.service.NegocioException;
import com.algaworks.curso.jpa2.util.jsf.FacesUtil;
@Named
@ViewScoped
public class CadastroModeloCarroBean implements Serializable {
private static final long serialVersionUID = 1L;
@Inject
private CadastroModeloCarroService cadastroModeloCarroService;
@Inject
private FabricanteDAO fabricanteDAO;
private ModeloCarro modeloCarro;
// para trazer a lista de fabricantes cadastrados
private List<Fabricante> fabricantes;
private List<Categoria> categorias;
public void salvar() {
try {
this.cadastroModeloCarroService.salvar(modeloCarro);
FacesUtil.addSuccessMessage("Modelo carro " + modeloCarro.getDescricao() + " salvo com sucesso!");
} catch (NegocioException e) {
FacesUtil.addErrorMessage(e.getMessage());
}
this.limpar();
}
@PostConstruct
private void init() {
this.limpar();
fabricantes = fabricanteDAO.buscarTodos();
this.categorias = Arrays.asList(Categoria.values());
}
public void limpar() {
this.modeloCarro = new ModeloCarro();
}
public ModeloCarro getModeloCarro() {
return modeloCarro;
}
public void setModeloCarro(ModeloCarro modeloCarro) {
this.modeloCarro = modeloCarro;
}
public List<Fabricante> getFabricantes() {
return fabricantes;
}
public void setFabricantes(List<Fabricante> fabricantes) {
this.fabricantes = fabricantes;
}
public List<Categoria> getCategorias() {
return categorias;
}
}
|
[
"jhonatankolen@b532a151-d5e8-4e7d-bcad-1a85d0c4e1cd"
] |
jhonatankolen@b532a151-d5e8-4e7d-bcad-1a85d0c4e1cd
|
696d096d3aee1c7b8f391c51e62570c97d0538ae
|
2b4d9930cea7fd37736f2b539d8da030d9d110ac
|
/src/main/java/ch/ethz/idsc/tensor/alg/RootsDegree2.java
|
dbbaf5834f25fe1d1360cdb1d2c02990fb40de0d
|
[] |
no_license
|
amodeus-science/tensor
|
a7540abcf22d93464b04faa18813bf14cf9279c8
|
2c30f929dd3dae10ab813371c1c9748cbe1f2d35
|
refs/heads/master
| 2022-12-31T10:36:25.815391
| 2020-05-07T09:32:28
| 2020-05-07T09:32:28
| 261,510,649
| 1
| 5
| null | 2020-10-13T21:48:36
| 2020-05-05T15:29:47
|
Java
|
UTF-8
|
Java
| false
| false
| 850
|
java
|
// code by jph
package ch.ethz.idsc.tensor.alg;
import ch.ethz.idsc.tensor.Scalar;
import ch.ethz.idsc.tensor.Tensor;
import ch.ethz.idsc.tensor.Tensors;
import ch.ethz.idsc.tensor.num.GaussScalar;
import ch.ethz.idsc.tensor.sca.Sqrt;
/** implementation permits coefficients of type {@link GaussScalar} */
/* package */ enum RootsDegree2 {
;
/** @param coeffs {a, b, c} representing a + b*x + c*x^2 == 0
* @return vector of length 2 with the roots as entries
* if the two roots are real, then the smaller root is the first entry */
public static Tensor of(Tensor coeffs) {
Scalar c = coeffs.Get(2);
Scalar p = coeffs.Get(1).divide(c.add(c)).negate();
Scalar p2 = p.multiply(p);
Scalar q = coeffs.Get(0).divide(c);
Scalar d = Sqrt.FUNCTION.apply(p2.subtract(q));
return Tensors.of(p.subtract(d), p.add(d));
}
}
|
[
"jan.hakenberg@gmail.com"
] |
jan.hakenberg@gmail.com
|
f91504d60259b0b75192ba931c45e0a852bb8b20
|
2edbc7267d9a2431ee3b58fc19c4ec4eef900655
|
/AL-Game/data/scripts/system/handlers/quest/daevanion/_2994A_New_Choice.java
|
3a2f81586da872a5d6515c15893fdbeabeae1c4a
|
[] |
no_license
|
EmuZONE/Aion-Lightning-5.1
|
3c93b8bc5e63fd9205446c52be9b324193695089
|
f4cfc45f6aa66dfbfdaa6c0f140b1861bdcd13c5
|
refs/heads/master
| 2020-03-08T14:38:42.579437
| 2018-04-06T04:18:19
| 2018-04-06T04:18:19
| 128,191,634
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,744
|
java
|
/*
* This file is part of Encom. **ENCOM FUCK OTHER SVN**
*
* Encom is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Encom 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 Public License for more details.
*
* You should have received a copy of the GNU Lesser Public License
* along with Encom. If not, see <http://www.gnu.org/licenses/>.
*/
package quest.daevanion;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.questEngine.handlers.QuestHandler;
import com.aionemu.gameserver.questEngine.model.QuestEnv;
import com.aionemu.gameserver.questEngine.model.QuestState;
import com.aionemu.gameserver.questEngine.model.QuestStatus;
import com.aionemu.gameserver.services.QuestService;
/****/
/** Author Rinzler (Encom)
/****/
public class _2994A_New_Choice extends QuestHandler
{
private final static int questId = 2994;
private final static int dialogs[] = {1013, 1034, 1055, 1076, 5103, 1098, 1119, 1140, 1161, 1183, 1204, 1225, 1246};
private final static int daevanionWeapons[] = {100000723, 100900554, 101300538,
100200673, 101700594, 100100568, 101500566,
100600608, 100500572, 115000826, 101800569,
101900562, 102000592, 102100517};
private int choice = 0;
private int item;
public _2994A_New_Choice() {
super(questId);
}
@Override
public void register() {
qe.registerQuestNpc(204077).addOnQuestStart(questId);
qe.registerQuestNpc(204077).addOnTalkEvent(questId);
}
@Override
public boolean onDialogEvent(QuestEnv env) {
final Player player = env.getPlayer();
int targetId = env.getTargetId();
QuestState qs = player.getQuestStateList().getQuestState(questId);
int dialogId = env.getDialogId();
if (qs == null || qs.getStatus() == QuestStatus.NONE || qs.canRepeat()) {
if (targetId == 204077) {
if (dialogId == 59) {
QuestService.startQuest(env);
return sendQuestDialog(env, 1011);
} else {
return sendQuestStartDialog(env);
}
}
} else if (qs != null && qs.getStatus() == QuestStatus.START) {
if (targetId == 204077) {
if (dialogId == 59) {
return sendQuestDialog(env, 1011);
} switch (env.getDialogId()) {
case 1012:
case 1097:
case 1182:
case 1267:
return sendQuestDialog(env, dialogId);
case 1013:
case 1034:
case 1055:
case 1076:
case 5103:
case 1098:
case 1119:
case 1140:
case 1161:
case 1183:
case 1204:
case 1225:
case 1246: {
item = getItem(dialogId);
if (player.getInventory().getItemCountByItemId(item) > 0)
return sendQuestDialog(env, 1013);
else
return sendQuestDialog(env, 1352);
}
case 10000:
case 10001:
case 10002:
case 10003: {
if (player.getInventory().getItemCountByItemId(186000041) == 0)
return sendQuestDialog(env, 1009);
changeQuestStep(env, 0, 0, true);
choice = dialogId - 10000;
return sendQuestDialog(env, choice + 5);
}
}
}
} else if (qs != null && qs.getStatus() == QuestStatus.REWARD) {
if (targetId == 204077) {
removeQuestItem(env, item, 1);
removeQuestItem(env, 186000041, 1);
return sendQuestEndDialog(env, choice);
}
}
return false;
}
private int getItem(int dialogId) {
int x = 0;
for (int id : dialogs) {
if (id == dialogId)
break;
x++;
}
return (daevanionWeapons[x]);
}
}
|
[
"naxdevil@gmail.com"
] |
naxdevil@gmail.com
|
e7579eaf83ba931df9b413c61960bbcbeb43bc4b
|
2caaeeb5ac26563d4c069363569bf07e6073f60f
|
/enterprise/src/main/java/com/issamdrmas/service/ApplicationService.java
|
18afdf56413681dd9063bf732f1899f2f5c22a0d
|
[] |
no_license
|
Imdrmas/STS
|
d618071a032b2d99e7469db679994830bef65346
|
419d39c4aa5370cb701bba575b297d0c7fc47412
|
refs/heads/master
| 2022-12-29T04:51:42.923776
| 2020-01-12T11:31:59
| 2020-01-12T11:31:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 177
|
java
|
package com.issamdrmas.service;
import java.util.List;
import com.issamdrmas.dto.ApplicationDto;
public interface ApplicationService {
List<ApplicationDto> findAllApps();
}
|
[
"drmas@MacBook-Pro-de-drmas.local"
] |
drmas@MacBook-Pro-de-drmas.local
|
db12bed674522042f7007dd38f4cd89cad19ae42
|
f26ea979dea1bcc3a47184e0c71d836d7de38f1f
|
/app/src/main/java/com/skycaster/new_hacks/activity/CanvasDemo.java
|
fa1940b5c34127dc080351040b0847390eabddf3
|
[
"Apache-2.0"
] |
permissive
|
leoliao2008/my_test_demos
|
838e73d051bde1e59c60b606ffa08f890252887c
|
6236bd383a27cb5b98e4971bab05ad34318f8c97
|
refs/heads/master
| 2021-01-21T06:27:37.795721
| 2018-05-03T10:24:52
| 2018-05-03T10:24:52
| 101,943,945
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 385
|
java
|
package com.skycaster.new_hacks.activity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.skycaster.new_hacks.R;
public class CanvasDemo extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_canvas_demo);
}
}
|
[
"leoliao2008@163.com"
] |
leoliao2008@163.com
|
408315154f3359b09a97de1de3415efe46e22d9f
|
2d1c1639a330b8f8d46914dda36301070e1df9eb
|
/OrderFood/app/src/main/java/com/example/orderfood/Model/User.java
|
13379ca200ef3da9ddd07a1253a6181ae554b9ae
|
[] |
no_license
|
nhatpham0301/phamvannhat0301-gmail.com
|
0e88e3172e54c82d1903c9acf412dab56a2c9a73
|
afc376e79e0ebc89e2c2d85099eea86245a5a356
|
refs/heads/master
| 2021-05-16T21:25:18.720227
| 2020-05-25T07:04:33
| 2020-05-25T07:04:33
| 250,474,763
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 869
|
java
|
package com.example.orderfood.Model;
public class User {
private String Name;
private String Phone;
private String Password;
private String IsStaff;
public User(){}
public User(String name, String password) {
Name = name;
Password = password;
IsStaff = "false";
}
public String getPhone() {
return Phone;
}
public void setPhone(String phone) {
Phone = phone;
}
public String getName() {
return Name;
}
public void setName(String name) {
Name = name;
}
public String getPassword() {
return Password;
}
public void setPassword(String password) {
Password = password;
}
public String getIsStaff() {
return IsStaff;
}
public void setIsStaff(String isStaff) {
IsStaff = isStaff;
}
}
|
[
"="
] |
=
|
62bb1cb59c4d9515751e80534a90f9470077d388
|
41763feae5c326dcfd36b75ed23a27ed5ee3e4a8
|
/src/main/java/com/online/service/a1constructioncommittee/HouseBuildAreaService.java
|
b128b566861c76442441adbabbbd850462208943
|
[] |
no_license
|
aner47/online
|
a7d53c8e7e6d72065c129a31d2e4ba5614c96e94
|
9ad7c285e170e6d5642c86eab95f657e9e23f4d7
|
refs/heads/master
| 2020-04-27T11:19:41.111136
| 2019-03-07T07:36:03
| 2019-03-07T07:36:03
| 174,291,169
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 550
|
java
|
package com.online.service.a1constructioncommittee;
import com.online.entity.online.a1constructioncommittee.HouseBuildArea;
import com.online.service.BaseService;
import com.online.service.ExportService;
/**
* 房屋建筑施工和竣工面积情况统计
*/
public interface HouseBuildAreaService extends BaseService<HouseBuildArea, Integer>,ExportService {
public HouseBuildArea saveHouseBuildArea(HouseBuildArea houseBuildArea) throws Exception;
public HouseBuildArea updateHouseBuildArea(HouseBuildArea houseBuildArea) throws Exception;
}
|
[
"zyq_glb@hqevn.com"
] |
zyq_glb@hqevn.com
|
0490bdfef5f8560f3cbfc25a222155f3f2f7f251
|
77f7ed99b6e53af135f47d2a5adc8b7049665542
|
/jtwig-core/src/test/java/org/jtwig/unit/expressions/model/FunctionElementTest.java
|
f4225e65bf845d4d8bea40a4960de4a057d2d428
|
[
"Apache-2.0"
] |
permissive
|
fabienwarniez/jtwig
|
cf254adfed8147e5cd5dd73016ae549c03e6b675
|
648a1d7ca7ae3663a3bdbc74c8b16f81411f10ae
|
refs/heads/master
| 2020-12-30T17:44:35.747316
| 2016-02-02T20:11:24
| 2016-02-02T20:11:24
| 50,948,455
| 0
| 0
| null | 2016-02-02T20:09:08
| 2016-02-02T20:09:08
| null |
UTF-8
|
Java
| false
| false
| 1,386
|
java
|
/**
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jtwig.unit.expressions.model;
import org.jtwig.expressions.model.FunctionElement;
import org.jtwig.functions.parameters.input.InputParameters;
import org.jtwig.render.RenderContext;
import org.junit.Test;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
public class FunctionElementTest {
private FunctionElement functionElement = new FunctionElement(null, "name");
@Test
public void expressionCalculationQueriesContext() throws Exception {
RenderContext context = mock(RenderContext.class);
functionElement
.compile(null)
.calculate(context);
verify(context).executeFunction(eq("name"), any(InputParameters.class));
}
}
|
[
"jmelo@lyncode.com"
] |
jmelo@lyncode.com
|
12e99f20808518436674e2c578ac547c0c3ff7fa
|
d01efa18b3452cc97c4c2bbc6383967bb1ec0805
|
/bizcore/WEB-INF/bank_custom_src/com/doublechain/bank/CustomBankCheckerManager.java
|
ae6b330740d2c745ef260f31bff176094d7518a0
|
[] |
no_license
|
elfbobo/bank-biz-suite
|
02766aac25fab9306b541a50b472ec575b0ff6a5
|
03225e79ecd9e7467e6e7fbad21318c6e4db9625
|
refs/heads/master
| 2020-11-29T04:39:06.197434
| 2019-12-18T16:35:45
| 2019-12-18T16:35:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 133
|
java
|
package com.doublechain.bank;
public class CustomBankCheckerManager extends BankCheckerManager {
//any common used tool
}
|
[
"philip_chang@163.com"
] |
philip_chang@163.com
|
87545187a0b48bcb9d5db7e188547e879417f7ea
|
dafdbbb0234b1f423970776259c985e6b571401f
|
/j2me/AllBinaryJ2MELibraryM/src/main/java/allbinary/graphics/paint/NullPaintable.java
|
be825be047d8f88df5142cb276ec92cd4d6a03dc
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
biddyweb/AllBinary-Platform
|
3581664e8613592b64f20fc3f688dc1515d646ae
|
9b61bc529b0a5e2c647aa1b7ba59b6386f7900ad
|
refs/heads/master
| 2020-12-03T10:38:18.654527
| 2013-11-17T11:17:35
| 2013-11-17T11:17:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 701
|
java
|
/*
* AllBinary Open License Version 1
* Copyright (c) 2011 AllBinary
*
* By agreeing to this license you and any business entity you represent are
* legally bound to the AllBinary Open License Version 1 legal agreement.
*
* You may obtain the AllBinary Open License Version 1 legal agreement from
* AllBinary or the root directory of AllBinary's AllBinary Platform repository.
*
* Created By: Travis Berthelot
*
*/
package allbinary.graphics.paint;
public class NullPaintable extends Paintable
{
private static final NullPaintable SINGLETON = new NullPaintable();
private NullPaintable()
{
}
public static Paintable getInstance()
{
return SINGLETON;
}
}
|
[
"travisberthelot@hotmail.com"
] |
travisberthelot@hotmail.com
|
526ecada7e8ee5f2889537bf16be32dbcca07714
|
f250150db9a516a40522a7a4330851981f0088c3
|
/modules/core/checkout/cart/src/com/geecommerce/cart/model/DefaultProductAvailability.java
|
3c0622a52adf1869b36a6a460714931f008354fb
|
[
"Apache-2.0"
] |
permissive
|
geetools/geeCommerce-Java-Shop-Software-and-PIM
|
f623fd67f74d87a9e5ab4dc43a7023ed37651bf6
|
fc115eb2caa989ac939cf436c2144ebeedcac5aa
|
refs/heads/master
| 2023-03-30T16:49:08.912821
| 2022-12-06T09:13:09
| 2023-01-10T17:47:55
| 74,185,677
| 11
| 2
|
Apache-2.0
| 2023-03-22T21:24:05
| 2016-11-19T03:56:51
|
Java
|
UTF-8
|
Java
| false
| false
| 814
|
java
|
package com.geecommerce.cart.model;
import com.geecommerce.core.service.annotation.Injectable;
@Injectable
public class DefaultProductAvailability implements ProductAvailability {
private String name = null;
private String status = null;
private Boolean available = null;
@Override
public String getName() {
return name;
}
@Override
public void setName(String name) {
this.name = name;
}
@Override
public String getStatus() {
return status;
}
@Override
public void setStatus(String status) {
this.status = status;
}
@Override
public Boolean getIsAvailable() {
return available;
}
@Override
public void setIsAvailable(boolean isAvailable) {
this.available = isAvailable;
}
}
|
[
"md@commerceboard.com"
] |
md@commerceboard.com
|
d3fed6cdbe6dee4c1a86af1500c2d952e5827a37
|
97fd02f71b45aa235f917e79dd68b61c62b56c1c
|
/src/main/java/com/tencentcloudapi/trp/v20210515/models/ReportBatchCallbackStatusResponse.java
|
1ed16a81a37bd2ea8131f8b1f6a71b7c3c26af9b
|
[
"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,118
|
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.trp.v20210515.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class ReportBatchCallbackStatusResponse extends AbstractModel{
/**
* 业务出参。
*/
@SerializedName("Data")
@Expose
private OutputAuthorizedTransfer Data;
/**
* 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
@SerializedName("RequestId")
@Expose
private String RequestId;
/**
* Get 业务出参。
* @return Data 业务出参。
*/
public OutputAuthorizedTransfer getData() {
return this.Data;
}
/**
* Set 业务出参。
* @param Data 业务出参。
*/
public void setData(OutputAuthorizedTransfer Data) {
this.Data = Data;
}
/**
* Get 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @return RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public String getRequestId() {
return this.RequestId;
}
/**
* Set 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @param RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public void setRequestId(String RequestId) {
this.RequestId = RequestId;
}
public ReportBatchCallbackStatusResponse() {
}
/**
* 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 ReportBatchCallbackStatusResponse(ReportBatchCallbackStatusResponse source) {
if (source.Data != null) {
this.Data = new OutputAuthorizedTransfer(source.Data);
}
if (source.RequestId != null) {
this.RequestId = new String(source.RequestId);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamObj(map, prefix + "Data.", this.Data);
this.setParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
|
[
"tencentcloudapi@tencent.com"
] |
tencentcloudapi@tencent.com
|
190233914886e3203d0a42397aef10298e907773
|
90f4d6e6b093d5560255da48808811fa7d2017fb
|
/src/main/java/io/github/jhipster/application/OpenshiftApp.java
|
7a5da04b2f885a8a8f0464dd803f539c317f6d28
|
[] |
no_license
|
aRajeshaws/openshift
|
9eb4afd2be9da314370ee71da09f2c49f98b0a92
|
2b22ebb57d5d30b46b9bf9fa94d8530e78de11d6
|
refs/heads/master
| 2020-04-14T02:07:31.940551
| 2018-12-30T09:40:52
| 2018-12-30T09:40:52
| 163,576,583
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,875
|
java
|
package io.github.jhipster.application;
import io.github.jhipster.application.client.OAuth2InterceptedFeignConfiguration;
import io.github.jhipster.application.config.ApplicationProperties;
import io.github.jhipster.application.config.DefaultProfileUtil;
import io.github.jhipster.config.JHipsterConstants;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
import org.springframework.core.env.Environment;
import javax.annotation.PostConstruct;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Arrays;
import java.util.Collection;
@ComponentScan(
excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = OAuth2InterceptedFeignConfiguration.class)
)
@SpringBootApplication
@EnableConfigurationProperties({LiquibaseProperties.class, ApplicationProperties.class})
@EnableDiscoveryClient
public class OpenshiftApp {
private static final Logger log = LoggerFactory.getLogger(OpenshiftApp.class);
private final Environment env;
public OpenshiftApp(Environment env) {
this.env = env;
}
/**
* Initializes openshift.
* <p>
* Spring profiles can be configured with a program argument --spring.profiles.active=your-active-profile
* <p>
* You can find more information on how profiles work with JHipster on <a href="https://www.jhipster.tech/profiles/">https://www.jhipster.tech/profiles/</a>.
*/
@PostConstruct
public void initApplication() {
Collection<String> activeProfiles = Arrays.asList(env.getActiveProfiles());
if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) {
log.error("You have misconfigured your application! It should not run " +
"with both the 'dev' and 'prod' profiles at the same time.");
}
if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_CLOUD)) {
log.error("You have misconfigured your application! It should not " +
"run with both the 'dev' and 'cloud' profiles at the same time.");
}
}
/**
* Main method, used to run the application.
*
* @param args the command line arguments
*/
public static void main(String[] args) {
SpringApplication app = new SpringApplication(OpenshiftApp.class);
DefaultProfileUtil.addDefaultProfile(app);
Environment env = app.run(args).getEnvironment();
logApplicationStartup(env);
}
private static void logApplicationStartup(Environment env) {
String protocol = "http";
if (env.getProperty("server.ssl.key-store") != null) {
protocol = "https";
}
String serverPort = env.getProperty("server.port");
String contextPath = env.getProperty("server.servlet.context-path");
if (StringUtils.isBlank(contextPath)) {
contextPath = "/";
}
String hostAddress = "localhost";
try {
hostAddress = InetAddress.getLocalHost().getHostAddress();
} catch (UnknownHostException e) {
log.warn("The host name could not be determined, using `localhost` as fallback");
}
log.info("\n----------------------------------------------------------\n\t" +
"Application '{}' is running! Access URLs:\n\t" +
"Local: \t\t{}://localhost:{}{}\n\t" +
"External: \t{}://{}:{}{}\n\t" +
"Profile(s): \t{}\n----------------------------------------------------------",
env.getProperty("spring.application.name"),
protocol,
serverPort,
contextPath,
protocol,
hostAddress,
serverPort,
contextPath,
env.getActiveProfiles());
String configServerStatus = env.getProperty("configserver.status");
if (configServerStatus == null) {
configServerStatus = "Not found or not setup for this application";
}
log.info("\n----------------------------------------------------------\n\t" +
"Config Server: \t{}\n----------------------------------------------------------", configServerStatus);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
2503c3a59723ed5a5072cf1d6f566c430577a272
|
ed58225e220e7860f79a7ddaedfe62c5373e6f9d
|
/GOLauncher1.5_main_screen/GOLauncher1.5_main_screen/src/com/jiubang/ggheart/apps/desks/appfunc/menu/BaseListMenuView.java
|
df86e4130da9a442859399159f4bd2a3eae3e6d9
|
[] |
no_license
|
led-os/samplea1
|
f453125996384ef5453c3dca7c42333cc9534853
|
e55e57f9d5c7de0e08c6795851acbc1b1679d3a1
|
refs/heads/master
| 2021-08-30T05:37:00.963358
| 2017-12-03T08:55:00
| 2017-12-03T08:55:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,353
|
java
|
package com.jiubang.ggheart.apps.desks.appfunc.menu;
import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.widget.ListView;
/**
*
* <br>类描述:
* <br>功能详细描述:
*
* @author dingzijian
* @date [2013-5-16]
*/
public class BaseListMenuView extends ListView {
private BaseMenu mParent;
public BaseListMenuView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public BaseListMenuView(Context context) {
super(context);
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
try {
if (ev.getX() > getLeft() && ev.getX() < getRight() && ev.getY() > getTop()
&& ev.getY() < getBottom()) {
return super.onTouchEvent(ev);
} else {
if (ev.getAction() == MotionEvent.ACTION_UP) {
if (mParent != null && mParent.isShowing()) {
mParent.dismiss();
}
}
}
return super.onTouchEvent(ev);
} catch (Exception e) {
return false;
}
}
public void setParent(BaseMenu parent) {
mParent = parent;
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK
|| event.getKeyCode() == KeyEvent.KEYCODE_MENU) {
if (mParent.isShowing()) {
mParent.dismiss();
return true;
}
}
return false;
}
}
|
[
"clteir28410@chacuo.net"
] |
clteir28410@chacuo.net
|
746b03409f0e5b9c2e18d72cd46bc118fc677d83
|
aa56508933103734752cbd276ba20fb13adf20e1
|
/src/main/java/ru/job4j/it/MatrixIt.java
|
44724b2d1c6e42b6fbf1a783dc02ee10dd912823
|
[] |
no_license
|
evgenkolesman/job4j_design
|
b7953b4ff2623c9afd30c6eeb350e3beba0dd34e
|
c08f4b5df90ab9171425ae226d7c2e436d7ba077
|
refs/heads/master
| 2023-07-20T05:25:27.853357
| 2021-08-08T06:44:33
| 2021-08-08T06:44:33
| 331,615,623
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,434
|
java
|
package ru.job4j.it;
import java.util.Iterator;
import java.util.NoSuchElementException;
public class MatrixIt implements Iterator<Integer> {
private final int[][] data;
private int row = 0;
private int column = 0;
public MatrixIt(int[][] data) {
this.data = data;
}
public boolean hasNext() {
while (data.length > row && column == data[row].length) {
column = 0;
row++;
}
return data.length > row && data[row].length > column;
}
public Integer next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
return data[row][column++];
}
}
/* на память о мучениях))
public class MatrixIt implements Iterator<Integer> {
private final int[][] data; // убрал final так как выдает в дальнейшем ошибку
private int row = 0;
private int column = 0;
public MatrixIt(int[][] data) {
this.data = data;
}
public boolean hasNext() {
return (row < data.length && column < data[row].length);
}
public Integer next() {
if (!hasNext()) {
throw new NoSuchElementException();
}
int data1 = data[row][column];
column++;
while (row < data.length && column >= data[row].length) {
row = 0;
column++;
}
return data1;
}
}*/
|
[
"glavstroi_e@mail.ru"
] |
glavstroi_e@mail.ru
|
ebd04c18bfbdbe2b3b848c7ebc28627c8a273ebe
|
b65cc22c1a5f523520359359d6fee3f700b889aa
|
/app/src/main/java/com/gykj/cashier/module/finance/ui/activity/FinanceDetailActivity.java
|
e10757dc1edbd8607e860be26a4d2257d4ddcf34
|
[] |
no_license
|
hxs2mr/Cashier-android
|
9f53f29106f935cf8aa42dfd337321dd0a0f52c2
|
00e82a7ba22570bdfd0b96e3d21be82ca9217eef
|
refs/heads/master
| 2020-05-17T08:01:42.556462
| 2019-04-26T09:00:46
| 2019-04-26T09:00:46
| 183,594,682
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,441
|
java
|
package com.gykj.cashier.module.finance.ui.activity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.OrientationHelper;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;
import com.gykj.cashier.R;
import com.gykj.cashier.module.finance.entity.FinanceEntity;
import com.gykj.cashier.module.finance.iview.IFinanceDetailView;
import com.gykj.cashier.module.finance.presenter.FinanceDetailPresenter;
import com.gykj.cashier.widget.HeaderLayoutView;
import com.wrs.gykjewm.baselibrary.base.BaseActivity;
import com.wrs.gykjewm.baselibrary.common.Constant;
import butterknife.BindView;
/**
* description: 清单明细界面
* <p>
* author: josh.lu
* created: 28/8/18 下午2:31
* email: 1113799552@qq.com
* version: v1.0
*/
public class FinanceDetailActivity extends BaseActivity implements IFinanceDetailView{
@BindView(R.id.header)
HeaderLayoutView header;
@BindView(R.id.finance_billcode_tv)
TextView mFinanceBillCodeTv;
@BindView(R.id.finance_recyclerview)
RecyclerView mFinanceRecyclerView;
FinanceEntity financeEntity;
FinanceDetailPresenter presenter;
@Override
public int initContentView() {
return R.layout.activity_finance_detail;
}
@Override
public void initData() {
financeEntity = (FinanceEntity) getIntent().getExtras().getSerializable(Constant.FINANCE_ITEM);
presenter = new FinanceDetailPresenter();
presenter.attachView(this);
presenter.settlementDetail(financeEntity.getId());
}
@Override
public void initUi() {
header.setLeftImage(R.mipmap.icon_back);
header.setTitle(getString(R.string.title_finance_detail));
header.setRightVisible(View.INVISIBLE);
mFinanceBillCodeTv.setText(getString(R.string.finance_bill_no)+financeEntity.getSettlementNumber());
initRecyclerView();
}
@Override
public void initRecyclerView() {
LinearLayoutManager layoutManager = new LinearLayoutManager(this, OrientationHelper.VERTICAL,false);
mFinanceRecyclerView.setLayoutManager(layoutManager);
mFinanceRecyclerView.setAdapter(presenter.getAdapter());
}
@Override
protected void onDestroy() {
super.onDestroy();
if(presenter.isAttached()){
presenter.cancel();
presenter.detachView();
}
}
}
|
[
"1363826037@qq.com"
] |
1363826037@qq.com
|
cd00bfafa9721d918deb8b8be0588ab9b8d9834f
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/11/11_292341b95147715c27f84f452db300df08fa0e27/FIXDataDictionaryManager/11_292341b95147715c27f84f452db300df08fa0e27_FIXDataDictionaryManager_t.java
|
bd3c69279e9a3be6cd690be4c9a012c057e87e1b
|
[] |
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,044
|
java
|
package org.marketcetera.quickfix;
import org.marketcetera.core.ClassVersion;
import quickfix.ConfigError;
import quickfix.DataDictionary;
import java.io.InputStream;
/**
* Converts the standard FIX field (integers) to their english names
* This is mostly for better output/debugging purposes since we don't
* want to memorize field numbers
*
* @author Toli Kuznets
* @version $Id$
*/
@ClassVersion("$Id$")
public class FIXDataDictionaryManager {
public static final String FIX_4_0_BEGIN_STRING = "FIX.4.0";
public static final String FIX_4_1_BEGIN_STRING = "FIX.4.1";
public static final String FIX_4_2_BEGIN_STRING = "FIX.4.2";
public static final String FIX_4_3_BEGIN_STRING = "FIX.4.3";
public static final String FIX_4_4_BEGIN_STRING = "FIX.4.4";
private static DataDictionary sCurrent;
public static String getHumanFieldName(int fieldNumber)
{
return sCurrent.getFieldName(fieldNumber);
}
/** Send in the field number and field value you want to translate
* Example: Side.FIELD and Side.BUY results in "BUY"
* Replaces all the _ with a space
* @param fieldNumber
* @param value
* @return human-readable conversion of a FIX constant, or NULL if the value was not found
*/
public static String getHumanFieldValue(int fieldNumber, String value)
{
String result = sCurrent.getValueName(fieldNumber, value);
return (result == null) ? result : result.replace('_', ' ');
}
public static DataDictionary getDictionary() {
return sCurrent;
}
public static DataDictionary getDataDictionary(FIXVersion version) throws FIXFieldConverterNotAvailable {
return loadDictionary(version.getDataDictionaryURL(), false);
}
/**
* Set the default version of FIX to use in the rest of the methods on this class
* @param fixDataDictionaryPath Path to the location of the data dictionary file
* @throws FIXFieldConverterNotAvailable
*/
public static void setDataDictionary(String fixDataDictionaryPath) throws FIXFieldConverterNotAvailable
{
loadDictionary(fixDataDictionaryPath, true);
}
/**
* Load a DataDictionary from the specified resource, optionally making it the default
* dictionary.
*
* @param fixDataDictionaryPath Path to the location of the data dictionary file
* @param makeDefault if true make the version of FIX specified in the data dictionary the default version
* @throws FIXFieldConverterNotAvailable
*/
public static DataDictionary loadDictionary(String fixDataDictionaryPath, boolean makeDefault)
throws FIXFieldConverterNotAvailable
{
DataDictionary theDict;
try {
theDict = new DataDictionary(fixDataDictionaryPath);
} catch (DataDictionary.Exception ddex) {
InputStream input = FIXDataDictionaryManager.class.getClassLoader().getResourceAsStream(fixDataDictionaryPath);
try {
theDict = new DataDictionary(input);
} catch (ConfigError configError1) {
throw new FIXFieldConverterNotAvailable(ddex.getMessage(), ddex);
}
} catch (ConfigError configError) {
throw new FIXFieldConverterNotAvailable(configError.getMessage(), configError);
}
if (makeDefault){
sCurrent = theDict;
}
return theDict;
}
public static boolean isAdminMessageType42(String msgType) {
if (msgType.length() == 1) {
switch (msgType.charAt(0)){
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case 'A':
return true;
default:
return false;
}
} else {
return false;
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
c6ad4280449d1b2ad880702081dd8b48b010ca6f
|
a8e47979b45aa428a32e16ddc4ee2578ec969dfe
|
/base/common/src/main/java/org/artifactory/security/props/auth/CacheWrapper.java
|
acd31373842869e900832bc7e9374762c66b3260
|
[] |
no_license
|
nuance-sspni/artifactory-oss
|
da505cac1984da131a61473813ee2c7c04d8d488
|
af3fcf09e27cac836762e9957ad85bdaeec6e7f8
|
refs/heads/master
| 2021-07-22T20:04:08.718321
| 2017-11-02T20:49:33
| 2017-11-02T20:49:33
| 109,313,757
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,474
|
java
|
/*
*
* Artifactory is a binaries repository manager.
* Copyright (C) 2016 JFrog Ltd.
*
* Artifactory is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Artifactory is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Artifactory. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.artifactory.security.props.auth;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;
/**
* <p>Created on 04/05/16
*
* @author Yinon Avraham
*/
public interface CacheWrapper<K, V> {
void put(K key, V value);
V get(K key);
void invalidate(K key);
void invalidateAll();
void invalidateAll(Iterable<K> keys);
ConcurrentMap<K, V> asMap();
class CacheConfig {
private final Long duration;
private final TimeUnit timeUnit;
private CacheConfig(Long duration, TimeUnit timeUnit) {
this.duration = duration;
this.timeUnit = timeUnit;
}
static CacheConfigBuilder newConfig() {
return new CacheConfigBuilder();
}
public long getExpirationDuration() {
assert hasExpiration();
return duration;
}
public TimeUnit getExpirationTimeUnit() {
assert hasExpiration();
return timeUnit;
}
public boolean hasExpiration() {
return duration != null && timeUnit != null;
}
}
class CacheConfigBuilder {
private Long duration = null;
private TimeUnit timeUnit = null;
public CacheConfigBuilder expireAfterWrite(long duration, TimeUnit timeUnit) {
this.duration = duration;
this.timeUnit = timeUnit;
return this;
}
public CacheConfigBuilder noExpiration() {
this.duration = null;
this.timeUnit = null;
return this;
}
public CacheConfig build() {
return new CacheConfig(duration, timeUnit);
}
}
}
|
[
"tuan-anh.nguyen@nuance.com"
] |
tuan-anh.nguyen@nuance.com
|
5804e2ed8838245ebe64ec7ad12c61dacafe4723
|
220aa92b5848802bb6bf76785b368f6eb1471b73
|
/app/src/main/java/com/example/zhanghao/woaisiji/dynamic/bean/ImageBucket.java
|
e231bfc317a1641293bff6fbf6755e3f44cb957d
|
[] |
no_license
|
Cheng7758/FuBaihui
|
c0fa497cd6870ce4658720065b9425a14e1a1663
|
4830733a8b2d50f0e00d1e65d9b0a44a50ec22ff
|
refs/heads/master
| 2020-06-16T11:00:54.696259
| 2019-08-14T01:53:36
| 2019-08-14T01:53:36
| 195,545,689
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 199
|
java
|
package com.example.zhanghao.woaisiji.dynamic.bean;
import java.util.List;
public class ImageBucket {
public int count = 0;
public String bucketName;
public List<DynamicImageBean> imageList;
}
|
[
"wang62719@gmail.com"
] |
wang62719@gmail.com
|
e4f729b442288616ca9e5060334da9ecda8351a9
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/MATH-31b-6-25-PESA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/math3/distribution/AbstractIntegerDistribution_ESTest.java
|
c0b6ae3a185169a7a95e136d7cb7f610653e8ba4
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 598
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sun Jan 19 17:30:31 UTC 2020
*/
package org.apache.commons.math3.distribution;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class AbstractIntegerDistribution_ESTest extends AbstractIntegerDistribution_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
0209adaf8ce76959f1f8014259947c902109b127
|
42fcf1d879cb75f08225137de5095adfdd63fa21
|
/src/main/java/org/jooq/tables/records/MrktngSetFgcRecord.java
|
93b2bef508374123e1dce203f7ea4a527cc21879
|
[] |
no_license
|
mpsgit/JOOQTest
|
e10e9c8716f2688c8bf0160407b1244f9e70e8eb
|
6af2922bddc55f591e94a5a9a6efd1627747d6ad
|
refs/heads/master
| 2021-01-10T06:11:40.862153
| 2016-02-28T09:09:34
| 2016-02-28T09:09:34
| 52,711,455
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,155
|
java
|
/**
* This class is generated by jOOQ
*/
package org.jooq.tables.records;
import java.math.BigDecimal;
import java.sql.Date;
import javax.annotation.Generated;
import org.jooq.Field;
import org.jooq.Record2;
import org.jooq.Record8;
import org.jooq.Row8;
import org.jooq.impl.UpdatableRecordImpl;
import org.jooq.tables.MrktngSetFgc;
/**
* Holds list of valid FGC codes for Marketing Sets in a Market
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.7.2"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class MrktngSetFgcRecord extends UpdatableRecordImpl<MrktngSetFgcRecord> implements Record8<BigDecimal, BigDecimal, String, String, String, Date, String, Date> {
private static final long serialVersionUID = 2101145434;
/**
* Setter for <code>WETRN.MRKTNG_SET_FGC.MRKT_ID</code>.
*/
public void setMrktId(BigDecimal value) {
setValue(0, value);
}
/**
* Getter for <code>WETRN.MRKTNG_SET_FGC.MRKT_ID</code>.
*/
public BigDecimal getMrktId() {
return (BigDecimal) getValue(0);
}
/**
* Setter for <code>WETRN.MRKTNG_SET_FGC.FINSHD_GDS_CD</code>.
*/
public void setFinshdGdsCd(BigDecimal value) {
setValue(1, value);
}
/**
* Getter for <code>WETRN.MRKTNG_SET_FGC.FINSHD_GDS_CD</code>.
*/
public BigDecimal getFinshdGdsCd() {
return (BigDecimal) getValue(1);
}
/**
* Setter for <code>WETRN.MRKTNG_SET_FGC.USED_IND</code>. Indicates usage of record: Y=Yes=Used, N=No=Not Used, U=Unavailable for Use (ie previously used)
*/
public void setUsedInd(String value) {
setValue(2, value);
}
/**
* Getter for <code>WETRN.MRKTNG_SET_FGC.USED_IND</code>. Indicates usage of record: Y=Yes=Used, N=No=Not Used, U=Unavailable for Use (ie previously used)
*/
public String getUsedInd() {
return (String) getValue(2);
}
/**
* Setter for <code>WETRN.MRKTNG_SET_FGC.OFFR_SKU_SET_SKU_ID</code>.
*/
public void setOffrSkuSetSkuId(String value) {
setValue(3, value);
}
/**
* Getter for <code>WETRN.MRKTNG_SET_FGC.OFFR_SKU_SET_SKU_ID</code>.
*/
public String getOffrSkuSetSkuId() {
return (String) getValue(3);
}
/**
* Setter for <code>WETRN.MRKTNG_SET_FGC.CREAT_USER_ID</code>.
*/
public void setCreatUserId(String value) {
setValue(4, value);
}
/**
* Getter for <code>WETRN.MRKTNG_SET_FGC.CREAT_USER_ID</code>.
*/
public String getCreatUserId() {
return (String) getValue(4);
}
/**
* Setter for <code>WETRN.MRKTNG_SET_FGC.CREAT_TS</code>.
*/
public void setCreatTs(Date value) {
setValue(5, value);
}
/**
* Getter for <code>WETRN.MRKTNG_SET_FGC.CREAT_TS</code>.
*/
public Date getCreatTs() {
return (Date) getValue(5);
}
/**
* Setter for <code>WETRN.MRKTNG_SET_FGC.LAST_UPDT_USER_ID</code>.
*/
public void setLastUpdtUserId(String value) {
setValue(6, value);
}
/**
* Getter for <code>WETRN.MRKTNG_SET_FGC.LAST_UPDT_USER_ID</code>.
*/
public String getLastUpdtUserId() {
return (String) getValue(6);
}
/**
* Setter for <code>WETRN.MRKTNG_SET_FGC.LAST_UPDT_TS</code>.
*/
public void setLastUpdtTs(Date value) {
setValue(7, value);
}
/**
* Getter for <code>WETRN.MRKTNG_SET_FGC.LAST_UPDT_TS</code>.
*/
public Date getLastUpdtTs() {
return (Date) getValue(7);
}
// -------------------------------------------------------------------------
// Primary key information
// -------------------------------------------------------------------------
/**
* {@inheritDoc}
*/
@Override
public Record2<BigDecimal, BigDecimal> key() {
return (Record2) super.key();
}
// -------------------------------------------------------------------------
// Record8 type implementation
// -------------------------------------------------------------------------
/**
* {@inheritDoc}
*/
@Override
public Row8<BigDecimal, BigDecimal, String, String, String, Date, String, Date> fieldsRow() {
return (Row8) super.fieldsRow();
}
/**
* {@inheritDoc}
*/
@Override
public Row8<BigDecimal, BigDecimal, String, String, String, Date, String, Date> valuesRow() {
return (Row8) super.valuesRow();
}
/**
* {@inheritDoc}
*/
@Override
public Field<BigDecimal> field1() {
return MrktngSetFgc.MRKTNG_SET_FGC.MRKT_ID;
}
/**
* {@inheritDoc}
*/
@Override
public Field<BigDecimal> field2() {
return MrktngSetFgc.MRKTNG_SET_FGC.FINSHD_GDS_CD;
}
/**
* {@inheritDoc}
*/
@Override
public Field<String> field3() {
return MrktngSetFgc.MRKTNG_SET_FGC.USED_IND;
}
/**
* {@inheritDoc}
*/
@Override
public Field<String> field4() {
return MrktngSetFgc.MRKTNG_SET_FGC.OFFR_SKU_SET_SKU_ID;
}
/**
* {@inheritDoc}
*/
@Override
public Field<String> field5() {
return MrktngSetFgc.MRKTNG_SET_FGC.CREAT_USER_ID;
}
/**
* {@inheritDoc}
*/
@Override
public Field<Date> field6() {
return MrktngSetFgc.MRKTNG_SET_FGC.CREAT_TS;
}
/**
* {@inheritDoc}
*/
@Override
public Field<String> field7() {
return MrktngSetFgc.MRKTNG_SET_FGC.LAST_UPDT_USER_ID;
}
/**
* {@inheritDoc}
*/
@Override
public Field<Date> field8() {
return MrktngSetFgc.MRKTNG_SET_FGC.LAST_UPDT_TS;
}
/**
* {@inheritDoc}
*/
@Override
public BigDecimal value1() {
return getMrktId();
}
/**
* {@inheritDoc}
*/
@Override
public BigDecimal value2() {
return getFinshdGdsCd();
}
/**
* {@inheritDoc}
*/
@Override
public String value3() {
return getUsedInd();
}
/**
* {@inheritDoc}
*/
@Override
public String value4() {
return getOffrSkuSetSkuId();
}
/**
* {@inheritDoc}
*/
@Override
public String value5() {
return getCreatUserId();
}
/**
* {@inheritDoc}
*/
@Override
public Date value6() {
return getCreatTs();
}
/**
* {@inheritDoc}
*/
@Override
public String value7() {
return getLastUpdtUserId();
}
/**
* {@inheritDoc}
*/
@Override
public Date value8() {
return getLastUpdtTs();
}
/**
* {@inheritDoc}
*/
@Override
public MrktngSetFgcRecord value1(BigDecimal value) {
setMrktId(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public MrktngSetFgcRecord value2(BigDecimal value) {
setFinshdGdsCd(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public MrktngSetFgcRecord value3(String value) {
setUsedInd(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public MrktngSetFgcRecord value4(String value) {
setOffrSkuSetSkuId(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public MrktngSetFgcRecord value5(String value) {
setCreatUserId(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public MrktngSetFgcRecord value6(Date value) {
setCreatTs(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public MrktngSetFgcRecord value7(String value) {
setLastUpdtUserId(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public MrktngSetFgcRecord value8(Date value) {
setLastUpdtTs(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public MrktngSetFgcRecord values(BigDecimal value1, BigDecimal value2, String value3, String value4, String value5, Date value6, String value7, Date value8) {
value1(value1);
value2(value2);
value3(value3);
value4(value4);
value5(value5);
value6(value6);
value7(value7);
value8(value8);
return this;
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create a detached MrktngSetFgcRecord
*/
public MrktngSetFgcRecord() {
super(MrktngSetFgc.MRKTNG_SET_FGC);
}
/**
* Create a detached, initialised MrktngSetFgcRecord
*/
public MrktngSetFgcRecord(BigDecimal mrktId, BigDecimal finshdGdsCd, String usedInd, String offrSkuSetSkuId, String creatUserId, Date creatTs, String lastUpdtUserId, Date lastUpdtTs) {
super(MrktngSetFgc.MRKTNG_SET_FGC);
setValue(0, mrktId);
setValue(1, finshdGdsCd);
setValue(2, usedInd);
setValue(3, offrSkuSetSkuId);
setValue(4, creatUserId);
setValue(5, creatTs);
setValue(6, lastUpdtUserId);
setValue(7, lastUpdtTs);
}
}
|
[
"krisztian.koller@gmail.com"
] |
krisztian.koller@gmail.com
|
deae2e23fadad464d3ee8b9026c0c0780d5f3f39
|
6ce1f0e394c7e86200b00a4528927e90c78d5669
|
/app/src/main/java/mazad/mazad/LoginActivity.java
|
78cf58b69211872acf94dbeefab1bac3508f346b
|
[] |
no_license
|
amrgeek95/mazad_android
|
fa4e4fc17db7a7ed26305eef44528dc6a644c235
|
18970be629b93299954ec324ef50f1eb7b1752f2
|
refs/heads/master
| 2020-03-17T06:03:40.734676
| 2018-05-14T09:25:29
| 2018-05-14T09:25:29
| 133,339,782
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,918
|
java
|
package mazad.mazad;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.support.v4.app.NavUtils;
import android.support.v4.view.ViewCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ProgressBar;
import com.android.volley.VolleyError;
import java.util.HashMap;
import java.util.Map;
import butterknife.BindView;
import butterknife.ButterKnife;
import mazad.mazad.utils.Connector;
import mazad.mazad.utils.Helper;
import uk.co.chrisjenx.calligraphy.CalligraphyConfig;
import uk.co.chrisjenx.calligraphy.CalligraphyContextWrapper;
public class LoginActivity extends AppCompatActivity {
@BindView(R.id.toolbar)
Toolbar mToolbar;
@BindView(R.id.login_button)
Button mLoginButton;
@BindView(R.id.back)
ImageView mBackButton;
@BindView(R.id.user_name)
EditText mEmailEditText;
@BindView(R.id.password)
EditText mPasswordEditText;
@BindView(R.id.progress_indicator)
ProgressBar mProgressBar;
@BindView(R.id.root_layout)
View mParentLayout;
Connector mConnector;
String mEmail;
String mPassword;
Map<String,String> mMap;
private final String TAG = "LoginActivity";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
ButterKnife.bind(this);
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath("fonts/Roboto-RobotoRegular.ttf")
.setFontAttrId(R.attr.fontPath)
.build()
);
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.JELLY_BEAN_MR1) {
ViewCompat.setLayoutDirection(findViewById(R.id.parent_layout), ViewCompat.LAYOUT_DIRECTION_RTL);
}
setSupportActionBar(mToolbar);
if (getSupportActionBar() != null) {
getSupportActionBar().setDisplayShowTitleEnabled(false);
}
mMap = new HashMap<>();
mLoginButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mEmail = mEmailEditText.getText().toString();
mPassword = mPasswordEditText.getText().toString();
if (!Helper.validateEmail(mEmail) && !Helper.validateFields(mPassword))
Helper.showSnackBarMessage("من فضلك. ادخل بيانات صحيحة",LoginActivity.this);
else if (!Helper.validateFields(mPassword))
Helper.showSnackBarMessage("من فضلك. ادخل كلمة المرور",LoginActivity.this);
else if (!Helper.validateEmail(mEmail))
Helper.showSnackBarMessage("البريد الالكتروني يجب ان يكون صحيح",LoginActivity.this);
else {
String token = Helper.getTokenFromSharedPreferences(LoginActivity.this);
mMap.put("username",mEmail);
mMap.put("password",mPassword);
mMap.put("token",token);
Helper.writeToLog(Helper.getTokenFromSharedPreferences(LoginActivity.this));
Helper.hideKeyboard(LoginActivity.this,v);
mConnector.setMap(mMap);
mParentLayout.setVisibility(View.INVISIBLE);
mProgressBar.setVisibility(View.VISIBLE);
mConnector.getRequest(TAG, Connector.createLoginUrl());
}
}
});
mBackButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavUtils.navigateUpFromSameTask(LoginActivity.this);
}
});
mConnector = new Connector(LoginActivity.this, new Connector.LoadCallback() {
@Override
public void onComplete(String tag, String response) {
if (Connector.checkStatus(response)){
clearTextView();
Helper.SaveToSharedPreferences(LoginActivity.this,Connector.registerAndLoginJson(response));
Helper.SavePasswordToSharedPreferences(LoginActivity.this,mPassword);
startActivity(new Intent(LoginActivity.this,HomeActivity.class).putExtra("user",Connector.registerAndLoginJson(response)).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));
} else {
Helper.showSnackBarMessage(Connector.getMessage(response),LoginActivity.this);
mParentLayout.setVisibility(View.VISIBLE);
mProgressBar.setVisibility(View.INVISIBLE);
}
}
}, new Connector.ErrorCallback() {
@Override
public void onError(VolleyError error) {
error.printStackTrace();
mParentLayout.setVisibility(View.VISIBLE);
mProgressBar.setVisibility(View.INVISIBLE);
Helper.showSnackBarMessage("خطأ. من فضلك اعد المحاوله",LoginActivity.this);
}
});
}
@Override
protected void attachBaseContext(Context newBase) {
super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
}
private void clearTextView(){
mEmailEditText.setText("");
mPasswordEditText.setText("");
}
@Override
protected void onStop() {
super.onStop();
mConnector.cancelAllRequests(TAG);
}
public void forgetPassword(View view) {
startActivity(new Intent(LoginActivity.this,ForgetPasswordActivity.class));
}
}
|
[
"abdelrahmanh542@gmail.com"
] |
abdelrahmanh542@gmail.com
|
946800392329c6a62ebf2d8bc53eb39d90b0381a
|
b11fc100408d858794853729d0bbdfa54cbe923d
|
/android/V4.4.0_08.29/.svn/pristine/94/946800392329c6a62ebf2d8bc53eb39d90b0381a.svn-base
|
feecf0b7f2ad4da0d0935ae720a9e572df4e34fd
|
[] |
no_license
|
dengjiaping/zland
|
23b0e87ff00ad9dd5a977f58166072272b02f09d
|
d31183fce689a42cbf35f5b8a0780390f9d6d6c9
|
refs/heads/master
| 2021-08-11T01:56:08.742546
| 2017-11-13T03:43:39
| 2017-11-13T03:43:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,788
|
package com.zhisland.android.blog.info.view;
import com.zhisland.android.blog.common.comment.bean.Comment;
import com.zhisland.android.blog.common.comment.bean.Reply;
import com.zhisland.android.blog.info.bean.ZHInfo;
import com.zhisland.android.blog.common.comment.view.SendCommentView;
import com.zhisland.lib.component.adapter.ZHPageData;
import com.zhisland.lib.mvp.view.IMvpView;
/**
* 资讯详情页面的阅读功能view接口
*/
public interface IInfoSocialView extends IMvpView {
/**
* 成功加载评论数据
*/
void onloadSuccess(ZHPageData<Comment> data);
/**
* 加载评论数据失败
*
* @param error
*/
void onLoadFailed(Throwable error);
/**
* 显示加载对话框
*/
void showCommentDlg(String text);
/**
* 隐藏加载对话框
*/
void hideCommentDlg();
/**
* 刷新评论列表
*/
void refreshCommentList();
/**
* 显示评论编辑框
*/
void showSendCommentView(SendCommentView.ToType toType, String toName, Long newsId, Long commentId, Long replyId);
/**
* 隐藏评论编辑框
*/
void hideSendCommentView();
/**
* toast观点发表成功
*/
void toastCommentSuccess();
/**
* 设置评论数量View
*/
void setCommentCount(int count);
/**
* 设置评论View显示
*/
void showComment();
/**
* 设置顶、踩View显示状态
*/
void showUpDownView(int upCount, int downCount);
/**
* 设置顶、踩View的Enabled状态
*/
void setUpDownSelect(boolean upSelect, boolean downSelect);
/**
* 查看更多回复
*/
void gotoCommentDetail(Comment comment, ZHInfo info);
/**
* 展示分享view
*
* @param info
*/
void showShareView(ZHInfo info);
/**
* 获取评论列表中id为commentId的comment
*/
Comment getCommentItem(long commentId);
/**
* 在评论列表的最前位置,添加comment。
*/
void addCommentItemAtFirst(Comment comment);
/**
* 从评论列表中移除comment。
*/
void removeCommentItem(Comment comment);
/**
* 显示删除对话框,reply不为空:删除回复;reply为空:删除评论
*/
void showDeleteDialog(final Comment comment, final Reply reply);
/**
* 显示顶踩动画
*/
void showUpDownAnim(int upCount, int downCount, boolean hide);
/**
* 显示下方发表评论的view
* */
void hideSendBottomView();
/**
* 隐藏下方发表评论的view
* */
void showSendBottomView();
}
|
[
"lipengju@yixia.com"
] |
lipengju@yixia.com
|
|
ffa42af2d9dcb8a886546e3d5a084063bdd8d4d8
|
49883a15ebba7555845efa6c2b391c2949f471b4
|
/LiceoZagDadaUtilities/src/it/gov/scuolesuperioridizagarolo/dada/bitorario/output/HtmlOutputOrario_perDocenti.java
|
f510631dc6527b2a247ac2e329103b0e7b7d081f
|
[] |
no_license
|
devxyz/LiceoZagDroid
|
9d6784c61267414f9da9c129935cab59ce079e79
|
b906fae8d4f84ac115e56e75c7d6b9fa2af1e187
|
refs/heads/master
| 2023-03-11T09:26:26.963923
| 2021-02-24T21:21:31
| 2021-02-24T21:21:31
| 115,658,408
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,276
|
java
|
package it.gov.scuolesuperioridizagarolo.dada.bitorario.output;
import it.gov.scuolesuperioridizagarolo.model.bitorario.BitOrarioGrigliaOrario;
import it.gov.scuolesuperioridizagarolo.model.bitorario.BitOrarioOraLezione;
import it.gov.scuolesuperioridizagarolo.model.bitorario.enum_values.EGiorno;
import it.gov.scuolesuperioridizagarolo.model.bitorario.enum_values.EOra;
import it.gov.scuolesuperioridizagarolo.model.bitorario.enum_values.EPaperFormat;
import java.util.Collection;
/**
* Created by stefano on 25/09/2017.
*/
public class HtmlOutputOrario_perDocenti extends HtmlOutputOrario {
@Override
protected String getSubTitle() {
return "Orario per Docenti";
}
@Override
protected int getPrintForPage(EPaperFormat paperFormat) {
if (paperFormat == EPaperFormat.A3)
return 6;
else
return 3;
}
@Override
protected Collection<String> raggruppaPer(BitOrarioGrigliaOrario o) {
return o.getDocenti();
}
@Override
protected String getLezione(BitOrarioGrigliaOrario griglia, NoteVariazioniBitOrarioGrigliaOrario note, EOra o, EGiorno s, String classe) {
final BitOrarioOraLezione l = griglia.getLezioneConDocente(classe, s, o);
if (l == null) return "";
String n = note.getNote(l);
if (n == null) n = "";
if (l != null && l.getNote() != null && n.length() > 0) {
n += (" " + l.getNote()).trim();
}
if (n.length()>0){
n="<br><span style='border:2px solid black;color:white;background-color:black'>"+n+"</span>";
}
if (l.getClasse() != null)
return "<center style='font-size:12px'> <b>" + l.getClasse() + "</b> (" + l.getAula() + ") - <span style='font-size:12px'>" + l.getMateriaPrincipale().toLowerCase() + "</span> " + n + "</center>";
else
return "<center style='color:red;font-size:18px'> <b>" + l.getMateriaPrincipale().toUpperCase() + "</span>" + n + "</center>";
}
@Override
protected String intestazione(String s, BitOrarioGrigliaOrario grigliaOrario) {
return "<span style='font-size:18px;font-weight: bold;'> " + s + "</span> (<span style='font-size:10px;'> " + grigliaOrario.getTitolo() + "</span>)";
}
}
|
[
"stefano.millozzi@gmail.com"
] |
stefano.millozzi@gmail.com
|
6efb86e5b57a81cc3c5ea81763c0d194a022c658
|
002eac3cdd9a5e8d5517746f86ba33e4daf20b40
|
/src/main/java/com/hendisantika/springbootreactivewebapi/service/author/AuthorService.java
|
998809b5a5f061632050d0562a10cadb47d91aa2
|
[] |
no_license
|
hendisantika/springboot-reactive-web-api
|
1006f83806429ec8d3f81f44d92ff3dbb41257ba
|
7e35c5e655e1874f132db6dc04c36ae6c8ad842d
|
refs/heads/master
| 2023-05-25T11:34:59.381719
| 2023-05-16T23:49:53
| 2023-05-16T23:49:53
| 194,174,771
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 472
|
java
|
package com.hendisantika.springbootreactivewebapi.service.author;
import com.hendisantika.springbootreactivewebapi.dto.request.AddAuthorRequest;
import io.reactivex.Single;
/**
* Created by IntelliJ IDEA.
* Project : springboot-reactive-web-api
* User: hendisantika
* Email: hendisantika@gmail.com
* Telegram : @hendisantika34
* Date: 2019-06-29
* Time: 06:29
*/
public interface AuthorService {
Single<String> addAuthor(AddAuthorRequest addAuthorRequest);
}
|
[
"hendisantika@yahoo.co.id"
] |
hendisantika@yahoo.co.id
|
8f47f4136f6cf30ea11e25446bb0f69208eb9cb3
|
db97ce70bd53e5c258ecda4c34a5ec641e12d488
|
/src/main/java/com/alipay/api/response/AlipayTradeBuyerCreditCancelResponse.java
|
9166ab0416c47ea9aa2d727a3bff5988d9f7a73d
|
[
"Apache-2.0"
] |
permissive
|
smitzhang/alipay-sdk-java-all
|
dccc7493c03b3c937f93e7e2be750619f9bed068
|
a835a9c91e800e7c9350d479e84f9a74b211f0c4
|
refs/heads/master
| 2022-11-23T20:32:27.041116
| 2020-08-03T13:03:02
| 2020-08-03T13:03:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,036
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.trade.buyer.credit.cancel response.
*
* @author auto create
* @since 1.0, 2020-07-10 19:39:33
*/
public class AlipayTradeBuyerCreditCancelResponse extends AlipayResponse {
private static final long serialVersionUID = 6294353732652591851L;
/**
* 标识买家授信额度的来源
*/
@ApiField("buyer_credit_source")
private String buyerCreditSource;
/**
* 本次授信拆分的买家主体userId
*/
@ApiField("buyer_user_id")
private String buyerUserId;
/**
* 标识本次授信拆分的业务场景,具体的值由支付宝定义
*/
@ApiField("credit_scene")
private String creditScene;
/**
* 卖家授信拆分给买家的额度
单位为元,精确到小数点后两位,取值范围[0.01,100000000]
*/
@ApiField("grant_credit_quota")
private String grantCreditQuota;
/**
* 本次授信拆分的操作id
*/
@ApiField("grant_operation_no")
private String grantOperationNo;
/**
* 标识本次授信拆分的状态
INIT: 申请中
SUCCESS:已确认
CLOSED: 已撤销
*/
@ApiField("grant_status")
private String grantStatus;
/**
* 标识商家授信额度的来源,具体的值由支付宝定义
*/
@ApiField("merchant_credit_source")
private String merchantCreditSource;
/**
* 商家授权开通账期的卖家userid
*/
@ApiField("merchant_user_id")
private String merchantUserId;
public void setBuyerCreditSource(String buyerCreditSource) {
this.buyerCreditSource = buyerCreditSource;
}
public String getBuyerCreditSource( ) {
return this.buyerCreditSource;
}
public void setBuyerUserId(String buyerUserId) {
this.buyerUserId = buyerUserId;
}
public String getBuyerUserId( ) {
return this.buyerUserId;
}
public void setCreditScene(String creditScene) {
this.creditScene = creditScene;
}
public String getCreditScene( ) {
return this.creditScene;
}
public void setGrantCreditQuota(String grantCreditQuota) {
this.grantCreditQuota = grantCreditQuota;
}
public String getGrantCreditQuota( ) {
return this.grantCreditQuota;
}
public void setGrantOperationNo(String grantOperationNo) {
this.grantOperationNo = grantOperationNo;
}
public String getGrantOperationNo( ) {
return this.grantOperationNo;
}
public void setGrantStatus(String grantStatus) {
this.grantStatus = grantStatus;
}
public String getGrantStatus( ) {
return this.grantStatus;
}
public void setMerchantCreditSource(String merchantCreditSource) {
this.merchantCreditSource = merchantCreditSource;
}
public String getMerchantCreditSource( ) {
return this.merchantCreditSource;
}
public void setMerchantUserId(String merchantUserId) {
this.merchantUserId = merchantUserId;
}
public String getMerchantUserId( ) {
return this.merchantUserId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
12102094515ab3b7b002c4aa3cccc35a2cba9410
|
fadc61b17b59b7755bbc6cbd8c648928380c63f9
|
/core/src/test/java/io/recode/decompile/impl/CodeLocationDecompilerImplTest.java
|
5d3435bf3b6ca9a1f7f44758288e2a3c2a981bfe
|
[
"Apache-2.0"
] |
permissive
|
amidrunk/recode
|
d8c4e1873dee4aa05d4716c5480f2c88c3928c1e
|
a758c646d380c4089bf5dda3f3d4ce405b8bc811
|
refs/heads/master
| 2021-01-19T01:37:56.399564
| 2016-07-17T18:23:01
| 2016-07-17T18:23:01
| 60,847,297
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,931
|
java
|
package io.recode.decompile.impl;
import io.recode.Caller;
import io.recode.classfile.ByteCode;
import io.recode.classfile.LineNumberTable;
import io.recode.classfile.LineNumberTableEntry;
import io.recode.classfile.ReferenceKind;
import io.recode.decompile.*;
import io.recode.model.*;
import io.recode.model.impl.ArrayLoadImpl;
import io.recode.model.impl.ConstantImpl;
import io.recode.model.impl.VariableAssignmentImpl;
import org.apache.commons.io.IOUtils;
import org.junit.Ignore;
import org.junit.Test;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Consumer;
import java.util.function.Supplier;
import static io.recode.Caller.adjacent;
import static io.recode.Caller.me;
import static io.recode.test.Assertions.assertThrown;
import static org.junit.Assert.*;
import static org.mockito.Mockito.mock;
public class CodeLocationDecompilerImplTest {
private final CodeLocationDecompiler codeLocationDecompiler = new CodeLocationDecompilerImpl();
@Test
public void decompileCallerShouldNotAcceptInvalidArguments() {
assertThrown(() -> codeLocationDecompiler.decompileCodeLocation(null, mock(DecompilationProgressCallback.class)), AssertionError.class);
assertThrown(() -> codeLocationDecompiler.decompileCodeLocation(me(), null), AssertionError.class);
}
@Test
public void decompileCallerCanDecompileSimpleStatement() throws IOException {
int n = 100;
final Element[] elements = decompileCaller(adjacent(-2));
assertArrayEquals(new Element[]{
new VariableAssignmentImpl(new ConstantImpl(100, int.class), 1, "n", int.class)
}, elements);
}
@Test
public void decompileCallerCanDecompileSimpleLambda() throws IOException {
Supplier<String> s = () -> "foo";
final Element[] elements = decompileCaller(adjacent(-2));
final Lambda lambda = assignedLambda("s", elements);
assertEquals(MethodSignature.parse("()Ljava/lang/String;"), lambda.getBackingMethodSignature());
assertTrue(lambda.getEnclosedVariables().isEmpty());
assertEquals(ReferenceKind.INVOKE_STATIC, lambda.getReferenceKind());
}
@Test
public void decompileCallerCanDecompileLambdaWithEnclosedVariable() throws IOException {
final String str = new String("str");
final Supplier<String> s = () -> str;
final Element[] elements = decompileCaller(adjacent(-2));
final Lambda lambda = assignedLambda("s", elements);
final LocalVariableReference localVariableReference = lambda.getEnclosedVariables().get(0);
assertEquals(MethodSignature.parse("(Ljava/lang/String;)Ljava/lang/String;"), lambda.getBackingMethodSignature());
assertEquals(1, lambda.getEnclosedVariables().size());
assertEquals("str", localVariableReference.getName());
assertEquals(String.class, localVariableReference.getType());
assertEquals(ReferenceKind.INVOKE_STATIC, lambda.getReferenceKind());
}
@Test
public void decompileCallerCanDecompileLambdaWithParametersAndEnclosedVariable() throws IOException {
final List myList = Arrays.asList("foo");
final Consumer<String> a = s -> myList.toString();
final Element[] elements = decompileCaller(adjacent(-2));
final Lambda lambda = assignedLambda("a", elements);
assertEquals(MethodSignature.parse("(Ljava/util/List;Ljava/lang/String;)V"), lambda.getBackingMethodSignature());
assertEquals(1, lambda.getEnclosedVariables().size());
assertEquals("myList", lambda.getEnclosedVariables().get(0).getName());
}
@Test
public void nestedLambdaWithEnclosedVariablesCanBeDecompiled() throws IOException {
int expectedLength = 3;
given("foo").then(foo -> {
given("bar").then(bar -> {
assertEquals(expectedLength, bar.length());
});
});
final Caller caller = Caller.adjacent(-6);
final Element[] elements = decompileCaller(caller);
assertEquals("then", elements[0].as(MethodCall.class).getMethodName());
assertEquals("given", elements[0].as(MethodCall.class).getTargetInstance().as(MethodCall.class).getMethodName());
}
@Test
public void multiLineExpressionsCanBeHandled() throws IOException {
String str = new String("foo")
.toString();
final Element[] elements = decompileCaller(Caller.adjacent(-3));
assertArrayEquals(new Element[]{
AST.set(1, "str", String.class, AST.call(AST.newInstance(String.class, AST.constant("foo")), "toString", String.class))
}, elements);
}
@Test
public void intArrayElementReferenceCanBeDecompiled() throws Exception {
final int[] array = {1, 2, 3, 4};
final int n = array[0];
final Element[] elements = decompileCaller(Caller.adjacent(-2));
assertArrayEquals(new Element[]{
new VariableAssignmentImpl(
new ArrayLoadImpl(AST.local("array", int[].class, 1), AST.constant(0), int.class),
2, "n", int.class
)
}, elements);
}
@Test
@Ignore
// TODO: If (1) iinc and (2) stacked expression is non-int variable reference (3) we're trying to escape
public void expressionInLoopCanBeDecompiled() throws IOException {
for (int i = 0; i < 1; i++) {
assertEquals("foo", "foo");
}
final Element[] elements = decompileCaller(Caller.adjacent(-3));
expect(elements.length).toBe(1);
final MethodCall it = elements[0].as(MethodCall.class);
assertEquals("assertEquals", it.getMethodName());
assertArrayEquals(new Object[]{AST.constant("foo"), AST.constant("foo")}, it.getParameters().toArray());
}
private<T> GivenContinuation<T> given(T instance) {
return consumer-> consumer.accept(instance);
}
private interface GivenContinuation<T> {
void then(Consumer<T> consumer);
}
public static class Loop {
public Loop loop(String argument) {
return this;
}
}
private<T> ExpectContinuation<T> expect(T instance) {
return actual -> {
if (!Objects.equals(instance, actual)) {
throw new AssertionError("Failure: " + instance + " != " + actual);
}
};
}
private interface ExpectContinuation<T> {
void toBe(T value);
}
@Test
@Ignore("This must be fixed")
public void multiLineStatementInForEachCanBeDecompiled() throws IOException {
final Integer[] integers = {1, 2, 3, 4};
for (Integer n : integers) {
expect(n)
.toBe(n);
}
final Element[] elements = decompileCaller(Caller.adjacent(-5));
expect(elements.length).toBe(1);
System.out.println(Arrays.asList(elements));
}
public void nestedLambdaWithEnclosedVariablesCanBeDecompiled(String str) {
}
private Lambda assignedLambda(String variableName, Element[] elements) {
assertEquals(1, elements.length);
assertEquals(ElementType.VARIABLE_ASSIGNMENT, elements[0].getElementType());
final VariableAssignment variableAssignment = (VariableAssignment) elements[0];
assertEquals(variableName, variableAssignment.getVariableName());
assertEquals(ElementType.LAMBDA, variableAssignment.getValue().getElementType());
return (Lambda) variableAssignment.getValue();
}
private Element[] decompileCaller(Caller caller) throws IOException {
return Arrays.stream(codeLocationDecompiler.decompileCodeLocation(caller))
.map(CodePointer::getElement)
.toArray(Element[]::new);
}
}
|
[
"andreas.nilsson@unibet.com"
] |
andreas.nilsson@unibet.com
|
7d540ae13675f7b788c639b5aae6c8502e0d92e5
|
693aafea91b435f4e38cf2cd03f48771054a122c
|
/core/tern.core.tests/src/tern/server/protocol/angular/AbstractAngularControllerCompletionTest.java
|
963463106254be5b54443e7eaaaa63318c4bf479
|
[] |
no_license
|
MikkelTAndersen/tern.java
|
4f7f3424670deb9f6248012708761177a1002fb7
|
ea78b81e303f7666e5c214667fb096630074eb38
|
refs/heads/master
| 2021-01-18T13:22:50.470639
| 2014-01-23T17:16:47
| 2014-01-23T17:16:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,146
|
java
|
package tern.server.protocol.angular;
import org.junit.Assert;
import org.junit.Test;
import tern.TernException;
import tern.angular.AngularType;
import tern.angular.protocol.completions.TernAngularCompletionItem;
import tern.angular.protocol.completions.TernAngularCompletionsQuery;
import tern.server.protocol.TernDoc;
/**
* Tests with tern angular controller completion.
*
*/
public abstract class AbstractAngularControllerCompletionTest extends
AbstractTernServerAngularTest {
@Test
public void completionWithModuleControllersAndBadModule()
throws TernException {
TernDoc doc = createDocForCompletionModuleControllers(null);
MockTernAngularCompletionCollector collector = new MockTernAngularCompletionCollector(
server);
server.request(doc, collector);
Assert.assertTrue(collector.getCompletions().size() == 0);
}
@Test
public void completionWithModuleControllersAndModule() throws TernException {
TernDoc doc = createDocForCompletionModuleControllers("phonecatControllers");
MockTernAngularCompletionCollector collector = new MockTernAngularCompletionCollector(
server);
server.request(doc, collector);
Assert.assertTrue(collector.getCompletions().size() == 2);
TernAngularCompletionItem item = collector.get("PhoneListCtrl");
Assert.assertNotNull(item);
Assert.assertEquals("phonecatControllers", item.getModule());
Assert.assertEquals("PhoneListCtrl", item.getName());
Assert.assertEquals("fn($scope: $scope, Phone: Resource.prototype)",
item.getType());
Assert.assertEquals("myfile.js", item.getOrigin());
}
private TernDoc createDocForCompletionModuleControllers(String module) {
String name = "myfile.js";
String text = "var phonecatControllers = angular.module('phonecatControllers', [])";
text += "\nphonecatControllers.controller('PhoneListCtrl', ['$scope', 'Phone',";
text += "\nfunction($scope, Phone) {";
text += "\n$scope.phones = Phone.query();";
text += "\n$scope.orderProp = 'age';";
text += "\n}]);";
text += "\nphonecatControllers.controller('PhoneDetailCtrl', ['$scope', '$routeParams', 'Phone',";
text += "\nfunction($scope, $routeParams, Phone) {";
text += "\n$scope.phone = Phone.get({phoneId: $routeParams.phoneId}, function(phone) {";
text += "\n$scope.mainImageUrl = phone.images[0];";
text += "\n});";
text += "\n$scope.setImage = function(imageUrl) {";
text += "\n$scope.mainImageUrl = imageUrl;";
text += "\n}";
text += "\n}]);";
TernDoc doc = new TernDoc();
doc.addFile(name, text, null);
TernAngularCompletionsQuery query = new TernAngularCompletionsQuery(
AngularType.controller);
query.getScope().setModule(module);
query.addFile("myfile.js");
query.setExpression("Phone");
doc.setQuery(query);
return doc;
}
@Test
public void completionWithGlobalControllers() throws TernException {
TernDoc doc = createDocForGlobalControllers();
MockTernAngularCompletionCollector collector = new MockTernAngularCompletionCollector(
server);
server.request(doc, collector);
Assert.assertTrue(collector.getCompletions().size() == 2);
TernAngularCompletionItem item = collector.get("TodoCtrl");
Assert.assertNotNull(item);
Assert.assertEquals(null, item.getModule());
Assert.assertEquals("TodoCtrl", item.getName());
Assert.assertEquals("fn($scope: ?)", item.getType());
Assert.assertEquals("myfile.js", item.getOrigin());
}
private TernDoc createDocForGlobalControllers() {
String name = "myfile.js";
String text = "function TodoCtrl($scope) {};";
text += "\nfunction SomeCtrl($scope) {};";
TernDoc doc = new TernDoc();
doc.addFile(name, text, null);
TernAngularCompletionsQuery query = new TernAngularCompletionsQuery(
AngularType.controller);
query.addFile("myfile.js");
query.setExpression("");
doc.setQuery(query);
return doc;
}
@Test
public void completionWithGlobalControllersStartsWith()
throws TernException {
TernDoc doc = createDocForGlobalControllersStartsWith();
MockTernAngularCompletionCollector collector = new MockTernAngularCompletionCollector(
server);
server.request(doc, collector);
Assert.assertTrue(collector.getCompletions().size() == 1);
TernAngularCompletionItem item = collector.get("SomeCtrl");
Assert.assertNotNull(item);
Assert.assertEquals("SomeCtrl", item.getName());
Assert.assertEquals("fn($scope: ?)", item.getType());
Assert.assertEquals("myfile.js", item.getOrigin());
}
private TernDoc createDocForGlobalControllersStartsWith() {
String name = "myfile.js";
String text = "function TodoCtrl($scope) {};";
text += "\nfunction SomeCtrl($scope) {};";
TernDoc doc = new TernDoc();
doc.addFile(name, text, null);
TernAngularCompletionsQuery query = new TernAngularCompletionsQuery(
AngularType.controller);
query.addFile("myfile.js");
query.setExpression("S");
doc.setQuery(query);
return doc;
}
@Test
public void completionWithGlobalControllersCheckFiles()
throws TernException {
server.addFile("myfile.js", "function TodoCtrl($scope) {};");
server.addFile("myfile2.js", "function SomeCtrl($scope) {};");
TernDoc doc = createDocForGlobalControllersCheckFiles();
MockTernAngularCompletionCollector collector = new MockTernAngularCompletionCollector(
server);
server.request(doc, collector);
Assert.assertTrue(collector.getCompletions().size() == 1);
TernAngularCompletionItem item = collector.get("TodoCtrl");
Assert.assertNotNull(item);
Assert.assertEquals(null, item.getModule());
Assert.assertEquals("TodoCtrl", item.getName());
Assert.assertEquals("fn($scope: ?)", item.getType());
Assert.assertEquals("myfile.js", item.getOrigin());
}
private TernDoc createDocForGlobalControllersCheckFiles() {
TernDoc doc = new TernDoc();
TernAngularCompletionsQuery query = new TernAngularCompletionsQuery(
AngularType.controller);
query.addFile("myfile.js");
query.setExpression("");
doc.setQuery(query);
return doc;
}
}
|
[
"angelo.zerr@gmail.com"
] |
angelo.zerr@gmail.com
|
00d9feae1b36477f9bfc99459cf29956481e3fbf
|
b2a635e7cc27d2df8b1c4197e5675655add98994
|
/androidx/appcompat/widget/b0.java
|
91d7f633193bdafa7393edfa84a3022cdd30a470
|
[] |
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
| 816
|
java
|
package androidx.appcompat.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;
import android.widget.ToggleButton;
public class b0 extends ToggleButton {
private final y c;
public b0(Context paramContext, AttributeSet paramAttributeSet) {
this(paramContext, paramAttributeSet, 16842827);
}
public b0(Context paramContext, AttributeSet paramAttributeSet, int paramInt) {
super(paramContext, paramAttributeSet, paramInt);
s0.a((View)this, getContext());
this.c = new y((TextView)this);
this.c.a(paramAttributeSet, paramInt);
}
}
/* Location: /home/yc/Downloads/LeaveHomeSafe.jar!/androidx/appcompat/widget/b0.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/
|
[
"game0427game@gmail.com"
] |
game0427game@gmail.com
|
3c9d91f1e152e350b93008cc9de08e8bd52b6bfa
|
bd5562090487237b27274d6ad4b0e64c90d70604
|
/abc.dao/src/main/java/com/autoserve/abc/dao/intf/OperateLogDao.java
|
67c2519784b60a63c2da8b6c7930ba919e9a8546
|
[] |
no_license
|
haxsscker/abc.parent
|
04b0d659958a4c1b91bb41a002e814ea31bd0e85
|
0522c15aed591e755662ff16152b702182692f54
|
refs/heads/master
| 2020-05-04T20:25:34.863818
| 2019-04-04T05:49:01
| 2019-04-04T05:49:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,316
|
java
|
package com.autoserve.abc.dao.intf;
import com.autoserve.abc.dao.BaseDao;
import com.autoserve.abc.dao.common.PageCondition;
import com.autoserve.abc.dao.dataobject.OperateLogDO;
import com.autoserve.abc.dao.dataobject.OperateLogJDO;
import com.autoserve.abc.dao.dataobject.search.OperateLogSearchDO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface OperateLogDao extends BaseDao<OperateLogDO, Integer> {
/**
* 根据参数获取记录条数
*
* @param operateLogDO
* @return
*/
public int countListByParam(@Param("log") OperateLogDO operateLogDO);
/**
* 按条件查询分页结果
*
* @param operateLogDO 查询条件,为空的话传new CreditJDO()
* @param pageCondition 分页和排序条件,可选
* @return List<CreditJDO>
*/
public List<OperateLogJDO> findListByParam(@Param("log") OperateLogDO operateLogDO,
@Param("pageCondition") PageCondition pageCondition);
public int deleteByIds(@Param("ids") List<Integer> ids);
public int countForSearch(@Param("searchDO") OperateLogSearchDO searchDO);
public List<OperateLogJDO> search(@Param("searchDO") OperateLogSearchDO searchDO, @Param("pageCondition") PageCondition pageCondition);
}
|
[
"845534336@qq.com"
] |
845534336@qq.com
|
e81625bd676e47d332267e54575f5deb7dc607c0
|
3814fe7cd4e0c0e4047aa0c4a4461acc8282df98
|
/src/ttr/spelar/CardHandler.java
|
d1861e91d11272ce2843dcb8b09827180d62b79d
|
[] |
no_license
|
madsop/ticket-to-ride
|
3ebd03245e2eeb97cd2066f88cf013015510c934
|
0009be6b3a00986c9706d7af312261e2f0c8e0cb
|
refs/heads/master
| 2022-11-12T04:38:13.537653
| 2020-06-29T19:00:10
| 2020-06-29T19:00:10
| 275,860,445
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 936
|
java
|
package ttr.spelar;
import ttr.data.Colour;
import ttr.data.Konstantar;
import ttr.kjerna.Core;
import java.util.HashMap;
import java.util.Map;
public class CardHandler {
private Map<Colour, Integer> cards;
CardHandler(Core hovud) {
cards = new HashMap<>();
for (Colour colour : Colour.values()) {
cards.put(colour, 0);
}
//TODO dette bør vel eigentleg ikkje gjerast her
for (int startkortPosisjon = 0; startkortPosisjon < Konstantar.ANTAL_STARTKORT; startkortPosisjon++) {
Colour trekt = hovud.getTable().getRandomCardFromTheDeck();
cards.put(trekt, cards.get(trekt) + 1); //todo denne feilar som berre pokker..hmm
}
}
public void receiveCard(Colour colour) {
cards.put(colour, cards.get(colour) + 1);
}
public int getNumberOfCardsLeftInColour(Colour colour) {
return cards.get(colour);
}
public void useCards(Colour colour, int number) {
cards.put(colour, cards.get(colour) - number);
}
}
|
[
"devnull@localhost"
] |
devnull@localhost
|
704de64498a8d72f14d034d31835f94f23c5511c
|
b0cefaa18959d4c17a3d88f8f44b3297627ac78d
|
/liquibase-core/src/main/java/liquibase/command/CommandResult.java
|
b976ce777c3d655b1a49425b5f92b4d88189d4dd
|
[
"Apache-2.0"
] |
permissive
|
Datical/liquibase
|
bdde50c7c82d1465c12d728f896d4280d0f532b7
|
2e8e88ab2a6abd250c1a362ec5b8120e9b008cb9
|
refs/heads/ddb
| 2023-08-31T18:13:54.866085
| 2023-08-29T23:10:31
| 2023-08-29T23:10:31
| 21,618,872
| 6
| 4
|
Apache-2.0
| 2023-09-14T21:55:24
| 2014-07-08T15:46:09
|
Java
|
UTF-8
|
Java
| false
| false
| 1,120
|
java
|
package liquibase.command;
import liquibase.exception.LiquibaseException;
/**
* Holds results of a {@link LiquibaseCommand} execution, including a message and whether the command succeeded or not.
*/
public class CommandResult {
public String message;
public boolean succeeded;
/**
* Creates new CommandResult with succeeded=true and message="Successful"
*/
public CommandResult() {
this.message = "Successful";
this.succeeded = true;
}
/**
* Creates new CommandResult with the given message and succeeded=true
*/
public CommandResult(String message) {
this.message = message;
this.succeeded = true;
}
public CommandResult(String message, boolean succeeded) {
this.message = message;
this.succeeded = succeeded;
}
/**
* Return a string version of the result.
* Default implementation returns {@link #message} but subclasses can return string versions of stored objects like Snapshots etc.
*/
public String print() throws LiquibaseException {
return this.message;
}
}
|
[
"nathan@voxland.net"
] |
nathan@voxland.net
|
e3dbc759be4841015cded8165d272fcf2ebffa1b
|
81c4910a6784b3f0b512d972054d33cca75a7cd6
|
/src/main/java/com/guohuai/ams/duration/fact/income/IncomeDistributionResp.java
|
c2a9ff795a138fa405407e610b894f5988266a26
|
[] |
no_license
|
songpanyong/m-boot
|
0eeef760b87ede204b5d891fd7090315248a0fce
|
21717db7488daf6bd3f341b677e0424c9fe70b7a
|
refs/heads/master
| 2020-03-10T04:46:55.738802
| 2018-04-12T05:51:13
| 2018-04-12T05:51:13
| 129,201,268
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,810
|
java
|
package com.guohuai.ams.duration.fact.income;
import com.guohuai.ams.portfolio.entity.PortfolioEntity;
import com.guohuai.ams.product.Product;
import com.guohuai.ams.product.ProductDecimalFormat;
import com.guohuai.basic.component.ext.web.BaseResp;
import com.guohuai.component.util.DateUtil;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = false)
public class IncomeDistributionResp extends BaseResp {
public IncomeDistributionResp(IncomeAllocate incomeAllocate) {
this.oid = incomeAllocate.getOid();//收益分配表的oid
PortfolioEntity portfolio = incomeAllocate.getIncomeEvent().getPortfolio();
if (portfolio != null) {
this.assetpoolOid = portfolio.getOid();
this.assetPoolName = portfolio.getName();
}
Product product = incomeAllocate.getProduct();
if (product != null) {
this.productOid = product.getOid();
this.productName = product.getName();
}
this.baseDate = DateUtil.formatDate(incomeAllocate.getBaseDate().getTime()); // 基准日
this.totalAllocateIncome = ProductDecimalFormat.format(incomeAllocate.getIncomeEvent().getAllocateIncome(), "0.##");//总分配收益
this.capital = ProductDecimalFormat.format(incomeAllocate.getCapital(), "0.##");//产品总规模
this.allocateIncome = ProductDecimalFormat.format(incomeAllocate.getAllocateIncome(), "0.##");//分配收益
this.rewardIncome = ProductDecimalFormat.format(incomeAllocate.getRewardIncome(), "0.##");//奖励收益
this.ratio = ProductDecimalFormat.format(ProductDecimalFormat.multiply(incomeAllocate.getRatio()), "0.##");//收益率
this.successAllocateIncome = incomeAllocate.getSuccessAllocateIncome() != null ? ProductDecimalFormat.format(incomeAllocate.getSuccessAllocateIncome(), "0.##") : "";//成功分配收益
this.successAllocateRewardIncome = incomeAllocate.getSuccessAllocateRewardIncome() != null ? ProductDecimalFormat.format(incomeAllocate.getSuccessAllocateRewardIncome(), "0.##") : "";//成功分配奖励收益金额
this.leftAllocateIncome = incomeAllocate.getLeftAllocateIncome() != null ? ProductDecimalFormat.format(incomeAllocate.getLeftAllocateIncome(), "0.##") : "";//剩余分配收益
this.successAllocateInvestors = incomeAllocate.getSuccessAllocateInvestors() != null ? incomeAllocate.getSuccessAllocateInvestors().toString() : "";//成功分配投资者数
this.failAllocateInvestors = incomeAllocate.getFailAllocateInvestors() != null ? incomeAllocate.getFailAllocateInvestors().toString() : "";//失败分配投资者数
this.creator = incomeAllocate.getIncomeEvent().getCreator();// 申请人
this.createTime = DateUtil.formatDatetime(incomeAllocate.getIncomeEvent().getCreateTime().getTime()); // 申请时间
this.auditor = incomeAllocate.getIncomeEvent().getAuditor(); // 审批人
this.auditTime = incomeAllocate.getIncomeEvent().getAuditTime() != null ? DateUtil.formatDatetime(incomeAllocate.getIncomeEvent().getAuditTime().getTime()) : ""; // 审批时间
this.status = incomeAllocate.getIncomeEvent().getStatus();// 状态 (待审核: CREATE;通过: PASS;驳回: FAIL;已删除: DELETE)
this.allocateIncomeType = incomeAllocate.getAllocateIncomeType();
this.couponIncome = ProductDecimalFormat.format(incomeAllocate.getCouponIncome(), "0.##");//加息收益
this.successAllocateCouponIncome = incomeAllocate.getSuccessAllocateCouponIncome() != null ? ProductDecimalFormat.format(incomeAllocate.getSuccessAllocateCouponIncome(), "0.##") : "";//成功分配加息收益金额
}
private String oid;//收益分配表的oid
private String assetpoolOid;
private String assetPoolName;
private String productOid;
private String productName;
private String baseDate; // 基准日
private String totalAllocateIncome;//总分配收益
private String capital;//产品总规模
private String allocateIncome;//分配收益
private String rewardIncome;//奖励收益
private String ratio;//收益率
private String creator;// 申请人
private String createTime; // 申请时间
private String auditor; // 审批人
private String auditTime; // 审批时间
private String status;// 状态 (待审核: CREATE;通过: PASS;驳回: FAIL;已删除: DELETE)
private String successAllocateIncome;//成功分配收益
private String successAllocateRewardIncome;//成功分配奖励收益金额
private String leftAllocateIncome;//剩余收益
private String successAllocateInvestors;//成功分配投资者数
private String failAllocateInvestors;//失败分配投资者数
private String allocateIncomeType;
private String couponIncome;//加息收益
private String successAllocateCouponIncome;//成功分配加息收益金额
}
|
[
"songpanyong@163.com"
] |
songpanyong@163.com
|
58a8796acae4f09310cc46a78801fc0367ff4c64
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/IntroClassJava/dataset/median/9083480332b4a5e4274f3bf5ef8bd5d1bd75048c0c066e574c27a2de6d919d658efc519e8b6a230a074eb5f2957d5768f4dc981a8e926c3a72993bc448a017f7/015/mutations/179/median_90834803_015.java
|
acce80d30f2dd296abf8c37c6e56fb06b38667a5
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,495
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class median_90834803_015 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
median_90834803_015 mainClass = new median_90834803_015 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj a = new IntObj (), b = new IntObj (), c = new IntObj (), median =
new IntObj ();
if (true) return ;
output +=
(String.format ("Please enter 3 numbers separated by spaces > "));
a.value = scanner.nextInt ();
b.value = scanner.nextInt ();
c.value = scanner.nextInt ();
if ((b.value >= a.value && a.value >= c.value)
|| (c.value <= a.value && a.value <= b.value) || (a.value < b.value
&& a.value <
c.value)) {
output += (String.format ("%d is the median\n", a.value));
} else if ((a.value >= b.value && b.value >= c.value)
|| (a.value <= b.value && b.value <= c.value)
|| (b.value < c.value && b.value < a.value)) {
output += (String.format ("%d is the median\n", b.value));
} else if ((a.value >= c.value && c.value >= b.value)
|| (a.value <= c.value && c.value <= b.value)
|| (c.value < a.value && c.value < b.value)) {
output += (String.format ("%d is the median\n", c.value));
} else {
if (true)
return;;
}
if (true)
return;;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
f437fba4e6a659d493bc3a1e2a194428f11c60b0
|
443928d406ef51efd35020de050decd8151dae9b
|
/asnlab-uper/src/main/java/com/hisense/hiatmp/asn/v2x/MapLink/MapLink.java
|
2e8c3da6875f86d11f423ca68de43aa49b75c01e
|
[
"Apache-2.0"
] |
permissive
|
zyjohn0822/asn1-uper-v2x-se
|
ad430889ca9f3d42f2c083810df2a5bc7b18ec22
|
85f9bf98a12a57a04260282a9154f1b988de8dec
|
refs/heads/master
| 2023-04-21T11:44:34.222501
| 2021-05-08T08:23:27
| 2021-05-08T08:23:27
| 365,459,042
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,212
|
java
|
/*
* Generated by ASN.1 Java Compiler (https://www.asnlab.org/)
* From ASN.1 module "MapLink"
*/
package com.hisense.hiatmp.asn.v2x.MapLink;
import org.asnlab.asndt.runtime.conv.AsnConverter;
import org.asnlab.asndt.runtime.type.AsnModule;
import org.asnlab.asndt.runtime.type.AsnType;
import java.util.Vector;
public class MapLink extends AsnModule {
public final static MapLink instance = new MapLink();
/**
* /* Creates the ASN.1 module.
* /* The ASN.1 module instance is created automatically, clients must not call.
* /* A metadata file named MapLink.meta must exist in the same package of this class.
**/
private MapLink() {
super(MapLink.class);
}
public static AsnType type(int id) {
return instance.getType(id);
}
public static Object value(int valueId, AsnConverter converter) {
return instance.getValue(valueId, converter);
}
public static Object object(int objectId, AsnConverter converter) {
return instance.getObject(objectId, converter);
}
public static Vector objectSet(int objectSetId, AsnConverter converter) {
return instance.getObjectSet(objectSetId, converter);
}
}
|
[
"31430762+zyjohn0822@users.noreply.github.com"
] |
31430762+zyjohn0822@users.noreply.github.com
|
c8e3ff52b564d7dadb5da97a3e8c0d2ba83423cc
|
0f909f99aa229aa9d0e49665af7bc51cc2403f65
|
/src/generated/java/cdm/product/common/settlement/validation/choicerule/CashSettlementTermsCashSettlementTermsChoice.java
|
1c002668c94a935163a5b755e180caaea8c1901c
|
[] |
no_license
|
Xuanling-Chen/cdm-source-ext
|
8c93bc824e8c01255dfc06456bd6ec1fb3115649
|
e4cf7d5e549e514760cbd1e2d6789af171e5ea41
|
refs/heads/master
| 2023-07-11T20:35:26.485723
| 2021-08-29T04:12:00
| 2021-08-29T04:12:00
| 400,947,430
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,946
|
java
|
package cdm.product.common.settlement.validation.choicerule;
import cdm.product.common.settlement.CashSettlementTerms;
import com.rosetta.model.lib.annotations.RosettaChoiceRule;
import com.rosetta.model.lib.path.RosettaPath;
import com.rosetta.model.lib.validation.ValidationResult;
import com.rosetta.model.lib.validation.ValidationResult.ChoiceRuleFailure;
import com.rosetta.model.lib.validation.ValidationResult.ChoiceRuleValidationMethod;
import com.rosetta.model.lib.validation.ValidationResult.ValidationType;
import com.rosetta.model.lib.validation.Validator;
import java.util.LinkedList;
import java.util.List;
import static com.rosetta.model.lib.validation.ExistenceChecker.isSet;
import static com.rosetta.model.lib.validation.ValidationResult.success;
import static java.util.Arrays.asList;
/**
* @version ${project.version}
*/
@RosettaChoiceRule("CashSettlementTermsCashSettlementTermsChoice")
public class CashSettlementTermsCashSettlementTermsChoice implements Validator<CashSettlementTerms> {
private static final String NAME = "CashSettlementTermsCashSettlementTermsChoice";
@Override
public ValidationResult<CashSettlementTerms> validate(RosettaPath path, CashSettlementTerms object) {
List<String> choiceFieldNames = asList("cashSettlementAmount", "recoveryFactor");
List<String> populatedFieldNames = new LinkedList<>();
if (isSet(object.getCashSettlementAmount())) populatedFieldNames.add("cashSettlementAmount");
if (isSet(object.getRecoveryFactor())) populatedFieldNames.add("recoveryFactor");
ChoiceRuleValidationMethod validationMethod = ChoiceRuleValidationMethod.OPTIONAL;
if (validationMethod.check(populatedFieldNames.size())) {
return success(NAME, ValidationType.CHOICE_RULE, "CashSettlementTerms", path, "");
}
return new ValidationResult.ChoiceRuleFailure<CashSettlementTerms>(NAME, "CashSettlementTerms", choiceFieldNames, path, populatedFieldNames, validationMethod);
}
}
|
[
"xuanling_chen@epam.com"
] |
xuanling_chen@epam.com
|
342adfa7f9c54ea55da636d7580cf0c38e7891ad
|
0121956326014e2eeeeb6867ab95c37cae41fd71
|
/genspace-common/src/org/geworkbench/components/genspace/server/stubs/GetMostPopularPreviousToolResponse.java
|
ead49ca78e97ae3945cd713f61d1869882dab6f3
|
[] |
no_license
|
Programming-Systems-Lab/archived-genspace
|
23e81cb2f3e7d787fa0d943aea6fa57ac6eb7d98
|
b5d0e70c1764287b174c6725cff310a5c5637d8e
|
refs/heads/master
| 2020-12-25T14:34:16.397727
| 2012-05-16T16:19:13
| 2012-05-16T16:19:13
| 67,139,862
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,536
|
java
|
package org.geworkbench.components.genspace.server.stubs;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for getMostPopularPreviousToolResponse complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="getMostPopularPreviousToolResponse">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="return" type="{http://server.genspace.components.geworkbench.org/}tool" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "getMostPopularPreviousToolResponse", propOrder = {
"_return"
})
public class GetMostPopularPreviousToolResponse {
@XmlElement(name = "return")
protected Tool _return;
/**
* Gets the value of the return property.
*
* @return
* possible object is
* {@link Tool }
*
*/
public Tool getReturn() {
return _return;
}
/**
* Sets the value of the return property.
*
* @param value
* allowed object is
* {@link Tool }
*
*/
public void setReturn(Tool value) {
this._return = value;
}
}
|
[
"jbell@cs.columbia.edu"
] |
jbell@cs.columbia.edu
|
160c983c330ddb24af53146974073847b82a681b
|
e2e885690ed46b121dc6db6f619138e8dc0831e6
|
/bitcamp-java-application2-server/v32_8/src/main/java/com/eomcs/lms/RequestException.java
|
ba02def89bf371abb6d3decdc36bde3b061821f4
|
[] |
no_license
|
sinnim7/bitcamp-java-20190527
|
d040b79621b391c7df673d16928a1ababecd4368
|
080590837ff8f1b7d632190a9959117b727d7cf2
|
refs/heads/master
| 2020-06-13T20:21:13.365036
| 2019-10-24T09:05:39
| 2019-10-24T09:05:39
| 194,775,342
| 0
| 0
| null | 2020-04-30T16:15:25
| 2019-07-02T02:41:02
|
Java
|
UTF-8
|
Java
| false
| false
| 683
|
java
|
package com.eomcs.lms;
// 서버에서 요청 처리를 실패했을 때 발생시키는 예외.
public class RequestException extends RuntimeException {
private static final long serialVersionUID = 1L;
public RequestException() {
super();
}
public RequestException(String message, Throwable cause, boolean enableSuppression,
boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
public RequestException(String message, Throwable cause) {
super(message, cause);
}
public RequestException(String message) {
super(message);
}
public RequestException(Throwable cause) {
super(cause);
}
}
|
[
"sinnim7@gmail.com"
] |
sinnim7@gmail.com
|
2ae172e1c956bb6d0a47934fd5852ef69714b466
|
471f967ff56236e74f00a89149f7b38b55eb66bf
|
/all-tests/src/test/java/foo/Test031.java
|
4980345d1b10f20fe53a2f30881603a4fd7384b3
|
[] |
no_license
|
uklance/gradle-cacheable-jacoco
|
3997632964a90cc96b4003465c3dbf9dc4973b70
|
2f9cfa5766c1e6c06cb018c1050df6bbc6414cad
|
refs/heads/master
| 2020-04-11T07:44:18.581207
| 2018-12-13T16:43:29
| 2018-12-13T16:43:29
| 161,620,727
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 230
|
java
|
package foo;
import org.junit.*;
import static org.junit.Assert.*;
public class Test031 {
@Test
public void doTest031() throws Exception {
Thread.sleep(200);
int result = Util031.doStuff();
assertEquals(31, result);
}
}
|
[
"uklance@gmail.com"
] |
uklance@gmail.com
|
4b044e76e926798c47606533134c9deb50b606c9
|
d97b482213c831feb753f8dff0dd6402191771d6
|
/minimark/src/main/java/com/benfante/minimark/po/Course.java
|
bae6076d73420b2de5eaabe085cfafa288bf73d9
|
[
"Apache-2.0"
] |
permissive
|
minimarkers/minimark
|
1f6a26e0cee18b6f87a5282a2fc0b42f89551460
|
f988cb2b8896cdda8ce311fb31e682821ebaa23d
|
refs/heads/master
| 2020-12-24T21:21:56.576978
| 2017-06-17T06:19:14
| 2017-06-17T06:19:14
| 58,565,917
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,905
|
java
|
/**
* Copyright (C) 2009 Lucio Benfante <lucio.benfante@gmail.com>
*
* This file is part of minimark Web Application.
*
* 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.benfante.minimark.po;
import java.util.LinkedList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import org.hibernate.annotations.Cascade;
import org.parancoe.persistence.po.hibernate.EntityBase;
import org.springmodules.validation.bean.conf.loader.annotation.handler.MaxLength;
import org.springmodules.validation.bean.conf.loader.annotation.handler.NotBlank;
/**
* The course of a teacher
*
* @author lucio
*/
@Entity
@NamedQueries({
@NamedQuery(name="Course.findByTeacherUsername", query="select ct.course from CourseTeacher ct where ct.userProfile.user.username = ?")
})
public class Course extends EntityBase {
private List<Assessment> assessments;
private List<Question> questions;
@NotBlank
@MaxLength(255)
private String name;
@NotBlank
@MaxLength(1024)
private String description;
private String incumbent;
private String mainGroup;
private String secondaryGroup;
private List<CourseTeacher> courseTeachers = new LinkedList<CourseTeacher>();
@Column(length=1024)
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@OneToMany(mappedBy = "course", cascade=CascadeType.ALL)
public List<CourseTeacher> getCourseTeachers() {
return courseTeachers;
}
public void setCourseTeachers(List<CourseTeacher> courseTeachers) {
this.courseTeachers = courseTeachers;
}
@OneToMany(mappedBy = "course", cascade=CascadeType.ALL)
@Cascade(org.hibernate.annotations.CascadeType.DELETE_ORPHAN)
public List<Question> getQuestions() {
return questions;
}
public void setQuestions(List<Question> questions) {
this.questions = questions;
}
public String getMainGroup() {
return mainGroup;
}
public void setMainGroup(String mainGroup) {
this.mainGroup = mainGroup;
}
public String getSecondaryGroup() {
return secondaryGroup;
}
public void setSecondaryGroup(String secondaryGroup) {
this.secondaryGroup = secondaryGroup;
}
@OneToMany(mappedBy = "course")
public List<Assessment> getAssessments() {
return assessments;
}
public void setAssessments(List<Assessment> assessments) {
this.assessments = assessments;
}
public String getIncumbent() {
return incumbent;
}
public void setIncumbent(String incumbent) {
this.incumbent = incumbent;
}
/**
* Add a teacher to this course.
*
* @param teacher The user profile of the teacher
*/
public void addTeacher(UserProfile teacher) {
CourseTeacher courseTeacher = new CourseTeacher();
courseTeacher.setCourse(this);
courseTeacher.setUserProfile(teacher);
this.courseTeachers.add(courseTeacher);
}
}
|
[
"devnull@localhost"
] |
devnull@localhost
|
a58329d0c518b3ed94c9561ba20caaecaa4bd231
|
80d3202e3a418f21ef3e464d62e90a0777ed1151
|
/app/src/main/java/com/example/com/myapplication/fragment/SimpleFragment.java
|
6f9f410ec19fbe4cc858d990f82c49a66d54d9cd
|
[] |
no_license
|
GitHub-Xzhi/DemoLoadView
|
c64f59e00dcefd2f91a4ea644ddf2afda0c9779d
|
41cabafa04c3389cab4e2b84bdb5de7f6a99a629
|
refs/heads/master
| 2021-01-19T18:43:28.378997
| 2017-08-16T10:29:43
| 2017-08-16T10:29:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,768
|
java
|
package com.example.com.myapplication.fragment;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import com.example.com.myapplication.Example1Activity;
import com.example.com.myapplication.R;
import com.helper.loadviewhelper.help.OnLoadViewListener;
import com.helper.loadviewhelper.load.LoadViewHelper;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
public class SimpleFragment extends Fragment {
LoadViewHelper helper;
int type;
private ListView listView;
private LoadDataTask task;
private ArrayAdapter<String> adapter;
private List<String> data = new ArrayList<>();
Random rand;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_layot, container, false);
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
listView = (ListView) view.findViewById(R.id.listView1);
helper = new LoadViewHelper(listView);
listView.setAdapter(adapter = new ArrayAdapter<>(getActivity(), android.R.layout.simple_list_item_1, data));
helper.showLoading();
rand = new Random();
type = rand.nextInt(3);
helper.setLoadEmpty(R.layout.this_empty);
helper.setLoadError(R.layout.this_error);
helper.setListener(new OnLoadViewListener() {
@Override
public void onRetryClick() {
type = rand.nextInt(3);
task = new SimpleFragment.LoadDataTask();
task.execute();
}
});
task = new SimpleFragment.LoadDataTask();
task.execute();
}
private class LoadDataTask extends AsyncTask<Void, Void, List<String>> {
public LoadDataTask() {
super();
}
@Override
protected void onPreExecute() {
super.onPreExecute();
helper.showLoading("加载中...");
}
@Override
protected List<String> doInBackground(Void... params) {
try {
// 模拟2秒到5秒的等待时间
Thread.sleep((new Random().nextInt(10) + 20) * 100);
} catch (InterruptedException e) {
e.printStackTrace();
}
if (type == 1) {
return null;
} else if (type == 2) {
return new ArrayList<String>(0);
}
List<String> strings = new ArrayList<String>();
for (int i = 0; i < 20; i++) {
strings.add("数据" + i);
}
return strings;
}
@Override
protected void onPostExecute(List<String> result) {
if (isCancelled()){
return;
}
super.onPostExecute(result);
if (result == null) {
helper.showError();
} else if (result.isEmpty()) {
helper.showEmpty();
} else {
data.clear();
data.addAll(result);
helper.showContent();
adapter.notifyDataSetChanged();
}
}
}
@Override
public void onDestroy() {
super.onDestroy();
task.cancel(true);
helper.onDestroy();
}
}
|
[
"www.1007181167@qq.com"
] |
www.1007181167@qq.com
|
d525c664158c0f708ebd0a7e96fbdd21c9312f66
|
a00326c0e2fc8944112589cd2ad638b278f058b9
|
/src/main/java/000/147/275/CWE89_SQL_Injection__getParameter_Servlet_executeBatch_53b.java
|
75c4bfc068bd3f4e77349d1e222b058919dd679d
|
[] |
no_license
|
Lanhbao/Static-Testing-for-Juliet-Test-Suite
|
6fd3f62713be7a084260eafa9ab221b1b9833be6
|
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
|
refs/heads/master
| 2020-08-24T13:34:04.004149
| 2019-10-25T09:26:00
| 2019-10-25T09:26:00
| 216,822,684
| 0
| 1
| null | 2019-11-08T09:51:54
| 2019-10-22T13:37:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,685
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE89_SQL_Injection__getParameter_Servlet_executeBatch_53b.java
Label Definition File: CWE89_SQL_Injection.label.xml
Template File: sources-sinks-53b.tmpl.java
*/
/*
* @description
* CWE: 89 SQL Injection
* BadSource: getParameter_Servlet Read data from a querystring using getParameter()
* GoodSource: A hardcoded string
* Sinks: executeBatch
* GoodSink: Use prepared statement and executeBatch (properly)
* BadSink : data concatenated into SQL statement used in executeBatch(), which could result in SQL Injection
* Flow Variant: 53 Data flow: data passed as an argument from one method through two others to a fourth; all four functions are in different classes in the same package
*
* */
import javax.servlet.http.*;
public class CWE89_SQL_Injection__getParameter_Servlet_executeBatch_53b
{
public void badSink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE89_SQL_Injection__getParameter_Servlet_executeBatch_53c()).badSink(data , request, response);
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE89_SQL_Injection__getParameter_Servlet_executeBatch_53c()).goodG2BSink(data , request, response);
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE89_SQL_Injection__getParameter_Servlet_executeBatch_53c()).goodB2GSink(data , request, response);
}
}
|
[
"anhtluet12@gmail.com"
] |
anhtluet12@gmail.com
|
f3f673bc6b1fda6337d3e76a6f433b7d0cc7e5f9
|
9e1d39731775da04c383a05312622be7ce7be1be
|
/src/main/java/com/qdhualing/qrcodetracker/bean/BigCpOutGetDataParam.java
|
0a58e7c2c724aed28402db78e9ef091eb4a0bbcd
|
[] |
no_license
|
qdhualingkeji/QrcodeTrackerWeb
|
dbd86161cc89b173cb463f7294129123965a1b62
|
4078b177edfbff6ad7933fe686d04280b93d50b8
|
refs/heads/master
| 2022-12-23T07:32:44.627421
| 2019-10-25T06:32:59
| 2019-10-25T06:32:59
| 141,079,919
| 0
| 0
| null | 2022-12-16T05:13:13
| 2018-07-16T03:03:43
|
Java
|
UTF-8
|
Java
| false
| false
| 365
|
java
|
package com.qdhualing.qrcodetracker.bean;
/**
* @author 马鹏昊
* @date {date}
* @des
* @updateAuthor
* @updateDate
* @updateDes
*/
public class BigCpOutGetDataParam {
private String qrCodeId;
public String getQrCodeId() {
return qrCodeId;
}
public void setQrCodeId(String qrCodeId) {
this.qrCodeId = qrCodeId;
}
}
|
[
"1417140290@qq.com"
] |
1417140290@qq.com
|
b448301c97228d3a37ef51235c56fe5e1de37cf0
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/multimediaai-20190810/src/main/java/com/aliyun/multimediaai20190810/models/ProcessOcrAlgorithmRequest.java
|
04abe22592763d20dbe211bfbb20c4c676f77e00
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 882
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.multimediaai20190810.models;
import com.aliyun.tea.*;
public class ProcessOcrAlgorithmRequest extends TeaModel {
@NameInMap("AppKey")
public String appKey;
@NameInMap("Data")
public String data;
public static ProcessOcrAlgorithmRequest build(java.util.Map<String, ?> map) throws Exception {
ProcessOcrAlgorithmRequest self = new ProcessOcrAlgorithmRequest();
return TeaModel.build(map, self);
}
public ProcessOcrAlgorithmRequest setAppKey(String appKey) {
this.appKey = appKey;
return this;
}
public String getAppKey() {
return this.appKey;
}
public ProcessOcrAlgorithmRequest setData(String data) {
this.data = data;
return this;
}
public String getData() {
return this.data;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
8c07fa872918a70639ac9cfd5b9ee28597b0920f
|
9254e7279570ac8ef687c416a79bb472146e9b35
|
/ecd-20200930/src/main/java/com/aliyun/ecd20200930/models/ClonePolicyGroupRequest.java
|
913aa581d71268b631bedcf9d7fb4e7c6cfddf8e
|
[
"Apache-2.0"
] |
permissive
|
lquterqtd/alibabacloud-java-sdk
|
3eaa17276dd28004dae6f87e763e13eb90c30032
|
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
|
refs/heads/master
| 2023-08-12T13:56:26.379027
| 2021-10-19T07:22:15
| 2021-10-19T07:22:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,165
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.ecd20200930.models;
import com.aliyun.tea.*;
public class ClonePolicyGroupRequest extends TeaModel {
@NameInMap("RegionId")
public String regionId;
@NameInMap("PolicyGroupId")
public String policyGroupId;
@NameInMap("Name")
public String name;
public static ClonePolicyGroupRequest build(java.util.Map<String, ?> map) throws Exception {
ClonePolicyGroupRequest self = new ClonePolicyGroupRequest();
return TeaModel.build(map, self);
}
public ClonePolicyGroupRequest setRegionId(String regionId) {
this.regionId = regionId;
return this;
}
public String getRegionId() {
return this.regionId;
}
public ClonePolicyGroupRequest setPolicyGroupId(String policyGroupId) {
this.policyGroupId = policyGroupId;
return this;
}
public String getPolicyGroupId() {
return this.policyGroupId;
}
public ClonePolicyGroupRequest setName(String name) {
this.name = name;
return this;
}
public String getName() {
return this.name;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
cc982775d5f094e91a18875b9d0a6cae29fa85a0
|
cfe621e8c36e6ac5053a2c4f7129a13ea9f9f66b
|
/AndroidApplications/com.zeptolab.ctr.ads-912244/src/com/google/android/gms/internal/bh.java
|
be701f860517af8984371dcaae5f1ea82b084065
|
[] |
no_license
|
linux86/AndoirdSecurity
|
3165de73b37f53070cd6b435e180a2cb58d6f672
|
1e72a3c1f7a72ea9cd12048d9874a8651e0aede7
|
refs/heads/master
| 2021-01-11T01:20:58.986651
| 2016-04-05T17:14:26
| 2016-04-05T17:14:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,585
|
java
|
package com.google.android.gms.internal;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import com.zeptolab.ctr.billing.google.utils.IabHelper;
import com.zeptolab.ctr.scorer.GoogleScorer;
public interface bh extends IInterface {
public static abstract class a extends Binder implements bh {
private static class a implements bh {
private IBinder ky;
a(IBinder iBinder) {
this.ky = iBinder;
}
public void O() {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
obtain.writeInterfaceToken("com.google.android.gms.ads.internal.mediation.client.IMediationAdapterListener");
this.ky.transact(1, obtain, obtain2, 0);
obtain2.readException();
obtain2.recycle();
obtain.recycle();
}
public IBinder asBinder() {
return this.ky;
}
public void onAdClosed() {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
obtain.writeInterfaceToken("com.google.android.gms.ads.internal.mediation.client.IMediationAdapterListener");
this.ky.transact(GoogleScorer.CLIENT_PLUS, obtain, obtain2, 0);
obtain2.readException();
obtain2.recycle();
obtain.recycle();
}
public void onAdFailedToLoad(int i) {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
obtain.writeInterfaceToken("com.google.android.gms.ads.internal.mediation.client.IMediationAdapterListener");
obtain.writeInt(i);
this.ky.transact(IabHelper.BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE, obtain, obtain2, 0);
obtain2.readException();
obtain2.recycle();
obtain.recycle();
}
public void onAdLeftApplication() {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
obtain.writeInterfaceToken("com.google.android.gms.ads.internal.mediation.client.IMediationAdapterListener");
this.ky.transact(GoogleScorer.CLIENT_APPSTATE, obtain, obtain2, 0);
obtain2.readException();
obtain2.recycle();
obtain.recycle();
}
public void onAdLoaded() {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
obtain.writeInterfaceToken("com.google.android.gms.ads.internal.mediation.client.IMediationAdapterListener");
this.ky.transact(IabHelper.BILLING_RESPONSE_RESULT_ERROR, obtain, obtain2, 0);
obtain2.readException();
obtain2.recycle();
obtain.recycle();
}
public void onAdOpened() {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
obtain.writeInterfaceToken("com.google.android.gms.ads.internal.mediation.client.IMediationAdapterListener");
this.ky.transact(IabHelper.BILLING_RESPONSE_RESULT_DEVELOPER_ERROR, obtain, obtain2, 0);
obtain2.readException();
obtain2.recycle();
obtain.recycle();
}
}
public a() {
attachInterface(this, "com.google.android.gms.ads.internal.mediation.client.IMediationAdapterListener");
}
public static bh k(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.ads.internal.mediation.client.IMediationAdapterListener");
return (queryLocalInterface == null || !(queryLocalInterface instanceof bh)) ? new a(iBinder) : (bh) queryLocalInterface;
}
public IBinder asBinder() {
return this;
}
public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) {
switch (i) {
case GoogleScorer.CLIENT_GAMES:
parcel.enforceInterface("com.google.android.gms.ads.internal.mediation.client.IMediationAdapterListener");
O();
parcel2.writeNoException();
return true;
case GoogleScorer.CLIENT_PLUS:
parcel.enforceInterface("com.google.android.gms.ads.internal.mediation.client.IMediationAdapterListener");
onAdClosed();
parcel2.writeNoException();
return true;
case IabHelper.BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE:
parcel.enforceInterface("com.google.android.gms.ads.internal.mediation.client.IMediationAdapterListener");
onAdFailedToLoad(parcel.readInt());
parcel2.writeNoException();
return true;
case GoogleScorer.CLIENT_APPSTATE:
parcel.enforceInterface("com.google.android.gms.ads.internal.mediation.client.IMediationAdapterListener");
onAdLeftApplication();
parcel2.writeNoException();
return true;
case IabHelper.BILLING_RESPONSE_RESULT_DEVELOPER_ERROR:
parcel.enforceInterface("com.google.android.gms.ads.internal.mediation.client.IMediationAdapterListener");
onAdOpened();
parcel2.writeNoException();
return true;
case IabHelper.BILLING_RESPONSE_RESULT_ERROR:
parcel.enforceInterface("com.google.android.gms.ads.internal.mediation.client.IMediationAdapterListener");
onAdLoaded();
parcel2.writeNoException();
return true;
case 1598968902:
parcel2.writeString("com.google.android.gms.ads.internal.mediation.client.IMediationAdapterListener");
return true;
default:
return super.onTransact(i, parcel, parcel2, i2);
}
}
}
void O();
void onAdClosed();
void onAdFailedToLoad(int i);
void onAdLeftApplication();
void onAdLoaded();
void onAdOpened();
}
|
[
"jack.luo@mail.utoronto.ca"
] |
jack.luo@mail.utoronto.ca
|
64fa805eca8d00302da8b2b6470593b4a0e21a65
|
ac1c9fbc1f1019efb19d0a8f3a088e8889f1e83c
|
/out/release/gen/third_party/blink/public/mojom/mojom_core_java/generated_java/input_srcjars/org/chromium/blink/mojom/PortalClient.java
|
d909fa33262672f8a9f31021268bf465c4f0e107
|
[
"BSD-3-Clause"
] |
permissive
|
xueqiya/chromium_src
|
5d20b4d3a2a0251c063a7fb9952195cda6d29e34
|
d4aa7a8f0e07cfaa448fcad8c12b29242a615103
|
refs/heads/main
| 2022-07-30T03:15:14.818330
| 2021-01-16T16:47:22
| 2021-01-16T16:47:22
| 330,115,551
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 931
|
java
|
// PortalClient.java is auto generated by mojom_bindings_generator.py, do not edit
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file is autogenerated by:
// mojo/public/tools/bindings/mojom_bindings_generator.py
// For:
// third_party/blink/public/mojom/portal/portal.mojom
//
package org.chromium.blink.mojom;
public interface PortalClient extends org.chromium.mojo.bindings.Interface {
public interface Proxy extends PortalClient, org.chromium.mojo.bindings.Interface.Proxy {
}
Manager<PortalClient, PortalClient.Proxy> MANAGER = PortalClient_Internal.MANAGER;
void forwardMessageFromGuest(
TransferableMessage message, org.chromium.url.internal.mojom.Origin sourceOrigin, org.chromium.url.internal.mojom.Origin targetOrigin);
void dispatchLoadEvent(
);
}
|
[
"xueqi@zjmedia.net"
] |
xueqi@zjmedia.net
|
e2bd1b94aa41b56e79770ee2d8f34aad99d06028
|
83e81c25b1f74f88ed0f723afc5d3f83e7d05da8
|
/media/mca/filterfw/java/android/filterfw/format/ImageFormat.java
|
3ca964ed3bff65e84a296169504248f5b6714f6a
|
[
"Apache-2.0",
"LicenseRef-scancode-unicode"
] |
permissive
|
Ankits-lab/frameworks_base
|
8a63f39a79965c87a84e80550926327dcafb40b7
|
150a9240e5a11cd5ebc9bb0832ce30e9c23f376a
|
refs/heads/main
| 2023-02-06T03:57:44.893590
| 2020-11-14T09:13:40
| 2020-11-14T09:13:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,515
|
java
|
/*
* Copyright (C) 2011 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.filterfw.format;
import android.compat.annotation.UnsupportedAppUsage;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.MutableFrameFormat;
import android.graphics.Bitmap;
/**
* @hide
*/
public class ImageFormat {
public static final String COLORSPACE_KEY = "colorspace";
public static final int COLORSPACE_GRAY = 1;
public static final int COLORSPACE_RGB = 2;
public static final int COLORSPACE_RGBA = 3;
public static final int COLORSPACE_YUV = 4;
public static MutableFrameFormat create(int width,
int height,
int colorspace,
int bytesPerSample,
int target) {
MutableFrameFormat result = new MutableFrameFormat(FrameFormat.TYPE_BYTE, target);
result.setDimensions(width, height);
result.setBytesPerSample(bytesPerSample);
result.setMetaValue(COLORSPACE_KEY, colorspace);
if (target == FrameFormat.TARGET_SIMPLE) {
result.setObjectClass(Bitmap.class);
}
return result;
}
@UnsupportedAppUsage
public static MutableFrameFormat create(int width,
int height,
int colorspace,
int target) {
return create(width,
height,
colorspace,
bytesPerSampleForColorspace(colorspace),
target);
}
@UnsupportedAppUsage
public static MutableFrameFormat create(int colorspace, int target) {
return create(FrameFormat.SIZE_UNSPECIFIED,
FrameFormat.SIZE_UNSPECIFIED,
colorspace,
bytesPerSampleForColorspace(colorspace),
target);
}
@UnsupportedAppUsage
public static MutableFrameFormat create(int colorspace) {
return create(FrameFormat.SIZE_UNSPECIFIED,
FrameFormat.SIZE_UNSPECIFIED,
colorspace,
bytesPerSampleForColorspace(colorspace),
FrameFormat.TARGET_UNSPECIFIED);
}
public static int bytesPerSampleForColorspace(int colorspace) {
switch (colorspace) {
case COLORSPACE_GRAY:
return 1;
case COLORSPACE_RGB:
return 3;
case COLORSPACE_RGBA:
return 4;
case COLORSPACE_YUV:
return 3;
default:
throw new RuntimeException("Unknown colorspace id " + colorspace + "!");
}
}
}
|
[
"keneankit01@gmail.com"
] |
keneankit01@gmail.com
|
b30e024cf953b0d6813c89bda25f1a04164694ce
|
04ac638cc2851e216b6edd6578df19ae599f156c
|
/results/Nopol-Test-Runing-Result/lang/53/75/org/apache/commons/lang/time/DateUtils_ESTest.java
|
a5ab396709f126e9278faccc51d5238e00fc5c8f
|
[] |
no_license
|
tdurieux/test4repair-experiments
|
9f719d72de7d67b53b7e7936b21763dbd2dc48d0
|
c90e85a1c3759b4c40f0e8f7468bd8213c729674
|
refs/heads/master
| 2021-01-25T05:10:07.540557
| 2017-06-06T12:25:20
| 2017-06-06T12:25:20
| 93,516,208
| 0
| 0
| null | 2017-06-06T12:32:05
| 2017-06-06T12:32:05
| null |
UTF-8
|
Java
| false
| false
| 884
|
java
|
package org.apache.commons.lang.time;
public class DateUtils_ESTest extends org.apache.commons.lang.time.DateUtils_ESTest_scaffolding {
@org.junit.Test(timeout = 4000)
public void test65() throws java.lang.Throwable {
java.lang.String[] stringArray0 = new java.lang.String[3];
stringArray0[0] = "k?0";
try {
org.apache.commons.lang.time.DateUtils.parseDate("k?0", stringArray0);
org.junit.Assert.fail("Expecting exception: NullPointerException");
} catch (java.lang.NullPointerException e) {
}
}
@org.junit.Test(timeout = 4000)
public void test95() throws java.lang.Throwable {
org.apache.commons.lang.time.DateUtils dateUtils0 = new org.apache.commons.lang.time.DateUtils();
org.junit.Assert.assertEquals(1000L, org.apache.commons.lang.time.DateUtils.MILLIS_PER_SECOND);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
e3d2063eef2f14d0451da9e2dd385d1ec1b198fa
|
0e0d7253c6317d8142f09326b58648fbda73823b
|
/points-server/src/main/java/com/three/points/service/PointsTaskService.java
|
ea34828f6b15364bb1eb1465d9277db951af72f2
|
[] |
no_license
|
csw2994334016/csw-framework
|
3de1059ab8882a29ff8724e117ff988a09b51539
|
8962257af3024787de77e88a0135f3e269156ede
|
refs/heads/master
| 2021-06-23T22:43:37.357366
| 2020-12-03T14:14:13
| 2020-12-03T14:14:13
| 210,158,866
| 0
| 0
| null | 2021-03-31T21:37:30
| 2019-09-22T14:15:33
|
Java
|
UTF-8
|
Java
| false
| false
| 6,375
|
java
|
package com.three.points.service;
import com.three.common.exception.BusinessException;
import com.three.common.exception.ParameterException;
import com.three.points.entity.PointsTask;
import com.three.points.enums.PointsTaskEnum;
import com.three.points.repository.PointsTaskRepository;
import com.three.points.param.PointsTaskParam;
import com.three.common.utils.BeanCopyUtil;
import com.three.common.utils.StringUtil;
import com.three.common.vo.PageQuery;
import com.three.common.vo.PageResult;
import com.three.common.utils.BeanValidator;
import com.three.resource_jpa.jpa.base.service.BaseService;
import com.three.resource_jpa.resource.utils.LoginUserUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.data.domain.Sort;
import javax.persistence.criteria.Predicate;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Set;
/**
* Created by csw on 2019-11-04.
* Description:
*/
@Service
public class PointsTaskService extends BaseService<PointsTask, String> {
@Autowired
private PointsTaskRepository pointsTaskRepository;
@Transactional
public void create(PointsTaskParam pointsTaskParam) {
BeanValidator.check(pointsTaskParam);
if (pointsTaskParam.getDelayNegScore() > 0) {
throw new ParameterException("延期扣分只能是负数");
}
if (pointsTaskParam.getNegScoreMax() > 0) {
throw new ParameterException("扣分上限只能是负数");
}
PointsTask pointsTask = new PointsTask();
pointsTask = (PointsTask) BeanCopyUtil.copyBean(pointsTaskParam, pointsTask);
pointsTask.setDeadline(new Date(pointsTaskParam.getDeadline()));
String firstOrganizationId = LoginUserUtil.getLoginUserFirstOrganizationId();
pointsTask.setOrganizationId(firstOrganizationId);
pointsTask.setCreateId(LoginUserUtil.getLoginUserEmpId());
pointsTask.setCreateName(LoginUserUtil.getLoginUserEmpFullName());
pointsTaskRepository.save(pointsTask);
}
@Transactional
public void update(PointsTaskParam pointsTaskParam) {
BeanValidator.check(pointsTaskParam);
if (pointsTaskParam.getDelayNegScore() > 0) {
throw new ParameterException("延期扣分只能是负数");
}
if (pointsTaskParam.getNegScoreMax() > 0) {
throw new ParameterException("扣分上限只能是负数");
}
PointsTask pointsTask = getEntityById(pointsTaskRepository, pointsTaskParam.getId());
pointsTask = (PointsTask) BeanCopyUtil.copyBean(pointsTaskParam, pointsTask);
pointsTask.setDeadline(new Date(pointsTaskParam.getDeadline()));
pointsTaskRepository.save(pointsTask);
}
@Transactional
public void delete(String ids, int code) {
Set<String> idSet = StringUtil.getStrToIdSet1(ids);
List<PointsTask> pointsTaskList = new ArrayList<>();
for (String id : idSet) {
PointsTask pointsTask = getEntityById(pointsTaskRepository, String.valueOf(id));
pointsTask.setStatus(code);
pointsTaskList.add(pointsTask);
}
pointsTaskRepository.saveAll(pointsTaskList);
}
public PageResult<PointsTask> query(PageQuery pageQuery, int code, String whoFlag, String sortKey, String chargePersonId, String chargePersonName) {
Sort sort = new Sort(Sort.Direction.DESC, "createDate");
if ("deadline".equals(sortKey)) {
sort = new Sort(Sort.Direction.DESC, "deadline");
}
Specification<PointsTask> specification = (root, criteriaQuery, criteriaBuilder) -> {
List<Predicate> predicateList = new ArrayList<>();
Specification<PointsTask> codeAndOrganizationSpec = getCodeAndOrganizationSpec(code, LoginUserUtil.getLoginUserFirstOrganizationId());
predicateList.add(codeAndOrganizationSpec.toPredicate(root, criteriaQuery, criteriaBuilder));
String loginUserEmpId = LoginUserUtil.getLoginUserEmpId();
if (loginUserEmpId != null) {
if ("1".equals(whoFlag)) { // 我参与的
predicateList.add(criteriaBuilder.like(root.get("taskEmpId"), "%" + loginUserEmpId + "%"));
} else if ("2".equals(whoFlag)) { // 我负责的
predicateList.add(criteriaBuilder.equal(root.get("chargePersonId"), loginUserEmpId));
} else if ("3".equals(whoFlag)) { // 抄送给我的
predicateList.add(criteriaBuilder.like(root.get("copyPersonId"), "%" + loginUserEmpId + "%"));
} else if ("4".equals(whoFlag)) { // 我发布的
predicateList.add(criteriaBuilder.equal(root.get("createId"), loginUserEmpId));
}
}
if (StringUtil.isNotBlank(chargePersonId)) {
predicateList.add(criteriaBuilder.equal(root.get("chargePersonId"), chargePersonId));
}
if (StringUtil.isNotBlank(chargePersonName)) {
predicateList.add(criteriaBuilder.like(root.get("chargePersonName"), "%" + chargePersonName + "%"));
}
return criteriaBuilder.and(predicateList.toArray(new Predicate[0]));
};
if (pageQuery != null) {
return query(pointsTaskRepository, pageQuery, sort, specification);
} else {
return query(pointsTaskRepository, sort, specification);
}
}
public PointsTask findById(String id) {
return getEntityById(pointsTaskRepository, id);
}
@Transactional
public void completeTask(String id) {
PointsTask pointsTask = getEntityById(pointsTaskRepository, id);
String loginUserEmpId = LoginUserUtil.getLoginUserEmpId();
if (loginUserEmpId != null && loginUserEmpId.equals(pointsTask.getChargePersonId())) {
pointsTask.setTaskStatus(PointsTaskEnum.FINISHED.getCode());
pointsTask.setCompleteDate(new Date());
pointsTaskRepository.save(pointsTask);
} else {
throw new BusinessException("登录用户不是负责人,操作失败");
}
}
}
|
[
"823917541@qq.com"
] |
823917541@qq.com
|
29058612e337c5fd871cb3397dd71c25a696658a
|
e082ffadd6482e20972a21b217e4e855ea5bbdf8
|
/spring-boot-h2/src/main/java/com/klyshov/task/Task.java
|
068f3193638dbc4bd5f85ebbda42629cb84a9e63
|
[] |
no_license
|
dimka668/java_study
|
ec01228f50bb1029a60b35151eca6d692b8d4116
|
f80caf089941cc041957c8ba146c3f076cef60cd
|
refs/heads/master
| 2022-12-25T01:19:31.756145
| 2020-05-14T16:11:02
| 2020-05-14T16:11:02
| 165,732,975
| 0
| 0
| null | 2022-12-16T10:37:10
| 2019-01-14T20:50:18
|
Java
|
UTF-8
|
Java
| false
| false
| 2,123
|
java
|
package com.klyshov.task;
/**
* Created by 16688641 on 12.02.2019.
*/
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.*;
import java.io.File;
import java.io.FileOutputStream;
@XmlAccessorType(XmlAccessType.FIELD)
//@XmlType(name = "Task")
@XmlRootElement(name = "Task")
public class Task {
@XmlElement(name = "user")
protected String user;
@XmlElement(name = "command")
String command;
@XmlAttribute(name = "priority")
int priority;
public String getUser() {
return user;
}
public void setUser(String user) {
this.user = user;
}
public String getCommand() {
return command;
}
public void setCommand(String command) {
this.command = command;
}
public int getPriority() {
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
}
public Task(){
}
public Task(String user, String command, int priority){
this.user = user;
this.command = command;
this.priority = priority;
}
@Override
public String toString() {
return "user: "+user+"; command:"+command;
}
public void marshalToFile(String fileName) {
try {
//JAXBContext jc = JAXBContext.newInstance(this.getClass().getPackage().getName());
JAXBContext jc = JAXBContext.newInstance(this.getClass());
Marshaller m = jc.createMarshaller();
m.marshal( this, new FileOutputStream(fileName) );
} catch(Exception e) {
e.printStackTrace();
}
}
public static Task unmarshalFromFile(String fileName) {
try {
JAXBContext jc = JAXBContext.newInstance((new Task()).getClass());
Unmarshaller um = jc.createUnmarshaller();
return (Task) um.unmarshal(new File(fileName));
} catch (Exception e) {
return new Task();
}
}
private class taskGenegator{
public int counter;
new
}
}
|
[
"11"
] |
11
|
836a20188ca74620bea7877b65c7285d8af84eeb
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.horizon-Horizon/sources/X/C002908x.java
|
dc24b1f51c8c8bed65a33788160d0e20d6bf9727
|
[] |
no_license
|
phwd/quest-tracker
|
286e605644fc05f00f4904e51f73d77444a78003
|
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
|
refs/heads/main
| 2023-03-29T20:33:10.959529
| 2021-04-10T22:14:11
| 2021-04-10T22:14:11
| 357,185,040
| 4
| 2
| null | 2021-04-12T12:28:09
| 2021-04-12T12:28:08
| null |
UTF-8
|
Java
| false
| false
| 399
|
java
|
package X;
import com.facebook.inject.binder.AnnotatedBindingBuilder;
import com.facebook.inject.binder.LinkedBindingBuilderImpl;
/* renamed from: X.08x reason: invalid class name and case insensitive filesystem */
public final class C002908x<T> extends LinkedBindingBuilderImpl<T> implements AnnotatedBindingBuilder<T> {
public C002908x(AnonymousClass0Pq<T> r1) {
super(r1);
}
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
285855a352d8d3a1677928015170a32add28cb86
|
0abf795972fd6a07249747bbb80bef3872983bd9
|
/ClavaAst/src/pt/up/fe/specs/clava/ast/stmt/LoopStmt.java
|
82f0432391a5fd021d728d4340b2b149b421b331
|
[
"Apache-2.0"
] |
permissive
|
tiagolascasas/clava
|
052e8153c74bc1f87d28bc95f6375bc80d4156f0
|
262767880ec077b2b8dc457ad8b52b119ae4bd5b
|
refs/heads/master
| 2021-03-12T06:20:40.393648
| 2020-03-10T22:37:16
| 2020-03-10T22:37:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,810
|
java
|
/**
* Copyright 2016 SPeCS.
*
* 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. under the License.
*/
package pt.up.fe.specs.clava.ast.stmt;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import org.suikasoft.jOptions.Interfaces.DataStore;
import com.google.common.base.Preconditions;
import pt.up.fe.specs.clava.ClavaNode;
import pt.up.fe.specs.clava.ast.decl.Decl;
import pt.up.fe.specs.clava.ast.decl.FunctionDecl;
import pt.up.fe.specs.clava.ast.extra.TranslationUnit;
import pt.up.fe.specs.clava.utils.StmtWithCondition;
public abstract class LoopStmt extends Stmt implements StmtWithCondition {
private static final int DEFAULT_ITERATIONS = -1;
public LoopStmt(DataStore data, Collection<? extends ClavaNode> children) {
super(data, children);
isParallel = false;
iterations = DEFAULT_ITERATIONS;
rank = null;
}
public static int getDefaultIterations() {
return DEFAULT_ITERATIONS;
}
private boolean isParallel;
private int iterations;
private List<Integer> rank;
// public LoopStmt(ClavaNodeInfo info, Collection<? extends ClavaNode> children) {
// super(info, children);
//
// isParallel = false;
// iterations = DEFAULT_ITERATIONS;
// rank = null;
// }
public abstract CompoundStmt getBody();
public CompoundStmt setBody(CompoundStmt newBody) {
// Replace body statement
CompoundStmt oldBody = getBody();
int bodyIndex = oldBody.indexOfSelf();
setChild(bodyIndex, newBody);
return oldBody;
}
public boolean isParallel() {
return isParallel;
}
public void setParallel(boolean isParallel) {
this.isParallel = isParallel;
}
public int getIterations() {
return iterations;
}
public void setIterations(int iterations) {
this.iterations = iterations;
}
public List<Integer> getRank() {
// Calculate rank if it has not been initialized yet
if (rank == null) {
rank = calculateRank();
}
return rank;
}
private List<Integer> calculateRank() {
// Get own rank number
int ownRank = calculateOwnRank();
// Get rank of parent loop
List<Integer> parentRank = getAncestorTry(LoopStmt.class).map(LoopStmt::getRank)
.orElse(Collections.emptyList());
List<Integer> newRank = new ArrayList<>(parentRank.size() + 1);
newRank.addAll(parentRank);
newRank.add(ownRank);
return newRank;
}
private int calculateOwnRank() {
// Get ancestor node relative to the rank
ClavaNode ancestorRankNode = getAncestorRankNode();
// Create list of rank siblings.
List<LoopStmt> rankSiblings = buildRankSiblings(ancestorRankNode);
// Return index of own node
int indexOfLoop = rankSiblings.indexOf(this);
Preconditions.checkArgument(indexOfLoop != -1, "Could not find itself inside its loop rank siblings");
// Loop ranks start at 1
return indexOfLoop + 1;
/*
// Calculate own rank
ClavaNode parentNode = getParent();
int currentRank = 1;
for (ClavaNode sibling : parentNode.getChildren()) {
// If found itself, return
if (sibling == this) {
return currentRank;
}
// If found loop that is not itself, increase rank
if (sibling instanceof LoopStmt) {
currentRank++;
}
}
throw new RuntimeException("Could not find itself inside of parent's children");
*/
}
private List<LoopStmt> buildRankSiblings(ClavaNode ancestorRankNode) {
List<LoopStmt> rankSiblings = new ArrayList<>();
for (ClavaNode child : ancestorRankNode.getChildren()) {
buildRankSiblingsPrivate(child, rankSiblings);
}
return rankSiblings;
}
private void buildRankSiblingsPrivate(ClavaNode node, List<LoopStmt> rankSiblings) {
// If not a statement, stop looking
if (!(node instanceof Stmt)) {
return;
}
// If LoopStmt, add to list and stop looking
if (node instanceof LoopStmt) {
rankSiblings.add((LoopStmt) node);
return;
}
// Continue looking in the children of the stmt
node.getChildrenStream().forEach(child -> buildRankSiblingsPrivate(child, rankSiblings));
/*
// If an aggregate statement, continue looking in its children
if (node instanceof Stmt && ((Stmt) node).isAggregateStmt()) {
node.getChildrenStream().forEach(child -> buildRankSiblingsPrivate(child, rankSiblings));
return;
}
// For all other kinds of nodes, stop looking
return;
*/
}
private ClavaNode getAncestorRankNode() {
// Get first ancestor that is a LoopStmt.
ClavaNode loopAncestor = getAncestorTry(LoopStmt.class).orElse(null);
if (loopAncestor != null) {
return loopAncestor;
}
// If no LoopStmt found, use the first Decl ancestor as ancestor node
return getAncestor(Decl.class);
}
/**
* Uniquely identifies the loop in the code.
*
* <p>
* Currently uses the loop file, function and rank to identify the loop
*/
public String getLoopId() {
String fileId = "file$"
+ getAncestorTry(TranslationUnit.class)
.map(tunit -> tunit.getRelativeFilepath())
.orElse("<no_file>");
String functionId = "function$" + getAncestorTry(FunctionDecl.class)
.map(functionDecl -> functionDecl.getDeclarationId(false))
.orElse("<no_function>");
String rankId = "rank$" + getRank().stream()
.map(rankValue -> rankValue.toString())
.collect(Collectors.joining("."));
return fileId + "->" + functionId + "->" + rankId;
}
/*
@Override
public List<Stmt> toStatements() {
return getBody().toStatements();
}
*/
}
|
[
"joaobispo@gmail.com"
] |
joaobispo@gmail.com
|
e054969e63fe4406bf62d75cb5b1e8748a4503ef
|
5ae6696f564914f982e4d1be54708790c27c467b
|
/app/src/main/java/com/example/easypermissions/sample/SampleFragment.java
|
3856da0915c5ec9dc82587447da915471c580f1c
|
[] |
no_license
|
jinhuizxc/EasyPermissions
|
dead84356c21ee5b5b4b28f27b72d2b03bfcc1e9
|
1cd7f1bab57cd53c8db841cfd5ef448b70686ad7
|
refs/heads/master
| 2020-05-07T18:17:13.045055
| 2019-06-03T03:48:25
| 2019-06-03T03:48:25
| 180,759,363
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,712
|
java
|
package com.example.easypermissions.sample;
import android.Manifest;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import com.example.easypermissions.R;
import java.util.List;
import pub.devrel.easypermissions.AfterPermissionGranted;
import pub.devrel.easypermissions.EasyPermissions;
/**
* Created in {@link R.layout#activity_main}
*/
public class SampleFragment extends Fragment implements EasyPermissions.PermissionCallbacks {
private static final String TAG = "SampleFragment";
private static final int RC_SMS_PERM = 122;
@Override
public View onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
// Create view
View v = inflater.inflate(R.layout.fragment_main, container);
// Button click listener
v.findViewById(R.id.button_sms).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
smsTask();
}
});
return v;
}
@Override
public void onRequestPermissionsResult(int requestCode,
@NonNull String[] permissions,
@NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
// EasyPermissions handles the request result.
EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
@AfterPermissionGranted(RC_SMS_PERM)
private void smsTask() {
if (EasyPermissions.hasPermissions(getContext(), Manifest.permission.READ_SMS)) {
// Have permission, do the thing!
Toast.makeText(getActivity(), "TODO: SMS things", Toast.LENGTH_LONG).show();
} else {
// Request one permission
EasyPermissions.requestPermissions(this, getString(R.string.rationale_sms),
RC_SMS_PERM, Manifest.permission.READ_SMS);
}
}
@Override
public void onPermissionsGranted(int requestCode, @NonNull List<String> perms) {
Log.d(TAG, "onPermissionsGranted:" + requestCode + ":" + perms.size());
}
@Override
public void onPermissionsDenied(int requestCode, @NonNull List<String> perms) {
Log.d(TAG, "onPermissionsDenied:" + requestCode + ":" + perms.size());
}
}
|
[
"13113017500"
] |
13113017500
|
10ccd498461b5baf9289cc8db658cfd2d2430806
|
14ff54a4a5b0006c994eb81abd6dd5fda5e8fb79
|
/src/main/java/defense/common/explosive/blast/BlastChemical.java
|
fedb72d6cc9bae34f24f86f1b560bfcf1f419793
|
[
"MIT"
] |
permissive
|
clienthax/DefenseTech
|
73ae0f3f19c25791eb32d10ad56f475b9e59d3e0
|
f36dd6e09b4d8a38dd60ec461323fac5348a466d
|
refs/heads/master
| 2021-07-06T07:22:54.919977
| 2017-09-28T07:14:36
| 2017-09-28T07:14:36
| 104,408,861
| 0
| 1
| null | 2017-09-21T23:34:07
| 2017-09-21T23:34:07
| null |
UTF-8
|
Java
| false
| false
| 6,079
|
java
|
package defense.common.explosive.blast;
import java.util.List;
import mekanism.api.Pos3D;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import defense.common.DefenseTech;
import defense.common.Reference;
import defense.common.potion.CustomPotionEffect;
public class BlastChemical extends Blast
{
private static final int CHECK_BAN_JING = 16;
private static final float NENG_LIANG = 10F;
private int duration;
/** Color of particles */
private float red = 1, green = 1, blue = 1;
private boolean playShortSoundFX;
private boolean isContagious, isPoisonous, isConfuse, isMutate;
public BlastChemical(World world, Entity entity, double x, double y, double z, float size)
{
super(world, entity, x, y, z, size);
}
public BlastChemical(World world, Entity entity, double x, double y, double z, float size, int duration, boolean playShortSoundFX)
{
this(world, entity, x, y, z, size);
this.duration = duration / this.proceduralInterval();
this.playShortSoundFX = playShortSoundFX;
}
public BlastChemical setRGB(float r, float g, float b)
{
this.red = r;
this.green = g;
this.blue = b;
return this;
}
public BlastChemical setConfuse()
{
this.isConfuse = true;
return this;
}
public BlastChemical setPoison()
{
this.isPoisonous = true;
return this;
}
public BlastChemical setContagious()
{
this.isContagious = true;
this.isMutate = true;
return this;
}
@Override
public void doPreExplode()
{
super.doPreExplode();
if (!this.playShortSoundFX)
{
this.worldObj.playSoundEffect(this.position.xPos, this.position.yPos, this.position.zPos, Reference.PREFIX + "debilitation", 4.0F, (1.0F + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2F) * 0.7F);
}
}
@Override
public void doExplode()
{
float radius = this.getRadius();
if (this.worldObj.isRemote)
{
for (int i = 0; i < 200; i++)
{
Pos3D diDian = new Pos3D();
diDian.xPos = Math.random() * radius / 2 - radius / 4;
diDian.yPos = Math.random() * radius / 2 - radius / 4;
diDian.zPos = Math.random() * radius / 2 - radius / 4;
diDian.scale(Math.min(radius, callCount) / 10);
if (diDian.getMagnitude() <= radius)
{
diDian.translate(this.position);
DefenseTech.proxy.spawnParticle("smoke", this.worldObj, diDian, (Math.random() - 0.5) / 2, (Math.random() - 0.5) / 2, (Math.random() - 0.5) / 2, this.red, this.green, this.blue, 7.0F, 8);
}
}
}
AxisAlignedBB bounds = AxisAlignedBB.getBoundingBox(position.xPos - radius, position.yPos - radius, position.zPos - radius, position.xPos + radius, position.yPos + radius, position.zPos + radius);
List<EntityLivingBase> allEntities = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, bounds);
for (EntityLivingBase entity : allEntities)
{
if (this.isContagious)
{
DefenseTech.contagios_potion.poisonEntity(position, entity);
}
if (this.isPoisonous)
{
DefenseTech.poisonous_potion.poisonEntity(position, entity);
}
if (this.isConfuse)
{
entity.addPotionEffect(new CustomPotionEffect(Potion.confusion.id, 18 * 20, 0));
entity.addPotionEffect(new CustomPotionEffect(Potion.digSlowdown.id, 20 * 60, 0));
entity.addPotionEffect(new CustomPotionEffect(Potion.moveSlowdown.id, 20 * 60, 2));
}
}
if (this.isMutate)
{
new BlastMutation(worldObj, this.exploder, position.xPos, position.yPos, position.zPos, this.getRadius()).explode();
}
if (this.playShortSoundFX)
{
worldObj.playSoundEffect(position.xPos + 0.5D, position.yPos + 0.5D, position.zPos + 0.5D, Reference.PREFIX + "gasleak", 4.0F, (1.0F + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2F) * 1F);
}
if (this.callCount > this.duration)
{
this.controller.endExplosion();
}
}
@Override
public long getEnergy()
{
return 20;
}
/** The interval in ticks before the next procedural call of this explosive
*
* @return - Return -1 if this explosive does not need proceudral calls */
@Override
public int proceduralInterval()
{
return 5;
}
@Override
public void readFromNBT(NBTTagCompound nbt)
{
super.readFromNBT(nbt);
this.duration = nbt.getInteger("duration");
this.isContagious = nbt.getBoolean("isContagious");
this.isPoisonous = nbt.getBoolean("isPoisonous");
this.isConfuse = nbt.getBoolean("isConfuse");
this.isMutate = nbt.getBoolean("isMutate");
this.red = nbt.getFloat("red");
this.green = nbt.getFloat("green");
this.blue = nbt.getFloat("blue");
this.playShortSoundFX = nbt.getBoolean("playShortSoundFX");
}
@Override
public void writeToNBT(NBTTagCompound nbt)
{
super.writeToNBT(nbt);
nbt.setInteger("duration", this.duration);
nbt.setBoolean("isContagious", this.isContagious);
nbt.setBoolean("isPoisonous", this.isPoisonous);
nbt.setBoolean("isConfuse", this.isConfuse);
nbt.setBoolean("isMutate", this.isMutate);
nbt.setFloat("red", this.red);
nbt.setFloat("green", this.green);
nbt.setFloat("blue", this.blue);
nbt.setBoolean("playShortSoundFX", this.playShortSoundFX);
}
}
|
[
"me@aidancbrady.com"
] |
me@aidancbrady.com
|
a4561cc866a5a5d9089a9265484eca00440c1182
|
80f23317897417a5abfe6ddd26d00f33d3b84a74
|
/Java OOP/Polymorphism/farm/farm/Food.java
|
2b7b7e292ecc8368df66938c3298037350701919
|
[] |
no_license
|
Petretooo/SoftUni-Homework
|
b67c64d221971748a2a9bdbcc3ef8e6f57e67f39
|
c3e74fcb9f0ef74284265f7955ec76b047578429
|
refs/heads/master
| 2021-06-30T15:59:01.491255
| 2020-01-12T15:05:03
| 2020-01-12T15:05:03
| 179,889,608
| 1
| 0
| null | 2020-10-13T15:19:56
| 2019-04-06T21:40:30
|
Java
|
UTF-8
|
Java
| false
| false
| 237
|
java
|
package Polymorphism.farm.farm;
public abstract class Food {
private Integer quantity;
public Food(Integer quantity) {
this.quantity = quantity;
}
public Integer getQuantity() {
return quantity;
}
}
|
[
"49255539+Petretooo@users.noreply.github.com"
] |
49255539+Petretooo@users.noreply.github.com
|
6420299f322f7dfdbfff72aa9cdbed43bd8692cd
|
32fd0a92293e1f28c3acc0d66f82f9e74b37d357
|
/app/src/main/java/com/matrix/myapplication/greendao/GreenDaoData.java
|
ab41eccbadde2377aaaf5c5928ad0b20a60e3bc3
|
[] |
no_license
|
Clyr/TestList
|
bba28d62ffb50420b171a73f524f9680b6977b62
|
3af631927075dea14dcdfef04c82bcf19f7f6e08
|
refs/heads/master
| 2021-07-10T13:03:19.494218
| 2020-08-18T12:13:12
| 2020-08-18T12:13:12
| 185,518,920
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,410
|
java
|
package com.matrix.myapplication.greendao;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Unique;
import org.greenrobot.greendao.annotation.Generated;
/**
* Created by M S I of clyr on 2019/11/22.
*/
@Entity
public class GreenDaoData {
@Id(autoincrement = true)
Long id;
@Unique
int studentNo;//学号
int age; //年龄
String telPhone;//手机号
String sex; //性别
String name;//姓名
String address;//家庭住址
String schoolName;//学校名字
String grade;//几年级
@Generated(hash = 1408918703)
public GreenDaoData(Long id, int studentNo, int age, String telPhone,
String sex, String name, String address, String schoolName,
String grade) {
this.id = id;
this.studentNo = studentNo;
this.age = age;
this.telPhone = telPhone;
this.sex = sex;
this.name = name;
this.address = address;
this.schoolName = schoolName;
this.grade = grade;
}
@Generated(hash = 817674021)
public GreenDaoData() {
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public int getStudentNo() {
return studentNo;
}
public void setStudentNo(int studentNo) {
this.studentNo = studentNo;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getTelPhone() {
return telPhone;
}
public void setTelPhone(String telPhone) {
this.telPhone = telPhone;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getSchoolName() {
return schoolName;
}
public void setSchoolName(String schoolName) {
this.schoolName = schoolName;
}
public String getGrade() {
return grade;
}
public void setGrade(String grade) {
this.grade = grade;
}
}
|
[
"fxsinb2@163.com"
] |
fxsinb2@163.com
|
64c02d81a0c948aba590c83ec905b9d07ea9745a
|
00927c4299d6a579aec5b9ec4d24c56b5e854a85
|
/build/tmp/expandedArchives/forge-1.15.2-31.2.0_mapped_snapshot_20200707-1.16.1-sources.jar_75c25ab5305a325620203830f766f7bc/net/minecraft/inventory/container/BeaconContainer.java
|
530d5eafd28a00f1024be1769ab490e34177054e
|
[] |
no_license
|
NguyenVux/Future-Combat
|
99a5bdbefe7c8e588cce070a06321a13f4f4891b
|
c25fa63494a48a5aa4391014ee117e7c8b4f5079
|
refs/heads/master
| 2022-12-02T09:03:32.402698
| 2020-07-30T14:34:23
| 2020-07-30T14:34:23
| 278,262,671
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,009
|
java
|
package net.minecraft.inventory.container;
import javax.annotation.Nullable;
import net.minecraft.block.Blocks;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Inventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.potion.Effect;
import net.minecraft.util.IIntArray;
import net.minecraft.util.IWorldPosCallable;
import net.minecraft.util.IntArray;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
public class BeaconContainer extends Container {
private final IInventory tileBeacon = new Inventory(1) {
/**
* Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot. For
* guis use Slot.isItemValid
*/
public boolean isItemValidForSlot(int index, ItemStack stack) {
return stack.isBeaconPayment();
}
/**
* Returns the maximum stack size for a inventory slot. Seems to always be 64
*/
public int getInventoryStackLimit() {
return 1;
}
};
private final BeaconContainer.BeaconSlot beaconSlot;
private final IWorldPosCallable field_216971_e;
private final IIntArray field_216972_f;
public BeaconContainer(int p_i50099_1_, IInventory p_i50099_2_) {
this(p_i50099_1_, p_i50099_2_, new IntArray(3), IWorldPosCallable.DUMMY);
}
public BeaconContainer(int p_i50100_1_, IInventory p_i50100_2_, IIntArray p_i50100_3_, IWorldPosCallable p_i50100_4_) {
super(ContainerType.BEACON, p_i50100_1_);
assertIntArraySize(p_i50100_3_, 3);
this.field_216972_f = p_i50100_3_;
this.field_216971_e = p_i50100_4_;
this.beaconSlot = new BeaconContainer.BeaconSlot(this.tileBeacon, 0, 136, 110);
this.addSlot(this.beaconSlot);
this.trackIntArray(p_i50100_3_);
int i = 36;
int j = 137;
for(int k = 0; k < 3; ++k) {
for(int l = 0; l < 9; ++l) {
this.addSlot(new Slot(p_i50100_2_, l + k * 9 + 9, 36 + l * 18, 137 + k * 18));
}
}
for(int i1 = 0; i1 < 9; ++i1) {
this.addSlot(new Slot(p_i50100_2_, i1, 36 + i1 * 18, 195));
}
}
/**
* Called when the container is closed.
*/
public void onContainerClosed(PlayerEntity playerIn) {
super.onContainerClosed(playerIn);
if (!playerIn.world.isRemote) {
ItemStack itemstack = this.beaconSlot.decrStackSize(this.beaconSlot.getSlotStackLimit());
if (!itemstack.isEmpty()) {
playerIn.dropItem(itemstack, false);
}
}
}
/**
* Determines whether supplied player can use this container
*/
public boolean canInteractWith(PlayerEntity playerIn) {
return isWithinUsableDistance(this.field_216971_e, playerIn, Blocks.BEACON);
}
public void updateProgressBar(int id, int data) {
super.updateProgressBar(id, data);
this.detectAndSendChanges();
}
/**
* Handle when the stack in slot {@code index} is shift-clicked. Normally this moves the stack between the player
* inventory and the other inventory(s).
*/
public ItemStack transferStackInSlot(PlayerEntity playerIn, int index) {
ItemStack itemstack = ItemStack.EMPTY;
Slot slot = this.inventorySlots.get(index);
if (slot != null && slot.getHasStack()) {
ItemStack itemstack1 = slot.getStack();
itemstack = itemstack1.copy();
if (index == 0) {
if (!this.mergeItemStack(itemstack1, 1, 37, true)) {
return ItemStack.EMPTY;
}
slot.onSlotChange(itemstack1, itemstack);
} else if (this.mergeItemStack(itemstack1, 0, 1, false)) { //Forge Fix Shift Clicking in beacons with stacks larger then 1.
return ItemStack.EMPTY;
} else if (index >= 1 && index < 28) {
if (!this.mergeItemStack(itemstack1, 28, 37, false)) {
return ItemStack.EMPTY;
}
} else if (index >= 28 && index < 37) {
if (!this.mergeItemStack(itemstack1, 1, 28, false)) {
return ItemStack.EMPTY;
}
} else if (!this.mergeItemStack(itemstack1, 1, 37, false)) {
return ItemStack.EMPTY;
}
if (itemstack1.isEmpty()) {
slot.putStack(ItemStack.EMPTY);
} else {
slot.onSlotChanged();
}
if (itemstack1.getCount() == itemstack.getCount()) {
return ItemStack.EMPTY;
}
slot.onTake(playerIn, itemstack1);
}
return itemstack;
}
@OnlyIn(Dist.CLIENT)
public int func_216969_e() {
return this.field_216972_f.get(0);
}
@Nullable
@OnlyIn(Dist.CLIENT)
public Effect func_216967_f() {
return Effect.get(this.field_216972_f.get(1));
}
@Nullable
@OnlyIn(Dist.CLIENT)
public Effect func_216968_g() {
return Effect.get(this.field_216972_f.get(2));
}
public void func_216966_c(int p_216966_1_, int p_216966_2_) {
if (this.beaconSlot.getHasStack()) {
this.field_216972_f.set(1, p_216966_1_);
this.field_216972_f.set(2, p_216966_2_);
this.beaconSlot.decrStackSize(1);
}
}
@OnlyIn(Dist.CLIENT)
public boolean func_216970_h() {
return !this.tileBeacon.getStackInSlot(0).isEmpty();
}
class BeaconSlot extends Slot {
public BeaconSlot(IInventory inventoryIn, int index, int xIn, int yIn) {
super(inventoryIn, index, xIn, yIn);
}
/**
* Check if the stack is allowed to be placed in this slot
*/
public boolean isItemValid(ItemStack stack) {
return stack.isBeaconPayment();
}
/**
* Returns the maximum stack size for a given slot (usually the same as getInventoryStackLimit()
*/
public int getSlotStackLimit() {
return 1;
}
}
}
|
[
"19127632@student.hcmus.edu.vn"
] |
19127632@student.hcmus.edu.vn
|
a706a7fe8454fa494dc2185547bb680346f84157
|
cdd99b02f09a82c84ac6c99e26204fee8bfc6373
|
/src/main/java/com/stackroute/controller/ProductController.java
|
159fbceecfe201aa75831b32d48f67f4cf5f1e52
|
[] |
no_license
|
BhawanaMital/SearchProductSpring
|
e6f02aff7c765bed1d9b14cdd9bd9a27b59b559e
|
3266e81bcd88f3b3a4ec31413c37f8eda82e0b3f
|
refs/heads/master
| 2020-07-12T19:04:02.123530
| 2019-08-28T08:45:05
| 2019-08-28T08:45:05
| 204,887,157
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,703
|
java
|
package com.stackroute.controller;
import com.stackroute.domain.Product;
import com.stackroute.exception.ProductNotFoundException;
import com.stackroute.service.ProductService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@ControllerAdvice
@RequestMapping(value="api/v1/")
@CrossOrigin("*")
public class ProductController {
private ProductService productService;
private final Logger logger = (Logger) LoggerFactory.getLogger(this.getClass());
public ProductController(ProductService productService){
this.productService = productService;
}
@PostMapping("product")
public ResponseEntity<?> saveProduct(@RequestBody Product product){
ResponseEntity responseEntity;
try{
productService.saveProduct(product);
responseEntity=new ResponseEntity<String>("Successfully created", HttpStatus.CREATED);
} catch (Exception ex){
responseEntity=new ResponseEntity<String>(ex.getMessage(),HttpStatus.CONFLICT);
}
return responseEntity;
}
@GetMapping("product")
public ResponseEntity<?> getAllProducts(){
ResponseEntity responseEntity;
try{
productService.getAllProducts();
responseEntity= new ResponseEntity<List<Product>>(productService.getAllProducts(),HttpStatus.OK);
} catch (Exception e){
responseEntity=new ResponseEntity<String>(e.getMessage(),HttpStatus.CONFLICT);
}
return responseEntity;
}
@GetMapping("product/{id}")
public ResponseEntity<?> getProductById(@PathVariable("id") int id){
ResponseEntity responseEntity;
Product product;
try {
product = productService.getProductById(id);
responseEntity=new ResponseEntity<Product>(product, HttpStatus.OK);
} catch (Exception e){
responseEntity=new ResponseEntity<String>(e.getMessage(),HttpStatus.CONFLICT);
}
return responseEntity;
}
@GetMapping("productname/{name}")
public ResponseEntity<?> getProductByName(@PathVariable String name) {
ResponseEntity responseEntity;
try {
List<Product> product = productService.getProductByName(name);
responseEntity = new ResponseEntity<List<Product>>(product, HttpStatus.OK);
} catch (ProductNotFoundException ex) {
responseEntity = new ResponseEntity<String>(ex.getMessage(), HttpStatus.NOT_FOUND);
}
return responseEntity;
}
}
|
[
"you@example.com"
] |
you@example.com
|
76e0fbe3697c685c8ae4dca6da508e242a333c48
|
a59f03b222eb72cee28018705ddd04f8b518cac7
|
/triana-gui/src/main/java/org/trianacode/gui/components/triana/OpenGroupComponentModel.java
|
713fc0d7a19e7e407d6d3f59b3d31e3dbb42948d
|
[
"Apache-2.0"
] |
permissive
|
Janix520/Triana
|
487c90a0d822d8a6338f940fb5e4740ba5bd069f
|
da48ffaa0183f59e3fe7c6dc59d9f91234e65809
|
refs/heads/master
| 2022-03-27T19:29:45.050728
| 2014-08-29T17:43:13
| 2014-08-29T17:43:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,361
|
java
|
/*
* The University of Wales, Cardiff Triana Project Software License (Based
* on the Apache Software License Version 1.1)
*
* Copyright (c) 2007 University of Wales, Cardiff. All rights reserved.
*
* Redistribution and use of the software in source and binary forms, with
* or without modification, are permitted provided that the following
* conditions are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. The end-user documentation included with the redistribution, if any,
* must include the following acknowledgment: "This product includes
* software developed by the University of Wales, Cardiff for the Triana
* Project (http://www.trianacode.org)." Alternately, this
* acknowledgment may appear in the software itself, if and wherever
* such third-party acknowledgments normally appear.
*
* 4. The names "Triana" and "University of Wales, Cardiff" must not be
* used to endorse or promote products derived from this software
* without prior written permission. For written permission, please
* contact triana@trianacode.org.
*
* 5. Products derived from this software may not be called "Triana," nor
* may Triana appear in their name, without prior written permission of
* the University of Wales, Cardiff.
*
* 6. This software may not be sold, used or incorporated into any product
* for sale to third parties.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL UNIVERSITY OF WALES, CARDIFF OR ITS CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
* ------------------------------------------------------------------------
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Triana Project. For more information on the
* Triana Project, please see. http://www.trianacode.org.
*
* This license is based on the BSD license as adopted by the Apache
* Foundation and is governed by the laws of England and Wales.
*
*/
package org.trianacode.gui.components.triana;
import javax.swing.Action;
import javax.swing.JPopupMenu;
import org.trianacode.gui.main.TaskGraphPanel;
import org.trianacode.taskgraph.Task;
import org.trianacode.taskgraph.TaskGraph;
import org.trianacode.taskgraph.service.TrianaClient;
/**
* The model for an open group
*
* @author Ian Wang
* @version $Revision: 4048 $
*/
public interface OpenGroupComponentModel {
/**
* @return the popup menu for the open group (if null is returned then the default popup menu is used, return a
* empty popup menu for no popup)
*/
public JPopupMenu getOpenGroupPopup(TaskGraph taskgraph);
/**
* @return the action that is invoked when a group is activated (e.g. the workspace is double-clicked). If null is
* returned the default workspace action is used.
*/
public Action getOpenGroupAction(TaskGraph taskgraph);
/**
* @return the taskgraph panel used to represent the specified taskgraph (if null is returned then the default
* component is used)
*/
public TaskGraphPanel getOpenGroupComponent(TaskGraph taskgraph, TrianaClient client);
/**
* @return the popup menu when multiple tasks are selected in the workspace (if null is returned then the default
* popup menu is used, return a empty popup menu for no popup)
*/
public JPopupMenu getMultipleSelectedPopup(Task[] tasks);
}
|
[
"doctor.zob@gmail.com"
] |
doctor.zob@gmail.com
|
f44ee2d0827df3edb7d04a49b426ea59da2d7c5e
|
9bb3194998ab1d8953a2037d1a3e01d0dce56e3e
|
/src/main/java/mbarix4j/geometry/Point4D.java
|
5306192df42dc682d4f75214c682d5ae6ce82bab
|
[
"BSD-3-Clause"
] |
permissive
|
hohonuuli/mbarix4j
|
81d8c61e9a5bca7c48caa0d42cbb99d5bbce66bc
|
7653f1a8f8605517f12eff80086f9a0ea327bb6d
|
refs/heads/master
| 2023-01-11T00:35:21.159095
| 2022-12-29T00:53:43
| 2022-12-29T00:53:43
| 13,154,809
| 1
| 2
|
BSD-3-Clause
| 2020-10-13T08:07:08
| 2013-09-27T15:59:20
|
Java
|
UTF-8
|
Java
| false
| false
| 1,150
|
java
|
package mbarix4j.geometry;
/**
* 4D point (e.g. space-time)
*
* A type param is for space dimensions
* B type param is for time dimensions
*
* @author Brian Schlining
* @since Sep 28, 2010
*/
public class Point4D<A extends Number, B> extends Point3D<A> {
private final B t;
public Point4D(A x, A y, A z, B t) {
super(x, y, z);
this.t = t;
}
public B getT() {
return t;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Point4D<A, B> other = (Point4D<A, B>) obj;
if (!super.equals(obj) && this.t != other.t && (this.t == null || !this.t.equals(other.t))) {
return false;
}
return true;
}
@Override
public int hashCode() {
int hash = 7 + super.hashCode();
hash = 53 * hash + (this.t != null ? this.t.hashCode() : 0);
return hash;
}
@Override
public String toString() {
return getX() + "," + getY() + "," + getZ() + "," + getT();
}
}
|
[
"bschlining@gmail.com"
] |
bschlining@gmail.com
|
0012c25e4c1a29a65aeb6739b2f80f296f517f4c
|
12939dc1f4af34e4cd8c8d2e9d0592007532640b
|
/admin-server/common-system-api/src/main/java/com/yuntian/sys/model/dto/DictDetailSaveDTO.java
|
583191ec2465eeb960872efb0b1226198a3d3828
|
[] |
no_license
|
9527java/admin-system
|
0e8943d97ea23e3d7a216ca5190b07606130e481
|
3012ce7e5149ff908e8541f795f4ae590f644910
|
refs/heads/master
| 2022-10-27T20:41:37.483650
| 2020-05-04T12:38:27
| 2020-05-04T12:38:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 818
|
java
|
package com.yuntian.sys.model.dto;
import com.yuntian.architecture.data.BaseEntity;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 后台系统-数据字典详情
* </p>
*
* @author yuntian
* @since 2020-02-27
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class DictDetailSaveDTO extends BaseEntity {
/**
* 字典id
*/
@NotNull(message = "字典id不能为空")
private Long dictId;
/**
* 字典标签
*/
@NotBlank(message = "字典标签不能为空")
private String label;
/**
* 字典值
*/
@NotBlank(message = "字典值不能为空")
private String value;
/**
* 排序
*/
private Integer sort;
}
|
[
"944610721@qq.com"
] |
944610721@qq.com
|
6232fa2bb5aca4b902cb04a67109666a46805998
|
211e9326d30c451bef5647cc3056dd7ad8a51b6d
|
/src/ta/Tabs/PointsList/ListPointsAdapter.java
|
9c73ff34ff7e0ba30cf93e176a369f402fbc7d6e
|
[] |
no_license
|
vano99x/folder_1
|
e612807ac21d443b3bff849041455dc942085d99
|
bbe67e056dd84677fe92ff5cbbb1d9db9312625e
|
refs/heads/master
| 2019-01-01T02:16:34.077055
| 2014-08-27T12:00:48
| 2014-08-27T12:00:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,951
|
java
|
package ta.Tabs.PointsList;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.LinearLayout;
import android.widget.TextView;
import ta.Database.Point;
import ta.timeattendance.R;
public class ListPointsAdapter extends BaseAdapter
{
private Point[] items;
private View.OnClickListener listener;
private LayoutInflater mInflater;
public ListPointsAdapter(
Context paramContext,
Point[] paramArrayOfPoint,
View.OnClickListener paramOnClickListener)
{
this.mInflater = ((LayoutInflater)paramContext.getSystemService("layout_inflater"));
this.items = paramArrayOfPoint;
this.listener = paramOnClickListener;
}
public int getCount()
{
if (this.items == null)
{
return 0;
}
return this.items.length;
}
public Object getItem(int paramInt)
{
return Integer.valueOf(paramInt);
}
public long getItemId(int paramInt)
{
return paramInt;
}
public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
{
if( paramView == null )
{
paramView = this.mInflater.inflate(R.layout.list_item, null);
paramView.setTag(null);
}
TextView textView = (TextView) paramView.findViewById(R.id.txtName);
LinearLayout baseView = (LinearLayout)paramView.findViewById(R.id.item);
baseView.setOnClickListener(this.listener);
if( this.items != null )
{
try
{
Point point = this.items[paramInt];
textView.setText(point.Name);
//baseView.setTag(point);
baseView.setTag(new Object[]{ R.id.PointsListItem_Id, point});
return paramView;
}
catch (Exception e)
{
}
}
return paramView;
}
}
/* Location: C:\Users\vano99\Desktop\jd-gui-0.3.5.windows\TandAOffline_dex2jar.jar
* Qualified Name: com.ifree.timeattendance.ListPointsAdapter
* JD-Core Version: 0.6.2
*/
|
[
"1"
] |
1
|
8e9f1048ced54bcac1b9b8a3bc53de725ed9ba95
|
2bc2eadc9b0f70d6d1286ef474902466988a880f
|
/tags/mule-2.0.0-M2/transports/email/src/main/java/org/mule/providers/email/AbstractRetrieveMailConnector.java
|
2199a86107ca34694c8324c82793c2d83f8d74a7
|
[] |
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
| 2,989
|
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.email;
import org.mule.umo.UMOComponent;
import org.mule.umo.endpoint.UMOImmutableEndpoint;
import org.mule.umo.provider.UMOMessageReceiver;
/**
* Support for connecting to and receiving email from a mailbox (the exact protocol depends on
* the subclass).
*/
public abstract class AbstractRetrieveMailConnector extends AbstractMailConnector
{
public static final int DEFAULT_CHECK_FREQUENCY = 60000;
/**
* Holds the time in milliseconds that the endpoint should wait before checking a
* mailbox
*/
private volatile long checkFrequency = DEFAULT_CHECK_FREQUENCY;
/**
* Holds a path where messages should be backed up to (auto-generated if empty)
*/
private volatile String backupFolder = null;
/**
* Should we save backups to backupFolder?
*/
private boolean backupEnabled = false;
/**
* Once a message has been read, should it be deleted
*/
private volatile boolean deleteReadMessages = true;
protected AbstractRetrieveMailConnector(int defaultPort)
{
super(defaultPort, MAILBOX);
}
/**
* @return the milliseconds between checking the folder for messages
*/
public long getCheckFrequency()
{
return checkFrequency;
}
public void setCheckFrequency(long l)
{
if (l < 1)
{
l = DEFAULT_CHECK_FREQUENCY;
}
checkFrequency = l;
}
/**
* @return a relative or absolute path to a directory on the file system
*/
public String getBackupFolder()
{
return backupFolder;
}
public void setBackupFolder(String string)
{
backupFolder = string;
}
/*
* (non-Javadoc)
*
* @see org.mule.providers.UMOConnector#registerListener(javax.jms.MessageListener,
* java.lang.String)
*/
public UMOMessageReceiver createReceiver(UMOComponent component, UMOImmutableEndpoint endpoint) throws Exception
{
Object[] args = {new Long(checkFrequency), Boolean.valueOf(isBackupEnabled()), backupFolder};
return serviceDescriptor.createMessageReceiver(this, component, endpoint, args);
}
public boolean isDeleteReadMessages()
{
return deleteReadMessages;
}
public void setDeleteReadMessages(boolean deleteReadMessages)
{
this.deleteReadMessages = deleteReadMessages;
}
public boolean isBackupEnabled()
{
return backupEnabled;
}
public void setBackupEnabled(boolean backupEnabled)
{
this.backupEnabled = backupEnabled;
}
}
|
[
"tcarlson@bf997673-6b11-0410-b953-e057580c5b09"
] |
tcarlson@bf997673-6b11-0410-b953-e057580c5b09
|
4a8aad7dd666b5bd454b64b726ffbb66d5af2baf
|
82a0c3f367d274a2c5a791945f320fc29f971e31
|
/src/main/java/com/somoplay/artonexpress/ups/shipping/ShipConfirmRequest/ShipFromType.java
|
5c20846c6e9a4efc732ad623301b3a94d4ae10c3
|
[] |
no_license
|
zl20072008zl/arton_nov
|
a21e682e40a2ee4d9e1b416565942c8a62a8951f
|
c3571a7b31c561691a785e3d2640ea0b5ab770a7
|
refs/heads/master
| 2020-03-19T02:22:35.567584
| 2018-05-20T14:16:43
| 2018-05-20T14:16:43
| 135,623,385
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,807
|
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.10.28 时间 03:38:23 PM EDT
//
package com.somoplay.artonexpress.ups.shipping.ShipConfirmRequest;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>ShipFromType complex type的 Java 类。
*
* <p>以下模式片段指定包含在此类中的预期内容。
*
* <pre>
* <complexType name="ShipFromType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="CompanyName" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="AttentionName" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="TaxIdentificationNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="TaxIDType" type="{}TaxIDCodeDescType"/>
* <element name="PhoneNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="FaxNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Address" type="{}ShipFromAddressType"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ShipFromType", propOrder = {
"companyName",
"attentionName",
"taxIdentificationNumber",
"taxIDType",
"phoneNumber",
"faxNumber",
"address"
})
public class ShipFromType {
@XmlElement(name = "CompanyName", required = true)
protected String companyName;
@XmlElement(name = "AttentionName", required = true)
protected String attentionName;
@XmlElement(name = "TaxIdentificationNumber")
protected String taxIdentificationNumber;
@XmlElement(name = "TaxIDType", required = true)
protected TaxIDCodeDescType taxIDType;
@XmlElement(name = "PhoneNumber")
protected String phoneNumber;
@XmlElement(name = "FaxNumber")
protected String faxNumber;
@XmlElement(name = "Address", required = true)
protected ShipFromAddressType address;
/**
* 获取companyName属性的值。
*
* @return
* possible object is
* {@link String }
*
*/
public String getCompanyName() {
return companyName;
}
/**
* 设置companyName属性的值。
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCompanyName(String value) {
this.companyName = value;
}
/**
* 获取attentionName属性的值。
*
* @return
* possible object is
* {@link String }
*
*/
public String getAttentionName() {
return attentionName;
}
/**
* 设置attentionName属性的值。
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAttentionName(String value) {
this.attentionName = value;
}
/**
* 获取taxIdentificationNumber属性的值。
*
* @return
* possible object is
* {@link String }
*
*/
public String getTaxIdentificationNumber() {
return taxIdentificationNumber;
}
/**
* 设置taxIdentificationNumber属性的值。
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTaxIdentificationNumber(String value) {
this.taxIdentificationNumber = value;
}
/**
* 获取taxIDType属性的值。
*
* @return
* possible object is
* {@link TaxIDCodeDescType }
*
*/
public TaxIDCodeDescType getTaxIDType() {
return taxIDType;
}
/**
* 设置taxIDType属性的值。
*
* @param value
* allowed object is
* {@link TaxIDCodeDescType }
*
*/
public void setTaxIDType(TaxIDCodeDescType value) {
this.taxIDType = value;
}
/**
* 获取phoneNumber属性的值。
*
* @return
* possible object is
* {@link String }
*
*/
public String getPhoneNumber() {
return phoneNumber;
}
/**
* 设置phoneNumber属性的值。
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPhoneNumber(String value) {
this.phoneNumber = value;
}
/**
* 获取faxNumber属性的值。
*
* @return
* possible object is
* {@link String }
*
*/
public String getFaxNumber() {
return faxNumber;
}
/**
* 设置faxNumber属性的值。
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setFaxNumber(String value) {
this.faxNumber = value;
}
/**
* 获取address属性的值。
*
* @return
* possible object is
* {@link ShipFromAddressType }
*
*/
public ShipFromAddressType getAddress() {
return address;
}
/**
* 设置address属性的值。
*
* @param value
* allowed object is
* {@link ShipFromAddressType }
*
*/
public void setAddress(ShipFromAddressType value) {
this.address = value;
}
}
|
[
"lmywilks@hotmail.com"
] |
lmywilks@hotmail.com
|
2ebb26e09183815814b753a7de4d7b8dbc96a271
|
7af98202cc159b75cae64b940b8b4c4ab0fde352
|
/rocketmq-broker/src/test/java/com/alibaba/rocketmq/broker/topic/TopicConfigManagerTest.java
|
512f33c1f666ebd6e57d4dc021617106da1320fa
|
[] |
no_license
|
fyatao/RocketMQ
|
5b68800ea316dd3ca799fd73454928951768145a
|
04dee6b17b5d5351acac63041fa3e22038047e64
|
refs/heads/master
| 2021-01-18T09:39:17.571593
| 2013-06-19T14:40:18
| 2013-06-19T14:40:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,645
|
java
|
/**
* $Id: TopicConfigManagerTest.java 1831 2013-05-16 01:39:51Z shijia.wxr $
*/
package com.alibaba.rocketmq.broker.topic;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import com.alibaba.rocketmq.broker.BrokerController;
import com.alibaba.rocketmq.common.BrokerConfig;
import com.alibaba.rocketmq.common.MixAll;
import com.alibaba.rocketmq.common.TopicConfig;
import com.alibaba.rocketmq.remoting.netty.NettyServerConfig;
import com.alibaba.rocketmq.store.config.MessageStoreConfig;
/**
* @author shijia.wxr<vintage.wang@gmail.com>
*
*/
public class TopicConfigManagerTest {
@Test
public void test_flushTopicConfig() throws Exception {
BrokerController brokerController =
new BrokerController(new BrokerConfig(), new NettyServerConfig(), new MessageStoreConfig());
boolean initResult = brokerController.initialize();
System.out.println("initialize " + initResult);
brokerController.start();
TopicConfigManager topicConfigManager = new TopicConfigManager(brokerController);
TopicConfig topicConfig =
topicConfigManager.createTopicInSendMessageMethod("TestTopic_SEND", MixAll.DEFAULT_TOPIC, null, 4);
assertTrue(topicConfig != null);
System.out.println(topicConfig);
for (int i = 0; i < 10; i++) {
String topic = "UNITTEST-" + i;
topicConfig = topicConfigManager.createTopicInSendMessageMethod(topic, MixAll.DEFAULT_TOPIC, null, 4);
assertTrue(topicConfig != null);
}
topicConfigManager.persist();
brokerController.shutdown();
}
}
|
[
"shijia.wxr@taobao.com"
] |
shijia.wxr@taobao.com
|
52d66ed89d6262d77c5cba51d57da2fc21d8ba28
|
4d0b7f4567abb2c7fe41661dc885540233ed2035
|
/icmssvd-ejb/src/.svn/pristine/d8/d8d62ed00d2bf877dcb6d58a0d9c09866e23132b.svn-base
|
38cc8d39a9492a8e572147737865ba327428e772
|
[] |
no_license
|
peterso05168/icmssvd
|
a78e1562e8f7c7e9deda25d76191e17d64a8bd49
|
6b49e26eb0c014b68df714cbfc28d046b6ce5f99
|
refs/heads/master
| 2020-06-25T05:25:25.239498
| 2017-07-12T03:11:35
| 2017-07-12T03:11:35
| 96,959,623
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,186
|
package hk.judiciary.icmssvd.model.report.biz.dto;
public class RptSvdSerHistDTO {
private String caseNo;
private String regID;
private String assignDate;
private String result;
private String defendantTel;
private String processServer;
private String remark;
public String getCaseNo() {
return caseNo;
}
public void setCaseNo(String caseNo) {
this.caseNo = caseNo;
}
public String getRegID() {
return regID;
}
public void setRegID(String regID) {
this.regID = regID;
}
public String getAssignDate() {
return assignDate;
}
public void setAssignDate(String assignDate) {
this.assignDate = assignDate;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
public String getDefendantTel() {
return defendantTel;
}
public void setDefendantTel(String defendantTel) {
this.defendantTel = defendantTel;
}
public String getProcessServer() {
return processServer;
}
public void setProcessServer(String processServer) {
this.processServer = processServer;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
|
[
"chiu.cheukman@gmail.com"
] |
chiu.cheukman@gmail.com
|
|
be00b3ec845227dc178440bb03421c651ffbd609
|
f0568343ecd32379a6a2d598bda93fa419847584
|
/modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201308/AdRuleServiceInterfacegetAdRulesByStatement.java
|
0bea50f05cb5e64ec9557e12f81cb0c6794b42b9
|
[
"Apache-2.0"
] |
permissive
|
frankzwang/googleads-java-lib
|
bd098b7b61622bd50352ccca815c4de15c45a545
|
0cf942d2558754589a12b4d9daa5902d7499e43f
|
refs/heads/master
| 2021-01-20T23:20:53.380875
| 2014-07-02T19:14:30
| 2014-07-02T19:14:30
| 21,526,492
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,799
|
java
|
package com.google.api.ads.dfp.jaxws.v201308;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
*
* Gets an {@link AdRulePage} of {@link AdRule} objects that satisfy the given
* {@link Statement#query}. The following fields are supported for filtering:
*
* <table>
* <tr>
* <th scope="col">PQL Property</th> <th scope="col">Object Property</th>
* </tr>
* <tr>
* <td>{@code id}</td>
* <td>{@link AdRule#id}</td>
* </tr>
* <tr>
* <td>{@code name}</td>
* <td>{@link AdRule#name}</td>
* </tr>
* <tr>
* <td>{@code priority}</td>
* <td>{@link AdRule#priority}</td>
* </tr>
* <tr>
* <td>{@code status}</td>
* <td>{@link AdRule#status}</td>
* </table>
*
* @param filterStatement a Publisher Query Language statement used to filter
* a set of ad rules
* @return the ad rules that match the given filter
* @throws ApiException if the ID of the active network does not exist or
* there is a backend error
*
*
* <p>Java class for getAdRulesByStatement element declaration.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <element name="getAdRulesByStatement">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="statement" type="{https://www.google.com/apis/ads/publisher/v201308}Statement" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"statement"
})
@XmlRootElement(name = "getAdRulesByStatement")
public class AdRuleServiceInterfacegetAdRulesByStatement {
protected Statement statement;
/**
* Gets the value of the statement property.
*
* @return
* possible object is
* {@link Statement }
*
*/
public Statement getStatement() {
return statement;
}
/**
* Sets the value of the statement property.
*
* @param value
* allowed object is
* {@link Statement }
*
*/
public void setStatement(Statement value) {
this.statement = value;
}
}
|
[
"jradcliff@google.com"
] |
jradcliff@google.com
|
9377ff44bb43c535c0c2977d4635152a3b53caba
|
ef8e936630e92fd0a5d98e378812477d3b9fa0a1
|
/src/main/java/org/aludratest/service/gui/web/selenium/selenium2/Selenium2Driver.java
|
8b26140d5ffd2725c6d694b821caaaeab19deba3
|
[
"Apache-2.0"
] |
permissive
|
stevebutler-hsdg/aludratest
|
c2aaaab4b0dde8c1cadfc8689d8b4bd1006724bd
|
24133ab6dd6e649fa75c7b155620c03b4b968abc
|
refs/heads/master
| 2021-01-16T22:45:57.372343
| 2015-03-25T13:26:36
| 2015-03-25T15:09:39
| 32,457,503
| 0
| 0
| null | 2015-03-18T12:32:16
| 2015-03-18T12:32:16
| null |
UTF-8
|
Java
| false
| false
| 5,445
|
java
|
/*
* Copyright (C) 2010-2014 Hamburg Sud and the contributors.
*
* 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.aludratest.service.gui.web.selenium.selenium2;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import org.databene.commons.BeanUtil;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.BrowserType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.HttpCommandExecutor;
import org.openqa.selenium.remote.LocalFileDetector;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.safari.SafariDriver;
/** Enumerates the available web drivers for Selenium 2.
* @author Volker Bergmann */
public class Selenium2Driver {
// Note: Needed to avoid 'enum' approach since this would make plexus' generate-metadata goal fail which considers a method
// call in an enum constructor call to be a syntax error
private static final Map<String, Selenium2Driver> INSTANCES = new HashMap<String, Selenium2Driver>();
// Constants for the instances ---------------------------------------------
/** Firefox driver */
public static Selenium2Driver FIREFOX = new Selenium2Driver("FIREFOX", BrowserType.FIREFOX, FirefoxDriver.class,
DesiredCapabilities.firefox());
/** Internet Explorer driver */
public static Selenium2Driver INTERNET_EXPLORER = new Selenium2Driver("INTERNET_EXPLORER", BrowserType.IE, InternetExplorerDriver.class,
DesiredCapabilities.internetExplorer());
/** HTMLUnit driver */
public static Selenium2Driver HTML_UNIT = new Selenium2Driver("HTML_UNIT", BrowserType.HTMLUNIT, HtmlUnitDriver.class,
DesiredCapabilities.htmlUnit());
/** Google Chrome driver */
public static Selenium2Driver CHROME = new Selenium2Driver("CHROME", BrowserType.GOOGLECHROME, ChromeDriver.class, createChromeCaps());
/** Safari driver */
public static Selenium2Driver SAFARI = new Selenium2Driver("SAFARI", BrowserType.SAFARI, SafariDriver.class, DesiredCapabilities.safari());
/** PhantomJS driver */
public static Selenium2Driver PHANTOMJS = new Selenium2Driver("PHANTOMJS", BrowserType.PHANTOMJS, RemoteWebDriver.class,
DesiredCapabilities.phantomjs());
// attributes --------------------------------------------------------------
private final String browserName;
private final Class<? extends WebDriver> driverClass;
private final DesiredCapabilities capabilities;
// constructor -------------------------------------------------------------
private Selenium2Driver(String driverName, String browserName, Class<? extends WebDriver> driverClass,
DesiredCapabilities capabilities) {
this.browserName = browserName;
this.driverClass = driverClass;
this.capabilities = capabilities;
INSTANCES.put(driverName, this);
}
// public interface --------------------------------------------------------
/** @return the name of the related browser */
public String getBrowserName() {
return browserName;
}
/** @return a freshly created instance of the related WebDriver class */
public WebDriver newLocalDriver() {
return BeanUtil.newInstance(driverClass);
}
/** @param url the URL for which to create a WebDriver instance.
* @return a freshly created instance of the related WebDriver class */
public WebDriver newRemoteDriver(URL url) {
HttpCommandExecutor executor = new HttpCommandExecutor(url);
RemoteWebDriver driver = new RemoteWebDriver(executor, capabilities);
driver.setFileDetector(new LocalFileDetector());
return driver;
}
// public static interface -------------------------------------------------
/** @param driverName the name of the driver
* @return the driver instance associated with the driverName
* @throws IllegalArgumentException if no driver is configured with this name */
public static Selenium2Driver valueOf(String driverName) {
Selenium2Driver driver = INSTANCES.get(driverName);
if (driver == null) {
throw new IllegalArgumentException("Unknown driver: " + driverName);
}
return driver;
}
// private helper methods --------------------------------------------------
private static DesiredCapabilities createChromeCaps() {
DesiredCapabilities caps = DesiredCapabilities.chrome();
ChromeOptions opts = new ChromeOptions();
opts.addArguments("--disable-extensions");
caps.setCapability(ChromeOptions.CAPABILITY, opts);
return caps;
}
}
|
[
"Florian.Albrecht@hamburgsud.com"
] |
Florian.Albrecht@hamburgsud.com
|
f970be66571ee78f1472846a667f97e5de2c3235
|
13b88ef63b52cf4dfa119db2a7be3f283bb919c7
|
/03-spring-mvc/03-spring-mvc-simple/src/main/java/com/myimooc/spring/mvc/simple/web/controller/HelloMvcController.java
|
8e61009421fb14fcbfd153ffaf7073e6f1b20993
|
[] |
no_license
|
kgh0/study-imooc
|
a99fcd3a91db4d6559819884278f94e230bfa56e
|
9d8b19e833efd47a3674a0ff208c713625ba0641
|
refs/heads/master
| 2022-04-25T04:15:08.323023
| 2020-04-28T23:03:53
| 2020-04-28T23:03:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 938
|
java
|
package com.myimooc.spring.mvc.simple.web.controller;
import com.myimooc.spring.mvc.simple.service.HelloService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
/**
* 测试控制器
*
* @author zc 2017-02-17
*/
@Controller
@RequestMapping("/hello")
public class HelloMvcController {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Resource(name = "helloService")
private HelloService helloService;
@RequestMapping("/mvc")
public ModelAndView helloMvc(ModelAndView modelAndView) {
logger.info("执行" + helloService.sayHello());
modelAndView.addObject("name", "Thymeleaf");
modelAndView.setViewName("/home");
return modelAndView;
}
}
|
[
"zccoder@aliyun.com"
] |
zccoder@aliyun.com
|
d01777c625ba2b0ddfb808b7bac2616bac766bb9
|
b7429cb7d9f3197d33121d366050183dd7447111
|
/app/src/main/java/com/hex/express/iwant/activities/CropActivity.java
|
338f11fb4dd6f3e2ac8238894751f6d888d9b218
|
[] |
no_license
|
hexiaoleione/biaowang_studio
|
28c719909667f131637205de79bb8cc72fc52545
|
1735f31cd4e25ba5e08dd117ba7492186dcee8b0
|
refs/heads/master
| 2021-07-10T00:03:42.022656
| 2019-02-12T03:35:51
| 2019-02-12T03:35:51
| 144,809,142
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,703
|
java
|
package com.hex.express.iwant.activities;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.TextView;
import com.hex.express.iwant.R;
import com.hex.express.iwant.utils.AppUtils;
import com.hex.express.iwant.views.ClipImageView;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
public class CropActivity extends Activity {
private ClipImageView image;
private String path;
// 裁切后是否返回路径,默认是返回bitmap字节数据,如果需要返回路径,就需要先生成图片再返回
private boolean backPath;
private ImageLoader loader;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);// 去掉标题栏
/*this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);// 去掉信息栏
*/ setContentView(R.layout.activity_crop);
loader=ImageLoader.getInstance();
loader.init(ImageLoaderConfiguration.createDefault(this));
image = (ClipImageView) findViewById(R.id.iv);
path = getIntent().getStringExtra("path");
backPath = getIntent().getBooleanExtra("backPath", false);
if (!path.startsWith("content"))
loader.displayImage("file://" + path, image);
//Picasso.with(this).load("file://" + path).into(image);
else
loader.displayImage(path, image);
//loader.load(path).into(image);
TextView right = (TextView) findViewById(R.id.tv_right);
right.setText("确定");
right.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
ok();
}
});
}
public void ok() {
// 此处获取剪裁后的bitmap
if (!backPath) {
Bitmap bitmap = image.clip();
// 由于Intent传递bitmap不能超过40k,此处使用二进制数组传递
ByteArrayOutputStream baos = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);
byte[] bitmapByte = baos.toByteArray();
Intent intent = new Intent();
intent.putExtra("result", bitmapByte);
setResult(RESULT_OK, intent);
finish();
} else
loadPath();
}
public void loadPath() {
new Thread(new Runnable() {
@Override
public void run() {
Bitmap bitmap = image.clip();
File cacheDir = null;
AppUtils.saveBitmap(bitmap, null);
if (android.os.Environment.getExternalStorageState().equals(
android.os.Environment.MEDIA_MOUNTED)) {
cacheDir = getExternalCacheDir();
} else {
cacheDir = getCacheDir();
}
File file = new File(cacheDir.getAbsolutePath() + "/"
+ System.currentTimeMillis() + ".jpg");
saveBitmap(bitmap, file);
Intent intent = new Intent();
intent.putExtra("result", file.getAbsolutePath());
setResult(RESULT_OK, intent);
finish();
}
}).start();
}
/** 将bitmap保存 */
private boolean saveBitmap(Bitmap bitmap, File file) {
if (bitmap != null && file != null) {
FileOutputStream out = null;
try {
out = new FileOutputStream(file);
/** quality,质量,0-100 */
return bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
} catch (Exception e) {
e.printStackTrace();
} finally {
if (out != null) {
try {
out.flush();
out.close();
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
}
return false;
}
}
|
[
"798711147@qq.com"
] |
798711147@qq.com
|
1cb4db2b6f3835cd507f932a54e4f808294670fa
|
5a8123795b9c7f1dfff769df5425357707a8c336
|
/src/Coalesce.Services/Search/service-data/src/main/java/com/incadencecorp/coalesce/services/search/service/data/model/SearchQuery.java
|
9609d5a3eb71eaddaf768e70033662e6b0807f81
|
[] |
no_license
|
kietly/coalesce
|
4d59d528c55565ff82a519e3bcc2330bbd6ec232
|
25af66fb95398b26aedca4513cb6d31b18787e6b
|
refs/heads/master
| 2020-03-16T23:21:21.601113
| 2018-03-26T17:45:10
| 2018-03-26T17:45:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,330
|
java
|
package com.incadencecorp.coalesce.services.search.service.data.model;
import com.incadencecorp.coalesce.services.api.search.SortByType;
import java.util.ArrayList;
import java.util.List;
public class SearchQuery {
private SearchGroup group;
private int pageSize;
private int pageNumber;
private List<SortByType> sortBy;
private List<String> propertyNames;
public SearchGroup getGroup()
{
return group;
}
public void setGroup(SearchGroup group)
{
this.group = group;
}
public int getPageSize()
{
return pageSize;
}
public void setPageSize(int pageSize)
{
this.pageSize = pageSize;
}
public int getPageNumber()
{
return pageNumber;
}
public void setPageNumber(int pageNumber)
{
this.pageNumber = pageNumber;
}
public List<SortByType> getSortBy()
{
return sortBy!= null ? sortBy : new ArrayList<SortByType>();
}
public void setSortBy(List<SortByType> sortBy)
{
this.sortBy = sortBy;
}
public List<String> getPropertyNames()
{
return propertyNames!= null ? propertyNames : new ArrayList<String>();
}
public void setPropertyNames(List<String> propertyNames)
{
this.propertyNames = propertyNames;
}
}
|
[
"dclemenzi@incadencecorp.com"
] |
dclemenzi@incadencecorp.com
|
5db5318b13dda47d043367e223e372b757d16956
|
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
|
/aliyun-java-sdk-cr/src/main/java/com/aliyuncs/cr/model/v20181201/GetRepositoryResponse.java
|
648df2080e8dff911773d16cb926f373b9736f1e
|
[
"Apache-2.0"
] |
permissive
|
aliyun/aliyun-openapi-java-sdk
|
a263fa08e261f12d45586d1b3ad8a6609bba0e91
|
e19239808ad2298d32dda77db29a6d809e4f7add
|
refs/heads/master
| 2023-09-03T12:28:09.765286
| 2023-09-01T09:03:00
| 2023-09-01T09:03:00
| 39,555,898
| 1,542
| 1,317
|
NOASSERTION
| 2023-09-14T07:27:05
| 2015-07-23T08:41:13
|
Java
|
UTF-8
|
Java
| false
| false
| 3,851
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.cr.model.v20181201;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.cr.transform.v20181201.GetRepositoryResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class GetRepositoryResponse extends AcsResponse {
private String summary;
private Long createTime;
private Boolean isSuccess;
private String instanceId;
private String repoStatus;
private String repoType;
private String repoBuildType;
private Long modifiedTime;
private String requestId;
private String repoId;
private String code;
private String repoNamespaceName;
private Boolean tagImmutability;
private String repoName;
private String detail;
public String getSummary() {
return this.summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public Long getCreateTime() {
return this.createTime;
}
public void setCreateTime(Long createTime) {
this.createTime = createTime;
}
public Boolean getIsSuccess() {
return this.isSuccess;
}
public void setIsSuccess(Boolean isSuccess) {
this.isSuccess = isSuccess;
}
public String getInstanceId() {
return this.instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
public String getRepoStatus() {
return this.repoStatus;
}
public void setRepoStatus(String repoStatus) {
this.repoStatus = repoStatus;
}
public String getRepoType() {
return this.repoType;
}
public void setRepoType(String repoType) {
this.repoType = repoType;
}
public String getRepoBuildType() {
return this.repoBuildType;
}
public void setRepoBuildType(String repoBuildType) {
this.repoBuildType = repoBuildType;
}
public Long getModifiedTime() {
return this.modifiedTime;
}
public void setModifiedTime(Long modifiedTime) {
this.modifiedTime = modifiedTime;
}
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public String getRepoId() {
return this.repoId;
}
public void setRepoId(String repoId) {
this.repoId = repoId;
}
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public String getRepoNamespaceName() {
return this.repoNamespaceName;
}
public void setRepoNamespaceName(String repoNamespaceName) {
this.repoNamespaceName = repoNamespaceName;
}
public Boolean getTagImmutability() {
return this.tagImmutability;
}
public void setTagImmutability(Boolean tagImmutability) {
this.tagImmutability = tagImmutability;
}
public String getRepoName() {
return this.repoName;
}
public void setRepoName(String repoName) {
this.repoName = repoName;
}
public String getDetail() {
return this.detail;
}
public void setDetail(String detail) {
this.detail = detail;
}
@Override
public GetRepositoryResponse getInstance(UnmarshallerContext context) {
return GetRepositoryResponseUnmarshaller.unmarshall(this, context);
}
@Override
public boolean checkShowJsonItemName() {
return false;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
d4aeebfd0c87d5730828517b6e93bd26ff7fcd04
|
c7f76a2e4fded82db9fe743a7a1c9ec932fee4b9
|
/Discord_Bot/src/main/java/diamssword/bot/alexa/PlayNow.java
|
d58ec2aa5df2c51cffa2c24e36dccf0b5cd5dec7
|
[] |
no_license
|
Diamssword/DiamsBot
|
97975f9a2a4763aba71df95da7f69c0289cbe8ac
|
2374063b4f47c25863ea6e200cc66797437614b0
|
refs/heads/master
| 2020-07-10T14:51:30.337466
| 2020-01-16T23:14:14
| 2020-01-16T23:14:14
| 197,848,059
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,175
|
java
|
package diamssword.bot.alexa;
import java.io.IOException;
import com.diamssword.bot.api.References;
import net.dv8tion.jda.core.entities.Member;
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
public class PlayNow implements ISubAlexa
{
@Override
public String[] getSubCommand() {
return new String[] {"playnow","playn","pn"};
}
@Override
public void execute(MessageReceivedEvent event, String trigger, String after) {
YTVideoJson[] vids;
try {
vids = HttpClient.searchvid(5, after);
if(vids.length >=1)
{
Member memb =event.getGuild().getMemberById(event.getAuthor().getId());
References.PlayerManager.loadTrackForMember("https://www.youtube.com/watch?v="+vids[0].id.videoId, event.getGuild().getId(), memb);
event.getChannel().sendMessage("**Playing https://www.youtube.com/watch?v="+vids[0].id.videoId+"**").queue();
}
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
public String getName() {
return "PlayNow";
}
@Override
public String getDesc() {
return "play the first youtbue video found whit the research, Usage: play <research>";
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
6eff89f7a56f2f8027a420c4d6667702e9006402
|
54f352a242a8ad6ff5516703e91da61e08d9a9e6
|
/Source Codes/CodeJamData/14/11/5.java
|
c97c0145efd7408fa522546114183604bc6b73bc
|
[] |
no_license
|
Kawser-nerd/CLCDSA
|
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
|
aee32551795763b54acb26856ab239370cac4e75
|
refs/heads/master
| 2022-02-09T11:08:56.588303
| 2022-01-26T18:53:40
| 2022-01-26T18:53:40
| 211,783,197
| 23
| 9
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,405
|
java
|
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class ProblemA {
static final String IMP = "NOT POSSIBLE";
/**
* @param args
*/
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
int T = in.nextInt();
for (int cn = 1 ; cn <= T ; cn++) {
int N = in.nextInt();
int L = in.nextInt();
char[][] flow = new char[N][];
for (int i = 0 ; i < N ; i++) {
flow[i] = in.next().toCharArray();
}
char[][] req = new char[N][];
for (int i = 0 ; i < N ; i++) {
req[i] = in.next().toCharArray();
}
out.println(String.format("Case #%d: %s", cn, solve(flow, req)));
}
out.flush();
}
private static String solve(char[][] flow, char[][] req) {
int N = flow.length;
int L = flow[0].length;
int minimumFlip = Integer.MAX_VALUE;
for (int i = 0 ; i < N ; i++) {
for (int j = 0 ; j < N ; j++) {
boolean[] needFlip = change(flow[i], req[j]);
if (candoit(flow, req, needFlip)) {
int fliped = 0;
for (int k = 0 ; k < L ; k++) {
if (needFlip[k]) {
fliped++;
}
}
minimumFlip = Math.min(minimumFlip, fliped);
}
}
}
return (minimumFlip == Integer.MAX_VALUE) ? IMP : String.format("%d", minimumFlip);
}
private static boolean candoit(char[][] flow, char[][] req, boolean[] needFlip) {
int N = flow.length;
int L = needFlip.length;
Set<String> flows = new HashSet<String>();
for (int i = 0 ; i < N ; i++) {
StringBuilder gainFlow = new StringBuilder();
for (int j = 0 ; j < L ; j++) {
if (needFlip[j]) {
gainFlow.append((flow[i][j] == '1') ? '0' : '1');
} else {
gainFlow.append(flow[i][j]);
}
}
flows.add(gainFlow.toString());
}
Set<String> reqs = new HashSet<String>();
for (int i = 0 ; i < N ; i++) {
reqs.add(String.valueOf(req[i]));
}
for (String f : flows) {
if (reqs.contains(f)) {
reqs.remove(f);
}
}
return reqs.size() == 0;
}
private static boolean[] change(char[] flow, char[] req) {
int L = flow.length;
boolean[] change = new boolean[L];
for (int i = 0 ; i < L ; i++) {
if (flow[i] != req[i]) {
change[i] = true;
}
}
return change;
}
public static void debug(Object... o) {
System.err.println(Arrays.deepToString(o));
}
}
|
[
"kwnafi@yahoo.com"
] |
kwnafi@yahoo.com
|
b91016283198df9c92e2d118bce0529d7caf4064
|
5c328b73629d43c47a5695158162cd0814dc1dc3
|
/java/org/apache/catalina/util/Introspection.java
|
bd5f10f8df4b3d9c6606557efd05f912736cf236
|
[
"bzip2-1.0.6",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"CPL-1.0",
"CDDL-1.0",
"Zlib",
"EPL-1.0",
"LZMA-exception"
] |
permissive
|
cxyroot/Tomcat8Src
|
8cd56d0850c0f59d4709474f761a984b7caadaf6
|
14608ee22b05083bb8d5dc813f46447cb4baba76
|
refs/heads/master
| 2023-07-25T12:44:07.797728
| 2022-12-06T14:46:22
| 2022-12-06T14:46:22
| 223,338,251
| 2
| 0
|
Apache-2.0
| 2023-07-07T21:16:21
| 2019-11-22T06:27:01
|
Java
|
UTF-8
|
Java
| false
| false
| 7,019
|
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.catalina.util;
import java.beans.Introspector;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.security.AccessController;
import java.security.PrivilegedAction;
import org.apache.catalina.Context;
import org.apache.catalina.Globals;
import org.apache.juli.logging.Log;
import org.apache.tomcat.util.ExceptionUtils;
import org.apache.tomcat.util.res.StringManager;
/**
* Provides introspection utilities that either require knowledge of Tomcat
* internals or are solely used by Tomcat internals.
*/
public class Introspection {
private static final StringManager sm =
StringManager.getManager("org.apache.catalina.util");
/**
* Extract the Java Bean property name from the setter name.
*
* Note: This method assumes that the method name has already been checked
* for correctness.
* @param setter The setter method
* @return the bean property name
*/
public static String getPropertyName(Method setter) {
return Introspector.decapitalize(setter.getName().substring(3));
}
/**
* Determines if a method has a valid name and signature for a Java Bean
* setter.
*
* @param method The method to test
*
* @return <code>true</code> if the method does have a valid name and
* signature, else <code>false</code>
*/
public static boolean isValidSetter(Method method) {
if (method.getName().startsWith("set")
&& method.getName().length() > 3
&& method.getParameterTypes().length == 1
&& method.getReturnType().getName().equals("void")) {
return true;
}
return false;
}
/**
* Determines if a method is a valid lifecycle callback method.
*
* @param method
* The method to test
*
* @return <code>true</code> if the method is a valid lifecycle callback
* method, else <code>false</code>
*/
public static boolean isValidLifecycleCallback(Method method) {
if (method.getParameterTypes().length != 0
|| Modifier.isStatic(method.getModifiers())
|| method.getExceptionTypes().length > 0
|| !method.getReturnType().getName().equals("void")) {
return false;
}
return true;
}
/**
* Obtain the declared fields for a class taking account of any security
* manager that may be configured.
* @param clazz The class to introspect
* @return the class fields as an array
*/
public static Field[] getDeclaredFields(final Class<?> clazz) {
Field[] fields = null;
if (Globals.IS_SECURITY_ENABLED) {
fields = AccessController.doPrivileged(
new PrivilegedAction<Field[]>(){
@Override
public Field[] run(){
return clazz.getDeclaredFields();
}
});
} else {
fields = clazz.getDeclaredFields();
}
return fields;
}
/**
* Obtain the declared methods for a class taking account of any security
* manager that may be configured.
* @param clazz The class to introspect
* @return the class methods as an array
*/
public static Method[] getDeclaredMethods(final Class<?> clazz) {
Method[] methods = null;
if (Globals.IS_SECURITY_ENABLED) {
methods = AccessController.doPrivileged(
new PrivilegedAction<Method[]>(){
@Override
public Method[] run(){
return clazz.getDeclaredMethods();
}
});
} else {
methods = clazz.getDeclaredMethods();
}
return methods;
}
/**
* Attempt to load a class using the given Container's class loader. If the
* class cannot be loaded, a debug level log message will be written to the
* Container's log and null will be returned.
* @param context The class loader of this context will be used to attempt
* to load the class
* @param className The class name
* @return the loaded class or <code>null</code> if loading failed
*/
public static Class<?> loadClass(Context context, String className) {
ClassLoader cl = context.getLoader().getClassLoader();
Log log = context.getLogger();
Class<?> clazz = null;
try {
clazz = cl.loadClass(className);
} catch (ClassNotFoundException | NoClassDefFoundError | ClassFormatError e) {
log.debug(sm.getString("introspection.classLoadFailed", className), e);
} catch (Throwable t) {
ExceptionUtils.handleThrowable(t);
log.debug(sm.getString("introspection.classLoadFailed", className), t);
}
return clazz;
}
/**
* Converts the primitive type to its corresponding wrapper.
*
* @param clazz
* Class that will be evaluated
* @return if the parameter is a primitive type returns its wrapper;
* otherwise returns the same class
*/
public static Class<?> convertPrimitiveType(Class<?> clazz) {
if (clazz.equals(char.class)) {
return Character.class;
} else if (clazz.equals(int.class)) {
return Integer.class;
} else if (clazz.equals(boolean.class)) {
return Boolean.class;
} else if (clazz.equals(double.class)) {
return Double.class;
} else if (clazz.equals(byte.class)) {
return Byte.class;
} else if (clazz.equals(short.class)) {
return Short.class;
} else if (clazz.equals(long.class)) {
return Long.class;
} else if (clazz.equals(float.class)) {
return Float.class;
} else {
return clazz;
}
}
}
|
[
"1076675153@qq.com"
] |
1076675153@qq.com
|
951fc40162268bcacbacfb989d709233fb2b93ad
|
d8db7ff51e6043ceafda60b9694a724e0892e80d
|
/03-Hadoop/hadoop-project/hadoop-mapred/src/main/java/com/leolian/bigdata/hadoop/mapreduce/skew/thrid/WordCountSkewThreeMapper.java
|
7d269bc6a225666e085f35986e152dbf2daa6356
|
[] |
no_license
|
comeonlian/bigdata
|
600667a0b867072b325aad31411f8eb1e41a6385
|
c5bfe8dd80f8a491a8813a82a9d928e05e101a6e
|
refs/heads/master
| 2023-03-14T04:36:09.951520
| 2021-02-28T14:28:21
| 2021-02-28T14:28:21
| 344,332,906
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 629
|
java
|
package com.leolian.bigdata.hadoop.mapreduce.skew.thrid;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
import java.io.IOException;
/**
* @description:
* @author lianliang
* @date 2018/12/8 22:07
*/
public class WordCountSkewThreeMapper extends Mapper<Text, Text, Text, IntWritable> {
@Override
protected void map(Text key, Text value, Context context) throws IOException, InterruptedException {
context.write(new Text(key), new IntWritable(Integer.valueOf(value.toString())));
}
}
|
[
"lianliang2014@126.com"
] |
lianliang2014@126.com
|
5e3fd78b7b8cfb78270c5f81f559efd3a7108fa9
|
2f56a24ecc0d796464814bbf22f194d69ac8b2c6
|
/src/main/java/com/github/chen0040/gp/treegp/program/operators/Plus.java
|
82615d462a003914560f91018b2eaa21bb0c45f7
|
[
"MIT"
] |
permissive
|
huajun262/java-genetic-programming
|
cc84b503b74906915aa4e23057ea79bc318e7b40
|
498fc8f4407ea9d45f2e0ac797a8948da337c74f
|
refs/heads/master
| 2022-03-09T15:07:00.462977
| 2017-06-23T05:21:44
| 2017-06-23T05:21:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 661
|
java
|
package com.github.chen0040.gp.treegp.program.operators;
import com.github.chen0040.gp.commons.Observation;
import com.github.chen0040.gp.treegp.program.Operator;
import com.github.chen0040.gp.treegp.program.Primitive;
/**
* Created by xschen on 11/5/2017.
*/
public class Plus extends Operator {
private static final long serialVersionUID = -5032027501767121684L;
public Plus(){
super(2, "+");
}
@Override public void execute(Observation observation){
double x1 = getInput(0);
double x2 = getInput(1);
setValue(x1 + x2);
}
@Override public Primitive makeCopy() {
return new Plus().copy(this);
}
}
|
[
"xs0040@gmail.com"
] |
xs0040@gmail.com
|
1440d1564d7b2eec7b1b2fe603ff29306ebb3291
|
4ba3a51538e6e65e62593beb2c7a38b891c9e907
|
/OA2/OverlapRectangle.java
|
c4aa138168a32f4ab773f1cd26cec36ec5615704
|
[] |
no_license
|
RuiLu/Xel-Ha
|
86c92daf5d6f849b8ae44e76d834375354301a7d
|
cad5404ec91a5fe6bb84094564805682c56a104b
|
refs/heads/master
| 2021-01-10T19:27:30.551992
| 2017-02-22T19:52:37
| 2017-02-22T19:52:37
| 55,649,444
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 716
|
java
|
package Amazon.OA2;
/*
* 给两个长方形的topLeft和bottomRight坐标, 判断这两个长方形是否重叠
*/
class Point {
int x;
int y;
public Point(int x, int y) {
this.x = x;
this.y = y;
}
}
public class OverlapRectangle {
public static void main(String[] args) {
Point l1 = new Point(-3, 4);
Point r1 = new Point(3, 0);
Point l2 = new Point(4, 2);
Point r2 = new Point(9, -1);
System.out.println(check(l1, r1, l2, r2));
}
// Returns true if two rectangles (l1, r1) and (l2, r2) overlap
private static boolean check(Point l1, Point r1, Point l2, Point r2) {
if (l1.x > r2.x || l2.x > r1.x) return false;
if (l1.y < r2.y || l2.y < r1.y) return false;
return true;
}
}
|
[
"rlu0213@hotmail.com"
] |
rlu0213@hotmail.com
|
3e11ddac939074f0aec5ce1cd111787bb5018d60
|
95bca8b42b506860014f5e7f631490f321f51a63
|
/dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetUsersAction.java
|
3e794e7e64571e3a14cf3e8fdef266e3d9d979b4
|
[
"BSD-3-Clause"
] |
permissive
|
hispindia/HP-2.7
|
d5174d2c58423952f8f67d9846bec84c60dfab28
|
bc101117e8e30c132ce4992a1939443bf7a44b61
|
refs/heads/master
| 2022-12-25T04:13:06.635159
| 2020-09-29T06:32:53
| 2020-09-29T06:32:53
| 84,940,096
| 0
| 0
|
BSD-3-Clause
| 2022-12-15T23:53:32
| 2017-03-14T11:13:27
|
Java
|
UTF-8
|
Java
| false
| false
| 3,912
|
java
|
package org.hisp.dhis.commons.action;
/*
* Copyright (c) 2004-2012, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the HISP project nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.ListIterator;
import org.hisp.dhis.paging.ActionPagingSupport;
import org.hisp.dhis.user.User;
import org.hisp.dhis.user.UserService;
import org.hisp.dhis.user.comparator.UserComparator;
/**
* @author mortenoh
*/
public class GetUsersAction
extends ActionPagingSupport<User>
{
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
private UserService userService;
public void setUserService( UserService userService )
{
this.userService = userService;
}
// -------------------------------------------------------------------------
// Input & Output
// -------------------------------------------------------------------------
private String key;
public void setKey( String key )
{
this.key = key;
}
private List<User> users;
public List<User> getUsers()
{
return users;
}
// -------------------------------------------------------------------------
// Action Implementation
// -------------------------------------------------------------------------
@Override
public String execute()
throws Exception
{
users = new ArrayList<User>( userService.getAllUsers() );
if ( key != null )
{
filterByKey( key, true );
}
Collections.sort( users, new UserComparator() );
if ( usePaging )
{
this.paging = createPaging( users.size() );
users = users.subList( paging.getStartPos(), paging.getEndPos() );
}
return SUCCESS;
}
private void filterByKey( String key, boolean ignoreCase )
{
ListIterator<User> iterator = users.listIterator();
if ( ignoreCase )
{
key = key.toLowerCase();
}
while ( iterator.hasNext() )
{
User user = iterator.next();
String name = ignoreCase ? user.getName().toLowerCase() : user.getName();
if ( name.indexOf( key ) == -1 )
{
iterator.remove();
}
}
}
}
|
[
"mithilesh.hisp@gmail.com"
] |
mithilesh.hisp@gmail.com
|
456f49acfa89c8bbc1d4e3e780b721d1bfb6b803
|
ca919a160f4752059abd913c194846a428f8470c
|
/JavaEE开发的颠覆者 Spring Boot实战/SourceCode/SpringBootLearning/highlight_springmvc4/src/main/java/com/wisely/highlight_springmvc4/web/ch4_5/SseController.java
|
84680e0f8c26b89b266832962cc9be2677a4115e
|
[] |
no_license
|
CoderDream/learnJava
|
24b5e7ff0afbf76c44be4c1d33eee109727576ed
|
a86d2a436a3a74f0f9575d0e5e1dc65e9754c788
|
refs/heads/master
| 2022-12-02T14:57:18.206180
| 2020-08-14T18:24:46
| 2020-08-14T18:24:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 737
|
java
|
package com.wisely.highlight_springmvc4.web.ch4_5;
import java.util.Random;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class SseController {
@RequestMapping(value = "/push", produces = "text/event-stream") // 1注意,这里使用输出的媒体类型为text/event-stream,这是服务器端SSE的支持,本例演示每5秒钟向浏览器推送随机消息
public @ResponseBody String push() {
Random r = new Random();
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
return "data:Testing 1,2,3" + r.nextInt() + "\n\n";
}
}
|
[
"nick_aisong@163.com"
] |
nick_aisong@163.com
|
b9abe8e5b7104a64718d8755879d0bb56ca3f88c
|
1c5e8605c1a4821bc2a759da670add762d0a94a2
|
/src/dahua/fdc/basedata/AcctAccreditSchemeCollection.java
|
767a2683b7b86a19e887abd21167e6c2673d4299
|
[] |
no_license
|
shxr/NJG
|
8195cfebfbda1e000c30081399c5fbafc61bb7be
|
1b60a4a7458da48991de4c2d04407c26ccf2f277
|
refs/heads/master
| 2020-12-24T06:51:18.392426
| 2016-04-25T03:09:27
| 2016-04-25T03:09:27
| 19,804,797
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,257
|
java
|
package com.kingdee.eas.fdc.basedata;
import com.kingdee.bos.dao.AbstractObjectCollection;
import com.kingdee.bos.dao.IObjectPK;
public class AcctAccreditSchemeCollection extends AbstractObjectCollection
{
public AcctAccreditSchemeCollection()
{
super(AcctAccreditSchemeInfo.class);
}
public boolean add(AcctAccreditSchemeInfo item)
{
return addObject(item);
}
public boolean addCollection(AcctAccreditSchemeCollection item)
{
return addObjectCollection(item);
}
public boolean remove(AcctAccreditSchemeInfo item)
{
return removeObject(item);
}
public AcctAccreditSchemeInfo get(int index)
{
return(AcctAccreditSchemeInfo)getObject(index);
}
public AcctAccreditSchemeInfo get(Object key)
{
return(AcctAccreditSchemeInfo)getObject(key);
}
public void set(int index, AcctAccreditSchemeInfo item)
{
setObject(index, item);
}
public boolean contains(AcctAccreditSchemeInfo item)
{
return containsObject(item);
}
public boolean contains(Object key)
{
return containsKey(key);
}
public int indexOf(AcctAccreditSchemeInfo item)
{
return super.indexOf(item);
}
}
|
[
"shxr_code@126.com"
] |
shxr_code@126.com
|
c4d6b0196406eb45b72a385e54dbe8a6b08b6905
|
bb993141b2a8c90e2978f6f39b167545266d901e
|
/changgou-parent/changgou-service/changgou-service-content/src/main/java/com/changgou/content/dao/ContentMapper.java
|
c72695f41f261b6f8f7ea921c6217cc46386bcdc
|
[
"MIT"
] |
permissive
|
betterGa/ChangGou
|
615bbbd8d31aa995a0db7178011b442f45bd6b10
|
adf5630fd88d3b484c8e1651338b0f5088841325
|
refs/heads/master
| 2023-07-24T12:51:12.330999
| 2021-09-06T13:37:26
| 2021-09-06T13:37:26
| 341,930,752
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 266
|
java
|
package com.changgou.content.dao;
import com.changgou.content.pojo.Content;
import tk.mybatis.mapper.common.Mapper;
/****
* @Author:shenkunlin
* @Description:Content的Dao
* @Date 2019/6/14 0:12
*****/
public interface ContentMapper extends Mapper<Content> {
}
|
[
"2086543608@qq.com"
] |
2086543608@qq.com
|
eb6ba3cd2ff6e30121509f6f184e24226e8b636e
|
7bea7fb60b5f60f89f546a12b43ca239e39255b5
|
/src/com/sun/org/apache/xpath/internal/operations/Or.java
|
5ead10eeb43131a119ffc26af0f252bd67e761b3
|
[] |
no_license
|
sorakeet/fitcorejdk
|
67623ab26f1defb072ab473f195795262a8ddcdd
|
f946930a826ddcd688b2ddbb5bc907d2fc4174c3
|
refs/heads/master
| 2021-01-01T05:52:19.696053
| 2017-07-15T01:33:41
| 2017-07-15T01:33:41
| 97,292,673
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,384
|
java
|
/**
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
* <p>
* Copyright 1999-2004 The Apache Software Foundation.
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.
* <p>
* $Id: Or.java,v 1.2.4.1 2005/09/14 21:31:41 jeffsuttor Exp $
*/
/**
* Copyright 1999-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* $Id: Or.java,v 1.2.4.1 2005/09/14 21:31:41 jeffsuttor Exp $
*/
package com.sun.org.apache.xpath.internal.operations;
import com.sun.org.apache.xpath.internal.XPathContext;
import com.sun.org.apache.xpath.internal.objects.XBoolean;
import com.sun.org.apache.xpath.internal.objects.XObject;
public class Or extends Operation{
static final long serialVersionUID=-644107191353853079L;
public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException{
XObject expr1=m_left.execute(xctxt);
if(!expr1.bool()){
XObject expr2=m_right.execute(xctxt);
return expr2.bool()?XBoolean.S_TRUE:XBoolean.S_FALSE;
}else
return XBoolean.S_TRUE;
}
public boolean bool(XPathContext xctxt)
throws javax.xml.transform.TransformerException{
return (m_left.bool(xctxt)||m_right.bool(xctxt));
}
}
|
[
"panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7"
] |
panxiaoping@9af151c5-2e68-9a40-a710-8967c58c11f7
|
0070d51dd3def298617168ed446e56308cd4fb8b
|
61fea3d3281a454ca9caa741b81b2978e8cb2c1f
|
/Ex_1129/src/ex_string/Ex4_String.java
|
71be7450eeeb4f6b2831cf1653b0bdd142e0d6d3
|
[] |
no_license
|
inayun/java_study
|
c48d9fb52cd1f583bb3b37af738ed3e962d2e52a
|
a46ec90e138586ac5e29a22db6497d27fc1bf336
|
refs/heads/master
| 2021-08-31T17:27:41.769264
| 2017-12-22T07:44:15
| 2017-12-22T07:44:15
| 111,745,809
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 684
|
java
|
package ex_string;
import java.util.Scanner;
public class Ex4_String {
public static void main(String[] args) {
/*
* 회문수 판단하기
* 입력 : 121
* 121은 회문수입니다.
*
* 입력 : 기러기
* 기러기는 회문수 입니다.
*/
Scanner scanner = new Scanner(System.in);
System.out.println("입력 : ");
String input = scanner.next();
String opposite = "";
for( int i = input.length(); i > 0; i-- ) {
opposite += input.charAt(i-1);
}
if(input.equals(opposite)) {
System.out.printf("%s는(은) 회문수입니다.",input);
} else {
System.out.printf("%s는(은) 회문수가 아닙니다.",input);
}
}
}
|
[
"ina-yun@hanmail.net"
] |
ina-yun@hanmail.net
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.