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
a0d047eeec91122a5e714c8379dcdff54e53e636
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/63/org/apache/commons/lang/builder/EqualsBuilder_append_453.java
363bd57e8d7dc7ffc727c1c0ed76207a883c5351
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
2,186
java
org apach common lang builder assist implement link object equal object method method build good equal method rule laid href http java sun doc book effect index html effect java joshua bloch rule compar code doubl code code float code arrai tricki make code equal code code hash code hashcod code consist difficult object compar equal gener hash code object hash code equal relev field includ calcul equal deriv field field gener hash code equal method vice versa typic code pre equal object obj obj class myclass obj class myclass rh class myclass obj equal builder equalsbuild append super appendsup equal obj append field1 rh field1 append field2 rh field2 append field3 rh field3 equal isequ pre altern method reflect determin field test field method code reflect equal reflectionequ code code access object accessibleobject set access setaccess code chang visibl field fail secur manag permiss set correctli slower test explicitli typic invoc method pre equal object obj equal builder equalsbuild reflect equal reflectionequ obj pre author href mailto steve downei netfolio steve downei author stephen colebourn author gari gregori author pete gieser author arun mammen thoma version equal builder equalsbuild test code code equal param lh left hand code code param rh hand code code equal builder equalsbuild chain call equal builder equalsbuild append lh rh equal isequ equal isequ lh rh
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
873239c6848a024282e327b6420d266cd534b8a4
8b5a50fe98439cc123d1bc6b1e18856cfb82a6c9
/app/src/main/java/yongchao/com/wineapp/ui/set/mvp/body/AddressListBody.java
650b4efa82d74d1a47f329debcabc895e5ecbfd8
[]
no_license
ljx123456/wineapp
948b37c2e2cce91da4ae5b56274babfd5a9bc0ef
4e830d0ff390cd50508eb1c18d09f97240e1a83f
refs/heads/main
2022-12-29T00:35:29.779806
2020-10-23T08:29:39
2020-10-23T08:29:39
306,573,818
0
0
null
null
null
null
UTF-8
Java
false
false
630
java
package yongchao.com.wineapp.ui.set.mvp.body; public class AddressListBody { /** * pageIndex : 1 * pageSize : 10 */ private int pageIndex; private int pageSize; public int getPageIndex() { return pageIndex; } public void setPageIndex(int pageIndex) { this.pageIndex = pageIndex; } public int getPageSize() { return pageSize; } public void setPageSize(int pageSize) { this.pageSize = pageSize; } public AddressListBody(int pageIndex, int pageSize) { this.pageIndex = pageIndex; this.pageSize = pageSize; } }
[ "911015964@qq.com" ]
911015964@qq.com
3825e22954418a21838c9a2b935b62c23e325a11
a2316425525dc84a6b95d995d57b67dbe61b409c
/src/test/java/org/scu/dao/AreaDaoTest.java
4bb7ff8e26c1970e8bd81370824b2061da5c73fc
[]
no_license
xingyiyang/myblog
8a97ee1b55253aef6aae5d3eda88bcc3fad3bec8
6fa1a5c16c553acf0a050c4f0af29729d218d92c
refs/heads/master
2018-09-03T12:54:53.638727
2018-06-04T07:09:15
2018-06-04T07:09:15
110,120,448
0
0
null
null
null
null
UTF-8
Java
false
false
850
java
package org.scu.dao; import org.junit.Test; import org.junit.runner.RunWith; import org.scu.domain.Area; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import javax.annotation.Resource; import java.util.List; import static org.junit.Assert.*; /** * Created by xing on 2018/6/4. */ @RunWith(SpringJUnit4ClassRunner.class) //告诉junit spring配置文件 @ContextConfiguration({"classpath:spring/spring-dao.xml"}) public class AreaDaoTest { @Resource private AreaDao areaDao; @Test public void getAreaListByCitycode() throws Exception { String citycode = "460100"; List<Area> areas = areaDao.getAreaListByCitycode(citycode); for(Area area:areas){ System.out.println(area.toString()); } } }
[ "532956941@qq.com" ]
532956941@qq.com
2f0f79c989bee72e6fde76cd294a2a0549ffc412
ebe5a9cbebaee07f63f6903b03a8cecf4b236326
/Multi/src/MultiUSBInterface/KeyBoard.java
025c8d536dbb6f9d9d73a6ba92f4b3eeb7147df7
[]
no_license
GithubRobot01/itheima01
cdcb909210c91236a75c9d15a02873de86dcb042
3bad1ec2d1ca2d8b9198fcf7dfd5128559124be5
refs/heads/master
2022-01-18T10:35:40.446327
2019-08-08T02:53:11
2019-08-08T02:53:11
197,952,235
1
0
null
null
null
null
UTF-8
Java
false
false
336
java
package MultiUSBInterface; public class KeyBoard implements USB { @Override public void open() { System.out.println("成功连接键盘"); } @Override public void close() { System.out.println("断开键盘连接"); } public void type(){ System.out.println("键盘打字"); } }
[ "1440035864@qq.com" ]
1440035864@qq.com
0f3a73d54a42eb611bbcd4a0a5b52aafe55e135e
8c8667eeef6487bce01d612d5e948355256b39ac
/cajas/src/main/java/mx/babel/bansefi/banksystem/cajas/webservice/consultaenvioentreoficinas/EjecutarResponse.java
c3c091e1125f2f55d78db4adcdf266a11d6f1947
[]
no_license
JesusGui/ProyectoBansefi
7c0c228943be245bf69d1d2a9fe7f40a0a04db9f
4b6caa502c279c51231d0f5f8cb0399813c233e2
refs/heads/master
2020-03-28T14:38:44.536238
2018-09-12T16:08:16
2018-09-12T16:08:16
148,507,197
0
0
null
null
null
null
UTF-8
Java
false
false
1,685
java
package mx.babel.bansefi.banksystem.cajas.webservice.consultaenvioentreoficinas; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Clase Java para anonymous complex type. * * <p>El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="EjecutarResult" type="{http://BansefiNSS/WebServicesNSS/TR_SOLCT_CONT_IND_SM_TRN}EjecutarResult" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "ejecutarResult" }) @XmlRootElement(name = "EjecutarResponse") public class EjecutarResponse { @XmlElement(name = "EjecutarResult") protected EjecutarResult ejecutarResult; /** * Obtiene el valor de la propiedad ejecutarResult. * * @return * possible object is * {@link EjecutarResult } * */ public EjecutarResult getEjecutarResult() { return ejecutarResult; } /** * Define el valor de la propiedad ejecutarResult. * * @param value * allowed object is * {@link EjecutarResult } * */ public void setEjecutarResult(EjecutarResult value) { this.ejecutarResult = value; } }
[ "jesusguillermomendez@gmail.com" ]
jesusguillermomendez@gmail.com
e9339a7221ce341b2cd725450e2761f916c4a429
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/imm-20200930/src/main/java/com/aliyun/imm20200930/models/CreateCompressPointCloudTaskRequest.java
0df48a2988bd84fa18bd7de4b371c78f4d9b611a
[ "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
4,197
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.imm20200930.models; import com.aliyun.tea.*; public class CreateCompressPointCloudTaskRequest extends TeaModel { @NameInMap("CompressMethod") public String compressMethod; @NameInMap("CredentialConfig") public CredentialConfig credentialConfig; @NameInMap("KdtreeOption") public KdtreeOption kdtreeOption; @NameInMap("Notification") public Notification notification; @NameInMap("OctreeOption") public OctreeOption octreeOption; @NameInMap("PointCloudFields") public java.util.List<String> pointCloudFields; @NameInMap("PointCloudFileFormat") public String pointCloudFileFormat; @NameInMap("ProjectName") public String projectName; @NameInMap("SourceURI") public String sourceURI; @NameInMap("Tags") public java.util.Map<String, ?> tags; @NameInMap("TargetURI") public String targetURI; @NameInMap("UserData") public String userData; public static CreateCompressPointCloudTaskRequest build(java.util.Map<String, ?> map) throws Exception { CreateCompressPointCloudTaskRequest self = new CreateCompressPointCloudTaskRequest(); return TeaModel.build(map, self); } public CreateCompressPointCloudTaskRequest setCompressMethod(String compressMethod) { this.compressMethod = compressMethod; return this; } public String getCompressMethod() { return this.compressMethod; } public CreateCompressPointCloudTaskRequest setCredentialConfig(CredentialConfig credentialConfig) { this.credentialConfig = credentialConfig; return this; } public CredentialConfig getCredentialConfig() { return this.credentialConfig; } public CreateCompressPointCloudTaskRequest setKdtreeOption(KdtreeOption kdtreeOption) { this.kdtreeOption = kdtreeOption; return this; } public KdtreeOption getKdtreeOption() { return this.kdtreeOption; } public CreateCompressPointCloudTaskRequest setNotification(Notification notification) { this.notification = notification; return this; } public Notification getNotification() { return this.notification; } public CreateCompressPointCloudTaskRequest setOctreeOption(OctreeOption octreeOption) { this.octreeOption = octreeOption; return this; } public OctreeOption getOctreeOption() { return this.octreeOption; } public CreateCompressPointCloudTaskRequest setPointCloudFields(java.util.List<String> pointCloudFields) { this.pointCloudFields = pointCloudFields; return this; } public java.util.List<String> getPointCloudFields() { return this.pointCloudFields; } public CreateCompressPointCloudTaskRequest setPointCloudFileFormat(String pointCloudFileFormat) { this.pointCloudFileFormat = pointCloudFileFormat; return this; } public String getPointCloudFileFormat() { return this.pointCloudFileFormat; } public CreateCompressPointCloudTaskRequest setProjectName(String projectName) { this.projectName = projectName; return this; } public String getProjectName() { return this.projectName; } public CreateCompressPointCloudTaskRequest setSourceURI(String sourceURI) { this.sourceURI = sourceURI; return this; } public String getSourceURI() { return this.sourceURI; } public CreateCompressPointCloudTaskRequest setTags(java.util.Map<String, ?> tags) { this.tags = tags; return this; } public java.util.Map<String, ?> getTags() { return this.tags; } public CreateCompressPointCloudTaskRequest setTargetURI(String targetURI) { this.targetURI = targetURI; return this; } public String getTargetURI() { return this.targetURI; } public CreateCompressPointCloudTaskRequest setUserData(String userData) { this.userData = userData; return this; } public String getUserData() { return this.userData; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
b487129d934fb828b32a1d775c93c3b4da914cc7
d2f810efbf145ea3e8b5925a7b5e90419477b586
/src/net/minecraft/client/renderer/entity/layers/LayerIronGolemFlower.java
702d3209872ad8ca01600878967b58665656b155
[]
no_license
nullexthecodegod/Stealth
7505536594fda0a577a3406b3ed89b75857dc2be
334edcd2fc0f2fbda88b8845adb9c1a2f17023dd
refs/heads/master
2021-05-14T18:15:11.746357
2018-01-11T04:32:51
2018-01-11T04:32:51
116,067,644
2
1
null
null
null
null
UTF-8
Java
false
false
2,739
java
package net.minecraft.client.renderer.entity.layers; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelIronGolem; import net.minecraft.client.renderer.BlockRendererDispatcher; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.entity.RenderIronGolem; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.monster.EntityIronGolem; import net.minecraft.init.Blocks; public class LayerIronGolemFlower implements LayerRenderer { private final RenderIronGolem ironGolemRenderer; public LayerIronGolemFlower(RenderIronGolem ironGolemRendererIn) { this.ironGolemRenderer = ironGolemRendererIn; } public void func_177153_a(EntityIronGolem ironGolem, float p_177153_2_, float p_177153_3_, float p_177153_4_, float p_177153_5_, float p_177153_6_, float p_177153_7_, float p_177153_8_) { if (ironGolem.getHoldRoseTick() != 0) { BlockRendererDispatcher var9 = Minecraft.getMinecraft().getBlockRendererDispatcher(); GlStateManager.enableRescaleNormal(); GlStateManager.pushMatrix(); GlStateManager.rotate(5.0F + 180.0F * ((ModelIronGolem)this.ironGolemRenderer.getMainModel()).ironGolemRightArm.rotateAngleX / (float)Math.PI, 1.0F, 0.0F, 0.0F); GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F); GlStateManager.translate(-0.9375F, -0.625F, -0.9375F); float var10 = 0.5F; GlStateManager.scale(var10, -var10, var10); int var11 = ironGolem.getBrightnessForRender(p_177153_4_); int var12 = var11 % 65536; int var13 = var11 / 65536; OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)var12 / 1.0F, (float)var13 / 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.ironGolemRenderer.bindTexture(TextureMap.locationBlocksTexture); var9.renderBlockBrightness(Blocks.red_flower.getDefaultState(), 1.0F); GlStateManager.popMatrix(); GlStateManager.disableRescaleNormal(); } } public boolean shouldCombineTextures() { return false; } public void doRenderLayer(EntityLivingBase entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale) { this.func_177153_a((EntityIronGolem)entitylivingbaseIn, p_177141_2_, p_177141_3_, partialTicks, p_177141_5_, p_177141_6_, p_177141_7_, scale); } }
[ "NullEX@Offset#6604" ]
NullEX@Offset#6604
f3dedd3d574c325f7c0d942c31daddaa466809c1
0b53312de059e822bd48ea2329e11070bad75103
/cps/src/main/java/com/jdcloud/sdk/service/cps/model/DescribeLoadBalancerRequest.java
e38815a395e783198b6cd10b2701b3eb6369632e
[ "Apache-2.0" ]
permissive
304840508/jdcloud-sdk-java
33b9cf2a5a0c4b507f8b87607c0e588b19c43ef3
b0f158123a2d90bb01fa5647a1a33561d008a1ed
refs/heads/master
2023-01-21T10:59:41.990964
2020-12-03T09:08:46
2020-12-03T09:08:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,737
java
/* * Copyright 2018 JDCLOUD.COM * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http:#www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * 云物理服务器 * 云物理服务器负载均衡实例操作相关的接口 * * OpenAPI spec version: v1 * Contact: * * NOTE: This class is auto generated by the jdcloud code generator program. */ package com.jdcloud.sdk.service.cps.model; import com.jdcloud.sdk.annotation.Required; import com.jdcloud.sdk.service.JdcloudRequest; /** * 查询负载均衡实例详情 */ public class DescribeLoadBalancerRequest extends JdcloudRequest implements java.io.Serializable { private static final long serialVersionUID = 1L; /** * 地域ID,可调用接口(describeCPSLBRegions)获取云物理服务器支持的地域 * Required:true */ @Required private String regionId; /** * 负载均衡实例ID * Required:true */ @Required private String loadBalancerId; /** * get 地域ID,可调用接口(describeCPSLBRegions)获取云物理服务器支持的地域 * * @return */ public String getRegionId() { return regionId; } /** * set 地域ID,可调用接口(describeCPSLBRegions)获取云物理服务器支持的地域 * * @param regionId */ public void setRegionId(String regionId) { this.regionId = regionId; } /** * get 负载均衡实例ID * * @return */ public String getLoadBalancerId() { return loadBalancerId; } /** * set 负载均衡实例ID * * @param loadBalancerId */ public void setLoadBalancerId(String loadBalancerId) { this.loadBalancerId = loadBalancerId; } /** * set 地域ID,可调用接口(describeCPSLBRegions)获取云物理服务器支持的地域 * * @param regionId */ public DescribeLoadBalancerRequest regionId(String regionId) { this.regionId = regionId; return this; } /** * set 负载均衡实例ID * * @param loadBalancerId */ public DescribeLoadBalancerRequest loadBalancerId(String loadBalancerId) { this.loadBalancerId = loadBalancerId; return this; } }
[ "tancong@jd.com" ]
tancong@jd.com
9a627dc76595f028f9151f60b84987d1439e3767
7288e5bfa4e69edc77c1e5b91225d5ba0b8212b4
/src/main/java/refinedstorage/api/network/WirelessGridConsumer.java
c613f2dc655924fbea53fe17708c2048fce90645
[ "MIT" ]
permissive
Virindi-AC/refinedstorage
d7ae60960bbe6dc1fe9c1b700d798101125d4cf0
c90245148cf41f58a9352d9ca150f9474df13963
refs/heads/mc1.10
2021-01-18T17:24:13.953052
2016-06-28T20:18:11
2016-06-28T20:18:11
62,192,860
0
0
null
2016-06-29T03:32:18
2016-06-29T03:32:17
null
UTF-8
Java
false
false
1,183
java
package refinedstorage.api.network; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumHand; /** * Represents a player using a wireless grid. */ public class WirelessGridConsumer { private EntityPlayer player; private EnumHand hand; private ItemStack wirelessGrid; /** * @param player The player using this wireless grid * @param hand The hand that this wireless grid is in * @param wirelessGrid The wireless grid {@link ItemStack} in the player's inventory */ public WirelessGridConsumer(EntityPlayer player, EnumHand hand, ItemStack wirelessGrid) { this.player = player; this.hand = hand; this.wirelessGrid = wirelessGrid; } /** * @return The wireless grid {@link ItemStack} */ public ItemStack getWirelessGrid() { return wirelessGrid; } /** * @return The hand this wireless grid is in */ public EnumHand getHand() { return hand; } /** * @return The player using the wireless grid */ public EntityPlayer getPlayer() { return player; } }
[ "raoulvdberge@gmail.com" ]
raoulvdberge@gmail.com
b5273ad80f67aa4a8c11cc638cef7f247418a3c3
471a1d9598d792c18392ca1485bbb3b29d1165c5
/jadx-MFP/src/main/java/com/myfitnesspal/feature/search/ui/activity/FoodSearchActivityV2$initButtonListeners$2.java
211e9f65c9a87d0172006cfb2e1b25509551e233
[]
no_license
reed07/MyPreferencePal
84db3a93c114868dd3691217cc175a8675e5544f
365b42fcc5670844187ae61b8cbc02c542aa348e
refs/heads/master
2020-03-10T23:10:43.112303
2019-07-08T00:39:32
2019-07-08T00:39:32
129,635,379
2
0
null
null
null
null
UTF-8
Java
false
false
932
java
package com.myfitnesspal.feature.search.ui.activity; import android.view.View; import android.view.View.OnClickListener; import kotlin.Metadata; @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u00012\u000e\u0010\u0002\u001a\n \u0004*\u0004\u0018\u00010\u00030\u0003H\n¢\u0006\u0002\b\u0005"}, d2 = {"<anonymous>", "", "it", "Landroid/view/View;", "kotlin.jvm.PlatformType", "onClick"}, k = 3, mv = {1, 1, 13}) /* compiled from: FoodSearchActivityV2.kt */ final class FoodSearchActivityV2$initButtonListeners$2 implements OnClickListener { final /* synthetic */ FoodSearchActivityV2 this$0; FoodSearchActivityV2$initButtonListeners$2(FoodSearchActivityV2 foodSearchActivityV2) { this.this$0 = foodSearchActivityV2; } public final void onClick(View view) { this.this$0.navigateToScanBarcode(); } }
[ "anon@ymous.email" ]
anon@ymous.email
5987565eb9a28b5a0b0d68a76bf8acbaed1f7070
14c53a0c6be0faaacddc671463e62509b676fbb7
/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOn.java
9b68db19c06923a3b5a67f889c42e63b409570af
[ "Apache-2.0" ]
permissive
goodwink/jclouds
a2dd9ea9c2e42e8ee201857653cf8b3208cd7de2
029f15f36031748ad913bdee16c8f12c101da16a
refs/heads/master
2021-01-18T08:06:32.500885
2011-05-18T18:16:36
2011-05-18T18:16:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,552
java
/** * * Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com> * * ==================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ==================================================================== */ package org.jclouds.vcloud.compute.strategy; import static org.jclouds.compute.util.ComputeServiceUtils.getCores; import static org.jclouds.vcloud.options.InstantiateVAppTemplateOptions.Builder.processorCount; import java.net.URI; import javax.annotation.Resource; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; import org.jclouds.compute.domain.NodeMetadata; import org.jclouds.compute.domain.Template; import org.jclouds.compute.reference.ComputeServiceConstants; import org.jclouds.compute.strategy.CreateNodeWithGroupEncodedIntoName; import org.jclouds.compute.strategy.GetNodeMetadataStrategy; import org.jclouds.logging.Logger; import org.jclouds.vcloud.VCloudClient; import org.jclouds.vcloud.compute.options.VCloudTemplateOptions; import org.jclouds.vcloud.domain.GuestCustomizationSection; import org.jclouds.vcloud.domain.NetworkConnection; import org.jclouds.vcloud.domain.NetworkConnectionSection; import org.jclouds.vcloud.domain.NetworkConnectionSection.Builder; import org.jclouds.vcloud.domain.Task; import org.jclouds.vcloud.domain.VApp; import org.jclouds.vcloud.domain.Vm; import org.jclouds.vcloud.domain.network.IpAddressAllocationMode; import org.jclouds.vcloud.options.InstantiateVAppTemplateOptions; import com.google.common.base.Function; import com.google.common.base.Predicate; import com.google.common.collect.Iterables; /** * @author Adrian Cole */ @Singleton public class InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOn implements CreateNodeWithGroupEncodedIntoName { @Resource @Named(ComputeServiceConstants.COMPUTE_LOGGER) protected Logger logger = Logger.NULL; protected final VCloudClient client; protected final GetNodeMetadataStrategy getNode; protected final Predicate<URI> successTester; @Inject protected InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOn(Predicate<URI> successTester, VCloudClient client, GetNodeMetadataStrategy getNode) { this.client = client; this.successTester = successTester; this.getNode = getNode; } @Override public NodeMetadata createNodeWithGroupEncodedIntoName(String tag, String name, Template template) { InstantiateVAppTemplateOptions options = processorCount((int) getCores(template.getHardware())).memory( template.getHardware().getRam()).disk( (long) ((template.getHardware().getVolumes().get(0).getSize()) * 1024 * 1024l)); String customizationScript = null; IpAddressAllocationMode ipAddressAllocationMode = null; if (template.getOptions() instanceof VCloudTemplateOptions) { customizationScript = VCloudTemplateOptions.class.cast(template.getOptions()).getCustomizationScript(); ipAddressAllocationMode = VCloudTemplateOptions.class.cast(template.getOptions()).getIpAddressAllocationMode(); if (customizationScript != null || ipAddressAllocationMode != null) { options.customizeOnInstantiate(false); options.deploy(false); options.powerOn(false); } } if (!template.getOptions().shouldBlockUntilRunning()) options.block(false); URI VDC = URI.create(template.getLocation().getId()); URI templateId = URI.create(template.getImage().getId()); logger.debug(">> instantiating vApp vDC(%s) template(%s) name(%s) options(%s) ", VDC, templateId, name, options); VApp vAppResponse = client.instantiateVAppTemplateInVDC(VDC, templateId, name, options); logger.debug("<< instantiated VApp(%s)", vAppResponse.getName()); Task task = vAppResponse.getTasks().get(0); if (customizationScript == null && ipAddressAllocationMode == null) { return blockOnDeployAndPowerOnIfConfigured(options, vAppResponse, task); } else { if (!successTester.apply(task.getHref())) { throw new RuntimeException( String.format("failed to %s %s: %s", "instantiate", vAppResponse.getName(), task)); } Vm vm = Iterables.get(client.getVApp(vAppResponse.getHref()).getChildren(), 0); if (customizationScript != null) updateVmWithCustomizationScript(vm, customizationScript); if (ipAddressAllocationMode != null) updateVmWithIpAddressAllocationMode(vm, ipAddressAllocationMode); task = client.deployAndPowerOnVAppOrVm(vAppResponse.getHref()); return blockOnDeployAndPowerOnIfConfigured(options, vAppResponse, task); } } public void updateVmWithCustomizationScript(Vm vm, String customizationScript) { Task task; GuestCustomizationSection guestConfiguration = vm.getGuestCustomizationSection(); // TODO: determine if the server version is beyond 1.0.0, and if so append to, but // not overwrite the customization script. In version 1.0.0, the api returns a script that // loses newlines. guestConfiguration.setCustomizationScript(customizationScript); task = client.updateGuestCustomizationOfVm(vm.getHref(), guestConfiguration); if (!successTester.apply(task.getHref())) { throw new RuntimeException(String.format("failed to %s %s: %s", "updateGuestCustomizationOfVm", vm.getName(), task)); } } public void updateVmWithIpAddressAllocationMode(Vm vm, final IpAddressAllocationMode ipAddressAllocationMode) { Task task; NetworkConnectionSection net = vm.getNetworkConnectionSection(); Builder builder = net.toBuilder(); builder.connections(Iterables.transform(net.getConnections(), new Function<NetworkConnection, NetworkConnection>() { @Override public NetworkConnection apply(NetworkConnection arg0) { return arg0.toBuilder().connected(true).ipAddressAllocationMode(ipAddressAllocationMode).build(); } })); task = client.updateNetworkConnectionOfVm(vm.getHref(), builder.build()); if (!successTester.apply(task.getHref())) { throw new RuntimeException(String.format("failed to %s %s: %s", "updateNetworkConnectionOfVm", vm.getName(), task)); } } private NodeMetadata blockOnDeployAndPowerOnIfConfigured(InstantiateVAppTemplateOptions options, VApp vAppResponse, Task task) { if (options.shouldBlock()) { if (!successTester.apply(task.getHref())) { throw new RuntimeException(String.format("failed to %s %s: %s", "deploy and power on", vAppResponse.getName(), task)); } logger.debug("<< ready vApp(%s)", vAppResponse.getName()); } return getNode.getNode(vAppResponse.getHref().toASCIIString()); } }
[ "adrian@jclouds.org" ]
adrian@jclouds.org
663941ea0e8e7c839ff2314355d4eb956afd7ee4
a36dce4b6042356475ae2e0f05475bd6aed4391b
/2005/julypersistenceEJB/ejbModule/com/hps/july/persistence/EJSCMPI13nActResourceSetHomeBean.java
8ea7faf38a7262b1340923f3a3d8bbdfe9f6d564
[]
no_license
ildar66/WSAD_NRI
b21dbee82de5d119b0a507654d269832f19378bb
2a352f164c513967acf04d5e74f36167e836054f
refs/heads/master
2020-12-02T23:59:09.795209
2017-07-01T09:25:27
2017-07-01T09:25:27
95,954,234
0
1
null
null
null
null
UTF-8
Java
false
false
833
java
package com.hps.july.persistence; /** * EJSCMPI13nActResourceSetHomeBean */ public class EJSCMPI13nActResourceSetHomeBean extends com.hps.july.persistence.EJSCMPI13nActResourceSetHomeBean_1b32abe9 { /** * EJSCMPI13nActResourceSetHomeBean */ public EJSCMPI13nActResourceSetHomeBean() throws java.rmi.RemoteException { super(); } /** * postCreateWrapper */ public com.hps.july.persistence.I13nActResourceSet postCreateWrapper(com.ibm.ejs.container.BeanO beanO, Object ejsKey) throws javax.ejb.CreateException, java.rmi.RemoteException { return (com.hps.july.persistence.I13nActResourceSet) super.postCreate(beanO, ejsKey); } /** * afterPostCreateWrapper */ public void afterPostCreateWrapper(com.ibm.ejs.container.BeanO beanO, Object ejsKey) throws javax.ejb.CreateException, java.rmi.RemoteException { } }
[ "ildar66@inbox.ru" ]
ildar66@inbox.ru
d45028fceee3e946137cd9db5d584935eca737bf
96d71f73821cfbf3653f148d8a261eceedeac882
/external/decompiled/blackberry/bb (1)/decompiled/WhatsApp-12/com/whatsapp/client/ContactPickerField$ChatableFilter.java
1be2c97fd717af5411e4ac0aa42fdc6fbdc08f51
[]
no_license
JaapSuter/Niets
9a9ec53f448df9b866a8c15162a5690b6bcca818
3cc42f8c2cefd9c3193711cbf15b5304566e08cb
refs/heads/master
2020-04-09T19:09:40.667155
2012-09-28T18:11:33
2012-09-28T18:11:33
5,751,595
2
1
null
null
null
null
UTF-8
Java
false
false
533
java
// ####################################################### // Decompiled by : coddec // Module : WhatsApp-12.cod // Module version : 2.7.6550 // Class ID : 37 // ######################################################## package com.whatsapp.client; interface public class ContactPickerField$ChatableFilter extends Object { // @@@@@@@@@@@@@ Virtual routines abstract public boolean filter( com.whatsapp.client.ContactPickerField$ChatableFilter, module:WhatsApp-11.class#8 ); // address: 0 { halt } }
[ "git@jaapsuter.com" ]
git@jaapsuter.com
23bade0494e2dc39713194a0bdb7c67d86e45e82
445c3cf84dd4bbcbbccf787b2d3c9eb8ed805602
/aliyun-java-sdk-ecsops/src/main/java/com/aliyuncs/ecsops/model/v20160401/OpsQueryWorkflowInstanceResponse.java
c1e03842d175497198e05fc27c0af6c09f05241e
[ "Apache-2.0" ]
permissive
caojiele/aliyun-openapi-java-sdk
b6367cc95469ac32249c3d9c119474bf76fe6db2
ecc1c949681276b3eed2500ec230637b039771b8
refs/heads/master
2023-06-02T02:30:02.232397
2021-06-18T04:08:36
2021-06-18T04:08:36
172,076,930
0
0
NOASSERTION
2019-02-22T14:08:29
2019-02-22T14:08:29
null
UTF-8
Java
false
false
5,146
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.ecsops.model.v20160401; import java.util.List; import com.aliyuncs.AcsResponse; import com.aliyuncs.ecsops.transform.v20160401.OpsQueryWorkflowInstanceResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class OpsQueryWorkflowInstanceResponse extends AcsResponse { private List<WorkflowInstance> workflowInstances; public List<WorkflowInstance> getWorkflowInstances() { return this.workflowInstances; } public void setWorkflowInstances(List<WorkflowInstance> workflowInstances) { this.workflowInstances = workflowInstances; } public static class WorkflowInstance { private String workflowId; private String parentId; private String workflowName; private Long version; private String bizType; private String bizId; private Integer priority; private String initAttributes; private String state; private String executionNode; private Long startDateTime; private Long expireTime; private Long endDateTime; private Long duration; private Long createTime; private Long updateTime; private String tag; private String extColumn1; private String extColumn2; private String extColumn3; public String getWorkflowId() { return this.workflowId; } public void setWorkflowId(String workflowId) { this.workflowId = workflowId; } public String getParentId() { return this.parentId; } public void setParentId(String parentId) { this.parentId = parentId; } public String getWorkflowName() { return this.workflowName; } public void setWorkflowName(String workflowName) { this.workflowName = workflowName; } public Long getVersion() { return this.version; } public void setVersion(Long version) { this.version = version; } public String getBizType() { return this.bizType; } public void setBizType(String bizType) { this.bizType = bizType; } public String getBizId() { return this.bizId; } public void setBizId(String bizId) { this.bizId = bizId; } public Integer getPriority() { return this.priority; } public void setPriority(Integer priority) { this.priority = priority; } public String getInitAttributes() { return this.initAttributes; } public void setInitAttributes(String initAttributes) { this.initAttributes = initAttributes; } public String getState() { return this.state; } public void setState(String state) { this.state = state; } public String getExecutionNode() { return this.executionNode; } public void setExecutionNode(String executionNode) { this.executionNode = executionNode; } public Long getStartDateTime() { return this.startDateTime; } public void setStartDateTime(Long startDateTime) { this.startDateTime = startDateTime; } public Long getExpireTime() { return this.expireTime; } public void setExpireTime(Long expireTime) { this.expireTime = expireTime; } public Long getEndDateTime() { return this.endDateTime; } public void setEndDateTime(Long endDateTime) { this.endDateTime = endDateTime; } public Long getDuration() { return this.duration; } public void setDuration(Long duration) { this.duration = duration; } public Long getCreateTime() { return this.createTime; } public void setCreateTime(Long createTime) { this.createTime = createTime; } public Long getUpdateTime() { return this.updateTime; } public void setUpdateTime(Long updateTime) { this.updateTime = updateTime; } public String getTag() { return this.tag; } public void setTag(String tag) { this.tag = tag; } public String getExtColumn1() { return this.extColumn1; } public void setExtColumn1(String extColumn1) { this.extColumn1 = extColumn1; } public String getExtColumn2() { return this.extColumn2; } public void setExtColumn2(String extColumn2) { this.extColumn2 = extColumn2; } public String getExtColumn3() { return this.extColumn3; } public void setExtColumn3(String extColumn3) { this.extColumn3 = extColumn3; } } @Override public OpsQueryWorkflowInstanceResponse getInstance(UnmarshallerContext context) { return OpsQueryWorkflowInstanceResponseUnmarshaller.unmarshall(this, context); } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
51d4e5976d9ebbce50436d7cccaecdb37979ef9f
ef1b72abf5554c94661c495a0bf0a6aded89e37c
/src/net/minecraft/src/czm.java
8af743fa4db6a1d841802a7ede235ac285a0d4cb
[]
no_license
JimmyZJX/MC1.8_source
ad459b12d0d01db28942b9af87c86393011fd626
25f56c7884a320cbf183b23010cccecb5689d707
refs/heads/master
2016-09-10T04:26:40.951576
2014-11-29T06:22:02
2014-11-29T06:22:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
271
java
package net.minecraft.src; public abstract interface czm<T> { public abstract int a(); public abstract T g(); } /* Location: C:\Minecraft1.7.5\.minecraft\versions\1.8\1.8.jar * Qualified Name: czm * JD-Core Version: 0.7.0.1 */
[ "604590822@qq.com" ]
604590822@qq.com
b43bd2c3c60da6bbe49ecac8302ca6cc98df4270
183931eedd8ed7ff685e22cb055f86f12a54d707
/java_puzzlers/02_expressive_puzzlers/puzzle_2/Change.java
22b9ac53465dbc8afafebb24173a049ae2330cb8
[]
no_license
cynepCTAPuk/headFirstJava
94a87be8f6958ab373cd1640a5bdb9c3cc3bf166
7cb45f6e2336bbc78852d297ad3474fd491e5870
refs/heads/master
2023-08-16T06:51:14.206516
2023-08-08T16:44:11
2023-08-08T16:44:11
154,661,091
0
1
null
2023-01-06T21:32:31
2018-10-25T11:40:54
Java
UTF-8
Java
false
false
405
java
package puzzle_2; import java.math.*; public class Change { public static void main(String args[]) { System.out.println(2.00 - 1.10); // Poor solution - still uses binary floating-point! System.out.printf("%.2f\n", 2.00 - 1.10); System.out.println((200 -110) + " cents"); System.out.println(new BigDecimal("2.00").subtract(new BigDecimal("1.10"))); } }
[ "CTAPuk@gmail.com" ]
CTAPuk@gmail.com
52f5ffedc25f816c9b3bece9a0bcc4134284b95f
ae7ba9c83692cfcb39e95483d84610715930fe9e
/MyCATApache/Mycat-Web/src/main/java/org/mycat/web/jmonitor/JMEevntCenter.java
485c9e7438577688e2ede76927402dbc23fc79dd
[ "Apache-2.0" ]
permissive
xenron/sandbox-github-clone
364721769ea0784fb82827b07196eaa32190126b
5eccdd8631f8bad78eb88bb89144972dbabc109c
refs/heads/master
2022-05-01T21:18:43.101664
2016-09-12T12:38:32
2016-09-12T12:38:32
65,951,766
5
7
null
null
null
null
UTF-8
Java
false
false
1,857
java
package org.mycat.web.jmonitor; import java.util.concurrent.BlockingQueue; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueue; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.alibaba.fastjson.JSONObject; public class JMEevntCenter implements Runnable { private CopyOnWriteArrayList<JMEvevntListener> listeners = new CopyOnWriteArrayList<JMEvevntListener>(); private static final Logger log = LoggerFactory.getLogger(JMEevntCenter.class); private BlockingQueue<JSONObject> events = new LinkedBlockingQueue<JSONObject>(); private ExecutorService dispatchServer = Executors.newSingleThreadExecutor(); private static JMEevntCenter INSTANCE; private JMEevntCenter() { dispatchServer.execute(this); } public static JMEevntCenter getInstance() { if (INSTANCE == null) { synchronized (JMEevntCenter.class) { if (INSTANCE == null) { INSTANCE = new JMEevntCenter(); } } } return INSTANCE; } public void run() { while (!Thread.interrupted()) { try { JSONObject event = events.take(); for (JMEvevntListener listener : listeners) { listener.handle(event); } } catch (Exception e) { log.error("dispatch event error", e); } } } public void addListener(JMEvevntListener listener) { listeners.add(listener); } public void send(JSONObject event) { events.add(event); } public void close() { events.clear(); listeners.clear(); dispatchServer.shutdownNow(); } }
[ "xenron@outlook.com" ]
xenron@outlook.com
6580a220d5932c9dde70b9f6d71885aef64b5b0e
318c1a1d99323f421fe9c2c2770f49afb87366df
/sw-marketing/src/main/java/com/zscat/marketing/wx/service/impl/WxServerService.java
5a03695495d7113a02bad553923c429c38d18abf
[]
no_license
narci2010/zscat
e4ec9cf22967bcfca377712263109238c751eccf
e2bf16aa804caff1594a6a81666bdf7d62f8c1c2
refs/heads/master
2021-01-21T22:35:27.978743
2017-09-01T10:24:46
2017-09-01T10:24:46
102,163,734
1
3
null
null
null
null
UTF-8
Java
false
false
5,290
java
package com.zscat.marketing.wx.service.impl; import com.zscat.marketing.wx.handler.LogHandler; import com.zscat.marketing.wx.handler.MsgHandler; import com.zscat.marketing.wx.handler.SubscribeHandler; import com.zscat.marketing.wx.handler.UnSubscribeHandler; import com.zscat.marketing.wx.service.IWxServerService; import me.chanjar.weixin.common.api.WxConsts; import me.chanjar.weixin.common.exception.WxErrorException; import me.chanjar.weixin.mp.api.WxMpMessageRouter; import me.chanjar.weixin.mp.api.WxMpService; import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage; import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage; import me.chanjar.weixin.mp.bean.result.WxMpUser; import org.apache.http.HttpEntity; import org.apache.http.NameValuePair; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.config.RequestConfig; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.util.EntityUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import javax.annotation.PostConstruct; import javax.annotation.Resource; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.List; /** * 微信核心业务实现 * * @author : zscat * @version : 1.0 * @created on : 2016/11/24 下午10:01 */ @Service public class WxServerService implements IWxServerService { protected Logger logger = LoggerFactory.getLogger(getClass()); @Resource protected WxMpService wxMpService; @Resource protected LogHandler logHandler; @Resource protected SubscribeHandler subscribeHandler; @Resource protected UnSubscribeHandler unSubscribeHandler; @Resource protected MsgHandler msgHandler; private WxMpMessageRouter router; @PostConstruct public void init() { this.refreshRouter(); } @Override public void requestGet(String urlWithParams) throws IOException { CloseableHttpClient httpclient = HttpClientBuilder.create().build(); HttpGet httpget = new HttpGet(urlWithParams); httpget.addHeader("Content-Type", "text/html;charset=UTF-8"); //配置请求的超时设置 RequestConfig requestConfig = RequestConfig.custom() .setConnectionRequestTimeout(50) .setConnectTimeout(50) .setSocketTimeout(50).build(); httpget.setConfig(requestConfig); CloseableHttpResponse response = httpclient.execute(httpget); logger.info("requestGet->StatusCode:{}",response.getStatusLine().getStatusCode()); HttpEntity entity = response.getEntity(); String jsonStr = EntityUtils.toString(entity); logger.info("requestGet->jsonStr:{}"); httpget.releaseConnection(); } @Override public void requestPost(String url, List<NameValuePair> params) throws ClientProtocolException, IOException { CloseableHttpClient httpclient = HttpClientBuilder.create().build(); HttpPost httppost = new HttpPost(url); httppost.setEntity(new UrlEncodedFormEntity(params, StandardCharsets.UTF_8)); CloseableHttpResponse response = httpclient.execute(httppost); logger.info("requestPost->response:{}",response); HttpEntity entity = response.getEntity(); String jsonStr = EntityUtils.toString(entity, "utf-8"); logger.info("requestPost->jsonStr:{}",jsonStr); httppost.releaseConnection(); } @Override public void refreshRouter() { final WxMpMessageRouter newRouter = new WxMpMessageRouter( this.wxMpService); // 记录所有事件的日志 newRouter.rule().handler(this.logHandler).next(); // 关注事件 newRouter.rule().async(false) .msgType(WxConsts.XML_MSG_EVENT) .event(WxConsts.EVT_SUBSCRIBE).handler(this.subscribeHandler).end(); //取消关注 newRouter.rule().async(false) .msgType(WxConsts.XML_MSG_EVENT) .event(WxConsts.EVT_UNSUBSCRIBE).handler(this.unSubscribeHandler).end(); // 默认,转发消息给客服人员 newRouter.rule().async(false).handler(this.msgHandler).end(); this.router = newRouter; } @Override public WxMpXmlOutMessage route(WxMpXmlMessage inMessage) { try { return this.router.route(inMessage); } catch (Exception e) { this.logger.error(e.getMessage(), e); } return null; } @Override public WxMpUser getUserInfo(String openid, String lang) { WxMpUser wxMpUser = null; try { wxMpUser = this.wxMpService.getUserService().userInfo(openid, lang); } catch (WxErrorException e) { this.logger.error(e.getError().toString()); } return wxMpUser; } /** * 初始化微信公众号菜单 */ @Override public void initMenu() { } }
[ "1439226817@qq.com" ]
1439226817@qq.com
2a1f99daa8bed4111e4a950a04c3b6a0ccd4a33b
11b9a30ada6672f428c8292937dec7ce9f35c71b
/src/main/java/com/sun/org/apache/bcel/internal/generic/IASTORE.java
798bd17ecf7bb53fde36be427b89190627813f64
[]
no_license
bogle-zhao/jdk8
5b0a3978526723b3952a0c5d7221a3686039910b
8a66f021a824acfb48962721a20d27553523350d
refs/heads/master
2022-12-13T10:44:17.426522
2020-09-27T13:37:00
2020-09-27T13:37:00
299,039,533
0
0
null
null
null
null
UTF-8
Java
false
false
6,171
java
/***** Lobxxx Translate Finished ******/ /* * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package com.sun.org.apache.bcel.internal.generic; /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" and * "Apache BCEL" must not be used to endorse or promote products * derived from this software without prior written permission. For * written permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache", * "Apache BCEL", nor may "Apache" appear in their name, without * prior written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * <p> *  Apache软件许可证,版本1.1 * *  版权所有(c)2001 Apache软件基金会。版权所有。 * *  如果满足以下条件,则允许重新分发和使用源代码和二进制形式(带或不带修改): * *  1.源代码的再分发必须保留上述版权声明,此条件列表和以下免责声明。 * *  2.二进制形式的再分发必须在分发所提供的文档和/或其他材料中复制上述版权声明,此条件列表和以下免责声明。 * *  3.包含在重新分发中的最终用户文档(如果有)必须包括以下声明:"本产品包括由Apache Software Foundation(http://www.apache.org/)开发的软件。 * 或者,如果此类第三方确认通常出现,则此确认可能出现在软件本身中。 * *  4.未经事先书面许可,不得使用名称"Apache"和"Apache Software Foundation"和"Apache BCEL"来认可或推广从本软件衍生的产品。 * 如需书面许可,请联系apache@apache.org。 * * 未经Apache软件基金会事先书面许可,从本软件衍生的产品可能不会被称为"Apache","Apache BCEL",也不可能出现在他们的名字中。 * */ /** * IASTORE - Store into int array * <PRE>Stack: ..., arrayref, index, value -&gt; ...</PRE> * * <p> *  本软件按"原样"提供,任何明示或默示的保证,包括但不限于适销性和特定用途适用性的默示保证。 * 在任何情况下,APACHE软件基金会或其捐赠者均不对任何直接,间接,偶发,特殊,惩罚性或后果性损害(包括但不限于替代商品或服务的采购,使用,数据丢失或利润或业务中断),无论是由于任何责任推理原因,无论是 * 在合同,严格责任或侵权(包括疏忽或其他方式)中,以任何方式使用本软件,即使已被告知此类软件的可能性损伤。 *  本软件按"原样"提供,任何明示或默示的保证,包括但不限于适销性和特定用途适用性的默示保证。 * ================================================== ==================。 * *  该软件包括许多个人代表Apache软件基金会所做的自愿捐款。有关Apache Software Foundation的更多信息,请参阅<http://www.apache.org/>。 * * * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A> */ public class IASTORE extends ArrayInstruction implements StackConsumer { /** * Store into int array * <p> *  IASTORE - 存储到int数组<PRE>堆栈:...,arrayref,index,value - &gt; ... </PRE> * */ public IASTORE() { super(com.sun.org.apache.bcel.internal.Constants.IASTORE); } /** * Call corresponding visitor method(s). The order is: * Call visitor methods of implemented interfaces first, then * call methods according to the class hierarchy in descending order, * i.e., the most specific visitXXX() call comes last. * * <p> *  存储到int数组中 * * * @param v Visitor object */ public void accept(Visitor v) { v.visitStackConsumer(this); v.visitExceptionThrower(this); v.visitTypedInstruction(this); v.visitArrayInstruction(this); v.visitIASTORE(this); } }
[ "zhaobo@MacBook-Pro.local" ]
zhaobo@MacBook-Pro.local
a54b5b586b683bf19d9a483515d0fda341c75924
cc511ceb3194cfdd51f591e50e52385ba46a91b3
/example/source_code/12b8c6977953050625bf8a5c6e3607f766d9d58d/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/NodeDefImpl.java
138208ebfc85c4f1fb0f7be425167514c8475e3a
[]
no_license
huox-lamda/testing_hw
a86cdce8d92983e31e653dd460abf38b94a647e4
d41642c1e3ffa298684ec6f0196f2094527793c3
refs/heads/master
2020-04-16T19:24:49.643149
2019-01-16T15:47:13
2019-01-16T15:47:13
165,858,365
3
3
null
null
null
null
UTF-8
Java
false
false
3,627
java
org apach jackrabbit core nodetyp org apach jackrabbit qname java util arrai class implement code nodedef code interfac addition setter method node definit attribut node def impl nodedefimpl item def impl itemdefimpl node def nodedef default primari type qname default primari type defaultprimarytyp name requir primari type qname requir primari type requiredprimarytyp qname qname base base 'allowssamenamesiblings' flag sibl allowssamenames identifi node definit identifi lazili comput base characterist node definit reset attribut chang node def nodedefid default constructor node def impl nodedefimpl set default primari type param defaultnodetyp set default primari type setdefaultprimarytyp qname default node type defaultnodetyp reset field order forc lazi recomput identifi default primari type defaultprimarytyp default node type defaultnodetyp set name requir primari type param requiredprimarytyp set requir primari type setrequiredprimarytyp qname requir primari type requiredprimarytyp reset field order forc lazi recomput identifi requir primari type requiredprimarytyp illeg argument except illegalargumentexcept requiredprimarytyp null requir primari type requiredprimarytyp requir primari type requiredprimarytyp set 'allowssamenamesiblings' flag param allowssamenames set sibl setallowssamenames sibl allowssamenames reset field order forc lazi recomput identifi sibl allowssamenames sibl allowssamenames itemdefimpl overrid inheritdoc set declar node type setdeclaringnodetyp qname declar node type declaringnodetyp reset field order forc lazi recomput identifi set declar node type setdeclaringnodetyp declar node type declaringnodetyp inheritdoc set setnam qname reset field order forc lazi recomput identifi set setnam inheritdoc set auto creat setautocr auto creat autocr reset field order forc lazi recomput identifi set auto creat setautocr auto creat autocr inheritdoc set parent version setonparentvers parent version onparentvers reset field order forc lazi recomput identifi set parent version setonparentvers parent version onparentvers inheritdoc set protect setprotect write protect writeprotect reset field order forc lazi recomput identifi set protect setprotect write protect writeprotect inheritdoc set mandatori setmandatori mandatori reset field order forc lazi recomput identifi set mandatori setmandatori mandatori nodedef inheritdoc identifi comput base characterist properti definit modifi attribut properti definit impact identifi return method node def nodedefid getid gener identifi base node definit node def nodedefid inheritdoc qname default primari type getdefaultprimarytyp default primari type defaultprimarytyp inheritdoc qname requir primari type getrequiredprimarytyp requir primari type requiredprimarytyp inheritdoc sibl allowssamenames sibl allowssamenames inheritdoc return code true code defin node definesnod java lang object overrid compar node definit equal return code true code object node defint attribut node definit param obj object compar node definit return code true code object equal node definit code fals code object equal object equal object obj obj obj node def impl nodedefimpl node def impl nodedefimpl node def impl nodedefimpl obj equal obj arrai equal requir primari type requiredprimarytyp requir primari type requiredprimarytyp default primari type defaultprimarytyp default primari type defaultprimarytyp default primari type defaultprimarytyp equal default primari type defaultprimarytyp sibl allowssamenames sibl allowssamenames return satisfi object equal hashcod contract class mutabl meant hash kei return object hashcod hash code hashcod
[ "huox@lamda.nju.edu.cn" ]
huox@lamda.nju.edu.cn
c88abe14c21e561d17173362c4a9eea16c76fdb3
5e19c3b375680ec4267db1ad4c43c8b53ac00b99
/app/src/main/java/vn/com/vsc/ptpm/VNPT_DMS/view/viewevent/tmx/IDanhSachKhachHangView.java
dd8234885b2e133255e92225939849a2ff68ab49
[]
no_license
minhdn7/dms
b478214c2c6dc1c5438232830d8e873d80fa2907
8fde79c7adef24997d186a0cb4354169a4552cf5
refs/heads/master
2020-03-17T13:50:08.844025
2018-05-16T10:21:35
2018-05-16T10:21:35
133,646,559
0
1
null
null
null
null
UTF-8
Java
false
false
235
java
package vn.com.vsc.ptpm.VNPT_DMS.view.viewevent.tmx; /** * Created by MinhDN on 11/10/2017. */ public interface IDanhSachKhachHangView { void onLayKhachHangSuccess(Object object); void onLayKhachHangError(Object object); }
[ "minhdn231@gmail.com" ]
minhdn231@gmail.com
ffef12a8b07a09f87122b42e54d094580721939e
3c8c08db76a94dcf72b5873e2776f118db12ab41
/gen/com/example/ipcforsocket/R.java
60f305c0481b50c094dfcc267c6735a43e775d22
[]
no_license
yjy239/SocketTest
56bb2c96b45817a7e9b455d033fa5f0805d11f4a
b001ea1d322caa771e76b404038c0afb7f147ecc
refs/heads/master
2020-09-22T18:08:19.028791
2016-08-28T12:35:25
2016-08-28T12:35:25
66,767,054
0
0
null
null
null
null
UTF-8
Java
false
false
2,586
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package com.example.ipcforsocket; public final class R { public static final class attr { } public static final class dimen { /** Default screen margins, per the Android Design guidelines. Customize dimensions originally defined in res/values/dimens.xml (such as screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. */ public static final int activity_horizontal_margin=0x7f040000; public static final int activity_vertical_margin=0x7f040001; } public static final class drawable { public static final int ic_launcher=0x7f020000; } public static final class id { public static final int action_settings=0x7f080003; public static final int msg=0x7f080001; public static final int msg_container=0x7f080000; public static final int send=0x7f080002; } public static final class layout { public static final int activity_main=0x7f030000; } public static final class menu { public static final int main=0x7f070000; } public static final class string { public static final int action_settings=0x7f050001; public static final int app_name=0x7f050000; public static final int hello_world=0x7f050002; } public static final class style { /** Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. Theme customizations available in newer API levels can go in res/values-vXX/styles.xml, while customizations related to backward-compatibility can go here. Base application theme for API 11+. This theme completely replaces AppBaseTheme from res/values/styles.xml on API 11+ devices. API 11 theme customizations can go here. Base application theme for API 14+. This theme completely replaces AppBaseTheme from BOTH res/values/styles.xml and res/values-v11/styles.xml on API 14+ devices. API 14 theme customizations can go here. */ public static final int AppBaseTheme=0x7f060000; /** Application theme. All customizations that are NOT specific to a particular API-level can go here. */ public static final int AppTheme=0x7f060001; } }
[ "2651167692@qq.com" ]
2651167692@qq.com
050b935e595de5b34cfcc0b6a5d1142fbfeeabfd
311f1237e7498e7d1d195af5f4bcd49165afa63a
/sourcedata/poi-REL_3_0/src/contrib/src/org/apache/poi/contrib/metrics/FontMetricsDumper.java
d0080503697ae04b068529c4536137f7023c3239
[ "Apache-2.0" ]
permissive
DXYyang/SDP
86ee0e9fb7032a0638b8bd825bcf7585bccc8021
6ad0daf242d4062888ceca6d4a1bd4c41fd99b63
refs/heads/master
2023-01-11T02:29:36.328694
2019-11-02T09:38:34
2019-11-02T09:38:34
219,128,146
10
1
Apache-2.0
2023-01-02T21:53:42
2019-11-02T08:54:26
Java
UTF-8
Java
false
false
3,060
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.poi.contrib.metrics; import java.awt.*; import java.io.FileOutputStream; import java.io.IOException; import java.util.Properties; public class FontMetricsDumper { public static void main( String[] args ) throws IOException { Properties props = new Properties(); Font[] allFonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts(); for ( int i = 0; i < allFonts.length; i++ ) { String fontName = allFonts[i].getFontName(); Font font = new Font(fontName, Font.BOLD, 10); FontMetrics fontMetrics = Toolkit.getDefaultToolkit().getFontMetrics(font); int fontHeight = fontMetrics.getHeight(); props.setProperty("font." + fontName + ".height", fontHeight+""); StringBuffer characters = new StringBuffer(); for (char c = 'a'; c <= 'z'; c++) { characters.append( c + ", " ); } for (char c = 'A'; c <= 'Z'; c++) { characters.append( c + ", " ); } for (char c = '0'; c <= '9'; c++) { characters.append( c + ", " ); } StringBuffer widths = new StringBuffer(); for (char c = 'a'; c <= 'z'; c++) { widths.append( fontMetrics.getWidths()[c] + ", " ); } for (char c = 'A'; c <= 'Z'; c++) { widths.append( fontMetrics.getWidths()[c] + ", " ); } for (char c = '0'; c <= '9'; c++) { widths.append( fontMetrics.getWidths()[c] + ", " ); } props.setProperty("font." + fontName + ".characters", characters.toString()); props.setProperty("font." + fontName + ".widths", widths.toString()); } FileOutputStream fileOut = new FileOutputStream("font_metrics.properties"); try { props.store(fileOut, "Font Metrics"); } finally { fileOut.close(); } } }
[ "512463514@qq.com" ]
512463514@qq.com
80da5bfb0ec54392d99638637aba2c13bed6c69b
aee8a8979b98497031388c387d46ed31cc8d543e
/src/java/net/spy/photo/struts/KeywordCloudAction.java
385d1b966924c29fbe2d72d440da00932fe846f4
[]
no_license
cchrisscoupe/photo
272b554ad30134102ba8facb0391ca2e87b35742
2d0b4373391f69cdf033141794e377bb55a18276
refs/heads/master
2020-04-05T22:49:31.575553
2009-01-17T03:41:12
2009-01-17T03:41:12
111,720
1
0
null
null
null
null
UTF-8
Java
false
false
3,402
java
package net.spy.photo.struts; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Collection; import java.util.Iterator; import java.util.TreeSet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.spy.photo.search.KeywordMatch; import net.spy.photo.search.Search; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; /** * Compute a cloud for the top 100 keywords. */ public class KeywordCloudAction extends PhotoAction { private static final int MAX_RESULTS=100; private SearchForm getSearchForm(HttpServletRequest req) throws Exception { SearchForm sf=new SearchForm(); if(req.getParameter("recent") != null || req.getParameter("from") != null || req.getParameter("to") != null) { String dateFrom=null; String dateTo=null; if(req.getParameter("recent")!= null) { SimpleDateFormat sdf=new SimpleDateFormat("yyyy/MM/dd"); Calendar cal=Calendar.getInstance(); cal.add(Calendar.DAY_OF_MONTH, -30); dateFrom=sdf.format(cal.getTime()); } else { dateFrom=req.getParameter("from"); dateTo=req.getParameter("to"); } sf=new SearchForm(); sf.setStart(dateFrom); sf.setEnd(dateTo); sf.setOrder("a.ts"); } sf.setSdirection("desc"); return(sf); } @Override @SuppressWarnings("unchecked") protected ActionForward spyExecute(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws Exception { Collection<KeywordMatch> ts= new TreeSet<KeywordMatch>(KeywordMatch.BY_FREQUENCY); ts.addAll(Search.getInstance().getKeywordsForUser( getUser(req), getSearchForm(req))); // Make sure we don't return too many results if(ts.size() > MAX_RESULTS) { Collection<KeywordMatch> smaller=new ArrayList<KeywordMatch>(); for(Iterator<KeywordMatch> i=ts.iterator(); i.hasNext() && smaller.size() < MAX_RESULTS; ) { smaller.add(i.next()); } ts=smaller; } int sum=0; for(KeywordMatch km : ts) { sum+= km.getCount(); } Collection<KeywordMatch> buckets[]=new Collection[5]; for(int i=0; i<buckets.length; i++) { buckets[i]=new ArrayList<KeywordMatch>(); } int each=sum/buckets.length; int current=0; for(KeywordMatch km : ts) { if(sumOf(buckets[current]) + km.getCount() > each) { current++; } if(current >= buckets.length) { current=buckets.length-1; } buckets[current].add(km); } Collection<KeywordMatch> sorted =new TreeSet<KeywordMatch>(KeywordMatch.BY_KEYWORD); sorted.addAll(ts); Collection<KW> rv=new ArrayList<KW>(sorted.size()); for(KeywordMatch km : sorted) { for(int i=0; i<buckets.length; i++) { if(buckets[i].contains(km)) { rv.add(new KW(km, i)); break; } } } req.setAttribute("keywords", rv); return(mapping.findForward("next")); } private int sumOf(Collection<KeywordMatch> collection) { int sum=0; for(KeywordMatch km : collection) { sum+=km.getCount(); } return(sum); } public static class KW { private int bucket=0; private KeywordMatch kwmatch=null; public KW(KeywordMatch k, int b) { super(); bucket=b; kwmatch=k; } public int getBucket() { return bucket; } public KeywordMatch getKwmatch() { return kwmatch; } } }
[ "dustin@spy.net" ]
dustin@spy.net
f3a0767e308a167235a26bf0ff2f2510f032cd6d
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/plugin/appbrand/media/record/g$5.java
1814c3998b31b1f9e92e588f218f03d87805a165
[]
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
1,471
java
package com.tencent.mm.plugin.appbrand.media.record; import android.os.Looper; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.g.a.mb; import com.tencent.mm.plugin.appbrand.media.record.a.c.a; import com.tencent.mm.plugin.appbrand.media.record.record_imp.RecordParam; import com.tencent.mm.sdk.b.a; import com.tencent.mm.sdk.platformtools.ab; final class g$5 implements c.a { g$5(g paramg) { } public final void d(byte[] paramArrayOfByte, int paramInt, boolean paramBoolean) { AppMethodBeat.i(105607); Object localObject = this.ilC; ab.i("MicroMsg.Record.AudioRecordMgr", "onFrameRecorded buffSize:%d, isLastFrameL:%b", new Object[] { Integer.valueOf(paramInt), Boolean.valueOf(paramBoolean) }); mb localmb = new mb(); localmb.cHS.state = "frameRecorded"; if (((g)localObject).ilo != null) localmb.cHS.appId = ((g)localObject).ilo.appId; localmb.cHS.action = 5; localObject = new byte[paramInt]; System.arraycopy(paramArrayOfByte, 0, localObject, 0, paramInt); localmb.cHS.frameBuffer = ((byte[])localObject); localmb.cHS.cHT = paramBoolean; a.xxA.a(localmb, Looper.getMainLooper()); AppMethodBeat.o(105607); } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes5-dex2jar.jar * Qualified Name: com.tencent.mm.plugin.appbrand.media.record.g.5 * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
491a876a5b521fe04c1bb0439f5be955f2b24711
273fdf80a1a6a8fa5e8acfc13c8fe5f0843d8ba4
/plugins/eeui/framework/android/src/main/java/app/eeui/framework/extend/integration/glide/load/ImageHeaderParserUtils.java
a2304e39ba5648a6f8236e2ec96eb40d26ad4de6
[ "MIT" ]
permissive
kuaifan/eeui-template
9cdacc749be8acbd2f9c675b2dedf3f3a4651dc1
ba7ee45b60abd30df64ea599929f44f5dd9d0a1c
refs/heads/master
2022-06-05T10:08:48.978982
2022-05-18T08:01:56
2022-05-18T08:01:56
190,676,484
52
31
MIT
2022-03-30T10:04:07
2019-06-07T02:12:39
C++
UTF-8
Java
false
false
3,187
java
package app.eeui.framework.extend.integration.glide.load; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import app.eeui.framework.extend.integration.glide.load.ImageHeaderParser.ImageType; import app.eeui.framework.extend.integration.glide.load.engine.bitmap_recycle.ArrayPool; import app.eeui.framework.extend.integration.glide.load.resource.bitmap.RecyclableBufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; import java.util.List; /** * Utilities for the ImageHeaderParser. */ public final class ImageHeaderParserUtils { // 5MB. This is the max image header size we can handle, we preallocate a much smaller buffer but // will resize up to this amount if necessary. private static final int MARK_POSITION = 5 * 1024 * 1024; private ImageHeaderParserUtils() { } /** Returns the ImageType for the given InputStream. */ @NonNull public static ImageType getType(@NonNull List<ImageHeaderParser> parsers, @Nullable InputStream is, @NonNull ArrayPool byteArrayPool) throws IOException { if (is == null) { return ImageType.UNKNOWN; } if (!is.markSupported()) { is = new RecyclableBufferedInputStream(is, byteArrayPool); } is.mark(MARK_POSITION); //noinspection ForLoopReplaceableByForEach to improve perf for (int i = 0, size = parsers.size(); i < size; i++) { ImageHeaderParser parser = parsers.get(i); try { ImageType type = parser.getType(is); if (type != ImageType.UNKNOWN) { return type; } } finally { is.reset(); } } return ImageType.UNKNOWN; } /** Returns the ImageType for the given ByteBuffer. */ @NonNull public static ImageType getType(@NonNull List<ImageHeaderParser> parsers, @Nullable ByteBuffer buffer) throws IOException { if (buffer == null) { return ImageType.UNKNOWN; } //noinspection ForLoopReplaceableByForEach to improve perf for (int i = 0, size = parsers.size(); i < size; i++) { ImageHeaderParser parser = parsers.get(i); ImageType type = parser.getType(buffer); if (type != ImageType.UNKNOWN) { return type; } } return ImageType.UNKNOWN; } /** * Returns the orientation for the given InputStream. */ public static int getOrientation(@NonNull List<ImageHeaderParser> parsers, @Nullable InputStream is, @NonNull ArrayPool byteArrayPool) throws IOException { if (is == null) { return ImageHeaderParser.UNKNOWN_ORIENTATION; } if (!is.markSupported()) { is = new RecyclableBufferedInputStream(is, byteArrayPool); } is.mark(MARK_POSITION); //noinspection ForLoopReplaceableByForEach to improve perf for (int i = 0, size = parsers.size(); i < size; i++) { ImageHeaderParser parser = parsers.get(i); try { int orientation = parser.getOrientation(is, byteArrayPool); if (orientation != ImageHeaderParser.UNKNOWN_ORIENTATION) { return orientation; } } finally { is.reset(); } } return ImageHeaderParser.UNKNOWN_ORIENTATION; } }
[ "aipaw@live.cn" ]
aipaw@live.cn
70cc0eb97c05841ad8ad071d68775e4b427c499f
c3a3965415bd37d6e11c797fc3e5c34256c8334f
/01-hello-spring/src/test/java/com/itutry/hellospring/HelloSpringApplicationTests.java
e742f96bff57ecd3fcb203b3f79309423265a209
[]
no_license
china-university-mooc/spring-family-geektime
61f994a14777aa84fee81018f54b4687af9c1f50
534d3d06dad1fcb5bb292a327abd2aa3c6f7cce8
refs/heads/master
2022-11-25T13:07:17.402366
2020-07-30T09:32:51
2020-07-30T09:32:51
283,729,234
0
0
null
null
null
null
UTF-8
Java
false
false
219
java
package com.itutry.hellospring; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class HelloSpringApplicationTests { @Test void contextLoads() { } }
[ "zhaozhang@thoughtworks.com" ]
zhaozhang@thoughtworks.com
180b81fe65f2fc6009636e6f45939009c4f935a3
d61eb73f504248f9244185739430d3ad244b0a6a
/src/test/java/es/rickyepoderi/wbxml/bind/wvcsp/MCLS.java
7fe74676436ef007b0cb1a94d4fea98b0e21e5ac
[ "Apache-2.0" ]
permissive
Autom-liu/SMSGate
35531b1a285144e669a2fdf472535b99f261ab27
d0f2df1441734f39fbf39e973686e09201ac22f8
refs/heads/netty4
2020-11-25T12:50:32.257897
2020-08-26T12:57:16
2020-08-26T12:57:16
228,670,614
1
0
Apache-2.0
2020-08-26T12:57:18
2019-12-17T17:44:17
null
UTF-8
Java
false
false
701
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 // 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.08.25 at 05:48:09 PM CEST // package es.rickyepoderi.wbxml.bind.wvcsp; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") @XmlRootElement(name = "MCLS") public class MCLS { }
[ "jameslover121@163.com" ]
jameslover121@163.com
7bffb64a9242378ee0d3de560cb19b1f0e081910
6b2c327a1523ee8ba97d308ead5fb6050156062a
/src/com/javarush/test/level20/lesson04/task01/Solution.java
1ca196fe182b01a21fc25ef832fa38aa5a35c423
[]
no_license
uneikov/JavaRushHomeWork
d987413df192f0dbb9df4a59f561fcca467724a3
454c16d7ed5518ce38ef9a876c21f0075a5913b5
refs/heads/master
2020-12-24T17:26:42.804524
2017-02-07T15:28:20
2017-02-07T15:28:20
61,533,062
0
0
null
null
null
null
UTF-8
Java
false
false
1,247
java
package com.javarush.test.level20.lesson04.task01; import java.io.*; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /* Как сериализовать? Сделайте так, чтобы сериализация класса Human была возможной */ public class Solution { public static class Human implements Serializable{ public String name; public List<Asset> assets = new ArrayList<>(); public Human() { } public Human(String name, Asset... assets) { this.name = name; if (assets != null) { this.assets.addAll(Arrays.asList(assets)); } } public void save(OutputStream outputStream) throws Exception { ObjectOutputStream objStream = new ObjectOutputStream(outputStream); if (name != null) objStream.writeObject(this); objStream.flush(); } public void load(InputStream inputStream) throws Exception { ObjectInputStream objStream = new ObjectInputStream(inputStream); Human human = (Human) objStream.readObject(); this.name = human.name; this.assets = human.assets; } } }
[ "neikov@gmail.com" ]
neikov@gmail.com
bc507527b9e34176eced2f7e2de8cd39ba89b6dd
431d8362e87e61ee568d79c57e13c4a0b0e02d2e
/lara/sep-4th batch/java/39.Object class/Garbage Collectors/src/M2.java
bcd74ccb603c49fc70fe373354c12a124b44755c
[]
no_license
svsaikumar/lara
09b3fa9fb2fcee70840d02bdce56148f3a3bf259
ed0bfbdfa0a0e668c6ffdd720d80551e03bb93db
refs/heads/master
2020-03-27T08:53:34.246569
2018-08-27T13:56:22
2018-08-27T13:56:22
146,295,997
0
0
null
null
null
null
UTF-8
Java
false
false
688
java
class A { A obj; protected void finalize()//overriding finalize method of object class { System.out.println("from finalize()"); } } class M2 { public static void main(String[] args) { A a1 = new A(); A a2 = new A(); A a3 = new A(); a1.obj = a2; a2.obj = a3; a3.obj = a1; //a1 = a2 = a3 = null;//all objects are abonded here a1 = a3 = null;//objects are not abonded here //System.gc();//calling gc Runtime.getRuntime().gc();//calling gc try { Thread.sleep(10);//main thread sleeping for 10ms(optional) } catch (InterruptedException ex) { } System.out.println("done"); } } //here object can't be reached from main method //island of isolation
[ "saikumarsv77@gmail.com" ]
saikumarsv77@gmail.com
d0f4985659749a2870e392690631c53784c47898
ac194cbd5cbfbdb9c227d890cc7fd2a09aabd75e
/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/ttl/DataTTLKeeperTimer.java
98a08b3eb7f8c46de7a0464ddcc0fabd73c72920
[ "BSD-3-Clause", "MIT", "Apache-2.0" ]
permissive
wansongzhang/incubator-skywalking
c0ed7f8a1761b39ca47b893951dfca3c2c7cf2c9
7bb577a4e900c7f747a3e665b448f1ca1d93c415
refs/heads/master
2020-04-02T13:17:45.645951
2018-10-22T12:20:29
2018-10-22T12:20:29
154,475,292
1
0
Apache-2.0
2018-10-24T09:34:39
2018-10-24T09:34:39
null
UTF-8
Java
false
false
6,205
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.skywalking.oap.server.core.storage.ttl; import java.io.IOException; import java.util.List; import java.util.concurrent.*; import lombok.Setter; import org.apache.skywalking.apm.util.RunnableWithExceptionProtection; import org.apache.skywalking.oap.server.core.*; import org.apache.skywalking.oap.server.core.analysis.indicator.Indicator; import org.apache.skywalking.oap.server.core.analysis.record.Record; import org.apache.skywalking.oap.server.core.cluster.*; import org.apache.skywalking.oap.server.core.config.DownsamplingConfigService; import org.apache.skywalking.oap.server.core.storage.*; import org.apache.skywalking.oap.server.core.storage.model.*; import org.apache.skywalking.oap.server.library.module.ModuleManager; import org.apache.skywalking.oap.server.library.util.CollectionUtils; import org.joda.time.DateTime; import org.slf4j.*; /** * @author peng-yongsheng */ public enum DataTTLKeeperTimer { INSTANCE; private static final Logger logger = LoggerFactory.getLogger(DataTTLKeeperTimer.class); private ModuleManager moduleManager; private ClusterNodesQuery clusterNodesQuery; @Setter private DataTTL dataTTL; public void start(ModuleManager moduleManager) { this.moduleManager = moduleManager; this.clusterNodesQuery = moduleManager.find(ClusterModule.NAME).getService(ClusterNodesQuery.class); Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate( new RunnableWithExceptionProtection(this::delete, t -> logger.error("Remove data in background failure.", t)), 1, 5, TimeUnit.MINUTES); } private void delete() { List<RemoteInstance> remoteInstances = clusterNodesQuery.queryRemoteNodes(); if (CollectionUtils.isNotEmpty(remoteInstances) && !remoteInstances.get(0).isSelf()) { logger.info("The selected first address is {}. Skip.", remoteInstances.get(0).toString()); return; } TimeBuckets timeBuckets = convertTimeBucket(new DateTime()); logger.info("Beginning to remove expired metrics from the storage."); logger.info("Metrics in minute dimension before {}, are going to be removed.", timeBuckets.minuteTimeBucketBefore); logger.info("Metrics in hour dimension before {}, are going to be removed.", timeBuckets.hourTimeBucketBefore); logger.info("Metrics in day dimension before {}, are going to be removed.", timeBuckets.dayTimeBucketBefore); logger.info("Metrics in month dimension before {}, are going to be removed.", timeBuckets.monthTimeBucketBefore); IModelGetter modelGetter = moduleManager.find(CoreModule.NAME).getService(IModelGetter.class); DownsamplingConfigService downsamplingConfigService = moduleManager.find(CoreModule.NAME).getService(DownsamplingConfigService.class); List<Model> models = modelGetter.getModels(); models.forEach(model -> { if (model.isIndicator()) { execute(model.getName(), timeBuckets.minuteTimeBucketBefore, Indicator.TIME_BUCKET); if (downsamplingConfigService.shouldToHour()) { execute(model.getName() + Const.ID_SPLIT + Downsampling.Hour.getName(), timeBuckets.hourTimeBucketBefore, Indicator.TIME_BUCKET); } if (downsamplingConfigService.shouldToDay()) { execute(model.getName() + Const.ID_SPLIT + Downsampling.Day.getName(), timeBuckets.dayTimeBucketBefore, Indicator.TIME_BUCKET); } if (downsamplingConfigService.shouldToMonth()) { execute(model.getName() + Const.ID_SPLIT + Downsampling.Month.getName(), timeBuckets.monthTimeBucketBefore, Indicator.TIME_BUCKET); } } else { execute(model.getName(), timeBuckets.recordDataTTL, Record.TIME_BUCKET); } }); } TimeBuckets convertTimeBucket(DateTime currentTime) { TimeBuckets timeBuckets = new TimeBuckets(); timeBuckets.recordDataTTL = Long.valueOf(currentTime.plusMinutes(0 - dataTTL.getRecordDataTTL()).toString("yyyyMMddHHmm")); timeBuckets.minuteTimeBucketBefore = Long.valueOf(currentTime.plusMinutes(0 - dataTTL.getMinuteMetricsDataTTL()).toString("yyyyMMddHHmm")); timeBuckets.hourTimeBucketBefore = Long.valueOf(currentTime.plusHours(0 - dataTTL.getHourMetricsDataTTL()).toString("yyyyMMddHH")); timeBuckets.dayTimeBucketBefore = Long.valueOf(currentTime.plusDays(0 - dataTTL.getDayMetricsDataTTL()).toString("yyyyMMdd")); timeBuckets.monthTimeBucketBefore = Long.valueOf(currentTime.plusMonths(0 - dataTTL.getMonthMetricsDataTTL()).toString("yyyyMM")); return timeBuckets; } private void execute(String modelName, long timeBucketBefore, String timeBucketColumnName) { try { moduleManager.find(StorageModule.NAME).getService(IHistoryDeleteDAO.class).deleteHistory(modelName, timeBucketColumnName, timeBucketBefore); } catch (IOException e) { logger.warn("History delete failure, error message: {}", e.getMessage()); } } class TimeBuckets { private long recordDataTTL; private long minuteTimeBucketBefore; private long hourTimeBucketBefore; private long dayTimeBucketBefore; private long monthTimeBucketBefore; } }
[ "wu.sheng@foxmail.com" ]
wu.sheng@foxmail.com
ef08940c1af6192e3ae90bba11a9a2d8611f8f1d
7559bead0c8a6ad16f016094ea821a62df31348a
/src/com/vmware/vim25/LoginBySSPIRequestType.java
953d8f9d6a72ea751829ae5c8f393ccefb69cacc
[]
no_license
ZhaoxuepengS/VsphereTest
09ba2af6f0a02d673feb9579daf14e82b7317c36
59ddb972ce666534bf58d84322d8547ad3493b6e
refs/heads/master
2021-07-21T13:03:32.346381
2017-11-01T12:30:18
2017-11-01T12:30:18
109,128,993
1
1
null
null
null
null
UTF-8
Java
false
false
2,748
java
package com.vmware.vim25; 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 LoginBySSPIRequestType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="LoginBySSPIRequestType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="_this" type="{urn:vim25}ManagedObjectReference"/> * &lt;element name="base64Token" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="locale" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "LoginBySSPIRequestType", propOrder = { "_this", "base64Token", "locale" }) public class LoginBySSPIRequestType { @XmlElement(required = true) protected ManagedObjectReference _this; @XmlElement(required = true) protected String base64Token; protected String locale; /** * Gets the value of the this property. * * @return * possible object is * {@link ManagedObjectReference } * */ public ManagedObjectReference getThis() { return _this; } /** * Sets the value of the this property. * * @param value * allowed object is * {@link ManagedObjectReference } * */ public void setThis(ManagedObjectReference value) { this._this = value; } /** * Gets the value of the base64Token property. * * @return * possible object is * {@link String } * */ public String getBase64Token() { return base64Token; } /** * Sets the value of the base64Token property. * * @param value * allowed object is * {@link String } * */ public void setBase64Token(String value) { this.base64Token = value; } /** * Gets the value of the locale property. * * @return * possible object is * {@link String } * */ public String getLocale() { return locale; } /** * Sets the value of the locale property. * * @param value * allowed object is * {@link String } * */ public void setLocale(String value) { this.locale = value; } }
[ "495149700@qq.com" ]
495149700@qq.com
658bd3bcc686dbd3a8070749151bf4951d4fa2a6
62774e6de56acf8c4d4d014f1f5ee709feef6502
/car-dealer2/src/main/java/org/softuni/cardealer/web/controllers/SuppliersController.java
20a30002439d494eabe9b1f396145be5a4482c58
[]
no_license
Chris-Mk/Hibernate
35a9c42679ad6d20925c96d6d3929ad86649f700
eb338734c0136d5292e06f7ab2688e4fda31d93c
refs/heads/master
2023-07-24T00:20:36.222180
2023-07-19T19:29:16
2023-07-19T19:29:16
205,900,454
0
0
null
2023-07-19T19:29:18
2019-09-02T16:56:37
Java
UTF-8
Java
false
false
2,766
java
package org.softuni.cardealer.web.controllers; import org.modelmapper.ModelMapper; import org.softuni.cardealer.domain.models.binding.AddSupplierBindingModel; import org.softuni.cardealer.domain.models.service.SupplierServiceModel; import org.softuni.cardealer.service.SupplierService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Controller; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; import javax.validation.Valid; import java.util.List; @Controller @RequestMapping("/suppliers") public class SuppliersController extends BaseController { private final SupplierService supplierService; private final ModelMapper modelMapper; @Autowired public SuppliersController(SupplierService supplierService, ModelMapper modelMapper) { this.supplierService = supplierService; this.modelMapper = modelMapper; } @PostMapping("/add") public ModelAndView addSupplier(@Valid @ModelAttribute AddSupplierBindingModel bindingModel, BindingResult bindingResult) { if(bindingResult.hasErrors()) { throw new IllegalArgumentException(); //TODO: DO SOMETHING } this.supplierService.saveSupplier(this.modelMapper.map(bindingModel, SupplierServiceModel.class)); return this.redirect("all"); } @ExceptionHandler(IllegalArgumentException.class) @ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = "Invalid data provided!") public String exceptionHandler(IllegalArgumentException ex) { return ex.getMessage(); } @PostMapping("/edit/{id}") public ModelAndView editSupplier(@PathVariable String id, @Valid @ModelAttribute AddSupplierBindingModel bindingModel, BindingResult bindingResult) { if(bindingResult.hasErrors()) { //TODO: DO SOMETHING } this.supplierService.editSupplier(id, this.modelMapper.map(bindingModel, SupplierServiceModel.class)); return this.redirect("/suppliers/all"); } @PostMapping("/delete/{id}") public ModelAndView deleteSupplier(@PathVariable String id) { this.supplierService.deleteSupplier(id); return this.redirect("/suppliers/all"); } @GetMapping("/all") public ModelAndView allSuppliers(ModelAndView modelAndView) { modelAndView.addObject("suppliers", this.supplierService.findAll()); return this.view("all-suppliers", modelAndView); } @GetMapping("/fetch") @ResponseBody public List<SupplierServiceModel> fetchSuppliers() { return this.supplierService.findAll(); } }
[ "chrismks23@gmail.com" ]
chrismks23@gmail.com
cf83377fc686f31bfef158108cc44a58819ddf18
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project179/src/test/java/org/gradle/test/performance/largejavamultiproject/project179/p898/Test17979.java
c8ee12b86cb00db444814fe59307d10460aac70f
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
2,272
java
package org.gradle.test.performance.largejavamultiproject.project179.p898; import org.gradle.test.performance.largejavamultiproject.project179.p897.Production17952; import org.junit.Test; import static org.junit.Assert.*; public class Test17979 { Production17979 objectUnderTest = new Production17979(); @Test public void testProperty0() { Production17952 value = new Production17952(); objectUnderTest.setProperty0(value); assertEquals(value, objectUnderTest.getProperty0()); } @Test public void testProperty1() { Production17965 value = new Production17965(); objectUnderTest.setProperty1(value); assertEquals(value, objectUnderTest.getProperty1()); } @Test public void testProperty2() { Production17978 value = new Production17978(); objectUnderTest.setProperty2(value); assertEquals(value, objectUnderTest.getProperty2()); } @Test public void testProperty3() { String value = "value"; objectUnderTest.setProperty3(value); assertEquals(value, objectUnderTest.getProperty3()); } @Test public void testProperty4() { String value = "value"; objectUnderTest.setProperty4(value); assertEquals(value, objectUnderTest.getProperty4()); } @Test public void testProperty5() { String value = "value"; objectUnderTest.setProperty5(value); assertEquals(value, objectUnderTest.getProperty5()); } @Test public void testProperty6() { String value = "value"; objectUnderTest.setProperty6(value); assertEquals(value, objectUnderTest.getProperty6()); } @Test public void testProperty7() { String value = "value"; objectUnderTest.setProperty7(value); assertEquals(value, objectUnderTest.getProperty7()); } @Test public void testProperty8() { String value = "value"; objectUnderTest.setProperty8(value); assertEquals(value, objectUnderTest.getProperty8()); } @Test public void testProperty9() { String value = "value"; objectUnderTest.setProperty9(value); assertEquals(value, objectUnderTest.getProperty9()); } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
50cbbc2587486da7cd74aec745fda751814280d0
e784d1f79820a163b58257875192acdbaf1d5acc
/dotoyo_hr/src/com/dotoyo/buildjob/certificateCenter/dto/HotCertDto.java
3580bfffd8a6723be9ec3b9634b8dc0b0973b7ea
[]
no_license
reaganjava/hr
e8e0198f0b265aa3a83f6772726f6517f33cbe3e
8bb5ec41ebb1c0c311b68d67984fcc9037a458ab
refs/heads/master
2020-04-06T03:33:39.926183
2013-06-24T10:19:18
2013-06-24T10:19:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,210
java
package com.dotoyo.buildjob.certificateCenter.dto; import java.io.Serializable; import org.apache.commons.beanutils.BeanUtils; import org.apache.log4j.Logger; import com.dotoyo.buildjob.common.constant.ApplicationConstant; public class HotCertDto implements Serializable { /** * */ private static final long serialVersionUID = 7141792024866083592L; private Long id; private String certCode;// 证书编码 public HotCertDto() { } /** * @return the id */ public Long getId() { return id; } /** * @param id * the id to set */ public void setId(Long id) { this.id = id; } /** * @return the certCode */ public String getCertCode() { return certCode == null ? "" : certCode.trim(); } /** * @param certCode * the certCode to set */ public void setCertCode(String certCode) { this.certCode = certCode; } @Override public String toString() { try { return BeanUtils.describe(this).toString(); } catch (Exception e) { Logger.getLogger(this.getClass()).error( ApplicationConstant.ERROR_CONVERTING_OBJECT_TO_STRING, e); } return super.toString(); } }
[ "reaganjava@gmail.com" ]
reaganjava@gmail.com
0d984093940b16796bce7812d2cb05c2e97e5ab5
36f11aea4016d8fec2611b651dbdc92f489ea350
/nacid/src/com/nacid/bl/applications/Person.java
97007c0629ff04aa28584199abe4e88d53eb7178
[ "MIT" ]
permissive
governmentbg/NACID-DOCTORS-TITLES
a91eecfee6d6510ace5499a18c4dbe25680743be
72b79b14af654573e5d23e0048adeac20d06696a
refs/heads/master
2022-12-03T22:39:48.965063
2020-08-28T07:11:13
2020-08-28T07:11:13
281,618,972
0
0
null
null
null
null
UTF-8
Java
false
false
344
java
package com.nacid.bl.applications; import com.nacid.bl.applications.base.PersonBase; import com.nacid.bl.nomenclatures.Country; import com.nacid.bl.nomenclatures.FlatNomenclature; public interface Person extends PersonBase { public Country getBirthCountry(); public Country getCitizenship(); public PersonDocument getPersonDocument(); }
[ "vcankova@nacid.bg" ]
vcankova@nacid.bg
f7bcaabe0e5bb55cb45d67fd2b56344a7c594dab
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mobileqqi/classes.jar/QQService/REPLYCODE.java
995544c8a06e716b25062817e8bababcd5aaf565
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
3,302
java
package QQService; import java.io.Serializable; public final class REPLYCODE implements Serializable { public static final REPLYCODE REPLYCODE_ERROR_EXCEPTION; public static final REPLYCODE REPLYCODE_ERROR_FUNCNAME; public static final REPLYCODE REPLYCODE_ERR_FAVOR_OVERLIMIT; public static final REPLYCODE REPLYCODE_ERR_FILTERED; public static final REPLYCODE REPLYCODE_ERR_LABLE_WRONG; public static final REPLYCODE REPLYCODE_ERR_PIC_OVERLIMIT; public static final REPLYCODE REPLYCODE_ERR_UIN_INVALID; public static final REPLYCODE REPLYCODE_ERR_VOTED; public static final REPLYCODE REPLYCODE_SUCC; public static final int _REPLYCODE_ERROR_EXCEPTION = 1; public static final int _REPLYCODE_ERROR_FUNCNAME = 2; public static final int _REPLYCODE_ERR_FAVOR_OVERLIMIT = 53; public static final int _REPLYCODE_ERR_FILTERED = 56; public static final int _REPLYCODE_ERR_LABLE_WRONG = 52; public static final int _REPLYCODE_ERR_PIC_OVERLIMIT = 55; public static final int _REPLYCODE_ERR_UIN_INVALID = 54; public static final int _REPLYCODE_ERR_VOTED = 51; public static final int _REPLYCODE_SUCC = 0; private static REPLYCODE[] a; private String __T = new String(); private int __value; static { if (!REPLYCODE.class.desiredAssertionStatus()) {} for (boolean bool = true;; bool = false) { $assertionsDisabled = bool; a = new REPLYCODE[9]; REPLYCODE_SUCC = new REPLYCODE(0, 0, "REPLYCODE_SUCC"); REPLYCODE_ERROR_EXCEPTION = new REPLYCODE(1, 1, "REPLYCODE_ERROR_EXCEPTION"); REPLYCODE_ERROR_FUNCNAME = new REPLYCODE(2, 2, "REPLYCODE_ERROR_FUNCNAME"); REPLYCODE_ERR_VOTED = new REPLYCODE(3, 51, "REPLYCODE_ERR_VOTED"); REPLYCODE_ERR_LABLE_WRONG = new REPLYCODE(4, 52, "REPLYCODE_ERR_LABLE_WRONG"); REPLYCODE_ERR_FAVOR_OVERLIMIT = new REPLYCODE(5, 53, "REPLYCODE_ERR_FAVOR_OVERLIMIT"); REPLYCODE_ERR_UIN_INVALID = new REPLYCODE(6, 54, "REPLYCODE_ERR_UIN_INVALID"); REPLYCODE_ERR_PIC_OVERLIMIT = new REPLYCODE(7, 55, "REPLYCODE_ERR_PIC_OVERLIMIT"); REPLYCODE_ERR_FILTERED = new REPLYCODE(8, 56, "REPLYCODE_ERR_FILTERED"); return; } } private REPLYCODE(int paramInt1, int paramInt2, String paramString) { this.__T = paramString; this.__value = paramInt2; a[paramInt1] = this; } public static REPLYCODE convert(int paramInt) { int i = 0; while (i < a.length) { if (a[i].value() == paramInt) { return a[i]; } i += 1; } if (!$assertionsDisabled) { throw new AssertionError(); } return null; } public static REPLYCODE convert(String paramString) { int i = 0; while (i < a.length) { if (a[i].toString().equals(paramString)) { return a[i]; } i += 1; } if (!$assertionsDisabled) { throw new AssertionError(); } return null; } public String toString() { return this.__T; } public int value() { return this.__value; } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mobileqqi\classes2.jar * Qualified Name: QQService.REPLYCODE * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
2315fed3861afe51984216e3fea4f37b7d3c676e
882a1a28c4ec993c1752c5d3c36642fdda3d8fad
/proxies/com/microsoft/bingads/v12/campaignmanagement/TargetSettingDetail.java
26d54a6c72439f9ded1365aedeaac62f1f574d13
[ "MIT" ]
permissive
BazaRoi/BingAds-Java-SDK
640545e3595ed4e80f5a1cd69bf23520754c4697
e30e5b73c01113d1c523304860180f24b37405c7
refs/heads/master
2020-07-26T08:11:14.446350
2019-09-10T03:25:30
2019-09-10T03:25:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,453
java
package com.microsoft.bingads.v12.campaignmanagement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for TargetSettingDetail complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="TargetSettingDetail"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="CriterionTypeGroup" type="{https://bingads.microsoft.com/CampaignManagement/v12}CriterionTypeGroup" minOccurs="0"/> * &lt;element name="TargetAndBid" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "TargetSettingDetail", propOrder = { "criterionTypeGroup", "targetAndBid" }) public class TargetSettingDetail { @XmlElement(name = "CriterionTypeGroup") @XmlSchemaType(name = "string") protected CriterionTypeGroup criterionTypeGroup; @XmlElement(name = "TargetAndBid") protected Boolean targetAndBid; /** * Gets the value of the criterionTypeGroup property. * * @return * possible object is * {@link CriterionTypeGroup } * */ public CriterionTypeGroup getCriterionTypeGroup() { return criterionTypeGroup; } /** * Sets the value of the criterionTypeGroup property. * * @param value * allowed object is * {@link CriterionTypeGroup } * */ public void setCriterionTypeGroup(CriterionTypeGroup value) { this.criterionTypeGroup = value; } /** * Gets the value of the targetAndBid property. * * @return * possible object is * {@link Boolean } * */ public Boolean getTargetAndBid() { return targetAndBid; } /** * Sets the value of the targetAndBid property. * * @param value * allowed object is * {@link Boolean } * */ public void setTargetAndBid(Boolean value) { this.targetAndBid = value; } }
[ "qitia@microsoft.com" ]
qitia@microsoft.com
0490ec8f4b7f682bacb72b3185742e5965c39335
b128470fef51846468c4bd71987039505c5ac10e
/src/main/java/com/hivemq/extensions/client/parameter/TlsInformationImpl.java
52af8b90f979987eb467a079e362aa22e3255b53
[ "Apache-2.0" ]
permissive
Quandt2k/hivemq-community-edition
1efda0e6e51799621100c0c787a927af975e40cc
9297c8ed7c89c8fb22179050f171465151e06d6d
refs/heads/master
2022-01-28T17:10:35.701645
2019-08-12T10:05:56
2019-08-12T10:05:56
201,237,692
0
1
Apache-2.0
2022-01-14T07:51:14
2019-08-08T10:44:57
Java
UTF-8
Java
false
false
2,371
java
/* * Copyright 2019 dc-square GmbH * * 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.hivemq.extensions.client.parameter; import com.google.common.base.Preconditions; import com.hivemq.annotations.NotNull; import com.hivemq.extension.sdk.api.client.parameter.TlsInformation; import java.security.cert.X509Certificate; /** * @author Florian Limpöck * @since 4.0.0 */ public class TlsInformationImpl implements TlsInformation { private final @NotNull X509Certificate certificate; private final @NotNull X509Certificate[] certificateChain; private final @NotNull String cipherSuite; private final @NotNull String protocol; public TlsInformationImpl(final @NotNull X509Certificate certificate, final @NotNull X509Certificate[] certificateChain, final @NotNull String cipherSuite, final @NotNull String protocol) { Preconditions.checkNotNull(certificate, "certificate must never be null"); Preconditions.checkNotNull(certificateChain, "certificate chain must never be null"); Preconditions.checkNotNull(cipherSuite, "cipher suite must never be null"); Preconditions.checkNotNull(protocol, "protocol must never be null"); this.certificate = certificate; this.certificateChain = certificateChain; this.cipherSuite = cipherSuite; this.protocol = protocol; } @Override public @NotNull X509Certificate getCertificate() { return certificate; } @Override public @NotNull X509Certificate[] getCertificateChain() { return certificateChain; } @Override public @NotNull String getCipherSuite() { return cipherSuite; } @Override public @NotNull String getProtocol() { return protocol; } }
[ "florian.limpoeck@gmail.com" ]
florian.limpoeck@gmail.com
be6e7c801b3e5a7c988662885bea4df245340cef
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_51630.java
fa90e6c4536108cf20789354ed16bf5a8df23f38
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
414
java
static Node getCompilationUnit(LanguageVersionHandler languageVersionHandler,String code){ Parser parser=languageVersionHandler.getParser(languageVersionHandler.getDefaultParserOptions()); Node node=parser.parse(null,new StringReader(code)); languageVersionHandler.getSymbolFacade().start(node); languageVersionHandler.getTypeResolutionFacade(Designer.class.getClassLoader()).start(node); return node; }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
16e7b401780ff7f396b7b5db6b23d07793bd1f93
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/jaxrs-resteasy-eap/generated/src/gen/java/org/openapitools/model/ComAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImplInfo.java
a93504ba4ce9b9cb249fef6d4cc705f09d9b6d86
[ "Apache-2.0" ]
permissive
shinesolutions/swagger-aem-osgi
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
c2f6e076971d2592c1cbd3f70695c679e807396b
refs/heads/master
2022-10-29T13:07:40.422092
2021-04-09T07:46:03
2021-04-09T07:46:03
190,217,155
3
3
Apache-2.0
2022-10-05T03:26:20
2019-06-04T14:23:28
null
UTF-8
Java
false
false
3,594
java
package org.openapitools.model; import java.util.Objects; import java.util.ArrayList; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.openapitools.model.ComAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImplProperties; import javax.validation.constraints.*; import io.swagger.annotations.*; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyEapServerCodegen", date = "2019-08-05T01:00:05.540Z[GMT]") public class ComAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImplInfo { private String pid = null; private String title = null; private String description = null; private ComAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImplProperties properties = null; /** **/ @ApiModelProperty(value = "") @JsonProperty("pid") public String getPid() { return pid; } public void setPid(String pid) { this.pid = pid; } /** **/ @ApiModelProperty(value = "") @JsonProperty("title") public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } /** **/ @ApiModelProperty(value = "") @JsonProperty("description") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } /** **/ @ApiModelProperty(value = "") @JsonProperty("properties") public ComAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImplProperties getProperties() { return properties; } public void setProperties(ComAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImplProperties properties) { this.properties = properties; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ComAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImplInfo comAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImplInfo = (ComAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImplInfo) o; return Objects.equals(pid, comAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImplInfo.pid) && Objects.equals(title, comAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImplInfo.title) && Objects.equals(description, comAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImplInfo.description) && Objects.equals(properties, comAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImplInfo.properties); } @Override public int hashCode() { return Objects.hash(pid, title, description, properties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ComAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImplInfo {\n"); sb.append(" pid: ").append(toIndentedString(pid)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
40fa17645b5a69d84fa82c0269188ffebe37a02b
b4cc861bf70792e1e587efe827dfdb0157442e95
/mcp62/src/minecraft/net/minecraft/src/ItemSaddle.java
5cd261bf39f26c2ca362958e00c7b9d85ae9b8bb
[]
no_license
popnob/ooptest
8c61729343bf0ed113c3038b5a0f681387805ef7
856b396adfe5bb3a2dbdca0e22ea724776d2ce8a
refs/heads/master
2021-01-23T08:04:35.318303
2012-05-30T18:05:25
2012-05-30T18:05:25
4,483,121
4
0
null
null
null
null
UTF-8
Java
false
false
1,031
java
package net.minecraft.src; public class ItemSaddle extends Item { public ItemSaddle(int par1) { super(par1); maxStackSize = 1; } /** * Called when a player right clicks a entity with a item. */ public void useItemOnEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving) { if (par2EntityLiving instanceof EntityPig) { EntityPig entitypig = (EntityPig)par2EntityLiving; if (!entitypig.getSaddled() && !entitypig.isChild()) { entitypig.setSaddled(true); par1ItemStack.stackSize--; } } } /** * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise * the damage on the stack. */ public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving) { useItemOnEntity(par1ItemStack, par2EntityLiving); return true; } }
[ "dicks@negro.com" ]
dicks@negro.com
365f9c7d66dfb1c3f499ce320402603995f7335e
946e853c88517e7a89e785ef91b8e5a782854e46
/contribs/taxi/src/main/java/org/matsim/contrib/taxi/util/stats/TimeProfileCollector.java
5f5274f21bd7c099e2fc772d26c56588917464c4
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
strawrange/matsim
75922dd23ed8ed1ad54dc16e03e6a0bfe7f7c17e
8a37ba8e22cebab0df6de2ab8e336735ed93dabe
refs/heads/master
2020-06-18T02:03:06.435016
2017-11-17T00:19:38
2017-11-17T00:19:38
74,963,647
1
0
null
2016-11-28T10:48:36
2016-11-28T10:48:36
null
UTF-8
Java
false
false
4,651
java
/* *********************************************************************** * * project: org.matsim.* * * * *********************************************************************** * * * * copyright : (C) 2015 by the members listed in the COPYING, * * LICENSE and WARRANTY file. * * email : info at matsim dot org * * * * *********************************************************************** * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * See also COPYING, LICENSE and WARRANTY file * * * * *********************************************************************** */ package org.matsim.contrib.taxi.util.stats; import java.util.*; import org.jfree.chart.JFreeChart; import org.matsim.contrib.taxi.util.stats.TimeProfileCharts.*; import org.matsim.contrib.util.CompactCSVWriter; import org.matsim.contrib.util.chart.ChartSaveUtils; import org.matsim.core.controler.MatsimServices; import org.matsim.core.mobsim.framework.events.*; import org.matsim.core.mobsim.framework.listeners.*; import org.matsim.core.utils.io.IOUtils; import org.matsim.core.utils.misc.Time; public class TimeProfileCollector implements MobsimBeforeSimStepListener, MobsimBeforeCleanupListener { public interface ProfileCalculator { String[] getHeader(); String[] calcValues(); } private final ProfileCalculator calculator; private final List<Double> times = new ArrayList<>(); private final List<String[]> timeProfile = new ArrayList<>(); private final int interval; private final String outputFile; private final MatsimServices matsimServices; private Customizer chartCustomizer; private ChartType[] chartTypes = { ChartType.Line }; public TimeProfileCollector(ProfileCalculator calculator, int interval, String outputFile, MatsimServices matsimServices) { this.calculator = calculator; this.interval = interval; this.outputFile = outputFile; this.matsimServices = matsimServices; } @Override public void notifyMobsimBeforeSimStep(@SuppressWarnings("rawtypes") MobsimBeforeSimStepEvent e) { if (e.getSimulationTime() % interval == 0) { times.add(e.getSimulationTime()); timeProfile.add(calculator.calcValues()); } } public void setChartCustomizer(TimeProfileCharts.Customizer chartCustomizer) { this.chartCustomizer = chartCustomizer; } public void setChartTypes(ChartType... chartTypes) { this.chartTypes = chartTypes; } @Override public void notifyMobsimBeforeCleanup(@SuppressWarnings("rawtypes") MobsimBeforeCleanupEvent e) { String file = matsimServices.getControlerIO() .getIterationFilename(matsimServices.getIterationNumber(), outputFile); String timeFormat = interval % 60 == 0 ? Time.TIMEFORMAT_HHMM : Time.TIMEFORMAT_HHMMSS; try (CompactCSVWriter writer = new CompactCSVWriter( IOUtils.getBufferedWriter(file + ".txt"))) { writer.writeNext("time", calculator.getHeader()); for (int i = 0; i < timeProfile.size(); i++) { writer.writeNext(Time.writeTime(times.get(i), timeFormat), timeProfile.get(i)); } } for (ChartType t : chartTypes) { generateImage(t); } } private void generateImage(ChartType chartType) { JFreeChart chart = TimeProfileCharts.chartProfile(calculator.getHeader(), times, timeProfile, chartType); if (chartCustomizer != null) { chartCustomizer.customize(chart, chartType); } String imageFile = matsimServices.getControlerIO().getIterationFilename( matsimServices.getIterationNumber(), outputFile + "_" + chartType.name()); ChartSaveUtils.saveAsPNG(chart, imageFile, 1500, 1000); } }
[ "michal.mac@gmail.com" ]
michal.mac@gmail.com
b788afc0dd6e9b6037f1bbce7d63f8f57d358d26
3647f3da5e8348d5449e2e6f7575a99a2b244849
/sday26_Net网络编程/src/demo13_TCP_上传图片/UploadServer.java
91ca7067183767f686646bbf8d6e3c12136ad99a
[]
no_license
NianDUI/chuanzhi
f3f04b5da5c15797a9134846b1d20013363e853d
9d4a60b14801ee1483ddade080cf059a4037eacb
refs/heads/master
2022-07-02T01:14:07.768575
2019-11-24T12:45:15
2019-11-24T12:45:15
223,742,493
0
0
null
2022-06-21T02:18:19
2019-11-24T12:43:30
Java
GB18030
Java
false
false
1,017
java
package demo13_TCP_上传图片; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.net.ServerSocket; import java.net.Socket; public class UploadServer { @SuppressWarnings("resource") public static void main(String[] args) throws IOException { // 创建服务器Socket对象 ServerSocket ss = new ServerSocket(19191); // 监听客户端连接 Socket s = ss.accept(); // 封装通道内的流 BufferedInputStream bis = new BufferedInputStream(s.getInputStream()); // 封装图片文件 BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream("13.jpg")); byte[] bys = new byte[1024]; int len = 0; while ((len = bis.read(bys)) != -1) { bos.write(bys, 0, len); bos.flush(); } // 给一个反馈 OutputStream os = s.getOutputStream(); os.write("图片上传成功".getBytes()); // 释放资源 bos.close(); s.close(); } }
[ "760664212@qq.com" ]
760664212@qq.com
36b4283136f8005624dae1db0f262389a4b0ca7f
44ce5c342e283ab8fcddbeb0a4dc323546f438a9
/safepay-pay-web-boss/src/main/java/com/safepay/pay/permission/enums/OperatorTypeEnum.java
779edd0fd9f12d0cbe47cfde95ec4a2b70870577
[]
no_license
zhilangtaosha/safepay
e378fb7a614d3d14e0b9f6f7afe4d203468a151a
a05d5f79d806352a129bce99f86433b4493b296e
refs/heads/master
2021-07-09T22:12:42.726806
2017-10-11T04:54:31
2017-10-11T04:54:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,333
java
/* * Copyright 2015-2102 . * * 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.safepay.pay.permission.enums; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 操作员类型 * * safepay * * @author:shenjialong */ public enum OperatorTypeEnum { /** 普通用户 **/ USER("普通用户"), /** 超级管理员 **/ ADMIN("超级管理员"); /** 描述 */ private String desc; private OperatorTypeEnum(String desc) { this.desc = desc; } public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public static OperatorTypeEnum getEnum(String value) { OperatorTypeEnum resultEnum = null; OperatorTypeEnum[] enumAry = OperatorTypeEnum.values(); for (int i = 0; i < enumAry.length; i++) { if (enumAry[i].name().equals(value)) { resultEnum = enumAry[i]; break; } } return resultEnum; } public static Map<String, Map<String, Object>> toMap() { OperatorTypeEnum[] ary = OperatorTypeEnum.values(); Map<String, Map<String, Object>> enumMap = new HashMap<String, Map<String, Object>>(); for (int num = 0; num < ary.length; num++) { Map<String, Object> map = new HashMap<String, Object>(); String key = String.valueOf(getEnum(ary[num].name())); map.put("value", ary[num].name()); map.put("desc", ary[num].getDesc()); enumMap.put(key, map); } return enumMap; } @SuppressWarnings({ "rawtypes", "unchecked" }) public static List toList() { OperatorTypeEnum[] ary = OperatorTypeEnum.values(); List list = new ArrayList(); for (int i = 0; i < ary.length; i++) { Map<String, String> map = new HashMap<String, String>(); map.put("value", ary[i].name()); map.put("desc", ary[i].getDesc()); list.add(map); } return list; } }
[ "Desmond@Desmonds-MacBook-Pro.local" ]
Desmond@Desmonds-MacBook-Pro.local
297636cd0b572e086ac6c102bbdbd15824ab12cb
573a66e4f4753cc0f145de8d60340b4dd6206607
/JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/3664240/rootbeer1-1.2.3/src/org/trifort/rootbeer/testcases/rootbeertest/canonical2/CanonicalArrays.java
8d59b890d9f4071025560571f35d63f11a79368e
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "MIT" ]
permissive
mkaouer/Code-Smells-Detection-in-JavaScript
3919ec0d445637a7f7c5f570c724082d42248e1b
7130351703e19347884f95ce6d6ab1fb4f5cfbff
refs/heads/master
2023-03-09T18:04:26.971934
2022-03-23T22:04:28
2022-03-23T22:04:28
73,915,037
8
3
null
2023-02-28T23:00:07
2016-11-16T11:47:44
null
UTF-8
Java
false
false
659
java
package org.trifort.rootbeer.testcases.rootbeertest.canonical2; class CanonicalArrays { private float[][] floatArray; private float arraySum; public CanonicalArrays(){ floatArray = new float[2][]; for(int i = 0; i < 2; ++i){ floatArray[i] = new float[2]; for(int j = 0; j < 2; ++j){ floatArray[i][j] = i * 2 + j; } } } public void sum(){ arraySum = 0; for(int i = 0; i < floatArray.length; ++i){ for(int j = 0; j < floatArray[i].length; ++j){ arraySum += floatArray[i][j]; } } } public float getResult(){ synchronized(this){ return arraySum; } } }
[ "mmkaouer@umich.edu" ]
mmkaouer@umich.edu
9ea866c19e18b51646eb7fbc216bff1317bb2342
157d2ef1f40203d1e446f096e820185ae6e4f106
/beige-uml-swing/src/main/java/org/beigesoft/uml/factory/awt/FactoryAsmUseCaseFullLight.java
1b76036b69e36b606116e60d9d9c57fdc58c9206
[ "Apache-2.0", "LicenseRef-scancode-free-unknown" ]
permissive
demidenko05/beige-uml
e87b922140d207740ea8f01daf201a3410fcc18e
48bfbe5b100853815032af639b32da30957305af
refs/heads/master
2023-03-17T00:37:17.463163
2020-10-13T11:05:30
2020-10-13T11:05:30
47,434,951
1
1
Apache-2.0
2020-10-13T07:23:41
2015-12-05T00:01:40
Java
UTF-8
Java
false
false
4,793
java
package org.beigesoft.uml.factory.awt; import java.awt.Frame; import java.awt.Graphics2D; import java.awt.Image; import org.beigesoft.graphic.pojo.SettingsDraw; import org.beigesoft.graphic.service.ISrvDraw; import org.beigesoft.service.ISrvI18n; import org.beigesoft.ui.service.ISrvDialog; import org.beigesoft.uml.app.model.SettingsGraphicUml; import org.beigesoft.uml.assembly.AsmElementUmlInteractive; import org.beigesoft.uml.assembly.IAsmElementUmlInteractive; import org.beigesoft.uml.assembly.ShapeFullVarious; import org.beigesoft.uml.factory.IFactoryAsmElementUml; import org.beigesoft.uml.factory.swing.FactoryEditorUseCaseFull; import org.beigesoft.uml.pojo.UseCase; import org.beigesoft.uml.service.graphic.SrvGraphicUseCase; import org.beigesoft.uml.service.graphic.SrvGraphicShapeFull; import org.beigesoft.uml.service.interactive.SrvInteractiveShapeVariousFull; import org.beigesoft.uml.service.interactive.SrvInteractiveUseCase; import org.beigesoft.uml.service.persist.xmllight.FileAndWriter; import org.beigesoft.uml.service.persist.xmllight.SrvPersistLightXmlShapeFull; import org.beigesoft.uml.service.persist.xmllight.SrvPersistLightXmlUseCase; public class FactoryAsmUseCaseFullLight implements IFactoryAsmElementUml<IAsmElementUmlInteractive<ShapeFullVarious<UseCase>, Graphics2D, SettingsDraw, FileAndWriter>, Graphics2D, SettingsDraw, FileAndWriter, ShapeFullVarious<UseCase>> { private final ISrvDraw<Graphics2D, SettingsDraw, Image> srvDraw; private final SettingsGraphicUml settingsGraphic; private final FactoryEditorUseCaseFull factoryEditorUseCaseUmlFull; private final SrvGraphicShapeFull<ShapeFullVarious<UseCase>, Graphics2D, SettingsDraw, UseCase> srvGraphicUseCaseUmlFull; private final SrvPersistLightXmlShapeFull<ShapeFullVarious<UseCase>, UseCase> srvPersistUseCaseUmlFull; private final SrvInteractiveShapeVariousFull<ShapeFullVarious<UseCase>, Graphics2D, SettingsDraw, Frame, UseCase> srvInteractiveUseCaseUmlFull; public FactoryAsmUseCaseFullLight(ISrvDraw<Graphics2D, SettingsDraw, Image> srvDraw, ISrvI18n srvI18n, ISrvDialog<Frame> srvDialog, SettingsGraphicUml settingsGraphic, Frame frameMain) { this.srvDraw = srvDraw; this.settingsGraphic = settingsGraphic; factoryEditorUseCaseUmlFull = new FactoryEditorUseCaseFull(srvI18n, srvDialog, settingsGraphic, frameMain); SrvPersistLightXmlUseCase<UseCase> srvPersistUseCaseUml = new SrvPersistLightXmlUseCase<UseCase>(); srvPersistUseCaseUmlFull = new SrvPersistLightXmlShapeFull<ShapeFullVarious<UseCase>, UseCase>(srvPersistUseCaseUml); SrvGraphicUseCase<UseCase, Graphics2D, SettingsDraw> srvGraphicUseCaseUml = new SrvGraphicUseCase<UseCase, Graphics2D, SettingsDraw>(srvDraw, settingsGraphic); srvGraphicUseCaseUmlFull = new SrvGraphicShapeFull<ShapeFullVarious<UseCase>, Graphics2D, SettingsDraw, UseCase>(srvGraphicUseCaseUml); SrvInteractiveUseCase<UseCase, Graphics2D, SettingsDraw> srvInteractiveUseCaseUml = new SrvInteractiveUseCase<UseCase, Graphics2D, SettingsDraw>(srvGraphicUseCaseUml); srvInteractiveUseCaseUmlFull = new SrvInteractiveShapeVariousFull<ShapeFullVarious<UseCase>, Graphics2D, SettingsDraw, Frame, UseCase>(factoryEditorUseCaseUmlFull, srvInteractiveUseCaseUml); } @Override public IAsmElementUmlInteractive<ShapeFullVarious<UseCase>, Graphics2D, SettingsDraw, FileAndWriter> createAsmElementUml() { SettingsDraw drawSettings = new SettingsDraw(); UseCase useCaseUml = new UseCase(); ShapeFullVarious<UseCase> useCaseUmlFull = new ShapeFullVarious<UseCase>(); useCaseUmlFull.setShape(useCaseUml); AsmElementUmlInteractive<ShapeFullVarious<UseCase>, Graphics2D, SettingsDraw, FileAndWriter> asmUseCase = new AsmElementUmlInteractive<ShapeFullVarious<UseCase>, Graphics2D, SettingsDraw, FileAndWriter>(useCaseUmlFull, drawSettings, srvGraphicUseCaseUmlFull, srvPersistUseCaseUmlFull, srvInteractiveUseCaseUmlFull); return asmUseCase; } //SGS: public ISrvDraw<Graphics2D, SettingsDraw, Image> getSrvDraw() { return srvDraw; } public SettingsGraphicUml getSettingsGraphic() { return settingsGraphic; } public FactoryEditorUseCaseFull getFactoryEditorUseCaseUmlFull() { return factoryEditorUseCaseUmlFull; } public SrvGraphicShapeFull<ShapeFullVarious<UseCase>, Graphics2D, SettingsDraw, UseCase> getSrvGraphicUseCaseUmlFull() { return srvGraphicUseCaseUmlFull; } public SrvPersistLightXmlShapeFull<ShapeFullVarious<UseCase>, UseCase> getSrvPersistUseCaseUmlFull() { return srvPersistUseCaseUmlFull; } public SrvInteractiveShapeVariousFull<ShapeFullVarious<UseCase>, Graphics2D, SettingsDraw, Frame, UseCase> getSrvInteractiveUseCaseUmlFull() { return srvInteractiveUseCaseUmlFull; } }
[ "demidenko05@gmail.com" ]
demidenko05@gmail.com
d4615cf142c036daf61edfce6efa3798e2120847
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-1000-Files/boiler-To-Generate-1000-Files/syncregions-1000Files/BoilerActuator4703.java
29804e9a6afc57eae1405b9aafddb1e4652fa06b
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
267
java
package syncregions; public class BoilerActuator4703 { public int execute(int temperatureDifference4703, boolean boilerStatus4703) { //sync _bfpnGUbFEeqXnfGWlV4703, behaviour Half Change - return temperature - targetTemperature; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
c525b76ee4fd4936b6ec000f55411bb5548fe7a7
35b710e9bc210a152cc6cda331e71e9116ba478c
/tc-main/src/main/java/com/topcoder/web/csf/model/SubmissionType.java
54d2c72acc3ace7039fda1052a9920e68806960b
[]
no_license
appirio-tech/tc1-tcnode
d17649afb38998868f9a6d51920c4fe34c3e7174
e05a425be705aca8f530caac1da907d9a6c4215a
refs/heads/master
2023-08-04T19:58:39.617425
2016-05-15T00:22:36
2016-05-15T00:22:36
56,892,466
1
8
null
2022-04-05T00:47:40
2016-04-23T00:27:46
Java
UTF-8
Java
false
false
512
java
package com.topcoder.web.csf.model; import com.topcoder.web.common.model.Base; /** * @author dok * @version $Revision: 57814 $ Date: 2005/01/01 00:00:00 * Create Date: Jun 27, 2006 */ public class SubmissionType extends Base { public static final Integer INITIAL_CONTEST_SUBMISSION_TYPE = new Integer(1); private Integer id; private String description; public Integer getId() { return id; } public String getDescription() { return description; } }
[ "dongzhengbin@winterflames-MacBook-Pro.local" ]
dongzhengbin@winterflames-MacBook-Pro.local
382eff82a25b9a4df2f758f825e0d750e3380fc8
f1b65f6ace564ef496ae97c237763a1e282b2189
/tis-console/src/main/java/com/qlangtech/tis/manage/servlet/GlobalConfigServlet.java
c25e9af7cad204659140d2d4a5f4a8a2c853379f
[ "MIT" ]
permissive
fightingyuman/tis-solr
27b65d3e4a89612ea9087a0f260a8c0a89b7f640
8655db7c32bb88928b931e2754291deb0e4ab4db
refs/heads/master
2022-04-04T08:26:23.438875
2020-01-02T13:04:51
2020-01-02T13:04:51
258,164,459
1
0
MIT
2020-04-23T10:09:51
2020-04-23T10:09:51
null
UTF-8
Java
false
false
2,691
java
/* * The MIT License * * Copyright (c) 2018-2022, qinglangtech Ltd * * 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 com.qlangtech.tis.manage.servlet; import java.io.IOException; import java.util.HashMap; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.io.IOUtils; import org.json.JSONObject; import com.qlangtech.tis.manage.biz.dal.pojo.ResourceParameters; import com.qlangtech.tis.manage.biz.dal.pojo.ResourceParametersCriteria; import com.qlangtech.tis.pubhook.common.RunEnvironment; import com.qlangtech.tis.runtime.module.screen.ConfigFileParametersSet; /* * * @author 百岁(baisui@qlangtech.com) * @date 2019年1月17日 */ public class GlobalConfigServlet extends BasicServlet { private static final long serialVersionUID = 1L; @Override protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { final RunEnvironment runtime = RunEnvironment.getEnum(req.getParameter("runtime")); ResourceParametersCriteria criteria = new ResourceParametersCriteria(); final Map<String, String> params = new HashMap<String, String>(); for (ResourceParameters param : this.getContext().getResourceParametersDAO().selectByExample(criteria)) { params.put(param.getKeyName(), ConfigFileParametersSet.getParameterValue(param, runtime)); } resp.setContentType("text/json"); JSONObject json = new JSONObject(params); IOUtils.write(json.toString(), resp.getOutputStream()); } }
[ "baisui@2dfire.com" ]
baisui@2dfire.com
9a75a7478eabb2e616a32fd831fd446ddfc28fc0
1368795964d528e3f6c830e3e0c5dac26fcd4290
/mcdndsimple-sponge/src/main/java/io/musician101/mcdndsimple/sponge/gui/player/RangedBonusGUI.java
0afc092653303019d61fd2826d8bfb3391e6a531
[]
no_license
Musician101/MCDND-Simple
71d880cefb23c846ec33da223dede389d12073f1
c0cd01170ea2d944c52eef7425b6c55ae921805d
refs/heads/master
2021-01-11T03:11:32.594566
2020-04-15T09:07:34
2020-04-15T09:07:34
71,114,944
0
0
null
null
null
null
UTF-8
Java
false
false
2,940
java
package io.musician101.mcdndsimple.sponge.gui.player; import com.google.common.collect.ImmutableMap; import io.musician101.mcdndsimple.common.Dice; import io.musician101.mcdndsimple.common.character.player.MCDNDPlayer; import io.musician101.mcdndsimple.common.character.player.bonus.RangedBonus; import io.musician101.mcdndsimple.common.reference.MenuText; import io.musician101.mcdndsimple.common.reference.Messages; import io.musician101.mcdndsimple.sponge.SpongeMCDNDSimple; import io.musician101.mcdndsimple.sponge.gui.SpongeMCDNDSimpleGUI; import io.musician101.musicianlibrary.java.minecraft.sponge.SpongeTextInput; import io.musician101.musicianlibrary.java.minecraft.sponge.gui.SpongeIconBuilder; import javax.annotation.Nonnull; import org.spongepowered.api.effect.potion.PotionEffectTypes; import org.spongepowered.api.entity.living.player.Player; import org.spongepowered.api.event.item.inventory.ClickInventoryEvent; import org.spongepowered.api.item.ItemTypes; import org.spongepowered.api.text.Text; import org.spongepowered.api.text.format.TextColors; public class RangedBonusGUI extends SpongeMCDNDSimpleGUI { public RangedBonusGUI(@Nonnull MCDNDPlayer mcdndPlayer, @Nonnull Player player) { super(player, MenuText.RANGED_BONUSES, 9); RangedBonus rangedBonus = mcdndPlayer.getCharacterSheet().getCoreStatsTab().getBonuses().getRanged(); setButton(0, SpongeIconBuilder.of(ItemTypes.DIAMOND_SWORD, Text.of(MenuText.ATTACK_ROLLS)), ImmutableMap.of(ClickInventoryEvent.Primary.class, p -> new SpongeTextInput(SpongeMCDNDSimple.instance(), p) { @Override public void process(@Nonnull Player player, @Nonnull String s) { Dice dice = Dice.parse(s); if (dice == null) { player.sendMessage(Text.of(TextColors.RED + Messages.malformedDiceInput(s))); return; } rangedBonus.setAttack(dice); new RangedBonusGUI(mcdndPlayer, player); } })); setButton(1, SpongeIconBuilder.builder(ItemTypes.POTION).potionEffect(PotionEffectTypes.STRENGTH).name(Text.of(MenuText.DAMAGE_ROLLS)).build(), ImmutableMap.of(ClickInventoryEvent.Primary.class, p -> new SpongeTextInput(SpongeMCDNDSimple.instance(), p) { @Override public void process(@Nonnull Player player, @Nonnull String s) { Dice dice = Dice.parse(s); if (dice == null) { player.sendMessage(Text.of(TextColors.RED + Messages.malformedDiceInput(s))); return; } rangedBonus.setDamage(dice); new RangedBonusGUI(mcdndPlayer, player); } })); setButton(8, SpongeIconBuilder.of(ItemTypes.BARRIER, Text.of(MenuText.BACK)), ImmutableMap.of(ClickInventoryEvent.Primary.class, p -> new BonusesGUI(mcdndPlayer, p))); } }
[ "bruceabivens@gmail.com" ]
bruceabivens@gmail.com
bbd329a13aa45d5dbbe63dc16727bb7c012235e4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_c1d8b9a186f3080a690576e95af1155485da5a10/Plane/7_c1d8b9a186f3080a690576e95af1155485da5a10_Plane_t.java
be1203605990c33428fc1002c7e78002d1acc7ad
[]
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,740
java
package rajawali.primitives; import rajawali.BaseObject3D; import rajawali.materials.SimpleMaterial; public class Plane extends BaseObject3D { protected float mWidth; protected float mHeight; protected int mSegmentsW; protected int mSegmentsH; public Plane() { this(1f, 1f, 3, 3); } public Plane(float width, float height, int segmentsW, int segmentsH) { super(); mWidth = width; mHeight = height; mSegmentsW = segmentsW; mSegmentsH = segmentsH; init(); } private void init() { mMaterial = new SimpleMaterial(); int i, j; int numVertices = (mSegmentsW+1) * (mSegmentsH+1); float[] vertices = new float[numVertices * 3]; float[] textureCoords = new float[numVertices * 2]; float[] normals = new float[numVertices * 3]; float[] colors = new float[numVertices * 4]; short[] indices = new short[mSegmentsW * mSegmentsH * 6]; int vertexCount = 0; int texCoordCount = 0; for (i = 0; i <= mSegmentsW; ++i) { for (j = 0; j <= mSegmentsH; ++j) { vertices[vertexCount] = ((float)i / (float)mSegmentsW - 0.5f) * mWidth; vertices[vertexCount+1] = ((float)j / (float)mSegmentsH - 0.5f) * mHeight; vertices[vertexCount+2] = 0; textureCoords[texCoordCount++] = (float)j / (float)mSegmentsW; textureCoords[texCoordCount++] = 1f - (float)i / (float)mSegmentsH; normals[vertexCount] = 0; normals[vertexCount+1] = 1; normals[vertexCount+2] = 0; vertexCount += 3; } } int colspan = mSegmentsW + 1; int indexCount = 0; for(int row = 1; row <= mSegmentsH; row++) { for (int col = 1; col <= mSegmentsW; col++) { int lr = row * colspan + col; int ll = lr - 1; int ur = lr - colspan; int ul = ur - 1; indices[indexCount++] = (short)ul; indices[indexCount++] = (short)ur; indices[indexCount++] = (short)lr; indices[indexCount++] = (short)ul; indices[indexCount++] = (short)lr; indices[indexCount++] = (short)ll; } } int numColors = numVertices * 4; for(j = 0; j < numColors; j += 4 ) { colors[ j ] = 1.0f; colors[ j + 1 ] = 1.0f; colors[ j + 2 ] = 0.0f; colors[ j + 3 ] = 1.0f; } setData(vertices, normals, textureCoords, colors, indices); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
749f65d01f7e24df5794fa89f7fd356277370b19
56540ad45b01b1086eb2a79099723a49a0d49347
/bbc/JavaProject/MR/438/src/ComminuteUtil.java
06681ca6667ac4855e0a64e84a4531de82e19145
[]
no_license
xicpio/bbc
6d475a9a7f487f4fd5a0fd8d2ac67dfcfade083b
c23f4336a9c48c4c07d77af93be738108ee2e1c8
refs/heads/master
2021-01-23T21:53:36.609031
2017-02-25T06:53:09
2017-02-25T06:53:09
83,112,243
1
1
null
null
null
null
GB18030
Java
false
false
2,405
java
import java.io.*; public class ComminuteUtil { // 实现文件分割方法 public void fenGe(File commFile, File untieFile, int filesize) { FileInputStream fis = null; int size = 1024 * 1024; // 用来指定分割文件要以MB为单位 try { if (!untieFile.isDirectory()) { // 如果要保存分割文件地址不是路径 untieFile.mkdirs(); // 创建该路径 } size = size * filesize; int length = (int) commFile.length(); // 获取文件大小 int num = length / size; // 获取文件大小除以MB的得数 int yu = length % size; // 获取文件大小与MB相除的余数 String newfengeFile = commFile.getAbsolutePath(); // 获取保存文件的完成路径信息 int fileNew = newfengeFile.lastIndexOf("."); String strNew = newfengeFile.substring(fileNew, newfengeFile .length()); // 截取字符串 fis = new FileInputStream(commFile); // 创建FileInputStream类对象 File[] fl = new File[num + 1]; // 创建文件数组 int begin = 0; for (int i = 0; i < num; i++) { // 循环遍历数组 fl[i] = new File(untieFile.getAbsolutePath() + "\\" + (i + 1) + strNew + ".tem"); // 指定分割后小文件的文件名 if (!fl[i].isFile()) { fl[i].createNewFile(); // 创建该文件 } FileOutputStream fos = new FileOutputStream(fl[i]); byte[] bl = new byte[size]; fis.read(bl); // 读取分割后的小文件 fos.write(bl); // 写文件 begin = begin + size * 1024 * 1024; fos.close(); // 关闭流 } if (yu != 0) { // 文件大小与指定文件分割大小相除的余数不为0 fl[num] = new File(untieFile.getAbsolutePath() + "\\" + (num + 1) + strNew + ".tem"); // 指定文件分割后数组中最后一个文件名 if (!fl[num].isFile()) { fl[num].createNewFile(); // 新建文件 } FileOutputStream fyu = new FileOutputStream(fl[num]); byte[] byt = new byte[yu]; fis.read(byt); fyu.write(byt); fyu.close(); } } catch (Exception e) { e.printStackTrace(); } } public static void main(String[] args) { } }
[ "15262673025@163.com" ]
15262673025@163.com
b7a6533dda4b9f35b330655759b9d786d5b41a05
92225460ebca1bb6a594d77b6559b3629b7a94fa
/src/com/kingdee/eas/fdc/sellhouse/app/BizListEntryControllerRemote.java
14c951b5038bd3e07327ea47ead3fd6f6ad9b595
[]
no_license
yangfan0725/sd
45182d34575381be3bbdd55f3f68854a6900a362
39ebad6e2eb76286d551a9e21967f3f5dc4880da
refs/heads/master
2023-04-29T01:56:43.770005
2023-04-24T05:41:13
2023-04-24T05:41:13
512,073,641
0
1
null
null
null
null
UTF-8
Java
false
false
156
java
package com.kingdee.eas.fdc.sellhouse.app; import javax.ejb.*; public interface BizListEntryControllerRemote extends EJBObject, BizListEntryController { }
[ "yfsmile@qq.com" ]
yfsmile@qq.com
16b1fe8a91e2f6eaa5218b7770ca81958a5a2232
68f8d6ab2d19fcc44e113075ccd5996eba2e9174
/src/main/java/com/ccc/autocompleter/HomeController.java
6b1ae31363b8b6dd4346121fb22b511836536ebc
[]
no_license
agibsonccc/autocompleter-java
3c3e1362fbbf44158cfdd24836a9253db9819994
6b6d07759cc5b7476a27b01e6a1d7b30167d27b5
refs/heads/master
2021-01-22T07:27:46.907073
2012-09-02T04:32:19
2012-09-02T04:32:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,809
java
package com.ccc.autocompleter; 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.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; 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.ResponseBody; import com.ccc.autocompleter.service.AutoCompleterService; /** * * @author Adam Gibson * */ @Controller @RequestMapping("/autocomplete") public class HomeController { private static Logger log=LoggerFactory.getLogger(HomeController.class); @Autowired private AutoCompleterService autoCompleterService; @RequestMapping(value = "/view", method = RequestMethod.GET) public String home(Model model) { return "home"; } /** * Performs quick search relative to the query term passed in * @param word the query term to ask quick search for * @return a json response for auto complete */ @RequestMapping(value = "/nextchar", method = RequestMethod.GET) public @ResponseBody List<Map<String,String>> home(@RequestParam("q") String word) { // String c=autoCompleterService.nextCharacter(word); List<String> list=autoCompleterService.words(word); List<Map<String,String>> retList = new ArrayList<Map<String,String>>(); for(int i=0;i<list.size();i++) { Map<String,String> ret = new HashMap<String,String>(); ret.put("id",String.valueOf(i)); ret.put("value",word + list.get(i)); retList.add(ret); } if(log.isDebugEnabled()) log.debug("Returned: " + word); return retList; } }
[ "agibson@clevercloudcomputing.com" ]
agibson@clevercloudcomputing.com
2239d3e4135e4b46dfed2bb40e7b063f2a187d50
eb71e782cebec26969623bb5c3638d6f62516290
/src/com/rs/game/npc/combat/impl/ThornySnailCombat.java
c06d1e33bee5d57969d8a7fe768a2c49752febff
[]
no_license
DukeCharles/revision-718-server
0fe7230a4c7da8de6f7de289ef1b4baec81fbd8b
cc69a0ab6e139d5cc7e2db9a73ec1eeaf76fd6e3
refs/heads/main
2023-06-25T05:50:04.376413
2021-07-25T19:38:35
2021-07-25T19:38:35
387,924,360
0
0
null
null
null
null
UTF-8
Java
false
false
1,191
java
package com.rs.game.npc.combat.impl; import com.rs.game.Animation; import com.rs.game.Entity; import com.rs.game.Graphics; import com.rs.game.World; import com.rs.game.npc.NPC; import com.rs.game.npc.combat.CombatScript; import com.rs.game.npc.combat.NPCCombatDefinitions; import com.rs.game.npc.familiar.Familiar; public class ThornySnailCombat extends CombatScript { @Override public Object[] getKeys() { return new Object[] { 6807, 6806 }; } @Override public int attack(NPC npc, Entity target) { final NPCCombatDefinitions defs = npc.getCombatDefinitions(); Familiar familiar = (Familiar) npc; boolean usingSpecial = familiar.hasSpecialOn(); if (usingSpecial) {// priority over regular attack npc.animate(new Animation(8148)); npc.gfx(new Graphics(1385)); World.sendProjectile(npc, target, 1386, 34, 16, 30, 35, 16, 0); delayHit(npc, 1, target, getRangeHit(npc, getRandomMaxHit(npc, 80, NPCCombatDefinitions.RANGE, target))); npc.gfx(new Graphics(1387)); } else { npc.animate(new Animation(8143)); delayHit(npc, 1, target, getRangeHit(npc, getRandomMaxHit(npc, 40, NPCCombatDefinitions.RANGE, target))); } return defs.getAttackDelay(); } }
[ "charles.simon.morin@gmail.com" ]
charles.simon.morin@gmail.com
0c53a1981024ef457edc8688a748e854e7c42647
b7693e7a6ba1c217c17b257f56367a6c826193f2
/plugins/org.ifc4emf.metamodel.ifc/src/IFC2X3/IfcActorSelect.java
c7459e182e1422c692fa043d2afd934c8534df6b
[]
no_license
patins1/ifc4emf
6941967114f87965ea124c36b95aaedc5ef01349
ad65df3fce500e5691625d4e0906041c8c0db284
refs/heads/master
2021-01-19T10:40:16.758125
2017-09-11T02:25:57
2017-09-11T02:25:57
87,891,492
0
0
null
null
null
null
UTF-8
Java
false
false
493
java
/** * <copyright> * </copyright> * * $Id$ */ package IFC2X3; import org.eclipse.emf.cdo.CDOObject; import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Ifc Actor Select</b></em>'. * <!-- end-user-doc --> * * * @see IFC2X3.IFC2X3Package#getIfcActorSelect() * @model abstract="true" * @extends CDOObject * @generated */ public interface IfcActorSelect extends CDOObject { } // IfcActorSelect
[ "patins@4fe55a55-8cb9-4820-ac24-0eeacf389520" ]
patins@4fe55a55-8cb9-4820-ac24-0eeacf389520
17e026693a342c7199c1aa2ebe07c8ff05fe510b
89fd441aaae4f241fbac8915ea7607a03e605859
/src/tk/genesishub/gFeatures/Commands/gFactionsCore.java
55e7cd3f0c51915ca2b24bd26f8851074160f066
[ "Apache-2.0" ]
permissive
GenesisHub/gFeatures
f9a5979765a4dafca4d5b8ad5c6532c70bcd7aad
718b83770cdf9dd251be3e55bbb6c69a0d55f9d0
refs/heads/master
2016-09-05T20:04:02.752527
2015-12-11T14:24:09
2015-12-11T14:24:09
33,052,981
1
2
null
null
null
null
UTF-8
Java
false
false
1,425
java
package tk.genesishub.gFeatures.Commands; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import tk.genesishub.gFeatures.PluginManage.PluginState; import tk.genesishub.gFeatures.PluginManage.gFactionsPlugin; import tk.genesishub.gFeatures.gFactions.CommandHub; /* gFeatures https://github.com/Seshpenguin/gFeatures Copyright 2015 DolphinBox 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. */ public class gFactionsCore { public void CommandSwitch(final CommandSender sender, Command cmd, String label, String[] args) throws NumberFormatException, Exception{ Commands c = new Commands(); CommandHub ch = new CommandHub(); if(gFactionsPlugin.getState().equals(PluginState.ENABLE)){ ch.CommandSwitch(sender, cmd, label, args); } else if(c.Check("gFactions", cmd.getName())){ sender.sendMessage("GenesisHub does not recognize this command. Type /help for help."); } } }
[ "aguy867@gmail.com" ]
aguy867@gmail.com
5564f30dec8db57ab4324ad0b039a02ce7c97445
b3a02d5f1f60cd584fbb6da1b823899607693f63
/04_DB Frameworks_Hibernate+Spring Data/99_Exams/PhotographyWorkshops/src/main/java/app/domain/entities/Photographer.java
9fcaf08310a038da42c3555db73f5e715f66b286
[ "MIT" ]
permissive
akkirilov/SoftUniProject
20bf0543c9aaa0a33364daabfddd5f4c3e400ba2
709d2d1981c1bb6f1d652fe4101c1693f5afa376
refs/heads/master
2021-07-11T02:53:18.108275
2018-12-04T20:14:19
2018-12-04T20:14:19
79,428,334
0
0
null
null
null
null
UTF-8
Java
false
false
2,841
java
package app.domain.entities; import java.util.HashSet; import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.OneToMany; import javax.persistence.OneToOne; import javax.persistence.Table; import javax.validation.constraints.NotNull; import javax.validation.constraints.Pattern; @Entity @Table(name = "photographers") public class Photographer { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @NotNull @Column(name = "first_name") private String firstName; @NotNull //@Length(min = 2, max = 50) @Column(name = "last_name") private String lastName; @Pattern(regexp = "\\+[0-9]{1,3}\\/[0-9]{8,10}") @Column(name = "phone") private String phone; @NotNull @OneToOne @JoinColumn(name = "primary_camera_id") private Camera primaryCamera; @NotNull @OneToOne @JoinColumn(name = "secondary_camera_id") private Camera secondaryCamera; @ManyToMany() @JoinTable(name = "photographers_lenses", joinColumns = @JoinColumn(name = "photographer_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "lens_id", referencedColumnName = "id")) private Set<Lens> lenses; @OneToMany(mappedBy = "owner") private Set<Accessory> accessories; public Photographer() { super(); this.lenses = new HashSet<>(); this.accessories = new HashSet<>(); } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public Camera getPrimaryCamera() { return primaryCamera; } public void setPrimaryCamera(Camera primaryCamera) { this.primaryCamera = primaryCamera; } public Camera getSecondaryCamera() { return secondaryCamera; } public void setSecondaryCamera(Camera secondaryCamera) { this.secondaryCamera = secondaryCamera; } public Set<Lens> getLenses() { return lenses; } public void setLenses(Set<Lens> lenses) { this.lenses = lenses; } public void addLens(Lens lens) { this.lenses.add(lens); } public Set<Accessory> getAccessories() { return accessories; } public void setAccessories(Set<Accessory> accessories) { this.accessories = accessories; } public String getFullName() { return this.firstName + " " + this.lastName; } }
[ "akkirilov@mail.bg" ]
akkirilov@mail.bg
57941c986e9d573fe2cdcabb3b3f020e67e95a12
d9d7bf3d0dca265c853cb58c251ecae8390135e0
/gcld/src/com/reign/framework/hibernate/hql/ObjectFactory.java
fd1f43774fe449596e194ee0a844045fb48e7862
[]
no_license
Crasader/workspace
4da6bd746a3ae991a5f2457afbc44586689aa9d0
28e26c065a66b480e5e3b966be4871b44981b3d8
refs/heads/master
2020-05-04T21:08:49.911571
2018-11-19T08:14:27
2018-11-19T08:14:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
720
java
package com.reign.framework.hibernate.hql; import javax.xml.namespace.*; import javax.xml.bind.*; import javax.xml.bind.annotation.*; @XmlRegistry public class ObjectFactory { private static final QName _Hqls_QNAME; static { _Hqls_QNAME = new QName("http://com.reign.framework.hibernate/hql", "hqls"); } public Hql createHql() { return new Hql(); } public Hqls createHqls() { return new Hqls(); } @XmlElementDecl(namespace = "http://com.reign.framework.hibernate/hql", name = "hqls") public JAXBElement<Hqls> createHqls(final Hqls value) { return new JAXBElement<Hqls>(ObjectFactory._Hqls_QNAME, Hqls.class, null, value); } }
[ "359569198@qq.com" ]
359569198@qq.com
4443b1b494efe7644c622ad55248bd43597690b9
d901cec87792969e4e4f707512814d2ebb0990ce
/Java1/src/conditions/Example10.java
b078b8e40ac077cb25ee3fe1545db4da5392dc05
[]
no_license
Hariteja25/Work-Space-2
c6afb51b1515649128d64ffae8daf175a17e78b2
db020a3eed4860ae79b6af32a9c6d38db34d7ee3
refs/heads/master
2023-03-29T04:44:02.034678
2021-04-03T13:49:42
2021-04-03T13:49:42
354,303,328
0
0
null
null
null
null
UTF-8
Java
false
false
1,039
java
package conditions; import java.util.Scanner; public class Example10 { /** take id (int), age(int) , userType(str) as input. if id & age & userType are valid print valid data if any one of the data is invalid print invalid data */ public static void main(String[] args) { // take id (int), age(int) , userType(str) as input. Scanner sc = new Scanner(System.in);// sc is point of contact for console System.out.println("enter id"); int id = sc.nextInt(); System.out.println("enter age"); int age = sc.nextInt(); System.out.println(" enter usertype"); String userType = sc.next(); // if statement writing multiple conditions using AND [ && ] // if block is executed if ALL THE conditions are satisfied if( id>0 && age>18 && userType.equals("admin")) { System.out.println("valid data"); }else { System.out.println("invalid data"); } if(id<0 || age<18 || !userType.equals("admin")) { System.out.println("invalid data"); }else { System.out.println("valid data"); } } }
[ "kudamalahariteja@gmail.com" ]
kudamalahariteja@gmail.com
332bd2c95dc03a935e45e77a620d018644644dcf
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_38197.java
b24be6b3b0aad527e69b37e03454e8ae428bd324
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,270
java
/** * Resolves list of all columns and properties. */ private void resolveColumnsAndProperties(final Class type){ PropertyDescriptor[] allProperties=ClassIntrospector.get().lookup(type).getAllPropertyDescriptors(); List<DbEntityColumnDescriptor> decList=new ArrayList<>(allProperties.length); int idcount=0; HashSet<String> names=new HashSet<>(allProperties.length); for ( PropertyDescriptor propertyDescriptor : allProperties) { DbEntityColumnDescriptor dec=DbMetaUtil.resolveColumnDescriptors(this,propertyDescriptor,isAnnotated,columnNamingStrategy); if (dec != null) { if (!names.add(dec.getColumnName())) { throw new DbOomException("Duplicate column name: " + dec.getColumnName()); } decList.add(dec); if (dec.isId) { idcount++; } } } if (decList.isEmpty()) { throw new DbOomException("No column mappings in entity: " + type); } columnDescriptors=decList.toArray(new DbEntityColumnDescriptor[0]); Arrays.sort(columnDescriptors); if (idcount > 0) { idColumnDescriptors=new DbEntityColumnDescriptor[idcount]; idcount=0; for ( DbEntityColumnDescriptor dec : columnDescriptors) { if (dec.isId) { idColumnDescriptors[idcount++]=dec; } } } }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
907ca37748e8f5e9ff35c39edcf64e6e827ef419
40cd4da5514eb920e6a6889e82590e48720c3d38
/desktop/applis/apps/core/common/expressionlanguage/src/main/java/code/expressionlanguage/exec/blocks/ExecFileBlock.java
abd3c74ee8b006379db59effe8a3418b9ab4ea90
[]
no_license
Cardman/projects
02704237e81868f8cb614abb37468cebb4ef4b31
23a9477dd736795c3af10bccccb3cdfa10c8123c
refs/heads/master
2023-08-17T11:27:41.999350
2023-08-15T07:09:28
2023-08-15T07:09:28
34,724,613
4
0
null
2020-10-13T08:08:38
2015-04-28T10:39:03
Java
UTF-8
Java
false
false
911
java
package code.expressionlanguage.exec.blocks; import code.expressionlanguage.ContextEl; import code.expressionlanguage.common.AbstractFileEscapedCalc; import code.expressionlanguage.common.FileMetricsCore; import code.expressionlanguage.linkage.LinkageUtil; import code.util.StringMap; public final class ExecFileBlock extends ExecFileBlockAbs { private final String fileName; public ExecFileBlock(FileMetricsCore _metricsCore, String _fileName, AbstractFileEscapedCalc _fileEscapedCalc) { super(_metricsCore,_fileEscapedCalc); fileName = _fileName; } public static String name(ExecFileBlock _f) { if (_f == null) { return ""; } return _f.getFileName(); } public String getFileName() { return fileName; } public static StringMap<String> export(ContextEl _cont) { return LinkageUtil.export(_cont); } }
[ "f.desrochettes@gmail.com" ]
f.desrochettes@gmail.com
ccfa0f0be3ab534382bbec59ddd2cfb1b75443b7
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-12798-19-2-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/velocity/internal/DefaultVelocityEngine_ESTest_scaffolding.java
3aeb35658c2cd9508de9efb8028bd4c6c570e516
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
453
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Apr 04 18:25:39 UTC 2020 */ package org.xwiki.velocity.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DefaultVelocityEngine_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
88494019882cf8e345cc8e23e06db17abee57826
c69b09fe89c06e1d83ae8c1d87a46678288d0eda
/_extend/solon.extend.servlet/src/main/java/org/noear/solon/extend/servlet/SolonServletHandler.java
ae39e99c2c369390aab86ed9ee3d2b7df3015ebc
[ "Apache-2.0" ]
permissive
dongatsh/solon
fb9d3da2ce67746dd8cfe1fef288e2de1bc3d1a2
4c3a074e8e4db7f367f75603ea8347d2c501c69d
refs/heads/master
2023-08-28T18:16:44.023899
2021-10-31T16:21:03
2021-10-31T16:21:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
960
java
package org.noear.solon.extend.servlet; import org.noear.solon.Solon; import org.noear.solon.core.handle.Context; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** * @author noear * @since 1.2 * */ public class SolonServletHandler extends HttpServlet { protected void preHandle(Context ctx) { } @Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { SolonServletContext ctx = new SolonServletContext(request, response); ctx.contentType("text/plain;charset=UTF-8"); preHandle(ctx); Solon.global().tryHandle(ctx); if (ctx.getHandled() == false || ctx.status() == 404) { response.setStatus(404); }else{ ctx.commit(); } } }
[ "noear@live.cn" ]
noear@live.cn
79ff6539e7586c4675d10ced486b2a5c1732e7a4
9f1f102c8f456625be32acf975bcff3e3b8d953f
/CalculatorSoap/src/com/demo/ws/Main.java
3763d4f08a8384647b79c323aca3bbbc2ecff488
[]
no_license
sbtalk71/dbs-batch7
3bad24ef188d33d0c515e7171374810ddcd67f30
dad18eda7e78d1f20725c9ee05624c9161835cc7
refs/heads/master
2022-12-06T22:40:05.681726
2019-10-18T07:11:16
2019-10-18T07:11:16
215,200,847
0
0
null
2022-11-24T07:13:02
2019-10-15T03:43:37
Java
UTF-8
Java
false
false
202
java
package com.demo.ws; import javax.xml.ws.Endpoint; public class Main { public static void main(String[] args) { Endpoint.publish("http://localhost:8181/cal", new Calculator()); } }
[ "sbtalk@gmail.com" ]
sbtalk@gmail.com
2b74d89b82801fe8a8cdd5e670a155a12a0cb2bc
66bb9e407ed67a325a7f1eb816798ec7e453c863
/intellij/org.eclipse.xtend.idea/xtend-gen/org/eclipse/xtend/core/idea/config/XtendLibraryPresentationProvider.java
e6e7a6998f509252c7afd2175a28a950ea886951
[ "LicenseRef-scancode-generic-cla" ]
no_license
malbac/xtext
639f85c4a20d752cbcbad290ccae2e52f7e108bb
f5dd7b4308f1c16ef4b645c9ac811b9c0ca2e103
refs/heads/master
2021-01-18T12:52:18.153143
2015-04-24T16:54:44
2015-04-24T16:55:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,389
java
/** * Copyright (c) 2015 itemis AG (http://www.itemis.eu) and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html */ package org.eclipse.xtend.core.idea.config; import com.intellij.openapi.roots.libraries.LibraryKind; import com.intellij.openapi.roots.libraries.LibraryPresentationProvider; import com.intellij.openapi.vfs.VirtualFile; import java.util.List; import javax.swing.Icon; import org.eclipse.xtend.core.idea.config.XtendLibraryProperties; import org.eclipse.xtend.core.idea.icons.XtendIcons; import org.eclipse.xtend.core.idea.lang.XtendLanguage; /** * @author kosyakov - Initial contribution and API */ @SuppressWarnings("all") public class XtendLibraryPresentationProvider extends LibraryPresentationProvider<XtendLibraryProperties> { public final static LibraryKind LIBRARY_KIND = LibraryKind.create(XtendLanguage.INSTANCE.getID()); public XtendLibraryPresentationProvider() { super(XtendLibraryPresentationProvider.LIBRARY_KIND); } @Override public XtendLibraryProperties detect(final List<VirtualFile> classesRoots) { return new XtendLibraryProperties(); } @Override public Icon getIcon() { return XtendIcons.Xtend_16x16; } }
[ "anton.kosyakov@itemis.de" ]
anton.kosyakov@itemis.de
4b3cc771da8f41ffe60b60db8c715cfc4be73ed7
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a128/A128588.java
7e73899f2d4bdb92b662e521ec2b537dcd9e7d7f
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
398
java
package irvine.oeis.a128; // Generated by gen_linrec.pl - DO NOT EDIT here! import irvine.oeis.LinearRecurrence; /** * A128588 <code>A007318 * A128587</code>. * @author Georg Fischer */ public class A128588 extends LinearRecurrence { /** Construct the sequence. */ public A128588() { super(new long[] {1L, 1L}, new long[] {2L, 4L}, new long[] {1L}); } // constructor() } // A128588
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
825bc733fe66883d263aa641e0ede7b12707b5bd
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/plugin/music/model/c$1.java
e50859150ce5891b67c9f79c6da1e7ae4f9edda1
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,230
java
package com.tencent.mm.plugin.music.model; import android.media.AudioManager.OnAudioFocusChangeListener; import com.tencent.mm.sdk.platformtools.x; class c$1 implements OnAudioFocusChangeListener { final /* synthetic */ c lxT; c$1(c cVar) { this.lxT = cVar; } public final void onAudioFocusChange(int i) { x.i("MicroMsg.Music.MusicAudioFocusHelper", "focus change %d", new Object[]{Integer.valueOf(i)}); if (i == -2 || i == -3) { x.i("MicroMsg.Music.MusicAudioFocusHelper", "audio focus lossTransient"); if (h.bic().bhQ().PZ()) { h.bic().bhQ().bhn(); } } else if (i == 1 || i == 2 || i == 3) { x.i("MicroMsg.Music.MusicAudioFocusHelper", "audio focus gain"); if (h.bic().bhQ().PZ()) { h.bic().bhQ().resume(); } } else if (i == -1) { x.i("MicroMsg.Music.MusicAudioFocusHelper", "audio focus loss, passive pause"); if (h.bic().bhQ().PZ()) { h.bic().bhQ().bhn(); h.bic(); e.bhX(); h.bic().bhY(); } h.bie().abandonAudioFocus(this.lxT.lxS); } } }
[ "707194831@qq.com" ]
707194831@qq.com
0e7d8e2f040ff69b5a3ed3678a5df2452b966ea7
3efa417c5668b2e7d1c377c41d976ed31fd26fdc
/src/br/com/mind5/business/phoneSnapshotSearch/info/PhonaparchInfo.java
eafe8f1e29011ff5cf50176ee5eb914c28d00c7b
[]
no_license
grazianiborcai/Agenda_WS
4b2656716cc49a413636933665d6ad8b821394ef
e8815a951f76d498eb3379394a54d2aa1655f779
refs/heads/master
2023-05-24T19:39:22.215816
2023-05-15T15:15:15
2023-05-15T15:15:15
109,902,084
0
0
null
2022-06-29T19:44:56
2017-11-07T23:14:21
Java
UTF-8
Java
false
false
2,713
java
package br.com.mind5.business.phoneSnapshotSearch.info; import java.util.List; import br.com.mind5.common.DefaultValue; import br.com.mind5.info.InfoRecord; public final class PhonaparchInfo extends InfoRecord implements Cloneable { public long codOwner; public long codSnapshot; public long codPhone; public long codOwnerRef; public long codOwnerRefSnapshot; public long codCustomer; public long codCustomerSnapshot; public long codStore; public long codStoreSnapshot; public long codEmployee; public long codEmployeeSnapshot; public long codUser; public long codUserSnapshot; public boolean isDefault; public String recordMode; public String username; public PhonaparchInfo() { super(); codOwner = DefaultValue.number(); codSnapshot = DefaultValue.number(); codPhone = DefaultValue.number(); codOwnerRef = DefaultValue.number(); codOwnerRefSnapshot = DefaultValue.number(); codStore = DefaultValue.number(); codStoreSnapshot = DefaultValue.number(); codCustomer = DefaultValue.number(); codCustomerSnapshot = DefaultValue.number(); codEmployee = DefaultValue.number(); codEmployeeSnapshot = DefaultValue.number(); codUser = DefaultValue.number(); codUserSnapshot = DefaultValue.number(); isDefault = DefaultValue.boole(); recordMode = DefaultValue.recordMode(); } public static PhonaparchInfo copyFrom(Object sourceObj) { return copyFrom(sourceObj, PhonaparchInfo.class); } public static List<PhonaparchInfo> copyFrom(List<?> sourceObjs) { return copyFrom(sourceObjs, PhonaparchInfo.class); } @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } @Override public int hashCode() { int result = 17; result = result * 31 + (int) (codOwner ^ (codOwner >>> 32)); result = result * 31 + (int) (codSnapshot ^ (codSnapshot >>> 32)); result = result * 31 + (int) (codPhone ^ (codPhone >>> 32)); result = result * 31 + (int) (codCustomer ^ (codCustomer >>> 32)); result = result * 31 + (int) (codStore ^ (codStore >>> 32)); result = result * 31 + (int) (codEmployee ^ (codEmployee >>> 32)); return result; } @Override public boolean equals(Object o) { if (o == this) return true; if (!(o instanceof PhonaparchInfo)) return false; PhonaparchInfo obj = (PhonaparchInfo) o; return (codOwner == obj.codOwner && codSnapshot == obj.codSnapshot && codPhone == obj.codPhone && codCustomer == obj.codCustomer && codStore == obj.codStore && codEmployee == obj.codEmployee); } }
[ "mmaciel@mind5.com" ]
mmaciel@mind5.com
30aa247b256ec4149e68210a8dc6c85ad50ffde8
18292045b57f1f68abc5adf0b360fa22f29877b3
/src/main/java/com/amazonservices/mws/jaxb/ServingDimension.java
16fb84f319c69a3abb44cd89094ee6543d19c61e
[ "MIT" ]
permissive
liccoCode/amazon-mws
537d20493e43a4baeb65de0f23adf6a51e61c27d
91fcf1a04ae8790015c223d282f17f9d24a578f4
refs/heads/master
2020-04-06T22:15:41.694302
2018-11-16T07:59:21
2018-11-16T07:59:21
157,830,092
0
0
null
null
null
null
UTF-8
Java
false
false
1,950
java
package com.amazonservices.mws.jaxb; import java.math.BigDecimal; 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>ServingDimension complex type的 Java 类。 * * <p>以下模式片段指定包含在此类中的预期内容。 * * <pre> * &lt;complexType name="ServingDimension"> * &lt;simpleContent> * &lt;extension base="&lt;>PositiveDimension"> * &lt;attribute name="unitOfMeasure" use="required" type="{}ServingUnit" /> * &lt;/extension> * &lt;/simpleContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ServingDimension", propOrder = { "value" }) public class ServingDimension { @XmlValue protected BigDecimal value; @XmlAttribute(name = "unitOfMeasure", required = true) protected ServingUnit unitOfMeasure; /** * 获取value属性的值。 * * @return * possible object is * {@link BigDecimal } * */ public BigDecimal getValue() { return value; } /** * 设置value属性的值。 * * @param value * allowed object is * {@link BigDecimal } * */ public void setValue(BigDecimal value) { this.value = value; } /** * 获取unitOfMeasure属性的值。 * * @return * possible object is * {@link ServingUnit } * */ public ServingUnit getUnitOfMeasure() { return unitOfMeasure; } /** * 设置unitOfMeasure属性的值。 * * @param value * allowed object is * {@link ServingUnit } * */ public void setUnitOfMeasure(ServingUnit value) { this.unitOfMeasure = value; } }
[ "licco@easya.cc" ]
licco@easya.cc
388fc7acfe7623091b6a8b955352b4c91ed620c4
e27942cce249f7d62b7dc8c9b86cd40391c1ddd4
/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201708/cm/LocationTargetingStatus.java
6f1c6690a0c04c4b34c36f180edebb895d25a4c1
[ "Apache-2.0" ]
permissive
mo4ss/googleads-java-lib
b4b6178747d25d16ae6aa0c80d80ee18a2dfe01a
efaa9c3bd8a46a3ed4b00963dc9760c6dd8bd641
refs/heads/master
2022-12-05T00:30:56.740813
2022-11-16T10:47:15
2022-11-16T10:47:15
108,132,394
0
0
Apache-2.0
2022-11-16T10:47:16
2017-10-24T13:41:43
Java
UTF-8
Java
false
false
3,634
java
// Copyright 2017 Google Inc. 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. /** * LocationTargetingStatus.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.adwords.axis.v201708.cm; public class LocationTargetingStatus implements java.io.Serializable { private java.lang.String _value_; private static java.util.HashMap _table_ = new java.util.HashMap(); // Constructor protected LocationTargetingStatus(java.lang.String value) { _value_ = value; _table_.put(_value_,this); } public static final java.lang.String _ACTIVE = "ACTIVE"; public static final java.lang.String _OBSOLETE = "OBSOLETE"; public static final java.lang.String _PHASING_OUT = "PHASING_OUT"; public static final LocationTargetingStatus ACTIVE = new LocationTargetingStatus(_ACTIVE); public static final LocationTargetingStatus OBSOLETE = new LocationTargetingStatus(_OBSOLETE); public static final LocationTargetingStatus PHASING_OUT = new LocationTargetingStatus(_PHASING_OUT); public java.lang.String getValue() { return _value_;} public static LocationTargetingStatus fromValue(java.lang.String value) throws java.lang.IllegalArgumentException { LocationTargetingStatus enumeration = (LocationTargetingStatus) _table_.get(value); if (enumeration==null) throw new java.lang.IllegalArgumentException(); return enumeration; } public static LocationTargetingStatus fromString(java.lang.String value) throws java.lang.IllegalArgumentException { return fromValue(value); } public boolean equals(java.lang.Object obj) {return (obj == this);} public int hashCode() { return toString().hashCode();} public java.lang.String toString() { return _value_;} public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);} public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.EnumSerializer( _javaType, _xmlType); } public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.EnumDeserializer( _javaType, _xmlType); } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(LocationTargetingStatus.class); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201708", "LocationTargetingStatus")); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } }
[ "jradcliff@users.noreply.github.com" ]
jradcliff@users.noreply.github.com
6d809a761487ba3adde1bb24359597f3fd548d23
142664c0b6a8afa5ba757e163ff162a619cd2b93
/src/test/java/za/co/ajk/incidentman/web/rest/errors/ExceptionTranslatorIntTest.java
6f1bf18fd05bd6e3e00d44a67807ce8657476809
[]
no_license
kappaj2/SystemGateway
4aa92418b7836b76239df29743a433f55664bf24
2b828eb53a30df1259a289e6e9f66db9c2643a05
refs/heads/master
2021-08-31T18:28:49.841842
2017-12-18T10:35:23
2017-12-18T10:35:23
108,727,080
0
0
null
2017-11-06T20:33:15
2017-10-29T11:09:29
Java
UTF-8
Java
false
false
6,513
java
package za.co.ajk.incidentman.web.rest.errors; import za.co.ajk.incidentman.SystemGatewayApp; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.MediaType; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.zalando.problem.spring.web.advice.MediaTypes; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; /** * Test class for the ExceptionTranslator controller advice. * * @see ExceptionTranslator */ @RunWith(SpringRunner.class) @SpringBootTest(classes = SystemGatewayApp.class) public class ExceptionTranslatorIntTest { @Autowired private ExceptionTranslatorTestController controller; @Autowired private ExceptionTranslator exceptionTranslator; @Autowired private MappingJackson2HttpMessageConverter jacksonMessageConverter; private MockMvc mockMvc; @Before public void setup() { mockMvc = MockMvcBuilders.standaloneSetup(controller) .setControllerAdvice(exceptionTranslator) .setMessageConverters(jacksonMessageConverter) .build(); } @Test public void testConcurrencyFailure() throws Exception { mockMvc.perform(get("/test/concurrency-failure")) .andExpect(status().isConflict()) .andExpect(content().contentType(MediaTypes.PROBLEM)) .andExpect(jsonPath("$.message").value(ErrorConstants.ERR_CONCURRENCY_FAILURE)); } @Test public void testMethodArgumentNotValid() throws Exception { mockMvc.perform(post("/test/method-argument").content("{}").contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isBadRequest()) .andExpect(content().contentType(MediaTypes.PROBLEM)) .andExpect(jsonPath("$.message").value(ErrorConstants.ERR_VALIDATION)) .andExpect(jsonPath("$.fieldErrors.[0].objectName").value("testDTO")) .andExpect(jsonPath("$.fieldErrors.[0].field").value("test")) .andExpect(jsonPath("$.fieldErrors.[0].message").value("NotNull")); } @Test public void testParameterizedError() throws Exception { mockMvc.perform(get("/test/parameterized-error")) .andExpect(status().isBadRequest()) .andExpect(content().contentType(MediaTypes.PROBLEM)) .andExpect(jsonPath("$.message").value("test parameterized error")) .andExpect(jsonPath("$.params.param0").value("param0_value")) .andExpect(jsonPath("$.params.param1").value("param1_value")); } @Test public void testParameterizedError2() throws Exception { mockMvc.perform(get("/test/parameterized-error2")) .andExpect(status().isBadRequest()) .andExpect(content().contentType(MediaTypes.PROBLEM)) .andExpect(jsonPath("$.message").value("test parameterized error")) .andExpect(jsonPath("$.params.foo").value("foo_value")) .andExpect(jsonPath("$.params.bar").value("bar_value")); } @Test public void testMissingServletRequestPartException() throws Exception { mockMvc.perform(get("/test/missing-servlet-request-part")) .andExpect(status().isBadRequest()) .andExpect(content().contentType(MediaTypes.PROBLEM)) .andExpect(jsonPath("$.message").value("error.http.400")); } @Test public void testMissingServletRequestParameterException() throws Exception { mockMvc.perform(get("/test/missing-servlet-request-parameter")) .andExpect(status().isBadRequest()) .andExpect(content().contentType(MediaTypes.PROBLEM)) .andExpect(jsonPath("$.message").value("error.http.400")); } @Test public void testAccessDenied() throws Exception { mockMvc.perform(get("/test/access-denied")) .andExpect(status().isForbidden()) .andExpect(content().contentType(MediaTypes.PROBLEM)) .andExpect(jsonPath("$.message").value("error.http.403")) .andExpect(jsonPath("$.detail").value("test access denied!")); } @Test public void testUnauthorized() throws Exception { mockMvc.perform(get("/test/unauthorized")) .andExpect(status().isUnauthorized()) .andExpect(content().contentType(MediaTypes.PROBLEM)) .andExpect(jsonPath("$.message").value("error.http.401")) .andExpect(jsonPath("$.path").value("/test/unauthorized")) .andExpect(jsonPath("$.detail").value("test authentication failed!")); } @Test public void testMethodNotSupported() throws Exception { mockMvc.perform(post("/test/access-denied")) .andExpect(status().isMethodNotAllowed()) .andExpect(content().contentType(MediaTypes.PROBLEM)) .andExpect(jsonPath("$.message").value("error.http.405")) .andExpect(jsonPath("$.detail").value("Request method 'POST' not supported")); } @Test public void testExceptionWithResponseStatus() throws Exception { mockMvc.perform(get("/test/response-status")) .andExpect(status().isBadRequest()) .andExpect(content().contentType(MediaTypes.PROBLEM)) .andExpect(jsonPath("$.message").value("error.http.400")) .andExpect(jsonPath("$.title").value("test response status")); } @Test public void testInternalServerError() throws Exception { mockMvc.perform(get("/test/internal-server-error")) .andExpect(status().isInternalServerError()) .andExpect(content().contentType(MediaTypes.PROBLEM)) .andExpect(jsonPath("$.message").value("error.http.500")) .andExpect(jsonPath("$.title").value("Internal Server Error")); } }
[ "kappaj@gmail.com" ]
kappaj@gmail.com
cd18d178e2080d3bdacf572e87df57919d6bc338
1c5fd654b46d3fb018032dc11aa17552b64b191c
/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/ServletContextInitializerBeansTests.java
d740c6e4fa5727dafb89a5d4b046046150aa8ccb
[ "Apache-2.0" ]
permissive
yangfancoming/spring-boot-build
6ce9b97b105e401a4016ae4b75964ef93beeb9f1
3d4b8cbb8fea3e68617490609a68ded8f034bc67
refs/heads/master
2023-01-07T11:10:28.181679
2021-06-21T11:46:46
2021-06-21T11:46:46
193,871,877
0
0
Apache-2.0
2022-12-27T14:52:46
2019-06-26T09:19:40
Java
UTF-8
Java
false
false
2,459
java
package org.springframework.boot.web.servlet; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletContext; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServlet; import org.junit.Test; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import static org.assertj.core.api.Assertions.assertThat; /** * Tests for {@link ServletContextInitializerBeans}. * * @author Andy Wilkinson */ public class ServletContextInitializerBeansTests { private ConfigurableApplicationContext context; @Test public void servletThatImplementsServletContextInitializerIsOnlyRegisteredOnce() { load(ServletConfiguration.class); ServletContextInitializerBeans initializerBeans = new ServletContextInitializerBeans( this.context.getBeanFactory()); assertThat(initializerBeans.size()).isEqualTo(1); assertThat(initializerBeans.iterator()).hasOnlyElementsOfType(TestServlet.class); } @Test public void filterThatImplementsServletContextInitializerIsOnlyRegisteredOnce() { load(FilterConfiguration.class); ServletContextInitializerBeans initializerBeans = new ServletContextInitializerBeans( this.context.getBeanFactory()); assertThat(initializerBeans.size()).isEqualTo(1); assertThat(initializerBeans.iterator()).hasOnlyElementsOfType(TestFilter.class); } private void load(Class<?> configuration) { this.context = new AnnotationConfigApplicationContext(configuration); } static class ServletConfiguration { @Bean public TestServlet testServlet() { return new TestServlet(); } } static class FilterConfiguration { @Bean public TestFilter testFilter() { return new TestFilter(); } } static class TestServlet extends HttpServlet implements ServletContextInitializer { @Override public void onStartup(ServletContext servletContext) { } } static class TestFilter implements Filter, ServletContextInitializer { @Override public void onStartup(ServletContext servletContext) { } @Override public void init(FilterConfig filterConfig) { } @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) { } @Override public void destroy() { } } }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
0f685163cc47c6e465f157feab924aa1b50f2ad0
ee2e56b3a4ea4cedf51ed04cd5928c73f1140fb0
/java/shop/src/gen-old/java/de/epages/ws/orderdocument4/model/TGetInvoices_Return.java
4fb3733175eff0439dba9458fb9ed775ee16e8c1
[ "Apache-2.0" ]
permissive
ePages-de/soapclient
75efbd786e8c74d42fa24f9d56b29e79a347d444
bbcb74b38bdf6629266bbb3d0fe1a19dee4b58b8
refs/heads/dev
2023-07-12T05:35:53.333154
2023-06-23T08:10:21
2023-06-23T08:10:21
14,296,539
2
18
null
2023-06-23T08:10:23
2013-11-11T09:28:51
Java
UTF-8
Java
false
false
6,728
java
/** * TGetInvoices_Return.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package de.epages.ws.orderdocument4.model; /** * a single return value of a getInvoices() call. * The Order will be always returned. * The error element will be returned in case of error. * The Invoices element will be returned if no error occured. */ public class TGetInvoices_Return implements java.io.Serializable { private java.lang.String order; /* paths of all invoices of the order */ private java.lang.String[] invoices; /* error object (see epagestypes:TError) */ private de.epages.ws.common.model.TError error; public TGetInvoices_Return() { } public TGetInvoices_Return( java.lang.String order, java.lang.String[] invoices, de.epages.ws.common.model.TError error) { this.order = order; this.invoices = invoices; this.error = error; } /** * Gets the order value for this TGetInvoices_Return. * * @return order */ public java.lang.String getOrder() { return order; } /** * Sets the order value for this TGetInvoices_Return. * * @param order */ public void setOrder(java.lang.String order) { this.order = order; } /** * Gets the invoices value for this TGetInvoices_Return. * * @return invoices * paths of all invoices of the order */ public java.lang.String[] getInvoices() { return invoices; } /** * Sets the invoices value for this TGetInvoices_Return. * * @param invoices * paths of all invoices of the order */ public void setInvoices(java.lang.String[] invoices) { this.invoices = invoices; } /** * Gets the error value for this TGetInvoices_Return. * * @return error * error object (see epagestypes:TError) */ public de.epages.ws.common.model.TError getError() { return error; } /** * Sets the error value for this TGetInvoices_Return. * * @param error * error object (see epagestypes:TError) */ public void setError(de.epages.ws.common.model.TError error) { this.error = error; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof TGetInvoices_Return)) return false; TGetInvoices_Return other = (TGetInvoices_Return) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((this.order==null && other.getOrder()==null) || (this.order!=null && this.order.equals(other.getOrder()))) && ((this.invoices==null && other.getInvoices()==null) || (this.invoices!=null && java.util.Arrays.equals(this.invoices, other.getInvoices()))) && ((this.error==null && other.getError()==null) || (this.error!=null && this.error.equals(other.getError()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getOrder() != null) { _hashCode += getOrder().hashCode(); } if (getInvoices() != null) { for (int i=0; i<java.lang.reflect.Array.getLength(getInvoices()); i++) { java.lang.Object obj = java.lang.reflect.Array.get(getInvoices(), i); if (obj != null && !obj.getClass().isArray()) { _hashCode += obj.hashCode(); } } } if (getError() != null) { _hashCode += getError().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(TGetInvoices_Return.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("urn://epages.de/WebService/OrderDocumentTypes/2008/05", "TGetInvoices_Return")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("order"); elemField.setXmlName(new javax.xml.namespace.QName("", "Order")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("invoices"); elemField.setXmlName(new javax.xml.namespace.QName("", "Invoices")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("error"); elemField.setXmlName(new javax.xml.namespace.QName("", "Error")); elemField.setXmlType(new javax.xml.namespace.QName("urn://epages.de/WebService/EpagesTypes/2005/01", "TError")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
[ "otrosien@epages.com" ]
otrosien@epages.com
f8ace09ad332875feb4c43da4ab93a521e30cba9
8116e2b93b079a703ed2cd5315e4c5989e896569
/module4/10_session_cookie/exercises/b03_add_product_to_cart/src/main/java/com/example/b03_add_product_to_cart/B03AddProductToCartApplication.java
56c9ff945366247b4145d8947e8c0ee4989a1e36
[]
no_license
PhanGiaKhanh/C0221G1-CodeGym.
657e451e21d2c43d9b4018cc617c5eb5c94a8f4c
d28288850f4ace937146df2d556a40bdf71ada7a
refs/heads/main
2023-08-19T20:02:22.677147
2021-09-29T09:52:26
2021-09-29T09:52:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
366
java
package com.example.b03_add_product_to_cart; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class B03AddProductToCartApplication { public static void main(String[] args) { SpringApplication.run(B03AddProductToCartApplication.class, args); } }
[ "phangiakhanh90@gmail.com" ]
phangiakhanh90@gmail.com
fc7ddcaba7b6503e50710cb3fd2ea0ccd9840e39
efc9e3c400100c1bdbca92033e488937fb750fda
/3.JavaMultithreading/src/com/javarush/task/task29/task2913/Solution.java
c59906634f7ec437c35b1385674c215f85161be6
[]
no_license
Nikbstar/JavaRushTasks
289ffea7798df2c1f22a0335f1e8760f66dac973
9b86b284a7f4390807a16e1474e2d58a2be79de0
refs/heads/master
2018-10-21T03:02:45.724753
2018-08-31T06:48:34
2018-08-31T06:48:34
118,357,131
0
0
null
null
null
null
UTF-8
Java
false
false
871
java
package com.javarush.task.task29.task2913; import java.util.Random; /* Замена рекурсии */ public class Solution { private static int numberA; private static int numberB; public static String getAllNumbersBetween(int a, int b) { String result = ""; if (a > b) { for (int i = a; i >= b; i--) { result += i + " "; } } else { for (int i = a; i <= b; i++) { result += i + " "; } } return result.trim(); } public static void main(String[] args) { Random random = new Random(); numberA = random.nextInt() % 1_000; numberB = random.nextInt() % 10_000; System.out.println(getAllNumbersBetween(numberA, numberB)); System.out.println(getAllNumbersBetween(numberB, numberA)); } }
[ "nikbstar@gmail.com" ]
nikbstar@gmail.com
aae50d9bc57aa4f48b91f9edf7f9e99ceeaa9e05
6c1775660e770cf2a97c015181b1b6ea9131ccbc
/app/src/main/java/com/example/quanylysinhvien/database/DBHeplper.java
19f017a1b89298d4bb86ba18b4aef8b42489f591
[]
no_license
lehuuquockhanh/120THLTDD01
a0789320e5983e5e752a593538b79896913b82d4
2a9868f432e9ea45b21aa1957b082cc241c404de
refs/heads/master
2023-02-01T11:59:53.968624
2020-12-14T15:07:12
2020-12-14T15:07:12
321,380,739
0
0
null
null
null
null
UTF-8
Java
false
false
2,357
java
package com.example.quanylysinhvien.database; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import androidx.annotation.Nullable; import com.example.quanylysinhvien.R; import com.example.quanylysinhvien.model.SinhVien; import java.util.ArrayList; public class DBHeplper extends SQLiteOpenHelper { public DBHeplper(@Nullable Context context) { super(context, "QUANLYSINHVIENFPTDB.sqlite", null, 1); } @Override public void onCreate(SQLiteDatabase db) { String sql = " CREATE TABLE LOP(maLop TEXT PRIMARY KEY, tenLop TEXT)"; db.execSQL(sql); sql = " INSERT INTO LOP VALUES ('LT1','Lap Trinh Di Dong')"; db.execSQL(sql); sql = " INSERT INTO LOP VALUES ('LT2','Lap Trinh PHP')"; db.execSQL(sql); sql = " INSERT INTO LOP VALUES ('LT3','Lap Trinh C#')"; db.execSQL(sql); sql = " CREATE TABLE SINHVIEN(maSv TEXT PRIMARY KEY, tenSV TEXT ," + " email TEXT ,hinh TEXT, maLop TEXT REFERENCES LOP(maLop))"; db.execSQL(sql); sql = " INSERT INTO SINHVIEN VALUES ('001','Nguyen Van Que','nguyenvanque@gmail.com','avatame','LT1')"; db.execSQL(sql); sql = " INSERT INTO SINHVIEN VALUES ('002','Tran Thi Truc','tranthitruc@gmail.com','tranthitruc','LT2')"; db.execSQL(sql); sql = " INSERT INTO SINHVIEN VALUES ('003','Tran Quoc Nguyen','quocnguyen@gmail.com','avatamacdinh','LT3')"; db.execSQL(sql); sql = " INSERT INTO SINHVIEN VALUES ('004','Duong Tue Linh','tuelinh@gmail.com','duongtuelinh','LT1')"; db.execSQL(sql); sql = " INSERT INTO SINHVIEN VALUES ('005','Tran Van Nam','vannam@gmail.com','tranvannam','LT2')"; db.execSQL(sql); sql = " INSERT INTO SINHVIEN VALUES ('006','Nguyen Van Hung','vanhung@gmail.com','nguyenvanhung','LT3')"; db.execSQL(sql); sql = "CREATE TABLE taiKhoan(tenTaiKhoan text primary key, matKhau text)"; db.execSQL(sql); sql = "INSERT INTO taiKhoan VALUES('admin','admin')"; db.execSQL(sql); sql = "INSERT INTO taiKhoan VALUES('admin1','admin1')"; db.execSQL(sql); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { } }
[ "you@example.com" ]
you@example.com
e612ea364d6729f38208fd5d1f64eb73045474b9
c8f6b4b4a643e9aeacecc50bebea7102cd4132e7
/Android/Ujoolt/src/com/fgsecure/ujoolt/app/utillity/LoadJoltTask.java
fb5fc72a425eb38e3202731143a5ef78f49583bb
[]
no_license
paulomcnally/visva
c475a5c166662f7a2ac05413aec01021582a226e
e7bbf0559ffd77f7abcb6ba96fae9606a6e4876c
refs/heads/master
2021-01-22T10:21:43.082568
2015-07-05T18:08:58
2015-07-05T18:08:58
40,391,742
0
0
null
null
null
null
UTF-8
Java
false
false
1,363
java
package com.fgsecure.ujoolt.app.utillity; import android.util.Log; import com.fgsecure.ujoolt.app.screen.MainScreenActivity; import com.google.android.maps.GeoPoint; public class LoadJoltTask implements Runnable { MainScreenActivity mainScreenActivity; public LoadJoltTask(MainScreenActivity mainScreenActivity) { this.mainScreenActivity = mainScreenActivity; } @Override public void run() { Log.e("vap", "ok"); mainScreenActivity.curLati = 48895000; mainScreenActivity.curLongi = 2282500; mainScreenActivity.mapController.animateTo(new GeoPoint(mainScreenActivity.curLati, mainScreenActivity.curLongi)); // mc.animateTo(new GeoPoint(48895000, 2282500)); mainScreenActivity.mapController.setZoom(17); mainScreenActivity.mapView.invalidate(); // mainScreenActivity.joltHolder.setCoordinates(mainScreenActivity.curLati, // mainScreenActivity.curLongi); // mainScreenActivity.joltHolder.getAllJoltsFromLocation( // mainScreenActivity.lati_jolt, mainScreenActivity.longi_jolt, // ConfigUtility.getCurTimeStamp()); // mainScreenActivity.joltHolder.autoGenarateJoltBlues( // mainScreenActivity.lati_jolt, mainScreenActivity.longi_jolt); // // mainScreenActivity.getArrayJoltAvailable(); // mainScreenActivity.mapView.regroupJolts(); // mainScreenActivity.displayJolts(); } }
[ "kieuducthang@gmail.com" ]
kieuducthang@gmail.com
9ce7da9a5e347f5d6187c3faf7d0789302f8900d
e3c2722c5095d35fa95d3b73f10e95c830393fe6
/Javabasic/src/c_control/Ex05_while연습.java
7b4a0fa9bc02bd1693c67b983e1014b348546dd4
[]
no_license
kwon64/web1
685bdb81c325c54992a552c59a3b412a57719198
484750018e507b39aeb669059b755664ea8fc3cb
refs/heads/master
2020-11-24T12:51:15.522690
2020-03-30T09:25:39
2020-03-30T09:25:39
228,152,651
0
0
null
null
null
null
UTF-8
Java
false
false
719
java
package c_control; public class Ex05_while연습 { public static void main(String[] args) { // 3 6 9 게임 // for(int i = 1; i<40; i++) { // int su=i; // boolean su369 = false; // // while(su !=0) { // int na = su % 10; // // if(na==3 | na==6| na==9 ) { // System.out.print("짝"); // su369 = true; // } // su /= 10; // } // // if(su369) // System.out.println(); // else System.out.print(i); // } int count = 0; for(int i = 1; i<10000; i++) { int su=i; while(su != 0) { int na = su % 10; if(na==8) { count++; } su /= 10; } } System.out.println(count); } }
[ "Canon@DESKTOP-PL2F7PK" ]
Canon@DESKTOP-PL2F7PK
da2fae33d7d9cdaa8093e31e5ac73af32c432f15
a5d01febfd8d45a61f815b6f5ed447e25fad4959
/Source Code/5.5.1/sources/com/iqoption/chat/viewmodel/UserInfoViewModel$loadUserInfo$2.java
9408325e1f6cf92c07d80e8c0d0d2d8833c81943
[]
no_license
kkagill/Decompiler-IQ-Option
7fe5911f90ed2490687f5d216cb2940f07b57194
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
refs/heads/master
2020-09-14T20:44:49.115289
2019-11-04T06:58:55
2019-11-04T06:58:55
223,236,327
1
0
null
2019-11-21T18:17:17
2019-11-21T18:17:16
null
UTF-8
Java
false
false
1,261
java
package com.iqoption.chat.viewmodel; import kotlin.i; import kotlin.jvm.a.b; import kotlin.jvm.internal.Lambda; import kotlin.jvm.internal.h; import kotlin.l; @i(aXC = {1, 1, 11}, aXD = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u0003\n\u0000\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, aXE = {"<anonymous>", "", "error", "", "invoke"}) /* compiled from: UserInfoViewModel.kt */ final class UserInfoViewModel$loadUserInfo$2 extends Lambda implements b<Throwable, l> { final /* synthetic */ long $countryId; final /* synthetic */ long $userId; final /* synthetic */ UserInfoViewModel this$0; UserInfoViewModel$loadUserInfo$2(UserInfoViewModel userInfoViewModel, long j, long j2) { this.this$0 = userInfoViewModel; this.$userId = j; this.$countryId = j2; super(1); } public /* synthetic */ Object invoke(Object obj) { q((Throwable) obj); return l.etX; } public final void q(Throwable th) { h.e(th, "error"); if (!this.this$0.aLX) { com.iqoption.core.i.w(UserInfoViewModel.TAG, th.getMessage(), th); this.this$0.o(this.$userId, this.$countryId); } } }
[ "yihsun1992@gmail.com" ]
yihsun1992@gmail.com
41746ad8520ac9d704088c9c37b778b7b81eca8f
4d41728f620d6be9916b3c8446da9e01da93fa4c
/src/main/java/org/bukkit/permissions/PermissionAttachment.java
2972d99a817a5d6c257a0b23adfacd674982af42
[]
no_license
TechCatOther/um_bukkit
a634f6ccf7142b2103a528bba1c82843c0bc4e44
836ed7a890b2cb04cd7847eff2c59d7a2f6d4d7b
refs/heads/master
2020-03-22T03:13:57.898936
2018-07-02T09:20:00
2018-07-02T09:20:00
139,420,415
3
2
null
null
null
null
UTF-8
Java
false
false
3,644
java
package org.bukkit.permissions; import org.bukkit.plugin.Plugin; import java.util.LinkedHashMap; import java.util.Map; /** * Holds information about a permission attachment on a {@link Permissible} * object */ public class PermissionAttachment { private PermissionRemovedExecutor removed; private final Map<String, Boolean> permissions = new LinkedHashMap<String, Boolean>(); private final Permissible permissible; private final Plugin plugin; public PermissionAttachment(Plugin plugin, Permissible Permissible) { if(plugin == null) { throw new IllegalArgumentException("Plugin cannot be null"); } else if(!plugin.isEnabled()) { throw new IllegalArgumentException("Plugin " + plugin.getDescription().getFullName() + " is disabled"); } this.permissible = Permissible; this.plugin = plugin; } /** * Gets the plugin responsible for this attachment * * @return Plugin responsible for this permission attachment */ public Plugin getPlugin() { return plugin; } /** * Sets an object to be called for when this attachment is removed from a * {@link Permissible}. May be null. * * @param ex Object to be called when this is removed */ public void setRemovalCallback(PermissionRemovedExecutor ex) { removed = ex; } /** * Gets the class that was previously set to be called when this * attachment was removed from a {@link Permissible}. May be null. * * @return Object to be called when this is removed */ public PermissionRemovedExecutor getRemovalCallback() { return removed; } /** * Gets the Permissible that this is attached to * * @return Permissible containing this attachment */ public Permissible getPermissible() { return permissible; } /** * Gets a copy of all set permissions and values contained within this * attachment. * <p> * This map may be modified but will not affect the attachment, as it is a * copy. * * @return Copy of all permissions and values expressed by this attachment */ public Map<String, Boolean> getPermissions() { return new LinkedHashMap<String, Boolean>(permissions); } /** * Sets a permission to the given value, by its fully qualified name * * @param name Name of the permission * @param value New value of the permission */ public void setPermission(String name, boolean value) { permissions.put(name.toLowerCase(), value); permissible.recalculatePermissions(); } /** * Sets a permission to the given value * * @param perm Permission to set * @param value New value of the permission */ public void setPermission(Permission perm, boolean value) { setPermission(perm.getName(), value); } /** * Removes the specified permission from this attachment. * <p> * If the permission does not exist in this attachment, nothing will * happen. * * @param name Name of the permission to remove */ public void unsetPermission(String name) { permissions.remove(name.toLowerCase()); permissible.recalculatePermissions(); } /** * Removes the specified permission from this attachment. * <p> * If the permission does not exist in this attachment, nothing will * happen. * * @param perm Permission to remove */ public void unsetPermission(Permission perm) { unsetPermission(perm.getName()); } /** * Removes this attachment from its registered {@link Permissible} * * @return true if the permissible was removed successfully, false if it * did not exist */ public boolean remove() { try { permissible.removeAttachment(this); return true; } catch(IllegalArgumentException ex) { return false; } } }
[ "alone.inbox@gmail.com" ]
alone.inbox@gmail.com
a420caf2aed130c29a05df539f0eba819e92c67a
fb71f4802819b0f9e5eb2f71bfe356258b8d1f57
/ontrack-ui-support/src/main/java/net/nemerosa/ontrack/ui/resource/ResourceDecorationContributorServiceImpl.java
3c72f1504819f7247e52325492d2ee1d022f53da
[ "MIT" ]
permissive
nemerosa/ontrack
c5abe0556cc2cc6eb4109e0c2f045ae5cff84da3
de5ae2ebd9d9a30dce4c717f57e4604da85f0b51
refs/heads/master
2023-08-31T11:02:35.297467
2023-08-28T17:59:07
2023-08-28T17:59:07
19,351,480
111
35
MIT
2023-08-31T13:21:53
2014-05-01T17:08:33
Kotlin
UTF-8
Java
false
false
2,497
java
package net.nemerosa.ontrack.ui.resource; import net.nemerosa.ontrack.model.structure.NameDescription; import net.nemerosa.ontrack.model.structure.ProjectEntity; import net.nemerosa.ontrack.model.structure.ProjectEntityType; import net.nemerosa.ontrack.model.support.ApplicationLogEntry; import net.nemerosa.ontrack.model.support.ApplicationLogService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.Collection; import java.util.List; @Service public class ResourceDecorationContributorServiceImpl implements ResourceDecorationContributorService { private final ApplicationLogService logService; private final Collection<ResourceDecorationContributor> contributors; @Autowired public ResourceDecorationContributorServiceImpl(ApplicationLogService logService, Collection<ResourceDecorationContributor> contributors) { this.logService = logService; this.contributors = contributors; } @Override public <T extends ProjectEntity> List<LinkDefinition<T>> getLinkDefinitions(ProjectEntityType projectEntityType) { List<LinkDefinition<T>> definitions = new ArrayList<>(); contributors.forEach(contributor -> { if (contributor.applyTo(projectEntityType)) { try { @SuppressWarnings("unchecked") ResourceDecorationContributor<T> tResourceDecorationContributor = (ResourceDecorationContributor<T>) contributor; definitions.addAll(tResourceDecorationContributor.getLinkDefinitions()); } catch (Exception ex) { // Logging logService.log( ApplicationLogEntry.fatal( ex, NameDescription.nd( "ui-resource-decoration", "Issue when collecting UI resource decoration" ), contributor.getClass().getName() ) .withDetail("ui-resource-type", projectEntityType.name()) .withDetail("ui-resource-decorator", contributor.getClass().getName()) ); } } }); return definitions; } }
[ "damien.coraboeuf@gmail.com" ]
damien.coraboeuf@gmail.com
41236c984220a39d2f481891c48431344b1edf4f
0175a417f4b12b80cc79edbcd5b7a83621ee97e5
/flexodesktop/GUI/flexo/src/main/java/org/openflexo/components/OpenProjectComponent.java
1fe941bbf3dbe6ba724e1091f3faa49180314cb2
[]
no_license
agilebirds/openflexo
c1ea42996887a4a171e81ddbd55c7c1e857cbad0
0250fc1061e7ae86c9d51a6f385878df915db20b
refs/heads/master
2022-08-06T05:42:04.617144
2013-05-24T13:15:58
2013-05-24T13:15:58
2,372,131
11
6
null
2022-07-06T19:59:55
2011-09-12T15:44:45
Java
UTF-8
Java
false
false
2,311
java
/* * (c) Copyright 2010-2011 AgileBirds * * This file is part of OpenFlexo. * * OpenFlexo 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. * * OpenFlexo 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 OpenFlexo. If not, see <http://www.gnu.org/licenses/>. * */ package org.openflexo.components; import java.awt.Frame; import java.io.File; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.JFileChooser; import org.openflexo.AdvancedPrefs; import org.openflexo.prefs.FlexoPreferences; import org.openflexo.view.FlexoFrame; /** * Component allowing to choose an existing flexo project * * @author sguerin */ public class OpenProjectComponent extends ProjectChooserComponent { private static final Logger logger = Logger.getLogger(OpenProjectComponent.class.getPackage().getName()); protected OpenProjectComponent(Frame owner) { super(owner); logger.info("Build OpenProjectComponent"); } public static File getProjectDirectory() { return getProjectDirectory(FlexoFrame.getActiveFrame()); } public static File getProjectDirectory(Frame owner) { OpenProjectComponent chooser = new OpenProjectComponent(owner); File returned = null; int returnVal = -1; boolean ok = false; while (!ok) { try { returnVal = chooser.showOpenDialog(); ok = true; } catch (ArrayIndexOutOfBoundsException e) { if (logger.isLoggable(Level.WARNING)) { logger.warning("Caught ArrayIndexOutOfBoundsException, hope this will stop"); } } } if (returnVal == JFileChooser.APPROVE_OPTION) { returned = chooser.getSelectedFile(); AdvancedPrefs.setLastVisitedDirectory(returned.getParentFile()); FlexoPreferences.savePreferences(true); } else { if (logger.isLoggable(Level.FINE)) { logger.fine("No project supplied"); } return null; } return returned; } }
[ "guillaume.polet@gmail.com" ]
guillaume.polet@gmail.com
0260cb5f8cee6ed686bad748d0c1bac64c6fed3d
a2df6764e9f4350e0d9184efadb6c92c40d40212
/aliyun-java-sdk-rds/src/main/java/com/aliyuncs/rds/model/v20140815/DescribeInstanceKeywordsRequest.java
6c40fa80c899c025de528dcf6c9379a928f94f82
[ "Apache-2.0" ]
permissive
warriorsZXX/aliyun-openapi-java-sdk
567840c4bdd438d43be6bd21edde86585cd6274a
f8fd2b81a5f2cd46b1e31974ff6a7afed111a245
refs/heads/master
2022-12-06T15:45:20.418475
2020-08-20T08:37:31
2020-08-26T06:17:49
290,450,773
1
0
NOASSERTION
2020-08-26T09:15:48
2020-08-26T09:15:47
null
UTF-8
Java
false
false
2,805
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.rds.model.v20140815; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.rds.Endpoint; /** * @author auto create * @version */ public class DescribeInstanceKeywordsRequest extends RpcAcsRequest<DescribeInstanceKeywordsResponse> { private Long resourceOwnerId; private String resourceOwnerAccount; private String ownerAccount; private Long ownerId; private String key; public DescribeInstanceKeywordsRequest() { super("Rds", "2014-08-15", "DescribeInstanceKeywords", "rds"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public Long getResourceOwnerId() { return this.resourceOwnerId; } public void setResourceOwnerId(Long resourceOwnerId) { this.resourceOwnerId = resourceOwnerId; if(resourceOwnerId != null){ putQueryParameter("ResourceOwnerId", resourceOwnerId.toString()); } } public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } public void setResourceOwnerAccount(String resourceOwnerAccount) { this.resourceOwnerAccount = resourceOwnerAccount; if(resourceOwnerAccount != null){ putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount); } } public String getOwnerAccount() { return this.ownerAccount; } public void setOwnerAccount(String ownerAccount) { this.ownerAccount = ownerAccount; if(ownerAccount != null){ putQueryParameter("OwnerAccount", ownerAccount); } } public Long getOwnerId() { return this.ownerId; } public void setOwnerId(Long ownerId) { this.ownerId = ownerId; if(ownerId != null){ putQueryParameter("OwnerId", ownerId.toString()); } } public String getKey() { return this.key; } public void setKey(String key) { this.key = key; if(key != null){ putQueryParameter("Key", key); } } @Override public Class<DescribeInstanceKeywordsResponse> getResponseClass() { return DescribeInstanceKeywordsResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
1a05872e83d2903ff5b01f8e7c923a2e6c22ef5c
7f20b1bddf9f48108a43a9922433b141fac66a6d
/core3/support/tags/support-parent-3.0.0-alpha6/taglets/src/main/java/org/cytoscape/taglets/compatibility/AbstractApiTaglet.java
263d1c36f79eb62045516f630068611210cf156b
[]
no_license
ahdahddl/cytoscape
bf783d44cddda313a5b3563ea746b07f38173022
a3df8f63dba4ec49942027c91ecac6efa920c195
refs/heads/master
2020-06-26T16:48:19.791722
2013-08-28T04:08:31
2013-08-28T04:08:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,353
java
package org.cytoscape.taglets.compatibility; import com.sun.tools.doclets.Taglet; import com.sun.javadoc.Tag; import java.util.Map; /** * An abstract taglet for specifying the Cytoscape API documentation * taglet. */ abstract class AbstractApiTaglet implements Taglet { private final String name; private final String header; private final String desc; /** * Constructor. * @param name The name (tag) of the taglet. * @param header The header for the html output. * @param desc The description for the html output. */ AbstractApiTaglet(String name, String header, String desc) { this.name = name; this.header = header; this.desc = desc; } /** * Returns the name of the taglet found in the javadoc description. * @return The name of the taglet found in the javadoc description. */ public String getName() { return name; } /** * Returns false because this taglet should not appear in this context. * @return false because this taglet should not appear in this context. */ public boolean inField() { return false; } /** * Returns false because this taglet should not appear in this context. * @return false because this taglet should not appear in this context. */ public boolean inConstructor() { return false; } /** * Returns false because this taglet should not appear in this context. * @return false because this taglet should not appear in this context. */ public boolean inMethod() { return false; } /** * Returns false because this taglet should not appear in this context. * @return false because this taglet should not appear in this context. */ public boolean inOverview() { return false; } /** * Returns false because this taglet should not appear in this context. * @return false because this taglet should not appear in this context. */ public boolean inPackage() { return false; } /** * Returns true because this taglet only appears in the type (class) description. * @return true because this taglet only appears in the type (class) description. */ public boolean inType() { return true; } /** * Returns false because this taglet should not appear in this context. * @return false because this taglet should not appear in this context. */ public boolean isInlineTag() { return false; } /** * Can be used by children to easily implement register(tagletMap). */ @SuppressWarnings("unchecked") static void registerTaglet(Map tagletMap, Taglet tag) { if ( tagletMap.containsKey( tag.getName() ) ) tagletMap.remove(tag.getName()); tagletMap.put(tag.getName(), tag); } /** * Actually generates the html included in the javadoc for this tag. * @return A string of HTML to be inserted into the javadoc. */ public String toString(Tag tag) { String result = "<br/><b>Cytoscape Backwards Compatibility (" + header + ")</b>: " + desc +"<br/>"; if ( tag.text() != null && !tag.text().equals("") ) result += tag.text() + "<br/>"; return result; } /** * Simply calls toString(tag) for tag found and concatenates the result. * @return A string of HTML to be inserted into the javadoc. */ public String toString(Tag[] tags) { String result = ""; for ( Tag t : tags ) result += toString(t); return result; } }
[ "mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5" ]
mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5
b0853183cabfbf84047b3837dabae6e1a2b12f4a
9b901d84169b032b48cf0f4f4f200b4bb6f64fe4
/struts/src/com/helloweenvsfei/struts/action/DispatchAction.java
abcc037d388970afb52e619855f6fba7098554a0
[]
no_license
a0248327/JavaBuch
9160ae2342e2f96d5a41e51ae44939c3fb6d0594
83b64a6314df0f2932e0feafc2b7ddbae86e0a4a
refs/heads/master
2016-09-07T18:41:58.357977
2015-03-11T13:43:48
2015-03-11T13:43:48
29,740,865
0
0
null
null
null
null
GB18030
Java
false
false
1,935
java
/* * Generated by MyEclipse Struts * Template path: templates/java/JavaClass.vtl */ package com.helloweenvsfei.struts.action; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; /** * MyEclipse Struts Creation date: 05-03-2008 * * XDoclet definition: * * @struts.action path="/dispatch" name="dispatchForm" * input="/form/dispatch.jsp" parameter="action" scope="request" * validate="true" */ public class DispatchAction extends org.apache.struts.actions.DispatchAction { /* * Generated Methods */ /** * Method execute * * @param mapping * @param form * @param request * @param response * @return ActionForward * @throws Exception */ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { // 一定要执行这句代码, 父类会利用反射调用相关方法 return super.execute(mapping, form, request, response); } public ActionForward add(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { response.getWriter().println("执行了 add() 方法"); return null; } public ActionForward view(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { response.getWriter().println("执行了 view() 方法"); return null; } public ActionForward list(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { response.getWriter().println("执行了 list() 方法"); return null; } }
[ "muxin_email@hotmail.com" ]
muxin_email@hotmail.com
fa21f01b46977d01ab0eedefeff41cc4fd513282
21e092f59107e5cceaca12442bc2e90835473c8b
/bacore/src/main/java/com/basoft/core/ware/wechat/domain/msg/NewsMsg.java
79d86417b6b999de8077969a3af16b9096e22552
[]
no_license
kim50012/smart-menu-endpoint
55095ac22dd1af0851c04837190b7b6652d884a0
d45246f341f315f8810429b3a4ec1d80cb894d7f
refs/heads/master
2023-06-17T02:52:01.135480
2021-07-15T15:05:19
2021-07-15T15:05:19
381,788,497
0
0
null
null
null
null
UTF-8
Java
false
false
2,158
java
package com.basoft.core.ware.wechat.domain.msg; import java.util.ArrayList; import java.util.List; import net.sf.json.JSONObject; /** { "touser":"OPENID", "msgtype":"news", "news":{ "articles": [ { "title":"Happy Day", "description":"Is Really A Happy Day", "url":"URL", "picurl":"PIC_URL" }, { "title":"Happy Day", "description":"Is Really A Happy Day", "url":"URL", "picurl":"PIC_URL" } ] } } */ public class NewsMsg { private String touser = ""; private List<Article> newsList = new ArrayList<Article>(); public static void main(String[] args) { NewsMsg im = new NewsMsg("touser"); im.getNewsList().add(new Article("1", "2", "3", "4")); im.getNewsList().add(new Article("1", "2", "3", "4")); im.getNewsList().add(new Article("1", "2", "3", "4")); System.out.println(im.toJsonString()); } public NewsMsg() { super(); } public NewsMsg(String touser) { super(); this.touser = touser; } public String getTouser() { return touser; } public void setTouser(String touser) { this.touser = touser; } public List<Article> getNewsList() { return newsList; } public void setNewsList(List<Article> newsList) { this.newsList = newsList; } public JSONObject toJson() { JSONObject news = new JSONObject(); List<JSONObject> articleList = new ArrayList<JSONObject>(); for (int i = 0; i < newsList.size() && i < 10; i++) { JSONObject article = new JSONObject(); article.put("title", newsList.get(i).getTitle()); article.put("description", newsList.get(i).getDescription()); article.put("url", newsList.get(i).getUrl()); article.put("picurl", newsList.get(i).getPicurl()); articleList.add(article); } JSONObject articles = new JSONObject(); articles.put("articles", articleList); JSONObject root = new JSONObject(); root.put("touser", touser); root.put("msgtype", "news"); root.put("news", articles); return root; } public String toJsonString() { return toJson().toString(); } }
[ "kim50012@naver.com" ]
kim50012@naver.com
abc21bba329fb5434bbacd49e2b8c4d4c4ed63ce
bceb7f77071b10ef935e706b02b94e3f57604e43
/src/main/java/com/jiujun/voice/modules/apps/user/userinfo/service/impl/UserAlbumServiceImpl.java
3c03d194f1fe02cf3190c15ecd07e1f2811d21cb
[]
no_license
OnlyJJ/yuyin
bde4a58acb87ae24cf857b4d455edfe29b8f9b98
56f470b3fd18f1e3f4bf4cefc0aca3992c67cc74
refs/heads/master
2020-05-04T05:25:57.491586
2019-04-02T02:42:20
2019-04-02T02:42:20
178,985,022
3
3
null
null
null
null
UTF-8
Java
false
false
1,272
java
package com.jiujun.voice.modules.apps.user.userinfo.service.impl; import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Service; import com.jiujun.voice.common.enums.ErrorCode; import com.jiujun.voice.common.exception.CmdException; import com.jiujun.voice.modules.apps.user.userinfo.dao.UserAlbumDao; import com.jiujun.voice.modules.apps.user.userinfo.domain.UserAlbum; import com.jiujun.voice.modules.apps.user.userinfo.service.UserAlbumService; /** * * @author Coody * */ @Service public class UserAlbumServiceImpl implements UserAlbumService{ @Resource UserAlbumDao userAlbumDao; @Override public List<UserAlbum> getUserAlbums(String userId) { return userAlbumDao.getUserAlbums(userId); } @Override public Integer commitUserAlbums(String userId, List<String> imgs) { List<UserAlbum> userAlbums=getUserAlbums(userId); if(userAlbums!=null){ if(userAlbums.size()+imgs.size()>9){ throw new CmdException(ErrorCode.ERROR_1043); } } Integer code= userAlbumDao.commitUserAlbums(userId, imgs); return code; } @Override public Integer delUserAlbums(String userId, List<String> imgs) { return userAlbumDao.delUserAlbums(userId, imgs); } }
[ "370083084@qq.com" ]
370083084@qq.com
ab1697c3b6d64c817ad49f8e07262b930337b5f0
6803987319036e73f92429e357aa3ab8b49c3392
/struts2/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/CheckboxListHandler.java
42807777722b90f5a9e3cec5919e921379748aa4
[]
no_license
oliverswan/OpenSourceReading
8705eac278c3b73426f6d08fc41d14e245b3b97c
30f5ae445dc1ca64b071dc2f5d3bb5b963a5e705
refs/heads/master
2022-10-27T20:34:16.228853
2012-11-03T01:18:13
2012-11-03T01:18:13
5,302,570
0
1
null
2022-10-04T23:36:00
2012-08-05T10:19:28
Java
UTF-8
Java
false
false
4,270
java
/* * $Id: CheckboxListHandler.java 1292705 2012-02-23 08:40:53Z lukaszlenart $ * * 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.struts2.views.java.simple; import com.opensymphony.xwork2.util.ValueStack; import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.StringUtils; import org.apache.struts2.util.MakeIterator; import org.apache.struts2.views.java.Attributes; import org.apache.struts2.views.java.TagGenerator; import java.io.IOException; import java.util.Iterator; import java.util.Map; public class CheckboxListHandler extends AbstractTagHandler implements TagGenerator { public void generate() throws IOException { Map<String, Object> params = context.getParameters(); //Get parameters Object listObj = params.get("list"); String listKey = (String) params.get("listKey"); String listValue = (String) params.get("listValue"); String name = (String) params.get("name"); Object disabled = params.get("disabled"); String id = (String) params.get("id"); int cnt = 1; //This will interate through all lists ValueStack stack = this.context.getStack(); if (listObj != null) { Iterator itt = MakeIterator.convert(listObj); while (itt.hasNext()) { Object item = itt.next(); stack.push(item); //key Object itemKey = findValue(listKey != null ? listKey : "top"); String itemKeyStr = StringUtils.defaultString(itemKey == null ? null : itemKey.toString()); //value Object itemValue = findValue(listValue != null ? listValue : "top"); String itemValueStr = StringUtils.defaultString(itemValue == null ? null : itemValue.toString()); //Checkbox button section Attributes a = new Attributes(); a.add("type", "checkbox") .add("name", name) .add("value", itemKeyStr) .addIfTrue("checked", params.get("nameValue")) .addIfTrue("readonly", params.get("readonly")) .addIfTrue("disabled", disabled) .addIfExists("tabindex", params.get("tabindex")) .addIfExists("id", name + "-" + Integer.toString(cnt++)); start("input", a); end("input"); //Label section a = new Attributes(); a.add("for",id) .addIfExists("class", params.get("cssClass")) .addIfExists("style", params.get("cssStyle")); super.start("label", a); if (StringUtils.isNotEmpty(itemValueStr)) characters(itemValueStr); super.end("label"); //Hidden input section a = new Attributes(); a.add("type", "hidden") .add("id", "__multiselect_" + StringUtils.defaultString(StringEscapeUtils.escapeHtml4(id))) .add("name", "__multiselect_" + StringUtils.defaultString(StringEscapeUtils.escapeHtml4(name))) .add("value", "") .addIfTrue("disabled", disabled); start("input", a); end("input"); stack.pop(); } } } }
[ "li.fu@agree.com.cn" ]
li.fu@agree.com.cn
2873e46cbfea4f088f9edd63a716e13508c8e512
de752b1dab1d9ed20c44e30ffa1ff887b868d2b0
/base/commons/src/main/java/com/gapache/commons/jvm/classloader/MyTest10.java
3be0b096bba95eed976e5a60f97e8d6f67aa822b
[]
no_license
KeKeKuKi/IACAA30
33fc99ba3f1343240fe3fafe82bee01339273b80
6f3f6091b2ca6dd92f22b1697c0fbfc7b9b7d371
refs/heads/main
2023-04-07T21:18:49.105964
2021-04-08T08:41:57
2021-04-08T08:41:57
352,832,814
3
0
null
null
null
null
UTF-8
Java
false
false
946
java
package com.gapache.commons.jvm.classloader; /** * @author HuSen * create on 2020/1/21 15:23 */ public class MyTest10 { public static void main(String[] args) throws ClassNotFoundException { // 调用ClassLoader类的loadClass方法加载一个类,并不是对类的主动使用,不会导致初始化 ClassLoader classLoader = ClassLoader.getSystemClassLoader(); Class<?> aClass = classLoader.loadClass("com.gapache.commons.jvm.classloader.CL"); System.out.println(aClass); System.out.println("-------------------------"); Class<?> aClass1 = Class.forName("com.gapache.commons.jvm.classloader.CL"); System.out.println(aClass1); // class com.gapache.commons.jvm.classloader.CL // ------------------------- // Class CL // class com.gapache.commons.jvm.classloader.CL } } class CL { static { System.out.println("Class CL"); } }
[ "2669918628@qq.com" ]
2669918628@qq.com
c980f1c1cc27d1e6c3208d5a4b49219aab05ffe4
30a3074c8b9e388e242c414d9f7241c1728f7809
/learn-shop-core-product/src/main/java/com/billow/product/api/GoodsSpuDetailApi.java
16036bf96c7a26a427918a2936cd14b8dbe42c85
[ "Apache-2.0" ]
permissive
kangtsang/learn
a40157f054aa8ca6a8fd1458164e2c11623f9dcb
580fa6f7018f7807a5f2008efc96edd1c7a1f61b
refs/heads/master
2023-07-15T01:26:46.874098
2021-08-25T00:49:08
2021-08-25T00:49:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,606
java
package com.billow.product.api; import com.billow.product.pojo.vo.GoodsSpuDetailVo; import org.springframework.web.bind.annotation.*; import org.springframework.beans.factory.annotation.Autowired; import com.billow.product.service.GoodsSpuDetailService; import com.billow.tools.utlis.ConvertUtils; import com.billow.product.pojo.po.GoodsSpuDetailPo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springframework.web.bind.annotation.RestController; /** * <p> * 前端控制器 * </p> * * @author billow * @since 2021-02-06 * @version v1.0 */ @Slf4j @Api(tags = {"GoodsSpuDetailApi"},value = "") @RestController @RequestMapping("/goodsSpuDetailApi") public class GoodsSpuDetailApi { @Autowired private GoodsSpuDetailService goodsSpuDetailService; @ApiOperation(value = "查询分页数据") @PostMapping(value = "/findListByPage") public IPage<GoodsSpuDetailPo> findListByPage(@RequestBody GoodsSpuDetailVo goodsSpuDetailVo){ return goodsSpuDetailService.findListByPage(goodsSpuDetailVo); } @ApiOperation(value = "根据id查询数据") @GetMapping(value = "/findById/{id}") public GoodsSpuDetailVo findById(@PathVariable("id") String id){ GoodsSpuDetailPo po = goodsSpuDetailService.getById(id); return ConvertUtils.convert(po, GoodsSpuDetailVo.class); } @ApiOperation(value = "新增数据") @PostMapping(value = "/add") public GoodsSpuDetailVo add(@RequestBody GoodsSpuDetailVo goodsSpuDetailVo){ GoodsSpuDetailPo po = ConvertUtils.convert(goodsSpuDetailVo, GoodsSpuDetailPo.class); goodsSpuDetailService.save(po); return ConvertUtils.convert(po, GoodsSpuDetailVo.class); } @ApiOperation(value = "删除数据") @DeleteMapping(value = "/delById/{id}") public boolean delById(@PathVariable("id") String id){ return goodsSpuDetailService.removeById(id); } @ApiOperation(value = "更新数据") @PutMapping(value = "/update") public GoodsSpuDetailVo update(@RequestBody GoodsSpuDetailVo goodsSpuDetailVo){ GoodsSpuDetailPo po = ConvertUtils.convert(goodsSpuDetailVo, GoodsSpuDetailPo.class); goodsSpuDetailService.updateById(po); return ConvertUtils.convert(po, GoodsSpuDetailVo.class); } @ApiOperation("根据ID禁用数据") @PutMapping("/prohibitById/{id}") public boolean prohibitById(@PathVariable String id) { return goodsSpuDetailService.prohibitById(id); } }
[ "lyongtao123@126.com" ]
lyongtao123@126.com
0e840ab92714711101343e5e4eb489b2baaa4ca0
36523366ad993a78c9fb067583a15812f2d8904b
/Chapter 7. Methods/HelloWorld5.java
16932fd050a9c5fc95b2086b1a68c43e18e3458d
[]
no_license
alrha486/javaSE
6fd1afca8dfe75233ba6aab724db6da2decb42f8
6c70f5207eb950e08c44a45977b0d282cdcc6fe7
refs/heads/master
2020-03-27T12:42:00.823691
2018-08-29T07:37:52
2018-08-29T07:37:52
146,562,945
0
0
null
null
null
null
UTF-8
Java
false
false
174
java
public class HelloWorld5{ static String msg = "Hello, World"; //class variable, static variable public static void main(String[] args) { System.out.println(msg); } }
[ "alrha486@naver.com" ]
alrha486@naver.com
5fe2244fa54716e4f12f397c9d2a916d23471f81
848c2372f0afbc579e7d70889b0c9b6e1e87d6ed
/0809/src/AbstractMethodDemo.java
bf6747a0c705152a0a01c0b6989543b0afd35387
[]
no_license
tmznf963/SIST-E
fdc505d223b680276e7b30468b56ea62f1891850
d24806373ac2b4eab163803d28d23124ad91238f
refs/heads/master
2020-03-24T16:49:09.117983
2018-09-13T03:40:30
2018-09-13T03:40:30
142,838,096
0
0
null
null
null
null
UHC
Java
false
false
159
java
public class AbstractMethodDemo { public static void main(String[] args) { Demo d = new JasikDemo();//다형성 강제화 d.display(); d.print(); } }
[ "qhfhd963@naver.com" ]
qhfhd963@naver.com
3be87d2197b1c3ec5a4c7b86225f907e42eb2eb7
40665051fadf3fb75e5a8f655362126c1a2a3af6
/intuit-Tank/33f7f86351bbc076efe3b269d2988e65ee00b954/118/GenericFunctions.java
07717f4b61f332d7c0312b1de7cdf49dd0c87f00
[]
no_license
fermadeiral/StyleErrors
6f44379207e8490ba618365c54bdfef554fc4fde
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
refs/heads/master
2020-07-15T12:55:10.564494
2019-10-24T02:30:45
2019-10-24T02:30:45
205,546,543
2
0
null
null
null
null
UTF-8
Java
false
false
5,986
java
package com.intuit.tank.harness.functions; /* * #%L * Intuit Tank Agent (apiharness) * %% * Copyright (C) 2011 - 2015 Intuit Inc. * %% * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * #L% */ import java.util.Map; import java.util.Random; import java.util.Stack; import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import com.intuit.tank.harness.test.data.Variables; import com.intuit.tank.vm.common.TankConstants; class GenericFunctions { static Random rnd = new Random(); static Logger logger = LogManager.getLogger(GenericFunctions.class); private static Map<Long, String[]> csvLineMap = new ConcurrentHashMap<Long, String[]>(); private static Map<String, String[]> fileLineMap = new ConcurrentHashMap<String, String[]>(); private static int lastSSN = -1; /** * Is this a valid Generic function request * * @param values * The command * @return TRUE if valid format; FALSE otherwise */ public static boolean isValid(String[] values) { try { if (values[2].equalsIgnoreCase("getcsv")) { if (values[3] != "") return true; } else if (values[2].equalsIgnoreCase("getfiledata")) { if (values[3] != "") return true; } else if (values[2].equalsIgnoreCase("getssn")) { return true; } return false; } catch (Exception ex) { return false; } } /** * Process the date request * * @param values * The command line * @return The requested value; "" if there was an error */ public static String executeFunction(String[] values, Variables variables) { try { if (values[2].equalsIgnoreCase("getcsv")) { return GenericFunctions.getCSVData(Integer.parseInt(values[3])); } else if (values[2].equalsIgnoreCase("getfiledata")) { return GenericFunctions.getCSVData(values, variables); } else if (values[2].equalsIgnoreCase("getssn")) { return GenericFunctions.getSsn(values[3]); } return ""; } catch (Exception ex) { return ""; } } public static String getCSVData(int index) { String ret = null; String[] currentLine = csvLineMap.get(Thread.currentThread().getId()); if (currentLine == null || index >= currentLine.length || currentLine[index] == null) { currentLine = CSVReader.getInstance(TankConstants.DEFAULT_CSV_FILE_NAME).getNextLine(false); csvLineMap.put(Thread.currentThread().getId(), currentLine); } if (null == currentLine) { logger.debug("Next line in CSV file is null; returning empty string..."); } else if (index < currentLine.length) { logger.debug("Next item retrieved from csv file: " + currentLine[index]); ret = currentLine[index]; currentLine[index] = null; } else { logger.debug("Next line in index file has " + currentLine.length + " elements; tried to retrieve index " + index); } return ret != null ? ret : ""; } public static String getCSVData(String[] values, Variables variables) { String ret = null; int index = Integer.parseInt(values[values.length - 1]); String file = values[3]; for (int i = 4; i < values.length - 1; i++) { file += "." + values[i]; } String[] currentLine = fileLineMap.get(Thread.currentThread().getId() + "-" + file); if (currentLine == null || index >= currentLine.length || currentLine[index] == null) { currentLine = CSVReader.getInstance(file).getNextLine(false); fileLineMap.put(Thread.currentThread().getId() + "-" + file, currentLine); } if (null == currentLine) { logger.debug("Next line in CSV file is null; returning empty string..."); } else if (index < currentLine.length) { logger.debug("Next item retrieved from csv file: " + currentLine[index]); ret = currentLine[index]; currentLine[index] = null; } else { logger.debug("Next line in index file has " + currentLine.length + " elements; tried to retrieve index " + index); } return ret != null ? ret : ""; } /** * * @param startSsn * @return */ public static String getSsn(String val) { int ret = 0; if (lastSSN < 0) { int startSsn = 100000000; if (NumberUtils.isDigits(val)) { startSsn = Integer.parseInt(val); } lastSSN = startSsn; } Stack<Integer> stack = StringFunctions.getStack(lastSSN, 899999999, null, false); do { ret = stack.pop(); } while (!isValidSsn(ret)); String ssnString = Integer.toString(ret); StringUtils.leftPad(ssnString, 9, '0'); ssnString = ssnString.substring(0, 3) + "-" + ssnString.substring(3, 5) + "-" + ssnString.substring(5, 9); return ssnString; } private static boolean isValidSsn(int ssn) { if (((ssn >= 1010001) && (ssn <= 699999999)) || ((ssn >= 700010001) && (ssn <= 733999999)) || ((ssn >= 750010001) && (ssn <= 763999999)) || ((ssn >= 764010001) && (ssn <= 899999999))) { return true; } return false; } }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
367a933e044750b81364384fa6785ff4ddd222fe
3b3d65b5fb0de28cc0205f53f7f1bc2435126b35
/chapter7/src/main/java/com/apress/hibernaterecipes/chapter7/recipe1/Book1.java
2d9999548587dfd6cf4ced4d5706a38698f7c9e6
[]
no_license
dlee0113/hibernate_recipes_second_edition
d8145eccb4da451d683bf92f489b0f8aa8d19da3
edcee59e671750580a3b3664c8369ee6baf6c456
refs/heads/master
2016-09-06T13:55:07.823882
2015-07-07T18:01:20
2015-07-07T18:01:20
38,683,522
3
2
null
null
null
null
UTF-8
Java
false
false
457
java
package com.apress.hibernaterecipes.chapter7.recipe1; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.*; import java.util.HashSet; import java.util.Set; @Entity @Data @NoArgsConstructor public class Book1 { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) int id; String title; @OneToMany(cascade = CascadeType.ALL) @JoinColumn(name = "book_id") Set<Chapter1> chapters = new HashSet<>(); }
[ "dlee0113@gmail.com" ]
dlee0113@gmail.com
ef87c6471cbeb3bfa7646f0984c5b60be1c57240
fca9096ae40e7b3311358e4ee92cc512f6811e71
/src/com/cw/wizbank/JsonMod/user/UserModuleParam.java
55c4c0ffcb1e96c1c8a8179eac9ed9e09d1947f3
[]
no_license
Conanjun/HK_CPDT
0c3d1c00d8c3c02b5493cb3168e84e0693633d12
0cb797aff03fd4e8c24458c8f78d71a19c788829
refs/heads/master
2022-12-27T16:45:37.746697
2019-06-17T14:21:16
2019-06-17T14:21:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,835
java
package com.cw.wizbank.JsonMod.user; import com.cw.wizbank.JsonMod.BaseParam; public class UserModuleParam extends BaseParam { private long usr_ent_id; // for home page of learner activetab private String type; // for select language on page private String lang; private String usr_id; private String usr_email; private String usr_pwd; //for sending notify private String sender_id; private String sid; private long tcr_id; private String isPreView; private String id_lst; public String getId_lst() { return id_lst; } public void setId_lst(String id_lst) { this.id_lst = id_lst; } public String getUsr_email() { return usr_email; } public void setUsr_email(String usr_email) { this.usr_email = usr_email; } public String getUsr_id() { return usr_id; } public void setUsr_id(String usr_id) { this.usr_id = usr_id; } public long getUsr_ent_id() { return usr_ent_id; } public void setUsr_ent_id(long user_id) { this.usr_ent_id = user_id; } public String getLang() { return lang; } public void setLang(String lang) { this.lang = lang; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getSender_id() { return sender_id; } public void setSender_id(String sender_id) { this.sender_id = sender_id; } public String getSid() { return sid; } public void setSid(String sid) { this.sid = sid; } public String getUsr_pwd() { return usr_pwd; } public void setUsr_pwd(String usr_pwd) { this.usr_pwd = usr_pwd; } public void setTcr_id(long tcr_id) { this.tcr_id = tcr_id; } public long getTcr_id() { return tcr_id; } public String getIsPreView() { return isPreView; } public void setIsPreView(String isPreView) { this.isPreView = isPreView; } }
[ "13450871516@163.com" ]
13450871516@163.com
36886944f8e1d168769612133f0a47ad9b7bb602
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_dee9420cdab18b1fbd79fd64240c202c07a01842/MethodInvokerUtils/9_dee9420cdab18b1fbd79fd64240c202c07a01842_MethodInvokerUtils_t.java
3792d742d1f1d76f1f481cc19ddb95d11d259461
[]
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,091
java
/* * Copyright 2002-2008 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.batch.support; import java.lang.annotation.Annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Target; import java.lang.reflect.Method; import java.util.concurrent.atomic.AtomicReference; import org.springframework.core.annotation.AnnotationUtils; import org.springframework.util.Assert; import org.springframework.util.ClassUtils; import org.springframework.util.ObjectUtils; import org.springframework.util.ReflectionUtils; /** * Utility methods for create MethodInvoker instances. * * @author Lucas Ward * @since 2.0 */ public class MethodInvokerUtils { /** * Create a {@link MethodInvoker} using the provided method name to search. * * @param object to be invoked * @param methodName of the method to be invoked * @param paramsRequired boolean indicating whether the parameters are * required, if false, a no args version of the method will be * searched for. * @param paramTypes - parameter types of the method to search for. * @return MethodInvoker if the method is found, null if it is not. */ public static MethodInvoker createMethodInvokerByName(Object object, String methodName, boolean paramsRequired, Class<?>... paramTypes) { Assert.notNull(object, "Object to invoke must not be null"); Method method = ClassUtils.getMethodIfAvailable(object.getClass(), methodName, paramTypes); // if no method was found for the given parameters, and the parameters // aren't required if (method == null && !paramsRequired) { // try with no params method = ClassUtils.getMethodIfAvailable(object.getClass(), methodName, new Class[] {}); } if (method == null) { return null; } else { return new SimpleMethodInvoker(object, method); } } /** * Create a {@link MethodInvoker} using the provided interface, and method * name from that interface. * * @param cls the interface to search for the method named * @param methodName of the method to be invoked * @param object to be invoked * @param paramTypes - parameter types of the method to search for. * @return MethodInvoker if the method is found, null if it is not. */ public static MethodInvoker getMethodInvokerForInterface(Class<?> cls, String methodName, Object object, Class<?>... paramTypes) { if (cls.isAssignableFrom(object.getClass())) { return MethodInvokerUtils.createMethodInvokerByName(object, methodName, true, paramTypes); } else { return null; } } /** * Create {@link MethodInvoker} for the method with the provided annotation * on the provided object. It should be noted that annotations that cannot * be applied to methods (i.e. that aren't annotated with an element type of * METHOD) will cause an exception to be thrown. * * @param annotationType to be searched for * @param candidate to be invoked * @return MethodInvoker for the provided annotation, null if none is found. */ public static MethodInvoker getMethodInvokerByAnnotation(final Class<? extends Annotation> annotationType, final Object candidate) { Assert.notNull(candidate, "class must not be null"); Assert.notNull(annotationType, "annotationType must not be null"); Assert.isTrue(ObjectUtils.containsElement(annotationType.getAnnotation(Target.class).value(), ElementType.METHOD), "Annotation [" + annotationType + "] is not a Method-level annotation."); final AtomicReference<Method> annotatedMethod = new AtomicReference<Method>(); ReflectionUtils.doWithMethods(candidate.getClass(), new ReflectionUtils.MethodCallback() { public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException { Annotation annotation = AnnotationUtils.findAnnotation(method, annotationType); if (annotation != null) { Assert.isNull(annotatedMethod.get(), "found more than one method on target class [" + candidate.getClass().getSimpleName() + "] with the annotation type [" + annotationType.getSimpleName() + "]."); annotatedMethod.set(method); } } }); Method method = annotatedMethod.get(); if (method == null) { return null; } else { return new SimpleMethodInvoker(candidate, annotatedMethod.get()); } } /** * Create a {@link MethodInvoker} for the delegate from a single public * method with the signature provided. * * @param candidate an object to search for an appropriate method * @return a MethodInvoker that calls a method on the delegate */ public static <C, T> MethodInvoker getMethodInvokerForSingleArgument(Object candidate) { final AtomicReference<Method> methodHolder = new AtomicReference<Method>(); ReflectionUtils.doWithMethods(candidate.getClass(), new ReflectionUtils.MethodCallback() { public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException { if (method.getParameterTypes() == null || method.getParameterTypes().length != 1) { return; } if (method.getReturnType().equals(Void.TYPE) || ReflectionUtils.isEqualsMethod(method)) { return; } Assert.state(methodHolder.get() == null, "More than one non-void public method detected with single argument."); methodHolder.set(method); } }); Method method = methodHolder.get(); return new SimpleMethodInvoker(candidate, method); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
9f5cb64ecf66a7e36ff588a3eb2af1c30dfd8df8
40cd4da5514eb920e6a6889e82590e48720c3d38
/desktop/applis/apps/core/common/expressionlanguage/src/main/java/code/expressionlanguage/exec/blocks/ExecDeclareVariable.java
68edf319963dc0a713520120759bbcb1e9786256
[]
no_license
Cardman/projects
02704237e81868f8cb614abb37468cebb4ef4b31
23a9477dd736795c3af10bccccb3cdfa10c8123c
refs/heads/master
2023-08-17T11:27:41.999350
2023-08-15T07:09:28
2023-08-15T07:09:28
34,724,613
4
0
null
2020-10-13T08:08:38
2015-04-28T10:39:03
Java
UTF-8
Java
false
false
849
java
package code.expressionlanguage.exec.blocks; import code.expressionlanguage.ContextEl; import code.expressionlanguage.exec.StackCall; import code.expressionlanguage.exec.calls.AbstractPageEl; import code.util.StringList; public final class ExecDeclareVariable extends ExecAbstractDeclareVariable { private final String importedClassName; public ExecDeclareVariable(String _importedClassName, StringList _variableNames) { super(_variableNames); importedClassName = _importedClassName; } @Override public void processEl(ContextEl _cont, StackCall _stack) { ExecHelperBlocks.processDeclare(_cont, _stack, importedClassName, this); } @Override public void removeLocalVars(AbstractPageEl _ip) { for (String v: getVariableNames()) { _ip.removeRefVar(v); } } }
[ "f.desrochettes@gmail.com" ]
f.desrochettes@gmail.com
07669e80c4093d1d9632b86bf771eacb10e786b8
a7454682c6413d11647e0eacc63704b5c3bc8ee4
/SAVOIR_MgmtServices/src/ca/gc/nrc/iit/savoir/resourceMgmt/InstanceState.java
4be49a7736d47700eebce305e7a852b942865e0b
[]
no_license
savoir2013/savoir
ffec9b38d2cd41cac689c776bb5c742d0d1dc65a
daa80b13475729ba1d490f8dd93d85553bca09aa
refs/heads/master
2021-01-22T09:47:18.370871
2013-01-29T21:26:46
2013-01-29T21:26:46
7,899,749
1
0
null
null
null
null
UTF-8
Java
false
false
870
java
// Licensed under Apache 2.0 // Copyright 2011, National Research Council of Canada // Property of Lakehead University package ca.gc.nrc.iit.savoir.resourceMgmt; /** * Represents the state of a specific instance of an ED * * @author Aaron Moss */ public class InstanceState { /** Reference to the instance this state is of */ private InstanceId id; /** State of the ED instance */ private ResourceState state; public InstanceState() {} public InstanceState(InstanceId id) { this(id, ResourceState.INACTIVE); } public InstanceState(InstanceId id, ResourceState state) { this.id = id; this.state = state; } public InstanceId getId() { return id; } public ResourceState getState() { return state; } public void setId(InstanceId id) { this.id = id; } public void setState(ResourceState state) { this.state = state; } }
[ "Justin.Hickey@nrc.gc.ca" ]
Justin.Hickey@nrc.gc.ca