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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a6fe46407fc45ad57c29418c482916e683f1d063 | e882573f0127c83cc6c9635f6338aa665f97caa2 | /src/ContactSaver.java | c28a3cb23ef80b879dd169b425e374e048fb0fc2 | [] | no_license | TIY-Charleston-Back-End-Oct2015/Contacts | e958b8db269db0cc5aeb29ef6db184113f9d0db2 | 2cf0f84f21703217d226cbdbd864c8a9762a8fa4 | refs/heads/master | 2016-08-12T11:52:04.049356 | 2015-11-12T16:55:21 | 2015-11-12T16:55:21 | 44,178,427 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,095 | java | import jodd.json.JsonParser;
import jodd.json.JsonSerializer;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
/**
* Created by zach on 10/14/15.
*/
public class ContactSaver {
public static void main(String[] args) throws IOException {
File f = new File("contact.txt");
Contact bob = new Contact();
bob.name = "Bob";
bob.address = "510 Mill St";
bob.email = "bob@theironyard.com";
bob.age = 35;
JsonSerializer serializer = new JsonSerializer();
String contentToSave = serializer.serialize(bob);
FileWriter fw = new FileWriter(f);
fw.write(contentToSave);
fw.close();
FileReader fr = new FileReader(f);
int fileSize = (int) f.length();
char[] contents = new char[fileSize];
fr.read(contents);
String fileContents = new String(contents);
JsonParser parser = new JsonParser();
Contact newBob = parser.parse(fileContents, Contact.class);
System.out.println(newBob.name);
}
}
| [
"zsoakes@gmail.com"
] | zsoakes@gmail.com |
e85e3103035c8a6be18e43e069441b01c34875e3 | f009dc33f9624aac592cb66c71a461270f932ffa | /src/main/java/com/alipay/api/domain/McardTemplate.java | 000de581df6b21b99b6e80156a84af93f27fd32f | [
"Apache-2.0"
] | permissive | 1093445609/alipay-sdk-java-all | d685f635af9ac587bb8288def54d94e399412542 | 6bb77665389ba27f47d71cb7fa747109fe713f04 | refs/heads/master | 2021-04-02T16:49:18.593902 | 2020-03-06T03:04:53 | 2020-03-06T03:04:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,756 | java | package com.alipay.api.domain;
import java.util.Date;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 会员卡模板基本信息
*
* @author auto create
* @since 1.0, 2018-02-05 15:47:28
*/
public class McardTemplate extends AlipayObject {
private static final long serialVersionUID = 3471285991474192417L;
/**
* 会员卡类型
*/
@ApiField("card_type")
private String cardType;
/**
* 会员卡模板创建时间
*/
@ApiField("gmt_create")
private Date gmtCreate;
/**
* 会员卡模板修改时间
*/
@ApiField("gmt_modified")
private Date gmtModified;
/**
* 会员卡模板ID
*/
@ApiField("template_id")
private String templateId;
/**
* 会员卡模板展示样式,会员卡在卡包中的卡面展示效果
*/
@ApiField("template_style_info")
private TemplateStyleInfoDTO templateStyleInfo;
public String getCardType() {
return this.cardType;
}
public void setCardType(String cardType) {
this.cardType = cardType;
}
public Date getGmtCreate() {
return this.gmtCreate;
}
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
public Date getGmtModified() {
return this.gmtModified;
}
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
public String getTemplateId() {
return this.templateId;
}
public void setTemplateId(String templateId) {
this.templateId = templateId;
}
public TemplateStyleInfoDTO getTemplateStyleInfo() {
return this.templateStyleInfo;
}
public void setTemplateStyleInfo(TemplateStyleInfoDTO templateStyleInfo) {
this.templateStyleInfo = templateStyleInfo;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
c31fe306f14957be9cdeb1dbcafc3af1c9706392 | 0354d8e29fcbb65a06525bcac1f55fd08288b6e0 | /clients/jaxrs-cxf-cdi/generated/src/main/java/io/swagger/api/impl/QueueApiServiceImpl.java | aed69f71a90a4bb9273a2b3c78e1949a2ebf2a6a | [
"MIT"
] | permissive | zhiwei55/swaggy-jenkins | cdc52956a40e947067415cec8d2da1425b3d7670 | 678b5477f5f9f00022b176c34b840055fb1b0a77 | refs/heads/master | 2020-03-06T20:38:53.012467 | 2018-02-19T01:53:33 | 2018-02-19T01:54:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 902 | java | package io.swagger.api.impl;
import io.swagger.api.*;
import io.swagger.model.*;
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import io.swagger.model.Queue;
import java.util.List;
import java.io.InputStream;
import javax.enterprise.context.RequestScoped;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
@RequestScoped
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJAXRSCXFCDIServerCodegen", date = "2017-08-03T23:34:47.267Z")
public class QueueApiServiceImpl implements QueueApiService {
@Override
public Response getQueue(SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
@Override
public Response getQueueItem(String number, SecurityContext securityContext) {
// do some magic!
return Response.ok().entity("magic!").build();
}
}
| [
"cliffano@gmail.com"
] | cliffano@gmail.com |
b033417b096f67986f357c636d124a1f84faa7b6 | 475536671cf4e275b7feb5830115c8708936dfc5 | /panda/src/main/java/org/panda_lang/panda/design/interpreter/parser/defaults/ScopeParser.java | 7dcc07ecb7863058efc8512dea6b4f290f414525 | [
"Apache-2.0"
] | permissive | crucix/Panda | 6fcdd016aa191777fea4842cb9c4709b1446f2c4 | c2b23aa9d82682b606d86bf6358ccdf1a9008c98 | refs/heads/master | 2020-03-07T21:56:56.611880 | 2018-03-31T15:14:31 | 2018-03-31T15:14:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,290 | java | /*
* Copyright (c) 2015-2018 Dzikoysk
*
* 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.panda_lang.panda.design.interpreter.parser.defaults;
import org.panda_lang.panda.framework.design.architecture.statement.Scope;
import org.panda_lang.panda.framework.design.interpreter.parser.Parser;
import org.panda_lang.panda.framework.design.interpreter.parser.ParserInfo;
import org.panda_lang.panda.framework.design.interpreter.token.TokenizedSource;
public class ScopeParser implements Parser {
private final Scope scope;
public ScopeParser(Scope scope) {
this.scope = scope;
}
public void parse(ParserInfo info, TokenizedSource body) {
ContainerParser parser = new ContainerParser(scope);
parser.parse(info, body);
}
}
| [
"dzikoysk@dzikoysk.net"
] | dzikoysk@dzikoysk.net |
4db5dba73a50530a4afa0c4620081c3f3f18d3f3 | d44eff1971c4eb09ff128d34690855803f95d6eb | /src/test/java/com/small/spring/Student.java | df7999fa75ea596fba01084efef806af7af61bdf | [] | no_license | Fi-Null/small-spring | 9c900f026572c29657966182440816a4f34f480b | 7ba0b77f64a81a65e7ea2b88c1e03a59e9011461 | refs/heads/master | 2021-07-12T19:22:17.726666 | 2019-10-10T16:31:57 | 2019-10-10T16:31:57 | 209,090,663 | 0 | 0 | null | 2020-10-13T16:37:08 | 2019-09-17T15:28:14 | Java | UTF-8 | Java | false | false | 797 | java | package com.small.spring;
import com.small.spring.beans.annotation.AutoWired;
import com.small.spring.beans.annotation.Component;
import com.small.spring.beans.annotation.Value;
/**
* @ClassName Student
* @Description TODO
* @Author xiangke
* @Date 2019/9/24 23:20
* @Version 1.0
**/
@Component
public class Student {
@Value("huangtianyu")
private String stuName;
@AutoWired
private School school;
public String getStuName() {
return stuName;
}
public void setStuName(String stuName) {
this.stuName = stuName;
}
public School getSchool() {
return school;
}
public void setSchool(School school) {
this.school = school;
}
public void learning() {
System.out.println("i am learning");
}
}
| [
"xiangke@imdada.cn"
] | xiangke@imdada.cn |
260d10a9a3c10e598c43f989df67cd1a12cec7de | b964771ee6e7003f0e17ff8321a48836f7a7e20e | /src/main/java/com/github/EPIICTHUNDERCAT/TameableMobs/models/ModelTameableCreeper.java | 94a229fa16cd5a3e159f942c43a9b28b31a08bd3 | [
"MIT"
] | permissive | EPIICTHUNDERCAT/TameableMobs | 7c21792b279ffb7cff5d6a79b2c818c6beeaceea | 50ab00b1d021e44fc2ed9772e79754a0efa5a407 | refs/heads/master | 2020-06-15T17:56:27.828835 | 2017-05-15T05:24:34 | 2017-05-15T05:24:34 | 75,273,598 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,359 | java | package com.github.epiicthundercat.tameablemobs.models;
import com.github.epiicthundercat.tameablemobs.mobs.TameableCreeper;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.math.MathHelper;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class ModelTameableCreeper extends ModelBase
{
public ModelRenderer head;
public ModelRenderer creeperArmor;
public ModelRenderer body;
public ModelRenderer leg1;
public ModelRenderer leg2;
public ModelRenderer leg3;
public ModelRenderer leg4;
public ModelTameableCreeper()
{
this(0.0F);
}
public ModelTameableCreeper(float p_i46366_1_)
{
int i = 6;
this.head = new ModelRenderer(this, 0, 0);
this.head.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, p_i46366_1_);
this.head.setRotationPoint(0.0F, 6.0F, 0.0F);
this.creeperArmor = new ModelRenderer(this, 32, 0);
this.creeperArmor.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8, p_i46366_1_ + 0.5F);
this.creeperArmor.setRotationPoint(0.0F, 6.0F, 0.0F);
this.body = new ModelRenderer(this, 16, 16);
this.body.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, p_i46366_1_);
this.body.setRotationPoint(0.0F, 6.0F, 0.0F);
this.leg1 = new ModelRenderer(this, 0, 16);
this.leg1.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, p_i46366_1_);
this.leg1.setRotationPoint(-2.0F, 18.0F, 4.0F);
this.leg2 = new ModelRenderer(this, 0, 16);
this.leg2.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, p_i46366_1_);
this.leg2.setRotationPoint(2.0F, 18.0F, 4.0F);
this.leg3 = new ModelRenderer(this, 0, 16);
this.leg3.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, p_i46366_1_);
this.leg3.setRotationPoint(-2.0F, 18.0F, -4.0F);
this.leg4 = new ModelRenderer(this, 0, 16);
this.leg4.addBox(-2.0F, 0.0F, -2.0F, 4, 6, 4, p_i46366_1_);
this.leg4.setRotationPoint(2.0F, 18.0F, -4.0F);
}
/**
* Sets the models various rotation angles then renders the model.
*/
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale)
{
this.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scale, entityIn);
if (this.isChild) {
float f = 2.0F;
GlStateManager.pushMatrix();
GlStateManager.translate(0.0F, 10.0F * scale, 2.0F * scale);
GlStateManager.scale(0.6F, 0.6F, 0.6F);
this.head.render(scale);
this.body.render(scale);
this.leg1.render(scale);
this.leg2.render(scale);
this.leg3.render(scale);
this.leg4.render(scale);
GlStateManager.popMatrix();
} else {
this.head.render(scale);
this.body.render(scale);
this.leg1.render(scale);
this.leg2.render(scale);
this.leg3.render(scale);
this.leg4.render(scale);
}
}
/**
* Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
* and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
* "far" arms and legs can swing at most.
*/
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
{
this.head.rotateAngleY = netHeadYaw * 0.017453292F;
this.head.rotateAngleX = headPitch * 0.017453292F;
this.leg1.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount;
this.leg2.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.4F * limbSwingAmount;
this.leg3.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * 1.4F * limbSwingAmount;
this.leg4.rotateAngleX = MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount;
}
/**
* Used for easily adding entity-dependent animations. The second and third float params here are the same second
* and third as in the setRotationAngles method.
*/
public void setLivingAnimations(EntityLivingBase entitylivingbaseIn, float limbSwingAmount, float ageInTicks, float partialTickTime)
{
super.setLivingAnimations(entitylivingbaseIn, limbSwingAmount, ageInTicks, partialTickTime);
TameableCreeper TameableCreeper = (TameableCreeper) entitylivingbaseIn;
int height = 0;
if (TameableCreeper.isSitting()) {
head.setRotationPoint(0.0F, 6.0F, 0.0F);
body.setRotationPoint(0.0F, 6.0F, 0.0F);
body.offsetY = 0f;
body.rotateAngleY = 0f;
body.rotateAngleZ = 0f;
body.rotateAngleX = 0f;
leg1.setRotationPoint(-2.0F, 18.0F, 4.0F);
leg1.rotationPointX = -2f;
leg1.rotateAngleY = 1f;
leg1.rotateAngleZ = 1f;
leg1.offsetY = 0.09f;
leg1.rotateAngleX = 1f;
leg2.setRotationPoint(2.0F, 18.0F, 4.0F);
leg2.rotateAngleY = -1f;
leg2.rotateAngleZ = -1f;
leg2.offsetY = 0.099f;
leg3.setRotationPoint(-2.0F, 18.0F, -4.0F);
leg3.rotateAngleY = 1f;
leg3.rotateAngleZ = 1f;
leg3.offsetY = 0.099f;
leg4.setRotationPoint(2.0F, 18.0F, -4.0F);
leg4.rotateAngleY = -1f;
leg4.rotateAngleZ = -1f;
leg4.rotateAngleX = -1f;
leg4.offsetY = 0.099f;
} else {
head.setRotationPoint(0.0F, 6.0F, 0.0F);
body.setRotationPoint(0.0F, 6.0F, 0.0F);
leg1.setRotationPoint(-2.0F, 18.0F, 4.0F);
leg1.rotationPointX = -2f;
leg1.rotateAngleY = 0f;
leg1.rotateAngleZ = 0f;
leg1.offsetY = 0.0f;
leg2.setRotationPoint(2.0F, 18.0F, 4.0F);
leg2.offsetY = 0.0f;
leg2.rotateAngleY = 0f;
leg2.rotateAngleZ = 0f;
leg3.setRotationPoint(-2.0F, 18.0F, -4.0F);
leg3.rotateAngleY = 0f;
leg3.rotateAngleZ = 0f;
leg3.offsetY = 0.f;
leg4.setRotationPoint(2.0F, 18.0F, -4.0F);
leg4.rotateAngleY = 0f;
leg4.rotateAngleZ = 0f;
leg4.offsetY = 0.0f;
}
}
} | [
"rvillalobos102299@gmail.com"
] | rvillalobos102299@gmail.com |
f95a19a9fd8579f150fb480a9cd1836692db79e2 | d7462ec35d59ed68f306b291bd8e505ff1d65946 | /webx/turbine/src/main/java/com/alibaba/citrus/turbine/pipeline/valve/BreakUnlessTargetRedirectedValve.java | 2ca1dba270e08c06a1ff089994cb5e4b721dc6ed | [] | no_license | ixijiass/citrus | e6d10761697392fa51c8a14d4c9f133f0a013265 | 53426f1d73cc86c44457d43fb8cbe354ecb001fd | refs/heads/master | 2023-05-23T13:06:12.253428 | 2021-06-15T13:05:59 | 2021-06-15T13:05:59 | 368,477,372 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,562 | java | /*
* Copyright 2010 Alibaba Group Holding Limited.
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.alibaba.citrus.turbine.pipeline.valve;
import static com.alibaba.citrus.springext.util.SpringExtUtil.*;
import static com.alibaba.citrus.turbine.util.TurbineUtil.*;
import static com.alibaba.citrus.util.ObjectUtil.*;
import static com.alibaba.citrus.util.StringUtil.*;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.xml.ParserContext;
import org.w3c.dom.Element;
import com.alibaba.citrus.service.pipeline.PipelineContext;
import com.alibaba.citrus.service.pipeline.impl.valve.BreakValve;
import com.alibaba.citrus.service.pipeline.support.AbstractValveDefinitionParser;
import com.alibaba.citrus.turbine.TurbineRunDataInternal;
public class BreakUnlessTargetRedirectedValve extends BreakValve {
@Autowired
private HttpServletRequest request;
@Override
public void invoke(PipelineContext pipelineContext) throws Exception {
TurbineRunDataInternal rundata = (TurbineRunDataInternal) getTurbineRunData(request);
String target = rundata.getTarget();
String redirectTarget = rundata.getRedirectTarget();
if (!isEmpty(redirectTarget) && !isEquals(target, redirectTarget)) {
rundata.setTarget(redirectTarget);
rundata.setRedirectTarget(null);
pipelineContext.invokeNext();
} else {
super.invoke(pipelineContext);
}
}
public static class DefinitionParser extends AbstractValveDefinitionParser<BreakUnlessTargetRedirectedValve> {
@Override
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
attributesToProperties(element, builder, "levels", "toLabel");
}
}
}
| [
"isheng19982qrr@126.com"
] | isheng19982qrr@126.com |
a1ead96026dad2d590f99fbad732c9a510d515fb | 4d0f2d62d1c156d936d028482561585207fb1e49 | /Ma nguon/zcs-8.0.2_GA_5570-src/ZimbraServer/src/java/com/zimbra/cs/filter/ZimbraSieveException.java | ea6b7e033e212afe874507c37c7f18392575d2ff | [] | no_license | vuhung/06-email-captinh | e3f0ff2e84f1c2bc6bdd6e4167cd7107ec42c0bd | af828ac73fc8096a3cc096806c8080e54d41251f | refs/heads/master | 2020-07-08T09:09:19.146159 | 2013-05-18T12:57:24 | 2013-05-18T12:57:24 | 32,319,083 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 944 | java | /*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Server
* Copyright (C) 2005, 2007, 2008, 2009, 2010 Zimbra, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.zimbra.com/license.
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
* ***** END LICENSE BLOCK *****
*/
/*
* Created on Jan 11, 2005
*
*/
package com.zimbra.cs.filter;
import org.apache.jsieve.exception.SieveException;
@SuppressWarnings("serial")
public class ZimbraSieveException extends SieveException {
private Throwable mCause;
public ZimbraSieveException(Throwable t) {
mCause = t;
}
public Throwable getCause() {
return mCause;
}
}
| [
"vuhung16plus@gmail.com@ec614674-f94a-24a8-de76-55dc00f2b931"
] | vuhung16plus@gmail.com@ec614674-f94a-24a8-de76-55dc00f2b931 |
02ac9b3b680283fc35592fe3822f81f3ae13be7f | c24e883bba5235840239de3bd5640d92e0c8db66 | /activite/activite_core/src/main/java/com/smart/website/activite/entity/SmsHomeRecommendSubjectEntity.java | f5f945ea1a39aad8a7b493e0389a45ee02d258f2 | [] | no_license | hotHeart48156/mallwebsite | 12fe2f7d4e108ceabe89b82eacca75898d479357 | ba865c7ea22955009e2de7b688038ddd8bc9febf | refs/heads/master | 2022-11-23T23:22:28.967449 | 2020-01-07T15:27:27 | 2020-01-07T15:27:27 | 231,905,626 | 0 | 0 | null | 2022-11-15T23:54:56 | 2020-01-05T11:14:43 | Java | UTF-8 | Java | false | false | 3,027 | java | package com.smart.website.activite.entity;
import javax.persistence.*;
@Entity
@Table(name = "sms_home_recommend_subject", schema = "activiti", catalog = "")
//首页推荐专题
public class SmsHomeRecommendSubjectEntity {
private long id;
private Long subjectId;
private String subjectName;
private Integer recommendStatus;
private Integer sort;
private Integer storeId;
@Id
@Column(name = "id", nullable = false)
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
@Basic
@Column(name = "subject_id", nullable = true)
public Long getSubjectId() {
return subjectId;
}
public void setSubjectId(Long subjectId) {
this.subjectId = subjectId;
}
@Basic
@Column(name = "subject_name", nullable = true, length = 64)
public String getSubjectName() {
return subjectName;
}
public void setSubjectName(String subjectName) {
this.subjectName = subjectName;
}
@Basic
@Column(name = "recommend_status", nullable = true)
public Integer getRecommendStatus() {
return recommendStatus;
}
public void setRecommendStatus(Integer recommendStatus) {
this.recommendStatus = recommendStatus;
}
@Basic
@Column(name = "sort", nullable = true)
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
@Basic
@Column(name = "store_id", nullable = true)
public Integer getStoreId() {
return storeId;
}
public void setStoreId(Integer storeId) {
this.storeId = storeId;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SmsHomeRecommendSubjectEntity that = (SmsHomeRecommendSubjectEntity) o;
if (id != that.id) return false;
if (subjectId != null ? !subjectId.equals(that.subjectId) : that.subjectId != null) return false;
if (subjectName != null ? !subjectName.equals(that.subjectName) : that.subjectName != null) return false;
if (recommendStatus != null ? !recommendStatus.equals(that.recommendStatus) : that.recommendStatus != null)
return false;
if (sort != null ? !sort.equals(that.sort) : that.sort != null) return false;
return storeId != null ? storeId.equals(that.storeId) : that.storeId == null;
}
@Override
public int hashCode() {
int result = (int) (id ^ (id >>> 32));
result = 31 * result + (subjectId != null ? subjectId.hashCode() : 0);
result = 31 * result + (subjectName != null ? subjectName.hashCode() : 0);
result = 31 * result + (recommendStatus != null ? recommendStatus.hashCode() : 0);
result = 31 * result + (sort != null ? sort.hashCode() : 0);
result = 31 * result + (storeId != null ? storeId.hashCode() : 0);
return result;
}
}
| [
"2680323775@qq.com"
] | 2680323775@qq.com |
d575b0dc15a587cce70d8c3202e069250ee11569 | 991223dfa128137e64d0de1e17c30699f9dfb41e | /src/main/java/com/lottery/lottype/Dcsfgg.java | 65fce1b00bf4c2a62395a05efc19ffded76602c2 | [] | no_license | soon14/lottery-mumu | 454180203b2ed030ab836086a3f37222647103e3 | 48141dd2308287c3fb29bcf4e9868b049d227d91 | refs/heads/master | 2020-03-24T11:17:15.326087 | 2016-06-22T08:10:59 | 2016-06-22T08:10:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,835 | java | package com.lottery.lottype;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import com.lottery.common.contains.ErrorCode;
import com.lottery.common.contains.lottery.LotteryType;
import com.lottery.common.exception.LotteryException;
import com.lottery.lottype.dc.sfgg.Dcsfgg10301;
import com.lottery.lottype.dc.sfgg.Dcsfgg10401;
import com.lottery.lottype.dc.sfgg.Dcsfgg10405;
import com.lottery.lottype.dc.sfgg.Dcsfgg10501;
import com.lottery.lottype.dc.sfgg.Dcsfgg10506;
import com.lottery.lottype.dc.sfgg.Dcsfgg10516;
import com.lottery.lottype.dc.sfgg.Dcsfgg10601;
import com.lottery.lottype.dc.sfgg.Dcsfgg10607;
import com.lottery.lottype.dc.sfgg.Dcsfgg10622;
import com.lottery.lottype.dc.sfgg.Dcsfgg10642;
import com.lottery.lottype.dc.sfgg.Dcsfgg10701;
import com.lottery.lottype.dc.sfgg.Dcsfgg10801;
import com.lottery.lottype.dc.sfgg.Dcsfgg10901;
import com.lottery.lottype.dc.sfgg.Dcsfgg11001;
import com.lottery.lottype.dc.sfgg.Dcsfgg11101;
import com.lottery.lottype.dc.sfgg.Dcsfgg11201;
import com.lottery.lottype.dc.sfgg.Dcsfgg11301;
import com.lottery.lottype.dc.sfgg.Dcsfgg11401;
import com.lottery.lottype.dc.sfgg.Dcsfgg11501;
import com.lottery.lottype.dc.sfgg.Dcsfgg20301;
import com.lottery.lottype.dc.sfgg.Dcsfgg20401;
import com.lottery.lottype.dc.sfgg.Dcsfgg20405;
import com.lottery.lottype.dc.sfgg.Dcsfgg20501;
import com.lottery.lottype.dc.sfgg.Dcsfgg20506;
import com.lottery.lottype.dc.sfgg.Dcsfgg20516;
import com.lottery.lottype.dc.sfgg.Dcsfgg20601;
import com.lottery.lottype.dc.sfgg.Dcsfgg20607;
import com.lottery.lottype.dc.sfgg.Dcsfgg20622;
import com.lottery.lottype.dc.sfgg.Dcsfgg20642;
import com.lottery.lottype.dc.sfgg.Dcsfgg20701;
import com.lottery.lottype.dc.sfgg.Dcsfgg20801;
import com.lottery.lottype.dc.sfgg.Dcsfgg20901;
import com.lottery.lottype.dc.sfgg.Dcsfgg21001;
import com.lottery.lottype.dc.sfgg.Dcsfgg21101;
import com.lottery.lottype.dc.sfgg.Dcsfgg21201;
import com.lottery.lottype.dc.sfgg.Dcsfgg21301;
import com.lottery.lottype.dc.sfgg.Dcsfgg21401;
import com.lottery.lottype.dc.sfgg.Dcsfgg21501;
@Component("5006")
public class Dcsfgg extends AbstractDanchangLot{
private Logger logger = LoggerFactory.getLogger(Dcsfgg.class);
Map<String, LotDcPlayType> map = new HashMap<String, LotDcPlayType>();
{
map.put("500610301", new Dcsfgg10301());
map.put("500610401", new Dcsfgg10401());
map.put("500610405", new Dcsfgg10405());
map.put("500610501", new Dcsfgg10501());
map.put("500610506", new Dcsfgg10506());
map.put("500610516", new Dcsfgg10516());
map.put("500610601", new Dcsfgg10601());
map.put("500610607", new Dcsfgg10607());
map.put("500610622", new Dcsfgg10622());
map.put("500610642", new Dcsfgg10642());
map.put("500610701", new Dcsfgg10701());
map.put("500610801", new Dcsfgg10801());
map.put("500610901", new Dcsfgg10901());
map.put("500611001", new Dcsfgg11001());
map.put("500611101", new Dcsfgg11101());
map.put("500611201", new Dcsfgg11201());
map.put("500611301", new Dcsfgg11301());
map.put("500611401", new Dcsfgg11401());
map.put("500611501", new Dcsfgg11501());
map.put("500620301", new Dcsfgg20301());
map.put("500620401", new Dcsfgg20401());
map.put("500620405", new Dcsfgg20405());
map.put("500620501", new Dcsfgg20501());
map.put("500620506", new Dcsfgg20506());
map.put("500620516", new Dcsfgg20516());
map.put("500620601", new Dcsfgg20601());
map.put("500620607", new Dcsfgg20607());
map.put("500620622", new Dcsfgg20622());
map.put("500620642", new Dcsfgg20642());
map.put("500620701", new Dcsfgg20701());
map.put("500620801", new Dcsfgg20801());
map.put("500620901", new Dcsfgg20901());
map.put("500621001", new Dcsfgg21001());
map.put("500621101", new Dcsfgg21101());
map.put("500621201", new Dcsfgg21201());
map.put("500621301", new Dcsfgg21301());
map.put("500621401", new Dcsfgg21401());
map.put("500621501", new Dcsfgg21501());
}
@Override
public boolean validate(String betcode, BigDecimal amount,
BigDecimal beishu, int oneAmount) {
if(validateBasicBetcode(betcode)==false) {
return false;
}
long totalAmt = 0;
for(String code:betcode.split("!")) {
LotPlayType type = map.get(code.split("-")[0]);
if(null==type) {
logger.error("注码金额校验错误betcode={} beishu={} amount={} oneAmout={},玩法不存在",new Object[]{betcode,beishu.intValue(),amount,oneAmount});
throw new LotteryException(ErrorCode.betamount_error, ErrorCode.betamount_error.memo);
}
totalAmt = totalAmt + type.getSingleBetAmount(code, beishu, oneAmount);
}
if(amount.longValue()!=totalAmt) {
logger.error("注码金额校验错误betcode={} beishu={} amount={} realamount={},金额错误",new Object[]{betcode,beishu.intValue(),amount,totalAmt});
throw new LotteryException(ErrorCode.betamount_error, ErrorCode.betamount_error.memo);
}
//验证是否注码拆分后,会有一倍大于20000元的注码。
for(String code:betcode.split("!")) {
LotPlayType type = map.get(code.split("-")[0]);
for(SplitedLot lot:type.splitByType(code, beishu.intValue(), 200)) {
if(lot.getAmt()>2000000||lot.getLotMulti()>99) {
logger.error("split amt_lotmulti err:betcode={} lotmulti={} amt={}",new Object[]{lot.getBetcode(),String.valueOf(lot.getLotMulti()),String.valueOf(lot.getAmt())});
throw new LotteryException(ErrorCode.betamount_error, ErrorCode.betamount_error.memo);
}
}
}
return true;
}
@Override
public List<SplitedLot> split(String betcode, int lotmulti, long amt,
int oneAmount) {
List<SplitedLot> splitedLots = new ArrayList<SplitedLot>();
for(String code:betcode.split("!")) {
splitedLots.addAll(map.get(code.split("-")[0]).splitByType(code, lotmulti, oneAmount));
}
long totalamt = 0L;
for(SplitedLot slot:splitedLots) {
if(slot.getAmt()>2000000||slot.getLotMulti()>99) {
logger.error("split amt_lotmulti err:betcode={} lotmulti={} amt={}",new Object[]{slot.getBetcode(),String.valueOf(slot.getLotMulti()),String.valueOf(slot.getAmt())});
throw new LotteryException(ErrorCode.betamount_error, ErrorCode.betamount_error.memo);
}
totalamt = totalamt + slot.getAmt();
}
if(totalamt!=amt) {
logger.error("split amt_equal totalAmt={} amt={}",new Object[]{String.valueOf(totalamt),String.valueOf(amt)});
throw new LotteryException(ErrorCode.betamount_error, ErrorCode.betamount_error.memo);
}
return splitedLots;
}
@Override
public boolean isBigPrize(String prizeinfo, BigDecimal preprizeamt,
BigDecimal afterprizeamt) {
return false;
}
@Override
public LotteryType getLotteryType() {
return LotteryType.DC_SFGG;
}
}
| [
"stringmumu@gmail.com"
] | stringmumu@gmail.com |
7fee444be7d88870039af463ba1390dee5fcecb0 | 32b72e1dc8b6ee1be2e80bb70a03a021c83db550 | /ast_results/robotmedia_droid-comic-viewer/src/com/github/junrar/unpack/UnpackFilter.java | cf4ae5fa3f68c9c7c45323a4a6d3195c5b3ecb46 | [] | no_license | cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning | d90c41a17e88fcd99d543124eeb6e93f9133cb4a | 0564143d92f8024ff5fa6b659c2baebf827582b1 | refs/heads/master | 2020-07-13T13:53:40.297493 | 2019-01-11T11:51:18 | 2019-01-11T11:51:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,326 | java | // isComment
package com.github.junrar.unpack;
import com.github.junrar.unpack.vm.VMPreparedProgram;
/**
* isComment
*/
public class isClassOrIsInterface {
private int isVariable;
private int isVariable;
private int isVariable;
private boolean isVariable;
// isComment
// isComment
private int isVariable;
private VMPreparedProgram isVariable = new VMPreparedProgram();
public int isMethod() {
return isNameExpr;
}
public void isMethod(int isParameter) {
isNameExpr = isNameExpr;
}
public int isMethod() {
return isNameExpr;
}
public void isMethod(int isParameter) {
isNameExpr = isNameExpr;
}
public int isMethod() {
return isNameExpr;
}
public void isMethod(int isParameter) {
isNameExpr = isNameExpr;
}
public boolean isMethod() {
return isNameExpr;
}
public void isMethod(boolean isParameter) {
isNameExpr = isNameExpr;
}
public int isMethod() {
return isNameExpr;
}
public void isMethod(int isParameter) {
isNameExpr = isNameExpr;
}
public VMPreparedProgram isMethod() {
return isNameExpr;
}
public void isMethod(VMPreparedProgram isParameter) {
isNameExpr = isNameExpr;
}
}
| [
"matheus@melsolucoes.net"
] | matheus@melsolucoes.net |
d4dcbe72cd2a4e7ceeaef140e3da64608e1eccd3 | 5ca4b1ada88d7dd60186223ff21d16572eca44bd | /jflow-core/src/main/java/cn/jflow/model/designer/CanRetuenNodesModel.java | 73d4ebad6d05ab4cba5ae25d505c9b5c6de264a1 | [] | no_license | swmwlm/skoa-product | 5f61a3d4657d803adc1b0e8e3d1db754b8daf73b | cc52de1950a651df335ca64f554a5aafa86ff6d6 | refs/heads/master | 2021-01-22T07:06:18.440340 | 2017-03-14T03:35:01 | 2017-03-14T03:35:01 | 81,800,503 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,487 | java | package cn.jflow.model.designer;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import cn.jflow.common.model.BaseModel;
import cn.jflow.system.ui.UiFatory;
import cn.jflow.system.ui.core.Button;
import cn.jflow.system.ui.core.CheckBox;
import BP.WF.Node;
import BP.WF.Template.NodeReturnAttr;
import BP.WF.Template.NodeReturns;
import BP.WF.Nodes;
import BP.WF.Template.NodeAttr;
import BP.WF.ReturnRole;
public class CanRetuenNodesModel extends BaseModel{
//private String basePath;
public UiFatory pub = null;
public CanRetuenNodesModel(HttpServletRequest request, HttpServletResponse response, String basePath) {
super(request, response);
this.pub = new UiFatory();
//this.basePath = basePath;
}
public void init(){
try{
Node mynd = new Node();
mynd.setNodeID(this.getFK_Node());
mynd.RetrieveFromDBSources();
if (mynd.getHisReturnRole() != ReturnRole.ReturnSpecifiedNodes){
this.pub.append(BaseModel.AddFieldSet("操作错误:", "<br><br>当前节点的退回规则不是退回到指定的节点,所以您不能操作此功能。<br><br>请在节点属性=>退回规则属性里设置,退回指定的节点,此功能才有效。<br><br><br><br>"));
return;
}
this.pub.append(BaseModel.AddTable("width='100%'"));
this.pub.append(BaseModel.AddCaptionLeft("为“" + mynd.getName() + "”, 设置可退回的节点。"));
NodeReturns rnds = new NodeReturns();
rnds.Retrieve(NodeReturnAttr.FK_Node, this.getFK_Node());
Nodes nds = new Nodes();
nds.Retrieve(NodeAttr.FK_Flow, this.getFK_Flow());
int idx = 0;
for(Node nd : nds.ToJavaList()){
if (nd.getNodeID() == this.getFK_Node())
continue;
CheckBox cb = this.pub.creatCheckBox("CB_" + nd.getNodeID());
cb.setText(nd.getName());
cb.setChecked(rnds.IsExits(NodeReturnAttr.ReturnTo, nd.getNodeID()));
this.pub.append(BaseModel.AddTR());
this.pub.append(BaseModel.AddTDIdx(idx++));
this.pub.append(BaseModel.AddTD("第" + nd.getStep() + "步"));
this.pub.append("\n<TD nowrap = 'nowrap'>");
this.pub.append(cb);
this.pub.append("</TD>");
this.pub.append(BaseModel.AddTREnd());
}
this.pub.append(BaseModel.AddTRSum());
this.pub.append(BaseModel.AddTD());
Button btn = this.pub.creatButton("Btn_Save");
btn.setText("Save");
btn.setCssClass("Btn");
btn.addAttr("onclick", "onSave()");
this.pub.append("\n<TD nowrap = 'nowrap'>");
this.pub.append(btn);
this.pub.append("</TD>");
this.pub.append(BaseModel.AddTD());
this.pub.append(BaseModel.AddTREnd());
this.pub.append(BaseModel.AddTableEnd());
this.pub.append(BaseModel.AddFieldSet("特别说明:", "1,只有节点属性的退回规则被设置成退回制订的节点,此功能才有效。<br> 2,设置退回的节点如果是当前节点下一步骤的节点,设置无意义,系统不做检查,退回时才做检查。"));
}catch(Exception e){
this.pub.append(BaseModel.AddMsgOfWarning("错误", e.getMessage()));
}
}
}
| [
"81367070@qq.com"
] | 81367070@qq.com |
ddfed18231c35b3e1bcc54f0e8be059112b880ea | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/23/23_743a8bc1a987e51501023d604e4cdcff0e149c01/MetalCasterRecipeHandler/23_743a8bc1a987e51501023d604e4cdcff0e149c01_MetalCasterRecipeHandler_t.java | 545cce6da1d4bd88de11f0a8f5eed645b751061b | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 6,451 | java | package exter.foundry.integration.nei;
import java.awt.Rectangle;
import java.util.List;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.GuiCraftingRecipe;
import codechicken.nei.recipe.GuiRecipe;
import codechicken.nei.recipe.GuiUsageRecipe;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import exter.foundry.api.recipe.ICastingRecipe;
import exter.foundry.gui.GuiMetalCaster;
import exter.foundry.recipes.manager.CastingRecipeManager;
public class MetalCasterRecipeHandler extends FoundryRecipeHandler
{
public static int GUI_SMELT_TIME = 40;
public static ProgressBar PROGRESS = new ProgressBar(60, 51, 176, 53, 27, 15, 0, GUI_SMELT_TIME);
public class CachedCasterRecipe extends CachedFoundryRecipe
{
FluidTank tank;
PositionedStack mold;
PositionedStack extra;
PositionedStack output;
public CachedCasterRecipe(ICastingRecipe recipe)
{
tank = new FluidTank(recipe.GetInputFluid(), 6000, new Rectangle(34, 10, 16, 47));
mold = new PositionedStack(recipe.GetInputMold(), 61, 10, true);
output = new PositionedStack(recipe.GetOutput(), 81, 40, true);
List<ItemStack> extras = getExtraItems(recipe);
if(!extras.isEmpty())
{
extra = new PositionedStack(extras.toArray(new ItemStack[0]), 81, 10, true);
}
}
@Override
public FluidTank getTank()
{
return tank;
}
@Override
public PositionedStack getResult()
{
return output;
}
@Override
public List<PositionedStack> getIngredients()
{
return extra != null ? ImmutableList.<PositionedStack> of(mold, extra) : ImmutableList.<PositionedStack> of(mold);
}
}
@SuppressWarnings("unchecked")
protected List<ItemStack> getExtraItems(ICastingRecipe recipe)
{
if(recipe.GetInputExtra() == null)
{
return Lists.newArrayList();
}
if(recipe.GetInputExtra() instanceof String)
{
List<ItemStack> list = (List<ItemStack>) asItemStackOrList(recipe.GetInputExtra());
if(list != null && !list.isEmpty())
{
for(ItemStack stack : list)
{
stack.stackSize = recipe.GetInputExtraAmount();
}
}
return list;
} else if(recipe.GetInputExtra() instanceof ItemStack)
{
ItemStack stack = ((ItemStack) recipe.GetInputExtra()).copy();
stack.stackSize = recipe.GetInputExtraAmount();
return Lists.newArrayList(stack);
}
return Lists.newArrayList();
}
@Override
public String getRecipeName()
{
return "Metal Caster";
}
@Override
public String getGuiTexture()
{
return "foundry:textures/gui/caster.png";
}
@Override
public void drawExtras(int recipe)
{
CachedCasterRecipe castingRecipe = (CachedCasterRecipe) arecipes.get(recipe);
int currentProgress = castingRecipe.getAgeTicks() % GUI_SMELT_TIME;
if(currentProgress > 0)
{
drawProgressBar(new ProgressBar(55, 40, 176, 53, 27, 15, 0, GUI_SMELT_TIME), currentProgress);
}
drawTanks(castingRecipe.getTanks(), GUI_SMELT_TIME - castingRecipe.getAgeTicks() / GUI_SMELT_TIME, TANK_OVERLAY);
}
@Override
public boolean mouseClicked(GuiRecipe gui, int button, int recipe)
{
CachedCasterRecipe castingRecipe = (CachedCasterRecipe) arecipes.get(recipe);
if(isMouseOver(castingRecipe.getTank().position, gui, recipe))
{
if(button == 0)
{
return GuiCraftingRecipe.openRecipeGui("liquid", castingRecipe.getTank().fluid);
}
if(button == 1)
{
return GuiUsageRecipe.openRecipeGui("liquid", castingRecipe.getTank().fluid);
}
}
return super.mouseClicked(gui, button, recipe);
}
public void loadAllRecipes()
{
for(ICastingRecipe recipe : CastingRecipeManager.instance.GetRecipes())
{
addRecipe(recipe);
}
}
@Override
public void loadUsageRecipes(String outputId, Object... results)
{
if(outputId.equals("foundry.casting"))
{
loadAllRecipes();
}
if(outputId.equals("item"))
{
for(ICastingRecipe recipe : CastingRecipeManager.instance.GetRecipes())
{
for(ItemStack stack : getExtraItems(recipe))
{
if(stack.isItemEqual((ItemStack) results[0]))
{
addRecipe(recipe);
}
}
if(recipe.GetInputMold().isItemEqual((ItemStack) results[0]) && recipe.GetOutput() != null)
{
addRecipe(recipe);
}
FluidStack fluid = getFluidStackFor((ItemStack) results[0]);
if(fluid != null && fluid.isFluidEqual(recipe.GetInputFluid()))
{
addRecipe(recipe);
}
}
}
if(outputId.equals("liquid"))
{
for(ICastingRecipe recipe : CastingRecipeManager.instance.GetRecipes())
{
if(recipe.GetInputFluid().isFluidEqual((FluidStack) results[0]))
{
addRecipe(recipe);
}
}
}
}
@Override
public void loadCraftingRecipes(String outputId, Object... results)
{
if(outputId.equals("foundry.casting"))
{
loadAllRecipes();
}
if(outputId.equals("item"))
{
for(ICastingRecipe recipe : CastingRecipeManager.instance.GetRecipes())
{
if(recipe.GetOutput() != null && recipe.GetOutput() instanceof ItemStack && ((ItemStack) recipe.GetOutput()).isItemEqual((ItemStack) results[0]))
{
arecipes.add(new CachedCasterRecipe(recipe));
}
}
}
}
public void addRecipe(ICastingRecipe recipe)
{
if(recipe.GetOutput() != null && !(recipe.GetOutput() instanceof String) && recipe.GetInputFluid() != null)
{
arecipes.add(new CachedCasterRecipe(recipe));
}
}
@Override
public void loadTransferRects()
{
transferRects.add(new RecipeTransferRect(new Rectangle(55, 40, 25, 15), "foundry.casting", new Object[0]));
}
@Override
public List<Class<? extends GuiContainer>> getRecipeTransferRectGuis()
{
return ImmutableList.<Class<? extends GuiContainer>> of(GuiMetalCaster.class);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
c5c9ddcc3e7dd3744e64e76d0d3d486346f55e8d | 2e9a86693b665b879c59b14dfd63c2c92acbf08a | /webconverter/decomiledJars/rt/javax/swing/colorchooser/ValueFormatter.java | 149a09e20faf94a9ce6c5a332277fe637d234d32 | [] | no_license | shaikgsb/webproject-migration-code-java | 9e2271255077025111e7ea3f887af7d9368c6933 | 3b17211e497658c61435f6c0e118b699e7aa3ded | refs/heads/master | 2021-01-19T18:36:42.835783 | 2017-07-13T09:11:05 | 2017-07-13T09:11:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,982 | java | package javax.swing.colorchooser;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.text.ParseException;
import java.util.Locale;
import javax.swing.JFormattedTextField;
import javax.swing.JFormattedTextField.AbstractFormatter;
import javax.swing.SwingUtilities;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.DefaultFormatterFactory;
import javax.swing.text.Document;
import javax.swing.text.DocumentFilter;
import javax.swing.text.DocumentFilter.FilterBypass;
final class ValueFormatter
extends JFormattedTextField.AbstractFormatter
implements FocusListener, Runnable
{
private final DocumentFilter filter = new DocumentFilter()
{
public void remove(DocumentFilter.FilterBypass paramAnonymousFilterBypass, int paramAnonymousInt1, int paramAnonymousInt2)
throws BadLocationException
{
if (ValueFormatter.this.isValid(paramAnonymousFilterBypass.getDocument().getLength() - paramAnonymousInt2)) {
paramAnonymousFilterBypass.remove(paramAnonymousInt1, paramAnonymousInt2);
}
}
public void replace(DocumentFilter.FilterBypass paramAnonymousFilterBypass, int paramAnonymousInt1, int paramAnonymousInt2, String paramAnonymousString, AttributeSet paramAnonymousAttributeSet)
throws BadLocationException
{
if ((ValueFormatter.this.isValid(paramAnonymousFilterBypass.getDocument().getLength() + paramAnonymousString.length() - paramAnonymousInt2)) && (ValueFormatter.this.isValid(paramAnonymousString))) {
paramAnonymousFilterBypass.replace(paramAnonymousInt1, paramAnonymousInt2, paramAnonymousString.toUpperCase(Locale.ENGLISH), paramAnonymousAttributeSet);
}
}
public void insertString(DocumentFilter.FilterBypass paramAnonymousFilterBypass, int paramAnonymousInt, String paramAnonymousString, AttributeSet paramAnonymousAttributeSet)
throws BadLocationException
{
if ((ValueFormatter.this.isValid(paramAnonymousFilterBypass.getDocument().getLength() + paramAnonymousString.length())) && (ValueFormatter.this.isValid(paramAnonymousString))) {
paramAnonymousFilterBypass.insertString(paramAnonymousInt, paramAnonymousString.toUpperCase(Locale.ENGLISH), paramAnonymousAttributeSet);
}
}
};
private final int length;
private final int radix;
private JFormattedTextField text;
static void init(int paramInt, boolean paramBoolean, JFormattedTextField paramJFormattedTextField)
{
ValueFormatter localValueFormatter = new ValueFormatter(paramInt, paramBoolean);
paramJFormattedTextField.setColumns(paramInt);
paramJFormattedTextField.setFormatterFactory(new DefaultFormatterFactory(localValueFormatter));
paramJFormattedTextField.setHorizontalAlignment(4);
paramJFormattedTextField.setMinimumSize(paramJFormattedTextField.getPreferredSize());
paramJFormattedTextField.addFocusListener(localValueFormatter);
}
ValueFormatter(int paramInt, boolean paramBoolean)
{
this.length = paramInt;
this.radix = (paramBoolean ? 16 : 10);
}
public Object stringToValue(String paramString)
throws ParseException
{
try
{
return Integer.valueOf(paramString, this.radix);
}
catch (NumberFormatException localNumberFormatException)
{
ParseException localParseException = new ParseException("illegal format", 0);
localParseException.initCause(localNumberFormatException);
throw localParseException;
}
}
public String valueToString(Object paramObject)
throws ParseException
{
if ((paramObject instanceof Integer))
{
if (this.radix == 10) {
return paramObject.toString();
}
int i = ((Integer)paramObject).intValue();
int j = this.length;
char[] arrayOfChar = new char[j];
while (0 < j--)
{
arrayOfChar[j] = Character.forDigit(i & 0xF, this.radix);
i >>= 4;
}
return new String(arrayOfChar).toUpperCase(Locale.ENGLISH);
}
throw new ParseException("illegal object", 0);
}
protected DocumentFilter getDocumentFilter()
{
return this.filter;
}
public void focusGained(FocusEvent paramFocusEvent)
{
Object localObject = paramFocusEvent.getSource();
if ((localObject instanceof JFormattedTextField))
{
this.text = ((JFormattedTextField)localObject);
SwingUtilities.invokeLater(this);
}
}
public void focusLost(FocusEvent paramFocusEvent) {}
public void run()
{
if (this.text != null) {
this.text.selectAll();
}
}
private boolean isValid(int paramInt)
{
return (0 <= paramInt) && (paramInt <= this.length);
}
private boolean isValid(String paramString)
{
int i = paramString.length();
for (int j = 0; j < i; j++)
{
char c = paramString.charAt(j);
if (Character.digit(c, this.radix) < 0) {
return false;
}
}
return true;
}
}
| [
"Subbaraju.Gadiraju@Lnttechservices.com"
] | Subbaraju.Gadiraju@Lnttechservices.com |
b62f1e0d5bdbf187e4c4e4f6594d9c0ccb720c5f | 6e498099b6858eae14bf3959255be9ea1856f862 | /src/com/facebook/buck/remoteexecution/config/RemoteExecutionStrategyConfig.java | ae4d465c99edf23837754be274d91dde509471de | [
"Apache-2.0"
] | permissive | Bonnie1312/buck | 2dcfb0791637db675b495b3d27e75998a7a77797 | 3cf76f426b1d2ab11b9b3d43fd574818e525c3da | refs/heads/master | 2020-06-11T13:29:48.660073 | 2019-06-26T19:59:32 | 2019-06-26T21:06:24 | 193,979,660 | 2 | 0 | Apache-2.0 | 2019-09-22T07:23:56 | 2019-06-26T21:24:33 | Java | UTF-8 | Java | false | false | 1,132 | java | /*
* Copyright 2018-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package com.facebook.buck.remoteexecution.config;
import java.util.OptionalLong;
/** Configuration for the remote execution strategy. */
public interface RemoteExecutionStrategyConfig {
int getThreads();
int getMaxConcurrentActionComputations();
int getMaxConcurrentExecutions();
int getMaxConcurrentResultHandling();
int getMaxConcurrentPendingUploads();
boolean isLocalFallbackEnabled();
OptionalLong maxInputSizeBytes();
String getWorkerRequirementsFilename();
boolean tryLargerWorkerOnOom();
}
| [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
37edadc6cf832a3944540b199250e1297e91112d | 5ca37c9faccc82d9d0b83ecd1dac176d8cfa7261 | /blelibrary/src/main/java/com/ebanswers/ble/listener/BLEScanListener.java | ca32594040418ee01233847ce5dffc5665630976 | [] | no_license | yhx810971230/x1.i | 9c04a80a57fa7148e74d28b22917800db203ff70 | 775531627a54c21f768c616a6ac708e25c98200f | refs/heads/master | 2022-04-23T00:37:31.330912 | 2020-04-17T09:47:12 | 2020-04-17T09:47:12 | 256,391,924 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 236 | java | package com.ebanswers.ble.listener;
import com.ebanswers.ble.BLEDevice;
/**
* Description
* Created by chenqiao on 2016/9/1.
*/
public interface BLEScanListener {
void onScanStop();
void onAddADevice(BLEDevice device);
}
| [
"810971230@qq.com"
] | 810971230@qq.com |
05cc0b8e8e6250fe948c505951ca00ad16bab032 | 1ea74ff282bba8f1bf0985c45cf2cd71b271cef2 | /Day_08/Notes/src/com/dragontalker/CircleTest.java | df56ff372ad61fd636f2cd0d491a66c852d569be | [
"MIT"
] | permissive | Dragontalker/JavaEE-study-notes | 85d6361d4e3fd90eeacb78d56bfcb1e0885678d1 | b6c334f4539b2d2f377146334667e5129ce28dd8 | refs/heads/main | 2023-05-03T02:55:42.221241 | 2021-05-27T01:11:10 | 2021-05-27T01:11:10 | 363,492,612 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 475 | java | package com.dragontalker;
public class CircleTest {
public static void main(String[] args) {
Circle c1 = new Circle();
c1.radius = 2;
c1.calculateArea();
System.out.println(c1.getArea());
}
}
// 圆
class Circle {
// 属性
double radius;
double area;
// 求圆的面积
public void calculateArea() {
area = Math.PI * radius * radius;
}
public double getArea() {
return area;
}
}
| [
"richard.yang.tong@gmail.com"
] | richard.yang.tong@gmail.com |
25938011c81b699293602d9c986fc5267c86e9d0 | e40b85a61a04dfaeebcb212cdeb104041eb5713d | /dev/workspace/sistJavaStudy/src/date181202/PersonalInfo.java | f0e11ea2a9a74fdf3f0eb9fa1069a209ab48a05f | [] | no_license | younggeun0/SSangYoung | d4e6081ac3ce8b69b725d89098d9d0a1ece4fded | 1d00893c85004d2d3243cebb375ee754817649f5 | refs/heads/master | 2020-04-01T22:19:34.191490 | 2019-05-15T06:29:08 | 2019-05-15T06:29:08 | 153,702,136 | 1 | 0 | null | 2018-12-02T14:35:44 | 2018-10-18T23:58:55 | Java | UTF-8 | Java | false | false | 1,015 | java | package date181202;
public class PersonalInfo {
private int num;
private String name;
private String address;
private int age;
private String gender;
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public void printPI() {
System.out.printf("%d, %s, %s, %d, %s",
num, name, address, age, gender);
System.out.println();
}
public void setPI(int num, String name, String address, int age, String gender) {
this.num = num;
this.name = name;
this.address = address;
this.age = age;
this.gender = gender;
}
}
| [
"34850791+younggeun0@users.noreply.github.com"
] | 34850791+younggeun0@users.noreply.github.com |
afc35c8cac573432d86d88457cf2f1fe8cc49503 | afab90e214f8cb12360443e0877ab817183fa627 | /bitcamp-project-server/old/v53_3/src/main/java/com/eomcs/lms/servlet/BoardDeleteServlet.java | 2fbb0834ee8b0518431aac9842ce6550f86c9274 | [] | no_license | oreoTaste/bitcamp-study | 40a96ef548bce1f80b4daab0eb650513637b46f3 | 8f0af7cd3c5920841888c5e04f30603cbeb420a5 | refs/heads/master | 2020-09-23T14:47:32.489490 | 2020-05-26T09:05:40 | 2020-05-26T09:05:40 | 225,523,347 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,458 | java | package com.eomcs.lms.servlet;
import java.io.PrintWriter;
import java.util.Map;
import org.springframework.stereotype.Component;
import com.eomcs.lms.service.BoardService;
import com.eomcs.util.RequestMapping;
@Component
public class BoardDeleteServlet {
BoardService boardService;
public BoardDeleteServlet(BoardService boardService) {
this.boardService = boardService;
}
@RequestMapping("/board/delete")
public void service(Map<String, String> map, PrintWriter out) throws Exception {
printHead(out);
try {
out.println("<h1>게시글 삭제 결과</h1>");
int no = Integer.parseInt(map.get("no"));
if(boardService.delete(no)) {
out.println("<p>게시글을 삭제했습니다.</p>");
} else {
out.println("<p>해당 번호의 게시글이 없습니다.</p>");
}
} catch (Exception e) {
out.println("<p>게시판 정보 삭제 중 오류발생!</p>");
}
printTail(out);
}
private void printTail(PrintWriter out) {
out.println("</body>");
out.println("</html>");
}
private void printHead(PrintWriter out) {
out.println("<!DOCTYPE html>");
out.println("<html>");
out.println("<head>");
out.println("<meta charset='UTF-8'>");
out.println("<meta http-equiv=\"refresh\" content='2; url=/board/list'>");
out.println("<title> 게시글 삭제 </title>");
out.println("</head>");
out.println("<body>");
}
}
| [
"youngkuk.sohn@gmail.com"
] | youngkuk.sohn@gmail.com |
2c3a3988916eb9150a321321506186aa009f010b | fa68ebb9b6c7581ad2d9a131b24a38e0f81578fe | /src/main/java/com/pmrodrigues/android/allinshopping/enumations/ResourceType.java | 096155e0f99e85ed0989738abe5d902eae156c90 | [] | no_license | marcelosrodrigues/allinshopping | 99849d9d153aa8640beed75015cb08366dc9e08e | 0a3d13793ee8ba185283708c204a019d06d45383 | refs/heads/master | 2016-09-06T07:07:03.938923 | 2015-01-16T18:51:30 | 2015-01-16T18:51:30 | 17,633,199 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 173 | java | package com.pmrodrigues.android.allinshopping.enumations;
public enum ResourceType
{
CEP, CLIENTE, PEDIDO, PRODUTOS, SECOES, ESTADOS, FAIXA_PRECO, FORMA_PAGAMENTO;
}
| [
"marcelosrodrigues@globo.com"
] | marcelosrodrigues@globo.com |
a96caa45807cdbe0f9c524baec338a77954ebbdb | 3cdccc734c11c9c5fdafef6aa7cc2ec9b3082905 | /app/src/androidTest/java/co/nos/noswallet/model/NOSWalletTest.java | f50d13bd31c0081d9c8692d1d801e00d8cdd2b7e | [
"BSD-2-Clause"
] | permissive | apkong/NOSwalletAndroid | 134e4bcded006dc23ad63faeaf3d777efbed9241 | 65708834ac173f9bd83ec441e9369abc22ffdd54 | refs/heads/master | 2020-04-17T12:18:02.577583 | 2019-01-17T12:43:00 | 2019-01-17T12:43:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 697 | java | package co.nos.noswallet.model;
import android.support.test.runner.AndroidJUnit4;
import android.test.InstrumentationTestCase;
import junit.framework.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
public class NOSWalletTest extends InstrumentationTestCase {
@Test
public void rawToNeuros() {
Assert.assertEquals(NeuroWallet.neurosToRaw("2"), "2000000000000000000000000000000");
}
@Test
public void neurosToRaw() {
Assert.assertEquals(NeuroWallet.rawToNeuros("2000000000000000000000000000000"), "2");
}
@Test
public void zeros() {
Assert.assertEquals(NeuroWallet.zeros(3), "000");
}
} | [
"lukmar993@gmail.com"
] | lukmar993@gmail.com |
2078cef84637049c788d626eb954dfe0ff90ad1a | a8cec80d309b206fbb1bf87020cb36106cc925f9 | /Spring-12-AOP/src/main/java/com/cybertek/aspects/LoggingAspect.java | b94bcedd1590371bcd673473e4bf58c75c643106 | [] | no_license | CundullahT/Spring_Framework_Project | 9d951f0c53154c79d23c52948d054ea8f7efb836 | a07093340cc9f35738160d07a8f3a43b0a74dd09 | refs/heads/master | 2023-05-03T03:06:15.785049 | 2021-05-22T16:36:59 | 2021-05-22T16:36:59 | 309,557,919 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,239 | java | package com.cybertek.aspects;
import com.cybertek.controller.ProductController;
import com.cybertek.entity.Product;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
import org.hibernate.mapping.Join;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import java.util.ArrayList;
import java.util.List;
@Aspect
@Configuration
public class LoggingAspect {
Logger logger = LoggerFactory.getLogger(ProductController.class);
//
// @Pointcut("execution(* com.cybertek.controller.ProductController.*(..))")
// public void pointcut() {
// }
//
// @Before("pointcut()")
// public void log() {
// logger.info("-------------");
// }
//
//
// @Before("execution(* com.cybertek.controller.ProductController.*(..))")
// public void beforeAdvice() {
// logger.info("-----------");
// }
//
//
// // execution
//
// @Pointcut("execution(* com.cybertek.controller.ProductController.up*(..))")
// private void anyUpdateOperation(){}
//
// @Pointcut("execution(* com.cybertek.repository.ProductRepository.findById(Long))")
// private void anyProductRepositoryFindById(){}
//
// @Before("anyProductRepositoryFindById()")
// public void beforeProductRepoAdvice(JoinPoint joinPoint){
// logger.info("Before(findById) -> Method {} - Arguments : {} - Target : {}",joinPoint,joinPoint.getArgs(),joinPoint.getTarget());
// }
//
// @Before("anyUpdateOperation()")
// public void beforeControllerAdvice(JoinPoint joinPoint){
// logger.info("Before -> Method {} - Arguments : {} - Target : {}",joinPoint,joinPoint.getArgs(),joinPoint.getTarget());
// }
//
// // within
//
// @Pointcut("within(com.cybertek.controller..*)")
// private void anyControllerOperation() {
// }
//
// @Pointcut("@within(org.springframework.stereotype.Service)")
// private void anyServiceAnnotatedOperation() {
// }
//
// @Before("anyServiceAnnotatedOperation() || anyControllerOperation() ")
// public void beforeControllerAdvice2(JoinPoint joinPoint) {
// logger.info("Before -> Method : {} - Arguments : {} - Target : {}", joinPoint, joinPoint.getArgs(), joinPoint.getTarget());
// }
//
// // annotation
//
// @Pointcut("@annotation(org.springframework.web.bind.annotation.DeleteMapping)")
// private void anyDeleteProductOperation() {
// }
//
// @Before("anyDeleteProductOperation()")
// public void beforeControllerAdvice(JoinPoint joinPoint) {
// logger.info("Before -> Method : {} - Arguments : {} - Target : {}", joinPoint, joinPoint.getArgs(), joinPoint.getTarget());
// }
//
// // after returning
//
// @Pointcut("@annotation(org.springframework.web.bind.annotation.GetMapping)")
// private void anyGetProductOperation() {
// }
//
// @AfterReturning(pointcut = "anyGetProductOperation()", returning = "results")
// public void afterReturningControllerAdvice(JoinPoint joinPoint, Product results) {
// logger.info("After Returning(Mono Result) -> Method : {} - results :{}", joinPoint.getSignature().toShortString(), results);
// }
//
// @AfterReturning(pointcut = "anyGetProductOperation()", returning = "results")
// public void afterReturningControllerAdvice2(JoinPoint joinPoint, List<Product> results) {
// logger.info("After Returning(List Result) -> Method : {} - results :{}", joinPoint.getSignature().toShortString(), results);
// }
//
// after throwing
//
// @Pointcut("@annotation(org.springframework.web.bind.annotation.GetMapping)")
// private void anyGetPutProductOperation() {
// }
//
// @AfterThrowing(pointcut = "anyGetPutProductOperation()", throwing = "exception")
// public void afterThrowingControllerAdvice(JoinPoint joinPoint, Exception exception) {
// logger.info("After Throwing(Send Email to L2 Team) -> Method: {} - Exception : {}", joinPoint.getSignature().toShortString(), exception.getMessage());
// }
//
// after
@Pointcut("@annotation(org.springframework.web.bind.annotation.GetMapping)")
private void anyGetPutProductOperation2(){}
@After("anyGetPutProductOperation2()")
public void afterControllerAdvice(JoinPoint joinPoint){
logger.info("After finally -> Method: {} - results: {}", joinPoint.getSignature().toShortString());
}
@Pointcut("@annotation(org.springframework.web.bind.annotation.PostMapping)")
private void anyPostProductOperation(){}
@Pointcut("@annotation(org.springframework.web.bind.annotation.PutMapping)")
private void anyPutProductOperation(){}
@Around("anyPostProductOperation()")
public Object anyPostControllerAdvice(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
logger.info("Before -> Method: {} - Parameters: {}", proceedingJoinPoint.getSignature().toShortString(), proceedingJoinPoint.getArgs());
List<Product> results = new ArrayList<>();
// results = (List<Product>) proceedingJoinPoint.proceed();
logger.info("After -> Method: {} - Results: {}", proceedingJoinPoint.getSignature().toShortString(), results);
return results;
}
}
| [
"cundullahterzioglu.it@gmail.com"
] | cundullahterzioglu.it@gmail.com |
da942e2e12f8b637bdced8a5b67e65ea820f8eea | 36838dfcd53c4d2c73b9a6b0b7a8a28e4a331517 | /b/a/bS.java | 3f3a26d772b2a37c315fdbfa27bd4f1bf3628af1 | [] | no_license | ShahmanTeh/MiFit-Java | fbb2fd578727131b9ac7150b86c4045791368fe8 | 93bdf88d39423893b294dec2f5bf54708617b5d0 | refs/heads/master | 2021-01-20T13:05:10.408158 | 2016-02-03T21:02:55 | 2016-02-03T21:02:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 181 | java | package b.a;
class bS implements dj {
private bS() {
}
public bR a() {
return new bR();
}
public /* synthetic */ di b() {
return a();
}
}
| [
"kasha_malaga@hotmail.com"
] | kasha_malaga@hotmail.com |
558294f146619eaaa36b9cc31c08135d588f447e | 5d49ca1743fb929cb37814a24cc8b058d089ff27 | /mall-ware/src/main/java/com/zmm/mall/ware/controller/WareOrderTaskDetailController.java | cbd426f02817b9770789aeed7992df985d5fc647 | [] | no_license | MingHub0313/social-mall | 69be7237470998eb76da3a85cac9e1dc71e7edd9 | 85cc461e97a5384d4f857a101f5ea3b82124067a | refs/heads/master | 2023-04-17T13:13:14.760823 | 2021-04-30T08:03:09 | 2021-04-30T08:03:09 | 306,238,679 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,136 | java | package com.zmm.mall.ware.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.zmm.mall.ware.entity.WareOrderTaskDetailEntity;
import com.zmm.mall.ware.service.WareOrderTaskDetailService;
import com.zmm.common.utils.PageUtils;
import com.zmm.common.utils.R;
/**
* 库存工作单
*
* @author zhangmingming
* @email 1805783671@qq.com
* @date 2020-08-21 15:20:08
*/
@RestController
@RequestMapping("ware/wareordertaskdetail")
public class WareOrderTaskDetailController {
@Autowired
private WareOrderTaskDetailService wareOrderTaskDetailService;
/**
* 列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = wareOrderTaskDetailService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
WareOrderTaskDetailEntity wareOrderTaskDetail = wareOrderTaskDetailService.getById(id);
return R.ok().put("wareOrderTaskDetail", wareOrderTaskDetail);
}
/**
* 保存
*/
@RequestMapping("/save")
public R save(@RequestBody WareOrderTaskDetailEntity wareOrderTaskDetail){
wareOrderTaskDetailService.save(wareOrderTaskDetail);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody WareOrderTaskDetailEntity wareOrderTaskDetail){
wareOrderTaskDetailService.updateById(wareOrderTaskDetail);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
wareOrderTaskDetailService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}
| [
"zhangmingmig@adpanshi.com"
] | zhangmingmig@adpanshi.com |
6f142fabd586d0e3dc74e988ff2c1a176770dd80 | bb014cbe7981d6605ab14c37923e45af48b86027 | /MEME/src/java/gov/nih/nlm/meme/integrity/MGV_H1.java | 7fa395d8129a117cababdd478cca33b29792aede | [] | no_license | rwynne/nlmlegacymeme | 8790c8421fe0c7c1e335c1df02f92a40bc32ac17 | 76ad061ea3ea29308462d893fd512b4e45db29bc | refs/heads/master | 2021-01-01T18:52:27.688542 | 2017-07-26T18:54:03 | 2017-07-26T18:54:03 | 98,453,314 | 0 | 0 | null | 2017-07-26T18:24:06 | 2017-07-26T18:24:05 | null | UTF-8 | Java | false | false | 3,008 | java | /*****************************************************************************
*
* Package: gov.nih.nlm.meme.integrity
* Object: MGV_H1
*
* 04/07/2006 RBE (1-AV8WP): Removed self-qa test. Test for this check is
* implemented in gov.nih.nlm.meme.qa.ic package.
* Extends AbstractMergeMoveInhibitor
*
*****************************************************************************/
package gov.nih.nlm.meme.integrity;
import gov.nih.nlm.meme.common.Atom;
import gov.nih.nlm.meme.common.ByStrippedSourceRestrictor;
import gov.nih.nlm.meme.common.Code;
import gov.nih.nlm.meme.common.Concept;
/**
* Validates merges between two {@link Concept}s where
* both contain releasable current version <code>MSH</code> {@link Atom}s
* with different {@link Code}s,
* specifically (D-D, Q-Q, D-Q, Q-D). However, D-Q may exist together if the
* D has termgroup EN, EP, or MH and the Q has termgroup GQ.
*
* @author MEME Group
*/
public class MGV_H1 extends AbstractMergeMoveInhibitor implements MoveInhibitor {
//
// Constructors
//
/**
* Instantiates a {@link MGV_H1} check.
*/
public MGV_H1() {
super();
setName("MGV_H1");
}
//
// Methods
//
/**
* Validates the pair of {@link Concept}s where the specified {@link Atom}s are
* moving from the source to the target concept.
* @param source the source {@link Concept}
* @param target the target {@link Concept}
* @param source_atoms {@link Atom}s from the source concept to be moved to target concept
* @return <code>true</code> if constraint violated, <code>false</code>
* otherwise
*/
public boolean validate(Concept source, Concept target, Atom[] source_atoms) {
//
// Get MSH atoms from target concept.
//
Atom[] target_atoms = (Atom[])
getRestrictedAtoms(new ByStrippedSourceRestrictor("MSH"), target.getAtoms());
Atom[] l_source_atoms = (Atom[])
getRestrictedAtoms(new ByStrippedSourceRestrictor("MSH"), source_atoms);
//
// Find cases where releasable current version MSH atoms with
// different codes (in the specific combinations) are being merged.
//
for (int i = 0; i < l_source_atoms.length; i++) {
if (l_source_atoms[i].isReleasable() &&
l_source_atoms[i].getSource().getStrippedSourceAbbreviation().equals(
"MSH") &&
l_source_atoms[i].getSource().isCurrent() &&
(l_source_atoms[i].getCode().toString().startsWith("D") ||
l_source_atoms[i].getCode().toString().startsWith("Q"))) {
for (int j = 0; j < target_atoms.length; j++) {
if (target_atoms[j].isReleasable() &&
target_atoms[j].getSource().isCurrent() &&
(target_atoms[j].getCode().toString().startsWith("D") ||
target_atoms[j].getCode().toString().startsWith("Q")) &&
!target_atoms[j].getCode().equals(l_source_atoms[i].getCode())) {
return true;
}
}
}
}
return false;
}
}
| [
"wynner@mail.nih.gov"
] | wynner@mail.nih.gov |
44aa3e1766f71deb2997305c70125bda88e4e6fc | 84b38ea2f96a9d9b7d6142a73fbf0b03db41a4a6 | /src/main/java/com/athena/chameleon/engine/entity/xml/application/jeus/v5_0/RepositoryServiceType.java | 0d2ac2f264ad829dbe9589842b5951871f40bbae | [
"Apache-2.0"
] | permissive | OpenSourceConsulting/playce-chameleon | 06916eae62ba0bdf3088c5364544ae1f6acbe69b | 356a75674495d2946aaf2c2b40f78ecf388fefd0 | refs/heads/master | 2022-12-04T10:06:02.135611 | 2020-08-11T04:27:17 | 2020-08-11T04:27:17 | 5,478,313 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,911 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.09.17 at 02:39:44 오후 KST
//
package com.athena.chameleon.engine.entity.xml.application.jeus.v5_0;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for repository-serviceType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="repository-serviceType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <choice>
* <element name="xml-file-repository" type="{http://www.tmaxsoft.com/xml/ns/jeus}xml-file-repositoryType" minOccurs="0"/>
* <element name="database-repository" type="{http://www.tmaxsoft.com/xml/ns/jeus}database-repositoryType" minOccurs="0"/>
* <element name="custom-repository" type="{http://www.tmaxsoft.com/xml/ns/jeus}SecurityServiceType" minOccurs="0"/>
* </choice>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "repository-serviceType", propOrder = {
"xmlFileRepository",
"databaseRepository",
"customRepository"
})
public class RepositoryServiceType {
@XmlElement(name = "xml-file-repository", namespace = "http://www.tmaxsoft.com/xml/ns/jeus")
protected XmlFileRepositoryType xmlFileRepository;
@XmlElement(name = "database-repository", namespace = "http://www.tmaxsoft.com/xml/ns/jeus")
protected DatabaseRepositoryType databaseRepository;
@XmlElement(name = "custom-repository", namespace = "http://www.tmaxsoft.com/xml/ns/jeus")
protected SecurityServiceType customRepository;
/**
* Gets the value of the xmlFileRepository property.
*
* @return
* possible object is
* {@link XmlFileRepositoryType }
*
*/
public XmlFileRepositoryType getXmlFileRepository() {
return xmlFileRepository;
}
/**
* Sets the value of the xmlFileRepository property.
*
* @param value
* allowed object is
* {@link XmlFileRepositoryType }
*
*/
public void setXmlFileRepository(XmlFileRepositoryType value) {
this.xmlFileRepository = value;
}
/**
* Gets the value of the databaseRepository property.
*
* @return
* possible object is
* {@link DatabaseRepositoryType }
*
*/
public DatabaseRepositoryType getDatabaseRepository() {
return databaseRepository;
}
/**
* Sets the value of the databaseRepository property.
*
* @param value
* allowed object is
* {@link DatabaseRepositoryType }
*
*/
public void setDatabaseRepository(DatabaseRepositoryType value) {
this.databaseRepository = value;
}
/**
* Gets the value of the customRepository property.
*
* @return
* possible object is
* {@link SecurityServiceType }
*
*/
public SecurityServiceType getCustomRepository() {
return customRepository;
}
/**
* Sets the value of the customRepository property.
*
* @param value
* allowed object is
* {@link SecurityServiceType }
*
*/
public void setCustomRepository(SecurityServiceType value) {
this.customRepository = value;
}
}
| [
"nices96@gmail.com"
] | nices96@gmail.com |
d27e6bb43f262bdcb6e5b10adb279c635fce8b3e | 1fd24d5925988856c87e18d87edc04df3853e743 | /src/main/java/ua/com/clinicaltrials/repositories/SponsorRepository.java | 528553ae800b6df369cb66559b91debfab4970d7 | [] | no_license | lomk/clinicaltrials_rest | d7fc194d70bd730fc6c451590352ba25f009ff3d | 97c9b0ac7b0e71ad08bbdcecaf1d2b41185268da | refs/heads/master | 2021-09-11T17:54:58.041744 | 2018-04-10T15:59:30 | 2018-04-10T15:59:30 | 107,945,135 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 274 | java | package ua.com.clinicaltrials.repositories;
import org.springframework.data.jpa.repository.JpaRepository;
import ua.com.clinicaltrials.domain.Sponsor;
/**
* Created by mater on 24-Jan-17.
*/
public interface SponsorRepository extends JpaRepository<Sponsor, Integer> {
}
| [
"materynko@gmail.com"
] | materynko@gmail.com |
5cb87408a789000991ab294469d20d21cb5c1d87 | 39225bc5f778e5d52f576a876629aaa48b447d66 | /src/com/cnpc/pms/base/file/dao/IExcelDao.java | 06464fa7c177e810d3a15c749cfc29e16ff680ba | [] | no_license | greatypine/GASM | c6b52017f83ae3489a1157e0315e88eb70217ff2 | ad7ee89020168f3b9e37085053ad8f0df7b9700c | refs/heads/master | 2020-05-16T02:06:13.593850 | 2019-02-19T07:00:37 | 2019-02-19T07:00:37 | 182,619,063 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 192 | java | package com.cnpc.pms.base.file.dao;
/**
* Created by cyh(275923233@qq.com) on 2015/9/10.
*/
public interface IExcelDao {
public boolean saveMonthExcelToDB(String path);
}
| [
"zhaoxuguang@guoanshequ.com"
] | zhaoxuguang@guoanshequ.com |
16843f22e44b875ed83254021edc89d53d729e7c | 995f73d30450a6dce6bc7145d89344b4ad6e0622 | /Mate20-9.0/src/main/java/android/support/v4/graphics/TypefaceCompatBaseImpl.java | b9b90fb91794cf66191c90c06c2184084ffddead | [] | no_license | morningblu/HWFramework | 0ceb02cbe42585d0169d9b6c4964a41b436039f5 | 672bb34094b8780806a10ba9b1d21036fd808b8e | refs/heads/master | 2023-07-29T05:26:14.603817 | 2021-09-03T05:23:34 | 2021-09-03T05:23:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,377 | java | package android.support.v4.graphics;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Typeface;
import android.os.CancellationSignal;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.RestrictTo;
import android.support.v4.content.res.FontResourcesParserCompat;
import android.support.v4.media.MediaPlayer2;
import android.support.v4.provider.FontsContractCompat;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP})
class TypefaceCompatBaseImpl {
private static final String CACHE_FILE_PREFIX = "cached_font_";
private static final String TAG = "TypefaceCompatBaseImpl";
private interface StyleExtractor<T> {
int getWeight(T t);
boolean isItalic(T t);
}
TypefaceCompatBaseImpl() {
}
private static <T> T findBestFont(T[] fonts, int style, StyleExtractor<T> extractor) {
int targetWeight = (style & 1) == 0 ? 400 : MediaPlayer2.MEDIA_INFO_VIDEO_TRACK_LAGGING;
boolean isTargetItalic = (style & 2) != 0;
int bestScore = Integer.MAX_VALUE;
T best = null;
for (T font : fonts) {
int score = (Math.abs(extractor.getWeight(font) - targetWeight) * 2) + (extractor.isItalic(font) == isTargetItalic ? 0 : 1);
if (best == null || bestScore > score) {
best = font;
bestScore = score;
}
}
return best;
}
/* access modifiers changed from: protected */
public FontsContractCompat.FontInfo findBestInfo(FontsContractCompat.FontInfo[] fonts, int style) {
return (FontsContractCompat.FontInfo) findBestFont(fonts, style, new StyleExtractor<FontsContractCompat.FontInfo>() {
public int getWeight(FontsContractCompat.FontInfo info) {
return info.getWeight();
}
public boolean isItalic(FontsContractCompat.FontInfo info) {
return info.isItalic();
}
});
}
/* Debug info: failed to restart local var, previous not found, register: 3 */
/* access modifiers changed from: protected */
public Typeface createFromInputStream(Context context, InputStream is) {
File tmpFile = TypefaceCompatUtil.getTempFile(context);
if (tmpFile == null) {
return null;
}
try {
if (TypefaceCompatUtil.copyToFile(tmpFile, is)) {
Typeface createFromFile = Typeface.createFromFile(tmpFile.getPath());
tmpFile.delete();
return createFromFile;
}
} catch (RuntimeException e) {
} catch (Throwable th) {
tmpFile.delete();
throw th;
}
tmpFile.delete();
return null;
}
public Typeface createFromFontInfo(Context context, @Nullable CancellationSignal cancellationSignal, @NonNull FontsContractCompat.FontInfo[] fonts, int style) {
if (fonts.length < 1) {
return null;
}
InputStream is = null;
try {
is = context.getContentResolver().openInputStream(findBestInfo(fonts, style).getUri());
return createFromInputStream(context, is);
} catch (IOException e) {
return null;
} finally {
TypefaceCompatUtil.closeQuietly(is);
}
}
private FontResourcesParserCompat.FontFileResourceEntry findBestEntry(FontResourcesParserCompat.FontFamilyFilesResourceEntry entry, int style) {
return (FontResourcesParserCompat.FontFileResourceEntry) findBestFont(entry.getEntries(), style, new StyleExtractor<FontResourcesParserCompat.FontFileResourceEntry>() {
public int getWeight(FontResourcesParserCompat.FontFileResourceEntry entry) {
return entry.getWeight();
}
public boolean isItalic(FontResourcesParserCompat.FontFileResourceEntry entry) {
return entry.isItalic();
}
});
}
@Nullable
public Typeface createFromFontFamilyFilesResourceEntry(Context context, FontResourcesParserCompat.FontFamilyFilesResourceEntry entry, Resources resources, int style) {
FontResourcesParserCompat.FontFileResourceEntry best = findBestEntry(entry, style);
if (best == null) {
return null;
}
return TypefaceCompat.createFromResourcesFontFile(context, resources, best.getResourceId(), best.getFileName(), style);
}
/* Debug info: failed to restart local var, previous not found, register: 3 */
@Nullable
public Typeface createFromResourcesFontFile(Context context, Resources resources, int id, String path, int style) {
File tmpFile = TypefaceCompatUtil.getTempFile(context);
if (tmpFile == null) {
return null;
}
try {
if (TypefaceCompatUtil.copyToFile(tmpFile, resources, id)) {
Typeface createFromFile = Typeface.createFromFile(tmpFile.getPath());
tmpFile.delete();
return createFromFile;
}
} catch (RuntimeException e) {
} catch (Throwable th) {
tmpFile.delete();
throw th;
}
tmpFile.delete();
return null;
}
}
| [
"dstmath@163.com"
] | dstmath@163.com |
da2e9253e489eb489c869cc5d1d6cd2784f19b1c | f965b65821d4a324e60fe828ca4e7a4fca52d758 | /future-web/src/main/java/com/kangyonggan/app/future/web/controller/web/SmsController.java | edaec5e6b1d26a6d057934a09a226a13ece8e2b8 | [] | no_license | kangyonggan/future | 7a03641d72b906a2c45cd9f70f82b266db451ba4 | 875dd5c947bdc54a51d4fe7d4c0e5b1fa5ff99b5 | refs/heads/master | 2021-01-02T09:46:06.189517 | 2018-03-19T03:40:57 | 2018-03-19T03:40:57 | 99,294,784 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,220 | java | package com.kangyonggan.app.future.web.controller.web;
import com.kangyonggan.app.future.biz.service.SmsService;
import com.kangyonggan.extra.core.annotation.Frequency;
import org.apache.commons.lang3.StringUtils;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* @author kangyonggan
* @since 8/7/17
*/
@RestController
@RequestMapping("sms")
public class SmsController {
@Autowired
private SmsService smsService;
/**
* 发送验证码
*
* @param mobile
* @param type
* @return
*/
@RequestMapping(value = "send", method = RequestMethod.POST)
@Frequency(key = "sms:${mobile}", interval = 60000, interrupt = true)
public boolean sendSms(@RequestParam("mobile") String mobile, @RequestParam("type") String type) {
if (StringUtils.isEmpty(mobile) || StringUtils.isEmpty(type)) {
return false;
}
smsService.sendSms(mobile, type);
return true;
}
}
| [
"kangyonggan@gmail.com"
] | kangyonggan@gmail.com |
a2a07f24d17e3f713409a39bcab182b5b73bd122 | a0bf3bf5335a5a3c55f41b83223a10c680723703 | /bc/wmpu-common/src/main/java/bc/servlet/TargetProgramPictureServlet.java | 6b2d4b2ee10e45d1418ce31faadf1ef13698ab08 | [] | no_license | cherkavi/social-financial-network | 24a52b621f284746ca6ef54a89563823a29252ce | 0587986842ded63d1b5efa188ca2cd5b9454aafa | refs/heads/master | 2022-12-27T00:41:14.251248 | 2020-07-02T22:22:45 | 2020-07-02T22:22:45 | 189,156,588 | 0 | 0 | null | 2022-12-16T01:35:28 | 2019-05-29T05:31:30 | Java | UTF-8 | Java | false | false | 5,433 | java | package bc.servlet;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URLDecoder;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
//import java.nio.file.Files;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
//import javax.servlet.annotation.WebServlet;
//import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import webpos.wpTargetPrgObject;
/**
* The Image servlet for serving from absolute path.
* @author BalusC
* @link http://balusc.blogspot.com/2007/04/imageservlet.html
*/
public class TargetProgramPictureServlet extends JndiParamHttpServlet {
private final static Logger LOGGER=Logger.getLogger(TargetProgramPictureServlet.class);
// Properties ---------------------------------------------------------------------------------
private static final long serialVersionUID = 1L;
private final int clasterSize=1024;
private ByteBuffer buffer=ByteBuffer.allocate(clasterSize);
private String errorMessage = "";
// Init ---------------------------------------------------------------------------------------
public void init() throws ServletException {
// Define base path somehow. You can define it as init-param of the servlet.
// In a Windows environment with the Applicationserver running on the
// c: volume, the above path is exactly the same as "c:\var\webapp\images".
// In Linux/Mac/UNIX, it is just straightforward "/var/webapp/images".
}
// Actions ------------------------------------------------------------------------------------
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// Get requested image by path info.
//String requestedImage = request.getPathInfo();
String photoFileName = "";
String id_target_prg = StringUtils.trimToNull(request.getParameter("id_target_prg"));
if(id_target_prg==null || "".equalsIgnoreCase(id_target_prg)){
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
return;
} else {
wpTargetPrgObject target_prg = new wpTargetPrgObject(id_target_prg);
photoFileName = target_prg.getValue("IMAGE_TARGET_PRG");
}
LOGGER.debug("TargetProgramImageFileName="+photoFileName);
// Check if file name is actually supplied to the request URI.
if (photoFileName == null) {
// Do your thing if the image is not supplied to the request URI.
// Throw an exception, or send 404, or show default/warning image, or just ignore it.
response.sendError(HttpServletResponse.SC_NOT_FOUND); // 404.
return;
}
// Decode the file name (might contain spaces and on) and prepare file object.
File image = new File(URLDecoder.decode(photoFileName, "UTF-8"));
// Check if file actually exists in filesystem.
if (!image.exists()) {
// Do your thing if the file appears to be non-existing.
// Throw an exception, or send 404, or show default/warning image, or just ignore it.
response.sendError(HttpServletResponse.SC_NOT_FOUND); // 404.
return;
}
// Get content type by filename.
String contentType = getServletContext().getMimeType(image.getName());
// Check if file is actually an image (avoid download of other files by hackers!).
// For all content types, see: http://www.w3schools.com/media/media_mimeref.asp
if (contentType == null || !contentType.startsWith("image")) {
// Do your thing if the file appears not being a real image.
// Throw an exception, or send 404, or show default/warning image, or just ignore it.
response.sendError(HttpServletResponse.SC_NOT_FOUND); // 404.
return;
}
// Init servlet response.
response.reset();
response.setContentType(contentType);
response.setHeader("Content-Length", String.valueOf(image.length()));
// Write image content to response.
FileInputStream fis=new FileInputStream(image);
if(readFromInputStreamToOutputStream(fis,response.getOutputStream())){
// data read OK
}else{
response.sendError(HttpServletResponse.SC_NOT_FOUND, errorMessage);
LOGGER.error("file was't loaded");
}
fis.close();
response.getOutputStream().close();
//Files.copy(image.toPath(), response.getOutputStream());
}
private boolean readFromInputStreamToOutputStream(FileInputStream input, ServletOutputStream output){
boolean returnValue=false;
FileChannel inputChannel=input.getChannel();
try{
while(inputChannel.read(this.buffer)>0){
output.write(this.buffer.array(),0,this.buffer.limit());
this.buffer.clear();
}
returnValue=true;
}catch(Exception ex){
setErrorMessage("readFromInputStreamToOutputStream: Exception: "+ex.getMessage());
returnValue=false;
}
return returnValue;
}
private void setErrorMessage(String pMessage) {
this.errorMessage = this.errorMessage + "<br>" + pMessage;
}
} | [
"technik7job@gmail.com"
] | technik7job@gmail.com |
2c988af47afb65277eb4335abfff7661f9182c13 | 269c3b66a0b4f3b63fdd182738dc4297b33acd61 | /src/sample/ProductsControl.java | 9726782807ed67d91b783f0007a037cf09fe010b | [] | no_license | Bek-End/Admin | 7885df24e2696d47f99bacb09792a5d0060e8a1c | a9fbc4420650d0aec2ea8b8e9870820ebf002d7a | refs/heads/master | 2023-01-28T19:32:46.627055 | 2020-12-10T18:44:01 | 2020-12-10T18:44:01 | 320,360,453 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,791 | java | package sample;
import com.google.gson.Gson;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URI;
import java.net.URL;
import java.net.URLEncoder;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.util.HashMap;
import java.util.Map;
public class ProductsControl {
private final String url;
HttpClient client;
HttpRequest request;
HttpResponse<String> response;
Gson gson;
Products[] result;
public ProductsControl(String url) {
client = HttpClient.newHttpClient();
request = HttpRequest.newBuilder().uri(URI.create(url)).build();
try {
response = client.send(request, HttpResponse.BodyHandlers.ofString());
} catch (IOException | InterruptedException e) {
e.printStackTrace();
}
gson = new Gson();
result = gson.fromJson(response.body(), Products[].class);
this.url = url;
}
int getSize(){
return result.length;
}
String[] getProducts(int index){
String[] products = new String[9];
products[0] = result[index].getIdProduct();
products[1] = result[index].getProdName();
products[2] = result[index].getBrand();
products[3] = result[index].getCategoryId();
products[4] = result[index].getSize();
products[5] = result[index].getColor();
products[6] = result[index].getPrice();
products[7] = result[index].getQuantity();
products[8] = result[index].getImgUrl();
return products;
}
void addProduct(String u, String prod_name, String brand, String category, String size, String color, String price, String quantity, String img_url) throws IOException {
final URL url = new URL(u);
final HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("POST");
// collect parameters
final Map<String, String> parameters = new HashMap<>();
parameters.put("prod_name", prod_name);
parameters.put("brand", brand);
parameters.put("category_id", category);
parameters.put("size", size);
parameters.put("color", color);
parameters.put("price", price);
parameters.put("quantity", quantity);
parameters.put("img_url", img_url);
Output(con, parameters);
}
private void Output(HttpURLConnection con, Map<String, String> parameters) throws IOException {
con.setDoOutput(true);
final DataOutputStream out = new DataOutputStream(con.getOutputStream());
out.writeBytes(getParamsString(parameters));
out.flush();
out.close();
final String content = readInputStream(con);
con.disconnect();
System.out.println(content);
}
void deleteProduct(String u, String prod_name, String brand, String category, String size, String color, String price) throws IOException {
final URL url = new URL(u);
final HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("POST");
// collect parameters
final Map<String, String> parameters = new HashMap<>();
parameters.put("prod_name", prod_name);
parameters.put("brand", brand);
parameters.put("category_id", category);
parameters.put("size", size);
parameters.put("color", color);
parameters.put("price", price);
Output(con, parameters);
}
public static String readInputStream(final HttpURLConnection con){
try (final BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()))) {
String inputLine;
final StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
return content.toString();
} catch (final Exception ex) {
ex.printStackTrace();
return "";
}
}
public static String getParamsString(final Map<String, String> params) {
final StringBuilder result = new StringBuilder();
params.forEach((name, value) -> {
try {
result.append(URLEncoder.encode(name, "UTF-8"));
result.append('=');
result.append(URLEncoder.encode(value, "UTF-8"));
result.append('&');
} catch (final UnsupportedEncodingException e) {
e.printStackTrace();
}
});
final String resultString = result.toString();
return !resultString.isEmpty()
? resultString.substring(0, resultString.length() - 1)
: resultString;
}
}
| [
"="
] | = |
376d02c35f6a50c96b12641d3b052728a9c2e20d | a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb | /adp-hub-20211125/src/main/java/com/aliyun/adp_hub20211125/models/CreateProductVersionResponseBody.java | 36c9a47dbc18fe57e42e87b0fc4e9a8ce44ae8ba | [
"Apache-2.0"
] | permissive | aliyun/alibabacloud-java-sdk | 83a6036a33c7278bca6f1bafccb0180940d58b0b | 008923f156adf2e4f4785a0419f60640273854ec | refs/heads/master | 2023-09-01T04:10:33.640756 | 2023-09-01T02:40:45 | 2023-09-01T02:40:45 | 288,968,318 | 40 | 45 | null | 2023-06-13T02:47:13 | 2020-08-20T09:51:08 | Java | UTF-8 | Java | false | false | 1,831 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.adp_hub20211125.models;
import com.aliyun.tea.*;
public class CreateProductVersionResponseBody extends TeaModel {
@NameInMap("code")
public String code;
@NameInMap("data")
public CreateProductVersionResponseBodyData data;
@NameInMap("msg")
public String msg;
public static CreateProductVersionResponseBody build(java.util.Map<String, ?> map) throws Exception {
CreateProductVersionResponseBody self = new CreateProductVersionResponseBody();
return TeaModel.build(map, self);
}
public CreateProductVersionResponseBody setCode(String code) {
this.code = code;
return this;
}
public String getCode() {
return this.code;
}
public CreateProductVersionResponseBody setData(CreateProductVersionResponseBodyData data) {
this.data = data;
return this;
}
public CreateProductVersionResponseBodyData getData() {
return this.data;
}
public CreateProductVersionResponseBody setMsg(String msg) {
this.msg = msg;
return this;
}
public String getMsg() {
return this.msg;
}
public static class CreateProductVersionResponseBodyData extends TeaModel {
@NameInMap("uid")
public String uid;
public static CreateProductVersionResponseBodyData build(java.util.Map<String, ?> map) throws Exception {
CreateProductVersionResponseBodyData self = new CreateProductVersionResponseBodyData();
return TeaModel.build(map, self);
}
public CreateProductVersionResponseBodyData setUid(String uid) {
this.uid = uid;
return this;
}
public String getUid() {
return this.uid;
}
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
3caef6ec7da88055695d78dd13ee211163536779 | d9ba5fc43e53596c9cdc8295deef05a94215570d | /nc-cashier/nc-cashier-facade/src/main/java/com/yeepay/g3/facade/nccashier/dto/ErrorCodeDTO.java | bae3d3b0516c369efe7d91c1bb7ddd1efa418177 | [] | no_license | P79N6A/11.9 | 2189ce53b5adbe629e477d9899e939d87387bcbc | a7dafcb0db716ec3184279f995ed4b5a06a0b92e | refs/heads/master | 2021-09-28T02:09:07.464629 | 2018-11-13T10:01:31 | 2018-11-13T10:01:31 | 157,359,968 | 0 | 1 | null | 2018-11-13T10:10:55 | 2018-11-13T10:10:54 | null | UTF-8 | Java | false | false | 1,568 | java | package com.yeepay.g3.facade.nccashier.dto;
public class ErrorCodeDTO {
/**
* 原始错误码
*/
private String originErrorCode;
/**
* 支付系统编码
*/
private String paySysCode;
/**
* 原始错误信息
*/
private String originErrorMsg;
/**
* 对外提示错误码
*/
private String externalErrorCode;
/**
* 对外提示错误信息
*/
private String externalErrorMsg;
public ErrorCodeDTO(){
}
public ErrorCodeDTO(String paySysCode, String originErrorCode, String originErrorMsg){
this.paySysCode = paySysCode;
this.originErrorCode = originErrorCode;
this.originErrorMsg = originErrorMsg;
}
public String getOriginErrorCode() {
return originErrorCode;
}
public void setOriginErrorCode(String originErrorCode) {
this.originErrorCode = originErrorCode;
}
public String getPaySysCode() {
return paySysCode;
}
public void setPaySysCode(String paySysCode) {
this.paySysCode = paySysCode;
}
public String getOriginErrorMsg() {
return originErrorMsg;
}
public void setOriginErrorMsg(String originErrorMsg) {
this.originErrorMsg = originErrorMsg;
}
public String getExternalErrorCode() {
return externalErrorCode;
}
public void setExternalErrorCode(String externalErrorCode) {
this.externalErrorCode = externalErrorCode;
}
public String getExternalErrorMsg() {
return externalErrorMsg;
}
public void setExternalErrorMsg(String externalErrorMsg) {
this.externalErrorMsg = externalErrorMsg;
}
}
| [
"yp-tc-m-5079@yp-tc-m-5079deMacBook-Air.local"
] | yp-tc-m-5079@yp-tc-m-5079deMacBook-Air.local |
48d6855bedb99ace99ed9f9b493ee4fe35435406 | 2de25a2dcbd78a9dfdd603de0f4b26435c00866b | /src/Runner.java | 7b33749e5b1d0310786a2949cd5e00169ec67382 | [] | no_license | akromibn37/Thesis-code | c9f013f4377dc595e60359c9940cc95983d73e90 | 5eefc4edccd4f2948be723d79f50a6c4ad55ade1 | refs/heads/master | 2020-03-21T22:37:48.942663 | 2018-06-29T10:42:40 | 2018-06-29T10:42:40 | 139,137,436 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,620 | java | import java.util.ArrayList;
public class Runner {
ArrayList<String> text = new ArrayList<String>();
Information init = new Information();;
STGOperation AData = new STGOperation();
STGData [] SignalData;
int STGtype;
int Maxrepeat;
int amountpath;
int maxinput;
int maxoutput;
String [] Conpath;
MultiSTG [] repeatSignal;
private String Promelacode;
private String Promelacode2;
//for CSCoperation
CSCoperation c = new CSCoperation();
ArrayList<String> pair = new ArrayList<String>();
ArrayList<String> simplecycle = new ArrayList<String>();
ArrayList<String> fulllock_pair_result = new ArrayList<String>();
//------------------
public Runner(ArrayList<String> t)
{
text = t;
}
public void Operating()
{
STGtype = AData.Checktype(text);
init.GetInformation(text);
init.PrintData();
amountpath = init.PathInformation.size();
repeatSignal = !(STGtype==1) ? AData.FindrepeatSignal(init.PathInformation) : null;
Maxrepeat = AData.CheckRepeat(repeatSignal, STGtype);
}
public String RunPromelaCode()
{
SignalData = new STGData[amountpath];
SignalData = AData.AddSTGData(init.PathInformation);
maxinput = AData.GetMaxInput(SignalData);
maxoutput = AData.GetMaxOutput(SignalData);
Promelacode = AData.GeneratePromela(SignalData, maxinput, maxoutput, init.Marking,STGtype);
Conpath = AData.GetConcurrentPath(SignalData);
return Promelacode;
}
public String RunPromelaCode2()
{
Promelacode2 = AData.GeneratePromela2(SignalData, maxinput, maxoutput, init.Marking, STGtype,init.Input,init.Output);
return Promelacode2;
}
//Promela1 page UI2(safe,live,persist)
public String RunLTL(int num)
{
if(STGtype == 1)
{
LTL a = new LTL();
if(num == 1)
{
return a.GenPersistency(SignalData, Conpath, STGtype);
}
else if(num == 2)
{
return a.GenSafety(SignalData, STGtype);
}
else if(num == 3)
{
return a.GenLiveness(SignalData, STGtype);
}
else
{
return "";
}
}
else
{
MultiLTL b = new MultiLTL();
if(num == 1)
{
return b.GenPersistency(SignalData, Conpath, STGtype, repeatSignal);
}
else if(num == 2)
{
return b.GenSafety(SignalData, STGtype);
}
else if(num == 3)
{
return b.GenLiveness(SignalData, STGtype);
}
else
{
return "";
}
}
}
//Promela2 page UI2(consistency,csc)
public String RunConLTL(int num)
{
if(STGtype == 1)
{
LTL a = new LTL();
if(num == 1)
{
return a.GenConsistency(init.Input,init.Output,STGtype,init.Marking);
}
else if(num == 2)
{
return a.GenCSCFulllock(init.Input, init.Output, init.Marking, STGtype);
}
else
{
return "";
}
}
else
{
MultiLTL b = new MultiLTL();
if(num == 1)
{
return b.GenConsistency(init.Input,init.Output,STGtype,init.Marking);
}
else if(num == 2)
{
return b.GenCSCFulllock(init.Input, init.Output, init.Marking, STGtype);
}
else
{
return "";
}
}
}
//Check full-lock is true or not.
public String checkfull(String txt)
{
if(!txt.isEmpty())
{
if(pair.isEmpty())pair = c.PairSignal(init.Input, init.Output);
fulllock_pair_result = c.GetFullockResult(txt, pair, fulllock_pair_result);
String result = c.PrintFulllock_result(pair, fulllock_pair_result);
simplecycle.add(c.Savesimplecycle(txt));
System.out.println("Sim : " + simplecycle);
System.out.println(pair);
System.out.println(fulllock_pair_result);
return result;
}
else
{
if(pair.isEmpty())pair = c.PairSignal(init.Input, init.Output);
if(fulllock_pair_result.isEmpty())
{
for(int i = 0; i < pair.size();i++)
{
fulllock_pair_result.add("false");
}
}
return c.PrintFulllock_result(pair, fulllock_pair_result);
}
}
public boolean Simplecycle_CSCcheck()
{
boolean t = c.checkfulllockpair(pair, fulllock_pair_result, init.Output);
if(t == false)
{
return c.checksimplecycle(simplecycle, pair, fulllock_pair_result, init.Output);
}
return true;
}
public String GenTransitiveLTL()
{
String transitive_LTL = c.GenTransitiveLTL(pair, fulllock_pair_result, init.Output,init.Marking,STGtype);
return transitive_LTL;
}
public boolean ChecktransitivefromCSCLTL(String txt)
{
ArrayList<String> sim = new ArrayList<String>();
sim.add(c.Savesimplecycle(txt));
boolean t = c.checksimplecycle(sim, pair, fulllock_pair_result, init.Output);
return t;
}
}
| [
"apple@Apples-MacBook-Pro.local"
] | apple@Apples-MacBook-Pro.local |
73f079b0430d5f08634c930f2260c94fc3e4b0b1 | 7bec2fa53c8b8fe4e0bd35ab41f81b42472d8cc8 | /Chapter13/MaxHeap/src/main/java/coding/challenge/MaxHeap.java | 2d517ed614096f3ce6c9c3ccbf7565fc4517d2c1 | [
"MIT"
] | permissive | armdev/The-Complete-Coding-Interview-Guide-in-Java | 0f87578363c82a7826a6a792908c6c09e41e00ed | ee89e403325febc4e5554ad93a47e053654220b8 | refs/heads/master | 2022-04-17T06:24:25.559707 | 2020-04-12T14:38:03 | 2020-04-12T14:38:03 | 255,260,338 | 0 | 2 | MIT | 2020-04-13T07:30:23 | 2020-04-13T07:30:22 | null | UTF-8 | Java | false | false | 4,442 | java | package coding.challenge;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.NoSuchElementException;
public class MaxHeap<T extends Comparable<T>> {
private static final int DEFAULT_CAPACITY = 5;
private int capacity;
private int size;
private T[] heap;
public MaxHeap() {
capacity = DEFAULT_CAPACITY;
this.heap = (T[]) Array.newInstance(
Comparable[].class.getComponentType(), DEFAULT_CAPACITY);
}
// Adding is done in O(log n) time
public void add(T element) {
ensureCapacity();
heap[size] = element;
size++;
heapifyUp();
}
private void ensureCapacity() {
if (size == capacity) {
heap = Arrays.copyOf(heap, capacity * 2);
capacity = capacity * 2;
}
}
// Peeking is done in O(1) time
public T peek() {
if (size == 0) {
throw new NoSuchElementException();
}
return heap[0];
}
// Polling is done in O(log n) time
public T poll() {
if (size == 0) {
throw new NoSuchElementException();
}
T element = heap[0];
heap[0] = heap[size - 1];
heap[size - 1] = null;
size--;
heapifyDown();
return element;
}
public void printHeap() {
System.out.print("ROOT NODE: " + heap[0] + "\n");
for (int i = 0; i < size; i++) {
System.out.print("NODE: " + heap[i]);
if (hasLeftChild(i)) {
System.out.print(" LEFT NODE: " + heap[getLeftChildIndex(i)]);
}
if (hasRightChild(i)) {
System.out.print(" RIGHT NODE: " + heap[getRightChildIndex(i)]);
}
System.out.println();
}
System.out.println();
}
// fix the heap after polling an element
private void heapifyDown() {
// Step 1: Start from the root of the heap as the current node
int index = 0;
while (hasLeftChild(index)) {
// Step 2: Determine the largest node between the children of the current node
int largestChildIndex = getLeftChildIndex(index);
if (hasRightChild(index) && rightChild(index).compareTo(leftChild(index)) > 0) {
largestChildIndex = getRightChildIndex(index);
}
// Step 3: If the current node is less than its largest children
// then swap these two nodes and continue
if (heap[index].compareTo(heap[largestChildIndex]) < 0) {
swap(index, largestChildIndex);
} else {
// Step 3: there is nothing else to do, so stop
break;
}
index = largestChildIndex;
}
}
// fix the heap after adding a new element
private void heapifyUp() {
// Step 1: Start from the end of the heap as the current node
int index = size - 1;
// Step 2: While the current node has parent and the parent is less than the
// current node swap these nodes
while (hasParent(index) && parent(index).compareTo(heap[index]) < 0) {
swap(getParentIndex(index), index);
index = getParentIndex(index);
}
}
private int getLeftChildIndex(int parentIndex) {
return 2 * parentIndex + 1;
}
private int getRightChildIndex(int parentIndex) {
return 2 * parentIndex + 2;
}
private int getParentIndex(int childIndex) {
return (childIndex - 1) / 2;
}
private boolean hasLeftChild(int index) {
return getLeftChildIndex(index) < size;
}
private boolean hasRightChild(int index) {
return getRightChildIndex(index) < size;
}
private boolean hasParent(int index) {
return getParentIndex(index) >= 0;
}
private T leftChild(int parentIndex) {
return heap[getLeftChildIndex(parentIndex)];
}
private T rightChild(int parentIndex) {
return heap[getRightChildIndex(parentIndex)];
}
private T parent(int childIndex) {
return heap[getParentIndex(childIndex)];
}
private void swap(int index1, int index2) {
T element = heap[index1];
heap[index1] = heap[index2];
heap[index2] = element;
}
public int size() {
return size;
}
}
| [
"leoprivacy@yahoo.com"
] | leoprivacy@yahoo.com |
7c24e38d678f0e924a1ce661bb27821921525bbb | fd344601cdeb775d0d5f1246b8a65551b191dda7 | /javajigi/test/di/beans/factory/support/BeanDefinitionTest.java | 3ff295e83f43aab8709b890d6355098929fd0625 | [] | no_license | slowb/spring-core | a646b5f0265641d7438fefbf0f560076c1049331 | 1f70b453035803668bc04e64b7786cd3e0fcf77a | refs/heads/master | 2021-05-08T21:17:21.633694 | 2016-04-27T03:28:53 | 2016-04-27T03:28:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,719 | java | package di.beans.factory.support;
import static org.junit.Assert.assertEquals;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.util.Set;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import di.beans.factory.config.BeanDefinition;
import di.beans.factory.support.DefaultBeanDefinition;
import di.beans.factory.support.InjectType;
import net.slipp.bean.JdbcQuestionRepository;
import net.slipp.bean.MyQnaService;
import net.slipp.bean.MyUserController;
public class BeanDefinitionTest {
private static final Logger log = LoggerFactory.getLogger(BeanDefinitionTest.class);
@Test
public void getResolvedAutowireMode() {
BeanDefinition dbd = new DefaultBeanDefinition(JdbcQuestionRepository.class);
assertEquals(InjectType.INJECT_NO, dbd.getResolvedInjectMode());
dbd = new DefaultBeanDefinition(MyUserController.class);
assertEquals(InjectType.INJECT_FIELD, dbd.getResolvedInjectMode());
dbd = new DefaultBeanDefinition(MyQnaService.class);
assertEquals(InjectType.INJECT_CONSTRUCTOR, dbd.getResolvedInjectMode());
}
@Test
public void getInjectProperties() throws Exception {
BeanDefinition dbd = new DefaultBeanDefinition(MyUserController.class);
Set<Field> injectFields = dbd.getInjectFields();
for (Field field : injectFields) {
log.debug("inject field : {}", field);
}
}
@Test
public void getConstructor() throws Exception {
BeanDefinition dbd = new DefaultBeanDefinition(MyQnaService.class);
Set<Field> injectFields = dbd.getInjectFields();
assertEquals(0, injectFields.size());
Constructor<?> constructor = dbd.getInjectConstructor();
log.debug("inject constructor : {}", constructor);
}
}
| [
"javajigi@gmail.com"
] | javajigi@gmail.com |
cdcfe710a1dbc80bb1a1459c2364b3dd9cc7e8e6 | d0aa2391c5552940887e7e88b9c827065a2c9751 | /employee-rest-api/src/main/java/com/cg/app/dao/EmployeeRepoImpl.java | 62c52560bb3d17acf84e8c75c8e764c9a26acfcf | [] | no_license | ramanujds/cg-jee-repo | 71ca7902fad9ca938a8c8400969e62cc9695aee6 | 2abb53b09312126b2927419065a946be29030f03 | refs/heads/master | 2023-08-24T23:07:02.064109 | 2021-10-30T11:39:51 | 2021-10-30T11:39:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,488 | java | package com.cg.app.dao;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.PostConstruct;
import org.springframework.stereotype.Repository;
import com.cg.app.model.Employee;
@Repository
public class EmployeeRepoImpl implements EmployeeRepo{
Map<Integer,Employee> employees;
List<Employee> emps;
@PostConstruct
public void init() {
employees=new HashMap<>();
Employee e1=new Employee(1001,"Mahesh Dutta",65000,LocalDate.of(1996,10,25));
Employee e2=new Employee(1002,"Ramesh Dutta",55000,LocalDate.of(1995,10,24));
Employee e3=new Employee(1003,"Suresh Dutta",45000,LocalDate.of(1994,5,17));
employees.put(e1.getEmployeeId(),e1);
employees.put(e2.getEmployeeId(),e2);
employees.put(e3.getEmployeeId(),e3);
}
@Override
public Employee addEmployee(Employee employee) {
employees.put(employee.getEmployeeId(),employee);
return employee;
}
@Override
public Employee getEmployeeById(int employeeId) {
return employees.get(employeeId);
}
@Override
public Employee updateEmployee(Employee employee) {
employees.put(employee.getEmployeeId(),employee);
return employee;
}
@Override
public void deleteEmployeeById(int employeeId) {
employees.remove(employeeId);
}
@Override
public List<Employee> getAllEmployees() {
emps=new ArrayList<>();
employees.forEach((id,emp)->emps.add(emp));
return emps;
}
}
| [
"ramanujds9@gmail.com"
] | ramanujds9@gmail.com |
68e39fd5cde0795683e42c1602f417d551efb47b | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/27/27_b11ea41bbeb11a5579fb494cd732027636918360/TestUserResource/27_b11ea41bbeb11a5579fb494cd732027636918360_TestUserResource_t.java | 1de41ac919402ae2eb46e0e9de903b089b171963 | [] | 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 | 2,286 | 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.hadoop.chukwa.rest.resource;
import org.json.JSONObject;
import org.apache.hadoop.chukwa.rest.bean.ReturnCodeBean;
import org.apache.hadoop.chukwa.rest.bean.UserBean;
import org.apache.hadoop.chukwa.util.ExceptionUtil;
import org.json.JSONArray;
import com.sun.jersey.api.client.Client;
public class TestUserResource extends SetupTestEnv {
public void testUserSave() {
try {
UserBean user = new UserBean();
user.setId("admin");
user.setProperty("testKey", "testValue");
JSONArray ja = new JSONArray();
user.setViews(ja);
client = Client.create();
resource = client.resource("http://localhost:"+restPort);
ReturnCodeBean result = resource.path("/hicc/v1/user").
header("Content-Type","application/json").
header("Authorization", authorization).
put(ReturnCodeBean.class, user);
assertEquals(1, result.getCode());
} catch (Exception e) {
fail(ExceptionUtil.getStackTrace(e));
}
}
public void testUserLoad() {
client = Client.create();
resource = client.resource("http://localhost:"+restPort);
UserBean user = resource.path("/hicc/v1/user/uid/admin").header("Authorization", authorization).get(UserBean.class);
try {
assertEquals("admin", user.getId());
assertEquals("testValue", user.getPropertyValue("testKey"));
} catch (Exception e) {
fail(ExceptionUtil.getStackTrace(e));
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
9a256568b062ede9839ba429e0993d641dd13536 | 5d078230b226ba77d420cfadb9ae78ed8f782c67 | /src/main/resources/test/com/DataSource.java | fec9a80c5a505a931d82c3210f2e3c5095bef669 | [] | no_license | ofy2016/springNote | fe8c6a5ed4247a6cb83cdd7ced3955d743af88a9 | 50b130034c7c75943b5077c2d65f8b96ea2f2e21 | refs/heads/master | 2020-12-29T01:53:46.554013 | 2016-08-02T08:45:44 | 2016-08-02T08:45:44 | 64,740,521 | 0 | 0 | null | 2016-08-02T08:49:15 | 2016-08-02T08:49:15 | null | UTF-8 | Java | false | false | 358 | java | package test.com;
import java.util.Properties;
public class DataSource {
private Properties properties;
public Properties getProperties() {
return properties;
}
public void setProperties(Properties properties) {
this.properties = properties;
}
@Override
public String toString() {
return "DataSource [properties=" + properties + "]";
}
}
| [
"2227800977@qq.com"
] | 2227800977@qq.com |
7dfeb797e146f70f1eaa0d5a8d31e27fff293b38 | 825fea24eda32990d9ee8abc73916088fec171d8 | /rea1/reception/document/docsource/springapi/spring/Spring_1500_AOP_Annotation/LogInterceptor.java | 597b156522a591d74e57e9f00d61358cddbb079e | [] | no_license | fuzhengwei/php | 3bbe7f30960d66f2a8b90a9de9d17f14f5a599f6 | 1d6be708c503a1ee019470a261c1302357372b0a | refs/heads/master | 2016-09-06T16:28:08.607654 | 2014-10-01T10:58:50 | 2014-10-01T10:58:50 | 24,228,790 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 730 | java | package com.bjsxt.aop;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;
@Aspect
@Component
public class LogInterceptor {
@Pointcut("execution(public * com.bjsxt.service..*.add(..))")
public void myMethod(){};
@Before("myMethod()")
public void before() {
System.out.println("method before");
}
@Around("myMethod()")
public void aroundMethod(ProceedingJoinPoint pjp) throws Throwable {
System.out.println("method around start");
pjp.proceed();
System.out.println("method around end");
}
}
| [
"184172133@qq.com"
] | 184172133@qq.com |
f2833fbcb41e48e66a831e127f5eb3caf962ce38 | dede6aaca13e69cb944986fa3f9485f894444cf0 | /media-soa/media-soa-api/src/main/java/com/dangdang/digital/vo/UserTradeBaseVo.java | 010629925cf800c84d59d9c9a8905917ff4be297 | [] | no_license | summerxhf/dang | c0d1e7c2c9436a7c7e7f9c8ef4e547279ec5d441 | f1b459937d235637000fb433919a7859dcd77aba | refs/heads/master | 2020-03-27T08:32:33.743260 | 2015-06-03T08:12:45 | 2015-06-03T08:12:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,063 | java | /**
* Description: UserTradeBaseVo.java
* All Rights Reserved.
* @version 1.0 2014年12月3日 下午3:22:23 by 张宪斌(zhangxianbin@dangdang.com)创建
*/
package com.dangdang.digital.vo;
import java.io.Serializable;
/**
* Description: 用户交易基础vo All Rights Reserved.
*
* @version 1.0 2014年12月3日 下午3:22:23 by 张宪斌(zhangxianbin@dangdang.com)创建
*/
public class UserTradeBaseVo implements Serializable {
private static final long serialVersionUID = 9116896088784664780L;
/**
* 用户id
*/
private Long custId;
/**
* 用户名
*/
private String username;
/**
* 昵称
*/
private String nickname;
/**
* 电子邮箱
*/
private String email;
/**
* 介绍
*/
private String introduct;
/**
* 用户类型
*/
private String custType;
/**
* 用户头像
*/
private String custImg;
/**
* 频道
*/
private String channelType;
/**
* 是否交易成功
*/
private boolean tradeResult = false;
/**
* 是否只允许消费主账户阅读币
*/
private boolean isOnlyPayMainAmount = true;
/**
* 交易类型:1 充值,2 消费,3 查询
*/
private Integer tradeType;
/**
* 需要消费金额
*/
private Integer requirePayAmount;
/**
* 主账户实际消费金额
*/
private Integer payMainAmount;
/**
* 副账户实际消费金额
*/
private Integer paySubAmount;
/**
* 主账户需要充值金额
*/
private Integer requireRechargeMainAmount;
/**
* 副账户需要充值金额
*/
private Integer requireRechargeSubAmount;
/**
* 主账户实际充值金额
*/
private Integer rechargeMainAmount;
/**
* 副账户实际充值金额
*/
private Integer rechargeSubAmount;
/**
* 主账户余额
*/
private Integer mainBalance;
/**
* 副账户余额
*/
private Integer subBalance;
/**
* IOS主账户余额
*/
private Integer mainBalanceIOS;
/**
* IOS副账户余额
*/
private Integer subBalanceIOS;
/**
* 外部订单号
*/
private String sourceOrderNo ;
/**
* 消费来源--设备类型
*/
private String consumeSource ;
/**
* 上次获取的最小消费明细ID(用于分页) (可为0)
*/
private Long lastConsumeItemId;
/**
* 来源平台
*/
private String fromPaltform;
private Integer accountGrade;// 用户级别
private Integer accountIntegral;// 账户级别
private String activityCode; //辅账户充值对应的活动码
public Long getCustId() {
return custId;
}
public void setCustId(Long custId) {
this.custId = custId;
}
public boolean isTradeResult() {
return tradeResult;
}
public void setTradeResult(boolean tradeResult) {
this.tradeResult = tradeResult;
}
public Integer getTradeType() {
return tradeType;
}
public void setTradeType(Integer tradeType) {
this.tradeType = tradeType;
}
public Integer getRequirePayAmount() {
return requirePayAmount;
}
public void setRequirePayAmount(Integer requirePayAmount) {
this.requirePayAmount = requirePayAmount;
}
public Integer getPayMainAmount() {
return payMainAmount;
}
public void setPayMainAmount(Integer payMainAmount) {
this.payMainAmount = payMainAmount;
}
public Integer getPaySubAmount() {
return paySubAmount;
}
public void setPaySubAmount(Integer paySubAmount) {
this.paySubAmount = paySubAmount;
}
public Integer getRequireRechargeMainAmount() {
return requireRechargeMainAmount;
}
public String getChannelType() {
return channelType;
}
public void setChannelType(String channelType) {
this.channelType = channelType;
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public void setRequireRechargeMainAmount(Integer requireRechargeMainAmount) {
this.requireRechargeMainAmount = requireRechargeMainAmount;
}
public Integer getRequireRechargeSubAmount() {
return requireRechargeSubAmount;
}
public void setRequireRechargeSubAmount(Integer requireRechargeSubAmount) {
this.requireRechargeSubAmount = requireRechargeSubAmount;
}
public Integer getRechargeMainAmount() {
return rechargeMainAmount;
}
public void setRechargeMainAmount(Integer rechargeMainAmount) {
this.rechargeMainAmount = rechargeMainAmount;
}
public Integer getRechargeSubAmount() {
return rechargeSubAmount;
}
public void setRechargeSubAmount(Integer rechargeSubAmount) {
this.rechargeSubAmount = rechargeSubAmount;
}
public Integer getMainBalance() {
return mainBalance;
}
public void setMainBalance(Integer mainBalance) {
this.mainBalance = mainBalance;
}
public Integer getSubBalance() {
return subBalance;
}
public void setSubBalance(Integer subBalance) {
this.subBalance = subBalance;
}
public boolean isOnlyPayMainAmount() {
return isOnlyPayMainAmount;
}
public void setOnlyPayMainAmount(boolean isOnlyPayMainAmount) {
this.isOnlyPayMainAmount = isOnlyPayMainAmount;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getIntroduct() {
return introduct;
}
public void setIntroduct(String introduct) {
this.introduct = introduct;
}
public String getCustType() {
return custType;
}
public void setCustType(String custType) {
this.custType = custType;
}
public String getCustImg() {
return custImg;
}
public void setCustImg(String custImg) {
this.custImg = custImg;
}
public String getSourceOrderNo() {
return sourceOrderNo;
}
public void setSourceOrderNo(String sourceOrderNo) {
this.sourceOrderNo = sourceOrderNo;
}
public String getConsumeSource() {
return consumeSource;
}
public void setConsumeSource(String consumeSource) {
this.consumeSource = consumeSource;
}
public Long getLastConsumeItemId() {
return lastConsumeItemId;
}
public void setLastConsumeItemId(Long lastConsumeItemId) {
this.lastConsumeItemId = lastConsumeItemId;
}
public String getFromPaltform() {
return fromPaltform;
}
public void setFromPaltform(String fromPaltform) {
this.fromPaltform = fromPaltform;
}
public Integer getMainBalanceIOS() {
return mainBalanceIOS;
}
public void setMainBalanceIOS(Integer mainBalanceIOS) {
this.mainBalanceIOS = mainBalanceIOS;
}
public Integer getSubBalanceIOS() {
return subBalanceIOS;
}
public void setSubBalanceIOS(Integer subBalanceIOS) {
this.subBalanceIOS = subBalanceIOS;
}
public Integer getAccountGrade() {
return accountGrade;
}
public void setAccountGrade(Integer accountGrade) {
this.accountGrade = accountGrade;
}
public Integer getAccountIntegral() {
return accountIntegral;
}
public void setAccountIntegral(Integer accountIntegral) {
this.accountIntegral = accountIntegral;
}
public String getActivityCode() {
return activityCode;
}
public void setActivityCode(String activityCode) {
this.activityCode = activityCode;
}
}
| [
"maqiang@dangdang.com"
] | maqiang@dangdang.com |
f76b619b3f2df4e1d567e82224fa6df5a0037703 | 31f609157ae46137cf96ce49e217ce7ae0008b1e | /bin/ext-content/cmsfacades/testsrc/de/hybris/platform/cmsfacades/common/service/impl/DefaultProductCatalogItemModelFinderTest.java | a6216645413e322bb2e9b6e8e4de6f2a9c2737e6 | [] | no_license | natakolesnikova/hybrisCustomization | 91d56e964f96373781f91f4e2e7ca417297e1aad | b6f18503d406b65924c21eb6a414eb70d16d878c | refs/heads/master | 2020-05-23T07:16:39.311703 | 2019-05-15T15:08:38 | 2019-05-15T15:08:38 | 186,672,599 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,706 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.cmsfacades.common.service.impl;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.notNullValue;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import de.hybris.bootstrap.annotations.UnitTest;
import de.hybris.platform.category.model.CategoryModel;
import de.hybris.platform.cmsfacades.data.ItemData;
import de.hybris.platform.cmsfacades.uniqueidentifier.UniqueItemIdentifierService;
import de.hybris.platform.search.restriction.SearchRestrictionService;
import de.hybris.platform.servicelayer.dto.converter.ConversionException;
import de.hybris.platform.servicelayer.session.MockSessionService;
import de.hybris.platform.servicelayer.session.SessionService;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.springframework.beans.factory.ObjectFactory;
@UnitTest
@RunWith(MockitoJUnitRunner.class)
public class DefaultProductCatalogItemModelFinderTest
{
@InjectMocks
private DefaultProductCatalogItemModelFinder finder;
@Mock
private SearchRestrictionService searchRestrictionService;
@Mock
private UniqueItemIdentifierService uniqueItemIdentifierService;
@Mock
private CategoryModel categoryModel01;
@Mock
private CategoryModel categoryModel02;
private final SessionService sessionService = new MockSessionService();
private final String validKey1 = "pantsUK-staged-pants007";
private final String validKey2 = "pantsUK-staged-pants008";
@Before
public void setUp()
{
finder.setSessionService(sessionService);
doNothing().when(searchRestrictionService).disableSearchRestrictions();
doNothing().when(searchRestrictionService).enableSearchRestrictions();
when(uniqueItemIdentifierService.getItemModel(validKey1, CategoryModel.class)).thenReturn(Optional.of(categoryModel01));
when(uniqueItemIdentifierService.getItemModel(validKey2, CategoryModel.class)).thenReturn(Optional.of(categoryModel02));
}
@Test
public void shouldFindCategoriesForValidKeys()
{
final List<CategoryModel> models = finder.getCategoriesForCompositeKeys(Arrays.asList(validKey1, validKey2));
assertThat(models, hasSize(2));
verify(uniqueItemIdentifierService).getItemModel(validKey1, CategoryModel.class);
verify(uniqueItemIdentifierService).getItemModel(validKey2, CategoryModel.class);
}
@Test
public void shouldFindCategoryForValidKey()
{
final CategoryModel model = finder.getCategoryForCompositeKey(validKey1);
assertThat(model, notNullValue());
verify(uniqueItemIdentifierService).getItemModel(validKey1, CategoryModel.class);
}
@Test(expected = ConversionException.class)
public void shouldFindCategoryForInvalidKey()
{
final String invalidKey = "invalid";
doThrow(new ConversionException("invalid composite key")).when(uniqueItemIdentifierService)
.getItemModel(invalidKey, CategoryModel.class);
final CategoryModel model = finder.getCategoryForCompositeKey(invalidKey);
}
}
| [
"nataliia@spadoom.com"
] | nataliia@spadoom.com |
ebe9388756d49a1aa190dce4a0aaf281cda9ce9b | 18cc9453ebc3b58309aa6a05990ba6393a322df0 | /data/src/main/java/ru/prolib/aquila/data/storage/hsql/HSQLSequence.java | c796998506b5ae76e8aee2d30bdc1ebdcdbe5004 | [] | no_license | robot-aquila/aquila | 20ef53d813074e2346bfbd6573ffb0737bef5412 | 056af30a3610366fe47d97d0c6d53970e3ee662b | refs/heads/develop | 2022-11-30T01:54:52.653013 | 2020-12-07T00:18:01 | 2020-12-07T00:18:01 | 20,706,073 | 3 | 2 | null | 2022-11-24T08:58:08 | 2014-06-11T00:00:34 | Java | UTF-8 | Java | false | false | 992 | java | package ru.prolib.aquila.data.storage.hsql;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import ru.prolib.aquila.data.Sequence;
public class HSQLSequence implements Sequence {
private final Connection connection;
private final String query, sequenceID;
public HSQLSequence(Connection connection, String sequence_id) {
this.connection = connection;
this.query = String.format("CALL NEXT VALUE FOR \"%s\"", sequence_id.replace("\"", "\"\""));
this.sequenceID = sequence_id;
}
public String getSequenceID() {
return sequenceID;
}
@Override
public long next() {
try {
PreparedStatement sth = connection.prepareStatement(query);
ResultSet rs = sth.executeQuery();
rs.next();
long result = rs.getLong(1);
rs.close();
sth.close();
return result;
} catch ( SQLException e ) {
throw new RuntimeException("Query failed", e);
}
}
}
| [
"robot-aquila@hotmail.com"
] | robot-aquila@hotmail.com |
7926de3d888d9a56106650783c2bd4b93ece6dfb | d6720f9cb13c0233b76bc8a81717a83b40ae9830 | /0ctope/java_api/src/com/sun/corba/se/PortableActivationIDL/RepositoryPackage/AppNamesHolder.java | b8ab416ae7b3c9b3dec5d58ad38ecc502e48f97d | [] | no_license | EchoLiao/nalstudy | e4565aadf80ff70388225c4c92eb9bb22d85f384 | 869288a16e540520cadc28c82702e52f1c8396ac | refs/heads/master | 2016-09-05T12:38:06.721690 | 2013-06-05T08:47:01 | 2013-06-05T08:47:01 | 33,391,633 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,154 | java | package com.sun.corba.se.PortableActivationIDL.RepositoryPackage;
/**
* com/sun/corba/se/PortableActivationIDL/RepositoryPackage/AppNamesHolder.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from ../../../../src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl
* Monday, March 9, 2009 1:55:38 AM GMT-08:00
*/
/** Type used for a list of application names
*/
public final class AppNamesHolder implements org.omg.CORBA.portable.Streamable
{
public String value[] = null;
public AppNamesHolder ()
{
}
public AppNamesHolder (String[] initialValue)
{
value = initialValue;
}
public void _read (org.omg.CORBA.portable.InputStream i)
{
value = com.sun.corba.se.PortableActivationIDL.RepositoryPackage.AppNamesHelper.read (i);
}
public void _write (org.omg.CORBA.portable.OutputStream o)
{
com.sun.corba.se.PortableActivationIDL.RepositoryPackage.AppNamesHelper.write (o, value);
}
public org.omg.CORBA.TypeCode _type ()
{
return com.sun.corba.se.PortableActivationIDL.RepositoryPackage.AppNamesHelper.type ();
}
}
| [
"nuoerlz@da13e6bb-9c2c-a04c-5f4c-2d7d41371f5f"
] | nuoerlz@da13e6bb-9c2c-a04c-5f4c-2d7d41371f5f |
1e2971f35e98bad08e62f761acc6c1b0b344368c | c94f888541c0c430331110818ed7f3d6b27b788a | /blockchain/java/src/main/java/com/antgroup/antchain/openapi/blockchain/models/CheckBlockchainOrderRequest.java | 02239d4c093e6a6858445965f065a7c4fb375626 | [
"MIT",
"Apache-2.0"
] | permissive | alipay/antchain-openapi-prod-sdk | 48534eb78878bd708a0c05f2fe280ba9c41d09ad | 5269b1f55f1fc19cf0584dc3ceea821d3f8f8632 | refs/heads/master | 2023-09-03T07:12:04.166131 | 2023-09-01T08:56:15 | 2023-09-01T08:56:15 | 275,521,177 | 9 | 10 | MIT | 2021-03-25T02:35:20 | 2020-06-28T06:22:14 | PHP | UTF-8 | Java | false | false | 1,935 | java | // This file is auto-generated, don't edit it. Thanks.
package com.antgroup.antchain.openapi.blockchain.models;
import com.aliyun.tea.*;
public class CheckBlockchainOrderRequest extends TeaModel {
// OAuth模式下的授权token
@NameInMap("auth_token")
public String authToken;
@NameInMap("product_instance_id")
public String productInstanceId;
// 参数
@NameInMap("data")
@Validation(required = true)
public String data;
// region_id
@NameInMap("region_id")
public String regionId;
// 用户请求ID
@NameInMap("user_request_id")
public String userRequestId;
public static CheckBlockchainOrderRequest build(java.util.Map<String, ?> map) throws Exception {
CheckBlockchainOrderRequest self = new CheckBlockchainOrderRequest();
return TeaModel.build(map, self);
}
public CheckBlockchainOrderRequest setAuthToken(String authToken) {
this.authToken = authToken;
return this;
}
public String getAuthToken() {
return this.authToken;
}
public CheckBlockchainOrderRequest setProductInstanceId(String productInstanceId) {
this.productInstanceId = productInstanceId;
return this;
}
public String getProductInstanceId() {
return this.productInstanceId;
}
public CheckBlockchainOrderRequest setData(String data) {
this.data = data;
return this;
}
public String getData() {
return this.data;
}
public CheckBlockchainOrderRequest setRegionId(String regionId) {
this.regionId = regionId;
return this;
}
public String getRegionId() {
return this.regionId;
}
public CheckBlockchainOrderRequest setUserRequestId(String userRequestId) {
this.userRequestId = userRequestId;
return this;
}
public String getUserRequestId() {
return this.userRequestId;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
7a7efb54ee9fe1d5bd68750a12eb5838d752e2c2 | 370e5c8742ae735478c88f112508262e042135a1 | /src/CAR/NewMazda2Sport.java | e533411475f69f78fd7189ca6092a4abecaac8be | [] | no_license | thanhtran6916/new-module2 | 6a74d9ee50fb8e13a3d47b1142b6bef7deab8e2c | 82dfdbee2967511135ea505db7fee08463488640 | refs/heads/master | 2023-07-21T06:00:16.032294 | 2021-09-06T02:15:59 | 2021-09-06T02:15:59 | 397,500,022 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 262 | java | package CAR;
public class NewMazda2Sport extends Mazda {
public NewMazda2Sport() {
}
public NewMazda2Sport(String name, int cost, String fuel, int seat, String design, String origin) {
super(name, cost, fuel, seat, design, origin);
}
}
| [
"tranvanthanhtran.tt@gmail.com"
] | tranvanthanhtran.tt@gmail.com |
5004b61dd8a551befcf816aa426584f48171381d | b23404e272db01f2bf46320565c11b9e02cf0c61 | /pas/src/main/java/web/com/hunthawk/reader/page/system/ShowRolePage.java | 0bceffe6d0782ce3788b4c24bd4010bdd3431426 | [] | no_license | brucesq/brucedamon001 | 95ab98798f1c29d722a397681956c24ff4091385 | 92ab181f90005afffb354d10768921545912119c | refs/heads/master | 2021-05-29T09:35:05.115101 | 2011-12-20T05:42:28 | 2011-12-20T05:42:28 | 32,131,555 | 0 | 1 | null | null | null | null | GB18030 | Java | false | false | 5,148 | java | /**
*
*/
package com.hunthawk.reader.page.system;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.apache.tapestry.IPage;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.annotations.InitialValue;
import org.apache.tapestry.annotations.InjectComponent;
import org.apache.tapestry.annotations.InjectObject;
import org.apache.tapestry.annotations.InjectPage;
import org.apache.tapestry.annotations.Persist;
import org.apache.tapestry.callback.ICallback;
import org.apache.tapestry.contrib.table.components.TableView;
import org.apache.tapestry.contrib.table.model.IBasicTableModel;
import org.apache.tapestry.contrib.table.model.ITableColumn;
import com.hunthawk.framework.annotation.Restrict;
import com.hunthawk.framework.hibernate.CompareExpression;
import com.hunthawk.framework.hibernate.CompareType;
import com.hunthawk.framework.hibernate.HibernateExpression;
import com.hunthawk.framework.tapestry.SearchCondition;
import com.hunthawk.framework.tapestry.SearchPage;
import com.hunthawk.framework.util.ParameterCheck;
import com.hunthawk.reader.domain.system.Role;
import com.hunthawk.reader.service.system.UserService;
/**
* @author BruceSun
*
*/
@Restrict(roles = { "system" }, mode = Restrict.Mode.ROLE)
public abstract class ShowRolePage extends SearchPage {
@InjectComponent("table")
public abstract TableView getTableView();
@InjectPage("system/EditRolePage")
public abstract EditRolePage getEditPage();
@InjectObject("spring:userService")
public abstract UserService getUserService();
public abstract String getName();
public abstract void setName(String name);
public abstract Integer getObjectid();
public abstract void setObjecteid(Integer userid);
public IPage onEdit(Object obj)
{
getEditPage().setModel(obj);
return getEditPage();
}
@SuppressWarnings("unchecked")
public void setCheckboxSelected(boolean bSelected)
{
Object obj = getCurrentObject();
Set selectedObjs = getSelectedObjects();
// 选择了用户
if (bSelected)
{
selectedObjs.add(obj);
}
else
{
selectedObjs.remove(obj);
}
// persist value
setSelectedObjects(selectedObjs);
}
public boolean getCheckboxSelected()
{
return getSelectedObjects().contains(getCurrentObject());
}
@Persist("session")
@InitialValue("new java.util.HashSet()")
public abstract Set getSelectedObjects();
public abstract void setSelectedObjects(Set set);
/**
* 获得当前Privilege
*
* @return
*/
public abstract Object getCurrentObject();
public void search()
{
System.out.println(this.getCallbackStack().getStack().size());
}
/* (non-Javadoc)
* @see com.aspire.pams.framework.tapestry.SearchPage#delete(java.lang.Object)
*/
@Override
protected void delete(Object object) {
try{
getUserService().deleteRole((Role)object);
}catch(Exception e)
{
getDelegate().setFormComponent(null);
getDelegate().record(e.getMessage(), null);
}
}
public void onBatchDelete(IRequestCycle cycle)
{
for(Object obj : getSelectedObjects())
{
delete(obj);
}
setSelectedObjects(new HashSet());
ICallback callback = (ICallback) getCallbackStack().getCurrentCallback();
callback.performCallback(cycle);
}
/* (non-Javadoc)
* @see com.aspire.pams.framework.tapestry.SearchPage#getSearchConditions()
*/
public Collection<HibernateExpression> getSearchExpressions()
{
Collection<HibernateExpression> hibernateExpressions = new ArrayList<HibernateExpression>();
if(!ParameterCheck.isNullOrEmpty(getName()))
{
HibernateExpression nameE = new CompareExpression("name","%"+getName()+"%",CompareType.Like);
hibernateExpressions.add(nameE);
}
HibernateExpression useridE = new CompareExpression("id",getObjectid(),CompareType.Equal);
hibernateExpressions.add(useridE);
return hibernateExpressions;
}
@Override
public List<SearchCondition> getSearchConditions()
{
List<SearchCondition> searchConditions = new ArrayList<SearchCondition>();
SearchCondition nameC = new SearchCondition();
nameC.setName("name");
nameC.setValue(getName());
searchConditions.add(nameC);
SearchCondition useridC = new SearchCondition();
useridC.setName("objectid");
useridC.setValue(getObjectid());
searchConditions.add(useridC);
return searchConditions;
}
@Override
public IBasicTableModel getTableModel() {
return new IBasicTableModel()
{
public int getRowCount()
{
return getUserService().getResultCount(Role.class, getSearchExpressions()).intValue();
}
public Iterator getCurrentPageRows(int nFirst, int nPageSize,
ITableColumn objSortColumn, boolean bSortOrder)
{
int pageNo = nFirst / nPageSize;
pageNo++;
return getUserService().findBy(Role.class, pageNo, nPageSize, "id", false, getSearchExpressions()).iterator();
}
};
}
}
| [
"quanzhi@8cf3193c-f4eb-11de-8355-bf90974c4141"
] | quanzhi@8cf3193c-f4eb-11de-8355-bf90974c4141 |
e3646ecdbfb57c466ead00a9fde71e4cd8361e0d | fb6b1031a53ebaa63c33e7ffe4bc2f2357aced0d | /2019/6月/dylxh/src/main/java/com/loooody/dylxh/VO/ProductInfoVO.java | cdfc4e9b5ae10a49225d6f737e5f00a2aced528f | [] | no_license | loooody/Lvxiaohui | a72fc979a65e9557791eff7abd80b6ff4d10c097 | 9df7e3e64a013910d427918e5c011a0949278b3b | refs/heads/master | 2022-12-21T00:07:52.818091 | 2019-06-13T07:49:14 | 2019-06-13T07:49:14 | 140,280,879 | 0 | 0 | null | 2022-12-16T11:29:44 | 2018-07-09T12:16:44 | Java | UTF-8 | Java | false | false | 1,228 | java | package com.loooody.dylxh.VO;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.loooody.dylxh.entity.RatingInfo;
import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.List;
/**
* @ClassName: ProductInfoVO
* @Description: TODO
* @Author: loooody
* @Create: 19-3-11 上午11:31
* @Version 1.0
**/
@Data
public class ProductInfoVO {
@JsonProperty("id")
private String productId;
/** 商品名称 */
@JsonProperty("name")
private String productName;
/** 商品价格 */
@JsonProperty("price")
private BigDecimal productPrice;
/** 商品历史价格 **/
@JsonProperty("oldPrice")
private BigDecimal productOldPrice;
/** 商品描述 */
@JsonProperty("description")
private String productDescription;
/** 商品库存 */
@JsonProperty("sellCount")
private Integer sellCount;
/** 商品详情 **/
@JsonProperty("info")
private String productInformation;
/** 商品评论 **/
@JsonProperty("ratings")
private List<RatingInfoVO> ratingInfoList;
/** 商品图片地址 */
@JsonProperty("icon")
private String productIcon;
}
| [
"319667916@qq.com"
] | 319667916@qq.com |
bc6b721dcb624f1639dbc35934e9ec4a1889369c | 505c9c58a227dbe72cd7caa7d0343641d1180333 | /source/ledger/ledger-model/src/main/java/com/jd/blockchain/ledger/MerkleSnapshot.java | 1e19555902cf00375faefa0725b66e752c31e44b | [
"Apache-2.0"
] | permissive | klboke/jdchain | 21b8e70c98c73024c6800bd2c5952f7435f45db7 | a96ec779416cfe4eb05a7251df8d45f615508938 | refs/heads/master | 2020-11-23T19:49:08.415806 | 2019-12-13T09:27:08 | 2019-12-13T09:27:08 | 226,007,891 | 0 | 0 | Apache-2.0 | 2019-12-05T03:26:57 | 2019-12-05T03:26:56 | null | UTF-8 | Java | false | false | 447 | java | package com.jd.blockchain.ledger;
import com.jd.blockchain.binaryproto.DataContract;
import com.jd.blockchain.binaryproto.DataField;
import com.jd.blockchain.binaryproto.PrimitiveType;
import com.jd.blockchain.consts.DataCodes;
import com.jd.blockchain.crypto.HashDigest;
@DataContract(code = DataCodes.MERKLE_SNAPSHOT)
public interface MerkleSnapshot {
@DataField(order = 0, primitiveType = PrimitiveType.BYTES)
HashDigest getRootHash();
}
| [
"huanghaiquan@jd.com"
] | huanghaiquan@jd.com |
70370a023645a7a26b7d8ac5693cade67d7eda83 | 609f24a151b5abcf815f69293dc555e6fdd241eb | /utils/src/main/java/com/lsm1998/util/MyList.java | bbecb3e354a7d96de3163e1b58c4a10c9a19cf50 | [] | no_license | lsm1998/code | 3842cda6c591d78eb8385eb2e767de59697e6407 | b4232edde2b8f2e569efae205a8f322e3ae9641a | refs/heads/master | 2022-12-24T20:16:25.008443 | 2021-10-23T04:47:48 | 2021-10-23T04:47:48 | 193,066,068 | 3 | 4 | null | 2022-12-14T20:43:34 | 2019-06-21T08:59:36 | Java | UTF-8 | Java | false | false | 746 | java | package com.lsm1998.util;
import java.util.Iterator;
/**
* @作者:刘时明
* @时间:2019/5/20-8:28
* @作用:
*/
public interface MyList<E> extends MyCollection<E>
{
int size();
boolean isEmpty();
boolean contains(Object o);
Iterator<E> iterator();
Object[] toArray();
<T> T[] toArray(T[] a);
boolean add(E e);
boolean remove(Object o);
boolean addAll(MyCollection<? extends E> c);
boolean addAll(int index, MyCollection<? extends E> c);
boolean removeAll(MyCollection<?> c);
void clear();
E get(int index);
E set(int index, E element);
void add(int index, E element);
E remove(int index);
int indexOf(Object o);
int lastIndexOf(Object o);
}
| [
"487005831@qq.com"
] | 487005831@qq.com |
b3a0223561e0393a04f6d1c34d851c80298e816a | 0e6268fd8a7dab3e4d7b830d6cac079be0a8a0fe | /src/Mar13th18/LocalEx.java | 92d478a1d5cb49b75fe89916906fc1b92d53239b | [] | no_license | uday246/March18 | fc5fafbe20e12095da2e4e3fe94d1bc49dbc1df0 | 44ae546660f400b96b469c26decbe0c562b88a94 | refs/heads/master | 2020-08-15T07:27:19.063010 | 2019-10-15T13:07:02 | 2019-10-15T13:07:02 | 215,300,429 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,506 | java | package Mar13th18;
public class LocalEx {
public static void main(String[] args) {
System.out.println(taxPaid("NA",100000));
System.out.println(taxPaid("SI",100000));
System.out.println(taxPaid("MFJ",100000));
System.out.println(taxPaid("HH",100000));
System.out.println(taxPaid("QW",100000));
}
static float taxPaid(String code,float yearlySalary){
float tax=0.0f;
if(code.equals("NA")){
tax = 0.4f;
}
if(code.equals("SI")){
if(yearlySalary<=9325)
{
tax=0.1f;
}
if(yearlySalary>=9326 && yearlySalary<=37950)
{
tax=0.15f;
}
if(yearlySalary>=37951 && yearlySalary<=91900)
{
tax=0.25f;
}
if(yearlySalary>=91901 && yearlySalary<=191650)
{
tax=0.25f;
}
if(yearlySalary>=191651 && yearlySalary<=416700)
{
tax=0.33f;
}
if(yearlySalary>=416701 && yearlySalary<=418400)
{
tax=0.35f;
}
if(yearlySalary>418400)
{
tax=0.39f;
}
}
if(code.equals("MFJ")){
if(yearlySalary<=18650)
{
tax=0.1f;
}
if(yearlySalary>=18651 && yearlySalary<=75900)
{
tax=0.15f;
}
if(yearlySalary>=75901 && yearlySalary<=153100)
{
tax=0.25f;
}
if(yearlySalary>=153101 && yearlySalary<=233350)
{
tax=0.25f;
}
if(yearlySalary>=233351 && yearlySalary<=416700)
{
tax=0.33f;
}
if(yearlySalary>=416701 && yearlySalary<=470700)
{
tax=0.35f;
}
if(yearlySalary>470700)
{
tax=0.39f;
}
}
if(code.equals("HH")){
if(yearlySalary<=13350)
{
tax=0.1f;
}
if(yearlySalary>=13351 && yearlySalary<=50800)
{
tax=0.15f;
}
if(yearlySalary>=50801 && yearlySalary<=131200)
{
tax=0.25f;
}
if(yearlySalary>=131201 && yearlySalary<=212500)
{
tax=0.25f;
}
if(yearlySalary>=212501 && yearlySalary<=416700)
{
tax=0.33f;
}
if(yearlySalary>=416701 && yearlySalary<=444550)
{
tax=0.35f;
}
if(yearlySalary>444550)
{
tax=0.39f;
}
}
if(code.equals("QW")){
if(yearlySalary<=9325)
{
tax=0.1f;
}
if(yearlySalary>=9326 && yearlySalary<=37950)
{
tax=0.15f;
}
if(yearlySalary>=37951 && yearlySalary<=76550)
{
tax=0.25f;
}
if(yearlySalary>=76551 && yearlySalary<=116675)
{
tax=0.25f;
}
if(yearlySalary>=116676 && yearlySalary<=208350)
{
tax=0.33f;
}
if(yearlySalary>=208351 && yearlySalary<=235350)
{
tax=0.35f;
}
if(yearlySalary>235350)
{
tax=0.39f;
}
}
return tax;
}
}
| [
"teegalaudaykumar@gmail.com"
] | teegalaudaykumar@gmail.com |
d2b66159d78dcbd442a838f85e9e4efae6767ab3 | 9ccbfc4a2a7255365cf963feeaf2d55b68fe52fb | /src/petleWhile/RzutyKostkami.java | 85a0a92d8d0a35e388157d2b43efc2578e593d63 | [] | no_license | dixu11/sda-83-podstawy | 74ec617a9b0cc8bad5cdda40f1003e6175f216cd | 7df92dfc303054aa71d57ec487a5f1a96096c9ce | refs/heads/master | 2023-04-04T03:57:40.031989 | 2021-04-10T12:03:27 | 2021-04-10T12:03:27 | 342,819,328 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 913 | java | package petleWhile;
import java.util.Random;
import java.util.Scanner;
class RzutyKostkami {
public static void main(String[] args) {
// Scanner scanner = new Scanner(System.in);
// System.out.println("Ile razy rzucasz kostką?");
// int iloscRzutow = scanner.nextInt();
int iloscRzutow = 0;
System.out.println("Program rzuca kostką i sumuje wyniki tak długo aż nie trafi 6");
int suma = 0;
int wylosowana =0;
while (wylosowana != 6){ // tak długo jak nie wynosi 6
Random random = new Random();
wylosowana = random.nextInt(6) + 1;
System.out.println("Wylosowana: " + wylosowana);
suma += wylosowana;
iloscRzutow++;
}
System.out.println("Suma wylosowanych: " + suma);
System.out.println("Program trafił 6 po takiej ilości rzutów: " + iloscRzutow);
}
}
| [
"daniel.szlicht25@gmail.com"
] | daniel.szlicht25@gmail.com |
aac9e845b10e6a211c1e01cebed4d217818079c7 | a1e0706bf1bc83919654b4517730c9aed6499355 | /drools/tests/testData/highlighting/examples/resolve/Foo.java | 24df0afbcf96d7c7bf87d391870888f169f88698 | [
"Apache-2.0"
] | permissive | JetBrains/intellij-plugins | af734c74c10e124011679e3c7307b63d794da76d | f6723228208bfbdd49df463046055ea20659b519 | refs/heads/master | 2023-08-23T02:59:46.681310 | 2023-08-22T13:35:06 | 2023-08-22T15:23:46 | 5,453,324 | 2,018 | 1,202 | null | 2023-09-13T10:51:36 | 2012-08-17T14:31:20 | Java | UTF-8 | Java | false | false | 156 | java | package examples.resolve;
public class Foo {
public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
private int x=0;
} | [
"intellij-monorepo-bot-no-reply@jetbrains.com"
] | intellij-monorepo-bot-no-reply@jetbrains.com |
20849df667a76f850d4fb80efc7174c6c3b4f1ee | 1106e340cde56c529d6ad4dcdb4d15327d9f7684 | /app/src/main/java/com/wangban/yzbbanban/picture_test_40/fragment/FragmentPu.java | f7360de41c11094fe811b5e49bc3bfb8e379ff2e | [] | no_license | yzbbanban/Picture_test_4.0.4 | afe406d9b45c659ce9f8b99a599d3befc992f877 | 1577fb4b1f3eeb03b596cb18e3b282bb68923256 | refs/heads/master | 2021-01-19T03:04:58.089921 | 2016-06-25T05:17:24 | 2016-06-25T05:17:24 | 61,922,161 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,698 | java | package com.wangban.yzbbanban.picture_test_40.fragment;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.widget.SwipeRefreshLayout;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.GridView;
import com.wangban.yzbbanban.picture_test_40.R;
import com.wangban.yzbbanban.picture_test_40.activity.DetialActivity;
import com.wangban.yzbbanban.picture_test_40.adapter.MainImageAdapter;
import com.wangban.yzbbanban.picture_test_40.contast.Contast;
import com.wangban.yzbbanban.picture_test_40.dao.MainPictureDao;
import com.wangban.yzbbanban.picture_test_40.entity.Image;
import java.util.ArrayList;
import java.util.List;
/**
* Created by YZBbanban on 16/6/5.
*/
public class FragmentPu extends Fragment implements Contast, AdapterView.OnItemClickListener, SwipeRefreshLayout.OnRefreshListener {
private GridView gvPuImage;
private MainImageAdapter mainImageAdapter;
private List<Image> imgs;
private SwipeRefreshLayout mSwipeLayout;
private Handler handler = new Handler() {
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case REFRESH_COMPLETE:
MainPictureDao pic = new MainPictureDao();
pic.findImageGridView(new MainPictureDao.Callback() {
@Override
public void onImageDownload(List<Image> imgs) {
setAdapter(imgs);
}
}, PU);
mSwipeLayout.setRefreshing(false);
break;
}
}
};
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_pu, container, false);
initView(view);
setListener();
return view;
}
private void setListener() {
gvPuImage.setOnItemClickListener(this);
mSwipeLayout.setOnRefreshListener(this);
mSwipeLayout.setColorSchemeResources(android.R.color.holo_blue_bright,
android.R.color.holo_orange_light, android.R.color.holo_red_light);
}
private void initView(View view) {
gvPuImage = (GridView) view.findViewById(R.id.gv_pu);
mSwipeLayout = (SwipeRefreshLayout) view.findViewById(R.id.id_swipe_pu);
MainPictureDao pic = new MainPictureDao();
pic.findImageGridView(new MainPictureDao.Callback() {
@Override
public void onImageDownload(List<Image> imgs) {
setAdapter(imgs);
}
}, PU);
}
private void setAdapter(List<Image> images) {
imgs = images;
mainImageAdapter = new MainImageAdapter(getActivity(), (ArrayList<Image>) images, gvPuImage);
gvPuImage.setAdapter(mainImageAdapter);
}
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Intent intent = new Intent(getActivity(), DetialActivity.class);
intent.putExtra(EXTRA_PATH, imgs.get(position).getSkipPagePath());
//Log.i(TAG, "onItemClick: path: " + imgs.get(position).getSkipPagePath());
startActivity(intent);
setEnterTransition(getExitTransition());
}
@Override
public void onRefresh() {
handler.sendEmptyMessageDelayed(REFRESH_COMPLETE, 3000);
}
}
| [
"yzbbanban@live.com"
] | yzbbanban@live.com |
de57659e40d11762e3bd2a4496fb10011242bdb1 | fb23b2d22e3a8dbf926ce718eefffa4091095c29 | /src/main/java/br/gov/mg/fazenda/recaptcha/component/recaptcha/RecaptchaValidator.java | 0a625dfc10dd61c81e104aaf5650ceeb6d262819 | [] | no_license | leoluzh/recaptcha-core | 36099d83bb1d489ca147718fc4d92afc3c11adc1 | 1c822daa6ffb3023b383b1148d83cc259d2494ae | refs/heads/master | 2016-09-06T09:03:58.299804 | 2015-06-22T02:56:30 | 2015-06-22T02:56:30 | 37,834,780 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,285 | java | package br.gov.mg.fazenda.recaptcha.component.recaptcha;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.validator.Validator;
import javax.faces.validator.ValidatorException;
import javax.servlet.http.HttpServletRequest;
/**
*
* @author leonardo luz fernandes
* @since 15/03/2015
* @version 0.1
*
*/
public class RecaptchaValidator implements Validator {
public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
//get values from parent component
Recaptcha recaptcha = (Recaptcha)component;
String publicKey = recaptcha.getDataPublicKey();
String privateKey = recaptcha.getDataPrivateKey();
//get values from submit values
String remoteAddress = context.getExternalContext().getRemoteUser();
String gRecaptchaResponse = ((HttpServletRequest)context.getExternalContext().getRequest()).getParameter("g-recaptcha-response");
//TODO: Insert code for recaptcha api
boolean success = false ;
if( !success ){
//TODO: Insert values ...
String message = null ;
FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_ERROR,null,message);
throw new ValidatorException(fm);
}
}
}
| [
"leonardo.l.fernandes@gmail.com"
] | leonardo.l.fernandes@gmail.com |
cee0046a50cd1468b0d0ce7009e704b8543af699 | 3f1957d6b8672711e58bff07cb3e24f342831c92 | /NIPmodule-master/src/main/java/com/xtel/nipservicesdk/commons/Cts.java | 5b270be32828a11d8f565c082599985cd5720c45 | [] | no_license | vihahb/xMec | 782391a959d07b4a5a7747fe9173e9aad932d218 | 9da3333246aa1d0881b516777cedbb47aecf31b8 | refs/heads/master | 2021-03-27T12:42:23.427401 | 2017-08-11T12:19:14 | 2017-08-11T12:19:14 | 79,198,020 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,847 | java | package com.xtel.nipservicesdk.commons;
/**
* Created by Lê Công Long Vũ on 12/27/2016
*/
public class Cts {
public static final String SHARED_NAME = "nip_service_sdk";
public static final String SESSION = "session";
public static final String BEGIN_TIME = "begin_time";
public static final String TIME_ALIVE = "time_alive";
public static final String CODE = "code";
public static final String TYPE = "type";
public static final String MESSAGE = "message";
public static final String ERROR = "error";
public static final String SERVER_UPLOAD = "replace to server upload image";
/***
* BASE URL NIP SERVICE
***/
public static final String URL_NIP = "http://124.158.5.112:9180/nipum/";
/***
* END
***/
/***
* API URL NIP SERVICE
***/
public static final String API_FACEBOOK = "v1.0/m/user/fb/login";
public static final String API_ACCOUNT_KIT = "v1.0/m/user/accountkit/login";
public static final String API_SESSION_AUTHENTICATE = "v1.0/m/user/authenticate";
public static final String API_REGISTER_NIP = "v1.0/g/user";
public static final String API_LOGIN_ACC_NIP = "v1.0/m/user/login";
public static final String API_ACTIVE_ACCOUNT = "v1.0/g/user/active";
public static final String API_RE_ACTIVE_ACC_NIP = "v1.0/g/user/re-active";
public static final String API_RESET_ACC_NIP = "v1.0/g/user/reset-pwd";
/***
* END
***/
/***
* END
***/
public static final String USER_ACCOUNT = "user_account";
public static final String USER_AUTH_ID = "user_auth_id";
public static final String USER_SESSION = "user_session";
public static final String USER_ACTIVATION_CODE = "user_activation_code";
// Meta-data
public static final String META_DATA_NAME = "xtel_service_code";
} | [
"vihahb@gmail.com"
] | vihahb@gmail.com |
ded206e703b2147c4e0aad9445a95fc02bb3003d | a878314533bc1f22a6d6dc43fb1927636b79e9d0 | /src/main/java/com/i21/pocco/ApplicationWebXml.java | 1479ed9abb7332268076552b4400aab2b2f7eaa8 | [] | no_license | dario-boberek/jhipster-loanCalc | 96221929077f0898b2b5273a2315a830bdef2893 | 7c5b34385c526b0ff3c87af06736e0e9e6ffa3d7 | refs/heads/master | 2022-08-19T15:41:03.779539 | 2018-12-08T21:32:54 | 2018-12-08T21:32:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 818 | java | package com.i21.pocco;
import com.i21.pocco.config.DefaultProfileUtil;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
/**
* This is a helper Java class that provides an alternative to creating a web.xml.
* This will be invoked only when the application is deployed to a Servlet container like Tomcat, JBoss etc.
*/
public class ApplicationWebXml extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
/**
* set a default to use when no profile is configured.
*/
DefaultProfileUtil.addDefaultProfile(application.application());
return application.sources(LoanCalcApp.class);
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
b287b66267fac879a4c9490762db0d2274e768e1 | a3bd3b51694c78649560a40f91241fda62865b18 | /src/test/java/com/alibaba/druid/bvt/pool/exception/OracleExceptionSorterTest_closeConn_2.java | d8d8cf4da9d1c32285dd762a02bd1241475bd582 | [
"Apache-2.0"
] | permissive | kerry8899/druid | e96d7ccbd03353e47a97bea8388d46b2fe173f61 | a7cd07aac11c49d4d7d3e1312c97b6513efd2daa | refs/heads/master | 2021-01-23T02:00:33.500852 | 2019-03-29T10:14:34 | 2019-03-29T10:14:34 | 85,957,671 | 0 | 0 | null | 2017-03-23T14:14:01 | 2017-03-23T14:14:01 | null | UTF-8 | Java | false | false | 2,486 | java | package com.alibaba.druid.bvt.pool.exception;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import junit.framework.TestCase;
import org.junit.Assert;
import com.alibaba.druid.mock.MockConnection;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidPooledConnection;
import com.alibaba.druid.pool.vendor.OracleExceptionSorter;
import com.alibaba.druid.stat.JdbcStatManager;
import com.alibaba.druid.test.util.OracleMockDriver;
import com.alibaba.druid.util.JdbcUtils;
public class OracleExceptionSorterTest_closeConn_2 extends TestCase {
private DruidDataSource dataSource;
protected void setUp() throws Exception {
Assert.assertEquals(0, JdbcStatManager.getInstance().getSqlList().size());
dataSource = new DruidDataSource();
dataSource.setExceptionSorter(new OracleExceptionSorter());
dataSource.setDriver(new OracleMockDriver());
dataSource.setUrl("jdbc:mock:xxx");
dataSource.setPoolPreparedStatements(true);
dataSource.setMaxOpenPreparedStatements(100);
}
@Override
protected void tearDown() throws Exception {
JdbcUtils.close(dataSource);
}
public void test_connect() throws Exception {
String sql = "SELECT 1";
{
DruidPooledConnection conn = dataSource.getConnection();
PreparedStatement pstmt = conn.prepareStatement(sql);
pstmt.execute();
pstmt.close();
conn.close();
Assert.assertEquals(0, dataSource.getActiveCount());
Assert.assertEquals(1, dataSource.getPoolingCount());
Assert.assertEquals(1, dataSource.getCreateCount());
}
DruidPooledConnection conn = dataSource.getConnection();
MockConnection mockConn = conn.unwrap(MockConnection.class);
Assert.assertNotNull(mockConn);
conn.setAutoCommit(false);
SQLException exception = new SQLException("xx", "xxx", 28);
mockConn.setError(exception);
conn.close();
{
Connection conn2 = dataSource.getConnection();
conn2.close();
}
Assert.assertEquals(0, dataSource.getActiveCount());
Assert.assertEquals(1, dataSource.getPoolingCount());
Assert.assertEquals(2, dataSource.getCreateCount());
}
}
| [
"372822716@qq.com"
] | 372822716@qq.com |
40663f975a5207f6c44e8ac9cd7ff4506993ee3a | 1bdbaed4f9fecee110ffa57b391616961b80e1d4 | /src/main/java/phex/common/address/IpAddress.java | ca0ef566f2e8072f5767c61731176466a0f8b109 | [] | no_license | ToSp1987/i2phex | 201abed7fc514a0a2cefe9f800d66176c076e81c | 59b4240b6e68ffb38c9dc701059e231c5e340691 | refs/heads/master | 2022-04-07T17:56:37.009665 | 2014-04-15T13:54:05 | 2014-04-15T13:54:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,326 | java | /*
* PHEX - The pure-java Gnutella-servent.
* Copyright (C) 2001 - 2006 Phex Development Group
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Created on 01.11.2005
* --- CVS Information ---
* $Id: IpAddress.java 4365 2009-01-16 11:21:31Z gregork $
*/
package phex.common.address;
import java.util.Arrays;
import phex.common.Ip2CountryDB;
import phex.utils.IOUtil;
public class IpAddress
{
public enum IPClass { CLASS_A, CLASS_B, CLASS_C, INVALID }
public static final IpAddress LOCAL_HOST_IP = new IpAddress(
new byte[] { 127, 0, 0, 1 } );
public static final IpAddress UNSET_IP = new IpAddress(
new byte[] { 0, 0, 0, 0 } );
public static final String LOCAL_HOST_NAME = "127.0.0.1";
/** Cache the hash code for the address */
private int hash = 0;
private final byte[] hostIP;
public String countryCode;
public IpAddress( byte[] aHostIP )
{
if ( aHostIP == null )
{
throw new NullPointerException( "Ip is null" );
}
hostIP = aHostIP;
}
/**
* The method returns the IP of the host.
*/
public byte[] getHostIP()
{
return hostIP;
}
public String getFormatedString()
{
return AddressUtils.ip2string(hostIP);
}
public long getLongHostIP( )
{
int v1 = hostIP[3] & 0xFF;
int v2 = (hostIP[2] << 8) & 0xFF00;
int v3 = (hostIP[1] << 16) & 0xFF0000;
int v4 = (hostIP[0] << 24);
long ipValue = ((long)(v4|v3|v2|v1)) & 0x00000000FFFFFFFFl;
return ipValue;
}
public boolean equals( IpAddress address )
{
if ( address == null )
{
return false;
}
return Arrays.equals( hostIP, address.hostIP );
}
@Override
public boolean equals( Object obj )
{
if ( obj instanceof IpAddress )
{
return equals( (IpAddress) obj );
}
return false;
}
@Override
public int hashCode()
{
if ( hash == 0 )
{
int ipVal = IOUtil.deserializeInt( hostIP, 0 );
hash = ipVal;
}
return hash;
}
/**
* Returns the country code of the HostAddress. But only in case the host ip
* has already been resolved. Otherwise no country code is returned since
* the country code lookup would cost high amount of time.
* @return the country code or null.
*/
public String getCountryCode()
{
if ( countryCode == null )
{
countryCode = Ip2CountryDB.getCountryCode( this );
}
return countryCode;
}
/**
* Checks if the host address is the local one with the local port
*/
public boolean isLocalAddress( DestAddress localAddress )
{
if ( hostIP[0] == (byte) 127 )
{
return true;
}
else
{
return localAddress.getIpAddress().equals(this);
}
}
/**
* Checks if the IpAddress is a site local ip. Meaning a address in
* the private LAN.
*
* @return a <code>boolean</code> indicating if the address is
* a site local ip; or false if address is not a site local ip.
*/
public boolean isSiteLocalIP()
{
//10.*.*.* and 127.*.*.*
if ( hostIP[0] == (byte)10 || hostIP[0] == (byte)127 )
{
return true;
}
//172.16.*.* - 172.31.*.*
if ( hostIP[0] == (byte)172 && hostIP[1] >= (byte)16 && hostIP[1] <= (byte)31 )
{
return true;
}
//192.168.*.*
if ( hostIP[0] == (byte)192 && hostIP[1] == (byte)168 )
{
return true;
}
return false;
}
public boolean isValidIP()
{
// Class A
// |0|-netid-|---------hostid---------|
// 7 bits 24 bits
//
// Class B
// |10|----netid-----|-----hostid-----|
// 14 bits 16 bits
//
// Class C
// |110|--------netid--------|-hostid-|
// 21 bits 8 bits
boolean valid;
switch( getIPClass() )
{
case CLASS_A:
valid = ((hostIP[1]&0xFF) + (hostIP[2]&0xFF) + (hostIP[3]&0xFF)) != 0;
break;
case CLASS_B:
valid = ((hostIP[2]&0xFF) + (hostIP[3]&0xFF)) != 0;
break;
case CLASS_C:
valid = (hostIP[3]&0xFF) != 0;
break;
case INVALID:
default:
valid = false;
break;
}
return valid;
}
public IPClass getIPClass()
{
// Class A
// |0|-netid-|---------hostid---------|
// 7 bits 24 bits
//
// Class B
// |10|----netid-----|-----hostid-----|
// 14 bits 16 bits
//
// Class C
// |110|--------netid--------|-hostid-|
// 21 bits 8 bits
if ( (hostIP[0] & 0x80) == 0 )
{
return IPClass.CLASS_A;
}
else if ( (hostIP[0] & 0xC0) == 0x80 )
{
return IPClass.CLASS_B;
}
else if ( (hostIP[0] & 0xE0) == 0xC0 )
{
return IPClass.CLASS_C;
}
else
{
return IPClass.INVALID;
}
}
@Override
public String toString()
{
return AddressUtils.ip2string( hostIP );
}
}
| [
"ampernand@gmail.com"
] | ampernand@gmail.com |
93f1091b4202cb0a43bb1d76981ecc3e1a95955f | afb465dd17c6d052cfe14a64281be96825648914 | /07. 1. DB-Advanced-Hibernate-Code-First-Entity-Relations-Lab/src/main/java/shampoo/FiftyShades.java | 0fdf811e99a35fb20c90124424d8ea21f6958d2a | [
"MIT"
] | permissive | kostadinlambov/Databases-Frameworks-Hibernate-and-Spring-Data | 1f60ec5b8683d0d1f43501c3621424a816acd385 | e1a22e902f01601b324af870adfefabbe5179774 | refs/heads/master | 2020-03-14T21:24:03.650748 | 2018-10-25T00:41:01 | 2018-10-25T00:41:01 | 131,795,286 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 535 | java | package shampoo;
import label.BasicLabel;
import size.Size;
import javax.persistence.Entity;
import java.math.BigDecimal;
@Entity
public class FiftyShades extends BasicShampoo {
public static final String FIFTY_SHADES = "Fifty Shades";
//public static final BasicLabel FIFTY_SHADES_LABEL = new BasicLabel("It’s made of Strawberry and Nettle");
public static final BigDecimal PRICE = BigDecimal.valueOf(6.69);
public FiftyShades( BasicLabel label) {
super(FIFTY_SHADES, Size.SMALL, label, PRICE);
}
}
| [
"valchak@abv.bg"
] | valchak@abv.bg |
b0ae461cde85adc9450f6e8bc6d03fe727b4acca | 2633fb1280a23e747162d44ae7e8694401b4da54 | /VidyoPortal/src/com/vidyo/service/authentication/saml/SamlAuthMessageListener.java | 68c820e6170a5daa0e38b4d9bb81f1a293001396 | [] | no_license | rahitkumar/VidyoPortal | 2159cc515acd22471f484867805cd4a4105f209f | 60101525c0e2cb1a50c55cbb94deb7c44685f1ab | refs/heads/master | 2020-06-16T20:16:33.920559 | 2019-07-07T19:47:47 | 2019-07-07T19:47:47 | 195,687,237 | 4 | 3 | null | null | null | null | UTF-8 | Java | false | false | 4,909 | java | package com.vidyo.service.authentication.saml;
import java.lang.management.ManagementFactory;
import java.util.ArrayList;
import java.util.List;
import org.apache.activemq.command.ActiveMQObjectMessage;
import org.opensaml.saml2.metadata.EntityDescriptor;
import org.opensaml.saml2.metadata.provider.MetadataProvider;
import org.opensaml.saml2.metadata.provider.MetadataProviderException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.saml.metadata.MetadataManager;
import com.vidyo.bo.authentication.SamlAuthentication;
import com.vidyo.bo.authentication.SamlAuthenticationState;
import com.vidyo.bo.authentication.SamlAuthenticationStateChange;
import com.vidyo.service.exceptions.MetadataProviderCreationException;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
public class SamlAuthMessageListener implements MessageListener {
protected final Logger logger = LoggerFactory.getLogger(SamlAuthMessageListener.class.getName());
@Autowired
MetadataManager metadataManager;
private SamlAuthenticationService samlAuthenticationService;
public void setSamlAuthenticationService(SamlAuthenticationService samlAuthenticationService) {
this.samlAuthenticationService = samlAuthenticationService;
}
public void onMessage(Message message) {
try {
SamlAuthenticationStateChange m = (SamlAuthenticationStateChange)((ActiveMQObjectMessage) message).getObject();
logger.debug("Got message - {}", m.toString());
int tenantID = m.getTenantID();
SamlAuthentication samlAuthentication = m.getSamlAuthentication();
String oldSpEntityId = m.getOldSpEntityId();
if (m.getSamlAuthenticationState() == SamlAuthenticationState.ADD) {
try {
addMetadataProviders(tenantID, samlAuthentication);
} catch (Exception e) {
return;
}
} else {
List<MetadataProvider> providers = metadataManager.getProviders();
List<MetadataProvider> removingProviders = new ArrayList<MetadataProvider>();
EntityDescriptor spMetadataEntityDescriptor = null;
try {
spMetadataEntityDescriptor = samlAuthenticationService.generateServiceProviderMetadataAsEntityDescriptor(tenantID, samlAuthentication);
} catch (Exception e) {
if (logger.isErrorEnabled()) {
logger.error(e.getMessage());
}
return;
}
String spEntityID = spMetadataEntityDescriptor.getEntityID();
String idpEntityID = samlAuthenticationService.getEntityIdFromMetadataXml(samlAuthentication.getIdentityProviderMetadata());
// It is possible to have a few IDPs with the same entityID. SPs are unique.
boolean isIdpEntitySelectedToRemove = false;
for(MetadataProvider provider : providers) {
try {
if(provider.getEntityDescriptor(spEntityID) != null) {
removingProviders.add(provider);
}
if(oldSpEntityId != null && provider.getEntityDescriptor(oldSpEntityId) != null) {
removingProviders.add(provider);
}
if(provider.getEntityDescriptor(idpEntityID) != null && !isIdpEntitySelectedToRemove) {
removingProviders.add(provider);
isIdpEntitySelectedToRemove = true;
}
} catch (MetadataProviderException e) {
if (logger.isErrorEnabled()) {
logger.error(e.getMessage());
}
return;
}
}
for(MetadataProvider provider : removingProviders) {
try {
metadataManager.removeMetadataProvider(provider);
} catch (IllegalArgumentException e) {
if (logger.isErrorEnabled()) {
logger.error(e.getMessage());
}
return;
}
}
if (m.getSamlAuthenticationState() == SamlAuthenticationState.UPDATE) {
try {
addMetadataProviders(tenantID, samlAuthentication);
} catch (Exception e) {
return;
}
}
}
metadataManager.refreshMetadata();
logger.warn("Tomcat node : " + ManagementFactory.getRuntimeMXBean().getName() + " . SAML metadata is refreshed.");
} catch (JMSException e) {
if (logger.isErrorEnabled()) {
logger.error(e.getMessage());
}
}
}
private void addMetadataProviders(int tenantID, SamlAuthentication samlAuthentication)
throws MetadataProviderCreationException, MetadataProviderException{
List<MetadataProvider> createdProviders;
try {
createdProviders = samlAuthenticationService.createProvidersForSPandIPD(tenantID, samlAuthentication);
} catch (MetadataProviderCreationException e) {
if (logger.isErrorEnabled()) {
logger.error(e.getMessage());
}
throw e;
}
for(MetadataProvider provider : createdProviders) {
try {
metadataManager.addMetadataProvider(provider);
} catch (MetadataProviderException e) {
if (logger.isErrorEnabled()) {
logger.error(e.getMessage());
}
throw e;
}
}
}
}
| [
"rahitkumar@crap.com"
] | rahitkumar@crap.com |
813f8f2390675f7304c432d77a4d348fa163b45d | 53d677a55e4ece8883526738f1c9d00fa6560ff7 | /a/i/b/a/c/a/b/d$1.java | b0f0c9e2f3bec07312e0b19acf2dfd593f76b599 | [] | no_license | 0jinxing/wechat-apk-source | 544c2d79bfc10261eb36389c1edfdf553d8f312a | f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d | refs/heads/master | 2020-06-07T20:06:03.580028 | 2019-06-21T09:17:26 | 2019-06-21T09:17:26 | 193,069,132 | 9 | 4 | null | null | null | null | UTF-8 | Java | false | false | 575 | java | package a.i.b.a.c.a.b;
import a.f.a.b;
import a.f.b.k;
import a.i.b.a.c.a.c;
import a.i.b.a.c.b.y;
import com.tencent.matrix.trace.core.AppMethodBeat;
final class d$1 extends k
implements b<y, c>
{
public static final 1 BdB;
static
{
AppMethodBeat.i(119192);
BdB = new 1();
AppMethodBeat.o(119192);
}
d$1()
{
super(1);
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes4-dex2jar.jar
* Qualified Name: a.i.b.a.c.a.b.d.1
* JD-Core Version: 0.6.2
*/ | [
"172601673@qq.com"
] | 172601673@qq.com |
9ff3870e2ab4e5ab2579e721e46c6d652db9fa00 | 65676b4f2d3ef113be3984ee02817c771c59433e | /src/com/dongnao/workbench/common/util/ReflectUtil.java | a72c4a221ad711b14450c5bdd5f5182a96d63d50 | [] | no_license | dn-Maggie/yuandao | 4cdd6022afa52cf86d9bc689ff27ccdf6b4c097d | 3cc4e47dde5ca8718c03f0dcb6bb491c87460750 | refs/heads/master | 2021-05-09T00:56:09.061318 | 2018-02-06T07:34:32 | 2018-02-06T07:34:32 | 119,765,051 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,260 | java | package com.dongnao.workbench.common.util;
import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Collections;
import java.util.Map;
import com.dongnao.workbench.common.exceptions.DAOException;
import com.dongnao.workbench.common.exceptions.UnexpectedException;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
public class ReflectUtil {
protected static Map methods = Collections.synchronizedMap(new HashMap());
protected static Map fieldsCache = Collections
.synchronizedMap(new HashMap());
public static Object newInstance(Class type) {
try {
return Class.forName(type.getName()).newInstance();
} catch (Exception localException) {
throw new UnexpectedException(localException);
}
}
public static Object getValueByFieldName(Object entity, String fieldName)
throws IllegalArgumentException, IllegalAccessException,
InvocationTargetException, IntrospectionException,
SecurityException, NoSuchFieldException {
if (entity == null) {
return null;
}
PropertyDescriptor propertyDescriptor = new PropertyDescriptor(
fieldName, entity.getClass());
Method readMethod = propertyDescriptor.getReadMethod();
return readMethod.invoke(entity);
}
public static Object setModelPropertyValueToNull(Object model) {
Method[] arrayOfMethod = model.getClass().getMethods();
for (int i = 0; i < arrayOfMethod.length; i++) {
Method localMethod = arrayOfMethod[i];
try {
if (localMethod.getName().startsWith("set")) {
Object[] arrayOfObject = new Object[1];
localMethod.invoke(model, arrayOfObject);
}
} catch (Exception localException1) {
throw new UnexpectedException(
"setModelPropertyValueToNull error:", localException1);
}
}
return model;
}
public static String getPropertyType(String propName, Class mclass) {
Field localField = null;
String typeStr = null;
try {
localField = getPropertyField(mclass, propName);
} catch (NoSuchFieldException localNoSuchFieldException) {
throw new DAOException("No such field: " + propName,
localNoSuchFieldException);
}
typeStr = localField.getType().getName();
if (typeStr.equalsIgnoreCase("[B")) {
typeStr = "byte[]";
}
return typeStr;
}
public static Object getPropertyValue(String propName, Object model) {
try {
Method localMethod = getGetMethod(model.getClass(), propName);
return localMethod.invoke(model, null);
} catch (Exception localException) {
throw new UnexpectedException("getPropertyValue error:",
localException);
}
}
public static Class getPropertyClass(String propName, Object model) {
try {
Method localMethod = getGetMethod(model.getClass(), propName);
return localMethod.getReturnType();
} catch (Exception localException) {
throw new UnexpectedException("getPropertyValue error:",
localException);
}
}
public static Method getMethod(Class clazz, String methodName,
Class[] parmTypes) throws SecurityException, NoSuchMethodException {
Map localMap = (Map) methods.get(clazz.getName());
Method localMethod = null;
if (localMap == null) {
localMethod = clazz.getMethod(methodName, parmTypes);
localMap = Collections.synchronizedMap(new HashMap());
localMap.put(methodName, localMethod);
methods.put(clazz.getName(), localMap);
} else {
localMethod = (Method) localMap.get(methodName);
if (localMethod == null) {
localMethod = clazz.getMethod(methodName, parmTypes);
localMap.put(methodName, localMethod);
}
}
return localMethod;
}
public static Field getPropertyField(Class clazz, String fieldName)
throws SecurityException, NoSuchFieldException {
Map localMap = (Map) fieldsCache.get(clazz.getName());
Field localField = null;
if (localMap == null) {
localField = clazz.getDeclaredField(fieldName);
localMap = Collections.synchronizedMap(new HashMap());
localMap.put(fieldName, localField);
fieldsCache.put(clazz.getName(), localMap);
} else {
localField = (Field) localMap.get(fieldName);
if (localField == null) {
localField = clazz.getDeclaredField(fieldName);
localMap.put(fieldName, localField);
}
}
return localField;
}
public static Method getGetMethod(Class clazz, String fieldName)
throws Exception {
String str = "get" + fieldName.substring(0, 1).toUpperCase()
+ fieldName.substring(1);
return clazz.getMethod(str, null);
}
public static Method getSetMethod(Class clazz, String fieldName)
throws Exception {
String str = "set" + fieldName.substring(0, 1).toUpperCase()
+ fieldName.substring(1);
Class[] arrayOfClass = new Class[1];
arrayOfClass[0] = clazz.getDeclaredField(fieldName).getType();
return clazz.getMethod(str, arrayOfClass);
}
public static Object getPropertityValue(Object object, String name)
throws Exception {
if ((object == null) || (name == null)) {
return null;
}
String[] arrayOfString = name.split("\\.");
if (arrayOfString.length == 0) {
return null;
}
Object localObject = object;
for (int i = 0; i < arrayOfString.length; i++) {
Method localMethod = getGetMethod(localObject.getClass(),
arrayOfString[i]);
localObject = localMethod.invoke(localObject, null);
}
return localObject;
}
public static void invoke(Object value, Object model, String property) {
try {
Method localMethod = getSetMethod(model.getClass(), property);
Object[] arrayOfObject = { value };
localMethod.invoke(model, arrayOfObject);
} catch (Exception localException1) {
throw new UnexpectedException("invoke error:", localException1);
}
}
public static boolean isImplementType(Class type1, Class type2) {
if ((type1 == null) || (type2 == null))
return false;
try {
Object localObject = type1.newInstance();
return type2.isInstance(localObject);
} catch (Exception localException1) {
}
return false;
}
}
| [
"maggie@dongnaoedu.com"
] | maggie@dongnaoedu.com |
e31bbb51de313df176ce2c4fe08149e6b8af6a6e | d7c5121237c705b5847e374974b39f47fae13e10 | /airspan.netspan/src/main/java/Netspan/NBI_17_0/Status/CellBarringModes.java | fdc28644cf997eed42310096199dfa4e719694ef | [] | no_license | AirspanNetworks/SWITModules | 8ae768e0b864fa57dcb17168d015f6585d4455aa | 7089a4b6456621a3abd601cc4592d4b52a948b57 | refs/heads/master | 2022-11-24T11:20:29.041478 | 2020-08-09T07:20:03 | 2020-08-09T07:20:03 | 184,545,627 | 1 | 0 | null | 2022-11-16T12:35:12 | 2019-05-02T08:21:55 | Java | UTF-8 | Java | false | false | 1,251 | java |
package Netspan.NBI_17_0.Status;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for CellBarringModes.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="CellBarringModes">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="Barred"/>
* <enumeration value="NotBarred"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "CellBarringModes")
@XmlEnum
public enum CellBarringModes {
@XmlEnumValue("Barred")
BARRED("Barred"),
@XmlEnumValue("NotBarred")
NOT_BARRED("NotBarred");
private final String value;
CellBarringModes(String v) {
value = v;
}
public String value() {
return value;
}
public static CellBarringModes fromValue(String v) {
for (CellBarringModes c: CellBarringModes.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
| [
"dshalom@airspan.com"
] | dshalom@airspan.com |
22d2679301aa483b019c0ac2fda83f5ec05cfd89 | dda320efc69bb0ca77d6766bb7ead192dfefd382 | /GameTest/src/fr/cactuscata/game/entity/Entity.java | b7b7b9f408b54312dff1fb5791c9562f84a744ce | [] | no_license | CactusCata/GameTest | d808f4c78e51193358d1eb770887092d243df654 | ecf451c29a6080133e7d699a74b5a4c2a511f1ba | refs/heads/master | 2020-05-04T17:17:47.099110 | 2019-04-03T14:20:14 | 2019-04-03T14:20:14 | 179,305,708 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 804 | java | package fr.cactuscata.game.entity;
import fr.cactuscata.game.entity.stats.Statistics;
import fr.cactuscata.game.inventory.Inventory;
import fr.cactuscata.game.utils.registers.say.Namable;
import fr.cactuscata.game.world.location.Location;
public abstract class Entity implements Namable {
private final EntityType entityType;
private final Inventory inventory = new Inventory(this);
private final Statistics stats;
public Entity(EntityType entityType, Location location, Statistics stats) {
this.entityType = entityType;
this.stats = stats;
}
public abstract String getName();
public Inventory getInventory() {
return this.inventory;
}
public EntityType getEntityType() {
return entityType;
}
public Statistics getStats() {
return stats;
}
}
| [
"adam.chareyre.1999@gmail.com"
] | adam.chareyre.1999@gmail.com |
81b426ac14be9b426e04e053a156c66f0cdd2e33 | a4178e5042f43f94344789794d1926c8bdba51c0 | /iwxxm3Converter/src/schemabindings/schemabindings31/aero/aixm/schema/_5_1/CodeRunwaySectionType.java | 276c43383ced94b0dba9277b8b80323e145955c8 | [
"Apache-2.0"
] | permissive | moryakovdv/iwxxmConverter | c6fb73bc49765c4aeb7ee0153cca04e3e3846ab0 | 5c2b57e57c3038a9968b026c55e381eef0f34dad | refs/heads/master | 2023-07-20T06:58:00.317736 | 2023-07-05T10:10:10 | 2023-07-05T10:10:10 | 128,777,786 | 11 | 7 | Apache-2.0 | 2023-07-05T10:03:12 | 2018-04-09T13:38:59 | Java | UTF-8 | Java | false | false | 2,604 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.05.06 at 11:11:25 PM MSK
//
package schemabindings31.aero.aixm.schema._5_1;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
/**
* <p>Java class for CodeRunwaySectionType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="CodeRunwaySectionType">
* <simpleContent>
* <extension base="<http://www.aixm.aero/schema/5.1.1>CodeRunwaySectionBaseType">
* <attribute name="nilReason" type="{http://www.opengis.net/gml/3.2}NilReasonEnumeration" />
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CodeRunwaySectionType", propOrder = {
"value"
})
public class CodeRunwaySectionType {
@XmlValue
protected String value;
@XmlAttribute(name = "nilReason")
protected String nilReason;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
public boolean isSetValue() {
return (this.value!= null);
}
/**
* Gets the value of the nilReason property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNilReason() {
return nilReason;
}
/**
* Sets the value of the nilReason property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNilReason(String value) {
this.nilReason = value;
}
public boolean isSetNilReason() {
return (this.nilReason!= null);
}
}
| [
"moryakovdv@gmail.com"
] | moryakovdv@gmail.com |
4e10f0be33fe80716b29589dd1c548af643b8b19 | 69011b4a6233db48e56db40bc8a140f0dd721d62 | /src/com/jshx/xxdjbczjqdglb/dao/InventoryAssociateDao.java | 2028facf77fe0b55696aba5d1038e2e10d12ccd8 | [] | no_license | gechenrun/scysuper | bc5397e5220ee42dae5012a0efd23397c8c5cda0 | e706d287700ff11d289c16f118ce7e47f7f9b154 | refs/heads/master | 2020-03-23T19:06:43.185061 | 2018-06-10T07:51:18 | 2018-06-10T07:51:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,222 | java | package com.jshx.xxdjbczjqdglb.dao;
import java.util.List;
import java.util.Map;
import com.jshx.core.base.dao.BaseDao;
import com.jshx.core.base.vo.Pagination;
import com.jshx.xxdjbczjqdglb.entity.InventoryAssociate;
public interface InventoryAssociateDao extends BaseDao
{
/**
* 分页查询
* @param page 分页信息
* @param paraMap 查询条件信息
* @return 分页信息
*/
public Pagination findByPage(Pagination page, Map<String, Object> paraMap);
/**
* 查询所有记录
* @param page 分页信息
* @param paraMap 查询条件信息
* @return 分页信息
*/
public List<InventoryAssociate> findInventoryAssociate(Map<String, Object> paraMap);
/**
* 根据主键ID查询信息
* @param id 主键ID
* @return 主键ID对应的信息
*/
public InventoryAssociate getById(String id);
/**
* 保存信息
* @param model 信息
*/
public void save(InventoryAssociate model);
/**
* 修改信息
* @param model 信息
*/
public void update(InventoryAssociate model);
/**
* 物理删除信息
* @param ids 主键ID
*/
public void delete(String id);
/**
* 逻辑删除信息
* @param ids 主键ID
*/
public void deleteWithFlag(String id);
}
| [
"shellchange@sina.com"
] | shellchange@sina.com |
02d881f162c4dc73ba5b6c73887b8db296c5632b | bd2139703c556050403c10857bde66f688cd9ee6 | /jmc/102/webrev.00/core/org.openjdk.jmc.flightrecorder.rules.jdk/src/main/java/org/openjdk/jmc/flightrecorder/rules/jdk/general/PasswordsInEnvironmentRule.java | 02104bea535b8ceed9050fe13e368b62cd950c2a | [] | no_license | isabella232/cr-archive | d03427e6fbc708403dd5882d36371e1b660ec1ac | 8a3c9ddcfacb32d1a65d7ca084921478362ec2d1 | refs/heads/master | 2023-02-01T17:33:44.383410 | 2020-12-17T13:47:48 | 2020-12-17T13:47:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,091 | java | /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The contents of this file are subject to the terms of either the Universal Permissive License
* v 1.0 as shown at http://oss.oracle.com/licenses/upl
*
* or the following license:
*
* Redistribution and use in source and binary forms, with or without modification, are permitted
* provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions
* and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other materials provided with
* the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to
* endorse or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.openjdk.jmc.flightrecorder.rules.jdk.general;
import java.text.MessageFormat;
import java.util.Collection;
import java.util.Collections;
import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;
import java.util.concurrent.RunnableFuture;
import org.openjdk.jmc.common.item.IItemCollection;
import org.openjdk.jmc.common.util.IPreferenceValueProvider;
import org.openjdk.jmc.common.util.TypedPreference;
import org.openjdk.jmc.flightrecorder.jdk.JdkAttributes;
import org.openjdk.jmc.flightrecorder.jdk.JdkTypeIDs;
import org.openjdk.jmc.flightrecorder.rules.IRule;
import org.openjdk.jmc.flightrecorder.rules.Result;
import org.openjdk.jmc.flightrecorder.rules.jdk.messages.internal.Messages;
import org.openjdk.jmc.flightrecorder.rules.util.JfrRuleTopics;
import org.openjdk.jmc.flightrecorder.rules.util.RulesToolkit;
import org.openjdk.jmc.flightrecorder.rules.util.RulesToolkit.EventAvailability;
import org.owasp.encoder.Encode;
public class PasswordsInEnvironmentRule implements IRule {
private static final String PWD_RESULT_ID = "PasswordsInEnvironment"; //$NON-NLS-1$
private Result getResult(IItemCollection items, IPreferenceValueProvider valueProvider) {
EventAvailability eventAvailability = RulesToolkit.getEventAvailability(items, JdkTypeIDs.ENVIRONMENT_VARIABLE);
if (eventAvailability != EventAvailability.AVAILABLE) {
return RulesToolkit.getEventAvailabilityResult(this, items, eventAvailability,
JdkTypeIDs.ENVIRONMENT_VARIABLE);
}
// FIXME: Should extract set of variable names instead of joined string
String pwds = RulesToolkit.findMatches(JdkTypeIDs.ENVIRONMENT_VARIABLE, items, JdkAttributes.ENVIRONMENT_KEY,
PasswordsInArgumentsRule.PASSWORD_MATCH_STRING, true);
if (pwds != null && pwds.length() > 0) {
String[] envs = pwds.split(", "); //$NON-NLS-1$
StringBuffer passwords = new StringBuffer("<ul>"); //$NON-NLS-1$
for (String env : envs) {
passwords.append("<li>"); //$NON-NLS-1$
passwords.append(Encode.forHtml(env));
passwords.append("</li>"); //$NON-NLS-1$
}
passwords.append("</ul>"); //$NON-NLS-1$
pwds = passwords.toString();
String message = MessageFormat
.format(Messages.getString(Messages.PasswordsInEnvironmentRuleFactory_TEXT_INFO_LONG), pwds);
return new Result(this, 100, Messages.getString(Messages.PasswordsInEnvironmentRuleFactory_TEXT_INFO),
message);
}
return new Result(this, 0, Messages.getString(Messages.PasswordsInEnvironmentRuleFactory_TEXT_OK));
}
@Override
public RunnableFuture<Result> evaluate(final IItemCollection items, final IPreferenceValueProvider valueProvider) {
FutureTask<Result> evaluationTask = new FutureTask<>(new Callable<Result>() {
@Override
public Result call() throws Exception {
return getResult(items, valueProvider);
}
});
return evaluationTask;
}
@Override
public Collection<TypedPreference<?>> getConfigurationAttributes() {
return Collections.emptyList();
}
@Override
public String getId() {
return PWD_RESULT_ID;
}
@Override
public String getName() {
return Messages.getString(Messages.PasswordsInEnvironmentRuleFactory_RULE_NAME);
}
@Override
public String getTopic() {
return JfrRuleTopics.ENVIRONMENT_VARIABLES;
}
}
| [
"robin.westberg@oracle.com"
] | robin.westberg@oracle.com |
0f359d86487978dca129a7a5485c2a5cfff03c58 | 129f58086770fc74c171e9c1edfd63b4257210f3 | /src/testcases/CWE80_XSS/CWE80_XSS__Servlet_getParameter_Servlet_14.java | 7d258de42e96fbf7e7c2a39a06247df1992e74c3 | [] | no_license | glopezGitHub/Android23 | 1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba | 6215d0684c4fbdc7217ccfbedfccfca69824cc5e | refs/heads/master | 2023-03-07T15:14:59.447795 | 2023-02-06T13:59:49 | 2023-02-06T13:59:49 | 6,856,387 | 0 | 3 | null | 2023-02-06T18:38:17 | 2012-11-25T22:04:23 | Java | UTF-8 | Java | false | false | 3,710 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE80_XSS__Servlet_getParameter_Servlet_14.java
Label Definition File: CWE80_XSS__Servlet.label.xml
Template File: sources-sink-14.tmpl.java
*/
/*
* @description
* CWE: 80 Cross Site Scripting (XSS)
* BadSource: getParameter_Servlet Read data from a querystring using getParameter()
* GoodSource: A hardcoded string
* BadSink: Display of data in web page without any encoding or validation
* Flow Variant: 14 Control flow: if(IO.static_five==5) and if(IO.static_five!=5)
*
* */
package testcases.CWE80_XSS;
import testcasesupport.*;
import javax.servlet.http.*;
public class CWE80_XSS__Servlet_getParameter_Servlet_14 extends AbstractTestCaseServlet
{
/* uses badsource and badsink */
public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
if(IO.static_five==5)
{
/* POTENTIAL FLAW: Read data from a querystring using getParameter */
data = request.getParameter("name");
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
/* FIX: Use a hardcoded string */
data = "foo";
}
if (data != null)
{
/* POTENTIAL FLAW: Display of data in web page without any encoding or validation */
response.getWriter().println("<br>bad(): data = " + data);
}
}
/* goodG2B1() - use goodsource and badsink by changing IO.static_five==5 to IO.static_five!=5 */
private void goodG2B1(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
if(IO.static_five!=5)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
/* POTENTIAL FLAW: Read data from a querystring using getParameter */
data = request.getParameter("name");
}
else {
/* FIX: Use a hardcoded string */
data = "foo";
}
if (data != null)
{
/* POTENTIAL FLAW: Display of data in web page without any encoding or validation */
response.getWriter().println("<br>bad(): data = " + data);
}
}
/* goodG2B2() - use goodsource and badsink by reversing statements in if */
private void goodG2B2(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
if(IO.static_five==5)
{
/* FIX: Use a hardcoded string */
data = "foo";
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
/* POTENTIAL FLAW: Read data from a querystring using getParameter */
data = request.getParameter("name");
}
if (data != null)
{
/* POTENTIAL FLAW: Display of data in web page without any encoding or validation */
response.getWriter().println("<br>bad(): data = " + data);
}
}
public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
goodG2B1(request, response);
goodG2B2(request, response);
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
| [
"guillermo.pando@gmail.com"
] | guillermo.pando@gmail.com |
1959b5706dad605d1e94e319dc310cb02d5888d9 | c2d8181a8e634979da48dc934b773788f09ffafb | /storyteller/output/mazdasalestool/GrepCarOnLightcarAction.java | f28d034d99822e5a536a7808ec391ba11926e8fa | [] | no_license | toukubo/storyteller | ccb8281cdc17b87758e2607252d2d3c877ffe40c | 6128b8d275efbf18fd26d617c8503a6e922c602d | refs/heads/master | 2021-05-03T16:30:14.533638 | 2016-04-20T12:52:46 | 2016-04-20T12:52:46 | 9,352,300 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,489 | java | package net.mazdasalestool.web;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.mazdasalestool.model.*;
import net.mazdasalestool.model.crud.*;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.web.context.support.WebApplicationContextUtils;
import net.enclosing.util.HibernateSession;
public class GrepCarOnLightcarAction extends Action{
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest req,
HttpServletResponse res) throws Exception{
Session session = new HibernateSession().currentSession(this
.getServlet().getServletContext());
Criteria criteria = session.createCriteria(Car.class);
if(req.getParameter("q") !=null && !req.getParameter("q").equals("")){
criteria.add(Restrictions.like("lightcar","%" + new String(req.getParameter("q").getBytes("8859_1"), "UTF-8") + "%"));
}
session.flush();
req.setAttribute("intrausers", criteria.list());
req.setAttribute("from","GrepCarOnLightcar");
return mapping.findForward("success");
}
} | [
"toukubo@gmail.com"
] | toukubo@gmail.com |
ced18dbc341aa9c19e61c9f95308038300bd51e8 | 12354bb7c45b7da537e252f317f5b8bd39dcfee9 | /tnt4j-streams-core/src/main/java/com/jkoolcloud/tnt4j/streams/preparsers/package-info.java | c6e8d05a6915aa0c524b2bb6b011abaf7367ccba | [
"Apache-2.0"
] | permissive | etsangsplk/tnt4j-streams | 80438efd065df356405003a99feb664b0d275d2b | 60e9bdf3c1451477afcf8c170219e1f413b3c4f6 | refs/heads/master | 2022-12-18T04:06:07.531536 | 2020-09-24T16:56:36 | 2020-09-24T16:56:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 887 | java | /*
* Copyright 2014-2018 JKOOL, LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Contains the API (classes and interfaces) for the jKool LLC TNT4J-Streams pre-parsers. Pre-parsers are data
* converters used to convert RAW activity data to data format parser can handle.
*
* @author akausinis
* @version 1.0
*/
package com.jkoolcloud.tnt4j.streams.preparsers; | [
"andrius.kausinis@singleton-labs.lt"
] | andrius.kausinis@singleton-labs.lt |
475e9e98f3795bb5a066cc4e50c50cfa40f4f90b | 0b4844d550c8e77cd93940e4a1d8b06d0fbeabf7 | /JavaSource/dream/consult/program/table/dto/MaTableColListDTO.java | 08733401db959e2c7da0e24ac7712556a1960bf6 | [] | no_license | eMainTec-DREAM/DREAM | bbf928b5c50dd416e1d45db3722f6c9e35d8973c | 05e3ea85f9adb6ad6cbe02f4af44d941400a1620 | refs/heads/master | 2020-12-22T20:44:44.387788 | 2020-01-29T06:47:47 | 2020-01-29T06:47:47 | 236,912,749 | 0 | 0 | null | null | null | null | UHC | Java | false | false | 510 | java | package dream.consult.program.table.dto;
import common.bean.BaseDTO;
/**
* 데이터 테이블 - 분류 DTO
* @author kim21017
* @version $Id: MaTableColListDTO.java,v 1.1 2015/12/04 09:10:45 kim21017 Exp $
* @since 1.0
*/
public class MaTableColListDTO extends BaseDTO
{
/** 데이터 테이블유형상세ID */
private String tableDId = "";
public String getTableDId() {
return tableDId;
}
public void setTableDId(String tableDId) {
this.tableDId = tableDId;
}
} | [
"HN4741@10.31.0.185"
] | HN4741@10.31.0.185 |
2aa99fc50a573f22eaed9068ea8c5f72b1d19fde | ae9efe033a18c3d4a0915bceda7be2b3b00ae571 | /jambeth/jambeth-persistence-pg/src/main/java/com/koch/ambeth/persistence/pg/PostgresSequencePrimaryKeyProvider.java | a5cbe68d7e19ec2c59f77164965a320a4eaa6f08 | [
"Apache-2.0"
] | permissive | Dennis-Koch/ambeth | 0902d321ccd15f6dc62ebb5e245e18187b913165 | 8552b210b8b37d3d8f66bdac2e094bf23c8b5fda | refs/heads/develop | 2022-11-10T00:40:00.744551 | 2017-10-27T05:35:20 | 2017-10-27T05:35:20 | 88,013,592 | 0 | 4 | Apache-2.0 | 2022-09-22T18:02:18 | 2017-04-12T05:36:00 | Java | UTF-8 | Java | false | false | 2,444 | java | package com.koch.ambeth.persistence.pg;
/*-
* #%L
* jambeth-persistence-pg
* %%
* Copyright (C) 2017 Koch Softwaredevelopment
* %%
* 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.
* #L%
*/
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.List;
import com.koch.ambeth.ioc.annotation.Autowired;
import com.koch.ambeth.persistence.IConnectionDialect;
import com.koch.ambeth.persistence.api.ITableMetaData;
import com.koch.ambeth.persistence.jdbc.JdbcUtil;
import com.koch.ambeth.persistence.orm.XmlDatabaseMapper;
import com.koch.ambeth.persistence.sql.AbstractCachingPrimaryKeyProvider;
import com.koch.ambeth.util.exception.RuntimeExceptionUtil;
public class PostgresSequencePrimaryKeyProvider extends AbstractCachingPrimaryKeyProvider {
@Autowired
protected Connection connection;
@Autowired
protected IConnectionDialect connectionDialect;
@Override
protected void acquireIdsIntern(ITableMetaData table, int count, List<Object> targetIdList) {
String[] schemaAndName = XmlDatabaseMapper.splitSchemaAndName(table.getSequenceName());
if (schemaAndName[0] == null) {
// if no schema is explicitly specified in the sequence we look in the schema of the table
schemaAndName[0] = XmlDatabaseMapper
.splitSchemaAndName(table.getFullqualifiedEscapedName())[0];
}
PreparedStatement pstm = null;
ResultSet rs = null;
try {
pstm = connection.prepareStatement("SELECT nextval('"
+ connectionDialect.escapeSchemaAndSymbolName(schemaAndName[0], schemaAndName[1])
+ "') FROM generate_series(1,?)");
pstm.setInt(1, count);
rs = pstm.executeQuery();
while (rs.next()) {
Object id = rs.getObject(1); // We have only 1 column in the select so it is ok to retrieve
// it by the unique id
targetIdList.add(id);
}
}
catch (Exception e) {
throw RuntimeExceptionUtil.mask(e);
}
finally {
JdbcUtil.close(pstm, rs);
}
}
}
| [
"dennis.koch@bruker.com"
] | dennis.koch@bruker.com |
fad1b3e091e02fec10147914fb085786b79f98db | c47e4ac0caac894d0c0113ef35684fd092af66fa | /src/main/java/net/codingme/offer/Lab3_FindRepeatNumber.java | 5c06de89852637aef03ffe9a6e5fd66313729c58 | [] | no_license | andyyuano/lab-notes | 83280b35e76ddfa0f31ec477db6024972d41415f | 376a1630ea5fa1d65d823166145e15459988f9e9 | refs/heads/master | 2022-12-12T20:14:43.228479 | 2020-09-09T00:04:28 | 2020-09-09T00:04:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,303 | java | package net.codingme.offer;
/**
* <p>
* 剑指office第三题
* <p>
* 在一个长度为 n 的数组里的所有数字都在 0 到 n-1 的范围内。数组中某些数字是重复的,
* <p>
* 但不知道有几个数字是重复的,也不知道每个数字重复几次。请找出数组中任意一个重复的数字。
*
* @Author niujinpeng
* @Date 2019/3/8 17:53
*/
public class Lab3_FindRepeatNumber {
public static void main(String[] args) {
int[] arr = {2, 3, 1, 0, 2, 5};
solution(arr);
}
/**
* 把数字放到值对应的坐标上,如果坐标上已经存在相同值。说明存在重复
*
* @param arr
*/
public static void solution(int[] arr) {
if (arr == null || arr.length < 1) {
return;
}
for (int i = 0; i < arr.length; i++) {
// 当前值
while (arr[i] != i) {
int value = arr[i];
if (arr[value] == value) {
System.out.println("发现重复值" + value);
return;
} else {
// swap
int temp = arr[value];
arr[value] = value;
arr[i] = temp;
}
}
}
}
}
| [
"niumoo@126.com"
] | niumoo@126.com |
967d287158761b382b6e692fcbb26fd1827dffdb | 2ca93846ab8f638a7d8cd80f91566ee3632cf186 | /Variant Programs/3/3-10/seng2200/BusybodiedRepublic.java | 018fb4716db0dd1bb1e1511ade5510364c31c4a9 | [
"MIT"
] | permissive | hjc851/SourceCodePlagiarismDetectionDataset | 729483c3b823c455ffa947fc18d6177b8a78a21f | f67bc79576a8df85e8a7b4f5d012346e3a76db37 | refs/heads/master | 2020-07-05T10:48:29.980984 | 2019-08-15T23:51:55 | 2019-08-15T23:51:55 | 202,626,196 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 303 | java | package seng2200;
public class BusybodiedRepublic extends Law {
private static final String synX724String = "Busy State";
BusybodiedRepublic(double dus) {
super(synX724String, dus);
}
static final int bottomCompelled = -613828899;
BusybodiedRepublic() {
super("Busy State");
}
}
| [
"hayden.cheers@me.com"
] | hayden.cheers@me.com |
c94f6d41e00cf8c9290c0986a9f1b283a2ba7bc8 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/27/27_523ef2c54bcef8a40fc0026a2459f57da09eb818/WatirUtils/27_523ef2c54bcef8a40fc0026a2459f57da09eb818_WatirUtils_t.java | b0fb48e711f3a3bef6e99dce8f1ca7cdb6463e89 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 6,361 | java | /*
* This software is licensed under the terms of the GNU GENERAL PUBLIC LICENSE
* Version 2, which can be found at http://www.gnu.org/copyleft/gpl.html
*/
package org.cubictest.exporters.watir.utils;
import static org.cubictest.model.ActionType.BLUR;
import static org.cubictest.model.ActionType.CHECK;
import static org.cubictest.model.ActionType.CLEAR_ALL_TEXT;
import static org.cubictest.model.ActionType.CLICK;
import static org.cubictest.model.ActionType.DBLCLICK;
import static org.cubictest.model.ActionType.DRAG_END;
import static org.cubictest.model.ActionType.DRAG_START;
import static org.cubictest.model.ActionType.ENTER_PARAMETER_TEXT;
import static org.cubictest.model.ActionType.ENTER_TEXT;
import static org.cubictest.model.ActionType.FOCUS;
import static org.cubictest.model.ActionType.KEY_PRESSED;
import static org.cubictest.model.ActionType.MOUSE_OUT;
import static org.cubictest.model.ActionType.MOUSE_OVER;
import static org.cubictest.model.ActionType.NO_ACTION;
import static org.cubictest.model.ActionType.UNCHECK;
import static org.cubictest.model.IdentifierType.ID;
import static org.cubictest.model.IdentifierType.LABEL;
import static org.cubictest.model.IdentifierType.NAME;
import static org.cubictest.model.IdentifierType.VALUE;
import org.cubictest.export.exceptions.ExporterException;
import org.cubictest.exporters.watir.holders.RubyBuffer;
import org.cubictest.exporters.watir.holders.StepList;
import org.cubictest.model.ActionType;
import org.cubictest.model.Identifier;
import org.cubictest.model.IdentifierType;
import org.cubictest.model.Image;
import org.cubictest.model.Link;
import org.cubictest.model.PageElement;
import org.cubictest.model.Text;
import org.cubictest.model.UserInteraction;
import org.cubictest.model.context.AbstractContext;
import org.cubictest.model.context.Frame;
import org.cubictest.model.formElement.Button;
import org.cubictest.model.formElement.Checkbox;
import org.cubictest.model.formElement.Option;
import org.cubictest.model.formElement.Password;
import org.cubictest.model.formElement.RadioButton;
import org.cubictest.model.formElement.Select;
import org.cubictest.model.formElement.TextArea;
import org.cubictest.model.formElement.TextField;
/**
* Util class for watir export.
*
* @author chr_schwarz
*/
public class WatirUtils {
public static String getIdType(PageElement pe) {
IdentifierType idType = pe.getMostSignificantIdentifier().getType();
if (idType.equals(ID))
return ":id";
if (idType.equals(NAME))
return ":name";
if (idType.equals(VALUE))
return ":value";
if (idType.equals(LABEL))
if (pe instanceof Link)
return ":text";
else
return ":value";
else
throw new ExporterException("Identifier type not recognized.");
}
public static String getElementType(PageElement pe) {
if (pe instanceof TextField || pe instanceof Password || pe instanceof TextArea)
return "text_field";
if (pe instanceof Checkbox)
return "checkbox";
if (pe instanceof RadioButton)
return "radio";
if (pe instanceof Button)
return "button";
if (pe instanceof Select)
return "select_list";
if (pe instanceof Option)
return "option";
if (pe instanceof Link)
return "link";
//Added by Genesis Campos
if (pe instanceof Frame)
return "frame";
//End;
if (pe instanceof AbstractContext)
return "div";
if (pe instanceof Image)
return "image";
if (pe instanceof Text)
throw new ExporterException("Text is not a supported element type for identification.");
throw new ExporterException("Unknown element type");
}
/**
* Get the Watir interaction substring.
*/
public static String getInteraction(UserInteraction userInteraction) {
ActionType a = userInteraction.getActionType();
String textualInput = userInteraction.getTextualInput();
if (a.equals(CLICK))
return "click";
if (a.equals(CHECK))
return "set";
if (a.equals(UNCHECK))
return "clear";
if (a.equals(ENTER_TEXT))
return "set(\"" + textualInput +"\")";
if (a.equals(ENTER_PARAMETER_TEXT))
return "set(\"" + textualInput +"\")";
if (a.equals(KEY_PRESSED))
return "fireEvent(\"onkeypress\")";
if (a.equals(CLEAR_ALL_TEXT))
return "clear";
if (a.equals(MOUSE_OVER))
return "fireEvent(\"onmouseover\")";
if (a.equals(MOUSE_OUT))
return "fireEvent(\"onmouseout\")";
if (a.equals(DBLCLICK))
return "fireEvent(\"ondblclick\")";
if (a.equals(FOCUS))
return "fireEvent(\"onfocus\")";
if (a.equals(BLUR))
return "fireEvent(\"onblur\")";
if (a.equals(DRAG_START))
throw new ExporterException(a.getText() + " is not a supported action type");
if (a.equals(DRAG_END))
throw new ExporterException(a.getText() + " is not a supported action type");
if (a.equals(NO_ACTION))
throw new ExporterException(a.getText() + " is not a supported action type");
throw new ExporterException("Unknown ActionType");
}
/**
* Gets the element ID that the label is for and stores it in ruby variable "labelTargetId".
*/
public static String getLabelTargetId(PageElement pe) {
String label = pe.getIdentifier(IdentifierType.LABEL).getValue();
RubyBuffer buff = new RubyBuffer();
buff.add("# getting element associated with label '" + label + "'", 3);
buff.add("labelTargetId = nil", 3);
buff.add("ie.labels.each do |label|", 3);
buff.add("if (label.innerText() == \"" + label + "\")", 4);
buff.add("labelTargetId = label.for()", 5);
buff.add("end", 4);
buff.add("end", 3);
buff.add("if (labelTargetId == nil)", 3);
buff.add("raise " + StepList.TEST_STEP_FAILED, 4);
buff.add("end", 3);
return buff.toString();
}
public static boolean shouldGetLabelTargetId(PageElement pe) {
//Link, Text, Button and Option has label accessible in Watir directly,
//so getLabelTarget ID is not necessary for these elements
return pe.getMostSignificantIdentifier().getType().equals(LABEL) && !(pe instanceof Link) && !(pe instanceof Text) && !(pe instanceof Button) && !(pe instanceof Option);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
b64d77686bd870d3f94a2ce8d7ce839fe0344a2b | 07490456008c59d78e549932164cbb4892512c23 | /nsjp-persistencia/src/main/java/mx/gob/segob/nsjp/dao/chat/impl/OfUserDAOImpl.java | a436d512dcfd70b2ce702f754c80c735a0d7d5e8 | [] | no_license | RichichiDomotics/poder-judicial | 80d713177aaa846c812a3822df53cd14b9e50871 | a288862a3e50cfe6b943d5b353ccce5ed6e88e46 | refs/heads/master | 2016-09-06T21:52:39.734925 | 2015-03-28T06:02:59 | 2015-03-28T06:02:59 | 33,019,991 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 413 | java | /**
*
*/
package mx.gob.segob.nsjp.dao.chat.impl;
import mx.gob.segob.nsjp.dao.base.impl.GenericDaoHibernateImpl;
import mx.gob.segob.nsjp.dao.chat.OfUserDAO;
import mx.gob.segob.nsjp.model.OfUser;
import org.springframework.stereotype.Repository;
/**
* @author IgnacioFO
*
*/
@Repository("ofUserDAO")
public class OfUserDAOImpl extends GenericDaoHibernateImpl<OfUser, String> implements OfUserDAO{
}
| [
"larryconther@gmail.com"
] | larryconther@gmail.com |
2c13366cfce3b82f8cd9f00943a1563a57649547 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/16/16_3c44d2923f6fd4dd964aefcd83c0548fc03fcc82/ClojureNaturePropertyTest/16_3c44d2923f6fd4dd964aefcd83c0548fc03fcc82_ClojureNaturePropertyTest_t.java | 9509a0c03c093214f0c777bad3318a37fe94e11f | [] | 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,289 | java | package ccw.nature;
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.ui.part.FileEditorInput;
import ccw.CCWPlugin;
import ccw.ClojureCore;
public class ClojureNaturePropertyTest extends PropertyTester {
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
assert "hasClojureNature".equals(property);
if (receiver instanceof IResource)
return hasClojureNature((IResource) receiver);
else if (receiver instanceof FileEditorInput) {
FileEditorInput fei = (FileEditorInput) receiver;
return hasClojureNature(fei.getFile());
} else {
return false;
}
}
public static boolean hasClojureNature(IResource resource) {
try {
IProject project = resource.getProject();
return project.hasNature(ClojureCore.NATURE_ID);
} catch (CoreException e) {
CCWPlugin.logError("error while evaluating if resource " + resource +
" belongs to a project which has nature " + ClojureCore.NATURE_ID, e);
return false;
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
a85842c250d585319cf000cd460ea13f6dfc11cd | 37141b4d005f3272a9f1be522a37a8f8a62f7a66 | /src/main/java/com/gome/gmp/ws/person/PersonService.java | 7dbf815e26ca972638a069bce4dc874a0d514de8 | [] | no_license | pologood/gmp | 7ca3f153047fbdfad81f6cb59e27dfa3b4356f02 | 70c61a51f977bad458239c846615840f8409049d | refs/heads/master | 2021-01-19T16:01:26.361643 | 2016-12-05T08:09:56 | 2016-12-05T08:09:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,278 | java | package com.gome.gmp.ws.person;
import java.text.SimpleDateFormat;
import javax.annotation.Resource;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.gome.framework.AppContext;
import com.gome.framework.Env;
import com.gome.gmp.business.GomeGmpWSHRBS;
import com.gome.gmp.common.constant.Constants;
import com.gome.gmp.ws.StartFileService;
import com.gome.gmp.ws.person.pi.SIIHR053REQ;
import com.gome.gmp.ws.person.pi.ZHRPAMD;
import com.gome.gmp.ws.person.pi.ZHRPAMDResponse;
import com.gome.gmp.ws.person.pi.ZHRPAMDResponse.TOUT;
/**
* 人员同步业务
*
* @author wubin
*/
@Service("personService")
public class PersonService extends StartFileService {
private static Logger logger = LoggerFactory.getLogger(PersonService.class);
// @Resource(name = "personDao")
// ImportToDB<ZHRPAMD2> importDao;
@Resource(name = "gomeGmpWSHRBS")
private GomeGmpWSHRBS gomeGmpWSHRBS;
private String url;
private String userName;
private String password;
private volatile boolean started;
private final Object startLock = new Object();
private SIIHR053REQ service;
/**
* 同步数据
*/
@Override
@Transactional
public void takeData() {
// 检查配置,检查锁
checkInit();
// 获取开始结束时间
String startDate = getStartDate();
String endDate = getEndDate();
// 接口参数组装
ZHRPAMD zhrpamd = new ZHRPAMD();
zhrpamd.setJYID("1");
zhrpamd.setBEGDA(startDate);
zhrpamd.setENDDA(endDate);
com.gome.gmp.ws.person.pi.ZHRPAMD.TOUT zTOUT = new com.gome.gmp.ws.person.pi.ZHRPAMD.TOUT();
zTOUT.getItem();
zhrpamd.setTOUT(zTOUT);
try {
// 调用接口
ZHRPAMDResponse resp = service.siIHR053REQ(zhrpamd);
TOUT tout = resp.getTOUT();
// 导入库
int ret = gomeGmpWSHRBS.importPersonData(tout.getItem());
// int ret = importDao.importData(tout.getItem());
// 日志
logger.info("batch import person,accept size:" + tout.getItem().size() + ",ret:" + ret + "," + new SimpleDateFormat("yyyy-MM-dd HH:mm:sss").format(new java.util.Date()));
// 设置下次开始时间为结束时间
setEndDate(endDate);
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
}
/**
* 检查初始化配置
*/
private void checkInit() {
if (!started) {
synchronized (startLock) {
initData();
}
started = true;
}
}
/**
* 初始化配置
*/
void initData() {
Env env = AppContext.getEnv();
this.url = env.getProperty(Constants.WS_SAP_HR_PERSON_URL);
this.userName = env.getProperty(Constants.WS_SAP_HR_USERNAME);
this.password = env.getProperty(Constants.WS_SAP_HR_PASSWORD);
JaxWsProxyFactoryBean bean = new JaxWsProxyFactoryBean();
bean.setServiceClass(SIIHR053REQ.class);
bean.setAddress(url);
bean.setUsername(this.userName);
bean.setPassword(this.password);
this.service = (SIIHR053REQ) bean.create();
}
/**
* 获取结束时间
*/
private String getEndDate() {
return new SimpleDateFormat("yyyy-MM-dd").format(new java.util.Date());
}
/**
* 获取接口类型
*/
@Override
protected String getInterfaceType() {
return "person";
}
} | [
"hemes1314@163.com"
] | hemes1314@163.com |
9322764162f451a6ea22dfc481c3096c33f88e7d | 2ad30a31dfc7ceaeb8c5b1612f63192e9d6b11ff | /src/gen/java/com/sudaotech/user/dao/AdminUserEntity.java | db5135d5f633309280974861129da84823fd5dba | [] | no_license | HDXin/huolijuzhen | 1c0060923561bdd291d8b7537508dc08a6ea8521 | 96347b28c0bedecdff44c50ac6539e8e5248714c | refs/heads/master | 2021-01-19T23:40:56.522157 | 2017-04-21T17:39:56 | 2017-04-21T17:39:56 | 89,001,965 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,085 | java | package com.sudaotech.user.dao;
import com.sudaotech.core.dao.entity.BaseEntity;
import com.sudaotech.core.enums.PlatformSource;
import com.sudaotech.core.enums.Status;
import com.sudaotech.user.enums.UserStatus;
import java.util.Date;
public class AdminUserEntity extends BaseEntity {
private Long userId;
private Long companyId;
private Long providerId;
private Long userType;
private PlatformSource platformSource;
private Long platformSourceId;
private Integer userAttribute;
private String username;
private String password;
private Integer passwordStatus;
private String nickname;
private String photo;
private String name;
private Integer gender;
private Date birthday;
private String cellphone;
private String tel;
private String email;
private Integer hidden;
private UserStatus userStatus;
private Integer displayOrder;
private Integer version;
private Status status;
private Long createBy;
private Date createTime;
private Long updateBy;
private Date updateTime;
private Date lastUpdate;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public Long getProviderId() {
return providerId;
}
public void setProviderId(Long providerId) {
this.providerId = providerId;
}
public Long getUserType() {
return userType;
}
public void setUserType(Long userType) {
this.userType = userType;
}
public PlatformSource getPlatformSource() {
return platformSource;
}
public void setPlatformSource(PlatformSource platformSource) {
this.platformSource = platformSource;
}
public Long getPlatformSourceId() {
return platformSourceId;
}
public void setPlatformSourceId(Long platformSourceId) {
this.platformSourceId = platformSourceId;
}
public Integer getUserAttribute() {
return userAttribute;
}
public void setUserAttribute(Integer userAttribute) {
this.userAttribute = userAttribute;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username == null ? null : username.trim();
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password == null ? null : password.trim();
}
public Integer getPasswordStatus() {
return passwordStatus;
}
public void setPasswordStatus(Integer passwordStatus) {
this.passwordStatus = passwordStatus;
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname == null ? null : nickname.trim();
}
public String getPhoto() {
return photo;
}
public void setPhoto(String photo) {
this.photo = photo == null ? null : photo.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public Integer getGender() {
return gender;
}
public void setGender(Integer gender) {
this.gender = gender;
}
public Date getBirthday() {
return birthday;
}
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
public String getCellphone() {
return cellphone;
}
public void setCellphone(String cellphone) {
this.cellphone = cellphone == null ? null : cellphone.trim();
}
public String getTel() {
return tel;
}
public void setTel(String tel) {
this.tel = tel == null ? null : tel.trim();
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email == null ? null : email.trim();
}
public Integer getHidden() {
return hidden;
}
public void setHidden(Integer hidden) {
this.hidden = hidden;
}
public UserStatus getUserStatus() {
return userStatus;
}
public void setUserStatus(UserStatus userStatus) {
this.userStatus = userStatus;
}
public Integer getDisplayOrder() {
return displayOrder;
}
public void setDisplayOrder(Integer displayOrder) {
this.displayOrder = displayOrder;
}
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
public Long getCreateBy() {
return createBy;
}
public void setCreateBy(Long createBy) {
this.createBy = createBy;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Long getUpdateBy() {
return updateBy;
}
public void setUpdateBy(Long updateBy) {
this.updateBy = updateBy;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Date getLastUpdate() {
return lastUpdate;
}
public void setLastUpdate(Date lastUpdate) {
this.lastUpdate = lastUpdate;
}
} | [
"735513870@qq.com"
] | 735513870@qq.com |
310f029fdd35d64e6edb4d7de78b1663a919efa2 | fa1408365e2e3f372aa61e7d1e5ea5afcd652199 | /src/testcases/CWE190_Integer_Overflow/s03/CWE190_Integer_Overflow__int_max_square_05.java | 442c8366211c85d9b7f586e78c1659cba0433278 | [] | no_license | bqcuong/Juliet-Test-Case | 31e9c89c27bf54a07b7ba547eddd029287b2e191 | e770f1c3969be76fdba5d7760e036f9ba060957d | refs/heads/master | 2020-07-17T14:51:49.610703 | 2019-09-03T16:22:58 | 2019-09-03T16:22:58 | 206,039,578 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 6,680 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__int_max_square_05.java
Label Definition File: CWE190_Integer_Overflow__int.label.xml
Template File: sources-sinks-05.tmpl.java
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: max Set data to the maximum value for int
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: square
* GoodSink: Ensure there will not be an overflow before squaring data
* BadSink : Square data, which can lead to overflow
* Flow Variant: 05 Control flow: if(privateTrue) and if(privateFalse)
*
* */
package testcases.CWE190_Integer_Overflow.s03;
import testcasesupport.*;
import javax.servlet.http.*;
public class CWE190_Integer_Overflow__int_max_square_05 extends AbstractTestCase
{
/* The two variables below are not defined as "final", but are never
* assigned any other value, so a tool should be able to identify that
* reads of these will always return their initialized values.
*/
private boolean privateTrue = true;
private boolean privateFalse = false;
public void bad() throws Throwable
{
int data;
if (privateTrue)
{
/* POTENTIAL FLAW: Use the maximum value for this type */
data = Integer.MAX_VALUE;
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = 0;
}
if (privateTrue)
{
/* POTENTIAL FLAW: if (data*data) > Integer.MAX_VALUE, this will overflow */
int result = (int)(data * data);
IO.writeLine("result: " + result);
}
}
/* goodG2B1() - use goodsource and badsink by changing first privateTrue to privateFalse */
private void goodG2B1() throws Throwable
{
int data;
if (privateFalse)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = 0;
}
else
{
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
}
if (privateTrue)
{
/* POTENTIAL FLAW: if (data*data) > Integer.MAX_VALUE, this will overflow */
int result = (int)(data * data);
IO.writeLine("result: " + result);
}
}
/* goodG2B2() - use goodsource and badsink by reversing statements in first if */
private void goodG2B2() throws Throwable
{
int data;
if (privateTrue)
{
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = 0;
}
if (privateTrue)
{
/* POTENTIAL FLAW: if (data*data) > Integer.MAX_VALUE, this will overflow */
int result = (int)(data * data);
IO.writeLine("result: " + result);
}
}
/* goodB2G1() - use badsource and goodsink by changing second privateTrue to privateFalse */
private void goodB2G1() throws Throwable
{
int data;
if (privateTrue)
{
/* POTENTIAL FLAW: Use the maximum value for this type */
data = Integer.MAX_VALUE;
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = 0;
}
if (privateFalse)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
IO.writeLine("Benign, fixed string");
}
else
{
/* FIX: Add a check to prevent an overflow from occurring */
/* NOTE: Math.abs of the minimum int or long will return that same value, so we must check for it */
if ((data != Integer.MIN_VALUE) && (data != Long.MIN_VALUE) && (Math.abs(data) <= (long)Math.sqrt(Integer.MAX_VALUE)))
{
int result = (int)(data * data);
IO.writeLine("result: " + result);
}
else
{
IO.writeLine("data value is too large to perform squaring.");
}
}
}
/* goodB2G2() - use badsource and goodsink by reversing statements in second if */
private void goodB2G2() throws Throwable
{
int data;
if (privateTrue)
{
/* POTENTIAL FLAW: Use the maximum value for this type */
data = Integer.MAX_VALUE;
}
else
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run
* but ensure data is inititialized before the Sink to avoid compiler errors */
data = 0;
}
if (privateTrue)
{
/* FIX: Add a check to prevent an overflow from occurring */
/* NOTE: Math.abs of the minimum int or long will return that same value, so we must check for it */
if ((data != Integer.MIN_VALUE) && (data != Long.MIN_VALUE) && (Math.abs(data) <= (long)Math.sqrt(Integer.MAX_VALUE)))
{
int result = (int)(data * data);
IO.writeLine("result: " + result);
}
else
{
IO.writeLine("data value is too large to perform squaring.");
}
}
}
public void good() throws Throwable
{
goodG2B1();
goodG2B2();
goodB2G1();
goodB2G2();
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
| [
"bqcuong2212@gmail.com"
] | bqcuong2212@gmail.com |
d64378474621a36c3a8ba06014ac4d226829f6ed | b59a518d8bf03443668552f5b24a2950e96816a7 | /src/base/oauth2-server/src/main/java/com/xukaiqiang/oauth2/server/util/RPNs.java | eb9e8f1349db6f8626ae5aa0541c2ade928322dc | [] | no_license | jjmnbv/guitar | 94ecbfca238580e6916ad6bd6c6d0ebc4407f6ae | 36a668c814356e8343c6f0a451bec645ec41c112 | refs/heads/master | 2021-06-23T10:33:43.654118 | 2017-07-21T09:09:48 | 2017-07-21T09:09:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 537 | java | package com.xukaiqiang.oauth2.server.util;
import org.apache.oltu.oauth2.common.OAuth;
/**
* Request Parameter Names
*
*/
public abstract class RPNs {
public static final String SESSIONID = "oauthSessionId";
public static final String CODEUSERNAMEKEY = "codeusername";
public static final String STATE = OAuth.OAUTH_STATE;
public static final String REDIRECT_URI = OAuth.OAUTH_REDIRECT_URI;
public static final String RESPONSE_TYPE = OAuth.OAUTH_RESPONSE_TYPE;
public static final String CLIENT_ID = OAuth.OAUTH_CLIENT_ID;
}
| [
"994028591@qq.com"
] | 994028591@qq.com |
acc1adf941481dd3714f85081bd228f378647401 | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /large-multiproject/project21/src/test/java/org/gradle/test/performance21_5/Test21_429.java | b83ad25816c8c6e8895c8f0cfe89c9efe4650cfc | [] | 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.performance21_5;
import static org.junit.Assert.*;
public class Test21_429 {
private final Production21_429 production = new Production21_429("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
9be69a797dddc1587809ed66db05cf11b11d16a4 | 2122d24de66635b64ec2b46a7c3f6f664297edc4 | /spring/spring-security/spring-boot-spring-security-oauth2-sso/sso-server/src/main/java/cn/merryyou/sso/server/OAuth2AuthorizationConfig.java | 3a5e6bcb668e09814aa5ea2bd358697f7f0cf02d | [] | no_license | yiminyangguang520/Java-Learning | 8cfecc1b226ca905c4ee791300e9b025db40cc6a | 87ec6c09228f8ad3d154c96bd2a9e65c80fc4b25 | refs/heads/master | 2023-01-10T09:56:29.568765 | 2022-08-29T05:56:27 | 2022-08-29T05:56:27 | 92,575,777 | 5 | 1 | null | 2023-01-05T05:21:02 | 2017-05-27T06:16:40 | Java | UTF-8 | Java | false | false | 3,829 | java | //package cn.merryyou.sso.server;
//
//import cn.merryyou.sso.config.Jackson2SerializationStrategy;
//import javax.sql.DataSource;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.core.io.Resource;
//import org.springframework.data.redis.connection.RedisConnectionFactory;
//import org.springframework.jdbc.datasource.init.DataSourceInitializer;
//import org.springframework.jdbc.datasource.init.DatabasePopulator;
//import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
//import org.springframework.security.authentication.AuthenticationManager;
//import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer;
//import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;
//import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
//import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer;
//import org.springframework.security.oauth2.provider.approval.ApprovalStore;
//import org.springframework.security.oauth2.provider.approval.JdbcApprovalStore;
//import org.springframework.security.oauth2.provider.code.AuthorizationCodeServices;
//import org.springframework.security.oauth2.provider.code.JdbcAuthorizationCodeServices;
//import org.springframework.security.oauth2.provider.token.TokenStore;
//import org.springframework.security.oauth2.provider.token.store.JdbcTokenStore;
//import org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore;
//
//@Configuration
//@EnableAuthorizationServer
//public class OAuth2AuthorizationConfig extends AuthorizationServerConfigurerAdapter {
//
// @Autowired
// private DataSource dataSource;
//
// @Autowired
// private RedisConnectionFactory redisConnectionFactory;
//
// @Value("classpath:schema.sql")
// private Resource schemaScript;
//
// @Value("classpath:data.sql")
// private Resource dataScript;
//
// @Bean
// public ApprovalStore approvalStore() {
// return new JdbcApprovalStore(dataSource);
// }
//
// @Bean
// protected AuthorizationCodeServices authorizationCodeServices() {
// return new JdbcAuthorizationCodeServices(dataSource);
// }
//
//// @Bean
//// public TokenStore tokenStore() {
//// return new JdbcTokenStore(dataSource);
//// }
//
// @Override
// public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
// clients.jdbc(dataSource);
// }
//
// @Override
// public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
// endpoints.approvalStore(approvalStore())
// .authorizationCodeServices(authorizationCodeServices())
// .tokenStore(tokenStore());
// }
//
// @Bean
// public DataSourceInitializer dataSourceInitializer(final DataSource dataSource) {
// final DataSourceInitializer initializer = new DataSourceInitializer();
// initializer.setDataSource(dataSource);
// initializer.setDatabasePopulator(databasePopulator());
// return initializer;
// }
//
// private DatabasePopulator databasePopulator() {
// final ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
// populator.addScript(schemaScript);
// populator.addScript(dataScript);
// return populator;
// }
//
// @Bean
// public TokenStore tokenStore() {
// RedisTokenStore redisTokenStore = new RedisTokenStore(redisConnectionFactory);
// redisTokenStore.setSerializationStrategy(new Jackson2SerializationStrategy());
// return redisTokenStore;
// }
//} | [
"litz-a@glodon.com"
] | litz-a@glodon.com |
7dc72d92abadba41fbfd53d47e3951bda95b9975 | ecbb7d84aa1999b0fe26e10cd1549c24691cbab4 | /app/src/main/java/jh/zkj/com/yf/Bean/ForgetCRMPassWordBean.java | fec1b78c1bb5cf3548eba062116d1d419c832392 | [] | no_license | woshilinyujie/yf | 1a4a4783b3dbac3884caf84d29ec28a7ad47278e | e0a6dedf08dd443bf3184c12e2ef8dc483a24865 | refs/heads/master | 2020-03-29T01:10:14.646330 | 2018-12-07T17:21:12 | 2018-12-07T17:21:12 | 149,374,069 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 479 | java | package jh.zkj.com.yf.Bean;
/**
* Created by linyujie on 18/12/1.
*/
public class ForgetCRMPassWordBean {
/**
* msg : 短信验证码为空
* code : 20006
*/
private String msg;
private int code;
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
}
| [
"418265421@qq.com"
] | 418265421@qq.com |
147099d8ce37174b992efd2041490aaca60b3c45 | 6f614d5d97f8161d23eb3dca84ef45f43a3334f0 | /src/main/java/com/sd/farmework/service/impl/ProImgServiceImpl.java | 293bf2fce8f36b895eae984029fffa5d517ecadc | [] | no_license | songxowe/nfcrm | 38101b9ec8d3725ed3b080d5f4fed6ac1c9b54ec | 2b266630d1bdeabf8c0717469fce86f432a0f0c2 | refs/heads/master | 2021-06-26T18:04:25.651914 | 2017-09-16T00:52:03 | 2017-09-16T00:52:03 | 103,719,378 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 630 | java | package com.sd.farmework.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import com.sd.farmework.mapper.ProImgMapper;
import com.sd.farmework.pojo.ProjectImg;
import com.sd.farmework.service.ProImgService;
public class ProImgServiceImpl extends BaseInfoServiceImpl implements ProImgService{
@Autowired
private ProImgMapper baseMapper;
public ProImgMapper getBaseMapper() {
return baseMapper;
}
public void setBaseMapper(ProImgMapper baseMapper) {
this.baseMapper = baseMapper;
}
@Override
public void deletebyimgid(ProjectImg proimg) {
this.baseMapper.deletebyimgid(proimg);
}
}
| [
"songxowe@hotmail.com"
] | songxowe@hotmail.com |
2b33ed98a9bacac9fc75c795b82cda739f6b6522 | 3e355a798304584431e5e5a1f1bc141e16c330fc | /AL-Game/src/com/aionemu/gameserver/model/templates/item/ResultedItem.java | ff8a58672157f86f349c2828493035dd6bebd2c5 | [] | no_license | webdes27/Aion-Lightning-4.6-SRC | db0b2b547addc368b7d5e3af6c95051be1df8d69 | 8899ce60aae266b849a19c3f93f47be9485c70ab | refs/heads/master | 2021-09-14T19:16:29.368197 | 2018-02-27T16:05:28 | 2018-02-27T16:05:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,394 | java | /**
* This file is part of Aion-Lightning <aion-lightning.org>.
*
* Aion-Lightning 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.
*
* Aion-Lightning 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 Aion-Lightning.
* If not, see <http://www.gnu.org/licenses/>.
*/
package com.aionemu.gameserver.model.templates.item;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import org.slf4j.LoggerFactory;
import com.aionemu.commons.utils.Rnd;
import com.aionemu.gameserver.model.PlayerClass;
import com.aionemu.gameserver.model.Race;
/**
* @author antness
*/
@XmlType(name = "ResultedItem")
public class ResultedItem {
@XmlAttribute(name = "id")
public int itemId;
@XmlAttribute(name = "count")
public int count;
@XmlAttribute(name = "rnd_min")
public int rndMin;
@XmlAttribute(name = "rnd_max")
public int rndMax;
@XmlAttribute(name = "race")
public Race race = Race.PC_ALL;
@XmlAttribute(name = "player_class")
public PlayerClass playerClass = PlayerClass.ALL;
public int getItemId() {
return itemId;
}
public int getCount() {
return count;
}
public int getRndMin() {
return rndMin;
}
public int getRndMax() {
return rndMax;
}
public final Race getRace() {
return race;
}
public PlayerClass getPlayerClass() {
return playerClass;
}
public final int getResultCount() {
if (count == 0 && rndMin == 0 && rndMax == 0) {
return 1;
} else if (rndMin > 0 || rndMax > 0) {
if (rndMax < rndMin) {
LoggerFactory.getLogger(ResultedItem.class).warn("Wronte rnd result item definition {} {}", rndMin, rndMax);
return 1;
} else {
return Rnd.get(rndMin, rndMax);
}
} else {
return count;
}
}
}
| [
"michelgorter@outlook.com"
] | michelgorter@outlook.com |
b115f97ab31e1bb5f6a9ebe949d4f66b384c8334 | 54c1dcb9a6fb9e257c6ebe7745d5008d29b0d6b6 | /app/src/main/java/kotlin/collections/ArraysKt___ArraysKt$withIndex$4.java | 1207262875b6bfe99cc0ce73d03af6292a6857cf | [] | no_license | rcoolboy/guilvN | 3817397da465c34fcee82c0ca8c39f7292bcc7e1 | c779a8e2e5fd458d62503dc1344aa2185101f0f0 | refs/heads/master | 2023-05-31T10:04:41.992499 | 2021-07-07T09:58:05 | 2021-07-07T09:58:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,052 | java | package kotlin.collections;
import com.p118pd.sdk.AbstractC9218oooo0O;
import com.p118pd.sdk.C7542o0o00000;
import com.p118pd.sdk.O00O0000;
import kotlin.Metadata;
import kotlin.jvm.internal.Lambda;
import org.jetbrains.annotations.NotNull;
@Metadata(mo43193bv = {1, 0, 3}, mo43194d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, mo43195d2 = {"<anonymous>", "Lkotlin/collections/IntIterator;", "invoke"}, mo43196k = 3, mo43197mv = {1, 1, 13})
public final class ArraysKt___ArraysKt$withIndex$4 extends Lambda implements O00O0000<AbstractC9218oooo0O> {
public final /* synthetic */ int[] $this_withIndex;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public ArraysKt___ArraysKt$withIndex$4(int[] iArr) {
super(0);
this.$this_withIndex = iArr;
}
@Override // com.p118pd.sdk.O00O0000
@NotNull
public final AbstractC9218oooo0O invoke() {
return C7542o0o00000.OooO00o(this.$this_withIndex);
}
}
| [
"593746220@qq.com"
] | 593746220@qq.com |
6ae7dcfbb259d664ba6ac3236604a4e751121d60 | dc7e818604634049acfa4373a04b8ad2a676b845 | /design-pattern/src/main/java/com/vilin/iterator/College.java | 117894dafd1b64d0479d7b93e730c2c795eaad49 | [] | no_license | guangyongluo/DesignPattern | 47611c3e8196e783824cb4fc2030f81920450f40 | 3b16fcd5f4176f585df6a6e3f493dd2dcd8954c5 | refs/heads/master | 2022-07-18T01:01:03.273309 | 2021-02-05T01:54:49 | 2021-02-05T01:54:49 | 123,889,610 | 1 | 3 | null | 2022-06-21T04:14:14 | 2018-03-05T08:37:32 | Java | UTF-8 | Java | false | false | 258 | java | package com.vilin.iterator;
import java.util.Iterator;
public interface College {
public String getName();
//增加系的方法
public void addDepartment(String name, String desc);
//返回迭代器的方法
public Iterator createIterator();
}
| [
"llooww@mail.ustc.edu.cn"
] | llooww@mail.ustc.edu.cn |
c034bb2c8627e0f27f8e56132c90504ab3143542 | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /single-large-project/src/test/java/org/gradle/test/performancenull_461/Testnull_46046.java | 8049a04c2970c5ff64dd51ccf4c809739af5f928 | [] | 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 | 308 | java | package org.gradle.test.performancenull_461;
import static org.junit.Assert.*;
public class Testnull_46046 {
private final Productionnull_46046 production = new Productionnull_46046("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
851b2f7de5b3d450190003be2efbd263132df193 | 6c1c18f95d0bfe3e300c775ecacd296cb0ec176e | /timepicklib/build/generated/source/buildConfig/debug/com/jzxiang/pickerview/BuildConfig.java | 4d98a1d4fd7d97a43aecba76503b1f4a10fab96b | [] | no_license | winnxiegang/save | a7ea6a3dcee7a9ebda8c6ad89957ae0e4d3c430d | 16ad3a98e8b6ab5d17acacce322dfc5e51ab3330 | refs/heads/master | 2020-03-13T04:27:26.650719 | 2018-04-26T01:18:59 | 2018-04-26T01:18:59 | 130,963,368 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 451 | java | /**
* Automatically generated file. DO NOT MODIFY
*/
package com.jzxiang.pickerview;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID = "com.jzxiang.pickerview";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 1;
public static final String VERSION_NAME = "1.0";
}
| [
"1272108979@qq.com"
] | 1272108979@qq.com |
f201fb132d5091f7ee41aee315909312f8571662 | 0f9066d1f50e6618ea6c09a0f66a428c0941b6ec | /plexus-containers/plexus-container-default/src/main/java/org/codehaus/plexus/lifecycle/LifecycleHandler.java | 3ff959f32251c564129e0357674059db70bf3fd5 | [] | no_license | WeilerWebServices/Sonatype | 96f5d9de8c36f58d431c4d130a0dffa8402087e9 | 4b434bced3010ba8589afc92ecd18494a6dd3f8a | refs/heads/master | 2023-01-24T18:36:09.979624 | 2020-12-01T04:09:54 | 2020-12-01T04:09:54 | 317,318,083 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,046 | java | package org.codehaus.plexus.lifecycle;
/*
* Copyright 2001-2006 Codehaus Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.codehaus.plexus.classworlds.realm.ClassRealm;
import org.codehaus.plexus.component.manager.ComponentManager;
import org.codehaus.plexus.lifecycle.phase.Phase;
import org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecutionException;
public interface LifecycleHandler
{
String getId();
void addBeginSegment( Phase phase );
void addEndSegment( Phase phase );
/**
* @deprecated
*/
void start( Object component, ComponentManager manager )
throws PhaseExecutionException;
void start( Object component, ComponentManager manager, ClassRealm realm )
throws PhaseExecutionException;
/**
* @deprecated
*/
void end( Object component, ComponentManager manager )
throws PhaseExecutionException;
/**
*
* @param component
* @param manager
* @param componentContextRealm the realm used to create the component, which may not be the component's realm; this
* component could have requirements that were satisfied using components from this realm. It could be
* used to lookup the same manager components that were used to start the component.
* @throws PhaseExecutionException
*/
void end( Object component, ComponentManager manager, ClassRealm componentContextRealm )
throws PhaseExecutionException;
void initialize();
}
| [
"nateweiler84@gmail.com"
] | nateweiler84@gmail.com |
789367a50e7297c201a5f68fcaf5b719e5573ab3 | a2e7cb326db778b904d2c1d96c7d1eabef43c223 | /easybatch-core/src/test/java/org/easybatch/core/job/JobMetricsTest.java | 420bbbee49485f0fa94491d3fe88a97552633f24 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | raulgomis/easy-batch | ce9174bce2e5d60997c29576c3141a9854952a79 | 66f35966683f7cf2c54ce7c3dd3efa4db102241e | refs/heads/master | 2023-08-03T12:36:40.145003 | 2019-06-23T00:37:30 | 2019-06-23T00:37:30 | 96,012,885 | 0 | 0 | MIT | 2023-07-22T03:25:42 | 2017-07-02T09:08:42 | Java | UTF-8 | Java | false | false | 4,328 | java | /**
* The MIT License
*
* Copyright (c) 2019, Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.easybatch.core.job;
import org.junit.Before;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Test class for {@link JobMetrics}
*
* @author verdi8 (https://github.com/verdi8)
*/
public class JobMetricsTest {
private JobMetrics jobMetrics;
@Before
public void setUp() throws Exception {
jobMetrics = new JobMetrics();
}
@Test
public void testFilterCount() {
assertThat(jobMetrics.getFilterCount()).isEqualTo(0);
jobMetrics.incrementFilterCount();
jobMetrics.incrementFilterCount();
assertThat(jobMetrics.getFilterCount()).isEqualTo(2);
jobMetrics.incrementFilterCount(5);
jobMetrics.incrementFilterCount(3);
assertThat(jobMetrics.getFilterCount()).isEqualTo(10);
}
@Test
public void testErrorCount() {
assertThat(jobMetrics.getErrorCount()).isEqualTo(0);
jobMetrics.incrementErrorCount();
jobMetrics.incrementErrorCount();
jobMetrics.incrementErrorCount();
assertThat(jobMetrics.getErrorCount()).isEqualTo(3);
jobMetrics.incrementErrorCount(7);
jobMetrics.incrementErrorCount(5);
assertThat(jobMetrics.getErrorCount()).isEqualTo(15);
}
@Test
public void testReadCount() {
assertThat(jobMetrics.getReadCount()).isEqualTo(0);
jobMetrics.incrementReadCount(3);
jobMetrics.incrementReadCount(4);
assertThat(jobMetrics.getReadCount()).isEqualTo(7);
jobMetrics.incrementReadCount();
jobMetrics.incrementReadCount();
jobMetrics.incrementReadCount();
assertThat(jobMetrics.getReadCount()).isEqualTo(10);
}
@Test
public void testWriteCount() {
assertThat(jobMetrics.getWriteCount()).isEqualTo(0);
jobMetrics.incrementWriteCount(11);
jobMetrics.incrementWriteCount(9);
assertThat(jobMetrics.getWriteCount()).isEqualTo(20);
}
@Test
public void testStartEndTimesAndDuration() {
assertThat(jobMetrics.getStartTime()).isEqualTo(0);
assertThat(jobMetrics.getEndTime()).isEqualTo(0);
assertThat(jobMetrics.getDuration()).isEqualTo(0);
long expectedStartTime = System.currentTimeMillis();
long expectedEndTime = expectedStartTime + 12543;
jobMetrics.setStartTime(expectedStartTime);
jobMetrics.setEndTime(expectedEndTime);
assertThat(jobMetrics.getStartTime()).isEqualTo(expectedStartTime);
assertThat(jobMetrics.getEndTime()).isEqualTo(expectedEndTime);
assertThat(jobMetrics.getDuration()).isEqualTo(12543);
}
@Test
public void testCustomMetrics() {
assertThat(jobMetrics.getCustomMetrics().isEmpty()).isTrue();
jobMetrics.addMetric("metric1", 987654321L);
jobMetrics.addMetric("metric2", "aValue");
assertThat(jobMetrics.getCustomMetrics().size()).isEqualTo(2);
assertThat(jobMetrics.getCustomMetrics().get("metric1")).isEqualTo(987654321L);
assertThat(jobMetrics.getCustomMetrics().get("metric2")).isEqualTo("aValue");
}
} | [
"mahmoud.benhassine@icloud.com"
] | mahmoud.benhassine@icloud.com |
6c5140b2f78583b9165cb7cc95f4517ca528829e | b65591bf66731d194baac9f8d4a8a38221988eb0 | /ECJ/src/ec/app/momentjs/LISTS__LISTMONTHS_2.java | bb0c1bfe8d847b7c2563862149bd6217bfd72b03 | [] | no_license | ffarzat/ECJ | 05d976e1b63b5bfe8f70f3fd02b8684491cf0b62 | 3f9bf57ab24fde0a06192045f1dc0b016c70479e | refs/heads/master | 2021-01-22T06:59:19.398373 | 2015-05-21T21:08:47 | 2015-05-21T21:08:47 | 25,131,638 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,665 | java | package ec.app.momentjs;
import java.io.File;
import java.io.IOException;
import java.util.Scanner;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.Function;
import org.mozilla.javascript.Scriptable;
import org.mozilla.javascript.ScriptableObject;
import ec.*;
import ec.gp.*;
import ec.util.*;
import ec.EvolutionState;
import ec.Problem;
import ec.gp.ADFStack;
import ec.gp.GPData;
import ec.gp.GPIndividual;
public class LISTS__LISTMONTHS_2 extends GPNode {
public String toString() { return "LISTS__LISTMONTHS_2"; }
public void eval(final EvolutionState state, final int thread, final GPData input, final ADFStack stack, final GPIndividual individual, final Problem problem)
{
//TODO: parametros...
executarFuncao();
}
public void executarFuncao() {
Context context = Context.enter();
context.setOptimizationLevel(-1); // disable bytecode generation because of large code
try {
Scriptable scope = context.initStandardObjects();
loadResource(context, scope, "env-fix.js");
loadResource(context, scope, "env.rhino.1.2.js");
loadResource(context, scope, "angular.min.js");
loadResource(context, scope, "angular-app.js");
Scriptable testService = (Scriptable)context.evaluateString(scope, "injector.get('testService')", "test", 1, null);
Function helloWorldFunc = (Function)ScriptableObject.getProperty(testService, "helloWorld");
Object result = helloWorldFunc.call(context, scope, testService, new Object[]{});
System.out.println(result);
}
catch(Exception ex)
{
}
finally
{
Context.exit();
}
}
private static void loadResource(Context context, Scriptable scope, String resourceName) throws IOException {
String resourceUrl = "src/main/resources/" + resourceName;
String resourceContents = readFile(resourceUrl);
context.evaluateString(scope, resourceContents, resourceName, 1, null);
}
private static String readFile(String pathname) throws IOException {
File file = new File(pathname);
StringBuilder fileContents = new StringBuilder((int)file.length());
Scanner scanner = new Scanner(file);
String lineSeparator = System.getProperty("line.separator");
try {
while(scanner.hasNextLine()) {
fileContents.append(scanner.nextLine() + lineSeparator);
}
return fileContents.toString();
} finally {
scanner.close();
}
}
}
| [
"fabiofarzat@gmail.com"
] | fabiofarzat@gmail.com |
a3575e477d228f6b7a258226be37362ea4160d24 | c9b8db6ceff0be3420542d0067854dea1a1e7b12 | /web/KoreanAir/src/main/java/com/ke/css/cimp/fwb/fwb13/Rule_Grp_Authorisation.java | 7a11f08888bed578e189f402f1f3547bed1ddee5 | [
"Apache-2.0"
] | permissive | ganzijo/portfolio | 12ae1531bd0f4d554c1fcfa7d68953d1c79cdf9a | a31834b23308be7b3a992451ab8140bef5a61728 | refs/heads/master | 2021-04-15T09:25:07.189213 | 2018-03-22T12:11:00 | 2018-03-22T12:11:00 | 126,326,291 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,558 | java | package com.ke.css.cimp.fwb.fwb13;
/* -----------------------------------------------------------------------------
* Rule_Grp_Authorisation.java
* -----------------------------------------------------------------------------
*
* Producer : com.parse2.aparse.Parser 2.5
* Produced : Tue Mar 06 10:35:29 KST 2018
*
* -----------------------------------------------------------------------------
*/
import java.util.ArrayList;
final public class Rule_Grp_Authorisation extends Rule
{
public Rule_Grp_Authorisation(String spelling, ArrayList<Rule> rules)
{
super(spelling, rules);
}
public Object accept(Visitor visitor)
{
return visitor.visit(this);
}
public static Rule_Grp_Authorisation parse(ParserContext context)
{
context.push("Grp_Authorisation");
boolean parsed = true;
int s0 = context.index;
ParserAlternative a0 = new ParserAlternative(s0);
ArrayList<ParserAlternative> as1 = new ArrayList<ParserAlternative>();
parsed = false;
{
int s1 = context.index;
ParserAlternative a1 = new ParserAlternative(s1);
parsed = true;
if (parsed)
{
boolean f1 = true;
int c1 = 0;
for (int i1 = 0; i1 < 1 && f1; i1++)
{
int g1 = context.index;
ArrayList<ParserAlternative> as2 = new ArrayList<ParserAlternative>();
parsed = false;
{
int s2 = context.index;
ParserAlternative a2 = new ParserAlternative(s2);
parsed = true;
if (parsed)
{
boolean f2 = true;
int c2 = 0;
for (int i2 = 0; i2 < 1 && f2; i2++)
{
Rule rule = Rule_Sep_Slant.parse(context);
if ((f2 = rule != null))
{
a2.add(rule, context.index);
c2++;
}
}
parsed = c2 == 1;
}
if (parsed)
{
boolean f2 = true;
int c2 = 0;
for (int i2 = 0; i2 < 1 && f2; i2++)
{
Rule rule = Rule_ISSUE_SIGNATURE.parse(context);
if ((f2 = rule != null))
{
a2.add(rule, context.index);
c2++;
}
}
parsed = c2 == 1;
}
if (parsed)
{
as2.add(a2);
}
context.index = s2;
}
ParserAlternative b = ParserAlternative.getBest(as2);
parsed = b != null;
if (parsed)
{
a1.add(b.rules, b.end);
context.index = b.end;
}
f1 = context.index > g1;
if (parsed) c1++;
}
parsed = c1 == 1;
}
if (parsed)
{
as1.add(a1);
}
context.index = s1;
}
ParserAlternative b = ParserAlternative.getBest(as1);
parsed = b != null;
if (parsed)
{
a0.add(b.rules, b.end);
context.index = b.end;
}
Rule rule = null;
if (parsed)
{
rule = new Rule_Grp_Authorisation(context.text.substring(a0.start, a0.end), a0.rules);
}
else
{
context.index = s0;
}
context.pop("Grp_Authorisation", parsed);
return (Rule_Grp_Authorisation)rule;
}
}
/* -----------------------------------------------------------------------------
* eof
* -----------------------------------------------------------------------------
*/
| [
"whdnfka111@gmail.com"
] | whdnfka111@gmail.com |
93b33114a3b6e1e98c1f3b08d9cce7b7b475721e | dc133b60df6c99c7f71fddd9b8667e427f7ef49d | /src/main/java/com/vts/missi/config/DatabaseConfiguration.java | 5df42d852e98f5406772ba87ba79480b6b5a257f | [] | no_license | dinhtrung90/messaging-service | b98cc6ebc33e76425f97eef40ae550a5fb220ff2 | 254cbcbf7244583b3d636dabcf8f2d6f23b8791e | refs/heads/main | 2023-05-18T08:58:21.124781 | 2021-06-06T01:07:24 | 2021-06-06T01:07:24 | 374,241,594 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,041 | java | package com.vts.missi.config;
import com.github.cloudyrock.spring.v5.EnableMongock;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Profile;
import org.springframework.core.convert.converter.Converter;
import org.springframework.data.mongodb.config.EnableMongoAuditing;
import org.springframework.data.mongodb.core.convert.MongoCustomConversions;
import org.springframework.data.mongodb.core.mapping.event.ValidatingMongoEventListener;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
import tech.jhipster.config.JHipsterConstants;
import tech.jhipster.domain.util.JSR310DateConverters.DateToZonedDateTimeConverter;
import tech.jhipster.domain.util.JSR310DateConverters.ZonedDateTimeToDateConverter;
@Configuration
@EnableMongock
@EnableMongoRepositories("com.vts.missi.repository")
@Profile("!" + JHipsterConstants.SPRING_PROFILE_CLOUD)
@Import(value = MongoAutoConfiguration.class)
@EnableMongoAuditing(auditorAwareRef = "springSecurityAuditorAware")
public class DatabaseConfiguration {
@Bean
public ValidatingMongoEventListener validatingMongoEventListener() {
return new ValidatingMongoEventListener(validator());
}
@Bean
public LocalValidatorFactoryBean validator() {
return new LocalValidatorFactoryBean();
}
@Bean
public MongoCustomConversions customConversions() {
List<Converter<?, ?>> converters = new ArrayList<>();
converters.add(DateToZonedDateTimeConverter.INSTANCE);
converters.add(ZonedDateTimeToDateConverter.INSTANCE);
return new MongoCustomConversions(converters);
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
37166239091f56743eb05f7505f44eb2d811bcd2 | a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb | /outboundbot-20191226/src/main/java/com/aliyun/outboundbot20191226/models/DeleteDialogueFlowRequest.java | aa119e1499c8b30680d4ccd2a6e6ba040854462f | [
"Apache-2.0"
] | permissive | aliyun/alibabacloud-java-sdk | 83a6036a33c7278bca6f1bafccb0180940d58b0b | 008923f156adf2e4f4785a0419f60640273854ec | refs/heads/master | 2023-09-01T04:10:33.640756 | 2023-09-01T02:40:45 | 2023-09-01T02:40:45 | 288,968,318 | 40 | 45 | null | 2023-06-13T02:47:13 | 2020-08-20T09:51:08 | Java | UTF-8 | Java | false | false | 1,243 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.outboundbot20191226.models;
import com.aliyun.tea.*;
public class DeleteDialogueFlowRequest extends TeaModel {
@NameInMap("DialogueFlowId")
public String dialogueFlowId;
@NameInMap("InstanceId")
public String instanceId;
@NameInMap("ScriptId")
public String scriptId;
public static DeleteDialogueFlowRequest build(java.util.Map<String, ?> map) throws Exception {
DeleteDialogueFlowRequest self = new DeleteDialogueFlowRequest();
return TeaModel.build(map, self);
}
public DeleteDialogueFlowRequest setDialogueFlowId(String dialogueFlowId) {
this.dialogueFlowId = dialogueFlowId;
return this;
}
public String getDialogueFlowId() {
return this.dialogueFlowId;
}
public DeleteDialogueFlowRequest setInstanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
public String getInstanceId() {
return this.instanceId;
}
public DeleteDialogueFlowRequest setScriptId(String scriptId) {
this.scriptId = scriptId;
return this;
}
public String getScriptId() {
return this.scriptId;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
bd00ae94f9082e2aa4224542133848371daf2269 | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /large-multiproject/project28/src/test/java/org/gradle/test/performance28_1/Test28_98.java | 8eadaf6dd87610e01cd8ea20d1158fe7dcbc28a9 | [] | 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 | 289 | java | package org.gradle.test.performance28_1;
import static org.junit.Assert.*;
public class Test28_98 {
private final Production28_98 production = new Production28_98("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
50d57c6190b8589e102a638243224a374cf6dabe | 20c6398b414a6f0764d21c846c6231316ff66834 | /b2bassets/b2bassetsfacades/src/com/capgemini/b2bassets/facades/suggestion/SimpleSuggestionFacade.java | 99a2c1e91e25b992cce6f53778628d863c61a2a5 | [] | no_license | vamshivushakola/b2b_assets_5.7 | 472d2597f75f685772bf2e23e14b8c1c9ff5fc05 | 722493b8fbd1dcbc8109b0fd71787669ab67fd49 | refs/heads/master | 2020-03-27T06:53:31.961017 | 2016-07-21T14:00:39 | 2016-07-21T14:00:39 | 63,874,082 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,710 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2000-2015 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package com.capgemini.b2bassets.facades.suggestion;
import de.hybris.platform.catalog.enums.ProductReferenceTypeEnum;
import de.hybris.platform.commercefacades.product.data.ProductData;
import java.util.List;
import java.util.Set;
/**
* Facade to provide simple suggestions for a customer.
*/
public interface SimpleSuggestionFacade
{
/**
* @deprecated use getReferencesForPurchasedInCategory(String categoryCode, List<ProductReferenceTypeEnum>
* referenceTypes, boolean excludePurchased, Integer limit) instead.
*/
@Deprecated
List<ProductData> getReferencesForPurchasedInCategory(String categoryCode, ProductReferenceTypeEnum referenceType,
boolean excludePurchased, Integer limit);
/**
* Returns a list of referenced products for a product purchased in a category identified by categoryCode.
*
* @param categoryCode
* the category code
* @param referenceTypes
* referenceType, can be empty
* @param excludePurchased
* if true, only retrieve products that were not yet bought by the user
* @param limit
* if not null: limit the amount of returned products to the given number
* @return a list with referenced products
*/
List<ProductData> getReferencesForPurchasedInCategory(String categoryCode, List<ProductReferenceTypeEnum> referenceTypes,
boolean excludePurchased, Integer limit);
/**
* Returns a list of referenced products for a set of products
*
* @param productCodes
* product codes
* @param referenceTypes
* referenceType, can be empty
* @param excludePurchased
* if true, only retrieve products that were not yet bought by the user
* @param limit
* if not null: limit the amount of returned products to the given number
* @return a list with referenced products
*/
List<ProductData> getReferencesForProducts(Set<String> productCodes, List<ProductReferenceTypeEnum> referenceTypes,
boolean excludePurchased, Integer limit);
/**
* A better impl of the intention behind the above method.
*
* @param referenceTypes
* @param excludePurchased
* @param limit
* @return a list of suggestions
*/
List<ProductData> getSuggestionsForProductsInCart(List<ProductReferenceTypeEnum> referenceTypes, boolean excludePurchased,
Integer limit);
}
| [
"vamshi.vushakola@gmail.com"
] | vamshi.vushakola@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.