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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7c8f028ad97724a7cd065679eba2347c21936b93 | 7b07a677a6995d77234e40afa4ada584827799e3 | /smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/InvitationRequest.java | d88c0feb716d019b9902499e6f0fdb8111938b69 | [
"Apache-2.0"
] | permissive | chat-sdk/Smack | 3395ee1ff41dbccbe64467bf31047242db7bb660 | 4cd014397c8fdf27a082b074ffe160e0fb1c9720 | refs/heads/master | 2021-01-12T00:08:15.043176 | 2017-01-07T13:55:01 | 2017-01-07T13:55:01 | 78,678,303 | 5 | 2 | null | 2017-01-11T20:46:30 | 2017-01-11T20:46:29 | null | UTF-8 | Java | false | false | 1,419 | java | /**
*
* Copyright 2003-2007 Jive Software.
*
* 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.jivesoftware.smackx.workgroup.agent;
/**
* Request sent by an agent to invite another agent or user.
*
* @author Gaston Dombiak
*/
public class InvitationRequest extends OfferContent {
private String inviter;
private String room;
private String reason;
public InvitationRequest(String inviter, String room, String reason) {
this.inviter = inviter;
this.room = room;
this.reason = reason;
}
public String getInviter() {
return inviter;
}
public String getRoom() {
return room;
}
public String getReason() {
return reason;
}
boolean isUserRequest() {
return false;
}
boolean isInvitation() {
return true;
}
boolean isTransfer() {
return false;
}
}
| [
"flo@geekplace.eu"
] | flo@geekplace.eu |
f1c3da55cd713eec1e844abc4ad83c88f1e072a5 | b280a34244a58fddd7e76bddb13bc25c83215010 | /scmv6/center-task1/src/main/java/com/smate/center/task/model/pdwh/pub/PdwhPubXmlToHandle.java | e5f4d6c8b5c8fff6f075aa63b7ef6515b7e37b18 | [] | no_license | hzr958/myProjects | 910d7b7473c33ef2754d79e67ced0245e987f522 | d2e8f61b7b99a92ffe19209fcda3c2db37315422 | refs/heads/master | 2022-12-24T16:43:21.527071 | 2019-08-16T01:46:18 | 2019-08-16T01:46:18 | 202,512,072 | 2 | 3 | null | 2022-12-16T05:31:05 | 2019-08-15T09:21:04 | Java | UTF-8 | Java | false | false | 2,063 | java | package com.smate.center.task.model.pdwh.pub;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
/**
* 基准库成果xml处理表
*
* @author Administrator
*
*/
@Entity
@Table(name = "PDWH_PUB_XML_TOHANDLE")
public class PdwhPubXmlToHandle implements Serializable {
/**
*
*/
private static final long serialVersionUID = 5987027089929964925L;
private Long tmpId;
private String tmpXml;
private Long insId;
private Long psnId;// 当前操作人:2为默认系统批量导入;
private Integer status;
private String errorMsg;
public PdwhPubXmlToHandle() {
super();
// TODO Auto-generated constructor stub
}
@Id
@Column(name = "TMP_ID")
@SequenceGenerator(name = "SEQ_STORE", sequenceName = "SEQ_PDWH_PUB_XML_TOHANDLE", allocationSize = 1)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_STORE")
public Long getTmpId() {
return tmpId;
}
public void setTmpId(Long tmpId) {
this.tmpId = tmpId;
}
@Column(name = "TMP_XML")
public String getTmpXml() {
return tmpXml;
}
public void setTmpXml(String tmpXml) {
this.tmpXml = tmpXml;
}
@Column(name = "STATUS")
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
@Column(name = "ERROR_MSG")
public String getErrorMsg() {
return errorMsg;
}
public void setErrorMsg(String errorMsg) {
this.errorMsg = errorMsg;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
@Column(name = "INS_ID")
public Long getInsId() {
return insId;
}
public void setInsId(Long insId) {
this.insId = insId;
}
@Column(name = "PSN_ID")
public Long getPsnId() {
return psnId;
}
public void setPsnId(Long psnId) {
this.psnId = psnId;
}
}
| [
"zhiranhe@irissz.com"
] | zhiranhe@irissz.com |
e8240e597aa1bc4892b5138c5e7707c223a2bb99 | ede1fd0d934af8aaf82b0a8c081913a8dfe1416e | /src/com/class25/PaymentTest.java | 49733901e7e8bce0366b9842df9caec96b258f02 | [] | no_license | DannySorto1/eclipse-workSpace | 9a79f007aa963c8230aa98e7944a732f7345b1a7 | ebd93aa5d2b3ee19f757582f341a4c5e9bdc9d77 | refs/heads/master | 2020-05-03T09:59:25.374759 | 2019-07-30T20:34:56 | 2019-07-30T20:34:56 | 178,568,362 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 557 | java | package com.class25;
public class PaymentTest {
public static void main(String[] args) {
Payment obj = new Payment();
obj.makePayment();
MasterCard obj2 = new MasterCard();
obj2.makePayment();
Visa obj3 = new Visa();
obj3.makePayment();
obj3.annualFees();
// achieving run time polymorphism
// Pay-reference variable, Payment-type
// new MasterCard();- creating object
Payment pay = new MasterCard();
pay.closePayment();
pay.makePayment();
Payment pay1 = new Visa();
pay1.closePayment();
pay1.makePayment();
}
}
| [
"Dannysorto1@gmail.com"
] | Dannysorto1@gmail.com |
841e3b8b646a3a1f3c105c6b8603384880c531a1 | 594dbe9ad659263e560e2d84d02dae411e3ff2ca | /glaf/workspace/glaf-isdp/src/main/java/com/glaf/isdp/service/RUtabletreeServiceImpl.java | 269a38132de6104d848302f354719ebdbd0e5eb2 | [] | no_license | eosite/openyourarm | 670b3739f9abb81b36a7d90846b6d2e68217b443 | 7098657ee60bf6749a13c0ea19d1ac1a42a684a0 | refs/heads/master | 2021-05-08T16:38:30.406098 | 2018-01-24T03:38:45 | 2018-01-24T03:38:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,930 | java | package com.glaf.isdp.service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.session.RowBounds;
import org.mybatis.spring.SqlSessionTemplate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.glaf.core.dao.EntityDAO;
import com.glaf.core.id.IdGenerator;
import com.glaf.core.jdbc.DBConnectionFactory;
import com.glaf.core.util.CollectionUtils;
import com.glaf.core.util.DBUtils;
import com.glaf.isdp.domain.RUtabletree;
import com.glaf.isdp.domain.RdataTable;
import com.glaf.isdp.mapper.RUtabletreeMapper;
import com.glaf.isdp.query.RUtabletreeQuery;
import com.glaf.isdp.query.RdataTableQuery;
@Service("com.glaf.isdp.service.rUtabletreeService")
@Transactional(readOnly = true)
public class RUtabletreeServiceImpl implements RUtabletreeService {
protected final Logger logger = LoggerFactory.getLogger(getClass());
protected EntityDAO entityDAO;
protected IdGenerator idGenerator;
protected JdbcTemplate jdbcTemplate;
protected SqlSessionTemplate sqlSessionTemplate;
protected RUtabletreeMapper rUtabletreeMapper;
@Autowired
protected RdataTableService rdataTableService;
public RUtabletreeServiceImpl() {
}
@Transactional
public void bulkInsert(List<RUtabletree> list) {
for (RUtabletree rUtabletree : list) {
if (rUtabletree.getIndexId() == null) {
rUtabletree.setIndexId(idGenerator.nextId("R_UTABLETREE").intValue());
if (StringUtils.isEmpty(rUtabletree.getId())) {
rUtabletree.setId(rUtabletree.getIndexId() + "|");
}
}
}
if (StringUtils.equals(DBUtils.ORACLE, DBConnectionFactory.getDatabaseType())) {
// rUtabletreeMapper.bulkInsertRUtabletree_oracle(list);
} else {
// rUtabletreeMapper.bulkInsertRUtabletree(list);
}
}
@Transactional
public void deleteById(Integer id) {
if (id != null) {
rUtabletreeMapper.deleteRUtabletreeById(id);
}
}
@Transactional
public void deleteByIds(List<Integer> indexIds) {
if (indexIds != null && !indexIds.isEmpty()) {
for (Integer id : indexIds) {
rUtabletreeMapper.deleteRUtabletreeById(id);
}
}
}
public int count(RUtabletreeQuery query) {
return rUtabletreeMapper.getRUtabletreeCount(query);
}
public List<RUtabletree> list(RUtabletreeQuery query) {
List<RUtabletree> list = rUtabletreeMapper.getRUtabletrees(query);
return list;
}
/**
* 根据查询参数获取记录总数
*
* @return
*/
public int getRUtabletreeCountByQueryCriteria(RUtabletreeQuery query) {
return rUtabletreeMapper.getRUtabletreeCount(query);
}
/**
* 根据查询参数获取一页的数据
*
* @return
*/
public List<RUtabletree> getRUtabletreesByQueryCriteria(int start, int pageSize, RUtabletreeQuery query) {
RowBounds rowBounds = new RowBounds(start, pageSize);
List<RUtabletree> rows = sqlSessionTemplate.selectList("getRUtabletrees", query, rowBounds);
return rows;
}
public RUtabletree getRUtabletree(Integer id) {
if (id == null) {
return null;
}
RUtabletree rUtabletree = rUtabletreeMapper.getRUtabletreeById(id);
return rUtabletree;
}
@Transactional
public void save(RUtabletree rUtabletree) {
if (rUtabletree.getIndexId() == null) {
rUtabletree.setIndexId(idGenerator.nextId("R_UTABLETREE").intValue() + 1000000);
if (StringUtils.isEmpty(rUtabletree.getId())) {
rUtabletree.setId(rUtabletree.getIndexId() + "|");
}
rUtabletreeMapper.insertRUtabletree(rUtabletree);
} else {
rUtabletreeMapper.updateRUtabletree(rUtabletree);
}
}
@javax.annotation.Resource
public void setEntityDAO(EntityDAO entityDAO) {
this.entityDAO = entityDAO;
}
@javax.annotation.Resource
public void setIdGenerator(IdGenerator idGenerator) {
this.idGenerator = idGenerator;
}
@javax.annotation.Resource(name = "com.glaf.isdp.mapper.RUtabletreeMapper")
public void setRUtabletreeMapper(RUtabletreeMapper rUtabletreeMapper) {
this.rUtabletreeMapper = rUtabletreeMapper;
}
@javax.annotation.Resource
public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
this.jdbcTemplate = jdbcTemplate;
}
@javax.annotation.Resource
public void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate) {
this.sqlSessionTemplate = sqlSessionTemplate;
}
@Override
public JSONArray getTreeAndChildrenByType(Integer tableType) {
JSONArray jsonArray = new JSONArray();
RUtabletreeQuery query = new RUtabletreeQuery();
query.setTabletype(tableType);
List<RUtabletree> list = this.list(query);
if (CollectionUtils.isNotEmpty(list)) {
JSONObject json, json0;
Map<Integer, JSONObject> map = new HashMap<Integer, JSONObject>(list.size());
for (RUtabletree tree : list) {
json = tree.toJsonObject();
json.put("R", true);
map.put(tree.getIndexId(), json);
jsonArray.add(json);
}
RdataTableQuery query0 = new RdataTableQuery();
List<RdataTable> list0 = rdataTableService.list(query0);
String childrenKey = "children";
if (CollectionUtils.isNotEmpty(list)) {
for (RdataTable dt : list0) {
if (dt.getIndexId() != null && ((json = map.get(dt.getIndexId())) != null)) {
json0 = dt.toJsonObject();
json0.put("tableId", dt.getId());
json0.put("tableName", dt.getTablename());
json0.put("tableNameCN", dt.getName());
json0.put("isSubTable", dt.getIssubtable());
json0.put("indexName", dt.getName());
json0.put("R", true);
if (!json.containsKey(childrenKey)) {
json.put(childrenKey, new JSONArray());
}
json.getJSONArray(childrenKey).add(json0);
}
}
}
}
return jsonArray;
}
}
| [
"weishang80@qq.com"
] | weishang80@qq.com |
f57a3031a496538afebd1a47b21c24d4a38a74c0 | ddee664c330b1a0daa7ff36e4e66896eab4fc7d3 | /app/src/main/java/com/seoul/publicbooksearcher/domain/usecase/UseCase.java | ea5bdf18210e9da7d6528f9fa40cf9612c30b032 | [
"MIT"
] | permissive | MobileSeoul/2015seoul-27 | fcb9c9b961135413e58a6160a06f5ee2d534b99d | cd33efd2e223d1d2a8a474741a5670d267172285 | refs/heads/master | 2021-07-04T10:35:25.080660 | 2017-09-27T00:22:02 | 2017-09-27T00:22:02 | 104,950,996 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 138 | java | package com.seoul.publicbooksearcher.domain.usecase;
public interface UseCase <Result, Argument> {
Result execute(Argument arg);
}
| [
"mobile@seoul.go.kr"
] | mobile@seoul.go.kr |
dcb576312474e56bcad15dbc8e76800dd5df8834 | d887202f9c9e596dbb9c321ea8704c850ed6c0c2 | /src/main/java/com/zgj/mps/model/DeviceResource.java | d35986208bab6b0b5192c459a6b01be2800a60d3 | [] | no_license | GaoJunzhang/vstu-r | a3168458ed9f30bbc49e4cbf506ce0a8c1a06266 | babad392a553f7c14506574536885cc20fb4e7f0 | refs/heads/master | 2022-06-23T13:59:47.877796 | 2019-11-17T16:33:27 | 2019-11-17T16:33:27 | 222,275,622 | 0 | 0 | null | 2022-06-17T02:40:27 | 2019-11-17T16:14:37 | Java | UTF-8 | Java | false | false | 1,173 | java | package com.zgj.mps.model;
import com.zgj.mps.tool.SnowFlakeUtil;
import javax.persistence.*;
import static javax.persistence.GenerationType.IDENTITY;
@Entity
@Table(name = "device_resource")
public class DeviceResource implements java.io.Serializable {
private String id = String.valueOf(SnowFlakeUtil.getFlowIdInstance().nextId());
private String resourceId;
private String deviceId;
public DeviceResource() {
}
public DeviceResource(String id, String resourceId, String deviceId) {
this.id = id;
this.resourceId = resourceId;
this.resourceId = resourceId;
}
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "id", unique = true, nullable = false, length = 255)
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
@JoinColumn(name = "resource_id", nullable = false)
public String getResourceId() {
return resourceId;
}
public void setResourceId(String resourceId) {
this.resourceId = resourceId;
}
@JoinColumn(name = "device_id", nullable = false)
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
}
| [
"1228671674@qq.com"
] | 1228671674@qq.com |
5cccab1e943301e9072aa09af7763ff1745b8783 | 22b1fe6a0af8ab3c662551185967bf2a6034a5d2 | /experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation1/Class_182.java | 65329c9afd2d8564e86c2c02ef720e336c9bd656 | [
"Apache-2.0"
] | permissive | lesaint/experimenting-annotation-processing | b64ed2182570007cb65e9b62bb2b1b3f69d168d6 | 1e9692ceb0d3d2cda709e06ccc13290262f51b39 | refs/heads/master | 2021-01-23T11:20:19.836331 | 2014-11-13T10:37:14 | 2014-11-13T10:37:14 | 26,336,984 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 145 | java | package fr.javatronic.blog.massive.annotation1;
import fr.javatronic.blog.processor.Annotation_001;
@Annotation_001
public class Class_182 {
}
| [
"sebastien.lesaint@gmail.com"
] | sebastien.lesaint@gmail.com |
7438aa696d7161dcb71c66108d19161d5a3769a2 | 01ebbc94cd4d2c63501c2ebd64b8f757ac4b9544 | /backend/gxqpt-msgs/gxqpt-mail-repository/src/main/java/com/hengyunsoft/platform/mail/repository/dao/BWListMapper.java | a6d570d3da40c93ddc04325ddce64e3055522f8f | [] | no_license | KevinAnYuan/gxq | 60529e527eadbbe63a8ecbbad6aaa0dea5a61168 | 9b59f4e82597332a70576f43e3f365c41d5cfbee | refs/heads/main | 2023-01-04T19:35:18.615146 | 2020-10-27T06:24:37 | 2020-10-27T06:24:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,194 | java | package com.hengyunsoft.platform.mail.repository.dao;
import com.hengyunsoft.platform.mail.entity.core.po.FilterKeyword;
import com.hengyunsoft.platform.mail.entity.po.BWList;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author zjr
* @date 2018/08/08
*/
@Repository
public interface BWListMapper extends com.hengyunsoft.base.dao.BaseNormalDao<Long, com.hengyunsoft.platform.mail.entity.po.BWList, com.hengyunsoft.platform.mail.repository.example.BWListExample> {
/**
* 查询黑名单分页列表
* @param queryBWDto
* @return
*/
List<BWList> findBWList(@Param(value = "bw") BWList bw);
/**
* 查询当前用户的黑名单列表
* @param bwType
* @param localType
* @param currentEmail
* @return
*/
List<String> getList(@Param("bwType") String bwType,@Param("localType") String localType,@Param("currentEmail") String currentEmail);
int insertFilterKeyWord(@Param(value = "fk") FilterKeyword fk);
int deleteFilterKeyWord(@Param("id") Long id);
List<FilterKeyword> getFilterKeywordAll(@Param("filterWord")String filterWord);
} | [
"470382668@qq.com"
] | 470382668@qq.com |
95728ecfc3c172db07eb3ddbd935ef1df26ba4f1 | 9059a2aec3c42c06c8f47a313f9be790adc37be8 | /src/main/java/com/sr178/game/msgbody/common/io/iface/IXOutStream.java | 2a889587869b5515a7c5ac63e7894fefccfd3750 | [] | no_license | sr178-module/game-msg | c9b341b1808fd6a71cf74e21775bab518fba1af4 | 446a8fded8aa614d30aa4639922b661a94a09729 | refs/heads/master | 2021-01-22T09:48:49.338920 | 2015-08-07T06:56:46 | 2015-08-07T06:56:46 | 40,345,247 | 3 | 4 | null | null | null | null | UTF-8 | Java | false | false | 810 | java | package com.sr178.game.msgbody.common.io.iface;
import java.io.IOException;
import java.io.OutputStream;
public interface IXOutStream{
public void writeInt(int i) throws IOException;
public void writeDouble(double d) throws IOException;
public void writeLong(long l) throws IOException;
public void writeByte(byte b) throws IOException;
public void writeShort(short s) throws IOException;
public void writeFloat(float f) throws IOException;
public void writeChar(char c) throws IOException;
public void writeBoolean(boolean b) throws IOException;
public void writeUTF(String s) throws IOException;
public void writeBytes(byte[] b) throws IOException;
public void setOutputStream(OutputStream outputstream);
public void close() throws IOException;
}
| [
"dogdog7788@qq.com"
] | dogdog7788@qq.com |
c6ab93d3fd5ce33689ff642f42b0be53521f6598 | d9ee259ea531db0b4963caef0e6b1fa4a8c1b74c | /thirdstage-early/src/main/java/thirdstage/exercise/datastructure/tree/case4/Tree.java | 004ca8cf7f966f84df63a1d2ffee07fc4cf181b1 | [] | no_license | 3rdstage/exercise | 2c068a6eb83a88afb56d2f61176172907a2654ad | 8ede271cc9d6ef3eec530544b4bb29cd4b776c47 | refs/heads/master | 2022-12-21T08:59:17.189471 | 2022-09-22T23:02:02 | 2022-09-22T23:02:02 | 6,543,754 | 0 | 1 | null | 2022-12-16T04:25:01 | 2012-11-05T12:09:39 | HTML | UTF-8 | Java | false | false | 511 | java | package thirdstage.exercise.datastructure.tree.case4;
import java.util.List;
public interface Tree{
int getSize();
boolean hasDummyRootNode();
void setDummyRootNode(boolean flag);
void addNode(TreeNode node);
void addNodes(List<TreeNode> nodes);
TreeNode getNode(String nodeId);
TreeNode getRootNode();
void removeNodeCascaded(String nodeId);
void removeNodeResctricted(String nodeId);
Tree getSubTree(String nodeId);
List<TreeNode> getAllNodesInHierarchicalOrder();
}
| [
"halfface@chollian.net"
] | halfface@chollian.net |
5a7917a8a6709f73098275e215ceac9a69a75317 | cba7355f66a247ac75e1fe1d870e34635afd2210 | /com/owen/masters/module/context/ModuleContext.java | e7fc6e22a85fd25359718404de06b6e455d31a06 | [] | no_license | TaxPvP/Masters | 00121b7792020aa0f5b254805c86d53d965ce831 | d933a3cf1cb2bcfef8e4a74631122e70b05a7bf3 | refs/heads/master | 2021-01-17T16:48:09.331776 | 2016-05-31T22:21:06 | 2016-05-31T22:21:06 | 60,127,358 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,185 | java | package com.owen.masters.module.context;
import java.util.ArrayList;
import java.util.List;
import com.owen.masters.context.Context;
import com.owen.masters.module.Module;
import com.owen.masters.module.annotation.Loadable;
import com.owen.masters.module.exception.ModuleLoadException;
public class ModuleContext extends Context {
private static List<Module> moduleList = new ArrayList<>();
public ModuleContext() {
super("Modules");
}
public static List<Module> getModuleList() {
return moduleList;
}
@Override
public void setup() {
// TODO Auto-generated method stub
}
private static void addModule(final Module module) {
moduleList.add(module);
}
public static final Module getByName(final String name) {
for (final Module module : moduleList) {
if (name.equalsIgnoreCase(module.getName())) {
return module;
}
}
return null;
}
public static final void register(final Module module) {
if (module != null && !moduleList.contains(module)
&& module.getClass().isAnnotationPresent(Loadable.class)) {
addModule(module);
} else {
throw new ModuleLoadException("Failed to load module: "
+ module.getClass());
}
}
}
| [
"unconfigured@null.spigotmc.org"
] | unconfigured@null.spigotmc.org |
f4c3b9286792c167b8ae30798a3bbe3746ea4951 | b16da68f0921392034940761b907e3a145d0684b | /sms/src/main/java/com/tomtom/speedtools/services/sms/implementation/ProviderNames.java | edff51626d9fc6269c0fd4d08709c501bc7d1980 | [
"Apache-2.0"
] | permissive | thlws/speedtools | 9307c7d9d586d78aad9f7889cae099f84cb4932f | 22e2480e246850df26afae8e26e44f19ac8f2b73 | refs/heads/master | 2020-05-05T13:48:43.319210 | 2019-03-25T09:39:23 | 2019-03-25T09:39:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,210 | java | /*
* Copyright (C) 2012-2019, TomTom (http://tomtom.com).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tomtom.speedtools.services.sms.implementation;
import javax.annotation.Nonnull;
/**
* Defines a name for each SMS provider. The enum.toString() is used as the value.
*/
public enum ProviderNames {
/**
* www.nexmo.com
*/
NEXMO("NEXMO"),
/**
* www.messagebird.com
*/
MESSAGE_BIRD("MESSAGE_BIRD");
@Nonnull
private final String name;
private ProviderNames(@Nonnull final String name) {
assert name != null;
this.name = name;
}
@Override
public String toString() {
return name;
}
}
| [
"rijn@buve.nl"
] | rijn@buve.nl |
40d00715d406955bcdfef42ff2a3f6ebac422358 | 4e26b4b5881fd766f16688764b5a31c179329619 | /src/main/java/com/wabilgroup/pharmacyapp/config/Constants.java | 6d88a9cb815775596f12786ac7ede251386e9014 | [] | no_license | GhHWabil/wabilGroup | 6d53cea69269cf5c21a53f972f8d5e996c12bae5 | b8f57106c5238c7b304c5864623d110b3a6f42b2 | refs/heads/main | 2023-03-20T08:50:07.373922 | 2021-03-10T04:10:38 | 2021-03-10T04:10:38 | 346,227,618 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 197 | java | package com.wabilgroup.pharmacyapp.config;
/**
* Application constants.
*/
public final class Constants {
public static final String SYSTEM_ACCOUNT = "system";
private Constants() {}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
0de1f9caf5e3efdcaf63f944d3ceb7a9c2509df0 | 9419249ee66fc06f7fa389fe28ea5debc6362c6d | /src/main/java/com/wsk/cards/skill/RubyDefendCard.java | 25b13d34204aa58622f31578532caead4192bd3f | [
"MIT"
] | permissive | wsk1103/LagranYue | 0ee45ee3745ab444cff84e822f005056d91ff188 | 5da15ed6cce5a182585226b1c26fb159b5b4dc0d | refs/heads/master | 2022-09-17T00:13:41.248505 | 2022-08-14T12:28:30 | 2022-08-14T12:28:30 | 172,636,794 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,853 | java | package com.wsk.cards.skill;
import basemod.abstracts.CustomCard;
import com.megacrit.cardcrawl.actions.AbstractGameAction;
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction;
import com.megacrit.cardcrawl.actions.common.GainBlockAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.localization.CardStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.powers.DrawCardNextTurnPower;
import com.wsk.patches.AbstractCardEnum;
import com.wsk.utils.CommonUtil;
/**
* @author wsk1103
* @date 2019/2/26
* @desc 一句话说明
*/
public class RubyDefendCard extends CustomCard {
public static final String ID = "LagranYue:RubyDefendCard";
private static final String NAME;
private static final String DESCRIPTION;
private static final CardStrings cardStrings;
private static final String IMG = "cards/RubyDefendCard.png";
//例:img/cards/claw/attack/BloodSuckingClaw_Orange.png 详细情况请根据自己项目的路径布置进行填写。
private static final int COST = 1;
public RubyDefendCard() {
super(ID, NAME, CommonUtil.getResourcePath(IMG), COST, DESCRIPTION,
CardType.SKILL,
AbstractCardEnum.LagranYue,
CardRarity.COMMON, CardTarget.SELF);
this.baseBlock = 7;
this.magicNumber = this.baseMagicNumber = 1;
}
//用于显示在卡牌一览里。同时也是诸多卡牌复制效果所需要调用的基本方法,用来获得一张该卡的原始模板修改后加入手牌/抽牌堆/弃牌堆/牌组。
public AbstractCard makeCopy() {
return new RubyDefendCard();
}
@Override
public void upgrade() {
if (!this.upgraded) {
this.upgradeName();
this.upgradeBlock(2);
this.upgradeMagicNumber(1);
}
}
@Override
public void use(AbstractPlayer p, AbstractMonster abstractMonster) {
AbstractDungeon.actionManager.addToBottom(new GainBlockAction(p, p, this.block));
//下回合抽牌
if (upgraded) {
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p,
new DrawCardNextTurnPower(p, 2), 2, AbstractGameAction.AttackEffect.POISON));
} else {
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p,
new DrawCardNextTurnPower(p, 1), 1, AbstractGameAction.AttackEffect.POISON));
}
}
static {
cardStrings = CardCrawlGame.languagePack.getCardStrings(ID);
NAME = cardStrings.NAME;
DESCRIPTION = cardStrings.DESCRIPTION;
}
}
| [
"1261709167@qq.com"
] | 1261709167@qq.com |
58959d13705563b5c01412865490560ca4b2fb62 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/elastic--elasticsearch/f75abbaa007df649f664eff7a9c6177185a151a8/after/MoreLikeThisFieldQueryParser.java | 2fd5f0fe45309c237c71e4d48ac6458661b5d340 | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,078 | java | /*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search licenses this
* file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.query.xcontent;
import org.apache.lucene.search.Query;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.collect.Sets;
import org.elasticsearch.common.lucene.search.MoreLikeThisQuery;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.index.AbstractIndexComponent;
import org.elasticsearch.index.Index;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.index.query.QueryParsingException;
import org.elasticsearch.index.settings.IndexSettings;
import java.io.IOException;
import java.util.Set;
import static org.elasticsearch.index.query.support.QueryParsers.*;
/**
* @author kimchy (shay.banon)
*/
public class MoreLikeThisFieldQueryParser extends AbstractIndexComponent implements XContentQueryParser {
public static final String NAME = "mlt_field";
public MoreLikeThisFieldQueryParser(Index index, @IndexSettings Settings indexSettings) {
super(index, indexSettings);
}
@Override public String[] names() {
return new String[]{NAME, "more_like_this_field", Strings.toCamelCase(NAME), "moreLikeThisField"};
}
@Override public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException {
XContentParser parser = parseContext.parser();
XContentParser.Token token = parser.nextToken();
assert token == XContentParser.Token.FIELD_NAME;
String fieldName = parser.currentName();
// now, we move after the field name, which starts the object
token = parser.nextToken();
assert token == XContentParser.Token.START_OBJECT;
MoreLikeThisQuery mltQuery = new MoreLikeThisQuery();
mltQuery.setSimilarity(parseContext.searchSimilarity());
String currentFieldName = null;
while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) {
if (token == XContentParser.Token.FIELD_NAME) {
currentFieldName = parser.currentName();
} else if (token.isValue()) {
if ("like_text".equals(currentFieldName)) {
mltQuery.setLikeText(parser.text());
} else if ("min_term_freq".equals(currentFieldName) || "minTermFreq".equals(currentFieldName)) {
mltQuery.setMinTermFrequency(parser.intValue());
} else if ("max_query_terms".equals(currentFieldName) || "maxQueryTerms".equals(currentFieldName)) {
mltQuery.setMaxQueryTerms(parser.intValue());
} else if ("min_doc_freq".equals(currentFieldName) || "minDocFreq".equals(currentFieldName)) {
mltQuery.setMinDocFreq(parser.intValue());
} else if ("max_doc_freq".equals(currentFieldName) || "maxDocFreq".equals(currentFieldName)) {
mltQuery.setMaxDocFreq(parser.intValue());
} else if ("min_word_len".equals(currentFieldName) || "minWordLen".equals(currentFieldName)) {
mltQuery.setMinWordLen(parser.intValue());
} else if ("max_word_len".equals(currentFieldName) || "maxWordLen".equals(currentFieldName)) {
mltQuery.setMaxWordLen(parser.intValue());
} else if ("boost_terms".equals(currentFieldName) || "boostTerms".equals(currentFieldName)) {
mltQuery.setBoostTerms(true);
mltQuery.setBoostTermsFactor(parser.floatValue());
} else if ("percent_terms_to_match".equals(currentFieldName) || "percentTermsToMatch".equals(currentFieldName)) {
mltQuery.setPercentTermsToMatch(parser.floatValue());
}
} else if (token == XContentParser.Token.START_ARRAY) {
if ("stop_words".equals(currentFieldName) || "stopWords".equals(currentFieldName)) {
Set<String> stopWords = Sets.newHashSet();
while ((token = parser.nextToken()) != XContentParser.Token.END_ARRAY) {
stopWords.add(parser.text());
}
mltQuery.setStopWords(stopWords);
}
}
}
if (mltQuery.getLikeText() == null) {
throw new QueryParsingException(index, "more_like_this_field requires 'like_text' to be specified");
}
// move to the next end object, to close the field name
token = parser.nextToken();
assert token == XContentParser.Token.END_OBJECT;
MapperService.SmartNameFieldMappers smartNameFieldMappers = parseContext.smartFieldMappers(fieldName);
if (smartNameFieldMappers != null) {
if (smartNameFieldMappers.hasMapper()) {
fieldName = smartNameFieldMappers.mapper().names().indexName();
mltQuery.setAnalyzer(smartNameFieldMappers.mapper().searchAnalyzer());
}
}
if (mltQuery.getAnalyzer() == null) {
mltQuery.setAnalyzer(parseContext.mapperService().searchAnalyzer());
}
mltQuery.setMoreLikeFields(new String[]{fieldName});
return wrapSmartNameQuery(mltQuery, smartNameFieldMappers, parseContext);
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
c784f87ae9b44edb52132eab90992915deffc084 | f7160c0f0526cc5afc0fe4e6f06d384394059aa1 | /fsa/fs-uicore/src/api/java/com/fs/uicore/api/gwt/client/event/ClientStartFailureEvent.java | 21a6a2392a12e43fd655a2499a6a6ce543811bc5 | [] | no_license | o1711/somecode | e2461c4fb51b3d75421c4827c43be52885df3a56 | a084f71786e886bac8f217255f54f5740fa786de | refs/heads/master | 2021-09-14T14:51:58.704495 | 2018-05-15T07:51:05 | 2018-05-15T07:51:05 | 112,574,683 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 442 | java | /**
* Jul 20, 2012
*/
package com.fs.uicore.api.gwt.client.event;
import com.fs.uicore.api.gwt.client.UiClientI;
/**
* @author wu
*
*
*/
public class ClientStartFailureEvent extends ClientEvent {
public static Type<ClientStartFailureEvent> TYPE = new Type<ClientStartFailureEvent>(
ClientEvent.TYPE, "start-failure");
/** */
public ClientStartFailureEvent(UiClientI client) {
super(TYPE, client);
}
} | [
"wkz808@163.com"
] | wkz808@163.com |
e7126de20b880f266da6835b3fdf21dc22aa4dfa | 90f17cd659cc96c8fff1d5cfd893cbbe18b1240f | /src/main/java/com/facebook/react/bridge/WritableNativeArray.java | f725baace530f8fe4c9deeab28accca503cb0b1c | [] | no_license | redpicasso/fluffy-octo-robot | c9b98d2e8745805edc8ddb92e8afc1788ceadd08 | b2b62d7344da65af7e35068f40d6aae0cd0835a6 | refs/heads/master | 2022-11-15T14:43:37.515136 | 2020-07-01T22:19:16 | 2020-07-01T22:19:16 | 276,492,708 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,488 | java | package com.facebook.react.bridge;
import com.facebook.infer.annotation.Assertions;
import com.facebook.jni.HybridData;
import com.facebook.proguard.annotations.DoNotStrip;
import javax.annotation.Nullable;
@DoNotStrip
public class WritableNativeArray extends ReadableNativeArray implements WritableArray {
private static native HybridData initHybrid();
private native void pushNativeArray(WritableNativeArray writableNativeArray);
private native void pushNativeMap(WritableNativeMap writableNativeMap);
public native void pushBoolean(boolean z);
public native void pushDouble(double d);
public native void pushInt(int i);
public native void pushNull();
public native void pushString(@Nullable String str);
static {
ReactBridge.staticInit();
}
public WritableNativeArray() {
super(initHybrid());
}
public void pushArray(@Nullable WritableArray writableArray) {
boolean z = writableArray == null || (writableArray instanceof WritableNativeArray);
Assertions.assertCondition(z, "Illegal type provided");
pushNativeArray((WritableNativeArray) writableArray);
}
public void pushMap(@Nullable WritableMap writableMap) {
boolean z = writableMap == null || (writableMap instanceof WritableNativeMap);
Assertions.assertCondition(z, "Illegal type provided");
pushNativeMap((WritableNativeMap) writableMap);
}
}
| [
"aaron@goodreturn.org"
] | aaron@goodreturn.org |
a88b003299574d681f2b2f10ff7c00d4aaaf4c9a | a7dfaa2e919266abe4018ee3038e2a1c6f8511c6 | /2012/LocationDiary/src/ru/ildar66/location/diary/MainActivity.java | 415ec2585ad24e256d361d03e604768bf1077f4e | [] | no_license | ildar66/myBeginningAndroid | 80bc8f4f332a1f14569fb0edec3efb22512d04f9 | ee08a136e2916417d6ceb434d0ffd882e4b9276b | refs/heads/master | 2020-12-02T23:55:02.182304 | 2017-07-01T11:35:38 | 2017-07-01T11:35:38 | 95,960,342 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,578 | java | package ru.ildar66.location.diary;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.DatePicker;
import android.widget.Toast;
public class MainActivity extends Activity {
private static final String TAG = "MainActivity";
DatePicker datePicker;
@Override
protected void onCreate(Bundle savedInstanceState) {
Log.d(TAG, "onCreate");
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
datePicker = (DatePicker) findViewById(R.id.datePicker);
}
@Override
protected void onPause() {
Log.d(TAG, "onPause");
super.onPause();
}
@Override
protected void onResume() {
Log.d(TAG, "onResume");
super.onResume();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.pref_ID:
startActivity(new Intent(this, AppPreferenceActivity.class));
return true;
case R.id.itemStartDiaryService:
startService(new Intent(this, ServiceLocation.class));
return true;
case R.id.itemStopDiaryService:
stopService(new Intent(this, ServiceLocation.class));
return true;
}
return false;
}
public void onClick(View view) {
Calendar calendar = Calendar.getInstance();
calendar.clear();
calendar.set(Calendar.YEAR, datePicker.getYear());
calendar.set(Calendar.DAY_OF_MONTH, datePicker.getDayOfMonth());
calendar.set(Calendar.MONTH, datePicker.getMonth());
Date from = calendar.getTime();
calendar.set(Calendar.DAY_OF_MONTH, datePicker.getDayOfMonth() + 1);
Date to = calendar.getTime();
ArrayList<DiaryRow> path = ((DiaryApp)getApplication()).createPathOnPeriod(from, to);
if (path != null) {
showPathOnGoogleMap(path);
} else {
alert("NO DATE ON PERIOD \n from:" + from + "\n to: " + to);
}
}
void alert(String msg) {
Toast.makeText(getBaseContext(), msg, Toast.LENGTH_LONG).show();
}
private void showPathOnGoogleMap(ArrayList<DiaryRow> path) {
Intent intent = new Intent("ru.ildar66.location.diary.GoogleMapActivity");
Bundle extras = new Bundle();
extras.putSerializable(GoogleMapActivity.PATH_KEY, path);
intent.putExtras(extras);
startActivity(intent);
}
}
| [
"ildar66@inbox.ru"
] | ildar66@inbox.ru |
d47e9d49ddd82ab0ec74688841e50486ee3ad05e | cb7ca0dbcf976c2d547da93866b3fa86039773fb | /src/main/java/com/wechat/dao/impl/IntegralDaoImpl.java | 200aaae5ea41367eb08092998c2e5eac2fd48ccb | [] | no_license | alive-jh/Alive | a18850830a508483d4950b0e10026996eab0601b | 0a5f32930546af6ebcd271171fb68366709337e3 | refs/heads/main | 2023-08-28T18:15:37.107727 | 2021-10-25T08:28:54 | 2021-10-25T08:28:54 | 420,863,338 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,227 | java | package com.wechat.dao.impl;
import com.wechat.dao.IntegralDao;
import com.wechat.entity.Integral;
import com.wechat.util.Page;
import org.springframework.stereotype.Repository;
import java.util.HashMap;
import java.util.List;
@Repository
public class IntegralDaoImpl extends BaseDaoImpl implements IntegralDao{
@Override
public Integer getIntegralCount(String memberId,String memberType) {
String sql = "select sum(fraction) from integral where memberid ="+memberId+" and membertype="+memberType;
List list = this.executeSQL(sql);
Integer sumIntegral = new Integer(0);
if(list.get(0) != null)
{
sumIntegral = new Integer(list.get(0).toString());
}
return sumIntegral;
}
@Override
public void saveIntegral(Integral integral) {
this.save(integral);
}
@Override
public Page searchIntegral(HashMap map) {
StringBuffer sql = new StringBuffer("select a.id,a.memberid,a.status,a.fraction,a.createdate,b.name from integral a,integraltype b where a.typeid = b.id ");
if(!"".equals(map.get("memberId")) && map.get("memberId")!= null)
{
sql.append(" and a.memberid = ").append(map.get("memberId"));
}
sql.append(" and a.membertype=").append(map.get("memberType"));
if(!"".equals(map.get("typeId")) && map.get("typeId")!= null)
{
sql.append(" and a.typeid = ").append(map.get("typeId"));
}
sql.append(" order by a.createdate desc ");
return this.pageQueryBySQL(sql.toString(), new Integer(map.get("page").toString()), new Integer(map.get("rowsPerPage").toString()));
}
@Override
public List getIntegralByMemberId(String memberId,String memberType)
{
String sql = "select * from integral where date_format(createdate,'%Y-%m-%d') = date_format(sysdate(),'%Y-%m-%d') and memberid ="+memberId+" and membertype="+memberType;
return this.executeSQL(sql);
}
@Override
public List searchIntegralList(String memberId,String memberType)
{
StringBuffer sql = new StringBuffer("select a.id,a.memberid,a.status,a.fraction,a.createdate,b.name,a.remark " +
"from integral a,integraltype b where a.typeid = b.id and a.memberid="+memberId +" and a.membertype = "+memberType+" order by a.createdate desc");
return this.executeSQL(sql.toString());
}
}
| [
"174489204@qq.com"
] | 174489204@qq.com |
b1f2aae861b963417c5fd2cfb298889af7a88fe4 | a98081e539453ee870a839904ed2d377af622f5b | /app/src/androidTest/java/com/example/customlistviewimage/ExampleInstrumentedTest.java | ac2e431821a4932d8a032efc22606ed71f8f8e35 | [] | no_license | michaellee212/DroidSafe | 10e55704ac9dfdaf2378007d0ac694962dafb210 | fe870ac4776d0de30ce0ff9e1a39e81875b4657d | refs/heads/master | 2021-08-16T06:56:17.477163 | 2017-11-19T06:23:09 | 2017-11-19T06:23:09 | 111,267,545 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 766 | java | package com.example.customlistviewimage;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumentation test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.customlistviewimage", appContext.getPackageName());
}
}
| [
"you@example.com"
] | you@example.com |
6dedbae1c27c63a32e7fb3546e253956bb328b94 | 070b01ed9871868c10f0573f1404405a9098be3c | /src/main/java/com/rabbitwfly/util/ClassUtils.java | de0d9a5e3f5323ea548f9423eeef4a70a66e1f74 | [] | no_license | RabbitWFly/microspring | b5ee0d2a90233dc15b52f8559e9c94658ea6e51f | e3e45630f9131e7880dbca7b7726a96fa237e828 | refs/heads/master | 2021-07-08T02:04:37.487669 | 2019-08-06T02:58:11 | 2019-08-06T02:58:11 | 197,744,549 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,721 | java | package com.rabbitwfly.util;
import java.util.HashMap;
import java.util.Map;
/**
* @Author chentao
* Date 2019/7/19
* 从当前线程上下文中获取ClassLoader
**/
public abstract class ClassUtils {
/** The package separator character: '.' */
private static final char PACKAGE_SEPARATOR = '.';
/** The path separator character: '/' */
private static final char PATH_SEPARATOR = '/';
/** The inner class separator character: '$' */
private static final char INNER_CLASS_SEPARATOR = '$';
/** The CGLIB class separator: "$$" */
public static final String CGLIB_CLASS_SEPARATOR = "$$";
private static final Map<Class<?>, Class<?>> wrapperToPrimitiveTypeMap = new HashMap<Class<?>, Class<?>>(8);
private static final Map<Class<?>, Class<?>> primitiveTypeToWrapperMap = new HashMap<Class<?>, Class<?>>(8);
public static ClassLoader getDefaultClassLoader() {
ClassLoader cl = null;
try {
cl = Thread.currentThread().getContextClassLoader();
}
catch (Throwable ex) {
// Cannot access thread context ClassLoader - falling back...
}
if (cl == null) {
// No thread context class loader -> use class loader of this class.
cl = ClassUtils.class.getClassLoader();
if (cl == null) {
// getClassLoader() returning null indicates the bootstrap ClassLoader
try {
cl = ClassLoader.getSystemClassLoader();
}
catch (Throwable ex) {
// Cannot access system ClassLoader - oh well, maybe the caller can live with null...
}
}
}
return cl;
}
public static boolean isAssignableValue(Class<?> type, Object value) {
Assert.notNull(type, "Type must not be null");
return (value != null ? isAssignable(type, value.getClass()) : !type.isPrimitive());
}
public static boolean isAssignable(Class<?> lhsType, Class<?> rhsType) {
Assert.notNull(lhsType, "Left-hand side type must not be null");
Assert.notNull(rhsType, "Right-hand side type must not be null");
if (lhsType.isAssignableFrom(rhsType)) {
return true;
}
if (lhsType.isPrimitive()) {
Class<?> resolvedPrimitive = wrapperToPrimitiveTypeMap.get(rhsType);
if (resolvedPrimitive != null && lhsType.equals(resolvedPrimitive)) {
return true;
}
}
else {
Class<?> resolvedWrapper = primitiveTypeToWrapperMap.get(rhsType);
if (resolvedWrapper != null && lhsType.isAssignableFrom(resolvedWrapper)) {
return true;
}
}
return false;
}
public static String convertResourcePathToClassName(String resourcePath) {
Assert.notNull(resourcePath, "Resource path must not be null");
return resourcePath.replace(PATH_SEPARATOR, PACKAGE_SEPARATOR);
}
public static String convertClassNameToResourcePath(String className) {
Assert.notNull(className, "Class name must not be null");
return className.replace(PACKAGE_SEPARATOR, PATH_SEPARATOR);
}
public static String getShortName(String className) {
int lastDotIndex = className.lastIndexOf(PACKAGE_SEPARATOR);
int nameEndIndex = className.indexOf(CGLIB_CLASS_SEPARATOR);
if (nameEndIndex == -1) {
nameEndIndex = className.length();
}
String shortName = className.substring(lastDotIndex + 1, nameEndIndex);
shortName = shortName.replace(INNER_CLASS_SEPARATOR, PACKAGE_SEPARATOR);
return shortName;
}
}
| [
"chentao@daokoudai.com"
] | chentao@daokoudai.com |
e1426f3d93c36db3011173c27024dc67899f4098 | d98e8d4308637135efcdfc61b69293709fc31d29 | /lnahabedian-mtsa-26803a183c10/maven-root/mtsa/src/main/java/MTSTools/ac/ic/doc/mtstools/model/operations/TraceInclusionClosure.java | 7023575cf64d16ef380c17e35de081c82c0b3bdf | [] | no_license | FabianGomez/MTSATesting | 63f036edc098ebceb23c772e5d9bdb66fb321052 | 4d2c9d95cab08f0345cb44017eb37bf7e97f21a1 | refs/heads/master | 2021-09-10T07:35:06.603016 | 2018-03-22T06:38:27 | 2018-03-22T06:38:27 | 112,141,922 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,744 | java | package MTSTools.ac.ic.doc.mtstools.model.operations;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Set;
import MTSTools.ac.ic.doc.commons.relations.BinaryRelation;
import MTSTools.ac.ic.doc.commons.relations.Pair;
import MTSTools.ac.ic.doc.mtstools.model.MTS;
import MTSTools.ac.ic.doc.mtstools.model.MTS.TransitionType;
import MTSTools.ac.ic.doc.mtstools.utils.MTSUtils;
public class TraceInclusionClosure implements MTSClosure {
public static TraceInclusionClosure getInstance() {
if (instance == null) {
instance = new TraceInclusionClosure();
}
return instance;
}
private static TraceInclusionClosure instance;
@Override
public <State, Action> void applyMTSClosure(MTS<State, Action> mts, Set<Action> silentActions) {
for (State state : mts.getStates()) {
this.closure(state, silentActions, mts);
}
MTSUtils.removeSilentTransitions(mts, silentActions);
}
private <State, Action> void closure(State state, Set<Action> silentActions, MTS<State, Action> mts) {
Set<State> visited = new HashSet<State>();
Queue<State> toVisitMust = new LinkedList<State>();
Queue<State> toVisitMay = new LinkedList<State>();
visited.add(state);
//add silent must successors to be processed.
addSilentSuccessorsToVisit(state, silentActions, mts, toVisitMust, TransitionType.REQUIRED);
//add silent may successors to be processed.
addSilentSuccessorsToVisit(state, silentActions, mts, toVisitMay, TransitionType.MAYBE);
//process all must silent closure of state
while(!toVisitMust.isEmpty()) {
State succ = toVisitMust.poll();
if (visited.contains(succ)) {
continue;
}
visited.add(succ);
addSilentSuccessorsToVisit(succ, silentActions, mts, toVisitMust, TransitionType.REQUIRED);
addSilentSuccessorsToVisit(succ, silentActions, mts, toVisitMay, TransitionType.MAYBE);
addRequiredSuccessors(state, succ, silentActions, mts);
addPossibleSuccessors(state, succ, silentActions, TransitionType.MAYBE, mts);
}
//process all maybe silent closure of state.
while(!toVisitMay.isEmpty()) {
State succ = toVisitMay.poll();
if (visited.contains(succ)) {
continue;
}
visited.add(succ);
//add all silent successors to be processed.
addSilentSuccessorsToVisit(succ, silentActions, mts, toVisitMay, TransitionType.POSSIBLE);
addPossibleSuccessors(state, succ, silentActions, TransitionType.POSSIBLE, mts);
}
}
private <State, Action> void addPossibleSuccessors(State state, State succ,
Set<Action> silentActions, TransitionType trType, MTS<State, Action> mts) {
for (Pair<Action, State> tr : mts.getTransitions(succ, trType)) {
if (silentActions.contains(tr.getFirst())) {
continue;
}
if (!mts.getTransitions(state, TransitionType.POSSIBLE).getImage(tr.getFirst()).contains(tr.getSecond())) {
mts.addPossible(state, tr.getFirst(), tr.getSecond());
}
}
}
private <State, Action> void addRequiredSuccessors(State state, State succ, Set<Action> silentActions, MTS<State, Action> mts) {
BinaryRelation<Action, State> transitions = mts.getTransitions(succ, TransitionType.REQUIRED);
for (Pair<Action, State> tr : transitions) {
if (silentActions.contains(tr.getFirst())) {
continue;
}
mts.addRequired(state, tr.getFirst(), tr.getSecond());
}
}
private <Action, State> void addSilentSuccessorsToVisit(State state, Set<Action> silentActions, MTS<State, Action> mts,
Queue<State> toVisitMay, TransitionType type) {
BinaryRelation<Action, State> mayTransitions = mts.getTransitions(state, type);
for (Action action : silentActions) {
Set<State> image = mayTransitions.getImage(action);
toVisitMay.addAll(image);
}
}
}
| [
"fabiandagomez@hotmail.com"
] | fabiandagomez@hotmail.com |
f2bb67254f18f6e3d97a1d5abacdbb909fbb9383 | a862a140dd6a5c63b4f709c5cdc6cf75d319dcdf | /Codenza_Java/Graph_Problems_Algorithms/Java Program to Create a Minimal Set of All Edges Whose Addition will Convert it to a Strongly Connected DAG.java | 9803182737f2def1db94b84d827ab8a6e8ffc8eb | [] | no_license | MartyMcAir/FromAppsAndBooks | 2e730d480737784b9bfff3f49169fdec2fa0448c | 7bcbd405053474630c5b5e78d70da1128885fc82 | refs/heads/master | 2022-02-06T06:14:15.738157 | 2022-02-01T12:18:37 | 2022-02-01T12:18:37 | 222,210,663 | 3 | 0 | null | 2021-08-02T17:19:31 | 2019-11-17T07:07:59 | Java | UTF-8 | Java | false | false | 6,993 | java | /*This is a java program to find the edges other than feedback arc set so that all the edges contribute to directed acyclic graph.*/
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
class Graph
{
private Map<Integer, List<Integer>> adjacencyList;
public Graph(int v)
{
adjacencyList = new HashMap<Integer, List<Integer>>();
for (int i = 1; i <= v; i++)
adjacencyList.put(i, new LinkedList<Integer>());
}
public void setEdge(int from, int to)
{
if (to > adjacencyList.size() || from > adjacencyList.size())
System.out.println("The vertices does not exists");
/*
* List<Integer> sls = adjacencyList.get(to);
* sls.add(from);
*/
List<Integer> dls = adjacencyList.get(from);
dls.add(to);
}
public List<Integer> getEdge(int to)
{
/*
* if (to > adjacencyList.size())
* {
* System.out.println("The vertices does not exists");
* return null;
* }
*/
return adjacencyList.get(to);
}
public Graph checkDAG()
{
Integer count = 0;
Iterator<Integer> iteratorI = this.adjacencyList.keySet().iterator();
Integer size = this.adjacencyList.size() - 1;
System.out.println("Minimal set of edges: ");
while (iteratorI.hasNext())
{
Integer i = iteratorI.next();
List<Integer> adjList = this.adjacencyList.get(i);
if (count == size)
{
return this;
}
if (adjList.size() == 0)
{
count++;
Iterator<Integer> iteratorJ = this.adjacencyList.keySet()
.iterator();
while (iteratorJ.hasNext())
{
Integer j = iteratorJ.next();
List<Integer> li = this.adjacencyList.get(j);
if (li.contains(i))
{
li.remove(i);
System.out.println(i + " -> " + j);
}
}
this.adjacencyList.remove(i);
iteratorI = this.adjacencyList.keySet().iterator();
}
}
return this;
}
public Map<Integer, List<Integer>> getFeedbackArcSet(int v)
{
int[] visited = new int[v + 1];
Iterator<Integer> iterator = this.adjacencyList.keySet().iterator();
Map<Integer, List<Integer>> l = new HashMap<Integer, List<Integer>>();
while (iterator.hasNext())
{
Integer i = iterator.next();
List<Integer> list = this.adjacencyList.get(i);
visited[i] = 1;
if (list.size() != 0)
{
for (int j = 0; j < list.size(); j++)
{
if (visited[list.get(j)] == 1)
{
l.put(i, new LinkedList<Integer>());
l.get(i).add(j);
}
else
{
visited[list.get(j)] = 1;
}
}
}
}
return l;
}
public void printAllEdges(Graph copyG, int v)
{
Map<Integer, List<Integer>> edges = this.getFeedbackArcSet(v);
Iterator<Integer> iterator = copyG.adjacencyList.keySet().iterator();
while (iterator.hasNext())
{
Integer i = iterator.next();
List<Integer> edgeList = this.getEdge(i);
if (edgeList.size() != 0)
{
for (int j = 0; j < edgeList.size(); j++)
{
if (edges.containsKey(i) && edges.get(i).contains(j))
continue;
else
{
System.out.print(i + " -> " + edgeList.get(j));
}
}
System.out.println();
}
}
}
public void printGraph()
{
System.out.println("The Graph is: ");
Iterator<Integer> iterator = this.adjacencyList.keySet().iterator();
while (iterator.hasNext())
{
Integer i = iterator.next();
List<Integer> edgeList = this.getEdge(i);
if (edgeList.size() != 0)
{
System.out.print(i);
for (int j = 0; j < edgeList.size(); j++)
{
System.out.print(" -> " + edgeList.get(j));
}
System.out.println();
}
}
}
}
public class MinimalSetofEdgesforDAG
{
public static void main(String args[])
{
int v, e, count = 1, to, from;
Scanner sc = new Scanner(System.in);
Graph glist;
try
{
System.out.println("Enter the number of vertices: ");
v = sc.nextInt();
System.out.println("Enter the number of edges: ");
e = sc.nextInt();
glist = new Graph(v);
System.out.println("Enter the edges in the graph : <from> <to>");
while (count <= e)
{
to = sc.nextInt();
from = sc.nextInt();
glist.setEdge(to, from);
count++;
}
Graph copyofGlist = new Graph(v);
copyofGlist = glist;
glist.printGraph();
Graph modified = glist.checkDAG();
modified.printAllEdges(copyofGlist, v);
}
catch (Exception E)
{
System.out
.println("You are trying to access empty adjacency list of a node.");
}
sc.close();
}
}
/*
Enter the number of vertices:
6
Enter the number of edges:
7
Enter the edges in the graph : <from> <to>
1 2
2 3
2 4
4 5
5 6
6 3
6 4
The Graph is:
1 -> 2
2 -> 3 -> 4
4 -> 5
5 -> 6
6 -> 3 -> 4
Minimal set of edges:
3 -> 2
3 -> 6
1 -> 2
2 -> 4
4 -> 5
5 -> 6
| [
"martymcair@gmail.com"
] | martymcair@gmail.com |
03eb6907d5673d073b1ce048baa4e06f34bc6b46 | fe054c25369a5d0d58fa17c3f827c3b0ee0b3c0b | /Back-End/springcores/src/main/java/com/capgemini/springcores/overriding/SuperClass.java | a74028fe237267c6d30394b70e7ec247006a485e | [] | no_license | SurajkhanPinjar/TY_CG_HTD_BangaloreNovember_JFS_SurajkhanPinjar | 4bdc6bacfbb547f4adc4811ec207745e3a53e17c | 85dfcdde17a86dd61a7ee83cfea04a0497880ba6 | refs/heads/master | 2023-01-12T14:37:49.797977 | 2020-06-15T04:03:35 | 2020-06-15T04:03:35 | 225,843,658 | 0 | 1 | null | 2023-01-07T14:14:27 | 2019-12-04T10:47:21 | Java | UTF-8 | Java | false | false | 234 | java | package com.capgemini.springcores.overriding;
import java.io.IOException;
import java.util.AbstractList;
import java.util.Vector;
public class SuperClass {
protected Vector<Object> method() throws IOException {
return null;
}
}
| [
"surajkhanpinjar@gmail.com"
] | surajkhanpinjar@gmail.com |
eb69c3a6609fef1915c49ba289cc7961ddf852fd | 27af35647ca8a90e9eb26a38f6cee054a9a6e23d | /yun_kuangjia2019/geeklibs/slbappcomm/src/main/java/com/example/slbappcomm/xclchart/renderer/line/DotInfo.java | 1701876ccfc34be30b14f62a1c5a5e8789aea539 | [] | no_license | geeklx/myappkuangjia20190806 | 6007614bd8e45c53ddc5fcebd47e9f1499236c69 | 8fbfdd0223af16cdc5cfb5434c49b26c41d3958a | refs/heads/master | 2020-06-30T07:37:28.804826 | 2019-08-20T07:09:45 | 2019-08-20T07:09:45 | 200,767,192 | 9 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,485 | java | /**
* Copyright 2014 XCL-Charts
*
* 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.
*
* @Project XCL-Charts
* @Description Android图表基类库
* @author XiongChuanLiang<br/>(xcl_168@aliyun.com)
* @license http://www.apache.org/licenses/ Apache v2 License
* @version 2.1
*/
package com.example.slbappcomm.xclchart.renderer.line;
/**
* @ClassName DotInfo
* @Description 用于暂存点信息的类
* @author XiongChuanLiang<br/>(xcl_168@aliyun.com)
*
*/
public class DotInfo {
public Double mValue = 0d;
public Double mXValue = 0d;
public Double mYValue = 0d;
public float mX = 0.f;
public float mY = 0.f;
public DotInfo(){}
public DotInfo(Double value,float x,float y)
{
mValue = value ;
mX = x ;
mY = y ;
}
public DotInfo(Double xValue,Double yValue,float x,float y)
{
mXValue = xValue ;
mYValue = yValue ;
mX = x ;
mY = y ;
}
public String getLabel()
{
return mXValue +","+ mYValue;
}
}
| [
"liangxiao@smart-haier.com"
] | liangxiao@smart-haier.com |
69eaf0c5badb53e1db8041a246d8f7bd49ce1672 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/15/15_5293c0b99af540d4998ba98741b5b71f4455317e/RTMPUtils/15_5293c0b99af540d4998ba98741b5b71f4455317e_RTMPUtils_s.java | d9896d54b669799a1b052a0a9611cddbadcac49f | [] | 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,551 | java | package org.red5.server.net.rtmp;
/*
* RED5 Open Source Flash Server - http://www.osflash.org/red5
*
* Copyright � 2006 by respective authors. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 2.1 of the License, or (at your option) any later
* version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with this library; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @author The Red5 Project (red5@osflash.org)
* @author Luke Hubbard, Codegent Ltd (luke@codegent.com)
*/
import org.apache.mina.common.ByteBuffer;
import org.red5.server.net.rtmp.message.Constants;
public class RTMPUtils implements Constants {
public static void writeReverseIntOld(ByteBuffer out, int value) {
byte[] bytes = new byte[4];
ByteBuffer rev = ByteBuffer.allocate(4);
rev.putInt(value);
rev.flip();
bytes[3] = rev.get();
bytes[2] = rev.get();
bytes[1] = rev.get();
bytes[0] = rev.get();
rev.release();
out.put(bytes);
}
public static void writeReverseInt(ByteBuffer out, int value){
byte[] bytes = new byte[4];
bytes[3] = (byte)(0xFF & (value >> 24));
bytes[2] = (byte)(0xFF & (value >> 16));
bytes[1] = (byte)(0xFF & (value >> 8));
bytes[0] = (byte)(0xFF & value);
out.put(bytes);
}
public static void writeMediumInt(ByteBuffer out, int value) {
byte[] bytes = new byte[3];
bytes[0] = (byte)(0xFF & (value >> 16));
bytes[1] = (byte)(0xFF & (value >> 8));
bytes[2] = (byte)(0xFF & (value >> 0));
out.put(bytes);
}
public static int readUnsignedMediumInt(ByteBuffer in) {
byte[] bytes = new byte[3];
in.get(bytes);
// Fix unsigned values
if (bytes[0] < 0) bytes[0] += 256;
if (bytes[1] < 0) bytes[1] += 256;
if (bytes[2] < 0) bytes[2] += 256;
int val = 0;
val += bytes[0] << 16;
val += bytes[1] << 8;
val += bytes[2];
return val;
}
public static int readUnsignedMediumIntOld(ByteBuffer in) {
byte[] bytes = new byte[3];
in.get(bytes);
int val = 0;
val += (bytes[0] & 0xFF) * 256 * 256;
val += (bytes[1] & 0xFF) * 256;
val += (bytes[2] & 0xFF);
return val;
}
public static int readMediumIntOld(ByteBuffer in) {
ByteBuffer buf = ByteBuffer.allocate(4);
buf.put((byte)0x00);
buf.put(in.get());
buf.put(in.get());
buf.put(in.get());
buf.flip();
int value = buf.getInt();
buf.release();
return value;
}
public static int readMediumInt(ByteBuffer in) {
byte[] bytes = new byte[3];
in.get(bytes);
// Fix unsigned values
int val = 0;
if (bytes[0] < 0) val += ((bytes[0] + 256) << 16);
else val += (bytes[0] << 16);
if (bytes[1] < 0) val += ((bytes[1] + 256) << 8);
else val += (bytes[1] << 8);
if (bytes[2] < 0) val += bytes[2] + 256;
else val += bytes[2];
return val;
}
public static int readReverseInt(ByteBuffer in) {
byte[] bytes = new byte[4];
in.get(bytes);
int val = 0;
val += bytes[3] << 24;
val += bytes[2] << 16;
val += bytes[1] << 8;
val += bytes[0];
return val;
}
public static int readReverseIntOld(ByteBuffer in) {
byte[] bytes = new byte[4];
in.get(bytes);
int val = 0;
val += bytes[3] * 256 * 256 * 256;
val += bytes[2] * 256 * 256;
val += bytes[1] * 256;
val += bytes[0];
return val;
}
public static byte encodeHeaderByte(byte headerSize, byte channelId){
return (byte) ((headerSize << 6) + channelId);
}
public static byte decodeChannelId(byte header) {
return (byte) (header & 0x3f);
}
public static byte decodeHeaderSize(byte header) {
int headerInt = (header>=0) ? header : header+256;
byte size = (byte) (headerInt >> 6);
return size;
}
public static int getHeaderLength(byte headerSize){
switch(headerSize){
case HEADER_NEW:
return 12;
case HEADER_SAME_SOURCE:
return 8;
case HEADER_TIMER_CHANGE:
return 4;
case HEADER_CONTINUE:
return 1;
default:
return -1;
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
3678274e4d64502e255cc86ee6d0face58d8c864 | c8ec156aff710230b23fcdcad3cff99e90ec43b1 | /src/test/java/jmind/pigg/support/model4table/BT.java | db5bf26f48bf758e0b1a5ee4d78cabb322721f44 | [
"Apache-2.0"
] | permissive | weiboxie/jmind-pigg | b13f7c98acb55cde74fabb31de2662b5abfd1cbe | 37a9d39042e15b214a2dbb2b4206be15da585ae9 | refs/heads/master | 2023-08-28T19:20:50.323692 | 2021-05-19T06:59:07 | 2021-05-19T06:59:07 | 415,533,073 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,435 | java | /*
*
*
* The jmind-pigg Project 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 jmind.pigg.support.model4table;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
/**
* @author xieweibo
*/
public class BT {
private int id;
private boolean isOk;
@Override
public boolean equals(Object obj) {
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
final BT other = (BT) obj;
return Objects.equal(this.id, other.id)
&& Objects.equal(this.isOk, other.isOk);
}
@Override
public String toString() {
return MoreObjects.toStringHelper(this).add("id", id).add("isOk", isOk).toString();
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public boolean isOk() {
return isOk;
}
public void setOk(boolean ok) {
isOk = ok;
}
}
| [
"weibo.xwb@alibaba-inc.com"
] | weibo.xwb@alibaba-inc.com |
242d99a1d1491bf1f3832d2e647e1e89e2eda155 | 39d11ddb25c29b0796679dcd726e6dca0a7ea90e | /java-multithread/src/main/java/com/brianway/learning/java/multithread/synchronize/example15/RunThread2.java | ccf5b689c6ba54b46a90209809d819430a49a7ba | [
"Apache-2.0"
] | permissive | banbanxia/java-learning | 4b329baa716ba1ba99b7cd7d68a3304a24d93c95 | f68869dd6d0ff5c4ca2879b9cec43b434f38f0d1 | refs/heads/master | 2021-05-10T12:18:04.250088 | 2020-01-14T05:03:44 | 2020-01-14T05:03:44 | 118,436,976 | 1 | 1 | null | 2018-01-22T09:41:49 | 2018-01-22T09:41:49 | null | UTF-8 | Java | false | false | 582 | java | package com.brianway.learning.java.multithread.synchronize.example15;
/**
* Created by Brian on 2016/4/13.
*/
public class RunThread2 extends Thread {
private boolean isRunning = true;
public boolean isRunning() {
return isRunning;
}
public void setRunning(boolean running) {
isRunning = running;
}
@Override
public void run() {
System.out.println("进入run了");
while (isRunning == true) {
synchronized ("any thing") {
}
}
System.out.println("线程被停止了");
}
}
| [
"250902678@qq.com"
] | 250902678@qq.com |
c16452cc776dec471996569ef8f1f8c7c5ba53d4 | 43ea91f3ca050380e4c163129e92b771d7bf144a | /services/iam/src/main/java/com/huaweicloud/sdk/iam/v3/model/KeystoneListMappingsResponse.java | 226d5d0f3b88e8b47c16d2a2b570ddf06171ddcd | [
"Apache-2.0"
] | permissive | wxgsdwl/huaweicloud-sdk-java-v3 | 660602ca08f32dc897d3770995b496a82a1cc72d | ee001d706568fdc7b852792d2e9aefeb9d13fb1e | refs/heads/master | 2023-02-27T14:20:54.774327 | 2021-02-07T11:48:35 | 2021-02-07T11:48:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,614 | java | package com.huaweicloud.sdk.iam.v3.model;
import com.huaweicloud.sdk.core.SdkResponse;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.huaweicloud.sdk.iam.v3.model.Links;
import com.huaweicloud.sdk.iam.v3.model.MappingResult;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
import java.util.Objects;
/**
* Response Object
*/
public class KeystoneListMappingsResponse extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="links")
private Links links = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="mappings")
private List<MappingResult> mappings = null;
public KeystoneListMappingsResponse withLinks(Links links) {
this.links = links;
return this;
}
public KeystoneListMappingsResponse withLinks(Consumer<Links> linksSetter) {
if(this.links == null ){
this.links = new Links();
linksSetter.accept(this.links);
}
return this;
}
/**
* Get links
* @return links
*/
public Links getLinks() {
return links;
}
public void setLinks(Links links) {
this.links = links;
}
public KeystoneListMappingsResponse withMappings(List<MappingResult> mappings) {
this.mappings = mappings;
return this;
}
public KeystoneListMappingsResponse addMappingsItem(MappingResult mappingsItem) {
if (this.mappings == null) {
this.mappings = new ArrayList<>();
}
this.mappings.add(mappingsItem);
return this;
}
public KeystoneListMappingsResponse withMappings(Consumer<List<MappingResult>> mappingsSetter) {
if(this.mappings == null ){
this.mappings = new ArrayList<>();
}
mappingsSetter.accept(this.mappings);
return this;
}
/**
* 映射信息列表。
* @return mappings
*/
public List<MappingResult> getMappings() {
return mappings;
}
public void setMappings(List<MappingResult> mappings) {
this.mappings = mappings;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
KeystoneListMappingsResponse keystoneListMappingsResponse = (KeystoneListMappingsResponse) o;
return Objects.equals(this.links, keystoneListMappingsResponse.links) &&
Objects.equals(this.mappings, keystoneListMappingsResponse.mappings);
}
@Override
public int hashCode() {
return Objects.hash(links, mappings);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class KeystoneListMappingsResponse {\n");
sb.append(" links: ").append(toIndentedString(links)).append("\n");
sb.append(" mappings: ").append(toIndentedString(mappings)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
fe70f00abc2fd2238c81611e208e724f4e3fdeb8 | 2bc3333e55d0b9dd86bc9ea4f8539f6bcf8bb469 | /src/flounder/post/filters/FilterWobble.java | 30152eac1346eb2d97e590b39dc32abea116631b | [
"MIT"
] | permissive | Jacobus722/Flounder-Java-Engine | d75b119dd2cda0bfd62db8db2f9e1f514484e813 | 467b1356580b7094e6848d813a2ebb40f7c4b076 | refs/heads/master | 2021-05-04T13:19:12.354638 | 2017-07-03T06:26:05 | 2017-07-03T06:26:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 450 | java | package flounder.post.filters;
import flounder.framework.*;
import flounder.post.*;
import flounder.resources.*;
public class FilterWobble extends PostFilter {
private float wobbleAmount;
public FilterWobble() {
super("filterWobble", new MyFile(PostFilter.POST_LOC, "wobbleFragment.glsl"));
}
@Override
public void storeValues() {
shader.getUniformFloat("moveIt").loadFloat(wobbleAmount += 2.0f * Framework.get().getDeltaRender());
}
}
| [
"mattparks5855@gmail.com"
] | mattparks5855@gmail.com |
8f1f8f80bfe752809c9e02337bce9d2687c2cce4 | 1c4e074c6da7135d7d360f7d7bbb0bee6b88006d | /src/com/small/saasdriver/adapter/OrderPlanAdapter.java | f521d337f228c1fe987e43b25f4d284ff207fb56 | [
"Apache-2.0"
] | permissive | Fuge2008/saasdriver | 7d943b267afb2cbbc0a39c4162a917719778fc2e | 2d1e03b579afb892de1b394b7fbc337c4e6b9811 | refs/heads/master | 2020-03-22T18:16:30.356001 | 2018-07-10T15:16:28 | 2018-07-10T15:16:28 | 140,448,851 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,716 | java | package com.small.saasdriver.adapter;
import java.util.List;
import com.example.saascardriver.R;
import com.small.saasdriver.adapter.base.BaseViewHolder;
import com.small.saasdriver.adapter.base.MyBaseAdapter;
import com.small.saasdriver.entity.order.OrderPlanEntity.Data;
import com.small.saasdriver.utils.StringUtils;
import android.content.Context;
import android.util.Log;
/**
* 订单记录适配器
*/
public class OrderPlanAdapter extends MyBaseAdapter<Data> {
public OrderPlanAdapter(Context context, int resource, List<Data> list) {
super(context, resource, list);
}
@Override
public void setConvert(BaseViewHolder viewHolder, Data data) {
if (StringUtils.isEmpty(data.Destination)) {
data.Destination = "未知";
viewHolder.setTextView(R.id.tv_end, data.Destination);
} else {
viewHolder.setTextView(R.id.tv_end, data.Destination);
}
if (StringUtils.isEmpty(data.UseVehicleDate)) {
data.UseVehicleDate = "未知";
viewHolder.setTextView(R.id.tv_date, data.UseVehicleDate);
} else {
viewHolder.setTextView(R.id.tv_date, data.UseVehicleDate);
}
if (StringUtils.isEmpty(data.Origin)) {
data.Origin = "未知";
viewHolder.setTextView(R.id.tv_start, data.Origin);
} else {
viewHolder.setTextView(R.id.tv_start, data.Origin);
}
if (StringUtils.isEmpty(data.OrderState)) {
viewHolder.setTextView(R.id.tv_statue, data.OrderState);
} else {
if (StringUtils.equals(data.OrderState, "1")) {
data.OrderState = "待接单";
} else if (StringUtils.equals(data.OrderState, "2")) {
data.OrderState = "已接单";
} else {
data.OrderState = "未知状态";
}
viewHolder.setTextView(R.id.tv_statue, data.OrderState);
}
}
} | [
"fzwooo@163.com"
] | fzwooo@163.com |
1d3e9c9494d1f6551af15fedaf8baa8e06d9b0e2 | 0d038bae00b5f5ced79f319723dd56df85a836c5 | /GTD/src/main/java/GTD/DL/DLEntity/Interval.java | 85064a9bc686da1b2f25880bbe113ddee5810c48 | [
"Apache-2.0"
] | permissive | Drugnanov/GTD_BP_rest | e2c83e1a0c7d745fa549214a305ec00f09f5a3b0 | 611d65f48892c58a6597a5dec51c990aca6c3730 | refs/heads/master | 2021-01-01T16:55:09.091159 | 2015-05-12T21:34:58 | 2015-05-12T21:34:58 | 35,513,735 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,699 | java | package GTD.DL.DLEntity;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
/**
* Trída predstavuje casový interval pro daný úkol.
*
* @author Sláma
*/
@Entity
@Table(name = "intervals")
public class Interval implements Serializable {
@Id
@GeneratedValue
private int id;
/**
* Casový pocátek úkolu. Minimální presnost jsou dny.
*/
@Column(name = "from_date", nullable = false)
private Date from;
/**
* Casový konec úkolu. Minimální presnost jsou dny.
*/
@Column(name = "to_date", nullable = false)
private Date to;
/**
* Konstruktor intevalu
*/
public Interval() {
}
public Interval(Date from, Date to) {
this.from = from;
this.to = to;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
/**
* Vrátí datum do z intervalu
*
* @return from
*/
public Date getFrom() {
return from;
}
/**
* Vrátí datum od z intervalu
*
* @return to
*/
public Date getTo() {
return to;
}
/**
* Vrátí tru, pikud je interval nastaven
*
* @return
*/
public boolean isSet() {
throw new UnsupportedOperationException();
}
/**
* Nastav interval
*
* @param from
* @param to to
*/
public void setInterval(Date from, Date to) {
this.from = from;
this.to = to;
}
public void setFrom(Date from) {
this.from = from;
}
public void setTo(Date to) {
this.to = to;
}
@Override
public int hashCode() {
int hash = 7;
hash = 29 * hash + this.id;
hash = 29 * hash + Objects.hashCode(this.from);
hash = 29 * hash + Objects.hashCode(this.to);
return hash;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Interval other = (Interval) obj;
if (this.id != other.id) {
return false;
}
if (!Objects.equals(this.from, other.from)) {
return false;
}
if (!Objects.equals(this.to, other.to)) {
return false;
}
return true;
}
@Override
public String toString() {
return from.toString() + " - " + to.toString();
}
}
| [
"slama.michal84@gmail.com"
] | slama.michal84@gmail.com |
5f051f85dea6b554efdb0fdd896f4f1be4d1a09f | 8a4f835c9f488a9f848c28c0149cf6e33f2a2b99 | /locman-api/src/main/java/com/run/locman/api/entity/SimpleOrderDevice.java | 5cc270b7ea5e2fdd010e985ac469d991b7046736 | [] | no_license | zhfly1992/locman | 7b2e06ebfab18a9c602ba2ea3b0bedfbb8a3b290 | aae464cfa5b25baaaa8ee4eea5659b184ea62339 | refs/heads/master | 2023-01-05T23:24:57.121823 | 2020-11-04T03:05:22 | 2020-11-04T03:05:22 | 309,865,193 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,101 | java | package com.run.locman.api.entity;
import java.io.Serializable;
/**
* @Description:
* @author: 田明
* @version: 1.0, 2017年12月05日
*/
public class SimpleOrderDevice implements Serializable {
private static final long serialVersionUID =1L;
private String id;
private String simpleOrderId;
private String deviceId;
public SimpleOrderDevice() {
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getSimpleOrderId() {
return simpleOrderId;
}
public void setSimpleOrderId(String simpleOrderId) {
this.simpleOrderId = simpleOrderId;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
@Override
public String toString() {
return "SimpleOrderDevice{" +
"id='" + id + '\'' +
", simpleOrderId='" + simpleOrderId + '\'' +
", deviceId='" + deviceId + '\'' +
'}';
}
}
| [
"zhanghe"
] | zhanghe |
28b9c0373e0d006a92ea9c825bb1260d0611b768 | a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb | /ccc-20170705/src/main/java/com/aliyun/ccc20170705/models/GetConversationListResponse.java | 2039243450e703ad5edc9a7750fff9607e81ff3e | [
"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 | 1,097 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.ccc20170705.models;
import com.aliyun.tea.*;
public class GetConversationListResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("body")
@Validation(required = true)
public GetConversationListResponseBody body;
public static GetConversationListResponse build(java.util.Map<String, ?> map) throws Exception {
GetConversationListResponse self = new GetConversationListResponse();
return TeaModel.build(map, self);
}
public GetConversationListResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public GetConversationListResponse setBody(GetConversationListResponseBody body) {
this.body = body;
return this;
}
public GetConversationListResponseBody getBody() {
return this.body;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
033da84045e8ce23e1a0045c814d66fafd81e110 | 9bc2e16bd25461ee4fa641aafb268b5029f9b0e2 | /swing/src/main/java/example/ImageEx.java | c6bfb20b1e67fce1a87768d1276756a85f07355c | [] | no_license | sergueik/selenium_java | 775432bb23f418893551d73d82acd210bf07e43c | 18eca29cd2e87b4e0bdf9f450e7608aae97b8e8d | refs/heads/master | 2023-08-31T21:56:41.765828 | 2023-08-28T23:14:28 | 2023-08-28T23:14:28 | 40,056,997 | 25 | 14 | null | 2023-02-22T08:44:35 | 2015-08-01T19:00:35 | Java | UTF-8 | Java | false | false | 1,845 | java | package example;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.net.URL;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JFrame;
import javax.swing.JLabel;
// based on: http://www.java2s.com/Tutorials/Java/Graphics_How_to/Image/Display_Image_with_Swing_GUI.htm
// see also: https://www.baeldung.com/java-images
public class ImageEx extends JFrame {
public ImageEx() {
this.setLayout(new FlowLayout());
this.setSize(200, 200);
JLabel jLabel = new JLabel();
JImage jImage = new JImage();
jImage.setImage("http://www.java2s.com/style/download.png");
jLabel.setIcon(new ImageIcon(jImage.getImage()));
this.add(jLabel);
this.setVisible(true);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
private static class JImage extends JComponent {
BufferedImage image;
public JImage() {
}
@Override
protected void paintComponent(Graphics graphics) {
super.paintComponent(graphics);
graphics.drawImage(getImage(), getLocation().x, getLocation().y,
getSize().width, getSize().height, null);
// has no effect
Graphics2D graphics2d = (Graphics2D) graphics;
graphics2d.setStroke(new BasicStroke(10));
graphics2d.setColor(Color.BLUE);
graphics2d.drawRect(10, 10, getImage().getWidth() - 20,
getImage().getHeight() - 20);
}
void setImage(String imageUrl) {
try {
// this.image = ImageIO.read(new File(imagePath));
this.image = ImageIO.read(new URL(imageUrl));
} catch (Exception e) {
e.printStackTrace();
}
}
BufferedImage getImage() {
return this.image;
}
}
public static void main(String avg[]) throws Exception {
ImageEx o = new ImageEx();
}
} | [
"kouzmine_serguei@yahoo.com"
] | kouzmine_serguei@yahoo.com |
36d2313db1985c5f5d38145e4fa4921c3f9656b7 | 2bc8c27f0ecc5b8dd67ebca66a1e106c7b4126fc | /target/cartridge-test/actual/java/src/com/poesys/db/memcached_test/sql/DeleteTestAssociationChild.java | e86428ec5d09f009685837a54b08e2103d7f2ba0 | [] | no_license | Poesys-Associates/poesys-cartridge | f85b3d63d1c8966ec2cfdb7eef564e21b23d3607 | 207f39378ff2bd354f9201049d7c484ee5f52279 | refs/heads/master | 2020-12-09T01:05:26.488830 | 2017-05-11T15:44:55 | 2017-05-11T15:44:55 | 26,512,382 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 686 | java | /**
* Copyright 2009 Poesys Associates. All rights reserved.
*/
// Template: Delete.vsl
package com.poesys.db.memcached_test.sql;
/**
* <p>
* A delete of a TestAssociationChild. This class is the concrete subclass of the
* generated abstract class AbstractDeleteTestAssociationChild.
* </p>
* <p>
* Make any changes to delete behavior by overriding methods here rather than
* changing the abstract superclass; AndroMDA will overwrite that class when you
* run it but will never overwrite this concrete subclass.
* </p>
${dto.getDocumentation}
*
* @author Poesys/DB Cartridge
*/
public class DeleteTestAssociationChild extends AbstractDeleteTestAssociationChild {
} | [
"muller@phoenixbioinformatics.org"
] | muller@phoenixbioinformatics.org |
0fe3e137fd021a6bee2ea0c5ca8ae26761cb0e8d | 923ea5556ecfe3b512eea21b8cb1d80ae24e5e5f | /src/main/java/info/maizz/lifebetterkit/designpattern/template/UserQueryService.java | 4471f80736c5e54d0ff9f437dd22bc0b308b4372 | [] | no_license | stickgoal/lifeBetterKit | 0f142dd7e4e9722a277d461423c09ce7e3e90458 | f272f881062f962e9e61c24bd7cf4f37c476d431 | refs/heads/master | 2021-06-04T05:54:35.473505 | 2017-11-13T09:56:36 | 2017-11-13T09:56:36 | 22,205,445 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,774 | java | /*
maizz.info
* Copyright (c) 2014 All Rights Reserved.
*/
/*
* 修订记录:
* lucas(stick.goal@163.com) 2015年7月13日 下午5:34:09 创建
*/
package info.maizz.lifebetterkit.designpattern.template;
import java.util.Date;
/**
* 具体服务类,这里以用户查询服务为例,其他类相仿
*
* @author lucas(stick.goal@163.com)
*
*/
public class UserQueryService {
/**
* 查询用户
* @param form
* @return
*/
public UserQueryResult queryUser(UserQueryForm form) {
//具体的服务类只负责实现具体查询逻辑,不需要再处理日志等问题
return new QueryTemplate().<UserQueryForm, UserQueryResult> query(form,
new QueryCallBack<UserQueryForm, UserQueryResult>() {
@Override
public UserQueryResult initResult() {
return new UserQueryResult();
}
@Override
public UserQueryResult query(UserQueryResult r, UserQueryForm form) {
String userId = form.getUserId();
//脑补:查找数据库,这里随便写点数据
UserInfo userInfo = new UserInfo();
userInfo.setUserId(userId);
userInfo.setRegTime(new Date());
userInfo.setUsername("haha@github.com");
r.setUserInfo(userInfo);
return r;
}
});
}
/**
* 查询用户
* @param form
* @return
*/
public UserQueryResult queryUserAlternative(UserQueryForm form) {
//另一个具体实现
return new QueryTemplate().<UserQueryForm, UserQueryResult> query(form,
new QueryCallBack<UserQueryForm, UserQueryResult>() {
@Override
public UserQueryResult initResult() {
return new UserQueryResult();
}
@Override
public UserQueryResult query(UserQueryResult r, UserQueryForm form) {
//实现方法...
return r;
}
});
}
}
| [
"stick.goal@163.com"
] | stick.goal@163.com |
49369a9d414f893f4f3e9158d6800121445dd975 | 45f87afc7fe493a3739885d39f9eb0184c96e0c9 | /services/vserver/src/main/java/com/ncloud/vserver/model/AssignSecondaryIpsResponse.java | 9242bf172fe829a7dac320103ae9051591d816c0 | [
"MIT"
] | permissive | NaverCloudPlatform/ncloud-sdk-java | 6635639835ed19dc82e4605c554f894a14645004 | bb692dab5f00f94f36c1fcc622bec6d2f2c88d28 | refs/heads/master | 2023-05-03T07:21:03.219343 | 2023-04-19T10:56:17 | 2023-04-19T10:56:17 | 210,761,909 | 7 | 6 | MIT | 2023-04-19T10:56:52 | 2019-09-25T05:23:36 | Java | UTF-8 | Java | false | false | 4,634 | java | /*
* vserver
* VPC Compute 관련 API<br/>https://ncloud.apigw.ntruss.com/vserver/v2
*
* NBP corp.
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.ncloud.vserver.model;
import java.util.Objects;
import com.ncloud.vserver.model.NetworkInterface;
import java.util.ArrayList;
import java.util.List;
/**
* AssignSecondaryIpsResponse
*/
public class AssignSecondaryIpsResponse {
private String requestId = null;
private String returnCode = null;
private String returnMessage = null;
private Integer totalRows = null;
private List<NetworkInterface> networkInterfaceList = null;
public AssignSecondaryIpsResponse requestId(String requestId) {
this.requestId = requestId;
return this;
}
/**
* Get requestId
* @return requestId
**/
public String getRequestId() {
return requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public AssignSecondaryIpsResponse returnCode(String returnCode) {
this.returnCode = returnCode;
return this;
}
/**
* Get returnCode
* @return returnCode
**/
public String getReturnCode() {
return returnCode;
}
public void setReturnCode(String returnCode) {
this.returnCode = returnCode;
}
public AssignSecondaryIpsResponse returnMessage(String returnMessage) {
this.returnMessage = returnMessage;
return this;
}
/**
* Get returnMessage
* @return returnMessage
**/
public String getReturnMessage() {
return returnMessage;
}
public void setReturnMessage(String returnMessage) {
this.returnMessage = returnMessage;
}
public AssignSecondaryIpsResponse totalRows(Integer totalRows) {
this.totalRows = totalRows;
return this;
}
/**
* Get totalRows
* @return totalRows
**/
public Integer getTotalRows() {
return totalRows;
}
public void setTotalRows(Integer totalRows) {
this.totalRows = totalRows;
}
public AssignSecondaryIpsResponse networkInterfaceList(List<NetworkInterface> networkInterfaceList) {
this.networkInterfaceList = networkInterfaceList;
return this;
}
public AssignSecondaryIpsResponse addNetworkInterfaceListItem(NetworkInterface networkInterfaceListItem) {
if (this.networkInterfaceList == null) {
this.networkInterfaceList = new ArrayList<NetworkInterface>();
}
this.networkInterfaceList.add(networkInterfaceListItem);
return this;
}
/**
* Get networkInterfaceList
* @return networkInterfaceList
**/
public List<NetworkInterface> getNetworkInterfaceList() {
return networkInterfaceList;
}
public void setNetworkInterfaceList(List<NetworkInterface> networkInterfaceList) {
this.networkInterfaceList = networkInterfaceList;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AssignSecondaryIpsResponse assignSecondaryIpsResponse = (AssignSecondaryIpsResponse) o;
return Objects.equals(this.requestId, assignSecondaryIpsResponse.requestId) &&
Objects.equals(this.returnCode, assignSecondaryIpsResponse.returnCode) &&
Objects.equals(this.returnMessage, assignSecondaryIpsResponse.returnMessage) &&
Objects.equals(this.totalRows, assignSecondaryIpsResponse.totalRows) &&
Objects.equals(this.networkInterfaceList, assignSecondaryIpsResponse.networkInterfaceList);
}
@Override
public int hashCode() {
return Objects.hash(requestId, returnCode, returnMessage, totalRows, networkInterfaceList);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AssignSecondaryIpsResponse {\n");
sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n");
sb.append(" returnCode: ").append(toIndentedString(returnCode)).append("\n");
sb.append(" returnMessage: ").append(toIndentedString(returnMessage)).append("\n");
sb.append(" totalRows: ").append(toIndentedString(totalRows)).append("\n");
sb.append(" networkInterfaceList: ").append(toIndentedString(networkInterfaceList)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"lee.yongtak@navercorp.com"
] | lee.yongtak@navercorp.com |
c8b61e0911c78b761747f753150335d55e361549 | f50256968c1df795f4157ffe849a35b112597bcc | /fluent-mybatis-test/src/test/java/cn/org/atool/fluent/mybatis/test2/notapply/SelectApplyTest.java | 6d9d3364446254be4cffd376db2fe5d75b6af635 | [
"Apache-2.0"
] | permissive | repubsky/fluent-mybatis | 01076f0d39ae96f9f2567e6ab2137999ab9db017 | 38460ec93f1c42f7735842fd29f4fd076b022a4f | refs/heads/master | 2023-08-25T03:13:27.302440 | 2021-10-31T11:01:13 | 2021-10-31T11:01:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,010 | java | package cn.org.atool.fluent.mybatis.test2.notapply;
import cn.org.atool.fluent.mybatis.generator.shared2.Ref;
import cn.org.atool.fluent.mybatis.generator.shared2.entity.StudentEntity;
import cn.org.atool.fluent.mybatis.generator.shared2.mapper.StudentMapper;
import cn.org.atool.fluent.mybatis.test1.BaseTest;
import cn.org.atool.fluent.mybatis.base.free.FreeQuery;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import static cn.org.atool.fluent.mybatis.segment.model.Aggregate.SUM;
@SuppressWarnings("unchecked")
public class SelectApplyTest extends BaseTest {
@Autowired
StudentMapper mapper;
@Test
void test_apply_field() {
mapper.emptyQuery().select.applyField("id", "userName")
.end()
.to().listEntity();
db.sqlList().wantFirstSql().eq("SELECT `id`, `user_name` FROM fluent_mybatis.student");
}
@Test
void test_apply_not_column() {
mapper.emptyQuery().select.exclude("id", "user_name")
.to().listEntity();
db.sqlList().wantFirstSql()
.notContain("`id`")
.notContain("`user_name`")
.contains("`gmt_created`, `gmt_modified`, `is_deleted`,")
.end("FROM fluent_mybatis.student");
}
@Test
void test_apply_not_field() {
mapper.emptyQuery().select.excludeField("id", "userName")
.to().listEntity();
db.sqlList().wantFirstSql()
.notContain("`id`")
.notContain("`user_name`")
.contains("`gmt_created`, `gmt_modified`, `is_deleted`,")
.end("FROM fluent_mybatis.student");
}
@Test
void test_apply_not_fieldMapping() {
mapper.emptyQuery().select.exclude(Ref.Field.Student.id, Ref.Field.Student.userName)
.to().listEntity();
db.sqlList().wantFirstSql()
.notContain("`id`")
.notContain("`user_name`")
.contains("`gmt_created`, `gmt_modified`, `is_deleted`,")
.end("FROM fluent_mybatis.student");
}
@Test
void test_apply_not_IGetter() {
mapper.emptyQuery().select.exclude(StudentEntity::getId, StudentEntity::getUserName)
.to().listEntity();
db.sqlList().wantFirstSql()
.notContain("`id`")
.notContain("`user_name`")
.contains("`gmt_created`, `gmt_modified`, `is_deleted`,")
.end("FROM fluent_mybatis.student");
}
@Test
void test_freeQuery_apply_not() {
mapper.listEntity(new FreeQuery("student")
.select.excludeField("id", "userName")
);
db.sqlList().wantFirstSql()
.notContain("`id`")
.notContain("`user_name`")
.contains("`gmt_created`, `gmt_modified`, `is_deleted`,")
.end("FROM `student`");
}
@Test
void test_apply_getter_as() {
mapper.emptyQuery().select.applyAs(StudentEntity::getUserName, "un")
.end()
.to().listEntity();
db.sqlList().wantFirstSql().eq("SELECT `user_name` AS un FROM fluent_mybatis.student");
}
@Test
void test_apply_field_as() {
mapper.emptyQuery().select.applyFieldAs("userName", "un")
.end()
.to().listEntity();
db.sqlList().wantFirstSql().eq("SELECT `user_name` AS un FROM fluent_mybatis.student");
}
@Test
void test_apply_func_field() {
mapper.emptyQuery().select.applyFuncByField(SUM, "bonusPoints", "SUM_POINTS")
.end()
.to().listEntity();
db.sqlList().wantFirstSql().eq("SELECT SUM(`bonus_points`) AS SUM_POINTS FROM fluent_mybatis.student");
}
@Test
void test_apply_func_getter() {
mapper.emptyQuery().select.applyFunc(SUM, StudentEntity::getBonusPoints, "SUM_POINTS")
.end()
.to().listEntity();
db.sqlList().wantFirstSql().eq("SELECT SUM(`bonus_points`) AS SUM_POINTS FROM fluent_mybatis.student");
}
}
| [
"darui.wu@163.com"
] | darui.wu@163.com |
6ca2497add7728c1345aa523509322003933dd19 | 2a2e4b81efbf5ad263b835b8c717155e61f31c4b | /Mesh4j2me/trunk/org.mesh4j.sync/src/org/mesh4j/sync/adapters/split/IContentAdapter.java | 68f5d2c477eb4fd6f0e820ec8c89dd123e9c7ae7 | [] | no_license | ptyagi108/mesh4x | 0c9f68a5048362ed2853dd3de4b90dfadef6ebe0 | c7d360d703b51d87f0795101a07d9dcf99ef8d19 | refs/heads/master | 2021-01-13T02:37:05.390793 | 2010-10-12T13:31:40 | 2010-10-12T13:31:40 | 33,174,471 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 408 | java | package org.mesh4j.sync.adapters.split;
import java.util.Date;
import java.util.Vector;
import org.mesh4j.sync.model.IContent;
public interface IContentAdapter {
void save(IContent entity);
IContent get(String entityId);
void delete(IContent entity);
Vector<IContent> getAll(Date since);
String getType();
IContent normalize(IContent content);
void deleteAll();
}
| [
"jtondato@gmail.com@8593f39d-8f4b-0410-bdb6-4f53e344ee92"
] | jtondato@gmail.com@8593f39d-8f4b-0410-bdb6-4f53e344ee92 |
344e997ef5ec76922d86785612fe0cbb749647e7 | 5e1da9684bb5d9dda590445bb95ef513147d23b4 | /zt-b2b/zt-b2b-interface/src/main/java/com/zsyc/zt/b2b/vo/NewProductImageVo.java | 46ea6a3f75fa60ed784f99acd555b35f9fd6d611 | [] | no_license | liutaota/b2b2 | 4df87e2d3f7597bf36334112e3203bf92deba6c8 | 3d71bd4062170e5c99e5e59d7dd10f3a8c00a5fd | refs/heads/master | 2023-03-15T11:10:38.699907 | 2021-03-05T08:13:15 | 2021-03-05T08:13:15 | 344,737,055 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 540 | java | package com.zsyc.zt.b2b.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
@Data
//@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value = "NewProductImageVo对象", description = "新品图片数据")
public class NewProductImageVo implements Serializable {
@ApiModelProperty("文件类型:img")
private String type;
@ApiModelProperty("code")
private String code;
}
| [
"liutao@qq.com"
] | liutao@qq.com |
5a7d7d7b8d72271b373cf9c0ff05772ab1739108 | 5a474480d0961003f92eb3e6e4c793fa9dddef1b | /src/main/java/it/algos/vaadflow/ui/fields/AMailField.java | 680d9e0b2133bd53dec954422f207586d730f76c | [] | no_license | algos-soft/vaadlievito | 4c33f166b796c334c89f474b4ca6e49408bb5550 | 95141f4573eadf215df62ce5514904ada209f9b1 | refs/heads/master | 2023-08-18T02:29:02.966857 | 2021-09-26T19:56:39 | 2021-09-26T19:56:39 | 254,869,128 | 0 | 0 | null | 2021-09-26T19:57:20 | 2020-04-11T13:03:33 | Java | UTF-8 | Java | false | false | 475 | java | package it.algos.vaadflow.ui.fields;
import com.vaadin.flow.spring.annotation.SpringComponent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
/**
* Project vaadflow
* Created by Algos
* User: gac
* Date: ven, 27-dic-2019
* Time: 10:22
*/
@SpringComponent
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
@Slf4j
public class AMailField {
}// end of class
| [
"gac@algos.it"
] | gac@algos.it |
73a2f36cad7a9ca2ffeff1c2d4c875232344f44a | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/25/25_a92ae43a73a28da64dd65fab7356255a1212162d/MainActivity/25_a92ae43a73a28da64dd65fab7356255a1212162d_MainActivity_s.java | 9a27e9bc3984d81c5f562bddbfa70fe378625baa | [] | 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 | 3,422 | java | package pl.orellana.doto;
import android.app.FragmentManager;
import android.app.ListActivity;
import android.database.Cursor;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.AdapterView;
import android.widget.SearchView;
import android.widget.SimpleCursorAdapter;
public class MainActivity extends ListActivity {
private SimpleCursorAdapter ad;
private DatabaseHandler dbh;
private FragmentManager fm;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
fm = getFragmentManager();
getListView().addHeaderView(
getLayoutInflater().inflate(R.layout.first_list_item, null),
null, true);
dbh = new DatabaseHandler(this);
Cursor c = dbh.getTasksCursor();
ad = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_2,
c, new String[] { DatabaseHandler.KEY_TASK,
DatabaseHandler.KEY_GROUP }, new int[] {
android.R.id.text1, android.R.id.text2 },
SimpleCursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER);
setListAdapter(ad);
getListView().setOnItemClickListener(
new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
if (position == 0) { // as we set the first element, we
// know is ours
AddOptionDialog a = new AddOptionDialog();
a.show(fm, "fragment_add_item");
} else {
LongPressDialog l = new LongPressDialog(position);
l.show(fm, "fragment_options_dialog");
}
}
});
getListView().setOnItemLongClickListener(
new AdapterView.OnItemLongClickListener() {
@Override
public boolean onItemLongClick(AdapterView<?> parent,
View view, int position, long id) {
return false;
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.activity_main, menu);
// Get the SearchView and set the searchable configuration
SearchView searchView = (SearchView) menu.findItem(R.id.menu_search)
.getActionView();
// Assumes current activity is the searchable activity
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String arg0) {
return false;
}
@Override
public boolean onQueryTextChange(String query) {
if (query.equals("")) {
updateCursor();
} else {
((SimpleCursorAdapter) getListAdapter()).changeCursor(dbh
.getTasksSearchCursor(query));
}
return true;
}
});
return true;
}
public void doPositiveClick(String task, String taskgroup) {
dbh.addTask(new Task(0, task, taskgroup));
updateCursor();
}
public void deleteOne(int p) {
Cursor c = (Cursor) getListAdapter().getItem(p - 1);
dbh.deleteTask(c.getInt(0));
updateCursor();
}
public void updateCursor() {
((SimpleCursorAdapter) getListAdapter()).changeCursor(dbh
.getTasksCursor());
}
public void doEdit(Task t) {
dbh.updateTask(t);
updateCursor();
}
public void editOne(int p) {
EditOptionDialog l = new EditOptionDialog();
Bundle b = new Bundle();
b.putSerializable("task", dbh.getTask(p - 1));
l.setArguments(b);
l.show(fm, "fragment_edit_option");
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
7d32d60888ad4ffb5b6908e440ccacafe68655f1 | 1bb55e316b2882a64145c1f7b2fff0fb554276a1 | /jps/jps-builders/src/org/jetbrains/jps/incremental/CompiledClass.java | ff5d28227e1d24f922be2636715331794a1fc0fa | [
"Apache-2.0"
] | permissive | dnkoutso/intellij-community | 70109525a6ff1a5e8b39559dc12b27055373bbb8 | b61f35ff2604cab5e4df217d9debdb656674a9b6 | refs/heads/master | 2021-01-16T20:57:03.721492 | 2012-12-10T21:31:21 | 2012-12-10T21:53:52 | 7,098,498 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,833 | java | package org.jetbrains.jps.incremental;
import com.intellij.openapi.util.UserDataHolderBase;
import com.intellij.openapi.util.io.FileUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.File;
import java.io.IOException;
/**
* @author Eugene Zhuravlev
* Date: 11/18/12
*/
public class CompiledClass extends UserDataHolderBase{
@NotNull
private final File myOutputFile;
@NotNull
private final File mySourceFile;
@Nullable
private final String myClassName;
@NotNull
private BinaryContent myContent;
private boolean myIsDirty = false;
public CompiledClass(@NotNull File outputFile, @NotNull File sourceFile, @Nullable String className, @NotNull BinaryContent content) {
myOutputFile = outputFile;
mySourceFile = sourceFile;
myClassName = className;
myContent = content;
}
public void save() throws IOException {
myContent.saveToFile(myOutputFile);
myIsDirty = false;
}
@NotNull
public File getOutputFile() {
return myOutputFile;
}
@NotNull
public File getSourceFile() {
return mySourceFile;
}
@Nullable
public String getClassName() {
return myClassName;
}
@NotNull
public BinaryContent getContent() {
return myContent;
}
public void setContent(@NotNull BinaryContent content) {
myContent = content;
myIsDirty = true;
}
public boolean isDirty() {
return myIsDirty;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CompiledClass aClass = (CompiledClass)o;
if (!FileUtil.filesEqual(myOutputFile, aClass.myOutputFile)) return false;
return true;
}
@Override
public int hashCode() {
return FileUtil.fileHashCode(myOutputFile);
}
}
| [
"jeka@intellij.com"
] | jeka@intellij.com |
4a4b087c099a45c6f296fd0507402294f02cba6b | 818ee0dec3a0c3b8326d7d3485b811b528ccf79b | /src/L13FunctionalProgrammingExercises/Ex13InfernoIII.java | da0f043b1cfbf0c8feea35c3414a80ec50c7980d | [
"MIT"
] | permissive | VasAtanasov/SoftUni-Java-Advanced-May-2018 | 54923fdd3501e68eab4d5c982e90993f61615650 | 75e93cd0bff3df39daeffe949cdaedbb8d863325 | refs/heads/master | 2020-04-14T21:18:16.129987 | 2019-01-15T11:27:40 | 2019-01-15T11:27:40 | 164,123,926 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,237 | java | package L13FunctionalProgrammingExercises;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.util.function.BiFunction;
import java.util.stream.Collectors;
public class Ex13InfernoIII {
private static BufferedReader reader;
private static List<Integer> numbers;
private static List<String> actions;
private static List<Integer> indexes;
static {
reader = new BufferedReader(new InputStreamReader(System.in));
actions = new ArrayList<>();
indexes = new ArrayList<>();
}
public static void main(String[] args) throws IOException {
getGems();
getActions();
for (String action : actions) {
indexes.addAll(indexFilter.apply(numbers, action));
}
System.out.println(getStringResult());
}
private static String getStringResult() {
StringBuilder output = new StringBuilder();
for (int i = 0; i < numbers.size(); i++) {
if (! indexes.contains(i)) {
output.append(numbers.get(i)).append(" ");
}
}
return output.toString().trim();
}
private static void getActions() throws IOException {
String input;
while (! "Forge".equals(input = reader.readLine())) {
String[] tokens = input.split(";");
String command = tokens[0];
String condition = tokens[1];
String criteria = tokens[2];
String action = condition + " " + criteria;
switch (command) {
case "Exclude":
actions.add(action);
break;
case "Reverse":
reverseAction(action);
break;
}
}
}
private static void reverseAction(String action) {
for (int i = actions.size() - 1; i >= 0; i--) {
if (actions.get(i).equals(action)) {
actions.remove(i);
break;
}
}
}
private static void getGems() throws IOException {
numbers = Arrays.stream(reader.readLine().split("\\s+"))
.map(Integer::parseInt)
.collect(Collectors.toCollection(ArrayList::new));
}
private static BiFunction<List<Integer>, String, List<Integer>> indexFilter = (list, action) -> {
List<Integer> indexes = new ArrayList<>();
String condition = action.substring(0, action.lastIndexOf(" "));
int criteria = Integer.parseInt(action.substring(action.lastIndexOf(" ") + 1));
for (int i = 0; i < list.size(); i++) {
int leftElement = i - 1 < 0 ? 0 : list.get(i - 1);
int rightElement = i + 1 >= list.size() ? 0 : list.get(i + 1);
if ("Sum Left".equals(condition)) {
rightElement = 0;
}
if ("Sum Right".equals(condition)) {
leftElement = 0;
}
int currentElement = list.get(i);
int sum = leftElement + currentElement + rightElement;
if (sum == criteria) {
indexes.add(i);
}
}
return indexes;
};
}
| [
"vas.atanasov@gmail.com"
] | vas.atanasov@gmail.com |
0b51e40cd727585d8338a4c1887283db0addf539 | 11f60262a3cb72653d20e07e18d2b03d65fc4670 | /apollo_mq/bms/src/main/java/com/fangcang/base/controller/TestCommonCityController.java | 0531826a503a1c92875fbcf059ceebdd452d8ac3 | [
"Apache-2.0"
] | permissive | GSIL-Monitor/hotel-1 | 59812e7c3983a9b6db31f7818f93d7b3a6ac683c | 4d170c01a86a23ebf3378d906cac4641ba1aefa9 | refs/heads/master | 2020-04-12T18:29:14.914311 | 2018-12-21T07:03:37 | 2018-12-21T07:03:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,424 | java | package com.fangcang.base.controller;
import com.fangcang.base.dto.CommonCityDTO;
import com.fangcang.base.request.QueryMerchantCityDTO;
import com.fangcang.base.request.UpdateCommonCityDTO;
import com.fangcang.common.PaginationSupportDTO;
import com.fangcang.common.ResponseDTO;
import com.fangcang.common.controller.BaseController;
import com.fangcang.common.enums.ResultCodeEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
@RestController
@Slf4j
@RequestMapping(("/test/base/commoncity"))
public class TestCommonCityController extends BaseController {
@RequestMapping(value = "/merchantcitylist" , method = RequestMethod.POST, produces = { "application/json;charset=UTF-8" })
@ResponseBody
public ResponseDTO merchantcitylist(@RequestBody QueryMerchantCityDTO requestDTO) {
ResponseDTO responseDTO=new ResponseDTO(ResultCodeEnum.SUCCESS.code);
List<CommonCityDTO> list=new ArrayList<>();
list.add(new CommonCityDTO("SZX","深圳",1));
list.add(new CommonCityDTO("SZX","广州",1));
list.add(new CommonCityDTO("SZX","珠海",0));
list.add(new CommonCityDTO("SZX","香港",0));
list.add(new CommonCityDTO("SZX","澳门",0));
list.add(new CommonCityDTO("SZX","惠州",0));
list.add(new CommonCityDTO("SZX","杭州",0));
PaginationSupportDTO<CommonCityDTO> paginationSupportDTO=new PaginationSupportDTO<>();
paginationSupportDTO.setCurrentPage(1);
paginationSupportDTO.setPageSize(10);
paginationSupportDTO.setTotalPage(50);
paginationSupportDTO.setTotalCount(5);
paginationSupportDTO.setItemList(list);
responseDTO.setModel(paginationSupportDTO);
return responseDTO;
}
@RequestMapping(value = "/updatecommoncity" , method = RequestMethod.POST, produces = { "application/json;charset=UTF-8" })
@ResponseBody
public ResponseDTO updatecommoncity(@RequestBody UpdateCommonCityDTO requestDTO){
ResponseDTO responseDTO=new ResponseDTO(ResultCodeEnum.SUCCESS.code);
return responseDTO;
}
}
| [
"961346704@qq.com"
] | 961346704@qq.com |
0fe821d87859cd2a11b2b11bc12876d4fad2142c | c885ef92397be9d54b87741f01557f61d3f794f3 | /tests-without-trycatch/Lang-11/org.apache.commons.lang3.RandomStringUtils/BBC-F0-opt-80/26/org/apache/commons/lang3/RandomStringUtils_ESTest_scaffolding.java | 298978eff82c231fc365907d7ae2d7c28532c3b8 | [
"CC-BY-4.0",
"MIT"
] | permissive | pderakhshanfar/EMSE-BBC-experiment | f60ac5f7664dd9a85f755a00a57ec12c7551e8c6 | fea1a92c2e7ba7080b8529e2052259c9b697bbda | refs/heads/main | 2022-11-25T00:39:58.983828 | 2022-04-12T16:04:26 | 2022-04-12T16:04:26 | 309,335,889 | 0 | 1 | null | 2021-11-05T11:18:43 | 2020-11-02T10:30:38 | null | UTF-8 | Java | false | false | 3,231 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Oct 23 10:41:46 GMT 2021
*/
package org.apache.commons.lang3;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class RandomStringUtils_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.lang3.RandomStringUtils";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
/*No java.lang.System property to set*/
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(RandomStringUtils_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.lang3.RandomStringUtils"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(RandomStringUtils_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.apache.commons.lang3.RandomStringUtils"
);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
610eb39fe3195559ea6d4b325f69efc3e3f335ec | 668821a292dc5d2b4ccc23d02c295b377a6d333e | /src/main/java/mx/infotec/dads/kukulkan/engine/service/layers/conacyt/ModelLayerTask.java | cf5011d79ea8b944e60ff6caf6af7beb86a35522 | [
"MIT"
] | permissive | danimaniarqsoft/kukulcan | 855e653c0a168397a415fe7d1440433471d81654 | d7f82d361da69ef37121b1d33f880ed7c08c9f5d | refs/heads/master | 2020-07-04T02:17:27.811455 | 2017-05-30T15:41:21 | 2017-05-30T15:41:21 | 74,217,807 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,093 | java | /*
*
* The MIT License (MIT)
* Copyright (c) 2016 Daniel Cortes Pichardo
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package mx.infotec.dads.kukulkan.engine.service.layers.conacyt;
import static mx.infotec.dads.kukulkan.util.JavaFileNameParser.formatToImportStatement;
import static mx.infotec.dads.kukulkan.util.JavaFileNameParser.formatToPackageStatement;
import java.util.Collection;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import mx.infotec.dads.kukulkan.engine.domain.core.DataModelElement;
import mx.infotec.dads.kukulkan.engine.domain.core.ProjectConfiguration;
import mx.infotec.dads.kukulkan.templating.service.TemplateService;
import mx.infotec.dads.kukulkan.util.BasePathEnum;
/**
* Service Layer Task
*
* @author Daniel Cortes Pichardo
*
*/
@Service("conacytModelLayerTask")
public class ModelLayerTask extends ConacytLayerTaskVisitor {
@Autowired
private TemplateService templateService;
private static final Logger LOGGER = LoggerFactory.getLogger(ModelLayerTask.class);
@Override
public void doForEachDataModelElement(ProjectConfiguration pConf, Collection<DataModelElement> dmElementCollection,
Map<String, Object> model, String dmgName) {
LOGGER.debug("doForEachDataModelElement method {}", dmgName);
String basePackage = pConf.getPackaging() + dmgName;
for (DataModelElement dmElement : dmElementCollection) {
model.put("id", dmElement.getPrimaryKey().getType());
model.put("tableName", dmElement.getTableName());
model.put("className", dmElement.getName());
importPrimaryKey(pConf, model, basePackage, dmElement);
model.put("package", formatToPackageStatement(basePackage, pConf.getDomainLayerName()));
model.put("properties", dmElement.getProperties());
dmElement.getPrimaryKey().setGenerationType(pConf.getGlobalGenerationType());
model.put("primaryKey", dmElement.getPrimaryKey());
dmElement.getImports().add("javax.persistence.*");
dmElement.getImports().add("java.io.Serializable");
model.put("mandatoryProperties", dmElement.getMandatoryProperties());
//dmElement.getImports().add("java.util.Objects");
model.put("imports", dmElement.getImports());
model.put("hasNotNullElements", dmElement.isHasNotNullElements());
fillModel(pConf, model, dmgName, basePackage, dmElement);
fillPrimaryKey(pConf, model, dmgName, basePackage, dmElement);
}
}
private void fillModel(ProjectConfiguration pConf, Map<String, Object> model, String dmgName, String basePackage,
DataModelElement dmElement) {
templateService.fillModel(pConf.getId(), "common/model.ftl", model, BasePathEnum.SRC_MAIN_JAVA,
basePackage.replace('.', '/') + "/" + dmgName + "/" + pConf.getDomainLayerName() + "/"
+ dmElement.getName() + ".java");
}
private void fillPrimaryKey(ProjectConfiguration pConf, Map<String, Object> model, String dmgName,
String basePackage, DataModelElement dmElement) {
if (dmElement.getPrimaryKey().isComposed()) {
templateService.fillModel(pConf.getId(), "common/primaryKey.ftl", model, BasePathEnum.SRC_MAIN_JAVA,
basePackage.replace('.', '/') + "/" + dmgName + "/" + pConf.getDomainLayerName() + "/"
+ dmElement.getPrimaryKey().getType() + ".java");
}
}
private static void importPrimaryKey(ProjectConfiguration pConf, Map<String, Object> model, String basePackage,
DataModelElement dmElement) {
if (dmElement.getPrimaryKey().isComposed()) {
model.put("importPrimaryKey", formatToImportStatement(basePackage, pConf.getDomainLayerName(),
dmElement.getPrimaryKey().getType()));
}
}
}
| [
"daniel.cortes.pichardo@gmail.com"
] | daniel.cortes.pichardo@gmail.com |
1d99e4fbd12856c171012ef745cb93b826ed3b3f | f15889af407de46a94fd05f6226c66182c6085d0 | /trkincidents/src/main/java/com/oreon/incidents/web/action/drugs/restful/DrugInteractionResourceHome.java | b415ca70b82315918440e5a45c856c4212b886c8 | [] | no_license | oreon/sfcode-full | 231149f07c5b0b9b77982d26096fc88116759e5b | bea6dba23b7824de871d2b45d2a51036b88d4720 | refs/heads/master | 2021-01-10T06:03:27.674236 | 2015-04-27T10:23:10 | 2015-04-27T10:23:10 | 55,370,912 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,063 | java | package com.oreon.incidents.web.action.drugs.restful;
import javax.ws.rs.FormParam;
import javax.ws.rs.QueryParam;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.security.Restrict;
import org.jboss.seam.framework.EntityHome;
import org.jboss.seam.framework.Home;
import org.jboss.seam.resteasy.ResourceHome;
import org.jboss.seam.resteasy.ResourceQuery;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;
import com.oreon.incidents.drugs.DrugInteraction;
@Name("drugInteractionResourceHome")
@Path("drugInteraction")
public class DrugInteractionResourceHome
extends
ResourceHome<DrugInteraction, Long> {
@In(create = true)
private EntityHome<DrugInteraction> drugInteractionAction;
@Override
public Home<?, DrugInteraction> getEntityHome() {
return drugInteractionAction;
}
}
| [
"singhj@38423737-2f20-0410-893e-9c0ab9ae497d"
] | singhj@38423737-2f20-0410-893e-9c0ab9ae497d |
84a89ba6e3c68d8aef0b4a00159c2db0e74d7efb | a00326c0e2fc8944112589cd2ad638b278f058b9 | /src/main/java/000/138/752/CWE400_Resource_Exhaustion__max_value_for_loop_68b.java | d81f2443c62a21db434051d2179c02536ad1cfc5 | [] | 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,962 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE400_Resource_Exhaustion__max_value_for_loop_68b.java
Label Definition File: CWE400_Resource_Exhaustion.label.xml
Template File: sources-sinks-68b.tmpl.java
*/
/*
* @description
* CWE: 400 Resource Exhaustion
* BadSource: max_value Set count to a hardcoded value of Integer.MAX_VALUE
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: for_loop
* GoodSink: Validate count before using it as the loop variant in a for loop
* BadSink : Use count as the loop variant in a for loop
* Flow Variant: 68 Data flow: data passed as a member variable in the "a" class, which is used by a method in another class in the same package
*
* */
public class CWE400_Resource_Exhaustion__max_value_for_loop_68b
{
public void badSink() throws Throwable
{
int count = CWE400_Resource_Exhaustion__max_value_for_loop_68a.count;
int i = 0;
/* POTENTIAL FLAW: For loop using count as the loop variant and no validation */
for (i = 0; i < count; i++)
{
IO.writeLine("Hello");
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink() throws Throwable
{
int count = CWE400_Resource_Exhaustion__max_value_for_loop_68a.count;
int i = 0;
/* POTENTIAL FLAW: For loop using count as the loop variant and no validation */
for (i = 0; i < count; i++)
{
IO.writeLine("Hello");
}
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink() throws Throwable
{
int count = CWE400_Resource_Exhaustion__max_value_for_loop_68a.count;
int i = 0;
/* FIX: Validate count before using it as the for loop variant */
if (count > 0 && count <= 20)
{
for (i = 0; i < count; i++)
{
IO.writeLine("Hello");
}
}
}
}
| [
"anhtluet12@gmail.com"
] | anhtluet12@gmail.com |
0bef1bd068b66f2d5f8c96de5cb2543c39806dfe | 962af76666d6e22f692f0463f32d00ac58bad127 | /mobile/src/main/java/com/sarvex/efficient/chapter4/ConsumeAndQuitThreadActivity.java | ee9fd4e8139335fb118a4fd3e7b9aa0cca09f195 | [] | no_license | sarvex/EfficientAndroid | c802ac9d651064224c2369a2c63fefa2be8f06fe | 67fec5a7ba545a071e3959675475b2e2ad3314bb | refs/heads/main | 2023-05-20T03:10:19.260571 | 2023-05-18T02:17:49 | 2023-05-18T02:17:49 | 32,992,273 | 0 | 0 | null | 2023-09-10T14:55:47 | 2015-03-27T14:58:04 | Java | UTF-8 | Java | false | false | 2,029 | java | package com.sarvex.efficient.chapter4;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.MessageQueue;
import android.os.SystemClock;
import java.util.Random;
public class ConsumeAndQuitThreadActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final ConsumeAndQuitThread consumeAndQuitThread = new ConsumeAndQuitThread();
consumeAndQuitThread.start();
for (int i = 0; i < 10; i++) {
new Thread(new Runnable() {
@Override
public void run() {
for (int i = 0; i < 10; i++) {
SystemClock.sleep(new Random().nextInt(10));
consumeAndQuitThread.enqueueData(i);
}
}
}).start();
}
}
private static class ConsumeAndQuitThread extends Thread implements MessageQueue.IdleHandler {
private static final String THREAD_NAME = "ConsumeAndQuitThread";
public Handler mConsumerHandler;
private boolean mIsFirstIdle = true;
public ConsumeAndQuitThread() {
super(THREAD_NAME);
}
@Override
public void run() {
Looper.prepare();
mConsumerHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
// Consume data
}
};
Looper.myQueue().addIdleHandler(this);
Looper.loop();
}
@Override
public boolean queueIdle() {
if (mIsFirstIdle) {
mIsFirstIdle = false;
return true;
}
mConsumerHandler.getLooper().quit();
return false;
}
public void enqueueData(int i) {
mConsumerHandler.sendEmptyMessage(i);
}
}
}
| [
"sarvex.jatasra@gmail.com"
] | sarvex.jatasra@gmail.com |
c65adf85d677a9a389eccb17e2a8e44ab5f0f5b0 | 259b175e281b28c079463dd9d80e9bd60324a413 | /homework/src/task1/HourlyWageWorker.java | 3df342531e01e624da2678749cfefe6cc4eaf52a | [] | no_license | Andrii-Smit/Java_Core_lesson_06 | f21c18cd2983c3615b34b484b35426de10d1cbfb | c78322bb29654ea4fcb700e59664843a2b3eb28e | refs/heads/master | 2022-11-16T01:30:46.263076 | 2020-07-20T19:03:17 | 2020-07-20T19:03:17 | 281,201,722 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 502 | java | package task1;
public class HourlyWageWorker extends Worker implements Salary {
private int monthWorkedHours;
private double hourRate;
public HourlyWageWorker(String name, int monthWorkedHours, double hourRate) {
super(name);
this.monthWorkedHours = monthWorkedHours;
this.hourRate = hourRate;
}
@Override
public void salary() {
double salary = this.monthWorkedHours * this.hourRate;
System.out.println(" Employee salary " + super.getName() + " = " + salary + " USD ");
}
}
| [
"lovak_000@Koval"
] | lovak_000@Koval |
6cfcbd118eba2e1824439d5b93c8cdca2cace92e | 5894f13a756d07c39f6641115c667cf8fc967905 | /src/main/java/com/semanticRelationsExtractorStanford/morphology/NumberPrefixDetector.java | 8c8319630c6717265fa967f27d183266ad5a8ed6 | [] | no_license | ares2015/SemanticRelationsExtractorStanford | a19101043600e4ee343a346ccbf070d00808e051 | cfeded56c004d09a5595f6f2668f9680c99b41b1 | refs/heads/master | 2021-01-01T15:29:14.981072 | 2017-10-12T15:15:12 | 2017-10-12T15:15:12 | 97,629,529 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 181 | java | package com.semanticRelationsExtractorStanford.morphology;
/**
* Created by Oliver on 7/18/2017.
*/
public interface NumberPrefixDetector {
boolean detect(String token);
}
| [
"eder@essential-data.sk"
] | eder@essential-data.sk |
902f398438b130e3e442742a25c2534d305797ff | 696680b9b5b9961e2cfcca312c84b773ab556598 | /src/main/java/tk/ainiyue/danyuan/application/crm/roles/service/SysRolesService.java | 93dc28a456f2a84e0add9431bff98e0393e37f5e | [
"Apache-2.0"
] | permissive | 514840279/danyuan-kejiju | a1831d43f7d5acabeeee500b343b91ba737a5d5e | c10ab7e7f7927998891f07f19415874506941e8c | refs/heads/master | 2021-04-03T08:35:02.418893 | 2018-05-10T07:39:52 | 2018-05-10T07:39:52 | 124,724,451 | 0 | 0 | Apache-2.0 | 2019-07-12T07:50:44 | 2018-03-11T04:54:36 | JavaScript | UTF-8 | Java | false | false | 1,062 | java | package tk.ainiyue.danyuan.application.crm.roles.service;
import java.util.List;
import org.springframework.data.domain.Page;
import tk.ainiyue.danyuan.application.crm.roles.po.SysRolesInfo;
/**
* 文件名 : SysRolesService.java
* 包 名 : tk.ainiyue.admin.roles.service
* 描 述 : TODO(用一句话描述该文件做什么)
* 机能名称:
* 技能ID :
* 作 者 : Tenghui.Wang
* 时 间 : 2016年7月17日 下午3:54:44
* 版 本 : V1.0
*/
public interface SysRolesService {
/**
* 方法名: findAll
* 功 能: TODO(这里用一句话描述这个方法的作用)
* 参 数: @return
* 返 回: List<SysRolesInfo>
* 作 者 : Tenghui.Wang
* @throws
*/
List<SysRolesInfo> findAll();
SysRolesInfo findByUuid(String uuid);
Page<SysRolesInfo> findAllBySearchText(int pageNumber, int pageSize, SysRolesInfo info);
void save(SysRolesInfo info);
void delete(SysRolesInfo info);
void delete(List<SysRolesInfo> list);
void trunc();
List<SysRolesInfo> findAllRoleBySearchText(String userId);
}
| [
"514840279@qq.com"
] | 514840279@qq.com |
235fc10cd8173db8ab9ecc84c258cff3a91273d2 | 16d39be561f4a75ec49b27fb99927fd0a011118e | /src/main/java/pe/joedayz/clientes/entity/Menu.java | ac1c40e2429806b37bbb17fab8392e6a932e7ded | [] | no_license | johensantos/gestionclientes | ecd53a65146ee3fe7f11ec3aef8e6cfb5b353a85 | 7c7c2250909efd1ede6ebc236f1adfbc5ad59636 | refs/heads/master | 2022-08-30T21:32:57.472889 | 2020-05-22T06:13:24 | 2020-05-22T06:13:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,901 | java | package pe.joedayz.clientes.entity;
import java.io.Serializable;
import javax.persistence.*;
@Entity
@Table(name = "Menus")
@NamedQueries({
@NamedQuery(name = "Menu.findAll", query = "SELECT t FROM Menu t")})
public class Menu implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "Cod_Menu")
private Integer codMenu;
@Column(name = "Descripcion")
private String descripcion;
@Column(name = "Padre")
private Integer padre;
@Column(name = "Orden")
private Integer orden;
@Column(name = "Activo")
private Integer activo;
public Menu() {
}
public Menu(Integer codMenu) {
this.codMenu = codMenu;
}
public Integer getCodMenu() {
return codMenu;
}
public void setCodMenu(Integer codMenu) {
this.codMenu = codMenu;
}
public String getDescripcion() {
return descripcion;
}
public void setDescripcion(String descripcion) {
this.descripcion = descripcion;
}
public Integer getPadre() {
return padre;
}
public void setPadre(Integer padre) {
this.padre = padre;
}
public Integer getOrden() {
return orden;
}
public void setOrden(Integer orden) {
this.orden = orden;
}
public Integer getActivo() {
return activo;
}
public void setActivo(Integer activo) {
this.activo = activo;
}
@Override
public int hashCode() {
int hash = 0;
hash += (codMenu != null ? codMenu.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
if (!(object instanceof Menu)) {
return false;
}
Menu other = (Menu) object;
if ((this.codMenu == null && other.codMenu != null) || (this.codMenu != null && !this.codMenu.equals(other.codMenu))) {
return false;
}
return true;
}
@Override
public String toString() {
return "pe.com.siacoopapp.entity.Menu[ codMenu=" + codMenu + " ]";
}
}
| [
"jadiaz@farmaciasperuanas.pe"
] | jadiaz@farmaciasperuanas.pe |
ff826a88a1cf6721bc226e6ed322f67131e9f2bf | 8f70fe0e87e308fe3dc8cfe9a515a315ed131d18 | /src/test/java/com/sugarcrm/test/admin/Admin_20194.java | cd077a45e73f87f2bc913be6ebd6b266a51adea2 | [] | no_license | mustaeenbasit/LKW-Walter_Automation | 76fd02c34c766bc34a5c300e3f5943664c70d67b | a97f4feca8e51c21f3cef1949573a8e4909e7143 | refs/heads/master | 2020-04-09T17:54:32.252374 | 2018-12-05T09:49:29 | 2018-12-05T09:49:29 | 160,495,697 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,029 | java | package com.sugarcrm.test.admin;
import org.junit.Test;
import com.sugarcrm.candybean.datasource.FieldSet;
import com.sugarcrm.sugar.VoodooControl;
import com.sugarcrm.sugar.VoodooUtils;
import com.sugarcrm.test.SugarTest;
public class Admin_20194 extends SugarTest {
FieldSet customFS;
public void setup() throws Exception {
customFS = testData.get(testName).get(0);
sugar().login();
// TODO: VOOD-1493
// Unchecked Display Downloads Tab in admin > system settings
sugar().admin.navToSystemSettings();
VoodooUtils.focusFrame("bwc-frame");
new VoodooControl("img", "xpath", "//td[contains(.,' Display Downloads Tab')]/img").click();
// Verify "Display Downloads Tab" help toop-tip
new VoodooControl("div", "css", "div[role='dialog']:not([style*='display: none'])").assertContains(customFS.get("toolTipMsg"), true);
new VoodooControl("button", "css", "div[role='dialog']:not([style*='display: none']) button.ui-dialog-titlebar-close").click();
// Click to uncheck Display Downloads Tab check-box
sugar().admin.systemSettings.getControl("showDownloadTab").click();
sugar().admin.systemSettings.getControl("save").click();
VoodooUtils.focusDefault();
VoodooUtils.waitForReady();
}
/**
* Enable the Download tab in User Settings through System Settings
*
* @throws Exception
*/
@Test
public void Admin_20194_execute() throws Exception {
VoodooUtils.voodoo.log.info("Running " + testName + "...");
sugar().navbar.navToProfile();
VoodooUtils.focusFrame("bwc-frame");
// Verify that Downloads tab exist on detail view
VoodooControl detailViewDownLoadTab = sugar().users.userPref.getControl("tab4");
detailViewDownLoadTab.assertExists(false);
VoodooUtils.focusDefault();
// Click on edit button
sugar().users.detailView.edit();
VoodooUtils.focusFrame("bwc-frame");
// TODO: VOOD-563
// Verify that Downloads tab exist on edit view
VoodooControl editViewDownLoadTab = new VoodooControl("a", "css", "#EditView_tabs ul li:nth-child(5) a");
editViewDownLoadTab.assertExists(false);
VoodooUtils.focusDefault();
// Go to system settings and check Display Downloads Tab checkbox
sugar().admin.navToSystemSettings();
VoodooUtils.focusFrame("bwc-frame");
sugar().admin.systemSettings.getControl("showDownloadTab").click();
sugar().admin.systemSettings.getControl("save").click();
VoodooUtils.focusDefault();
VoodooUtils.waitForReady();
sugar().navbar.navToProfile();
VoodooUtils.focusFrame("bwc-frame");
// Verify that Downloads tab exist on detail view
detailViewDownLoadTab.assertExists(true);
VoodooUtils.focusDefault();
// Click on edit button
sugar().users.detailView.edit();
VoodooUtils.focusFrame("bwc-frame");
// TODO: VOOD-563
// Verify that Downloads tab exist on edit view
editViewDownLoadTab.assertContains(customFS.get("downloadTab"), true);
VoodooUtils.focusDefault();
VoodooUtils.voodoo.log.info(testName + " complete.");
}
public void cleanup() throws Exception {}
} | [
"mustaeen.basit@ROLUSTECH.NET"
] | mustaeen.basit@ROLUSTECH.NET |
0bcc05ce80166c6026ecfd4d1ac26f78c52ae508 | 805b2a791ec842e5afdd33bb47ac677b67741f78 | /Mage.Sets/src/mage/sets/seventhedition/BloodshotCyclops.java | 2100bf08fe64cffca221f73c643ebb70e20c7856 | [] | no_license | klayhamn/mage | 0d2d3e33f909b4052b0dfa58ce857fbe2fad680a | 5444b2a53beca160db2dfdda0fad50e03a7f5b12 | refs/heads/master | 2021-01-12T19:19:48.247505 | 2015-08-04T20:25:16 | 2015-08-04T20:25:16 | 39,703,242 | 2 | 0 | null | 2015-07-25T21:17:43 | 2015-07-25T21:17:42 | null | UTF-8 | Java | false | false | 2,205 | java | /*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``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 BetaSteward_at_googlemail.com 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.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.seventhedition;
import java.util.UUID;
/**
*
* @author North
*/
public class BloodshotCyclops extends mage.sets.urzasdestiny.BloodshotCyclops {
public BloodshotCyclops(UUID ownerId) {
super(ownerId);
this.cardNumber = 176;
this.expansionSetCode = "7ED";
}
public BloodshotCyclops(final BloodshotCyclops card) {
super(card);
}
@Override
public BloodshotCyclops copy() {
return new BloodshotCyclops(this);
}
}
| [
"robyter@gmail"
] | robyter@gmail |
8ea817bbbfa5eeb92e74b3c792339a48e3203fe0 | d60e287543a95a20350c2caeabafbec517cabe75 | /NLPCCd/Cloudstack/14573_1.java | 70ab995c512fca9071fe1c3d3527fab15a45db29 | [
"MIT"
] | permissive | sgholamian/log-aware-clone-detection | 242067df2db6fd056f8d917cfbc143615c558b2c | 9993cb081c420413c231d1807bfff342c39aa69a | refs/heads/main | 2023-07-20T09:32:19.757643 | 2021-08-27T15:02:50 | 2021-08-27T15:02:50 | 337,837,827 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 341 | java | //,temp,sample_1055.java,2,9,temp,sample_1049.java,2,9
//,2
public class xxx {
private Pair<JobInfo.Status, String> orchestrateMigrateWithStorage(final VmWorkMigrateWithStorage work) throws Exception {
final VMInstanceVO vm = _entityMgr.findById(VMInstanceVO.class, work.getVmId());
if (vm == null) {
log.info("unable to find vm");
}
}
}; | [
"sgholami@uwaterloo.ca"
] | sgholami@uwaterloo.ca |
a4caf937a781adac56f45a861505bada97e0ef1f | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/kotlin/a/ar.java | 3d3d3fd8bd46df30babe9dcfb42f24c82f98f8cb | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 405 | java | package kotlin.a;
import kotlin.Metadata;
@Metadata(d1={"kotlin/collections/SetsKt__SetsJVMKt", "kotlin/collections/SetsKt__SetsKt", "kotlin/collections/SetsKt___SetsKt"}, k=4, mv={1, 5, 1}, xi=1)
public final class ar
extends au
{}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar
* Qualified Name: kotlin.a.ar
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
6d99a3bf343691b477a850be2924bddf8c584835 | e8fc19f6301ceddebe1c76b29dbf6753f4d63da8 | /AutomationFramework/src/SeleniumWD/ActionKeywords.java | a2485c6e4fc06addd079b33a3aff91b7225541ea | [] | no_license | ravinder1414/AutomationFrameworkUpdated | 524b91f29400dd1c906cc6b06a56b06ff8e6fc55 | 0cf3e56fc9b6b5a4bac47d0a7c7e424a49c9845a | refs/heads/master | 2021-07-02T22:31:46.280362 | 2017-09-22T04:28:38 | 2017-09-22T04:28:38 | 104,431,215 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,530 | java | package SeleniumWD;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import utility.*;
public class ActionKeywords {
public static WebDriver driver;
public static WebDriver OpenBrowser(String object,String sBrowserName) throws Exception{
//String sBrowserName;
try{
//sBrowserName = ExcelUtils.getCellData(iTestCaseRow, Constant.Col_Browser);
if(sBrowserName.equals("Firefox")){
driver = new FirefoxDriver();
Log.info("New driver instantiated");
}
else if(sBrowserName.equals("IE")){
driver=new InternetExplorerDriver();
Log.info("IE browser started");
}
else if(sBrowserName.equals("Chrome")){
driver=new ChromeDriver();
Log.info("New driver instantiated");
}
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
Log.info("Implicit wait applied on the driver for 10 seconds");
driver.get(Constant.URL);
Log.info("Web application launched successfully");
}catch (Exception e){
Log.error("Class Utils | Method OpenBrowser | Exception desc : "+e.getMessage());
}
return driver;
}
public static void navigate(String object, String data){
try{
Log.info("Navigating to URL");
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.get(Constant.URL);
}catch(Exception e){
Log.info("Not able to navigate --- " + e.getMessage());
}
}
public static void click(String object, String data){
try{
Log.info("Clicking on Webelement "+ object);
//driver.findElement(By.xpath(OR.getProperty(object))).click();
}catch(Exception e){
Log.error("Not able to click --- " + e.getMessage());
}
}
public static void input(String object, String data){
try{
Log.info("Entering the text in " + object);
//driver.findElement(By.xpath(OR.getProperty(object))).sendKeys(data);
}catch(Exception e){
Log.error("Not able to Enter UserName --- " + e.getMessage());
}
}
public static void waitFor(String object, String data) throws Exception{
try{
Log.info("Wait for 5 seconds");
Thread.sleep(5000);
}catch(Exception e){
Log.error("Not able to Wait --- " + e.getMessage());
}
}
public static void closeBrowser(String object, String data){
try{
Log.info("Closing the browser");
driver.quit();
}catch(Exception e){
Log.error("Not able to Close the Browser --- " + e.getMessage());
}
}
}
| [
"kumarravinder4141@gmail.com"
] | kumarravinder4141@gmail.com |
46819db65b320d53b21aa7a443ab15499241ad7a | 8520e57a45c3b8b09a90f6677a4c9d323c628d3b | /1° Semestre/src/aulaTDD/Candidato.java | 27f03c9db23de374e310f9945b295aa7275f42b3 | [] | no_license | leonarita/Java | e58156f7ef409884a3dfe2c3d8ab84a4b57984f1 | 7dc31112de4d8006f61f2bda1ce4e2b757bbda54 | refs/heads/master | 2023-08-18T15:27:43.598098 | 2022-05-22T15:28:44 | 2022-05-22T15:28:44 | 252,060,876 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 171 | java | package aulaTDD;
public class Candidato {
private String nome;
public Candidato(String nome) {
this.nome = nome;
}
public String getNome() {
return nome;
}
}
| [
"leo_narita@hotmail.com"
] | leo_narita@hotmail.com |
181daa053e1e293ba52d94f96fe20aa4aabf4858 | 58ab9e8f941c6e4feeadb684a53e80b758c4fd7b | /gravitee-am-service/src/main/java/io/gravitee/am/service/GroupService.java | 2c45432ea5059306320668bec2e6ffeaba9c7e4c | [
"Apache-2.0"
] | permissive | k4m-git/graviteeio-access-management | c572981e454870ba9042585b88522abba548b655 | 28a108f8735a3b92c2cba9ed9b29cd2b8e2c5eed | refs/heads/master | 2020-06-06T04:17:56.640979 | 2019-06-27T15:56:12 | 2019-06-27T15:56:12 | 192,635,928 | 0 | 0 | Apache-2.0 | 2019-06-19T01:24:35 | 2019-06-19T01:24:35 | null | UTF-8 | Java | false | false | 2,113 | java | /**
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
*
* 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 io.gravitee.am.service;
import io.gravitee.am.model.Group;
import io.gravitee.am.model.User;
import io.gravitee.am.model.common.Page;
import io.gravitee.am.service.model.NewGroup;
import io.gravitee.am.service.model.UpdateGroup;
import io.reactivex.Completable;
import io.reactivex.Maybe;
import io.reactivex.Single;
import java.util.List;
/**
* @author Titouan COMPIEGNE (titouan.compiegne at graviteesource.com)
* @author GraviteeSource Team
*/
public interface GroupService {
Single<Page<Group>> findByDomain(String domain, int page, int size);
Single<List<Group>> findByDomain(String domain);
Single<Page<User>> findMembers(String groupId, int page, int size);
Maybe<Group> findByDomainAndName(String domain, String groupName);
Maybe<Group> findById(String id);
Single<Group> create(String domain, NewGroup group, io.gravitee.am.identityprovider.api.User principal);
Single<Group> update(String domain, String id, UpdateGroup group, io.gravitee.am.identityprovider.api.User principal);
Completable delete(String groupId, io.gravitee.am.identityprovider.api.User principal);
default Single<Group> create(String domain, NewGroup group) {
return create(domain, group, null);
}
default Single<Group> update(String domain, String id, UpdateGroup group) {
return update(domain, id, group, null);
}
default Completable delete(String groupId) {
return delete(groupId, null);
}
}
| [
"brasseld@gmail.com"
] | brasseld@gmail.com |
0cdda70d6b8d4ef9311ee23add99fb4f071498a8 | 9ce31055cc5467c2655f60030103beb502db125b | /spring/boot/boot-profile/src/main/java/com/boot/profile/BootProfileApplication.java | c1437343c33970b8e2e5073144635d98fa76821d | [] | no_license | manishfullDev/All-Project | 969cfadbb608a76054c675fd854fb2c05f5f8ee2 | 888f852aea6f4271d8a2737bf6ab1eec7525bad2 | refs/heads/master | 2023-08-03T10:55:45.437393 | 2020-04-07T06:44:08 | 2020-04-07T06:44:08 | 253,693,976 | 1 | 0 | null | 2023-07-23T11:10:07 | 2020-04-07T05:17:53 | Java | UTF-8 | Java | false | false | 569 | java | package com.boot.profile;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import com.boot.profile.beans.DataSourceManager;
@SpringBootApplication
public class BootProfileApplication {
public static void main(String[] args) {
ApplicationContext context = SpringApplication.run(BootProfileApplication.class, args);
DataSourceManager dsm = context.getBean("dataSourceManager", DataSourceManager.class);
System.out.println(dsm);
}
}
| [
"manish.vishwakarma@s-force.org"
] | manish.vishwakarma@s-force.org |
4c6a57010600e607930bfb8cc9854bfd560b27f3 | 65ce6407650f71b7702e81405bb4b6acf3e6d58f | /src/java/jena-arq-2.9.0-incubating/src/main/java/com/hp/hpl/jena/sparql/engine/iterator/QueryIteratorCaching.java | 63f6822957db4c93bdf34bce3131e3bbca0dc96f | [
"Apache-2.0"
] | permissive | arjunakula/Visual-Dialogue-System | 00177cb15fb148a8bb4884946f81201926935627 | 7629301ae28acd6618dd54fd73e40e28584f0c56 | refs/heads/master | 2020-05-02T09:14:32.519255 | 2019-03-26T20:56:34 | 2019-03-26T20:56:34 | 177,865,899 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,435 | 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 com.hp.hpl.jena.sparql.engine.iterator;
import java.util.ArrayList ;
import java.util.List ;
import org.openjena.atlas.io.IndentedWriter ;
import com.hp.hpl.jena.sparql.engine.QueryIterator ;
import com.hp.hpl.jena.sparql.engine.binding.Binding ;
import com.hp.hpl.jena.sparql.serializer.SerializationContext ;
/** A caching QueryIterator. On demand, the application can ask for a new
* query iterator which will repeat the bindings yielded so far.
*/
public
class QueryIteratorCaching extends QueryIteratorWrapper
{
// Not tracked.
List<Binding> cache = new ArrayList<Binding>() ;
public QueryIteratorCaching(QueryIterator qIter)
{
super(qIter) ;
}
@Override
protected Binding moveToNextBinding()
{
Binding b = super.moveToNextBinding() ;
cache.add(b) ;
return b ;
}
@Override
public void output(IndentedWriter out, SerializationContext sCxt)
{}
public QueryIteratorCaching createRepeat()
{
List<Binding> elements = cache ;
if ( super.hasNext() )
// If the iterator isn't finished, copy what we have so far.
elements = new ArrayList<Binding>(cache) ;
return new QueryIteratorCaching(new QueryIterPlainWrapper(elements.iterator(), null)) ;
}
public static QueryIterator reset(QueryIterator qIter)
{
if ( qIter instanceof QueryIteratorCaching )
{
QueryIteratorCaching cIter = (QueryIteratorCaching)qIter ;
return cIter.createRepeat() ;
}
return qIter ;
}
}
| [
"akula.arjun@gmail.com"
] | akula.arjun@gmail.com |
8456a4ec69e027997dc0011609c225477b268f45 | e2876dce512352d53978c2871f880f8a8c0456c5 | /src/main/java/com/hangyi/eyunda/dao/shipmove/MovUserShipDao.java | 08bfd0720dcdc3dd0203f830154623aed56ce48a | [] | no_license | shanghaif/eyunda | 4a3e74c7057e20c81dfe5bee7712b6438fcbc34b | 5aacbae5632dc43ba3a5edc8aaf2976d66a08709 | refs/heads/master | 2023-06-08T04:49:34.537759 | 2019-05-08T07:19:48 | 2019-05-08T07:19:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,774 | java | package com.hangyi.eyunda.dao.shipmove;
import java.util.List;
import org.springframework.stereotype.Repository;
import com.hangyi.eyunda.dao.Page;
import com.hangyi.eyunda.dao.PageHibernateDao;
import com.hangyi.eyunda.domain.enumeric.ShpRightsCode;
import com.hangyi.eyunda.domain.shipmove.MovUserShip;
import com.hangyi.eyunda.util.Constants;
@Repository
public class MovUserShipDao extends PageHibernateDao<MovUserShip, Long> {
public MovUserShip getByUserShip(Long userId, String mmsi) {
String hql = "select a from MovUserShip a where a.userId = " + userId + " and a.mmsi = '" + mmsi + "'";
List<MovUserShip> userShips = super.find(hql);
if (!userShips.isEmpty())
return userShips.get(0);
else
return null;
}
public List<MovUserShip> getListByMmsi(String mmsi) {
String hql = "select a from MovUserShip a where a.mmsi = '" + mmsi + "'";
List<MovUserShip> userShips = super.find(hql);
return userShips;
}
public MovUserShip getModifyByMmsi(String mmsi) {
String hql = "select a from MovUserShip a where a.mmsi = '" + mmsi + "' and rights = "
+ ShpRightsCode.managedShip.ordinal();
List<MovUserShip> userShips = super.find(hql);
if (userShips.isEmpty())
return null;
else
return userShips.get(0);
}
public Page<MovUserShip> getPageByUserId(Long userId, String keywords, int pageNo, int pageSize) {
Page<MovUserShip> page = new Page<MovUserShip>();
page.setPageSize(pageSize <= 0 ? Constants.ALL_SIZE : pageSize);
page.setPageNo(pageNo);
String hql = "select a from MovUserShip a where a.userId = " + userId;
if (keywords != null && !"".equals(keywords))
hql += " and a.mmsi like '%" + keywords + "%'";
hql += " order by a.createTime desc";
super.findPage(page, hql);
return page;
}
}
| [
"123465714@qq.com"
] | 123465714@qq.com |
80ab672e828cb8f18d8eaef4a28ed7057589e077 | 372dc53a102d8852689832e5646deacbdcb1bdcc | /common-base/src/main/java/com/ysxsoft/common_base/base/ViewPagerViewAdapter.java | 110128b3588d3b20a08067979c6c035c6e2ecf84 | [] | no_license | huguangcai/User | 146ef36ab042df9bc432642debf2ca398eacbf04 | 4db8abaad0160e238271d6ecad7cb3dff31bc493 | refs/heads/master | 2020-09-27T09:32:39.381984 | 2019-12-26T03:45:22 | 2019-12-26T03:45:22 | 226,485,781 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,460 | java | package com.ysxsoft.common_base.base;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.viewpager.widget.PagerAdapter;
import java.util.List;
/**
* Created by Administrator on 2018/3/30 0030.
*/
public abstract class ViewPagerViewAdapter<T> extends PagerAdapter {
private List<T> data;
private List<String> titles;
private LayoutInflater inflater;
private int layoutId;
public ViewPagerViewAdapter(Context context, List<T> data, int layoutId) {
this.data = data;
this.layoutId=layoutId;
inflater=LayoutInflater.from(context);
}
public void setTitles(List<String> titles) {
this.titles = titles;
}
@Override
public int getCount() {
return data==null?0:data.size();
}
@Override
public boolean isViewFromObject(View view, Object object) {
return view==object;
}
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
container.removeView((View) object);
}
@Override
public Object instantiateItem(ViewGroup container, int position) {
View view = inflater.inflate(layoutId, container, false);
fillView(view,position,data.get(position));
container.addView(view);
return view;
}
@Override
public String getPageTitle(int position) {
return titles==null?super.getPageTitle(position).toString():titles.get(position);
}
protected abstract void fillView(View view,int position,T data);
} | [
"2694675654@qq.com"
] | 2694675654@qq.com |
b849cf08822cae0b989991cef2cba2cfb02aae8b | ba7ea425a956d6ed74d7d52549c6c660071e312d | /hub-saml/src/test/java/uk/gov/ida/saml/hub/transformers/outbound/decorators/SigningRequestAbstractTypeSignatureCreatorTest.java | 69b64b86804119ad7e78ab7a55d570ebd27f138e | [
"MIT",
"LicenseRef-scancode-proprietary-license"
] | permissive | willp-bl/verify-stub-idp | a7860f1854f414ee0ba0c5d2620bf0cd77f8a11a | bfbf554b4d73c45e434cc9c1c2117d0388145069 | refs/heads/monorepo | 2023-07-06T01:46:02.867893 | 2019-02-19T16:15:04 | 2019-02-19T16:15:04 | 128,985,826 | 0 | 1 | MIT | 2019-09-25T20:43:39 | 2018-04-10T19:37:08 | Java | UTF-8 | Java | false | false | 1,650 | java | package uk.gov.ida.saml.hub.transformers.outbound.decorators;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import org.opensaml.saml.saml2.core.AttributeQuery;
import org.opensaml.xmlsec.signature.Signature;
import uk.gov.ida.saml.security.SignatureFactory;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@RunWith(MockitoJUnitRunner.class)
public class SigningRequestAbstractTypeSignatureCreatorTest {
private SigningRequestAbstractTypeSignatureCreator<AttributeQuery> signatureCreator;
@Mock
private SignatureFactory signatureFactory;
private static final String id = "response-id";
@Before
public void setup() {
signatureCreator = new SigningRequestAbstractTypeSignatureCreator<>(signatureFactory);
}
@Test
public void decorate_shouldGetSignatureAndAssignIt() {
AttributeQuery response = mock(AttributeQuery.class);
when(response.getID()).thenReturn(id);
signatureCreator.addUnsignedSignatureTo(response);
verify(signatureFactory).createSignature(id);
}
@Test
public void decorate_shouldAssignSignatureToResponse() {
AttributeQuery response = mock(AttributeQuery.class);
Signature signature = mock(Signature.class);
when(response.getID()).thenReturn(id);
when(signatureFactory.createSignature(id)).thenReturn(signature);
signatureCreator.addUnsignedSignatureTo(response);
verify(response).setSignature(signature);
}
}
| [
"william.palmer@digital.cabinet-office.gov.uk"
] | william.palmer@digital.cabinet-office.gov.uk |
9364690770815b41b17469f3bdfb75da3b6a9a00 | a4a27397ea9c453300e9fd929304fc9900a01aad | /sitewhere-java-model/src/main/java/com/sitewhere/spi/device/event/IDeviceCommandInvocation.java | c0a37d2e70b5bdc4931c0afdb0bfab9e5e1f5637 | [
"Apache-2.0"
] | permissive | suyambuganesh82/sitewhere-java-api | 2c2962d501e05e518707aa7f20f956a9a90f71c8 | e6545f48ad0359dc0ba86344587cbdf367bb6b12 | refs/heads/master | 2023-04-25T10:59:07.777397 | 2021-03-07T15:41:57 | 2021-03-07T15:41:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,563 | java | /**
* Copyright © 2014-2021 The SiteWhere Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.sitewhere.spi.device.event;
import java.util.Map;
import java.util.UUID;
/**
* Captures information about the invocation of a command.
*/
public interface IDeviceCommandInvocation extends IDeviceEvent {
/**
* Get actor type that initiated the command.
*
* @return
*/
CommandInitiator getInitiator();
/**
* Get unique id of command initiated.
*
* @return
*/
String getInitiatorId();
/**
* Get actor type that received command.
*
* @return
*/
CommandTarget getTarget();
/**
* Get unique id of command target.
*
* @return
*/
String getTargetId();
/**
* Get unique id of device command being invoked.
*
* @return
*/
UUID getDeviceCommandId();
/**
* Get the list of parameter names mapped to values.
*
* @return
*/
Map<String, String> getParameterValues();
} | [
"derek.adams@sitewhere.com"
] | derek.adams@sitewhere.com |
20392ebcb1ae72c112459f73f76676aefe0025b0 | b3d9e98f353eaba1cf92e3f1fc1ccd56e7cecbc5 | /xy-games/game-logic/trunk/src/main/java/com/cai/future/runnable/PDKAutoOutCardRunnable.java | 63b43171093d0b3bfa3adde296340e15f2206e4f | [] | no_license | konser/repository | 9e83dd89a8ec9de75d536992f97fb63c33a1a026 | f5fef053d2f60c7e27d22fee888f46095fb19408 | refs/heads/master | 2020-09-29T09:17:22.286107 | 2018-10-12T03:52:12 | 2018-10-12T03:52:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,839 | java | package com.cai.future.runnable;
import java.util.concurrent.locks.ReentrantLock;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.cai.common.define.ELogType;
import com.cai.common.domain.Room;
import com.cai.common.util.ThreadUtil;
import com.cai.dictionary.SysGameTypeDict;
import com.cai.future.BaseFuture;
import com.cai.game.pdk.PDKTable;
import com.cai.service.MongoDBServiceImpl;
import com.cai.service.PlayerServiceImpl;
public class PDKAutoOutCardRunnable extends BaseFuture {
private static Logger logger = LoggerFactory.getLogger(PDKAutoOutCardRunnable.class);
private int _room_id;
private int _seat_index;
private PDKTable _table;
private int _out_type;
public PDKAutoOutCardRunnable(int room_id, int seat_index, PDKTable table, int out_type) {
super(room_id);
_room_id = room_id;
_seat_index = seat_index;
_table = table;
_out_type = out_type;
}
@Override
public void execute() {
try {
Room table = PlayerServiceImpl.getInstance().getRoomMap().get(_room_id);
if (table == null) {
logger.info("调度发牌失败,房间[" + _room_id + "]不存在");
return;
}
// logger.info("调度发牌,房间["+_room_id+"]");
ReentrantLock roomLock = table.getRoomLock();
try {
roomLock.lock();
_table.auto_out_card(_seat_index, _out_type);
} finally {
roomLock.unlock();
}
} catch (Exception e) {
logger.error("error" + _room_id, e);
Room room = PlayerServiceImpl.getInstance().getRoomMap().get(_room_id);
if(room!=null) {
MongoDBServiceImpl.getInstance().server_error_log(room.getRoom_id(), ELogType.roomLogicError, ThreadUtil.getStack(e),
0L, SysGameTypeDict.getInstance().getGameDescByTypeIndex(room.getGameTypeIndex()), room.getGame_id());
}
}
}
}
| [
"905202059@qq.com"
] | 905202059@qq.com |
55b8a6de9ce180e2f23b2a8b7259d34886439527 | 1d8bfb46d7919c70f80006e10c7dde73f6741f9c | /sim-impl/src/main/java/gov/va/sim/impl/expression/Expression.java | 0be0b1e8a64e89898f81a3a225746cda75eb9bd2 | [] | no_license | jefron-ap/SIM | 4ddafdb131a288c366bf400dd58b09be0f6e9e23 | 4e02b43f969f25bbe098690b7e29f2d86abf822d | refs/heads/master | 2016-09-06T09:06:15.315378 | 2013-11-25T19:33:04 | 2013-11-25T19:33:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,973 | java |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package gov.va.sim.impl.expression;
//~--- non-JDK imports --------------------------------------------------------
import gov.va.sim.act.expression.ExpressionBI;
import gov.va.sim.act.expression.node.ExpressionNodeBI;
//~--- JDK imports ------------------------------------------------------------
import java.beans.PropertyVetoException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;
import java.util.UUID;
import org.ihtsdo.tk.uuid.UuidT5Generator;
/**
*
* @author kec
*/
public class Expression implements ExpressionBI {
private ExpressionNodeBI<?> focus;
//~--- methods -------------------------------------------------------------
@Override
public boolean equivalent(ExpressionBI another) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean subsumedBy(ExpressionBI another) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public boolean subsumes(ExpressionBI another) {
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public String toString() {
try {
return getVerboseXml();
} catch (IOException ex) {
throw new RuntimeException(ex);
}
}
//~--- get methods ---------------------------------------------------------
@Override
public ExpressionNodeBI<?> getFocus() {
return focus;
}
@Override
public UUID getUuid() throws IOException, UnsupportedEncodingException, NoSuchAlgorithmException {
StringBuilder sb = new StringBuilder();
if (focus != null) {
focus.appendStringForUuidHash(sb);
} else {
return null;
}
return UuidT5Generator.get(ExpressionNodeBI.NAMESPACE_UUID, sb.toString());
}
public String getVerboseXml() throws IOException {
StringBuilder sb = new StringBuilder();
if (focus != null) {
focus.generateXml(sb, true);
} else {
sb.append("null focus");
}
return sb.toString();
}
public String getXml() throws IOException {
StringBuilder sb = new StringBuilder();
if (focus != null) {
focus.generateXml(sb, false);
} else {
sb.append("null focus");
}
return sb.toString();
}
public String getHtmlFragment(boolean verbose) throws IOException {
StringBuilder sb = new StringBuilder();
if (focus != null) {
focus.generateHtml(sb, false);
} else {
sb.append("null focus");
}
return sb.toString();
}
//~--- set methods ---------------------------------------------------------
@Override
public void setFocus(ExpressionNodeBI<?> focus) throws PropertyVetoException {
this.focus = focus;
}
}
| [
"jefron@apelon.com"
] | jefron@apelon.com |
39289953a309ca5e83d90c5ae69d0b8ced542072 | 36b1133f19264691be42b507d562ffae3c13333b | /converter/schematizer/src/main/java/org/apache/felix/serializer/impl/json/JsonSerializerImpl.java | 1a3c5f66546cf8edf5ca932399caa97ae77ccee3 | [] | no_license | tobias--/felix | 9b521e7d1514aea52e1807db67da8fc0ec495790 | 7db0cbb3e92ff78530b66126d9f22d1d1bb7609b | refs/heads/trunk | 2021-01-11T17:40:23.859967 | 2017-01-23T02:41:12 | 2017-01-23T02:41:12 | 79,818,585 | 0 | 0 | null | 2017-01-23T15:43:09 | 2017-01-23T15:43:09 | null | UTF-8 | Java | false | false | 4,152 | 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.felix.serializer.impl.json;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Type;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.osgi.service.serializer.Serializer;
import org.osgi.service.serializer.Serializing;
import org.osgi.util.converter.Converter;
import org.osgi.util.converter.StandardConverter;
import org.osgi.util.converter.TypeReference;
public class JsonSerializerImpl implements Serializer {
private final Map<String, Object> configuration = new ConcurrentHashMap<>();
private final ThreadLocal<Boolean> threadLocal = new ThreadLocal<>();
private final Converter converter = new StandardConverter();
@Override
public <T> JsonDeserializingImpl<T> deserialize(Class<T> cls) {
return new JsonDeserializingImpl<T>(converter, cls);
}
@Override
public Serializing serialize(Object obj) {
Serializing encoding = new JsonSerializingImpl(converter, configuration, obj);
if (pretty()) {
Boolean top = threadLocal.get();
if (top == null) {
threadLocal.set(Boolean.TRUE);
// TODO implement this properly, the following it just a dev temp thing
encoding = new EncodingWrapper("{}{}{}{}{}", encoding, "{}{}{}{}{}");
}
}
return encoding;
}
private boolean pretty() {
return Boolean.TRUE.equals(Boolean.parseBoolean((String) configuration.get("pretty")));
}
private class EncodingWrapper implements Serializing {
private final Serializing delegate;
private String prefix;
private String postfix;
EncodingWrapper(String pre, Serializing encoding, String post) {
prefix = pre;
delegate = encoding;
postfix = post;
}
@Override
public void to(OutputStream os) {
try {
os.write(toString().getBytes(StandardCharsets.UTF_8));
} catch (IOException e) {
throw new RuntimeException(e);
}
}
@Override
public String toString() {
try {
return prefix + delegate.toString() + postfix;
} finally {
threadLocal.set(null);
}
}
@Override
public Serializing ignoreNull() {
return this;
}
@Override
public Serializing pretty() {
return this;
}
@Override
public void to(OutputStream out, Charset charset) {
// TODO Auto-generated method stub
}
@Override
public Appendable to(Appendable out) {
// TODO Auto-generated method stub
return null;
}
@Override
public Serializing with(Converter converter) {
delegate.with(converter);
return this;
}
}
@Override
public <T> JsonDeserializingImpl<T> deserialize(TypeReference<T> ref) {
return new JsonDeserializingImpl<>(converter, ref);
}
@Override
public JsonDeserializingImpl<?> deserialize(Type type) {
return new JsonDeserializingImpl<>(converter, type);
}
}
| [
"davidb@apache.org"
] | davidb@apache.org |
cf2e9f73e6103ffb0e82ade4422a23282dfd1343 | 10eec5ba9e6dc59478cdc0d7522ff7fc6c94cd94 | /maind/src/main/java/com/vvt/qq/internal/MessageForPic.java | 213050638446a552bb31589498134ed04f7b5bd2 | [] | no_license | EchoAGI/Flexispy.re | a2f5fec409db083ee3fe0d664dc2cca7f9a4f234 | ba65a5b8b033b92c5867759f2727c5141b7e92fc | refs/heads/master | 2023-04-26T02:52:18.732433 | 2018-07-16T07:46:56 | 2018-07-16T07:46:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,638 | java | package com.vvt.qq.internal;
import com.vvt.ak.a;
import com.vvt.qq.internal.pb.PBBoolField;
import com.vvt.qq.internal.pb.PBInt32Field;
import com.vvt.qq.internal.pb.PBStringField;
import com.vvt.qq.internal.pb.PBUInt32Field;
import com.vvt.qq.internal.pb.PBUInt64Field;
public class MessageForPic
{
private static final boolean LOGE = a.e;
private static final String TAG = "MessageForPic";
public static int defaultSuMsgId;
public long DSKey;
public String SpeedInfo;
public String actMsgContentValue;
public String action;
public int aiofileType;
public boolean bEnableEnc;
public String bigMsgUrl;
public String bigThumbMsgUrl;
public int busiType;
public int fileSizeFlag;
public long groupFileID;
public long height;
public int imageType;
public boolean isMixed;
public boolean isRead;
public int isReport;
public boolean isShareAppActionMsg;
public String localUUID;
public int mCurrlength;
public int mDownloadLength;
public int mNotPredownloadReason;
public long mPresendTransferedSize;
public int mShowLength;
public String md5;
public int msgVia;
public String path;
public int picExtraFlag;
public Object picExtraObject;
public int preDownNetworkType;
public int preDownState;
public int previewed;
public String rawMsgUrl;
public ReportInfo reportInfo;
public String serverStoreSource;
public long shareAppID;
public long size;
public int subMsgId;
public int subMsgType;
public int subThumbHeight;
public int subThumbWidth;
public int subVersion;
public int thumbHeight;
public String thumbMsgUrl;
public int thumbSize;
public int thumbWidth;
public int type;
public String uuid;
public long width;
public MessageForPic()
{
int j = defaultSuMsgId;
this.subMsgId = j;
this.subVersion = 5;
this.preDownState = i;
this.preDownNetworkType = i;
this.mNotPredownloadReason = 0;
this.subThumbWidth = i;
this.subThumbHeight = i;
this.aiofileType = i;
this.subMsgType = i;
this.thumbSize = i;
}
public boolean doParse(byte[] paramArrayOfByte)
{
Object localObject1 = new com/vvt/qq/internal/PicRec;
((PicRec)localObject1).<init>();
try
{
((PicRec)localObject1).mergeFrom(paramArrayOfByte);
bool1 = true;
}
catch (Exception localException)
{
for (;;)
{
Object localObject2;
long l;
int i;
boolean bool2;
int j;
boolean bool3;
boolean bool1 = LOGE;
if (bool1) {}
bool1 = false;
}
}
if (bool1)
{
localObject2 = ((PicRec)localObject1).localPath.get();
this.path = ((String)localObject2);
l = ((PicRec)localObject1).size.get();
this.size = l;
i = ((PicRec)localObject1).type.get();
this.type = i;
bool2 = ((PicRec)localObject1).isRead.get();
this.isRead = bool2;
localObject2 = ((PicRec)localObject1).uuid.get();
this.uuid = ((String)localObject2);
l = ((PicRec)localObject1).groupFileID.get();
this.groupFileID = l;
localObject2 = ((PicRec)localObject1).md5.get();
this.md5 = ((String)localObject2);
localObject2 = ((PicRec)localObject1).serverStorageSource.get();
this.serverStoreSource = ((String)localObject2);
localObject2 = ((PicRec)localObject1).thumbMsgUrl.get();
this.thumbMsgUrl = ((String)localObject2);
localObject2 = ((PicRec)localObject1).bigthumbMsgUrl.get();
this.bigThumbMsgUrl = ((String)localObject2);
j = ((PicRec)localObject1).uint32_thumb_width.get();
this.thumbWidth = j;
j = ((PicRec)localObject1).uint32_thumb_height.get();
this.thumbHeight = j;
l = ((PicRec)localObject1).uint32_width.get();
this.width = l;
l = ((PicRec)localObject1).uint32_height.get();
this.height = l;
j = ((PicRec)localObject1).uint32_image_type.get();
this.imageType = j;
localObject2 = ((PicRec)localObject1).bigMsgUrl.get();
this.bigMsgUrl = ((String)localObject2);
localObject2 = ((PicRec)localObject1).rawMsgUrl.get();
this.rawMsgUrl = ((String)localObject2);
j = ((PicRec)localObject1).isReport.get();
this.isReport = j;
j = ((PicRec)localObject1).version.get();
this.subVersion = j;
j = ((PicRec)localObject1).uiOperatorFlag.get();
this.picExtraFlag = j;
j = ((PicRec)localObject1).fileSizeFlag.get();
this.fileSizeFlag = j;
localObject2 = ((PicRec)localObject1).localUUID.get();
this.localUUID = ((String)localObject2);
j = ((PicRec)localObject1).preDownState.get();
this.preDownState = j;
j = ((PicRec)localObject1).preDownNetwork.get();
this.preDownNetworkType = j;
j = ((PicRec)localObject1).previewed.get();
this.previewed = j;
j = ((PicRec)localObject1).uint32_show_len.get();
this.mShowLength = j;
j = ((PicRec)localObject1).uint32_download_len.get();
this.mDownloadLength = j;
j = ((PicRec)localObject1).uint32_current_len.get();
this.mCurrlength = j;
localObject2 = ((PicRec)localObject1).notPredownloadReason;
j = ((PBUInt32Field)localObject2).get();
this.mNotPredownloadReason = j;
localObject1 = ((PicRec)localObject1).enableEnc;
bool3 = ((PBBoolField)localObject1).get();
this.bEnableEnc = bool3;
}
return bool1;
}
}
/* Location: /Volumes/D1/codebase/android/POC/assets/product/maind/classes-enjarify.jar!/com/vvt/qq/internal/MessageForPic.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/ | [
"52388483@qq.com"
] | 52388483@qq.com |
47224cf4d2c390109b0c3052343da0ecb8971719 | e705ea3a001ed23604fb2b4d85da04fc1a97b81b | /Answers/_221_MaximalSquare.java | cc144987382311886ce13008339219b0e9c8daf9 | [] | no_license | shitterlmj2016/Leetcode_java | 4b8f81f0f6338751222b45fe2b711082495396e4 | 92b2d6a83a8bfb49f3ea1bae6e641912d2160873 | refs/heads/master | 2020-04-15T22:54:46.831100 | 2019-04-15T03:05:15 | 2019-04-15T03:05:15 | 165,088,940 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,592 | java | /**
* 本代码来自 Cspiration,由 @Cspiration 提供
* 题目来源:http://leetcode.com
* - Cspiration 致力于在 CS 领域内帮助中国人找到工作,让更多海外国人受益
* - 现有课程:Leetcode Java 版本视频讲解(1-900题)(上)(中)(下)三部
* - 算法基础知识(上)(下)两部;题型技巧讲解(上)(下)两部
* - 节省刷题时间,效率提高2-3倍,初学者轻松一天10题,入门者轻松一天20题
* - 讲师:Edward Shi
* - 官方网站:https://cspiration.com
* - 版权所有,转发请注明出处
*/
public class _221_MaximalSquare {
/**
* 221. Maximal Square
* Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area.
For example, given the following matrix:
1 0 1 0 0
1 0 1 1 1
1 1 1 1 1
1 0 0 1 0
Return 4.
time : O(m * n)
space : O(m * n)
* @param matrix
* @return
*/
public int maximalSquare(char[][] matrix) {
if (matrix.length == 0) return 0;
int m = matrix.length;
int n = matrix[0].length;
int res = 0;
int[][] dp = new int[m + 1][n + 1];
for (int i = 1; i <= m; i++) {
for (int j = 1; j <= n; j++) {
if (matrix[i - 1][j - 1] == '1') {
dp[i][j] = Math.min(Math.min(dp[i][j - 1], dp[i - 1][j - 1]), dp[i - 1][j]) + 1;
res = Math.max(res, dp[i][j]);
}
}
}
return res * res;
}
}
| [
"xchuang1995@163.com"
] | xchuang1995@163.com |
a4e7475e4f46d77945bda2a524133c26e68b8220 | f56ed848741c676b5f44dfeb8ee7d2bf3f81e666 | /common/src/main/java/com/tcg/rpgengine/common/data/assets/ImageAsset.java | 8025f5cba6331dce5753c26fb9cf8e0211b35927 | [] | no_license | JoseRivas1998/Tiny-Country-Games-RPG-Engine | 3343baf357d28d9becfc23390b97ceb706cdb1d0 | cee734334206c44e7add4a19f5bcde1abdcad144 | refs/heads/main | 2023-04-21T11:11:21.201593 | 2021-05-01T00:47:58 | 2021-05-01T00:47:58 | 327,133,721 | 0 | 0 | null | 2021-01-05T22:51:50 | 2021-01-05T22:19:21 | Java | UTF-8 | Java | false | false | 2,110 | java | package com.tcg.rpgengine.common.data.assets;
import com.tcg.rpgengine.common.data.BinaryDocument;
import com.tcg.rpgengine.common.utils.UuidUtils;
import org.json.JSONObject;
import java.nio.ByteBuffer;
import java.util.Objects;
import java.util.UUID;
public class ImageAsset extends Asset {
private static final String JSON_PATH_FIELD = "path";
public String path;
public ImageAsset(UUID id, String path) {
super(id);
this.path = Objects.requireNonNull(path);
}
public static ImageAsset generateNewImageAsset(String path) {
return new ImageAsset(UuidUtils.generateUuid(), path);
}
public static ImageAsset createFromJSON(String jsonString) {
final JSONObject imageJSON = new JSONObject(jsonString);
final UUID id = UuidUtils.fromString(imageJSON.getString(JSON_ID_FIELD));
final String path = imageJSON.getString(JSON_PATH_FIELD);
return new ImageAsset(id, path);
}
public static ImageAsset createFromBytes(ByteBuffer bytes) {
final UUID id = BinaryDocument.getUuid(bytes);
final String path = BinaryDocument.getUTF8String(bytes);
return new ImageAsset(id, path);
}
@Override
protected void addAdditionalJSONData(JSONObject jsonObject) {
jsonObject.put(JSON_PATH_FIELD, this.path);
}
@Override
protected int contentLength() {
return Integer.BYTES + this.path.length();
}
@Override
protected void encodeContent(ByteBuffer byteBuffer) {
BinaryDocument.putUTF8String(byteBuffer, this.path);
}
@Override
public int hashCode() {
return Objects.hash(this.id, this.path);
}
@Override
public boolean equals(Object obj) {
boolean result = this == obj;
if (!result) {
if (obj == null || this.getClass() != obj.getClass()) {
result = false;
} else {
final ImageAsset other = (ImageAsset) obj;
result = super.equals(other) && this.path.equals(other.path);
}
}
return result;
}
}
| [
"JoseRivas823@gmail.com"
] | JoseRivas823@gmail.com |
a3a784575b88e1b84a3d66b3bdd0ccff6c54cf32 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/22/22_32508c0522d956f3762b48da4f93cb1ed5adcedd/KeyParserLocation/22_32508c0522d956f3762b48da4f93cb1ed5adcedd_KeyParserLocation_s.java | 1fe919d00dc8b5ded830c90814695d882a95294c | [] | 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 | 3,449 | java | package jas.common.spawner.creature.handler.parsing.keys;
import jas.common.JASLog;
import jas.common.spawner.creature.handler.parsing.ParsingHelper;
import jas.common.spawner.creature.handler.parsing.TypeValuePair;
import jas.common.spawner.creature.handler.parsing.settings.OptionalSettings.Operand;
import java.util.ArrayList;
import java.util.HashMap;
import net.minecraft.entity.EntityLiving;
import net.minecraft.world.World;
public class KeyParserLocation extends KeyParserBase {
public KeyParserLocation(Key key) {
super(key, true, KeyType.CHAINABLE);
}
@Override
public boolean parseChainable(String parseable, ArrayList<TypeValuePair> parsedChainable,
ArrayList<Operand> operandvalue) {
String[] pieces = parseable.split(",");
Operand operand = parseOperand(pieces);
if (pieces.length == 7) {
int targetX = ParsingHelper.parseFilteredInteger(pieces[1], 0, "targetX " + key.key);
int targetY = ParsingHelper.parseFilteredInteger(pieces[2], 0, "targetY " + key.key);
int targetZ = ParsingHelper.parseFilteredInteger(pieces[3], 0, "targetZ " + key.key);
int varX = ParsingHelper.parseFilteredInteger(pieces[4], 1, "varX " + key.key);
int varY = ParsingHelper.parseFilteredInteger(pieces[5], 1, "varY " + key.key);
int varZ = ParsingHelper.parseFilteredInteger(pieces[6], 1, "varZ " + key.key);
TypeValuePair typeValue = new TypeValuePair(key, new Object[] { isInverted(pieces[0]), targetX, targetY,
targetZ, varX, varY, varZ });
parsedChainable.add(typeValue);
operandvalue.add(operand);
return true;
} else {
JASLog.severe("Error Parsing %s Parameter. Invalid Argument Length.", key.key);
return false;
}
}
@Override
public boolean parseValue(String parseable, HashMap<String, Object> valueCache) {
throw new UnsupportedOperationException();
}
@Override
public boolean isValidLocation(World world, EntityLiving entity, int xCoord, int yCoord, int zCoord,
TypeValuePair typeValuePair, HashMap<String, Object> valueCache) {
Object[] values = (Object[]) typeValuePair.getValue();
boolean isInverted = (Boolean) values[0];
int targetX = (Integer) values[1];
int targetY = (Integer) values[2];
int targetZ = (Integer) values[3];
int varX = (Integer) values[4];
int varY = (Integer) values[5];
int varZ = (Integer) values[6];
boolean isValid = false;
if (isWithinTargetRange(xCoord, targetX, varX) && isWithinTargetRange(yCoord, targetY, varY)
|| isWithinTargetRange(zCoord, targetZ, varZ)) {
isValid = true;
}
return isInverted ? isValid : !isValid;
}
private boolean isWithinTargetRange(int current, int target, int targetVariance) {
int maxRange = target + targetVariance;
int minRange = target - targetVariance;
boolean isValid = !(current <= maxRange && current >= minRange);
if (minRange <= maxRange) {
isValid = (current <= maxRange && current >= minRange);
} else {
isValid = !(current < minRange && current > maxRange);
}
return isValid;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
bb8ddaba8d8f64c90a49838da970b204c485ce48 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/plugin/appbrand/jsapi/JsApiLaunchApplication$LaunchApplicationTask$2.java | e9f961dc100eafbc46b6e85f8801bab87e0dd4ef | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 467 | java | package com.tencent.mm.plugin.appbrand.jsapi;
import android.os.Parcelable.Creator;
final class JsApiLaunchApplication$LaunchApplicationTask$2
implements Parcelable.Creator<JsApiLaunchApplication.LaunchApplicationTask>
{}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes10.jar
* Qualified Name: com.tencent.mm.plugin.appbrand.jsapi.JsApiLaunchApplication.LaunchApplicationTask.2
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
2acb967584e450b9903ba80c74ea0d7d49d0fcec | 25e99a0af5751865bce1702ee85cc5c080b0715c | /design_pattern/src/DPModel/src/dp/com/company/pkbehavior/command_vs_strategy/strategy/Gzip.java | e5cc41bb46054e535cb989dd31622becc219c685 | [] | no_license | jasonblog/note | 215837f6a08d07abe3e3d2be2e1f183e14aa4a30 | 4471f95736c60969a718d854cab929f06726280a | refs/heads/master | 2023-05-31T13:02:27.451743 | 2022-04-04T11:28:06 | 2022-04-04T11:28:06 | 35,311,001 | 130 | 67 | null | 2023-02-10T21:26:36 | 2015-05-09T02:04:40 | C | UTF-8 | Java | false | false | 529 | java | package com.company.pkbehavior.command_vs_strategy.strategy;
/**
* @author cbf4Life cbf4life@126.com
* I'm glad to share my knowledge with you all.
*/
public class Gzip implements Algorithm {
//gzip的压缩算法
public boolean compress(String source, String to) {
System.out.println(source + " --> " +to + " GZIP压缩成功!");
return true;
}
//gzip解压缩算法
public boolean uncompress(String source,String to){
System.out.println(source + " --> " +to + " GZIP解压缩成功!");
return true;
}
}
| [
"jason_yao"
] | jason_yao |
11f54b27e0b8bdbd87bd73a47bdace8f9e882139 | 29604b5b313c6d71c855746dc16e1e742d075b7b | /OpenKM/src/main/java/com/openkm/extractor/MsOffice2007ContentHandler.java | 26cf5c0b5b87d40f8dff2448831434469a0b23d5 | [] | no_license | UniversitateaPetruMaior/pm-dms | 098269e5b8464290f775d8776d3591a43c052220 | 1aa12951586a60e7a41e8d584d8da9183d126c7d | refs/heads/master | 2021-01-10T19:27:29.786616 | 2015-02-19T12:44:41 | 2015-02-19T12:44:41 | 25,916,964 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,509 | java | /**
* OpenKM, Open Document Management System (http://www.openkm.com)
* Copyright (c) 2006-2014 Paco Avila & Josep Llort
*
* No bytes were intentionally harmed during the development of this application.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package com.openkm.extractor;
import org.xml.sax.helpers.DefaultHandler;
public abstract class MsOffice2007ContentHandler extends DefaultHandler {
protected StringBuffer content;
protected boolean appendChar;
public MsOffice2007ContentHandler() {
content = new StringBuffer();
appendChar = false;
}
/**
* Returns the text content extracted from parsed xml
*/
public String getContent() {
String ret = content.toString();
content.setLength(0);
return ret;
}
public abstract String getFilePattern();
}
| [
"test@test.test"
] | test@test.test |
715906380a11f66b6d346710c44059b85fe2d0c7 | 38636c6d17275d7664d0d5fbde58212135ef8773 | /common/src/androidTest/java/com/serenegiant/common/KeyStoreUtilsTest.java | fd1fd147ad68b84b2bdcf6a0e3ae936896c6108c | [
"Apache-2.0"
] | permissive | whosmyqueen/hardware-utils | 372970ea248982bb84821ad986cfbb566e28a51e | eed6790f86c6d92ee86a902c9d2f13542c23fd96 | refs/heads/master | 2023-02-17T17:08:46.468498 | 2021-01-19T07:53:59 | 2021-01-19T07:53:59 | 306,795,085 | 2 | 0 | Apache-2.0 | 2021-01-07T06:32:36 | 2020-10-24T03:10:20 | Java | UTF-8 | Java | false | false | 1,645 | java | package com.serenegiant.common;
import android.content.Context;
import android.content.SharedPreferences;
import com.serenegiant.security.KeyStoreUtils;
import com.serenegiant.security.ObfuscatorException;
import com.serenegiant.system.EncryptedSharedPreferences;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.security.GeneralSecurityException;
import androidx.annotation.NonNull;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* KeyStoreUtils用のインスツルメンテーションテスト用クラス
*/
@RunWith(AndroidJUnit4.class)
public class KeyStoreUtilsTest {
private static final String TAG = KeyStoreUtilsTest.class.getSimpleName();
@Before
public void prepare() {
}
@After
public void cleanUp() {
final Context context = ApplicationProvider.getApplicationContext();
KeyStoreUtils.deleteKey(context, TAG);
}
/**
* 暗号化した文字列を復号して元の文字列に戻るかどうかを確認
*/
@Test
public void test1() {
final Context context = ApplicationProvider.getApplicationContext();
try {
final String original = context.getPackageName();
final String encrypted = KeyStoreUtils.encrypt(context, TAG, original);
final String decrypted = KeyStoreUtils.decrypt(context, TAG, encrypted);
assertEquals(original, decrypted);
} catch (final ObfuscatorException e) {
throw new AssertionError(e);
}
}
}
| [
"saki4510t@gmail.com"
] | saki4510t@gmail.com |
77d936c18d88490baf0a00cde4653e631b1c2dd3 | d55b044ce60c06d69325b4634ddb1a46eedc6e1e | /valley/src/main/java/com/hn/d/valley/main/found/FoundUIView2.java | 12403f4ba0d3036e1cee3f55e1e5e34e271b091d | [] | no_license | AppSecAI-TEST/UIView2 | dc40b8554fe130a3e08bc15a0282f3d4ae046e8a | b6e4f10e4e51206c9d76954fa27e185362738495 | refs/heads/master | 2021-01-16T11:41:44.850053 | 2017-08-11T06:13:09 | 2017-08-11T06:13:09 | 100,001,170 | 0 | 0 | null | 2017-08-11T06:53:18 | 2017-08-11T06:53:18 | null | UTF-8 | Java | false | false | 5,573 | java | package com.hn.d.valley.main.found;
import android.Manifest;
import android.graphics.Rect;
import android.support.annotation.DrawableRes;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.angcyo.uiview.base.Item;
import com.angcyo.uiview.base.SingleItem;
import com.angcyo.uiview.container.UIParam;
import com.angcyo.uiview.model.TitleBarPattern;
import com.angcyo.uiview.recycler.RBaseViewHolder;
import com.angcyo.uiview.utils.ScreenUtil;
import com.hn.d.valley.R;
import com.hn.d.valley.base.BaseItemUIView;
import com.hn.d.valley.main.MainUIView;
import com.hn.d.valley.main.found.sub.GameListUIView;
import com.hn.d.valley.main.found.sub.HnScanUIView;
import com.hn.d.valley.main.found.sub.HotInformationUIView;
import com.hn.d.valley.main.found.sub.SearchUIView;
import com.hn.d.valley.main.home.nearby.NearbyUIView;
import com.hn.d.valley.sub.other.ItemRecyclerUIView;
import java.util.List;
import rx.functions.Action1;
/**
* Copyright (C) 2016,深圳市红鸟网络科技股份有限公司 All rights reserved.
* 项目名称:
* 类的描述:发现
* 创建人员:Robi
* 创建时间:2016/12/16 13:58
* 修改人员:Robi
* 修改时间:2016/12/16 13:58
* 修改备注:
* Version: 1.0.0
*/
public class FoundUIView2 extends ItemRecyclerUIView<ItemRecyclerUIView.ViewItemInfo> {
public static final String GAME_URL = "http://222.189.228.182:88/webplat/";
@Override
protected int getItemLayoutId(int viewType) {
return R.layout.item_find;
}
@Override
protected TitleBarPattern getTitleBar() {
return super.getTitleBar().setTitleString(mActivity.getString(R.string.nav_found_text)).setShowBackImageView(false);
}
@Override
public void onViewCreate(View rootView, UIParam param) {
super.onViewCreate(rootView, param);
}
@Override
protected void createItems(List<ViewItemInfo> items) {
final int size = ScreenUtil.dip2px(10);
items.add(ViewItemInfo.build(new ItemOffsetCallback(size) {
@Override
public void onBindView(RBaseViewHolder holder, int posInData, ViewItemInfo dataBean) {
bindInitView(holder, getString(R.string.hot_information), "全球资讯轻松浏览", R.drawable.img_news, new View.OnClickListener() {
@Override
public void onClick(View v) {
mParentILayout.startIView(new HotInformationUIView());
}
});
}
}));
items.add(ViewItemInfo.build(new ItemOffsetCallback(size) {
@Override
public void onBindView(RBaseViewHolder holder, int posInData, ViewItemInfo dataBean) {
bindInitView(holder, getString(R.string.search_title), "全网检索,即刻呈现", R.drawable.img_search, new View.OnClickListener() {
@Override
public void onClick(View v) {
MainUIView uiView = (MainUIView) mParentILayout.getIViewWith(MainUIView.class);
mParentILayout.startIView(new SearchUIView().setJumpToDynamicListAction(uiView));
}
});
}
}));
items.add(ViewItemInfo.build(new ItemOffsetCallback(size) {
@Override
public void onBindView(RBaseViewHolder holder, int posInData, ViewItemInfo dataBean) {
bindInitView(holder, getString(R.string.scan_title), "快速读取条码内容", R.drawable.img_scan, new View.OnClickListener() {
@Override
public void onClick(View v) {
mActivity.checkPermissions(new String[]{
Manifest.permission.CAMERA
},
new Action1<Boolean>() {
@Override
public void call(Boolean aBoolean) {
if (aBoolean) {
mParentILayout.startIView(new HnScanUIView());
}
}
});
}
});
}
}));
items.add(ViewItemInfo.build(new ItemOffsetCallback(size) {
@Override
public void onBindView(RBaseViewHolder holder, int posInData, ViewItemInfo dataBean) {
bindInitView(holder, getString(R.string.game), "约上小伙伴一起边聊边玩", R.drawable.img_game, new View.OnClickListener() {
@Override
public void onClick(View v) {
mParentILayout.startIView(new GameListUIView());
}
});
}
}));
}
private void bindInitView(RBaseViewHolder holder, String title , String desc , @DrawableRes int res, View.OnClickListener listener) {
TextView tv_friend_name = holder.tv(R.id.tv_friend_name);
TextView tv_func_desc = holder.tv(R.id.tv_func_desc);
ImageView iv_find = holder.imgV(R.id.iv_find);
tv_friend_name.setText(title);
tv_func_desc.setText(desc);
iv_find.setImageResource(res);
holder.itemView.setOnClickListener(listener);
}
}
| [
"angcyo@126.com"
] | angcyo@126.com |
decb53a6712c0f91f1ed978d14ba6c6b1e4826a1 | 6244785c662d1ea14928f796e60ba33b4628cbc9 | /autosize/src/main/java/me/jessyan/autosize/utils/ScreenUtils.java | ff0dee711e96eefa45584c9984aa0c2bc40f9851 | [
"Apache-2.0"
] | permissive | quintushorace/AndroidAutoSize | 10971c513b75f7c4bc9080944413d2a15f333930 | 8bf46cbab4b3503f958b0c2e356847bd75bcfcfe | refs/heads/master | 2020-03-27T02:43:34.554274 | 2018-08-23T03:59:38 | 2018-08-23T03:59:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,464 | java | /*
* Copyright 2018 JessYan
*
* 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 me.jessyan.autosize.utils;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Point;
import android.os.Build;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.WindowManager;
/**
* ================================================
* Created by JessYan on 26/09/2016 16:59
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* ================================================
*/
public class ScreenUtils {
private ScreenUtils() {
throw new IllegalStateException("you can't instantiate me!");
}
public static int getStatusBarHeight() {
int result = 0;
try {
int resourceId = Resources.getSystem().getIdentifier("status_bar_height", "dimen", "android");
if (resourceId > 0) {
result = Resources.getSystem().getDimensionPixelSize(resourceId);
}
} catch (Resources.NotFoundException e) {
e.printStackTrace();
}
return result;
}
public static int[] getScreenSize(Context context) {
int[] size = new int[2];
WindowManager w = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
Display d = w.getDefaultDisplay();
DisplayMetrics metrics = new DisplayMetrics();
d.getMetrics(metrics);
// since SDK_INT = 1;
int widthPixels = metrics.widthPixels;
int heightPixels = metrics.heightPixels;
// includes window decorations (statusbar bar/menu bar)
if (Build.VERSION.SDK_INT >= 14 && Build.VERSION.SDK_INT < 17)
try {
widthPixels = (Integer) Display.class.getMethod("getRawWidth").invoke(d);
heightPixels = (Integer) Display.class.getMethod("getRawHeight").invoke(d);
} catch (Exception ignored) {
}
// includes window decorations (statusbar bar/menu bar)
if (Build.VERSION.SDK_INT >= 17)
try {
Point realSize = new Point();
Display.class.getMethod("getRealSize", Point.class).invoke(d, realSize);
widthPixels = realSize.x;
heightPixels = realSize.y;
} catch (Exception ignored) {
}
size[0] = widthPixels;
size[1] = heightPixels;
return size;
}
public static int getHeightOfNavigationBar(Context context) {
Display d = ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
int realHeight = getScreenSize(context)[1];
DisplayMetrics displayMetrics = new DisplayMetrics();
d.getMetrics(displayMetrics);
int displayHeight = displayMetrics.heightPixels;
return realHeight - displayHeight;
}
}
| [
"jessyan@foxmail.com"
] | jessyan@foxmail.com |
a24effde3e4433cbdf6831baa0a0c37c44f0201a | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Lang/53/org/apache/commons/lang/builder/ToStringStyle_ToStringStyle_277.java | c3779925e34096fd0505a0e8d6c990ea9c08ea19 | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 3,176 | java |
org apach common lang builder
control code string code format link string builder tostringbuild
main code string builder tostringbuild code
class intend code singleton code
instanti style time program
gener predefin constant
altern link standard string style standardtostringstyl
set individu set style achiev
subclass
requir subclass overrid
method requir object type code code
code code code object code code code
method output version detail summari
detail version arrai base method
output arrai summari method output
arrai length
format output object date
creat subclass overrid method
pre
style mystyl string style tostringstyl
append detail appenddetail string buffer stringbuff buffer string field fieldnam object
date
simpl date format simpledateformat yyyi format
buffer append
pre
author stephen colebourn
author gari gregori
author pete gieser
author masato tezuka
version
string style tostringstyl serializ
constructor
string style tostringstyl
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
c2e60e2fd92b07805407b4e7e1d54301d0b31fa2 | 6b874867e75329325b0baaf1c0f3f6d7ecf004cf | /src/main/java/baekjoon/star/dot/q2440/Main.java | e11d62c16069c386eec0c59ca868d459fb80d2e6 | [] | no_license | kkssry/algorithm | e36ef834fea2d2db444b16b58898b9cc76a45383 | cdd4af227db018d2529e6aedd991d2ef1b596d6f | refs/heads/master | 2020-04-20T14:27:19.293476 | 2020-02-28T13:55:16 | 2020-02-28T13:55:16 | 168,898,908 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 541 | java | package baekjoon.star.dot.q2440;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int input = Integer.parseInt(br.readLine());
for (int i = 0; i < input; i++) {
for (int j = input; j > i; j--) {
System.out.print("*");
}
System.out.println();
}
}
}
| [
"kkssry@naver.com"
] | kkssry@naver.com |
10f1a9e4617334bf17d12b174bb6478b3bbf89c2 | 5ca3901b424539c2cf0d3dda52d8d7ba2ed91773 | /src_fernflower/com/google/protobuf/TextFormat$Parser$Builder.java | fc84c648247626b0429824ea951ca3c0b7c88c17 | [] | no_license | fjh658/bindiff | c98c9c24b0d904be852182ecbf4f81926ce67fb4 | 2a31859b4638404cdc915d7ed6be19937d762743 | refs/heads/master | 2021-01-20T06:43:12.134977 | 2016-06-29T17:09:03 | 2016-06-29T17:09:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 844 | java | package com.google.protobuf;
import com.google.protobuf.TextFormat$1;
import com.google.protobuf.TextFormat$Parser;
import com.google.protobuf.TextFormat$Parser$SingularOverwritePolicy;
public class TextFormat$Parser$Builder {
private boolean allowUnknownFields = false;
private TextFormat$Parser$SingularOverwritePolicy singularOverwritePolicy;
public TextFormat$Parser$Builder() {
this.singularOverwritePolicy = TextFormat$Parser$SingularOverwritePolicy.ALLOW_SINGULAR_OVERWRITES;
}
public TextFormat$Parser$Builder setSingularOverwritePolicy(TextFormat$Parser$SingularOverwritePolicy var1) {
this.singularOverwritePolicy = var1;
return this;
}
public TextFormat$Parser build() {
return new TextFormat$Parser(this.allowUnknownFields, this.singularOverwritePolicy, (TextFormat$1)null);
}
}
| [
"manouchehri@riseup.net"
] | manouchehri@riseup.net |
7c3dd9ea60dea4d418ac8e68de3a41b9a267e76d | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XRENDERING-422-10-5-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/internal/parser/wikimodel/DefaultXWikiGeneratorListener_ESTest_scaffolding.java | 05af1bd0c9d4416f4d630dd5cdafacd703cbbe52 | [] | 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 | 479 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Apr 04 16:41:43 UTC 2020
*/
package org.xwiki.rendering.internal.parser.wikimodel;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class DefaultXWikiGeneratorListener_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
c56e8d08bb7bc7fb393654afc29dfbd4f63f6973 | 7fbbd237f08f7575b7f735164a866bfe74fe631f | /src/main/java/com/mycompany/portfolio_tracker/controller/AbstractController.java | d1dc8070364c54e361e4f0567e37a733379239a3 | [] | no_license | colinbut/portfolio-tracker | e1c039fc797b5ef36c9e1c3950cba00955f5a109 | 513ad7b9e82a69d278585798c2ad8eac029376ac | refs/heads/master | 2021-05-04T11:11:13.946955 | 2017-10-08T10:09:22 | 2017-10-08T10:09:22 | 36,391,427 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 875 | java | /*
* |-------------------------------------------------
* | Copyright © 2008 Colin But. All rights reserved.
* |-------------------------------------------------
*/
package com.mycompany.portfolio_tracker.controller;
import com.mycompany.portfolio_tracker.model.Quote;
import com.mycompany.portfolio_tracker.view.MainWindow;
import com.mycompany.portfolio_tracker.view.components.MyTableView;
/**
* AbstractController class
*
* Common controller containing common resources
*
* @author colin
*
*/
public class AbstractController {
protected MainWindow gui; //view
private MyTableView ft; //Table View --> get model from there
protected Quote quote;
/**
* Returns the current selection table
*
* @return MyTableView
*/
public MyTableView getCurrentSelectionTable(){
ft = (MyTableView)gui.getTabs().getSelectedComponent();
return ft;
}
}
| [
"colinbut@users.noreply.github.com"
] | colinbut@users.noreply.github.com |
c95270d586723c82fddc0acaffedcc6d62d3818b | 0dc06e5cc1b49a092245f5caf9ab6ee573b727ec | /Xideo/src/no/sumo/api/vo/asset/RestPlatformPublishInfo.java | 9fedfa7669b87267fed2e6d471be2f83ca6c1ea0 | [] | no_license | sandeeptiku2012/ComcastRobotium | d64122d1aa89ba5d19cd2574e07053a933c9a1bb | f9f5d061ba4b09d54ff294aaad346044823c29b5 | refs/heads/master | 2016-09-06T05:43:03.717164 | 2014-01-06T12:56:49 | 2014-01-06T12:56:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,106 | java | package no.sumo.api.vo.asset;
import java.util.Date;
import no.sumo.api.contracts.IPlatformPublishInfo;
import no.sumo.api.vo.RestObject;
import org.simpleframework.xml.Default;
import org.simpleframework.xml.DefaultType;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;
import org.simpleframework.xml.Transient;
@Root( name = "publishing" )
@Default( DefaultType.FIELD )
public class RestPlatformPublishInfo extends RestObject implements IPlatformPublishInfo {
@Transient
private Long id;
@Transient
private Integer platformId;
@Transient
private Long assetId;
@Element( name = "platform" )
private String platformName;
@Element( name = "live" )
private Boolean livePublished;
@Element( name = "onDemand" )
private Boolean onDemandPublished;
public static final Date DATE_EMPTY = new Date( 0L );
@Element( name = "expire", required = true )
private Date expire = null;
@Element( name = "publish", required = true )
private Date publish = null;
public Long getId() {
return id;
}
public void setId( Long id ) {
this.id = id;
}
public Integer getPlatformId() {
return platformId;
}
public void setPlatformId( Integer platformId ) {
this.platformId = platformId;
}
public Boolean getLivePublished() {
return livePublished;
}
public void setLivePublished( Boolean livePublished ) {
this.livePublished = livePublished;
}
public Boolean getOnDemandPublished() {
return onDemandPublished;
}
public void setOnDemandPublished( Boolean onDemandPublished ) {
this.onDemandPublished = onDemandPublished;
}
public Date getExpire() {
return expire;
}
public void setExpire( Date expire ) {
this.expire = expire;
}
public Date getPublish() {
return publish;
}
public void setPublish( Date publish ) {
this.publish = publish;
}
public Long getAssetId() {
return assetId;
}
public void setAssetId( Long assetId ) {
this.assetId = assetId;
}
public String getPlatformName() {
return platformName;
}
public void setPlatformName( String platformName ) {
this.platformName = platformName;
}
}
| [
"manju1375@gmail.com"
] | manju1375@gmail.com |
45582d89fe87be1c53aea1c1f06f17dc1ba15bce | 3df27b037c878b7d980b5c068d3663682c09b0b3 | /src/com/wfzcx/ppms/synthesize/expert/dao/impl/ProAssociationDaoImpl.java | 113871caecb9bae8d430214a2cf9a0c9b680fc43 | [] | no_license | shinow/tjec | 82fbd67886bc1f60c63af3e6054d1e4c16df2a0d | 0b2f4de2eda13acf351dfc04faceea508c9dd4b0 | refs/heads/master | 2021-09-24T15:45:42.212349 | 2018-10-11T06:13:55 | 2018-10-11T06:13:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 468 | java | package com.wfzcx.ppms.synthesize.expert.dao.impl;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;
import com.jbf.common.dao.impl.GenericDao;
import com.wfzcx.ppms.synthesize.expert.dao.ProAssociationDaoI;
import com.wfzcx.ppms.synthesize.expert.po.ProAssociation;
@Scope("prototype")
@Repository
public class ProAssociationDaoImpl extends GenericDao<ProAssociation, Integer> implements ProAssociationDaoI {
}
| [
"lin521lh"
] | lin521lh |
1eeed57041dbf3faebe1651cccb0a97d5353ad5b | 5622d518bac15a05590055a147628a728ca19b23 | /jcore-xmi-splitter/src/test/java/de/julielab/jcore/types/ValueMention.java | f1bdae61f361b5619346677ed3d4df8a4663ded8 | [
"BSD-2-Clause"
] | permissive | JULIELab/jcore-dependencies | e51349ccf6f26c7b7dab777a9e6baacd7068b853 | a303c6a067add1f4b05c4d2fe31c1d81ecaa7073 | refs/heads/master | 2023-03-19T20:26:55.083193 | 2023-03-09T20:32:13 | 2023-03-09T20:32:13 | 44,806,492 | 4 | 2 | BSD-2-Clause | 2022-11-16T19:48:08 | 2015-10-23T10:32:10 | Java | UTF-8 | Java | false | false | 1,907 | java |
/* First created by JCasGen Tue Sep 03 12:34:17 CEST 2019 */
package de.julielab.jcore.types;
import org.apache.uima.jcas.JCas;
import org.apache.uima.jcas.JCasRegistry;
import org.apache.uima.jcas.cas.TOP_Type;
/**
* Updated by JCasGen Tue Sep 03 12:34:17 CEST 2019
* XML source: all-test-types.xml
* @generated */
public class ValueMention extends ConceptMention {
/** @generated
* @ordered
*/
@SuppressWarnings ("hiding")
public final static int typeIndexID = JCasRegistry.register(ValueMention.class);
/** @generated
* @ordered
*/
@SuppressWarnings ("hiding")
public final static int type = typeIndexID;
/** @generated
* @return index of the type
*/
@Override
public int getTypeIndexID() {return typeIndexID;}
/** Never called. Disable default constructor
* @generated */
protected ValueMention() {/* intentionally empty block */}
/** Internal - constructor used by generator
* @generated
* @param addr low level Feature Structure reference
* @param type the type of this Feature Structure
*/
public ValueMention(int addr, TOP_Type type) {
super(addr, type);
readObject();
}
/** @generated
* @param jcas JCas to which this Feature Structure belongs
*/
public ValueMention(JCas jcas) {
super(jcas);
readObject();
}
/** @generated
* @param jcas JCas to which this Feature Structure belongs
* @param begin offset to the begin spot in the SofA
* @param end offset to the end spot in the SofA
*/
public ValueMention(JCas jcas, int begin, int end) {
super(jcas);
setBegin(begin);
setEnd(end);
readObject();
}
/**
* <!-- begin-user-doc -->
* Write your own initialization here
* <!-- end-user-doc -->
*
* @generated modifiable
*/
private void readObject() {/*default - does nothing empty block */}
}
| [
"chew@gmx.net"
] | chew@gmx.net |
8d32134159118c743a333359653e4be013a7f05c | 7893c1e225d2de3eadbfc98ab0720cde57338cc2 | /src/main/java/robomuss/rc/track/TrackTypeSlopeUp.java | e8ad57324743706430d86a5617960208f2549484 | [] | no_license | RollercoasterTeam/Rollercoaster | c8c6c49090251bd9a679c43b8ebdcd312f121218 | e351051208365b0b42d1ecd0b8e58639bcc05824 | refs/heads/master | 2021-01-23T05:39:28.224133 | 2015-07-19T17:14:59 | 2015-07-19T17:14:59 | 23,036,736 | 5 | 3 | null | null | null | null | UTF-8 | Java | false | false | 2,636 | java | package robomuss.rc.track;
import net.minecraft.client.model.ModelBase;
import net.minecraft.entity.Entity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import org.lwjgl.opengl.GL11;
import robomuss.rc.block.te.TileEntityTrack;
import robomuss.rc.entity.EntityTrainDefault;
import robomuss.rc.rollercoaster.RollercoasterType;
import robomuss.rc.util.IInventoryRenderSettings;
public class TrackTypeSlopeUp extends TrackType implements IInventoryRenderSettings {
public TrackTypeSlopeUp(String unlocalized_name, int crafting_cost) {
super(unlocalized_name, crafting_cost);
}
@Override
public void render(RollercoasterType type, TileEntityTrack te) {
rotate(te);
ModelBase model = type.getStandardModel();
GL11.glRotatef(45f, 0f, 0f, 1f);
model.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
GL11.glPushMatrix();
GL11.glRotatef(-45f, 0f, 0f, 1f);
model.render((Entity) null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
GL11.glPopMatrix();
}
@Override
public AxisAlignedBB getRenderBoundingBox(World world, int xCoord, int yCoord, int zCoord) {
return AxisAlignedBB.getBoundingBox(xCoord - 1, yCoord, zCoord - 1, xCoord + 2, yCoord + 2, zCoord + 2);
}
@Override
public void moveTrain(TileEntityTrack te, EntityTrainDefault entity) {
if(te.direction == 0) {
if(entity.direction == 0) {
entity.posZ += 1f;
entity.rotationPitch = 45f;
entity.posY += 1f;
}
if(entity.direction == 2) {
entity.posZ -= 1f;
entity.rotationPitch = 0f;
}
}
if(te.direction == 1) {
if(entity.direction == 1) {
entity.posX += 1f;
entity.rotationPitch = 0f;
}
if(entity.direction == 3) {
entity.posX -= 1f;
entity.rotationPitch = 45f;
entity.posY += 1f;
}
}
if(te.direction == 2) {
if(entity.direction == 2) {
entity.posZ -= 1f;
entity.rotationPitch = 45f;
entity.posY += 1f;
}
if(entity.direction == 0) {
entity.posZ += 1f;
entity.rotationPitch = 0f;
}
}
if(te.direction == 3) {
if(entity.direction == 1) {
entity.posX += 1f;
entity.rotationPitch = 45f;
entity.posY += 1f;
}
if(entity.direction == 3) {
entity.posX -= 1f;
entity.rotationPitch = 0f;
}
}
}
@Override
public float getInventoryX() {
return 0.3f;
}
@Override
public float getInventoryY() {
return 0.55f;
}
@Override
public float getInventoryZ() {
return 0;
}
@Override
public float getInventoryScale() {
return 0.9f;
}
@Override
public float getInventoryRotation() {
return 180f;
}
@Override
public boolean useIcon() {
return false;
}
}
| [
"km.github@gmail.com"
] | km.github@gmail.com |
d4dcb49ba80508cbffa0eca116fbf5b2893532d2 | c5d08131d94aad146b8fb7da0696a5f6187b8f1e | /quantity/src/main/java/si/uom/quantity/KinematicViscosity.java | c7dbe226805d9b8c1acc87013a1fdf7e3a46e7fa | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | htreu/si-units | d48ca979923b72889def135c7400c475e2259c27 | a3d15efa9bd3ec568ed843001ad4a8125e75e33a | refs/heads/master | 2021-05-05T10:06:50.103258 | 2018-01-18T07:43:49 | 2018-01-18T07:43:49 | 117,948,598 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,146 | java | /*
* International System of Units (SI)
* Copyright (c) 2005-2017, Jean-Marie Dautelle, Werner Keil and others.
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
* and the following disclaimer in the documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of JSR-363, Units of Measurement nor the names of their 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 HOLDER 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.
*/
package si.uom.quantity;
import javax.measure.Quantity;
/**
* Diffusion of momentum.
* The system unit for this quantity is "m²/s".
*
* @author <a href="mailto:jean-marie@dautelle.com">Jean-Marie Dautelle</a>
* @author <a href="mailto:units@catmedia.us">Werner Keil</a>
* @version 3.2.1
*
* @see DynamicViscosity
* @see <a href="http://en.wikipedia.org/wiki/Viscosity">Wikipedia: Viscosity</a>
*/
public interface KinematicViscosity extends Quantity<KinematicViscosity> {
}
| [
"werner.keil@gmx.net"
] | werner.keil@gmx.net |
06fdfba9ee802b5a17dc8869b9a0c4b7c5e395d2 | f6899a2cf1c10a724632bbb2ccffb7283c77a5ff | /glassfish/deployment/common/src/main/java/com/sun/enterprise/deploy/shared/AbstractArchiveHandler.java | 798a18987a4c13ae01d4fdfa43220f51791450dc | [] | no_license | Appdynamics/OSS | a8903058e29f4783e34119a4d87639f508a63692 | 1e112f8854a25b3ecf337cad6eccf7c85e732525 | refs/heads/master | 2023-07-22T03:34:54.770481 | 2021-10-28T07:01:57 | 2021-10-28T07:01:57 | 19,390,624 | 2 | 13 | null | 2023-07-08T02:26:33 | 2014-05-02T22:42:20 | null | UTF-8 | Java | false | false | 4,243 | java | /*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2008-2011 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
* or packager/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
package com.sun.enterprise.deploy.shared;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.net.URI;
import org.glassfish.api.deployment.archive.ReadableArchive;
import org.glassfish.api.deployment.DeploymentContext;
import org.glassfish.deployment.common.DeploymentUtils;
import java.io.IOException;
import java.util.jar.Manifest;
import java.util.List;
import java.util.ArrayList;
import java.util.logging.Logger;
import java.util.logging.Level;
import java.net.URL;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLResolver;
import com.sun.logging.LogDomains;
import org.glassfish.internal.deployment.GenericHandler;
/**
* Common methods for ArchiveHandler implementations
*
* @author Jerome Dochez
*/
public abstract class AbstractArchiveHandler extends GenericHandler {
static final protected Logger _logger = LogDomains.getLogger(DeploymentUtils.class, LogDomains.DPL_LOGGER);
private static XMLInputFactory xmlInputFactory;
static {
xmlInputFactory = XMLInputFactory.newInstance();
xmlInputFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
// set an zero-byte XMLResolver as IBM JDK does not take SUPPORT_DTD=false
// unless there is a jvm option com.ibm.xml.xlxp.support.dtd.compat.mode=false
xmlInputFactory.setXMLResolver(new XMLResolver() {
@Override
public Object resolveEntity(String publicID,
String systemID, String baseURI, String namespace)
throws XMLStreamException {
return new ByteArrayInputStream(new byte[0]);
}
});
}
public List<URL> getManifestLibraries(DeploymentContext context) {
try {
Manifest manifest = getManifest(context.getSource());
return DeploymentUtils.getManifestLibraries(context, manifest);
}catch (IOException ioe) {
_logger.log(Level.WARNING,
"Exception while getting manifest classpath: ", ioe);
return new ArrayList<URL>();
}
}
protected static XMLInputFactory getXMLInputFactory() {
return xmlInputFactory;
}
}
| [
"srini@appdynamics.com"
] | srini@appdynamics.com |
d869b437f5b6732964b0f1dab0993c7bc5c7f781 | 10f4600b1c42426af8618de08aeb8f10880ace0e | /app/src/main/java/me/storm/volley/VolleyApp.java | 7b406aa10a907e10ae60cf889c3ab5bdbf01ffcb | [] | no_license | zhangquanit/net-volley | d3aca8a0b4d5355b9528342a826af154c75e5806 | 5b3d5ed50774fad868e098e398c67b1c9e70b279 | refs/heads/master | 2021-10-08T06:39:11.621315 | 2018-12-09T16:39:22 | 2018-12-09T16:39:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 357 | java | /*
* Created by Storm Zhang, Feb 11, 2014.
*/
package me.storm.volley;
import android.app.Application;
import me.storm.volley.data.RequestManager;
public class VolleyApp extends Application {
@Override
public void onCreate() {
super.onCreate();
init();
}
private void init() {
RequestManager.init(this);
}
}
| [
"zhangquanit@126.com"
] | zhangquanit@126.com |
fa85d84d6fa8ec6a131abec8fc209684ab9620e4 | 0ad5774da285de3561aebe71f9a9242cc849c4cf | /src/test/java/org/realityforge/jeo/geolatte/jpa/eclipselink/TestPolygonEntity.java | bed7cb5f6582739ce24cfd8100ef820f3c356640 | [
"Apache-2.0"
] | permissive | brain64bit/geolatte-geom-eclipselink | fd16d97f52ebceba19f2baa51dba9bb0c57413e9 | a82f968cd4b017928c1ee9bec8d56847fe58273e | refs/heads/master | 2021-01-21T07:45:56.855780 | 2013-08-06T01:53:37 | 2013-08-06T01:53:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 660 | java | package org.realityforge.jeo.geolatte.jpa.eclipselink;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import org.geolatte.geom.Point;
import org.geolatte.geom.Polygon;
@Entity
public class TestPolygonEntity
implements Serializable
{
@Id
@Column( name = "id" )
private Integer _id;
@Column( name = "geom" )
private Polygon _geom;
public Integer getId()
{
return _id;
}
public void setId( final Integer id )
{
_id = id;
}
public Polygon getGeom()
{
return _geom;
}
public void setGeom( final Polygon geom )
{
_geom = geom;
}
} | [
"peter@realityforge.org"
] | peter@realityforge.org |
e49a868042c5c3ab37124b41d3b63ad0853580a4 | 6b1694afaef3d9b78cc286a261d02015cf078ded | /src/com/zjxfood/indiana/MyIndianaNoPayAdapter.java | 0061951cefae3e7a5bc35cedc4be8eaf1d82b5b4 | [] | no_license | twgdhz/ZjxssnnProject | ccf18a2b6ad8ce13f92ecf3868a67e708390c7be | bce015429423b12a1315d5ed2d20e18a31079ed4 | refs/heads/master | 2021-06-01T05:32:34.428952 | 2016-08-02T03:38:08 | 2016-08-02T03:38:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,545 | java | package com.zjxfood.indiana;
import java.util.ArrayList;
import java.util.HashMap;
import com.lidroid.xutils.BitmapUtils;
import com.project.util.BitmapUtilSingle;
import com.project.util.Utils;
import com.zjxfood.activity.R;
import com.zjxfood.indiana.MyIndianaOrderAdapter.ViewHolder;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
public class MyIndianaNoPayAdapter extends BaseAdapter{
private Context mContext;
private BitmapUtils mBitmapUtils;
private LayoutInflater mInflater;
private ArrayList<HashMap<String, Object>> mList;
public MyIndianaNoPayAdapter(Context context,ArrayList<HashMap<String, Object>> list){
this.mContext = context;
this.mList = list;
mInflater = LayoutInflater.from(mContext);
mBitmapUtils = BitmapUtilSingle.getBitmapInstance(mContext);
}
@Override
public int getCount() {
// TODO Auto-generated method stub
return mList.size();
}
@Override
public Object getItem(int arg0) {
// TODO Auto-generated method stub
return null;
}
@Override
public long getItemId(int arg0) {
// TODO Auto-generated method stub
return 0;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder mHolder = null;
if(convertView==null){
convertView = mInflater.inflate(R.layout.my_indiana_no_pay_item, null);
mHolder = new ViewHolder();
mHolder.mImageView = (ImageView) convertView.findViewById(R.id.my_indiana_no_pay_item_image);
mHolder.mNameText = (TextView) convertView.findViewById(R.id.my_indiana_no_pay_item_content_name);
mHolder.mOrderText = (TextView) convertView.findViewById(R.id.my_indiana_no_pay_item_order);
convertView.setTag(mHolder);
}else{
mHolder = (ViewHolder) convertView.getTag();
}
if(mList.get(position).get("ImgUrl")!=null){
mBitmapUtils.display(mHolder.mImageView, mList.get(position).get("ImgUrl").toString());
}
if(mList.get(position).get("ProductName")!=null && mList.get(position).get("Id")!=null){
mHolder.mNameText.setText("【"+mList.get(position).get("Id")+"期】"+mList.get(position).get("ProductName"));
}
if(mList.get(position).get("OrderId")!=null){
mHolder.mOrderText.setText("订单号:"+mList.get(position).get("OrderId").toString());
}
return convertView;
}
class ViewHolder{
private ImageView mImageView;
private TextView mNameText;
private TextView mOrderText;
}
}
| [
"236543611@qq.com"
] | 236543611@qq.com |
de0cae78eba6595d0e6cec8f9435f346602d0602 | 8e14f68088b219265ae0565eef38f7a119ec2475 | /app/src/main/java/zhaoliang/com/hmandroid/activity/day06/secondactivity/SecondActivity.java | 420c8a604da3bf92bb6b7ee3d0c635e384f08952 | [] | no_license | BruceAnda/HMAndroid | f1c78af82d484a63f7d202ed1d9af9b8d9e3b541 | cb3fca9fd55644870ca73130b33c982eb00040fd | refs/heads/master | 2021-01-20T14:55:24.846647 | 2017-05-19T02:50:18 | 2017-05-19T02:50:18 | 90,690,592 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 986 | java | package zhaoliang.com.hmandroid.activity.day06.secondactivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import zhaoliang.com.hmandroid.R;
import zhaoliang.com.hmandroid.activity.day06.secondactivity.activity.SecondActivityActivity;
import zhaoliang.com.hmandroid.base.BaseBackActivity;
/**
* <pre>
* 需求:SecondActivity
* 思路:
* 1. 新建一个Activity
* </pre>
*/
public class SecondActivity extends BaseBackActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_second);
}
/**
* 按钮点击调用这个方法
*
* @param view
*/
public void secondActivity(View view) {
startActivity(new Intent(this, SecondActivityActivity.class));
}
@Override
protected String setActionBarTitle() {
return getString(R.string.day06_title1);
}
}
| [
"2668645098@qq.com"
] | 2668645098@qq.com |
8f379ceb5914ceeff4e3dbf67026857eea987277 | 0b547b288520cba0fac9c479d6ecb6941dd51221 | /sk.stuba.fiit.perconik.utilities/src/sk/stuba/fiit/perconik/utilities/configuration/AbstractOptions.java | 96103b5be8b59651c1174b8139ed8dd68409d3f8 | [
"MIT"
] | permissive | anukat2015/perconik | d1e25bdf9be2008723fb6e88943f7d7dc0dfaff8 | d80dc0c29df4e3faf318ee18adcaa8f03bb50aab | refs/heads/master | 2020-04-05T19:02:48.852160 | 2016-06-16T09:59:14 | 2016-06-16T09:59:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 606 | java | package sk.stuba.fiit.perconik.utilities.configuration;
import java.util.Map;
public abstract class AbstractOptions implements Options {
/**
* Constructor for use by subclasses.
*/
protected AbstractOptions() {}
public void fromMap(final Map<String, Object> map) {
throw new UnsupportedOperationException();
}
@Override
public String toString() {
return this.toMap().toString();
}
public Object put(final String key, final Object value) {
throw new UnsupportedOperationException();
}
public Object get(final String key) {
return this.toMap().get(key);
}
}
| [
"pavol.zbell@gmail.com"
] | pavol.zbell@gmail.com |
55a2d0ae56254922516cdadce05bd7f1b0ebdad8 | bfe54324196530a0efc21feb72a2d9ff5458b680 | /cyclops-javaslang/src/main/java/com/aol/cyclops/javaslang/FromCyclopsReact.java | e52cd0ece28e318e8de6de098b89639f1c249797 | [
"MIT"
] | permissive | jayzhs/cyclops | 8ffc67be9cf6e5a1892f65713df671cdc8265a49 | ae2423f0d205363ec36242df073ed58d72928b78 | refs/heads/master | 2021-01-18T08:33:17.407023 | 2016-07-01T16:17:47 | 2016-07-01T16:17:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,179 | java | package com.aol.cyclops.javaslang;
import java.util.stream.Stream;
import com.aol.cyclops.control.Xor;
import com.aol.cyclops.types.MonadicValue;
import com.aol.cyclops.types.MonadicValue2;
import javaslang.concurrent.Future;
import javaslang.control.Either;
import javaslang.control.Option;
import javaslang.control.Try;
import javaslang.control.Validation;
public class FromCyclopsReact {
public static <T> javaslang.collection.Stream<T> fromStream(
Stream<T> s) {
return javaslang.collection.Stream.ofAll(()->s.iterator());
}
public static <T> Try<T> toTry(MonadicValue<T> value){
return value.toTry().visit(s->Try.success(s),f->Try.failure(f));
}
public static <T> Future<T> future(MonadicValue<T> value){
return Future.of(()->value.get());
}
public static <T> Option<T> option(MonadicValue<T> value){
return Option.ofOptional(value.toOptional());
}
public static <L,R> Either<L,R> either(MonadicValue2<L,R> value){
Xor<L,R> xor = (Xor)value.toXor();
return xor.visit(l->Either.left(l),r->Either.right(r));
}
public static <L,R> Validation<L,R> validation(MonadicValue2<L,R> value){
return Validation.fromEither(either(value));
}
}
| [
"john.mcclean@teamaol.com"
] | john.mcclean@teamaol.com |
277f9af45053ecc8c1691ac2612f6bd2d2fcf1ec | c02ef4e88e7dd643084322688f21f33a703fb150 | /model/src/main/java/io/mateu/erp/model/cms/DocumentationWebSite.java | 0c7a5a6d461777ce99e4bdaf58cc7ae49048f9af | [
"CC-BY-3.0",
"Beerware"
] | permissive | miguelperezcolom/mateu-erp | cda7e45a8bec1e3f742ceea195560f4672154d0e | f3d702ca56f3e753476787618a73b3d4ee2fd4b3 | refs/heads/master | 2022-09-16T17:50:25.067718 | 2019-07-02T04:00:44 | 2019-07-02T04:00:44 | 68,085,644 | 0 | 2 | NOASSERTION | 2022-09-01T22:26:31 | 2016-09-13T07:31:00 | Java | UTF-8 | Java | false | false | 623 | java | package io.mateu.erp.model.cms;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.Entity;
import java.io.File;
import java.util.List;
@Entity
@Getter
@Setter
public class DocumentationWebSite extends Website {
@Override
public void addLinesAfterGit(List<String> lines, File where) {
lines.add("rm -rf build/*");
lines.add("make html");
lines.add("rst2pdf source/index.rst build/html/manual.pdf");
}
/*
#!/bin/sh
cd /home/doc/quoon-usermanual
git pull
rm -rf build/*
make html
rst2pdf source/index.rst build/html/manual.pdf
*/
}
| [
"miguelperezcolom@gmail.com"
] | miguelperezcolom@gmail.com |
c21193023ebf11f0fc9d95ec40ef34873397ed03 | c885ef92397be9d54b87741f01557f61d3f794f3 | /results/Closure-111/com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter/BBC-F0-opt-10/tests/3/com/google/javascript/jscomp/type/ClosureReverseAbstractInterpreter_ESTest.java | 46e4b6de54d58fa082e1cf84487e2c65923fd48c | [
"CC-BY-4.0",
"MIT"
] | permissive | pderakhshanfar/EMSE-BBC-experiment | f60ac5f7664dd9a85f755a00a57ec12c7551e8c6 | fea1a92c2e7ba7080b8529e2052259c9b697bbda | refs/heads/main | 2022-11-25T00:39:58.983828 | 2022-04-12T16:04:26 | 2022-04-12T16:04:26 | 309,335,889 | 0 | 1 | null | 2021-11-05T11:18:43 | 2020-11-02T10:30:38 | null | UTF-8 | Java | false | false | 6,091 | java | /*
* This file was automatically generated by EvoSuite
* Wed Oct 13 17:39:55 GMT 2021
*/
package com.google.javascript.jscomp.type;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import static org.evosuite.runtime.EvoAssertions.*;
import com.google.javascript.jscomp.ClosureCodingConvention;
import com.google.javascript.jscomp.CodingConvention;
import com.google.javascript.jscomp.GoogleCodingConvention;
import com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter;
import com.google.javascript.jscomp.type.FlowScope;
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.SimpleErrorReporter;
import com.google.javascript.rhino.jstype.JSTypeRegistry;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.ViolatedAssumptionAnswer;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true)
public class ClosureReverseAbstractInterpreter_ESTest extends ClosureReverseAbstractInterpreter_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
GoogleCodingConvention googleCodingConvention0 = new GoogleCodingConvention();
SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter();
JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true);
Node node0 = Node.newString("Object#Element");
Node node1 = new Node(12);
Node node2 = new Node(37, node1, node0);
node2.addChildrenAfter(node2, node1);
ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(googleCodingConvention0, jSTypeRegistry0);
FlowScope flowScope0 = closureReverseAbstractInterpreter0.firstPreciserScopeKnowingConditionOutcome(node2, (FlowScope) null, true);
assertNull(flowScope0);
}
@Test(timeout = 4000)
public void test1() throws Throwable {
ClosureCodingConvention closureCodingConvention0 = new ClosureCodingConvention();
ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(closureCodingConvention0, (JSTypeRegistry) null);
Node node0 = Node.newString("Ok(1yQ\"");
FlowScope flowScope0 = mock(FlowScope.class, new ViolatedAssumptionAnswer());
doReturn((String) null, (String) null).when(flowScope0).toString();
FlowScope flowScope1 = closureReverseAbstractInterpreter0.firstPreciserScopeKnowingConditionOutcome(node0, flowScope0, false);
FlowScope flowScope2 = closureReverseAbstractInterpreter0.getPreciserScopeKnowingConditionOutcome(node0, flowScope1, false);
assertSame(flowScope2, flowScope1);
}
@Test(timeout = 4000)
public void test2() throws Throwable {
GoogleCodingConvention googleCodingConvention0 = new GoogleCodingConvention();
SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter();
JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false);
ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(googleCodingConvention0, jSTypeRegistry0);
// Undeclared exception!
try {
closureReverseAbstractInterpreter0.getPreciserScopeKnowingConditionOutcome((Node) null, (FlowScope) null, true);
fail("Expecting exception: NullPointerException");
} catch(NullPointerException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter", e);
}
}
@Test(timeout = 4000)
public void test3() throws Throwable {
SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter();
JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false);
ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = null;
try {
closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter((CodingConvention) null, jSTypeRegistry0);
fail("Expecting exception: NullPointerException");
} catch(NullPointerException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("com.google.common.base.Preconditions", e);
}
}
@Test(timeout = 4000)
public void test4() throws Throwable {
GoogleCodingConvention googleCodingConvention0 = new GoogleCodingConvention();
SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter();
JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false);
Node node0 = Node.newString("Object#Element");
Node node1 = Node.newString("Object#Element");
Node node2 = new Node(37, node1, node0);
ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(googleCodingConvention0, jSTypeRegistry0);
FlowScope flowScope0 = closureReverseAbstractInterpreter0.getPreciserScopeKnowingConditionOutcome(node2, (FlowScope) null, false);
assertNull(flowScope0);
}
@Test(timeout = 4000)
public void test5() throws Throwable {
GoogleCodingConvention googleCodingConvention0 = new GoogleCodingConvention();
SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter();
JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, false);
ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(googleCodingConvention0, jSTypeRegistry0);
Node node0 = Node.newNumber(1900.42548);
Node node1 = new Node(37, node0, node0);
FlowScope flowScope0 = closureReverseAbstractInterpreter0.getPreciserScopeKnowingConditionOutcome(node1, (FlowScope) null, true);
assertNull(flowScope0);
}
}
| [
"pderakhshanfar@serg2.ewi.tudelft.nl"
] | pderakhshanfar@serg2.ewi.tudelft.nl |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.