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
ba3f46a8b2c06a717275984241d8114c9ca6ffd2
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/repairnator/learning/1597/HardwareInfoSerializer.java
13c984e72d06a37b20de3a81f530e5df120dc233
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,049
java
package fr.inria.spirals.repairnator.serializer; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import fr.inria.spirals.repairnator.Utils; import fr.inria.spirals.repairnator.serializer.engines.SerializedData; import fr.inria.spirals.repairnator.serializer.engines.SerializerEngine; import java.util.ArrayList; import java.util.List; /** * Created by urli on 21/04/2017. */ public class HardwareInfoSerializer extends ProcessSerializer { private String runId; private String buildId; public HardwareInfoSerializer(List<SerializerEngine> engines, String runId, String buildId) { super(engines, SerializerType.HARDWARE_INFO); this.runId = runId; this.buildId = buildId; } @Override public void serialize() { SerializedData data = new SerializedData(this.serializeAsList(), this.serializeAsJson()); List<SerializedData> allData = new ArrayList<>(); allData.add(data); for (SerializerEngine engine : this.getEngines()) { engine.serialize(allData, this.getType()); } } private JsonElement serializeAsJson() { JsonObject result = new JsonObject(); result.addProperty("runId", this.runId); result.addProperty("buildId", this.buildId); result.addProperty("hostname", Utils.getHostname()); result.addProperty("nbProcessors", Runtime.getRuntime().availableProcessors()); result.addProperty("freeMemory", Runtime.getRuntime().freeMemory()); result.addProperty("totalMemory", Runtime.getRuntime().totalMemory()); return result; } private List<Object> serializeAsList() { List<Object> dataCol = new ArrayList<>(); dataCol.add(this.runId); dataCol.add(this.buildId); dataCol.add(Utils.getHostname()); dataCol.add(Runtime.getRuntime().availableProcessors()); dataCol.add(Runtime.getRuntime().freeMemory()); dataCol.add(Runtime.getRuntime().totalMemory()); return dataCol; } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
35b5c947eba4e184328e134710fb6875fe2791bd
15f806745ef5cca72251254c24618a345fb3eb4c
/fintech-admin/src/main/java/com/qunar/fintech/plat/admin/newmarketing/enums/ReviewFilterTypeEnum.java
27b880c56c2066d48fa076d1eb7ea2cd44573765
[]
no_license
GSIL-Monitor/QunarProjectsStave
005f863b178645d8e90a44bdd14c5c0593574734
c455cda3a3aa86c68203e5d9be2545b2e88b47b0
refs/heads/master
2020-04-23T20:52:59.058801
2019-02-19T09:55:38
2019-02-19T09:55:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
876
java
package com.qunar.fintech.plat.admin.newmarketing.enums; /** * @author qun.shi * @since 2019-02-02 5:19 PM */ public enum ReviewFilterTypeEnum { QUERY_PROCESSING_BY_ME(1,"查询待我处理的审核记录"), QUERY_PROCESSED_BY_ME(2,"查询经我处理的审核记录"), QUERY_COMMITED_BY_ME(3,"查询由我提交的审核记录"); private Integer filterId; private String filterName; ReviewFilterTypeEnum(Integer filterId, String filterName) { this.filterId = filterId; this.filterName = filterName; } public Integer getFilterId() { return filterId; } public void setFilterId(Integer filterId) { this.filterId = filterId; } public String getFilterName() { return filterName; } public void setFilterName(String filterName) { this.filterName = filterName; } }
[ "guijun.qu@quanr.com" ]
guijun.qu@quanr.com
8f2fb03e2d22945c9cc3ed584a2a8c98ffa1422c
1e43a2fa1617302c2ef639ab83207fe084d28c09
/src/main/java/zmaster587/advancedRocketry/item/ItemPackedStructure.java
8ab0589e1a4d0eddc202fa3c2e200df87db1d9a6
[ "MIT" ]
permissive
vic4games/AdvancedRocketry
1c54c4c7c4af17421f97f3fcced6288803e53d6d
0aeca8f197658d1e17b18e82b6e7b7c81f00cfec
refs/heads/master
2021-05-16T01:38:54.161405
2017-09-13T00:10:08
2017-09-13T00:10:08
106,319,268
1
0
null
2017-10-09T18:18:12
2017-10-09T18:18:12
null
UTF-8
Java
false
false
926
java
package zmaster587.advancedRocketry.item; import zmaster587.advancedRocketry.util.StorageChunk; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; public class ItemPackedStructure extends Item { public ItemPackedStructure() { setHasSubtypes(true); } public void setStructure(ItemStack stack, StorageChunk chunk) { NBTTagCompound nbt; if(stack.hasTagCompound()) nbt = stack.getTagCompound(); else nbt = new NBTTagCompound(); NBTTagCompound chunkNbt = new NBTTagCompound(); chunk.writeToNBT(chunkNbt); nbt.setTag("chunk", chunkNbt); stack.setTagCompound(nbt); } public StorageChunk getStructure(ItemStack stack) { if(stack.hasTagCompound()) { NBTTagCompound nbt = stack.getTagCompound(); StorageChunk chunk = new StorageChunk(); chunk.readFromNBT(nbt.getCompoundTag("chunk")); return chunk; } return null; } }
[ "zmasterfun@gmail.com" ]
zmasterfun@gmail.com
d84f2b1374b1ac6cb0fa2254f4f1bb4ff27f50f2
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-31b-6-6-SPEA2-WeightedSum:TestLen:CallDiversity/org/apache/commons/math3/distribution/AbstractIntegerDistribution_ESTest_scaffolding.java
26268a615305f0b943fa3d87e04d722da95fc4aa
[]
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
469
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun Jan 19 03:13:26 UTC 2020 */ package org.apache.commons.math3.distribution; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class AbstractIntegerDistribution_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
cdb27654bc9b865c504b3a1601cf08167559a33d
7beb062b1720ca30700c3546139d2d5d0510f54d
/component/src/main/java/com/aatrox/component/solr/stats/StatsSolrPagination.java
0edb35b975429ea564afe08728a13ffe10873279
[]
no_license
beiyuanbing/aatrox-cloud
7976024f02200bd12a2e4812cadab42c4ef424e2
bfc2ecac7f7f3d1c98b85379f1135ab511fb7535
refs/heads/master
2023-08-28T20:13:29.701897
2021-06-09T07:11:48
2021-06-09T07:11:48
245,924,093
0
0
null
2021-04-22T19:11:45
2020-03-09T02:12:26
Java
UTF-8
Java
false
false
674
java
package com.aatrox.component.solr.stats; import com.aatrox.common.bean.Pagination; import org.apache.solr.client.solrj.response.FieldStatsInfo; import java.util.List; /** * @author aatrox * @desc * @date 2019-08-12 */ public class StatsSolrPagination<T> extends Pagination<T> { private List<FieldStatsInfo> statsFields; public StatsSolrPagination() { } public StatsSolrPagination(int pageSize, int page) { super(pageSize, page); } public List<FieldStatsInfo> getStatsFields() { return this.statsFields; } public void setStatsFields(List<FieldStatsInfo> statsFields) { this.statsFields = statsFields; } }
[ "425210220@qq.com" ]
425210220@qq.com
f704e8dfe03c09bf7e479781a9ae8e9edea217bb
6eb9945622c34e32a9bb4e5cd09f32e6b826f9d3
/src/io/fabric/sdk/android/services/common/AdvertisingInfo.java
1167fff86b56a73a88c0af0b828d3f0dbd1b15e3
[]
no_license
alexivaner/GadgetX-Android-App
6d700ba379d0159de4dddec4d8f7f9ce2318c5cc
26c5866be12da7b89447814c05708636483bf366
refs/heads/master
2022-06-01T09:04:32.347786
2020-04-30T17:43:17
2020-04-30T17:43:17
260,275,241
0
0
null
null
null
null
UTF-8
Java
false
false
1,416
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package io.fabric.sdk.android.services.common; class AdvertisingInfo { public final String advertisingId; public final boolean limitAdTrackingEnabled; AdvertisingInfo(String s, boolean flag) { advertisingId = s; limitAdTrackingEnabled = flag; } public boolean equals(Object obj) { if (this != obj) { if (obj == null || getClass() != obj.getClass()) { return false; } obj = (AdvertisingInfo)obj; if (limitAdTrackingEnabled != ((AdvertisingInfo) (obj)).limitAdTrackingEnabled) { return false; } if (advertisingId == null ? ((AdvertisingInfo) (obj)).advertisingId != null : !advertisingId.equals(((AdvertisingInfo) (obj)).advertisingId)) { return false; } } return true; } public int hashCode() { int j = 0; int i; if (advertisingId != null) { i = advertisingId.hashCode(); } else { i = 0; } if (limitAdTrackingEnabled) { j = 1; } return i * 31 + j; } }
[ "hutomoivan@gmail.com" ]
hutomoivan@gmail.com
d50bf7b58bf925ec4bacbc5dd9e5388a10e56b45
85c8a4b7df9d5bcc2918724e34708a6c28556b14
/back-service/src/main/java/com/chenyifaer/back/entity/dto/LogDTO.java
38df01b5a12962bd4a26800e2b39c764da8ac67d
[]
no_license
wudonghe1996/chenyifaer-shop
9b38f59a81bc08a129ad15aa4d838ebea66c0c9b
ca51946af31dec7b154c5b0de685c1408761ccdd
refs/heads/master
2022-06-24T06:17:07.753068
2020-05-09T03:58:27
2020-05-09T03:58:27
178,018,127
1
1
null
2022-06-17T02:05:40
2019-03-27T15:02:41
Java
UTF-8
Java
false
false
1,151
java
package com.chenyifaer.back.entity.dto; import com.chenyifaer.basic.common.dto.PageDTO; import lombok.Data; import lombok.experimental.Accessors; import org.hibernate.validator.constraints.Length; /** * _____ _ __ ___ ______ ________ ____ ______ ____ * / ____| | \ \ / (_) ____| / /____ |___ \____ |___ \ * | | | |__ ___ _ _\ \_/ / _| |__ __ _ ___ _ __ / /_ / / __) | / / __) | * | | | '_ \ / _ \ '_ \ / | | __/ _` |/ _ \ '__| '_ \ / / |__ < / / |__ < * | |____| | | | __/ | | | | | | | | (_| | __/ | | (_) / / ___) |/ / ___) | * \_____|_| |_|\___|_| |_|_| |_|_| \__,_|\___|_| \___/_/ |____//_/ |____/ * */ @Data @Accessors(chain = true) public class LogDTO extends PageDTO { /** 操作人 */ @Length(max = 30 , message = "操作人不能超过30个字符") private String adminUserName; /** 动作 */ @Length(max = 20 , message = "动作不能超过20个字符") private String action; /** 操作起始时间 */ private String startTime; /** 操作结束时间 */ private String endTime; }
[ "1044717927@qq.com" ]
1044717927@qq.com
245fcd2764b2533b0966e08d67dee70488bf83d1
471cd06a249f543a14ef415445b176eb76714650
/mcp/temp/src/minecraft/net/minecraft/world/biome/WorldChunkManager.java
0b9fc17807fb061d1db67bb15545576d412fdd87
[ "BSD-3-Clause" ]
permissive
Fredster777/ExploreCraft
ec3102d0dd86b1e9683c30ee7b181e8d0d04e063
db163ca7b40b1fd834d180c17cb8476c551a5540
refs/heads/master
2020-06-06T12:22:18.903600
2014-03-29T14:48:38
2014-03-29T14:48:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,982
java
package net.minecraft.world.biome; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.ArrayList; import java.util.List; import java.util.Random; import net.minecraft.world.ChunkPosition; import net.minecraft.world.World; import net.minecraft.world.WorldType; import net.minecraft.world.biome.BiomeCache; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.gen.layer.GenLayer; import net.minecraft.world.gen.layer.IntCache; public class WorldChunkManager { private GenLayer field_76944_d; private GenLayer field_76945_e; private BiomeCache field_76942_f; private List field_76943_g; protected WorldChunkManager() { this.field_76942_f = new BiomeCache(this); this.field_76943_g = new ArrayList(); this.field_76943_g.add(BiomeGenBase.field_76767_f); this.field_76943_g.add(BiomeGenBase.field_76772_c); this.field_76943_g.add(BiomeGenBase.field_76768_g); this.field_76943_g.add(BiomeGenBase.field_76784_u); this.field_76943_g.add(BiomeGenBase.field_76785_t); this.field_76943_g.add(BiomeGenBase.field_76782_w); this.field_76943_g.add(BiomeGenBase.field_76792_x); } public WorldChunkManager(long p_i1975_1_, WorldType p_i1975_3_) { this(); GenLayer[] var4 = GenLayer.func_75901_a(p_i1975_1_, p_i1975_3_); this.field_76944_d = var4[0]; this.field_76945_e = var4[1]; } public WorldChunkManager(World p_i1976_1_) { this(p_i1976_1_.func_72905_C(), p_i1976_1_.func_72912_H().func_76067_t()); } public List func_76932_a() { return this.field_76943_g; } public BiomeGenBase func_76935_a(int p_76935_1_, int p_76935_2_) { return this.field_76942_f.func_76837_b(p_76935_1_, p_76935_2_); } public float[] func_76936_a(float[] p_76936_1_, int p_76936_2_, int p_76936_3_, int p_76936_4_, int p_76936_5_) { IntCache.func_76446_a(); if(p_76936_1_ == null || p_76936_1_.length < p_76936_4_ * p_76936_5_) { p_76936_1_ = new float[p_76936_4_ * p_76936_5_]; } int[] var6 = this.field_76945_e.func_75904_a(p_76936_2_, p_76936_3_, p_76936_4_, p_76936_5_); for(int var7 = 0; var7 < p_76936_4_ * p_76936_5_; ++var7) { float var8 = (float)BiomeGenBase.field_76773_a[var6[var7]].func_76744_g() / 65536.0F; if(var8 > 1.0F) { var8 = 1.0F; } p_76936_1_[var7] = var8; } return p_76936_1_; } @SideOnly(Side.CLIENT) public float func_76939_a(float p_76939_1_, int p_76939_2_) { return p_76939_1_; } public float[] func_76934_b(float[] p_76934_1_, int p_76934_2_, int p_76934_3_, int p_76934_4_, int p_76934_5_) { IntCache.func_76446_a(); if(p_76934_1_ == null || p_76934_1_.length < p_76934_4_ * p_76934_5_) { p_76934_1_ = new float[p_76934_4_ * p_76934_5_]; } int[] var6 = this.field_76945_e.func_75904_a(p_76934_2_, p_76934_3_, p_76934_4_, p_76934_5_); for(int var7 = 0; var7 < p_76934_4_ * p_76934_5_; ++var7) { float var8 = (float)BiomeGenBase.field_76773_a[var6[var7]].func_76734_h() / 65536.0F; if(var8 > 1.0F) { var8 = 1.0F; } p_76934_1_[var7] = var8; } return p_76934_1_; } public BiomeGenBase[] func_76937_a(BiomeGenBase[] p_76937_1_, int p_76937_2_, int p_76937_3_, int p_76937_4_, int p_76937_5_) { IntCache.func_76446_a(); if(p_76937_1_ == null || p_76937_1_.length < p_76937_4_ * p_76937_5_) { p_76937_1_ = new BiomeGenBase[p_76937_4_ * p_76937_5_]; } int[] var6 = this.field_76944_d.func_75904_a(p_76937_2_, p_76937_3_, p_76937_4_, p_76937_5_); for(int var7 = 0; var7 < p_76937_4_ * p_76937_5_; ++var7) { p_76937_1_[var7] = BiomeGenBase.field_76773_a[var6[var7]]; } return p_76937_1_; } public BiomeGenBase[] func_76933_b(BiomeGenBase[] p_76933_1_, int p_76933_2_, int p_76933_3_, int p_76933_4_, int p_76933_5_) { return this.func_76931_a(p_76933_1_, p_76933_2_, p_76933_3_, p_76933_4_, p_76933_5_, true); } public BiomeGenBase[] func_76931_a(BiomeGenBase[] p_76931_1_, int p_76931_2_, int p_76931_3_, int p_76931_4_, int p_76931_5_, boolean p_76931_6_) { IntCache.func_76446_a(); if(p_76931_1_ == null || p_76931_1_.length < p_76931_4_ * p_76931_5_) { p_76931_1_ = new BiomeGenBase[p_76931_4_ * p_76931_5_]; } if(p_76931_6_ && p_76931_4_ == 16 && p_76931_5_ == 16 && (p_76931_2_ & 15) == 0 && (p_76931_3_ & 15) == 0) { BiomeGenBase[] var9 = this.field_76942_f.func_76839_e(p_76931_2_, p_76931_3_); System.arraycopy(var9, 0, p_76931_1_, 0, p_76931_4_ * p_76931_5_); return p_76931_1_; } else { int[] var7 = this.field_76945_e.func_75904_a(p_76931_2_, p_76931_3_, p_76931_4_, p_76931_5_); for(int var8 = 0; var8 < p_76931_4_ * p_76931_5_; ++var8) { p_76931_1_[var8] = BiomeGenBase.field_76773_a[var7[var8]]; } return p_76931_1_; } } public boolean func_76940_a(int p_76940_1_, int p_76940_2_, int p_76940_3_, List p_76940_4_) { IntCache.func_76446_a(); int var5 = p_76940_1_ - p_76940_3_ >> 2; int var6 = p_76940_2_ - p_76940_3_ >> 2; int var7 = p_76940_1_ + p_76940_3_ >> 2; int var8 = p_76940_2_ + p_76940_3_ >> 2; int var9 = var7 - var5 + 1; int var10 = var8 - var6 + 1; int[] var11 = this.field_76944_d.func_75904_a(var5, var6, var9, var10); for(int var12 = 0; var12 < var9 * var10; ++var12) { BiomeGenBase var13 = BiomeGenBase.field_76773_a[var11[var12]]; if(!p_76940_4_.contains(var13)) { return false; } } return true; } public ChunkPosition func_76941_a(int p_76941_1_, int p_76941_2_, int p_76941_3_, List p_76941_4_, Random p_76941_5_) { IntCache.func_76446_a(); int var6 = p_76941_1_ - p_76941_3_ >> 2; int var7 = p_76941_2_ - p_76941_3_ >> 2; int var8 = p_76941_1_ + p_76941_3_ >> 2; int var9 = p_76941_2_ + p_76941_3_ >> 2; int var10 = var8 - var6 + 1; int var11 = var9 - var7 + 1; int[] var12 = this.field_76944_d.func_75904_a(var6, var7, var10, var11); ChunkPosition var13 = null; int var14 = 0; for(int var15 = 0; var15 < var10 * var11; ++var15) { int var16 = var6 + var15 % var10 << 2; int var17 = var7 + var15 / var10 << 2; BiomeGenBase var18 = BiomeGenBase.field_76773_a[var12[var15]]; if(p_76941_4_.contains(var18) && (var13 == null || p_76941_5_.nextInt(var14 + 1) == 0)) { var13 = new ChunkPosition(var16, 0, var17); ++var14; } } return var13; } public void func_76938_b() { this.field_76942_f.func_76838_a(); } }
[ "freddie.guthrie@googlemail.com" ]
freddie.guthrie@googlemail.com
900fe0e9141f7b6bc4a23b16ec1a3d5fb73d5566
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_68b4f3c2a8a391132b9cb7f4eaebd7f66bfbc8b6/TaskEditorInputFactory/2_68b4f3c2a8a391132b9cb7f4eaebd7f66bfbc8b6_TaskEditorInputFactory_s.java
8f2055d3046ad066a687f22b3b240feaf8010575
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,712
java
/******************************************************************************* * Copyright (c) 2004 - 2006 University Of British Columbia 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 * * Contributors: * University Of British Columbia - initial API and implementation *******************************************************************************/ package org.eclipse.mylyn.internal.tasks.ui.editors; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.mylyn.tasks.core.ITask; import org.eclipse.mylyn.tasks.ui.TasksUiPlugin; import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput; import org.eclipse.ui.IElementFactory; import org.eclipse.ui.IMemento; /** * @author Rob Elves */ public class TaskEditorInputFactory implements IElementFactory { private static final String TAG_TASK_HANDLE = "taskHandle"; public static final String ID_FACTORY = "org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorInputFactory"; public IAdaptable createElement(IMemento memento) { String handle = memento.getString(TAG_TASK_HANDLE); ITask task = TasksUiPlugin.getTaskListManager().getTaskList().getTask(handle); if (task != null) { return new TaskEditorInput(task, false); } return null; } public static void saveState(IMemento memento, TaskEditorInput input) { if(memento != null && input != null && input.getTask() != null) { memento.putString(TAG_TASK_HANDLE, input.getTask().getHandleIdentifier()); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
68287a63438a937d9dac874c3a6d3212352ad568
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/Alluxio--alluxio/ee3c33e513dc3a2f0b862fddd13a012177353828/before/ClientContext.java
c2fbbd1021e0400a9878982b728e66362a7aec8c
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
2,949
java
/* * Licensed to the University of California, Berkeley 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 tachyon.client; import java.net.InetSocketAddress; import java.util.Random; import com.google.common.base.Preconditions; import tachyon.Constants; import tachyon.client.block.BlockStoreContext; import tachyon.client.file.FileSystemContext; import tachyon.conf.TachyonConf; /** * A shared context in each client JVM. It provides common functionality such as the Tachyon * configuration and master address. All members of this class are immutable. This class is * thread safe. */ public class ClientContext { /** * The static configuration object. There is only one TachyonConf object shared within the same * client. */ private static TachyonConf sTachyonConf; private static InetSocketAddress sMasterAddress; private static Random sRandom; static { sTachyonConf = new TachyonConf(); String masterHostname = Preconditions.checkNotNull(sTachyonConf.get(Constants.MASTER_HOSTNAME)); int masterPort = sTachyonConf.getInt(Constants.MASTER_PORT); sMasterAddress = new InetSocketAddress(masterHostname, masterPort); sRandom = new Random(); } /** * @return the tachyonConf for the client process */ public static TachyonConf getConf() { return sTachyonConf; } /** * @return the master address */ public static InetSocketAddress getMasterAddress() { return sMasterAddress; } /** * @return a random non-negative long */ public static long getRandomNonNegativeLong() { return Math.abs(sRandom.nextLong()); } /** * This method is only for testing purposes. * * @param conf new configuration to use */ // TODO(calvin): Find a better way to handle testing configurations public static synchronized void reinitializeWithConf(TachyonConf conf) { sTachyonConf = conf; String masterHostname = Preconditions.checkNotNull(sTachyonConf.get(Constants.MASTER_HOSTNAME)); int masterPort = sTachyonConf.getInt(Constants.MASTER_PORT); sMasterAddress = new InetSocketAddress(masterHostname, masterPort); sRandom = new Random(); BlockStoreContext.INSTANCE.resetContext(); FileSystemContext.INSTANCE.resetContext(); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
ce6a94bfe1ffd988d1187c156db8ac16f33d9cf6
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/org/sonar/ce/task/projectanalysis/formula/counter/DoubleValueTest.java
3a4f8817f3d9818629e03b9553acacbe37b49c18
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
2,560
java
/** * SonarQube * Copyright (C) 2009-2019 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ package org.sonar.ce.task.projectanalysis.formula.counter; import org.junit.Test; public class DoubleValueTest { @Test public void newly_created_DoubleVariationValue_is_unset_and_has_value_0() { DoubleValueTest.verifyUnsetVariationValue(new DoubleValue()); } @Test public void increment_double_sets_DoubleVariationValue_and_increments_value() { DoubleValueTest.verifySetVariationValue(new DoubleValue().increment(10.6), 10.6); } @Test public void increment_DoubleVariationValue_has_no_effect_if_arg_is_null() { DoubleValueTest.verifyUnsetVariationValue(new DoubleValue().increment(null)); } @Test public void increment_DoubleVariationValue_has_no_effect_if_arg_is_unset() { DoubleValueTest.verifyUnsetVariationValue(new DoubleValue().increment(new DoubleValue())); } @Test public void increment_DoubleVariationValue_increments_by_the_value_of_the_arg() { DoubleValue source = new DoubleValue().increment(10); DoubleValue target = new DoubleValue().increment(source); DoubleValueTest.verifySetVariationValue(target, 10); } @Test public void multiple_calls_to_increment_DoubleVariationValue_increments_by_the_value_of_the_arg() { DoubleValue target = new DoubleValue().increment(new DoubleValue().increment(35)).increment(new DoubleValue().increment(10)); DoubleValueTest.verifySetVariationValue(target, 45); } @Test public void multiples_calls_to_increment_double_increment_the_value() { DoubleValue variationValue = new DoubleValue().increment(10.6).increment(95.4); DoubleValueTest.verifySetVariationValue(variationValue, 106); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
2983c6954765d3fdae9bce8421d3d651e7cc5e68
c4833b22536469cc6b4001be6e75bb848960b3bf
/src/main/java/org/infosystema/advance/service/impl/Step11ServiceImpl.java
18840f2bba5002c4f259c4a3b8e46decb07bbccd
[]
no_license
beksay/advance
60dc451b90d0cee03bf78738e99797ce2c2e2359
4ddd88dcf10101d32f8820536ab3cc56a5e57e15
refs/heads/master
2023-06-10T11:13:10.953688
2021-06-30T15:24:22
2021-06-30T15:24:22
296,505,124
0
0
null
null
null
null
UTF-8
Java
false
false
883
java
package org.infosystema.advance.service.impl; import javax.ejb.Local; import javax.ejb.Stateless; import javax.ejb.TransactionAttribute; import javax.ejb.TransactionAttributeType; import javax.ejb.TransactionManagement; import javax.ejb.TransactionManagementType; import org.infosystema.advance.dao.Step11Dao; import org.infosystema.advance.dao.impl.Step11DaoImpl; import org.infosystema.advance.domain.study_abroad.Step11; import org.infosystema.advance.service.Step11Service; /** * * @author Kuttubek Aidaraliev * */ @Stateless @Local(Step11Service.class) @TransactionManagement(TransactionManagementType.CONTAINER) @TransactionAttribute(TransactionAttributeType.SUPPORTS) public class Step11ServiceImpl extends GenericServiceImpl<Step11, Integer, Step11Dao> implements Step11Service { @Override protected Step11Dao getDao() { return new Step11DaoImpl(em, se); } }
[ "bektur@bektur-A320M-H" ]
bektur@bektur-A320M-H
8b2d6b8e5bc71129af3b57c07c4168b8449f04d1
e057a4f3d353666bdf46ace5d4b44a81f5b8f012
/selenium/src/selenium/twodynamicarray.java
eb5b0b564659750828248d7a4ad14d817329c62e
[]
no_license
shaath/Sindhu
9898a4116f45ac906529691b782f72603baf76d1
6f75400d95c1b0e6d337a93b31c1f45996d9c3a1
refs/heads/master
2021-01-17T19:20:26.364550
2016-07-14T10:18:08
2016-07-14T10:18:08
63,326,390
0
0
null
null
null
null
UTF-8
Java
false
false
349
java
package selenium; public class twodynamicarray { public static void main(String[] args) { Object[][] s=new Object[2][2]; s[0][0]="Selenium"; s[0][1]='M'; s[1][0]=true; s[1][1]=20000; for (int i = 0; i < s.length; i++) { for (int j = 0; j < s[i].length; j++) { System.out.println(s[i][j]); } } } }
[ "sharath chandra" ]
sharath chandra
3ae39709e61fb1f2f42155bced3180f6a2f4a2b7
4da9097315831c8639a8491e881ec97fdf74c603
/src/StockIT-v2-release_source_from_JADX/sources/com/google/android/gms/internal/ads/zzekb.java
cf7d638fc5af5ec47eb6964a788e40ea79491086
[ "Apache-2.0" ]
permissive
atul-vyshnav/2021_IBM_Code_Challenge_StockIT
5c3c11af285cf6f032b7c207e457f4c9a5b0c7e1
25c26a4cc59a3f3e575f617b59acc202ee6ee48a
refs/heads/main
2023-08-11T06:17:05.659651
2021-10-01T08:48:06
2021-10-01T08:48:06
410,595,708
1
1
null
null
null
null
UTF-8
Java
false
false
1,967
java
package com.google.android.gms.internal.ads; import java.nio.ByteBuffer; import java.nio.charset.Charset; /* compiled from: com.google.android.gms:play-services-ads-lite@@19.4.0 */ public final class zzekb { private static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1"); static final Charset UTF_8 = Charset.forName("UTF-8"); public static final byte[] zziex; private static final ByteBuffer zzijy; private static final zzeja zzijz; public static int zzbu(boolean z) { return z ? 1231 : 1237; } public static int zzfr(long j) { return (int) (j ^ (j >>> 32)); } static <T> T checkNotNull(T t) { if (t != null) { return t; } throw null; } static <T> T zza(T t, String str) { if (t != null) { return t; } throw new NullPointerException(str); } public static boolean zzy(byte[] bArr) { return zzeng.zzy(bArr); } public static String zzz(byte[] bArr) { return new String(bArr, UTF_8); } public static int hashCode(byte[] bArr) { int length = bArr.length; int zza = zza(length, bArr, 0, length); if (zza == 0) { return 1; } return zza; } static int zza(int i, byte[] bArr, int i2, int i3) { for (int i4 = i2; i4 < i2 + i3; i4++) { i = (i * 31) + bArr[i4]; } return i; } static boolean zzk(zzelj zzelj) { if (!(zzelj instanceof zzeih)) { return false; } zzeih zzeih = (zzeih) zzelj; return false; } static Object zze(Object obj, Object obj2) { return ((zzelj) obj).zzbgl().zzf((zzelj) obj2).zzbgs(); } static { byte[] bArr = new byte[0]; zziex = bArr; zzijy = ByteBuffer.wrap(bArr); byte[] bArr2 = zziex; zzijz = zzeja.zzb(bArr2, 0, bArr2.length, false); } }
[ "57108396+atul-vyshnav@users.noreply.github.com" ]
57108396+atul-vyshnav@users.noreply.github.com
f09717008877ee2809bbad2527b3f8d492afff81
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-cloudcallcenter/src/main/java/com/aliyuncs/cloudcallcenter/model/v20170705/ListPrivacyNumbersOfPoolRequest.java
6b05ad6c189dfb9ad17e618fc521c42e921a68df
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
1,993
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.cloudcallcenter.model.v20170705; import com.aliyuncs.RpcAcsRequest; /** * @author auto create * @version */ public class ListPrivacyNumbersOfPoolRequest extends RpcAcsRequest<ListPrivacyNumbersOfPoolResponse> { public ListPrivacyNumbersOfPoolRequest() { super("CloudCallCenter", "2017-07-05", "ListPrivacyNumbersOfPool", "CloudCallCenter", "innerAPI"); } private String providerId; private String bizId; private String poolId; private String type; public String getProviderId() { return this.providerId; } public void setProviderId(String providerId) { this.providerId = providerId; if(providerId != null){ putQueryParameter("ProviderId", providerId); } } public String getBizId() { return this.bizId; } public void setBizId(String bizId) { this.bizId = bizId; if(bizId != null){ putQueryParameter("BizId", bizId); } } public String getPoolId() { return this.poolId; } public void setPoolId(String poolId) { this.poolId = poolId; if(poolId != null){ putQueryParameter("PoolId", poolId); } } public String getType() { return this.type; } public void setType(String type) { this.type = type; if(type != null){ putQueryParameter("Type", type); } } @Override public Class<ListPrivacyNumbersOfPoolResponse> getResponseClass() { return ListPrivacyNumbersOfPoolResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
0ada7e36aeefa6c5b561a2e6491521f0e64bbc7d
79a6c54645fc508b514aea1cf060661ed273b5ea
/L2J_Server_Tauti_BETA/java/com/l2jserver/gameserver/model/L2Transformation.java
9c59c3a31d1d60afbb8804b45268407a57bacc68
[]
no_license
sandy1890/l2jkr
571c0bcc84f1708bba96b09517374792e39d8829
27ea6baffa455ca427d8d51f007a1b91d953b642
refs/heads/master
2021-01-10T04:02:20.077563
2013-01-20T18:12:09
2013-01-20T18:12:09
48,476,317
0
0
null
null
null
null
UTF-8
Java
false
false
4,834
java
/* * Copyright (C) 2004-2013 L2J Server * * This file is part of L2J Server. * * L2J Server 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. * * L2J Server is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.l2jserver.gameserver.model; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; /** * @author KenM */ public abstract class L2Transformation implements Cloneable, Runnable { private final int _id; private final int _graphicalId; private double _collisionRadius; private double _collisionHeight; private final boolean _isStance; public static final int TRANSFORM_ZARICHE = 301; public static final int TRANSFORM_AKAMANAH = 302; protected static final int[] EMPTY_ARRAY = {}; private L2PcInstance _player; /** * @param id Internal id that server will use to associate this transformation * @param graphicalId Client visible transformation id * @param collisionRadius Collision Radius of the player while transformed * @param collisionHeight Collision Height of the player while transformed */ public L2Transformation(int id, int graphicalId, double collisionRadius, double collisionHeight) { _id = id; _graphicalId = graphicalId; _collisionRadius = collisionRadius; _collisionHeight = collisionHeight; _isStance = false; } /** * @param id Internal id(will be used also as client graphical id) that server will use to associate this transformation * @param collisionRadius Collision Radius of the player while transformed * @param collisionHeight Collision Height of the player while transformed */ public L2Transformation(int id, double collisionRadius, double collisionHeight) { this(id, id, collisionRadius, collisionHeight); } /** * @param id Internal id(will be used also as client graphical id) that server will use to associate this transformation Used for stances */ public L2Transformation(int id) { _id = id; _graphicalId = id; _isStance = true; } /** * @return Returns the id. */ public int getId() { return _id; } /** * @return Returns the graphicalId. */ public int getGraphicalId() { return _graphicalId; } /** * Return true if this is a stance (vanguard/inquisitor) * @return */ public boolean isStance() { return _isStance; } /** * @return Returns the collisionRadius. */ public double getCollisionRadius() { if (isStance()) { return _player.getCollisionRadius(); } return _collisionRadius; } /** * @return Returns the collisionHeight. */ public double getCollisionHeight() { if (isStance()) { return _player.getCollisionHeight(); } return _collisionHeight; } // Scriptable Events public abstract void onTransform(); public abstract void onUntransform(); /** * @param player The player to set. */ private void setPlayer(L2PcInstance player) { _player = player; } /** * @return Returns the player. */ public L2PcInstance getPlayer() { return _player; } public void start() { this.resume(); } public void resume() { this.getPlayer().transform(this); } @Override public void run() { this.stop(); } public void stop() { this.getPlayer().untransform(); } public L2Transformation createTransformationForPlayer(L2PcInstance player) { try { L2Transformation transformation = (L2Transformation) this.clone(); transformation.setPlayer(player); return transformation; } catch (CloneNotSupportedException e) { // should never happen return null; } } // Override if necessary public void onLevelUp() { } /** * @return true if transformation can do melee attack */ public boolean canDoMeleeAttack() { return true; } /** * @return true if transformation can start follow target when trying to cast an skill out of range */ public boolean canStartFollowToCast() { return true; } @Override public String toString() { return getClass().getSimpleName() + " [_id=" + _id + ", _graphicalId=" + _graphicalId + ", _collisionRadius=" + _collisionRadius + ", _collisionHeight=" + _collisionHeight + ", _isStance=" + _isStance + "]"; } }
[ "lineage2kr@gmail.com" ]
lineage2kr@gmail.com
2a290e9ba560a5bc87e54fa34eed92bf926ebda2
38d26072ff850258379fe2110337b723d0a7e6f7
/Hadoop_Extend3/OSModel.diagram/src/hadoopmodel/diagram/edit/policies/CloudItemSemanticEditPolicy.java
b860a33a11e91cc216a5f01123a04c29576a1776
[]
no_license
cshuo/CAMan
dc1e18157147abb7517025b4d349153cb8471557
eafdf8ef5eaf397edfb40037b0709ef84709e4cb
refs/heads/master
2020-12-26T01:49:13.698067
2015-05-28T04:29:31
2015-05-28T04:29:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,771
java
package hadoopmodel.diagram.edit.policies; import hadoopmodel.diagram.edit.commands.HBaseMasterCreateCommand; import hadoopmodel.diagram.edit.commands.HBaseRegionServerCreateCommand; import hadoopmodel.diagram.edit.commands.HDFSDataNodeCreateCommand; import hadoopmodel.diagram.edit.commands.HDFSNameNodeCreateCommand; import hadoopmodel.diagram.edit.commands.JavaCreateCommand; import hadoopmodel.diagram.edit.commands.ServerCreateCommand; import hadoopmodel.diagram.providers.HadoopStackElementTypes; import org.eclipse.emf.transaction.TransactionalEditingDomain; import org.eclipse.gef.commands.Command; import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; import org.eclipse.gmf.runtime.emf.commands.core.commands.DuplicateEObjectsCommand; import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest; /** * @generated */ public class CloudItemSemanticEditPolicy extends HadoopStackBaseItemSemanticEditPolicy { /** * @generated */ public CloudItemSemanticEditPolicy() { super(HadoopStackElementTypes.Cloud_1000); } /** * @generated */ protected Command getCreateCommand(CreateElementRequest req) { if (HadoopStackElementTypes.Server_2001 == req.getElementType()) { return getGEFWrapper(new ServerCreateCommand(req)); } if (HadoopStackElementTypes.HDFSDataNode_2004 == req.getElementType()) { return getGEFWrapper(new HDFSDataNodeCreateCommand(req)); } if (HadoopStackElementTypes.HBaseMaster_2007 == req.getElementType()) { return getGEFWrapper(new HBaseMasterCreateCommand(req)); } if (HadoopStackElementTypes.HDFSNameNode_2005 == req.getElementType()) { return getGEFWrapper(new HDFSNameNodeCreateCommand(req)); } if (HadoopStackElementTypes.HBaseRegionServer_2008 == req .getElementType()) { return getGEFWrapper(new HBaseRegionServerCreateCommand(req)); } if (HadoopStackElementTypes.Java_2003 == req.getElementType()) { return getGEFWrapper(new JavaCreateCommand(req)); } return super.getCreateCommand(req); } /** * @generated */ protected Command getDuplicateCommand(DuplicateElementsRequest req) { TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()) .getEditingDomain(); return getGEFWrapper(new DuplicateAnythingCommand(editingDomain, req)); } /** * @generated */ private static class DuplicateAnythingCommand extends DuplicateEObjectsCommand { /** * @generated */ public DuplicateAnythingCommand( TransactionalEditingDomain editingDomain, DuplicateElementsRequest req) { super(editingDomain, req.getLabel(), req .getElementsToBeDuplicated(), req .getAllDuplicatedElementsMap()); } } }
[ "yudl.nju@gmail.com" ]
yudl.nju@gmail.com
a77c89b9677a9e29e70e1efd3c1910d34cf17e4b
cc35bbc9bda475fc3809c30b573ee2f0ffaeb06b
/Plugins/Instantiation/de.uni_hildesheim.sse.vil.templatelang.tests/src/test/de/uni_hildesheim/sse/vil/templatelang/LocalTestSuite.java
ee4f9e83f3f4842deb9264896a8d5b9b0556da92
[ "Apache-2.0" ]
permissive
ahmedjaved2109/EASyProducer
833afd006feb6d2a1f1fcc9eb82b79db2aa51ae7
c08f831599a9f5993ed1bd144ccdadab3d1d97ed
refs/heads/master
2021-01-18T11:09:08.843648
2016-03-17T20:29:40
2016-03-17T20:29:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
375
java
package test.de.uni_hildesheim.sse.vil.templatelang; import org.junit.runner.RunWith; import org.junit.runners.Suite; /** * Test Suite, which starts all individual test cases. * @author El-Sharkawy * @author Holger Eichelberger */ @RunWith(Suite.class) @Suite.SuiteClasses({BasicTests.class, LocalExecutionTests.class }) public class LocalTestSuite { }
[ "elscha@sse.uni-hildesheim.de" ]
elscha@sse.uni-hildesheim.de
48d3afb32a45d3b1afc6c3c15e393c101c99e418
dd55a5ee926a69a91494ce620dd26cb2f15ad0b8
/Sorting Algorithms/Algorithms/QuickSort.java
c3d96bc3fad13cf06477ad7d99b237386be232a9
[]
no_license
sainandini-m/DataStructures_Algorithms
f89daa53aa0a4aea9b6d38c22d1311b30f0f8400
b98b0f3f3d677575068e8a649bb5473b484de68c
refs/heads/master
2022-10-04T22:37:43.163971
2019-11-09T04:47:27
2019-11-09T04:47:27
221,016,461
1
0
null
null
null
null
UTF-8
Java
false
false
1,122
java
public class QuickSort { private static int partition(int[] arr, int low, int high) { int pivot = arr[high]; int i = low - 1; for(int j = low; j < high; j++) { if(arr[j] < pivot) { i += 1; //swap arr[i] and arr[j] int temp = arr[j]; arr[j] = arr[i]; arr[i] = temp; } } //swap arr[i+1] and pivot //int temp = pivot; arr[high] = arr[i+1]; arr[i+1] = pivot; return i+1; } private static void sort(int[] arr, int low, int high) { if (low < high) { int pi = partition(arr, low, high); sort(arr, low, pi - 1); sort(arr, pi + 1, high); } } private static void print(int[] arr) { for(int i : arr) System.out.print(i + " "); System.out.println(); } public static void main(String[] args) { int[] arr = {10, 7, 8, 9, 1, 5}; sort(arr, 0,arr.length -1); print(arr); } }
[ "kals9seals@gmail.com" ]
kals9seals@gmail.com
8b9a793b95d1fbc160d50479331737ad546671c7
138c5dd54e57f498380c4c59e3ddabf939f1964a
/lcloud-reader/lcloud-notice-service/src/main/java/com/szcti/lcloud/notice/entity/vo/NoticeVO.java
e42e25713fe237cf1be6a3d2d0cafcf233245776
[]
no_license
JIANLAM/zt-project
4d249f4b504789395a335df21fcf1cf009e07d78
50318c9296485d3a97050e307b3a8ab3e12510e7
refs/heads/master
2020-03-31T12:40:36.269261
2018-10-09T09:42:36
2018-10-09T09:42:36
152,225,516
1
0
null
null
null
null
UTF-8
Java
false
false
962
java
package com.szcti.lcloud.notice.entity.vo; import com.szcti.lcloud.common.utils.QueryParam; import lombok.Data; import java.io.Serializable; import java.util.ArrayList; import java.util.Date; import java.util.List; /** * @Title: 消息通知及接收人VO * @Description: 描述 * @author: fengda * @date: 2018/5/16 15:13 */ @Data public class NoticeVO extends QueryParam implements Serializable { private static final long serialVersionUID = 1L; private Long id; private Long noticeReadId; private Long userId; private String userName; private String title; private String content; private Integer type; private Integer status; private String remark; private Long createBy; private String createTime; private Integer readStatus; private String readTime; private String createName; private String orgName; private String sendTime; private List<Object> userIds; }
[ "mrkinlam@163.com" ]
mrkinlam@163.com
e52a5c7f14fa659c198d00ae5f4a6caad7a549d7
ed3805fe27cf1765f213e50fa3d1bb8b5187d6b2
/dubbo-compatible/src/main/java/com/alibaba/dubbo/remoting/exchange/Exchanger.java
d89c97f6123f9864d295bcf14c1f982d605f3f8f
[ "Apache-2.0" ]
permissive
shenyanming95/dubbo
bc409e3eb46a8d3c0db67480c34c453131dceb71
0b26dab128c2b476ba885923329ece230eae30b7
refs/heads/2.7.9-reading
2023-07-11T12:23:54.452716
2021-06-11T01:13:09
2021-06-11T01:13:09
289,592,829
0
1
null
2021-08-22T09:35:34
2020-08-23T01:06:28
Java
UTF-8
Java
false
false
142
java
package com.alibaba.dubbo.remoting.exchange; @Deprecated public interface Exchanger extends org.apache.dubbo.remoting.exchange.Exchanger { }
[ "ian.luo@gmail.com" ]
ian.luo@gmail.com
4c8499aa9ded801bb45989ffadae0c0a4539f999
c885ef92397be9d54b87741f01557f61d3f794f3
/subjects/buggy-versions/JacksonCore-17/src/test/java/com/fasterxml/jackson/core/json/TestRootValues.java
585dbbee485cc2800d9918baf6d52a1bcbf88dcb
[ "Apache-2.0", "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
3,138
java
package com.fasterxml.jackson.core.json; import java.io.*; import com.fasterxml.jackson.core.*; public class TestRootValues extends com.fasterxml.jackson.core.BaseTest { private final JsonFactory JSON_F = new JsonFactory(); public void testSimpleNumbers() throws Exception { _testSimpleNumbers(false); _testSimpleNumbers(true); } private void _testSimpleNumbers(boolean useStream) throws Exception { final String DOC = "1 2\t3\r4\n5\r\n6\r\n 7"; JsonParser jp = useStream ? createParserUsingStream(JSON_F, DOC, "UTF-8") : createParserUsingReader(JSON_F, DOC); for (int i = 1; i <= 7; ++i) { assertToken(JsonToken.VALUE_NUMBER_INT, jp.nextToken()); assertEquals(i, jp.getIntValue()); } assertNull(jp.nextToken()); jp.close(); } public void testBrokeanNumber() throws Exception { _testBrokeanNumber(false); _testBrokeanNumber(true); } private void _testBrokeanNumber(boolean useStream) throws Exception { JsonFactory f = new JsonFactory(); final String DOC = "14:89:FD:D3:E7:8C"; JsonParser p = useStream ? createParserUsingStream(f, DOC, "UTF-8") : createParserUsingReader(f, DOC); // Should fail, right away try { p.nextToken(); fail("Ought to fail! Instead, got token: "+p.getCurrentToken()); } catch (JsonParseException e) { verifyException(e, "unexpected character"); } p.close(); } public void testSimpleBooleans() throws Exception { _testSimpleBooleans(false); _testSimpleBooleans(true); } private void _testSimpleBooleans(boolean useStream) throws Exception { final String DOC = "true false\ttrue\rfalse\ntrue\r\nfalse\r\n true"; JsonParser jp = useStream ? createParserUsingStream(JSON_F, DOC, "UTF-8") : createParserUsingReader(JSON_F, DOC); boolean exp = true; for (int i = 1; i <= 7; ++i) { assertToken(exp ? JsonToken.VALUE_TRUE : JsonToken.VALUE_FALSE, jp.nextToken()); exp = !exp; } assertNull(jp.nextToken()); jp.close(); } public void testSimpleWrites() throws Exception { _testSimpleWrites(false); _testSimpleWrites(true); } public void _testSimpleWrites(boolean useStream) throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); StringWriter w = new StringWriter(); JsonGenerator gen; if (useStream) { gen = JSON_F.createGenerator(out, JsonEncoding.UTF8); } else { gen = JSON_F.createGenerator(w); } gen.writeNumber(123); gen.writeString("abc"); gen.writeBoolean(true); gen.close(); out.close(); w.close(); // and verify String json = useStream ? out.toString("UTF-8") : w.toString(); assertEquals("123 \"abc\" true", json); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
d1bc5702b1190faf52cdac1d76c8000a1244fd7c
cec1602d23034a8f6372c019e5770773f893a5f0
/sources/kotlin/text/SystemProperties.java
5b4612169d39d15068ad0d629b9269870640829c
[]
no_license
sengeiou/zeroner_app
77fc7daa04c652a5cacaa0cb161edd338bfe2b52
e95ae1d7cfbab5ca1606ec9913416dadf7d29250
refs/heads/master
2022-03-31T06:55:26.896963
2020-01-24T09:20:37
2020-01-24T09:20:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,076
java
package kotlin.text; import kotlin.Metadata; import kotlin.jvm.JvmField; import kotlin.jvm.internal.Intrinsics; import org.jetbrains.annotations.NotNull; @Metadata(bv = {1, 0, 2}, d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\bÂ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u0010\u0010\u0003\u001a\u00020\u00048\u0006X‡\u0004¢\u0006\u0002\n\u0000¨\u0006\u0005"}, d2 = {"Lkotlin/text/SystemProperties;", "", "()V", "LINE_SEPARATOR", "", "kotlin-stdlib"}, k = 1, mv = {1, 1, 8}) /* compiled from: StringBuilderJVM.kt */ final class SystemProperties { public static final SystemProperties INSTANCE = null; @NotNull @JvmField public static final String LINE_SEPARATOR = null; static { new SystemProperties(); } private SystemProperties() { INSTANCE = this; String property = System.getProperty("line.separator"); if (property == null) { Intrinsics.throwNpe(); } LINE_SEPARATOR = property; } }
[ "johan@sellstrom.me" ]
johan@sellstrom.me
9485e4c9b8b939cb77e4ed1b4913701b5eea2931
523f2ef43fcbaae6bc7e4d06f3cd2c8309cd2c8e
/src/test/java/com/sun/tools/xjc/addon/krasa/UtilsTest.java
511b7e2e1d755adec5b9d87e89fc3d19c7e2744a
[ "Apache-2.0" ]
permissive
krasa/krasa-jaxb-tools
b68c9bb7cc0b47075606f7844ae197e8912c742c
6bbe4a7f0f3f2d5c99bbf14780733ee22d14f188
refs/heads/master
2023-08-17T11:47:23.647923
2022-01-11T12:14:09
2022-01-11T12:14:09
8,143,419
50
42
Apache-2.0
2022-01-11T12:11:38
2013-02-11T18:13:03
Java
UTF-8
Java
false
false
410
java
package com.sun.tools.xjc.addon.krasa; import org.junit.Assert; import org.junit.Test; import java.math.BigDecimal; /** * @author Vojtech Krasa */ public class UtilsTest { @Test public void testIsNumber() throws Exception { Assert.assertFalse(Utils.isNumber(String.class)); Assert.assertFalse(Utils.isNumber(IllegalStateException.class)); Assert.assertTrue(Utils.isNumber(BigDecimal.class)); } }
[ "vojta.krasa@gmail.com" ]
vojta.krasa@gmail.com
eaf2eafebf3aa5846ec1980303812cd9b90b708d
9df552a636a3f6c77bb309d18ea8e62c6ed8f2ef
/src/test/java/com/frankcooper/platform/leetcode/bank/BankTest.java
a9507975ef4b30463287139cebd879d06800eed6
[]
no_license
wat1r/geek-algorithm-leetcode
a1bef16541f771bec5c5dd44d8b4634a6251dc08
46c0ced5bb069b33bc253366f30feb52b5fb0fa9
refs/heads/master
2023-07-19T17:52:41.153871
2023-07-19T14:01:14
2023-07-19T14:01:14
245,184,502
19
4
null
2022-06-17T03:38:06
2020-03-05T14:28:48
Java
UTF-8
Java
false
false
145
java
package com.frankcooper.platform.leetcode.bank; import org.junit.Test; public class BankTest { @Test public void test_210(){ } }
[ "cnwangzhou@hotmail.com" ]
cnwangzhou@hotmail.com
ebe8c4591113a4eb64ddc750fb56b67316972c2b
f66fc1aca1c2ed178ac3f8c2cf5185b385558710
/reladomo/src/main/java/com/gs/fw/common/mithra/remote/ExternalizableFullData.java
e1f1d52365532af806accdbfa47922cafa1e5265
[ "Apache-2.0", "BSD-3-Clause", "MIT", "LicenseRef-scancode-public-domain" ]
permissive
goldmansachs/reladomo
9cd3e60e92dbc6b0eb59ea24d112244ffe01bc35
a4f4e39290d8012573f5737a4edc45d603be07a5
refs/heads/master
2023-09-04T10:30:12.542924
2023-07-20T09:29:44
2023-07-20T09:29:44
68,020,885
431
122
Apache-2.0
2023-07-07T21:29:52
2016-09-12T15:17:34
Java
UTF-8
Java
false
false
1,979
java
/* Copyright 2016 Goldman Sachs. 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.gs.fw.common.mithra.remote; import com.gs.fw.common.mithra.MithraDataObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.Externalizable; import java.io.ObjectOutput; import java.io.IOException; import java.io.ObjectInput; public class ExternalizableFullData implements Externalizable { static private Logger logger = LoggerFactory.getLogger(ExternalizableFullData.class.getName()); private MithraDataObject mithraDataObject; public ExternalizableFullData(MithraDataObject mithraDataObject) { this.mithraDataObject = mithraDataObject; } public ExternalizableFullData() { // for externalizble } public MithraDataObject getMithraDataObject() { return mithraDataObject; } public void writeExternal(ObjectOutput out) throws IOException { out.writeObject(MithraSerialUtil.getDataClassNameToSerialize(mithraDataObject)); mithraDataObject.zSerializeFullData(out); } public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { Class dataClassName = MithraSerialUtil.getDataClassToInstantiate((String) in.readObject()); this.mithraDataObject = MithraSerialUtil.instantiateData(dataClassName); this.mithraDataObject.zDeserializeFullData(in); } }
[ "mohammad.rezaei@gs.com" ]
mohammad.rezaei@gs.com
f529f8eb2e8f886de8ca2a68abf32663d4bb1ab9
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/15/15_8690f717ff5eb528628210f6df2d7501756306e2/TestRunnerPlugin/15_8690f717ff5eb528628210f6df2d7501756306e2_TestRunnerPlugin_s.java
19fcb4f44a7de6a6dd4dd14199bc33fc75c06f48
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,307
java
package play.modules.testrunner; import java.io.File; import play.Logger; import play.Play; import play.PlayPlugin; import play.mvc.Router; import play.vfs.VirtualFile; public class TestRunnerPlugin extends PlayPlugin { @Override public void onLoad() { VirtualFile appRoot = VirtualFile.open(Play.applicationPath); Play.javaPath.add(appRoot.child("test")); for (VirtualFile module : Play.modules.values()) { File modulePath = module.getRealFile(); if (modulePath.getAbsolutePath().startsWith(Play.frameworkPath.getParentFile().getAbsolutePath()) && !Play.javaPath.contains(module.child("test"))) { Play.javaPath.add(module.child("test")); } } Logger.info(""); Logger.info("Go to http://localhost:" + Play.configuration.getProperty("http.port", "9000") + "/@tests to run the tests"); Logger.info(""); } @Override public void onRoutesLoaded() { Router.addRoute("GET", "/@tests", "TestRunner.index"); Router.addRoute("GET", "/@tests/{<.*>test}", "TestRunner.run"); Router.addRoute("POST", "/@tests/{<.*>test}", "TestRunner.saveResult"); Router.addRoute("GET", "/@tests/emails", "TestRunner.mockEmail"); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
6ba1f7764df39aef1b1ea97fbcec581cf9abddf1
b650f374151d54816cb863f8cd51d6e9068dce5f
/Tasks_301_350/src/test/java/ru/tasks/task_312/solution/ArithmeticProgressionTest.java
1ab628e8f6533ece54db648604dad11cf328c040
[ "Apache-2.0" ]
permissive
AlSidorenko/Acmp.ru
c8c30fc01fa485d4e3f6be402d372370367ed6ef
07a6cb45ed97b4e09d453c22ba0557434e9a9be5
refs/heads/master
2020-04-15T05:10:03.144209
2019-01-10T15:07:02
2019-01-10T15:07:02
118,505,960
0
0
null
null
null
null
UTF-8
Java
false
false
1,264
java
package ru.tasks.task_312.solution; import org.junit.Test; import java.io.File; import java.io.IOException; import java.io.FileWriter; import java.io.FileReader; import java.util.Scanner; import static org.junit.Assert.assertThat; import static org.hamcrest.core.Is.is; /** * Created on 16.03.2018. * * @author Aleks Sidorenko (alek.sidorenko1979@gmail.com). * @version $Id$. * @since 0.1. */ public class ArithmeticProgressionTest { @Test public void whenSearchItemOfProgression() throws IOException { ArithmeticProgression ap = new ArithmeticProgression(); FileWriter fwInput = new FileWriter("C:\\Users\\Александр\\OneDrive\\Документы\\IdeaProject\\" + "Acmp.ru\\Tasks_301_350\\src\\main\\java\\ru\\tasks\\task_312\\solution\\input.txt"); fwInput.write("1 5 3"); fwInput.close(); String expected = ap.result(); FileReader frOutput = new FileReader("C:\\Users\\Александр\\OneDrive\\Документы\\IdeaProject\\" + "Acmp.ru\\Tasks_301_350\\src\\main\\java\\ru\\tasks\\task_312\\solution\\output.txt"); Scanner sc = new Scanner(frOutput); String result = sc.next(); assertThat(expected, is(result)); } }
[ "alek.sidorenko1979@gmail.com" ]
alek.sidorenko1979@gmail.com
9909fd0b53fd6b17a9d27824f59c11c33596075e
000e9ddd9b77e93ccb8f1e38c1822951bba84fa9
/java/classes2/com/xiaomi/channel/commonutils/string/d.java
8d89c194796daa68ca7a56c67acb8f04e5d8adea
[ "Apache-2.0" ]
permissive
Paladin1412/house
2bb7d591990c58bd7e8a9bf933481eb46901b3ed
b9e63db1a4975b614c422fed3b5b33ee57ea23fd
refs/heads/master
2021-09-17T03:37:48.576781
2018-06-27T12:39:38
2018-06-27T12:41:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,004
java
package com.xiaomi.channel.commonutils.string; import java.io.UnsupportedEncodingException; import java.math.BigInteger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Collection; import java.util.Iterator; import java.util.Random; public class d { public static String a(int paramInt) { Random localRandom = new Random(); StringBuffer localStringBuffer = new StringBuffer(); int i = 0; while (i < paramInt) { localStringBuffer.append("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(localRandom.nextInt("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".length()))); i += 1; } return localStringBuffer.toString(); } public static String a(String paramString) { if (paramString != null) {} try { Object localObject = MessageDigest.getInstance("MD5"); ((MessageDigest)localObject).update(c(paramString)); localObject = String.format("%1$032X", new Object[] { new BigInteger(1, ((MessageDigest)localObject).digest()) }); return (String)localObject; } catch (NoSuchAlgorithmException localNoSuchAlgorithmException) {} return ""; return paramString; } public static String a(Collection<?> paramCollection, String paramString) { if (paramCollection == null) { return null; } return a(paramCollection.iterator(), paramString); } public static String a(Iterator<?> paramIterator, String paramString) { if (paramIterator == null) { return null; } if (!paramIterator.hasNext()) { return ""; } Object localObject = paramIterator.next(); if (!paramIterator.hasNext()) { return localObject.toString(); } StringBuffer localStringBuffer = new StringBuffer(256); if (localObject != null) { localStringBuffer.append(localObject); } while (paramIterator.hasNext()) { if (paramString != null) { localStringBuffer.append(paramString); } localObject = paramIterator.next(); if (localObject != null) { localStringBuffer.append(localObject); } } return localStringBuffer.toString(); } public static String a(byte[] paramArrayOfByte) { String str = ""; try { MessageDigest localMessageDigest = MessageDigest.getInstance("MD5"); localMessageDigest.update(paramArrayOfByte); paramArrayOfByte = String.format("%1$032X", new Object[] { new BigInteger(1, localMessageDigest.digest()) }); return paramArrayOfByte.toLowerCase(); } catch (Exception paramArrayOfByte) { for (;;) { paramArrayOfByte = str; } } } public static String b(String paramString) { if (paramString != null) {} try { Object localObject = MessageDigest.getInstance("SHA1"); ((MessageDigest)localObject).update(c(paramString)); localObject = String.format("%1$032X", new Object[] { new BigInteger(1, ((MessageDigest)localObject).digest()) }); return (String)localObject; } catch (NoSuchAlgorithmException localNoSuchAlgorithmException) {} return null; return paramString; } public static byte[] c(String paramString) { try { byte[] arrayOfByte = paramString.getBytes("UTF-8"); return arrayOfByte; } catch (UnsupportedEncodingException localUnsupportedEncodingException) {} return paramString.getBytes(); } public static boolean d(String paramString) { if (paramString != null) { int i = 0; while (i < paramString.length()) { int j = paramString.charAt(i); if ((j < 0) || (j > 127)) { return false; } i += 1; } } return true; } } /* Location: /Users/gaoht/Downloads/zirom/classes2-dex2jar.jar!/com/xiaomi/channel/commonutils/string/d.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "ght163988@autonavi.com" ]
ght163988@autonavi.com
129d21f9b4f915aa4275fd98384f73d5a6baa72d
780e13b7c76f078f89d21df4aef5ebf8a187b75e
/spring-functionaltest-web/src/main/java/jp/co/ntt/fw/spring/functionaltest/app/aply/APLY03Controller.java
e6d533cd047d960ce416607f186d409445192aee
[]
no_license
phoenix110/spring-functionaltest
dba4e64b5f188a8d276315c20938cee76b949961
2671a07e211ceab4ccd925e21f647dfc0586a809
refs/heads/master
2020-04-16T07:38:23.180197
2018-03-08T01:32:35
2018-03-09T06:21:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,041
java
/* * Copyright 2014-2018 NTT Corporation. * * 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 jp.co.ntt.fw.spring.functionaltest.app.aply; import javax.inject.Inject; 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.terasoluna.gfw.common.date.jodatime.JodaTimeDateFactory; @RequestMapping("aply") @Controller public class APLY03Controller { @Inject JodaTimeDateFactory dateFactory; @RequestMapping(value = "0301/001") public String handle01001(Model model) { return "aply/useCommonJsp"; } @RequestMapping(value = "0302/001") public String handle02001(Model model) { // モデルに格納される値 model.addAttribute("valueUsingEL", "<font color='red'>Sample</font>"); return "aply/showValueUsingELHtmlEscapeInModel"; } @RequestMapping(value = "0302/002") public String handle02002(Model model) { // モデルに格納される値 model.addAttribute("valueUsingJSTL", "<font color='red'>Sample</font>"); return "aply/showValueUsingJSTLHtmlEscapeInModel"; } @RequestMapping(value = "0302/003") public String handle02003(Model model) { // モデルに格納される値 model.addAttribute("valueUsingNumberFormat", 3333.55); return "aply/showValueUsingNumberFormatInModel"; } @RequestMapping(value = "0302/004") public String handle02004(Model model) { // モデルに格納される値 model.addAttribute("valueUsingDateFormat", dateFactory.newDate()); return "aply/showValueUsingDateFormatInModel"; } @RequestMapping(value = "0303/001") public String handle03001(Model model, JspForm form) { return "aply/inputDisplaySwitchingInModel"; } @RequestMapping(value = "0303/displaySwitching", method = RequestMethod.POST, params = "cIfFormat") public String handleInputDisplaySwitchingUsingCIf(Model model, JspForm form) { return "aply/showDisplaySwitchingUsingCIf"; } @RequestMapping(value = "0303/002") public String handle03002(Model model, JspForm form) { return "aply/inputDisplaySwitchingInModel"; } @RequestMapping(value = "0303/displaySwitching", method = RequestMethod.POST, params = "cChooseFormat") public String handleInputDisplaySwitchingUsingCChoose(Model model, JspForm form) { return "aply/showDisplaySwitchingUsingCChoose"; } @RequestMapping(value = "0304/001") public String handle04001(Model model, JspFormListForm form) { return "aply/inputCollectionInModel"; } @RequestMapping(value = "0304/collectionInModel", method = RequestMethod.POST, params = "collectionInModel") public String handleInputCollectionInModel(Model model, JspFormListForm form) { return "aply/showCollectionInModel"; } @RequestMapping(value = "0305/001") public String handle05001(Model model, JspForm form) { return "aply/inputFormObjectBindHtmlForm"; } @RequestMapping(value = "0305/bindFormObject", method = RequestMethod.POST, params = "bindFormObject") public String handleBindFormObject(Model model, JspForm form) { return "aply/showFormObjectBindHtmlForm"; } }
[ "macchinetta.fw@gmail.com" ]
macchinetta.fw@gmail.com
da948af890d74d999c5aa9a184b36de91614f971
70103ef5ed97bad60ee86c566c0bdd14b0050778
/src/main/java/com/credex/fs/digital/security/CustomerSecurityUtils.java
f5cc9fa1cdc8f173e143be7e5ce1409ea4c103bc
[]
no_license
alexjilavu/Smarthack-2021
7a127166cef52bfc9ee08ef1840c0fde2d2b79aa
564abdc14df4981cdcad984a661f105327758559
refs/heads/master
2023-08-29T18:34:44.280519
2021-11-07T10:42:00
2021-11-07T10:42:00
423,957,218
0
0
null
null
null
null
UTF-8
Java
false
false
1,405
java
package com.credex.fs.digital.security; import com.credex.fs.digital.domain.User; import com.credex.fs.digital.repository.UserRepository; import java.util.Optional; import javax.persistence.EntityNotFoundException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Component; @Component public class CustomerSecurityUtils { @Autowired private UserRepository userRepository; // public static Optional<Long> getCurrentUserId() { // return extractPrincipal(SecurityContextHolder.getContext().getAuthentication()).map(MobileCustomer::getUserId); // } // // private static Optional<MobileCustomer> extractPrincipal(Authentication authentication) { // if (authentication == null) { // return Optional.empty(); // } else if (authentication.getPrincipal() instanceof MobileCustomer) { // return Optional.of((MobileCustomer) authentication.getPrincipal()); // } // // return Optional.empty(); // } public Optional<User> getUser() { String login = SecurityUtils.getCurrentUserLogin().orElseThrow(EntityNotFoundException::new); return userRepository.findOneByLogin(login); } }
[ "alexjilavu17@gmail.com" ]
alexjilavu17@gmail.com
8ab3af23faa62e7bbc5e6c709ce7d9d6949e9479
745b525c360a2b15b8d73841b36c1e8d6cdc9b03
/jun_java_plugins/jun_util/src/main/java/com/jun/plugin/util4j/net/nettyImpl/client/http/NettyHttpClient.java
7606ab173a34f0703660de6007b4351ff624bcf8
[]
no_license
wujun728/jun_java_plugin
1f3025204ef5da5ad74f8892adead7ee03f3fe4c
e031bc451c817c6d665707852308fc3b31f47cb2
refs/heads/master
2023-09-04T08:23:52.095971
2023-08-18T06:54:29
2023-08-18T06:54:29
62,047,478
117
42
null
2023-08-21T16:02:15
2016-06-27T10:23:58
Java
UTF-8
Java
false
false
6,288
java
package com.jun.plugin.util4j.net.nettyImpl.client.http; import java.net.InetSocketAddress; import java.net.URI; import java.util.Optional; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import com.jun.plugin.util4j.cache.callBack.CallBack; import com.jun.plugin.util4j.net.JConnection; import com.jun.plugin.util4j.net.JConnectionListener; import com.jun.plugin.util4j.net.nettyImpl.client.NettyClient; import com.jun.plugin.util4j.net.nettyImpl.client.NettyClientConfig; import com.jun.plugin.util4j.net.nettyImpl.handler.http.HttpClientInitHandler; import com.jun.plugin.util4j.thread.NamedThreadFactory; import io.netty.handler.codec.http.DefaultHttpRequest; import io.netty.handler.codec.http.FullHttpResponse; import io.netty.handler.codec.http.HttpHeaderNames; import io.netty.handler.codec.http.HttpHeaderValues; import io.netty.handler.codec.http.HttpMethod; import io.netty.handler.codec.http.HttpRequest; import io.netty.handler.codec.http.HttpResponse; import io.netty.handler.codec.http.HttpVersion; import io.netty.util.CharsetUtil; import io.netty.util.ReferenceCountUtil; /** * http客户端 */ public class NettyHttpClient{ private static ExecutorService scheduExec=Executors.newCachedThreadPool(new NamedThreadFactory("NettyHttpClient-ASYNC",true)); private static NettyClientConfig config=new NettyClientConfig(); public HttpResponse syncRequest(URI uri,HttpRequest request) { initRequest(uri, request); return syncRequest(uri.getHost(),getPort(uri), request); } /** * 同步请求 * @param host * @param port * @param request * @return 超时返回null */ public HttpResponse syncRequest(String host,int port,HttpRequest request) { HttpResponse response=null; synchronized (request) { if(response==null) { HttpListener listener=new HttpListener(request); NettyClient client=new NettyClient(config,new InetSocketAddress(host, port),new HttpClientInitHandler(listener)); client.start(); response=listener.waitResponse();//阻塞等待结果 client.stop(); } } return response; } public HttpResponse syncRequest(URI uri,HttpRequest request,long waiteTimeMills) { initRequest(uri, request); return syncRequest(uri.getHost(),getPort(uri), request,waiteTimeMills); } /** * 同步请求 * @param host * @param port * @param request * @param waiteTimeMills * @return 超时返回null */ public HttpResponse syncRequest(String host,int port,HttpRequest request,long waiteTimeMills) { HttpResponse response=null; synchronized (request) { if(response==null) { HttpListener listener=new HttpListener(request); NettyClient client=new NettyClient(config,new InetSocketAddress(host, port),new HttpClientInitHandler(listener)); client.start(); response=listener.waitResponse(waiteTimeMills);//阻塞等待结果 client.stop(); } } return response; } public void asyncRequest(URI uri,HttpRequest request,final CallBack<HttpResponse> callback,long timeOut) { initRequest(uri, request); asyncRequest(uri.getHost(),getPort(uri), request,callback,timeOut); } /** * 异步请求 * @param host * @param port * @param request * @param callback */ public void asyncRequest(String host,int port,HttpRequest request,final CallBack<HttpResponse> callback,long timeOut) { synchronized (request) { final HttpListener listener=new HttpListener(request); final NettyClient client=new NettyClient(config,new InetSocketAddress(host, port),new HttpClientInitHandler(listener)); client.start(); if(callback!=null) { scheduExec.execute(new Runnable() { @Override public void run() { HttpResponse result=listener.waitResponse(timeOut); callback.call(result!=null,Optional.ofNullable(result)); client.stop(); } }); } } } private class HttpListener implements JConnectionListener<HttpResponse>{ private final CountDownLatch latch=new CountDownLatch(1); private HttpRequest request; private HttpResponse response; public HttpListener(HttpRequest request) { this.request=request; } @Override public void connectionOpened(JConnection connection) { connection.writeAndFlush(request); } @Override public void messageArrived(JConnection conn, HttpResponse msg) { ReferenceCountUtil.retain(msg,1); this.response=msg; latch.countDown();//释放计数器 } @Override public void connectionClosed(JConnection connection) { if(latch.getCount()>1) { latch.countDown();//释放计数器 } } /** * 等待回复 * @return */ public HttpResponse waitResponse(long waiteTimeMills) { try { latch.await(waiteTimeMills,TimeUnit.MILLISECONDS);//线程阻塞(count>0 && time<MILLISECONDS) } catch (InterruptedException e) { e.printStackTrace(); } return response; } /** * 等待回复 * @return */ public HttpResponse waitResponse() { try { latch.await();//线程阻塞(count>0 && time<MILLISECONDS) } catch (InterruptedException e) { e.printStackTrace(); } return response; } } private int getPort(URI uri) { int port = uri.getPort(); if (port == -1) { if ("http".equalsIgnoreCase(uri.getScheme())) { port = 80; } else if ("https".equalsIgnoreCase(uri.getScheme())) { port = 443; } } return port; } private void initRequest(URI uri,HttpRequest request) { request.headers().set(HttpHeaderNames.HOST, uri.getHost()); request.headers().set(HttpHeaderNames.CONNECTION,HttpHeaderValues.CLOSE); } public static void main(String[] args) { NettyHttpClient client=new NettyHttpClient(); long time=System.currentTimeMillis(); HttpRequest request=new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "/baidu?tn=monline_6_dg&ie=utf-8&wd=netty+http客户端"); HttpResponse response=client.syncRequest("www.baidu.com", 80, request); System.out.println(System.currentTimeMillis()-time); System.out.println(response); FullHttpResponse rsp=(FullHttpResponse) response; System.out.println("content:"+rsp.content().toString(CharsetUtil.UTF_8)); // new Scanner(System.in).nextLine(); } }
[ "wujun728@163.com" ]
wujun728@163.com
6a204b12b2bd3cab58db980944824d62ebcfccc4
29a0cb653b276a9494d607c625584b935c3e5e34
/examples/src/main/java/edu/pdx/cs410J/rmi/CreateMovie.java
563a12cee02806ee6683c02f8448940368432bee
[ "Apache-2.0" ]
permissive
persistentlobster/PortlandStateJava
e9e4e1bd8a142be82a863ecbd8c3de091998addf
2d9b80a8de60d64a4064333cee15ad0f1afdce77
refs/heads/master
2020-06-19T17:02:28.184013
2019-07-13T23:19:16
2019-07-13T23:19:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
855
java
package edu.pdx.cs410J.rmi; import java.rmi.NotBoundException; import java.rmi.RemoteException; import java.rmi.registry.LocateRegistry; /** * This program contacts the remote movie database and creates a new * movie in it. The id of the movie is printed out. */ public class CreateMovie { public static void main(String[] args) { String host = args[0]; int port = Integer.parseInt(args[1]); String title = args[2]; int year = Integer.parseInt(args[3]); try { MovieDatabase db = (MovieDatabase) LocateRegistry.getRegistry(host, port).lookup(MovieDatabase.RMI_OBJECT_NAME); long id = db.createMovie(title, year); System.out.println("Created movie " + id); System.exit(0); } catch (RemoteException | NotBoundException ex) { ex.printStackTrace(System.err); System.exit(1); } } }
[ "david.m.whitlock@gmail.com" ]
david.m.whitlock@gmail.com
b5e3f5b83660a01f3e189610bf52ed0261517615
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-2.0.0-RC1/modules/xml/src/main/java/org/mule/xml/util/properties/XPathPayloadPropertyExtractor.java
f57c6bcd7cd5f6814fe77ad39ae8e6bc1ab72ac4
[]
no_license
OrgSmells/codehaus-mule-git
085434a4b7781a5def2b9b4e37396081eaeba394
f8584627c7acb13efdf3276396015439ea6a0721
refs/heads/master
2022-12-24T07:33:30.190368
2020-02-27T19:10:29
2020-02-27T19:10:29
243,593,543
0
0
null
2022-12-15T23:30:00
2020-02-27T18:56:48
null
UTF-8
Java
false
false
2,368
java
/* * $Id$ * -------------------------------------------------------------------------------------- * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com * * The software in this package is published under the terms of the CPAL v1.0 * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ package org.mule.xml.util.properties; import org.mule.xml.i18n.XmlMessages; import org.dom4j.Node; import org.jaxen.JaxenException; import org.jaxen.XPath; import org.jaxen.dom.DOMXPath; import org.jaxen.dom4j.Dom4jXPath; import org.w3c.dom.Document; /** * Will select the text of a single node based on the property name */ public class XPathPayloadPropertyExtractor extends AbstractXPathPropertyExtractor { public static final String NAME = "xpath"; protected XPath createXPath(String expression, Object object) throws JaxenException { if(object instanceof Document) { return new DOMXPath(expression); } else if (object instanceof org.dom4j.Document) { return new Dom4jXPath(expression); } // else if (object instanceof nu.xom.Document) // { // return new XOMXPath(expression); // } // else if (object instanceof org.jdom.Document) // { // return new JDOMXPath(expression); // } else { throw new IllegalArgumentException(XmlMessages.domTypeNotSupported(object.getClass()).getMessage()); } } protected Object extractResultFromNode(Object result) { if(result instanceof Node) { return ((Node)result).getText(); } else if(result instanceof org.w3c.dom.Node) { return ((org.w3c.dom.Node)result).getFirstChild().getNodeValue(); } // else if(result instanceof nu.xom.Node) // { // return ((nu.xom.Node)result).getText(); // } // else if(result instanceof org.jdom.Node) // { // return ((org.jdom.Node)result).getText(); // } else { throw new IllegalArgumentException(XmlMessages.domTypeNotSupported(result.getClass()).getMessage()); } } /** {@inheritDoc} */ public String getName() { return NAME; } }
[ "tcarlson@bf997673-6b11-0410-b953-e057580c5b09" ]
tcarlson@bf997673-6b11-0410-b953-e057580c5b09
374e7437ea6b168e52eb161ef29cc27313354fcd
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/main/java/org/gradle/test/performancenull_439/Productionnull_43870.java
abeec134480a7418cb209e0472f1a461855d6d19
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
588
java
package org.gradle.test.performancenull_439; public class Productionnull_43870 { private final String property; public Productionnull_43870(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
2a905012f84b02b854cc69aa6a6c9350a59beb0b
d44961b736d956be5e294d3e6def8ffb008376ee
/crp-rule-lymph/src/main/java/com/clinical/model/cluster/Hypertension.java
591b20f331c5464b110261967a86a3ffb060b604
[]
no_license
zhiji6/rule-2
2b5062f2e77797a87e43061b190d90fef5bbdbd8
cb58cde99257242bd0c394f75f1f2d02dd00b5c2
refs/heads/master
2023-08-15T06:21:07.833357
2021-03-06T08:28:14
2021-03-06T08:28:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,608
java
package com.clinical.model.cluster; import java.util.Date; public class Hypertension{ //主键id private Integer id; //标识患者身份唯一标识 private String personId; //唯一标识 private String uniqueId; //医疗机构代码 private String p900; //患者id private String patientId; //住院门诊号 private String visitId; //分级时间 private Date gradeDate; //高血压 private String ifHypertension; //分级 private String grade; //分层 private String layer; //数据版本 private String dataVersion; //数据库来源 private String dataDbSource; //数据表来源 private String dataTableSource; //数据项来源 private String dataFieldSource; //创建时间 private Date createdAt; //创建人 private String creator; //修改时间 private Date updatedAt; public Integer getId(){ return id; } public void setId(Integer id) { this.id = id; } public String getPersonId(){ return personId; } public void setPersonId(String personId) { this.personId = personId; } public String getUniqueId(){ return uniqueId; } public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } public String getP900(){ return p900; } public void setP900(String p900) { this.p900 = p900; } public String getPatientId(){ return patientId; } public void setPatientId(String patientId) { this.patientId = patientId; } public String getVisitId(){ return visitId; } public void setVisitId(String visitId) { this.visitId = visitId; } public Date getGradeDate(){ return gradeDate; } public void setGradeDate(Date gradeDate) { this.gradeDate = gradeDate; } public String getIfHypertension(){ return ifHypertension; } public void setIfHypertension(String ifHypertension) { this.ifHypertension = ifHypertension; } public String getGrade(){ return grade; } public void setGrade(String grade) { this.grade = grade; } public String getLayer(){ return layer; } public void setLayer(String layer) { this.layer = layer; } public String getDataVersion(){ return dataVersion; } public void setDataVersion(String dataVersion) { this.dataVersion = dataVersion; } public String getDataDbSource(){ return dataDbSource; } public void setDataDbSource(String dataDbSource) { this.dataDbSource = dataDbSource; } public String getDataTableSource(){ return dataTableSource; } public void setDataTableSource(String dataTableSource) { this.dataTableSource = dataTableSource; } public String getDataFieldSource(){ return dataFieldSource; } public void setDataFieldSource(String dataFieldSource) { this.dataFieldSource = dataFieldSource; } public Date getCreatedAt(){ return createdAt; } public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; } public String getCreator(){ return creator; } public void setCreator(String creator) { this.creator = creator; } public Date getUpdatedAt(){ return updatedAt; } public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; } }
[ "sdlqmc@yeah.net" ]
sdlqmc@yeah.net
8c5f58ebe89fe2579411572d705f335468d6b10c
72f02c3826d332630227006855c6bf21003b4bf5
/src/main/java/org/opentravel/ota/PetInfoPrefType.java
85ba25b24fc2d1aaad4c14b4f1f1bb69f53a32be
[ "Apache-2.0" ]
permissive
ateeb-hk/otalib
887ff885ba3ec8a20975424e30b74f1549055e73
2c314144352ab0d3357a94b301338b002068103a
refs/heads/master
2020-03-23T05:05:22.668269
2017-07-19T08:05:39
2017-07-19T08:05:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,390
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2017.07.11 at 07:19:31 PM IST // package org.opentravel.ota; 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; /** * Indentifies preferences regarding a pet. * * <p>Java class for PetInfoPrefType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="PetInfoPrefType"> * &lt;simpleContent> * &lt;extension base="&lt;http://www.opentravel.org/OTA/2003/05>StringLength1to64"> * &lt;attGroup ref="{http://www.opentravel.org/OTA/2003/05}PreferLevelGroup"/> * &lt;/extension> * &lt;/simpleContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PetInfoPrefType", propOrder = { "value" }) public class PetInfoPrefType { @XmlValue protected String value; @XmlAttribute(name = "PreferLevel") protected PreferLevelType preferLevel; /** * Used for Character Strings, length 1 to 64. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } /** * Gets the value of the preferLevel property. * * @return * possible object is * {@link PreferLevelType } * */ public PreferLevelType getPreferLevel() { return preferLevel; } /** * Sets the value of the preferLevel property. * * @param value * allowed object is * {@link PreferLevelType } * */ public void setPreferLevel(PreferLevelType value) { this.preferLevel = value; } }
[ "kesav@hotelsoft.com" ]
kesav@hotelsoft.com
09e5d4718edd3d9c015bf110d7e0c461b1645894
0e2a1a0a4f176f08093d996fe62347c739ce9598
/trunk/mis/src/main/java/com/px/mis/whs/dao/CheckSnglMapper.java
bdf198d8dd66942d0608a7c28cf16b1d00c2205a
[]
no_license
LIHUIJAVA/JOB
21dc3979b57d2923da9a0f6f33a9f0919b617b4d
3142faf6045696e8c932d1a2139bdd17a40378e7
refs/heads/master
2022-12-21T01:56:05.451002
2020-03-01T12:04:32
2020-03-01T12:04:32
244,107,727
0
1
null
2022-12-16T07:52:27
2020-03-01T07:42:17
JavaScript
GB18030
Java
false
false
2,841
java
package com.px.mis.whs.dao; import java.util.List; import java.util.Map; import org.apache.ibatis.annotations.Param; import com.px.mis.whs.entity.CheckPrftLoss; import com.px.mis.whs.entity.CheckSngl; import com.px.mis.whs.entity.CheckSnglMap; import com.px.mis.whs.entity.CheckSnglSubTab; import com.px.mis.whs.entity.InvtyTab; public interface CheckSnglMapper { //1.新增盘点单 public int insertCheckSngl(CheckSngl record); public int insertCheckSnglSubTab(List<CheckSnglSubTab> record); //导入 public int exInsertCheckSngl(CheckSngl record); public int exInsertCheckSnglSubTab(List<CheckSnglSubTab> record); //2.修改盘点单 public int updateCheckSngl(CheckSngl record); //3.删除盘点单 批删 public int deleteCheckSnglSubTab(String checkFormNum); public int deleteAllCheckSngl(List<String> checkFormNum); //查询 public CheckSngl selectCheckSngl(@Param("checkFormNum") String checkFormNum); public List<CheckSnglSubTab> selectCheckSnglSubTab(@Param("checkFormNum") String checkFormNum); //批查 public List<CheckSngl> selectCheckSnglsList(@Param("checkFormNum") List<String> checkFormNum); //分页查 public List<CheckSnglMap> selectList(Map map); public int selectCount(Map map); //打印 public List<CheckSngl> selectListDaYin(Map map); //通过仓库、盘点批号、存货大类编码、失效日期日、账面为零时是否盘点 //查询盘点单列表(存货编码等信息) public List<CheckSngl> selectCheckSnglList(Map map); public List<CheckSngl> selectCheckSnglListZero(Map map); //审核 public int updateCSnglChk(List<CheckSngl> cList); public CheckSngl selectIsChkr(@Param("checkFormNum") String checkFormNum);//查看是否审核 public List<CheckSnglSubTab> selectCheckQty(@Param("checkFormNum") String checkFormNum);//查询实盘数是否全部填写 //弃审 public int updateCSnglNoChk(List<CheckSngl> cList); public List<CheckPrftLoss> selectLossIsDel(@Param("srcFormNum") String srcFormNum);//盘点损益表是否已经删除 //PDA 返回盘点参数 public List<CheckSngl> checkSnglList(@Param("whsEncd") List<String> whsEncd); //pda 根据子表序号 public int updateCheckTab(List<CheckSnglSubTab> cSubTabList); public int updateCheckStatus(CheckSngl checkSngl); public List<CheckSnglSubTab> selectOrdNum();//查询盘点中的子表 //下载之后锁定状态 不让PC段进行更改 保证数据同步 public int updateStatus(List<CheckSngl> cList); public List<InvtyTab> selectCheckSnglGdsBitList(Map map); //新增盘点单删除后数据 public Integer insertCheckSnglDl(List<String> checkFormNum); public Integer insertCheckSnglSubTabDl(List<String> checkFormNum); }
[ "lh" ]
lh
2d662c3527f0b16ac1dfbdf19e7c3c881b49e546
e3e0dd82a8d8972fe528fa9717703fb96d2c41e6
/src/main/java/whatisnewin/java/net/WhatIsNewInDatagramSocket.java
d28d28758935c63da9dca2b47e522bca12335cf3
[]
no_license
weissreto/what-is-new-in-java-9-10-11
0ec10b40ad37de4b47abbb75004116e711800962
8d5afe909e2e05c9d90b6dc821502cd2ba2fd9d4
refs/heads/master
2020-09-09T01:34:00.617660
2020-03-29T12:38:36
2020-03-29T12:38:36
221,302,384
2
0
null
null
null
null
UTF-8
Java
false
false
1,618
java
package whatisnewin.java.net; import java.net.DatagramSocket; import java.net.SocketOption; import java.io.IOException; import java.util.Set; /** * This source file was generated by WhatIsNewInJava.<br> * * This class provides an example call to each method in class {@link DatagramSocket} * that were newly introduced in Java versions 9, 10, 11.<br> * * {@link DatagramSocket} is an old class but has new fields, constructors or methods. * @since 1.0 * @see DatagramSocket */ public final class WhatIsNewInDatagramSocket { /** * Example call to new method {@link DatagramSocket#setOption(SocketOption, Object)}. * @since 9 * @see DatagramSocket#setOption(SocketOption, Object) */ public <T> DatagramSocket setOption(SocketOption<T> name, T value) throws IOException { DatagramSocket testee = $$$(); DatagramSocket result = testee.setOption(name, value); return result; } /** * Example call to new method {@link DatagramSocket#getOption(SocketOption)}. * @since 9 * @see DatagramSocket#getOption(SocketOption) */ public <T> T getOption(SocketOption<T> name) throws IOException { DatagramSocket testee = $$$(); T result = testee.getOption(name); return result; } /** * Example call to new method {@link DatagramSocket#supportedOptions()}. * @since 9 * @see DatagramSocket#supportedOptions() */ public Set<SocketOption<?>> supportedOptions() { DatagramSocket testee = $$$(); Set<SocketOption<?>> result = testee.supportedOptions(); return result; } private DatagramSocket $$$() { return null; } }
[ "reto.weiss@ivyteam.ch" ]
reto.weiss@ivyteam.ch
db85ba3904a2ca30372623ab083078ea83c52ad1
1896b305a64899d8a89c260c8624519062cfe515
/src/main/java/ru/betterend/blocks/EndLotusSeedBlock.java
ce8fc56a393930828dc7878705b281c814e5331e
[ "MIT" ]
permissive
zorc/BetterEnd
66c2e67c86b82bcabbe32e00741cfddbad6058df
bea2bef853f3ef56b79d1d763f94ffb1f8b9cf05
refs/heads/master
2023-02-25T00:38:11.328300
2021-02-01T03:20:24
2021-02-01T03:20:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,848
java
package ru.betterend.blocks; import java.util.Random; import net.minecraft.block.BlockState; import net.minecraft.fluid.Fluids; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos.Mutable; import net.minecraft.util.math.Direction; import net.minecraft.world.StructureWorldAccess; import ru.betterend.blocks.BlockProperties.TripleShape; import ru.betterend.blocks.basis.UnderwaterPlantWithAgeBlock; import ru.betterend.registry.EndBlocks; import ru.betterend.util.BlocksHelper; public class EndLotusSeedBlock extends UnderwaterPlantWithAgeBlock { @Override public void grow(StructureWorldAccess world, Random random, BlockPos pos) { if (canGrow(world, pos)) { BlockState startLeaf = EndBlocks.END_LOTUS_STEM.getDefaultState().with(EndLotusStemBlock.LEAF, true); BlockState roots = EndBlocks.END_LOTUS_STEM.getDefaultState().with(EndLotusStemBlock.SHAPE, TripleShape.BOTTOM).with(EndLotusStemBlock.WATERLOGGED, true); BlockState stem = EndBlocks.END_LOTUS_STEM.getDefaultState(); BlockState flower = EndBlocks.END_LOTUS_FLOWER.getDefaultState(); BlocksHelper.setWithoutUpdate(world, pos, roots); Mutable bpos = new Mutable().set(pos); bpos.setY(bpos.getY() + 1); while (world.getFluidState(bpos).isStill()) { BlocksHelper.setWithoutUpdate(world, bpos, stem.with(EndLotusStemBlock.WATERLOGGED, true)); bpos.setY(bpos.getY() + 1); } int height = random.nextBoolean() ? 0 : random.nextBoolean() ? 1 : random.nextBoolean() ? 1 : -1; TripleShape shape = (height == 0) ? TripleShape.TOP : TripleShape.MIDDLE; Direction dir = BlocksHelper.randomHorizontal(random); BlockPos leafCenter = bpos.toImmutable().offset(dir); if (hasLeaf(world, leafCenter)) { generateLeaf(world, leafCenter); BlocksHelper.setWithoutUpdate(world, bpos, startLeaf.with(EndLotusStemBlock.SHAPE, shape).with(EndLotusStemBlock.FACING, dir)); } else { BlocksHelper.setWithoutUpdate(world, bpos, stem.with(EndLotusStemBlock.SHAPE, shape)); } bpos.setY(bpos.getY() + 1); for (int i = 1; i <= height; i++) { if (!world.isAir(bpos)) { bpos.setY(bpos.getY() - 1); BlocksHelper.setWithoutUpdate(world, bpos, flower); bpos.setY(bpos.getY() - 1); stem = world.getBlockState(bpos); BlocksHelper.setWithoutUpdate(world, bpos, stem.with(EndLotusStemBlock.SHAPE, TripleShape.TOP)); return; } BlocksHelper.setWithoutUpdate(world, bpos, stem); bpos.setY(bpos.getY() + 1); } if (!world.isAir(bpos) || height < 0) { bpos.setY(bpos.getY() - 1); } BlocksHelper.setWithoutUpdate(world, bpos, flower); bpos.setY(bpos.getY() - 1); stem = world.getBlockState(bpos); if (!stem.isOf(EndBlocks.END_LOTUS_STEM)) { stem = EndBlocks.END_LOTUS_STEM.getDefaultState(); if (!world.getBlockState(bpos.north()).getFluidState().isEmpty()) { stem = stem.with(EndLotusStemBlock.WATERLOGGED, true); } } if (world.getBlockState(bpos.offset(dir)).isOf(EndBlocks.END_LOTUS_LEAF)) { stem = stem.with(EndLotusStemBlock.LEAF, true).with(EndLotusStemBlock.FACING, dir); } BlocksHelper.setWithoutUpdate(world, bpos, stem.with(EndLotusStemBlock.SHAPE, TripleShape.TOP)); } } private boolean canGrow(StructureWorldAccess world, BlockPos pos) { Mutable bpos = new Mutable(); bpos.set(pos); while (world.getBlockState(bpos).getFluidState().getFluid().equals(Fluids.WATER.getStill())) { bpos.setY(bpos.getY() + 1); } return world.isAir(bpos) && world.isAir(bpos.up()); } private void generateLeaf(StructureWorldAccess world, BlockPos pos) { Mutable p = new Mutable(); BlockState leaf = EndBlocks.END_LOTUS_LEAF.getDefaultState(); BlocksHelper.setWithoutUpdate(world, pos, leaf.with(EndLotusLeafBlock.SHAPE, TripleShape.BOTTOM)); for (Direction move: BlocksHelper.HORIZONTAL) { BlocksHelper.setWithoutUpdate(world, p.set(pos).move(move), leaf.with(EndLotusLeafBlock.HORIZONTAL_FACING, move).with(EndLotusLeafBlock.SHAPE, TripleShape.MIDDLE)); } for (int i = 0; i < 4; i ++) { Direction d1 = BlocksHelper.HORIZONTAL[i]; Direction d2 = BlocksHelper.HORIZONTAL[(i + 1) & 3]; BlocksHelper.setWithoutUpdate(world, p.set(pos).move(d1).move(d2), leaf.with(EndLotusLeafBlock.HORIZONTAL_FACING, d1).with(EndLotusLeafBlock.SHAPE, TripleShape.TOP)); } } private boolean hasLeaf(StructureWorldAccess world, BlockPos pos) { Mutable p = new Mutable(); p.setY(pos.getY()); int count = 0; for (int x = -1; x < 2; x ++) { p.setX(pos.getX() + x); for (int z = -1; z < 2; z ++) { p.setZ(pos.getZ() + z); if (world.isAir(p) && !world.getFluidState(p.down()).isEmpty()) count ++; } } return count == 9; } }
[ "paulevs@yandex.ru" ]
paulevs@yandex.ru
c17c4c1095b9c52a52d2399b95b558ae405a57dc
c9796a20cf56aa01ecbc2ff3985703b17bfb51fe
/leetcode3/LargestCombinationWithBitwiseANDGreaterThanZero/MainApp.java
db5c75b9aa2e944c77a0fe7ba85b38cdeeef3365
[]
no_license
iamslash/learntocode
a62329710d36b21f8025961c0ad9b333c10e973a
63faf361cd4eefe0f6f1e50c49ea22577a75ea74
refs/heads/master
2023-08-31T08:20:08.608771
2023-08-31T00:05:06
2023-08-31T00:05:06
52,074,001
7
2
null
null
null
null
UTF-8
Java
false
false
563
java
// Copyright (C) 2022 by iamslash import java.util.*; // 41ms 88.23% 80.7MB 55.00% // bit manipulation // O(N) O(1) class Solution { public int largestCombination(int[] candidates) { int maxCnt = 0, n = candidates.length; for (int bm = 1; bm <= 10_000_000; bm <<= 1) { int cnt = 0; for (int cand : candidates) { if ((cand & bm) > 0) { cnt++; } } maxCnt = Math.max(maxCnt, cnt); } return maxCnt; } }
[ "iamslash@gmail.com" ]
iamslash@gmail.com
1578a0943d663dcbebe1efa0925b0394a9ccdeab
5f45b51a44cad049102e1fc04eca68d022eb14f7
/src/test/java/com/welzuka/user/user/repository/timezone/DateTimeWrapperRepository.java
2fe4bb9513bb009a1ecb81ba7f14ed9e7cf0e146
[]
no_license
AndroidAbhishek/service-user
9fb9e3a3e0e1a4c54ea829099d05cf947d82ed3b
6b3cf2fd392fd8e585b374afb3551190594064c8
refs/heads/master
2020-05-05T01:55:43.305642
2019-04-05T04:27:17
2019-04-05T04:27:17
179,618,793
0
0
null
2019-04-05T04:41:57
2019-04-05T04:27:12
Java
UTF-8
Java
false
false
340
java
package com.welzuka.user.user.repository.timezone; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; /** * Spring Data JPA repository for the DateTimeWrapper entity. */ @Repository public interface DateTimeWrapperRepository extends JpaRepository<DateTimeWrapper, Long> { }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
78ba8bf043c5237fa70158c00fddcd069ee2331d
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_32958.java
5230abaaa9a8b478911b67da19633ddaae5139f5
[]
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
160
java
private void bindNodeToController(Node node,Class<?> controllerClass,Flow flow,FlowHandler flowHandler){ flow.withGlobalLink(node.getId(),controllerClass); }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
ec05e0395e57deb31465b4965e471489f59ae5b7
3e168f60864e3944c43cf3490b4646dd69d874e4
/zhqxDefaultFrame/.svn/pristine/be/be80bacbc2417bc644f07816bc84814496ddf7e5.svn-base
11f5979543f4957de27f7f1498f794267a4a395f
[]
no_license
duanfuju/zhqxDefaultFrame
9f59ee3d6d75d6b1b08c58c90cab6fda00e53946
d2368d6137fa609305b11347aa995e1bb73f8ec7
refs/heads/master
2020-06-11T09:47:53.921863
2016-12-06T03:51:29
2016-12-06T03:51:29
75,688,758
1
0
null
null
null
null
GB18030
Java
false
false
1,898
package cn.com.oking.meeting.entity; public class meetingEntity { private String confKey; //会议号 private String subject; //会议主题 private String hostName; //主持人名字 private String startTime; // private String endTime; // private String timeZoneId; private String status; private String duringTime; private String confType; private String conferenceType; private String token; //参数加密字符串 public String getToken() { return token; } public void setToken(String token) { this.token = token; } public String getConferenceType() { return conferenceType; } public void setConferenceType(String conferenceType) { this.conferenceType = conferenceType; } public String getConfKey() { return confKey; } public void setConfKey(String confKey) { this.confKey = confKey; } public String getSubject() { return subject; } public void setSubject(String subject) { this.subject = subject; } public String getHostName() { return hostName; } public void setHostName(String hostName) { this.hostName = hostName; } public String getStartTime() { return startTime; } public void setStartTime(String startTime) { this.startTime = startTime; } public String getEndTime() { return endTime; } public void setEndTime(String endTime) { this.endTime = endTime; } public String getTimeZoneId() { return timeZoneId; } public void setTimeZoneId(String timeZoneId) { this.timeZoneId = timeZoneId; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getDuringTime() { return duringTime; } public void setDuringTime(String duringTime) { this.duringTime = duringTime; } public String getConfType() { return confType; } public void setConfType(String confType) { this.confType = confType; } }
[ "913500680@qq.com" ]
913500680@qq.com
5ca002f0ec89cf159fb08047b799f42f4d1cd393
19599ad278e170175f31f3544f140a8bc4ee6bab
/src/com/ametis/cms/auth/BatchClaimAuth.java
c67e20eb5d2d1901ed6c59a1d92bc7610e17514a
[]
no_license
andreHer/owlexaGIT
a2a0df83cd64a399e1c57bb6451262434e089631
426df1790443e8e8dd492690d6b7bd8fd37fa3d7
refs/heads/master
2021-01-01T04:26:16.039616
2016-05-12T07:37:20
2016-05-12T07:37:20
58,693,624
0
0
null
null
null
null
UTF-8
Java
false
false
6,433
java
package com.ametis.cms.auth; import java.io.Serializable; import java.util.Collection; import java.util.Iterator; import java.util.Vector; import com.ametis.cms.datamodel.Action; import com.ametis.cms.util.auth.AuthUtil; public class BatchClaimAuth implements Serializable{ private String saveAuth = "false"; private String completeAuth = "false"; private String closeAuth = "false"; private String openAuth = "false"; private String addClaimAuth = "false"; private String updateAuth = "false"; private String deleteAuth = "false"; private String payAuth = "false"; private String verifyAuth = "false"; private String claimListAuth = "false"; private String attachmentAuth = "false"; private String pendingClaimAuth = "false"; private String excessListAuth = "false"; private String paymentListAuth = "false"; public BatchClaimAuth(){ } public Collection<Action> generateActionCode(){ Collection<Action> result = new Vector<Action>(); result.add(AuthUtil.generateAction("SAVE", "Save Batch Claim", "batchclaim-form", "BATCHCLAIM-FORM")); result.add(AuthUtil.generateAction("COMPLETE", "Complete Batch Claim", "batchclaim?navigation=complete", "BATCHCLAIM-FORM")); result.add(AuthUtil.generateAction("EDIT", "Edit Batch Claim", "batchclaim-form", "BATCHCLAIM-FORM")); result.add(AuthUtil.generateAction("DELETE", "Delete Batch Claim", "batchclaim?navigation=hapus", "BATCHCLAIM-FORM")); result.add(AuthUtil.generateAction("PAY", "Pay Batch Claim", "payment-form?navigation=paybatch", "BATCHCLAIM-FORM")); result.add(AuthUtil.generateAction("VERIFY", "Verify Batch Claim", "batchclaim?navigation=verifybulk", "BATCHCLAIM-FORM")); result.add(AuthUtil.generateAction("CLAIMLIST", "Claim List - Batch Claim", "claim", "BATCHCLAIM-FORM")); result.add(AuthUtil.generateAction("ATTACHMENTLIST", "Attachment - Batch Claim", "", "BATCHCLAIM-FORM")); result.add(AuthUtil.generateAction("PENDINGLIST", "Pending Claim - Batch Claim", "claim", "BATCHCLAIM-FORM")); result.add(AuthUtil.generateAction("EXCESSLIST", "Excess List - Batch Claim", "excesscharge", "BATCHCLAIM-FORM")); result.add(AuthUtil.generateAction("PAYMENTLIST", "Payment List - Batch Claim", "payment", "BATCHCLAIM-FORM")); result.add(AuthUtil.generateAction("CLOSE", "Close Batch Claim", "batchclaim?navigation=close", "BATCHCLAIM-FORM")); result.add(AuthUtil.generateAction("OPEN", "Open Batch Claim", "batchclaim?navigation=open", "BATCHCLAIM-FORM")); result.add(AuthUtil.generateAction("ADDCLAIM", "Add Claim - Batch", "claim-form", "BATCHCLAIM-FORM")); return result; } public void loadAuth(Collection<Action> actionList){ if (actionList != null){ Iterator<Action> iterator = actionList.iterator(); Action action = null; while (iterator.hasNext()){ action = iterator.next(); if (action != null){ if (action.getActionCode().equalsIgnoreCase("PAYMENTLIST")) paymentListAuth = "true"; if (action.getActionCode().equalsIgnoreCase("EXCESSLIST")) excessListAuth = "true"; if (action.getActionCode().equalsIgnoreCase("PENDINGLIST")) pendingClaimAuth = "true"; if (action.getActionCode().equalsIgnoreCase("ATTACHMENTLIST")) attachmentAuth = "true"; if (action.getActionCode().equalsIgnoreCase("CLAIMLIST")) claimListAuth = "true"; if (action.getActionCode().equalsIgnoreCase("DELETE")) deleteAuth = "true"; if (action.getActionCode().equalsIgnoreCase("EDIT")) updateAuth = "true"; if (action.getActionCode().equalsIgnoreCase("VERIFY")) verifyAuth = "true"; if (action.getActionCode().equalsIgnoreCase("PAY")) payAuth = "true"; if (action.getActionCode().equalsIgnoreCase("SAVE")) saveAuth = "true"; if (action.getActionCode().equalsIgnoreCase("COMPLETE")) completeAuth = "true"; if (action.getActionCode().equalsIgnoreCase("CLOSE")) closeAuth = "true"; if (action.getActionCode().equalsIgnoreCase("OPEN")) openAuth = "true"; if (action.getActionCode().equalsIgnoreCase("ADDCLAIM")) addClaimAuth = "true"; } } } } public String getSaveAuth() { return saveAuth; } public void setSaveAuth(String saveAuth) { this.saveAuth = saveAuth; } public String getCompleteAuth() { return completeAuth; } public void setCompleteAuth(String completeAuth) { this.completeAuth = completeAuth; } public String getCloseAuth() { return closeAuth; } public void setCloseAuth(String closeAuth) { this.closeAuth = closeAuth; } public String getOpenAuth() { return openAuth; } public void setOpenAuth(String openAuth) { this.openAuth = openAuth; } public String getAddClaimAuth() { return addClaimAuth; } public void setAddClaimAuth(String addClaimAuth) { this.addClaimAuth = addClaimAuth; } public String getUpdateAuth() { return updateAuth; } public void setUpdateAuth(String updateAuth) { this.updateAuth = updateAuth; } public String getDeleteAuth() { return deleteAuth; } public void setDeleteAuth(String deleteAuth) { this.deleteAuth = deleteAuth; } public String getPayAuth() { return payAuth; } public void setPayAuth(String payAuth) { this.payAuth = payAuth; } public String getClaimListAuth() { return claimListAuth; } public void setClaimListAuth(String claimListAuth) { this.claimListAuth = claimListAuth; } public String getAttachmentAuth() { return attachmentAuth; } public void setAttachmentAuth(String attachmentAuth) { this.attachmentAuth = attachmentAuth; } public String getPendingClaimAuth() { return pendingClaimAuth; } public void setPendingClaimAuth(String pendingClaimAuth) { this.pendingClaimAuth = pendingClaimAuth; } public String getExcessListAuth() { return excessListAuth; } public void setExcessListAuth(String excessListAuth) { this.excessListAuth = excessListAuth; } public String getPaymentListAuth() { return paymentListAuth; } public void setPaymentListAuth(String paymentListAuth) { this.paymentListAuth = paymentListAuth; } public String getVerifyAuth() { return verifyAuth; } public void setVerifyAuth(String verifyAuth) { this.verifyAuth = verifyAuth; } }
[ "mashuri@7a4bab5d-9f4e-4b47-a10f-b21823e054b7" ]
mashuri@7a4bab5d-9f4e-4b47-a10f-b21823e054b7
5d257949961b6bdf4418d5e33dbcaf63cce6c818
f567c98cb401fc7f6ad2439cd80c9bcb45e84ce9
/src/main/java/com/alipay/api/domain/VcpAssetDetail.java
74109968b9c6f569ba799e26c9aec25de067ecd0
[ "Apache-2.0" ]
permissive
XuYingJie-cmd/alipay-sdk-java-all
0887fa02f857dac538e6ea7a72d4d9279edbe0f3
dd18a679f7543a65f8eba2467afa0b88e8ae5446
refs/heads/master
2023-07-15T23:01:02.139231
2021-09-06T07:57:09
2021-09-06T07:57:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,336
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 资产详情 * * @author auto create * @since 1.0, 2018-05-18 22:32:20 */ public class VcpAssetDetail extends AlipayObject { private static final long serialVersionUID = 4879458281917938516L; /** * 资金金额 */ @ApiField("amount") private String amount; /** * 资产金额 */ @ApiField("assetamount") private String assetamount; /** * 正常充值 */ @ApiField("assetusechannel") private String assetusechannel; /** * 收款用户id */ @ApiField("settleuserid") private String settleuserid; public String getAmount() { return this.amount; } public void setAmount(String amount) { this.amount = amount; } public String getAssetamount() { return this.assetamount; } public void setAssetamount(String assetamount) { this.assetamount = assetamount; } public String getAssetusechannel() { return this.assetusechannel; } public void setAssetusechannel(String assetusechannel) { this.assetusechannel = assetusechannel; } public String getSettleuserid() { return this.settleuserid; } public void setSettleuserid(String settleuserid) { this.settleuserid = settleuserid; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
c4448a1510c82ce49ac6dbc798d5dc4372a7dfdd
4381c104305afe42e0a2bf555169c19abb64896d
/src/main/java/com/ning/billing/recurly/model/push/payment/FailedPaymentNotification.java
71c0aaca1ad6e91624329221153e7964a2362faf
[]
no_license
Smartling/recurly-java-library
811f4554a7b5f076b4163ac264c662eb1196e21e
72982a87f3c148e803fd3e02d2e68985230c3760
refs/heads/master
2023-04-14T15:24:42.151454
2016-05-10T08:17:05
2016-05-10T08:17:05
12,159,032
0
2
null
2023-04-07T08:32:07
2013-08-16T13:10:16
Java
UTF-8
Java
false
false
996
java
/* * Copyright 2010-2013 Ning, Inc. * * Ning licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.ning.billing.recurly.model.push.payment; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "failed_payment_notification") public class FailedPaymentNotification extends PaymentNotification { public static FailedPaymentNotification read(final String payload) { return read(payload, FailedPaymentNotification.class); } }
[ "pierre@mouraf.org" ]
pierre@mouraf.org
414631c344d31f1a2cefcb9ad5746156d1775aac
5f703c51a3ed218b854142f46fd727f4da9c7ba4
/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/critical/EmptyCriticalAnalyzer.java
4cf23a9e0cc9dc4b2e21670f268e161e259553c3
[ "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
pgfox/activemq-artemis
2d0a4f1507f5b1ed3739486ea32901fe91014115
cfdd9fb5bc35594a85997ba66fb49bd0c12558ad
refs/heads/master
2021-01-17T07:59:35.096465
2017-08-23T02:17:40
2017-08-23T02:17:40
59,242,994
0
0
Apache-2.0
2017-12-11T13:07:25
2016-05-19T21:10:59
Java
UTF-8
Java
false
false
2,004
java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.activemq.artemis.utils.critical; public class EmptyCriticalAnalyzer implements CriticalAnalyzer { private static final EmptyCriticalAnalyzer instance = new EmptyCriticalAnalyzer(); public static EmptyCriticalAnalyzer getInstance() { return instance; } private EmptyCriticalAnalyzer() { } @Override public void add(CriticalComponent component) { } @Override public void remove(CriticalComponent component) { } @Override public boolean isMeasuring() { return false; } @Override public void start() throws Exception { } @Override public void stop() throws Exception { } @Override public boolean isStarted() { return false; } @Override public CriticalAnalyzer setCheckTime(long timeout) { return this; } @Override public long getCheckTime() { return 0; } @Override public CriticalAnalyzer setTimeout(long timeout) { return this; } @Override public long getTimeout() { return 0; } @Override public CriticalAnalyzer addAction(CriticalAction action) { return this; } @Override public void check() { } }
[ "clebertsuconic@apache.org" ]
clebertsuconic@apache.org
1a8269ffcfd8ec1202786c229e185b1a773da78c
f37e90775a158ea0ae644e334eac5bba341f4989
/Java+/BigData+/Hadoop+/Hadoop2+/MapReduce2/test/mr2/counter/CounterMapperTest.java
35c12652543f44a0ca025f86cef6bfcf49d918aa
[]
no_license
Aleks-Ya/yaal_examples
0087bbaf314ca5127051c93b89c8fc2dcd14c1e3
ec282968abf1b86e54fc2116c39f2d657b51baac
refs/heads/master
2023-09-01T07:40:44.404550
2023-08-27T15:24:34
2023-08-29T22:01:46
14,327,752
4
2
null
2021-06-16T20:39:19
2013-11-12T09:26:08
Java
UTF-8
Java
false
false
1,499
java
package mr2.counter; import org.apache.hadoop.io.DoubleWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mrunit.mapreduce.MapDriver; import org.apache.hadoop.mrunit.types.Pair; import org.junit.jupiter.api.Test; import java.io.IOException; import java.time.Instant; import java.util.Arrays; import static org.assertj.core.api.Assertions.assertThat; class CounterMapperTest { @Test void test() throws IOException { var driver = new MapDriver<Text, Text, Text, DoubleWritable>() .withMapper(new CounterMapper()) .withAll(Arrays.asList( new Pair<>(new Text("John"), new Text("100.3")), new Pair<>(new Text("Alex"), new Text("1000000")) )) .withAllOutput(Arrays.asList( new Pair<>(new Text("John"), new DoubleWritable(100.3)), new Pair<>(new Text("Alex"), new DoubleWritable(1000000D)) )); driver.runTest(); var counters = driver.getCounters(); assertThat(counters.countCounters()).isEqualTo(3); assertThat(counters.findCounter(CounterMapper.MyCounter.PERSONS).getValue()).isEqualTo(2L); assertThat(counters.findCounter(CounterMapper.COUNTER_GROUP, CounterMapper.COUNTER).getValue()).isEqualTo(1L); assertThat(counters.findCounter(CounterMapper.MyCounter.LAST_TIME).getValue()).isLessThanOrEqualTo(Instant.now().getEpochSecond()); } }
[ "ya_al@bk.ru" ]
ya_al@bk.ru
79b9bebf2e028d0513686b500cdff5f7f98d5902
1a32d704493deb99d3040646afbd0f6568d2c8e7
/BOOT-INF/lib/org/springframework/cglib/core/RejectModifierPredicate.java
3d9f84b7c180692970ac31a56370c75ca4efdf23
[]
no_license
yanrumei/bullet-zone-server-2.0
e748ff40f601792405143ec21d3f77aa4d34ce69
474c4d1a8172a114986d16e00f5752dc019cdcd2
refs/heads/master
2020-05-19T11:16:31.172482
2019-03-25T17:38:31
2019-03-25T17:38:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
913
java
/* */ package org.springframework.cglib.core; /* */ /* */ import java.lang.reflect.Member; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class RejectModifierPredicate /* */ implements Predicate /* */ { /* */ private int rejectMask; /* */ /* */ public RejectModifierPredicate(int rejectMask) /* */ { /* 24 */ this.rejectMask = rejectMask; /* */ } /* */ /* */ public boolean evaluate(Object arg) { /* 28 */ return (((Member)arg).getModifiers() & this.rejectMask) == 0; /* */ } /* */ } /* Location: C:\Users\ikatwal\Downloads\bullet-zone-server-2.0.jar!\BOOT-INF\lib\spring-core-4.3.14.RELEASE.jar!\org\springframework\cglib\core\RejectModifierPredicate.class * Java compiler version: 5 (49.0) * JD-Core Version: 0.7.1 */
[ "ishankatwal@gmail.com" ]
ishankatwal@gmail.com
79baf6df0d48fe1976166eaa5f4a4023941bae0b
9b62a49653d5ef7e2ce8bc9b15ae7fbbcd058cd3
/src/main/java/com/zbkj/crmeb/upload/service/impl/CosServiceImpl.java
54b2ed74efe56881837768b0e51777c394ac4f0d
[]
no_license
123guo789/E-commerce-marketing-system
cfcc00d11e0f645f30e3b3c465b4a907dd7ab5bc
14241e0777e86cd15404811bb397f820ffb4dfd9
refs/heads/master
2023-05-30T19:43:39.276634
2021-06-16T13:07:54
2021-06-16T13:07:54
363,798,792
0
0
null
null
null
null
UTF-8
Java
false
false
2,706
java
package com.zbkj.crmeb.upload.service.impl; import com.exception.CrmebException; import com.qcloud.cos.COSClient; import com.qcloud.cos.exception.CosClientException; import com.qcloud.cos.model.*; import com.zbkj.crmeb.system.service.SystemAttachmentService; import com.zbkj.crmeb.upload.service.CosService; import com.zbkj.crmeb.upload.vo.CloudVo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import java.io.File; /** * CosServiceImpl 同步到云服务 */ @Service public class CosServiceImpl implements CosService { private static final Logger logger = LoggerFactory.getLogger(CosServiceImpl.class); @Lazy @Autowired private SystemAttachmentService systemAttachmentService; /** * 同步到腾讯云cos * @param cloudVo CloudVo * @param webPth String web可访问目录 * @param localFile String 服务器文件绝对地址 * @param id Integer 文件id */ @Async @Override public void upload(CloudVo cloudVo, String webPth, String localFile, Integer id, COSClient cosClient) { logger.info("上传文件" + id + "开始:" + localFile); try { File file = new File(localFile); if(!file.exists()){ logger.info("上传文件"+ id + localFile + "不存在:"); return; } if(!cosClient.doesBucketExist(cloudVo.getBucketName())){ CreateBucketRequest createBucketRequest = new CreateBucketRequest(cloudVo.getBucketName()); // 设置 bucket 的权限为 Private(私有读写), 其他可选有公有读私有写, 公有读写 createBucketRequest.setCannedAcl(CannedAccessControlList.Private); try{ cosClient.createBucket(createBucketRequest); } catch (CosClientException serverException) { serverException.printStackTrace(); } } PutObjectRequest putObjectRequest = new PutObjectRequest(cloudVo.getBucketName(), webPth, file); PutObjectResult putObjectResult = cosClient.putObject(putObjectRequest); logger.info("上传文件" + id + " -- 结束:" + putObjectResult.getETag()); //更新数据库 systemAttachmentService.updateCloudType(id, 4); //删除 // file.delete(); } catch (Exception e) { throw new CrmebException(e.getMessage()); } } }
[ "321458547@qq.com" ]
321458547@qq.com
8c9bef5f35591528e58e541f441da5b38184e3da
cf7e9fcaa002d7e3a2e4396831bf122fd1ac7bbc
/cards/src/main/java/org/rnd/jmagic/cards/RestorationAngel.java
6174ac3eabec2e93431e71f2274edb6568c78f2c
[]
no_license
NorthFury/jmagic
9b28d803ce6f8bf22f22eb41e2a6411bc11c8cdf
efe53d9d02716cc215456e2794a43011759322d9
refs/heads/master
2020-05-28T11:04:50.631220
2014-06-17T09:48:44
2014-06-17T09:48:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,916
java
package org.rnd.jmagic.cards; import static org.rnd.jmagic.Convenience.*; import org.rnd.jmagic.abilities.keywords.Flash; import org.rnd.jmagic.abilities.keywords.Flying; import org.rnd.jmagic.engine.*; import org.rnd.jmagic.engine.generators.*; @Name("Restoration Angel") @Types({Type.CREATURE}) @SubTypes({SubType.ANGEL}) @ManaCost("3W") @Printings({@Printings.Printed(ex = Expansion.AVACYN_RESTORED, r = Rarity.RARE)}) @ColorIdentity({Color.WHITE}) public final class RestorationAngel extends Card { public static final class RestorationAngelAbility2 extends EventTriggeredAbility { public RestorationAngelAbility2(GameState state) { super(state, "When Restoration Angel enters the battlefield, you may exile target non-Angel creature you control, then return that card to the battlefield under your control."); this.addPattern(whenThisEntersTheBattlefield()); SetGenerator target = targetedBy(this.addTarget(RelativeComplement.instance(CREATURES_YOU_CONTROL, HasSubType.instance(SubType.ANGEL)), "target non-Angel creature you control")); EventFactory factory = new EventFactory(BLINK, "Exile target non-Angel creature you control, then return that card to the battlefield under your control."); factory.parameters.put(EventType.Parameter.CAUSE, This.instance()); factory.parameters.put(EventType.Parameter.TARGET, target); factory.parameters.put(EventType.Parameter.PLAYER, You.instance()); this.addEffect(youMay(factory)); } } public RestorationAngel(GameState state) { super(state); this.setPower(3); this.setToughness(4); // Flash this.addAbility(new Flash(state)); // Flying this.addAbility(new Flying(state)); // When Restoration Angel enters the battlefield, you may exile target // non-Angel creature you control, then return that card to the // battlefield under your control. this.addAbility(new RestorationAngelAbility2(state)); } }
[ "robyter@gmail" ]
robyter@gmail
8ecb69834fb1bfb309b3f47dbfdf3746b002a8d9
e7cb38a15026d156a11e4cf0ea61bed00b837abe
/groundwork-gw-vijava/vijava/src/main/java/com/doublecloud/vim25/VirtualAppVAppState.java
d709b3c77c96923826f9c4987a52f40244ae3216
[ "BSD-3-Clause" ]
permissive
wang-shun/groundwork-trunk
5e0ce72c739fc07f634aeefc8f4beb1c89f128af
ea1ca766fd690e75c3ee1ebe0ec17411bc651a76
refs/heads/master
2020-04-01T08:50:03.249587
2018-08-20T21:21:57
2018-08-20T21:21:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,017
java
/*================================================================================ Copyright (c) 2013 Steve Jin. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the names of copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================================================*/ package com.doublecloud.vim25; /** * @author Steve Jin (http://www.doublecloud.org) * @version 5.1 */ public enum VirtualAppVAppState { started ("started"), stopped ("stopped"), starting ("starting"), stopping ("stopping"); @SuppressWarnings("unused") private final String val; private VirtualAppVAppState(String val) { this.val = val; } }
[ "gibaless@gmail.com" ]
gibaless@gmail.com
8251de29290870ff0718afa5d0a60032a5a5cb0d
8d082bc31fcd74f8b0d0f616740034620856e05f
/src/main/java/com/mining/mining/rar/org/apache/tika/mime/MagicMatch.java
8cc9061a4149b3cc17dd8086ff662020ca34fe16
[ "MIT" ]
permissive
leeqiang250/rar-mining
346a9f04516ee6a7d92e8d5650333236f9269aa9
39f2be6b0b23e721fd5238d5020e1072c28d6768
refs/heads/main
2023-02-28T00:14:08.409666
2021-01-31T11:38:57
2021-01-31T11:38:57
326,977,620
0
1
null
null
null
null
UTF-8
Java
false
false
1,822
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.mining.mining.rar.org.apache.tika.mime; import java.io.ByteArrayInputStream; import java.io.IOException; import com.mining.mining.rar.org.apache.tika.detect.MagicDetector; import com.mining.mining.rar.org.apache.tika.metadata.Metadata; /** * Defines a magic match. */ class MagicMatch implements Clause { private final MagicDetector detector; private final int length; MagicMatch(MagicDetector detector, int length) throws MimeTypeException { this.detector = detector; this.length = length; } public boolean eval(byte[] data) { try { return detector.detect( new ByteArrayInputStream(data), new Metadata()) != MediaType.OCTET_STREAM; } catch (IOException e) { // Should never happen with a ByteArrayInputStream return false; } } public int size() { return length; } public String toString() { return detector.toString(); } }
[ "leeqiang250@163.com" ]
leeqiang250@163.com
4889f9d228096cd13b295d0bb6a9f0b0b152dd37
8abee1c5699e6663931508d8b21540f423631592
/SV-common/slimevoidlib/IContainer.java
9081266456d463a4a29a70955e2b5bc1004eb37c
[]
no_license
Tarig0/SlimevoidLibrary
21440d5fb4a2411ddc1d51522ee956bcd9b23e6a
d17355885e63c9e639996f1370317decfe1158be
refs/heads/master
2021-01-17T06:52:04.659388
2013-08-06T21:47:19
2013-08-06T21:47:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
994
java
/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation, either version 3 of the License, or (at your option) any * later version. This program is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General * Public License for more details. You should have received a copy of the GNU * Lesser General Public License along with this program. If not, see * <http://www.gnu.org/licenses/> */ package slimevoidlib; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public interface IContainer { public TileEntity createNewTileEntity(World world); public TileEntity createTileEntity(World world, int meta); public void onBlockAdded(World world, int x, int y, int z); }
[ "reflex_ion@hotmail.com" ]
reflex_ion@hotmail.com
c57fe2e5639fb700e369e6c43d3eb936443079e2
201115bef8a70bc191a426baacb0cfb4811f9cb6
/src/main/java/com/appec/ventasweb/service/impl/CuentaClienteServiceImpl.java
9a34573f1227d640fbc7e54d214bbcbaae02f7bc
[]
no_license
yagodeoz/jhipster-app-ventas
bfc1a946db2b72facbcd993bafb818a3db1beda1
926d44c4879927ec3a0dbb39079c5af7002b892b
refs/heads/master
2022-11-19T11:34:56.321418
2020-07-24T02:06:51
2020-07-24T02:06:51
279,496,762
0
0
null
2020-07-17T05:43:32
2020-07-14T06:01:24
Java
UTF-8
Java
false
false
1,580
java
package com.appec.ventasweb.service.impl; import com.appec.ventasweb.service.CuentaClienteService; import com.appec.ventasweb.domain.CuentaCliente; import com.appec.ventasweb.repository.CuentaClienteRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import java.util.List; import java.util.Optional; /** * Service Implementation for managing {@link CuentaCliente}. */ @Service public class CuentaClienteServiceImpl implements CuentaClienteService { private final Logger log = LoggerFactory.getLogger(CuentaClienteServiceImpl.class); private final CuentaClienteRepository cuentaClienteRepository; public CuentaClienteServiceImpl(CuentaClienteRepository cuentaClienteRepository) { this.cuentaClienteRepository = cuentaClienteRepository; } @Override public CuentaCliente save(CuentaCliente cuentaCliente) { log.debug("Request to save CuentaCliente : {}", cuentaCliente); return cuentaClienteRepository.save(cuentaCliente); } @Override public List<CuentaCliente> findAll() { log.debug("Request to get all CuentaClientes"); return cuentaClienteRepository.findAll(); } @Override public Optional<CuentaCliente> findOne(String id) { log.debug("Request to get CuentaCliente : {}", id); return cuentaClienteRepository.findById(id); } @Override public void delete(String id) { log.debug("Request to delete CuentaCliente : {}", id); cuentaClienteRepository.deleteById(id); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
40f925f92c716c3b8dd76299a53a94c1f7c51295
c2eafa0f7c17202530611c1fb9fd20f3a5e1d43a
/_src/Chapter 7/MyApplication-addingthejavascriptresourcestotheportlet-annotation/src/main/java/my/sample/MyPortlet.java
9ff2b017f7185373f33ae64963d5a665420b90f6
[ "Apache-2.0" ]
permissive
paullewallencom/gatein-978-1-8495-1862-8
01297a33548f867642aa6e43270d8bbd9ff9bf3c
7d5746e38d9e24df43a547cae858f336822ac679
refs/heads/main
2023-02-08T08:52:26.994808
2020-12-28T16:00:04
2020-12-28T16:00:04
319,408,457
0
0
null
null
null
null
ISO-8859-2
Java
false
false
2,181
java
package my.sample; import javax.portlet.PortletPreferences; import javax.portlet.PortletRequest; import org.exoplatform.portal.mop.navigation.GenericScope; import org.exoplatform.portal.webui.navigation.UIPortalNavigation; import org.exoplatform.web.application.JavascriptManager; import org.exoplatform.webui.application.WebuiRequestContext; import org.exoplatform.webui.application.portlet.PortletRequestContext; import org.exoplatform.webui.config.annotation.ComponentConfig; import org.exoplatform.webui.config.annotation.ComponentConfigs; import org.exoplatform.webui.core.UIPortletApplication; import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle; @ComponentConfigs({ @ComponentConfig(type = MyPortlet.class, lifecycle = UIApplicationLifecycle.class, template = "app:/groovy/MyApplication/webui/component/MyPortlet.gtmpl"), @ComponentConfig(type = UIPortalNavigation.class, id = "MyUISiteMap") }) public class MyPortlet extends UIPortletApplication { public MyPortlet() throws Exception { // Take the current PortletRequest PortletRequestContext context = (PortletRequestContext) WebuiRequestContext .getCurrentInstance(); PortletRequest prequest = context.getRequest(); /* * Take the portlet preferences and find a preference called template. * If it doesnŐt exist add the default template UISitemapTree.gtmpl. It * implements a navigable tree structure */ PortletPreferences prefers = prequest.getPreferences(); String template = prefers.getValue("template", "app:/groovy/webui/core/UISitemapTree.gtmpl"); /* * Add the UIPortalNavigation as a child of the application and set two * properties */ UIPortalNavigation uiPortalNavigation = addChild( UIPortalNavigation.class, "MyUISiteMap", null); uiPortalNavigation.setTemplate(template); uiPortalNavigation.setUseAjax(false); /* * Set in memory the informations present in the tree. In this code are * memorized the first 2 levels of the tree */ uiPortalNavigation.setScope(GenericScope.treeShape(2)); JavascriptManager jsmanager = context.getJavascriptManager(); jsmanager.importJavascript("eXo.webui.Mycomponent"); } }
[ "paullewallencom@users.noreply.github.com" ]
paullewallencom@users.noreply.github.com
6a895f3f18809ae3b7d0798439d9938059c0be5d
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.ocms-OCMS/sources/com/oculus/appmanager/installer/service/ConsistencyJobServiceAutoProvider.java
eb439c48d9ca5b152f8ba461c25e3e70eccd5e41
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
480
java
package com.oculus.appmanager.installer.service; import com.facebook.inject.AbstractComponentProvider; public class ConsistencyJobServiceAutoProvider extends AbstractComponentProvider<ConsistencyJobService> { public void inject(ConsistencyJobService consistencyJobService) { ConsistencyJobService._UL_staticInjectMe(this, consistencyJobService); } public boolean equals(Object obj) { return obj instanceof ConsistencyJobServiceAutoProvider; } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
c25aa1ef2693c3dd4e2f46bcba7f3237a1072262
d47fccd04dfdcc65fbedafc33b8ef765c792f7e4
/graphql-java-runtime/src/test/java/com/graphql_java_generator/domain/server/allGraphQLCases/AllFieldCasesWithoutIdSubtype.java
f3d9ac1bd2e8080526c94c9e0bb877783a227f13
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
crypitor/graphql-maven-plugin-project
b7450ab07c90931d95486686d5f321d9dc44273d
ef9035154997b617e9eebc9eff37a2b64ce4ad4f
refs/heads/master
2023-07-16T23:19:44.006171
2021-08-30T20:27:52
2021-08-30T20:27:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,237
java
/** Generated by the default template from graphql-java-generator */ package com.graphql_java_generator.domain.server.allGraphQLCases; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.graphql_java_generator.exception.GraphQLRequestExecutionException; import com.graphql_java_generator.GraphQLField; import com.graphql_java_generator.annotation.GraphQLInputParameters; import com.graphql_java_generator.annotation.GraphQLObjectType; import com.graphql_java_generator.annotation.GraphQLScalar; import javax.persistence.Entity; /** * * @author generated by graphql-java-generator * @see <a href="https://github.com/graphql-java-generator/graphql-java-generator">https://github.com/graphql-java-generator/graphql-java-generator</a> */ @Entity @GraphQLObjectType("AllFieldCasesWithoutIdSubtype") public class AllFieldCasesWithoutIdSubtype { public AllFieldCasesWithoutIdSubtype(){ // No action } @GraphQLScalar(fieldName = "name", graphQLTypeSimpleName = "String", javaClass = String.class) String name; public void setName(String name) { this.name = name; } public String getName() { return name; } public String toString() { return "AllFieldCasesWithoutIdSubtype {" + "name: " + name + "}"; } /** * Enum of field names */ public static enum Field implements GraphQLField { Name("name"); private String fieldName; Field(String fieldName) { this.fieldName = fieldName; } public String getFieldName() { return fieldName; } public Class<?> getGraphQLType() { return this.getClass().getDeclaringClass(); } } public static Builder builder() { return new Builder(); } /** * Builder */ public static class Builder { private String name; public Builder withName(String name) { this.name = name; return this; } public AllFieldCasesWithoutIdSubtype build() { AllFieldCasesWithoutIdSubtype _object = new AllFieldCasesWithoutIdSubtype(); _object.setName(name); return _object; } } }
[ "etienne_sf@users.sf.net" ]
etienne_sf@users.sf.net
9457b1112c40d904a5ffb922a698cffe56df784e
de3c2d89f623527b35cc5dd936773f32946025d2
/src/main/java/com/p522qq/taf/jce/dynamic/ByteArrayField.java
974adac132686f2972aaedbc4aa7e19dcadbe01b
[]
no_license
ren19890419/lvxing
5f89f7b118df59fd1da06aaba43bd9b41b5da1e6
239875461cb39e58183ac54e93565ec5f7f28ddb
refs/heads/master
2023-04-15T08:56:25.048806
2020-06-05T10:46:05
2020-06-05T10:46:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
388
java
package com.p522qq.taf.jce.dynamic; /* renamed from: com.qq.taf.jce.dynamic.ByteArrayField */ public class ByteArrayField extends JceField { private byte[] data; ByteArrayField(byte[] bArr, int i) { super(i); this.data = bArr; } public byte[] get() { return this.data; } public void set(byte[] bArr) { this.data = bArr; } }
[ "593746220@qq.com" ]
593746220@qq.com
def59eb5f97c2735712ad8c77fae22b7604cd9b4
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/com/alipay/sofa/rpc/common/utils/DateUtilsTest.java
af426fa66c3c67a85a5897e2b2bd466bbd2bdbf4
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
6,359
java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alipay.sofa.rpc.common.utils; import DateUtils.DATE_FORMAT_MILLS_TIME; import java.util.Date; import java.util.TimeZone; import org.junit.Assert; import org.junit.Test; /** * * * @author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a> */ public class DateUtilsTest { @Test public void getDelayToNextMinute() throws Exception { long now = System.currentTimeMillis(); int delay = DateUtils.getDelayToNextMinute(now); Assert.assertTrue((delay < 60000)); } @Test public void getPreMinuteMills() throws Exception { long now = System.currentTimeMillis(); long pre = DateUtils.getPreMinuteMills(now); Assert.assertTrue(((now - pre) < 60000)); } @Test public void dateToStr() throws Exception { long s1 = 1501127802975L;// 2017-07-27 11:56:42:975 +8 long s2 = 1501127835658L;// 2017-07-27 11:57:15:658 +8 TimeZone timeZone = TimeZone.getDefault(); Date date0 = new Date((0 - (timeZone.getRawOffset()))); Date date1 = new Date((s1 - (timeZone.getRawOffset()))); Date date2 = new Date((s2 - (timeZone.getRawOffset()))); Assert.assertEquals(DateUtils.dateToStr(date0), "1970-01-01 00:00:00"); Assert.assertEquals(DateUtils.dateToStr(date1), "2017-07-27 03:56:42"); Assert.assertEquals(DateUtils.dateToStr(date2), "2017-07-27 03:57:15"); } @Test public void dateToStr1() throws Exception { long d0 = 0L; long d1 = 1501127802975L;// 2017-07-27 11:56:42:975 +8 long d2 = 1501127835658L;// 2017-07-27 11:57:15:658 +8 TimeZone timeZone = TimeZone.getDefault(); Date date0 = new Date((d0 - (timeZone.getRawOffset()))); Date date1 = new Date((d1 - (timeZone.getRawOffset()))); Date date2 = new Date((d2 - (timeZone.getRawOffset()))); Assert.assertEquals(DateUtils.dateToStr(date0, DATE_FORMAT_MILLS_TIME), "1970-01-01 00:00:00.000"); Assert.assertEquals(DateUtils.dateToStr(date1, DATE_FORMAT_MILLS_TIME), "2017-07-27 03:56:42.975"); Assert.assertEquals(DateUtils.dateToStr(date2, DATE_FORMAT_MILLS_TIME), "2017-07-27 03:57:15.658"); } @Test public void strToDate() throws Exception { long d0 = 0L; long d1 = 1501127802000L;// 2017-07-27 11:56:42:975 +8 long d2 = 1501127835000L;// 2017-07-27 11:57:15:658 +8 TimeZone timeZone = TimeZone.getDefault(); Date date0 = new Date((d0 - (timeZone.getRawOffset()))); Date date1 = new Date((d1 - (timeZone.getRawOffset()))); Date date2 = new Date((d2 - (timeZone.getRawOffset()))); String s0 = "1970-01-01 00:00:00"; String s1 = "2017-07-27 03:56:42"; String s2 = "2017-07-27 03:57:15"; Assert.assertEquals(DateUtils.strToDate(s0).getTime(), date0.getTime()); Assert.assertEquals(DateUtils.strToDate(s1).getTime(), date1.getTime()); Assert.assertEquals(DateUtils.strToDate(s2).getTime(), date2.getTime()); } @Test public void strToDate1() throws Exception { long d0 = 0L; long d1 = 1501127802975L;// 2017-07-27 11:56:42:975 +8 long d2 = 1501127835658L;// 2017-07-27 11:57:15:658 +8 TimeZone timeZone = TimeZone.getDefault(); Date date0 = new Date((d0 - (timeZone.getRawOffset()))); Date date1 = new Date((d1 - (timeZone.getRawOffset()))); Date date2 = new Date((d2 - (timeZone.getRawOffset()))); String s0 = "1970-01-01 00:00:00.000"; String s1 = "2017-07-27 03:56:42.975"; String s2 = "2017-07-27 03:57:15.658"; Assert.assertEquals(DateUtils.strToDate(s0, DATE_FORMAT_MILLS_TIME).getTime(), date0.getTime()); Assert.assertEquals(DateUtils.strToDate(s1, DATE_FORMAT_MILLS_TIME).getTime(), date1.getTime()); Assert.assertEquals(DateUtils.strToDate(s2, DATE_FORMAT_MILLS_TIME).getTime(), date2.getTime()); } @Test public void dateToMillisStr() throws Exception { long d0 = 0L; long d1 = 1501127802975L;// 2017-07-27 11:56:42:975 +8 long d2 = 1501127835658L;// 2017-07-27 11:57:15:658 +8 TimeZone timeZone = TimeZone.getDefault(); Date date0 = new Date((d0 - (timeZone.getRawOffset()))); Date date1 = new Date((d1 - (timeZone.getRawOffset()))); Date date2 = new Date((d2 - (timeZone.getRawOffset()))); Assert.assertEquals(DateUtils.dateToMillisStr(date0), "1970-01-01 00:00:00.000"); Assert.assertEquals(DateUtils.dateToMillisStr(date1), "2017-07-27 03:56:42.975"); Assert.assertEquals(DateUtils.dateToMillisStr(date2), "2017-07-27 03:57:15.658"); } @Test public void millisStrToDate() throws Exception { long d0 = 0L; long d1 = 1501127802975L;// 2017-07-27 11:56:42:975 +8 long d2 = 1501127835658L;// 2017-07-27 11:57:15:658 +8 TimeZone timeZone = TimeZone.getDefault(); Date date0 = new Date((d0 - (timeZone.getRawOffset()))); Date date1 = new Date((d1 - (timeZone.getRawOffset()))); Date date2 = new Date((d2 - (timeZone.getRawOffset()))); String s0 = "1970-01-01 00:00:00.000"; String s1 = "2017-07-27 03:56:42.975"; String s2 = "2017-07-27 03:57:15.658"; Assert.assertEquals(DateUtils.millisStrToDate(s0).getTime(), date0.getTime()); Assert.assertEquals(DateUtils.millisStrToDate(s1).getTime(), date1.getTime()); Assert.assertEquals(DateUtils.millisStrToDate(s2).getTime(), date2.getTime()); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
b3a8c0cae6ebbf123f2fa2ef854cff04f4921ccd
09d0ddd512472a10bab82c912b66cbb13113fcbf
/TestApplications/TF-BETA-THERMATK-v5.7.1/DecompiledCode/Procyon/src/main/java/org/osmdroid/events/MapListener.java
677585ef1bc94f89d8db0d62949b1fc7b849cbed
[]
no_license
sgros/activity_flow_plugin
bde2de3745d95e8097c053795c9e990c829a88f4
9e59f8b3adacf078946990db9c58f4965a5ccb48
refs/heads/master
2020-06-19T02:39:13.865609
2019-07-08T20:17:28
2019-07-08T20:17:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
194
java
// // Decompiled by Procyon v0.5.34 // package org.osmdroid.events; public interface MapListener { boolean onScroll(final ScrollEvent p0); boolean onZoom(final ZoomEvent p0); }
[ "crash@home.home.hr" ]
crash@home.home.hr
29a2fb2c87824bd9d86bec1c2bbf75525041c238
87901d9fd3279eb58211befa5357553d123cfe0c
/bin/platform/bootstrap/gensrc/de/hybris/platform/core/model/type/ViewTypeModel.java
85e12c7d86f65d8668f401ebf69a6fcbbd4440de
[]
no_license
prafullnagane/learning
4d120b801222cbb0d7cc1cc329193575b1194537
02b46a0396cca808f4b29cd53088d2df31f43ea0
refs/heads/master
2020-03-27T23:04:17.390207
2014-02-27T06:19:49
2014-02-27T06:19:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,201
java
/* * ---------------------------------------------------------------- * --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! --- * --- Generated at Dec 13, 2013 6:34:48 PM --- * ---------------------------------------------------------------- * * [y] hybris Platform * * Copyright (c) 2000-2011 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * */ package de.hybris.platform.core.model.type; import de.hybris.platform.core.model.ItemModel; import de.hybris.platform.core.model.type.ComposedTypeModel; import de.hybris.platform.core.model.type.ViewAttributeDescriptorModel; import de.hybris.platform.servicelayer.model.ItemModelContext; import java.util.List; import java.util.Set; /** * Generated model class for type ViewType first defined at extension core. */ @SuppressWarnings("all") public class ViewTypeModel extends ComposedTypeModel { /**<i>Generated model type code constant.</i>*/ public final static String _TYPECODE = "ViewType"; /** <i>Generated constant</i> - Attribute key of <code>ViewType.query</code> attribute defined at extension <code>core</code>. */ public static final String QUERY = "query"; /** <i>Generated constant</i> - Attribute key of <code>ViewType.params</code> attribute defined at extension <code>core</code>. */ public static final String PARAMS = "params"; /** <i>Generated constant</i> - Attribute key of <code>ViewType.columns</code> attribute defined at extension <code>core</code>. */ public static final String COLUMNS = "columns"; /** <i>Generated variable</i> - Variable of <code>ViewType.query</code> attribute defined at extension <code>core</code>. */ private String _query; /** <i>Generated variable</i> - Variable of <code>ViewType.params</code> attribute defined at extension <code>core</code>. */ private Set<ViewAttributeDescriptorModel> _params; /** <i>Generated variable</i> - Variable of <code>ViewType.columns</code> attribute defined at extension <code>core</code>. */ private List<ViewAttributeDescriptorModel> _columns; /** * <i>Generated constructor</i> - Default constructor for generic creation. */ public ViewTypeModel() { super(); } /** * <i>Generated constructor</i> - Default constructor for creation with existing context * @param ctx the model context to be injected, must not be null */ public ViewTypeModel(final ItemModelContext ctx) { super(ctx); } /** * <i>Generated constructor</i> - Constructor with all mandatory attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _catalogItemType initial attribute declared by type <code>ComposedType</code> at extension <code>catalog</code> * @param _code initial attribute declared by type <code>Type</code> at extension <code>core</code> * @param _generate initial attribute declared by type <code>TypeManagerManaged</code> at extension <code>core</code> * @param _query initial attribute declared by type <code>ViewType</code> at extension <code>core</code> * @param _singleton initial attribute declared by type <code>ComposedType</code> at extension <code>core</code> * @param _superType initial attribute declared by type <code>ViewType</code> at extension <code>core</code> */ @Deprecated public ViewTypeModel(final Boolean _catalogItemType, final String _code, final Boolean _generate, final String _query, final Boolean _singleton, final ComposedTypeModel _superType) { super(); setCatalogItemType(_catalogItemType); setCode(_code); setGenerate(_generate); setQuery(_query); setSingleton(_singleton); setSuperType(_superType); } /** * <i>Generated constructor</i> - for all mandatory and initial attributes. * @deprecated Since 4.1.1 Please use the default constructor without parameters * @param _catalogItemType initial attribute declared by type <code>ComposedType</code> at extension <code>catalog</code> * @param _code initial attribute declared by type <code>Type</code> at extension <code>core</code> * @param _generate initial attribute declared by type <code>TypeManagerManaged</code> at extension <code>core</code> * @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code> * @param _query initial attribute declared by type <code>ViewType</code> at extension <code>core</code> * @param _singleton initial attribute declared by type <code>ComposedType</code> at extension <code>core</code> * @param _superType initial attribute declared by type <code>ViewType</code> at extension <code>core</code> */ @Deprecated public ViewTypeModel(final Boolean _catalogItemType, final String _code, final Boolean _generate, final ItemModel _owner, final String _query, final Boolean _singleton, final ComposedTypeModel _superType) { super(); setCatalogItemType(_catalogItemType); setCode(_code); setGenerate(_generate); setOwner(_owner); setQuery(_query); setSingleton(_singleton); setSuperType(_superType); } /** * <i>Generated method</i> - Getter of the <code>ViewType.columns</code> attribute defined at extension <code>core</code>. * Consider using FlexibleSearchService::searchRelation for pagination support of large result sets. * @return the columns */ public List<ViewAttributeDescriptorModel> getColumns() { return _columns = getPersistenceContext().getValue(COLUMNS, _columns); } /** * <i>Generated method</i> - Getter of the <code>ViewType.params</code> attribute defined at extension <code>core</code>. * Consider using FlexibleSearchService::searchRelation for pagination support of large result sets. * @return the params */ public Set<ViewAttributeDescriptorModel> getParams() { return _params = getPersistenceContext().getValue(PARAMS, _params); } /** * <i>Generated method</i> - Getter of the <code>ViewType.query</code> attribute defined at extension <code>core</code>. * @return the query */ public String getQuery() { return _query = getPersistenceContext().getValue(QUERY, _query); } /** * <i>Generated method</i> - Setter of <code>ViewType.columns</code> attribute defined at extension <code>core</code>. * * @param value the columns */ public void setColumns(final List<ViewAttributeDescriptorModel> value) { _columns = getPersistenceContext().setValue(COLUMNS, value); } /** * <i>Generated method</i> - Setter of <code>ViewType.params</code> attribute defined at extension <code>core</code>. * * @param value the params */ public void setParams(final Set<ViewAttributeDescriptorModel> value) { _params = getPersistenceContext().setValue(PARAMS, value); } /** * <i>Generated method</i> - Setter of <code>ViewType.query</code> attribute defined at extension <code>core</code>. * * @param value the query */ public void setQuery(final String value) { _query = getPersistenceContext().setValue(QUERY, value); } }
[ "admin1@neev31.(none)" ]
admin1@neev31.(none)
4918692968fe04acbc4f87324f42219e911edb8d
71ce43b7cbbf3b44c5bb652e8fb66039318c7cde
/src/main/java/dev/jtong/demos/my/lombok/setter/MySetterProcessor.java
fb401b327b1fa540db622b70639412245a74c815
[]
no_license
jtong-demos/my-lombok-try
841f2d2e3b73452e73daf5c609808653303f6c2a
3b815b0e5f67b74909b7160540d297f1d0a2767f
refs/heads/main
2022-12-27T16:27:20.253324
2020-10-08T07:30:11
2020-10-08T07:30:11
302,261,527
0
0
null
null
null
null
UTF-8
Java
false
false
4,755
java
package dev.jtong.demos.my.lombok.setter; import com.sun.source.tree.Tree; import com.sun.tools.javac.api.JavacTrees; import com.sun.tools.javac.code.Flags; import com.sun.tools.javac.code.Type; import com.sun.tools.javac.processing.JavacProcessingEnvironment; import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.tree.TreeMaker; import com.sun.tools.javac.tree.TreeTranslator; import com.sun.tools.javac.util.*; import javax.annotation.processing.*; import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement; import javax.tools.Diagnostic; import java.util.Set; /** * @program: springBootPractice * @description: * @author: hu_pf * @create: 2020-03-04 17:54 **/ @SupportedSourceVersion(SourceVersion.RELEASE_8) @SupportedAnnotationTypes("dev.jtong.demos.my.lombok.setter.MySetter") public class MySetterProcessor extends AbstractProcessor { private Messager messager; private JavacTrees javacTrees; private TreeMaker treeMaker; private Names names; /** * @Description: 1. Message 主要是用来在编译时期打log用的 * 2. JavacTrees 提供了待处理的抽象语法树 * 3. TreeMaker 封装了创建AST节点的一些方法 * 4. Names 提供了创建标识符的方法 */ @Override public synchronized void init(ProcessingEnvironment processingEnv) { super.init(processingEnv); this.messager = processingEnv.getMessager(); this.javacTrees = JavacTrees.instance(processingEnv); Context context = ((JavacProcessingEnvironment)processingEnv).getContext(); this.treeMaker = TreeMaker.instance(context); this.names = Names.instance(context); } @Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { Set<? extends Element> elementsAnnotatedWith = roundEnv.getElementsAnnotatedWith(MySetter.class); elementsAnnotatedWith.forEach(e->{ JCTree tree = javacTrees.getTree(e); tree.accept(new TreeTranslator(){ @Override public void visitClassDef(JCTree.JCClassDecl jcClassDecl) { List<JCTree.JCVariableDecl> jcVariableDeclList = List.nil(); // 在抽象树中找出所有的变量 for (JCTree jcTree : jcClassDecl.defs){ if (jcTree.getKind().equals(Tree.Kind.VARIABLE)){ JCTree.JCVariableDecl jcVariableDecl = (JCTree.JCVariableDecl) jcTree; jcVariableDeclList = jcVariableDeclList.append(jcVariableDecl); } } // 对于变量进行生成方法的操作 jcVariableDeclList.forEach(jcVariableDecl -> { messager.printMessage(Diagnostic.Kind.NOTE,jcVariableDecl.getName()+"has been processed"); jcClassDecl.defs = jcClassDecl.defs.prepend(makeSetterMethodDecl(jcVariableDecl)); }); super.visitClassDef(jcClassDecl); } }); }); return true; } private JCTree.JCMethodDecl makeSetterMethodDecl(JCTree.JCVariableDecl jcVariableDecl){ ListBuffer<JCTree.JCStatement> statements = new ListBuffer<>(); // 生成表达式 例如 this.a = a; JCTree.JCExpressionStatement aThis = makeAssignment(treeMaker.Select(treeMaker.Ident(names.fromString("this")), jcVariableDecl.getName()), treeMaker.Ident(jcVariableDecl.getName())); statements.append(aThis); JCTree.JCBlock block = treeMaker.Block(0, statements.toList()); // 生成入参 JCTree.JCVariableDecl param = treeMaker.VarDef(treeMaker.Modifiers(Flags.PARAMETER), jcVariableDecl.getName(), jcVariableDecl.vartype, null); List<JCTree.JCVariableDecl> parameters = List.of(param); // 生成返回对象 JCTree.JCExpression methodType = treeMaker.Type(new Type.JCVoidType()); return treeMaker.MethodDef(treeMaker.Modifiers(Flags.PUBLIC),getNewMethodName(jcVariableDecl.getName()),methodType,List.nil(),parameters,List.nil(),block,null); } private Name getNewMethodName(Name name){ String s = name.toString(); return names.fromString("set"+s.substring(0,1).toUpperCase()+s.substring(1,name.length())); } private JCTree.JCExpressionStatement makeAssignment(JCTree.JCExpression lhs, JCTree.JCExpression rhs) { return treeMaker.Exec( treeMaker.Assign( lhs, rhs ) ); } }
[ "tj19832@gmail.com" ]
tj19832@gmail.com
81946b2dc5591f898be9b76d315788119d59c3be
858d03625f3dc024c79557b5d4fb0d84ea8e188c
/src/main/java/controllers/local/Controller.java
ba12f1047f952ee6f95ab2fc21bf01fa4238c024
[]
no_license
BrunoML1991/MasterMind
c3bbcd13cef8a174780fcce1dd2470b590d96758
13a65590e3a5d10a73fcf4f76d622c7dfd93f557
refs/heads/master
2020-03-30T04:19:55.006059
2018-09-29T17:03:08
2018-09-29T17:03:08
150,737,536
0
0
null
null
null
null
UTF-8
Java
false
false
1,082
java
package controllers.local; import models.Game; import models.State; import models.Turn; public abstract class Controller { private Game game; protected Controller(Game game) { assert game != null; this.game = game; } protected State getState() { return game.getState(); } public void setState(State state) { assert state != null; game.setState(state); } protected void setSecretCode() { game.setSecretCode(); } protected void clear () { game.clear(); } protected void setTurn (int value) { game.setTurn(value); } protected void put(char[] code) { game.put(code); if (this.isVictory()) { this.setState(State.FINAL); } if (this.getTurn() == Turn.MAX_TURNS) { this.setState(State.FINAL); } } public int getTurn () { return game.getTurn(); } public void changeTurn () { game.changeTurn(); } public boolean isVictory () { return game.isVictory(); } public int[] matchesObtained (int turn) { return game.matchesObtained(turn); } public char[] boardData(int turn){ return game.boardData(turn); } }
[ "=" ]
=
458e55e842f03c48df046931dd6b11556e7215a5
217de722a86cd2a28a787c6b214c25c11c6dc4d2
/zcloud-hospital/zcloud-hospital-common/src/main/java/com/jfatty/zcloud/hospital/dto/IconPictureDTO.java
eff4a83cd95d099d67ebf9465e5aeac879164cf5
[]
no_license
dizhaung/zcloud-1
a7e2f419a3a47de8ffffdc44b3acdd7783b85901
38d17288d60b3a1c079a4b6a51d29356a37c4db2
refs/heads/master
2023-05-09T19:47:04.986295
2020-09-01T07:27:10
2020-09-01T07:27:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,855
java
package com.jfatty.zcloud.hospital.dto; import com.jfatty.zcloud.base.dto.BaseDTO; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * 描述 * * @author jfatty on 2020/4/12 * @email jfatty@163.com */ @Data public class IconPictureDTO<T extends BaseDTO> extends BaseDTO { /** * 主键ID页面页面标识唯一 */ @ApiModelProperty(name = "id", position = 0, value = "主键ID编号[添加操作可不传递,修改必传]") private String id ; /** * 关联对象id */ @ApiModelProperty(name = "relationId", position = 2 , required = true, value = "关联对象id" ,example = "ASWS3332232322") private String relationId; /** * 规格,格式 PC MOBILE APP */ @ApiModelProperty(name = "specification", position = 2 , required = true, value = "规格,格式 PC MOBILE APP" ,example = "MOBILE" , allowableValues = "PC,PAD,MOBILE,APP") private String specification; /** * 菜单图标样式 */ @ApiModelProperty(name = "icon", position = 2 , value = "菜单图标样式" ,example = "iconimg" ) private String icon; /** * 导航激活状态图标路径 */ @ApiModelProperty(name = "actIcon", position = 2 , value = "导航激活状态图标路径" ,example = "actimg" ) private String actIcon; /** * 备注或者描述 */ @ApiModelProperty(name = "description", position = 7 , value = "备注或者描述" ,example = "这是描述") private String description; /** * 使用状态 */ @ApiModelProperty(name = "state", position = 8 ,required = true, value = "使用状态" ,example = "1",allowableValues = "1,0") private Integer state; /** * 域值 */ @ApiModelProperty(name = "realm", position = 12 , value = "域值" ) private String realm; }
[ "zealsoft#yeah.net" ]
zealsoft#yeah.net
bc7f7205dabde9db542c2b39eb61c52d39c13c7d
1420ba90b0617caef56cd4dbb385b22924f001eb
/tour-android/app/src/main/java/cn/xmzt/www/bean/InvoiceTitleBean.java
49c00f60d4ad13c0035c535079af13668600676b
[]
no_license
similar718/tour_p
7a4dbf5267b2bb119887791b0a09416ac6071642
2bb766983fe397c90437608a3dbee482ffda7ad0
refs/heads/master
2020-11-26T06:32:22.172843
2019-12-20T03:30:59
2019-12-20T03:30:59
228,989,138
0
0
null
null
null
null
UTF-8
Java
false
false
4,091
java
package cn.xmzt.www.bean; import java.io.Serializable; public class InvoiceTitleBean implements Serializable { private String bankCount;//银行账号 private String depositBank;//开户银行 private String dutyParagraph;//税号 private String gmtCreate;//创建时间 private int gmtCreator;//创建人 private String gmtModified;//最后修改时间 private int gmtModifiedId;//最后修改人ID private int id;//发票抬头id private String registrationAddress;//注册地址 private String registrationPhone;//注册电话 private int state;//状态(0:正常,1:删除) private String titleName;//抬头名称 private int titleType;//抬头类型(1:公司,2:个人) private int userId;//用户ID private boolean isSelect;//是否选中 public String getBankCount() { if(bankCount==null){ return ""; } return bankCount; } public void setBankCount(String bankCount) { this.bankCount = bankCount; } public String getDepositBank() { if(depositBank==null){ return ""; } return depositBank; } public void setDepositBank(String depositBank) { this.depositBank = depositBank; } public String getDutyParagraph() { if(dutyParagraph==null){ return ""; } return dutyParagraph; } public String getDutyParagraphStr() { return "税号:"+dutyParagraph; } public void setDutyParagraph(String dutyParagraph) { this.dutyParagraph = dutyParagraph; } public String getGmtCreate() { return gmtCreate; } public void setGmtCreate(String gmtCreate) { this.gmtCreate = gmtCreate; } public int getGmtCreator() { return gmtCreator; } public void setGmtCreator(int gmtCreator) { this.gmtCreator = gmtCreator; } public String getGmtModified() { return gmtModified; } public void setGmtModified(String gmtModified) { this.gmtModified = gmtModified; } public int getGmtModifiedId() { return gmtModifiedId; } public void setGmtModifiedId(int gmtModifiedId) { this.gmtModifiedId = gmtModifiedId; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getRegistrationAddress() { if(registrationAddress==null){ return ""; } return registrationAddress; } public void setRegistrationAddress(String registrationAddress) { this.registrationAddress = registrationAddress; } public String getRegistrationPhone() { if(registrationPhone==null){ return ""; } return registrationPhone; } public void setRegistrationPhone(String registrationPhone) { this.registrationPhone = registrationPhone; } public int getState() { return state; } public void setState(int state) { this.state = state; } public String getTitleName() { if(titleName==null){ return ""; } return titleName; } public void setTitleName(String titleName) { this.titleName = titleName; } public int getTitleType() { return titleType; } public void setTitleType(int titleType) { this.titleType = titleType; } public String getTitleTypeName() { if(titleType==1){//抬头类型(1:公司,2:个人) return "公司"; }else { return "个人"; } } public int getUserId() { return userId; } public void setUserId(int userId) { this.userId = userId; } public boolean isSelect() { return isSelect; } public void setSelect(boolean select) { isSelect = select; } }
[ "1170214556@qq.com" ]
1170214556@qq.com
75aba6d87183692efdd5c320db300c869a7d9ae7
a90a7bfc49b5fe3533857383d3e7e5407fe03f82
/xconf-angular-admin/src/test/java/com/comcast/xconf/admin/controller/shared/ChangeLogControllerTest.java
28e8dde1eb86789c095105d510cb8f3db0315e1f
[ "MIT", "Apache-2.0" ]
permissive
comcast-icfar/xconfserver
d8406f4d3baffd511ec386bef9b6c31e65943e63
a13989e16510c734d13a1575f992f8eacca8250b
refs/heads/main
2023-01-11T19:40:56.417261
2020-11-17T20:22:37
2020-11-17T20:22:37
308,412,315
0
1
NOASSERTION
2020-11-18T16:48:16
2020-10-29T18:11:58
Java
UTF-8
Java
false
false
3,256
java
/******************************************************************************* * If not stated otherwise in this file or this component's Licenses.txt file the * following copyright and licenses apply: * * Copyright 2018 RDK Management * * 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.comcast.xconf.admin.controller.shared; import com.comcast.apps.dataaccess.cache.dao.impl.TwoKeys; import com.comcast.xconf.CfNames; import com.comcast.xconf.GenericNamespacedList; import com.comcast.xconf.GenericNamespacedListTypes; import com.comcast.xconf.admin.controller.BaseControllerTest; import com.fasterxml.jackson.core.type.TypeReference; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.springframework.http.MediaType; import org.springframework.mock.web.MockHttpServletResponse; import java.util.List; import java.util.Map; import java.util.UUID; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; public class ChangeLogControllerTest extends BaseControllerTest { @After @Before public void cleanData() { Iterable<TwoKeys<Long, UUID>> keys = changeLogDao.getKeys(); for (TwoKeys<Long, UUID> key : keys) { changeLogDao.deleteOne(key.getKey(), key.getKey2()); } } @Test public void testGetChangeLog() throws Exception { GenericNamespacedList macList = createMacList(); if (genericNamespacedListQueriesService.getOneByType(macList.getId(), GenericNamespacedListTypes.MAC_LIST) != null) { genericNamespacedListQueriesService.updateNamespacedList(macList, GenericNamespacedListTypes.MAC_LIST); } else { genericNamespacedListQueriesService.createNamespacedList(macList, GenericNamespacedListTypes.MAC_LIST); } MockHttpServletResponse response = mockMvc.perform(get("/" + ChangeLogController.URL_MAPPING) .contentType(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()).andReturn().getResponse(); Map<Long, List<ChangeLogController.Change>> changelog = mapper.readValue(response.getContentAsString(), new TypeReference<Map<Long, List<ChangeLogController.Change>>>(){}); for (List<ChangeLogController.Change> changes : changelog.values()) { for (ChangeLogController.Change change : changes) { Assert.assertEquals(CfNames.Common.GENERIC_NS_LIST, change.getCfName()); } } } }
[ "Gabriel_DeJesus@cable.comcast.com" ]
Gabriel_DeJesus@cable.comcast.com
3397a296a522d5d00e32c423befba4e26bf2ada1
7b6a50d88ecbed537945d1c3d12907777e0faa6f
/SelfishConfigurator/src/main/java/com/example/SelfishConfigurator/rest/MapUserRoleEndpoint.java
5792bc9f17d7c8e94ec855720eff66d431218347
[]
no_license
amitjoy/other-java
580010ec90c75cdf979ec1a200c68f6222641dd3
3021756fefbb23d78bac641c9e68997621d86d97
refs/heads/master
2021-01-10T13:44:59.824289
2015-11-02T09:34:40
2015-11-02T09:34:40
45,385,019
0
0
null
null
null
null
UTF-8
Java
false
false
2,082
java
package com.example.SelfishConfigurator.rest; import java.util.List; import javax.ejb.Stateless; import javax.ejb.TransactionAttribute; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.PersistenceContextType; import javax.ws.rs.*; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; import javax.ws.rs.core.UriBuilder; import com.example.SelfishConfigurator.model.MapUserRole; /** * */ @Stateless @Path("/mapuserroles") public class MapUserRoleEndpoint { @PersistenceContext private EntityManager em; @POST @Consumes("application/xml") public Response create(MapUserRole entity) { em.persist(entity); return Response.created(UriBuilder.fromResource(MapUserRoleEndpoint.class).path(String.valueOf(entity.getId())).build()).build(); } @DELETE @Path("/{id:[0-9][0-9]*}") public Response deleteById(@PathParam("id") Long id) { MapUserRole entity = em.find(MapUserRole.class, id); if (entity == null) { return Response.status(Status.NOT_FOUND).build(); } em.remove(entity); return Response.noContent().build(); } @GET @Path("/{id:[0-9][0-9]*}") @Produces("application/xml") public Response findById(@PathParam("id") Long id) { MapUserRole entity = em.find(MapUserRole.class, id); if (entity == null) { return Response.status(Status.NOT_FOUND).build(); } return Response.ok(entity).build(); } @GET @Produces("application/xml") public List<MapUserRole> listAll() { final List<MapUserRole> results = em.createQuery("FROM MapUserRole", MapUserRole.class).getResultList(); return results; } @PUT @Path("/{id:[0-9][0-9]*}") @Consumes("application/xml") public Response update(@PathParam("id") Long id, MapUserRole entity) { entity.setId(id); entity = em.merge(entity); return Response.noContent().build(); } }
[ "admin@amitinside.com" ]
admin@amitinside.com
b4fc2d06cb015b6aca1d4a7e25d5852eb87b47cc
9c04f7087ee689ec0d21ccad1210acda85f310be
/20170523/UsingListView/app/src/main/java/top/yunp/usinglistview/MyAdapterViewHolder.java
f4a5f29cc3e2a045d708e264daf41c2ccd9a555c
[]
no_license
plter/AndroidLesson20170425
69b167dc4c38e4f9cc3cf256859f439be8150ceb
aec195511d36a5d971743301be88f5a35dd29bb3
refs/heads/master
2021-01-20T01:38:01.909702
2017-07-27T01:01:48
2017-07-27T01:01:48
89,308,412
1
4
null
null
null
null
UTF-8
Java
false
false
444
java
package top.yunp.usinglistview; import android.widget.TextView; /** * Created by plter on 5/23/17. */ public class MyAdapterViewHolder { private TextView tvName,tvDesc; public MyAdapterViewHolder(TextView tvName, TextView tvDesc) { this.tvName = tvName; this.tvDesc = tvDesc; } public TextView getTvName() { return tvName; } public TextView getTvDesc() { return tvDesc; } }
[ "xtiqin@163.com" ]
xtiqin@163.com
101cf95f3c962e894be9266f0579df7298735b45
b77e8aa9585af1e819f861fcb4731cd2924fd380
/httpclient/src/test/java/org/ccci/gto/globalreg/httpclient/HttpClientGlobalRegistryClientIT.java
faf75e35558ba2beb7900ea4414670d8e74bce70
[]
no_license
GlobalTechnology/global-registry-java-client
42b6d55db9dab05ed4174ac370778379ccfa4936
601f78565da97be640e605bb5e20e633b26c19ab
refs/heads/master
2022-11-24T10:05:47.230884
2019-05-29T00:01:58
2019-05-29T00:01:58
19,249,464
0
0
null
2022-11-16T12:22:15
2014-04-28T18:33:04
Java
UTF-8
Java
false
false
370
java
package org.ccci.gto.globalreg.httpclient; import org.ccci.gto.globalreg.BaseGlobalRegistryClient; import org.ccci.gto.globalreg.BaseGlobalRegistryClientIT; public class HttpClientGlobalRegistryClientIT extends BaseGlobalRegistryClientIT { @Override protected BaseGlobalRegistryClient newClient() { return new HttpClientGlobalRegistryClient(); } }
[ "daniel.frett@ccci.org" ]
daniel.frett@ccci.org
e7cde5899f4ebf4f1886b3b5332461e85d413cf4
d5f09c7b0e954cd20dd613af600afd91b039c48a
/sources/com/coolapk/market/view/collectionList/CollectionSelectActivity$onPageChangeListener$1.java
21a59be8af6e4b8b7c27659f539f5d593c688f68
[]
no_license
t0HiiBwn/CoolapkRelease
af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3
a6a2b03e32cde0e5163016e0078391271a8d33ab
refs/heads/main
2022-07-29T23:28:35.867734
2021-03-26T11:41:18
2021-03-26T11:41:18
345,290,891
5
2
null
null
null
null
UTF-8
Java
false
false
3,463
java
package com.coolapk.market.view.collectionList; import androidx.fragment.app.Fragment; import androidx.viewpager.widget.ViewPager; import com.coolapk.market.app.InitBehavior; import com.coolapk.market.util.LogUtils; import com.coolapk.market.widget.slidr.ScrollStateViewPager; import java.util.LinkedHashMap; import kotlin.Metadata; import kotlin.jvm.internal.Intrinsics; @Metadata(bv = {1, 0, 3}, d1 = {"\u0000!\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\u0007\n\u0002\b\u0003*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\u0010\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u0005H\u0016J \u0010\u0006\u001a\u00020\u00032\u0006\u0010\u0007\u001a\u00020\u00052\u0006\u0010\b\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u0005H\u0016J\u0010\u0010\u000b\u001a\u00020\u00032\u0006\u0010\u0007\u001a\u00020\u0005H\u0016¨\u0006\f"}, d2 = {"com/coolapk/market/view/collectionList/CollectionSelectActivity$onPageChangeListener$1", "Landroidx/viewpager/widget/ViewPager$OnPageChangeListener;", "onPageScrollStateChanged", "", "state", "", "onPageScrolled", "position", "positionOffset", "", "positionOffsetPixels", "onPageSelected", "presentation_coolapkAppRelease"}, k = 1, mv = {1, 4, 2}) /* compiled from: CollectionSelectActivity.kt */ public final class CollectionSelectActivity$onPageChangeListener$1 implements ViewPager.OnPageChangeListener { final /* synthetic */ CollectionSelectActivity this$0; @Override // androidx.viewpager.widget.ViewPager.OnPageChangeListener public void onPageScrolled(int i, float f, int i2) { } /* JADX WARN: Incorrect args count in method signature: ()V */ CollectionSelectActivity$onPageChangeListener$1(CollectionSelectActivity collectionSelectActivity) { this.this$0 = collectionSelectActivity; } @Override // androidx.viewpager.widget.ViewPager.OnPageChangeListener public void onPageSelected(int i) { LinkedHashMap linkedHashMap = this.this$0.collectionMap; Intrinsics.checkNotNull(linkedHashMap); if (!linkedHashMap.isEmpty()) { LinkedHashMap linkedHashMap2 = this.this$0.collectionMap; Intrinsics.checkNotNull(linkedHashMap2); linkedHashMap2.clear(); } LinkedHashMap linkedHashMap3 = this.this$0.cancelMap; Intrinsics.checkNotNull(linkedHashMap3); if (!linkedHashMap3.isEmpty()) { LinkedHashMap linkedHashMap4 = this.this$0.cancelMap; Intrinsics.checkNotNull(linkedHashMap4); linkedHashMap4.clear(); } this.this$0.setPage(i); } @Override // androidx.viewpager.widget.ViewPager.OnPageChangeListener public void onPageScrollStateChanged(int i) { if (i == 0) { ScrollStateViewPager scrollStateViewPager = CollectionSelectActivity.access$getBinding$p(this.this$0).viewPager; Intrinsics.checkNotNullExpressionValue(scrollStateViewPager, "binding.viewPager"); Fragment viewPagerFragment = this.this$0.getViewPagerFragment(scrollStateViewPager.getCurrentItem()); if (viewPagerFragment.isVisible() && (viewPagerFragment instanceof InitBehavior)) { InitBehavior initBehavior = (InitBehavior) viewPagerFragment; LogUtils.v("Invoke %s's initData", initBehavior.getClass().getSimpleName()); initBehavior.initData(); } } } }
[ "test@gmail.com" ]
test@gmail.com
e28392e68341a1c25d6bf55a0fc7463f37214721
6500848c3661afda83a024f9792bc6e2e8e8a14e
/output/com.android.setupwizardlib.view.RichTextView.java
9684fb88b6eb9c8d35dc3edd93a5c8e66c5a902b
[]
no_license
enaawy/gproject
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
91cb88559c60ac741d4418658d0416f26722e789
refs/heads/master
2021-09-03T03:49:37.813805
2018-01-05T09:35:06
2018-01-05T09:35:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,542
java
package com.android.setupwizardlib.view; import android.content.Context; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.os.Build$VERSION; import android.support.v4.view.ai; import android.support.v4.widget.ae; import android.support.v7.widget.bg; import android.text.Annotation; import android.text.SpannableString; import android.text.Spanned; import android.text.method.LinkMovementMethod; import android.text.style.ClickableSpan; import android.text.style.TextAppearanceSpan; import android.util.AttributeSet; import android.util.Log; import android.view.MotionEvent; import android.widget.TextView$BufferType; import com.android.setupwizardlib.a.a; import com.android.setupwizardlib.a.c; import com.android.setupwizardlib.a.d; import com.android.setupwizardlib.b.a; public class RichTextView extends android.support.v7.widget.bg implements com.android.setupwizardlib.a.c { public com.android.setupwizardlib.b.a b; public com.android.setupwizardlib.a.c c; RichTextView(Context p0) { android.support.v7.widget.bg(p0); this.a(); } RichTextView(Context p0, AttributeSet p1) { android.support.v7.widget.bg(p0, p1); this.a(); } private final void a() { this.b = new com.android.setupwizardlib.b.a(this); android.support.v4.view.ai.a(this, this.b); } public final boolean a(com.android.setupwizardlib.a.a p0) { if (this.c != 0) v0 = this.c.a(p0); else v0 = 0; return v0; } protected boolean dispatchHoverEvent(MotionEvent p0) { if (this.b != 0) { if (this.b.f != 0) v0 = this.b.f.a(p0); else v0 = 0; if (v0 != 0) { v0 = 1; return v0; } } v0 = super.dispatchHoverEvent(p0); return v0; } protected void drawableStateChanged() { super.drawableStateChanged(); if (Build$VERSION.SDK_INT >= 17) { v2 = this.getCompoundDrawablesRelative(); v0 = 0; while (v0 < v2.length) { if (v2[v0] != 0) { if (v2[v0].setState(this.getDrawableState())) this.invalidateDrawable(v2[v0]); } v0 = v0 + 1; } } } public com.android.setupwizardlib.a.c getOnLinkClickListener() { return this.c; } public void setOnLinkClickListener(com.android.setupwizardlib.a.c p0) { this.c = p0; } public void setText(CharSequence p0, TextView$BufferType p1) { v4 = this.getContext(); if (!(p0 instanceof Spanned)) { v1 = p0; super.setText(v1, p1); if (v1 instanceof Spanned) { if (((ClickableSpan[])((Spanned)v1).getSpans(0, v1.length(), ClickableSpan)).length > 0) v0 = 1; else v0 = 0; } else v0 = 0; if (v0 != 0) this.setMovementMethod(LinkMovementMethod.getInstance()); else this.setMovementMethod(0); this.setFocusable(v0); return; } v1 = new SpannableString(p0); v0 = (Annotation[])v1.getSpans(0, v1.length(), Annotation); v3 = 0; while (v3 < v0.length) { v7 = v0[v3].getKey(); if ("textAppearance".equals(v7)) { v7 = v4.getResources().getIdentifier(v0[v3].getValue(), "style", v4.getPackageName()); if (v7 == 0) Log.w("RichTextView", 33 + "Cannot find resource: " + v7); com.android.setupwizardlib.a.d.a(v1, v0[v3], new TextAppearanceSpan(v4, v7)); } else if ("link".equals(v7)) { v0[v3].getValue(); com.android.setupwizardlib.a.d.a(v1, v0[v3], new com.android.setupwizardlib.a.a()); } v3 = v3 + 1; } super.setText(v1, p1); if (v1 instanceof Spanned) { if (((ClickableSpan[])((Spanned)v1).getSpans(0, v1.length(), ClickableSpan)).length > 0) v0 = 1; else v0 = 0; } else v0 = 0; if (v0 != 0) this.setMovementMethod(LinkMovementMethod.getInstance()); else this.setMovementMethod(0); this.setFocusable(v0); } }
[ "genius.ron@gmail.com" ]
genius.ron@gmail.com
f2ddd2f669b637281ebaebe16868f678486bc9d4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/24/24_6936f21c9210e7cfdc068d3395b6716fd3172b8a/MSP430f2617Config/24_6936f21c9210e7cfdc068d3395b6716fd3172b8a_MSP430f2617Config_s.java
6073145105c9b4fc5d1e8ad9d57e901ac6b26ccf
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,216
java
/** * Copyright (c) 2011, Swedish Institute of Computer Science. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the Institute nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * This file is part of MSPSim. * * * ----------------------------------------------------------------- * * Author : Joakim Eriksson */ package se.sics.mspsim.config; import java.util.ArrayList; import se.sics.mspsim.core.IOUnit; import se.sics.mspsim.core.MSP430Config; import se.sics.mspsim.core.MSP430Core; import se.sics.mspsim.core.Timer; import se.sics.mspsim.core.USCI; public class MSP430f2617Config extends MSP430Config { public MSP430f2617Config() { /* 32 vectors for the MSP430X series */ maxInterruptVector = 31; MSP430XArch = true; /* configuration for the timers */ TimerConfig timerA = new TimerConfig(25, 24, 3, 0x160, Timer.TIMER_Ax149, "TimerA"); TimerConfig timerB = new TimerConfig(29, 28, 7, 0x180, Timer.TIMER_Bx149, "TimerB"); timerConfig = new TimerConfig[] {timerA, timerB}; /* TX Vec, RX Vec, TX Bit, RX Bit, SFR-reg, Offset, Name, A?*/ UARTConfig uA0 = new UARTConfig(22, 23, 1, 0, 1, 0x60, "USCI A0", true); UARTConfig uB0 = new UARTConfig(22, 23, 3, 2, 1, 0x60, "USCI B0", false); UARTConfig uA1 = new UARTConfig(16, 17, 1, 0, 6, 0xD0, "USCI A1", true); UARTConfig uB1 = new UARTConfig(16, 17, 3, 2, 6, 0xD0, "USCI B1", false); uartConfig = new UARTConfig[] {uA0, uB0, uA1, uB1}; } public int setup(MSP430Core cpu, ArrayList<IOUnit> ioUnits) { USCI usciA0 = new USCI(cpu, 0, cpu.memory, this); USCI usciB0 = new USCI(cpu, 1, cpu.memory, this); USCI usciA1 = new USCI(cpu, 2, cpu.memory, this); USCI usciB1 = new USCI(cpu, 3, cpu.memory, this); for (int i = 0, n = 8; i < n; i++) { cpu.memOut[0x60 + i] = usciA0; cpu.memIn[0x60 + i] = usciA0; cpu.memOut[0x68 + i] = usciB0; cpu.memIn[0x68 + i] = usciB0; cpu.memOut[0xd0 + i] = usciA1; cpu.memIn[0xd0 + i] = usciA1; cpu.memOut[0xd8 + i] = usciB1; cpu.memIn[0xd8 + i] = usciB1; } ioUnits.add(usciA0); ioUnits.add(usciB0); ioUnits.add(usciA1); ioUnits.add(usciB1); /* usciA1 handles interrupts for both usciA1 and B1 */ cpu.memOut[6] = usciA1; cpu.memIn[6] = usciA1; cpu.memOut[7] = usciA1; cpu.memIn[7] = usciA1; /* 4 usci units */ return 4; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
75326fcf54a4b279bd105ae0bd6181d2e7a314bb
1f268ea50698d7b48c6ea2fe35a6e2a56d5dd6f5
/pml_api/lib/Jena-2.5.6/src/com/hp/hpl/jena/db/impl/DBBulkUpdateHandler.java
04572a2222a53eab20820509dd8df5a6688bbc13
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
paulopinheiro1234/inference-web
ece8dcb2aa383120f0557655c403c6216fb086c3
6b1fe6c500e4904ece40dcd01b704f0a9ac0c672
refs/heads/master
2020-04-15T20:45:00.864333
2019-01-10T07:19:43
2019-01-10T07:19:43
165,006,572
0
0
null
null
null
null
UTF-8
Java
false
false
6,940
java
/* (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP [See end of file] $Id: DBBulkUpdateHandler.java,v 1.23 2008/01/02 12:08:25 andy_seaborne Exp $ */ package com.hp.hpl.jena.db.impl; import java.util.*; import com.hp.hpl.jena.graph.*; import com.hp.hpl.jena.util.IteratorCollection; import com.hp.hpl.jena.util.iterator.ExtendedIterator; import com.hp.hpl.jena.graph.impl.*; import com.hp.hpl.jena.db.*; /** An implementation of the bulk update interface. Updated by kers to permit event handling for bulk updates. @author csayers based on SimpleBulkUpdateHandler by kers @version $Revision: 1.23 $ */ public class DBBulkUpdateHandler implements BulkUpdateHandler { private GraphRDB graph; private GraphEventManager manager; protected static int CHUNK_SIZE = 50; public DBBulkUpdateHandler(GraphRDB graph) { this.graph = graph; this.manager = graph.getEventManager(); } /** add a list of triples to the graph; the add is done as a list with notify off, and then the array-notify invoked. */ public void add(Triple[] triples) { add( Arrays.asList(triples), false ); manager.notifyAddArray( graph, triples ); } public void add( List triples ) { add( triples, true ); } /** add a list of triples to the graph, notifying only if requested. */ protected void add( List triples, boolean notify ) { graph.add(triples); if (notify) manager.notifyAddList( graph, triples ); } /** Add the [elements of the] iterator to the graph. Complications arise because we wish to avoid duplicating the iterator if there are no listeners; otherwise we have to read the entire iterator into a list and use add(List) with notification turned off. @see com.hp.hpl.jena.graph.BulkUpdateHandler#add(java.util.Iterator) */ public void add(Iterator it) { if (manager.listening()) { List L = IteratorCollection.iteratorToList( it ); add( L, false ); manager.notifyAddIterator( graph, L ); } else addIterator( it ); } protected void addIterator( Iterator it ) { ArrayList list = new ArrayList(CHUNK_SIZE); while (it.hasNext()) { while (it.hasNext() && list.size() < CHUNK_SIZE) { list.add( it.next() ); } graph.add(list); list.clear(); } } public void add( Graph g ) { add( g, false ); } public void add( Graph g, boolean withReifications ) { ExtendedIterator triplesToAdd = GraphUtil.findAll( g ); try { addIterator( triplesToAdd ); } finally { triplesToAdd.close(); } if (withReifications) SimpleBulkUpdateHandler.addReifications( graph, g ); manager.notifyAddGraph( graph, g ); } /** remove a list of triples from the graph; the remove is done as a list with notify off, and then the array-notify invoked. */ public void delete( Triple[] triples ) { delete( Arrays.asList(triples), false ); manager.notifyDeleteArray( graph, triples ); } public void delete( List triples ) { delete( triples, true ); } /** Add a list of triples to the graph, notifying only if requested. */ protected void delete(List triples, boolean notify ) { graph.delete( triples ); if (notify) manager.notifyDeleteList( graph, triples ); } /** Delete the [elements of the] iterator from the graph. Complications arise because we wish to avoid duplicating the iterator if there are no listeners; otherwise we have to read the entire iterator into a list and use delete(List) with notification turned off. @see com.hp.hpl.jena.graph.BulkUpdateHandler#add(java.util.Iterator) */ public void delete(Iterator it) { if (manager.listening()) { List L = IteratorCollection.iteratorToList( it ); delete( L, false ); manager.notifyDeleteIterator( graph, L ); } else deleteIterator( it ); } protected void deleteIterator(Iterator it) { ArrayList list = new ArrayList(CHUNK_SIZE); while (it.hasNext()) { while (it.hasNext() && list.size() < CHUNK_SIZE) { list.add(it.next()); } graph.delete(list); list.clear(); } } public void delete(Graph g) { delete( g, false ); } public void delete( Graph g, boolean withReifications ) { ExtendedIterator triplesToDelete = GraphUtil.findAll( g ); try { deleteIterator( triplesToDelete ); } finally { triplesToDelete.close(); } if (withReifications) SimpleBulkUpdateHandler.deleteReifications( graph, g ); manager.notifyDeleteGraph( graph, g ); } public void removeAll() { graph.clear(); manager.notifyEvent( graph, GraphEvents.removeAll ); } public void remove( Node s, Node p, Node o ) { SimpleBulkUpdateHandler.removeAll( graph, s, p, o ); manager.notifyEvent( graph, GraphEvents.remove( s, p, o ) ); } } /* (c) Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP 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 name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR 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. */
[ "pp3223@gmail.com" ]
pp3223@gmail.com
ed6383dc39e8339c8564a303509a2b257a4a74c2
03c3183545348ca45907062df5224f2355436a6c
/client/main/src/main/java/io/github/hohwille/skate/client/place/profile/SkillProfileController.java
69af2c9a6a64a28c7e3868d63e0413a01a83a22f
[ "Apache-2.0" ]
permissive
hohwille/skate
990b2f72ce1913ceb209cdd00bf0a8f1d3b84a0c
e6bfdb51111aca6b6f6270510e7ac385b9f8cdd3
refs/heads/master
2023-01-09T23:52:29.889185
2020-11-10T08:05:17
2020-11-10T08:05:17
284,423,858
0
0
null
null
null
null
UTF-8
Java
false
false
950
java
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 */ package io.github.hohwille.skate.client.place.profile; import io.github.mmm.ui.api.controller.UiEmbedding; import io.github.mmm.ui.api.controller.UiPlace; import io.github.mmm.ui.spi.controller.AbstractUiController; /** * {@link AbstractUiController Controller} for {@link SkillProfileView}. */ public class SkillProfileController extends AbstractUiController<SkillProfileView> { /** @see #getId() */ public static final String ID = ID_HOME; /** * The constructor. */ public SkillProfileController() { super(); } @Override public String getId() { return ID; } @Override protected SkillProfileView createView() { return new SkillProfileView(); } @Override protected UiEmbedding doShow(UiPlace newPlace, UiEmbedding newSlot) { return UiEmbedding.CONTENT; } }
[ "hohwille@users.sourceforge.net" ]
hohwille@users.sourceforge.net
755c36b10f2db115202acb89f7b60a420a2c7d57
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/appbrand/jsapi/nfc/rw/logic/g$$ExternalSyntheticLambda5.java
6a7742cde040dffc7afa910b1d7388b1c55e465f
[]
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
396
java
package com.tencent.mm.plugin.appbrand.jsapi.nfc.rw.logic; public final class g$$ExternalSyntheticLambda5 implements Runnable { public final void run() {} } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes2.jar * Qualified Name: com.tencent.mm.plugin.appbrand.jsapi.nfc.rw.logic.g..ExternalSyntheticLambda5 * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
71ee6d0acc15bbcec6778b24bd4a0ed9f5df7451
2d659a53f1b1ea4472737691b80ad9354f1e4db4
/android/support/v4/widget/C0124y.java
c1674c64c29519f5eb128884ec5558107d2f8e7b
[]
no_license
sydneyli/bylock_src
52117e0e419f4d57f352547c5e5c597228247a93
226d54fdafb14dfd3bab48c1a343c83a5544e060
refs/heads/master
2021-04-29T18:11:57.792778
2018-02-15T23:05:02
2018-02-15T23:05:02
121,687,542
0
0
null
null
null
null
UTF-8
Java
false
false
1,038
java
package android.support.v4.widget; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Paint; import android.util.AttributeSet; import android.view.ViewGroup.LayoutParams; import android.view.ViewGroup.MarginLayoutParams; /* compiled from: MyApp */ public class C0124y extends MarginLayoutParams { private static final int[] f443e = new int[]{16843137}; public float f444a = 0.0f; boolean f445b; boolean f446c; Paint f447d; public C0124y() { super(-1, -1); } public C0124y(LayoutParams layoutParams) { super(layoutParams); } public C0124y(MarginLayoutParams marginLayoutParams) { super(marginLayoutParams); } public C0124y(Context context, AttributeSet attributeSet) { super(context, attributeSet); TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, f443e); this.f444a = obtainStyledAttributes.getFloat(0, 0.0f); obtainStyledAttributes.recycle(); } }
[ "sydney@eff.org" ]
sydney@eff.org
3094a6816a7b12c53adbb448350b62112e5aa756
d1c42e9bc4cea78cd34a1467b75d3f4d8be9112b
/src/main/java/tests2/sw/TextObjet.java
f71edeb05c1facb7d07d2777492afeb619171db0
[]
no_license
manuelddahmen/empty3-library
6e52e1fd4bcea7f14c9b6dbf721b46cc2bd078d3
dd8f975efebbcb3333b6723c6e7d2ac78db58de7
refs/heads/main
2023-02-23T06:32:05.095115
2021-01-31T07:05:47
2021-01-31T07:05:47
334,486,874
0
0
null
null
null
null
UTF-8
Java
false
false
1,714
java
package tests2.sw; import one.empty3.library.ECBufferedImage; import one.empty3.library.Point3D; import one.empty3.library.TextureCol; import one.empty3.library.TextureImg; import one.empty3.library.core.tribase.Plan3D; import java.awt.*; import java.awt.image.BufferedImage; /*__ * Created by Win on 16-01-16. */ public class TextObjet extends Plan3D { private Point3D orig; private Point3D x2Vect; private Point3D y2Vect; private Color texTextureCol; private ECBufferedImage prerenderedImg; private String textString; public TextObjet(Point3D orig, Point3D x2Vect, Point3D y2Vect) { this.pointOrigine(orig); this.pointXExtremite(orig.plus(x2Vect)); this.pointYExtremite(orig.plus(y2Vect)); TextureCol c = new TextureCol(Color.BLACK); texture(c); } public Color texTextureCol() { return texTextureCol; } public void setTexTextureCol(Color color) { this.texTextureCol = color; } public void setText(String txt) { this.textString = txt; prerenderedImg = new ECBufferedImage(new BufferedImage(1920, 1080 / 5 * textString.length(), BufferedImage.TYPE_INT_ARGB)); Graphics prerenderedImgGraphics = prerenderedImg.getGraphics(); prerenderedImgGraphics.setColor(texTextureCol); prerenderedImgGraphics.drawString(txt, 0, 0); texture(new TextureImg(prerenderedImg)); } public void deplace(Point3D point3D) { this.pointOrigine(this.pointOrigine().plus(point3D.getX())); this.pointXExtremite(this.pointXExtremite().plus(point3D.getY())); this.pointYExtremite(this.pointYExtremite().plus(point3D.getY())); } }
[ "manuel.dahmen@gmx.com" ]
manuel.dahmen@gmx.com
ea781a889ba1b3b6d4fed90724a52048b17fb33e
d883f3b07e5a19ff8c6eb9c3a4b03d9f910f27b2
/Rules/SandataComplianceRules/src/main/java/com/sandata/rules/compliance/domain/StaffComplianceFact.java
b63524ec6fca0980c00e7c380153b8cf7d5496d9
[]
no_license
dev0psunleashed/Sandata_SampleDemo
ec2c1f79988e129a21c6ddf376ac572485843b04
a1818601c59b04e505e45e33a36e98a27a69bc39
refs/heads/master
2021-01-25T12:31:30.026326
2017-02-20T11:49:37
2017-02-20T11:49:37
82,551,409
0
0
null
null
null
null
UTF-8
Java
false
false
2,347
java
package com.sandata.rules.compliance.domain; import com.sandata.lab.data.model.base.BaseObject; import java.util.Date; /** * Represents fact for a Staff compliance result. * * @author jasonscott */ public class StaffComplianceFact extends BaseObject { private static final long serialVersionUID = 1L; private String staffId; private String businessEntityId; private String complianceCode; private BusinessEntityComplianceType businessEntityComplianceType; private String complianceResultReadingValue; private Date receivedDate; private Date expirationDate; private boolean continueEvaluation; public String getStaffId() { return staffId; } public void setStaffId(String staffId) { this.staffId = staffId; } public String getBusinessEntityId() { return businessEntityId; } public void setBusinessEntityId(String businessEntityId) { this.businessEntityId = businessEntityId; } public String getComplianceCode() { return complianceCode; } public void setComplianceCode(String complianceCode) { this.complianceCode = complianceCode; } public BusinessEntityComplianceType getBusinessEntityComplianceType() { return businessEntityComplianceType; } public void setBusinessEntityComplianceType(BusinessEntityComplianceType businessEntityComplianceType) { this.businessEntityComplianceType = businessEntityComplianceType; } public String getComplianceResultReadingValue() { return complianceResultReadingValue; } public void setComplianceResultReadingValue(String complianceResultReadingValue) { this.complianceResultReadingValue = complianceResultReadingValue; } public Date getReceivedDate() { return receivedDate; } public void setReceivedDate(Date receivedDate) { this.receivedDate = receivedDate; } public Date getExpirationDate() { return expirationDate; } public void setExpirationDate(Date expirationDate) { this.expirationDate = expirationDate; } public boolean isContinueEvaluation() { return continueEvaluation; } public void setContinueEvaluation(boolean continueEvaluation) { this.continueEvaluation = continueEvaluation; } }
[ "pradeep.ganesh@softcrylic.co.in" ]
pradeep.ganesh@softcrylic.co.in
67e25519d858da9f79e5860ec64b4d77d98f987e
ab9ef3010a4a6f4fa059bb9fb2516cb0c7205bf4
/gulimall-product/src/main/java/com/syong/gulimall/product/service/CategoryBrandRelationService.java
f848e092ee6c705686141154bc88696ba5af4877
[ "Apache-2.0" ]
permissive
ChangGeZheLi/gulimall
4ce5163beca92c81b1d5198cd222d26d60d4bed6
d5a3d5c85dcfb69890be8d38a968ee9657a1dede
refs/heads/main
2023-05-30T17:07:25.709294
2021-06-26T02:17:41
2021-06-26T02:17:41
356,811,879
0
0
null
null
null
null
UTF-8
Java
false
false
799
java
package com.syong.gulimall.product.service; import com.baomidou.mybatisplus.extension.service.IService; import com.syong.common.utils.PageUtils; import com.syong.gulimall.product.entity.BrandEntity; import com.syong.gulimall.product.entity.CategoryBrandRelationEntity; import java.util.List; import java.util.Map; /** * 品牌分类关联 * * @author syong * @email syong@gmail.com * @date 2021-04-12 11:52:17 */ public interface CategoryBrandRelationService extends IService<CategoryBrandRelationEntity> { PageUtils queryPage(Map<String, Object> params); void saveDetail(CategoryBrandRelationEntity categoryBrandRelation); void updateBrand(Long brandId, String name); void updateCategory(Long catId, String name); List<BrandEntity> getBrandByCatId(Long catId); }
[ "admin" ]
admin
072bb1e041329bac701c90ed696e684edb83016b
d5f09c7b0e954cd20dd613af600afd91b039c48a
/sources/com/sina/weibo/sdk/network/base/WbResponse.java
4992ba500585e8f885ad9c1d93b981e5f6b7fa6a
[]
no_license
t0HiiBwn/CoolapkRelease
af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3
a6a2b03e32cde0e5163016e0078391271a8d33ab
refs/heads/main
2022-07-29T23:28:35.867734
2021-03-26T11:41:18
2021-03-26T11:41:18
345,290,891
5
2
null
null
null
null
UTF-8
Java
false
false
551
java
package com.sina.weibo.sdk.network.base; public class WbResponse { private WbResponseBody responseBody; private int resultCode = 200; public WbResponse(WbResponseBody wbResponseBody) { this.responseBody = wbResponseBody; } public WbResponse(WbResponseBody wbResponseBody, int i) { this.responseBody = wbResponseBody; this.resultCode = i; } public WbResponseBody body() { return this.responseBody; } public boolean isSuccessful() { return this.resultCode == 200; } }
[ "test@gmail.com" ]
test@gmail.com
6fac920bd252a26a92aabe61d365cf8ba6f3150d
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/eclipsejdt_cluster/65403/tar_1.java
f549cf8379344d84dc5c0f05ec19989d31c0e339
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,412
java
/******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation 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 * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.jdt.core.tests.compiler.regression; import java.util.ArrayList; import org.eclipse.jdt.core.tests.junit.extension.TestCase; import org.eclipse.jdt.core.tests.util.AbstractCompilerTest; import junit.framework.Test; import junit.framework.TestSuite; /** * Run all compiler regression tests */ public class TestAll extends junit.framework.TestCase { public TestAll(String testName) { super(testName); } public static Test suite() { ArrayList standardTests = new ArrayList(); // standardTests.addAll(JavadocTest.allTestClasses); standardTests.add(ArrayTest.class); standardTests.add(AssignmentTest.class); standardTests.add(BooleanTest.class); standardTests.add(CastTest.class); standardTests.add(ClassFileComparatorTest.class); standardTests.add(CollisionCase.class); standardTests.add(ConstantTest.class); standardTests.add(DeprecatedTest.class); standardTests.add(LocalVariableTest.class); standardTests.add(LookupTest.class); standardTests.add(NumericTest.class); standardTests.add(ProblemConstructorTest.class); standardTests.add(ScannerTest.class); standardTests.add(SwitchTest.class); standardTests.add(TryStatementTest.class); standardTests.add(UtilTest.class); standardTests.add(XLargeTest.class); standardTests.add(InternalScannerTest.class); standardTests.add(ConditionalExpressionTest.class); standardTests.add(ExternalizeStringLiteralsTest.class); standardTests.add(NonFatalErrorTest.class); standardTests.add(FlowAnalysisTest.class); standardTests.add(CharOperationTest.class); standardTests.add(RuntimeTests.class); standardTests.add(DebugAttributeTest.class); standardTests.add(NullReferenceTest.class); standardTests.add(CompilerInvocationTests.class); standardTests.add(InnerEmulationTest.class); standardTests.add(SuperTypeTest.class); // add all javadoc tests for (int i=0, l=JavadocTest.ALL_CLASSES.size(); i<l; i++) { standardTests.add(JavadocTest.ALL_CLASSES.get(i)); } TestSuite all = new TestSuite(TestAll.class.getName()); int possibleComplianceLevels = AbstractCompilerTest.getPossibleComplianceLevels(); if ((possibleComplianceLevels & AbstractCompilerTest.F_1_3) != 0) { ArrayList tests_1_3 = (ArrayList)standardTests.clone(); tests_1_3.add(Compliance_1_3.class); tests_1_3.add(JavadocTest_1_3.class); // Reset forgotten subsets tests TestCase.TESTS_PREFIX = null; TestCase.TESTS_NAMES = null; TestCase.TESTS_NUMBERS= null; TestCase.TESTS_RANGE = null; TestCase.RUN_ONLY_ID = null; all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_3, tests_1_3)); } if ((possibleComplianceLevels & AbstractCompilerTest.F_1_4) != 0) { ArrayList tests_1_4 = (ArrayList)standardTests.clone(); tests_1_4.add(AssertionTest.class); tests_1_4.add(Compliance_1_4.class); tests_1_4.add(ClassFileReaderTest_1_4.class); tests_1_4.add(JavadocTest_1_4.class); // Reset forgotten subsets tests TestCase.TESTS_PREFIX = null; TestCase.TESTS_NAMES = null; TestCase.TESTS_NUMBERS= null; TestCase.TESTS_RANGE = null; TestCase.RUN_ONLY_ID = null; all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_4, tests_1_4)); } if ((possibleComplianceLevels & AbstractCompilerTest.F_1_5) != 0) { ArrayList tests_1_5 = (ArrayList)standardTests.clone(); tests_1_5.addAll(RunComparableTests.ALL_CLASSES); tests_1_5.add(AssertionTest.class); tests_1_5.add(ClassFileReaderTest_1_5.class); tests_1_5.add(GenericTypeSignatureTest.class); tests_1_5.add(InternalHexFloatTest.class); tests_1_5.add(JavadocTest_1_5.class); tests_1_5.add(BatchCompilerTest.class); tests_1_5.add(ExternalizeStringLiterals15Test.class); // Reset forgotten subsets tests TestCase.TESTS_PREFIX = null; TestCase.TESTS_NAMES = null; TestCase.TESTS_NUMBERS= null; TestCase.TESTS_RANGE = null; TestCase.RUN_ONLY_ID = null; all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_5, tests_1_5)); } if ((possibleComplianceLevels & AbstractCompilerTest.F_1_6) != 0) { ArrayList tests_1_6 = (ArrayList)standardTests.clone(); tests_1_6.addAll(RunComparableTests.ALL_CLASSES); tests_1_6.add(AssertionTest.class); tests_1_6.add(ClassFileReaderTest_1_5.class); tests_1_6.add(GenericTypeSignatureTest.class); tests_1_6.add(InternalHexFloatTest.class); tests_1_6.add(JavadocTest_1_5.class); tests_1_6.add(BatchCompilerTest.class); tests_1_6.add(ExternalizeStringLiterals15Test.class); tests_1_6.add(StackMapAttributeTest.class); // Reset forgotten subsets tests TestCase.TESTS_PREFIX = null; TestCase.TESTS_NAMES = null; TestCase.TESTS_NUMBERS= null; TestCase.TESTS_RANGE = null; TestCase.RUN_ONLY_ID = null; all.addTest(AbstractCompilerTest.buildComplianceTestSuite(AbstractCompilerTest.COMPLIANCE_1_6, tests_1_6)); } return all; } }
[ "375833274@qq.com" ]
375833274@qq.com
586e3862623bb67b0b83cd92d82044adb2623b4e
4fff4285330949b773e0b615484fb9c4562ff2cd
/vc-frm/vc-frm-token/src/main/java/com/ccclubs/jwt/JwtUser.java
175e6cf73816df9e1dd1f8b4914cab6716bf535e
[ "Apache-2.0" ]
permissive
soldiers1989/project-2
de21398f32f0e468e752381b99167223420728d5
dc670d7ba700887d951287ec7ff4a7db90ad9f8f
refs/heads/master
2020-03-29T08:48:58.549798
2018-07-24T03:28:08
2018-07-24T03:28:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,601
java
package com.ccclubs.jwt; import com.fasterxml.jackson.annotation.JsonIgnore; import java.io.Serializable; import java.util.Collection; import java.util.Date; /** * Created by Alban */ public abstract class JwtUser implements Serializable{ private static final long serialVersionUID = 7360294571399953200L; private final Long id; private final String username; private final boolean enabled; private final Date lastPasswordResetDate; private String token; public JwtUser( Long id, String username, boolean enabled, Date lastPasswordResetDate ) { this.id = id; this.username = username; this.enabled = enabled; this.lastPasswordResetDate = lastPasswordResetDate; } @JsonIgnore public Long getId() { return id; } public String getUsername() { return username; } @JsonIgnore public boolean isAccountNonExpired() { //TODO 从redis处理检查账号过期情况。 return true; } @JsonIgnore public boolean isAccountNonLocked() { return true; } @JsonIgnore public boolean isCredentialsNonExpired() { //TODO 从redis处理检查证书过期情况。 return true; } public String getToken() { return token; } public void setToken(String token) { this.token = token; } public boolean isEnabled() { return enabled; } @JsonIgnore public Date getLastPasswordResetDate() { return lastPasswordResetDate; } }
[ "niuge@ccclubs.com" ]
niuge@ccclubs.com
f67850ccc33b84da9bd7651d50e1f3ed5dcdeeb0
da68446ad3fa56c5d5f9a55b4428e21e0f0ed406
/src/main/java/mac/corefoundation/struct/CFRunLoopTimerContext.java
c9d776e219145d7fae9052c9c1e80e343bc8c155
[]
no_license
multi-os-engine/moe-mac-core
90d9764ab38807cac004aed70b68ca54c5c8a79b
0ffb7b52af9cdd75f25b33d0c4723903a521d2f7
refs/heads/master
2020-04-06T06:58:01.357013
2016-08-09T18:57:05
2016-08-09T18:57:05
65,319,982
4
2
null
null
null
null
UTF-8
Java
false
false
2,693
java
/* Copyright 2014-2016 Intel Corporation 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 mac.corefoundation.struct; import org.moe.natj.c.CRuntime; import org.moe.natj.c.StructObject; import org.moe.natj.c.ann.FunctionPtr; import org.moe.natj.c.ann.Structure; import org.moe.natj.c.ann.StructureField; import org.moe.natj.general.NatJ; import org.moe.natj.general.Pointer; import org.moe.natj.general.ann.Generated; import org.moe.natj.general.ann.Runtime; import org.moe.natj.general.ptr.ConstVoidPtr; import org.moe.natj.general.ptr.VoidPtr; @Generated @Structure() public final class CFRunLoopTimerContext extends StructObject { static { NatJ.register(); } private static long __natjCache; @Generated public CFRunLoopTimerContext() { super(CFRunLoopTimerContext.class); } @Generated protected CFRunLoopTimerContext(Pointer peer) { super(peer); } @Generated @StructureField(order = 0, isGetter = true) public native long version(); @Generated @StructureField(order = 0, isGetter = false) public native void setVersion(long value); @Generated @StructureField(order = 1, isGetter = true) public native VoidPtr info(); @Generated @StructureField(order = 1, isGetter = false) public native void setInfo(VoidPtr value); @Generated @StructureField(order = 2, isGetter = false) public native void setRetain( @FunctionPtr(name = "call_retain") Function_retain value); @Runtime(CRuntime.class) @Generated static public interface Function_retain { @Generated public ConstVoidPtr call_retain(ConstVoidPtr arg0); } @Generated @StructureField(order = 3, isGetter = false) public native void setRelease( @FunctionPtr(name = "call_release") Function_release value); @Runtime(CRuntime.class) @Generated static public interface Function_release { @Generated public void call_release(ConstVoidPtr arg0); } @Generated @StructureField(order = 4, isGetter = false) public native void setCopyDescription( @FunctionPtr(name = "call_copyDescription") Function_copyDescription value); @Runtime(CRuntime.class) @Generated static public interface Function_copyDescription { @Generated public VoidPtr call_copyDescription(ConstVoidPtr arg0); } }
[ "alexey.suhov@intel.com" ]
alexey.suhov@intel.com
97f275cae3ba1fbe17834da2b1e6bd2c5ff8c66f
a06f68a89a7bf22d2cbb03a387242aac15b29bd4
/Vendor/OpenSource/opennlp-tools/src/main/java/opennlp/tools/cmdline/tokenizer/TokenizerCrossValidatorTool.java
5866e92f0f1b68f19df8af7728b091f9ad3dc99f
[ "Apache-2.0" ]
permissive
JJColeman/jcoleman_Capstone
5308e1b12f6ad0eb645f07bc1437b1181eb73a18
e68de5399c1849ff1f46e429156326020d7978a3
refs/heads/master
2021-01-15T13:48:17.894195
2013-09-10T01:18:44
2013-09-10T01:18:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,180
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 OpenSource.opennlp; import java.io.IOException; import opennlp.tools.cmdline.AbstractCrossValidatorTool; import opennlp.tools.cmdline.CmdLineUtil; import opennlp.tools.cmdline.TerminateToolException; import opennlp.tools.cmdline.params.CVParams; import opennlp.tools.cmdline.tokenizer.TokenizerCrossValidatorTool.CVToolParams; import opennlp.tools.dictionary.Dictionary; import opennlp.tools.tokenize.TokenSample; import opennlp.tools.tokenize.TokenizerCrossValidator; import opennlp.tools.tokenize.TokenizerEvaluationMonitor; import opennlp.tools.tokenize.TokenizerFactory; import opennlp.tools.util.eval.FMeasure; import opennlp.tools.util.model.ModelUtil; public final class TokenizerCrossValidatorTool extends AbstractCrossValidatorTool<TokenSample, CVToolParams> { interface CVToolParams extends CVParams, TrainingParams { } public TokenizerCrossValidatorTool() { super(TokenSample.class, CVToolParams.class); } public String getShortDescription() { return "K-fold cross validator for the learnable tokenizer"; } public void run(String format, String[] args) { super.run(format, args); mlParams = CmdLineUtil.loadTrainingParameters(params.getParams(), false); if (mlParams == null) { mlParams = ModelUtil.createTrainingParameters(params.getIterations(), params.getCutoff()); } TokenizerCrossValidator validator; TokenizerEvaluationMonitor listener = null; if (params.getMisclassified()) { listener = new TokenEvaluationErrorListener(); } try { Dictionary dict = TokenizerTrainerTool.loadDict(params.getAbbDict()); TokenizerFactory tokFactory = TokenizerFactory.create( params.getFactory(), params.getLang(), dict, params.getAlphaNumOpt(), null); validator = new opennlp.tools.tokenize.TokenizerCrossValidator(mlParams, tokFactory, listener); validator.evaluate(sampleStream, params.getFolds()); } catch (IOException e) { throw new TerminateToolException(-1, "IO error while reading training data or indexing data: " + e.getMessage(), e); } finally { try { sampleStream.close(); } catch (IOException e) { // sorry that this can fail } } FMeasure result = validator.getFMeasure(); System.out.println(result.toString()); } }
[ "jcoleman@student.neumont.edu" ]
jcoleman@student.neumont.edu
96bd8a2132aff3e36515622104524a6c82fa180f
da60b5ff3bacde237aa8aca57d90ee7f32d57df7
/src/main/java/org/jglr/ns/types/NSObjectType.java
535e61f746560bcef3c92c7d0cc231bc76936dee
[ "MIT" ]
permissive
jglrxavpok/NeatScript
24e24c59a06299233f83f3dcf68c00a51ff47acb
938317e44cbb204dc4a70103a84791c96f028708
refs/heads/master
2020-05-17T07:44:11.431875
2015-06-17T16:09:38
2015-06-17T16:09:38
28,770,179
2
0
null
2015-01-22T19:21:33
2015-01-04T09:34:15
Java
UTF-8
Java
false
false
482
java
package org.jglr.ns.types; import org.jglr.ns.*; public class NSObjectType extends NSType { public NSObjectType() { super("Object", null); } public NSType supertype() { return this; } public NSType supertype(NSType supertype) { return this; } @Override public NSObject emptyObject() { return new NSObject(this, new Object()); } @Override public void initType() { // TODO Implement } }
[ "jglrxavpok@gmail.com" ]
jglrxavpok@gmail.com
b1bfe2d0671ef1ee3258b63759f69ed3c81209d3
c103ff5a77bbc8cba3aed87c9f19eb040bacc8da
/sgm-core/src/main/java/com/origami/sgm/entities/CtlgDescuentoEmision.java
f52ccbca9c2e5fc477f7d92c5f824ddbe61c92d5
[]
no_license
origamigt/modulo_catastro
9a134d9e87b15a2cae45961a92ff21dbf03639aa
3468f579199b914d875d049623f0b9260144b7c0
refs/heads/master
2023-03-10T12:39:34.332951
2021-02-23T16:53:10
2021-02-23T16:53:10
338,333,465
0
0
null
null
null
null
UTF-8
Java
false
false
4,496
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.origami.sgm.entities; import com.origami.sgm.database.SchemasConfig; import java.io.Serializable; import java.math.BigDecimal; import java.math.BigInteger; import java.util.Date; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.SequenceGenerator; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.validation.constraints.Size; /** * * @author origami */ @Entity @Table(name = "ctlg_descuento_emision") @NamedQueries({ @NamedQuery(name = "CtlgDescuentoEmision.findAll", query = "SELECT c FROM CtlgDescuentoEmision c")}) public class CtlgDescuentoEmision implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = SchemasConfig.APPUNISEQ_ORM) @SequenceGenerator(name = SchemasConfig.APPUNISEQ_ORM, sequenceName = SchemasConfig.APP1 + "." + SchemasConfig.APPUNISEQ_DB, allocationSize = 1) @Basic(optional = false) @Column(name = "id") private Long id; @Column(name = "num_mes") private BigInteger numMes; @Column(name = "num_quincena") private BigInteger numQuincena; // @Max(value=?) @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation @Column(name = "porcentaje") private BigDecimal porcentaje; @Column(name = "fecha_ingreso") @Temporal(TemporalType.TIMESTAMP) private Date fechaIngreso; @Size(max = 20) @Column(name = "usuario_ingreso") private String usuarioIngreso; @Column(name = "fecha_modificacion") @Temporal(TemporalType.TIMESTAMP) private Date fechaModificacion; @Size(max = 40) @Column(name = "usuario_modificacion") private String usuarioModificacion; public CtlgDescuentoEmision() { } public CtlgDescuentoEmision(Long id) { this.id = id; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public BigInteger getNumMes() { return numMes; } public void setNumMes(BigInteger numMes) { this.numMes = numMes; } public BigInteger getNumQuincena() { return numQuincena; } public void setNumQuincena(BigInteger numQuincena) { this.numQuincena = numQuincena; } public BigDecimal getPorcentaje() { return porcentaje; } public void setPorcentaje(BigDecimal porcentaje) { this.porcentaje = porcentaje; } public Date getFechaIngreso() { return fechaIngreso; } public void setFechaIngreso(Date fechaIngreso) { this.fechaIngreso = fechaIngreso; } public String getUsuarioIngreso() { return usuarioIngreso; } public void setUsuarioIngreso(String usuarioIngreso) { this.usuarioIngreso = usuarioIngreso; } public Date getFechaModificacion() { return fechaModificacion; } public void setFechaModificacion(Date fechaModificacion) { this.fechaModificacion = fechaModificacion; } public String getUsuarioModificacion() { return usuarioModificacion; } public void setUsuarioModificacion(String usuarioModificacion) { this.usuarioModificacion = usuarioModificacion; } @Override public int hashCode() { int hash = 0; hash += (id != null ? id.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // : Warning - this method won't work in the case the id fields are not set if (!(object instanceof CtlgDescuentoEmision)) { return false; } CtlgDescuentoEmision other = (CtlgDescuentoEmision) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; } @Override public String toString() { return "CtlgDescuentoEmision[ id=" + id + " ]"; } }
[ "navarroangelr@gmail.com" ]
navarroangelr@gmail.com
8825f454936ffcc9f5cd310fee0043e3d641f5c0
5f84a11cf6ad938a1d3cf0d84708b7bb3b4c5ab9
/src/hasor-web/src/main/java/net/hasor/web/binder/support/ServletDefinition.java
8838eed91b179302661b7a221f0b879fec43e212
[]
no_license
zhao07/hasor
9afd9fdb43a698bc80928e0fa9717fac2a2bc73e
1beaa46d59d0dc7c3a8a0867b74a371cdba8b87c
refs/heads/master
2021-01-21T16:00:15.307952
2014-01-17T12:07:10
2014-01-17T12:07:10
null
0
0
null
null
null
null
GB18030
Java
false
false
7,253
java
/* * Copyright 2008-2009 the original 赵永春(zyc@hasor.net). * * 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 net.hasor.web.binder.support; import static net.hasor.web.binder.support.ManagedServletPipeline.REQUEST_DISPATCHER_REQUEST; import java.io.IOException; import java.util.Enumeration; import java.util.Map; import javax.servlet.ServletConfig; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; import net.hasor.core.AppContext; import org.more.util.Iterators; import com.google.inject.Key; import com.google.inject.Provider; /** * * @version : 2013-4-11 * @author 赵永春 (zyc@hasor.net) */ class ServletDefinition extends AbstractServletModuleBinding implements Provider<ServletDefinition> { private Key<? extends HttpServlet> servletKey = null; /*HttpServlet对象既有可能绑定在这个Key上*/ private HttpServlet servletInstance = null; private UriPatternMatcher patternMatcher = null; private AppContext appContext = null; // public ServletDefinition(int index, String pattern, Key<? extends HttpServlet> servletKey, UriPatternMatcher uriPatternMatcher, Map<String, String> initParams, HttpServlet servletInstance) { super(index, initParams, pattern, uriPatternMatcher); this.servletKey = servletKey; this.servletInstance = servletInstance; this.patternMatcher = uriPatternMatcher; } public ServletDefinition get() { return this; } protected HttpServlet getTarget(AppContext appContext) { if (this.servletInstance == null) this.servletInstance = appContext.getGuice().getInstance(this.servletKey); return this.servletInstance; } public String toString() { return String.format("type %s pattern=%s ,initParams=%s ,uriPatternType=%s",// ServletDefinition.class, getPattern(), getInitParams(), getUriPatternType()); } /*--------------------------------------------------------------------------------------------------------*/ /**/ public void init(final AppContext appContext) throws ServletException { this.appContext = appContext; HttpServlet servlet = this.getTarget(appContext); if (servlet == null) return; final Map<String, String> initParams = this.getInitParams(); // servlet.init(new ServletConfig() { public String getServletName() { return servletKey.toString(); } public ServletContext getServletContext() { Object context = appContext.getContext(); if (context instanceof ServletContext) return (ServletContext) context; return null; } public String getInitParameter(String s) { return initParams.get(s); } public Enumeration<String> getInitParameterNames() { return Iterators.asEnumeration(initParams.keySet().iterator()); } }); } /**/ public boolean service(ServletRequest request, ServletResponse response) throws IOException, ServletException { HttpServletRequest httpRequest = (HttpServletRequest) request; String path = httpRequest.getRequestURI().substring(httpRequest.getContextPath().length()); boolean serve = this.matchesUri(path); // if (serve) doService(request, response); return serve; } /**/ private void doService(final ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException { HttpServletRequest request = new HttpServletRequestWrapper((HttpServletRequest) servletRequest) { private String path; private boolean pathComputed = false; //must use a boolean on the memo field, because null is a legal value (TODO no, it's not) private boolean pathInfoComputed = false; private String pathInfo; public String getPathInfo() { if (!isPathInfoComputed()) { int servletPathLength = getServletPath().length(); pathInfo = getRequestURI().substring(getContextPath().length()).replaceAll("[/]{2,}", "/"); pathInfo = pathInfo.length() > servletPathLength ? pathInfo.substring(servletPathLength) : null; // Corner case: when servlet path and request path match exactly (without trailing '/'), // then pathinfo is null if ("".equals(pathInfo) && servletPathLength != 0) { pathInfo = null; } pathInfoComputed = true; } return pathInfo; } // NOTE(dhanji): These two are a bit of a hack to help ensure that request dipatcher-sent // requests don't use the same path info that was memoized for the original request. private boolean isPathInfoComputed() { return pathInfoComputed && !(null != servletRequest.getAttribute(REQUEST_DISPATCHER_REQUEST)); } private boolean isPathComputed() { return pathComputed && !(null != servletRequest.getAttribute(REQUEST_DISPATCHER_REQUEST)); } public String getServletPath() { return computePath(); } public String getPathTranslated() { final String info = getPathInfo(); return (null == info) ? null : getRealPath(info); } // Memoizer pattern. private String computePath() { if (!isPathComputed()) { String servletPath = super.getServletPath(); path = patternMatcher.extractPath(servletPath); pathComputed = true; if (null == path) { path = servletPath; } } return path; } }; // HttpServlet servlet = this.getTarget(this.appContext); if (servlet == null) return; servlet.service(request, servletResponse); } /**/ public void destroy(AppContext appContext) { HttpServlet servlet = this.getTarget(appContext); if (servlet == null) return; servlet.destroy(); } }
[ "zyc@byshell.org" ]
zyc@byshell.org
7eaf59fb8378e2cf2edbc2cc524bd0b3a33e85a5
afab72f0209764c956d609873b7f2b517d67ad5f
/MobileWebAppClients/src/zw/co/esolutions/ussd/web/services/UssdTransaction.java
5938f4df128803ec1b5231cc947fcffc0531a9f6
[]
no_license
wasadmin/ewallet
899e66d4d03e77a8f85974d9d2cba8940cf2018a
e132a5e569f4bb67a83df0c3012bb341ffaaf2ed
refs/heads/master
2021-01-23T13:48:34.618617
2012-11-15T10:47:55
2012-11-15T10:47:55
6,703,145
3
2
null
null
null
null
UTF-8
Java
false
false
7,430
java
// // Generated By:JAX-WS RI IBM 2.1.1 in JDK 6 (JAXB RI IBM JAXB 2.1.3 in JDK 1.6) // package zw.co.esolutions.ussd.web.services; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** * <p>Java class for ussdTransaction complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ussdTransaction"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="aquirerId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="bankCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="dateCreated" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/> * &lt;element name="flowStatus" type="{http://services.web.ussd.esolutions.co.zw/}flowStatus" minOccurs="0"/> * &lt;element name="message" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="mno" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="sendSms" type="{http://www.w3.org/2001/XMLSchema}boolean"/> * &lt;element name="sessionId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="sourceMobile" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="uuid" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="version" type="{http://www.w3.org/2001/XMLSchema}long"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ussdTransaction", namespace = "http://services.web.ussd.esolutions.co.zw/", propOrder = { "aquirerId", "bankCode", "dateCreated", "flowStatus", "message", "mno", "sendSms", "sessionId", "sourceMobile", "uuid", "version" }) public class UssdTransaction { protected String aquirerId; protected String bankCode; protected XMLGregorianCalendar dateCreated; protected FlowStatus flowStatus; protected String message; protected String mno; protected boolean sendSms; protected String sessionId; protected String sourceMobile; protected String uuid; protected long version; /** * Gets the value of the aquirerId property. * * @return * possible object is * {@link String } * */ public String getAquirerId() { return aquirerId; } /** * Sets the value of the aquirerId property. * * @param value * allowed object is * {@link String } * */ public void setAquirerId(String value) { this.aquirerId = value; } /** * Gets the value of the bankCode property. * * @return * possible object is * {@link String } * */ public String getBankCode() { return bankCode; } /** * Sets the value of the bankCode property. * * @param value * allowed object is * {@link String } * */ public void setBankCode(String value) { this.bankCode = value; } /** * Gets the value of the dateCreated property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDateCreated() { return dateCreated; } /** * Sets the value of the dateCreated property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setDateCreated(XMLGregorianCalendar value) { this.dateCreated = value; } /** * Gets the value of the flowStatus property. * * @return * possible object is * {@link FlowStatus } * */ public FlowStatus getFlowStatus() { return flowStatus; } /** * Sets the value of the flowStatus property. * * @param value * allowed object is * {@link FlowStatus } * */ public void setFlowStatus(FlowStatus value) { this.flowStatus = value; } /** * Gets the value of the message property. * * @return * possible object is * {@link String } * */ public String getMessage() { return message; } /** * Sets the value of the message property. * * @param value * allowed object is * {@link String } * */ public void setMessage(String value) { this.message = value; } /** * Gets the value of the mno property. * * @return * possible object is * {@link String } * */ public String getMno() { return mno; } /** * Sets the value of the mno property. * * @param value * allowed object is * {@link String } * */ public void setMno(String value) { this.mno = value; } /** * Gets the value of the sendSms property. * */ public boolean isSendSms() { return sendSms; } /** * Sets the value of the sendSms property. * */ public void setSendSms(boolean value) { this.sendSms = value; } /** * Gets the value of the sessionId property. * * @return * possible object is * {@link String } * */ public String getSessionId() { return sessionId; } /** * Sets the value of the sessionId property. * * @param value * allowed object is * {@link String } * */ public void setSessionId(String value) { this.sessionId = value; } /** * Gets the value of the sourceMobile property. * * @return * possible object is * {@link String } * */ public String getSourceMobile() { return sourceMobile; } /** * Sets the value of the sourceMobile property. * * @param value * allowed object is * {@link String } * */ public void setSourceMobile(String value) { this.sourceMobile = value; } /** * Gets the value of the uuid property. * * @return * possible object is * {@link String } * */ public String getUuid() { return uuid; } /** * Sets the value of the uuid property. * * @param value * allowed object is * {@link String } * */ public void setUuid(String value) { this.uuid = value; } /** * Gets the value of the version property. * */ public long getVersion() { return version; } /** * Sets the value of the version property. * */ public void setVersion(long value) { this.version = value; } }
[ "stanfordbangaba@gmail.com" ]
stanfordbangaba@gmail.com
fac45cdd90aab363d88d0dc51c05760f0f1b205a
0ac05e3da06d78292fdfb64141ead86ff6ca038f
/OSWE/oswe/openCRX/rtjar/rt.jar.src/java/awt/dnd/DnDConstants.java
b2b8a12ecde2c8a525d1e0f2807a333f5d000f6e
[]
no_license
qoo7972365/timmy
31581cdcbb8858ac19a8bb7b773441a68b6c390a
2fc8baba4f53d38dfe9c2b3afd89dcf87cbef578
refs/heads/master
2023-07-26T12:26:35.266587
2023-07-17T12:35:19
2023-07-17T12:35:19
353,889,195
7
1
null
null
null
null
UTF-8
Java
false
false
538
java
package java.awt.dnd; public final class DnDConstants { public static final int ACTION_NONE = 0; public static final int ACTION_COPY = 1; public static final int ACTION_MOVE = 2; public static final int ACTION_COPY_OR_MOVE = 3; public static final int ACTION_LINK = 1073741824; public static final int ACTION_REFERENCE = 1073741824; } /* Location: /Users/timmy/timmy/OSWE/oswe/openCRX/rt.jar!/java/awt/dnd/DnDConstants.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "t0984456716" ]
t0984456716
a5966d0e0040f64ee1eb2be3417676f011056c1c
551fb905f53ea32909cadafad81e46ec1c87bc89
/app/src/main/java/details/hotel/app/fitiam/Model/ReferCodeModel.java
229e94072a053e637c64aebd67d0a72b2d7518ad
[]
no_license
nisharzingo/Gyms
f254724c7838b5190f302d47cbe137a199d6b1f7
ff89e868406b685a7daf4017042e1a02e127be45
refs/heads/master
2020-05-29T13:19:29.469216
2019-05-29T07:13:49
2019-05-29T07:13:49
189,157,222
0
0
null
null
null
null
UTF-8
Java
false
false
697
java
package details.hotel.app.fitiam.Model; import com.google.gson.annotations.SerializedName; import java.io.Serializable; public class ReferCodeModel implements Serializable { @SerializedName("ReferralCode") private String ReferralCode; @SerializedName("ReferralCodeUsed") private String ReferralCodeUsed; public String getReferralCode() { return ReferralCode; } public void setReferralCode(String referralCode) { ReferralCode = referralCode; } public String getReferralCodeUsed() { return ReferralCodeUsed; } public void setReferralCodeUsed(String referralCodeUsed) { ReferralCodeUsed = referralCodeUsed; } }
[ "nishar@zingohotels.com" ]
nishar@zingohotels.com
1aad1b401af7a542d89bc6d18836d35d46897529
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_21/Testnull_2008.java
177560a97686baf3f74e8231685ed647eea8ad74
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
304
java
package org.gradle.test.performancenull_21; import static org.junit.Assert.*; public class Testnull_2008 { private final Productionnull_2008 production = new Productionnull_2008("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
42bbbea7d2b85c4047169de5fc3d2b939c61392a
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/plugin/remittance/bankcard/ui/BankRemitMoneyInputUI$8.java
feb7f56577f32fabdf3a672489cbabef63c97563
[]
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
755
java
package com.tencent.mm.plugin.remittance.bankcard.ui; import com.tencent.mm.plugin.report.service.h; import com.tencent.mm.plugin.wallet_core.ui.m.a; import com.tencent.mm.plugin.wxpay.a.i; class BankRemitMoneyInputUI$8 implements a { final /* synthetic */ BankRemitMoneyInputUI mwj; BankRemitMoneyInputUI$8(BankRemitMoneyInputUI bankRemitMoneyInputUI) { this.mwj = bankRemitMoneyInputUI; } public final void aCb() { com.tencent.mm.plugin.wallet_core.ui.view.a.a(this.mwj, this.mwj.getString(i.bank_remit_remittance_desc_text), BankRemitMoneyInputUI.h(this.mwj), this.mwj.getString(i.remittance_desc_max_words_count_tip), 20, new 1(this), new 2(this)); h.mEJ.h(14673, new Object[]{Integer.valueOf(4)}); } }
[ "707194831@qq.com" ]
707194831@qq.com
8415ab780e7398eb0a6e1b2f0c861ec0d2b96292
589dcd422402477ce80e9c349bd483c2d36b80cd
/trunk/adhoc-solr/src/main/java/org/apache/solr/spelling/SpellingResult.java
2b1807c2b2cc95c55662849ac7eb832621e1abe4
[ "Apache-2.0", "LicenseRef-scancode-unicode-mappings", "BSD-3-Clause", "CDDL-1.0", "Python-2.0", "MIT", "ICU", "CPL-1.0" ]
permissive
baojiawei1230/mdrill
e3d92f4f1f85b34f0839f8463e7e5353145a9c78
edacdb4dc43ead6f14d83554c1f402aa1ffdec6a
refs/heads/master
2021-06-10T17:42:11.076927
2021-03-15T16:43:06
2021-03-15T16:43:06
95,193,877
0
0
Apache-2.0
2021-03-15T16:43:06
2017-06-23T07:15:00
Java
UTF-8
Java
false
false
4,981
java
package org.apache.solr.spelling; /** * 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. */ import org.apache.lucene.analysis.Token; import java.util.Collection; import java.util.LinkedHashMap; import java.util.Map; import java.util.List; /** * Implementations of SolrSpellChecker must return suggestions as SpellResult instance. * This is converted into the required NamedList format in SpellCheckComponent. * * @since solr 1.3 */ public class SpellingResult { private Collection<Token> tokens; /** * Key == token * Value = Map -> key is the suggestion, value is the frequency of the token in the collection */ private Map<Token, LinkedHashMap<String, Integer>> suggestions = new LinkedHashMap<Token, LinkedHashMap<String, Integer>>(); private Map<Token, Integer> tokenFrequency; public static final int NO_FREQUENCY_INFO = -1; public SpellingResult() { } public SpellingResult(Collection<Token> tokens) { this.tokens = tokens; } /** * Adds a whole bunch of suggestions, and does not worry about frequency. * * @param token The token to associate the suggestions with * @param suggestions The suggestions */ public void add(Token token, List<String> suggestions) { LinkedHashMap<String, Integer> map = this.suggestions.get(token); if (map == null ) { map = new LinkedHashMap<String, Integer>(); this.suggestions.put(token, map); } for (String suggestion : suggestions) { map.put(suggestion, NO_FREQUENCY_INFO); } } /** @deprecated use {@link #addFrequency(Token, int)} instead. */ @Deprecated public void add(Token token, int docFreq) { addFrequency(token, docFreq); } /** * Adds an original token with its document frequency * * @param token original token * @param docFreq original token's document frequency */ public void addFrequency(Token token, int docFreq) { if (tokenFrequency == null) { tokenFrequency = new LinkedHashMap<Token, Integer>(); } tokenFrequency.put(token, docFreq); } /** * Suggestions must be added with the best suggestion first. ORDER is important. * @param token The {@link org.apache.lucene.analysis.Token} * @param suggestion The suggestion for the Token * @param docFreq The document frequency */ public void add(Token token, String suggestion, int docFreq) { LinkedHashMap<String, Integer> map = this.suggestions.get(token); //Don't bother adding if we already have this token if (map == null) { map = new LinkedHashMap<String, Integer>(); this.suggestions.put(token, map); } map.put(suggestion, docFreq); } /** * Gets the suggestions for the given token. * * @param token The {@link org.apache.lucene.analysis.Token} to look up * @return A LinkedHashMap of the suggestions. Key is the suggestion, value is the token frequency in the index, else {@link #NO_FREQUENCY_INFO}. * * The suggestions are added in sorted order (i.e. best suggestion first) then the iterator will return the suggestions in order */ public LinkedHashMap<String, Integer> get(Token token) { return suggestions.get(token); } /** * The token frequency of the input token in the collection * * @param token The token * @return The frequency or null */ public Integer getTokenFrequency(Token token) { return tokenFrequency.get(token); } public boolean hasTokenFrequencyInfo() { return tokenFrequency != null && !tokenFrequency.isEmpty(); } /** * All the suggestions. The ordering of the inner LinkedHashMap is by best suggestion first. * @return The Map of suggestions for each Token. Key is the token, value is a LinkedHashMap whose key is the Suggestion and the value is the frequency or {@link #NO_FREQUENCY_INFO} if frequency info is not available. * */ public Map<Token, LinkedHashMap<String, Integer>> getSuggestions() { return suggestions; } public Map<Token, Integer> getTokenFrequency() { return tokenFrequency; } /** * @return The original tokens */ public Collection<Token> getTokens() { return tokens; } public void setTokens(Collection<Token> tokens) { this.tokens = tokens; } }
[ "myn@163.com" ]
myn@163.com
89e49a2ca3149ca72f5fe9ed78fc208126f92319
39fdbaa47bc18dd76ccc40bccf18a21e3543ab9f
/modules/activiti-json-converter/src/main/java/org/activiti/editor/language/json/converter/SequenceFlowJsonConverter.java
aa6f9552d01594cbec126adda540cb2b84cf1d17
[]
no_license
jpjyxy/Activiti-activiti-5.16.4
b022494b8f40b817a54bb1cc9c7f6fa41dadb353
ff22517464d8f9d5cfb09551ad6c6cbecff93f69
refs/heads/master
2022-12-24T14:51:08.868694
2017-04-14T14:05:00
2017-04-14T14:05:00
191,682,921
0
0
null
2022-12-16T04:24:04
2019-06-13T03:15:47
Java
UTF-8
Java
false
false
7,223
java
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.activiti.editor.language.json.converter; import java.util.Map; import org.activiti.bpmn.model.BaseElement; import org.activiti.bpmn.model.BpmnModel; import org.activiti.bpmn.model.FlowElement; import org.activiti.bpmn.model.GraphicInfo; import org.activiti.bpmn.model.SequenceFlow; import org.apache.commons.lang3.StringUtils; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; /** * @author Tijs Rademakers */ public class SequenceFlowJsonConverter extends BaseBpmnJsonConverter { public static void fillTypes(Map<String, Class<? extends BaseBpmnJsonConverter>> convertersToBpmnMap, Map<Class<? extends BaseElement>, Class<? extends BaseBpmnJsonConverter>> convertersToJsonMap) { fillJsonTypes(convertersToBpmnMap); fillBpmnTypes(convertersToJsonMap); } public static void fillJsonTypes(Map<String, Class<? extends BaseBpmnJsonConverter>> convertersToBpmnMap) { convertersToBpmnMap.put(STENCIL_SEQUENCE_FLOW, SequenceFlowJsonConverter.class); } public static void fillBpmnTypes( Map<Class<? extends BaseElement>, Class<? extends BaseBpmnJsonConverter>> convertersToJsonMap) { convertersToJsonMap.put(SequenceFlow.class, SequenceFlowJsonConverter.class); } @Override protected String getStencilId(FlowElement flowElement) { return STENCIL_SEQUENCE_FLOW; } @Override public void convertToJson(FlowElement flowElement, ActivityProcessor processor, BpmnModel model, ArrayNode shapesArrayNode, double subProcessX, double subProcessY) { SequenceFlow sequenceFlow = (SequenceFlow)flowElement; ObjectNode flowNode = BpmnJsonConverterUtil.createChildShape(sequenceFlow.getId(), STENCIL_SEQUENCE_FLOW, 172, 212, 128, 212); ArrayNode dockersArrayNode = objectMapper.createArrayNode(); ObjectNode dockNode = objectMapper.createObjectNode(); dockNode.put(EDITOR_BOUNDS_X, model.getGraphicInfo(sequenceFlow.getSourceRef()).getWidth() / 2.0); dockNode.put(EDITOR_BOUNDS_Y, model.getGraphicInfo(sequenceFlow.getSourceRef()).getHeight() / 2.0); dockersArrayNode.add(dockNode); if (model.getFlowLocationGraphicInfo(sequenceFlow.getId()).size() > 2) { for (int i = 1; i < model.getFlowLocationGraphicInfo(sequenceFlow.getId()).size() - 1; i++) { GraphicInfo graphicInfo = model.getFlowLocationGraphicInfo(sequenceFlow.getId()).get(i); dockNode = objectMapper.createObjectNode(); dockNode.put(EDITOR_BOUNDS_X, graphicInfo.getX()); dockNode.put(EDITOR_BOUNDS_Y, graphicInfo.getY()); dockersArrayNode.add(dockNode); } } dockNode = objectMapper.createObjectNode(); dockNode.put(EDITOR_BOUNDS_X, model.getGraphicInfo(sequenceFlow.getTargetRef()).getWidth() / 2.0); dockNode.put(EDITOR_BOUNDS_Y, model.getGraphicInfo(sequenceFlow.getTargetRef()).getHeight() / 2.0); dockersArrayNode.add(dockNode); flowNode.put("dockers", dockersArrayNode); ArrayNode outgoingArrayNode = objectMapper.createArrayNode(); outgoingArrayNode.add(BpmnJsonConverterUtil.createResourceNode(sequenceFlow.getTargetRef())); flowNode.put("outgoing", outgoingArrayNode); flowNode.put("target", BpmnJsonConverterUtil.createResourceNode(sequenceFlow.getTargetRef())); ObjectNode propertiesNode = objectMapper.createObjectNode(); propertiesNode.put(PROPERTY_OVERRIDE_ID, flowElement.getId()); if (StringUtils.isNotEmpty(sequenceFlow.getName())) { propertiesNode.put(PROPERTY_NAME, sequenceFlow.getName()); } if (StringUtils.isNotEmpty(sequenceFlow.getDocumentation())) { propertiesNode.put(PROPERTY_DOCUMENTATION, sequenceFlow.getDocumentation()); } if (StringUtils.isNotEmpty(sequenceFlow.getConditionExpression())) { propertiesNode.put(PROPERTY_SEQUENCEFLOW_CONDITION, sequenceFlow.getConditionExpression()); } flowNode.put(EDITOR_SHAPE_PROPERTIES, propertiesNode); shapesArrayNode.add(flowNode); } @Override protected void convertElementToJson(ObjectNode propertiesNode, FlowElement flowElement) { // nothing to do } @Override protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) { SequenceFlow flow = new SequenceFlow(); String sourceRef = lookForSourceRef(elementNode.get(EDITOR_SHAPE_ID).asText(), modelNode.get(EDITOR_CHILD_SHAPES)); if (sourceRef != null) { flow.setSourceRef(sourceRef); String targetId = elementNode.get("target").get(EDITOR_SHAPE_ID).asText(); flow.setTargetRef(BpmnJsonConverterUtil.getElementId(shapeMap.get(targetId))); } flow.setConditionExpression(getPropertyValueAsString(PROPERTY_SEQUENCEFLOW_CONDITION, elementNode)); return flow; } private String lookForSourceRef(String flowId, JsonNode childShapesNode) { String sourceRef = null; if (childShapesNode != null) { for (JsonNode childNode : childShapesNode) { ArrayNode outgoingNode = (ArrayNode)childNode.get("outgoing"); if (outgoingNode != null && outgoingNode.size() > 0) { for (JsonNode outgoingChildNode : outgoingNode) { JsonNode resourceNode = outgoingChildNode.get(EDITOR_SHAPE_ID); if (resourceNode != null && flowId.equals(resourceNode.asText())) { sourceRef = BpmnJsonConverterUtil.getElementId(childNode); break; } } if (sourceRef != null) { break; } } sourceRef = lookForSourceRef(flowId, childNode.get(EDITOR_CHILD_SHAPES)); if (sourceRef != null) { break; } } } return sourceRef; } }
[ "905280842@qq.com" ]
905280842@qq.com
cd988718047ec0ad75ec54cfa37cf59aee125262
f54fadde9ce4150f0c36056dbed8c86cadd652ac
/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/hostinstall/HostKeyVerifier.java
e2e713e2c9004cccb0f1ab49d284f12e66f3f492
[ "Apache-2.0" ]
permissive
Dhandapani/gluster-ovirt
fd45107937cf97e08a922b6dab73b2c1daec245d
be1f413eacf6694c567a778e262d3a6620c2a8ca
refs/heads/master
2020-06-03T22:50:34.220128
2012-03-22T19:31:09
2012-03-22T19:31:09
3,726,799
1
1
null
null
null
null
UTF-8
Java
false
false
2,712
java
package org.ovirt.engine.core.utils.hostinstall; import java.net.SocketAddress; import java.security.KeyFactory; import java.security.MessageDigest; import java.security.PublicKey; import java.security.spec.RSAPublicKeySpec; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.sshd.ClientSession; import org.apache.sshd.client.ServerKeyVerifier; import org.apache.sshd.common.util.BufferUtils; /*** * * */ public class HostKeyVerifier implements ServerKeyVerifier { public static final ServerKeyVerifier INSTANCE = new HostKeyVerifier(); private static Log log = LogFactory.getLog(HostKeyVerifier.class); private byte[] serverKeyFingerprint; HostKeyVerifier() { serverKeyFingerprint = null; } private static byte[] intToDWord(int i) { byte[] dword = new byte[4]; dword[0] = (byte) ((i >> 24)); dword[1] = (byte) ((i >> 16)); dword[2] = (byte) ((i >> 8)); dword[3] = (byte) (i); return dword; } private byte[] getKeyFingerprint(PublicKey serverKey) { byte[] baFP = null; MessageDigest md5; KeyFactory kf = null; RSAPublicKeySpec k = null; try { kf = KeyFactory.getInstance("RSA"); k = kf.getKeySpec(serverKey, RSAPublicKeySpec.class); md5 = MessageDigest.getInstance("MD5"); md5.reset(); byte[] bData = "ssh-rsa".getBytes(); byte[] bLen = intToDWord(bData.length); md5.update(bLen, 0, bLen.length); md5.update(bData, 0, bData.length); bData = k.getPublicExponent().toByteArray(); bLen = intToDWord(bData.length); ; md5.update(bLen, 0, bLen.length); md5.update(bData, 0, bData.length); bData = k.getModulus().toByteArray(); bLen = intToDWord(bData.length); ; md5.update(bLen, 0, bLen.length); md5.update(bData, 0, bData.length); baFP = md5.digest(); log.debug("Server fingerprint: " + BufferUtils.printHex(baFP)); } catch (Exception e) { log.error("Unable to calculate fingerprint: " + e); } return baFP; } @Override public boolean verifyServerKey(ClientSession sshClientSession, SocketAddress remoteAddress, PublicKey serverKey) { boolean fReturn = true; serverKeyFingerprint = getKeyFingerprint(serverKey); if (serverKeyFingerprint == null) { fReturn = false; } return fReturn; } public byte[] getServerFingerprint() { return serverKeyFingerprint; } }
[ "iheim@redhat.com" ]
iheim@redhat.com
a199a7117be9be8673b09f3e89782ef07ea5d436
5479e441b1430b5301298119b3ad637b5e9a9a9a
/openapi-sdk-message/src/main/java/com/yiji/openapi/message/common/pact/AsynVerifyCardThreeRequest.java
fed2416a7d6e25cd209500788b7e0bdd486bd0e4
[]
no_license
weichk/yiji-sdk
4e3c0252a10eec91c6f14220994e9be903b68317
7715e3feabb3aef32ea8ee0103cafa774204d928
refs/heads/master
2022-12-22T12:47:16.898108
2019-06-20T07:56:23
2019-06-20T07:56:23
192,875,193
0
0
null
2022-12-15T23:31:31
2019-06-20T07:53:07
Java
UTF-8
Java
false
false
2,358
java
/* * www.yiji.com Inc. * Copyright (c) 2014 All Rights Reserved */ /* * * mdaheng@yiji.com 2016-04-22 14:59 创建 * */ package com.yiji.openapi.message.common.pact; import org.hibernate.validator.constraints.NotBlank; import com.yiji.openapi.sdk.common.annotation.OpenApiField; import com.yiji.openapi.sdk.common.annotation.OpenApiMessage; import com.yiji.openapi.sdk.common.enums.ApiMessageType; import com.yiji.openapi.sdk.common.message.ApiRequest; /** * @author xzhengyu * @email mdaheng@yiji.com * @since 2016-04-22 */ @OpenApiMessage(service = "asynVerifyCardThree", type = ApiMessageType.Request) public class AsynVerifyCardThreeRequest extends ApiRequest { /** 卡号 */ @OpenApiField(desc = "银行卡号",demo = "52310115654751",constraint = "卡号不能为空") @NotBlank private String cardNo; /** 证件号 */ @OpenApiField(desc = "证件号" , demo = "512121155502065565" , constraint = "证件号不能为空") @NotBlank private String certNo; /** 持卡人姓名 */ @OpenApiField(desc = "持卡人姓名" , demo = "大猫" , constraint = "持卡人姓名不能为空") @NotBlank private String cardName; /** 证件类型 */ @OpenApiField(desc = "证件类型" , demo = "Identity_Card") private String certType; /** openApi调用标识,判断是否需要异步通知,默认是false */ @OpenApiField(desc = "openApi调用标识" , demo = "true",constraint ="判断是否需要异步通知,默认是false,如果选择false,可以选择:查询验证" ) private boolean needNotify; public String getCardNo() { return cardNo; } public void setCardNo(String cardNo) { this.cardNo = cardNo; } public String getCertNo() { return certNo; } public void setCertNo(String certNo) { this.certNo = certNo; } public String getCardName() { return cardName; } public void setCardName(String cardName) { this.cardName = cardName; } public String getCertType() { return certType; } public void setCertType(String certType) { this.certType = certType; } public boolean isNeedNotify() { return needNotify; } public void setNeedNotify(boolean needNotify) { this.needNotify = needNotify; } }
[ "539603511@qq.com" ]
539603511@qq.com
b93234002e039185f58a976242328f2e5bad2432
3982cc0a73455f8ce32dba330581b4a809988a17
/java/java-tests/testSrc/com/intellij/refactoring/MoveMembersTest.java
ca97d36cb650d6e1a28c2891bc76175d89f3cb37
[ "Apache-2.0" ]
permissive
lshain-android-source/tools-idea
56d754089ebadd689b7d0e6400ef3be4255f6bc6
b37108d841684bcc2af45a2539b75dd62c4e283c
refs/heads/master
2016-09-05T22:31:43.471772
2014-07-09T07:58:59
2014-07-09T07:58:59
16,572,470
3
2
null
null
null
null
UTF-8
Java
false
false
7,286
java
package com.intellij.refactoring; import com.intellij.JavaTestUtil; import com.intellij.openapi.fileEditor.FileDocumentManager; import com.intellij.openapi.roots.LanguageLevelProjectExtension; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.pom.java.LanguageLevel; import com.intellij.psi.PsiClass; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiMember; import com.intellij.psi.PsiModifier; import com.intellij.psi.search.ProjectScope; import com.intellij.refactoring.move.moveMembers.MockMoveMembersOptions; import com.intellij.refactoring.move.moveMembers.MoveMembersProcessor; import com.intellij.util.VisibilityUtil; import java.util.ArrayList; import java.util.LinkedHashSet; public class MoveMembersTest extends MultiFileTestCase { @Override protected String getTestDataPath() { return JavaTestUtil.getJavaTestDataPath(); } public void testJavadocRefs() throws Exception { doTest("Class1", "Class2", 0); } public void testWeirdDeclaration() throws Exception { doTest("A", "B", 0); } public void testInnerClass() throws Exception { doTest("A", "B", 0); } public void testScr11871() throws Exception { doTest("pack1.A", "pack1.B", 0); } public void testOuterClassTypeParameters() throws Exception { doTest("pack1.A", "pack2.B", 0); } public void testscr40064() throws Exception { doTest("Test", "Test1", 0); } public void testscr40947() throws Exception { doTest("A", "Test", 0, 1); } public void testIDEADEV11416() throws Exception { doTest("Y", "X", false, 0); } public void testDependantConstants() throws Exception { doTest("A", "B", 0, 1); } public void testTwoMethods() throws Exception { doTest("pack1.A", "pack1.C", 0, 1, 2); } public void testParameterizedRefOn() throws Exception { doTest("pack1.POne", "pack1.C", 1, 2); } public void testIDEADEV12448() throws Exception { doTest("B", "A", false, 0); } public void testFieldForwardRef() throws Exception { doTest("A", "Constants", 0); } public void testStaticImport() throws Exception { doTest("C", "B", 0); } public void testExplicitStaticImport() throws Exception { doTest("C", "B", 0); } public void testProtectedConstructor() throws Exception { doTest("pack1.A", "pack1.C", 0); } public void testUntouchedVisibility() throws Exception { doTest("pack1.A", "pack1.C", 0, 1); } public void testEscalateVisibility() throws Exception { doTest("pack1.A", "pack1.C", true, VisibilityUtil.ESCALATE_VISIBILITY, 0); } public void testOtherPackageImport() throws Exception { doTest("pack1.ClassWithStaticMethod", "pack2.OtherClass", 1); } public void testEnumConstant() throws Exception { doTest("B", "A", 0); } public void testEnumConstantFromCaseStatement() throws Exception { doTest("B", "A", 0); } public void testStringConstantFromCaseStatement() throws Exception { doTest("B", "A", 0); } public void testDependantFields() throws Exception { doTest("B", "A", 0); } public void testStaticImportAndOverridenMethods() throws Exception { doTest("bar.B", "bar.A", 0); } public void testWritableField() throws Exception { try { doTest("B", "A", 0); fail("conflict expected"); } catch (BaseRefactoringProcessor.ConflictsInTestsException e) { assertEquals("Field <b><code>B.ONE</code></b> has write access but is moved to an interface", e.getMessage()); } } public void testFinalFieldWithInitializer() throws Exception { try { doTest("B", "A", 0); fail("conflict expected"); } catch (BaseRefactoringProcessor.ConflictsInTestsException e) { assertEquals("final variable initializer won't be available after move.", e.getMessage()); } } public void testInnerToInterface() throws Exception { doTest("A", "B", 0); } public void testStaticToInterface() throws Exception { final LanguageLevelProjectExtension levelProjectExtension = LanguageLevelProjectExtension.getInstance(getProject()); final LanguageLevel level = levelProjectExtension.getLanguageLevel(); try { levelProjectExtension.setLanguageLevel(LanguageLevel.JDK_1_8); doTest("A", "B", 0); } finally { levelProjectExtension.setLanguageLevel(level); } } public void testEscalateVisibility1() throws Exception { doTest("A", "B", true, VisibilityUtil.ESCALATE_VISIBILITY, 0); } public void testMultipleWithDependencies() throws Exception { doTest("A", "B", true, VisibilityUtil.ESCALATE_VISIBILITY, 0, 1); } public void testFromNestedToOuter() throws Exception { doTest("Outer.Inner", "Outer", true, VisibilityUtil.ESCALATE_VISIBILITY, 0); } @Override protected String getTestRoot() { return "/refactoring/moveMembers/"; } private void doTest(final String sourceClassName, final String targetClassName, final int... memberIndices) throws Exception { doTest(sourceClassName, targetClassName, true, memberIndices); } private void doTest(final String sourceClassName, final String targetClassName, final boolean lowercaseFirstLetter, final int... memberIndices) throws Exception { doTest(sourceClassName, targetClassName, lowercaseFirstLetter, null, memberIndices); } private void doTest(final String sourceClassName, final String targetClassName, final boolean lowercaseFirstLetter, final String defaultVisibility, final int... memberIndices) throws Exception { doTest(new PerformAction() { @Override public void performAction(VirtualFile rootDir, VirtualFile rootAfter) throws Exception { MoveMembersTest.this.performAction(sourceClassName, targetClassName, memberIndices, defaultVisibility); } }, lowercaseFirstLetter); } private void performAction(String sourceClassName, String targetClassName, int[] memberIndices, final String visibility) throws Exception { PsiClass sourceClass = myJavaFacade.findClass(sourceClassName, ProjectScope.getProjectScope(myProject)); assertNotNull("Class " + sourceClassName + " not found", sourceClass); PsiClass targetClass = myJavaFacade.findClass(targetClassName, ProjectScope.getProjectScope(myProject)); assertNotNull("Class " + targetClassName + " not found", targetClass); PsiElement[] children = sourceClass.getChildren(); ArrayList<PsiMember> members = new ArrayList<PsiMember>(); for (PsiElement child : children) { if (child instanceof PsiMember) { members.add(((PsiMember) child)); } } LinkedHashSet<PsiMember> memberSet = new LinkedHashSet<PsiMember>(); for (int index : memberIndices) { PsiMember member = members.get(index); assertTrue(member.hasModifierProperty(PsiModifier.STATIC)); memberSet.add(member); } MockMoveMembersOptions options = new MockMoveMembersOptions(targetClass.getQualifiedName(), memberSet); options.setMemberVisibility(visibility); new MoveMembersProcessor(myProject, null, options).run(); FileDocumentManager.getInstance().saveAllDocuments(); } }
[ "lshain.gyh@gmail.com" ]
lshain.gyh@gmail.com
9c35f244ae791f97e0f676ec87cb93597da88a24
9a52fe3bcdd090a396e59c68c63130f32c54a7a8
/sources/com/google/android/gms/internal/ads/zzbwe.java
73d0a60c301e5d716658ef606d849efb2a728695
[]
no_license
mzkh/LudoKing
19d7c76a298ee5bd1454736063bc392e103a8203
ee0d0e75ed9fa8894ed9877576d8e5589813b1ba
refs/heads/master
2022-04-25T06:08:41.916017
2020-04-14T17:00:45
2020-04-14T17:00:45
255,670,636
1
0
null
null
null
null
UTF-8
Java
false
false
409
java
package com.google.android.gms.internal.ads; import androidx.annotation.Nullable; /* compiled from: com.google.android.gms:play-services-ads@@18.2.0 */ public final class zzbwe implements zzdwb<zzakg> { private final zzbwc zzfnv; public zzbwe(zzbwc zzbwc) { this.zzfnv = zzbwc; } @Nullable public final /* synthetic */ Object get() { return this.zzfnv.zzaja(); } }
[ "mdkhnmm@amazon.com" ]
mdkhnmm@amazon.com