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
cca384e8e03a8e604442792336891e0ec0d3642a
462c6815dadc83b1bd406fba29ab0c905cf4bc05
/src/bee/generated/server/DigitalInput.java
aba18c01ced8305bbc4bc6b40cc2e9f49818c8cb
[]
no_license
francoisperron/learning-soap-onvif
ab89b38d770547c0b9ad17a45865c7b8adea5d09
6a0ed9167ad8c2369993da21a5d115a309f42e16
refs/heads/master
2020-05-14T23:53:35.084374
2019-04-18T02:33:17
2019-04-18T02:33:17
182,002,749
1
0
null
null
null
null
UTF-8
Java
false
false
3,411
java
package bee.generated.server; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAnyAttribute; import javax.xml.bind.annotation.XmlAnyElement; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; import javax.xml.namespace.QName; import org.w3c.dom.Element; /** * <p>Java class for DigitalInput complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="DigitalInput"> * &lt;complexContent> * &lt;extension base="{http://www.onvif.org/ver10/schema}DeviceEntity"> * &lt;sequence> * &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;attribute name="IdleState" type="{http://www.onvif.org/ver10/schema}DigitalIdleState" /> * &lt;anyAttribute processContents='lax'/> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "DigitalInput", propOrder = { "any" }) public class DigitalInput extends DeviceEntity { @XmlAnyElement(lax = true) protected List<Object> any; @XmlAttribute(name = "IdleState") protected DigitalIdleState idleState; @XmlAnyAttribute private Map<QName, String> otherAttributes = new HashMap<QName, String>(); /** * Gets the value of the any property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the any property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAny().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Object } * {@link Element } * * */ public List<Object> getAny() { if (any == null) { any = new ArrayList<Object>(); } return this.any; } /** * Gets the value of the idleState property. * * @return * possible object is * {@link DigitalIdleState } * */ public DigitalIdleState getIdleState() { return idleState; } /** * Sets the value of the idleState property. * * @param value * allowed object is * {@link DigitalIdleState } * */ public void setIdleState(DigitalIdleState value) { this.idleState = value; } /** * Gets a map that contains attributes that aren't bound to any typed property on this class. * * <p> * the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * always non-null */ public Map<QName, String> getOtherAttributes() { return otherAttributes; } }
[ "fperron@gmail.com" ]
fperron@gmail.com
798c102fa23c5e2b8bb6eeafee984c647f46d3f2
df9df5eb02c06fbc011fa46db25a75802c034e25
/src/test/java/io/zbus/examples/rpc/inheritance/RpcClient.java
54a08cfecc79a6301948b7bcd58739147aef0bc0
[ "MIT" ]
permissive
joegana/zbus
751aaf909408fc2dabeeaa9557a50990f02868a3
3f6b2cfa4bc820d582334688b09c78aeea56ae5f
refs/heads/master
2021-06-22T03:18:19.265201
2017-08-17T23:21:53
2017-08-17T23:21:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
547
java
package io.zbus.examples.rpc.inheritance; import io.zbus.mq.Broker; import io.zbus.rpc.RpcInvoker; public class RpcClient { public static void main(String[] args) throws Exception { Broker broker = new Broker("localhost:15555"); RpcInvoker rpc = new RpcInvoker(broker, "Inherit"); SubServiceInterface1 service1 = rpc.createProxy(SubServiceInterface1.class); SubServiceInterface2 service2 = rpc.createProxy(SubServiceInterface2.class); service1.save(new Integer(10)); service2.save("test"); broker.close(); } }
[ "44194462@qq.com" ]
44194462@qq.com
6ec28ee96212726da002aa6d53ae9f00388a58c0
bbc8c46216e84a351300688bbeb7e31432f40313
/src/main/java/org/smart4j/framework/ConfigConstant.java
96ae347059a0b9189b3cfeba303d23addbdc8d04
[]
no_license
xiaodaguan/smart-framework
ae1410e70b9cbe01b0c89a31d29e30b305cd76dc
c62024f4166954a76aa25a26e7fd291538e73873
refs/heads/master
2022-11-30T02:03:14.197006
2021-08-17T02:56:49
2021-08-17T02:56:49
92,155,117
0
0
null
2022-11-16T04:49:52
2017-05-23T09:33:50
Java
UTF-8
Java
false
false
575
java
package org.smart4j.framework; /** * Created by guanxiaoda on 17/5/23. */ public interface ConfigConstant { String CONFIG_FILE = "smart.properties"; String JDBC_DRIVER = "smart.framework.jdbc.driver"; String JDBC_URL = "smart.framework.jdbc.url"; String JDBC_USERNAME = "smart.framework.jdbc.username"; String JDBC_PASSWORD = "smart.framework.jdbc.password"; String APP_BASE_PACKAGE = "smart.framework.app.base_package"; String APP_JSP_PATH = "smart.framework.app.jsp_path"; String APP_ASSET_PATH = "smart.framework.app.asset_path"; }
[ "xiaodaguan@gmail.com" ]
xiaodaguan@gmail.com
c7b9288742b9ff68563882947348be8d8674d7e1
2ca75fb712bb2480f467f6ec006ad5d5bbb5060d
/src/main/java/org/speed/big/company/service/service/workflow/WFProcessMovementService.java
7aa5fc9e37a5f9785ef4721586e2845c0ff92909
[]
no_license
dimaSkalora/ServiceCompanyBigSpeed
65d8452b5a2fb93ea73ba8623678e80d88ea1760
ee3cca590b6b493c3a1642d7516ccf14b87472e1
refs/heads/master
2023-05-12T22:47:35.214313
2021-06-09T09:17:51
2021-06-09T09:17:51
296,227,024
0
0
null
null
null
null
UTF-8
Java
false
false
1,195
java
package org.speed.big.company.service.service.workflow; import org.speed.big.company.service.model.workflow.WFProcessMovement; import org.speed.big.company.service.util.exception.NotFoundException; import java.util.List; public interface WFProcessMovementService { WFProcessMovement create(WFProcessMovement wfProcessMovement); WFProcessMovement update(WFProcessMovement wfProcessMovement)throws NotFoundException;//NotFoundException - Об'экт не обнаружен WFProcessMovement get(int id)throws NotFoundException; boolean delete(int id)throws NotFoundException; List<WFProcessMovement> getAll(); List<WFProcessMovement> filter(WFProcessMovement wfProcessMovement); List<WFProcessMovement> filter(WFProcessMovement wfProcessMovement, String sqlCondition); List<WFProcessMovement> getListWFProcessMovement(int roleId, int wfServiceId, int processStatus, boolean isCompleted, boolean isLast); List<WFProcessMovement> getListWFPMByProcessAndBaseProcess(int wfProcessId, int wfBaseProcessId); int currentStateIdOfWFProcessMovementById(int id); int currentStateIdOfWFProcessMovement(int wfPackageId, int wfProcessId, int wfBaseProcessId); }
[ "timon2@ukr.net" ]
timon2@ukr.net
a4c5638bfee52f0fdedf90a969fcc5cf84a58513
18ecbf7653c8d762fe343fa26d6c44408620c7ea
/c-bbs/src/main/java/cn/js/fan/module/cms/SoftwareFileMgr.java
da16c483315995668233e5dbc3b5a16a9758e2f7
[]
no_license
cloudwebsoft/ywoa
7ef667de489006a71f697f962a0bac2aa1eec57d
9aee0a5a206e8f5448ba70e14ec429470ba524d7
refs/heads/oa_git6.0
2022-07-28T21:17:06.523669
2021-07-15T00:16:12
2021-07-15T00:16:12
181,577,992
33
10
null
2021-06-15T13:44:46
2019-04-15T23:07:47
Java
UTF-8
Java
false
false
5,621
java
package cn.js.fan.module.cms; import cn.js.fan.util.ErrMsgException; import javax.servlet.http.HttpServletRequest; import java.io.IOException; import cn.js.fan.web.Global; import javax.servlet.ServletContext; import com.redmoon.kit.util.FileUpload; import com.cloudwebsoft.framework.util.LogUtil; import java.util.Vector; import java.util.Iterator; import com.redmoon.kit.util.FileInfo; import com.cloudwebsoft.framework.db.JdbcTemplate; import cn.js.fan.util.ResKeyException; import cn.js.fan.util.StrUtil; import java.io.File; import java.util.Calendar; import cn.js.fan.module.pvg.Privilege; import cn.js.fan.util.ParamUtil; /** * <p>Title: </p> * * <p>Description: </p> * * <p>Copyright: Copyright (c) 2005</p> * * <p>Company: </p> * * @author not attributable * @version 1.0 */ public class SoftwareFileMgr { public FileUpload fileUpload; public SoftwareFileMgr() { } public SoftwareFileDb getSoftwareFileDb(long id) { SoftwareFileDb isfd = new SoftwareFileDb(); return isfd.getSoftwareFileDb(id); } public void create() { } public FileUpload doUpload(ServletContext application, HttpServletRequest request) throws ErrMsgException { fileUpload = new FileUpload(); fileUpload.setMaxFileSize(Global.FileSize); // 每个文件最大30000K 即近300M Config cfg = new Config(); String ext_software = cfg.getProperty("cms.ext_software"); String[] ext = StrUtil.split(ext_software, ","); fileUpload.setValidExtname(ext); int ret = 0; try { ret = fileUpload.doUpload(application, request); if (ret == -3) { throw new ErrMsgException(fileUpload.getErrMessage(request)); } if (ret == -4) { throw new ErrMsgException(fileUpload.getErrMessage(request)); } } catch (IOException e) { LogUtil.getLog(getClass()).error("doUpload:" + e.getMessage()); } return fileUpload; } public boolean create(ServletContext application, HttpServletRequest request) throws ErrMsgException { doUpload(application, request); if (fileUpload.getRet() == FileUpload.RET_SUCCESS) { Calendar cal = Calendar.getInstance(); String year = "" + (cal.get(cal.YEAR)); String month = "" + (cal.get(cal.MONTH) + 1); cn.js.fan.module.cms.Config cfg = new cn.js.fan.module.cms.Config(); String visualPath = cfg.getProperty("cms.file_software") + "/" + year + "/" + month; String tempAttachFilePath = Global.getRealPath() + visualPath + "/"; fileUpload.setSavePath(tempAttachFilePath); //取得目录 File f = new File(tempAttachFilePath); if (!f.isDirectory()) { f.mkdirs(); } fileUpload.writeFile(true); String dirCode = fileUpload.getFieldValue("dirCode"); Vector v = fileUpload.getFiles(); Iterator ir = v.iterator(); while (ir.hasNext()) { FileInfo fi = (FileInfo)ir.next(); fi.getSize(); try { SoftwareFileDb isfd = new SoftwareFileDb(); isfd.setDirCode(dirCode); isfd.setExt(fi.getExt()); isfd.setSize(fi.getSize()); isfd.setDiskName(fi.getDiskName()); isfd.setVisualPath(visualPath); isfd.setName(fi.getName()); isfd.create(new JdbcTemplate()); } catch (ResKeyException e) { throw new ErrMsgException(e.getMessage(request)); } } return true; } else return false; } /** * 将文件彻底删除或者删至回收站 * @param request HttpServletRequest * @param id int * @param privilege IPrivilege * @return boolean * @throws ErrMsgException */ public boolean del(HttpServletRequest request, long id) throws ErrMsgException { SoftwareFileDb doc = new SoftwareFileDb(); doc = getSoftwareFileDb(id); if (doc == null || !doc.isLoaded()) { throw new ErrMsgException("文件未找到!"); } boolean re = false; re = doc.del(new JdbcTemplate()); return re; } public boolean delBatch(HttpServletRequest request) throws ErrMsgException { String strids = ParamUtil.get(request, "ids"); String[] ids = StrUtil.split(strids, ","); if (ids==null) return false; int len = ids.length; boolean re = false; for (int i=0; i<len; i++) { re = del(request, Long.parseLong(ids[i])); } return re; } public boolean rename(HttpServletRequest request) throws ErrMsgException { long id = ParamUtil.getLong(request, "id"); String name = ParamUtil.get(request, "name"); if (name.equals("")) throw new ErrMsgException("名称不能为空!"); SoftwareFileDb doc = new SoftwareFileDb(); doc = getSoftwareFileDb(id); if (doc == null || !doc.isLoaded()) { throw new ErrMsgException("文件未找到!"); } boolean re = false; doc.setName(name); re = doc.save(new JdbcTemplate()); return re; } }
[ "bestfeng@163.com" ]
bestfeng@163.com
a71355cfb46a7ab4e417d51c8b14c67bce479051
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/Hadoop/2095_1.java
83c939d06b27eeac6ff1140a7a6b0e57cac3883c
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
2,600
java
//,temp,TestContainerLauncherImpl.java,216,275,temp,TestContainerLauncherImpl.java,155,214 //,3 public class xxx { @Test(timeout = 5000) public void testOutOfOrder() throws Exception { LOG.info("STARTING testOutOfOrder"); AppContext mockContext = mock(AppContext.class); @SuppressWarnings("rawtypes") EventHandler mockEventHandler = mock(EventHandler.class); when(mockContext.getEventHandler()).thenReturn(mockEventHandler); ContainerManagementProtocolClient mockCM = mock(ContainerManagementProtocolClient.class); ContainerLauncherImplUnderTest ut = new ContainerLauncherImplUnderTest(mockContext, mockCM); Configuration conf = new Configuration(); ut.init(conf); ut.start(); try { ContainerId contId = makeContainerId(0l, 0, 0, 1); TaskAttemptId taskAttemptId = makeTaskAttemptId(0l, 0, 0, TaskType.MAP, 0); String cmAddress = "127.0.0.1:8000"; StartContainersResponse startResp = recordFactory.newRecordInstance(StartContainersResponse.class); startResp.setAllServicesMetaData(serviceResponse); LOG.info("inserting cleanup event"); ContainerLauncherEvent mockCleanupEvent = mock(ContainerLauncherEvent.class); when(mockCleanupEvent.getType()) .thenReturn(EventType.CONTAINER_REMOTE_CLEANUP); when(mockCleanupEvent.getContainerID()) .thenReturn(contId); when(mockCleanupEvent.getTaskAttemptID()).thenReturn(taskAttemptId); when(mockCleanupEvent.getContainerMgrAddress()).thenReturn(cmAddress); ut.handle(mockCleanupEvent); ut.waitForPoolToIdle(); verify(mockCM, never()).stopContainers(any(StopContainersRequest.class)); LOG.info("inserting launch event"); ContainerRemoteLaunchEvent mockLaunchEvent = mock(ContainerRemoteLaunchEvent.class); when(mockLaunchEvent.getType()) .thenReturn(EventType.CONTAINER_REMOTE_LAUNCH); when(mockLaunchEvent.getContainerID()) .thenReturn(contId); when(mockLaunchEvent.getTaskAttemptID()).thenReturn(taskAttemptId); when(mockLaunchEvent.getContainerMgrAddress()).thenReturn(cmAddress); when(mockCM.startContainers(any(StartContainersRequest.class))).thenReturn(startResp); when(mockLaunchEvent.getContainerToken()).thenReturn( createNewContainerToken(contId, cmAddress)); ut.handle(mockLaunchEvent); ut.waitForPoolToIdle(); verify(mockCM, never()).startContainers(any(StartContainersRequest.class)); } finally { ut.stop(); } } };
[ "sgholami@uwaterloo.ca" ]
sgholami@uwaterloo.ca
4e91aefc2a19a60a42da80df203392269278d482
41a72b70dc53566fef188a8c8d3148b57364551a
/src/leetcode/algorithms/LargestRectangleArea.java
ba004d3de26c9221d76045a9425b991d374195d9
[]
no_license
aaditya1111/leetcode
ca248cc4d6f69d5b11ecec52be3753562ef2fee3
bfc0be8b0e6035943dce21a11e5b2161df9f6bde
refs/heads/master
2021-06-12T20:33:23.101127
2020-04-09T01:20:33
2020-04-09T01:20:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,146
java
package leetcode.algorithms; /** * Description: 84. Largest Rectangle in Histogram * * @author Baltan * @date 2019-09-29 09:08 */ public class LargestRectangleArea { public static void main(String[] args) { int[] heights1 = {2, 1, 5, 6, 2, 3}; System.out.println(largestRectangleArea(heights1)); int[] heights2 = {5}; System.out.println(largestRectangleArea(heights2)); int[] heights3 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; System.out.println(largestRectangleArea(heights3)); } public static int largestRectangleArea(int[] heights) { int result = 0; int count = heights.length; /** * 逐一判断每两个柱子间的矩形面积 */ for (int i = 0; i < count; i++) { /** * 保存两个柱子间的最短的矩形高度 */ int minHeight = heights[i]; for (int j = i; j < count; j++) { minHeight = Math.min(minHeight, heights[j]); result = Math.max(result, (j - i + 1) * minHeight); } } return result; } }
[ "617640006@qq.com" ]
617640006@qq.com
fcce4ec824e7900ef67c1e3051f3562ed94af8de
ee99c44457879e56bdfdb9004072bd088aa85b15
/live-domain/src/main/java/cn/idongjia/live/restructure/domain/entity/zoo/LiveZoo.java
05c8fc3506a6fe145eb29c527aeec9b23fec8dc8
[]
no_license
maikezhang/maike_live
b91328b8694877f3a2a8132dcdd43c130b66e632
a16be995e4e3f8627a6168d348f8fefd1a205cb3
refs/heads/master
2020-04-07T15:10:52.210492
2018-11-21T03:21:18
2018-11-21T03:21:18
158,475,020
0
0
null
null
null
null
UTF-8
Java
false
false
673
java
package cn.idongjia.live.restructure.domain.entity.zoo; import cn.idongjia.zoo.pojo.Zoo; import lombok.Getter; import lombok.Setter; /** * @author lc * @create at 2018/6/7. */ @Getter @Setter public class LiveZoo { private Long zid; private Long uid; //聊天室管理员 private Integer zrc; //聊天室随机数 private String name; private Long createTime; private ZooCount zooCount; public LiveZoo(Zoo zoo, ZooCount zooCount) { zid = zoo.getZid(); uid = zoo.getUid(); zrc = zoo.getZrc(); name = zoo.getName(); createTime = zoo.getCreatetm(); this.zooCount = zooCount; } }
[ "zhangyingjie@idongjia.cn" ]
zhangyingjie@idongjia.cn
0f3ffb7676c6d1c453f53a4f0e61cf5b4490dad8
eb2c22492d4740a3eb455f2a898f6b3bc8235809
/jnnsBank/ws-service/src/main/java/com/ideatech/ams/ws/api/service/DefaultSelectPwdServiceImpl.java
bedec07ecfdd0809778a553be048535c543e1263
[]
no_license
deepexpert-gaohz/sa-d
72a2d0cbfe95252d2a62f6247e7732c883049459
2d14275071b3d562447d24bd44d3a53f5a96fb71
refs/heads/master
2023-03-10T08:39:15.544657
2021-02-24T02:17:58
2021-02-24T02:17:58
341,395,351
1
0
null
null
null
null
UTF-8
Java
false
false
6,303
java
package com.ideatech.ams.ws.api.service; import com.ideatech.ams.account.dto.AccountsAllInfo; import com.ideatech.ams.account.enums.CompanyAcctType; import com.ideatech.ams.account.service.AccountsAllService; import com.ideatech.ams.account.service.bill.AllBillsPublicService; import com.ideatech.ams.pbc.dto.auth.LoginAuth; import com.ideatech.ams.pbc.service.PbcMockService; import com.ideatech.ams.pbc.service.ams.cancel.AmsSelectPwdResetService; import com.ideatech.ams.pbc.spi.AmsMainService; import com.ideatech.ams.system.org.dto.OrganizationDto; import com.ideatech.ams.system.org.service.OrganRegisterService; import com.ideatech.ams.system.org.service.OrganizationService; import com.ideatech.ams.system.pbc.dto.PbcAccountDto; import com.ideatech.ams.system.pbc.enums.EAccountType; import com.ideatech.ams.system.pbc.service.PbcAccountService; import com.ideatech.ams.ws.enums.ResultCode; import com.ideatech.common.dto.ResultDto; import com.ideatech.common.dto.ResultDtoFactory; import com.ideatech.common.enums.EErrorCode; import com.ideatech.common.exception.BaseException; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service @Slf4j public class DefaultSelectPwdServiceImpl implements DefaultSelectPwdService { @Autowired private AmsSelectPwdResetService amsSelectPwdResetService; @Autowired private AccountsAllService accountsAllService; @Autowired private PbcAccountService pbcAccountService; @Autowired private AmsMainService amsMainService; @Autowired private AllBillsPublicService allBillsPublicService; @Autowired private PbcMockService pbcMockService; @Autowired private OrganRegisterService organRegisterService; @Autowired private OrganizationService organizationService; @Override public ResultDto resetSelectPwd(String accountKey, String selectPwd, String organCode){ try { // String[] data = selectPwdService.resetSelectPwd(accountKey,selectPwd); String[] arry = new String[2]; if(StringUtils.isBlank(accountKey)){ throw new BaseException(EErrorCode.PBC_QUERY_ERROR, "基本开户许可证号不能为空"); } else if (!accountKey.substring(0, 1).equalsIgnoreCase("J")) { throw new BaseException(EErrorCode.PBC_QUERY_ERROR, "开户许可证不正确,应以J开头"); } else if (accountKey.length() != 14) { throw new BaseException(EErrorCode.PBC_QUERY_ERROR, "开户许可证长度不正确,应14位"); } if(StringUtils.isBlank(selectPwd)){ throw new BaseException(EErrorCode.PBC_QUERY_ERROR, "新查询密码不能为空"); } if(StringUtils.isBlank(organCode)){ throw new BaseException(EErrorCode.PBC_QUERY_ERROR, "行内机构号不能为空"); } OrganizationDto organ = organizationService.findByCode(organCode); if(organ == null){ throw new BaseException(EErrorCode.PBC_QUERY_ERROR, "机构号对应机构不存在"); } boolean isture = organRegisterService.getOrganRegisterFlagByBankCode(organ.getPbcCode()); if (!isture){ throw new BaseException(EErrorCode.PBC_QUERY_ERROR, "当前登录用户所在机构不是取消核准机构,请确认后重试"); } try { PbcAccountDto pbcAccountDto = pbcAccountService.getPbcAccountByOrganFullIdByCancelHeZhun(organ.getFullId(), EAccountType.AMS); if (pbcAccountDto == null) { throw new BaseException(EErrorCode.PBC_QUERY_ERROR, "该机构未配置人行用户名密码或用户名密码不正确"); } //登录挡板开启,默认返回成功 if (pbcMockService.isLoginMockOpen()) { log.info("登录挡板开启,默认重置成功"); }else{ LoginAuth auth = amsMainService.amsLogin(allBillsPublicService.systemPbcUser2PbcUser(pbcAccountDto)); String[] res = amsSelectPwdResetService.resetSelectPwd(auth,accountKey,selectPwd); if (ArrayUtils.isNotEmpty(res)) { if(StringUtils.isBlank(res[0])){ log.info("密码重置失败,未知异常,请联系管理员"); throw new BaseException(EErrorCode.PBC_QUERY_ERROR, "密码重置失败,未知异常,请联系管理员"); } } } List<AccountsAllInfo> infos = accountsAllService.findByAccountKey(accountKey,CompanyAcctType.jiben); arry[1]=selectPwd; if(CollectionUtils.isNotEmpty(infos)){ for (AccountsAllInfo info : infos) { if(StringUtils.isNotBlank(info.getAcctName())){ arry[0] = info.getAcctName(); }else{ arry[0]=accountKey; } log.info("更新数据库查询密码"); info.setSelectPwd(selectPwd); accountsAllService.save(info); } }else{ //存款人名称 arry[0]=accountKey; } }catch (Exception e) { log.error("密码重置失败,失败信息:", e); if (e.getMessage().contains("Connection timed out")) { throw new BaseException(EErrorCode.PBC_QUERY_ERROR, "网络不通"); } else { throw new BaseException(EErrorCode.PBC_QUERY_ERROR, e.getMessage()); } } return ResultDtoFactory.toApiSuccess(arry); }catch (Exception e){ return ResultDtoFactory.toApiError(ResultCode.ORGAN_NOT_CONFIG_SYNC_USER.code(), e.getMessage()); } } }
[ "807661486@qq.com" ]
807661486@qq.com
ccefcf0e77fe69b5774deeba66471bc08c7fcc6c
fcce69348d7fb592ec2bea01d569500dfc57c6c2
/doc/Java-Code/CIM_Ecore_metamodel/src/ServicePIM/validation/CreateHypermediaPIMFunctionValidator.java
c897998aa6cba30b2afe91d12a3055d37c80905b
[]
no_license
s-case/mde
7cc0fe188e7cfd93f943976135966ef3f6fc42ec
2b0c044788167a6a30f434821d24c2042d7d5bfc
refs/heads/master
2020-04-03T20:21:36.087969
2016-12-09T23:44:21
2016-12-09T23:44:21
29,291,911
0
1
null
null
null
null
UTF-8
Java
false
false
663
java
/** * * $Id$ */ package ServicePIM.validation; import ServicePIM.HypermediaLink; import org.eclipse.emf.common.util.EList; /** * A sample validator interface for {@link ServicePIM.CreateHypermediaPIMFunction}. * This doesn't really do anything, and it's not a real EMF artifact. * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. */ public interface CreateHypermediaPIMFunctionValidator { boolean validate(); boolean validateHasHypermediaLink(EList<HypermediaLink> value); }
[ "christopherzolotas@gmail.com" ]
christopherzolotas@gmail.com
9b992949b0351dfbd522290ee6b0c74daf6fe771
58da62dfc6e145a3c836a6be8ee11e4b69ff1878
/src/main/java/com/alipay/api/domain/ContentExtensionForOpenapi.java
628887202c5702e2438ed386d672a7e6f2e4e593
[ "Apache-2.0" ]
permissive
zhoujiangzi/alipay-sdk-java-all
00ef60ed9501c74d337eb582cdc9606159a49837
560d30b6817a590fd9d2c53c3cecac0dca4449b3
refs/heads/master
2022-12-26T00:27:31.553428
2020-09-07T03:39:05
2020-09-07T03:39:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
972
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 拓展内容model * * @author auto create * @since 1.0, 2019-03-08 11:47:14 */ public class ContentExtensionForOpenapi extends AlipayObject { private static final long serialVersionUID = 7568116175479365565L; /** * 扩展信息正文,新建内容的扩展信息存入这个字段。 */ @ApiField("extension") private String extension; /** * 扩展类型,新建内容的扩展类型。RICH_TEXT,代表富文本。 */ @ApiField("extension_type") private String extensionType; public String getExtension() { return this.extension; } public void setExtension(String extension) { this.extension = extension; } public String getExtensionType() { return this.extensionType; } public void setExtensionType(String extensionType) { this.extensionType = extensionType; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
8391679814b028b55da3120ddc2b104d9f362029
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mobileqqi/classes.jar/oicq/wlogin_sdk/b/ck.java
cac1de3d716c9ba60c2f84b9a4528abe8199ceda
[]
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
2,241
java
package oicq.wlogin_sdk.b; import oicq.wlogin_sdk.tools.cryptor; import oicq.wlogin_sdk.tools.util; public class ck extends a { int h = 1; int i = 0; public ck() { this.g = 1024; } public byte[] a(byte[] paramArrayOfByte1, long paramLong1, byte[] paramArrayOfByte2, byte[] paramArrayOfByte3, long paramLong2, long paramLong3, byte[] paramArrayOfByte4) { byte[] arrayOfByte = paramArrayOfByte1; if (paramArrayOfByte1 == null) { arrayOfByte = new byte[16]; } paramArrayOfByte1 = paramArrayOfByte2; if (paramArrayOfByte2 == null) { paramArrayOfByte1 = new byte[16]; } paramArrayOfByte2 = paramArrayOfByte3; if (paramArrayOfByte3 == null) { paramArrayOfByte2 = new byte[16]; } paramArrayOfByte3 = paramArrayOfByte4; if (paramArrayOfByte4 == null) { paramArrayOfByte3 = new byte[8]; } this.i = (paramArrayOfByte1.length + 10 + paramArrayOfByte2.length + 4 + 4 + 4 + paramArrayOfByte3.length); paramArrayOfByte4 = new byte[this.i]; util.int16_to_buf(paramArrayOfByte4, 0, this.h); util.int64_to_buf(paramArrayOfByte4, 2, paramLong1); System.arraycopy(paramArrayOfByte1, 0, paramArrayOfByte4, 10, paramArrayOfByte1.length); int j = paramArrayOfByte1.length + 10; System.arraycopy(paramArrayOfByte2, 0, paramArrayOfByte4, j, paramArrayOfByte2.length); j += paramArrayOfByte2.length; util.int32_to_buf(paramArrayOfByte4, j, (int)paramLong2); j += 4; util.int32_to_buf(paramArrayOfByte4, j, (int)paramLong3); j += 4; util.int64_to_buf32(paramArrayOfByte4, j, util.get_server_cur_time()); j += 4; System.arraycopy(paramArrayOfByte3, 0, paramArrayOfByte4, j, paramArrayOfByte3.length); j = paramArrayOfByte3.length; paramArrayOfByte1 = cryptor.encrypt(paramArrayOfByte4, 0, paramArrayOfByte4.length, arrayOfByte); this.i = paramArrayOfByte1.length; a(this.g); b(paramArrayOfByte1, paramArrayOfByte1.length); d(); return a(); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mobileqqi\classes.jar * Qualified Name: oicq.wlogin_sdk.b.ck * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
e91513bac6560ecf806152a7d2bae4f142eef412
3d4349c88a96505992277c56311e73243130c290
/Preparation/processed-dataset/god-class_4_861/37.java
3f18ce97c21e62a125f1a226686b7858ed7e6676
[]
no_license
D-a-r-e-k/Code-Smells-Detection
5270233badf3fb8c2d6034ac4d780e9ce7a8276e
079a02e5037d909114613aedceba1d5dea81c65d
refs/heads/master
2020-05-20T00:03:08.191102
2019-05-15T11:51:51
2019-05-15T11:51:51
185,272,690
7
4
null
null
null
null
UTF-8
Java
false
false
138
java
/** * @return Returns the paymentBusinessDays. */ public HolidayCalendar getPaymentBusinessDays() { return paymentBusinessDays; }
[ "dariusb@unifysquare.com" ]
dariusb@unifysquare.com
c99e806939b53fba85c1888f6513d154e3deeda5
01b23223426a1eb84d4f875e1a6f76857d5e8cd9
/icefaces3/scratchpads/ice-7951/icefaces/ace/component/src/org/icefaces/apache/commons/fileupload/servlet/ServletRequestContext.java
10fa09dcc46063c3588ca212f398c7bd6a51ef90
[ "Apache-2.0" ]
permissive
numbnet/icesoft
8416ac7e5501d45791a8cd7806c2ae17305cdbb9
2f7106b27a2b3109d73faf85d873ad922774aeae
refs/heads/master
2021-01-11T04:56:52.145182
2016-11-04T16:43:45
2016-11-04T16:43:45
72,894,498
0
0
null
null
null
null
UTF-8
Java
false
false
3,219
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 andd * limitations under the License. */ package org.icefaces.apache.commons.fileupload.servlet; import java.io.InputStream; import java.io.IOException; import javax.servlet.http.HttpServletRequest; import org.icefaces.apache.commons.fileupload.RequestContext; /** * <p>Provides access to the request information needed for a request made to * an HTTP servlet.</p> * * @author <a href="mailto:martinc@apache.org">Martin Cooper</a> * * @since FileUpload 1.1 * * @version $Id: ServletRequestContext.java 479262 2006-11-26 03:09:24Z niallp $ */ public class ServletRequestContext implements RequestContext { // ----------------------------------------------------- Instance Variables /** * The request for which the context is being provided. */ private HttpServletRequest request; // ----------------------------------------------------------- Constructors /** * Construct a context for this request. * * @param request The request to which this context applies. */ public ServletRequestContext(HttpServletRequest request) { this.request = request; } // --------------------------------------------------------- Public Methods /** * Retrieve the character encoding for the request. * * @return The character encoding for the request. */ public String getCharacterEncoding() { return request.getCharacterEncoding(); } /** * Retrieve the content type of the request. * * @return The content type of the request. */ public String getContentType() { return request.getContentType(); } /** * Retrieve the content length of the request. * * @return The content length of the request. */ public int getContentLength() { return request.getContentLength(); } /** * Retrieve the input stream for the request. * * @return The input stream for the request. * * @throws IOException if a problem occurs. */ public InputStream getInputStream() throws IOException { return request.getInputStream(); } /** * Returns a string representation of this object. * * @return a string representation of this object. */ public String toString() { return "ContentLength=" + this.getContentLength() + ", ContentType=" + this.getContentType(); } }
[ "ted.goddard@8668f098-c06c-11db-ba21-f49e70c34f74" ]
ted.goddard@8668f098-c06c-11db-ba21-f49e70c34f74
30c7fe9a6817a347ef01c8f4854ce74bd5f3f0d5
20591524b55c1ce671fd325cbe41bd9958fc6bbd
/service-provider/src/main/java/com/rongdu/loans/common/TripartitePromotionConfig.java
29cab459ca0fdc0a67a0dedfa2dff85cba3484ba
[]
no_license
ybak/loans-suniu
7659387eab42612fce7c0fa80181f2a2106db6e1
b8ab9bfa5ad8be38dc42c0e02b73179b11a491d5
refs/heads/master
2021-03-24T01:00:17.702884
2019-09-25T15:28:35
2019-09-25T15:28:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,871
java
package com.rongdu.loans.common; import java.math.BigDecimal; import com.rongdu.common.config.Global; import com.rongdu.loans.enums.ChannelEnum; import com.rongdu.loans.enums.LoanProductEnum; import com.rongdu.loans.enums.RepayMethodEnum; import com.rongdu.loans.loan.option.PromotionCaseOP; /** * @Title: TripartitePromotionConfig.java * @Package com.rongdu.loans.common * @Description: 三方营销产品配置 * @author: yuanxianchu * @date 2018年10月31日 * @version V1.0 */ public class TripartitePromotionConfig { public static PromotionCaseOP getPromotionCase(String flag) { PromotionCaseOP promotionCaseOP = new PromotionCaseOP(); switch (flag) { case "3": promotionCaseOP.setApplyAmt(new BigDecimal("2000.00")); promotionCaseOP.setApplyTerm(Global.XJD_AUTO_FQ_DAY_28); promotionCaseOP.setProductId(LoanProductEnum.JDQ.getId()); promotionCaseOP.setRepayMethod(RepayMethodEnum.PRINCIPAL_INTEREST_DAY.getValue()); promotionCaseOP.setRepayFreq("D"); promotionCaseOP.setRepayUnit(7); promotionCaseOP.setTerm(4); break; case "4": promotionCaseOP.setApplyAmt(new BigDecimal("1500.00")); promotionCaseOP.setApplyTerm(Global.XJD_DQ_DAY_8); promotionCaseOP.setProductId(LoanProductEnum.JN.getId()); promotionCaseOP.setRepayMethod(RepayMethodEnum.PRINCIPAL_INTEREST_DAY.getValue()); promotionCaseOP.setRepayFreq("D"); promotionCaseOP.setRepayUnit(15); promotionCaseOP.setTerm(1); break; case "5": promotionCaseOP.setApplyAmt(new BigDecimal("2000.00")); promotionCaseOP.setApplyTerm(Global.XJD_DQ_DAY_8); promotionCaseOP.setProductId(LoanProductEnum.JN2.getId()); promotionCaseOP.setRepayMethod(RepayMethodEnum.PRINCIPAL_INTEREST_DAY.getValue()); promotionCaseOP.setRepayFreq("D"); promotionCaseOP.setRepayUnit(15); promotionCaseOP.setTerm(1); break; case "6": promotionCaseOP.setApplyAmt(new BigDecimal("2500.00")); promotionCaseOP.setApplyTerm(Global.XJD_AUTO_FQ_DAY_28); promotionCaseOP.setProductId(LoanProductEnum.JNFQ.getId()); promotionCaseOP.setRepayMethod(RepayMethodEnum.PRINCIPAL_INTEREST_DAY.getValue()); promotionCaseOP.setRepayFreq("D"); promotionCaseOP.setRepayUnit(7); promotionCaseOP.setTerm(4); break; default: promotionCaseOP = getPromotionCase("3"); break; } return promotionCaseOP; } }
[ "tiramisuy18@163.com" ]
tiramisuy18@163.com
ab3c828390aa9506299a3fe90b679d4e52f297ca
6d7ef0496b677dd53455751acc230f9eb6a4b823
/src/main/java/com/xnjr/mall/api/impl/XN808028.java
276e08b564095d93084e31e49b65b109a85d7f66
[]
no_license
13110992819/std-mall
a3b8d49283d4645460e1339b0b8ce1ccf9a55cc1
77decf349c83a1822bd19819bba518c948cd28ef
refs/heads/master
2020-03-08T20:32:37.635335
2017-09-14T15:35:06
2017-09-14T15:35:06
128,384,632
0
0
null
null
null
null
UTF-8
Java
false
false
2,207
java
/** * @Title XN601001.java * @Package com.xnjr.mall.api.impl * @Description * @author haiqingzheng * @date 2016年5月17日 上午9:06:30 * @version V1.0 */ package com.xnjr.mall.api.impl; import org.apache.commons.lang3.StringUtils; import com.xnjr.mall.ao.IProductAO; import com.xnjr.mall.api.AProcessor; import com.xnjr.mall.common.JsonUtil; import com.xnjr.mall.core.StringValidater; import com.xnjr.mall.domain.Product; import com.xnjr.mall.dto.req.XN808028Req; import com.xnjr.mall.exception.BizException; import com.xnjr.mall.exception.ParaException; import com.xnjr.mall.spring.SpringContextHolder; /** * 分页查询产品 * @author: haiqingzheng * @since: 2016年5月17日 上午9:06:30 * @history: */ public class XN808028 extends AProcessor { private IProductAO productAO = SpringContextHolder .getBean(IProductAO.class); private XN808028Req req = null; /** * @see com.xnjr.mall.api.IProcessor#doBusiness() */ @Override public Object doBusiness() throws BizException { Product condition = new Product(); condition.setCategory(req.getCategory()); condition.setType(req.getType()); condition.setName(req.getName()); condition.setStatus(req.getStatus()); condition.setLocation(req.getLocation()); condition.setSystemCode(req.getSystemCode()); String orderColumn = req.getOrderColumn(); if (StringUtils.isBlank(orderColumn)) { orderColumn = IProductAO.DEFAULT_ORDER_COLUMN; } condition.setOrder(orderColumn, req.getOrderDir()); int start = StringValidater.toInteger(req.getStart()); int limit = StringValidater.toInteger(req.getLimit()); return productAO.queryProductPage(start, limit, condition, req.getUserId()); } /** * @see com.xnjr.mall.api.IProcessor#doCheck(java.lang.String) */ @Override public void doCheck(String inputparams) throws ParaException { req = JsonUtil.json2Bean(inputparams, XN808028Req.class); StringValidater.validateBlank(req.getStart(), req.getLimit()); StringValidater.validateBlank(req.getSystemCode()); } }
[ "pyez1158@163.com" ]
pyez1158@163.com
60e816b9d7bec2c1e64089a33312ea431943000f
84a39f19ad4a4028620e305305c7b0267a6f006c
/JBotEvolver/src/taskexecutor/results/SimpleFitnessResult.java
a325edff085e177c6aa0507cf3218c6e21f4f13f
[]
no_license
ci-group/ECAL_SocialLearning
d10a1a142f503428c412714ad9355671ad45216a
ce868eea9387580ec5f3ecbae544af02661cdb03
refs/heads/master
2021-01-21T18:34:27.408393
2017-05-22T14:37:19
2017-05-22T14:37:19
92,062,304
0
0
null
null
null
null
UTF-8
Java
false
false
620
java
package taskexecutor.results; import result.Result; public class SimpleFitnessResult extends Result { private int chromosomeId; private double fitness = 0; private int secondFitness = 0; public SimpleFitnessResult(int chromosomeId, double fitness, int secondFitness) { super(); this.chromosomeId = chromosomeId; this.fitness = fitness; this.secondFitness = secondFitness; } public double getFitness() { return fitness; } public int getSecondFitness() { return secondFitness; } public int getChromosomeId() { return chromosomeId; } }
[ "jacqueline.heinerman@gmail.com" ]
jacqueline.heinerman@gmail.com
54a56fa69f9fd382cce3ca9f881c84cfdb92acb4
eb5f5353f49ee558e497e5caded1f60f32f536b5
/javax/xml/ws/Service.java
02e9beee0ad7d29b2c12edac2d91e46cabbc0e9f
[]
no_license
mohitrajvardhan17/java1.8.0_151
6fc53e15354d88b53bd248c260c954807d612118
6eeab0c0fd20be34db653f4778f8828068c50c92
refs/heads/master
2020-03-18T09:44:14.769133
2018-05-23T14:28:24
2018-05-23T14:28:24
134,578,186
0
2
null
null
null
null
UTF-8
Java
false
false
4,500
java
package javax.xml.ws; import java.net.URL; import java.util.Iterator; import java.util.concurrent.Executor; import javax.xml.bind.JAXBContext; import javax.xml.namespace.QName; import javax.xml.ws.handler.HandlerResolver; import javax.xml.ws.spi.Provider; import javax.xml.ws.spi.ServiceDelegate; public class Service { private ServiceDelegate delegate; protected Service(URL paramURL, QName paramQName) { delegate = Provider.provider().createServiceDelegate(paramURL, paramQName, getClass()); } protected Service(URL paramURL, QName paramQName, WebServiceFeature... paramVarArgs) { delegate = Provider.provider().createServiceDelegate(paramURL, paramQName, getClass(), paramVarArgs); } public <T> T getPort(QName paramQName, Class<T> paramClass) { return (T)delegate.getPort(paramQName, paramClass); } public <T> T getPort(QName paramQName, Class<T> paramClass, WebServiceFeature... paramVarArgs) { return (T)delegate.getPort(paramQName, paramClass, paramVarArgs); } public <T> T getPort(Class<T> paramClass) { return (T)delegate.getPort(paramClass); } public <T> T getPort(Class<T> paramClass, WebServiceFeature... paramVarArgs) { return (T)delegate.getPort(paramClass, paramVarArgs); } public <T> T getPort(EndpointReference paramEndpointReference, Class<T> paramClass, WebServiceFeature... paramVarArgs) { return (T)delegate.getPort(paramEndpointReference, paramClass, paramVarArgs); } public void addPort(QName paramQName, String paramString1, String paramString2) { delegate.addPort(paramQName, paramString1, paramString2); } public <T> Dispatch<T> createDispatch(QName paramQName, Class<T> paramClass, Mode paramMode) { return delegate.createDispatch(paramQName, paramClass, paramMode); } public <T> Dispatch<T> createDispatch(QName paramQName, Class<T> paramClass, Mode paramMode, WebServiceFeature... paramVarArgs) { return delegate.createDispatch(paramQName, paramClass, paramMode, paramVarArgs); } public <T> Dispatch<T> createDispatch(EndpointReference paramEndpointReference, Class<T> paramClass, Mode paramMode, WebServiceFeature... paramVarArgs) { return delegate.createDispatch(paramEndpointReference, paramClass, paramMode, paramVarArgs); } public Dispatch<Object> createDispatch(QName paramQName, JAXBContext paramJAXBContext, Mode paramMode) { return delegate.createDispatch(paramQName, paramJAXBContext, paramMode); } public Dispatch<Object> createDispatch(QName paramQName, JAXBContext paramJAXBContext, Mode paramMode, WebServiceFeature... paramVarArgs) { return delegate.createDispatch(paramQName, paramJAXBContext, paramMode, paramVarArgs); } public Dispatch<Object> createDispatch(EndpointReference paramEndpointReference, JAXBContext paramJAXBContext, Mode paramMode, WebServiceFeature... paramVarArgs) { return delegate.createDispatch(paramEndpointReference, paramJAXBContext, paramMode, paramVarArgs); } public QName getServiceName() { return delegate.getServiceName(); } public Iterator<QName> getPorts() { return delegate.getPorts(); } public URL getWSDLDocumentLocation() { return delegate.getWSDLDocumentLocation(); } public HandlerResolver getHandlerResolver() { return delegate.getHandlerResolver(); } public void setHandlerResolver(HandlerResolver paramHandlerResolver) { delegate.setHandlerResolver(paramHandlerResolver); } public Executor getExecutor() { return delegate.getExecutor(); } public void setExecutor(Executor paramExecutor) { delegate.setExecutor(paramExecutor); } public static Service create(URL paramURL, QName paramQName) { return new Service(paramURL, paramQName); } public static Service create(URL paramURL, QName paramQName, WebServiceFeature... paramVarArgs) { return new Service(paramURL, paramQName, paramVarArgs); } public static Service create(QName paramQName) { return new Service(null, paramQName); } public static Service create(QName paramQName, WebServiceFeature... paramVarArgs) { return new Service(null, paramQName, paramVarArgs); } public static enum Mode { MESSAGE, PAYLOAD; private Mode() {} } } /* Location: C:\Program Files (x86)\Java\jre1.8.0_151\lib\rt.jar!\javax\xml\ws\Service.class * Java compiler version: 8 (52.0) * JD-Core Version: 0.7.1 */
[ "mohit.rajvardhan@ericsson.com" ]
mohit.rajvardhan@ericsson.com
ce47d74e51392a1e411cbe31a0a6ec04c81cb897
161c1f4485d9f446c3b2a66312f20f1153f72576
/JavaLabAug2017/src/lesson171108/StringBuilderRaceCondition.java
cfce067e69abf5eeb2fa0c245ff3ec6c3753ddc6
[]
no_license
zstudent/JavaLabAug2017.DP
af617204ca23dd59c6eff658a78149308cf9d315
a4d271ae0ae48edc2c053ff8610517cd1acb8894
refs/heads/master
2021-08-23T02:32:38.814920
2017-12-02T15:07:25
2017-12-02T15:07:25
111,810,416
0
2
null
null
null
null
UTF-8
Java
false
false
770
java
package lesson171108; public class StringBuilderRaceCondition { public static void main(String[] args) throws InterruptedException { final StringBuilder builder = new StringBuilder(); Thread thread1 = new Thread(() -> { for (int i = 0; i < 10; i++) { builder.append('a'); pause(); } }); Thread thread2 = new Thread(() -> { for (int i = 0; i < 10; i++) { builder.append('b'); pause(); } }); thread1.start(); thread2.start(); thread1.join(); thread2.join(); String string = builder.toString(); System.out.println(string); System.out.println(string.length()); } private static void pause() { try { Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } } }
[ "Zaal_Lyanov@epam.com" ]
Zaal_Lyanov@epam.com
fb518a21b1e85f1dd6a4d28fe37e30943cb9cf04
d64f1083180622ae5aa0c6c233cf4ad6363f7e60
/dcone/src/main/java/com/dcone/dtss/HomeController.java
526c7659be3ad53d74cd5c9539dd809f3b54857c
[]
no_license
huangyongke/dcone
c7293b84f1351e4dbaa7df7d8e2c00a1726559ac
3a5693dc7eb439842b54c9400a4b916b5b528644
refs/heads/master
2021-01-15T12:02:27.599832
2017-08-23T07:24:57
2017-08-23T07:24:57
99,637,186
0
0
null
null
null
null
UTF-8
Java
false
false
1,220
java
package com.dcone.dtss; import java.text.DateFormat; import java.util.Date; import java.util.Locale; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; /** * Handles requests for the application home page. */ @Controller public class HomeController { private static final Logger logger = LoggerFactory.getLogger(HomeController.class); /** * Simply selects the home view to render by returning its name. */ @RequestMapping("/") public String home(Locale locale, Model model) { logger.info("Welcome home! The client locale is {}.", locale); Date date = new Date(); DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); String formattedDate = dateFormat.format(date); model.addAttribute("serverTime", formattedDate ); logger.info(formattedDate); return "register"; } @RequestMapping("/adminindex") public String index() { return "index4"; } @RequestMapping("/userindex") public String home() { return "index"; } }
[ "User@User-PC" ]
User@User-PC
1ca3f30b3f6b10e28942e2ed09c10e4f3ac2257c
447520f40e82a060368a0802a391697bc00be96f
/apks/malware/app66/source/com/umpay/huafubao/ui/p.java
cbaa24de428eb4ee125e84b877ed799ea0051e8f
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
496
java
package com.umpay.huafubao.ui; import android.view.View; import android.view.View.OnClickListener; import android.widget.EditText; import com.umpay.huafubao.d.a; final class p implements View.OnClickListener { p(BillingActivity paramBillingActivity) {} public final void onClick(View paramView) { paramView = BillingActivity.d(this.a).getText().toString(); if (!a.a(BillingActivity.e(this.a), paramView)) { return; } BillingActivity.c(this.a, paramView); } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
98ac394df9374c4a652ee9e9fb2d2b2d3d1be4d4
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/103_sweethome3d-com.eteks.sweethome3d.model.HomeApplication-1.0-8/com/eteks/sweethome3d/model/HomeApplication_ESTest_scaffolding.java
a12bc6a8bb9898e017e9073ce7e1dd927a1b7c9f
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
549
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Oct 26 00:12:14 GMT 2019 */ package com.eteks.sweethome3d.model; 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 HomeApplication_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
5f97ed4911180c57ece319ce194a2f9d9c6a94c7
6b3a781d420c88a3a5129638073be7d71d100106
/AdProxyPersist/src/main/java/com/ocean/persist/api/proxy/jieku/JiekuSize.java
8a4e33785bad473b652bc8979929ceef39d809dd
[]
no_license
Arthas-sketch/FrexMonitor
02302e8f7be1a68895b9179fb3b30537a6d663bd
125f61fcc92f20ce948057a9345432a85fe2b15b
refs/heads/master
2021-10-26T15:05:59.996640
2019-04-13T07:52:57
2019-04-13T07:52:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
740
java
package com.ocean.persist.api.proxy.jieku; import com.ocean.core.common.base.AbstractBaseEntity; public class JiekuSize { private static final long serialVersionUID = 1L; private Integer width;// required uint32 宽 private Integer height;// required uint32 ⾼高Field public JiekuSize() { super(); } public JiekuSize(Integer width, Integer height) { super(); this.width = width; this.height = height; } public Integer getWidth() { return width; } public void setWidth(Integer width) { this.width = width; } public Integer getHeight() { return height; } public void setHeight(Integer height) { this.height = height; } public static long getSerialversionuid() { return serialVersionUID; } }
[ "569246607@qq.com" ]
569246607@qq.com
2b87c072549823d63f606d2a110927441c5d7717
65c1b70e6d8125147e4211fbe07e7fccfab77a1b
/app/src/main/java/com/qifeng/theunderseaworld/bean/PersonalCustomerTuijianBean.java
e317dab67b9ac58dfca02bdefbb6d33ce9fd14a3
[]
no_license
WpSmile/TheUnderseaWorld
31cb786c6d6ab2d5d1a512ec63d2f8856ce46579
ac054590282ceebbac84300d2a2b541e50d4d02c
refs/heads/master
2021-01-22T17:28:46.608551
2017-03-31T09:37:29
2017-03-31T09:37:29
85,016,214
0
0
null
null
null
null
UTF-8
Java
false
false
1,353
java
package com.qifeng.theunderseaworld.bean; import java.io.Serializable; /** * Created by liu on 2017/3/22. */ public class PersonalCustomerTuijianBean implements Serializable { private int image; private String imageUrl; private String title; private String sign; private String percent; private String price; private String goods_id; public int getImage() { return image; } public void setImage(int image) { this.image = image; } public String getImageUrl() { return imageUrl; } public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getSign() { return sign; } public void setSign(String sign) { this.sign = sign; } public String getPercent() { return percent; } public void setPercent(String percent) { this.percent = percent; } public String getPrice() { return price; } public void setPrice(String price) { this.price = price; } public void setGoodsId(String goods_id) { this.goods_id = goods_id; } public String getGoodsId(){ return goods_id; } }
[ "179292126@qq.com" ]
179292126@qq.com
26cfb3d5915fafb716f639a1469d1417cba15ece
9a6ea6087367965359d644665b8d244982d1b8b6
/src/main/java/X/AnonymousClass0QX.java
f23294464b8425a6ddc36bf420e69f158c79d39a
[]
no_license
technocode/com.wa_2.21.2
a3dd842758ff54f207f1640531374d3da132b1d2
3c4b6f3c7bdef7c1523c06d5bd9a90b83acc80f9
refs/heads/master
2023-02-12T11:20:28.666116
2021-01-14T10:22:21
2021-01-14T10:22:21
329,578,591
2
1
null
null
null
null
UTF-8
Java
false
false
4,989
java
package X; import java.io.IOException; /* renamed from: X.0QX reason: invalid class name */ public final class AnonymousClass0QX extends AnonymousClass078 implements AnonymousClass077 { public static final AnonymousClass0QX A03; public static volatile AbstractC37151nd A04; public int A00; public long A01; public AnonymousClass0N3 A02; static { AnonymousClass0QX r0 = new AnonymousClass0QX(); A03 = r0; r0.A0C(); } /* JADX INFO: Can't fix incorrect switch cases order, some code will duplicate */ @Override // X.AnonymousClass078 public final Object A0H(EnumC04960Mn r15, Object obj, Object obj2) { AnonymousClass0NK r1; boolean z = false; switch (r15.ordinal()) { case 0: return A03; case 1: AbstractC05000Mr r7 = (AbstractC05000Mr) obj; AnonymousClass0QX r5 = (AnonymousClass0QX) obj2; this.A02 = (AnonymousClass0N3) r7.ARD(this.A02, r5.A02); int i = this.A00; boolean z2 = false; if ((i & 2) == 2) { z2 = true; } long j = this.A01; int i2 = r5.A00; boolean z3 = false; if ((i2 & 2) == 2) { z3 = true; } this.A01 = r7.ARC(z2, j, z3, r5.A01); if (r7 == C04980Mp.A00) { this.A00 = i | i2; } return this; case 2: C05010Mt r72 = (C05010Mt) obj; AnonymousClass1FL r52 = (AnonymousClass1FL) obj2; while (!z) { try { int A032 = r72.A03(); if (A032 != 0) { if (A032 == 10) { if ((this.A00 & 1) == 1) { r1 = (AnonymousClass0NK) this.A02.AQb(); } else { r1 = null; } AnonymousClass0N3 r0 = (AnonymousClass0N3) r72.A09(AnonymousClass0N3.A05.A0A(), r52); this.A02 = r0; if (r1 != null) { r1.A03(r0); this.A02 = (AnonymousClass0N3) r1.A00(); } this.A00 |= 1; } else if (A032 == 16) { this.A00 |= 2; this.A01 = r72.A06(); } else if (!A0G(A032, r72)) { } } z = true; } catch (C04190Jk e) { e.unfinishedMessage = this; throw new RuntimeException(e); } catch (IOException e2) { C04190Jk r12 = new C04190Jk(e2.getMessage()); r12.unfinishedMessage = this; throw new RuntimeException(r12); } } break; case 3: return null; case 4: return new AnonymousClass0QX(); case 5: return new C77293fv(); case 6: break; case 7: if (A04 == null) { synchronized (AnonymousClass0QX.class) { if (A04 == null) { A04 = new AnonymousClass275(A03); } } } return A04; default: throw new UnsupportedOperationException(); } return A03; } @Override // X.AnonymousClass076 public int A90() { int i = ((AnonymousClass078) this).A00; if (i != -1) { return i; } int i2 = 0; if ((this.A00 & 1) == 1) { AnonymousClass0N3 r0 = this.A02; if (r0 == null) { r0 = AnonymousClass0N3.A05; } i2 = 0 + AbstractC11750gu.A08(1, r0); } if ((this.A00 & 2) == 2) { i2 += AbstractC11750gu.A05(2, this.A01); } int A002 = this.unknownFields.A00() + i2; ((AnonymousClass078) this).A00 = A002; return A002; } @Override // X.AnonymousClass076 public void ARP(AbstractC11750gu r4) { if ((this.A00 & 1) == 1) { AnonymousClass0N3 r0 = this.A02; if (r0 == null) { r0 = AnonymousClass0N3.A05; } r4.A0K(1, r0); } if ((this.A00 & 2) == 2) { r4.A0I(2, this.A01); } this.unknownFields.A02(r4); } }
[ "madeinborneo@gmail.com" ]
madeinborneo@gmail.com
11104bbff20427800341675c13a3851ab9621907
745b525c360a2b15b8d73841b36c1e8d6cdc9b03
/jun_springcloud_plugin/springcloud_netflix_edgware/cloud-simple-service/src/main/java/cloud/simple/service/web/UserController.java
a600ab9481b8fa48e3c85fa771fae874207343c6
[]
no_license
wujun728/jun_java_plugin
1f3025204ef5da5ad74f8892adead7ee03f3fe4c
e031bc451c817c6d665707852308fc3b31f47cb2
refs/heads/master
2023-09-04T08:23:52.095971
2023-08-18T06:54:29
2023-08-18T06:54:29
62,047,478
117
42
null
2023-08-21T16:02:15
2016-06-27T10:23:58
Java
UTF-8
Java
false
false
639
java
package cloud.simple.service.web; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import cloud.simple.service.domain.UserService; import cloud.simple.service.model.User; @RestController public class UserController { @Autowired UserService userService; @RequestMapping(value="/user",method=RequestMethod.GET) public List<User> readUserInfo(){ List<User> ls=userService.searchAll(); return ls; } }
[ "wujun728@163.com" ]
wujun728@163.com
bdef6dffe1011bed01c1df0e2869c5274d9888ba
b1f63adf098861d640b5e6bf0d9e69a12ec8df6e
/asciidoctor-editor-plugin/src/main/java-eclipse/de/jcup/asciidoctoreditor/toolbar/OpenInExternalBrowserAction.java
eb60413fd0df0c7a49fccb6d3eb960e9333215ab
[ "Apache-2.0" ]
permissive
vogellacompany/eclipse-asciidoctor-editor
6dbc6ac578b7cbb897fdb8b6d80ef214878d07c0
f6b9c02cd69a8a4dc42b0f5c16c6fcde0a286959
refs/heads/master
2021-12-02T14:19:02.767952
2021-09-17T09:21:05
2021-09-17T09:21:05
407,466,274
0
0
NOASSERTION
2021-09-17T08:34:12
2021-09-17T08:34:11
null
UTF-8
Java
false
false
1,246
java
/* * Copyright 2016 Albert Tregnaghi * * 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 de.jcup.asciidoctoreditor.toolbar; import org.eclipse.jface.resource.ImageDescriptor; import de.jcup.asciidoctoreditor.AsciiDoctorEditor; public class OpenInExternalBrowserAction extends ToolbarAction { private static ImageDescriptor IMG_EXTERNAL_BROWSER = createToolbarImageDescriptor("external_browser.png"); public OpenInExternalBrowserAction(AsciiDoctorEditor editor) { super(editor); initUI(); } private void initUI() { setImageDescriptor(IMG_EXTERNAL_BROWSER); setToolTipText("Open asciidoctor output in external browser."); } @Override public void run() { asciiDoctorEditor.openInExternalBrowser(); } }
[ "albert.tregnaghi@gmail.com" ]
albert.tregnaghi@gmail.com
9ed83859a5dc7f1e32ac6710ce181400fb9c0c9b
c8688db388a2c5ac494447bac90d44b34fa4132c
/sources/com/google/android/datatransport/runtime/scheduling/persistence/C1637i.java
845f796722e90c700b8901d493c4a1aa95e41af7
[]
no_license
mred312/apk-source
98dacfda41848e508a0c9db2c395fec1ae33afa1
d3ca7c46cb8bf701703468ddc88f25ba4fb9d975
refs/heads/master
2023-03-06T05:53:50.863721
2021-02-23T13:34:20
2021-02-23T13:34:20
341,481,669
0
0
null
null
null
null
UTF-8
Java
false
false
1,270
java
package com.google.android.datatransport.runtime.scheduling.persistence; import android.database.Cursor; import com.google.android.datatransport.runtime.TransportContext; import com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore; import java.util.List; /* renamed from: com.google.android.datatransport.runtime.scheduling.persistence.i */ /* compiled from: SQLiteEventStore */ final /* synthetic */ class C1637i implements SQLiteEventStore.C1623b { /* renamed from: a */ private final SQLiteEventStore f7384a; /* renamed from: b */ private final List f7385b; /* renamed from: c */ private final TransportContext f7386c; private C1637i(SQLiteEventStore sQLiteEventStore, List list, TransportContext transportContext) { this.f7384a = sQLiteEventStore; this.f7385b = list; this.f7386c = transportContext; } /* renamed from: a */ public static SQLiteEventStore.C1623b m5192a(SQLiteEventStore sQLiteEventStore, List list, TransportContext transportContext) { return new C1637i(sQLiteEventStore, list, transportContext); } public Object apply(Object obj) { return SQLiteEventStore.m5148t(this.f7384a, this.f7385b, this.f7386c, (Cursor) obj); } }
[ "mred312@gmail.com" ]
mred312@gmail.com
9e64fb7d4ebea27227e1dc40f89275e521776eaf
140e5dd4d5e721958f0f0673db0adfff8d3e100b
/src/main/java/minecrafttransportsimulator/mcinterface/InterfaceGUI.java
4550ef287f6f0ae869c1cf660d110044d7d53bac
[]
no_license
helpmegetaname/MinecraftTransportSimulator
c1c210fb8f662a0d1d3cd9f236f98c27b386e731
8a83280c24e28fc44416eb86ea0bac6076c2760d
refs/heads/master
2023-08-26T20:54:33.498839
2021-10-30T01:29:08
2021-10-30T01:29:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,988
java
package minecrafttransportsimulator.mcinterface; import java.util.Arrays; import java.util.List; import org.lwjgl.opengl.GL11; import minecrafttransportsimulator.baseclasses.ColorRGB; import minecrafttransportsimulator.guis.components.AGUIBase; import minecrafttransportsimulator.guis.components.GUIComponent3DModel; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.RenderItem; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.client.util.ITooltipFlag; import net.minecraft.item.ItemStack; import net.minecraft.util.text.TextFormatting; import net.minecraftforge.fml.client.config.GuiUtils; import net.minecraftforge.fml.common.FMLCommonHandler; /**Interface for MC GUI classes. Allows access to various GUI-specific functions. * * @author don_bruce */ public class InterfaceGUI{ private static RenderItem itemRenderer; /** * Draws the item's tooltip on the GUI. This should be * the last thing that gets rendered, as otherwise it may render * behind other components. */ public static void drawItemTooltip(AGUIBase gui, int mouseX, int mouseY, ItemStack stack){ Minecraft mc = Minecraft.getMinecraft(); List<String> tooltipText = stack.getTooltip(mc.player, mc.gameSettings.advancedItemTooltips ? ITooltipFlag.TooltipFlags.ADVANCED : ITooltipFlag.TooltipFlags.NORMAL); for(int i = 0; i < tooltipText.size(); ++i){ if(i == 0){ tooltipText.set(i, tooltipText.get(i)); }else{ tooltipText.set(i, TextFormatting.GRAY + tooltipText.get(i)); } } GuiUtils.drawHoveringText(stack, tooltipText, mouseX, mouseY, mc.currentScreen.width, mc.currentScreen.height, -1, mc.fontRenderer); } /** * Draws a tooltip into the GUI. This is for things that are NOT items, so * rather than passing-in item parameters you need to pass in the lines to render. * This should be rendered at the end of the render call to prevent the odd texture * binding of this method from conflicting from other renders. */ public static void drawGenericTooltip(AGUIBase gui, int mouseX, int mouseY, String tooltip){ Minecraft mc = Minecraft.getMinecraft(); GuiUtils.drawHoveringText(Arrays.asList(new String[]{tooltip}), mouseX, mouseY, mc.currentScreen.width, mc.currentScreen.height, -1, mc.fontRenderer); } /** * Draws the specified item on the GUI at the specified scale. Note that MC * renders all items from their top-left corner, so take this into account when * choosing where to put this component in your GUI. */ public static void drawItem(ItemStack stack, int x, int y, float scale){ if(itemRenderer == null){ itemRenderer = Minecraft.getMinecraft().getRenderItem(); } if(scale != 1.0F){ GL11.glPushMatrix(); GL11.glTranslatef(x, y, 0); GL11.glScalef(scale, scale, scale); itemRenderer.renderItemAndEffectIntoGUI(stack, 0, 0); if(stack.getCount() > 1){ itemRenderer.renderItemOverlays(Minecraft.getMinecraft().fontRenderer, stack, 0, 0); } GL11.glPopMatrix(); }else{ itemRenderer.renderItemAndEffectIntoGUI(stack, x, y); if(stack.getCount() > 1){ itemRenderer.renderItemOverlays(Minecraft.getMinecraft().fontRenderer, stack, x, y); } } } /** * Draws the specified portion of the currently-bound texture. Texture size needs to be * passed-in here to allow this method to translate pixels into relative texture coords. * Draw starts at the bottom-left point and goes counter-clockwise to the top-left point. */ public static void renderSheetTexture(int x, int y, int width, int height, float u, float v, float U, float V, int textureWidth, int textureHeight){ float widthPixelPercent = 1.0F/textureWidth; float heightPixelPercent = 1.0F/textureHeight; Tessellator tessellator = Tessellator.getInstance(); BufferBuilder bufferbuilder = tessellator.getBuffer(); bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX); bufferbuilder.pos(x, y + height, 0.0D).tex(u * widthPixelPercent, V * heightPixelPercent).endVertex(); bufferbuilder.pos(x + width, y + height, 0.0D).tex(U * widthPixelPercent, V * heightPixelPercent).endVertex(); bufferbuilder.pos(x + width, y, 0.0D).tex(U * widthPixelPercent, v * heightPixelPercent).endVertex(); bufferbuilder.pos(x, y, 0.0D).tex(u * widthPixelPercent, v * heightPixelPercent).endVertex(); tessellator.draw(); } /** * Draws a colored rectangle at the specified point. This does NOT change the currently-bound * texture, nor does it modify any OpelGL states, so it may safely be called during rendering operations. */ public static void renderRectangle(int x, int y, int width, int height, ColorRGB color){ //Need to pack in a 255 alpha value or rectangles are invisible. GuiScreen.drawRect(x, y, x + width, y + height, color.rgbInt | -16777216); } /** * Returns the currently-active GUI, or null if no GUI is active. */ public static AGUIBase getActiveGUI(){ return Minecraft.getMinecraft().currentScreen instanceof BuilderGUI ? ((BuilderGUI) Minecraft.getMinecraft().currentScreen).gui : null; } /** * Closes the currently-opened GUI, returning back to the main game. */ public static void closeGUI(){ //Set current screen to null and clear out the OBJ DisplayLists if we have any. Minecraft.getMinecraft().displayGuiScreen(null); GUIComponent3DModel.clearModelCaches(); } /** * Opens the passed-in GUI, replacing any opened GUI in the process. */ public static void openGUI(AGUIBase gui){ FMLCommonHandler.instance().showGuiScreen(new BuilderGUI(gui)); } }
[ "rapscallion827@gmail.com" ]
rapscallion827@gmail.com
e2a0f4046f19e65f9be81bca1a9c3dc1c684ddb1
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a054/A054777Test.java
ccf3e8313f1a355810e6deaba34f2ff15f0226fc
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a054; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A054777Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
39a7cf27606451f18d32f6d084369a8ebce6db99
37d494bb90b296f65e09a8708b3b4a9a205bb0cc
/src/main/java/com/avaje/ebean/dbmigration/ddlgeneration/platform/MySqlDdl.java
d6ac5012084b818471b31798713fdfe1fe1851da
[ "Apache-2.0" ]
permissive
joe776/avaje-ebeanorm
f4e3a69518cfc604c1b87c0dd2463161f8ca52b5
0612d89e9ae3d33df821ac07a62d43f2dfbb1b28
refs/heads/master
2021-01-20T21:37:37.109574
2015-08-06T11:03:25
2015-08-06T11:03:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
807
java
package com.avaje.ebean.dbmigration.ddlgeneration.platform; import com.avaje.ebean.config.dbplatform.DbIdentity; import com.avaje.ebean.config.dbplatform.DbTypeMap; /** * MySql specific DDL. */ public class MySqlDdl extends PlatformDdl { public MySqlDdl(DbTypeMap platformTypes, DbIdentity dbIdentity) { super(platformTypes, dbIdentity); this.namingConvention.maxConstraintNameLength = 64; } /** * Return the drop index statement. */ @Override public String dropIndex(String indexName, String tableName) { return "drop index " + indexName + " on " + tableName; } /** * Return the drop foreign key clause. */ public String alterTableDropForeignKey(String tableName, String fkName) { return "alter table " + tableName + " drop foreign key " + fkName; } }
[ "robin.bygrave@gmail.com" ]
robin.bygrave@gmail.com
e405d799ac87cf5e6030fe17cecb66c1e3401505
cad2fa82852ca6c60c87b407fd15ef0cdd932adc
/core-api/src/main/java/com/sequenceiq/cloudbreak/api/model/proxy/ProxyConfigRequest.java
cb640b369a31e56e8596f0e6cc1aa5c00276cfa8
[ "LicenseRef-scancode-warranty-disclaimer", "ANTLR-PD", "CDDL-1.0", "bzip2-1.0.6", "Zlib", "BSD-3-Clause", "MIT", "EPL-1.0", "LicenseRef-scancode-proprietary-license", "LicenseRef-scancode-jdbm-1.00", "Apache-2.0" ]
permissive
bazaarvoice/cloudbreak
41d16df3c043072cbf47558618b276baaddc39f6
749b6b1719ed5dd9f7287e0e64205565fd971e59
refs/heads/master
2023-04-28T14:26:39.555312
2023-01-05T04:12:39
2023-01-05T04:12:39
131,363,855
0
0
Apache-2.0
2020-11-04T20:07:12
2018-04-28T02:23:40
Java
UTF-8
Java
false
false
561
java
package com.sequenceiq.cloudbreak.api.model.proxy; import com.sequenceiq.cloudbreak.doc.ModelDescriptions.ProxyConfigModelDescription; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @ApiModel("ProxyConfigRequest") public class ProxyConfigRequest extends ProxyConfigBase { @ApiModelProperty(ProxyConfigModelDescription.PASSWORD) private String password; public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } }
[ "keyki.kk@gmail.com" ]
keyki.kk@gmail.com
1ed2ee625cf89ef73d75314cfa07bf30e2d145ab
6e34a4bf59d4fe466865be89377373c35ffdc62b
/src/com/neocoretechs/relatrix/iterator/FindSetMode3.java
4f3a6faf026435eeb097a1bc2daf2cb018664284
[ "Apache-2.0" ]
permissive
neocoretechs/Relatrix
5ab7ed93f8b1bf46ca88fed62ad5206d365dc5b1
3567be3d61433300d9dd3c9ba166fe5a3bc0b736
refs/heads/master
2023-05-26T08:01:48.414376
2023-05-16T21:43:11
2023-05-16T21:43:11
25,831,041
4
0
null
null
null
null
UTF-8
Java
false
false
2,006
java
package com.neocoretechs.relatrix.iterator; import java.io.IOException; import java.util.Iterator; import com.neocoretechs.relatrix.Morphism; import com.neocoretechs.relatrix.MapRangeDomain; /** * Find the set of objects in the relation via the specified predicate. Mode 3 = findSet("?|*",object,object) * returns a 1 element Comparable with the identity findSet("*",object,object) for all elements matching the * last 2 objects. In the case of findSet("?",object,object) a Comparable[1] is return for each iteration * and it contains the object functioning as the domain in all relationships where the last 2 objects are the map and range. Legal permutations are:<br/> * *,[object],[object] <br/> * *,?,[object],[object] <br/> * *,[TemplateClass],[TemplateClass] <br/> * *,?,[TemplateClass],[TemplateClass] <br/> * @author Jonathan Groff Copyright (C) NeoCoreTechs 2014,2015,2021 * */ public class FindSetMode3 extends IteratorFactory { // mode 3 char dop; Object marg,rarg; short[] dmr_return = new short[4]; public FindSetMode3(char dop, Object marg, Object rarg) { this.dop = dop; this.rarg = rarg; this.marg = marg; // see if its ? or * operator dmr_return[1] = checkOp(dop); // 'map' object dmr_return[2] = 0; // 'range' dmr_return[3] = 0; } /** * @return Iterator for the set, each iterator return is a Comparable array of tuples of arity n=?'s */ @Override public Iterator<?> createIterator() throws IllegalAccessException, IOException { Morphism dmr = new MapRangeDomain(null, (Comparable)marg, (Comparable)rarg, true); return createRelatrixIterator(dmr); } /** * Create the specific iterator. Subclass overrides for various set valued functions * @param tdmr * @return * @throws IllegalAccessException * @throws IOException */ protected Iterator<?> createRelatrixIterator(Morphism tdmr) throws IllegalAccessException, IOException { return new RelatrixIterator( tdmr, dmr_return); } }
[ "groffj@neocoretechs.com" ]
groffj@neocoretechs.com
24fb9234d95baaba736a948972f5df195bc828e6
3c1a8b2997b31e526043459ce78395b34a3656f5
/zookeeper-demo/src/main/java/com/amos/config/DefaultWatch.java
06ef48357f1368a7a2e9e9df47ab6956dbc35ff4
[]
no_license
amosluo/java
1350bde7274e78baeb580e4e7af1f579e6859d2e
6d556063dfafa19243ecaff07755c7c5e0782e2d
refs/heads/master
2023-07-25T01:02:00.887300
2021-09-09T03:50:35
2021-09-09T03:50:35
397,791,625
0
0
null
null
null
null
UTF-8
Java
false
false
859
java
package com.amos.config; import org.apache.zookeeper.WatchedEvent; import org.apache.zookeeper.Watcher; import java.util.concurrent.CountDownLatch; public class DefaultWatch implements Watcher { CountDownLatch cd; public void process(WatchedEvent event) { switch (event.getState()) { case Unknown: break; case Disconnected: break; case NoSyncConnected: break; case SyncConnected: cd.countDown(); break; case AuthFailed: break; case ConnectedReadOnly: break; case SaslAuthenticated: break; case Expired: break; } } public void setCd(CountDownLatch cd) { this.cd = cd; } }
[ "amosluo@163.com" ]
amosluo@163.com
8e271d78f1dec2d9f823e284e6792392b088f0b0
53c2c80c6b53bc1624c77ea8317499d2f28da495
/messenger-entity/src/main/java/com/zemrow/messenger/entity/constants/ChatTagGroupConst.java
4e0706ce630f706664702f668e1cbaf46f7efa60
[]
no_license
a-polyakov/com.zemrow.messenger
3016d864e7ad4a13f51fd7b35f898551b440a0f4
dc865d21b45634fb791ad033e0598f495022cb2d
refs/heads/master
2022-11-25T20:48:19.089558
2022-01-05T01:25:07
2022-01-05T02:08:45
129,466,574
0
0
null
2022-11-23T22:18:03
2018-04-14T00:27:24
Java
UTF-8
Java
false
false
3,868
java
package com.zemrow.messenger.entity.constants; import com.querydsl.core.types.PathMetadata; import com.querydsl.core.types.dsl.EnumPath; import com.querydsl.core.types.dsl.NumberPath; import com.querydsl.sql.ColumnMetadata; import com.zemrow.messenger.entity.ChatTagGroup; import com.zemrow.messenger.entity.enums.TagGroupEnum; import java.sql.Types; import static com.querydsl.core.types.PathMetadataFactory.forVariable; /** * Класс сгенерирован автоматически, для таблицы ChatTagGroup(Групповые теги чата. Для упрощения поиска последнего тега из группы. Данные являются избыточными, возможно восстановить.) из БД * * @author com.zemrow.messenger.db.querydsl.QueryDslMetaDataSerializer on 2020.10.23 */ public class ChatTagGroupConst extends com.querydsl.sql.RelationalPathBase<ChatTagGroup> { private static final long serialVersionUID = -1717584828; /** * Групповые теги чата. Для упрощения поиска последнего тега из группы. Данные являются избыточными, возможно восстановить. */ public static final ChatTagGroupConst ChatTagGroup = new ChatTagGroupConst("ChatTagGroup"); /** * ID чата */ public static final String CHAT_ID = "chatId"; /** * Группа тегов. Если в одном задании встречаются несколько тегов из одной группы, то считается что активен только один последний из группы */ public static final String TAG_GROUP = "tagGroup"; /** * ID тега из сообщения */ public static final String MESSAGE_TAG_ID = "messageTagId"; /** * ID чата */ public final NumberPath<Long> chatId = createNumber(CHAT_ID, Long.class); /** * Группа тегов. Если в одном задании встречаются несколько тегов из одной группы, то считается что активен только один последний из группы */ public final EnumPath<TagGroupEnum> tagGroup = createEnum(TAG_GROUP, TagGroupEnum.class); /** * ID тега из сообщения */ public final NumberPath<Long> messageTagId = createNumber(MESSAGE_TAG_ID, Long.class); public final com.querydsl.sql.PrimaryKey<ChatTagGroup> ChatTagGroup_pkey = createPrimaryKey(chatId, tagGroup); public final com.querydsl.sql.ForeignKey<com.zemrow.messenger.entity.Chat> ChatTagGroup_chatId_fk = createForeignKey(chatId, "id"); public final com.querydsl.sql.ForeignKey<com.zemrow.messenger.entity.MessageTag> ChatTagGroup_messageTagId_fk = createForeignKey(messageTagId, "id"); public ChatTagGroupConst(String variable) { super(ChatTagGroup.class, forVariable(variable), "public", "ChatTagGroup"); addMetadata(); } public ChatTagGroupConst(com.querydsl.core.types.Path<? extends ChatTagGroup> path) { super(path.getType(), path.getMetadata(), "public", "ChatTagGroup"); addMetadata(); } public ChatTagGroupConst(PathMetadata metadata) { super(ChatTagGroup.class, metadata, "public", "ChatTagGroup"); addMetadata(); } public void addMetadata() { addMetadata(chatId, ColumnMetadata.named(CHAT_ID).withIndex(1).ofType(Types.BIGINT).withSize(19).notNull()); addMetadata(tagGroup, ColumnMetadata.named(TAG_GROUP).withIndex(2).ofType(Types.VARCHAR).withSize(32).notNull()); addMetadata(messageTagId, ColumnMetadata.named(MESSAGE_TAG_ID).withIndex(3).ofType(Types.BIGINT).withSize(19).notNull()); } }
[ "polyakov.alexandr.alexandrovich@gmail.com" ]
polyakov.alexandr.alexandrovich@gmail.com
8d7c3715a623cfa1688d70e60bd67eaf9c448a12
b84d0de1ea3ca9608d54a43b78a6dd952ca555b4
/app/src/main/java/com/example/ggxiaozhi/store/the_basket/mvp/presenter/impl/TopFragmentPresenterImpl.java
ac08e32f69be37f19b70bc80aa195e22e23568d6
[ "Apache-2.0" ]
permissive
duboAndroid/Bailan
64dc785cf792e4372944122e41162e05ef10e6d6
cebc496edb8ded8f7edcc5cb6d9ef2dac028b8a6
refs/heads/master
2021-05-06T13:12:46.545324
2017-12-06T02:01:11
2017-12-06T02:01:11
113,255,699
37
11
null
null
null
null
UTF-8
Java
false
false
1,522
java
package com.example.ggxiaozhi.store.the_basket.mvp.presenter.impl; import com.example.ggxiaozhi.store.the_basket.api.IGetDataDelegate; import com.example.ggxiaozhi.store.the_basket.base.BaseActivity; import com.example.ggxiaozhi.store.the_basket.base.mvpbase.BasePresenterImpl; import com.example.ggxiaozhi.store.the_basket.bean.TopBean; import com.example.ggxiaozhi.store.the_basket.mvp.interactor.TopInteractor; import com.example.ggxiaozhi.store.the_basket.mvp.presenter.TopFragmentPresenter; import com.example.ggxiaozhi.store.the_basket.mvp.view.fragment_view.TopFragmentView; import javax.inject.Inject; /** * 工程名 : BaiLan * 包名 : com.example.ggxiaozhi.store.the_basket.mvp.presenter.impl * 作者名 : 志先生_ * 日期 : 2017/9/2 * 时间 : 12:00 * 功能 : */ public class TopFragmentPresenterImpl extends BasePresenterImpl<TopFragmentView> implements TopFragmentPresenter { @Inject TopInteractor mInteractor; @Inject public TopFragmentPresenterImpl() { } @Override public void getTopFragmentData(BaseActivity activity) { mInteractor.loadTop(activity,listener); } private IGetDataDelegate<TopBean> listener=new IGetDataDelegate<TopBean>() { @Override public void getDataSuccess(TopBean topBean) { mPresenterView.topFragmentDataSuccess(topBean); } @Override public void getDataError(String msg) { mPresenterView.topFragmentDataError(msg); } }; }
[ "277627117@qq.com" ]
277627117@qq.com
609e0d2ddd7035eb27d3df2f9ec4fff4c8b88232
8d8024d86f02fe208029e7a05c198a2d3d9e4411
/app/backup/build/generated/data_binding_base_class_source_out/debug/dataBindingGenBaseClassesDebug/out/com/itg/calderysapp/databinding/ItemRvIntentMaterialBinding.java
66d835a3bbe95b47a12e4680ef418a24bb773504
[]
no_license
AndroidItg8/calderys_final_testing
137b34eba3cd93b152e491946312cdff6893cc09
52ff87b8baebeb81f29e57615203da2c7a422534
refs/heads/master
2020-04-21T17:40:29.139009
2019-02-19T05:26:16
2019-02-19T05:26:16
169,743,922
0
0
null
null
null
null
UTF-8
Java
false
false
4,254
java
package com.itg.calderysapp.databinding; import android.databinding.Bindable; import android.databinding.DataBindingComponent; import android.databinding.DataBindingUtil; import android.databinding.ViewDataBinding; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.itg.calderysapp.caldNet.newIndent.createIntent.mvvm.MaterialItemViewModel; public abstract class ItemRvIntentMaterialBinding extends ViewDataBinding { @NonNull public final TextView lblKgTag; @NonNull public final TextView lblMaterialCode; @NonNull public final TextView lblMaterialName; @NonNull public final TextView lblMaterialRemark; @NonNull public final TextView lblPlantCode; @NonNull public final TextView lblPriceUnit; @NonNull public final TextView lblProductRemark; @NonNull public final TextView lblQuantity; @NonNull public final TextView lblUnits; @NonNull public final TextView txtMaterialCode; @NonNull public final TextView txtMaterialName; @NonNull public final TextView txtPlantCode; @NonNull public final TextView txtPriceUnit; @NonNull public final TextView txtQuantity; @NonNull public final TextView txtUnit; @NonNull public final TextView txtUnits; @Bindable protected MaterialItemViewModel mModel; protected ItemRvIntentMaterialBinding(DataBindingComponent _bindingComponent, View _root, int _localFieldCount, TextView lblKgTag, TextView lblMaterialCode, TextView lblMaterialName, TextView lblMaterialRemark, TextView lblPlantCode, TextView lblPriceUnit, TextView lblProductRemark, TextView lblQuantity, TextView lblUnits, TextView txtMaterialCode, TextView txtMaterialName, TextView txtPlantCode, TextView txtPriceUnit, TextView txtQuantity, TextView txtUnit, TextView txtUnits) { super(_bindingComponent, _root, _localFieldCount); this.lblKgTag = lblKgTag; this.lblMaterialCode = lblMaterialCode; this.lblMaterialName = lblMaterialName; this.lblMaterialRemark = lblMaterialRemark; this.lblPlantCode = lblPlantCode; this.lblPriceUnit = lblPriceUnit; this.lblProductRemark = lblProductRemark; this.lblQuantity = lblQuantity; this.lblUnits = lblUnits; this.txtMaterialCode = txtMaterialCode; this.txtMaterialName = txtMaterialName; this.txtPlantCode = txtPlantCode; this.txtPriceUnit = txtPriceUnit; this.txtQuantity = txtQuantity; this.txtUnit = txtUnit; this.txtUnits = txtUnits; } public abstract void setModel(@Nullable MaterialItemViewModel model); @Nullable public MaterialItemViewModel getModel() { return mModel; } @NonNull public static ItemRvIntentMaterialBinding inflate(@NonNull LayoutInflater inflater, @Nullable ViewGroup root, boolean attachToRoot) { return inflate(inflater, root, attachToRoot, DataBindingUtil.getDefaultComponent()); } @NonNull public static ItemRvIntentMaterialBinding inflate(@NonNull LayoutInflater inflater, @Nullable ViewGroup root, boolean attachToRoot, @Nullable DataBindingComponent component) { return DataBindingUtil.<ItemRvIntentMaterialBinding>inflate(inflater, com.itg.calderysapp.R.layout.item_rv_intent_material, root, attachToRoot, component); } @NonNull public static ItemRvIntentMaterialBinding inflate(@NonNull LayoutInflater inflater) { return inflate(inflater, DataBindingUtil.getDefaultComponent()); } @NonNull public static ItemRvIntentMaterialBinding inflate(@NonNull LayoutInflater inflater, @Nullable DataBindingComponent component) { return DataBindingUtil.<ItemRvIntentMaterialBinding>inflate(inflater, com.itg.calderysapp.R.layout.item_rv_intent_material, null, false, component); } public static ItemRvIntentMaterialBinding bind(@NonNull View view) { return bind(view, DataBindingUtil.getDefaultComponent()); } public static ItemRvIntentMaterialBinding bind(@NonNull View view, @Nullable DataBindingComponent component) { return (ItemRvIntentMaterialBinding)bind(component, view, com.itg.calderysapp.R.layout.item_rv_intent_material); } }
[ "itechgalaxy.app@gmail.com" ]
itechgalaxy.app@gmail.com
fc500b4cb2aee27db4a0e9cab68a610ed3cff203
14755b80b5860af4d46c16b851e84ccf9d12506e
/java/joa/src-gen/com/wilutions/mslib/office/GridLines.java
5c25ef5f50133f22cafdcdca9e4a3613438927d3
[ "MIT" ]
permissive
wolfgangimig/joa
cdabaf1386dcc40c53a0279659666e7a83af3d89
a74bbab92eab2e3a7e525728ed318537c2b6a42a
refs/heads/master
2022-04-30T09:24:25.177264
2022-04-24T09:03:42
2022-04-24T09:03:42
26,138,099
12
14
null
null
null
null
UTF-8
Java
false
false
880
java
/* ** GENEREATED FILE - DO NOT MODIFY ** */ package com.wilutions.mslib.office; import com.wilutions.com.*; /** * GridLines. * */ @CoInterface(guid="{000C1725-0000-0000-C000-000000000046}") public interface GridLines extends IDispatch { static boolean __typelib__loaded = __TypeLib.load(); @DeclDISPID(110) public String getName() throws ComException; @DeclDISPID(235) public Object Select() throws ComException; @DeclDISPID(150) public IDispatch getParent() throws ComException; @DeclDISPID(128) public IMsoBorder getBorder() throws ComException; @DeclDISPID(117) public Object Delete() throws ComException; @DeclDISPID(1610743813) public IMsoChartFormat getFormat() throws ComException; @DeclDISPID(148) public IDispatch getApplication() throws ComException; @DeclDISPID(149) public Integer getCreator() throws ComException; }
[ "wolfgang.imig@googlemail.com" ]
wolfgang.imig@googlemail.com
17c6c9cc58705fd42ea49069a4510114ed42c8a5
71fe4adaecb0d34b598c9463068cccc096391b28
/scarabei-api/src/com/jfixby/scarabei/api/net/message/Message.java
396adbbd8bbcdabab03d20eee412d586d5a7fce9
[]
no_license
Scarabei/Scarabei
ea795ddfa0ee83bdc100b54ca88f09c56937c289
07ab9cf45eafb3c0bb939792303b4c70e6b50b95
refs/heads/master
2023-03-12T11:58:48.401947
2021-03-04T13:24:53
2021-03-04T13:31:01
45,246,099
8
3
null
2017-03-13T11:11:46
2015-10-30T11:02:15
Java
UTF-8
Java
false
false
1,024
java
package com.jfixby.scarabei.api.net.message; import java.util.LinkedHashMap; import com.jfixby.scarabei.api.log.L; public final class Message implements java.io.Serializable { private static final long serialVersionUID = -7864576801100184653L; public Message (final String header) { this.header = header; } public Message () { } public String header; public LinkedHashMap<String, String> values = new LinkedHashMap<String, String>(); public LinkedHashMap<String, java.io.Serializable> attachments = new LinkedHashMap<String, java.io.Serializable>(); public void print () { L.d("---Message[" + this.header + "]------------------------"); if (this.values != null && this.values.size() > 0) { L.d(" values", this.values); } if (this.attachments != null && this.attachments.size() > 0) { L.d("attachments", this.attachments); } } public Message putValue (final String key, final String value) { this.values.put(key, value); return this; } }
[ "github@jfixby.com" ]
github@jfixby.com
5a38fbbfd1cdf1143bb2e6fb69640e70d187767c
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_90225b02b22075bdf7be16c0613b516b60a326cd/Endpoint/12_90225b02b22075bdf7be16c0613b516b60a326cd_Endpoint_s.java
2c40dadd4997b4172bd90eec9c83b7e734509bc8
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,583
java
package com.taobao.top.link.endpoint; import java.net.URI; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import com.taobao.top.link.DefaultLoggerFactory; import com.taobao.top.link.LinkException; import com.taobao.top.link.Logger; import com.taobao.top.link.LoggerFactory; import com.taobao.top.link.Text; import com.taobao.top.link.channel.ChannelException; import com.taobao.top.link.channel.ChannelSender; import com.taobao.top.link.channel.ClientChannelSelector; import com.taobao.top.link.channel.ClientChannelSharedSelector; import com.taobao.top.link.channel.ServerChannel; import com.taobao.top.link.schedule.Scheduler; // Abstract network model // https://docs.google.com/drawings/d/1PRfzMVNGE4NKkpD9A_-QlH2PV47MFumZX8LbCwhzpQg/edit public class Endpoint { protected static int TIMOUT = 5000; private Logger logger; private Identity identity; private List<ServerChannel> serverChannels; private ClientChannelSelector channelSelector; private EndpointChannelHandler channelHandler; private MessageHandler messageHandler; // in/out endpoints private List<EndpointProxy> connected; public Endpoint(Identity identity) { this(DefaultLoggerFactory.getDefault(), identity); } public Endpoint(LoggerFactory loggerFactory, Identity identity) { this.serverChannels = new ArrayList<ServerChannel>(); this.connected = new ArrayList<EndpointProxy>(); this.logger = loggerFactory.create(this); this.identity = identity; this.setClientChannelSelector(new ClientChannelSharedSelector(loggerFactory)); this.setChannelHandler(new EndpointChannelHandler(loggerFactory)); if (this.identity == null) throw new NullPointerException("identity"); } public Identity getIdentity() { return this.identity; } public void setMessageHandler(MessageHandler handler) { this.messageHandler = handler; } public MessageHandler getMessageHandler() { return this.messageHandler; } public void setChannelHandler(EndpointChannelHandler channelHandler) { this.channelHandler = channelHandler; this.channelHandler.setEndpoint(this); for (ServerChannel channel : this.serverChannels) channel.setChannelHandler(this.channelHandler); } public void setClientChannelSelector(ClientChannelSelector selector) { this.channelSelector = selector; } public void setScheduler(Scheduler<Identity> scheduler) { this.channelHandler.setScheduler(scheduler); } public void bind(ServerChannel channel) { channel.setChannelHandler(this.channelHandler); channel.run(); this.serverChannels.add(channel); } public void unbindAll() { for (ServerChannel channel : this.serverChannels) { try { channel.stop(); } catch (Exception e) { this.logger.error(Text.E_UNBIND_ERROR, e); } } this.serverChannels.clear(); } public Iterator<EndpointProxy> getConnected() { return this.connected.iterator(); } public synchronized EndpointProxy getEndpoint(Identity target, URI uri) throws LinkException { return this.getEndpoint(target, uri, null); } // connect to target via special uri public synchronized EndpointProxy getEndpoint( Identity target, URI uri, Map<String, Object> extras) throws LinkException { // connect message Message msg = new Message(); msg.messageType = MessageType.CONNECT; Map<String, Object> content = new HashMap<String, Object>(); this.identity.render(content); // pass extra data if (extras != null) content.putAll(extras); msg.content = content; EndpointProxy e = this.getEndpoint(target); // always clear, cached proxy will have broken channel e.remove(uri); // always reget channel, make sure it's valid ClientChannelWrapper channel = new ClientChannelWrapper( // set default version on this channel this.channelSelector.getChannel(uri), msg.protocolVersion); channel.setChannelHandler(this.channelHandler); e.add(channel); // send connect this.sendAndWait(e, channel, msg, TIMOUT); return e; } public synchronized EndpointProxy getEndpoint(Identity target) throws LinkException { if (target.equals(this.identity)) throw new LinkException(Text.E_ID_DUPLICATE); for (EndpointProxy e : this.connected) { if (e.getIdentity() != null && e.getIdentity().equals(target)) return e; } EndpointProxy e = this.createProxy(target.toString()); e.setIdentity(target); return e; } protected void send(ChannelSender sender, Message message) throws ChannelException { this.channelHandler.pending(message, sender); } protected boolean sendSync(ChannelSender sender, Message message, int timeout) throws ChannelException { return this.channelHandler.flush(message, sender, timeout); } protected Map<String, Object> sendAndWait(EndpointProxy e, ChannelSender sender, Message message, int timeout) throws LinkException { SendCallback callback = new SendCallback(e); this.channelHandler.pending(message, sender, callback); try { callback.waitReturn(timeout); } finally { this.channelHandler.cancel(callback); } if (callback.getError() != null) throw callback.getError(); return callback.getReturn(); } private EndpointProxy createProxy(String reason) { EndpointProxy e = new EndpointProxy(this); this.connected.add(e); if (this.logger.isDebugEnabled()) this.logger.debug(Text.E_CREATE_NEW + ": " + reason); return e; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c03f78214a0572f9ce1996df1120066b5713e6af
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project94/src/test/java/org/gradle/test/performance94_5/Test94_478.java
80c2f54b598d0348cb293cd046a431b41a57a52c
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance94_5; import static org.junit.Assert.*; public class Test94_478 { private final Production94_478 production = new Production94_478("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
a2670c6777a04888974b870f447c7d29063c0f86
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/processing--processing/20b67332f22700407ccfd570539b5c6469f21713/after/AvailableContribution.java
82b7ef4bf1f17b46f4305e8f3aab7c3558333c33
[]
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,591
java
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */ /* Part of the Processing project - http://processing.org Copyright (c) 2013 The Processing Foundation Copyright (c) 2011-12 Ben Fry and Casey Reas This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package processing.app.contrib; import java.io.*; import java.util.HashMap; import processing.app.Base; import processing.app.Editor; import processing.core.PApplet; /** * A class to hold information about a Contribution that can be downloaded. */ class AvailableContribution extends Contribution { protected final ContributionType type; // Library, tool, etc. protected final String link; // Direct link to download the file public AvailableContribution(ContributionType type, HashMap<String, String> params) { this.type = type; this.link = params.get("download"); category = ContributionListing.getCategory(params.get("category")); name = params.get("name"); authorList = params.get("authorList"); url = params.get("url"); sentence = params.get("sentence"); paragraph = params.get("paragraph"); version = PApplet.parseInt(params.get("version"), 0); prettyVersion = params.get("prettyVersion"); } /** * @param contribArchive * a zip file containing the library to install * @param confirmReplace * true to open a dialog asking the user to confirm removing/moving * the library when a library by the same name already exists * @return */ public LocalContribution install(Editor editor, File contribArchive, boolean confirmReplace, StatusPanel status) { // Unzip the file into the modes, tools, or libraries folder inside the // sketchbook. Unzipping to /tmp is problematic because it may be on // another file system, so move/rename operations will break. File sketchbookContribFolder = type.getSketchbookFolder(); File tempFolder = null; try { tempFolder = Base.createTempFolder(type.toString(), "tmp", sketchbookContribFolder); } catch (IOException e) { status.setErrorMessage("Could not create a temporary folder to install."); return null; } Base.unzip(contribArchive, tempFolder); // System.out.println("temp folder is " + tempFolder); // Base.openFolder(tempFolder); // Now go looking for a legit contrib inside what's been unpacked. File contribFolder = null; // Sometimes contrib authors place all their folders in the base directory // of the .zip file instead of in single folder as the guidelines suggest. if (type.isCandidate(tempFolder)) { /* // Can't just rename the temp folder, because a contrib with this name // may already exist. Instead, create a new temp folder, and rename the // old one to be the correct folder. File enclosingFolder = null; try { enclosingFolder = Base.createTempFolder(type.toString(), "tmp", sketchbookContribFolder); } catch (IOException e) { status.setErrorMessage("Could not create a secondary folder to install."); return null; } contribFolder = new File(enclosingFolder, getName()); tempFolder.renameTo(contribFolder); tempFolder = enclosingFolder; */ status.setErrorMessage(getName() + " needs to be repackaged according to the " + type.getTitle() + " guidelines."); //status.setErrorMessage("This " + type + " needs to be repackaged according to the guidelines."); return null; } // if (contribFolder == null) { // Find the first legitimate looking folder in what we just unzipped contribFolder = type.findCandidate(tempFolder); // } LocalContribution installedContrib = null; if (contribFolder == null) { status.setErrorMessage("Could not find a " + type + " in the downloaded file."); } else { File propFile = new File(contribFolder, type + ".properties"); if (writePropertiesFile(propFile)) { // 1. contribFolder now has a legit contribution, load it to get info. LocalContribution newContrib = type.load(editor.getBase(), contribFolder); // 2. Check to make sure nothing has the same name already, // backup old if needed, then move things into place and reload. installedContrib = newContrib.moveAndLoad(editor, confirmReplace, status); } else { status.setErrorMessage("Error overwriting .properties file."); } } // Remove any remaining boogers if (tempFolder.exists()) { Base.removeDir(tempFolder); } return installedContrib; } public boolean isInstalled() { return false; } public ContributionType getType() { return type; } /** * We overwrite the properties file with the curated version from the * Processing site. This ensures that things have been cleaned up (for * instance, that the "sentence" is really a sentence) and that bad data * from the contrib's .properties file doesn't break the manager. * @param propFile * @return */ public boolean writePropertiesFile(File propFile) { try { if (propFile.delete() && propFile.createNewFile() && propFile.setWritable(true)) { PrintWriter writer = PApplet.createWriter(propFile); writer.println("name=" + getName()); writer.println("category=" + getCategory()); writer.println("authorList=" + getAuthorList()); writer.println("url=" + getUrl()); writer.println("sentence=" + getSentence()); writer.println("paragraph=" + getParagraph()); writer.println("version=" + getVersion()); writer.println("prettyVersion=" + getPrettyVersion()); writer.flush(); writer.close(); } return true; } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return false; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
a73c6a96c92bcd0e2f6809346a34c78010da879b
65c784062352d92875f16740e24b34a78d952d42
/src/main/java/io/github/jhipster/sample/JhipsterDtoSampleApplicationApp.java
ea884a40280700d93e58c1ecd1ed4c8fdb92bac5
[]
no_license
extremenelson/jhipster-sample-app-dto
d0d4f4f9d70cb0bda9371fe554195791eb5ab081
0b88f3f1612a08b01d6ef32c3193fd78d1d9da5b
refs/heads/master
2021-04-15T14:40:24.183814
2018-02-27T22:43:33
2018-02-27T22:43:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,810
java
package io.github.jhipster.sample; import io.github.jhipster.sample.config.ApplicationProperties; import io.github.jhipster.sample.config.DefaultProfileUtil; import io.github.jhipster.config.JHipsterConstants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.actuate.autoconfigure.*; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.ComponentScan; import org.springframework.core.env.Environment; import javax.annotation.PostConstruct; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Arrays; import java.util.Collection; @ComponentScan @EnableAutoConfiguration(exclude = {MetricFilterAutoConfiguration.class, MetricRepositoryAutoConfiguration.class}) @EnableConfigurationProperties({LiquibaseProperties.class, ApplicationProperties.class}) public class JhipsterDtoSampleApplicationApp { private static final Logger log = LoggerFactory.getLogger(JhipsterDtoSampleApplicationApp.class); private final Environment env; public JhipsterDtoSampleApplicationApp(Environment env) { this.env = env; } /** * Initializes jhipsterDtoSampleApplication. * <p> * Spring profiles can be configured with a program arguments --spring.profiles.active=your-active-profile * <p> * You can find more information on how profiles work with JHipster on <a href="http://www.jhipster.tech/profiles/">http://www.jhipster.tech/profiles/</a>. */ @PostConstruct public void initApplication() { Collection<String> activeProfiles = Arrays.asList(env.getActiveProfiles()); if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_PRODUCTION)) { log.error("You have misconfigured your application! It should not run " + "with both the 'dev' and 'prod' profiles at the same time."); } if (activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(JHipsterConstants.SPRING_PROFILE_CLOUD)) { log.error("You have misconfigured your application! It should not " + "run with both the 'dev' and 'cloud' profiles at the same time."); } } /** * Main method, used to run the application. * * @param args the command line arguments * @throws UnknownHostException if the local host name could not be resolved into an address */ public static void main(String[] args) throws UnknownHostException { SpringApplication app = new SpringApplication(JhipsterDtoSampleApplicationApp.class); DefaultProfileUtil.addDefaultProfile(app); Environment env = app.run(args).getEnvironment(); String protocol = "http"; if (env.getProperty("server.ssl.key-store") != null) { protocol = "https"; } log.info("\n----------------------------------------------------------\n\t" + "Application '{}' is running! Access URLs:\n\t" + "Local: \t\t{}://localhost:{}\n\t" + "External: \t{}://{}:{}\n\t" + "Profile(s): \t{}\n----------------------------------------------------------", env.getProperty("spring.application.name"), protocol, env.getProperty("server.port"), protocol, InetAddress.getLocalHost().getHostAddress(), env.getProperty("server.port"), env.getActiveProfiles()); } }
[ "julien.dubois@gmail.com" ]
julien.dubois@gmail.com
3835fc859adef51de09cf4a063af6b0e97ff9cd0
be0e8535222b601c277a9d29f234e7fa44e13258
/output/com/ankamagames/dofus/network/messages/game/context/notification/NotificationListMessage.java
92fb6bd2b23963a10b21cd79bdf68158168d1c67
[]
no_license
BotanAtomic/ProtocolBuilder
df303b741c701a17b0c61ddbf5253d1bb8e11684
ebb594e3da3adfad0c3f036e064395a037d6d337
refs/heads/master
2021-06-21T00:55:40.479271
2017-08-14T23:59:09
2017-08-14T23:59:24
100,318,625
1
2
null
null
null
null
UTF-8
Java
false
false
1,186
java
package com.ankamagames.dofus.network.messages.game.context.notification; import com.ankamagames.jerakine.network.NetworkMessage; import com.ankamagames.jerakine.network.INetworkMessage; import com.ankamagames.jerakine.network.ICustomDataOutput; import flash.utils.ByteArray; import com.ankamagames.jerakine.network.CustomDataWrapper; import com.ankamagames.jerakine.network.ICustomDataInput; import com.ankamagames.jerakine.network.utils.FuncTree; public class NotificationListMessage extends NetworkMessage implements INetworkMessage { private boolean _isInitialized = false; public Vector<Integer> flags; private FuncTree _flagstree; public static final int protocolId = 6087; public void serialize(ICustomDataOutput param1) { param1.writeShort(this.flags.length); int _loc2_ = 0; while (_loc2_ < this.flags.length) { param1.writeVarInt(this.flags[_loc2_]); _loc2_++; } } public void deserialize(ICustomDataInput param1) { Object _loc4_ = 0; int _loc2_ = param1.readUnsignedShort(); int _loc3_ = 0; while (_loc3_ < _loc2_) { _loc4_ = param1.readVarInt(); this.flags.push(_loc4_); _loc3_++; } } }
[ "ahmed.botan94@gmail.com" ]
ahmed.botan94@gmail.com
ae048ed3743601faf0e438067e81e7dcda25791f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/17/17_9b9cb42bab86b99dd266f94a81dba31af1cfdbdc/NOTBuilderNode/17_9b9cb42bab86b99dd266f94a81dba31af1cfdbdc_NOTBuilderNode_t.java
4fc0d3358733c7e04002fad3d593769006b29df5
[]
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,278
java
/* Copyright 2008-2010 Gephi Authors : Mathieu Bastian <mathieu.bastian@gephi.org> Website : http://www.gephi.org This file is part of Gephi. Gephi is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Gephi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with Gephi. If not, see <http://www.gnu.org/licenses/>. */ package org.gephi.filters.plugin.operator; import javax.swing.Icon; import javax.swing.JPanel; import org.gephi.filters.spi.Category; import org.gephi.filters.spi.Filter; import org.gephi.filters.spi.FilterBuilder; import org.gephi.filters.spi.FilterProperty; import org.gephi.filters.spi.NodeFilter; import org.gephi.filters.spi.Operator; import org.gephi.graph.api.Edge; import org.gephi.graph.api.Graph; import org.gephi.graph.api.GraphView; import org.gephi.graph.api.Node; import org.openide.util.lookup.ServiceProvider; /** * * @author Mathieu Bastian */ @ServiceProvider(service = FilterBuilder.class) public class NOTBuilderNode implements FilterBuilder { public Category getCategory() { return new Category("Operator"); } public String getName() { return "NOT (Nodes)"; } public Icon getIcon() { return null; } public String getDescription() { return null; } public Filter getFilter() { return new NOTOperatorNode(); } public JPanel getPanel(Filter filter) { return null; } public static class NOTOperatorNode implements Operator { public int getInputCount() { return 1; } public String getName() { return "NOT (Nodes)"; } public FilterProperty[] getProperties() { return null; } public Graph filter(Graph[] graphs) { if (graphs.length > 1) { throw new IllegalArgumentException("Not Filter accepts a single graph in parameter"); } Graph graph = graphs[0]; GraphView graphView = graph.getView(); Graph mainGraph = graph.getView().getGraphModel().getGraph(); for (Node n : mainGraph.getNodes().toArray()) { if (n.getNodeData().getNode(graphView.getViewId()) == null) { //The node n is not in graph graph.addNode(n); } else { //The node n is in graph graph.removeNode(n); } } for (Node n : graph.getNodes().toArray()) { Node mainNode = n.getNodeData().getNode(mainGraph.getView().getViewId()); Edge[] edges = mainGraph.getEdges(mainNode).toArray(); for (Edge e : edges) { if (e.getSource().getNodeData().getNode(graphView.getViewId()) != null && e.getTarget().getNodeData().getNode(graphView.getViewId()) != null) { graph.addEdge(e); } } } return graph; } public Graph filter(Graph graph, Filter[] filters) { if (filters.length > 1) { throw new IllegalArgumentException("Not Filter accepts a single filter in parameter"); } Filter filter = filters[0]; if (filter instanceof NodeFilter && ((NodeFilter) filter).init(graph)) { NodeFilter nodeFilter = (NodeFilter) filter; for (Node n : graph.getNodes().toArray()) { if (nodeFilter.evaluate(graph, n)) { graph.removeNode(n); } } nodeFilter.finish(); } return graph; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
bef138d9b10f282fd6fcfa11f74564d93f54cb40
ebfcf186b788ec7502e1cc9bad5c08f4224b26e0
/releases/broadleaf/static/BroadleafCommerce-broadleaf-1.5.3-GA/admin/broadleaf-admin-module/src/main/java/org/broadleafcommerce/admin/client/datasource/order/OrderItemAdjustmentListDataSourceFactory.java
bd3799a05ac0dc2a4c3c4baaf1bf824bbf01138b
[]
no_license
klagithub1/static_antipattern_analyzer
06eb3bf0b15faa392a7d815d928ac6d4b18afd20
a8764b307b6531b8ad715e8f621e1a5c8c6f951b
refs/heads/master
2023-01-13T21:13:36.703932
2017-05-07T06:03:07
2017-05-07T06:03:07
90,512,339
0
0
null
2023-01-02T21:53:08
2017-05-07T06:02:38
Java
UTF-8
Java
false
false
2,953
java
/* * Copyright 2008-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.broadleafcommerce.admin.client.datasource.order; import org.broadleafcommerce.admin.client.datasource.CeilingEntities; import org.broadleafcommerce.admin.client.datasource.EntityImplementations; import org.broadleafcommerce.openadmin.client.datasource.DataSourceFactory; import org.broadleafcommerce.openadmin.client.datasource.dynamic.ListGridDataSource; import org.broadleafcommerce.openadmin.client.datasource.dynamic.module.BasicClientEntityModule; import org.broadleafcommerce.openadmin.client.datasource.dynamic.module.DataSourceModule; import org.broadleafcommerce.openadmin.client.dto.ForeignKey; import org.broadleafcommerce.openadmin.client.dto.OperationType; import org.broadleafcommerce.openadmin.client.dto.OperationTypes; import org.broadleafcommerce.openadmin.client.dto.PersistencePerspective; import org.broadleafcommerce.openadmin.client.dto.PersistencePerspectiveItemType; import org.broadleafcommerce.openadmin.client.service.AppServices; import com.google.gwt.user.client.rpc.AsyncCallback; import com.smartgwt.client.data.DataSource; /** * * @author jfischer * */ public class OrderItemAdjustmentListDataSourceFactory implements DataSourceFactory { public static final String foreignKeyName = "orderItem"; public static ListGridDataSource dataSource = null; public void createDataSource(String name, OperationTypes operationTypes, Object[] additionalItems, AsyncCallback<DataSource> cb) { if (dataSource == null) { operationTypes = new OperationTypes(OperationType.ENTITY, OperationType.ENTITY, OperationType.ENTITY, OperationType.ENTITY, OperationType.ENTITY); PersistencePerspective persistencePerspective = new PersistencePerspective(operationTypes, new String[]{}, new ForeignKey[]{}); persistencePerspective.addPersistencePerspectiveItem(PersistencePerspectiveItemType.FOREIGNKEY, new ForeignKey(foreignKeyName, EntityImplementations.ORDER_ITEM, null)); DataSourceModule[] modules = new DataSourceModule[]{ new BasicClientEntityModule(CeilingEntities.ORDER_ITEM_ADJUSTMENT, persistencePerspective, AppServices.DYNAMIC_ENTITY) }; dataSource = new ListGridDataSource(name, persistencePerspective, AppServices.DYNAMIC_ENTITY, modules); dataSource.buildFields(null, false, cb); } else { if (cb != null) { cb.onSuccess(dataSource); } } } }
[ "klajdi@live.ca" ]
klajdi@live.ca
9155626a1fd85c96f38aeb05d1011679f2424b0d
ea4274b5a1ce98615a4cb60e83dec40f460da28a
/src/main/java/org/boom/msg/JoinRoom.java
52c55fa466644f863de4f12d836e334b1289fab6
[]
no_license
fforw/boom
8f961bdb2c16610f41f5c3787b88bbdd930410bc
a6668b4f4f537c6b481d890e5e8ca13e09bf2f26
refs/heads/master
2020-06-03T07:01:11.089961
2012-05-18T17:52:49
2012-05-18T17:52:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
252
java
package org.boom.msg; public class JoinRoom extends ApplicationMessage { private String name; public void setName(String name) { this.name = name; } public String getName() { return name; } }
[ "fforw@gmx.de" ]
fforw@gmx.de
c95e406990b1d6b6ffd2356fa37637cc74cb8abe
31750459b1afa9ab8a60e9a9432fa35c5620148e
/src/main/java/com/example/viewpager/base/menudetail/TopicMenuDstailPager.java
50a0cbe24f9a5a64c0540c764c085bf1bbf6ebbd
[]
no_license
Zhangyinbi/News
71e6eb367a32c23bdaf1bc0578b232f136f30ef5
decfca8d9076048e09f6b0b2b0202ac844e093c8
refs/heads/master
2020-12-24T09:31:47.871593
2016-11-09T13:02:02
2016-11-09T13:02:02
73,284,740
0
0
null
null
null
null
UTF-8
Java
false
false
743
java
package com.example.viewpager.base.menudetail; import android.app.Activity; import android.graphics.Color; import android.view.Gravity; import android.view.View; import android.widget.TextView; import com.example.viewpager.base.BaseMenuDetailPager; /** * Created by Administrator on 2016/6/15 0015. */ public class TopicMenuDstailPager extends BaseMenuDetailPager { public TopicMenuDstailPager(Activity activity) { super(activity); } @Override protected View initViews() { TextView text = new TextView(mActivity); text.setText("菜单详情页——专题"); text.setTextColor(Color.RED); text.setTextSize(30); text.setGravity(Gravity.CENTER); return text; } }
[ "1160118373@qq.com" ]
1160118373@qq.com
243ae4055015b27f030412fbe282cc1b01b01f8f
b49ee04177c483ab7dab6ee2cd3cabb44a159967
/medicineDaChen/src/main/java/com/dachen/medicine/activity/AboutActivity.java
58040ed8526dd6f620ffb9270e12edb2f93ab22a
[]
no_license
butaotao/MedicineProject
8a22a98a559005bb95fee51b319535b117f93d5d
8e57c1e0ee0dac2167d379edd9d97306b52d3165
refs/heads/master
2020-04-09T17:29:36.570453
2016-09-13T09:17:05
2016-09-13T09:17:05
68,094,294
0
1
null
null
null
null
UTF-8
Java
false
false
4,985
java
package com.dachen.medicine.activity; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.view.View; import android.view.View.OnClickListener; import android.widget.RelativeLayout; import android.widget.TextView; import com.dachen.medicine.R; import com.dachen.medicine.app.Constants; import com.dachen.medicine.common.utils.ToastUtils; import com.dachen.medicine.common.utils.VersionUtils; import com.dachen.medicine.entity.Result; import com.dachen.medicine.entity.VersionInfo; import com.dachen.medicine.net.HttpManager; import com.dachen.medicine.net.Params; import com.dachen.medicine.service.VersionUpdateService; import com.dachen.medicine.view.MessageDialog; import java.util.ArrayList; import butterknife.Bind; import butterknife.ButterKnife; import butterknife.OnClick; public class AboutActivity extends BaseActivity implements OnClickListener { RelativeLayout rl_back; TextView tv_title; @Bind(R.id.versionUpdate) TextView mVersionUpdate; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_about); ButterKnife.bind(this); rl_back = (RelativeLayout) findViewById(R.id.rl_back); rl_back.setOnClickListener(this); tv_title = (TextView) findViewById(R.id.tv_title); tv_title.setText("关于"); } @Override public void onClick(View v) { // TODO Auto-generated method stub super.onClick(v); switch (v.getId()) { case R.id.rl_back: super.onBackPressed(); break; default: break; } } @OnClick(R.id.versionUpdate) void onVersionUpdateClick(View v) { mVersionUpdate.setTextColor(0x503db4ff); new Handler().postDelayed(new Runnable() { @Override public void run() { mVersionUpdate.setTextColor(0xff3db4ff); } }, 300); getVersion(); } /** * 获取版本号 */ private void getVersion() { new HttpManager().post(this, Constants.GET_VERSION, VersionInfo.class, Params.getVersionParams(this), new HttpManager.OnHttpListener<Result>() { @Override public void onSuccess(Result response) { if (response.getResultCode() == 1) { if (response instanceof VersionInfo) { final VersionInfo versionInfo = (VersionInfo) response; if (versionInfo.data != null && VersionUtils.hasNewVersion(AboutActivity.this, versionInfo.data.version)) { final MessageDialog messageDialog = new MessageDialog(AboutActivity.this, "取消", "马上更新", versionInfo.data.info); messageDialog.setBtn1ClickListener(new View.OnClickListener() { @Override public void onClick(View v) { messageDialog.dismiss(); } }); messageDialog.setBtn2ClickListener(new View.OnClickListener() { @Override public void onClick(View v) { messageDialog.dismiss(); Intent intent = new Intent(AboutActivity.this, VersionUpdateService.class); intent.putExtra("desc", getString(R.string.app_name)); intent.putExtra("fileName", "company_release_v" + versionInfo.data.version + ".apk"); intent.putExtra("url", versionInfo.data.downloadUrl); startService(intent); } }); messageDialog.show(); return; } } } ToastUtils.showToast("当前版本即是最新版本"); } @Override public void onSuccess(ArrayList<Result> response) { ToastUtils.showToast("当前版本即是最新版本"); } @Override public void onFailure(Exception e, String errorMsg, int s) { ToastUtils.showToast("当前版本即是最新版本"); } }, false, 1); } }
[ "1802928215@qq.com" ]
1802928215@qq.com
72c2403ed220200d404675c49f6741c5629e8803
de7b67d4f8aa124f09fc133be5295a0c18d80171
/workspace_activeMq/activemq-parent/activemq-core/src/test/java/org/apache/activemq/usecases/ConsumeUncompressedCompressedMessageTest.java
4328a26b28b31dd8359df6521c1c90843d767e1c
[]
no_license
lin-lee/eclipse_workspace_test
adce936e4ae8df97f7f28965a6728540d63224c7
37507f78bc942afb11490c49942cdfc6ef3dfef8
refs/heads/master
2021-05-09T10:02:55.854906
2018-01-31T07:19:02
2018-01-31T07:19:02
119,460,523
0
1
null
null
null
null
UTF-8
Java
false
false
6,457
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.activemq.usecases; import static org.junit.Assert.*; import java.net.URI; import javax.jms.Connection; import javax.jms.JMSException; import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.Queue; import javax.jms.Session; import javax.jms.TextMessage; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import javax.management.openmbean.CompositeData; import org.apache.activemq.ActiveMQConnection; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.broker.BrokerService; import org.apache.activemq.broker.TransportConnector; import org.apache.activemq.broker.jmx.QueueViewMBean; import org.apache.activemq.command.ActiveMQMessage; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class ConsumeUncompressedCompressedMessageTest { private static final Logger LOG = LoggerFactory.getLogger(ConsumeUncompressedCompressedMessageTest.class); private BrokerService broker; private URI tcpUri; ActiveMQConnectionFactory factory; ActiveMQConnection connection; Session session; Queue queue; @Before public void setUp() throws Exception { broker = createBroker(); broker.start(); broker.waitUntilStarted(); factory = new ActiveMQConnectionFactory(tcpUri); factory.setUseCompression(true); connection = (ActiveMQConnection) factory.createConnection(); connection.start(); session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); queue = session.createQueue("CompressionTestQueue"); } @After public void tearDown() throws Exception { if(connection != null) { connection.close(); } broker.stop(); broker.waitUntilStopped(); } protected BrokerService createBroker() throws Exception { return createBroker(true); } protected BrokerService createBroker(boolean delete) throws Exception { BrokerService answer = new BrokerService(); answer.setPersistent(false); answer.setDeleteAllMessagesOnStartup(true); answer.setSchedulerSupport(false); answer.setUseJmx(true); TransportConnector connector = answer.addConnector("tcp://localhost:0"); tcpUri = connector.getConnectUri(); return answer; } @Test public void testBrowseAndReceiveCompressedMessages() throws Exception { assertTrue(((ActiveMQConnection) connection).isUseCompression()); createProducerAndSendMessages(1); QueueViewMBean queueView = getProxyToQueueViewMBean(); assertNotNull(queueView); CompositeData[] compdatalist = queueView.browse(); if (compdatalist.length == 0) { fail("There is no message in the queue:"); } CompositeData cdata = compdatalist[0]; assertComplexData(0, cdata, "Text", "Test Text Message: " + 0); assertMessageAreCorrect(1); } @Test public void testReceiveAndResendWithCompressionOff() throws Exception { assertTrue(connection.isUseCompression()); createProducerAndSendMessages(1); MessageConsumer consumer = session.createConsumer(queue); TextMessage message = (TextMessage) consumer.receive(5000); assertTrue(((ActiveMQMessage) message).isCompressed()); LOG.debug("Received Message with Text = " + message.getText()); connection.setUseCompression(false); MessageProducer producer = session.createProducer(queue); producer.send(message); producer.close(); message = (TextMessage) consumer.receive(5000); LOG.debug("Received Message with Text = " + message.getText()); } protected void assertComplexData(int messageIndex, CompositeData cdata, String name, Object expected) { Object value = cdata.get(name); assertEquals("Message " + messageIndex + " CData field: " + name, expected, value); } private void createProducerAndSendMessages(int numToSend) throws Exception { session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE); MessageProducer producer = session.createProducer(queue); for (int i = 0; i < numToSend; i++) { TextMessage message = session.createTextMessage("Test Text Message: " + i); if (i != 0 && i % 10000 == 0) { LOG.info("sent: " + i); } producer.send(message); } producer.close(); } private QueueViewMBean getProxyToQueueViewMBean() throws MalformedObjectNameException, JMSException { ObjectName queueViewMBeanName = new ObjectName("org.apache.activemq" + ":Type=Queue,Destination=" + queue.getQueueName() + ",BrokerName=localhost"); QueueViewMBean proxy = (QueueViewMBean) broker.getManagementContext() .newProxyInstance(queueViewMBeanName, QueueViewMBean.class, true); return proxy; } private void assertMessageAreCorrect(int numToReceive) throws Exception { MessageConsumer consumer = session.createConsumer(queue); try{ for (int i = 0; i < numToReceive; ++i) { TextMessage message = (TextMessage) consumer.receive(5000); assertNotNull(message); assertEquals("Test Text Message: " + i, message.getText()); } } finally { consumer.close(); } } }
[ "lilin@lvmama.com" ]
lilin@lvmama.com
e7369e807f820160781f5a0b53e23489e985c50f
4dbec7fa8cb9175a78e07b24a5acae1c8e39a008
/src/com/imageUtil/WebImageCache.java
b5ad380031c46d5ff865d2a7701e444cb73fd4a4
[]
no_license
longtaoge/TestCame
333bd39fea8a0b97b1ae4abc93494711409be5a9
0acc0bc1dc439117804468af398faa57c63aaf5a
refs/heads/master
2021-01-10T08:17:47.209091
2015-10-13T16:40:09
2015-10-13T16:40:09
44,188,672
1
1
null
null
null
null
UTF-8
Java
false
false
4,084
java
package com.imageUtil; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.lang.ref.SoftReference; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Bitmap.CompressFormat; import android.graphics.BitmapFactory; public class WebImageCache { private static final String DISK_CACHE_PATH = "/web_image_cache/"; private ConcurrentHashMap<String, SoftReference<Bitmap>> memoryCache; private String diskCachePath; private boolean diskCacheEnabled = false; private ExecutorService writeThread; public WebImageCache(Context context) { // Set up in-memory cache store memoryCache = new ConcurrentHashMap<String, SoftReference<Bitmap>>(); // Set up disk cache store Context appContext = context.getApplicationContext(); diskCachePath = appContext.getCacheDir().getAbsolutePath() + DISK_CACHE_PATH; File outFile = new File(diskCachePath); outFile.mkdirs(); diskCacheEnabled = outFile.exists(); // Set up threadpool for image fetching tasks writeThread = Executors.newSingleThreadExecutor(); } public Bitmap get(final String url) { Bitmap bitmap = null; // Check for image in memory bitmap = getBitmapFromMemory(url); // Check for image on disk cache if (bitmap == null) { bitmap = getBitmapFromDisk(url); // Write bitmap back into memory cache if (bitmap != null) { cacheBitmapToMemory(url, bitmap); } } return bitmap; } public void put(String url, Bitmap bitmap) { cacheBitmapToMemory(url, bitmap); cacheBitmapToDisk(url, bitmap); } public void remove(String url) { if (url == null) { return; } // Remove from memory cache memoryCache.remove(getCacheKey(url)); // Remove from file cache File f = new File(diskCachePath, getCacheKey(url)); if (f.exists() && f.isFile()) { f.delete(); } } public void clear() { // Remove everything from memory cache memoryCache.clear(); // Remove everything from file cache File cachedFileDir = new File(diskCachePath); if (cachedFileDir.exists() && cachedFileDir.isDirectory()) { File[] cachedFiles = cachedFileDir.listFiles(); for (File f : cachedFiles) { if (f.exists() && f.isFile()) { f.delete(); } } } } private void cacheBitmapToMemory(final String url, final Bitmap bitmap) { memoryCache.put(getCacheKey(url), new SoftReference<Bitmap>(bitmap)); } private void cacheBitmapToDisk(final String url, final Bitmap bitmap) { writeThread.execute(new Runnable() { @Override public void run() { if (diskCacheEnabled) { BufferedOutputStream ostream = null; try { ostream = new BufferedOutputStream( new FileOutputStream(new File(diskCachePath, getCacheKey(url))), 2 * 1024); bitmap.compress(CompressFormat.PNG, 100, ostream); } catch (FileNotFoundException e) { e.printStackTrace(); } finally { try { if (ostream != null) { ostream.flush(); ostream.close(); } } catch (IOException e) { } } } } }); } private Bitmap getBitmapFromMemory(String url) { Bitmap bitmap = null; SoftReference<Bitmap> softRef = memoryCache.get(getCacheKey(url)); if (softRef != null) { bitmap = softRef.get(); } return bitmap; } private Bitmap getBitmapFromDisk(String url) { Bitmap bitmap = null; if (diskCacheEnabled) { String filePath = getFilePath(url); File file = new File(filePath); if (file.exists()) { bitmap = BitmapFactory.decodeFile(filePath); } } return bitmap; } private String getFilePath(String url) { return diskCachePath + getCacheKey(url); } private String getCacheKey(String url) { if (url == null) { throw new RuntimeException("Null url passed in"); } else { return url.replaceAll("[.:/,%?&=]", "+").replaceAll("[+]+", "+"); } } }
[ "61852263@qq.com" ]
61852263@qq.com
9527c3b0ea8a209285bd37b363570d38975b285c
212a49f1202700a4c4fb41d9e8d756ab9cd825f6
/trans_workplace/service-medicaltrans/rpc/medicaltrans-base-rpc/generated/segi/medicaltrans/base/userposit/UserGraLocationInfoPaginatorIceHolder.java
9403d777e0315360898450cfe5ba570c1b2aba3e
[]
no_license
zhyangzzz/medicaltrans
3a47df2618aee9ebdcfb591ef32ed9bd4046f855
6c0a63decc4c108db9f7a2f29f64794021824a4f
refs/heads/master
2020-03-31T20:10:04.373005
2018-10-11T03:36:49
2018-10-11T03:36:49
152,528,128
0
1
null
null
null
null
UTF-8
Java
false
false
845
java
// ********************************************************************** // // Copyright (c) 2003-2016 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** // // Ice version 3.6.3 // // <auto-generated> // // Generated from file `userposit.ice' // // Warning: do not edit this file. // // </auto-generated> // package segi.medicaltrans.base.userposit; public final class UserGraLocationInfoPaginatorIceHolder extends Ice.Holder<UserGraLocationInfoPaginatorIce> { public UserGraLocationInfoPaginatorIceHolder() { } public UserGraLocationInfoPaginatorIceHolder(UserGraLocationInfoPaginatorIce value) { super(value); } }
[ "522137140@qq.com" ]
522137140@qq.com
ec87f702ef22c50f29597426b4076b6d7a465d14
74ca72a287d13b4a677069f6a82998e684e5af81
/dsj_house/dsj-warrant-back/src/main/java/com/dsj/data/web/utils/RequestParamHelper.java
658a7e7f3bf1461a0434a286cf8233a33b46122b
[]
no_license
tomdev2008/dsj_house
5d8187b3fca63bd2fc83ea781ea9cda0a91943a2
988ab003b1fec4dfb12d3712adde58a4abef067c
refs/heads/master
2020-03-29T05:17:18.866087
2017-12-01T11:53:58
2017-12-01T11:53:58
149,575,972
0
1
null
null
null
null
UTF-8
Java
false
false
666
java
package com.dsj.data.web.utils; import java.util.Enumeration; import java.util.HashMap; import java.util.Map; import javax.servlet.ServletRequest; /** * 提取request 请求参数封装成map * @author majian * @date 2017-3-12 14:23:33 */ public class RequestParamHelper { public static Map<String,Object> paramsToMaps(ServletRequest request) { Map<String,Object> params=new HashMap<String,Object>(); Enumeration<String> keys=request.getParameterNames(); while(keys.hasMoreElements()){ String key=keys.nextElement(); params.put(key, request.getParameter(key)); } return params; } }
[ "940678055@qq.com" ]
940678055@qq.com
d9575ff5f2185865f522d93f43bb531f174993da
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/neo4j--neo4j/7d5af5798b4986a17ddbd97018329b7ed788d507/before/SegmentsTest.java
f310a6a5b7532ed14154dd2c2e66e3e63c7b5009
[]
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
8,062
java
/* * Copyright (c) 2002-2016 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.coreedge.raft.log.segmented; import org.junit.Test; import java.io.File; import java.util.ArrayList; import java.util.List; import org.neo4j.coreedge.raft.replication.ReplicatedContent; import org.neo4j.coreedge.raft.state.ChannelMarshal; import org.neo4j.io.fs.FileSystemAbstraction; import org.neo4j.logging.LogProvider; import static java.util.Arrays.asList; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.Matchers.any; import static org.mockito.Mockito.RETURNS_MOCKS; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; public class SegmentsTest { private final FileSystemAbstraction fsa = mock( FileSystemAbstraction.class, RETURNS_MOCKS ); private final File baseDirectory = new File( "." ); private final FileNames fileNames = new FileNames( baseDirectory ); @SuppressWarnings( "unchecked" ) private final ChannelMarshal<ReplicatedContent> contentMarshal = mock( ChannelMarshal.class ); private final LogProvider logProvider = mock( LogProvider.class, RETURNS_MOCKS ); private final SegmentHeader header = mock( SegmentHeader.class ); private final List<SegmentFile> segmentFiles = asList( new SegmentFile( fsa, fileNames.getForVersion( 0 ), contentMarshal, logProvider, header ), new SegmentFile( fsa, fileNames.getForVersion( 1 ), contentMarshal, logProvider, header ) ); @Test public void shouldCreateNext() throws Exception { // Given try( Segments segments = new Segments( fsa, fileNames, segmentFiles, contentMarshal, logProvider, -1 ) ) { // When segments.rotate( 10, 10, 12 ); segments.last().closeWriter(); SegmentFile last = segments.last(); // Then assertEquals( 10, last.header().prevFileLastIndex() ); assertEquals( 10, last.header().prevIndex() ); assertEquals( 12, last.header().prevTerm() ); } } @Test public void shouldDeleteOnPrune() throws Exception { verifyZeroInteractions( fsa ); // Given try( Segments segments = new Segments( fsa, fileNames, segmentFiles, contentMarshal, logProvider, -1 ) ) { SegmentFile toPrune = segments.rotate( -1, -1, -1 ); // this is version 0 and will be deleted on prune later segments.last().closeWriter(); // need to close writer otherwise dispose will not be called segments.rotate( 10, 10, 2 ); segments.last().closeWriter(); // ditto segments.rotate( 20, 20, 2 ); // When segments.prune( 11 ); verify( fsa, times( segmentFiles.size() ) ).deleteFile( fileNames.getForVersion( toPrune.header().version() ) ); } } @Test public void shouldNeverDeleteOnTruncate() throws Exception { // Given try( Segments segments = new Segments( fsa, fileNames, segmentFiles, contentMarshal, logProvider, -1 ) ) { segments.rotate( -1, -1, -1 ); segments.last().closeWriter(); // need to close writer otherwise dispose will not be called segments.rotate( 10, 10, 2 ); // we will truncate this whole file away segments.last().closeWriter(); // When segments.truncate( 20, 9, 4 ); // Then verify( fsa, times( 0 ) ).deleteFile( any() ); } } @Test public void shouldDeleteTruncatedFilesOnPrune() throws Exception { // Given try( Segments segments = new Segments( fsa, fileNames, segmentFiles, contentMarshal, logProvider, -1 ) ) { SegmentFile toBePruned = segments.rotate( -1, -1, -1 ); segments.last().closeWriter(); // need to close writer otherwise dispose will not be called SegmentFile toBeTruncated = segments.rotate( 10, 10, 2 );// we will truncate this whole file away segments.last().closeWriter(); // When // We truncate a whole file segments.truncate( 20, 9, 4 ); // And we prune all files before that file segments.prune( 10 ); // Then // the truncate file is part of the deletes that happen while prunning verify( fsa, times( segmentFiles.size() ) ).deleteFile( fileNames.getForVersion( toBePruned.header().version() ) ); verify( fsa, times( segmentFiles.size() ) ).deleteFile( fileNames.getForVersion( toBeTruncated.header().version() ) ); } } @Test public void shouldCloseTheSegments() throws Exception { // Given Segments segments = new Segments( fsa, fileNames, segmentFiles, contentMarshal, logProvider, -1 ); // When segments.close(); // Then segments.getSegmentFileIteratorAtEnd().forEachRemaining( segment -> assertTrue( segment.isDisposed() ) ); } @Test public void shouldNotSwallowExceptionOnClose() throws Exception { // Given List<SegmentFile> segmentFiles = new ArrayList<>( this.segmentFiles.size() ); for ( SegmentFile segmentFile: this.segmentFiles ) { SegmentFile spy = spy( segmentFile ); doThrow( new RuntimeException() ).when( spy ).close(); segmentFiles.add( spy ); } Segments segments = new Segments( fsa, fileNames, segmentFiles, contentMarshal, logProvider, -1 ); // When try { segments.close(); fail( "should have thrown" ); } catch ( RuntimeException ex) { // Then Throwable[] suppressed = ex.getSuppressed(); assertEquals( 1, suppressed.length ); assertTrue( suppressed[0] instanceof RuntimeException ); } } @Test public void shouldAllowOutOfBoundsPruneIndex() throws Exception { //Given a prune index of n, if the smallest value for a segment file is n+c, the pruning should not remove // any files and not result in a failure. Segments segments = new Segments( fsa, fileNames, segmentFiles, contentMarshal, logProvider, -1 ); segments.rotate( -1, -1, -1 ); segments.last().closeWriter(); // need to close writer otherwise dispose will not be called segments.rotate( 10, 10, 2 ); // we will truncate this whole file away segments.last().closeWriter(); segments.prune( 11 ); segments.rotate( 20, 20, 3 ); // we will truncate this whole file away segments.last().closeWriter(); //when SegmentFile oldestNotDisposed = segments.prune( -1 ); //then SegmentHeader header = oldestNotDisposed.header(); assertEquals( 10, header.prevFileLastIndex() ); assertEquals( 10, header.prevIndex() ); assertEquals( 2, header.prevTerm() ); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
ea2f5a269f90bea2d61cb15498fc6cc3b47637f0
ac9abcb25dfeb41df2dffb4608d0d69795526d1a
/src/com/toolbox/cms/action/admin/assist/CmsCommentAct.java
c4ea5b4a186efd5a79579a2bce8a999f2131248f
[]
no_license
nextflower/toolbox
d7716f1a1b838b217aba08c76eac91005f56092a
d002c6db442fb1078ae5356fe577d4ec63309b19
refs/heads/master
2016-09-05T13:04:34.875755
2015-05-12T10:47:40
2015-05-12T10:47:40
35,481,909
1
0
null
null
null
null
UTF-8
Java
false
false
6,575
java
package com.toolbox.cms.action.admin.assist; import static com.toolbox.common.page.SimplePage.cpn; import java.util.Date; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import com.toolbox.cms.entity.assist.CmsComment; import com.toolbox.cms.entity.assist.CmsCommentExt; import com.toolbox.cms.manager.assist.CmsCommentMng; import com.toolbox.common.page.Pagination; import com.toolbox.common.web.CookieUtils; import com.toolbox.core.entity.CmsSite; import com.toolbox.core.manager.CmsLogMng; import com.toolbox.core.web.WebErrors; import com.toolbox.core.web.util.CmsUtils; @Controller public class CmsCommentAct { private static final Logger log = LoggerFactory .getLogger(CmsCommentAct.class); @RequiresPermissions("comment:v_list") @RequestMapping("/comment/v_list.do") public String list(Integer queryContentId, Boolean queryChecked, Boolean queryRecommend, Integer pageNo, HttpServletRequest request, ModelMap model) { CmsSite site = CmsUtils.getSite(request); Pagination pagination = manager.getPage(site.getId(), queryContentId, null, queryChecked, queryRecommend, true, cpn(pageNo), CookieUtils.getPageSize(request)); model.addAttribute("pagination", pagination); return "comment/list"; } @RequiresPermissions("comment:v_add") @RequestMapping("/comment/v_add.do") public String add(ModelMap model) { return "comment/add"; } @RequiresPermissions("comment:v_edit") @RequestMapping("/comment/v_edit.do") public String edit(Integer id, HttpServletRequest request, ModelMap model) { WebErrors errors = validateEdit(id, request); if (errors.hasErrors()) { return errors.showErrorPage(model); } model.addAttribute("cmsComment", manager.findById(id)); return "comment/edit"; } @RequiresPermissions("comment:o_update") @RequestMapping("/comment/o_update.do") public String update(Integer queryContentId, Boolean queryChecked, Boolean queryRecommend,String reply, CmsComment bean, CmsCommentExt ext, Integer pageNo, HttpServletRequest request, ModelMap model) { WebErrors errors = validateUpdate(bean.getId(), request); if (errors.hasErrors()) { return errors.showErrorPage(model); } //若回复内容不为空而且回复更新,则设置回复时间,已最新回复时间为准 if(StringUtils.isNotBlank(ext.getReply())){ bean.setReplayTime(new Date()); bean.setReplayUser(CmsUtils.getUser(request)); } bean = manager.update(bean, ext); log.info("update CmsComment id={}.", bean.getId()); cmsLogMng.operating(request, "cmsComment.log.update", "id=" + bean.getId()); return list(queryContentId, queryChecked, queryRecommend, pageNo, request, model); } @RequiresPermissions("comment:o_delete") @RequestMapping("/comment/o_delete.do") public String delete(Integer queryContentId, Boolean queryChecked, Boolean queryRecommend, Integer[] ids, Integer pageNo, HttpServletRequest request, ModelMap model) { WebErrors errors = validateDelete(ids, request); if (errors.hasErrors()) { return errors.showErrorPage(model); } CmsComment[] beans = manager.deleteByIds(ids); for (CmsComment bean : beans) { log.info("delete CmsComment id={}", bean.getId()); cmsLogMng.operating(request, "cmsComment.log.delete", "id=" + bean.getId()); } return list(queryContentId, queryChecked, queryRecommend, pageNo, request, model); } @RequiresPermissions("comment:o_check") @RequestMapping("/comment/o_check.do") public String check(Integer queryCtgId, Boolean queryRecommend, Boolean queryChecked, Integer[] ids, Integer pageNo, HttpServletRequest request, ModelMap model) { WebErrors errors = validateDelete(ids, request); if (errors.hasErrors()) { return errors.showErrorPage(model); } CmsComment[] beans = manager.checkByIds(ids,CmsUtils.getUser(request),true); for (CmsComment bean : beans) { log.info("delete CmsGuestbook id={}", bean.getId()); cmsLogMng.operating(request, "cmsComment.log.check", "id=" + bean.getId() + ";title=" + bean.getReplayHtml()); } return list(queryCtgId, queryRecommend, queryChecked, pageNo, request, model); } @RequiresPermissions("comment:o_check_cancel") @RequestMapping("/comment/o_check_cancel.do") public String cancelCheck(Integer queryCtgId, Boolean queryRecommend, Boolean queryChecked, Integer[] ids, Integer pageNo, HttpServletRequest request, ModelMap model) { WebErrors errors = validateDelete(ids, request); if (errors.hasErrors()) { return errors.showErrorPage(model); } CmsComment[] beans = manager.checkByIds(ids,CmsUtils.getUser(request),false); for (CmsComment bean : beans) { log.info("delete CmsGuestbook id={}", bean.getId()); cmsLogMng.operating(request, "cmsComment.log.cancelCheck", "id=" + bean.getId() + ";title=" + bean.getReplayHtml()); } return list(queryCtgId, queryRecommend, queryChecked, pageNo, request, model); } private WebErrors validateEdit(Integer id, HttpServletRequest request) { WebErrors errors = WebErrors.create(request); CmsSite site = CmsUtils.getSite(request); if (vldExist(id, site.getId(), errors)) { return errors; } return errors; } private WebErrors validateUpdate(Integer id, HttpServletRequest request) { WebErrors errors = WebErrors.create(request); CmsSite site = CmsUtils.getSite(request); if (vldExist(id, site.getId(), errors)) { return errors; } return errors; } private WebErrors validateDelete(Integer[] ids, HttpServletRequest request) { WebErrors errors = WebErrors.create(request); CmsSite site = CmsUtils.getSite(request); if (errors.ifEmpty(ids, "ids")) { return errors; } for (Integer id : ids) { vldExist(id, site.getId(), errors); } return errors; } private boolean vldExist(Integer id, Integer siteId, WebErrors errors) { if (errors.ifNull(id, "id")) { return true; } CmsComment entity = manager.findById(id); if (errors.ifNotExist(entity, CmsComment.class, id)) { return true; } if (!entity.getSite().getId().equals(siteId)) { errors.notInSite(CmsComment.class, id); return true; } return false; } @Autowired private CmsLogMng cmsLogMng; @Autowired private CmsCommentMng manager; }
[ "dv3333@163.com" ]
dv3333@163.com
1bd1b41410a584e0cb11a813a561d9cc8eeaa59d
4197b9914a743635ac1b785b5cb04378316d982f
/Gadgetmart_Main_Backend/src/main/java/lk/swlc/GadgetMartBackend/GadgetMartBackend/controller/OrderController.java
e50084d966b48bda5f78099beafacb286c2c7ca0
[]
no_license
MalinduDilshan97/GadgetMart_CPU6003
4152ece92612280c62fb3567f390cd5fe04a8fb4
3573c7e49f6c70e0c7dd794cacb23c4c18cfe7c3
refs/heads/master
2023-03-28T19:47:14.369895
2021-04-07T14:33:21
2021-04-07T14:33:21
355,558,584
0
0
null
null
null
null
UTF-8
Java
false
false
2,853
java
/* *Time :- 9:31 AM *Author :- Uvindu Mohotti *Special Thing :- */ package lk.swlc.GadgetMartBackend.GadgetMartBackend.controller; import lk.swlc.GadgetMartBackend.GadgetMartBackend.api.OrderManagement; import lk.swlc.GadgetMartBackend.GadgetMartBackend.entity.Order; import lk.swlc.GadgetMartBackend.GadgetMartBackend.model.order.CommonOrderModel; import lk.swlc.GadgetMartBackend.GadgetMartBackend.model.order.NodeOrderReturnModel; import lk.swlc.GadgetMartBackend.GadgetMartBackend.model.order.OrderModel; import lk.swlc.GadgetMartBackend.GadgetMartBackend.model.order.OrderSearchSpringModel; import lk.swlc.GadgetMartBackend.GadgetMartBackend.model.orderdetail.FrontReturnOrderModel; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController @Controller @CrossOrigin @RequestMapping(value = "/order") public class OrderController { @Autowired private OrderManagement orderManagement; @PostMapping @ResponseStatus(HttpStatus.OK) public ResponseEntity addOrder(@RequestBody CommonOrderModel commonOrderModel) { Order order = orderManagement.addOrderAPI(commonOrderModel); if (order == null) { return new ResponseEntity(order, HttpStatus.NOT_FOUND); } else { return new ResponseEntity(order, HttpStatus.OK); } } @PostMapping(value = "/check") @ResponseStatus(HttpStatus.OK) public ResponseEntity check(@RequestBody CommonOrderModel commonOrderModel) { NodeOrderReturnModel checkfunction = orderManagement.checkfunction(commonOrderModel); if (checkfunction == null) { return new ResponseEntity(checkfunction, HttpStatus.NOT_FOUND); } else { return new ResponseEntity(checkfunction, HttpStatus.OK); } } @GetMapping(value = "/{username}") @ResponseStatus(HttpStatus.OK) public ResponseEntity search(@PathVariable(value = "username") String username) { List<FrontReturnOrderModel> searchorder = orderManagement.searchorder(username); if (searchorder == null) { return new ResponseEntity(searchorder, HttpStatus.NOT_FOUND); } else { return new ResponseEntity(searchorder, HttpStatus.OK); } } @GetMapping @ResponseStatus(HttpStatus.OK) public ResponseEntity getallOrader() { List<FrontReturnOrderModel> searchorder = orderManagement.getallOrders(); if (searchorder == null) { return new ResponseEntity(searchorder, HttpStatus.NOT_FOUND); } else { return new ResponseEntity(searchorder, HttpStatus.OK); } } }
[ "dilshanmalindu.pk@gmail.com" ]
dilshanmalindu.pk@gmail.com
acc1638d8af70a336d2a1b7cb1d6f4f159012ad4
2bea415b1997fb13512957cfcbfa75d591c23dae
/aili/aili-hibernate/src/main/java/org/hbhk/aili/hibernate/share/utils/PoJo2CriteriaUtil.java
1609d9110e4ce397afe79970bf74ff55d773456d
[]
no_license
konglingjuanyi/aili-framework
d1aac2a02c3863e70cfaed2fefd570dcb1fe9d99
2453de39f7a94196a273a10204e0551c36652c81
refs/heads/master
2021-01-23T22:30:00.200605
2015-04-05T06:28:48
2015-04-05T06:28:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,526
java
package org.hbhk.aili.hibernate.share.utils; import java.beans.IntrospectionException; import java.beans.PropertyDescriptor; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Date; import java.util.List; import javassist.Modifier; import org.hbhk.aili.hibernate.share.model.Page; import org.hibernate.Criteria; import org.hibernate.criterion.Projections; import org.hibernate.criterion.Restrictions; /** 将POJO对象转化为HQL标准查询条件 */ public class PoJo2CriteriaUtil { /** * 获取分页数据 * * @param criteria * 标准查询条件 * @param pojo * pojo对象 * @param isLike * 是否使用Like模式 * @param pagesize * 每页显示条目数 * @param currpage * 页标 * @return 分页数据 * @throws IllegalArgumentException * @throws IntrospectionException * @throws IllegalAccessException * @throws InvocationTargetException */ @SuppressWarnings("unchecked") public <T> Page<T> findByPage(Criteria criteria, T pojo, Boolean isLike, int pagesize, int currpage) throws IllegalArgumentException, IntrospectionException, IllegalAccessException, InvocationTargetException { Page<T> page = new Page<T>(); criteria = this.converse(criteria, pojo, isLike); // 统计页数 Long count = (Long) criteria.setProjection(Projections.rowCount()) .uniqueResult(); criteria.setProjection(null); page.setPageSize(pagesize); page.setTotalCount(count.intValue()); if (currpage > page.getPageNo()) { currpage = page.getPageNo(); } page.setPageNo(currpage); // 查询 final int fristResult = (currpage - 1) * page.getPageSize(); List<T> list = criteria.setFirstResult(fristResult) .setMaxResults(page.getPageSize()).list(); page.setData(list); return page; } /** * 将POJO对象转化为HQL标准查询条件 * * @param criteria * 标准查询条件 * @param pojo * pojo对象 * @param isLike * 是否使用Like模式 * @return 标准查询条件 * @throws IntrospectionException * @throws IllegalArgumentException * @throws IllegalAccessException * @throws InvocationTargetException */ public <T> Criteria converse(Criteria criteria, T pojo, Boolean isLike) throws IntrospectionException, IllegalArgumentException, IllegalAccessException, InvocationTargetException { if (pojo == null) return criteria; String propertyName = null; PropertyDescriptor pd = null; Method getMethod = null; String timeStr = null; Date timeDate = null; Class<? extends Object> clazz = pojo.getClass(); Field[] fields = clazz.getDeclaredFields(); // 遍历所有属性 for (Field field : fields) { // 过滤final与 static 变量 int mod = field.getModifiers(); if (Modifier.isFinal(mod) || Modifier.isStatic(mod) || field.getType().isInterface()) { continue; } propertyName = field.getName(); pd = new PropertyDescriptor(propertyName, clazz); // 获得所有属性的读取方法 getMethod = pd.getReadMethod(); // 执行读取方法,获得属性值 Object value = getMethod.invoke(pojo); // 如果属性值为null,就略过 if (value == null || "".equals(value.toString().trim())) { continue; } // 如果不为空.判断是否开启模糊查询,添加查询条件,并且加上%%符号。 String typeSimpleName = field.getType().getSimpleName(); if (typeSimpleName.equals("Date")) { if (propertyName.toLowerCase().contains("start")) { timeStr = DateUtil.formatDate(value, "yyyy-MM-dd") + " 00:00:00"; timeDate = DateUtil.parseDate(timeStr, null); criteria.add(Restrictions.ge(propertyName, timeDate)); } if (propertyName.toLowerCase().contains("end")) { timeStr = DateUtil.formatDate(value, "yyyy-MM-dd") + " 23:59:59"; timeDate = DateUtil.parseDate(timeStr, null); criteria.add(Restrictions.le(propertyName, timeDate)); } } else if (typeSimpleName.equals("String")) { if (isLike) { criteria.add(Restrictions.like(propertyName, "%" + value + "%")); } else { criteria.add(Restrictions.eq(propertyName, value)); } } else { criteria.add(Restrictions.eq(propertyName, value)); } } return criteria; } }
[ "1024784402@qq.com" ]
1024784402@qq.com
df3daa80bcc33e4d6712b4d8285171eab8414b2f
72e41bf7f6678728b848425d2f7c3db8edca95d9
/TSS.Java/src/tss/tpm/TPMT_TK_AUTH.java
ec42d4fdade8e0fe1ff7997c71c229b346512185
[ "MIT" ]
permissive
hhluci/TSS.MSR
d398b7a58fb0215e924b6e6db7daffd1dcae6595
6c3668f727ae9f4905fa0cea88fff1eee7374df0
refs/heads/master
2021-05-17T23:53:41.044699
2020-03-29T05:07:26
2020-03-29T05:07:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,119
java
package tss.tpm; import tss.*; // -----------This is an auto-generated file: do not edit //>>> /** * This ticket is produced by TPM2_PolicySigned() and TPM2_PolicySecret() when the authorization has an expiration time. If nonceTPM was provided in the policy command, the ticket is computed by */ public class TPMT_TK_AUTH extends TpmStructure { /** * @param _tag ticket structure tag * @param _hierarchy the hierarchy of the object used to produce the ticket * @param _digest This shall be the HMAC produced using a proof value of hierarchy. */ public TPMT_TK_AUTH(TPM_ST _tag,TPM_HANDLE _hierarchy,byte[] _digest) { tag = _tag; hierarchy = _hierarchy; digest = _digest; } /** * This ticket is produced by TPM2_PolicySigned() and TPM2_PolicySecret() when the authorization has an expiration time. If nonceTPM was provided in the policy command, the ticket is computed by */ public TPMT_TK_AUTH() {}; /** * ticket structure tag */ public TPM_ST tag; /** * the hierarchy of the object used to produce the ticket */ public TPM_HANDLE hierarchy; /** * size in octets of the buffer field; may be 0 */ // private short digestSize; /** * This shall be the HMAC produced using a proof value of hierarchy. */ public byte[] digest; @Override public void toTpm(OutByteBuf buf) { tag.toTpm(buf); hierarchy.toTpm(buf); buf.writeInt((digest!=null)?digest.length:0, 2); if(digest!=null) buf.write(digest); } @Override public void initFromTpm(InByteBuf buf) { tag = TPM_ST.fromTpm(buf); hierarchy = TPM_HANDLE.fromTpm(buf); int _digestSize = buf.readInt(2); digest = new byte[_digestSize]; buf.readArrayOfInts(digest, 1, _digestSize); } @Override public byte[] toTpm() { OutByteBuf buf = new OutByteBuf(); toTpm(buf); return buf.getBuf(); } public static TPMT_TK_AUTH fromTpm (byte[] x) { TPMT_TK_AUTH ret = new TPMT_TK_AUTH(); InByteBuf buf = new InByteBuf(x); ret.initFromTpm(buf); if (buf.bytesRemaining()!=0) throw new AssertionError("bytes remaining in buffer after object was de-serialized"); return ret; } public static TPMT_TK_AUTH fromTpm (InByteBuf buf) { TPMT_TK_AUTH ret = new TPMT_TK_AUTH(); ret.initFromTpm(buf); return ret; } @Override public String toString() { TpmStructurePrinter _p = new TpmStructurePrinter("TPMT_TK_AUTH"); toStringInternal(_p, 1); _p.endStruct(); return _p.toString(); } @Override public void toStringInternal(TpmStructurePrinter _p, int d) { _p.add(d, "TPM_ST", "tag", tag); _p.add(d, "TPM_HANDLE", "hierarchy", hierarchy); _p.add(d, "byte", "digest", digest); }; }; //<<<
[ "Andrey.Marochko@microsoft.com" ]
Andrey.Marochko@microsoft.com
571ee8a17404a5752916adb37d7776221a7e55de
b64611db411272d55ba203c828ef912084f4690e
/service_interface/src/main/java/com/xingfugo/business/module/Goodsask.java
09917ec5040e876173cbf9f733373dd0d891a5fb
[]
no_license
stranger2008/txmp
82ff74bb0cd1189b940873df82bad838acd51d20
293fdf5e6dd3a30d06a934615823ad601c59edb6
refs/heads/master
2021-01-10T03:26:55.043893
2016-01-03T14:37:18
2016-01-03T14:37:18
48,640,606
1
1
null
null
null
null
UTF-8
Java
false
false
2,520
java
package com.xingfugo.business.module; import java.io.Serializable; import java.sql.Timestamp; import javax.validation.constraints.NotNull; import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.NotEmpty; /** * @function 功能 记录商品咨询信息实体 * @date 创建日期 Fri Mar 23 11:24:44 CST 2012 */ public class Goodsask implements Serializable { private static final long serialVersionUID = 1L; private Integer trade_id; public Integer getTrade_id() { return trade_id; } public void setTrade_id(Integer trade_id) { this.trade_id = trade_id; } @NotNull private Integer goods_id; public Integer getGoods_id() { return goods_id; } public void setGoods_id(Integer goods_id) { this.goods_id = goods_id; } private String c_type; public String getC_type() { return c_type; } public void setC_type(String c_type) { this.c_type = c_type; } private String cust_id; public String getCust_id() { return cust_id; } public void setCust_id(String cust_id) { this.cust_id = cust_id; } @NotNull private Integer user_id; public Integer getUser_id() { return user_id; } public void setUser_id(Integer user_id) { this.user_id = user_id; } @NotEmpty @Length(max=500) private String c_content; public String getC_content() { return c_content; } public void setC_content(String c_content) { this.c_content = c_content; } private Timestamp c_date; public Timestamp getC_date() { return c_date; } public void setC_date(Timestamp c_date) { this.c_date = c_date; } private String re_cust_id; public String getRe_cust_id() { return re_cust_id; } public void setRe_cust_id(String re_cust_id) { this.re_cust_id = re_cust_id; } @Length(max=500) private String re_content; public String getRe_content() { return re_content; } public void setRe_content(String re_content) { this.re_content = re_content; } private String re_date; public String getRe_date() { return re_date; } public void setRe_date(String re_date) { this.re_date = re_date; } private String re_man; public String getRe_man() { return re_man; } public void setRe_man(String re_man) { this.re_man = re_man; } private String is_enable; public String getIs_enable() { return is_enable; } public void setIs_enable(String is_enable) { this.is_enable = is_enable; } private String star; public String getStar() { return star; } public void setStar(String star) { this.star = star; } }
[ "947069540@qq.com" ]
947069540@qq.com
183bfa3e1e76ab7ea55c016207a217ba3955d67d
62e334192393326476756dfa89dce9f0f08570d4
/tk_code/tiku-essay-app/essay-server/src/main/java/com/huatu/tiku/essay/repository/EssayStandardAnswerRuleRepository.java
3f6dfce30285a2f34fda25de7d7803c6958fb7ba
[]
no_license
JellyB/code_back
4796d5816ba6ff6f3925fded9d75254536a5ddcf
f5cecf3a9efd6851724a1315813337a0741bd89d
refs/heads/master
2022-07-16T14:19:39.770569
2019-11-22T09:22:12
2019-11-22T09:22:12
223,366,837
1
2
null
2022-06-30T20:21:38
2019-11-22T09:15:50
Java
UTF-8
Java
false
false
1,101
java
package com.huatu.tiku.essay.repository; import com.huatu.tiku.essay.entity.EssayStandardAnswerRule; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.transaction.annotation.Transactional; import java.util.List; /** * Created by huangqp on 2017\12\6 0006. */ public interface EssayStandardAnswerRuleRepository extends JpaRepository<EssayStandardAnswerRule, Long> { List<EssayStandardAnswerRule> findByQuestionDetailIdAndBizStatusAndStatus(long questionId, int bizStatus, int status); List<EssayStandardAnswerRule> findByQuestionDetailIdInAndBizStatusAndStatus(List<Long> questionIds, int bizStatus, int status); List<EssayStandardAnswerRule> findByQuestionDetailIdAndTypeAndBizStatusAndStatus(long questionId,int type ,int bizStatus, int status); @Transactional @Modifying @Query("update EssayStandardAnswerRule t set t.status= -1 where t.questionDetailId = ?1") int delByQuestionDetailId(long questionDetailId); }
[ "jelly_b@126.com" ]
jelly_b@126.com
6add26e109de4f831e9e2cd16fd7b1977e4446cc
f864e3dca27b9545cf9ce8aa1e67a422b8feb08b
/main/src/jp/hishidama/eclipse_plugin/dmdl_editor/internal/extension/portergen/DirectioSeqfileExporterGenerator.java
a7af71ec8a6606a834503d1e9fd5f2fcb06b59d9
[]
no_license
hishidama/dmdl-editor-plugin
2692181cd4565f660d46fec44902f3374adf90ef
86533c781de491dc9a6bcf2d4a6a2f38b0f6f2c0
refs/heads/master
2021-01-18T14:38:45.188221
2013-09-07T02:45:15
2013-09-07T02:45:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,041
java
package jp.hishidama.eclipse_plugin.dmdl_editor.internal.extension.portergen; import jp.hishidama.eclipse_plugin.dmdl_editor.extension.DirectioGenerator; public class DirectioSeqfileExporterGenerator extends DirectioGenerator { @Override public String getName() { return "@directio.sequence_file"; } @Override public boolean isExporter() { return true; } @Override public String getDefaultClassName() { return "$(modelName.toCamelCase)ToSeq"; } @Override public void initializeFields() { addFieldDirectioSeqfile(); addFieldDirectioSeqfileExporter(); } @Override protected String getExtendsClassName(String modelCamelName) { String sname = String.format("Abstract%sSequenceFileOutputDescription", modelCamelName); return getGeneratedClassName(".dmdl.sequencefile.", sname); } @Override protected void appendMethods(StringBuilder sb) { appendMethodBasePath(sb); appendMethodResourcePattern(sb); appendMethodOrder(sb); appendMethodDeletePatterns(sb); } }
[ "hishi.dama@asahi.email.ne.jp" ]
hishi.dama@asahi.email.ne.jp
9741f6ad1eb380ae18ae27866f71b3b8d19f9fd5
38c4451ab626dcdc101a11b18e248d33fd8a52e0
/identifiers/batik-1.7/sources/org/apache/batik/dom/svg/SVGOMFEDistantLightElement.java
b6df9096193cdb3fd8d1d4b53934f5e39dd9274f
[]
no_license
habeascorpus/habeascorpus-data
47da7c08d0f357938c502bae030d5fb8f44f5e01
536d55729f3110aee058ad009bcba3e063b39450
refs/heads/master
2020-06-04T10:17:20.102451
2013-02-19T15:19:21
2013-02-19T15:19:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,525
java
org PACKAGE_IDENTIFIER false apache PACKAGE_IDENTIFIER false batik PACKAGE_IDENTIFIER false dom PACKAGE_IDENTIFIER false svg PACKAGE_IDENTIFIER false org PACKAGE_IDENTIFIER false apache PACKAGE_IDENTIFIER false batik PACKAGE_IDENTIFIER false dom PACKAGE_IDENTIFIER false AbstractDocument TYPE_IDENTIFIER false org PACKAGE_IDENTIFIER false apache PACKAGE_IDENTIFIER false batik PACKAGE_IDENTIFIER false util PACKAGE_IDENTIFIER false DoublyIndexedTable TYPE_IDENTIFIER false org PACKAGE_IDENTIFIER false apache PACKAGE_IDENTIFIER false batik PACKAGE_IDENTIFIER false util PACKAGE_IDENTIFIER false SVGTypes TYPE_IDENTIFIER false org PACKAGE_IDENTIFIER false w3c PACKAGE_IDENTIFIER false dom PACKAGE_IDENTIFIER false Node TYPE_IDENTIFIER false org PACKAGE_IDENTIFIER false w3c PACKAGE_IDENTIFIER false dom PACKAGE_IDENTIFIER false svg UNKNOWN_IDENTIFIER false SVGAnimatedNumber UNKNOWN_IDENTIFIER false org PACKAGE_IDENTIFIER false w3c PACKAGE_IDENTIFIER false dom PACKAGE_IDENTIFIER false svg UNKNOWN_IDENTIFIER false SVGFEDistantLightElement UNKNOWN_IDENTIFIER false SVGOMFEDistantLightElement TYPE_IDENTIFIER true SVGOMElement TYPE_IDENTIFIER false SVGFEDistantLightElement UNKNOWN_IDENTIFIER false DoublyIndexedTable TYPE_IDENTIFIER false xmlTraitInformation VARIABLE_IDENTIFIER true DoublyIndexedTable TYPE_IDENTIFIER false t VARIABLE_IDENTIFIER true DoublyIndexedTable TYPE_IDENTIFIER false SVGOMElement TYPE_IDENTIFIER false xmlTraitInformation VARIABLE_IDENTIFIER false t VARIABLE_IDENTIFIER false put METHOD_IDENTIFIER false SVG_AZIMUTH_ATTRIBUTE VARIABLE_IDENTIFIER false TraitInformation TYPE_IDENTIFIER false SVGTypes TYPE_IDENTIFIER false TYPE_NUMBER VARIABLE_IDENTIFIER false t VARIABLE_IDENTIFIER false put METHOD_IDENTIFIER false SVG_ELEVATION_ATTRIBUTE VARIABLE_IDENTIFIER false TraitInformation TYPE_IDENTIFIER false SVGTypes TYPE_IDENTIFIER false TYPE_NUMBER VARIABLE_IDENTIFIER false xmlTraitInformation VARIABLE_IDENTIFIER false t VARIABLE_IDENTIFIER false SVGOMAnimatedNumber TYPE_IDENTIFIER false azimuth VARIABLE_IDENTIFIER true SVGOMAnimatedNumber TYPE_IDENTIFIER false elevation VARIABLE_IDENTIFIER true SVGOMFEDistantLightElement METHOD_IDENTIFIER false SVGOMFEDistantLightElement METHOD_IDENTIFIER false String TYPE_IDENTIFIER false prefix VARIABLE_IDENTIFIER true AbstractDocument TYPE_IDENTIFIER false owner VARIABLE_IDENTIFIER true prefix VARIABLE_IDENTIFIER false owner VARIABLE_IDENTIFIER false initializeLiveAttributes METHOD_IDENTIFIER false initializeAllLiveAttributes METHOD_IDENTIFIER true initializeAllLiveAttributes METHOD_IDENTIFIER false initializeLiveAttributes METHOD_IDENTIFIER false initializeLiveAttributes METHOD_IDENTIFIER true azimuth VARIABLE_IDENTIFIER false createLiveAnimatedNumber METHOD_IDENTIFIER false SVG_AZIMUTH_ATTRIBUTE VARIABLE_IDENTIFIER false elevation VARIABLE_IDENTIFIER false createLiveAnimatedNumber METHOD_IDENTIFIER false SVG_ELEVATION_ATTRIBUTE VARIABLE_IDENTIFIER false String TYPE_IDENTIFIER false getLocalName METHOD_IDENTIFIER true SVG_FE_DISTANT_LIGHT_TAG VARIABLE_IDENTIFIER false SVGAnimatedNumber UNKNOWN_IDENTIFIER false getAzimuth UNKNOWN_IDENTIFIER true azimuth VARIABLE_IDENTIFIER false SVGAnimatedNumber UNKNOWN_IDENTIFIER false getElevation UNKNOWN_IDENTIFIER true elevation VARIABLE_IDENTIFIER false Node TYPE_IDENTIFIER false newNode METHOD_IDENTIFIER true SVGOMFEDistantLightElement TYPE_IDENTIFIER false DoublyIndexedTable TYPE_IDENTIFIER false getTraitInformationTable METHOD_IDENTIFIER true xmlTraitInformation VARIABLE_IDENTIFIER false
[ "pschulam@gmail.com" ]
pschulam@gmail.com
30fa90c5179cf96ecb0fe0e2d5868b9cd3d3081a
59dacd3da298bf20b452b7ab9b78608df03fb654
/src/main/java/iniciante/P1176/Main.java
ba842706e86707748e552e953aee66b15d9bcfc7
[]
no_license
mageddo/urionlinejudge
e2c82fbc739d8cf437914425e1daee91f6658bed
455e7e90507271c3e85f55b48340432a5d0d82c0
refs/heads/master
2020-09-03T01:45:52.673872
2017-09-18T01:18:39
2017-09-18T01:18:39
73,522,176
0
0
null
null
null
null
UTF-8
Java
false
false
759
java
package iniciante.P1176; import java.io.BufferedOutputStream; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /** * Created by elvis on 13/11/16. */ public class Main { public static void main(String args[]) throws IOException { final BufferedOutputStream out = new BufferedOutputStream(System.out); final BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); long i=0, j, v, count = Integer.parseInt(in.readLine()), f, last, tmp; for(; i < count; i++){ v = Integer.parseInt(in.readLine()); f = 0; last = 1; for(j=0; j < v; j++){ tmp = f; f += last; last = tmp; } out.write(String.format("Fib(%d) = %d\n", v, f).getBytes()); } out.flush(); } }
[ "edigitalb@gmail.com" ]
edigitalb@gmail.com
dd9b8515a8b398cf2a34504eff624e6ac48e3e42
9be22f5861302c7e14e01a2b20a7c4bbeca1e9ac
/src/example/SDTPConnection.java
d4a7e4912b011157daa476a50b9bcd7f139f4bf1
[ "MIT" ]
permissive
LucasBaizer/JNetwork
8182d99be927646958b74365c8b0774f956b0eaa
b08ff842b0a6a5690f808f858dc1009efca98be0
refs/heads/master
2021-09-06T09:03:39.328976
2018-02-04T18:06:16
2018-02-04T18:06:16
49,843,822
0
0
null
null
null
null
UTF-8
Java
false
false
5,053
java
package example; import java.io.IOException; import java.io.Serializable; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.security.PublicKey; import java.util.Arrays; import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; import org.jnetwork.CryptographyException; import org.jnetwork.DataPackage; import org.jnetwork.UDPConnection; import org.jnetwork.UDPUtils; /** * A JNetwork-level secure UDP connection. An explanation of how this works can * be found in the documentation for {@link SDTPServer}. * * @author Lucas Baizer */ public class SDTPConnection extends UDPConnection implements SecureConnection { private SecurityService rsa; private SecurityService aes; public SDTPConnection(String host, int port) throws CryptographyException, IOException { super(host, port); bufferSize = 8192; try { aes = new SecurityService("AES/CBC/PKCS5Padding", true); KeyGenerator keyGen = KeyGenerator.getInstance("AES"); keyGen.init(128); SecretKey aesKey = keyGen.generateKey(); aes.setPublicKey(aesKey); aes.setPrivateKey(aesKey); } catch (Exception e) { throw new CryptographyException(e); } try { rsa = new SecurityService("RSA", false); writeUnencryptedObject("JNETWORK_SECURE_UDP_INITIATE_HANDSHAKE"); DataPackage back = (DataPackage) readUnencryptedObject(); PublicKey serverRSAPublicKey = (PublicKey) back.getObjects()[0]; rsa.setPublicKey(serverRSAPublicKey); byte[] serial = UDPUtils.serializeObject(new DataPackage(rsa.encrypt(aes.getPrivateKey().getEncoded()), rsa.encrypt(aes.getParameters().getIV()))); write(serial, 0, serial.length, null); } catch (ClassNotFoundException e) { throw new IOException(e); } } public SDTPConnection(DatagramSocket socket) throws CryptographyException { super(socket); aes = new SecurityService("AES/CBC/PKCS5Padding", true); } @Override public void setBufferSize(int size) { if (size < 8192) { throw new IndexOutOfBoundsException(size + " < 8192"); } super.setBufferSize(size); } SecurityService getAESSecurityService() { return aes; } @Override public void writeUnencryptedObject(Serializable obj) throws IOException { byte[] bytes = UDPUtils.serializeObject(obj); write(bytes, 0, bytes.length, null); } @Override public void write(byte[] bytes, int offset, int length) throws IOException { write(bytes, offset, length, aes); } void write(byte[] bytes, int offset, int length, SecurityService crypto) throws IOException { try { byte[] b = bytes; if (crypto != null) { b = crypto.encrypt(bytes); } socket.send(new DatagramPacket(b, offset, b.length, targetAddress)); } catch (CryptographyException e) { throw new IOException("Failure writing bytes", e); } } /** * Reads AES-encrypted bytes into a buffer, and then decrypts them. */ @Override public int read(byte[] arr, int off, int len) throws IOException { return read(arr, off, len, aes); } int read(byte[] arr, int off, int len, SecurityService crypto) throws IOException { DatagramPacket packet = new DatagramPacket(arr, off, len); socket.receive(packet); if (crypto != null) { try { packet.setData(crypto.decrypt(trim(packet.getData()))); } catch (CryptographyException e) { throw new IOException("Failure reading bytes", e); } } return packet.getLength(); } @Override public void readUnencrypted(byte[] arr) throws IOException { DatagramPacket packet = new DatagramPacket(arr, arr.length); socket.receive(packet); } @Override public Serializable readUnencryptedObject() throws IOException, ClassNotFoundException { byte[] arr = new byte[bufferSize]; readUnencrypted(arr); return UDPUtils.deserializeObject(arr); } @Override protected DatagramPacket readPacket() throws IOException { byte[] receive = new byte[bufferSize]; DatagramPacket packet = new DatagramPacket(receive, receive.length); socket.receive(packet); try { packet.setData(aes.decrypt(trim(packet.getData()))); } catch (CryptographyException e) { throw new IOException("Failure reading bytes", e); } packet.setData(Arrays.copyOf(packet.getData(), 8192)); return packet; } byte[] trim(byte[] bytes) { int i = bytes.length - 1; while (i >= 0 && bytes[i] == 0) { --i; } return Arrays.copyOf(bytes, i + 1); } @Override public void writeUnencrypted(int v) throws IOException { write(new byte[] { (byte) v }, 0, 1, null); } @Override public void writeUnencrypted(byte[] arr, int off, int len) throws IOException { write(arr, off, len, null); } @Override public int readUnencrypted() throws IOException { byte[] arr = new byte[1]; read(arr, 0, 1, null); return arr[0]; } @Override public void readUnencrypted(byte[] arr, int off, int len) throws IOException { read(arr, off, len, null); } }
[ "titaniumsapphire32@gmail.com" ]
titaniumsapphire32@gmail.com
d65ebcb8e0595b89e04fc68c20fa2fce8d62bcb8
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes8.dex_source_from_JADX/com/facebook/redspace/badge/RedSpaceOptimisticBadgeStoreDebugHelper.java
3816c4cf5ef287e28e4feb8897b59357945c90d9
[]
no_license
pxson001/facebook-app
87aa51e29195eeaae69adeb30219547f83a5b7b1
640630f078980f9818049625ebc42569c67c69f7
refs/heads/master
2020-04-07T20:36:45.758523
2018-03-07T09:04:57
2018-03-07T09:04:57
124,208,458
4
0
null
null
null
null
UTF-8
Java
false
false
3,502
java
package com.facebook.redspace.badge; import android.content.Context; import com.facebook.common.propertybag.PropertyBag; import com.facebook.inject.ContextScope; import com.facebook.inject.ContextScoped; import com.facebook.inject.InjectorLike; import com.facebook.inject.InjectorThreadStack; import com.facebook.inject.ProvisioningException; import com.facebook.inject.ScopeSet; import java.util.Set; @ContextScoped /* compiled from: Unable to convert filters to json string */ public class RedSpaceOptimisticBadgeStoreDebugHelper { private static RedSpaceOptimisticBadgeStoreDebugHelper f21268a; private static final Object f21269b = new Object(); private static RedSpaceOptimisticBadgeStoreDebugHelper m24882a() { return new RedSpaceOptimisticBadgeStoreDebugHelper(); } public static String m24884a(RedSpaceOptimisticBadgeStore redSpaceOptimisticBadgeStore) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("Total badge count:\n").append(redSpaceOptimisticBadgeStore.i); stringBuilder.append("\nFriends with unseen stories:\n"); for (String str : redSpaceOptimisticBadgeStore.e) { stringBuilder.append("friend: ").append(str).append(" stories: ").append((Set) redSpaceOptimisticBadgeStore.f.get(str)); } stringBuilder.append("\nSeen stories:\n").append(redSpaceOptimisticBadgeStore.b); stringBuilder.append("\nFriend to stories:\n").append(redSpaceOptimisticBadgeStore.f); stringBuilder.append("\nStory to friends:\n").append(redSpaceOptimisticBadgeStore.g); return stringBuilder.toString(); } public static RedSpaceOptimisticBadgeStoreDebugHelper m24883a(InjectorLike injectorLike) { ScopeSet a = ScopeSet.a(); byte b = a.b((byte) 8); try { Context b2 = injectorLike.getScopeAwareInjector().b(); if (b2 == null) { throw new ProvisioningException("Called context scoped provider outside of context scope"); } RedSpaceOptimisticBadgeStoreDebugHelper a2; ContextScope contextScope = (ContextScope) injectorLike.getInstance(ContextScope.class); PropertyBag a3 = ContextScope.a(b2); synchronized (f21269b) { RedSpaceOptimisticBadgeStoreDebugHelper redSpaceOptimisticBadgeStoreDebugHelper; if (a3 != null) { redSpaceOptimisticBadgeStoreDebugHelper = (RedSpaceOptimisticBadgeStoreDebugHelper) a3.a(f21269b); } else { redSpaceOptimisticBadgeStoreDebugHelper = f21268a; } if (redSpaceOptimisticBadgeStoreDebugHelper == null) { InjectorThreadStack injectorThreadStack = injectorLike.getInjectorThreadStack(); contextScope.a(b2, injectorThreadStack); try { injectorThreadStack.e(); a2 = m24882a(); if (a3 != null) { a3.a(f21269b, a2); } else { f21268a = a2; } } finally { ContextScope.a(injectorThreadStack); } } else { a2 = redSpaceOptimisticBadgeStoreDebugHelper; } } return a2; } finally { a.c(b); } } }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
ee3e2b73fee611c60bba34784bbef50659b6381a
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/ui/chatting/b/d.java
7fca411409fd865536e7d1501cf009d70fc7721b
[]
no_license
jambestwick/HackWechat
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
6a34899c8bfd50d19e5a5ec36a58218598172a6b
refs/heads/master
2022-01-27T12:48:43.446804
2021-12-29T10:36:30
2021-12-29T10:36:30
249,366,791
0
0
null
2020-03-23T07:48:32
2020-03-23T07:48:32
null
UTF-8
Java
false
false
137
java
package com.tencent.mm.ui.chatting.b; public final class d { public p fhr; public d(p pVar) { this.fhr = pVar; } }
[ "malin.myemail@163.com" ]
malin.myemail@163.com
92cd76c02c6279c0be5f6aa0dc8c72328db4d590
ff15fdde0b6f3813f6d511db9666119792deb153
/eesa-core/src/test/java/com/whiuk/philip/eesa/algorithms/jaa/CRRJobClassTest.java
da7006714e1c6e26310734ea6df6a7f18052d24a
[]
no_license
philipwhiuk/EESA
1e2318ad7bf59a1d19367ccb235b2847b17794af
59365e43c65ca310bd82a3981dd669452cd74ebb
refs/heads/master
2023-07-19T16:41:57.159264
2022-01-21T23:28:33
2022-01-21T23:28:33
10,888,284
0
0
null
2023-07-17T11:52:48
2013-06-23T16:55:48
Java
UTF-8
Java
false
false
1,450
java
package com.whiuk.philip.eesa.algorithms.jaa; import static org.junit.Assert.assertEquals; import com.whiuk.philip.eesa.core.Job; import java.util.ArrayList; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; /** * Performs tests to verify the {@link CRRJobClass} class. * @author Philip */ public class CRRJobClassTest { /** * */ public CRRJobClassTest() { } /** * * @throws Exception */ @BeforeClass public static void setUpClass() { } /** * * @throws Exception */ @AfterClass public static void tearDownClass() { } /** * */ @Before public void setUp() { } /** * */ @After public void tearDown() { } /** * Test of addJob method, of class CRRJobClass. */ @Test public final void testAddJob() { System.out.println("addJob"); Job j = null; CRRJobClass instance = new CRRJobClass(0); instance.addJob(j); } /** * Test of getJobs method, of class CRRJobClass. */ @Test public final void testGetJobs() { System.out.println("getJobs"); CRRJobClass instance = new CRRJobClass(0); ArrayList<Job> expResult = new ArrayList<Job>(); ArrayList<Job> result = instance.getJobs(); assertEquals(expResult, result); } }
[ "philip@whiuk.com" ]
philip@whiuk.com
4f79b1d11b4ffdc0d9ac69f64fc14a0c6d978037
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/holowatcher-20200730/src/main/java/com/aliyun/holowatcher20200730/models/OrderBatchCreateRequest.java
2f14e9367e889787a19a617da871baf16bd98f47
[ "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
903
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.holowatcher20200730.models; import com.aliyun.tea.*; public class OrderBatchCreateRequest extends TeaModel { @NameInMap("AliyunJwt") public String aliyunJwt; @NameInMap("Params") public String params; public static OrderBatchCreateRequest build(java.util.Map<String, ?> map) throws Exception { OrderBatchCreateRequest self = new OrderBatchCreateRequest(); return TeaModel.build(map, self); } public OrderBatchCreateRequest setAliyunJwt(String aliyunJwt) { this.aliyunJwt = aliyunJwt; return this; } public String getAliyunJwt() { return this.aliyunJwt; } public OrderBatchCreateRequest setParams(String params) { this.params = params; return this; } public String getParams() { return this.params; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
e5b0b448588ee10f92fd3460774d52c545dcd06a
814a1cca586530680170598ed4217792d869c1bf
/src/main/java/com/matez/wildnature/world/gen/structures/nature/woods/oak/tree_oak5.java
fd11b7876a5190da8013a1cf2a25166dd00584cb
[ "Apache-2.0" ]
permissive
dither001/WNDev1.14.4
ce5cd9ad82ce65e93bf923fc84a79aed389466cd
effb84616610bb7081754dab84e5738e96ce120b
refs/heads/master
2022-11-09T02:52:49.815667
2020-07-03T15:26:27
2020-07-03T15:26:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,045
java
package com.matez.wildnature.world.gen.structures.nature.woods.oak; import com.matez.wildnature.Main; import com.matez.wildnature.world.gen.structures.nature.SchemFeature; import com.mojang.datafixers.Dynamic; import net.minecraft.util.math.BlockPos; import net.minecraft.block.BlockState; import net.minecraft.world.gen.feature.NoFeatureConfig; import java.util.Set; import java.util.function.Function; public class tree_oak5 extends SchemFeature { public tree_oak5(Function<Dynamic<?>, ? extends NoFeatureConfig> config, boolean doBlockNofityOnPlace) { super(config, doBlockNofityOnPlace); Main.treesList.add(this); } public tree_oak5(Function<Dynamic<?>, ? extends NoFeatureConfig> config, boolean doBlockNofityOnPlace, BlockState log, BlockState leaves) { super(config, doBlockNofityOnPlace); Main.treesList.add(this); LOG = log; LEAVES =leaves; } @Override public Set<BlockPos> setBlocks() { Block(-5,7,1,LEAVES); Block(-4,5,0,LEAVES); Block(-4,5,1,LEAVES); Block(-4,6,0,LEAVES); Block(-4,6,1,LEAVES); Block(-4,6,2,LEAVES); Block(-4,7,0,LEAVES); Block(-4,7,1,LEAVES); Block(-4,7,2,LEAVES); Block(-4,8,0,LEAVES); Block(-4,8,1,LEAVES); Block(-3,4,0,LEAVES); Block(-3,5,0,LEAVES); Block(-3,5,1,LEAVES); Block(-3,5,2,LEAVES); Block(-3,6,-1,LEAVES); Block(-3,6,0,LEAVES); Block(-3,6,1,LEAVES); Block(-3,7,-1,LEAVES); Block(-3,7,0,LEAVES); Block(-3,7,1,LOG); Block(-3,7,2,LEAVES); Block(-3,8,-2,LEAVES); Block(-3,8,-1,LEAVES); Block(-3,8,0,LEAVES); Block(-3,8,1,LOG); Block(-3,8,2,LEAVES); Block(-3,9,0,LEAVES); Block(-3,9,1,LEAVES); Block(-2,4,1,LEAVES); Block(-2,5,-1,LEAVES); Block(-2,5,0,LOG); Block(-2,5,1,LOG); Block(-2,5,2,LEAVES); Block(-2,6,-2,LEAVES); Block(-2,6,-1,LOG); Block(-2,6,0,LEAVES); Block(-2,6,1,LOG); Block(-2,6,2,LEAVES); Block(-2,6,3,LEAVES); Block(-2,7,-2,LEAVES); Block(-2,7,-1,LEAVES); Block(-2,7,0,LEAVES); Block(-2,7,1,LOG); Block(-2,7,2,LEAVES); Block(-2,7,3,LEAVES); Block(-2,8,-2,LEAVES); Block(-2,8,-1,LEAVES); Block(-2,8,0,LEAVES); Block(-2,8,1,LEAVES); Block(-2,9,-2,LEAVES); Block(-2,9,-1,LEAVES); Block(-2,9,0,LEAVES); Block(-1,1,0,LOG); Block(-1,1,1,LOG); Block(-1,4,0,LOG); Block(-1,5,0,LOG); Block(-1,5,1,LEAVES); Block(-1,6,-1,LOG); Block(-1,6,1,LEAVES); Block(-1,6,2,LEAVES); Block(-1,7,-2,LEAVES); Block(-1,7,-1,LOG); Block(-1,7,2,LEAVES); Block(-1,7,3,LEAVES); Block(-1,8,-3,LEAVES); Block(-1,8,-2,LEAVES); Block(-1,8,-1,LOG); Block(-1,8,0,LEAVES); Block(-1,8,1,LEAVES); Block(-1,8,3,LEAVES); Block(-1,9,-3,LEAVES); Block(-1,9,-2,LEAVES); Block(-1,9,-1,LOG); Block(-1,9,0,LEAVES); Block(-1,10,-1,LEAVES); Block(-1,10,0,LEAVES); Block(-1,11,-1,LEAVES); Block(0,0,0,DIRT); Block(0,1,0,LOG); Block(0,1,1,LOG); Block(0,2,0,LOG); Block(0,2,1,LOG); Block(0,3,0,LOG); Block(0,4,-1,LOG); Block(0,4,0,LOG); Block(0,5,-1,LOG); Block(0,5,0,LOG); Block(0,5,1,LOG); Block(0,6,-2,LEAVES); Block(0,6,-1,LOG); Block(0,6,0,LOG); Block(0,6,2,LEAVES); Block(0,7,-3,LEAVES); Block(0,7,-1,LOG); Block(0,7,0,LOG); Block(0,7,2,LEAVES); Block(0,7,3,LEAVES); Block(0,8,-3,LEAVES); Block(0,8,-2,LEAVES); Block(0,8,-1,LEAVES); Block(0,8,0,LEAVES); Block(0,8,1,LEAVES); Block(0,8,2,LEAVES); Block(0,8,3,LEAVES); Block(0,8,4,LEAVES); Block(0,9,-1,LEAVES); Block(0,9,0,LEAVES); Block(0,9,1,LEAVES); Block(0,9,2,LEAVES); Block(0,9,3,LEAVES); Block(0,10,-2,LEAVES); Block(0,10,0,LEAVES); Block(0,11,-1,LEAVES); Block(1,1,0,LOG); Block(1,1,1,LOG); Block(1,2,0,LOG); Block(1,3,0,LOG); Block(1,4,-1,LOG); Block(1,5,-3,LEAVES); Block(1,5,-2,LEAVES); Block(1,5,-1,LOG); Block(1,5,1,LOG); Block(1,6,-3,LEAVES); Block(1,6,-2,LOG); Block(1,6,-1,LOG); Block(1,6,0,LOG); Block(1,6,1,LOG); Block(1,6,2,LOG); Block(1,6,3,LEAVES); Block(1,7,-4,LEAVES); Block(1,7,-3,LEAVES); Block(1,7,0,LOG); Block(1,7,2,LEAVES); Block(1,7,3,LEAVES); Block(1,7,4,LEAVES); Block(1,8,-4,LEAVES); Block(1,8,-2,LEAVES); Block(1,8,0,LOG); Block(1,8,1,LEAVES); Block(1,8,2,LEAVES); Block(1,8,3,LEAVES); Block(1,8,4,LEAVES); Block(1,8,5,LEAVES); Block(1,9,-3,LEAVES); Block(1,9,-2,LEAVES); Block(1,9,-1,LOG); Block(1,9,0,LOG); Block(1,9,1,LEAVES); Block(1,9,3,LEAVES); Block(1,9,4,LEAVES); Block(1,10,-2,LEAVES); Block(1,10,-1,LOG); Block(1,10,0,LEAVES); Block(1,11,-2,LEAVES); Block(1,11,-1,LEAVES); Block(1,11,0,LEAVES); Block(2,5,-3,LEAVES); Block(2,5,-2,LEAVES); Block(2,5,-1,LEAVES); Block(2,5,2,LEAVES); Block(2,5,3,LEAVES); Block(2,6,-4,LEAVES); Block(2,6,-3,LEAVES); Block(2,6,-2,LOG); Block(2,6,-1,LEAVES); Block(2,6,1,LEAVES); Block(2,6,2,LOG); Block(2,6,3,LOG); Block(2,6,4,LEAVES); Block(2,7,-5,LEAVES); Block(2,7,-4,LEAVES); Block(2,7,-3,LOG); Block(2,7,-2,LOG); Block(2,7,-1,LEAVES); Block(2,7,1,LEAVES); Block(2,7,2,LEAVES); Block(2,7,3,LOG); Block(2,7,4,LEAVES); Block(2,8,-4,LEAVES); Block(2,8,-3,LEAVES); Block(2,8,-2,LEAVES); Block(2,8,-1,LEAVES); Block(2,8,0,LEAVES); Block(2,8,1,LEAVES); Block(2,8,2,LEAVES); Block(2,8,3,LOG); Block(2,8,4,LEAVES); Block(2,9,-3,LEAVES); Block(2,9,-2,LEAVES); Block(2,9,-1,LEAVES); Block(2,9,0,LEAVES); Block(2,9,3,LEAVES); Block(2,10,-3,LEAVES); Block(2,10,-2,LEAVES); Block(2,10,-1,LEAVES); Block(2,10,0,LEAVES); Block(2,11,-2,LEAVES); Block(2,11,-1,LEAVES); Block(3,5,-2,LEAVES); Block(3,5,3,LEAVES); Block(3,6,-3,LEAVES); Block(3,6,-2,LEAVES); Block(3,6,-1,LEAVES); Block(3,6,2,LEAVES); Block(3,6,3,LEAVES); Block(3,6,4,LEAVES); Block(3,7,-4,LEAVES); Block(3,7,-3,LOG); Block(3,7,-2,LEAVES); Block(3,7,-1,LEAVES); Block(3,7,1,LEAVES); Block(3,7,2,LEAVES); Block(3,7,3,LEAVES); Block(3,7,4,LEAVES); Block(3,8,-4,LEAVES); Block(3,8,-3,LEAVES); Block(3,8,2,LEAVES); Block(3,8,3,LEAVES); Block(3,9,-1,LEAVES); Block(3,10,-2,LEAVES); Block(3,10,-1,LEAVES); Block(4,6,-2,LEAVES); Block(4,6,2,LEAVES); Block(4,6,3,LEAVES); Block(4,7,-3,LEAVES); Block(4,7,-2,LEAVES); Block(4,7,3,LEAVES); Block(4,8,3,LEAVES); // wildnature mod 2019/07/30 20:42:32 // created by matez // all rights reserved // http://bit.ly/wildnature-mod // // File generated automatically return super.setBlocks(); } }
[ "xmati.zamojski@gmail.com" ]
xmati.zamojski@gmail.com
0983e667596177d6abf27da5bbd01abf2cd11eda
55cd9819273b2a0677c3660b2943951b61c9e52e
/gtl/src/main/java/com/basics/or/controller/api/OrderApiController.java
52a2075f3406b5742fabbe5cb692da246e12d7c8
[]
no_license
h879426654/mnc
0fb61dff189404f47e7ee1fb6cb89f0c1e2f006f
9e1c33efc90b9f23c47069606ee2b0b0073cc7e3
refs/heads/master
2022-12-27T05:26:22.276805
2019-10-21T05:16:14
2019-10-21T05:16:14
210,249,616
0
0
null
2022-12-16T10:37:07
2019-09-23T02:36:55
JavaScript
UTF-8
Java
false
false
6,318
java
package com.basics.or.controller.api; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.validation.Valid; import org.springframework.beans.BeansException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.alibaba.fastjson.JSONObject; import com.basics.common.DataItemResponse; import com.basics.common.DataPageComonResponse; import com.basics.common.DataResponse; import com.basics.common.TokenIdRequest; import com.basics.common.TokenIdsRequest; import com.basics.common.TokenTypePageRequest; import com.basics.mall.controller.request.CreateOrderInfoRequest; import com.basics.mall.controller.request.CustomerCarRequest; import com.basics.mall.controller.response.CustomerCarResponse; import com.basics.mall.controller.response.MallOrderResponse; import com.basics.or.controller.request.PayOrderRequest; import com.basics.or.service.MallOrderApiService; @RestController @RequestMapping("/api/order/") public class OrderApiController implements ApplicationContextAware { @SuppressWarnings("unused") private ApplicationContext applicationContext; @Autowired private MallOrderApiService mallOrderApiService; @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { this.applicationContext = applicationContext; } /** * 构建订单号 */ @RequestMapping("buildOrderInfo") public DataItemResponse<List<CustomerCarResponse>> buildOrderInfo(@Valid CustomerCarRequest request, BindingResult result, HttpServletRequest req) { DataItemResponse<List<CustomerCarResponse>> response = new DataItemResponse<>(); if (result.hasErrors()) { response.onBindingError(result.getAllErrors()); return response; } try { response = mallOrderApiService.doBuildOrderInfo(request, req); } catch (Exception e) { response.onException(e); } return response; } /** * 构建订单号(购物车) */ @RequestMapping("buildOrderInfoByCars") public DataItemResponse<List<CustomerCarResponse>> buildOrderInfoByCars(@Valid TokenIdsRequest request, BindingResult result, HttpServletRequest req) { DataItemResponse<List<CustomerCarResponse>> response = new DataItemResponse<>(); if (result.hasErrors()) { response.onBindingError(result.getAllErrors()); return response; } try { response = mallOrderApiService.doBuildOrderInfoByCars(request, req); } catch (Exception e) { response.onException(e); } return response; } /** * 创建订单 */ @RequestMapping("createOrderInfo") public DataItemResponse<List<String>> createOrderInfo(@Valid CreateOrderInfoRequest request, BindingResult result, HttpServletRequest req) { DataItemResponse<List<String>> response = new DataItemResponse<>(); if (result.hasErrors()) { response.onBindingError(result.getAllErrors()); return response; } try { response = mallOrderApiService.doCreateOrderInfo(request, req); } catch (Exception e) { response.onException(e); } return response; } /** * 取消订单 */ @RequestMapping("cancelOrderInfo") public DataResponse cancelOrderInfo(@Valid TokenIdRequest request, BindingResult result, HttpServletRequest req) { DataResponse response = new DataResponse(); if (result.hasErrors()) { response.onBindingError(result.getAllErrors()); return response; } try { response = mallOrderApiService.doCancelOrderInfo(request, req); } catch (Exception e) { response.onException(e); } return response; } /** * 删除订单 */ @RequestMapping("delOrderInfo") public DataResponse delOrderInfo(@Valid TokenIdRequest request, BindingResult result, HttpServletRequest req) { DataResponse response = new DataResponse(); if (result.hasErrors()) { response.onBindingError(result.getAllErrors()); return response; } try { response = mallOrderApiService.doDelOrderInfo(request, req); } catch (Exception e) { response.onException(e); } return response; } /** * 查询订单 */ @RequestMapping("selectMyOrder") public DataPageComonResponse<MallOrderResponse> selectMyOrder(@Valid TokenTypePageRequest request, BindingResult result, HttpServletRequest req) { DataPageComonResponse<MallOrderResponse> response = new DataPageComonResponse<>(); if (result.hasErrors()) { response.onBindingError(result.getAllErrors()); return response; } try { response = mallOrderApiService.doSelectMyOrder(request, req); } catch (Exception e) { response.onException(e); } return response; } /** * 支付订单 */ @RequestMapping("payMyOrder") public DataResponse payMyOrder(@Valid PayOrderRequest request, BindingResult result, HttpServletRequest req) { DataResponse response = new DataResponse(); if (result.hasErrors()) { response.onBindingError(result.getAllErrors()); return response; } try { response = mallOrderApiService.doPayMyOrder(request, req); } catch (Exception e) { response.onException(e); } return response; } /** * 确认收货 */ @RequestMapping("confirmOrder") public DataResponse confirmOrder(@Valid PayOrderRequest request, BindingResult result, HttpServletRequest req) { DataResponse response = new DataResponse(); if (result.hasErrors()) { response.onBindingError(result.getAllErrors()); return response; } try { response = mallOrderApiService.doConfirmOrder(request, req); } catch (Exception e) { response.onException(e); } return response; } /** * 根据订单获取物流信息 */ @RequestMapping("selectLogisticsInfo") public DataItemResponse<JSONObject> selectLogisticsInfo(@Valid TokenIdRequest request, BindingResult result, HttpServletRequest req) { DataItemResponse<JSONObject> response = new DataItemResponse<>(); if (result.hasErrors()) { response.onBindingError(result.getAllErrors()); return response; } try { response = mallOrderApiService.doSelectLogisticsInfo(request, req); } catch (Exception e) { response.onException(e); } return response; } }
[ "879426654@qq.com" ]
879426654@qq.com
79c3a51491c5b30696b1b8c2cb21dd181f17d39d
5e82db290145e2c3cd7a7354f82eb5ccd2503de2
/app/src/main/java/com/akingyin/okHttp/AbsAPICallback.java
385319da2a0c2f83475cb70e9078e970b78596a6
[]
no_license
akingyin1987/MultipleApp
7e437712308ad59384515897494c3ef4326cc461
5327d9b03c803662b744a6ef7cb247f7e62d1609
refs/heads/master
2020-05-21T14:13:26.106963
2016-12-19T08:25:41
2016-12-19T08:25:41
49,368,015
0
0
null
null
null
null
UTF-8
Java
false
false
2,020
java
package com.akingyin.okHttp; import org.json.JSONObject; import java.io.IOException; import okhttp3.Call; import okhttp3.Callback; import okhttp3.Response; /** * OkHTTP 网络请求回调 * Created by zlcd on 2015/12/29. */ public abstract class AbsAPICallback implements Callback { //请求错误 public abstract void onFailure(int code,String message); //请求成功 public abstract void onSuccess(JSONObject jsonObject); //是否验证信息 private boolean iSintercept = true; public boolean Valintercept() { return iSintercept; } public void setiSintercept(boolean iSintercept) { this.iSintercept = iSintercept; } @Override public void onFailure(Call call, IOException e) { onFailure(0,"网络连接错误,请检查网络是否正常开启"); if(null != call){ call.cancel(); } } @Override public void onResponse(Call call,Response response) throws IOException { try{ int httpcode = response.code(); if(response.isSuccessful()){ JSONObject result = new JSONObject(response.body().string()); if(iSintercept){ boolean val = Valintercept(); if(!val){ return; } } onSuccess(result); }else{ String errormsg = "连接服务异常,请稍后再试"; if(httpcode == 408){ errormsg="请求超时,请检查网络或稍后再试"; }else if(httpcode>=500){ errormsg="连接服务器失败"; } onFailure(httpcode,errormsg); } }catch (Exception e){ e.printStackTrace(); onFailure(0,"处理数据异常"); }finally { if(null != call){ call.cancel(); } } } }
[ "akingyin@163.com" ]
akingyin@163.com
ec191165d4b54f347bdd3afdb8636ed7903d74a3
ce1a693343bda16dc75fd64f1688bbfa5d27ac07
/testsuite/src/main/org/jboss/test/deployment/JMXDeploymentTestCase.java
7c91312e7e28897bb886181642d681bda687af78
[]
no_license
JavaQualitasCorpus/jboss-5.1.0
641c412b1e4f5f75bb650cecdbb2a56de2f6a321
9307e841b1edc37cc97c732e4b87125530d8ae49
refs/heads/master
2023-08-12T08:39:55.319337
2020-06-02T17:48:09
2020-06-02T17:48:09
167,004,817
0
0
null
null
null
null
UTF-8
Java
false
false
1,525
java
/* * JBoss, Home of Professional Open Source * Copyright 2006, Red Hat Middleware LLC, and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.test.deployment; import org.jboss.deployment.spi.JMXTarget; /** * JSR88 deployment tests using the JMXTarget, targetType=jmx * javax.enterprise.deploy.spi.Target implemention. * * @author Scott.Stark@jboss.org * @version $Revision: 85945 $ */ public class JMXDeploymentTestCase extends BaseDeploymentTestCase { public JMXDeploymentTestCase(String name) { super(name, "jmx"); } protected String getTargetDescription() { return JMXTarget.DESCRIPTION; } }
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
27e38af2d42e4c30359bc2b33f8b8a15362f03ee
bb43f8e55317a57c6049b18389c8eea0444ed190
/src/thothbot/parallax/loader/shared/json/JsoObjectFactory.java
65fe5962ac590b62422245ff736e36953d7d9888
[ "CC-BY-3.0" ]
permissive
angelzaldivar/parallax
a172396d8b7151f11968a98c7166692c72941d46
07e2885a241728f10c732ce6df99a79184bffc72
refs/heads/master
2021-01-22T00:29:27.385658
2015-10-23T16:42:56
2015-10-23T16:42:56
45,826,845
1
0
null
2015-11-09T09:03:53
2015-11-09T09:03:53
null
UTF-8
Java
false
false
1,137
java
/* * Copyright 2012 Alex Usachev, thothbot@gmail.com * * This file is part of Parallax project. * * Parallax is free software: you can redistribute it and/or modify it * under the terms of the Creative Commons Attribution 3.0 Unported License. * * Parallax 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 Creative Commons Attribution * 3.0 Unported License. for more details. * * You should have received a copy of the the Creative Commons Attribution * 3.0 Unported License along with Parallax. * If not, see http://creativecommons.org/licenses/by/3.0/. */ package thothbot.parallax.loader.shared.json; import com.google.web.bindery.autobean.shared.AutoBean; import com.google.web.bindery.autobean.shared.AutoBeanFactory; public interface JsoObjectFactory extends AutoBeanFactory { AutoBean<JsoObject> file(); AutoBean<JsoMaterial> material(); AutoBean<JsoMetadata> metadata(); AutoBean<JsoMorphColors> morphColors(); AutoBean<JsoMorphTargets> morphTargets(); }
[ "thothbot@gmail.com" ]
thothbot@gmail.com
7a2b6a5caf4996f0c5da2f254013bf7b7e5e5494
ec13fd6ad41661e1b2f578819f3b0b0474edbb5f
/mineplex/core/antihack/types/Reach.java
dd327ca5fca484e4d3025a565ff1d9b7af49650d
[]
no_license
BukkitReborn/Mineplexer
80afaa667a91624712906b29a0fbbc9380a6e1b2
e1038978a1baa9ae88613923842834c4561f0628
refs/heads/master
2020-12-02T22:37:49.522092
2017-01-17T18:51:53
2017-01-17T18:51:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,135
java
package mineplex.core.antihack.types; import java.util.ArrayList; import java.util.HashMap; import mineplex.core.MiniPlugin; import mineplex.core.antihack.AntiHack; import mineplex.core.antihack.Detector; import mineplex.core.common.util.UtilEvent; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilPlayer; import mineplex.core.common.util.UtilServer; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import org.bukkit.GameMode; import org.bukkit.Location; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.EntityDamageEvent.DamageCause; public class Reach extends MiniPlugin implements Detector { private AntiHack Host; private HashMap<Player, ArrayList<Location>> _history = new HashMap(); public Reach(AntiHack host) { super("Reach Detector", host.getPlugin()); this.Host = host; } @EventHandler(priority=EventPriority.LOWEST) public void recordMove(UpdateEvent event) { if (!this.Host.isEnabled()) { return; } if (event.getType() != UpdateType.TICK) { return; } Player[] arrayOfPlayer; int j = (arrayOfPlayer = UtilServer.getPlayers()).length; for (int i = 0; i < j; i++) { Player player = arrayOfPlayer[i]; if ((player.getGameMode() == GameMode.SURVIVAL) && (!UtilPlayer.isSpectator(player))) { if (!this._history.containsKey(player)) { this._history.put(player, new ArrayList()); } ((ArrayList)this._history.get(player)).add(0, player.getLocation()); while (((ArrayList)this._history.get(player)).size() > 40) { ((ArrayList)this._history.get(player)).remove(((ArrayList)this._history.get(player)).size() - 1); } } } } @EventHandler(priority=EventPriority.LOWEST) public void reachDetect(EntityDamageEvent event) { if (event.getCause() != EntityDamageEvent.DamageCause.ENTITY_ATTACK) { return; } if (!(event.getEntity() instanceof Player)) { return; } LivingEntity damagerEntity = UtilEvent.GetDamagerEntity(event, false); if (!(damagerEntity instanceof Player)) { return; } Player damager = (Player)damagerEntity; Player damagee = (Player)event.getEntity(); ArrayList<Location> damageeHistory; if ((!isInRange(damager.getLocation(), damagee.getLocation())) && ((damageeHistory = (ArrayList)this._history.get(damagee)) != null)) { for (Location historyLoc : damageeHistory) { if (isInRange(damager.getLocation(), historyLoc)) { return; } } } } private boolean isInRange(Location a, Location b) { double distFlat = UtilMath.offset2d(a, b); if (distFlat > 3.4D) { return true; } double dist = UtilMath.offset(a, b); if (dist > 6.0D) { return true; } return false; } public void Reset(Player player) { this._history.remove(player); } }
[ "H4nSolo@gmx.de" ]
H4nSolo@gmx.de
f86583e57581b1dc28027e7862030f8e1cae9825
e8c848896822835d33a338404122d90b65c94db0
/src/org/ojalgo/type/keyvalue/StringToInt.java
92adffb3b8140883cf07d2a175d42b65fde1bc8c
[ "MIT" ]
permissive
thibaultleouay/ojAlgo
c9d912154897da74ef758ed1f192fd9511dee25e
dfbfe362e09130c49a438e4de55af80326bc2ffc
refs/heads/master
2021-01-24T19:36:41.840640
2016-09-20T21:20:58
2016-09-20T21:20:58
68,753,908
0
0
null
2016-09-20T21:13:31
2016-09-20T21:13:30
null
UTF-8
Java
false
false
2,635
java
/* * Copyright 1997-2016 Optimatika (www.optimatika.se) * * 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 org.ojalgo.type.keyvalue; import org.ojalgo.netio.ASCII; public final class StringToInt implements KeyValue<String, Integer> { public final String key; public final int value; public StringToInt(final String aKey, final int aValue) { super(); key = aKey; value = aValue; } StringToInt() { this(null, 0); } public int compareTo(final KeyValue<String, ?> aReference) { return key.compareTo(aReference.getKey()); } @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof StringToInt)) { return false; } final StringToInt other = (StringToInt) obj; if (key == null) { if (other.key != null) { return false; } } else if (!key.equals(other.key)) { return false; } return true; } public String getKey() { return key; } public Integer getValue() { return value; } @Override public int hashCode() { final int prime = 31; int result = 1; result = (prime * result) + ((key == null) ? 0 : key.hashCode()); return result; } @Override public String toString() { return String.valueOf(key) + String.valueOf(ASCII.EQUALS) + String.valueOf(value); } }
[ "apete@optimatika.se" ]
apete@optimatika.se
6bd2452b3e08adf7e391d08b8fd66f2dc89acf4b
a0d9485d32aeb6959eff09f3e013803a7c1dc79a
/app/src/main/java/com/zhenhua/microread/presenter/HomeFollowFgPresenter.java
39ebb7197698b53cf7703c97c2ebf67f3c69bcd5
[]
no_license
zzh0123/MicroRead
37c24db9a526fe04ac0622debf4382a1e1821429
0544efef1180f671f76c824cdc04d17eafaf9327
refs/heads/master
2020-07-12T12:09:25.512674
2019-09-05T03:41:45
2019-09-05T03:41:45
203,828,852
0
0
null
null
null
null
UTF-8
Java
false
false
1,167
java
package com.zhenhua.microread.presenter; import com.zhenhua.microread.utils.netsubscribe.ShareListSubscribe; import com.zhenhua.microread.utils.netutils.OnSuccessAndFaultListener; import com.zhenhua.microread.utils.netutils.OnSuccessAndFaultSub; import com.zhenhua.microread.view.HomeFollowFgView; import java.util.Map; /** * Author: zzhh * Date: 2019/9/4 10:57 * Description: ${DESCRIPTION} */ public class HomeFollowFgPresenter implements Presenter<HomeFollowFgView> { private HomeFollowFgView view; @Override public void attachView(HomeFollowFgView view) { this.view = view; } @Override public void detachView() { if (view != null) view = null; } public void getShareList(Map<String, Object> map){ ShareListSubscribe.getShareList(map, new OnSuccessAndFaultSub(new OnSuccessAndFaultListener() { @Override public void onSuccess(String result) { view.showShareList(result); } @Override public void onFault(String errorMsg) { view.showMessage(errorMsg); } }, view.getContext())); } }
[ "18311004536@163.com" ]
18311004536@163.com
e80a0d9dc210f53bf741de756c7fd4dd9645698c
5fa67295e3222290292b700f3569b13d95cefc5f
/src/main/java/com/mycompany/mp2/AddSetting.java
ddbb1fa02668b538873cbff754996cde79a58b9a
[]
no_license
mohdsaif91/MP05-04
7b15742dcb8c46ea9583b85849ccca2b5e8e12c3
df186c87f0d3170b87c15010863b1adeb578b11d
refs/heads/master
2022-09-16T17:12:21.997556
2020-04-04T21:47:15
2020-04-04T21:47:15
253,101,004
0
0
null
2022-07-15T21:07:52
2020-04-04T21:21:26
HTML
UTF-8
Java
false
false
5,679
java
package com.mycompany.mp2; /* * * CopyRight cosmos */ import java.io.IOException; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.logging.Level; import java.util.logging.Logger; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * * @author saif */ public class AddSetting extends HttpServlet { Connection con; PreparedStatement ps; ResultSet rs; @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String four = request.getParameter("four"); if (four.equals("setemail")) { try { String email = request.getParameter("email"); String password = request.getParameter("password"); String query = "update \"emailTable\" set email='" + email + "',password='" + password + "'"; System.out.println(query); con = ConnectionClass.getConnection(); ps = con.prepareStatement(query); ps.executeUpdate(); con.close(); System.out.println(email + " " + password); response.setContentType("text/plain"); System.out.println("last"); response.getWriter().write("Updated"); } catch (SQLException ex) { Logger.getLogger(AddSetting.class.getName()).log(Level.SEVERE, null, ex); } } else if (four.equals("setdays")) { try { String days = request.getParameter("days"); String query = "update daystable set days='" + days + "'"; System.out.println(query); con = ConnectionClass.getConnection(); ps = con.prepareStatement(query); ps.executeUpdate(); con.close(); response.setContentType("text/plain"); System.out.println("last"); response.getWriter().write("Updated"); } catch (SQLException ex) { Logger.getLogger(AddSetting.class.getName()).log(Level.SEVERE, null, ex); } } else if (four.equals("setpassword")) { try { String pString = request.getParameter("password"); String query = "select username from admintablecredentials where password='" + pString + "'"; System.out.println(query); con = ConnectionClass.getConnection(); ps = con.prepareStatement(query); rs = ps.executeQuery(); if (rs.next()) { con.close(); response.setContentType("text/plain"); response.getWriter().write("yes"); } else { con.close(); response.setContentType("text/plain"); response.getWriter().write("no"); } } catch (SQLException ex) { Logger.getLogger(AddSetting.class.getName()).log(Level.SEVERE, null, ex); } } else if (four.equals("setPassword")) { try { String username = request.getParameter("user"); String pString = request.getParameter("pass"); String query = "update admintablecredentials set username='" + username + "',password='" + pString + "'"; System.out.println(query); con = ConnectionClass.getConnection(); ps = con.prepareStatement(query); int i = ps.executeUpdate(); if (i == 0) { con.close(); response.setContentType("text/plain"); response.getWriter().write("no"); } else { con.close(); response.setContentType("text/plain"); response.getWriter().write("yes"); } } catch (SQLException ex) { Logger.getLogger(AddSetting.class.getName()).log(Level.SEVERE, null, ex); } } } @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String discount = request.getParameter("discount"); if (discount == null) { try { int price = Integer.parseInt(request.getParameter("price")); System.out.println(price); String query = "update priceanddiscount set price=" + price + ""; con = ConnectionClass.getConnection(); ps = con.prepareStatement(query); ps.executeUpdate(); con.close(); } catch (SQLException ex) { Logger.getLogger(AddSetting.class.getName()).log(Level.SEVERE, null, ex); } } else { try { int ogdiscount = Integer.parseInt(discount); String query = "update priceanddiscount set discount=" + ogdiscount + ""; System.out.println(query); con = ConnectionClass.getConnection(); ps = con.prepareStatement(query); ps.executeUpdate(); con.close(); } catch (SQLException ex) { Logger.getLogger(AddSetting.class.getName()).log(Level.SEVERE, null, ex); } } } }
[ "you@example.com" ]
you@example.com
dc2f7c28688a64fe0a9b0313a6282b0813cba296
fec4c1754adce762b5c4b1cba85ad057e0e4744a
/jf-base/src/main/java/com/jf/entity/TaobaokeConfigExtExample.java
a541c023951442956ee942d060dc181dd4943258
[]
no_license
sengeiou/workspace_xg
140b923bd301ff72ca4ae41bc83820123b2a822e
540a44d550bb33da9980d491d5c3fd0a26e3107d
refs/heads/master
2022-11-30T05:28:35.447286
2020-08-19T02:30:25
2020-08-19T02:30:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,260
java
package com.jf.entity; import com.jf.common.ext.query.QueryObject; import com.jf.common.ext.util.StrKit; public class TaobaokeConfigExtExample extends TaobaokeConfigExample{ private QueryObject queryObject; public QueryObject getQueryObject() { if(queryObject == null) queryObject = new QueryObject(); return queryObject; } public TaobaokeConfigExtExample fill(){ if(queryObject == null) return this; if(StrKit.notBlank(queryObject.getSortString())){ setOrderByClause(queryObject.getSortString()); } if(queryObject.getLimitSize() > 0){ setLimitStart(0); setLimitSize(queryObject.getLimitSize()); } return this; } public TaobaokeConfigExtExample fillPage(){ if(queryObject == null) queryObject = new QueryObject(); if(StrKit.notBlank(queryObject.getSortString())){ setOrderByClause(queryObject.getSortString()); } setLimitStart(queryObject.getLimitStart()); setLimitSize(queryObject.getPageSize()); return this; } @Override public TaobaokeConfigExtCriteria createCriteria() { TaobaokeConfigExtCriteria criteria = new TaobaokeConfigExtCriteria(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } public class TaobaokeConfigExtCriteria extends Criteria{ } }
[ "397716215@qq.com" ]
397716215@qq.com
d159f9e67d30242223c177665a23a17a96304b0e
23947e89b6b6aca3a60d2c6c8603600d5fd10d16
/sketchlet-designer/src/main/java/net/sf/sketchlet/framework/blackboard/evaluator/JEParser.java
7f5353e38fd5cc68cefb6a473ee4be09a6e1e9eb
[]
no_license
zeljkoobrenovic/sketchlet
68051886c9ad7b285f6edc442b0229211e03d119
933e7872f1e0dea58ac9d70cca2cc7c21e7c3fbd
refs/heads/master
2016-09-06T04:36:47.049616
2012-12-30T09:13:36
2012-12-30T09:13:36
6,383,313
2
0
null
null
null
null
UTF-8
Java
false
false
3,515
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package net.sf.sketchlet.framework.blackboard.evaluator; import org.nfunk.jep.JEP; import org.nfunk.jep.SymbolTable; import org.nfunk.jep.Variable; import javax.swing.*; import java.util.Enumeration; /** * @author zobrenovic */ public class JEParser { private static CellReferenceResolver resolver = new CellReferenceResolver(); public static void setResolver(CellReferenceResolver _resolver) { JEParser.resolver = _resolver; } public static Object getValue(String strExpression) { // DJep parser = new DJep(); JEP parser = new JEP(); parser.initFunTab(); // clear the contents of the function table parser.addStandardFunctions(); parser.addStandardConstants(); //parser.addStandardDiffRules(); parser.initSymTab(); // clear the contents of the symbol table parser.setAllowUndeclared(true); try { parser.parseExpression(strExpression); SymbolTable st = parser.getSymbolTable(); Enumeration e = st.elements(); while (e.hasMoreElements()) { Variable v = (Variable) e.nextElement(); try { v.setValue(new Double(getResolver().getValue(v.getName()))); } catch (Exception ex) { String strValue = getResolver().getValue(v.getName()); if (strValue == null) { return null; } v.setValue(strValue); } } } catch (Exception e) { } return parser.getValueAsObject(); } public static void help(JFrame frame) { String strHelp = ""; JEP p = new JEP(); p.addStandardFunctions(); String operators[] = { "^", "!", "+x, -x", "%", "/", "*", "+, -", "<=, >=", "<, >", "!=, ==", "&&", "||"}; String functions[] = { "sin(x)", "cos(x)", "tan(x)", "asin(x)", "acos(x)", "atan(x)", "atan2(y, x)", "sinh(x)", "cosh(x)", "tanh(x)", "asinh(x)", "acosh(x)", "atanh(x)", "ln(x)", "log(x)", "exp(x)", "abs(x)", "rand()", "mod(x,y) = x % y", "sqrt(x)", "sum(x,y,z)", "if(cond,trueval,falseval)", "str(x)", "binom(n,i)" }; strHelp += "Operators: \n"; for (int i = 0; i < operators.length; i++) { strHelp += " " + operators[i] + "\n"; } strHelp += "Functions: \n"; for (int i = 0; i < functions.length; i++) { strHelp += " " + functions[i] + "\n"; } strHelp += "NOTE: Variables with names that contain operators such as \"-\"\nshould be giving in apostrophes, for example, 'movement-intensity'."; JOptionPane.showMessageDialog(frame, strHelp); } public static CellReferenceResolver getResolver() { return resolver; } }
[ "obren@acm.org" ]
obren@acm.org
768783934979592a5199c6ab21f7c8a441ef1f1e
3f480d487f5e88acf6b64e1e424f64e2b0705d53
/net/minecraft/network/play/server/S02PacketChat.java
7890c4e49100ecb1eef17c4690b10b6268e0167a
[]
no_license
a3535ed54a5ee6917a46cfa6c3f12679/bde748d8_obsifight_client_2016
2aecdb987054e44db89d6a7c101ace1bb047f003
cc65846780c262dc8568f1d18a14aac282439c66
refs/heads/master
2021-04-30T11:46:25.656946
2018-02-12T15:10:50
2018-02-12T15:10:50
121,261,090
0
0
null
null
null
null
UTF-8
Java
false
false
1,716
java
package net.minecraft.network.play.server; import java.io.IOException; import net.minecraft.network.INetHandler; import net.minecraft.network.Packet; import net.minecraft.network.PacketBuffer; import net.minecraft.network.play.INetHandlerPlayClient; import net.minecraft.util.IChatComponent; public class S02PacketChat extends Packet { private IChatComponent field_148919_a; private boolean field_148918_b; private static final String __OBFID = "CL_00001289"; public S02PacketChat() { this.field_148918_b = true; } public S02PacketChat(IChatComponent p_i45179_1_) { this(p_i45179_1_, true); } public S02PacketChat(IChatComponent p_i45180_1_, boolean p_i45180_2_) { this.field_148918_b = true; this.field_148919_a = p_i45180_1_; this.field_148918_b = p_i45180_2_; } public void readPacketData(PacketBuffer p_148837_1_) throws IOException { this.field_148919_a = IChatComponent.Serializer.func_150699_a(p_148837_1_.readStringFromBuffer(32767)); } public void writePacketData(PacketBuffer p_148840_1_) throws IOException { p_148840_1_.writeStringToBuffer(IChatComponent.Serializer.func_150696_a(this.field_148919_a)); } public void processPacket(INetHandlerPlayClient p_148833_1_) { p_148833_1_.handleChat(this); } public String serialize() { return String.format("message=\'%s\'", new Object[]{this.field_148919_a}); } public IChatComponent func_148915_c() { return this.field_148919_a; } public boolean func_148916_d() { return this.field_148918_b; } public void processPacket(INetHandler p_148833_1_) { this.processPacket((INetHandlerPlayClient)p_148833_1_); } }
[ "unknowlk@tuta.io" ]
unknowlk@tuta.io
14fe7903ff531ecd3d2c18c20edfa232d065135a
0adcb787c2d7b3bbf81f066526b49653f9c8db40
/src/main/java/com/alipay/api/response/AlipayOpenMiniVersionRollbackResponse.java
8ea8a90d5fe8b03d697ae4846f0dcc15f97a6364
[ "Apache-2.0" ]
permissive
yikey/alipay-sdk-java-all
1cdca570c1184778c6f3cad16fe0bcb6e02d2484
91d84898512c5a4b29c707b0d8d0cd972610b79b
refs/heads/master
2020-05-22T13:40:11.064476
2019-04-11T14:11:02
2019-04-11T14:11:02
186,365,665
1
0
null
2019-05-13T07:16:09
2019-05-13T07:16:08
null
UTF-8
Java
false
false
377
java
package com.alipay.api.response; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.open.mini.version.rollback response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class AlipayOpenMiniVersionRollbackResponse extends AlipayResponse { private static final long serialVersionUID = 3148566235423286283L; }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
d7afc3ce4e0eed7132b5330c476311d26ab7984d
78f62e06bdcafc955bcf216a146cb7ecbba772ec
/src/main/java/com/alipay/api/domain/AlipayMarketingCampaignPromocoreStatusUpdateModel.java
559082915e05446f5d5f717787606e639119873f
[ "Apache-2.0" ]
permissive
woniu1983/onlinepay_demo
aa773523787bd9f5cf968983ed662d0b49032b5e
10e6ca10096c85eaf5dacdef19768e999d1c3b78
refs/heads/master
2022-05-31T15:59:56.992836
2019-06-20T04:18:39
2019-06-20T04:18:39
133,897,776
1
0
Apache-2.0
2022-05-20T20:50:48
2018-05-18T03:24:20
Java
UTF-8
Java
false
false
1,013
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 抽奖活动状态变更 * * @author auto create * @since 1.0, 2016-06-08 11:28:35 */ public class AlipayMarketingCampaignPromocoreStatusUpdateModel extends AlipayObject { private static final long serialVersionUID = 5638242355449751288L; /** * 活动id */ @ApiField("camp_id") private String campId; /** * 修改的活动状态,CAMP_PAUSED 暂停状态, CAMP_ENDED 结束状态, CAMP_GOING启动状态,只支持以上3种状态变更。结束状态的活动不允许在修改活动状态。 */ @ApiField("camp_status") private String campStatus; public String getCampId() { return this.campId; } public void setCampId(String campId) { this.campId = campId; } public String getCampStatus() { return this.campStatus; } public void setCampStatus(String campStatus) { this.campStatus = campStatus; } }
[ "Ryan@MWWM" ]
Ryan@MWWM
1e02ef496bc8f38ea264a8edaeed97e683eccc3c
2a14de0c682b53f2a8a1a6572c30b6179e15e40f
/core/src/org/egordorichev/lasttry/entity/entities/item/TileComponent.java
64d76ab4a1631e1ea5858a3e05ed2c3cb57fe6be
[ "MIT" ]
permissive
Col-E/LastTry
580d90c01857c3385548ab32a1cf461d1ad1235b
8d8d180e8dfba6f76489951cae672658a8d0130e
refs/heads/master
2021-01-21T16:57:29.719134
2017-12-15T08:04:37
2017-12-15T08:04:37
84,872,707
1
0
null
2017-03-13T20:44:14
2017-03-13T20:44:14
null
UTF-8
Java
false
false
307
java
package org.egordorichev.lasttry.entity.entities.item; import com.badlogic.gdx.graphics.g2d.TextureRegion; import org.egordorichev.lasttry.entity.component.Component; /** * Handles tile textures */ public class TileComponent extends Component { /** * The tiles */ public TextureRegion[][] tiles; }
[ "egordorichev@gmail.com" ]
egordorichev@gmail.com
74962c6553313ece292b775118c6e3cd92711493
19b84f47105d0a9cc82aebf2f13100b15b7d1256
/commons/ihe/fhir/core/src/main/java/org/openehealth/ipf/commons/ihe/fhir/SslAwareApacheRestfulClientFactory.java
77c87d88bbc5739ba5945a5034812e34f1bcd293
[ "Apache-2.0" ]
permissive
paulorades/ipf
9f9d455305db943ad905b6b544152a6bddb09e51
b754fd5617d624235753b284a09904d47cf8d47a
refs/heads/master
2020-04-12T16:04:26.863840
2018-12-18T15:49:20
2018-12-18T15:49:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,883
java
/* * Copyright 2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.openehealth.ipf.commons.ihe.fhir; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.rest.api.RequestTypeEnum; import ca.uhn.fhir.rest.client.apache.ApacheHttpClient; import ca.uhn.fhir.rest.client.api.Header; import ca.uhn.fhir.rest.client.api.IHttpClient; import ca.uhn.fhir.rest.client.impl.RestfulClientFactory; import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpHost; import org.apache.http.auth.AuthScope; import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.CredentialsProvider; import org.apache.http.client.HttpClient; import org.apache.http.client.config.RequestConfig; import org.apache.http.impl.client.BasicCredentialsProvider; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.client.ProxyAuthenticationStrategy; import org.openehealth.ipf.commons.ihe.fhir.translation.FhirSecurityInformation; import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; /** * RestfulClientFactory that is aware of SSL context parameters. * * @author Christian Ohr */ public class SslAwareApacheRestfulClientFactory extends RestfulClientFactory { private HttpClient httpClient; private HttpHost proxy; private FhirSecurityInformation securityInformation; public SslAwareApacheRestfulClientFactory(FhirContext theFhirContext) { super(theFhirContext); } @Override protected IHttpClient getHttpClient(String theServerBase) { return new ApacheHttpClient(getNativeHttpClient(), new StringBuilder(theServerBase), null, null, null, null); } @Override protected void resetHttpClient() { httpClient = null; } @Override public IHttpClient getHttpClient(StringBuilder url, Map<String, List<String>> ifNoneExistParams, String ifNoneExistString, RequestTypeEnum theRequestType, List<Header> theHeaders) { return new ApacheHttpClient(getNativeHttpClient(), url, ifNoneExistParams, ifNoneExistString, theRequestType, theHeaders); } /** * Sets a completely configured HttpClient to be used. No further configuration is done * (timeouts, security etc.) before it is used. * * @param httpClient Http client instance */ @Override public void setHttpClient(Object httpClient) { this.httpClient = (HttpClient) httpClient; } @Override public void setProxy(String host, Integer port) { proxy = host != null ? new HttpHost(host, port, "http") : null; } public void setSecurityInformation(FhirSecurityInformation securityInformation) { this.securityInformation = securityInformation; } /** * Possibility to customize the HttpClientBuilder. The default implementation of this method * does nothing. * * @param httpClientBuilder HttpClientBuilder */ protected HttpClientBuilder customizeHttpClientBuilder(HttpClientBuilder httpClientBuilder) { return httpClientBuilder; } /** * Possibility to instantiate a subclassed HttpClientBuilder. The default implementation * calls {@link HttpClients#custom()}. * * @return HttpClientBuilder instance */ protected HttpClientBuilder newHttpClientBuilder() { return HttpClients.custom(); } protected synchronized HttpClient getNativeHttpClient() { if (httpClient == null) { // @formatter:off RequestConfig defaultRequestConfig = RequestConfig.custom() .setConnectTimeout(getConnectTimeout()) .setSocketTimeout(getSocketTimeout()) .setConnectionRequestTimeout(getConnectionRequestTimeout()) .setProxy(proxy) .setStaleConnectionCheckEnabled(true) .build(); HttpClientBuilder builder = newHttpClientBuilder() .useSystemProperties() .setDefaultRequestConfig(defaultRequestConfig) .setMaxConnTotal(getPoolMaxTotal()) .setMaxConnPerRoute(getPoolMaxPerRoute()) .setConnectionTimeToLive(5, TimeUnit.SECONDS) .disableCookieManagement(); if (securityInformation != null) { securityInformation.configureHttpClientBuilder(builder); } // Need to authenticate against proxy if (proxy != null && StringUtils.isNotBlank(getProxyUsername()) && StringUtils.isNotBlank(getProxyPassword())) { CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); credentialsProvider.setCredentials(new AuthScope(proxy.getHostName(), proxy.getPort()), new UsernamePasswordCredentials(getProxyUsername(), getProxyPassword())); builder.setProxyAuthenticationStrategy(new ProxyAuthenticationStrategy()); builder.setDefaultCredentialsProvider(credentialsProvider); } // Chance to override or instrument ; httpClient = customizeHttpClientBuilder(builder).build(); } return httpClient; } }
[ "christian.ohr@gmail.com" ]
christian.ohr@gmail.com
d811ef81cd580ac1578b3ea175d3d72b1a624900
cf7704d9ef0a34aff366adbbe382597473ab509d
/src/net/sourceforge/plantuml/geom/PolylineImpl.java
518afe53e3192a9f5b62f4181285b7c3326953c3
[]
no_license
maheeka/plantuml-esb
0fa14b60af513c9dedc22627996240eaf3802c5a
07c7c7d78bae29d9c718a43229996c068386fccd
refs/heads/master
2021-01-10T07:49:10.043639
2016-02-23T17:36:33
2016-02-23T17:36:33
52,347,881
0
4
null
null
null
null
UTF-8
Java
false
false
3,152
java
/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2014, Arnaud Roques * * Project Info: http://plantuml.sourceforge.net * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. * in the United States and other countries.] * * Original Author: Arnaud Roques * * Revision $Revision: 12235 $ * */ package net.sourceforge.plantuml.geom; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; public class PolylineImpl extends AbstractPolyline implements Polyline { final private List<Point2DInt> intermediates = new ArrayList<Point2DInt>(); public PolylineImpl(Pointable start, Pointable end) { super(start, end); } public int nbSegments() { return intermediates.size() + 1; } public List<LineSegmentInt> segments() { final List<LineSegmentInt> result = new ArrayList<LineSegmentInt>(); Point2DInt cur = getStart().getPosition(); for (Point2DInt intermediate : intermediates) { result.add(new LineSegmentInt(cur, intermediate)); cur = intermediate; } result.add(new LineSegmentInt(cur, getEnd().getPosition())); return Collections.unmodifiableList(result); } public void addIntermediate(Point2DInt intermediate) { assert intermediates.contains(intermediate) == false; intermediates.add(intermediate); } public void inflate(InflationTransform transform) { // final List<LineSegment> segments = segments(); // if (segments.size() == 1) { // return; // } // intermediates.clear(); // if (segments.size() == 2) { // final Point2DInt p = segments.get(0).getP2(); // intermediates.add(transform.inflatePoint2DInt(p)); // } else { // final List<LineSegment> segmentsT = transform.inflate(segments); // for (int i = 0; i < segmentsT.size() - 2; i++) { // intermediates.add(segmentsT.get(i).getP2()); // } // // } final List<LineSegmentInt> segments = transform.inflate(this.segments()); // Log.println("segments="+segments); intermediates.clear(); for (int i = 1; i < segments.size() - 1; i++) { addIntermediate(segments.get(i).getP1()); } } public final Collection<Point2DInt> getIntermediates() { return Collections.unmodifiableCollection(intermediates); } }
[ "maheeka@wso2.com" ]
maheeka@wso2.com
f8c9a5cb12c30e1577f4beae2a1eaad949952e9b
d4af4eb9970cf55e8115177b1ad7d0766c14488c
/dspace-oai/src/main/java/org/dspace/xoai/services/impl/database/DSpaceHandlerResolver.java
434abf0d707a979fdec6d5927cf6edc81419f5e5
[ "LicenseRef-scancode-unknown-license-reference", "LGPL-2.0-or-later", "LicenseRef-scancode-jdom", "ICU", "EPL-1.0", "LGPL-2.1-or-later", "BSD-3-Clause", "JSON", "PostgreSQL", "Apache-2.0", "CDDL-1.0", "GPL-1.0-or-later", "LicenseRef-scancode-public-domain", "MIT", "MPL-1.0" ]
permissive
ufal/clarin-dspace
261f39caf39c9cb7bd708c0155feabe164dd4008
8a6ba5c98547942d7115b74cf4978e0b29ca50e4
refs/heads/clarin
2023-09-03T15:05:36.146637
2023-06-06T12:01:06
2023-06-06T12:01:06
33,369,437
13
19
BSD-3-Clause
2023-09-04T08:38:22
2015-04-03T15:30:36
Java
UTF-8
Java
false
false
1,608
java
/** * The contents of this file are subject to the license and copyright * detailed in the LICENSE and NOTICE files at the root of the source * tree and available online at * * http://www.dspace.org/license/ */ package org.dspace.xoai.services.impl.database; import org.dspace.content.DSpaceObject; import org.dspace.handle.HandleManager; import org.dspace.xoai.services.api.context.ContextService; import org.dspace.xoai.services.api.context.ContextServiceException; import org.dspace.xoai.services.api.database.HandleResolver; import org.dspace.xoai.services.api.database.HandleResolverException; import org.springframework.beans.factory.annotation.Autowired; import java.sql.SQLException; public class DSpaceHandlerResolver implements HandleResolver { @Autowired private ContextService contextService; @Override public DSpaceObject resolve(String handle) throws HandleResolverException { try { return HandleManager.resolveToObject(contextService.getContext(), handle); } catch (ContextServiceException e) { throw new HandleResolverException(e); } catch (SQLException e) { throw new HandleResolverException(e); } } @Override public String getHandle(DSpaceObject object) throws HandleResolverException { try { return HandleManager.findHandle(contextService.getContext(), object); } catch (SQLException e) { throw new HandleResolverException(e); } catch (ContextServiceException e) { throw new HandleResolverException(e); } } }
[ "jmelo@lyncode.com" ]
jmelo@lyncode.com
cb60722eb144767d43d7cbd26b363602c2bfb02a
a9de22590675be8ee38163127a2c24a20c248a0b
/test/com/iremote/thirdpart/cobbe/CreateWifiLockTest.java
081c151cbbdf6fc1bde9b34e2a8599cc40c4a257
[]
no_license
jessicaallen777/iremote2
0943622300286f8d16e9bb4dca349613ffc23bb1
b27aa81785fc8bf5467a1ffcacd49a04e41f6966
refs/heads/master
2023-03-16T03:20:00.746888
2019-12-12T04:02:30
2019-12-12T04:02:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
403
java
package com.iremote.thirdpart.cobbe; import com.iremote.test.db.Db; import com.iremote.test.db.Env; import com.iremote.thirdpart.cobbe.event.CreateWifiLock; public class CreateWifiLockTest { public static void main(String arg[]) { Env.getInstance().need(); Db.init(); CreateWifiLock cwl = new CreateWifiLock(); cwl.setDeviceid("iRemote3006100000242"); cwl.run(); Db.commit(); } }
[ "stevenbluesky@163.com" ]
stevenbluesky@163.com
9b033f3ab1cd1ac14e9c10fe2112e821591a1a5c
3e9dd3298b85ab9b081117eb9c88032715ce13cf
/foc/src/com/fab/model/filter/FilterFieldDefinitionGuiDetailsPanel.java
34ff7a577b5c3a2882d9011617426a579dff6db2
[ "Apache-2.0" ]
permissive
focframework/framework
d0a151755f14a04b4a72a562b22f6bad83fe8836
6d07b694e7713d27b95f0ca69e2ec3c056969054
refs/heads/master
2020-05-30T16:48:32.505610
2019-05-30T07:38:36
2019-05-30T07:38:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
882
java
package com.fab.model.filter; import com.foc.desc.FocObject; import com.foc.gui.FGFormulaEditorPanel; import com.foc.gui.FPanel; import com.foc.gui.FValidationPanel; @SuppressWarnings("serial") public class FilterFieldDefinitionGuiDetailsPanel extends FPanel { public FilterFieldDefinitionGuiDetailsPanel(FocObject focObject, int viewID){ super("Filter field", FPanel.FILL_NONE); if(focObject != null){ FilterFieldDefinition fieldFieldDef = (FilterFieldDefinition) focObject; FGFormulaEditorPanel comp = (FGFormulaEditorPanel) focObject.getGuiComponent(FilterFieldDefinitionDesc.FLD_CONDITION_PROPERTY_PATH); comp.setOriginDesc(fieldFieldDef.getFilterDefinition().getBaseFocDesc()); add(comp, 0, 0); FValidationPanel validPanel = showValidationPanel(true); validPanel.setValidationType(FValidationPanel.VALIDATION_OK); } } }
[ "antoine.samaha@01barmaja.com" ]
antoine.samaha@01barmaja.com
dc6299f1bb275a8150d69e099b4cd8e0c78bface
20eb62855cb3962c2d36fda4377dfd47d82eb777
/newEvaluatedBugs/Jsoup_46_buggy/mutated/52/Validate.java
4577c75fbe78f597002a7d1ebea1bfe3f92bbcd1
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,111
java
package org.jsoup.helper; /** * Simple validation methods. Designed for jsoup internal use */ public final class Validate { private Validate() {} /** * Validates that the obect is not null * @param obj object to test */ public static void notNull(Object obj) { if (obj == null) throw new IllegalArgumentException("Object must not be null"); } /** * Validates that the object is not null * @param obj object to test * @param msg message to output if validation fails */ public static void notNull(Object obj, String msg) { if (obj == null) throw new IllegalArgumentException(msg); } /** * Validates that the value is true * @param val object to test */ public static void isTrue(boolean val) { if (!val) throw new IllegalArgumentException("Must be true"); } /** * Validates that the value is true * @param val object to test * @param msg message to output if validation fails */ public static void isTrue(boolean val, String msg) { if (!val) throw new IllegalArgumentException(msg); } /** * Validates that the value is false * @param val object to test */ public static void isFalse(boolean val) { if (val) throw new IllegalArgumentException("Must be false"); } /** * Validates that the value is false * @param val object to test * @param msg message to output if validation fails */ public static void isFalse(boolean val, String msg) { if (val) throw new IllegalArgumentException(msg); } /** * Validates that the array contains no null elements * @param objects the array to test */ public static void noNullElements(Object[] objects) { noNullElements(objects, "Array must not contain any null objects"); } /** * Validates that the array contains no null elements * @param objects the array to test * @param msg message to output if validation fails */ public static void noNullElements(Object[] objects, String msg) { for (Object obj : objects) if (obj == null) throw new IllegalArgumentException(msg); } /** * Validates that the string is not empty * @param string the string to test */ public static void notEmpty(String string) { if (string == null || string == null) throw new IllegalArgumentException("String must not be empty"); } /** * Validates that the string is not empty * @param string the string to test * @param msg message to output if validation fails */ public static void notEmpty(String string, String msg) { if (string == null || string.length() == 0) throw new IllegalArgumentException(msg); } /** Cause a failure. @param msg message to output. */ public static void fail(String msg) { throw new IllegalArgumentException(msg); } }
[ "justinwm@163.com" ]
justinwm@163.com
dbabb6e65cafe467f0f21dfd8855bf2eadc87810
4ee700525c2225e9da71a514ba49e194baf260fa
/Library_CRUD/src/main/java/util/LogFilter.java
ff1ffce84dab17189576de20a7681e2ccef6097e
[]
no_license
AnatolSich/Home_CRUDS
ffbea6efe6857b1e137df87223ee4a1df060b7cd
6793cb90a5f42ee88fd83652e119d93568f8e1d4
refs/heads/master
2021-09-06T06:51:40.503164
2018-02-03T13:20:22
2018-02-03T13:20:22
115,196,406
0
0
null
null
null
null
UTF-8
Java
false
false
1,468
java
package util; import java.io.IOException; import java.util.Date; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.annotation.WebFilter; import javax.servlet.annotation.WebInitParam; @WebFilter(urlPatterns = { "*.png", "*.jpg", "*.gif" }, initParams = { @WebInitParam(name = "notFoundImage", value = "/images/image-not-found.png") }) public class LogFilter implements Filter { public LogFilter() { } @Override public void init(FilterConfig fConfig) throws ServletException { System.out.println("LogFilter init!"); } @Override public void destroy() { System.out.println("LogFilter destroy!"); } @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest) request; String servletPath = req.getServletPath(); System.out.println("#INFO " + new Date() + " - ServletPath :" + servletPath // + ", URL =" + req.getRequestURL()); // Разрешить request продвигаться дальше. (Перейти данный Filter). chain.doFilter(request, response); } }
[ "tip-77@ukr.net" ]
tip-77@ukr.net
b8aecbeca9f40f21a93b673011162b62a89a9b5e
76c52156540b8cb569b34ab5a57f2bf5706fc966
/app/src/main/java/com/icandothisallday2020/kingofcooking/RetrofitService.java
10ed18959e22e9fca15152c5c5b1b5df1957dd29
[]
no_license
saythename17/KingOfCooking
63d4ecc35e44b55b60de906c9f0d52e96728b00e
4412c0c840e33adc9d54cabc4d7e3a8be4b85e31
refs/heads/master
2022-12-05T04:17:52.799783
2020-09-02T07:52:30
2020-09-02T07:52:30
278,590,376
0
0
null
null
null
null
UTF-8
Java
false
false
636
java
package com.icandothisallday2020.kingofcooking; import com.icandothisallday2020.kingofcooking.my.WriteItem; import java.util.ArrayList; import java.util.Map; import okhttp3.MultipartBody; import retrofit2.Call; import retrofit2.http.GET; import retrofit2.http.Multipart; import retrofit2.http.POST; import retrofit2.http.Part; import retrofit2.http.PartMap; public interface RetrofitService { @Multipart @POST("/Retrofit/koc.php") Call<String> postDataWithFile(@PartMap Map<String,String> dataPart, @Part MultipartBody.Part filePart); @GET("Retrofit/koc2.php") Call<ArrayList<WriteItem>> loadDataFromBoard(); }
[ "zion.h719@gmail.com" ]
zion.h719@gmail.com
5f00104387d0a83a9ff0549ae6e74a22f9e3ea9f
f6e26d6cef35ebb3ee845481f4da0a06c80d7432
/arc002_b/MainTest.java
83abdcea46a75a86a80f37475bd3fe835a92a287
[]
no_license
YujiSoftware/AtCoder
68f7660ae2c235687eb93574ce550584f072eab4
0b40fda849dcfe1cb23c885896ed0473aad87a7f
refs/heads/master
2021-01-23T19:11:15.724752
2018-02-24T17:32:53
2018-02-24T17:32:53
48,444,089
0
0
null
null
null
null
UTF-8
Java
false
false
1,038
java
import static org.hamcrest.CoreMatchers.is; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import org.junit.Assert; import org.junit.Test; public class MainTest { @Test public void 入力例_1() throws Exception { String input = "2012/05/02"; String output = "2013/01/01"; assertIO(input, output); } @Test public void 入力例_2() throws Exception { String input = "2020/05/02"; String output = "2020/05/02"; assertIO(input, output); } @Test public void 入力例_3() throws Exception { String input = "2088/02/28"; String output = "2088/02/29"; assertIO(input, output); } private void assertIO(String input, String output) throws Exception { ByteArrayInputStream in = new ByteArrayInputStream(input.getBytes()); System.setIn(in); ByteArrayOutputStream out = new ByteArrayOutputStream(); System.setOut(new PrintStream(out)); Main.main(new String[0]); Assert.assertThat(out.toString(), is(output + System.lineSeparator())); } }
[ "yuji.software+github@gmail.com" ]
yuji.software+github@gmail.com
a01f916e58a97ff1059a97bf255743c21a9791a3
42966754e0f64b9a4e6a120bda08ca0aa42278e0
/duck/src/main/java/encapsulating/algorithms/BeverageTestDrive.java
ea3ed17108854da80a6a1b815420f60181947deb
[]
no_license
lotockijj/workspace
238b266fd6968ea81732242332a922f6db64dab5
684b2af7f4f8b2202136b34f085c5532de243858
refs/heads/master
2020-05-21T23:00:37.481715
2017-11-10T12:15:18
2017-11-10T12:15:18
64,556,994
0
0
null
null
null
null
UTF-8
Java
false
false
241
java
package encapsulating.algorithms; public class BeverageTestDrive { public static void main(String[] args) { CoffeeWithHook coffeeHook = new CoffeeWithHook(); System.out.println("\nMaking tea..."); coffeeHook.prepareRecipe(); } }
[ "https://github.com/lotockijj/java-courses" ]
https://github.com/lotockijj/java-courses
bbcd8a3bbd3e504859838c0692e7c74a66269f1a
cbdb7891230c83b61be509bc0c8cd02ff5f420d8
/jcst/jcst_webservice/src/main/java/com/kaiwait/webservice/jczh/DelSale.java
4deee6b989284feebd180b16130801af6f1ccd76
[]
no_license
zhanglixye/jcyclic
87e26d1412131e441279240b4468993cb9b08bc3
8a311f8b1e6a81fb40f093d725b5182763d6624e
refs/heads/master
2023-01-04T11:23:22.001517
2020-11-02T05:20:08
2020-11-02T05:20:08
309,265,334
0
0
null
null
null
null
UTF-8
Java
false
false
1,290
java
package com.kaiwait.webservice.jczh; import javax.annotation.Resource; import org.springframework.stereotype.Component; import com.kaiwait.bean.jczh.io.JobZhInput; import com.kaiwait.core.process.SingleFunctionIF; import com.kaiwait.core.process.ValidateResult; import com.kaiwait.service.jczh.CommonMethedService; import com.kaiwait.service.jczh.SaleTypeService; import com.kaiwait.thrift.common.server.annotation.MatchEnum; import com.kaiwait.thrift.common.server.annotation.Privilege; @Component("delSale") @Privilege(keys= {"22"}, match=MatchEnum.ANY) public class DelSale implements SingleFunctionIF<JobZhInput> { @Resource private SaleTypeService saleTypeService; @Resource private CommonMethedService commonMethedService; @Override public Object process(JobZhInput inputParam) { // TODO Auto-generated method stub return saleTypeService.delSaleTx(inputParam.getJob_cd(),Integer.valueOf(inputParam.getCompanyID()),inputParam.getUserID(),inputParam.getSaleLockFlg(), inputParam.getRecLockFlg()); } @Override public ValidateResult validate(JobZhInput inputParam) { // TODO Auto-generated method stub return null; } @SuppressWarnings("rawtypes") @Override public Class getParamType() { // TODO Auto-generated method stub return JobZhInput.class; } }
[ "1364969970@qq.com" ]
1364969970@qq.com
26c0c95970beaee0d4f162a482a9b12700081948
491000a62fc08d55316e3da14d73696d3f1a580d
/jruby/src/org/jruby/environment/OSEnvironmentReaderFromJava5SystemGetenv.java
f947bcbc9d6df76da2ebce7c7fbedc3548629876
[]
no_license
weimingtom/jython_playground
4271471ea0329aa4d69ede3a9a79372990370243
7a9fb459cf586a8b32b28fe8ebd5ae35e194a436
refs/heads/master
2020-09-20T07:31:45.236787
2016-09-10T06:10:44
2016-09-10T06:10:44
67,728,808
0
0
null
null
null
null
UTF-8
Java
false
false
3,303
java
/***** BEGIN LICENSE BLOCK ***** * Version: CPL 1.0/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Common Public * License Version 1.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.eclipse.org/legal/cpl-v10.html * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * Copyright (C) 2006 Tim Azzopardi <tim@tigerfive.com> * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the CPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the CPL, the GPL or the LGPL. ***** END LICENSE BLOCK *****/ package org.jruby.environment; import java.lang.reflect.Method; import java.util.Iterator; import java.util.Map; import org.jruby.IRuby; class OSEnvironmentReaderFromJava5SystemGetenv implements IOSEnvironmentReader { /** * Gets the new Java 5 Sytem.getenv method via reflection. * * @return */ protected Method getSystemGetenvMethod() { Method getenvMethod = null; try { getenvMethod = java.lang.System.class.getMethod("getenv", (Class[]) null); if (!getenvMethod.getReturnType().equals(java.util.Map.class)) { // wrong return type getenvMethod = null; } } catch (NoSuchMethodException e) { // This is the error you get if using Java 1.4.2 getenvMethod = null; } catch (Exception e) { // Some other e.g. security problem getenvMethod = null; } return getenvMethod; } /* * (non-Javadoc) * * @see org.jruby.IOSEnvironment#isAccessible() */ public boolean isAccessible(IRuby runtime) { return getSystemGetenvMethod() != null; } /* * (non-Javadoc) * * @see org.jruby.IOSEnvironment#getVariables() */ public Map getVariables(IRuby runtime) { Map returnMap = null; Method getenvMethod = getSystemGetenvMethod(); try { if (getenvMethod != null) { returnMap = (Map) getenvMethod.invoke(null, (Object[]) null); } } catch (Exception e) { new OSEnvironment().handleException(e); } return returnMap; } public static void main(String[] args) { OSEnvironmentReaderFromJava5SystemGetenv getenv = new OSEnvironmentReaderFromJava5SystemGetenv(); Map envs = getenv.getVariables(null); for (Iterator i = envs.entrySet().iterator(); i.hasNext();) { Map.Entry entry = (Map.Entry) i.next(); System.out.println(entry.getKey() + ":" + entry.getValue()); } System.out.println(); } }
[ "weimingtom@qq.com" ]
weimingtom@qq.com
99374945de9e774a87c261aa91294cd36c080565
75c4712ae3f946db0c9196ee8307748231487e4b
/src/main/java/com/alipay/api/domain/KoubeiCateringPosDishstatusModifyModel.java
5c9e0f7ff6cc1da512271f7249da688d16ec3743
[ "Apache-2.0" ]
permissive
yuanbaoMarvin/alipay-sdk-java-all
70a72a969f464d79c79d09af8b6b01fa177ac1be
25f3003d820dbd0b73739d8e32a6093468d9ed92
refs/heads/master
2023-06-03T16:54:25.138471
2021-06-25T14:48:21
2021-06-25T14:48:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
967
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 批量起售/停售菜品 * * @author auto create * @since 1.0, 2018-11-16 17:19:10 */ public class KoubeiCateringPosDishstatusModifyModel extends AlipayObject { private static final long serialVersionUID = 7398338164637844773L; /** * 需要改售卖状态的菜品id集合 */ @ApiListField("dish_ids") @ApiField("string") private List<String> dishIds; /** * open:起售;stop:停售 */ @ApiField("status") private String status; public List<String> getDishIds() { return this.dishIds; } public void setDishIds(List<String> dishIds) { this.dishIds = dishIds; } public String getStatus() { return this.status; } public void setStatus(String status) { this.status = status; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
b04f60780184039883c7943979747b41f2e1abb8
6b4125b3d69cbc8fc291f93a2025f9f588d160d3
/components/core-settings/src/main/java/org/limewire/core/settings/DaapSettings.java
60bd0751d6124470d9e978f698fc179f9c20be6f
[]
no_license
mnutt/limewire5-ruby
d1b079785524d10da1b9bbae6fe065d461f7192e
20fc92ea77921c83069e209bb045b43b481426b4
refs/heads/master
2022-02-10T12:20:02.332362
2009-09-11T15:47:07
2009-09-11T15:47:07
89,669
2
3
null
2022-01-27T16:18:46
2008-12-12T19:40:01
Java
UTF-8
Java
false
false
4,959
java
package org.limewire.core.settings; import org.limewire.setting.BooleanSetting; import org.limewire.setting.IntSetting; import org.limewire.setting.PasswordSetting; import org.limewire.setting.StringArraySetting; import org.limewire.setting.StringSetting; import org.limewire.util.OSUtils; import org.limewire.inspection.InspectablePrimitive; /** * Settings for Digital Audio Access Protocol (DAAP). */ public class DaapSettings extends LimeProps { private DaapSettings() {} /** * Whether or not DAAP should be enabled. */ @InspectablePrimitive("share with itunes") public static BooleanSetting DAAP_ENABLED = FACTORY.createBooleanSetting("DAAP_ENABLED", true); /** * The audio file types supported by DAAP. */ public static StringArraySetting DAAP_SUPPORTED_AUDIO_FILE_TYPES = FACTORY.createStringArraySetting("DAAP_SUPPORTED_AUDIO_FILE_TYPES", new String[]{".mp3", ".m4a", ".wav", ".aif", ".aiff", ".m1a"}); /** * The video file types supported by DAAP. Note: MPEG-2 does not * work (requires commercial codec)! AVI isn't in the list as QT * doesn't support most of the codecs... */ public static StringArraySetting DAAP_SUPPORTED_VIDEO_FILE_TYPES = FACTORY.createStringArraySetting("DAAP_SUPPORTED_VIDEO_FILE_TYPES", new String[]{".mov", ".mp4", ".mpg", ".mpeg"}); /** * The name of the Library. */ public static StringSetting DAAP_LIBRARY_NAME = (StringSetting)FACTORY.createStringSetting("DAAP_LIBRARY_NAME", getPossessiveUserName() + " LimeWire Tunes"). setPrivate(true); /** * The maximum number of simultaneous connections. Note: There * is an audio stream per connection (i.e. there are actually * DAAP_MAX_CONNECTIONS*2). */ public static IntSetting DAAP_MAX_CONNECTIONS = FACTORY.createIntSetting("DAAP_MAX_CONNECTIONS", 5); /** * The port where the DaapServer is running. */ public static IntSetting DAAP_PORT = FACTORY.createIntSetting("DAAP_PORT", 5214); /** * The fully qualified service type name <code>_daap._tcp.local.</code>. * You shouldn't change this value as iTunes won't see our DaapServer. */ public static StringSetting DAAP_TYPE_NAME = FACTORY.createStringSetting("DAAP_TYPE_NAME", "_daap._tcp.local."); /** * The name of the Service. I recommend to set this value to the * same as <code>DAAP_LIBRARY_NAME</code>.<p> * Note: when you're dealing with mDNS then is the actual Service * name <code>DAAP_SERVICE_NAME.getValue() + "." + * DAAP_TYPE_NAME.getValue()</code> */ public static StringSetting DAAP_SERVICE_NAME = (StringSetting)FACTORY.createStringSetting("DAAP_SERVICE_NAME", getPossessiveUserName() + " LimeWire Tunes"). setPrivate(true); /** * This isn't important. */ public static IntSetting DAAP_WEIGHT = FACTORY.createIntSetting("DAAP_WEIGHT", 0); /** * This isn't important. */ public static IntSetting DAAP_PRIORITY = FACTORY.createIntSetting("DAAP_PRIORITY", 0); /** * Whether or not an username is required. */ public static BooleanSetting DAAP_REQUIRES_USERNAME = FACTORY.createBooleanSetting("DAAP_REQUIRES_USERNAME", false); /** * Whether or not password protection is enabled. */ public static BooleanSetting DAAP_REQUIRES_PASSWORD = FACTORY.createBooleanSetting("DAAP_REQUIRES_PASSWORD", false); /** * The DAAP password. */ public static StringSetting DAAP_USERNAME = FACTORY.createStringSetting("DAAP_USERNAME", ""); /** * The DAAP password. */ public static PasswordSetting DAAP_PASSWORD = FACTORY.createPasswordSettingMD5("DAAP_PASSWORD", ""); /** * With default JVM settings we start to run out of memory * if the Library becomes greater than 16000 Songs (OSX 10.3, * JVM 1.4.2_04, G5 with 2.5GB of RAM). Therefore I'm limiting * the max size to 10000 Songs. */ public static IntSetting DAAP_MAX_LIBRARY_SIZE = FACTORY.createIntSetting("DAAP_MAX_LIBRARY_SIZE", 10000); public static IntSetting DAAP_BUFFER_SIZE = FACTORY.createIntSetting("DAAP_BUFFER_SIZE_2", 2048); /** * Gets the user's name, in possessive format. */ private static String getPossessiveUserName() { String name = null; if (OSUtils.isMacOSX()) name = System.getProperty("user.fullname", null); if (name == null) name = System.getProperty("user.name", "Unknown"); if(!name.endsWith("s")) name += "'s"; else name += "'"; return name; } }
[ "michael@nuttnet.net" ]
michael@nuttnet.net
b8c27a09f6c7b87468421523772e7f118c8cefe9
e5eb7a4f8594363d58634046c001fedfb7c2f4ea
/src/main/java/br/com/eskinfotechweb/cursomc/repositories/PagamentoRepository.java
88227ef0d66b847b273322a7cba7d5e83cb0424f
[]
no_license
eskokado/spring-boot2-ionic-api
e1f5a6819b96aa94f72308e26e147536c4998f3a
7c9cf650c957e36c32e11ef9660da5462158fdb2
refs/heads/master
2021-06-13T18:45:56.492472
2019-06-23T15:12:01
2019-06-23T15:12:01
190,887,155
0
0
null
2021-04-26T19:14:32
2019-06-08T12:48:35
Java
UTF-8
Java
false
false
318
java
package br.com.eskinfotechweb.cursomc.repositories; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import br.com.eskinfotechweb.cursomc.domain.Pagamento; @Repository public interface PagamentoRepository extends JpaRepository<Pagamento, Integer> { }
[ "eskokado@gmail.com" ]
eskokado@gmail.com
3d3b1207a6505883d87e2cf04433948cb970ef0b
1448f519f5beeb597449613ca319a36ee691d6e6
/openTCS-ModelEditor/src/main/java/org/opentcs/guing/application/action/view/AddBitmapAction.java
f33a5ed11f281301bf10fd66506b79c00d490b2a
[ "CC-BY-4.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
bluseking/opentcs
2acc808042a1fe9973c33dda6f2a19366dd7e139
0edd4f5a882787b83e5132097cf3cf9fc6ac4cc2
refs/heads/master
2023-09-06T06:44:10.473728
2021-11-25T15:43:14
2021-11-25T15:43:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,028
java
/** * Copyright (c) The openTCS Authors. * * This program is free software and subject to the MIT license. (For details, * see the licensing information (LICENSE.txt) you should have received with * this copy of the software.) */ package org.opentcs.guing.application.action.view; import java.awt.event.ActionEvent; import java.io.File; import java.util.Objects; import javax.swing.AbstractAction; import javax.swing.JFileChooser; import javax.swing.filechooser.FileNameExtensionFilter; import org.opentcs.guing.application.OpenTCSView; import static org.opentcs.guing.util.I18nPlantOverviewModeling.MENU_PATH; import org.opentcs.thirdparty.jhotdraw.util.ResourceBundleUtil; /** * Actions for adding background bitmaps to the drawing view. * * @author Philipp Seifert (Fraunhofer IML) */ public class AddBitmapAction extends AbstractAction { public final static String ID = "view.addBitmap"; private static final ResourceBundleUtil BUNDLE = ResourceBundleUtil.getBundle(MENU_PATH); private final JFileChooser fc; private final OpenTCSView view; /** * Creates a new instance. * * @param view The openTCS view */ public AddBitmapAction(OpenTCSView view) { this.view = Objects.requireNonNull(view, "view"); this.fc = new JFileChooser(System.getProperty("opentcs.home")); this.fc.setFileFilter(new FileNameExtensionFilter("Bitmaps (PNG, JPG, BMP, GIF)", "png", "jpg", "bmp", "gif")); this.fc.setFileSelectionMode(JFileChooser.FILES_ONLY); putValue(NAME, BUNDLE.getString("addBitmapAction.name")); } @Override public void actionPerformed(ActionEvent e) { int returnVal = fc.showOpenDialog(null); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = fc.getSelectedFile(); view.addBackgroundBitmap(file); } } }
[ "stefan.walter@iml.fraunhofer.de" ]
stefan.walter@iml.fraunhofer.de
3de52061c7262f092f5cc51138a94c2b7e84bc8d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/11/11_6dae2bfb9d081e457beb7e33f37fe173a27c99e3/ProjectArchivesView/11_6dae2bfb9d081e457beb7e33f37fe173a27c99e3_ProjectArchivesView_t.java
03bcbfeafcd12af46c1c2bf1bfebfe7149d32695
[]
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
1,259
java
/******************************************************************************* * Copyright (c) 2010-2013 Red Hat, Inc. * Distributed under license by Red Hat, Inc. All rights reserved. * This program is made available under the terms of the * Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ package org.jboss.tools.archives.reddeer.archives.ui; import org.jboss.reddeer.swt.impl.toolbar.DefaultToolItem; import org.jboss.reddeer.swt.impl.tree.DefaultTreeItem; import org.jboss.reddeer.workbench.view.impl.WorkbenchView; import org.jboss.tools.archives.reddeer.component.ArchiveProject; /** * Project Archives View implementation * * @author jjankovi * */ public class ProjectArchivesView extends WorkbenchView { public ProjectArchivesView() { super("JBoss Tools", "Project Archives"); } public void buildArchiveNode() { new DefaultToolItem("Build Archive Node"); } public ArchiveProject getProject() { return new ArchiveProject(new DefaultTreeItem()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com