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
61750590dcf36920fbf0958c7f329a7ef56d4c5c
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-70b-1-17-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/apache/commons/math/analysis/solvers/BisectionSolver_ESTest_scaffolding.java
cbf5527d251ec89e2b18df09dfe1f1e3694d38cc
[]
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
3,222
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sun Apr 05 13:26:37 UTC 2020 */ package org.apache.commons.math.analysis.solvers; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class BisectionSolver_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math.analysis.solvers.BisectionSolver"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(BisectionSolver_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.math.FunctionEvaluationException", "org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils", "org.apache.commons.math.MathException", "org.apache.commons.math.ConvergingAlgorithm", "org.apache.commons.math.ConvergenceException", "org.apache.commons.math.analysis.solvers.UnivariateRealSolver", "org.apache.commons.math.analysis.solvers.BisectionSolver", "org.apache.commons.math.ConvergingAlgorithmImpl", "org.apache.commons.math.analysis.solvers.UnivariateRealSolverImpl", "org.apache.commons.math.MathRuntimeException", "org.apache.commons.math.analysis.UnivariateRealFunction", "org.apache.commons.math.MathRuntimeException$1", "org.apache.commons.math.MathRuntimeException$2", "org.apache.commons.math.MaxIterationsExceededException", "org.apache.commons.math.MathRuntimeException$3", "org.apache.commons.math.MathRuntimeException$4", "org.apache.commons.math.MathRuntimeException$5", "org.apache.commons.math.MathRuntimeException$6", "org.apache.commons.math.MathRuntimeException$7", "org.apache.commons.math.MathRuntimeException$8", "org.apache.commons.math.MathRuntimeException$10", "org.apache.commons.math.MathRuntimeException$9" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
46b245422dab3b300906a70a7a0d94cba8e90959
15878f5f01d987acffe4168f344e7e8509c4fd64
/src/cn/com/thtf/egov/cms/entity/BrandEntity.java
6233455cd6f03ac847613c5aa775aad87e4db34e
[]
no_license
liveqmock/thtf_02_source-Deprecated
fb30fecfd84a966d382998c8df5125507e679c9a
746f10a5899b1dedceb6a33650f0398ddb19fd75
refs/heads/master
2020-04-01T23:40:10.823372
2014-01-25T10:30:11
2014-01-25T10:30:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
513
java
package cn.com.thtf.egov.cms.entity; import cn.com.thtf.egov.cms.application.BaseEntity; public class BrandEntity extends BaseEntity { private static final long serialVersionUID = -5093538170723507692L; private Integer id; private String name; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "bis@foxmail.com" ]
bis@foxmail.com
05fb779994e49eb82c7f397a0e7dee3a2245e256
5c970f96a59f3f4dc3e55d66549426a8654c0d5c
/src/main/java/com/trl/java_time/localDateTime/period/a3/a2/Experience.java
0c6a372384dad2ad40778a99cf9ff48214d95cd3
[]
no_license
Oracle-Exam-Preparation/OCA
c2c77d1c9405d1116ace9868af2c813aaa313750
21c1ca8683c630ef954ebd5b049ca2e6d2953539
refs/heads/master
2020-12-21T05:22:07.145470
2020-01-26T15:09:11
2020-01-26T15:09:11
236,320,752
1
0
null
null
null
null
UTF-8
Java
false
false
993
java
package com.trl.java_time.localDateTime.period.a3.a2; import java.time.LocalDateTime; import java.time.Period; /** * This class is created for educational purposes. * This class may contain sham information. * Always check the information you are learning. * * @author Tsyupryk Roman * @email tsyupryk.roman@gmail.com * @since 21/07/19 */ public class Experience { public static void main(String[] argv) { LocalDateTime ldt = LocalDateTime.of(2015, 5, 10, 10, 33, 44); Period p = Period.of(1, 0, 0); Period p_2 = Period.of(1, 1, 0); Period p_3 = Period.of(1, 1, 3); // Period p_4 = Period.of(1, 1, 3, 23); // Compilation Error !!! // Period p_5 = Period.of(1, 1, 3, 23, 59); // Compilation Error !!! // Period p_6 = Period.of(1, 1, 3, 23, 59); // Compilation Error !!! ldt = ldt.minus(p); System.out.println(ldt); // 2014-05-10T10:33:44 } }
[ "tsyupryk.roman.lyubomyrovych@gmail.com" ]
tsyupryk.roman.lyubomyrovych@gmail.com
52a4fad69e657fd0397027dd1d8d94c55babe8aa
9cd45a02087dac52ea4d39a0c17e525c11a8ed97
/src/java/com/chartboost/sdk/impl/bh.java
a267da9dd2564316b73e28ef455942ea8e246037
[]
no_license
abhijeetvaidya24/INFO-NDVaidya
fffb90b8cb4478399753e3c13c4813e7e67aea19
64d69250163e2d8d165e8541aec75b818c2d21c5
refs/heads/master
2022-11-29T16:03:21.503079
2020-08-12T06:00:59
2020-08-12T06:00:59
286,928,296
0
0
null
null
null
null
UTF-8
Java
false
false
3,441
java
/* * Decompiled with CFR 0.0. * * Could not load the following classes: * java.io.File * java.io.FileInputStream * java.io.FileNotFoundException * java.io.IOException * java.io.InputStream * java.lang.Object * java.lang.String * java.lang.StringBuilder * java.lang.Throwable * java.math.BigInteger * java.nio.charset.Charset */ package com.chartboost.sdk.impl; import com.chartboost.sdk.impl.bi; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.math.BigInteger; import java.nio.charset.Charset; public class bh { public static final BigInteger a; public static final BigInteger b; public static final BigInteger c; public static final BigInteger d; public static final BigInteger e; public static final BigInteger f; public static final BigInteger g; public static final BigInteger h; public static final File[] i; private static final Charset j; static { BigInteger bigInteger = a = BigInteger.valueOf((long)1024L); b = bigInteger.multiply(bigInteger); c = a.multiply(b); d = a.multiply(c); e = a.multiply(d); f = a.multiply(e); g = BigInteger.valueOf((long)1024L).multiply(BigInteger.valueOf((long)0x1000000000000000L)); h = a.multiply(g); i = new File[0]; j = Charset.forName((String)"UTF-8"); } public static FileInputStream a(File file) throws IOException { if (file.exists()) { if (!file.isDirectory()) { if (file.canRead()) { return new FileInputStream(file); } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("File '"); stringBuilder.append((Object)file); stringBuilder.append("' cannot be read"); throw new IOException(stringBuilder.toString()); } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("File '"); stringBuilder.append((Object)file); stringBuilder.append("' exists but is a directory"); throw new IOException(stringBuilder.toString()); } StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("File '"); stringBuilder.append((Object)file); stringBuilder.append("' does not exist"); throw new FileNotFoundException(stringBuilder.toString()); } /* * Loose catch block * Enabled aggressive block sorting * Enabled unnecessary exception pruning * Enabled aggressive exception aggregation * Lifted jumps to return sites */ public static byte[] b(File file) throws IOException { FileInputStream fileInputStream; void var1_5; block4 : { byte[] arrby; fileInputStream = bh.a(file); try { arrby = bi.a((InputStream)fileInputStream, file.length()); } catch (Throwable throwable) { break block4; } bi.a((InputStream)fileInputStream); return arrby; catch (Throwable throwable) { fileInputStream = null; } } bi.a((InputStream)fileInputStream); throw var1_5; } }
[ "abhijeetvaidya24@gmail.com" ]
abhijeetvaidya24@gmail.com
40383a16c6cc5706581af2bf6887fccb25ec8395
165103be7256703b3346bea0db2b9bb976f5e64c
/src/com/freshbin/pattern/mediator/example/CoffeeMachine.java
b54463e7051fca83e48d99286d6652522bf18ea7
[]
no_license
freshbin/designPattern
cbabe663198c7103bd60ede52422e4e775aca462
a5b0e57c750b4fb5c569cdeb28a679b316eb3d3e
refs/heads/master
2020-04-14T14:50:30.435796
2019-01-27T08:32:54
2019-01-27T08:32:54
163,908,794
2
0
null
null
null
null
UTF-8
Java
false
false
655
java
package com.freshbin.pattern.mediator.example; public class CoffeeMachine extends Colleague { public CoffeeMachine(Mediator mediator, String name) { super(mediator, name); // TODO Auto-generated constructor stub mediator.Register(name, this); } @Override public void SendMessage(int stateChange) { // TODO Auto-generated method stub this.GetMediator().GetMessage(stateChange, this.name); } public void StartCoffee() { System.out.println("It's time to startcoffee!"); } public void FinishCoffee() { System.out.println("After 5 minutes!"); System.out.println("Coffee is ok!"); SendMessage(0); } }
[ "343625573@qq.com" ]
343625573@qq.com
91ef80bfa5e4cb6c52a0767c366be2f7f3601475
a4cb372ced240bf1cf0a9d123bdd4a805ff05df6
/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/integration/IntegrationPropertiesEnvironmentPostProcessor.java
dc15c6ebf6f05cf64b8848a9e0d23736d22736ed
[]
no_license
ZhaoBinxian/spring-boot-maven-ben
c7ea6a431c3206959009ff5344547436e98d75ca
ebd43548bae1e35fff174c316ad154cd0e5defb3
refs/heads/master
2023-07-18T12:53:49.028864
2021-09-07T04:55:54
2021-09-07T04:55:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,913
java
/* * Copyright 2012-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.boot.autoconfigure.integration; import java.io.IOException; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.springframework.boot.SpringApplication; import org.springframework.boot.env.EnvironmentPostProcessor; import org.springframework.boot.env.OriginTrackedMapPropertySource; import org.springframework.boot.env.PropertiesPropertySourceLoader; import org.springframework.boot.origin.Origin; import org.springframework.boot.origin.OriginLookup; import org.springframework.core.Ordered; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.PropertySource; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.integration.context.IntegrationProperties; /** * An {@link EnvironmentPostProcessor} that maps the configuration of * {@code META-INF/spring.integration.properties} in the environment. * * @author Artem Bilan * @author Stephane Nicoll */ class IntegrationPropertiesEnvironmentPostProcessor implements EnvironmentPostProcessor, Ordered { @Override public int getOrder() { return Ordered.LOWEST_PRECEDENCE; } @Override public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) { Resource resource = new ClassPathResource("META-INF/spring.integration.properties"); if (resource.exists()) { registerIntegrationPropertiesPropertySource(environment, resource); } } protected void registerIntegrationPropertiesPropertySource(ConfigurableEnvironment environment, Resource resource) { PropertiesPropertySourceLoader loader = new PropertiesPropertySourceLoader(); try { OriginTrackedMapPropertySource propertyFileSource = (OriginTrackedMapPropertySource) loader .load("META-INF/spring.integration.properties", resource).get(0); environment.getPropertySources().addLast(new IntegrationPropertiesPropertySource(propertyFileSource)); } catch (IOException ex) { throw new IllegalStateException("Failed to load integration properties from " + resource, ex); } } private static final class IntegrationPropertiesPropertySource extends PropertySource<Map<String, Object>> implements OriginLookup<String> { private static final String PREFIX = "spring.integration."; private static final Map<String, String> KEYS_MAPPING; static { Map<String, String> mappings = new HashMap<>(); mappings.put(PREFIX + "channel.auto-create", IntegrationProperties.CHANNELS_AUTOCREATE); mappings.put(PREFIX + "channel.max-unicast-subscribers", IntegrationProperties.CHANNELS_MAX_UNICAST_SUBSCRIBERS); mappings.put(PREFIX + "channel.max-broadcast-subscribers", IntegrationProperties.CHANNELS_MAX_BROADCAST_SUBSCRIBERS); mappings.put(PREFIX + "error.require-subscribers", IntegrationProperties.ERROR_CHANNEL_REQUIRE_SUBSCRIBERS); mappings.put(PREFIX + "error.ignore-failures", IntegrationProperties.ERROR_CHANNEL_IGNORE_FAILURES); mappings.put(PREFIX + "endpoint.throw-exception-on-late-reply", IntegrationProperties.THROW_EXCEPTION_ON_LATE_REPLY); mappings.put(PREFIX + "endpoint.read-only-headers", IntegrationProperties.READ_ONLY_HEADERS); mappings.put(PREFIX + "endpoint.no-auto-startup", IntegrationProperties.ENDPOINTS_NO_AUTO_STARTUP); KEYS_MAPPING = Collections.unmodifiableMap(mappings); } private final OriginTrackedMapPropertySource delegate; IntegrationPropertiesPropertySource(OriginTrackedMapPropertySource delegate) { super("META-INF/spring.integration.properties", delegate.getSource()); this.delegate = delegate; } @Override public Object getProperty(String name) { return this.delegate.getProperty(KEYS_MAPPING.get(name)); } @Override public Origin getOrigin(String key) { return this.delegate.getOrigin(KEYS_MAPPING.get(key)); } } }
[ "zhaobinxian@greatyun.com" ]
zhaobinxian@greatyun.com
e497c6020c14b9a83b1b885ae7c15ac99892c0c5
e4f1888db4241aa55d112c79de0f5f0f707d23ef
/src/main/java/pokecube/core/database/abilities/v/VictoryStar.java
1b321bc1cb5f0456b6d1bbfcf277249a7ea60c56
[ "MIT" ]
permissive
Pokecube-Development/Pokecube-Mobs
c6138ea48e5f99cf0871389e26a77b9a7f487d2a
a7e99884709fe41a138aad4fad3c27bdf759b6be
refs/heads/master
2021-11-30T00:19:07.595711
2020-01-26T05:35:10
2020-01-26T05:35:10
145,360,196
3
37
MIT
2021-11-28T01:41:17
2018-08-20T03:12:44
Java
UTF-8
Java
false
false
176
java
package pokecube.core.database.abilities.v; import pokecube.core.database.abilities.Ability; public class VictoryStar extends Ability { // TODO Implement this. }
[ "elpatricimo@gmail.com" ]
elpatricimo@gmail.com
7032fecdcb74e0130cb1fcdfb6e77bd8c5433631
60d4652dc479b22b79aa6a2898fa34d28b40adf2
/net/minecraft/command/CommandCompare.java
ed94dcca11c4b89343d4586a8e31075c63ad5cc3
[]
no_license
Hexeption/Update-1.9-to-1.10
c4b8d07181065b71cf71a0ff1bd96a19377a889a
a51499263c2e792c87c8f314de9e9163166188a4
refs/heads/master
2021-01-19T04:07:29.768063
2016-12-11T18:25:57
2016-12-11T18:25:57
63,010,852
4
4
null
null
null
null
UTF-8
Java
false
false
7,408
java
package net.minecraft.command; import java.util.Collections; import java.util.List; import javax.annotation.Nullable; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.server.MinecraftServer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.gen.structure.StructureBoundingBox; public class CommandCompare extends CommandBase { /** * Gets the name of the command */ public String getCommandName() { return "testforblocks"; } /** * Return the required permission level for this command. */ public int getRequiredPermissionLevel() { return 2; } /** * Gets the usage string for the command. */ public String getCommandUsage(ICommandSender sender) { return "commands.compare.usage"; } /** * Callback for when the command is executed */ public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { if (args.length < 9) { throw new WrongUsageException("commands.compare.usage", new Object[0]); } else { sender.setCommandStat(CommandResultStats.Type.AFFECTED_BLOCKS, 0); BlockPos blockpos = parseBlockPos(sender, args, 0, false); BlockPos blockpos1 = parseBlockPos(sender, args, 3, false); BlockPos blockpos2 = parseBlockPos(sender, args, 6, false); StructureBoundingBox structureboundingbox = new StructureBoundingBox(blockpos, blockpos1); StructureBoundingBox structureboundingbox1 = new StructureBoundingBox(blockpos2, blockpos2.add(structureboundingbox.getLength())); int i = structureboundingbox.getXSize() * structureboundingbox.getYSize() * structureboundingbox.getZSize(); if (i > 524288) { throw new CommandException("commands.compare.tooManyBlocks", new Object[] {Integer.valueOf(i), Integer.valueOf(524288)}); } else if (structureboundingbox.minY >= 0 && structureboundingbox.maxY < 256 && structureboundingbox1.minY >= 0 && structureboundingbox1.maxY < 256) { World world = sender.getEntityWorld(); if (world.isAreaLoaded(structureboundingbox) && world.isAreaLoaded(structureboundingbox1)) { boolean flag = false; if (args.length > 9 && "masked".equals(args[9])) { flag = true; } i = 0; BlockPos blockpos3 = new BlockPos(structureboundingbox1.minX - structureboundingbox.minX, structureboundingbox1.minY - structureboundingbox.minY, structureboundingbox1.minZ - structureboundingbox.minZ); BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(); BlockPos.MutableBlockPos blockpos$mutableblockpos1 = new BlockPos.MutableBlockPos(); for (int j = structureboundingbox.minZ; j <= structureboundingbox.maxZ; ++j) { for (int k = structureboundingbox.minY; k <= structureboundingbox.maxY; ++k) { for (int l = structureboundingbox.minX; l <= structureboundingbox.maxX; ++l) { blockpos$mutableblockpos.setPos(l, k, j); blockpos$mutableblockpos1.setPos(l + blockpos3.getX(), k + blockpos3.getY(), j + blockpos3.getZ()); boolean flag1 = false; IBlockState iblockstate = world.getBlockState(blockpos$mutableblockpos); if (!flag || iblockstate.getBlock() != Blocks.AIR) { if (iblockstate == world.getBlockState(blockpos$mutableblockpos1)) { TileEntity tileentity = world.getTileEntity(blockpos$mutableblockpos); TileEntity tileentity1 = world.getTileEntity(blockpos$mutableblockpos1); if (tileentity != null && tileentity1 != null) { NBTTagCompound nbttagcompound = tileentity.writeToNBT(new NBTTagCompound()); nbttagcompound.removeTag("x"); nbttagcompound.removeTag("y"); nbttagcompound.removeTag("z"); NBTTagCompound nbttagcompound1 = tileentity1.writeToNBT(new NBTTagCompound()); nbttagcompound1.removeTag("x"); nbttagcompound1.removeTag("y"); nbttagcompound1.removeTag("z"); if (!nbttagcompound.equals(nbttagcompound1)) { flag1 = true; } } else if (tileentity != null) { flag1 = true; } } else { flag1 = true; } ++i; if (flag1) { throw new CommandException("commands.compare.failed", new Object[0]); } } } } } sender.setCommandStat(CommandResultStats.Type.AFFECTED_BLOCKS, i); notifyCommandListener(sender, this, "commands.compare.success", new Object[] {Integer.valueOf(i)}); } else { throw new CommandException("commands.compare.outOfWorld", new Object[0]); } } else { throw new CommandException("commands.compare.outOfWorld", new Object[0]); } } } public List<String> getTabCompletionOptions(MinecraftServer server, ICommandSender sender, String[] args, @Nullable BlockPos pos) { return args.length > 0 && args.length <= 3 ? getTabCompletionCoordinate(args, 0, pos) : (args.length > 3 && args.length <= 6 ? getTabCompletionCoordinate(args, 3, pos) : (args.length > 6 && args.length <= 9 ? getTabCompletionCoordinate(args, 6, pos) : (args.length == 10 ? getListOfStringsMatchingLastWord(args, new String[] {"masked", "all"}): Collections.<String>emptyList()))); } }
[ "minecraftfun201@gmail.com" ]
minecraftfun201@gmail.com
5171c66173eff353e8bbb8a3283e8cf3564297df
c74c2e590b6c6f967aff980ce465713b9e6fb7ef
/game-logic/src/main/java/com/bdoemu/gameserver/scripts/ai/Ai_spirit_normal.java
2a8c7ceff1bc6a7f40bca4be1c9d084848cc8f4a
[]
no_license
lingfan/bdoemu
812bb0abb219ddfc391adadf68079efa4af43353
9c49b29bfc9c5bfe3192b2a7fb1245ed459ef6c1
refs/heads/master
2021-01-01T13:10:13.075388
2019-12-02T09:23:20
2019-12-02T09:23:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,719
java
package com.bdoemu.gameserver.scripts.ai; import com.bdoemu.commons.thread.ThreadPool; import com.bdoemu.commons.utils.Rnd; import com.bdoemu.gameserver.model.ai.deprecated.*; import com.bdoemu.gameserver.model.creature.Creature; import com.bdoemu.gameserver.model.actions.enums.*; import com.bdoemu.gameserver.model.chat.enums.EChatNoticeType; import com.bdoemu.gameserver.model.misc.enums.ETradeCommerceType; import com.bdoemu.gameserver.model.weather.enums.EWeatherFactorType; import java.util.Map; import java.util.HashMap; import java.util.Date; import java.util.concurrent.TimeUnit; /** * @author H1X4 */ @SuppressWarnings("all") @IAIName("spirit_normal") public class Ai_spirit_normal extends CreatureAI { public Ai_spirit_normal(Creature actor, Map<Long, Integer> aiVariables) { super(actor, aiVariables); } protected void InitialState(double blendTime) { Creature target = getTarget(); setBehavior(EAIBehavior.idle); setState(0xAE5FEAC2L /*InitialState*/); setVariable(0xCBEEF8C7L /*_ownerDistance*/, 0); setVariable(0x762AB710L /*_UnSummonTime*/, getVariable(0xCC757928L /*AI_UnSummonTime*/)); setVariable(0x9326AD79L /*_SummonStartTime*/, 0); setVariable(0x6DDCA962L /*_IngTime*/, 0); setVariable(0x51EDA18AL /*_SummonEndTime*/, 0); setVariable(0x9326AD79L /*_SummonStartTime*/, getTime()); doAction(2514775444L /*WAIT*/, blendTime, onDoActionEnd -> scheduleState(state -> Wait(blendTime), 100)); } protected void Logic(double blendTime) { Creature target = getTarget(); setBehavior(EAIBehavior.none); setState(0x9A053101L /*Logic*/); scheduleState(state -> Wait(blendTime), 500); } protected void Wait(double blendTime) { Creature target = getTarget(); setBehavior(EAIBehavior.idle); setState(0x866C7489L /*Wait*/); setVariable(0xCBEEF8C7L /*_ownerDistance*/, getDistanceToOwner()); setVariable(0x6DDCA962L /*_IngTime*/, getTime()); setVariable(0x51EDA18AL /*_SummonEndTime*/, getVariable(0x6DDCA962L /*_IngTime*/) - getVariable(0x9326AD79L /*_SummonStartTime*/)); if (getVariable(0x51EDA18AL /*_SummonEndTime*/) > getVariable(0x762AB710L /*_UnSummonTime*/)) { if (changeState(state -> UnSummon(blendTime))) return; } if (getVariable(0xCBEEF8C7L /*_ownerDistance*/) > 400) { if (changeState(state -> Chase_Run(blendTime))) return; } doAction(2514775444L /*WAIT*/, blendTime, onDoActionEnd -> scheduleState(state -> Wait(blendTime), 2500 + Rnd.get(-500,500))); } protected void FailFindPath(double blendTime) { Creature target = getTarget(); setBehavior(EAIBehavior.idle); setState(0x80CB99B0L /*FailFindPath*/); doTeleport(EAIMoveDestType.OwnerPosition, 200, 0, 1, 1); doAction(2514775444L /*WAIT*/, blendTime, onDoActionEnd -> scheduleState(state -> Wait(blendTime), 500)); } protected void Chase_Run(double blendTime) { Creature target = getTarget(); setBehavior(EAIBehavior.walk); setState(0xD4573013L /*Chase_Run*/); if (isTargetLost()) { if (changeState(state -> Logic(blendTime))) return; } setVariable(0xCBEEF8C7L /*_ownerDistance*/, getDistanceToOwner()); setVariable(0x6DDCA962L /*_IngTime*/, getTime()); setVariable(0x51EDA18AL /*_SummonEndTime*/, getVariable(0x6DDCA962L /*_IngTime*/) - getVariable(0x9326AD79L /*_SummonStartTime*/)); if (getVariable(0x51EDA18AL /*_SummonEndTime*/) > getVariable(0x762AB710L /*_UnSummonTime*/)) { if (changeState(state -> UnSummon(blendTime))) return; } if (getVariable(0xCBEEF8C7L /*_ownerDistance*/) < 200) { if (changeState(state -> Wait(blendTime))) return; } doAction(4062859220L /*RUN*/, blendTime, onDoActionEnd -> move(EAIMoveDestType.OwnerPosition, 0, 0, 0, 40, 90, false, ENaviType.ground, () -> { return false; }, onExit -> scheduleState(state -> Chase_Run(blendTime), 500))); } protected void UnSummon(double blendTime) { Creature target = getTarget(); setBehavior(EAIBehavior.dead); setState(0xCC02DCCFL /*UnSummon*/); doAction(2544805566L /*DIE*/, blendTime, onDoActionEnd -> scheduleState(state -> UnSummon(blendTime), 1000)); } protected void Battle_Attack1(double blendTime) { Creature target = getTarget(); setBehavior(EAIBehavior.action); setState(0xB5FDC949L /*Battle_Attack1*/); doAction(31162842L /*BATTLE_ATTACK1*/, blendTime, onDoActionEnd -> changeState(state -> Wait(blendTime))); } protected void Battle_Attack2(double blendTime) { Creature target = getTarget(); setBehavior(EAIBehavior.action); setState(0xD72BCC90L /*Battle_Attack2*/); doAction(2323327157L /*BATTLE_ATTACK2*/, blendTime, onDoActionEnd -> changeState(state -> Wait(blendTime))); } protected void Battle_Attack3(double blendTime) { Creature target = getTarget(); setBehavior(EAIBehavior.action); setState(0x94302B26L /*Battle_Attack3*/); doAction(931985982L /*BATTLE_ATTACK3*/, blendTime, onDoActionEnd -> changeState(state -> Wait(blendTime))); } @Override public EAiHandlerResult HandleTakeDamage(Creature sender, Integer[] eventData) { _sender = sender; Creature target = sender; return EAiHandlerResult.BYPASS; } @Override public EAiHandlerResult OrderHT_BattleAttack1(Creature sender, Integer[] eventData) { _sender = sender; Creature target = sender; getActor().getAggroList().addCreature(sender.getAggroList().getTarget()); if (getState() != 0x672D31E4L /*DeSummon*/ && getState() != 0xB5FDC949L /*Battle_Attack1*/ && getState() != 0xD72BCC90L /*Battle_Attack2*/ && getState() != 0x94302B26L /*Battle_Attack3*/) { if (changeState(state -> Battle_Attack1(0.3))) return EAiHandlerResult.CHANGE_STATE; } return EAiHandlerResult.BYPASS; } @Override public EAiHandlerResult OrderHT_BattleAttack2(Creature sender, Integer[] eventData) { _sender = sender; Creature target = sender; getActor().getAggroList().addCreature(sender.getAggroList().getTarget()); if (getState() != 0x672D31E4L /*DeSummon*/ && getState() != 0xB5FDC949L /*Battle_Attack1*/ && getState() != 0xD72BCC90L /*Battle_Attack2*/ && getState() != 0x94302B26L /*Battle_Attack3*/) { if (changeState(state -> Battle_Attack2(0.3))) return EAiHandlerResult.CHANGE_STATE; } return EAiHandlerResult.BYPASS; } @Override public EAiHandlerResult OrderHT_BattleAttack3(Creature sender, Integer[] eventData) { _sender = sender; Creature target = sender; getActor().getAggroList().addCreature(sender.getAggroList().getTarget()); if (getState() != 0x672D31E4L /*DeSummon*/ && getState() != 0xB5FDC949L /*Battle_Attack1*/ && getState() != 0xD72BCC90L /*Battle_Attack2*/ && getState() != 0x94302B26L /*Battle_Attack3*/) { if (changeState(state -> Battle_Attack3(0.3))) return EAiHandlerResult.CHANGE_STATE; } return EAiHandlerResult.BYPASS; } }
[ "511459965@qq.com" ]
511459965@qq.com
7387e4c9315bf67ab79bce70ef6fdb8ce92a1e2f
dbf5adca095d04d7d069ecaa916e883bc1e5c73d
/x_processplatform_assemble_designer/src/main/java/com/x/processplatform/assemble/designer/jaxrs/queryview/ActionBase.java
c13df6b29bf65349e14a9e68a6a221b1ac48f974
[ "BSD-3-Clause" ]
permissive
fancylou/o2oa
713529a9d383de5d322d1b99073453dac79a9353
e7ec39fc586fab3d38b62415ed06448e6a9d6e26
refs/heads/master
2020-03-25T00:07:41.775230
2018-08-02T01:40:40
2018-08-02T01:40:40
143,169,936
0
0
BSD-3-Clause
2018-08-01T14:49:45
2018-08-01T14:49:44
null
UTF-8
Java
false
false
1,315
java
package com.x.processplatform.assemble.designer.jaxrs.queryview; import com.google.gson.Gson; import com.x.base.core.bean.BeanCopyTools; import com.x.base.core.bean.BeanCopyToolsBuilder; import com.x.base.core.gson.XGsonBuilder; import com.x.base.core.project.jaxrs.StandardJaxrsAction; import com.x.processplatform.assemble.designer.wrapin.WrapInQueryView; import com.x.processplatform.assemble.designer.wrapout.WrapOutQueryView; import com.x.processplatform.core.entity.element.QueryView; import com.x.processplatform.core.entity.query.Query; class ActionBase extends StandardJaxrsAction { static BeanCopyTools<QueryView, WrapOutQueryView> outCopier = BeanCopyToolsBuilder.create(QueryView.class, WrapOutQueryView.class, null, WrapOutQueryView.Excludes); static BeanCopyTools<WrapInQueryView, QueryView> createCopier = BeanCopyToolsBuilder.create(WrapInQueryView.class, QueryView.class, null, WrapInQueryView.CreateExcludes); static BeanCopyTools<WrapInQueryView, QueryView> updateCopier = BeanCopyToolsBuilder.create(WrapInQueryView.class, QueryView.class, null, WrapInQueryView.UpdateExcludes); static void transQuery(QueryView queryView) { Gson gson = XGsonBuilder.instance(); Query query = gson.fromJson(queryView.getData(), Query.class); queryView.setData(gson.toJson(query)); } }
[ "caixiangyi2004@126.com" ]
caixiangyi2004@126.com
25ec6869c6a6dc5fe209e468202e158084330610
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/6/6_83de8b7e9de666084d3cae30440655b017d46fd2/ClassInfoActivity/6_83de8b7e9de666084d3cae30440655b017d46fd2_ClassInfoActivity_t.java
b47fd943247acaf91dbf91d035b2c40ad6a5e2bc
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,675
java
package com.seawolfsanctuary.tmt; import java.io.InputStream; import java.text.NumberFormat; import java.util.ArrayList; import java.util.Iterator; import android.app.ExpandableListActivity; import android.os.Bundle; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; import android.widget.AbsListView; import android.widget.BaseExpandableListAdapter; import android.widget.TextView; import android.widget.Toast; public class ClassInfoActivity extends ExpandableListActivity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setListAdapter(new ClassInfoAdapter()); registerForContextMenu(getExpandableListView()); } class ClassInfoAdapter extends BaseExpandableListAdapter { ArrayList<String> entries = loadClassInfo(true); ArrayList<String[]> data = parseEntries(entries); ArrayList<String> names = new ArrayList<String>(getNames(data)); private String[] presentedNames = Helpers .arrayListToArray(getNames(data)); private String[][] presentedData = Helpers .multiArrayListToArray(getData(data)); private ArrayList<String> getNames(ArrayList<String[]> data) { ArrayList<String> names = new ArrayList<String>(); for (int i = 0; i < data.size(); i++) { String[] entry = data.get(i); names.add(entry[0]); } return names; } private ArrayList<ArrayList<String>> getData(ArrayList<String[]> entries) { ArrayList<ArrayList<String>> data = new ArrayList<ArrayList<String>>(); for (int i = 0; i < entries.size(); i++) { String[] entry = entries.get(i); ArrayList<String> split = new ArrayList<String>(); if (entry.length < 5) { String[] new_entry = new String[] { entry[0], entry[1], entry[2], entry[3], "", "" }; entry = new_entry; } try { entry[1] = NumberFormat.getIntegerInstance().format( Integer.parseInt(entry[1])) + "mm"; } catch (Exception e) { // meh } if (entry[4].length() < 1) { entry[4] = "still in service"; } split.add("Guage: " + entry[1] + "\nEngine: " + entry[2]); split.add("Built: " + entry[3] + "\nRetired: " + entry[4]); ArrayList<String> operatorList = parseOperators(entry[5]); String operators = ""; for (String operator : operatorList) { operators = operators + operator + ", "; } operators = operators.substring(0, operators.length() - 2); split.add("Operators: " + operators); data.add(split); } return data; } public Object getChild(int groupPosition, int childPosition) { return presentedData[groupPosition][childPosition]; } public long getChildId(int groupPosition, int childPosition) { return childPosition; } public int getChildrenCount(int groupPosition) { return presentedData[groupPosition].length; } public TextView getGenericView() { // Layout parameters for the ExpandableListView AbsListView.LayoutParams lp = new AbsListView.LayoutParams( ViewGroup.LayoutParams.FILL_PARENT, 64); TextView textView = new TextView(ClassInfoActivity.this); textView.setLayoutParams(lp); // Centre the text vertically textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT); // Set the text starting position textView.setPadding(36, 0, 0, 0); return textView; } public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { TextView textView = getGenericView(); textView.setText(getChild(groupPosition, childPosition).toString()); return textView; } public Object getGroup(int groupPosition) { return presentedNames[groupPosition]; } public int getGroupCount() { return presentedNames.length; } public long getGroupId(int groupPosition) { return groupPosition; } public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { TextView textView = getGenericView(); textView.setText(getGroup(groupPosition).toString()); return textView; } public boolean isChildSelectable(int groupPosition, int childPosition) { return true; } public boolean hasStableIds() { return true; } private String[] read_csv(String filename) { String[] array = {}; try { InputStream input; input = getAssets().open(filename); int size = input.available(); byte[] buffer = new byte[size]; input.read(buffer); input.close(); array = new String(buffer).split("\n"); Toast.makeText( getBaseContext(), "Loaded " + array.length + " entr" + (array.length == 1 ? "y" : "ies") + " from data file.", Toast.LENGTH_SHORT) .show(); } catch (Exception e) { String error_msg = "Error reading data file!"; } return array; } private ArrayList<String> loadClassInfo(boolean showToast) { try { ArrayList<String> array = new ArrayList<String>(); String[] classInfo = read_csv("classes.csv"); for (String infoLine : classInfo) { array.add(infoLine); } return array; } catch (Exception e) { Toast.makeText(getBaseContext(), "Error: " + e.getMessage(), Toast.LENGTH_LONG).show(); return new ArrayList<String>(); } } private ArrayList<String[]> parseEntries(ArrayList<String> entries) { ArrayList<String[]> data = new ArrayList<String[]>(); try { for (Iterator<String> i = entries.iterator(); i.hasNext();) { String str = (String) i.next(); String[] elements = str.split(","); String[] entry = new String[elements.length]; for (int j = 0; j < entry.length; j++) { entry[j] = Helpers.trimCSVSpeech(elements[j]); System.out.println(" - Found at " + j + ": " + entry[j]); } data.add(entry); } } catch (Exception e) { System.out.println(e.getMessage()); Toast.makeText(getApplicationContext(), "Error: " + e.getMessage(), Toast.LENGTH_LONG).show(); } return data; } private ArrayList<String> parseOperators(String operatorString) { ArrayList<String> operators = new ArrayList<String>(); if (operatorString.length() > 0) { String[] pipedOperators = operatorString.split("[|]"); for (String operator : pipedOperators) { operators.add(operator); } } else { operators.add("(none)"); } return operators; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
a8bcacf1c05d4629806c67acbe2d94357e54edb5
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/Cloudstack/2408_2.java
91cb248103c73d0945a94976cd16f6fc64037c2e
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
608
java
//,temp,VirtualMachineManagerImpl.java,5200,5213,temp,VirtualMachineManagerImpl.java,5189,5198 //,3 public class xxx { @ReflectionUse private Pair<JobInfo.Status, String> orchestrateReboot(final VmWorkReboot work) throws Exception { final VMInstanceVO vm = _entityMgr.findById(VMInstanceVO.class, work.getVmId()); if (vm == null) { s_logger.info("Unable to find vm " + work.getVmId()); } assert vm != null; orchestrateReboot(vm.getUuid(), work.getParams()); return new Pair<JobInfo.Status, String>(JobInfo.Status.SUCCEEDED, null); } };
[ "sgholami@uwaterloo.ca" ]
sgholami@uwaterloo.ca
c405e6e16ee3ce6f9345d8655241c3dc004a45e5
cbc61ffb33570a1bc55bb1e754510192b0366de2
/ole-app/olefs/src/main/java/org/kuali/ole/integration/cg/dto/KcObjectCode.java
d8f9034d15e9d41dde0d1a4d116a0021efff5cc9
[ "ECL-2.0" ]
permissive
VU-libtech/OLE-INST
42b3656d145a50deeb22f496f6f430f1d55283cb
9f5efae4dfaf810fa671c6ac6670a6051303b43d
refs/heads/master
2021-07-08T11:01:19.692655
2015-05-15T14:40:50
2015-05-15T14:40:50
24,459,494
1
0
ECL-2.0
2021-04-26T17:01:11
2014-09-25T13:40:33
Java
UTF-8
Java
false
false
1,538
java
/* * Copyright 2010 The Kuali Foundation. * * Licensed under the Educational Community License, Version 1.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.opensource.org/licenses/ecl1.php * * 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.kuali.ole.integration.cg.dto; public class KcObjectCode { String objectCodeName; String description; /** * Gets the objectCodeName attribute. * @return Returns the objectCodeName. */ public String getObjectCodeName() { return objectCodeName; } /** * Sets the objectCodeName attribute value. * @param objectCodeName The objectCodeName to set. */ public void setObjectCodeName(String objectCodeName) { this.objectCodeName = objectCodeName; } /** * Gets the description attribute. * @return Returns the description. */ public String getDescription() { return description; } /** * Sets the description attribute value. * @param description The description to set. */ public void setDescription(String description) { this.description = description; } }
[ "david.lacy@villanova.edu" ]
david.lacy@villanova.edu
a8912bd958d9dfefdcf201c13bbf11d62270c5a0
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/CHART-4b-6-24-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/jfree/chart/ChartFactory_ESTest.java
99ac3428588573317bee6d61e38afa7cb60df7e5
[]
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
1,214
java
/* * This file was automatically generated by EvoSuite * Sun Apr 05 13:21:41 UTC 2020 */ package org.jfree.chart; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.jfree.chart.ChartFactory; import org.jfree.chart.plot.PlotOrientation; import org.jfree.data.xy.XYDataset; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class ChartFactory_ESTest extends ChartFactory_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { XYDataset xYDataset0 = mock(XYDataset.class, new ViolatedAssumptionAnswer()); doReturn(0).when(xYDataset0).getSeriesCount(); PlotOrientation plotOrientation0 = mock(PlotOrientation.class, new ViolatedAssumptionAnswer()); // Undeclared exception! ChartFactory.createScatterPlot((String) null, (String) null, "Eq5A/,Z+`]k{.g5x", xYDataset0, plotOrientation0, false, false, true); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
ab53dadc917605d1576095194d4cda81f98ba59d
3b91ed788572b6d5ac4db1bee814a74560603578
/com/google/android/gms/c/d.java
cf624c92f00e7362c2e7d64cf2623e417f9a61b9
[]
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
220
java
package com.google.android.gms.c; import android.os.IInterface; public interface d extends IInterface { boolean av(boolean z); String bq(String str); String getId(); void i(String str, boolean z); }
[ "707194831@qq.com" ]
707194831@qq.com
6255428a45a26ef5ac030615b556ba5e8234271b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/22/22_ecc6ab754b7801f03c63cb9fac28faf4528aac8b/SkypeChatManager/22_ecc6ab754b7801f03c63cb9fac28faf4528aac8b_SkypeChatManager_t.java
fe13116716bfc55ba4780f7fcdc792a571650b28
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,665
java
/**************************************************************************** * Copyright (c) 2004 Composent, Inc. 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: * Composent, Inc. - initial API and implementation *****************************************************************************/ package org.eclipse.ecf.provider.skype; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Vector; import org.eclipse.ecf.core.identity.ID; import org.eclipse.ecf.core.identity.IDFactory; import org.eclipse.ecf.core.util.ECFException; import org.eclipse.ecf.core.util.Trace; import org.eclipse.ecf.internal.provider.skype.Activator; import org.eclipse.ecf.presence.IIMMessageListener; import org.eclipse.ecf.presence.history.IHistory; import org.eclipse.ecf.presence.history.IHistoryManager; import org.eclipse.ecf.presence.im.ChatMessageEvent; import org.eclipse.ecf.presence.im.IChat; import org.eclipse.ecf.presence.im.IChatManager; import org.eclipse.ecf.presence.im.IChatMessage; import org.eclipse.ecf.presence.im.IChatMessageSender; import org.eclipse.ecf.presence.im.ITypingMessageSender; import org.eclipse.ecf.presence.im.IChatMessage.Type; import org.eclipse.ecf.provider.skype.identity.SkypeUserID; import com.skype.Chat; import com.skype.ChatMessage; import com.skype.ChatMessageListener; import com.skype.Skype; import com.skype.SkypeException; /** * */ public class SkypeChatManager implements IChatManager { private Vector chatListeners = new Vector(); private Map chats = new HashMap(); protected void dispose() { Skype.removeChatMessageListener(chatMessageListener); chatListeners.clear(); chats.clear(); } ChatMessageListener chatMessageListener = new ChatMessageListener() { public void chatMessageReceived(ChatMessage chatMessageReceived) throws SkypeException { // TODO Auto-generated method stub Trace .trace( Activator.PLUGIN_ID, "chatMessageReceived(id=" //$NON-NLS-1$ + chatMessageReceived.getId() + ";content=" + chatMessageReceived.getContent() + ";senderid=" + chatMessageReceived.getSenderId() + ";sendername=" + chatMessageReceived.getSenderDisplayName() + ")"); //$NON-NLS-1$ fireChatMessageReceived(chatMessageReceived); } private void fireChatMessageReceived(ChatMessage chatMessageReceived) { for(Iterator i=chatListeners.iterator(); i.hasNext(); ) { IIMMessageListener l = (IIMMessageListener) i.next(); try { Chat chat = (Chat) chats.get(chatMessageReceived.getChat().getId()); if (chat != null) { ID senderID = new SkypeUserID(chatMessageReceived.getSenderId()); final IChatMessage chatMessage = new org.eclipse.ecf.presence.im.ChatMessage(senderID,IDFactory.getDefault().createStringID(chatMessageReceived.getId()),Type.CHAT,null,chatMessageReceived.getContent(),createPropertiesForChatMessage(chatMessageReceived)); l.handleMessageEvent(new ChatMessageEvent(senderID,chatMessage)); } } catch (Exception e) { // Log // TODO Auto-generated catch block e.printStackTrace(); } } } private Map createPropertiesForChatMessage( ChatMessage chatMessageReceived) { // TODO Auto-generated method stub return null; } public void chatMessageSent(ChatMessage sentChatMessage) throws SkypeException { String chatId = sentChatMessage.getChat().getId(); Chat chat = (Chat) chats.get(chatId); if (chat == null) chats.put(chatId, sentChatMessage.getChat()); Trace.trace( Activator.PLUGIN_ID, "chatMessageSent(id=" //$NON-NLS-1$ + sentChatMessage.getId() + ";content=" + sentChatMessage.getContent() + ";senderid=" + sentChatMessage.getSenderId() + ";sendername=" + sentChatMessage.getSenderDisplayName() + ")"); //$NON-NLS-1$ } }; IHistoryManager historyManager = new IHistoryManager() { public IHistory getHistory(ID targetID, Map options) { return null; } public boolean isActive() { return false; } public void setActive(boolean active) { } public Object getAdapter(Class adapter) { return null; } }; IChatMessageSender chatMessageSender = new IChatMessageSender() { public void sendChatMessage(ID toID, ID threadID, Type type, String subject, String body, Map properties) throws ECFException { if (toID == null || !(toID instanceof SkypeUserID)) throw new ECFException("Invalid Skype ID"); SkypeUserID skypeId = (SkypeUserID) toID; try { Chat chat = Skype.chat(skypeId.getName()); chat.send(body); } catch (SkypeException e) { throw new ECFException("Skype Exception",e); } } public void sendChatMessage(ID toID, String body) throws ECFException { sendChatMessage(toID,null,Type.CHAT,null,body,null); } }; /** * @param skypeContainer * @param user2 * @param userID2 * @param skypeProfile */ public SkypeChatManager() throws SkypeException { Skype.addChatMessageListener(chatMessageListener); } /* (non-Javadoc) * @see org.eclipse.ecf.presence.im.IChatManager#addMessageListener(org.eclipse.ecf.presence.IIMMessageListener) */ public void addMessageListener(IIMMessageListener listener) { chatListeners.add(listener); } /* (non-Javadoc) * @see org.eclipse.ecf.presence.im.IChatManager#getChatMessageSender() */ public IChatMessageSender getChatMessageSender() { return chatMessageSender; } /* (non-Javadoc) * @see org.eclipse.ecf.presence.im.IChatManager#getHistoryManager() */ public IHistoryManager getHistoryManager() { return historyManager; } /* (non-Javadoc) * @see org.eclipse.ecf.presence.im.IChatManager#getTypingMessageSender() */ public ITypingMessageSender getTypingMessageSender() { return null; } /* (non-Javadoc) * @see org.eclipse.ecf.presence.im.IChatManager#removeMessageListener(org.eclipse.ecf.presence.IIMMessageListener) */ public void removeMessageListener(IIMMessageListener listener) { chatListeners.remove(listener); } /* (non-Javadoc) * @see org.eclipse.ecf.presence.im.IChatManager#createChat(org.eclipse.ecf.core.identity.ID) */ public IChat createChat(ID targetUser) throws ECFException { // TODO Auto-generated method stub return null; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ab8566850a8bf9c0ca4fabb15c900ef37b292d64
35b19238244a7b96aec57b4d3d3fb195bfd16a32
/fabric/fabric-commands/src/main/java/io/fabric8/commands/VersionDeleteAction.java
393e32d25a8005bf98caaa928156bf94c2941f39
[ "Apache-2.0" ]
permissive
alns/fabric8
a91a31609115bdaa28ec00c417c21960eabdebfc
e21c2c7422d36ebf96064fe9003da50f53bcee6a
refs/heads/master
2021-01-17T21:57:26.932998
2014-07-17T12:25:55
2014-07-17T15:39:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,362
java
/** * Copyright 2005-2014 Red Hat, Inc. * * Red Hat 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 io.fabric8.commands; import io.fabric8.api.FabricService; import org.apache.felix.gogo.commands.Argument; import org.apache.felix.gogo.commands.Command; import io.fabric8.api.Container; import io.fabric8.api.Version; import org.apache.karaf.shell.console.AbstractAction; @Command(name = "version-delete", scope = "fabric", description = "Delete the specified version, together with all of its associated profile data") public class VersionDeleteAction extends AbstractAction { @Argument(index = 0, name = "version", description = "The version to delete", required = true, multiValued = false) private String versionName; private final FabricService fabricService; VersionDeleteAction(FabricService fabricService) { this.fabricService = fabricService; } public FabricService getFabricService() { return fabricService; } @Override protected Object doExecute() throws Exception { Version version = getFabricService().getVersion(versionName); if (version == null) { throw new IllegalArgumentException("Cannot find version: " + versionName); } StringBuilder sb = new StringBuilder(); for (Container container : getFabricService().getContainers()) { if (version.equals(container.getVersion())) { if (sb.length() > 0) { sb.append(", "); } sb.append(container.getId()); } } if (sb.length() > 0) { throw new IllegalArgumentException("Version " + versionName + " is still in used by the following containers: " + sb.toString()); } version.delete(); return null; } }
[ "claus.ibsen@gmail.com" ]
claus.ibsen@gmail.com
4aea3a6310fd99f90cee31fb1f606bee2c353385
d3bda7753691144cc19d97b327cbd6d387eb9615
/app/src/main/java/com/journals/asianpharmtech/ui/adapter/InPressAdapter.java
a4100e73e48a2d5e9dae6fbfc16199b1b71cf80e
[]
no_license
suresh429/asianpharmtech
81f4c7b7fd522cf13c6d397d44c74589705620f2
a1a95686a6eb49cf261b340b2de88396c7c14bf0
refs/heads/master
2023-01-04T23:54:42.982882
2020-11-02T13:42:32
2020-11-02T13:42:32
309,378,065
0
0
null
null
null
null
UTF-8
Java
false
false
4,443
java
package com.journals.asianpharmtech.ui.adapter; import android.annotation.SuppressLint; import android.content.Context; import android.os.Bundle; import android.text.Html; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.navigation.Navigation; import androidx.recyclerview.widget.RecyclerView; import com.journals.asianpharmtech.R; import com.journals.asianpharmtech.databinding.InpressItemBinding; import com.journals.asianpharmtech.model.InPressResponse; import java.util.List; import static com.journals.asianpharmtech.helper.utils.viewInBrowser; public class InPressAdapter extends RecyclerView.Adapter<InPressAdapter.ViewHolder> { List<InPressResponse.InpressDetailsBean> modelList; Context context; public InPressAdapter(List<InPressResponse.InpressDetailsBean> modelList,Context context) { this.modelList = modelList; this.context = context; } @NonNull @Override public InPressAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { return new ViewHolder(InpressItemBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false)); } @SuppressLint("SetTextI18n") @Override public void onBindViewHolder(@NonNull InPressAdapter.ViewHolder holder, int position) { holder.rowItemBinding.txtIssueType.setText(modelList.get(position).getArt_type()); holder.rowItemBinding.txtIssueTitle.setText(modelList.get(position).getTitle()); holder.rowItemBinding.txtIssueAuthor.setText(Html.fromHtml(modelList.get(position).getAuthor_names())); holder.rowItemBinding.txtIssueDOI.setText("DOI : " + modelList.get(position).getDoi_num()); if (modelList.get(position).getAbstractlink() != null && !modelList.get(position).getAbstractlink().equalsIgnoreCase("null") && !modelList.get(position).getAbstractlink().isEmpty() ) { holder.rowItemBinding.txtAbstract.setVisibility(View.VISIBLE); } else { holder.rowItemBinding.txtAbstract.setVisibility(View.GONE); } if (modelList.get(position).getPdflink() != null && !modelList.get(position).getPdflink().equalsIgnoreCase("null") && !modelList.get(position).getPdflink().isEmpty() ) { holder.rowItemBinding.txtPDF.setVisibility(View.VISIBLE); } else { holder.rowItemBinding.txtPDF.setVisibility(View.GONE); } if (modelList.get(position).getFulltextlink() != null && !modelList.get(position).getFulltextlink().equalsIgnoreCase("null") && !modelList.get(position).getFulltextlink().isEmpty() ) { holder.rowItemBinding.txtFullText.setVisibility(View.VISIBLE); } else { holder.rowItemBinding.txtFullText.setVisibility(View.GONE); } holder.rowItemBinding.txtAbstract.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Bundle bundle = new Bundle(); bundle.putString("abstractlink", modelList.get(position).getAbstractlink()); bundle.putString("ActionBarTitle","Abstract"); Navigation.findNavController(v).navigate(R.id.abstractDisplayFragment,bundle); } }); holder.rowItemBinding.txtPDF.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { viewInBrowser(context,modelList.get(position).getPdflink(),"Not Found"); } }); holder.rowItemBinding.txtFullText.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { viewInBrowser(context,modelList.get(position).getFulltextlink(),"Not Found"); } }); } @Override public int getItemCount() { return modelList.size(); } @Override public long getItemId(int position) { return position; } @Override public int getItemViewType(int position) { return position; } public static class ViewHolder extends RecyclerView.ViewHolder { InpressItemBinding rowItemBinding; public ViewHolder(@NonNull InpressItemBinding rowItemBinding) { super(rowItemBinding.getRoot()); this.rowItemBinding = rowItemBinding; } } }
[ "ksuresh.unique@gmail.com" ]
ksuresh.unique@gmail.com
0c498dae04754b81a83b71d068ef0b1d0e1c6b61
1ef2c6182582592157414cd0aaf0a3f629e1bf25
/joy-web/src/main/java/org/joy/web/spmvc/modules/sysres/datasrc/controller/SysDataSrcController.java
e21a89a49dfe853b0ad61a27ddec3e28c9886394
[]
no_license
zenjava/joy
95af28c0eeb7213ae2a42a12f9a8e41d29b8fda9
dc1eb57dfe0429455b18c833302ef2b34fd7d0a5
refs/heads/master
2021-01-22T19:30:44.484376
2014-10-31T06:06:16
2014-10-31T06:06:18
34,838,163
1
0
null
2015-04-30T06:30:54
2015-04-30T06:30:54
null
UTF-8
Java
false
false
604
java
package org.joy.web.spmvc.modules.sysres.datasrc.controller; import org.joy.core.sysres.datasrc.model.po.TSysDataSrc; import org.joy.web.spmvc.core.BaseCrudController; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; /** * * @since 1.0.0 * @author Kevice * @time 2013年10月15日 下午11:27:05 */ @Controller @RequestMapping("/sysDataSrc") public class SysDataSrcController extends BaseCrudController<TSysDataSrc> { @Override protected String getCurrentViewName() { return "joy/commons/core/sysres/dataSrc/sysDataSrc"; } }
[ "kevice@qq.com" ]
kevice@qq.com
562e6150cddcbfd23e2d80f0dd6e68d89db77dba
ff068557ef56c9de94196fbca36f872e5c09dcef
/src/main/java/com/kurtomerfaruk/primeadminbsb/converters/EmployeedepartmenthistoryConverter.java
efc0f38e6b922907d1e58e31c0bb198ff095ee60
[]
no_license
anumber8/PrimeFacesAdminBSB
97ff9f094ff289ecf4142c30cca4d3d5da277e18
197c2cc58bdd610185c0fd1d5613bc6ae7af8d4e
refs/heads/master
2021-01-20T04:53:44.009333
2017-08-16T20:23:31
2017-08-16T20:23:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,910
java
package com.kurtomerfaruk.primeadminbsb.converters; import com.kurtomerfaruk.primeadminbsb.models.Employeedepartmenthistory; import com.kurtomerfaruk.primeadminbsb.services.EmployeedepartmenthistoryFacade; import com.kurtomerfaruk.primeadminbsb.controllers.util.JsfUtil; import java.util.logging.Level; import java.util.logging.Logger; import javax.faces.convert.FacesConverter; import javax.inject.Inject; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.convert.Converter; @FacesConverter(value = "employeedepartmenthistoryConverter") public class EmployeedepartmenthistoryConverter implements Converter { @Inject private EmployeedepartmenthistoryFacade ejbFacade; private static final String SEPARATOR = "#"; private static final String SEPARATOR_ESCAPED = "\\#"; @Override public Object getAsObject(FacesContext facesContext, UIComponent component, String value) { if (value == null || value.length() == 0 || JsfUtil.isDummySelectItem(component, value)) { return null; } return this.ejbFacade.find(getKey(value)); } com.kurtomerfaruk.primeadminbsb.models.EmployeedepartmenthistoryPK getKey(String value) { com.kurtomerfaruk.primeadminbsb.models.EmployeedepartmenthistoryPK key; String values[] = value.split(SEPARATOR_ESCAPED); key = new com.kurtomerfaruk.primeadminbsb.models.EmployeedepartmenthistoryPK(); key.setBusinessEntityID(Integer.parseInt(values[0])); key.setDepartmentID(Short.parseShort(values[1])); key.setShiftID(Short.parseShort(values[2])); key.setStartDate(java.sql.Date.valueOf(values[3])); return key; } String getStringKey(com.kurtomerfaruk.primeadminbsb.models.EmployeedepartmenthistoryPK value) { StringBuffer sb = new StringBuffer(); sb.append(value.getBusinessEntityID()); sb.append(SEPARATOR); sb.append(value.getDepartmentID()); sb.append(SEPARATOR); sb.append(value.getShiftID()); sb.append(SEPARATOR); sb.append(value.getStartDate()); return sb.toString(); } @Override public String getAsString(FacesContext facesContext, UIComponent component, Object object) { if (object == null || (object instanceof String && ((String) object).length() == 0)) { return null; } if (object instanceof Employeedepartmenthistory) { Employeedepartmenthistory o = (Employeedepartmenthistory) object; return getStringKey(o.getEmployeedepartmenthistoryPK()); } else { Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, "object {0} is of type {1}; expected type: {2}", new Object[]{object, object.getClass().getName(), Employeedepartmenthistory.class.getName()}); return null; } } }
[ "kurtomerfaruk@gmail.com" ]
kurtomerfaruk@gmail.com
7065054e7b8505638774e1b117fc362135ec8a40
f908decc10bb6b5e4f41be10c032484fae239977
/src/Facade/copy/MobileShop.java
3ebb2f7b73223e4820a58ad13f214b7455fa81c5
[]
no_license
RenjithKI/deSignPatternJava
75bbb654e6c7d399861eefad7a59cb4f124d2018
d0bd37ff301337c6c3e63abadff725b5a930b98f
refs/heads/master
2021-04-30T00:02:19.621036
2018-05-09T01:08:06
2018-05-09T01:08:06
121,567,874
1
0
null
2018-05-09T01:08:07
2018-02-14T22:18:45
Java
UTF-8
Java
false
false
387
java
package Facade.copy; /**https://www.javatpoint.com/facade-pattern * @author Renjith Facade Pattern A Facade Pattern says that just "just provide a unified and simplified interface to a set of interfaces in a subsystem, therefore it hides the complexities of the subsystem from the client". */ public interface MobileShop { public void modelNo(); public void price(); }
[ "renjith.kachappilly@gmail.com" ]
renjith.kachappilly@gmail.com
9f20c2a08c4aff4f998157c110cdd1a45765889b
ed485890395b0adc7b6544986c5cbdb5098caaaa
/src/main/java/com/qinfei/qferp/controller/statistics/StatisticsOverviewController.java
228e0b786bd5ba134314f6f4f9990420d6c66f6f
[]
no_license
xeon-ye/croa
ef44a2a3815badd216cd93d829d810d84ef34ffc
fc3806685f9b4676fcaa9cec940f902c4bfcff7f
refs/heads/master
2023-02-23T13:21:18.820765
2021-01-28T11:01:37
2021-01-28T11:01:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,264
java
package com.qinfei.qferp.controller.statistics; import com.qinfei.core.ResponseData; import com.qinfei.core.annotation.Verify; import com.qinfei.core.log.OperateType; import com.qinfei.core.log.annotation.Log; import com.qinfei.qferp.service.statistics.IStatisticsOverviewService; import com.github.pagehelper.PageInfo; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; import org.springframework.data.web.PageableDefault; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.Map; /** *统计概况 */ @Controller @RequestMapping("/statisticsOverview") class StatisticsOverviewController { @Autowired private IStatisticsOverviewService statisticsOverviewService; @PostMapping("getStatisticsById") @Log(opType = OperateType.QUERY, note = "不同维度的统计总数", module = "统计概况") @ResponseBody public ResponseData getStatisticsById(@RequestParam Map map){ return ResponseData.ok().putDataValue("result",statisticsOverviewService.getStatisticsById(map)); } @PostMapping("listMediaTypeStatisticsById") @Log(opType = OperateType.QUERY, note = "不同维度板块占比", module = "统计概况") @ResponseBody public ResponseData listMediaTypeStatisticsById(@RequestParam Map map){ return ResponseData.ok().putDataValue("result",statisticsOverviewService.listMediaTypeStatisticsById(map)); } @PostMapping("listTrendStatisticsById") @Log(opType = OperateType.QUERY, note = "不同维度趋势图,按时间排序", module = "统计概况") @ResponseBody public ResponseData listTrendStatisticsById(@RequestParam Map map){ return ResponseData.ok().putDataValue("list",statisticsOverviewService.listTrendStatisticsById(map)); } @PostMapping("listMediaStatisticsByCustId") @Log(opType = OperateType.QUERY, note = "分页查询客户涉及媒体列表", module = "统计概况/客户维度") @ResponseBody public PageInfo<Map> listMediaStatisticsByCustId(@PageableDefault() Pageable pageable, @RequestParam Map map){ return statisticsOverviewService.listMediaStatisticsByCustId(map,pageable.getPageNumber(),pageable.getPageSize()); } @PostMapping("listCustStatisticsBybusinessId") @Log(opType = OperateType.QUERY, note = "分页查询业务员涉及的客户列表", module = "统计概况/业务员维度") @ResponseBody public PageInfo<Map> listCustStatisticsBybusinessId(@PageableDefault() Pageable pageable, @RequestParam Map map){ return statisticsOverviewService.listCustStatisticsBybusinessId(map,pageable.getPageNumber(),pageable.getPageSize()); } @PostMapping("listMediaStatisticsByMediaUserId") @Log(opType = OperateType.QUERY, note = "分页查询媒介涉及媒体列表", module = "统计概况/媒介维度") @ResponseBody public PageInfo<Map> listMediaStatisticsByMediaUserId(@PageableDefault() Pageable pageable, @RequestParam Map map){ return statisticsOverviewService.listMediaStatisticsByMediaUserId(map,pageable.getPageNumber(),pageable.getPageSize()); } @PostMapping("listMediaStatisticsByMediaTypeId") @Log(opType = OperateType.QUERY, note = "分页查询板块涉及媒体列表", module = "统计概况/板块维度") @ResponseBody public PageInfo<Map> listMediaStatisticsByMediaTypeId(@PageableDefault() Pageable pageable, @RequestParam Map map){ return statisticsOverviewService.listMediaStatisticsByMediaTypeId(map,pageable.getPageNumber(),pageable.getPageSize()); } @PostMapping("listCustStatisticsByMediaId") @Log(opType = OperateType.QUERY, note = "分页查询媒体涉及的客户列表", module = "统计概况/媒体维度") @ResponseBody public PageInfo<Map> listCustStatisticsByMediaId(@PageableDefault() Pageable pageable, @RequestParam Map map){ return statisticsOverviewService.listCustStatisticsByMediaId(map,pageable.getPageNumber(),pageable.getPageSize()); } @PostMapping("listMediaStatisticsBySupplierId") @Log(opType = OperateType.QUERY, note = "分页查询供应商涉及媒体列表", module = "统计概况/板块维度") @ResponseBody public PageInfo<Map> listMediaStatisticsBySupplierId(@PageableDefault() Pageable pageable, @RequestParam Map map){ return statisticsOverviewService.listMediaStatisticsBySupplierId(map,pageable.getPageNumber(),pageable.getPageSize()); } @GetMapping("statisticsOverviewRankingExport") @Log(opType = OperateType.QUERY, note = "列表导出", module = "统计概况/导出列表") public void statisticsOverviewRankingExport(HttpServletResponse response, @RequestParam Map map) throws Exception { statisticsOverviewService.statisticsOverviewRankingExport(response,map); } @GetMapping("statisticsOverviewPermission") @Verify(code = "/statisticsOverview/statisticsOverviewPermission", module = "统计概况权限控制", action = "4") @ResponseBody public ResponseData statisticsOverviewPermission() { return ResponseData.ok(); } }
[ "649681131@qq.com" ]
649681131@qq.com
03412feb212b00397ec171569653aa10a53a26e5
2f4a058ab684068be5af77fea0bf07665b675ac0
/app/com/karmascience/gifts/controllers/ProductsManager$ProductImageDimensionHolder.java
5db55dc59a34532e752ac0b7f3dd5d018ef88faa
[]
no_license
cengizgoren/facebook_apk_crack
ee812a57c746df3c28fb1f9263ae77190f08d8d2
a112d30542b9f0bfcf17de0b3a09c6e6cfe1273b
refs/heads/master
2021-05-26T14:44:04.092474
2013-01-16T08:39:00
2013-01-16T08:39:00
8,321,708
1
0
null
null
null
null
UTF-8
Java
false
false
591
java
package com.karmascience.gifts.controllers; final class ProductsManager$ProductImageDimensionHolder { final int a = paramArrayOfInt1[0]; final int b = paramArrayOfInt1[1]; final int c = paramArrayOfInt2[0]; final int d = paramArrayOfInt2[1]; public ProductsManager$ProductImageDimensionHolder(int[] paramArrayOfInt1, int[] paramArrayOfInt2) { } } /* Location: /data1/software/jd-gui/com.facebook.katana_2.0_liqucn.com-dex2jar.jar * Qualified Name: com.karmascience.gifts.controllers.ProductsManager.ProductImageDimensionHolder * JD-Core Version: 0.6.0 */
[ "macluz@msn.com" ]
macluz@msn.com
03f6db679cb56c1c84cdf5e3f06694d154ae56c0
37515a0a63e3e6e62ba5104567201d2f14360f13
/edu.fudan.langlab.uidl.domain/src/main/java/edu/fudan/langlab/uidl/domain/app/client/WorkbenchPresenterProxy.java
e8fed4d79f411027c338acd414daa0debe76bf4d
[]
no_license
rockguo2015/newmed
9d95e161ba7cb9c59b24c4fb0bec2eb328214831
b4818912e5bbc6e0147d47e8ba475c0ac5c80c2e
refs/heads/master
2021-01-10T05:16:25.491087
2015-05-29T10:03:23
2015-05-29T10:03:23
36,384,873
0
0
null
null
null
null
UTF-8
Java
false
false
213
java
package edu.fudan.langlab.uidl.domain.app.client; import com.uniquesoft.gwt.client.common.Presenter; public interface WorkbenchPresenterProxy extends WorkbenchPartProxy{ Presenter<?> getPresenter(); }
[ "rock.guo@me.com" ]
rock.guo@me.com
a19bb8d292394b4b303b9d0a01080f18553f307d
d38afb4d31e0574dd2086fc84e5d664aecc77f5c
/com/planet_ink/coffee_mud/Abilities/Thief/Thief_Sap.java
ac3df9ddff5e57fc761f5c5f645e083f984e16b0
[ "Apache-2.0" ]
permissive
Dboykey/CoffeeMud
c4775fc6ec9e910ff7ff8523c04567a580a9529e
844704805d3de26a16b83bd07552d6ae82391208
refs/heads/master
2022-04-16T07:07:22.004847
2020-04-06T17:55:33
2020-04-06T17:55:33
255,074,559
0
1
Apache-2.0
2020-04-12T12:10:07
2020-04-12T12:10:06
null
UTF-8
Java
false
false
7,008
java
package com.planet_ink.coffee_mud.Abilities.Thief; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2002-2020 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ public class Thief_Sap extends ThiefSkill implements HealthCondition { @Override public String ID() { return "Thief_Sap"; } private final static String localizedName = CMLib.lang().L("Sap"); @Override public String name() { return localizedName; } private final static String localizedStaticDisplay = CMLib.lang().L("(Knocked out)"); @Override public String displayText() { return localizedStaticDisplay; } @Override protected int canAffectCode() { return CAN_MOBS; } @Override protected int canTargetCode() { return CAN_MOBS; } @Override public int abstractQuality() { return Ability.QUALITY_MALICIOUS; } private static final String[] triggerStrings =I(new String[] {"SAP"}); @Override public String[] triggerStrings() { return triggerStrings; } @Override public int usageType() { return USAGE_MOVEMENT; } @Override public int classificationCode() { return Ability.ACODE_THIEF_SKILL|Ability.DOMAIN_DIRTYFIGHTING; } @Override public String getHealthConditionDesc() { return "Unconscious"; } @Override public boolean okMessage(final Environmental myHost, final CMMsg msg) { if(!(affected instanceof MOB)) return true; final MOB mob=(MOB)affected; // when this spell is on a MOBs Affected list, // it should consistantly prevent the mob // from trying to do ANYTHING except sleep if((msg.amISource(mob))&&(!msg.sourceMajor(CMMsg.MASK_ALWAYS))) { if((msg.sourceMajor(CMMsg.MASK_EYES)) ||(msg.sourceMajor(CMMsg.MASK_HANDS)) ||(msg.sourceMajor(CMMsg.MASK_MOUTH)) ||(msg.sourceMajor(CMMsg.MASK_MOVE))) { if(msg.sourceMessage()!=null) mob.tell(L("You are way too drowsy.")); return false; } } return super.okMessage(myHost,msg); } @Override public void affectPhyStats(final Physical affected, final PhyStats affectableStats) { super.affectPhyStats(affected,affectableStats); // when this spell is on a MOBs Affected list, // it should consistantly put the mob into // a sleeping state, so that nothing they do // can get them out of it. affectableStats.setDisposition(affectableStats.disposition()|PhyStats.IS_SLEEPING); } @Override public void unInvoke() { // undo the affects of this spell if(!(affected instanceof MOB)) return; final MOB mob=(MOB)affected; super.unInvoke(); if(canBeUninvoked()) { if((mob.location()!=null)&&(!mob.amDead())) { mob.location().show(mob,null,CMMsg.MSG_OK_ACTION,L("<S-NAME> regain(s) consciousness.")); CMLib.commands().postStand(mob,true, false); } else mob.tell(L("You regain consciousness.")); } } @Override public int castingQuality(final MOB mob, final Physical target) { if(mob!=null) { if(mob.isInCombat()) return Ability.QUALITY_INDIFFERENT; if(!(target instanceof MOB)) return Ability.QUALITY_INDIFFERENT; if(CMLib.flags().canBeSeenBy(mob,(MOB)target)) return Ability.QUALITY_INDIFFERENT; if(mob.baseWeight()<(((MOB)target).baseWeight()-100)) return Ability.QUALITY_INDIFFERENT; } return super.castingQuality(mob,target); } @Override public boolean invoke(final MOB mob, final List<String> commands, final Physical givenTarget, final boolean auto, final int asLevel) { final MOB target=this.getTarget(mob,commands,givenTarget); if(target==null) return false; if(!auto) { if(mob.isInCombat()) { mob.tell(L("Not while you are fighting!")); return false; } if(CMLib.flags().canBeSeenBy(mob,target)) { mob.tell(L("@x1 is watching you way too closely.",target.name(mob))); return false; } if(mob.baseWeight()<(target.baseWeight()-100)) { mob.tell(L("@x1 is too big to knock out!",target.name(mob))); return false; } } if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; int levelDiff=target.phyStats().level()-(mob.phyStats().level()+(2*getXLEVELLevel(mob))); if(levelDiff>0) levelDiff=levelDiff*3; else levelDiff=0; // now see if it worked final boolean hit=(auto)||CMLib.combat().rollToHit(mob,target); boolean success=proficiencyCheck(mob,(-levelDiff)+(-((target.charStats().getStat(CharStats.STAT_STRENGTH)-mob.charStats().getStat(CharStats.STAT_STRENGTH)))),auto)&&(hit); if(success) { invoker=mob; final CMMsg msg=CMClass.getMsg(mob,target,this,CMMsg.MSG_THIEF_ACT|CMMsg.MASK_SOUND|CMMsg.MSK_MALICIOUS_MOVE|(auto?CMMsg.MASK_ALWAYS:0),auto?"":L("^F^<FIGHT^><S-NAME> sneak(s) up behind <T-NAMESELF> and whack(s) <T-HIM-HER> on the head!^</FIGHT^>^?")); CMLib.color().fixSourceFightColor(msg); if(mob.location().okMessage(mob,msg)) { mob.location().send(mob,msg); if(msg.value()<=0) { target.location().show(target,null, CMMsg.MSG_OK_ACTION,L("<S-NAME> hit(s) the floor!")); success=maliciousAffect(mob,target,asLevel,3,-1)!=null; final Set<MOB> H=mob.getGroupMembers(new HashSet<MOB>()); MOB M=null; mob.makePeace(true); for (final Object element : H) { M=(MOB)element; if(M.getVictim()==target) M.setVictim(null); } } } } else return maliciousFizzle(mob,target,L("<S-NAME> sneak(s) up and attempt(s) to knock <T-NAMESELF> out, but fail(s).")); // return whether it worked return success; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
bb62ba582512c3e3165d5b9de2ee9cb6e70fb1b7
5c3c4fde730a650b698446291b039241ab8c1651
/common/src/main/java/com/learn/hanjx/design/memento/Memento.java
77ebd30c38cb817a1d90e3b05ac0387b4b262cc9
[]
no_license
mvphjx/learn
f7462a3abe77e8306d9b5fbe90df052a9caac17a
1795e6360e353cb4820afa66715d53b3dcc26b73
refs/heads/master
2022-12-05T19:30:20.043567
2021-07-01T03:16:18
2021-07-01T03:16:18
92,476,292
2
0
null
2022-11-16T07:41:33
2017-05-26T05:42:04
JavaScript
UTF-8
Java
false
false
334
java
package com.learn.hanjx.design.memento; /** * 备忘录对象 * 当前对象快照,用于备份、还原 */ public class Memento { private String value; public Memento(String value) { this.value = value; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } }
[ "511572653@qq.com" ]
511572653@qq.com
6138eb385971ed7f38310c784135ff33eb9de88d
8b4acacda36c6a252c557988edc110377148c50b
/aliyun-java-sdk-sofa/src/main/java/com/aliyuncs/sofa/model/v20190815/UpdateMsSgRouterRuleGroupsRequest.java
f8ac66cf0dc56846d7a1528602ac1314506f76f6
[ "Apache-2.0" ]
permissive
huangbncly/aliyun-openapi-java-sdk
f8cb1bb7b124976a7ef18afd47bbd5fcb6d8ea19
d22f77c6d5b08c720b9ce56afe22ea6e2744b03c
refs/heads/master
2021-07-21T12:55:22.159198
2020-07-24T08:29:31
2020-07-24T08:29:31
199,572,334
0
0
NOASSERTION
2020-05-15T04:59:44
2019-07-30T04:07:24
Java
UTF-8
Java
false
false
3,559
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.sofa.model.v20190815; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.sofa.Endpoint; /** * @author auto create * @version */ public class UpdateMsSgRouterRuleGroupsRequest extends RpcAcsRequest<UpdateMsSgRouterRuleGroupsResponse> { private Long dispatchVersion; private String rules; private String type; private Long enabled; private String operator; private String appName; private Long id; private String instanceId; private String dataId; public UpdateMsSgRouterRuleGroupsRequest() { super("SOFA", "2019-08-15", "UpdateMsSgRouterRuleGroups", "ApplySidecarCert"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public Long getDispatchVersion() { return this.dispatchVersion; } public void setDispatchVersion(Long dispatchVersion) { this.dispatchVersion = dispatchVersion; if(dispatchVersion != null){ putBodyParameter("DispatchVersion", dispatchVersion.toString()); } } public String getRules() { return this.rules; } public void setRules(String rules) { this.rules = rules; if(rules != null){ putBodyParameter("Rules", rules); } } public String getType() { return this.type; } public void setType(String type) { this.type = type; if(type != null){ putBodyParameter("Type", type); } } public Long getEnabled() { return this.enabled; } public void setEnabled(Long enabled) { this.enabled = enabled; if(enabled != null){ putBodyParameter("Enabled", enabled.toString()); } } public String getOperator() { return this.operator; } public void setOperator(String operator) { this.operator = operator; if(operator != null){ putBodyParameter("Operator", operator); } } public String getAppName() { return this.appName; } public void setAppName(String appName) { this.appName = appName; if(appName != null){ putBodyParameter("AppName", appName); } } public Long getId() { return this.id; } public void setId(Long id) { this.id = id; if(id != null){ putBodyParameter("Id", id.toString()); } } public String getInstanceId() { return this.instanceId; } public void setInstanceId(String instanceId) { this.instanceId = instanceId; if(instanceId != null){ putBodyParameter("InstanceId", instanceId); } } public String getDataId() { return this.dataId; } public void setDataId(String dataId) { this.dataId = dataId; if(dataId != null){ putBodyParameter("DataId", dataId); } } @Override public Class<UpdateMsSgRouterRuleGroupsResponse> getResponseClass() { return UpdateMsSgRouterRuleGroupsResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
478d91b90a7228cf95ac1e8bb915d2382b6459e4
217cb8e0b447d453b013e3d95598e638b2c0c29c
/src/main/java/com/galileoindonesia/schema/pnr/QueueErrText.java
7e2158c38962f3ce8600bc7528d8bde6e85996ff
[]
no_license
sfranklyn/segcounter
798e1853d2eb70901871273b1d1e74b39b7a2da7
c4d0ca8ee10465a2d1c485b117d75cca87145506
refs/heads/master
2021-01-10T04:17:42.184081
2015-12-12T09:05:35
2015-12-12T09:05:35
47,546,047
0
0
null
null
null
null
UTF-8
Java
false
false
2,533
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-548 // 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: 2009.03.31 at 11:27:25 AM ICT // package com.galileoindonesia.schema.pnr; import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element ref="{http://www.galileoindonesia.com/schema/PNR}ErrText"/> * &lt;element ref="{http://www.galileoindonesia.com/schema/PNR}TextMsg"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "errText", "textMsg" }) @XmlRootElement(name = "QueueErrText") public class QueueErrText implements Serializable { @XmlElement(name = "ErrText", required = true) protected ErrText errText; @XmlElement(name = "TextMsg", required = true) protected TextMsg textMsg; /** * Gets the value of the errText property. * * @return * possible object is * {@link ErrText } * */ public ErrText getErrText() { return errText; } /** * Sets the value of the errText property. * * @param value * allowed object is * {@link ErrText } * */ public void setErrText(ErrText value) { this.errText = value; } /** * Gets the value of the textMsg property. * * @return * possible object is * {@link TextMsg } * */ public TextMsg getTextMsg() { return textMsg; } /** * Sets the value of the textMsg property. * * @param value * allowed object is * {@link TextMsg } * */ public void setTextMsg(TextMsg value) { this.textMsg = value; } }
[ "sfranklyn@gmail.com" ]
sfranklyn@gmail.com
442181df949ed3a9a1f94cd36fae41e6769679e3
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_b5b851e4cc4205c0c3f8444118bfc7b03565e0e8/PlayerListCommand/5_b5b851e4cc4205c0c3f8444118bfc7b03565e0e8_PlayerListCommand_t.java
54fb3d5912bb3e504431df09b8c901cd7e94372a
[]
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,382
java
package to.joe.j2mc.info.command; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import to.joe.j2mc.core.J2MC_Manager; import to.joe.j2mc.core.command.MasterCommand; import to.joe.j2mc.info.J2MC_Info; public class PlayerListCommand extends MasterCommand { J2MC_Info plugin; public PlayerListCommand(J2MC_Info Info) { super(Info); this.plugin = Info; } @Override public void exec(CommandSender sender, String commandName, String[] args, Player player, boolean isPlayer) { if (!sender.hasPermission("j2mc.core.admin")) { int total = 0; for(Player derp : plugin.getServer().getOnlinePlayers()){ if(!J2MC_Manager.getVisibility().isVanished(derp)){ total++; } } sender.sendMessage(ChatColor.AQUA + "Players (" + total + "/" + plugin.getServer().getMaxPlayers() + "):"); if (total == 0) { sender.sendMessage(ChatColor.RED + "No one is online :("); return; } StringBuilder builder = new StringBuilder(); for (Player pl : plugin.getServer().getOnlinePlayers()) { if (!J2MC_Manager.getVisibility().isVanished(pl)) { String toAdd; toAdd = pl.getDisplayName(); if(J2MC_Manager.getPermissions().hasFlag(pl.getName(), 'd')){ toAdd = ChatColor.GOLD + pl.getName(); } builder.append(toAdd + ChatColor.WHITE + ", "); if (builder.length() > 75) { builder.setLength(builder.length() - (toAdd + ChatColor.WHITE + ", ").length()); sender.sendMessage(builder.toString()); builder = new StringBuilder(); builder.append(toAdd + ChatColor.WHITE + ", "); } } } builder.setLength(builder.length() - 2); sender.sendMessage(builder.toString()); } else { sender.sendMessage(ChatColor.AQUA + "Players (" + plugin.getServer().getOnlinePlayers().length + "/" + plugin.getServer().getMaxPlayers() + "):"); if (plugin.getServer().getOnlinePlayers().length == 0) { sender.sendMessage(ChatColor.RED + "No one is online :("); return; } StringBuilder builder = new StringBuilder(); for (Player pl : plugin.getServer().getOnlinePlayers()) { String toAdd = ""; toAdd = ChatColor.GREEN + pl.getName(); if(J2MC_Manager.getPermissions().hasFlag(pl.getName(), 't')){ toAdd = ChatColor.DARK_GREEN + pl.getName(); } if(J2MC_Manager.getPermissions().hasFlag(pl.getName(), 'd')){ toAdd = ChatColor.GOLD + pl.getName(); } if(pl.hasPermission("j2mc.chat.mute")){ toAdd = ChatColor.YELLOW + pl.getName(); } if(pl.hasPermission("j2mc.core.admin")){ toAdd = ChatColor.RED + pl.getName(); } if(J2MC_Manager.getVisibility().isVanished(pl)){ toAdd = ChatColor.AQUA + pl.getName(); } if(J2MC_Manager.getPermissions().hasFlag(pl.getName(), 'N')){ toAdd += ChatColor.DARK_AQUA + "\u00ab\u00bb"; } if(J2MC_Manager.getPermissions().hasFlag(pl.getName(), 'k')){ toAdd += ChatColor.RED + "&"; } builder.append(toAdd + ChatColor.WHITE + ", "); if (builder.length() > 75) { builder.setLength(builder.length() - (toAdd + ChatColor.WHITE + ", ").length()); sender.sendMessage(builder.toString()); builder = new StringBuilder(); builder.append(toAdd + ChatColor.WHITE + ", "); } } builder.setLength(builder.length() - 2); sender.sendMessage(builder.toString()); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d4b7e41eef594fbe7c478f61b76302f4911b6ab7
36fea8025460bd257c753a93dd3f27472892b4bc
/root/prj/sol/projects/renew2.5source/renew2.5/src/Diagram/src/de/renew/diagram/DiagramTextTool.java
a021dbc953ca4c007fc9d5e585fe33d3694bea89
[]
no_license
Glost/db_nets_renew_plugin
ac84461e7779926b7ad70b2c7724138dc0d7242f
def4eaf7e55d79b9093bd59c5266804b345e8595
refs/heads/master
2023-05-05T00:02:12.504536
2021-05-25T22:36:13
2021-05-25T22:36:13
234,759,037
0
0
null
2021-05-04T23:37:39
2020-01-18T15:59:33
Java
UTF-8
Java
false
false
407
java
/* * Created on Apr 16, 2003 */ package de.renew.diagram; import CH.ifa.draw.figures.TextFigure; import CH.ifa.draw.figures.TextTool; import CH.ifa.draw.framework.DrawingEditor; /** * @author Lawrence Cabac */ public class DiagramTextTool extends TextTool implements IDiagramElement { public DiagramTextTool(DrawingEditor editor, TextFigure prototype) { super(editor, prototype); } }
[ "anton19979@yandex.ru" ]
anton19979@yandex.ru
f715342aab6f1459b995d6a20cdc1208cb2fdd7d
e76c78aa9208564b09bff5535610b470323ff876
/OptimisY3/ProgrammingModel/runtime/integratedtoolkit/src/integratedtoolkit/types/message/td/MonitoringDataRequest.java
546d1ef2743ea80462b624bb75c8ae524a963c8c
[ "Apache-2.0" ]
permissive
ldionmarcil/optimistoolkit
d9bb06e6e1e7262323cff553fc53b32d3b8bba8a
5733efef99d523de19f6be4a819ddc6b9f755499
refs/heads/master
2021-01-21T21:22:20.528698
2013-06-07T21:52:35
2013-06-07T21:52:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,110
java
/* * Copyright 2002-2011 Barcelona Supercomputing Center (www.bsc.es) * * 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 integratedtoolkit.types.message.td; /** * The MonitoringDataRequest class represents a request to obtain the current * resources and cores that can be run */ public class MonitoringDataRequest extends TDMessage { /** * Constructs a new TaskStateRequest * @param sem semaphore where to synchronize until the current state is * described */ public MonitoringDataRequest() { super(TDMessageType.MONITOR_DATA); } }
[ "A136603@ES-CNU2040FVS.es.int.atosorigin.com" ]
A136603@ES-CNU2040FVS.es.int.atosorigin.com
ba4ba8e8180d377310c7391fdacadfba918d90be
d2ec11f7ac1bf5e731edca317c879bb3e60f620e
/src/test/java/com/lambdaworks/redis/commands/rx/HashRxCommandTest.java
cc97c4c67ec61cdc0cdb235ef1adbb04f00dabe0
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
taer/lettuce
772b52dc377ecda6ec5a2fb902302d3448bcb4c4
62eaf9e8695c0cf172f389f8d63fbea7c95ee021
refs/heads/master
2021-01-16T17:51:32.127411
2016-04-28T19:15:03
2016-04-28T19:15:03
31,087,916
1
1
null
2015-02-20T22:19:31
2015-02-20T22:19:30
Java
UTF-8
Java
false
false
382
java
package com.lambdaworks.redis.commands.rx; import com.lambdaworks.redis.api.sync.RedisCommands; import com.lambdaworks.redis.commands.HashCommandTest; public class HashRxCommandTest extends HashCommandTest { @Override protected RedisCommands<String, String> connect() { return RxSyncInvocationHandler.sync(client.connectAsync().getStatefulConnection()); } }
[ "mpaluch@paluch.biz" ]
mpaluch@paluch.biz
ab22742046818b86eb9d02905c6b54b1a8d19ba3
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/ActiveMQ/2131_1.java
8308efaccdf20bfcf9c823653c35c27f3a46d618
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
868
java
//,temp,JmsConsumerClient.java,245,259,temp,JmsConsumerClient.java,229,243 //,3 public class xxx { public MessageConsumer createJmsConsumer(Destination dest, String selector, boolean noLocal) throws JMSException { if (client.isDurable()) { String clientName = getClientName(); if (clientName == null) { clientName = "JmsConsumer"; setClientName(clientName); } LOG.info("Creating durable subscriber (" + clientName + ") to: " + dest.toString()); jmsConsumer = getSession().createDurableSubscriber((Topic) dest, clientName, selector, noLocal); } else { LOG.info("Creating non-durable consumer to: " + dest.toString()); jmsConsumer = getSession().createConsumer(dest, selector, noLocal); } return jmsConsumer; } };
[ "SHOSHIN\\sgholamian@shoshin.uwaterloo.ca" ]
SHOSHIN\sgholamian@shoshin.uwaterloo.ca
68bb79b7f483e342c48a97dab0372cb77cd89b4e
b998b375e53c0d8141db7f8e07cb01b494ed3d0a
/SPayExperiment/app/src/main/java/com/samsung/android/spayfw/storage/ServerCertsStorage.java
66deeaa675bdbc0c72c6d4fda60466ee4f5e0868
[]
no_license
atthisaccount/SPay-inner-workings
c3b6256c8ed10c2492d19eca8e63f656cd855be2
6dd83a6ea0916c272423ea0dc1fa3757baa632e7
refs/heads/master
2022-03-22T04:12:05.100198
2019-10-06T13:25:49
2019-10-06T13:25:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,843
java
/* * Decompiled with CFR 0.0. * * Could not load the following classes: * android.content.ContentValues * android.content.Context * android.database.Cursor * android.database.sqlite.SQLiteException * java.lang.Class * java.lang.Enum * java.lang.Object * java.lang.String * java.lang.Throwable * java.util.ArrayList * java.util.List */ package com.samsung.android.spayfw.storage; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteException; import com.samsung.android.spayfw.b.Log; import com.samsung.android.spayfw.remoteservice.models.CertificateInfo; import java.util.ArrayList; import java.util.List; public class ServerCertsStorage extends DbAdapter { private static ServerCertsStorage Ce; private ServerCertsStorage(Context context) { super(context); this.execSQL("CREATE TABLE IF NOT EXISTS server_certs_group(_id INTEGER, card_type TEXT NOT NULL, content TEXT NOT NULL, usage TEXT NOT NULL, alias TEXT NOT NULL, PRIMARY KEY (card_type, usage, alias) )"); Log.i("ServerCertsStorage", "Create ServerCerts Table If Not Exists"); } public static final ServerCertsStorage ad(Context context) { Class<ServerCertsStorage> class_ = ServerCertsStorage.class; synchronized (ServerCertsStorage.class) { if (Ce == null) { Ce = new ServerCertsStorage(context); } ServerCertsStorage serverCertsStorage = Ce; // ** MonitorExit[var3_1] (shouldn't be in output) return serverCertsStorage; } } private static CertificateInfo h(Cursor cursor) { CertificateInfo certificateInfo = new CertificateInfo(); certificateInfo.setContent(cursor.getString(ServerCertsDb.ServerCertsColumn.Ch.getColumnIndex())); certificateInfo.setUsage(cursor.getString(ServerCertsDb.ServerCertsColumn.Ci.getColumnIndex())); certificateInfo.setAlias(cursor.getString(ServerCertsDb.ServerCertsColumn.Cj.getColumnIndex())); return certificateInfo; } public int a(String string, CertificateInfo certificateInfo) { if (string == null || certificateInfo == null || certificateInfo.getContent() == null || certificateInfo.getUsage() == null) { Log.e("ServerCertsStorage", "addServerCertsRecord: cardType/cert/cert.content/cert.usage is null"); return -1; } ContentValues contentValues = new ContentValues(); contentValues.put(ServerCertsDb.ServerCertsColumn.Cg.getColumn(), string); contentValues.put(ServerCertsDb.ServerCertsColumn.Ch.getColumn(), certificateInfo.getContent()); contentValues.put(ServerCertsDb.ServerCertsColumn.Ci.getColumn(), certificateInfo.getUsage()); contentValues.put(ServerCertsDb.ServerCertsColumn.Cj.getColumn(), certificateInfo.getAlias()); try { int n2 = this.a("server_certs_group", contentValues); Log.d("ServerCertsStorage", "RowId : " + n2); return n2; } catch (SQLiteException sQLiteException) { Log.e("ServerCertsStorage", "addTokenRecord: cannot add server certs record"); Log.c("ServerCertsStorage", sQLiteException.getMessage(), sQLiteException); return -1; } } /* * Unable to fully structure code * Enabled aggressive block sorting * Enabled unnecessary exception pruning * Enabled aggressive exception aggregation * Lifted jumps to return sites */ public List<CertificateInfo> a(ServerCertsDb.ServerCertsColumn var1_1, String var2_2) { block6 : { if (var1_1 == null) { Log.e("ServerCertsStorage", "getCertificates: column is null"); return null; } var5_4 = var6_3 = this.f("server_certs_group", var1_1.getColumn(), var2_2); var7_5 = null; if (var5_4 == null) break block6; try { var8_6 = var5_4.getCount(); var7_5 = null; if (var8_6 <= 0) break block6; var7_5 = new ArrayList(var5_4.getCount()); while (var5_4.moveToNext()) { var7_5.add((Object)ServerCertsStorage.h(var5_4)); } break block6; } catch (Throwable var4_7) {} ** GOTO lbl-1000 } ServerCertsStorage.a(var5_4); return var7_5; catch (Throwable var3_9) { var4_8 = var3_9; var5_4 = null; } lbl-1000: // 2 sources: { ServerCertsStorage.a(var5_4); throw var4_8; } } public static class ServerCertsDb { public static final class ServerCertsColumn extends Enum<ServerCertsColumn> { public static final /* enum */ ServerCertsColumn Cf = new ServerCertsColumn("ID", 0, "_id", DbAdapter.ColumnType.BV); public static final /* enum */ ServerCertsColumn Cg = new ServerCertsColumn("CARD_TYPE", 1, "card_type", DbAdapter.ColumnType.BY); public static final /* enum */ ServerCertsColumn Ch = new ServerCertsColumn("CONTENT", 2, "content", DbAdapter.ColumnType.BY); public static final /* enum */ ServerCertsColumn Ci = new ServerCertsColumn("USAGE", 3, "usage", DbAdapter.ColumnType.BY); public static final /* enum */ ServerCertsColumn Cj = new ServerCertsColumn("ALIAS", 4, "alias", DbAdapter.ColumnType.BY); private static final /* synthetic */ ServerCertsColumn[] Ck; private final int columnIndex; private final String columnName; private final DbAdapter.ColumnType columnType; private final String columnValue; static { ServerCertsColumn[] arrserverCertsColumn = new ServerCertsColumn[]{Cf, Cg, Ch, Ci, Cj}; Ck = arrserverCertsColumn; } private ServerCertsColumn(String string2, int n3, String string3, DbAdapter.ColumnType columnType) { this.columnName = string2; this.columnIndex = n3; this.columnValue = string3; this.columnType = columnType; } public static ServerCertsColumn valueOf(String string) { return (ServerCertsColumn)Enum.valueOf(ServerCertsColumn.class, (String)string); } public static ServerCertsColumn[] values() { return (ServerCertsColumn[])Ck.clone(); } public String getColumn() { return this.columnValue; } public int getColumnIndex() { return this.columnIndex; } } } }
[ "4461705+pandalion98@users.noreply.github.com" ]
4461705+pandalion98@users.noreply.github.com
1f27a8178eb3f039b4de3855364e3ce52e6c9eda
df8e54ff5fbd5942280e3230123494a401c57730
/code/on-the-way/pre-way/src/main/java/com/vika/way/pre/algorithm/leetcode/midium/S101_200/S127WordLadder.java
369ca852a4aec9a08e90b2b16fb153534bc12eca
[]
no_license
kabitonn/cs-note
255297a0a0634335eefba79882f7314f7b97308f
1235bb56a40bce7e2056f083ba8cda0cd08e39b4
refs/heads/master
2022-06-09T23:46:02.145680
2022-05-13T10:44:53
2022-05-13T10:44:53
224,864,415
0
1
null
2022-05-13T07:25:09
2019-11-29T13:58:19
Java
UTF-8
Java
false
false
8,132
java
package com.vika.way.pre.algorithm.leetcode.midium.S101_200; import java.util.*; public class S127WordLadder { public int ladderLength(String beginWord, String endWord, List<String> wordList) { if (!wordList.contains(endWord)) { return 0; } Queue<String> queue = new LinkedList<>(); queue.add(beginWord); Set<String> wordSet = new HashSet<>(wordList); Set<String> visited = new HashSet<>(); visited.add(beginWord); boolean found = false; int depth = 1; while (!queue.isEmpty()) { int size = queue.size(); for (int i = 0; i < size; i++) { String word = queue.poll(); List<String> adjacentList = getAdjacentList(word, wordSet); for (String adjacent : adjacentList) { if (!visited.contains(adjacent)) { visited.add(adjacent); if (adjacent.equals(endWord)) { found = true; } queue.add(adjacent); } } } depth++; if (found) { return depth; } } return 0; } private List<String> getAdjacentList(String str, Set<String> wordSet) { List<String> list = new ArrayList<>(); char[] s = str.toCharArray(); for (int i = 0; i < s.length; i++) { char old = s[i]; for (char c = 'a'; c <= 'z'; c++) { if (s[i] == c) { continue; } s[i] = c; String t = String.valueOf(s); if (wordSet.contains(t)) { list.add(t); } } s[i] = old; } return list; } public int ladderLength1(String beginWord, String endWord, List<String> wordList) { if (!wordList.contains(endWord)) { return 0; } Map<String, List<String>> adjacentMap = getAdjacentMap(beginWord, wordList); Queue<String> queue = new LinkedList<>(); queue.add(beginWord); Set<String> visited = new HashSet<>(); visited.add(beginWord); int depth = 1; while (!queue.isEmpty()) { int size = queue.size(); depth++; for (int i = 0; i < size; i++) { String word = queue.poll(); List<String> adjacentList = adjacentMap.get(word); for (String adjacent : adjacentList) { if (!visited.contains(adjacent)) { visited.add(adjacent); if (adjacent.equals(endWord)) { return depth; } queue.add(adjacent); } } } } return 0; } private Map<String, List<String>> getAdjacentMap(String begin, List<String> wordList) { List<String> words = new ArrayList<>(wordList); words.add(begin); Map<String, List<String>> patternMap = new HashMap<>(); words.forEach(word -> { char[] s = word.toCharArray(); for (int i = 0; i < word.length(); i++) { char old = s[i]; s[i] = '*'; String p = String.valueOf(s); List<String> adjacentList = patternMap.getOrDefault(p, new ArrayList<>()); adjacentList.add(word); patternMap.put(p, adjacentList); s[i] = old; } }); Map<String, List<String>> adjacentMap = new HashMap<>(); for (String word : words) { char[] s = word.toCharArray(); List<String> list = new ArrayList<>(); for (int i = 0; i < s.length; i++) { char old = s[i]; s[i] = '*'; String p = String.valueOf(s); List<String> patternList = patternMap.getOrDefault(p, new ArrayList<>()); for (String adj : patternList) { if (adj.equals(word)) { continue; } list.add(adj); } s[i] = old; } adjacentMap.put(word, list); } return adjacentMap; } public int ladderLength2(String beginWord, String endWord, List<String> wordList) { Set<String> wordSet = new HashSet<>(wordList); if (!wordSet.contains(endWord)) { return 0; } Set<String> beginSet = new HashSet<>(), endSet = new HashSet<>(); int depth = 1; Set<String> visited = new HashSet<>(); beginSet.add(beginWord); endSet.add(endWord); while (!beginSet.isEmpty() && !endSet.isEmpty()) { if (beginSet.size() > endSet.size()) { Set<String> set = beginSet; beginSet = endSet; endSet = set; } depth++; Set<String> temp = new HashSet<>(); for (String word : beginSet) { char[] s = word.toCharArray(); for (int i = 0; i < s.length; i++) { char old = s[i]; for (char c = 'a'; c <= 'z'; c++) { s[i] = c; String target = String.valueOf(s); if (endSet.contains(target)) { return depth; } if (!visited.contains(target) && wordSet.contains(target)) { temp.add(target); visited.add(target); } } s[i] = old; } } beginSet = temp; } return 0; } //因为把 beginWord 和 endWord 都加入了路径,所以初始化 2 private int len = 2; public int ladderLength3(String beginWord, String endWord, List<String> wordList) { if (!wordList.contains(endWord)) { return 0; } // 利用 BFS 得到所有的邻居节点 Set<String> set1 = new HashSet<>(); set1.add(beginWord); Set<String> set2 = new HashSet<>(); set2.add(endWord); Set<String> wordSet = new HashSet<>(wordList); //最后没找到返回 0 if (!twoEndBfs(set1, set2, wordSet)) { return 0; } return len; } private boolean twoEndBfs(Set<String> set1, Set<String> set2, Set<String> wordSet) { if (set1.isEmpty() || set2.isEmpty()) { return false; } // set1 的数量多,就反向扩展 if (set1.size() > set2.size()) { return twoEndBfs(set2, set1, wordSet); } // 将已经访问过单词删除 wordSet.removeAll(set1); wordSet.removeAll(set2); // 保存新扩展得到的节点 Set<String> set = new HashSet<>(); for (String word : set1) { // 遍历每一位 for (int i = 0; i < word.length(); i++) { char[] s = word.toCharArray(); // 尝试所有字母 for (char ch = 'a'; ch <= 'z'; ch++) { if (s[i] == ch) { continue; } s[i] = ch; String adj = new String(s); if (set2.contains(adj)) { return true; } // 如果还没有相遇,并且新的单词在 word 中,那么就加到 set 中 if (wordSet.contains(adj)) { set.add(adj); } } } } len++; // 一般情况下新扩展的元素会多一些,所以我们下次反方向扩展 set2 return twoEndBfs(set2, set, wordSet); } }
[ "chenwei.tjw@alibaba-inc.com" ]
chenwei.tjw@alibaba-inc.com
24e1455b4b1b087d0da4bf608c2e89be14c3f7aa
ae012fb4134fa1a56c901c054da641f0d67e2801
/0project01/src/v11/server/dao/ProjectDao.java
4c971270f11a50c17c9a69d5257370ce1cfcb539
[]
no_license
zxqw1541/javaexam
52a8e3e74535af54b6eaf61a3ca029e829556adc
49a945f8eb7247d3042bffd59f6c9c5a5a81ada5
refs/heads/master
2021-01-18T15:06:51.838333
2015-12-24T03:40:17
2015-12-24T03:40:17
47,953,735
1
0
null
null
null
null
UTF-8
Java
false
false
1,523
java
package v11.server.dao; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileReader; import java.io.FileWriter; import java.io.PrintWriter; import java.util.ArrayList; import v11.server.annotation.Component; import v11.server.domain.Project; import v11.server.exception.DaoException; @Component public class ProjectDao { ArrayList<Project> list = new ArrayList<Project>(); public ProjectDao() { String filename = "./data/project.dat"; try ( FileReader in = new FileReader(filename); BufferedReader in2 = new BufferedReader(in); ) { String line = null; while ((line = in2.readLine()) != null) { list.add(new Project(line)); } } catch (Exception e) { throw new DaoException("프로젝트정보 로딩 실패!"); } } public void save() { try (FileWriter out = new FileWriter("./data/project.dat"); BufferedWriter out2 = new BufferedWriter(out); PrintWriter out3 = new PrintWriter(out2);) { for (Project p : list) { out3.println(p); } } catch (Exception e) { throw new DaoException("프로젝트 정보 저장 실패!"); } } public ArrayList<Project> selectList() { return list; } public void insert(Project project) { list.add(project); this.save(); } public Project delete(int no) { Project obj = list.remove(no); this.save(); return obj; } }
[ "BitCamp@BitCamp-PC" ]
BitCamp@BitCamp-PC
8e56ddbbbb570e6599b1eac1f7c3993d3c951772
351a35aa740b293a17ddcf754f9fdde41627ef48
/src/main/java/act/cli/meta/CommandParamMetaInfo.java
a195825743431aeccddae4d54eeb68c524ae9856
[ "Apache-2.0" ]
permissive
tracythink/actframework
d04b661a71d7af3aa420a77d7e380631a5814cc5
c9d5b8d8aa4a44d5d91326a3d3582690f4920594
refs/heads/master
2020-12-26T03:33:01.930292
2016-08-05T00:01:00
2016-08-05T00:01:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,053
java
package act.cli.meta; import act.asm.Type; import act.util.AsmTypes; import act.util.DestroyableBase; import org.osgl.$; import org.osgl.util.S; /** * Stores Command parameter meta info */ public class CommandParamMetaInfo extends DestroyableBase { private String name; private Type type; private boolean readFileContent; private Type componentType; private boolean context; private String cliSessionAttributeKey; private ParamOptionAnnoInfo optionInfo; public CommandParamMetaInfo name(String name) { this.name = $.NPE(name); return this; } public String name() { return name; } public CommandParamMetaInfo type(Type type) { this.type = $.NPE(type); if (AsmTypes.isContextType(type)) { context = true; } return this; } public Type type() { return type; } public CommandParamMetaInfo setContext() { this.context = true; return this; } public boolean isContext() { return context; } public CommandParamMetaInfo componentType(Type type) { this.componentType = $.NPE(type); return this; } public Type componentType() { return componentType; } public CommandParamMetaInfo optionInfo(ParamOptionAnnoInfo optionInfo) { this.optionInfo = $.NPE(optionInfo); optionInfo.paramName(name); return this; } public ParamOptionAnnoInfo optionInfo() { return optionInfo; } public CommandParamMetaInfo attributeKey(String cliSessionAttributeKey) { if (S.blank(cliSessionAttributeKey)) { cliSessionAttributeKey = name; } this.cliSessionAttributeKey = cliSessionAttributeKey; return this; } public String cliSessionAttributeKey() { return cliSessionAttributeKey; } public void setReadFileContent() { readFileContent = true; } public boolean readFileContent() { return readFileContent; } }
[ "greenlaw110@gmail.com" ]
greenlaw110@gmail.com
74b4f3f42014c1ba2c75fb9f00a4535548cede68
c91ffa22d2ff915240cfdb37149498ad37cc700e
/src/main/java/com/artland/controller/admin/BlogController.java
595e2b342cf0e7ffaf19818ef5de70e80ac255a4
[ "Apache-2.0" ]
permissive
WaylanPunch/ArtLand2
be1d497251d9a312f2f90bdf9be29fbedec178fa
c05511618747b59fc24e11a8ddd0da816a7290b4
refs/heads/main
2023-02-14T02:26:39.415668
2021-01-09T16:44:38
2021-01-09T16:44:38
325,839,155
0
0
null
null
null
null
UTF-8
Java
false
false
8,182
java
package com.artland.controller.admin; import com.artland.config.Constants; import com.artland.entity.Blog; import com.artland.service.BlogService; import com.artland.service.CategoryService; import com.artland.util.ArtLandUtils; import com.artland.util.PageQueryUtil; import com.artland.util.Result; import com.artland.util.ResultGenerator; import org.springframework.stereotype.Controller; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.File; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Map; import java.util.Random; /** * @author WaylanPunch * @email waylanpunch@gmail.com * @link https://github.com/WaylanPunch * @date 2017-10-31 */ @Controller @RequestMapping("/admin") public class BlogController { @Resource private BlogService blogService; @Resource private CategoryService categoryService; @GetMapping("/blogs/list") @ResponseBody public Result list(@RequestParam Map<String, Object> params) { if (StringUtils.isEmpty(params.get("page")) || StringUtils.isEmpty(params.get("limit"))) { return ResultGenerator.genFailResult("参数异常!"); } PageQueryUtil pageUtil = new PageQueryUtil(params); return ResultGenerator.genSuccessResult(blogService.getBlogsPage(pageUtil)); } @GetMapping("/blogs") public String list(HttpServletRequest request) { request.setAttribute("path", "blogs"); return "admin/blog"; } @GetMapping("/blogs/edit") public String edit(HttpServletRequest request) { request.setAttribute("path", "edit"); request.setAttribute("categories", categoryService.getAllCategories()); return "admin/edit"; } @GetMapping("/blogs/edit/{blogId}") public String edit(HttpServletRequest request, @PathVariable("blogId") Long blogId) { request.setAttribute("path", "edit"); Blog blog = blogService.getBlogById(blogId); if (blog == null) { return "error/error_400"; } request.setAttribute("blog", blog); request.setAttribute("categories", categoryService.getAllCategories()); return "admin/edit"; } @PostMapping("/blogs/save") @ResponseBody public Result save(@RequestParam("blogTitle") String blogTitle, @RequestParam(name = "blogSubUrl", required = false) String blogSubUrl, @RequestParam("blogCategoryId") Integer blogCategoryId, @RequestParam("blogTags") String blogTags, @RequestParam("blogContent") String blogContent, @RequestParam("blogCoverImage") String blogCoverImage, @RequestParam("blogStatus") Byte blogStatus, @RequestParam("enableComment") Byte enableComment) { if (StringUtils.isEmpty(blogTitle)) { return ResultGenerator.genFailResult("请输入文章标题"); } if (blogTitle.trim().length() > 150) { return ResultGenerator.genFailResult("标题过长"); } if (StringUtils.isEmpty(blogTags)) { return ResultGenerator.genFailResult("请输入文章标签"); } if (blogTags.trim().length() > 150) { return ResultGenerator.genFailResult("标签过长"); } if (blogSubUrl.trim().length() > 150) { return ResultGenerator.genFailResult("路径过长"); } if (StringUtils.isEmpty(blogContent)) { return ResultGenerator.genFailResult("请输入文章内容"); } if (blogTags.trim().length() > 100000) { return ResultGenerator.genFailResult("文章内容过长"); } if (StringUtils.isEmpty(blogCoverImage)) { return ResultGenerator.genFailResult("封面图不能为空"); } Blog blog = new Blog(); blog.setTitle(blogTitle); blog.setSubUrl(blogSubUrl); blog.setCategoryId(blogCategoryId); blog.setTags(blogTags); blog.setContent(blogContent); blog.setCoverImage(blogCoverImage); blog.setStatus(blogStatus); blog.setEnableComment(enableComment); String saveBlogResult = blogService.saveBlog(blog); if ("success".equals(saveBlogResult)) { return ResultGenerator.genSuccessResult("添加成功"); } else { return ResultGenerator.genFailResult(saveBlogResult); } } @PostMapping("/blogs/update") @ResponseBody public Result update(@RequestParam("blogId") Long blogId, @RequestParam("blogTitle") String blogTitle, @RequestParam(name = "blogSubUrl", required = false) String blogSubUrl, @RequestParam("blogCategoryId") Integer blogCategoryId, @RequestParam("blogTags") String blogTags, @RequestParam("blogContent") String blogContent, @RequestParam("blogCoverImage") String blogCoverImage, @RequestParam("blogStatus") Byte blogStatus, @RequestParam("enableComment") Byte enableComment) { if (StringUtils.isEmpty(blogTitle)) { return ResultGenerator.genFailResult("请输入文章标题"); } if (blogTitle.trim().length() > 150) { return ResultGenerator.genFailResult("标题过长"); } if (StringUtils.isEmpty(blogTags)) { return ResultGenerator.genFailResult("请输入文章标签"); } if (blogTags.trim().length() > 150) { return ResultGenerator.genFailResult("标签过长"); } if (blogSubUrl.trim().length() > 150) { return ResultGenerator.genFailResult("路径过长"); } if (StringUtils.isEmpty(blogContent)) { return ResultGenerator.genFailResult("请输入文章内容"); } if (blogTags.trim().length() > 100000) { return ResultGenerator.genFailResult("文章内容过长"); } if (StringUtils.isEmpty(blogCoverImage)) { return ResultGenerator.genFailResult("封面图不能为空"); } Blog blog = new Blog(); blog.setId(blogId); blog.setTitle(blogTitle); blog.setSubUrl(blogSubUrl); blog.setCategoryId(blogCategoryId); blog.setTags(blogTags); blog.setContent(blogContent); blog.setCoverImage(blogCoverImage); blog.setStatus(blogStatus); blog.setEnableComment(enableComment); String updateBlogResult = blogService.updateBlog(blog); if ("success".equals(updateBlogResult)) { return ResultGenerator.genSuccessResult("修改成功"); } else { return ResultGenerator.genFailResult(updateBlogResult); } } @PostMapping("/blogs/md/uploadfile") public void uploadFileByEditormd(HttpServletRequest request, HttpServletResponse response, @RequestParam(name = "editormd-image-file", required = true) MultipartFile file) throws IOException, URISyntaxException { String fileName = file.getOriginalFilename(); String suffixName = fileName.substring(fileName.lastIndexOf(".")); //生成文件名称通用方法 SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss"); Random r = new Random(); StringBuilder tempName = new StringBuilder(); tempName.append(sdf.format(new Date())).append(r.nextInt(100)).append(suffixName); String newFileName = tempName.toString(); //创建文件 File destFile = new File(Constants.FILE_UPLOAD_DIC + newFileName); String fileUrl = ArtLandUtils.getHost(new URI(request.getRequestURL() + "")) + "/upload/" + newFileName; File fileDirectory = new File(Constants.FILE_UPLOAD_DIC); try { if (!fileDirectory.exists()) { if (!fileDirectory.mkdir()) { throw new IOException("文件夹创建失败,路径为:" + fileDirectory); } } file.transferTo(destFile); request.setCharacterEncoding("utf-8"); response.setHeader("Content-Type", "text/html"); response.getWriter().write("{\"success\": 1, \"message\":\"success\",\"url\":\"" + fileUrl + "\"}"); } catch (UnsupportedEncodingException e) { response.getWriter().write("{\"success\":0}"); } catch (IOException e) { response.getWriter().write("{\"success\":0}"); } } @PostMapping("/blogs/delete") @ResponseBody public Result delete(@RequestBody Integer[] ids) { if (ids.length < 1) { return ResultGenerator.genFailResult("参数异常!"); } if (blogService.deleteBatch(ids)) { return ResultGenerator.genSuccessResult(); } else { return ResultGenerator.genFailResult("删除失败"); } } }
[ "waylanpunch@gmail.com" ]
waylanpunch@gmail.com
e1e0da003475d12f99bb564374545a0d29b857d6
4d6f449339b36b8d4c25d8772212bf6cd339f087
/netreflected/src/Framework/System.DirectoryServices,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a/system/directoryservices/DirectorySynchronizationOptions.java
0c5df31023c6e6f943767e3d3e1b724ae58a7373
[ "MIT" ]
permissive
lvyitian/JCOReflector
299a64550394db3e663567efc6e1996754f6946e
7e420dca504090b817c2fe208e4649804df1c3e1
refs/heads/master
2022-12-07T21:13:06.208025
2020-08-28T09:49:29
2020-08-28T09:49:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,023
java
/* * MIT License * * Copyright (c) 2020 MASES s.r.l. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /************************************************************************************** * <auto-generated> * This code was generated from a template using JCOReflector * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. * </auto-generated> *************************************************************************************/ package system.directoryservices; import org.mases.jcobridge.*; import org.mases.jcobridge.netreflection.*; // Import section // PACKAGE_IMPORT_SECTION /** * The base .NET class managing System.DirectoryServices.DirectorySynchronizationOptions, System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Extends {@link NetObject}. * <p> * * See: <a href="https://docs.microsoft.com/en-us/dotnet/api/System.DirectoryServices.DirectorySynchronizationOptions" target="_top">https://docs.microsoft.com/en-us/dotnet/api/System.DirectoryServices.DirectorySynchronizationOptions</a> */ public class DirectorySynchronizationOptions extends NetObject { /** * Fully assembly qualified name: System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a */ public static final String assemblyFullName = "System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; /** * Assembly name: System.DirectoryServices */ public static final String assemblyShortName = "System.DirectoryServices"; /** * Qualified class name: System.DirectoryServices.DirectorySynchronizationOptions */ public static final String className = "System.DirectoryServices.DirectorySynchronizationOptions"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumReflected = createEnum(); JCEnum classInstance = null; static JCType createType() { try { return bridge.GetType(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName)); } catch (JCException e) { return null; } } static JCEnum createEnum() { try { return bridge.GetEnum(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName)); } catch (JCException e) { return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } public DirectorySynchronizationOptions(Object instance) { super(instance); if (instance instanceof JCObject) { try { String enumName = NetEnum.GetName(classType, (JCObject)instance); classInstance = enumReflected.fromValue(enumName); } catch (Throwable t) { if (JCOBridgeInstance.getDebug()) t.printStackTrace(); classInstance = enumReflected; } } else if (instance instanceof JCEnum) { classInstance = (JCEnum)instance; } } public DirectorySynchronizationOptions() { super(); // add reference to assemblyName.dll file try { addReference(JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } catch (Throwable jcne) { if (JCOBridgeInstance.getDebug()) jcne.printStackTrace(); } } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public Object getJCOInstance() { return classInstance; } public JCType getJCOType() { return classType; } final static DirectorySynchronizationOptions getFrom(JCEnum object, String value) { try { return new DirectorySynchronizationOptions(object.fromValue(value)); } catch (JCException e) { return new DirectorySynchronizationOptions(object); } } // Enum fields section public static DirectorySynchronizationOptions None = getFrom(enumReflected, "None"); public static DirectorySynchronizationOptions ObjectSecurity = getFrom(enumReflected, "ObjectSecurity"); public static DirectorySynchronizationOptions ParentsFirst = getFrom(enumReflected, "ParentsFirst"); public static DirectorySynchronizationOptions PublicDataOnly = getFrom(enumReflected, "PublicDataOnly"); public static DirectorySynchronizationOptions IncrementalValues = getFrom(enumReflected, "IncrementalValues"); // Flags management section public final DirectorySynchronizationOptions add(DirectorySynchronizationOptions val) throws Throwable { return new DirectorySynchronizationOptions(NetEnum.add(classInstance, val.classInstance)); } public final DirectorySynchronizationOptions remove(DirectorySynchronizationOptions val) throws Throwable { return new DirectorySynchronizationOptions(NetEnum.remove(classInstance, val.classInstance)); } public final boolean is(DirectorySynchronizationOptions val) throws Throwable { return NetEnum.is(classInstance, val.classInstance); } public final boolean has(DirectorySynchronizationOptions val) throws Throwable { return NetEnum.has(classInstance, val.classInstance); } }
[ "mario.mastrodicasa@masesgroup.com" ]
mario.mastrodicasa@masesgroup.com
513bdd3d851cdd67e9247585f24dc82ff51d1ec0
b69b6701de0b990f95310952e7108066bad33f1f
/.history/palindrom_20210430155717.java
dbb35a8bda703c192d4d3db4af10fdd3025600ee
[]
no_license
deepakadishankar/Practice
909551bf369ed286dfde1b6c8e495bc19dc22d7e
5725cdd6cb55ae5ff1e6b4607692ef364a3dc267
refs/heads/master
2023-07-27T07:26:13.783415
2021-09-14T07:51:18
2021-09-14T07:51:18
352,027,381
1
0
null
null
null
null
UTF-8
Java
false
false
725
java
import java.util.*; public class palindrom { public static void main(String[] args) { Integer input = 123321; String newInput = Integer.toString(input); int median = newInput.length()/2; System.out.println(median); String firstHalf = newInput.substring(0,median); System.out.println(firstHalf); // System.out.println(StringFormatter.reverseString("my name is khan")); String reverse = new StringBuffer(firstHalf).reverse().toString(); System.out.println(reverse); String lastHalf = newInput.substring(newInput.length() - median); System.out.println(lastHalf); if (){ System.out.println("yesss"); } } }
[ "tsanthosh@Santhoshs-MacBook-Pro.local" ]
tsanthosh@Santhoshs-MacBook-Pro.local
4bc5137598033391b517cd63d5db0e850166e35c
118a8dfcf48078b083a53101db37815fa6d8a06b
/ZEngine - Vulkan/src/com/zekrom_64/ze/vulkan/spirv/enums/SPIRVDecoration.java
4ba1b56b73d2cddef2c8f069c700e428665dbbec
[]
no_license
Zekrom64/ZEngine
3d97c5a3bd64b3929febb93968167fa5d6c38af9
7b20347eed796d33acc8d63b0c2b7a4c782f7d90
refs/heads/master
2021-01-11T14:37:01.036022
2019-06-13T18:13:08
2019-06-13T18:13:08
80,166,128
0
0
null
null
null
null
UTF-8
Java
false
false
2,218
java
package com.zekrom_64.ze.vulkan.spirv.enums; import java.util.ArrayList; public enum SPIRVDecoration { RELAXED_PRECISION, SPEC_ID, BLOCK, BUFFER_BLOCK, ROW_MAJOR, COL_MAJOR, ARRAY_STRIDE, MATRIX_STRIDE, GLSL_SHARED, GLSL_PACKED, C_PACKED, BUILT_IN, NO_PERSPECTIVE, FLAT, PATCH, CENTROID, SAMPLE, INVARIANT, RESTRICT, ALIASED, VOLATILE, CONSTANT, COHERENT, NON_WRITABLE, NON_READABLE, UNIFORM, UNIFORM_ID, SATURATED_CONVERSION, STREAM, LOCATION, COMPONENT, INDEX, BINDING, DESCRIPTOR_SET, OFFSET, XFB_BUFFER, XFB_STRIDE, FUNC_PARAM_ATTR, FP_ROUNDING_MODE, FP_FAST_MATH_MODE, LINKAGE_ATTRIBUTES, NO_CONTRACTION, INPUT_ATTACHMENT_INDEX, ALIGNMENT, MAX_BYTE_OFFSET, ALIGNMENT_ID, MAX_BYTE_OFFSET_ID, // SPV_KHR_no_integer_wrap_decoration NO_SIGNED_WRAP(4469), NO_UNSIGNED_WRAP(4470), // SPV_AMD_shader_explicit_vertex_parameter EXPLICIT_INTERP_AMD(4999), // SPV_NV_sample_mask_override_coverage OVERRIDE_COVERAGE_NV(5248), // SPV_NV_geometry_shader_passthrough PASSTHROUGH_NV(5250), VIEWPORT_RELATIVE_NV(5252), // SPV_NV_stereo_view_rendering SECONDARY_VIEWPORT_RELATIVE_NV(5256), // SPV_NV_mesh_shader PER_PRIMITIVE_NV(5271), PER_VIEW_NV(5272), PER_TASK_NV(5273), // SPV_NV_fragment_shader_barycentric PER_VERTEX_NV(5285), NON_UNIFORM_EXT(5300), COUNTER_BUFFER(5634), USER_SEMANTIC(5635), // SPV_EXT_physical_storage_buffer RESTRICT_POINTER_EXT(5355), ALIASED_POINTER_EXT(5356); public final int value; private SPIRVDecoration() { value = ordinal(); } private SPIRVDecoration(int val) { value = val; } private static SPIRVDecoration[] linearValues; static { ArrayList<SPIRVDecoration> vals = new ArrayList<>(); for(SPIRVDecoration e : values()) { if (e.ordinal() == e.value) { vals.ensureCapacity(e.value+1); vals.set(e.value, e); } } linearValues = vals.toArray(new SPIRVDecoration[0]); } public static SPIRVDecoration parse(int val) { if (val < 0) return null; if (val < linearValues.length) { SPIRVDecoration eval = linearValues[val]; if (eval != null) return eval; } for(SPIRVDecoration eval : values()) if (eval.value == val) return eval; return null; } }
[ "bfgmusicscores@gmail.com" ]
bfgmusicscores@gmail.com
399dd7768c3b648c9af0412a5664bb03dc48e598
f7a25da32609d722b7ac9220bf4694aa0476f7b2
/net/minecraft/stats/RecipeBook.java
c4889950bcc85ca0108cdb6d6797a6c223cdf81a
[]
no_license
basaigh/temp
89e673227e951a7c282c50cce72236bdce4870dd
1c3091333f4edb2be6d986faaa026826b05008ab
refs/heads/master
2023-05-04T22:27:28.259481
2021-05-31T17:15:09
2021-05-31T17:15:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,554
java
package net.minecraft.stats; import net.minecraft.world.inventory.SmokerMenu; import net.minecraft.world.inventory.BlastFurnaceMenu; import net.minecraft.world.inventory.FurnaceMenu; import net.minecraft.world.inventory.RecipeBookMenu; import javax.annotation.Nullable; import net.minecraft.world.item.crafting.Recipe; import java.util.Collection; import com.google.common.collect.Sets; import net.minecraft.resources.ResourceLocation; import java.util.Set; public class RecipeBook { protected final Set<ResourceLocation> known; protected final Set<ResourceLocation> highlight; protected boolean guiOpen; protected boolean filteringCraftable; protected boolean furnaceGuiOpen; protected boolean furnaceFilteringCraftable; protected boolean blastingFurnaceGuiOpen; protected boolean blastingFurnaceFilteringCraftable; protected boolean smokerGuiOpen; protected boolean smokerFilteringCraftable; public RecipeBook() { this.known = (Set<ResourceLocation>)Sets.newHashSet(); this.highlight = (Set<ResourceLocation>)Sets.newHashSet(); } public void copyOverData(final RecipeBook ys) { this.known.clear(); this.highlight.clear(); this.known.addAll((Collection)ys.known); this.highlight.addAll((Collection)ys.highlight); } public void add(final Recipe<?> ber) { if (!ber.isSpecial()) { this.add(ber.getId()); } } protected void add(final ResourceLocation qv) { this.known.add(qv); } public boolean contains(@Nullable final Recipe<?> ber) { return ber != null && this.known.contains(ber.getId()); } public void remove(final Recipe<?> ber) { this.remove(ber.getId()); } protected void remove(final ResourceLocation qv) { this.known.remove(qv); this.highlight.remove(qv); } public boolean willHighlight(final Recipe<?> ber) { return this.highlight.contains(ber.getId()); } public void removeHighlight(final Recipe<?> ber) { this.highlight.remove(ber.getId()); } public void addHighlight(final Recipe<?> ber) { this.addHighlight(ber.getId()); } protected void addHighlight(final ResourceLocation qv) { this.highlight.add(qv); } public boolean isGuiOpen() { return this.guiOpen; } public void setGuiOpen(final boolean boolean1) { this.guiOpen = boolean1; } public boolean isFilteringCraftable(final RecipeBookMenu<?> azq) { if (azq instanceof FurnaceMenu) { return this.furnaceFilteringCraftable; } if (azq instanceof BlastFurnaceMenu) { return this.blastingFurnaceFilteringCraftable; } if (azq instanceof SmokerMenu) { return this.smokerFilteringCraftable; } return this.filteringCraftable; } public boolean isFilteringCraftable() { return this.filteringCraftable; } public void setFilteringCraftable(final boolean boolean1) { this.filteringCraftable = boolean1; } public boolean isFurnaceGuiOpen() { return this.furnaceGuiOpen; } public void setFurnaceGuiOpen(final boolean boolean1) { this.furnaceGuiOpen = boolean1; } public boolean isFurnaceFilteringCraftable() { return this.furnaceFilteringCraftable; } public void setFurnaceFilteringCraftable(final boolean boolean1) { this.furnaceFilteringCraftable = boolean1; } public boolean isBlastingFurnaceGuiOpen() { return this.blastingFurnaceGuiOpen; } public void setBlastingFurnaceGuiOpen(final boolean boolean1) { this.blastingFurnaceGuiOpen = boolean1; } public boolean isBlastingFurnaceFilteringCraftable() { return this.blastingFurnaceFilteringCraftable; } public void setBlastingFurnaceFilteringCraftable(final boolean boolean1) { this.blastingFurnaceFilteringCraftable = boolean1; } public boolean isSmokerGuiOpen() { return this.smokerGuiOpen; } public void setSmokerGuiOpen(final boolean boolean1) { this.smokerGuiOpen = boolean1; } public boolean isSmokerFilteringCraftable() { return this.smokerFilteringCraftable; } public void setSmokerFilteringCraftable(final boolean boolean1) { this.smokerFilteringCraftable = boolean1; } }
[ "mark70326511@gmail.com" ]
mark70326511@gmail.com
f97e7aff863d015c79bcf085b41b43a6ea8de022
e05071d575dd3ede69a8ff6a282d169f0574410a
/src/main/java/com/github/GBSEcom/model/PaymentTokenCreditTransaction.java
c996d7f9ee36e98cb7c67ba9b7b7e2a363813477
[]
no_license
GBSEcom/java
6c4f2c08f3d0ce5f6273060f34630b5c1d3a51ef
f934d68a050e001bdb22bdcce755727c9232f257
refs/heads/master
2022-05-26T10:20:17.355268
2021-11-19T21:53:38
2021-11-19T21:53:38
136,058,114
2
4
null
2022-05-20T20:53:03
2018-06-04T17:10:09
Java
UTF-8
Java
false
false
4,299
java
/* * Payment Gateway API Specification. * The documentation here is designed to provide all of the technical guidance required to consume and integrate with our APIs for payment processing. To learn more about our APIs please visit https://docs.firstdata.com/org/gateway. * * The version of the OpenAPI document: 21.5.0.20211029.001 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package com.github.GBSEcom.model; import java.util.Objects; import java.util.Arrays; import com.github.GBSEcom.model.Amount; import com.github.GBSEcom.model.CurrencyConversion; import com.github.GBSEcom.model.Order; import com.github.GBSEcom.model.PaymentTokenCreditTransactionAllOf; import com.github.GBSEcom.model.PaymentTokenPaymentMethod; import com.github.GBSEcom.model.PrimaryTransaction; import com.github.GBSEcom.model.TransactionOrigin; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; /** * Request to create credit transaction using payment token. */ @ApiModel(description = "Request to create credit transaction using payment token.") public class PaymentTokenCreditTransaction extends PrimaryTransaction { public static final String SERIALIZED_NAME_PAYMENT_METHOD = "paymentMethod"; @SerializedName(SERIALIZED_NAME_PAYMENT_METHOD) private PaymentTokenPaymentMethod paymentMethod = null; public static final String SERIALIZED_NAME_CURRENCY_CONVERSION = "currencyConversion"; @SerializedName(SERIALIZED_NAME_CURRENCY_CONVERSION) private CurrencyConversion currencyConversion; public PaymentTokenCreditTransaction paymentMethod(PaymentTokenPaymentMethod paymentMethod) { this.paymentMethod = paymentMethod; return this; } /** * Get paymentMethod * @return paymentMethod **/ @ApiModelProperty(required = true, value = "") public PaymentTokenPaymentMethod getPaymentMethod() { return paymentMethod; } public void setPaymentMethod(PaymentTokenPaymentMethod paymentMethod) { this.paymentMethod = paymentMethod; } public PaymentTokenCreditTransaction currencyConversion(CurrencyConversion currencyConversion) { this.currencyConversion = currencyConversion; return this; } /** * Get currencyConversion * @return currencyConversion **/ @javax.annotation.Nullable @ApiModelProperty(value = "") public CurrencyConversion getCurrencyConversion() { return currencyConversion; } public void setCurrencyConversion(CurrencyConversion currencyConversion) { this.currencyConversion = currencyConversion; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PaymentTokenCreditTransaction paymentTokenCreditTransaction = (PaymentTokenCreditTransaction) o; return Objects.equals(this.paymentMethod, paymentTokenCreditTransaction.paymentMethod) && Objects.equals(this.currencyConversion, paymentTokenCreditTransaction.currencyConversion) && super.equals(o); } @Override public int hashCode() { return Objects.hash(paymentMethod, currencyConversion, super.hashCode()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PaymentTokenCreditTransaction {\n"); sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" paymentMethod: ").append(toIndentedString(paymentMethod)).append("\n"); sb.append(" currencyConversion: ").append(toIndentedString(currencyConversion)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "emargules@bluepay.com" ]
emargules@bluepay.com
a308b2c9572856147a978ecdbcb6a313619431e5
9c7e8ffeac14f451a90bf559383ec5566ea81d1b
/projects/sor/src/main/java/sor/EDU/oswego/cs/dl/util/concurrent/TimedCallable.java
2c971b7acb6b946183217e234836169751de3dff
[ "MIT" ]
permissive
mc-imperial/jtool-sct
fc2209f2d6c6273e9dae7a37a8209291914a7195
80811bb88e1cec0234bc720b5b47ec9e2cdf6364
refs/heads/master
2021-01-12T12:46:55.912768
2016-10-26T11:07:18
2016-10-26T11:07:20
69,858,207
0
1
null
null
null
null
UTF-8
Java
false
false
1,828
java
/* TimedCallable.java Originally written by Joseph Bowbeer and released into the public domain. This may be used for any purposes whatsoever without acknowledgment. Originally part of jozart.swingutils. Adapted by Doug Lea for util.concurrent. History: Date Who What 11dec1999 dl Adapted for util.concurrent */ package sor.EDU.oswego.cs.dl.util.concurrent; /** * TimedCallable runs a Callable function for a given length of time. * The function is run in its own thread. If the function completes * in time, its result is returned; otherwise the thread is interrupted * and an InterruptedException is thrown. * <p> * Note: TimedCallable will always return within the given time limit * (modulo timer inaccuracies), but whether or not the worker thread * stops in a timely fashion depends on the interrupt handling in the * Callable function's implementation. * * @author Joseph Bowbeer * @version 1.0 * * <p>[<a href="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html"> Introduction to this package. </a>] */ public class TimedCallable extends ThreadFactoryUser implements Callable { private final Callable function; private final long millis; public TimedCallable(Callable function, long millis) { this.function = function; this.millis = millis; } public Object call() throws Exception { FutureResult result = new FutureResult(); Thread thread = getThreadFactory().newThread(result.setter(function)); thread.start(); try { return result.timedGet(millis); } catch (InterruptedException ex) { /* Stop thread if we were interrupted or timed-out while waiting for the result. */ thread.interrupt(); throw ex; } } }
[ "paul.thomson11@imperial.ac.uk" ]
paul.thomson11@imperial.ac.uk
9e244a39e5ad9c334f87c2c4e70a9bf697b0d0cf
3417cb10ed81cf26937f8613067006108789ba52
/복습/2020-05/2020-05-28/testWork/workProj/src/dynamic_p_05_26/CastingClassMain.java
a8ac367d8afb71b9b8723e218033d5c0837b5822
[]
no_license
psun2/Korea-IT-Academy
a32c4eadfe4f5f10c3c624ea47253e0bf4640200
670642f7618b05e2df8926492a0c2a3eec032463
refs/heads/master
2021-03-17T14:36:33.108779
2020-12-06T20:40:19
2020-12-06T20:40:19
246,997,229
0
0
null
null
null
null
UTF-8
Java
false
false
2,428
java
package dynamic_p_05_26; //부모형으로 형변환시 맴버변수는 heap 에 생기고 메소드는 class 의 메소드 영역에 생기므로, //상속 받은 자식이 부모로 형변환 했을때, 자식의 맴버변수는 hiding 되고, 부모가 가지고 있지 //않는 메소드는 접근이 불가 하지만, 자식에서 오버로딩 하였다면, 오버로딩한 메소드가 사용됩니다. class CastingClass { String name = "부모"; int a = 10, b = 20; void meth_1() { System.out.println("부모 meth_1()" + a + ", " + b); } void meth_2() { System.out.println("부모 meth_2()"); } } class CastingChild extends CastingClass { String name = "자식"; int a = 1000, c = 2000; void meth_1() { System.out.println("자식 meth_1()" + a + ", " + b + ", " + c); } void meth_2() { System.out.println("자식 meth_2()"); } } public class CastingClassMain { public static void main(String[] args) { CastingClass pp = new CastingClass(); CastingClass pc = new CastingChild(); // CastingChild cp = new CastingClass(); CastingChild cc = new CastingChild(); System.out.println("pp.name: " + pp.name); // pp.name: 부모 System.out.println("✔pc.name: " + pc.name); // ✔ pc.name: 부모 System.out.println("cc.name: " + cc.name); // cc.name: 자식 pp.meth_1(); // 부모 meth_1() pc.meth_1(); // ✔ 자식 meth_1() cc.meth_1(); // 자식 meth_1() System.out.println(pp instanceof CastingClass); System.out.println(pp instanceof CastingChild); cc.a = 123; System.out.println("cc.a: " + cc.a); // 1000 System.out.println("cc.c: " + cc.c); // 1000 CastingClass pcc = cc; System.out.println("pcc.a: " + pcc.a); // 10 // System.out.println("pcc.c: " + pcc.c); // 1000 CastingChild cpcc = (CastingChild) pcc; System.out.println("cpcc.a: " + cpcc.a); // 10 System.out.println("cpcc.c: " + cpcc.c); // 1000 System.out.println("instanceof 는 생성기준 "); System.out.println(pp instanceof CastingClass); // true System.out.println(pp instanceof CastingChild); // false System.out.println(cc instanceof CastingClass); // true System.out.println(cc instanceof CastingChild); // true System.out.println(pcc instanceof CastingClass); // true System.out.println(pcc instanceof CastingChild); // true System.out.println(cpcc instanceof CastingClass); // true System.out.println(cpcc instanceof CastingChild); // true } }
[ "tjddjs90@naver.com" ]
tjddjs90@naver.com
290bad8f50582306a5a1493ba9a64566ba92d944
db96b76094730056966dd1bb04b2fb4a88271549
/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/development/featureflags/FeatureFlagPreference.java
b8d4306ec7aee0cd055443f4133917ac28d43ebb
[]
no_license
dylanbroodryk/Android-system-apps
48335f66d3fad6532cda19e192f11af1f69dce00
50f6f11f70906260a710cbeb66a92fba72410504
refs/heads/master
2022-03-14T16:15:33.277628
2022-02-12T04:56:41
2022-02-12T04:56:41
228,542,760
0
0
null
2019-12-17T05:50:11
2019-12-17T05:50:10
null
UTF-8
Java
false
false
1,917
java
/* * Copyright (C) 2019 The Android Open Source Project * * 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.android.car.developeroptions.development.featureflags; import android.content.Context; import android.util.FeatureFlagUtils; import androidx.preference.SwitchPreference; public class FeatureFlagPreference extends SwitchPreference { private final String mKey; private final boolean mIsPersistent; public FeatureFlagPreference(Context context, String key) { super(context); mKey = key; setKey(key); setTitle(key); mIsPersistent = FeatureFlagPersistent.isPersistent(key); boolean isFeatureEnabled; if (mIsPersistent) { isFeatureEnabled = FeatureFlagPersistent.isEnabled(context, key); } else { isFeatureEnabled = FeatureFlagUtils.isEnabled(context, key); } setCheckedInternal(isFeatureEnabled); } @Override public void setChecked(boolean isChecked) { setCheckedInternal(isChecked); if (mIsPersistent) { FeatureFlagPersistent.setEnabled(getContext(), mKey, isChecked); } else { FeatureFlagUtils.setEnabled(getContext(), mKey, isChecked); } } private void setCheckedInternal(boolean isChecked) { super.setChecked(isChecked); setSummary(Boolean.toString(isChecked)); } }
[ "yuchuangu85@gmail.com" ]
yuchuangu85@gmail.com
7ed9eef8f65f2b264faf41292ac6898d06fa6a21
1bfbe05e5697ee538da2b00f5e82783d23310523
/org.oonsql/src/org/oonsql/lng/util/AbstractOpcodeInputStream.java
1d31e6b535d4144a8f96a80225b65940840ab743
[]
no_license
bernardobreder/database-java
01e7a85763332ae4b7fa79de9bcb4f8dc74a4c11
b310f9c6c7b322cfb27d51b1f07934654e882c36
refs/heads/master
2021-07-01T20:31:38.306939
2017-09-23T00:40:41
2017-09-23T00:40:41
104,510,145
0
0
null
null
null
null
UTF-8
Java
false
false
472
java
package org.oonsql.lng.util; import java.io.IOException; /** * Stream de Opcode * * @author bernardobreder * */ public abstract class AbstractOpcodeInputStream extends AbstractDataInputStream { /** * Realiza a leitura de um opcode * * @return opcode * @throws IOException */ public int readOpcode() throws IOException { return this.read(); } /** * Anda com n bytes * * @param n */ public abstract void goTo(int n); }
[ "bernardobreder@gmail.com" ]
bernardobreder@gmail.com
9052d0c6d904f2495797eda874303b46171fb9f5
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_e6ef12f638cbc3ca27ff9223e6e96d579761ffc7/Suspend/9_e6ef12f638cbc3ca27ff9223e6e96d579761ffc7_Suspend_t.java
15abd5e32487318ecc0413da4dc535448ea0b538
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,733
java
/* * Copyright 2012 Jeanfrancois Arcand * * 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. */ /* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2007-2008 Sun Microsystems, Inc. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development * and Distribution License("CDDL") (collectively, the "License"). You * may not use this file except in compliance with the License. You can obtain * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt. * Sun designates this particular file as subject to the "Classpath" exception * as provided by Sun in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the License * Header, with the fields enclosed by brackets [] replaced by your own * identifying information: "Portions Copyrighted [year] * [name of copyright owner]" * * Contributor(s): * * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding "[Contributor] * elects to include this software in this distribution under the [CDDL or GPL * Version 2] license." If you don't indicate a single choice of license, a * recipient has the option to distribute your version of this file under * either the CDDL, the GPL Version 2 or to extend the choice of license to * its licensees as provided above. However, if you add GPL Version 2 code * and therefore, elected the GPL Version 2 license, then the option applies * only if the new code is made subject to such option by the copyright * holder. * */ package org.atmosphere.annotation; import org.atmosphere.cpr.AtmosphereResourceEventListener; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.util.concurrent.TimeUnit; /** * Suspend the underlying response. Once suspended, a response might be allowed * to consume {@link Broadcast} events, depending on the scope ([@link Suspend#SCOPE}). * By default, a suspended response is suspended able to consume * any broadcasted events executed inside the same application (SCOPE.APPLICATION). * The period can also be per suspended response (SCOPE.REQUEST) or available to other * application (SCOPE.VM). * * @author Jeanfrancois Arcand */ @Target({ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface Suspend { /** * How long a response stay suspended in {@link #timeUnit}, default is -1 * * @return */ int period() default -1; /** * @return */ TimeUnit timeUnit() default TimeUnit.MILLISECONDS; enum SCOPE { REQUEST, APPLICATION, VM } /** * The Scope of the {@link org.atmosphere.cpr.Broadcaster} that will be created once the * response gets suspended. One final word on Broadcaster: by default, * a Broadcaster will broadcast using * all resources/classes on which the response has been suspended. * This behavior is configurable and you can configure it setting the appropriate scope<ul> * <li>REQUEST: broadcast events only to the suspended response associated with the current request.</li> * <li>APPLICATION: broadcast events to all suspended responses associated with the current application.</li> * <li>VM: broadcast events to all suspended responses created inside the current virtual machine.</li> * </ul> * * @return The Scope of the {@link org.atmosphere.cpr.Broadcaster} that will be created once the * response gets suspended. */ SCOPE scope() default SCOPE.APPLICATION; /** * By default, output some comments when suspending the connection. */ boolean outputComments() default true; /** * Resume all suspended response on the first broadcast operation. */ public boolean resumeOnBroadcast() default false; /** * Add {@link AtmosphereResourceEventListener} to the broadcast operation. */ public Class<? extends AtmosphereResourceEventListener>[] listeners() default {}; /** * Write the returned entity back to the calling connection. Default is false. * @return true if the entity needs to be written back to the calling connection. */ public boolean writeEntity() default true; /** * If the @Produces annotation is missing, this value will be used instead. * @return the default content-type used if the @Produces annotation is missing. */ public String contentType() default ""; }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
fef5e026d8a937482f2b614c55532b90624e3b34
143089f3d485c8b3ddb0aadbd818801dee93806e
/edu.kit.ipd.sdq.kamp4is.model.fieldofactivityannotations/src/edu/kit/ipd/sdq/kamp4is/model/fieldofactivityannotations/ISTestCase.java
dba2a36c6a5329273b56a2b85e2d19d63d7d3e9e
[ "Apache-2.0" ]
permissive
SebastianWeberKamp/KAMP4IS
a58155d504562132a3b124934adf086f6e51aa4d
3ce896786cf24fd6d03f376c7127920866259666
refs/heads/master
2020-09-20T08:14:00.135860
2019-12-15T09:22:53
2019-12-15T09:22:53
224,419,717
0
0
Apache-2.0
2019-11-27T11:54:15
2019-11-27T11:54:14
null
UTF-8
Java
false
false
1,644
java
/** */ package edu.kit.ipd.sdq.kamp4is.model.fieldofactivityannotations; import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>IS Test Case</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li>{@link edu.kit.ipd.sdq.kamp4is.model.fieldofactivityannotations.ISTestCase#getNameOfTest <em>Name Of Test</em>}</li> * </ul> * * @see edu.kit.ipd.sdq.kamp4is.model.fieldofactivityannotations.ISFieldOfActivityAnnotationsPackage#getISTestCase() * @model abstract="true" * @generated */ public interface ISTestCase extends EObject { /** * Returns the value of the '<em><b>Name Of Test</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Name Of Test</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Name Of Test</em>' attribute. * @see #setNameOfTest(String) * @see edu.kit.ipd.sdq.kamp4is.model.fieldofactivityannotations.ISFieldOfActivityAnnotationsPackage#getISTestCase_NameOfTest() * @model * @generated */ String getNameOfTest(); /** * Sets the value of the '{@link edu.kit.ipd.sdq.kamp4is.model.fieldofactivityannotations.ISTestCase#getNameOfTest <em>Name Of Test</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Name Of Test</em>' attribute. * @see #getNameOfTest() * @generated */ void setNameOfTest(String value); } // ISTestCase
[ "rostami@kit.edu" ]
rostami@kit.edu
6ee663a73bc9af86f3cfce54e637f8f3fdff56bd
869323d12fc4cfc48caf73364fc61b0190575e4d
/editor/plugins/org.fusesource.ide.project/src/org/fusesource/ide/project/camel/CamelModuleDelegate.java
7563c4db9ea7c2c70d8c71ccadcdba1faa88dbaf
[]
no_license
pramyasree/fuseide
d32da5e41264d39498e62abc58785b692845bebe
61e8cd41f80fa992fe34762d12f740b9e4463eff
refs/heads/master
2021-01-23T20:41:12.342436
2016-06-06T12:30:10
2016-06-06T12:30:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,945
java
/******************************************************************************* * Copyright (c) 2016 Red Hat, Inc. * Distributed under license by Red Hat, Inc. All rights reserved. * This program is made available under the terms of the * Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Red Hat, Inc. - initial API and implementation ******************************************************************************/ package org.fusesource.ide.project.camel; import java.util.ArrayList; import java.util.List; import org.eclipse.core.resources.IProject; import org.eclipse.jst.common.internal.modulecore.AddMappedOutputFoldersParticipant; import org.eclipse.jst.common.internal.modulecore.IgnoreJavaInSourceFolderParticipant; import org.eclipse.wst.common.componentcore.internal.flat.GlobalHeirarchyParticipant; import org.eclipse.wst.common.componentcore.internal.flat.IFlattenParticipant; import org.eclipse.wst.common.componentcore.resources.IVirtualComponent; import org.jboss.ide.eclipse.as.wtp.core.modules.IJBTModule; import org.jboss.ide.eclipse.as.wtp.core.modules.JBTFlatModuleDelegate; import org.jboss.ide.eclipse.as.wtp.core.modules.JBTFlatProjectModuleFactory; public class CamelModuleDelegate extends JBTFlatModuleDelegate implements IJBTModule { public CamelModuleDelegate(IProject project, IVirtualComponent aComponent, JBTFlatProjectModuleFactory myFactory) { super(project, aComponent, myFactory); } @Override public IFlattenParticipant[] getParticipants() { List<IFlattenParticipant> participants = new ArrayList<IFlattenParticipant>(); participants.add(new GlobalHeirarchyParticipant()); participants.add(new AddMappedOutputFoldersParticipant()); participants.add(new IgnoreJavaInSourceFolderParticipant()); return participants.toArray(new IFlattenParticipant[participants.size()]); } }
[ "lhein@apache.org" ]
lhein@apache.org
60b6493aa64cce4901cc5370d0474088f68bf92f
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/budejie/sources/com/spriteapp/booklibrary/e/e.java
f5aaa3d50f75ecd4bf7f92d89404fa49a87b4f75
[]
no_license
aheadlcx/analyzeApk
050b261595cecc85790558a02d79739a789ae3a3
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
refs/heads/master
2020-03-10T10:24:49.773318
2018-04-13T09:44:45
2018-04-13T09:44:45
129,332,351
6
2
null
null
null
null
UTF-8
Java
false
false
832
java
package com.spriteapp.booklibrary.e; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import com.spriteapp.booklibrary.a.a; import com.spriteapp.booklibrary.util.AppUtil; import com.spriteapp.booklibrary.util.ScreenUtil; public class e { public static Bitmap a(int i) { Bitmap createBitmap = Bitmap.createBitmap(ScreenUtil.getScreenWidth(), ScreenUtil.getScreenHeight(), Config.ARGB_8888); switch (i) { case 0: createBitmap.eraseColor(AppUtil.getAppContext().getResources().getColor(a.book_reader_read_day_background)); break; case 1: createBitmap.eraseColor(AppUtil.getAppContext().getResources().getColor(a.book_reader_read_night_background)); break; } return createBitmap; } }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
a88646f3d9bb428bcc6ee4795517939b7731f50f
9fe88de89c17a1ae00ac4757a3842624c243e2fb
/phpunit-converted/src/main/java/com/project/convertedCode/servlets/vendor/phpunit/phpunit/src/Framework/Constraint/servlet_StringEndsWith_php.java
35cad7fe8ab6dc8eeb8d8b90fac660fa4dd13c46
[ "LicenseRef-scancode-warranty-disclaimer", "BSD-3-Clause" ]
permissive
RuntimeConverter/PHPUnit-Java-Converted
bccc849c0c88e8cda7b0e8a1d17883d37beb9f7a
0a036307ab56c8b787860ad25a74a17584218fda
refs/heads/master
2020-03-18T17:07:42.956039
2018-05-27T02:09:17
2018-05-27T02:09:17
135,008,061
1
0
null
null
null
null
UTF-8
Java
false
false
1,200
java
package com.project.convertedCode.servlets.vendor.phpunit.phpunit.src.Framework.Constraint; import com.runtimeconverter.runtime.includes.RuntimeIncludable; import com.runtimeconverter.runtime.includes.RuntimeConverterServlet; import com.runtimeconverter.runtime.RuntimeEnv; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.annotation.WebServlet; @WebServlet("/vendor/phpunit/phpunit/src/Framework/Constraint/StringEndsWith.php") public class servlet_StringEndsWith_php extends RuntimeConverterServlet { protected final RuntimeIncludable getInclude() { return com.project .convertedCode .includes .vendor .phpunit .phpunit .src .Framework .Constraint .file_StringEndsWith_php .instance; } protected final RuntimeEnv getRuntimeEnv( String httpRequestType, HttpServletRequest req, HttpServletResponse resp) { return new com.project.convertedCode.main.ConvertedProjectRuntimeEnv( req, resp, this.getInclude()); } }
[ "support@runtimeconverter.com" ]
support@runtimeconverter.com
3aa0fe907c55c518d13b5b955cec03b0aff1dfe3
8748daf738df196d488d322a38d58d50e0763478
/app/src/main/java/com/app/collegeattendance/SelectionActivity.java
561845f33b7b91c003446791d9a244647fe0c54e
[]
no_license
nisargtrivedi/AttendanceApp
76d0617d3ac2cdd143b9c326a5cd05b7d490056e
758d188867bff1f5327ea92ccc9707bbda09328a
refs/heads/main
2023-01-10T03:21:37.237669
2020-11-10T08:08:43
2020-11-10T08:08:43
311,588,204
0
0
null
null
null
null
UTF-8
Java
false
false
2,377
java
package com.app.collegeattendance; import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.widget.ImageView; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.AppCompatButton; import com.app.collegeattendance.API.AppPreferences; import com.app.collegeattendance.student.StudentDashboard; import com.app.collegeattendance.student.StudentLogin; public class SelectionActivity extends AppCompatActivity { ImageView teacher,student; AppCompatButton btnGo; AppPreferences appPreferences; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); appPreferences=new AppPreferences(this); setContentView(R.layout.select_user_type); teacher=findViewById(R.id.teacher); student=findViewById(R.id.student); btnGo=findViewById(R.id.btnGo); if(!TextUtils.isEmpty(appPreferences.getString("student_id"))){ finish(); startActivity(new Intent(SelectionActivity.this, StudentDashboard.class)); }else if(!TextUtils.isEmpty(appPreferences.getString("facultyid"))){ finish(); startActivity(new Intent(SelectionActivity.this,HomeActivity.class)); } btnGo.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if(teacher.isSelected()){ finish(); startActivity(new Intent(SelectionActivity.this,MainActivity.class)); }else if(student.isSelected()){ finish(); startActivity(new Intent(SelectionActivity.this, StudentLogin.class)); } } }); teacher.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { teacher.setSelected(true); student.setSelected(false); } }); student.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { teacher.setSelected(false); student.setSelected(true); } }); } }
[ "nisarg.trivedi@vovance.com" ]
nisarg.trivedi@vovance.com
3a82af99e379bc781abace848458aa92a71ffde3
1f8609ac4f52e892f9d9045ed9966f759e4dfc08
/app/src/main/java/com/eduschool/eduschoolapp/recReqPOJO/recReqBean.java
af580897aa7d3f95ca842b76a6f626c570a35c0b
[]
no_license
mukulraw/eduschoolapp
61963e64fed75a590774c8fbc269c9e4c50a9dfc
01178365e764c2a83b6671326bfd4e3e33bd0403
refs/heads/master
2021-05-16T16:58:21.848721
2018-03-15T09:28:05
2018-03-15T09:28:05
120,094,350
0
1
null
null
null
null
UTF-8
Java
false
false
586
java
package com.eduschool.eduschoolapp.recReqPOJO; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.util.List; /** * Created by TBX on 9/20/2017. */ public class recReqBean { @SerializedName("recevrequest_list") @Expose private List<RecevrequestList> recevrequestList = null; public List<RecevrequestList> getRecevrequestList() { return recevrequestList; } public void setRecevrequestList(List<RecevrequestList> recevrequestList) { this.recevrequestList = recevrequestList; } }
[ "mukulraw199517@gmail.com" ]
mukulraw199517@gmail.com
44e39e9b1a791173ddb9cdcf07fcd5b133e7d958
3a75f95c9976052839bf2373f6a1e06f3166dd80
/restma-demo/src/limeng32/testSpring/pojo/Association.java
479b635840bba6f22637ef5acbbdc30d448689ac
[]
no_license
limeng32/restma-demo
268cd78298391a8a9c0d5f0d67aa62df952714f7
46a2089efbd7ea512019dfde8d79de38fab980cd
refs/heads/master
2016-09-09T19:48:55.449754
2015-08-23T15:23:00
2015-08-23T15:23:00
32,455,231
0
0
null
null
null
null
UTF-8
Java
false
false
2,653
java
package limeng32.testSpring.pojo; import java.io.Serializable; import limeng32.mybatis.plugin.mapper.annotation.FieldMapperAnnotation; import limeng32.mybatis.plugin.mapper.annotation.PersistentFlagAnnotation; import limeng32.mybatis.plugin.mapper.annotation.TableMapperAnnotation; import org.apache.ibatis.type.JdbcType; import com.alibaba.fastjson.annotation.JSONField; @TableMapperAnnotation(tableName = "Association") public class Association extends PojoSupport<Association> implements Serializable { private static final long serialVersionUID = 1L; @FieldMapperAnnotation(dbFieldName = "id", jdbcType = JdbcType.INTEGER, isUniqueKey = true) private Integer id; @FieldMapperAnnotation(dbFieldName = "name", jdbcType = JdbcType.VARCHAR) private String name; private java.util.Collection<Writer> writer; @Override public Integer getId() { return id; } @Override public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public java.util.Collection<Writer> getWriter() { if (writer == null) writer = new java.util.HashSet<Writer>(); return writer; } @JSONField(serialize = false) public java.util.Iterator<Writer> getIteratorWriter() { if (writer == null) writer = new java.util.HashSet<Writer>(); return writer.iterator(); } public void setWriter(java.util.Collection<Writer> newWriter) { removeAllWriter(); for (java.util.Iterator<Writer> iter = newWriter.iterator(); iter .hasNext();) addWriter((Writer) iter.next()); } public void addWriter(Writer newWriter) { if (newWriter == null) return; if (this.writer == null) this.writer = new java.util.HashSet<Writer>(); if (!this.writer.contains(newWriter)) { if (newWriter.getById(this.writer) != null) { removeWriter(newWriter.getById(this.writer)); } this.writer.add(newWriter); newWriter.setAssociation(this); } } public void removeWriter(Writer oldWriter) { if (oldWriter == null) return; if (this.writer != null) if (oldWriter.belongs(this.writer)) { oldWriter.quit(this.writer); oldWriter.setAssociation((Association) null); } } public void removeAllWriter() { if (writer != null) { Writer oldWriter; for (java.util.Iterator<Writer> iter = getIteratorWriter(); iter .hasNext();) { oldWriter = (Writer) iter.next(); iter.remove(); oldWriter.setAssociation((Association) null); } } } @PersistentFlagAnnotation private String _persistent; }
[ "limeng32@live.cn" ]
limeng32@live.cn
4140a5a037d1eb218cc98cb3f0b6bf5727a5c52f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_1ace8179021b5a1a65bda2fabe3e074fb3170681/JID/2_1ace8179021b5a1a65bda2fabe3e074fb3170681_JID_s.java
b05199638f3613ecbda0713fb4c7991bcf537772
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,246
java
/* * DPP - Serious Distributed Pair Programming * (c) Freie Universitaet Berlin - Fachbereich Mathematik und Informatik - 2006 * (c) Riad Djemili - 2006 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 1, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ package de.fu_berlin.inf.dpp.net; import java.io.Serializable; import java.util.regex.Pattern; import org.apache.log4j.Logger; import org.jivesoftware.smack.RosterEntry; import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smackx.muc.MultiUserChat; import de.fu_berlin.inf.dpp.util.StackTrace; /** * A JID which is used to identify the users of the XMPP network. * * @valueObject A JID is a value object, i.e. it is immutable! * * @author rdjemili */ public class JID implements Serializable { private static final Logger log = Logger.getLogger(JID.class.getName()); private static final long serialVersionUID = 4830741516870940459L; protected static final Pattern userAtHostPattern = Pattern.compile( "^[A-Z0-9._%+-]+@[A-Z0-9.-]+$", Pattern.CASE_INSENSITIVE); private final String jid; /** * Creates the client {@link JID} on the base of a service perspective * {@link JID} as explained in XEP-0045. * <p> * Example: A {@link MultiUserChat} participant has - from the perspective * of the {@link MultiUserChat} itself - the JID * <b>saros128280129@conference.jabber.ccc.de/bkahlert@jabber.org/Saros</b>. * This method would return the {@link JID} representing * <b>bkahlert@jabber.org/Saros</b>. * * @see <a href="http://xmpp.org/extensions/xep-0045.html#user">XEP-0045</a> * * @param servicePerspectiveJID * the XMPP address from the perspective of the service * @return the client JID portion */ public static JID createFromServicePerspective(String servicePerspectiveJID) { return new JID(StringUtils.parseResource(servicePerspectiveJID)); } /** * Construct a new JID * * @param jid * the JID in the format of user@host[/resource]. Resource is * optional. */ public JID(String jid) { if (jid == null) throw new IllegalArgumentException(JID.class.getSimpleName() + " cannot be null"); this.jid = jid; } /** * Construct a new JID * * @param rosterEntry */ public JID(RosterEntry rosterEntry) { this(rosterEntry.getUser()); } /** * Checks whether the {@link #getBase() base} portion is correctly formated. * * @param jid * @return */ public static boolean isValid(JID jid) { return userAtHostPattern.matcher(jid.getBase()).matches(); } /** * Checks whether the {@link #getBase() base} portion is correctly formated. * * @return */ public boolean isValid() { return isValid(this); } /** * @return the name segment of this JID. * @see StringUtils#parseName(String) */ public String getName() { return StringUtils.parseName(this.jid); } /** * @return the JID without resource qualifier. * @see StringUtils#parseBareAddress(String) */ public String getBase() { return StringUtils.parseBareAddress(this.jid); } /** * @return the domain segment of this JID. * @see StringUtils#parseServer(String) */ public String getDomain() { return StringUtils.parseServer(this.jid); } /** * @return the resource segment of this JID or the empty string if there is * none. * @see StringUtils#parseResource(String) */ public String getResource() { return StringUtils.parseResource(this.jid); } /** * Returns true if this JID does not have a resource part. */ public boolean isBareJID() { return "".equals(getResource()); } /** * Returns true if this JID does have a resource part. */ public boolean isResourceQualifiedJID() { return !isBareJID(); } /** * Returns the JID without any resource qualifier. */ public JID getBareJID() { return new JID(getBase()); } /** * Returns the unmodified JID this object was constructed with * * @return */ public String getRAW() { return this.jid; } /** * @return <code>true</code> if the IDs have the same user and domain. * Resource is ignored. */ @Override public boolean equals(Object obj) { if (obj == null) return false; if (obj instanceof JID) { JID other = (JID) obj; return getBase().equals(other.getBase()); } log.warn("Comparing a JID to something other a JID is not supported: " + obj.getClass(), new StackTrace()); return false; } /** * Returns true if this JID and the given JID are completely identical (this * includes the resource unlike equals) */ public boolean strictlyEquals(JID other) { return this.jid.equals(other.jid); } @Override public int hashCode() { return getBase().hashCode(); } /** * @return the complete string that was used to construct this object. */ @Override public String toString() { return this.jid; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
8612debb629526ddb417e2772baf8a6b4623f463
5a094472ff9a4f5d0417fe4ea1cf135a73d3e8f1
/src/main/java/com/blogspot/toomuchcoding/topFeaturesYouNeedToKnowAbout/service/WaiterImpl.java
29e76633bc3643422277db4501b902432e032ef9
[ "Apache-2.0" ]
permissive
YunZhang2014/mockito-instant
b412ef331060c203aff489fced1bc9fe409aac42
e262cfa5aef8665ee0b7e2ed94ae51a7cfc40132
refs/heads/master
2022-12-27T00:49:17.929919
2020-05-16T02:32:41
2020-05-16T02:32:41
264,338,211
0
0
Apache-2.0
2020-10-13T22:01:37
2020-05-16T01:54:54
Java
UTF-8
Java
false
false
7,474
java
package com.blogspot.toomuchcoding.topFeaturesYouNeedToKnowAbout.service; import com.blogspot.toomuchcoding.topFeaturesYouNeedToKnowAbout.exception.IAmTooLazyToDoItException; import com.blogspot.toomuchcoding.topFeaturesYouNeedToKnowAbout.exception.TooBusyToCalculateException; import com.blogspot.toomuchcoding.topFeaturesYouNeedToKnowAbout.exception.WrongMealException; import com.blogspot.toomuchcoding.topFeaturesYouNeedToKnowAbout.meal.Meal; import com.blogspot.toomuchcoding.topFeaturesYouNeedToKnowAbout.meal.RomanticDinnerMenu; import com.blogspot.toomuchcoding.topFeaturesYouNeedToKnowAbout.service.cleaning.*; import java.util.Iterator; import java.util.List; /** * User: mgrzejszczak * Date: 14.05.13 * Time: 11:22 */ public class WaiterImpl implements Waiter { public static final boolean VEGETARIAN_MEAL = true; public static final boolean NON_VEGETARIAN_MEAL = false; private static final boolean RESTAURANT_READY_TO_TAKE_AN_ORDER = true; private static final boolean RESTAURANT_NOT_READY_TO_TAKE_AN_ORDER = false; private static final boolean SUCCESSFULLY_CLEANED_THE_RESTAURANT = true; private static final boolean FAILED_TO_CLEAN_THE_RESTAURANT = false; private static final boolean SUCCESSFULLY_PREPARED_THE_RESTAURANT_TO_START = true; private static final boolean FAILED_TO_PREPARE_THE_RESTAURANT_TO_START = false; private final KitchenService kitchenService; private final AdministrativeStaffService administrativeStaffService; private final CleaningServiceFactory cleaningServiceFactory; public WaiterImpl(final KitchenService kitchenService) { this.kitchenService = kitchenService; this.administrativeStaffService = new GreatAdministrativeService(); this.cleaningServiceFactory = new CleaningServiceFactoryImpl(); } public WaiterImpl(final KitchenService kitchenService, final AdministrativeStaffService administrativeStaffService) { this.kitchenService = kitchenService; this.administrativeStaffService = administrativeStaffService; this.cleaningServiceFactory = new CleaningServiceFactoryImpl(); } public WaiterImpl(final KitchenService kitchenService, final AdministrativeStaffService administrativeStaffService, final CleaningServiceFactory cleaningServiceFactory) { this.kitchenService = kitchenService; this.administrativeStaffService = administrativeStaffService; this.cleaningServiceFactory = cleaningServiceFactory; } public WaiterImpl(final CleaningServiceFactory cleaningServiceFactory) { this.kitchenService = new SimpleKitchenService(); this.administrativeStaffService = new GreatAdministrativeService(); this.cleaningServiceFactory = cleaningServiceFactory; } @Override public List<Meal> bringOrderedVegetarianMeals(List<String> vegetarianMealNames) { List<Meal> preparedMeals = kitchenService.prepareVegetarianMeals(vegetarianMealNames); removeNonVegetarianMeals(preparedMeals); return preparedMeals; } private void removeNonVegetarianMeals(List<Meal> potentiallyNonVegetarianMeals) { Iterator<Meal> mealIterator = potentiallyNonVegetarianMeals.iterator(); while (mealIterator.hasNext()) { Meal preparedMeal = mealIterator.next(); if (!preparedMeal.isVegetarian()) { mealIterator.remove(); } } } @Override public Meal bringOrderedMeal(String mealName, boolean vegetarian) { Meal preparedMeal = kitchenService.prepareMeal(mealName, vegetarian); if (preparedMeal.isVegetarian() != vegetarian) { throw new WrongMealException("You've prepared a wrong meal!"); } return preparedMeal; } @Override public int calculateTotalWaitingTime(List<Meal> meals) { int totalTime = 0; for (Meal meal : meals) { try { totalTime = totalTime + kitchenService.calculatePreparationTime(meal); } catch (TooBusyToCalculateException tooBusyToCalculateException) { System.err.printf("I am sorry but I couldn't calculate the preparation time of the meal [%s]%n", meal.getName()); } } return totalTime; } @Override public boolean closeTheRestaurant() { boolean successfullyClosedTheKitchen = true; try { kitchenService.cleanTheKitchen(); } catch (IAmTooLazyToDoItException iAmTooLazyToDoItException) { successfullyClosedTheKitchen = false; System.err.println("Beat it! I am too lazy to clean the kitchen"); } return successfullyClosedTheKitchen; } @Override public boolean readyToTakeAnOrder() throws IAmTooLazyToDoItException { if (administrativeStaffService.isPowerOnline() && kitchenService.isOutfitChanged() && kitchenService.isKitchenPrepared()) { return RESTAURANT_READY_TO_TAKE_AN_ORDER; } return RESTAURANT_NOT_READY_TO_TAKE_AN_ORDER; } @Override public void bullyOtherWorkers() { administrativeStaffService.isPowerOnline(); kitchenService.isOutfitChanged(); kitchenService.isOutfitChanged(); kitchenService.isKitchenPrepared(); kitchenService.isOutfitChanged(); } @Override public String describeTheElementsOfTheRomanticDinner(RomanticDinnerMenu romanticDinnerMenu) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(romanticDinnerMenu.getFirstCourse().getName()).append(" "); stringBuilder.append(romanticDinnerMenu.getVegetarianFirstCourse().getName()).append(" "); stringBuilder.append(romanticDinnerMenu.getDessert().getName()); return stringBuilder.toString(); } @Override public boolean askTheCleaningServiceToCleanTheRestaurant(TypeOfCleaningService typeOfCleaningService) { CleaningService cleaningService = cleaningServiceFactory.getMeACleaningService(typeOfCleaningService); try{ cleaningService.cleanTheTables(); cleaningService.sendInformationAfterCleaning(); return SUCCESSFULLY_CLEANED_THE_RESTAURANT; }catch(CommunicationException communicationException){ System.err.println("An exception took place while trying to send info about cleaning the restaurant"); return FAILED_TO_CLEAN_THE_RESTAURANT; } } @Override public boolean prepareTheRestaurantToStart() { CleaningService cleaningService = cleaningServiceFactory.getMeACleaningService(TypeOfCleaningService.GOOD); cleaningService.cleanTheTables(); try{ AdministrativeStaffService administrativeStaffService = (AdministrativeStaffService)cleaningService; // that looks bad... if(administrativeStaffService.isPowerOnline()){ KitchenService kitchenService = (KitchenService)cleaningService; // that looks bad... again... kitchenService.cleanTheKitchen(); } return SUCCESSFULLY_PREPARED_THE_RESTAURANT_TO_START; }catch(ClassCastException classCastException){ System.err.println("Sorry this class can't do more than just clean the restaurant"); return FAILED_TO_PREPARE_THE_RESTAURANT_TO_START; } } public KitchenService getKitchenService() { return kitchenService; } }
[ "marcin@grzejszczak.pl" ]
marcin@grzejszczak.pl
571555e1b58be215fc8b43867a9c6ef289bc5e44
6c581f6164eebe845a848e8c2d9f8315f7e264fd
/org.abchip.mimo.biz.model/src/org/abchip/mimo/biz/model/product/config/ProductConfigConfig.java
60a6346fea44421a1e4ff6b0bd591738b8dd94ec
[]
no_license
abchip/mimo-biz20
7a0b110fd40733a7f3049d1871ef9559bc08db5c
a3cffeccb98d200ff2ecd629942b4279364d3373
refs/heads/master
2023-03-22T22:54:03.865399
2021-03-18T20:35:52
2021-03-18T20:35:52
245,134,382
0
0
null
null
null
null
UTF-8
Java
false
false
6,418
java
/** * Copyright (c) 2017, 2021 ABChip and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html */ package org.abchip.mimo.biz.model.product.config; import org.abchip.mimo.entity.EntityIdentifiable; import org.abchip.mimo.entity.EntityInfo; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Product Config Config</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li>{@link org.abchip.mimo.biz.model.product.config.ProductConfigConfig#getConfigItem <em>Config Item</em>}</li> * <li>{@link org.abchip.mimo.biz.model.product.config.ProductConfigConfig#getConfigId <em>Config Id</em>}</li> * <li>{@link org.abchip.mimo.biz.model.product.config.ProductConfigConfig#getConfigOptionId <em>Config Option Id</em>}</li> * <li>{@link org.abchip.mimo.biz.model.product.config.ProductConfigConfig#getSequenceNum <em>Sequence Num</em>}</li> * <li>{@link org.abchip.mimo.biz.model.product.config.ProductConfigConfig#getDescription <em>Description</em>}</li> * </ul> * * @see org.abchip.mimo.biz.model.product.config.ConfigPackage#getProductConfigConfig() * @model annotation="mimo-ent-frame title='Existing Product Configurations' dictionary='ProductEntityLabels' formula='description'" * @generated */ public interface ProductConfigConfig extends EntityIdentifiable, EntityInfo { /** * Returns the value of the '<em><b>Config Item</b></em>' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the value of the '<em>Config Item</em>' reference. * @see #setConfigItem(ProductConfigItem) * @see org.abchip.mimo.biz.model.product.config.ConfigPackage#getProductConfigConfig_ConfigItem() * @model required="true" * annotation="mimo-ent-slot key='true'" * @generated */ ProductConfigItem getConfigItem(); /** * Sets the value of the '{@link org.abchip.mimo.biz.model.product.config.ProductConfigConfig#getConfigItem <em>Config Item</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Config Item</em>' reference. * @see #getConfigItem() * @generated */ void setConfigItem(ProductConfigItem value); /** * Returns the value of the '<em><b>Config Id</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Config Id</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Config Id</em>' attribute. * @see #setConfigId(String) * @see org.abchip.mimo.biz.model.product.config.ConfigPackage#getProductConfigConfig_ConfigId() * @model required="true" * annotation="mimo-ent-slot key='true'" * annotation="mimo-ent-format length='20'" * @generated */ String getConfigId(); /** * Sets the value of the '{@link org.abchip.mimo.biz.model.product.config.ProductConfigConfig#getConfigId <em>Config Id</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Config Id</em>' attribute. * @see #getConfigId() * @generated */ void setConfigId(String value); /** * Returns the value of the '<em><b>Config Option Id</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Config Option Id</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Config Option Id</em>' attribute. * @see #setConfigOptionId(String) * @see org.abchip.mimo.biz.model.product.config.ConfigPackage#getProductConfigConfig_ConfigOptionId() * @model required="true" * annotation="mimo-ent-slot key='true'" * annotation="mimo-ent-format length='20'" * @generated */ String getConfigOptionId(); /** * Sets the value of the '{@link org.abchip.mimo.biz.model.product.config.ProductConfigConfig#getConfigOptionId <em>Config Option Id</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Config Option Id</em>' attribute. * @see #getConfigOptionId() * @generated */ void setConfigOptionId(String value); /** * Returns the value of the '<em><b>Description</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Description</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Description</em>' attribute. * @see #setDescription(String) * @see org.abchip.mimo.biz.model.product.config.ConfigPackage#getProductConfigConfig_Description() * @model annotation="mimo-ent-format type='description'" * @generated */ String getDescription(); /** * Sets the value of the '{@link org.abchip.mimo.biz.model.product.config.ProductConfigConfig#getDescription <em>Description</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Description</em>' attribute. * @see #getDescription() * @generated */ void setDescription(String value); /** * Returns the value of the '<em><b>Sequence Num</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Sequence Num</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Sequence Num</em>' attribute. * @see #setSequenceNum(long) * @see org.abchip.mimo.biz.model.product.config.ConfigPackage#getProductConfigConfig_SequenceNum() * @model required="true" * annotation="mimo-ent-slot key='true'" * annotation="mimo-ent-format precision='20' scale='0'" * @generated */ long getSequenceNum(); /** * Sets the value of the '{@link org.abchip.mimo.biz.model.product.config.ProductConfigConfig#getSequenceNum <em>Sequence Num</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Sequence Num</em>' attribute. * @see #getSequenceNum() * @generated */ void setSequenceNum(long value); } // ProductConfigConfig
[ "dev@abchip.it" ]
dev@abchip.it
57d7fd66df8cbb0116ac8c039edd48aac3a8560e
bce31e3c7517825fdfa3151322e5d60d6ee59538
/navisu-domain/src/main/java/bzh/terrevirtuelle/navisu/domain/nmea/model/ais/impl/utils/UtilsRateOfTurn8.java
e78a33ef8b63d7bc597bf1d4b2006c851cf09d1c
[]
no_license
terre-virtuelle/navisu
b0355461b9c77035834f79646036a9dc002f203d
97bc2baaed37f83c9b773f1973a2a65683dc9e79
refs/heads/master
2021-08-04T03:41:09.226887
2021-06-17T11:27:22
2021-06-17T11:27:22
14,243,882
31
16
null
null
null
null
UTF-8
Java
false
false
3,920
java
package bzh.terrevirtuelle.navisu.domain.nmea.model.ais.impl.utils; /** This class provides functions to analyze the rate-of-turn value that is returned by {@link AISMessagePositionReport#getRateOfTurn()}. * @author Pierre van de Laar * @author Pierre America * @author Brian C. Lane */ public class UtilsRateOfTurn8 { /** The rate-of-turn value that is used to signal unavailability, according to the AIS standard. */ private static final int DEFAULTVALUE = -0x80; /** The minimum rate-of-turn value when a turn indicator is available. */ private static final int MINTurnIndicatorVALUE = -126; /** The maximum rate-of-turn value when a turn indicator is available. */ private static final int MAXTurnIndicatorVALUE = 126; /** Checks if rate-of-turn information is available. * This means that the value does not signal unavailability. * It is still possible that no turn indicator is available (see {@link UtilsRateOfTurn8#isTurnIndicatorAvailable}). * @param value the rate-of-turn value that is returned by {@link AISMessagePositionReport#getRateOfTurn()}. * @return true if the rate-of-turn is available */ public static boolean isTurnInformationAvailable( int value ) { return value != UtilsRateOfTurn8.DEFAULTVALUE; } /** Checks if a turn indicator is available. * This means that the rate-of-turn value provides a numeric estimate of the rate-of-turn, * which can be computed using {@link UtilsRateOfTurn8#toDegreesPerMinute}. * @param value the rate-of-turn value that is returned by {@link AISMessagePositionReport#getRateOfTurn()}. * @return true if the rate-of-turn is available */ public static boolean isTurnIndicatorAvailable( int value ) { return (UtilsRateOfTurn8.MINTurnIndicatorVALUE <= value) && (value <= UtilsRateOfTurn8.MAXTurnIndicatorVALUE); } /** Converts the rate-of-turn value ROT<sub>AIS</sub> to a numerical estimate for the rate-of-turn ROT<sub>sensor</sub> (in degrees/minute). * * Page 101 of the AIS standard ITU-R M.1371-4 states: * ROT<sub>AIS</sub> = 4.733 SQRT(ROT<sub>sensor</sub>) * <br> * Note that a ROT<sub>AIS</sub> of &plusmn;126 indicates a rate-of-turn of 708 degrees/min <b>or higher</b>. * @precondition isTurnIndicatorAvailable(rot) * @param rot the rate-of-turn value ROT<sub>AIS</sub> that is returned by {@link AISMessagePositionReport#getRateOfTurn()}. * @return a numerical estimate for the rate-of-turn ROT<sub>sensor</sub> (in degrees/minute) (positive sign indicates turning right) */ public static double toDegreesPerMinute ( int rot ) { assert(isTurnIndicatorAvailable(rot)); double v = rot/4.733; double v2 = v*v; // Math.pow(v, 2) if(rot < 0) { return -v2; } else { return v2; } } /** Makes human-readable text from a rate-of-turn value. * @param rot the rate-of-turn value that is returned by {@link AISMessagePositionReport#getRateOfTurn()}. * @return a human-readable string represent the rate-of-turn information */ public static String toString(int rot) { String direction; //sign of rot is encoded in direction if (rot < 0) { direction = "left"; } else { direction = "right"; } switch (Math.abs(rot)) { case 128: return "no turn information available (default)"; case 127: return "turning " + direction + " at more than 5 degrees per 30 s (No TI available)"; case 126: return "turning " + direction + " at 708 degrees per min or higher"; case 0 : return "not turning"; default : return "turning " + direction + " at " + Math.abs(toDegreesPerMinute(rot)) + " degrees per min"; //abs value since sign of rot is encoded in direction } } /** This constructor is made private to indicate that clients should not construct instances of this class. */ private UtilsRateOfTurn8 () { } }
[ "serge@serge-XPS-8500" ]
serge@serge-XPS-8500
8d9ea9c3500e652172f6bdef8c7d5e2b5fe3a955
0ea271177f5c42920ac53cd7f01f053dba5c14e4
/5.3.5/sources/org/telegram/messenger/exoplayer2/extractor/ts/H265Reader$SampleReader.java
870c1adbe6c5974cc250e60cfb6e8cdc0fb94f1c
[]
no_license
alireza-ebrahimi/telegram-talaeii
367a81a77f9bc447e729b2ca339f9512a4c2860e
68a67e6f104ab8a0888e63c605e8bbad12c4a20e
refs/heads/master
2020-03-21T13:44:29.008002
2018-12-09T10:30:29
2018-12-09T10:30:29
138,622,926
12
1
null
null
null
null
UTF-8
Java
false
false
3,555
java
package org.telegram.messenger.exoplayer2.extractor.ts; import org.telegram.messenger.exoplayer2.extractor.TrackOutput; final class H265Reader$SampleReader { private static final int FIRST_SLICE_FLAG_OFFSET = 2; private boolean isFirstParameterSet; private boolean isFirstSlice; private boolean lookingForFirstSliceFlag; private int nalUnitBytesRead; private boolean nalUnitHasKeyframeData; private long nalUnitStartPosition; private long nalUnitTimeUs; private final TrackOutput output; private boolean readingSample; private boolean sampleIsKeyframe; private long samplePosition; private long sampleTimeUs; private boolean writingParameterSets; public H265Reader$SampleReader(TrackOutput output) { this.output = output; } public void reset() { this.lookingForFirstSliceFlag = false; this.isFirstSlice = false; this.isFirstParameterSet = false; this.readingSample = false; this.writingParameterSets = false; } public void startNalUnit(long position, int offset, int nalUnitType, long pesTimeUs) { boolean z; boolean z2 = false; this.isFirstSlice = false; this.isFirstParameterSet = false; this.nalUnitTimeUs = pesTimeUs; this.nalUnitBytesRead = 0; this.nalUnitStartPosition = position; if (nalUnitType >= 32) { if (!this.writingParameterSets && this.readingSample) { outputSample(offset); this.readingSample = false; } if (nalUnitType <= 34) { this.isFirstParameterSet = !this.writingParameterSets; this.writingParameterSets = true; } } if (nalUnitType < 16 || nalUnitType > 21) { z = false; } else { z = true; } this.nalUnitHasKeyframeData = z; if (this.nalUnitHasKeyframeData || nalUnitType <= 9) { z2 = true; } this.lookingForFirstSliceFlag = z2; } public void readNalUnitData(byte[] data, int offset, int limit) { if (this.lookingForFirstSliceFlag) { int headerOffset = (offset + 2) - this.nalUnitBytesRead; if (headerOffset < limit) { boolean z; if ((data[headerOffset] & 128) != 0) { z = true; } else { z = false; } this.isFirstSlice = z; this.lookingForFirstSliceFlag = false; return; } this.nalUnitBytesRead += limit - offset; } } public void endNalUnit(long position, int offset) { if (this.writingParameterSets && this.isFirstSlice) { this.sampleIsKeyframe = this.nalUnitHasKeyframeData; this.writingParameterSets = false; } else if (this.isFirstParameterSet || this.isFirstSlice) { if (this.readingSample) { outputSample(offset + ((int) (position - this.nalUnitStartPosition))); } this.samplePosition = this.nalUnitStartPosition; this.sampleTimeUs = this.nalUnitTimeUs; this.readingSample = true; this.sampleIsKeyframe = this.nalUnitHasKeyframeData; } } private void outputSample(int offset) { this.output.sampleMetadata(this.sampleTimeUs, this.sampleIsKeyframe ? 1 : 0, (int) (this.nalUnitStartPosition - this.samplePosition), offset, null); } }
[ "alireza.ebrahimi2006@gmail.com" ]
alireza.ebrahimi2006@gmail.com
6fb1f71b776b23029c4a43455cc70c5c260e12ef
49d20dff92a6a1198a30b3526cfb85b93ba645c4
/src/main/java/net/schmizz/sshj/sftp/RemoteFile.java
641055736cd50992507cee9d567620f99f366f13
[ "Apache-2.0", "BSD-3-Clause", "MIT" ]
permissive
cloudera/sshj
40229cb25d0cbf0d86e256cbc621cc12bb486c5f
3838dd20d7cbc503b98f26bd268f1acdd9fe2a3d
refs/heads/master
2023-03-21T17:26:56.438973
2011-06-23T00:17:57
2011-06-23T00:27:58
1,856,139
6
7
null
null
null
null
UTF-8
Java
false
false
5,381
java
/* * Copyright 2010, 2011 sshj contributors * * 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.schmizz.sshj.sftp; import net.schmizz.sshj.sftp.Response.StatusCode; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public class RemoteFile extends RemoteResource { public RemoteFile(Requester requester, String path, String handle) { super(requester, path, handle); } public RemoteFileInputStream getInputStream() { return new RemoteFileInputStream(); } public RemoteFileOutputStream getOutputStream() { return new RemoteFileOutputStream(); } public FileAttributes fetchAttributes() throws IOException { return requester.doRequest(newRequest(PacketType.FSTAT)) .ensurePacketTypeIs(PacketType.ATTRS) .readFileAttributes(); } public long length() throws IOException { return fetchAttributes().getSize(); } public void setLength(long len) throws IOException { setAttributes(new FileAttributes.Builder().withSize(len).build()); } public int read(long fileOffset, byte[] to, int offset, int len) throws IOException { Response res = requester.doRequest(newRequest(PacketType.READ).putUInt64(fileOffset).putUInt32(len)); switch (res.getType()) { case DATA: int recvLen = res.readUInt32AsInt(); System.arraycopy(res.array(), res.rpos(), to, offset, recvLen); return recvLen; case STATUS: res.ensureStatusIs(StatusCode.EOF); return -1; default: throw new SFTPException("Unexpected packet: " + res.getType()); } } public void write(long fileOffset, byte[] data, int off, int len) throws IOException { requester.doRequest(newRequest(PacketType.WRITE) .putUInt64(fileOffset) .putUInt32(len - off) .putRawBytes(data, off, len) ).ensureStatusPacketIsOK(); } public void setAttributes(FileAttributes attrs) throws IOException { requester.doRequest(newRequest(PacketType.FSETSTAT).putFileAttributes(attrs)).ensureStatusPacketIsOK(); } public int getOutgoingPacketOverhead() { return 1 + // packet type 4 + // request id 4 + // next length handle.length() + // next 8 + // file offset 4 + // data length 4; // packet length } public class RemoteFileOutputStream extends OutputStream { private final byte[] b = new byte[1]; private long fileOffset; public RemoteFileOutputStream() { this(0); } public RemoteFileOutputStream(long fileOffset) { this.fileOffset = fileOffset; } @Override public void write(int w) throws IOException { b[0] = (byte) w; write(b, 0, 1); } @Override public void write(byte[] buf, int off, int len) throws IOException { RemoteFile.this.write(fileOffset, buf, off, len); fileOffset += len; } } public class RemoteFileInputStream extends InputStream { private final byte[] b = new byte[1]; private long fileOffset; private long markPos; private long readLimit; public RemoteFileInputStream() { this(0); } public RemoteFileInputStream(int fileOffset) { this.fileOffset = fileOffset; } @Override public boolean markSupported() { return true; } @Override public void mark(int readLimit) { this.readLimit = readLimit; markPos = fileOffset; } @Override public void reset() throws IOException { fileOffset = markPos; } @Override public long skip(long n) throws IOException { return (this.fileOffset = Math.min(fileOffset + n, length())); } @Override public int read() throws IOException { return read(b, 0, 1) == -1 ? -1 : b[0] & 0xff; } @Override public int read(byte[] into, int off, int len) throws IOException { int read = RemoteFile.this.read(fileOffset, into, off, len); if (read != -1) { fileOffset += read; if (markPos != 0 && read > readLimit) // Invalidate mark position markPos = 0; } return read; } } }
[ "shikhar@schmizz.net" ]
shikhar@schmizz.net
7e19c32fb17f364ef33c48bc1e4322c9bef52a59
90f17cd659cc96c8fff1d5cfd893cbbe18b1240f
/src/main/java/com/google/android/gms/internal/clearcut/zzgn.java
18ffc2664395e92bd0a2d1d78d2008f4ba07998a
[]
no_license
redpicasso/fluffy-octo-robot
c9b98d2e8745805edc8ddb92e8afc1788ceadd08
b2b62d7344da65af7e35068f40d6aae0cd0835a6
refs/heads/master
2022-11-15T14:43:37.515136
2020-07-01T22:19:16
2020-07-01T22:19:16
276,492,708
0
0
null
null
null
null
UTF-8
Java
false
false
183
java
package com.google.android.gms.internal.clearcut; import com.google.android.gms.internal.clearcut.zzge.zzq.zzc; final class zzgn implements zzck<zzc> { zzgn() { } }
[ "aaron@goodreturn.org" ]
aaron@goodreturn.org
03c13f85cc95340be64fb9acb3f8e04eed2c513b
61cf3109eaf4561e071d93f9daf0d3cf9155ca9f
/src/com/rbt/dao/impl/EmailhistoryDao.java
8dc32037d9bd479504378d8c6715e4394299b931
[]
no_license
haoouwen/epf
b620fe05c93db178a122cfef778d31c036a2a822
abe0f1ed564f33dcf766591c5f9b04ce2b5e8094
refs/heads/master
2021-01-19T13:46:10.278247
2017-08-20T10:40:12
2017-08-20T10:40:12
100,859,509
1
2
null
null
null
null
UTF-8
Java
false
false
564
java
/* * Package:com.rbt.dao.impl * FileName: EmailhistoryDao.java */ package com.rbt.dao.impl; import org.springframework.stereotype.Repository; import com.rbt.dao.IEmailhistoryDao; import com.rbt.model.Emailhistory; /** * @function 功能 记录邮件发送历史记录dao层业务接口实现类 * @author 创建人 HZX * @date 创建日期 Wed Jan 09 12:52:35 CST 2014 */ @Repository public class EmailhistoryDao extends GenericDao<Emailhistory,String> implements IEmailhistoryDao { public EmailhistoryDao() { super(Emailhistory.class); } }
[ "Administrator@USER-20170608NM" ]
Administrator@USER-20170608NM
1772b354e58e9c9510e53e79244c3d177d5cd765
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/micwallace_reddinator/reddinator/src/main/java/au/com/wallaceit/reddinator/ui/ActionbarFragmentActivity.java
78a1057472d6caff2728b025349b27bbb4053f11
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
429
java
// isComment package au.com.wallaceit.reddinator.ui; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import au.com.wallaceit.reddinator.core.Utilities; public class isClassOrIsInterface extends FragmentActivity { @Override protected void isMethod(Bundle isParameter) { super.isMethod(isNameExpr); // isComment isNameExpr.isMethod(this, isNameExpr.isMethod()); } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
b75e5b4bd1a84cb329c1b5c0dca2bf1d33787145
208ba847cec642cdf7b77cff26bdc4f30a97e795
/u/src/main/java/org.wp.u/models/BlogPairId.java
ab33b8a8fbfafb6c159db8b4860393c051bcd6f8
[]
no_license
kageiit/perf-android-large
ec7c291de9cde2f813ed6573f706a8593be7ac88
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
refs/heads/master
2021-01-12T14:00:19.468063
2016-09-27T13:10:42
2016-09-27T13:10:42
69,685,305
0
0
null
2016-09-30T16:59:49
2016-09-30T16:59:48
null
UTF-8
Java
false
false
580
java
package org.wp.u.models; import java.io.Serializable; /** * Simple POJO to store a pair of ids: a remoteBlogId + a genericId. * Could be used to identify a comment (remoteBlogId + commentId) or a post (remoteBlogId + postId) */ public class BlogPairId implements Serializable { private long mId; private long mRemoteBlogId; public BlogPairId(long remoteBlogId, long id) { mRemoteBlogId = remoteBlogId; mId = id; } public long getId() { return mId; } public long getRemoteBlogId() { return mRemoteBlogId; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
c13083986fcde63c41c56cbfbb94a831a166d66e
751d84ec4f6834627bc4d95be6373081310d9582
/Java OOP Basics/t04_Polymorphism/p03_WildFarm/Main.java
6511aff5e62abb2a0123a8caefd49e16b437e009
[]
no_license
AtanasYordanov/Java-Advanced
efcfac4f5e4d36956763f5ebbae727bab5aad755
1c126edaff0d8489aa64a8dbf1e2b8ce69902d57
refs/heads/master
2021-07-24T03:00:30.313958
2018-10-19T19:10:57
2018-10-19T19:10:57
133,526,065
0
1
null
null
null
null
UTF-8
Java
false
false
2,115
java
package t04_Inheritance.p03_WildFarm; import t04_Inheritance.p03_WildFarm.animals.*; import t04_Inheritance.p03_WildFarm.foods.Food; import t04_Inheritance.p03_WildFarm.foods.Meat; import t04_Inheritance.p03_WildFarm.foods.Vegetable; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); List<Animal> animals = new ArrayList<>(); for (String line = reader.readLine(); !line.equals("End"); line = reader.readLine()) { String[] tokens = line.split(" "); Animal animal = getAnimal(tokens); tokens = reader.readLine().split(" "); Food food = getFood(tokens); animal.makeSound(); try { animal.eat(food); } catch (IllegalArgumentException e) { System.out.println(e.getMessage()); } animals.add(animal); } animals.forEach(System.out::println); } private static Food getFood(String[] tokens) { String type = tokens[0]; int amount = Integer.parseInt(tokens[1]); switch (type) { case "Vegetable": return new Vegetable(amount); default: return new Meat(amount); } } private static Animal getAnimal(String[] tokens) { String type = tokens[0]; String name = tokens[1]; double weight = Double.parseDouble(tokens[2]); String region = tokens[3]; switch (type) { case "Cat": String breed = tokens[4]; return new Cat(name, weight, region, breed); case "Tiger": return new Tiger(name, weight, region); case "Zebra": return new Zebra(name, weight, region); default: return new Mouse(name, weight, region); } } }
[ "naskoraist@gmail.com" ]
naskoraist@gmail.com
46679a11e7cf6bc7e2bc224a399e460763aeeb6e
4d16d88c79f541efd89223a5b67eba381e1f3bbc
/src/org/traccar/helper/Crc.java
418ec313218d2e102517d9572ac9181bd15c7ea5
[ "Apache-2.0" ]
permissive
demianalonso/traccar
c310d77e3eab1212513c199b36feacbc484def3f
412702aeb4baab45e9432ec3ded30426b1ecc58f
refs/heads/master
2021-01-15T09:01:48.180605
2016-03-17T19:11:34
2016-03-17T19:11:34
37,136,858
3
2
null
2015-06-09T14:26:19
2015-06-09T14:26:19
null
UTF-8
Java
false
false
7,897
java
/* * Copyright 2012 Anton Tananaev (anton.tananaev@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.traccar.helper; import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.util.zip.CRC32; /** * CRC functions */ public class Crc { private static final int crc16CcittTableReverse[] = { 0x0000, 0x1189, 0x2312, 0x329B, 0x4624, 0x57AD, 0x6536, 0x74BF, 0x8C48, 0x9DC1, 0xAF5A, 0xBED3, 0xCA6C, 0xDBE5, 0xE97E, 0xF8F7, 0x1081, 0x0108, 0x3393, 0x221A, 0x56A5, 0x472C, 0x75B7, 0x643E, 0x9CC9, 0x8D40, 0xBFDB, 0xAE52, 0xDAED, 0xCB64, 0xF9FF, 0xE876, 0x2102, 0x308B, 0x0210, 0x1399, 0x6726, 0x76AF, 0x4434, 0x55BD, 0xAD4A, 0xBCC3, 0x8E58, 0x9FD1, 0xEB6E, 0xFAE7, 0xC87C, 0xD9F5, 0x3183, 0x200A, 0x1291, 0x0318, 0x77A7, 0x662E, 0x54B5, 0x453C, 0xBDCB, 0xAC42, 0x9ED9, 0x8F50, 0xFBEF, 0xEA66, 0xD8FD, 0xC974, 0x4204, 0x538D, 0x6116, 0x709F, 0x0420, 0x15A9, 0x2732, 0x36BB, 0xCE4C, 0xDFC5, 0xED5E, 0xFCD7, 0x8868, 0x99E1, 0xAB7A, 0xBAF3, 0x5285, 0x430C, 0x7197, 0x601E, 0x14A1, 0x0528, 0x37B3, 0x263A, 0xDECD, 0xCF44, 0xFDDF, 0xEC56, 0x98E9, 0x8960, 0xBBFB, 0xAA72, 0x6306, 0x728F, 0x4014, 0x519D, 0x2522, 0x34AB, 0x0630, 0x17B9, 0xEF4E, 0xFEC7, 0xCC5C, 0xDDD5, 0xA96A, 0xB8E3, 0x8A78, 0x9BF1, 0x7387, 0x620E, 0x5095, 0x411C, 0x35A3, 0x242A, 0x16B1, 0x0738, 0xFFCF, 0xEE46, 0xDCDD, 0xCD54, 0xB9EB, 0xA862, 0x9AF9, 0x8B70, 0x8408, 0x9581, 0xA71A, 0xB693, 0xC22C, 0xD3A5, 0xE13E, 0xF0B7, 0x0840, 0x19C9, 0x2B52, 0x3ADB, 0x4E64, 0x5FED, 0x6D76, 0x7CFF, 0x9489, 0x8500, 0xB79B, 0xA612, 0xD2AD, 0xC324, 0xF1BF, 0xE036, 0x18C1, 0x0948, 0x3BD3, 0x2A5A, 0x5EE5, 0x4F6C, 0x7DF7, 0x6C7E, 0xA50A, 0xB483, 0x8618, 0x9791, 0xE32E, 0xF2A7, 0xC03C, 0xD1B5, 0x2942, 0x38CB, 0x0A50, 0x1BD9, 0x6F66, 0x7EEF, 0x4C74, 0x5DFD, 0xB58B, 0xA402, 0x9699, 0x8710, 0xF3AF, 0xE226, 0xD0BD, 0xC134, 0x39C3, 0x284A, 0x1AD1, 0x0B58, 0x7FE7, 0x6E6E, 0x5CF5, 0x4D7C, 0xC60C, 0xD785, 0xE51E, 0xF497, 0x8028, 0x91A1, 0xA33A, 0xB2B3, 0x4A44, 0x5BCD, 0x6956, 0x78DF, 0x0C60, 0x1DE9, 0x2F72, 0x3EFB, 0xD68D, 0xC704, 0xF59F, 0xE416, 0x90A9, 0x8120, 0xB3BB, 0xA232, 0x5AC5, 0x4B4C, 0x79D7, 0x685E, 0x1CE1, 0x0D68, 0x3FF3, 0x2E7A, 0xE70E, 0xF687, 0xC41C, 0xD595, 0xA12A, 0xB0A3, 0x8238, 0x93B1, 0x6B46, 0x7ACF, 0x4854, 0x59DD, 0x2D62, 0x3CEB, 0x0E70, 0x1FF9, 0xF78F, 0xE606, 0xD49D, 0xC514, 0xB1AB, 0xA022, 0x92B9, 0x8330, 0x7BC7, 0x6A4E, 0x58D5, 0x495C, 0x3DE3, 0x2C6A, 0x1EF1, 0x0F78 }; private static final int crc16CcittTable[] = { 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7, 0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF, 0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6, 0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE, 0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485, 0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D, 0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4, 0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC, 0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823, 0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B, 0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12, 0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A, 0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41, 0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49, 0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70, 0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78, 0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F, 0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067, 0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E, 0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256, 0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D, 0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405, 0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C, 0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634, 0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB, 0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3, 0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A, 0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92, 0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9, 0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1, 0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8, 0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0 }; private static final int crc16CcittStart = 0xFFFF; private static final int crc16CcittXorout = 0xFFFF; private static int crc16Unreflected(ByteBuffer buf, int crc_in, int[] table) { int crc16 = crc_in; for (int i = 0; i < buf.remaining(); i++) { crc16 = table[((crc16 >> 8) ^ buf.get(i)) & 0xff] ^ (crc16 << 8); } return crc16 & 0xFFFF; } private static int crc16Reflected(ByteBuffer buf, int crc_in, int[] table) { int crc16 = crc_in; for (int i = 0; i < buf.remaining(); i++) { crc16 = table[(crc16 ^ buf.get(i)) & 0xff] ^ (crc16 >> 8); } return crc16 & 0xFFFF; } public static int crc16Ccitt(ByteBuffer buf) { return crc16Reflected(buf, crc16CcittStart, crc16CcittTableReverse) ^ crc16CcittXorout; } public static int crc16X25Ccitt(ByteBuffer buf) { return crc16Unreflected(buf, crc16CcittStart, crc16CcittTable); } public static int crc16CcittSeed(ByteBuffer buf, int seed) { return crc16Reflected(buf, seed, crc16CcittTableReverse) ^ crc16CcittXorout; } public static int crc32(ByteBuffer buf) { CRC32 checksum = new CRC32(); for (int i = 0; i < buf.remaining(); i++) { checksum.update(buf.get(i)); } return (int) checksum.getValue(); } public static int xorChecksum(ByteBuffer buf) { int checksum = 0; for (int i = 0; i < buf.remaining(); i++) { checksum ^= buf.get(i); } return checksum; } public static String nmeaChecksum(String msg) { int checksum = 0; byte bytes[] = msg.getBytes(Charset.defaultCharset()); for (int i = 1; i < msg.length(); i++) { checksum ^= bytes[i]; } return String.format("*%02x", checksum).toUpperCase(); } public static long luhnChecksum(long imei) { long checksum = 0; long remain = imei; for (int i = 0; remain != 0; i++) { long digit = remain % 10; if ((i % 2) == 0) { digit *= 2; if (digit >= 10) { digit = 1 + (digit % 10); } } checksum += digit; remain /= 10; } return 10 - (checksum % 10); } }
[ "anton.tananaev@gmail.com" ]
anton.tananaev@gmail.com
26403fd8e63a22d59fce851004bc717e1197e9a7
bbe10639bb9c8f32422122c993530959534560e1
/delivery/app-release_source_from_JADX/com/google/android/gms/internal/zzsl.java
6a1e98396f76b3e97ae9bb8b604c4a0548e95a7c
[ "Apache-2.0" ]
permissive
ANDROFAST/delivery_articulos
dae74482e41b459963186b6e7e3d6553999c5706
ddcc8b06d7ea2895ccda2e13c179c658703fec96
refs/heads/master
2020-04-07T15:13:18.470392
2018-11-21T02:15:19
2018-11-21T02:15:19
158,476,390
0
0
null
null
null
null
UTF-8
Java
false
false
197
java
package com.google.android.gms.internal; import java.io.IOException; import java.io.InputStream; public interface zzsl { void close(); InputStream zzfU(String str) throws IOException; }
[ "cespedessanchezalex@gmail.com" ]
cespedessanchezalex@gmail.com
a16eeaac4d1d12fadab87c37948e2a2cc0c7b416
6cef7fc78cc935f733f3707fca94776effb94875
/network/kraken-ice/src/main/java/Ice/ResponseSentException.java
4f81693e77187d2ac19a06fd26d7310caaf27d43
[]
no_license
xeraph/kraken
1a5657d837caeaa8c6c045b24cd309d7184fd5b5
a2b6fe120b5c7d7cde0309ec1d4c3335abef17a1
refs/heads/master
2021-01-20T23:36:48.613826
2013-01-15T01:03:44
2013-01-15T01:03:44
7,766,261
1
0
null
null
null
null
UTF-8
Java
false
false
829
java
// ********************************************************************** // // Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** // Ice version 3.4.1 package Ice; // <auto-generated> // // Generated from file `LocalException.ice' // // Warning: do not edit this file. // // </auto-generated> /** * Indicates that the response to a request has already been sent; * re-dispatching such a request is not possible. * **/ public class ResponseSentException extends Ice.LocalException { public String ice_name() { return "Ice::ResponseSentException"; } }
[ "devnull@localhost" ]
devnull@localhost
b91e9a0ef11defb118710ab2c26b956ac0c5008f
f37e90775a158ea0ae644e334eac5bba341f4989
/Java+/Libs+/Cloud+/Azure+/MSAL/src/azure/certificate/AuthFilter.java
55c8a2a27787ad722ffbb14871d9660bd686a655
[]
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
3,869
java
package azure.certificate; import com.microsoft.aad.msal4j.AuthorizationRequestUrlParameters; import com.microsoft.aad.msal4j.Prompt; import com.microsoft.aad.msal4j.PublicClientApplication; import com.microsoft.aad.msal4j.ResponseMode; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.HandlerWrapper; import java.io.IOException; import java.net.MalformedURLException; import java.util.List; import java.util.Set; import java.util.UUID; import static azure.certificate.RedirectHandler.REDIRECT_ENDPOINT; class AuthFilter extends HandlerWrapper { public static final String GRAPH_USER_READ_SCOPE = "https://graph.microsoft.com/User.Read"; private static final List<String> NOT_SECURE_PATHS = List.of(REDIRECT_ENDPOINT); private final String authority; private final String redirectUri; private final String clientId; private final String tokenAttr; private final Set<String> scopes; private static final String USER_COUNTRY_CLAIM = "ctry"; public AuthFilter(String authority, String redirectUri, String clientId, String tokenAttr, Set<String> scopes) { this.authority = authority; this.redirectUri = redirectUri; this.clientId = clientId; this.tokenAttr = tokenAttr; this.scopes = scopes; } @Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { var path = request.getPathInfo(); var notSecure = NOT_SECURE_PATHS.stream().anyMatch(path::startsWith); if (notSecure) { System.out.println("Auth not needed for " + path); super.handle(target, baseRequest, request, response); } else { var session = request.getSession(); var accessTokenOpt = SessionHelper.getAccessTokenOptional(request, tokenAttr); if (accessTokenOpt.isEmpty()) { System.out.println("Need authorize session id=" + session.getId()); authenticate(request, response, tokenAttr, clientId); } else { System.out.println("Session is already authorized id=" + session.getId()); super.handle(target, baseRequest, request, response); } } } private void authenticate(HttpServletRequest request, HttpServletResponse response, String tokenAttr, String clientId) throws IOException { var targetUrlPath = request.getPathInfo(); var nonce = UUID.randomUUID().toString(); var stateId = SessionHelper.saveState(request, targetUrlPath, nonce, tokenAttr); // var claims = request.getParameter("claims"); var claims = USER_COUNTRY_CLAIM; var authorizationCodeUrl = getAuthorizationCodeUrl(claims, redirectUri, stateId, nonce, clientId); response.sendRedirect(authorizationCodeUrl); } private String getAuthorizationCodeUrl(String claims, String registeredRedirectURL, String state, String nonce, String clientId) throws MalformedURLException { var pca = PublicClientApplication.builder(clientId).authority(authority).build(); var parameters = AuthorizationRequestUrlParameters .builder(registeredRedirectURL, scopes) .responseMode(ResponseMode.QUERY) .prompt(Prompt.SELECT_ACCOUNT) .state(state) .nonce(nonce) // .claimsChallenge(claims) .build(); var authorizationUrl = pca.getAuthorizationRequestUrl(parameters).toString(); System.out.println("Authorization URL: " + authorizationUrl); return authorizationUrl; } }
[ "ya_al@bk.ru" ]
ya_al@bk.ru
73eeeac8cfdb6f88e7d8d0b2f68b908a8ed0acff
105afbad6360cc91d09ebfae51880cec55c7d969
/src/main/java/com/najdiigrac/mk/web/ParticipateRequestController.java
f034e546aa03147ae9865f0daf7fd01cdc07d558
[]
no_license
kirkovg/najdi-igrac-resource
f6c79d9ca97efcce44988c7434b7ea8cd3879f06
15d1c6c732c94ac7285bc86fedbdc89dc94984a9
refs/heads/master
2021-01-21T22:02:08.941555
2017-06-22T21:22:33
2017-06-22T21:22:33
95,154,007
0
0
null
null
null
null
UTF-8
Java
false
false
2,616
java
package com.najdiigrac.mk.web; import com.najdiigrac.mk.model.jpa.Event; import com.najdiigrac.mk.model.jpa.ParticipateRequest; import com.najdiigrac.mk.model.jpa.User; import com.najdiigrac.mk.service.ParticipateRequestService; import com.najdiigrac.mk.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.web.bind.annotation.*; import java.util.List; /** * Created by Dj Ux on 18-Jun-17. */ @RestController @RequestMapping(value = "/api/participateRequests", produces = "application/json") public class ParticipateRequestController { private ParticipateRequestService participateRequestService; private UserService userService; @Autowired public ParticipateRequestController(ParticipateRequestService participateRequestService, UserService userService) { this.participateRequestService = participateRequestService; this.userService = userService; } @RequestMapping(value = "/forAuthenticatedUser", method = RequestMethod.GET) @ResponseBody public List<ParticipateRequest> forAuthenticatedUser() { UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); User currentAuthenticatedUser = userService.findByUserName(userDetails.getUsername()); return participateRequestService.getRequestsSentByUser(currentAuthenticatedUser.id); } @RequestMapping(value = "/getParticipateRequestsForMyEvents", method = RequestMethod.GET) public List<ParticipateRequest> getParticipateRequestsForMyEvents() { UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); User currentAuthenticatedUser = userService.findByUserName(userDetails.getUsername()); List<ParticipateRequest> participateRequests = participateRequestService .getRequestsForAdminOfEvent(currentAuthenticatedUser.id); return participateRequests; } @RequestMapping(value = "/accept/{requestId}", method = RequestMethod.POST) public void acceptParticipatingRequest(@PathVariable Long requestId) { participateRequestService.acceptParticipatingRequest(requestId); } @RequestMapping(value = "/reject/{requestId}", method = RequestMethod.POST) public void rejectParticipatingRequest(@PathVariable Long requestId) { participateRequestService.rejectParticipatingRequest(requestId); } }
[ "gjorgjikirkov@gmail.com" ]
gjorgjikirkov@gmail.com
395becf3ade0c2241da08612d27ae2e45ea9a774
fa05b44b791399f51d295f236b0ca951b038abd6
/aliyun-java-sdk-pts/src/main/java/com/aliyuncs/pts/model/v20190810/DescribeRdsByGroupIdRequest.java
ace990311f6b7547c5eca45ff3e994b6780da57e
[ "Apache-2.0" ]
permissive
ybz216/aliyun-openapi-java-sdk
05869fd10e8e9c68ac3d1df99142b3c3599e6e5d
14b77a7b121180b887bcd7a5e6e4dfd6d542128c
refs/heads/master
2022-06-24T03:23:41.762464
2020-05-09T14:54:34
2020-05-09T14:54:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,582
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.pts.model.v20190810; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.pts.Endpoint; /** * @author auto create * @version */ public class DescribeRdsByGroupIdRequest extends RpcAcsRequest<DescribeRdsByGroupIdResponse> { private Long ver; private Long groupId; private Integer pageSize; private String keyWord; private Integer pageNumber; public DescribeRdsByGroupIdRequest() { super("PTS", "2019-08-10", "DescribeRdsByGroupId"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public Long getVer() { return this.ver; } public void setVer(Long ver) { this.ver = ver; if(ver != null){ putQueryParameter("Ver", ver.toString()); } } public Long getGroupId() { return this.groupId; } public void setGroupId(Long groupId) { this.groupId = groupId; if(groupId != null){ putQueryParameter("GroupId", groupId.toString()); } } public Integer getPageSize() { return this.pageSize; } public void setPageSize(Integer pageSize) { this.pageSize = pageSize; if(pageSize != null){ putQueryParameter("PageSize", pageSize.toString()); } } public String getKeyWord() { return this.keyWord; } public void setKeyWord(String keyWord) { this.keyWord = keyWord; if(keyWord != null){ putQueryParameter("KeyWord", keyWord); } } public Integer getPageNumber() { return this.pageNumber; } public void setPageNumber(Integer pageNumber) { this.pageNumber = pageNumber; if(pageNumber != null){ putQueryParameter("PageNumber", pageNumber.toString()); } } @Override public Class<DescribeRdsByGroupIdResponse> getResponseClass() { return DescribeRdsByGroupIdResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
510a06496cbc94d6ef846e2ac30f4941f85a6b3d
f3f844d216486e95cf9a1b5cb49a621dbfd732e1
/src/main/java/com/example/demo/repositort/WarehouseRepository.java
62b1b2331459a7f401c176802f6926003b784b48
[]
no_license
Ilxom1992/spring_model_2_lesson_2_task_1
842639b42d6dbd237a3cd2e343a611b77cce4c27
4804455f642c5a8a692c07d28521814ea3f873f5
refs/heads/master
2023-04-01T07:17:29.709249
2021-04-02T19:33:17
2021-04-02T19:33:17
353,658,924
0
0
null
null
null
null
UTF-8
Java
false
false
522
java
package com.example.demo.repositort; import com.example.demo.entity.Warehouse; import com.example.demo.projection.CustomUser; import com.example.demo.projection.CustomWarehouse; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource(path = "warehouse", collectionResourceRel = "list",excerptProjection = CustomWarehouse.class) public interface WarehouseRepository extends JpaRepository<Warehouse, Integer> { }
[ "ilxom.xojamurodov@gmail.com" ]
ilxom.xojamurodov@gmail.com
b913368fd0504a2154f04b45eefa0d5b81ae2ab8
fba8af31d5d36d8a6cf0c341faed98b6cd5ec0cb
/src/main/java/com/alipay/api/response/KoubeiMarketingDataTradeHabbitQueryResponse.java
721048d3605e76835115c640cfa446c50336ad56
[ "Apache-2.0" ]
permissive
planesweep/alipay-sdk-java-all
b60ea1437e3377582bd08c61f942018891ce7762
637edbcc5ed137c2b55064521f24b675c3080e37
refs/heads/master
2020-12-12T09:23:19.133661
2020-01-09T11:04:31
2020-01-09T11:04:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,682
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.marketing.data.trade.habbit.query response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class KoubeiMarketingDataTradeHabbitQueryResponse extends AlipayResponse { private static final long serialVersionUID = 2837679753139948336L; /** * biz_date: 业务日期 格式:yyyyMMdd partner_industry_type:商户行业标识(轻餐or正餐) shop_id: 门店id shop_name: 门店名称 trade_again_ratio_7d: (近7天)复购率 trade_again_ratio_active_7d: (近7天)复购率(口碑活跃用户) trade_user_cnt_7d: (近7天)交易会员数 trade_user_cnt_active_7d: (近7天)交易活跃会员数(口碑活跃用户贡献) zdj_order_amt_7d: (近7天)桌单价(订单金额)(单位:分) zdj_service_amt_7d: (近7天)桌单价(实收金额)(单位:分) zdj_service_amt_distribution_7d: (近7天)桌单价(实收金额)段分布(示例:0-15:0.2799,15-20:0.1775,20-25:0.1058,25-30:0.0956,30-35:0.0648,35-40:0.0751,40-45:0.0444,45-50:0.0137,50-55:0.0171,55及以上:0.1263 意思是消费0-15元的比例占消费总人数的0.2799) 注意:出参中还包含30天/60天/90天的类似指标,篇幅有限不一一列举 */ @ApiField("trade_habit_info") private String tradeHabitInfo; public void setTradeHabitInfo(String tradeHabitInfo) { this.tradeHabitInfo = tradeHabitInfo; } public String getTradeHabitInfo( ) { return this.tradeHabitInfo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
b3f26e2bcf449eaa1b5cf8eb24c9c56edbcda91d
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/6_jnfe-br.com.jnfe.base.ProcEmi-1.0-10/br/com/jnfe/base/ProcEmi_ESTest.java
1f3e0a91be1ef02a23385b1a06e69eb8ff2e3980
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
636
java
/* * This file was automatically generated by EvoSuite * Sat Oct 26 01:32:10 GMT 2019 */ package br.com.jnfe.base; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class ProcEmi_ESTest extends ProcEmi_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
49a4986494813492fcf72f3c5564d9032a7044e9
f5cf8cfbaeca20b1fc1de3508e2985dc1b1fa863
/jforgame-merge/src/main/java/com/kingston/jforgame/merge/service/CleanService.java
59148ad1d9f23e466f37e9a73efd87a69b81bf2b
[ "Apache-2.0" ]
permissive
LeonXia/jforgame
0ee2bfbeeb2e9eb668de5959a8e20e93e4b4aa3f
3aa34f18a641291929f602b6c63d561ca7f65731
refs/heads/master
2020-12-26T15:51:13.136228
2020-01-29T14:44:00
2020-01-29T14:44:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,302
java
package com.kingston.jforgame.merge.service; import com.kingston.jforgame.merge.config.MergeConfig; import com.kingston.jforgame.merge.config.MergeServer; import com.kingston.jforgame.merge.utils.JdbcUtils; import com.kingston.jforgame.merge.utils.SqlFactory; import org.apache.commons.dbutils.DbUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.sql.Connection; import java.sql.SQLException; import java.util.List; public class CleanService { private static CleanService self = new CleanService(); private Logger logger = LoggerFactory.getLogger(CleanService.class); public static CleanService getInstance() { return self; } public void clearRubbish(MergeServer parent, List<MergeServer> children) { if (parent != null) { clear(parent); } if (children != null) { children.forEach(this::clear); } } private void clear(MergeServer server) { logger.error("开始对服务[{}]执行清档逻辑", server.getServerId()); MergeConfig config = MergeConfig.getInstance(); String sql = SqlFactory.createClearPlayerSql(config.getClear().getMinLevel(), config.getClear().getOfflineDays()); logger.info("清档sql为 {}", sql); Connection targetConn = JdbcUtils.getConnection(server); int beforeCount = JdbcUtils.queryRecordSum(targetConn, "SELECT COUNT(1) FROM t_role;"); logger.info("清档前[{}]服角色数量为{}", server.getServerId(), beforeCount); // JdbcUtils.execUpdate(targetConn, sql); int afterCount = JdbcUtils.queryRecordSum(targetConn, "SELECT COUNT(1) FROM t_role;"); logger.info("清档前[{}]角色数量为{}", server.getServerId(), afterCount); List<String> clearTables = MergedTableRegister.getInstance().listToDeleteTables(); for (String table : clearTables) { logger.info("清空[{}]服【{}】表数据", server.getServerId(), table); String delSql = SqlFactory.createDeleteTableSql(table); JdbcUtils.execUpdate(targetConn, delSql); } try { DbUtils.close(targetConn); } catch (SQLException e) { logger.error("", e); throw new RuntimeException(""); } } }
[ "475139136@qq.com" ]
475139136@qq.com
74adb9690dc290e21bc206f49c81f96b451ce8cf
7ccea5116358732dbcf9d6b780ea516d8e958938
/src/main/java/com/collection/MyBlockQueue.java
fe39bf958d2901f34fe8a74fbe25dfc927d84d35
[]
no_license
missyoufv/study
ceb7c60708dee621ae6ca625d5e65355b9283a48
e6f9a318e5c7c3c6459a183d30717c606b50b46b
refs/heads/master
2022-12-07T03:29:02.414628
2020-04-28T08:22:43
2020-04-28T08:22:43
181,400,672
4
0
null
2022-11-16T09:49:00
2019-04-15T02:47:26
Java
UTF-8
Java
false
false
3,025
java
package com.collection; import lombok.extern.slf4j.Slf4j; import org.springframework.util.CollectionUtils; import java.util.ArrayList; import java.util.Random; import java.util.concurrent.atomic.AtomicInteger; /** * 自己实现阻塞队列,解决生产消费者问题 */ @Slf4j public class MyBlockQueue { private Object lock = new Object(); /** * 队列默认大小 */ private static final int DEFAULT_CAPACITY = 16; /** * 容器大小 */ private int capicaity; /** * 存放数据类型数组 */ private ArrayList<Object> table; MyBlockQueue(int initialCapacity) { if (initialCapacity < 0) { throw new IllegalArgumentException(); } int cap = initialCapacity > Integer.MAX_VALUE ? Integer.MAX_VALUE : initialCapacity; capicaity = cap; table = new ArrayList(cap); } /** * 队列默认初始大小为16 */ MyBlockQueue() { this(DEFAULT_CAPACITY); } public synchronized void put(Object data) throws InterruptedException { // 如果当前容器已满,则阻塞 while (isFull()){ wait(); } table.add(data); log.info(" ------元素{}入队完成------", data); notify(); } public synchronized Object get() throws InterruptedException { while (isEmpty()){ wait(); } Object result = table.remove(0); notify(); log.info(" ------元素{}出队完成------", result); return result; } private boolean isEmpty() { if (CollectionUtils.isEmpty(table)) { return true; } return false; } private boolean isFull() { if (table != null && table.size() == capicaity) { return true; } return false; } public static void main(String[] args) throws Exception{ AtomicInteger atomicInteger = new AtomicInteger(100); MyBlockQueue blockQueue = new MyBlockQueue(200); for (int i = 0; i < 5; i++) { new Thread(() -> { while (atomicInteger.compareAndSet(atomicInteger.get(),atomicInteger.get()-1)) { try { if (atomicInteger.get() > 0) { blockQueue.put(atomicInteger.get()); }else { return; } } catch (InterruptedException e) { e.printStackTrace(); } } }, "product" + i).start(); } for (int i = 0; i < 1; i++) { new Thread(() -> { while (true) { try { blockQueue.get(); } catch (InterruptedException e) { e.printStackTrace(); } } }, "consumer" + i).start(); } } }
[ "1234qwer" ]
1234qwer
7e04219022772825c36a31346b2b418ff1e48e8e
1ec25226b708f419318bbb3daa2bf37de353d453
/araqne-pcap-smb/src/main/java/org/araqne/pcap/smb/transreq/QueryNmpipeStateRequest.java
157e5d6d90a3c5c6a7fc482182661c252ffac1f7
[]
no_license
sjkbar/pcap
c3d5cb946ec9e4f4d852e5d9347935027a8fcf17
860773e6c9aa22d20a9945d5ceba8f9ee782b6fb
refs/heads/master
2021-01-17T13:09:17.949098
2014-07-10T06:22:05
2014-07-10T06:30:08
21,682,446
2
0
null
null
null
null
UTF-8
Java
false
false
473
java
package org.araqne.pcap.smb.transreq; import org.araqne.pcap.smb.TransData; public class QueryNmpipeStateRequest implements TransData{ short subcommand; short fid; public short getSubcommand() { return subcommand; } public void setSubcommand(short subcommand) { this.subcommand = subcommand; } public short getFid() { return fid; } public void setFid(short fid) { this.fid = fid; } @Override public String toString(){ return String.format(""); } }
[ "xeraph@nchovy.com" ]
xeraph@nchovy.com
898b177c772619f4dda53f96828f19c6fd78012b
4bbfa242353fe0485fb2a1f75fdd749c7ee05adc
/ims-core/framework/com/ailk/openbilling/persistence/acct/entity/CaNotifyExempt.java
df4fee00b355b5ee2d3e6598bb8bc8b66019c304
[]
no_license
859162000/infosystem
88b23a5b386600503ec49b14f3b4da4df7a6d091
96d4d50cd9964e713bb95520d6eeb7e4aa32c930
refs/heads/master
2021-01-20T04:39:24.383807
2017-04-01T10:59:24
2017-04-01T10:59:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,290
java
package com.ailk.openbilling.persistence.acct.entity; import javax.persistence.Table; import jef.database.DataObject; import javax.persistence.Id; import javax.persistence.Column; import javax.persistence.Entity; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessType; import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.builder.HashCodeBuilder; import java.util.Date; import jef.codegen.support.NotModified; /** * This class was generated by EasyFrame according to the table in database. * You need to modify the type of primary key field, to the strategy your own. * */ @NotModified @Entity @Table(schema="AD",name="CA_NOTIFY_EXEMPT") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(propOrder={"objectType","objectId","exemptionType","recType","exempChannelId","validDate","expireDate","staffId","createDate","soDate","billingType","soNbr","officePhone"}) public class CaNotifyExempt extends DataObject{ @Column(name="OBJECT_TYPE",precision=8,columnDefinition="NUMBER") @XmlElement(name="objectType") private Integer objectType; @Id @Column(name="OBJECT_ID",precision=8,columnDefinition="NUMBER") @XmlElement(name="objectId") private Long objectId; @Id @Column(name="EXEMPTION_TYPE",precision=8,columnDefinition="NUMBER") @XmlElement(name="exemptionType") private Integer exemptionType; @Column(name="REC_TYPE",precision=8,columnDefinition="NUMBER") @XmlElement(name="recType") private Integer recType; @Column(name="EXEMP_CHANNEL_ID",precision=8,columnDefinition="NUMBER") @XmlElement(name="exempChannelId") private Integer exempChannelId; @Id @Column(name="VALID_DATE",columnDefinition="TimeStamp") @XmlElement(name="validDate") private Date validDate; @Column(name="EXPIRE_DATE",columnDefinition="TimeStamp") @XmlElement(name="expireDate") private Date expireDate; @Column(name="STAFF_ID",precision=8,columnDefinition="NUMBER") @XmlElement(name="staffId") private Long staffId; @Column(name="CREATE_DATE",columnDefinition="TimeStamp") @XmlElement(name="createDate") private Date createDate; @Column(name="SO_DATE",columnDefinition="TimeStamp") @XmlElement(name="soDate") private Date soDate; @Column(name="BILLING_TYPE",precision=8,columnDefinition="NUMBER") @XmlElement(name="billingType") private Integer billingType; @Id @Column(name="SO_NBR",precision=8,columnDefinition="NUMBER") @XmlElement(name="soNbr") private Long soNbr; @Column(name="OFFICE_PHONE",columnDefinition="Varchar",length=28) @XmlElement(name="officePhone") private String officePhone; public void setObjectType(Integer obj){ this.objectType = obj; } public Integer getObjectType(){ return objectType; } public void setObjectId(Long obj){ this.objectId = obj; } public Long getObjectId(){ return objectId; } public void setExemptionType(Integer obj){ this.exemptionType = obj; } public Integer getExemptionType(){ return exemptionType; } public void setRecType(Integer obj){ this.recType = obj; } public Integer getRecType(){ return recType; } public void setExempChannelId(Integer obj){ this.exempChannelId = obj; } public Integer getExempChannelId(){ return exempChannelId; } public void setValidDate(Date obj){ this.validDate = obj; } public Date getValidDate(){ return validDate; } public void setExpireDate(Date obj){ this.expireDate = obj; } public Date getExpireDate(){ return expireDate; } public void setStaffId(Long obj){ this.staffId = obj; } public Long getStaffId(){ return staffId; } public void setCreateDate(Date obj){ this.createDate = obj; } public Date getCreateDate(){ return createDate; } public void setSoDate(Date obj){ this.soDate = obj; } public Date getSoDate(){ return soDate; } public void setBillingType(Integer obj){ this.billingType = obj; } public Integer getBillingType(){ return billingType; } public void setSoNbr(Long obj){ this.soNbr = obj; } public Long getSoNbr(){ return soNbr; } public void setOfficePhone(String obj){ this.officePhone = obj; } public String getOfficePhone(){ return officePhone; } public CaNotifyExempt(){ } public CaNotifyExempt(Long objectId,Integer exemptionType,Date validDate,Long soNbr){ this.objectId = objectId; this.exemptionType = exemptionType; this.validDate = validDate; this.soNbr = soNbr; } public boolean equals(final Object rhs0){ if (rhs0 == null)return false; CaNotifyExempt rhs=(CaNotifyExempt)rhs0; if(!ObjectUtils.equals(objectId, rhs.objectId)) return false; if(!ObjectUtils.equals(validDate, rhs.validDate)) return false; if(!ObjectUtils.equals(soNbr, rhs.soNbr)) return false; if(!ObjectUtils.equals(exemptionType, rhs.exemptionType)) return false; return super.isEquals(rhs); } public int hashCode(){ return new HashCodeBuilder() .append(objectId) .append(validDate) .append(soNbr) .append(exemptionType) .append(super.getHashCode()) .toHashCode(); } public enum Field implements jef.database.Field{objectType,objectId,exemptionType,recType,exempChannelId,validDate,expireDate,staffId,createDate,soDate,billingType,soNbr,officePhone} }
[ "ljyshiqian@126.com" ]
ljyshiqian@126.com
720e89d4f5b779f557e202be7aca23c7afcdadce
5312ec3caf7aa02968a7b0899f0ad4c8bc155674
/kripton-processor/src/test/java/sqlite/feature/relations/case3/DaoSong.java
e76718f30ba54cc77f86e0e56e02b5365cf65dc0
[ "Apache-2.0" ]
permissive
xcesco/kripton
90657215d5e4a37f694c82fbd25a4691091e2c65
1995bf462677d7de993c50de31f01c9e5f13603f
refs/heads/master
2023-01-21T20:28:29.373376
2023-01-04T14:57:00
2023-01-04T14:57:00
31,342,939
134
19
Apache-2.0
2023-01-04T14:57:01
2015-02-26T00:24:15
Java
UTF-8
Java
false
false
474
java
package sqlite.feature.relations.case3; import java.util.List; import com.abubusoft.kripton.android.annotation.BindDao; import com.abubusoft.kripton.android.annotation.BindSqlParam; import com.abubusoft.kripton.android.annotation.BindSqlSelect; @BindDao(Song.class) public interface DaoSong extends DaoBase<Song> { @BindSqlSelect List<Song> selectAll(); @BindSqlSelect(where="albumId=${albumId}") List<Song> selectByAlbumId(@BindSqlParam("albumId") long dummy); }
[ "abubusoft@gmail.com" ]
abubusoft@gmail.com
ebc662dd52851063d9f566dd37865c9baac7cb44
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
/src_cfr/com/google/common/cache/LocalCache$LoadingValueReference.java
c937d02a5882ea67e5832309072c7d634de8f1b8
[]
no_license
fjh658/bindiff
c98c9c24b0d904be852182ecbf4f81926ce67fb4
2a31859b4638404cdc915d7ed6be19937d762743
refs/heads/master
2021-01-20T06:43:12.134977
2016-06-29T17:09:03
2016-06-29T17:09:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,066
java
/* * Decompiled with CFR 0_115. * * Could not load the following classes: * javax.annotation.Nullable */ package com.google.common.cache; import com.google.common.base.Stopwatch; import com.google.common.cache.CacheLoader; import com.google.common.cache.LocalCache; import com.google.common.cache.LocalCache$LoadingValueReference$1; import com.google.common.cache.LocalCache$ReferenceEntry; import com.google.common.cache.LocalCache$ValueReference; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.SettableFuture; import com.google.common.util.concurrent.Uninterruptibles; import java.lang.ref.ReferenceQueue; import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; class LocalCache$LoadingValueReference implements LocalCache$ValueReference { volatile LocalCache$ValueReference oldValue; final SettableFuture futureValue = SettableFuture.create(); final Stopwatch stopwatch = Stopwatch.createUnstarted(); public LocalCache$LoadingValueReference() { this(LocalCache.unset()); } public LocalCache$LoadingValueReference(LocalCache$ValueReference localCache$ValueReference) { this.oldValue = localCache$ValueReference; } @Override public boolean isLoading() { return true; } @Override public boolean isActive() { return this.oldValue.isActive(); } @Override public int getWeight() { return this.oldValue.getWeight(); } public boolean set(@Nullable Object object) { return this.futureValue.set(object); } public boolean setException(Throwable throwable) { return this.futureValue.setException(throwable); } private ListenableFuture fullyFailedFuture(Throwable throwable) { return Futures.immediateFailedFuture(throwable); } @Override public void notifyNewValue(@Nullable Object object) { if (object != null) { this.set(object); return; } this.oldValue = LocalCache.unset(); } public ListenableFuture loadFuture(Object object, CacheLoader cacheLoader) { try { SettableFuture settableFuture /* !! */ ; this.stopwatch.start(); Object object2 = this.oldValue.get(); if (object2 != null) { ListenableFuture listenableFuture = cacheLoader.reload(object, object2); if (listenableFuture != null) return Futures.transform(listenableFuture, new LocalCache$LoadingValueReference$1(this)); return Futures.immediateFuture(null); } Object object3 = cacheLoader.load(object); if (this.set(object3)) { settableFuture /* !! */ = this.futureValue; return settableFuture /* !! */ ; } settableFuture /* !! */ = Futures.immediateFuture(object3); return settableFuture /* !! */ ; } catch (Throwable var3_4) { ListenableFuture listenableFuture = this.setException(var3_4) ? this.futureValue : this.fullyFailedFuture(var3_4); if (!(var3_4 instanceof InterruptedException)) return listenableFuture; Thread.currentThread().interrupt(); return listenableFuture; } } public long elapsedNanos() { return this.stopwatch.elapsed(TimeUnit.NANOSECONDS); } @Override public Object waitForValue() { return Uninterruptibles.getUninterruptibly(this.futureValue); } @Override public Object get() { return this.oldValue.get(); } public LocalCache$ValueReference getOldValue() { return this.oldValue; } @Override public LocalCache$ReferenceEntry getEntry() { return null; } @Override public LocalCache$ValueReference copyFor(ReferenceQueue referenceQueue, @Nullable Object object, LocalCache$ReferenceEntry localCache$ReferenceEntry) { return this; } }
[ "manouchehri@riseup.net" ]
manouchehri@riseup.net
3848ce3dcbbfe2ecd60aaa87b841a43192745c54
6ca1fabd94d9455db892fed878ea521aa86ae7b3
/MVP/src/main/java/com/zy/mvp/BaseActivity.java
f83e55de72c95ac1e8edb4f9cd695e115a3af726
[]
no_license
hahajing0000/mvp
7a5d5f671597c618b03f7ae04f40fcb0bc57fa01
10aa659750496a4a00395f1fcac80e6fec5365bc
refs/heads/main
2023-04-11T10:35:02.357708
2021-04-16T08:27:25
2021-04-16T08:27:25
358,516,743
0
0
null
null
null
null
UTF-8
Java
false
false
501
java
package com.zy.mvp; import android.os.Bundle; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; /** * @author:zhangyue * @date:2021/4/16 */ public abstract class BaseActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); initView(); initData(); } protected abstract void initView(); protected abstract void initData(); }
[ "444511958@qq.com" ]
444511958@qq.com
302cef3a33a48651019af7da263ce1d11fd8018e
400211f8ba8ee352ce4a63a8c0a768ecf46aca65
/src/dao/cn/com/atnc/ioms/dao/maintain/pollinginfo/hibernate/KuNodeParameterDaoImpl.java
324512b4bc9e3b69dbf91c4eb2a1e840b3fce4c7
[]
no_license
jyf666/IOMS
76003040489dc8f594c88ff35c07bd77d1447da4
6d3c8428c06298bee8d1f056aab7b21d81fd4ce2
refs/heads/master
2021-05-10T18:38:37.276724
2018-01-19T14:50:34
2018-01-19T14:50:34
118,130,382
0
2
null
null
null
null
UTF-8
Java
false
false
2,680
java
/** * @ProjectName IOMS * @FileName KuNodeParameterDaoImpl.java * @PackageName:cn.com.atnc.ioms.dao.operstat.ku.hibernate * @author KuYonggang * @date 2015年4月1日下午1:25:23 * @since 1.0.0 * @Copyright (c) 2015,ATNC ###@atnc.com All Rights Reserved. */ package cn.com.atnc.ioms.dao.maintain.pollinginfo.hibernate; import java.util.HashMap; import java.util.Map; import org.apache.commons.lang.StringUtils; import org.springframework.stereotype.Repository; import cn.com.atnc.common.entity.Pagination; import cn.com.atnc.ioms.dao.MyBaseDao; import cn.com.atnc.ioms.entity.maintain.pollinginfo.KuNodeParameter; import cn.com.atnc.ioms.model.maintain.pollinginfo.PollingInfoQueryModel; import cn.com.atnc.ioms.dao.maintain.pollinginfo.IKuNodeParameterDao; /** * * @author KuYonggang * @date 2015年4月1日 下午1:25:23 * @since 1.0.0 */ @Repository public class KuNodeParameterDaoImpl extends MyBaseDao<KuNodeParameter> implements IKuNodeParameterDao { @Override public Pagination queryPage(PollingInfoQueryModel queryModel) { StringBuilder hql = new StringBuilder("from KuNodeParameter where 1=1"); Map<String, Object> params = new HashMap<String, Object>(); if (queryModel.getBureau() != null) { hql.append(" and equipId.satelliteSite.bureau =:bureau"); params.put("bureau", queryModel.getBureau()); } if (StringUtils.isEmpty(queryModel.getStname()) == false) { hql.append(" and equipId.satelliteSite.siteName like:stname escape '\\' "); params.put("stname", "%" + queryModel.getStname() + "%"); } if(queryModel.getStartRecordTime() != null){ hql.append(" and recordTime>=:startRecordTime"); params.put("startRecordTime",queryModel.getStartRecordTime()); } if(queryModel.getStartRecordTime() != null){ hql.append(" and recordTime<=:endRecordTime"); params.put("endRecordTime",queryModel.getEndRecordTime()); } hql.append(" order by recordTime desc"); String countHql = COUNT_ID + hql.toString(); return super.pageQuery(hql.toString(), params, countHql, queryModel.getPageNo(), queryModel.getPageSize()); } @Override public Pagination queryViewPage(PollingInfoQueryModel queryModel) { StringBuilder hql = new StringBuilder("from KuNodeParameter where 1=1"); Map<String, Object> params = new HashMap<String, Object>(); if (queryModel.getKuNodeParameter() != null) { //id hql.append(" and id =:id"); params.put("id", queryModel.getKuNodeParameter().getId()); } String countHql = COUNT_ID + hql.toString(); return super.pageQuery(hql.toString(), params, countHql, queryModel.getPageNo(), queryModel.getPageSize()); } }
[ "1206146862@qq.com" ]
1206146862@qq.com
bbce95238cf7a7aacf18410c967a67b538767add
426040f19e4ab0abb5977e8557451cfd94bf6c2d
/apks/aldi/src/com/google/android/gms/auth/api/accounttransfer/AccountTransferStatusCodes.java
5348ad37c0bbe9a274e0c823c893e7e15a66a6e2
[]
no_license
kmille/android-pwning
0e340965f4c27dfc9df6ecadddd124448e6cec65
e82b96d484e618fe8b2c3f8ff663e74f793541b8
refs/heads/master
2020-05-09T17:22:54.876992
2020-04-06T18:04:16
2020-04-06T18:04:16
181,300,145
0
0
null
null
null
null
UTF-8
Java
false
false
1,152
java
package com.google.android.gms.auth.api.accounttransfer; import com.google.android.gms.common.api.CommonStatusCodes; public final class AccountTransferStatusCodes extends CommonStatusCodes { public static final int CHALLENGE_NOT_ALLOWED = 20503; public static final int INVALID_REQUEST = 20502; public static final int NOT_ALLOWED_SECURITY = 20500; public static final int NO_DATA_AVAILABLE = 20501; public static final int SESSION_INACTIVE = 20504; public static String getStatusCodeString(int paramInt) { switch (paramInt) { default: return CommonStatusCodes.getStatusCodeString(paramInt); case 20504: return "SESSION_INACTIVE"; case 20503: return "CHALLENGE_NOT_ALLOWED"; case 20502: return "INVALID_REQUEST"; case 20501: return "NO_DATA_AVAILABLE"; } return "NOT_ALLOWED_SECURITY"; } } /* Location: /home/kmille/projects/android-pwning/apks/aldi/ALDI TALK_v6.2.1_apkpure.com-dex2jar.jar!/com/google/android/gms/auth/api/accounttransfer/AccountTransferStatusCodes.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "christian.schneider@androidloves.me" ]
christian.schneider@androidloves.me
8ff4d14bcb25b6a4be04b8a9d73d70bdac7f2c79
c787ca6cfc5ccb38a336bc4373d2ee636edf51fc
/src/main/java/net/imglib2/img/basictypeaccess/volatiles/VolatileShortAccess.java
e0d946deedd15c057a7b44e8a9cf62681db11d63
[ "BSD-2-Clause" ]
permissive
maxkleinhenz/bigdataviewer-core
1789f47ea9807ad64dab2c6f7c622251216ab5c2
9a489758aeded17b3e2358d52b8e433eb392ee09
refs/heads/master
2021-01-11T07:00:19.606584
2017-04-23T12:46:49
2017-04-23T12:46:49
72,344,186
0
0
null
2016-10-30T11:01:48
2016-10-30T11:01:48
null
UTF-8
Java
false
false
1,812
java
/* * #%L * BigDataViewer core classes with minimal dependencies * %% * Copyright (C) 2012 - 2016 Tobias Pietzsch, Stephan Saalfeld, Stephan Preibisch, * Jean-Yves Tinevez, HongKee Moon, Johannes Schindelin, Curtis Rueden, John Bogovic * %% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 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. * #L% */ package net.imglib2.img.basictypeaccess.volatiles; import net.imglib2.img.basictypeaccess.ShortAccess; /** * @author Tobias Pietzsch &lt;tobias.pietzsch@gmail.com&gt; */ public interface VolatileShortAccess extends ShortAccess, VolatileAccess {}
[ "tobias.pietzsch@gmail.com" ]
tobias.pietzsch@gmail.com
6cb6d831c73bc3a75d1ae51b9f79d0e6354b1985
3756f01b5a7322f8ed07078146771c45e8d82adf
/src/main/java/com/raoulvdberge/refinedstorage/apiimpl/solderer/SoldererRecipePrintedProcessor.java
3af673412a54a84470ee58745aee7af4ea20bad0
[ "MIT" ]
permissive
p455w0rd/refinedstorage
ae3c66379369ac2ec2e8d2cf18c6270cf90778db
647faf1120910f1711f66775fa2f9eec7d95448f
refs/heads/mc1.11
2021-01-13T03:26:27.589157
2016-12-28T17:08:48
2016-12-28T17:08:48
77,552,286
0
1
null
2016-12-28T18:14:26
2016-12-28T18:14:26
null
UTF-8
Java
false
false
2,465
java
package com.raoulvdberge.refinedstorage.apiimpl.solderer; import com.raoulvdberge.refinedstorage.RSItems; import com.raoulvdberge.refinedstorage.api.solderer.ISoldererRecipe; import com.raoulvdberge.refinedstorage.item.ItemProcessor; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import javax.annotation.Nonnull; public class SoldererRecipePrintedProcessor implements ISoldererRecipe { private int type; private boolean fullBlock; private ItemStack result; private ItemStack requirement; public SoldererRecipePrintedProcessor(int type, boolean fullBlock) { this.type = type; this.fullBlock = fullBlock; this.result = new ItemStack(RSItems.PROCESSOR, fullBlock ? 9 : 1, type); switch (type) { case ItemProcessor.TYPE_PRINTED_BASIC: this.requirement = fullBlock ? new ItemStack(Blocks.IRON_BLOCK) : new ItemStack(Items.IRON_INGOT); break; case ItemProcessor.TYPE_PRINTED_IMPROVED: this.requirement = fullBlock ? new ItemStack(Blocks.GOLD_BLOCK) : new ItemStack(Items.GOLD_INGOT); break; case ItemProcessor.TYPE_PRINTED_ADVANCED: this.requirement = fullBlock ? new ItemStack(Blocks.DIAMOND_BLOCK) : new ItemStack(Items.DIAMOND); break; case ItemProcessor.TYPE_PRINTED_SILICON: if (fullBlock) { throw new IllegalArgumentException("Printed silicon can't be made from block form!"); } this.requirement = new ItemStack(RSItems.SILICON); break; } } @Override @Nonnull public ItemStack getRow(int row) { return row == 1 ? requirement : ItemStack.EMPTY; } @Override @Nonnull public ItemStack getResult() { return result; } @Override public int getDuration() { switch (type) { case ItemProcessor.TYPE_PRINTED_BASIC: return 100 * (fullBlock ? 9 : 1); case ItemProcessor.TYPE_PRINTED_IMPROVED: return 150 * (fullBlock ? 9 : 1); case ItemProcessor.TYPE_PRINTED_ADVANCED: return 200 * (fullBlock ? 9 : 1); case ItemProcessor.TYPE_PRINTED_SILICON: return 90 * (fullBlock ? 9 : 1); default: return 0; } } }
[ "raoulvdberge@gmail.com" ]
raoulvdberge@gmail.com
c80356a8abcc02f6648c34ac8a99317e876f4dcc
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.minihd.qq/assets/exlibs.3.jar/classes.jar/com/tencent/component/network/downloader/handler/ReportHandler$DownloadReportObject.java
1195ceacb9a3c580d91300528b148f94cc9dbc7d
[]
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
5,415
java
package com.tencent.component.network.downloader.handler; import android.text.TextUtils; import android.util.Log; import com.tencent.component.network.module.report.ExtendData; import com.tencent.component.network.module.report.ReportObj; import org.json.JSONObject; public class ReportHandler$DownloadReportObject extends ReportObj { public int a; public long a; public String a; public Throwable a; public int b; public long b; public String b; public int c; public long c; public String c; public int d; public long d; public String d; public int e; public long e; public String e; public int f; public long f; public String f; public long g; public ReportHandler$DownloadReportObject() { this.jdField_a_of_type_Int = 0; this.jdField_c_of_type_Int = 1; this.jdField_d_of_type_Int = 0; this.jdField_e_of_type_Int = 100; } public ReportHandler$DownloadReportObject(String paramString1, String paramString2, int paramInt1, int paramInt2, String paramString3, long paramLong1, long paramLong2, long paramLong3, int paramInt3, String paramString4, ExtendData paramExtendData) { super(paramInt1, paramInt2, paramString3, paramLong1, paramLong2, paramLong3, paramInt3, paramString4, paramExtendData); this.jdField_a_of_type_Int = 0; this.jdField_c_of_type_Int = 1; this.jdField_d_of_type_Int = 0; this.jdField_e_of_type_Int = 100; this.jdField_a_of_type_JavaLangString = paramString1; this.jdField_b_of_type_JavaLangString = paramString2; } private void b() { if ((!TextUtils.isEmpty(this.jdField_a_of_type_JavaLangString)) && (this.jdField_a_of_type_JavaLangString.indexOf("store.qq.com/qun/") >= 0)) { this.jdField_a_of_type_Int = 10; } } protected String a() { if (this.jdField_a_of_type_Int == 10) { return "mqun"; } return super.a(); } public JSONObject a() { JSONObject localJSONObject = super.a(); localJSONObject.put("url", this.jdField_a_of_type_JavaLangString); localJSONObject.put("dnsip", this.jdField_b_of_type_JavaLangString); localJSONObject.put("retry", this.jdField_b_of_type_Int); localJSONObject.put("clientip", this.jdField_d_of_type_JavaLangString); localJSONObject.put("t_wait", this.jdField_b_of_type_Long); localJSONObject.put("t_prepare", this.jdField_c_of_type_Long); localJSONObject.put("t_conn", this.jdField_d_of_type_Long); localJSONObject.put("t_recvrsp", this.jdField_e_of_type_Long); localJSONObject.put("t_recvdata", this.jdField_f_of_type_Long); localJSONObject.put("t_process", this.g); localJSONObject.put("content_type", this.jdField_e_of_type_JavaLangString); localJSONObject.put("concurrent", this.jdField_f_of_type_Int); if (this.jdField_f_of_type_JavaLangString != null) { localJSONObject.put("refer", this.jdField_f_of_type_JavaLangString); } if (!TextUtils.isEmpty(this.jdField_c_of_type_JavaLangString)) { if (this.jdField_a_of_type_ComTencentComponentNetworkModuleReportExtendData == null) { this.jdField_a_of_type_ComTencentComponentNetworkModuleReportExtendData = new ExtendData(); } this.jdField_a_of_type_ComTencentComponentNetworkModuleReportExtendData.a(10, this.jdField_c_of_type_JavaLangString); localJSONObject.put("extend", this.jdField_a_of_type_ComTencentComponentNetworkModuleReportExtendData.a()); } if (this.jdField_a_of_type_JavaLangThrowable != null) { if (this.jdField_a_of_type_ComTencentComponentNetworkModuleReportExtendData == null) { this.jdField_a_of_type_ComTencentComponentNetworkModuleReportExtendData = new ExtendData(); } String str2 = Log.getStackTraceString(this.jdField_a_of_type_JavaLangThrowable); String str1 = str2; if (!TextUtils.isEmpty(str2)) { str1 = str2.replaceAll("\n\t", "--"); } this.jdField_a_of_type_ComTencentComponentNetworkModuleReportExtendData.a(11, str1); localJSONObject.put("extend", this.jdField_a_of_type_ComTencentComponentNetworkModuleReportExtendData.a()); } if (this.jdField_c_of_type_Int == 2) { localJSONObject.put("orgurl", this.jdField_a_of_type_JavaLangString); localJSONObject.put("directip", this.k); localJSONObject.put("contentlen", this.h); localJSONObject.put("size", this.jdField_d_of_type_Int); localJSONObject.put("sample", this.jdField_e_of_type_Int); if ((this.jdField_a_of_type_JavaLangStringBuilder != null) && (this.jdField_a_of_type_JavaLangStringBuilder.length() > 0)) { if (localJSONObject.has("msg")) { localJSONObject.remove("msg"); } localJSONObject.put("errdetail", this.jdField_a_of_type_JavaLangStringBuilder.toString()); } } return localJSONObject; } public void a(String paramString) { this.jdField_a_of_type_JavaLangString = paramString; b(); } public boolean a() { return this.jdField_b_of_type_Int > 0; } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.3.jar\classes.jar * Qualified Name: com.tencent.component.network.downloader.handler.ReportHandler.DownloadReportObject * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
d7bdf745453d79f55d2e8b573a7f14c9c5a8d8a3
2c700f1934e3efde85ccf04c9591e15d21f10ab3
/app/src/main/java/com/cloudcreativity/peoplepass_zy/utils/NetworkUtils.java
5d4d36de1d96a342cafc54e958f62ee2fa079714
[]
no_license
TasteBlood/PeoplePassForZY
b0b7bfaa1da030a2e8b0f0c6530c53e726e9184e
4e9a2a8268a5fed86e7224f5c5d0057861455bbc
refs/heads/master
2021-03-03T05:42:14.659569
2020-03-09T03:33:32
2020-03-09T03:33:32
245,935,938
0
0
null
null
null
null
UTF-8
Java
false
false
646
java
package com.cloudcreativity.peoplepass_zy.utils; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import com.cloudcreativity.peoplepass_zy.base.BaseApp; /** * 网络状态,操作的工具 */ public class NetworkUtils { /** * @return 网络是否可用 */ public static boolean isAvailable(){ ConnectivityManager manager = (ConnectivityManager) BaseApp.app.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetworkInfo = manager.getActiveNetworkInfo(); return null!=activeNetworkInfo&&activeNetworkInfo.isAvailable(); } }
[ "xxw0701@sina.com" ]
xxw0701@sina.com
f4cb6a0af658274db38e84bdf6030082aa94e27d
b9a3860622a88cb4a825c45870b8d95a901581d5
/Spring06_TestAop01_Test/src/com/test01/Person.java
d315c2f8bade5f8504137946145a87c91478771a
[]
no_license
KOKOPA/Spring_Study
de1a51f7091672c37f899b6a9cbd63cdcdbf2e63
1a67765c5345a027d28beb645b856eedbfdb3eb0
refs/heads/master
2022-12-26T16:27:26.760596
2019-09-03T12:46:52
2019-09-03T12:46:52
203,728,437
0
0
null
2022-12-16T01:03:26
2019-08-22T06:26:40
Java
UTF-8
Java
false
false
638
java
package com.test01; public class Person implements Human { protected String name; protected String job; public Person() {} public String getName() { return name; } public void setName(String name) { this.name = name; } public String getJob() { return job; } public void setJob(String job) { this.job = job; } @Override public String sayName(String name) { System.out.println("나의 이름은 " + name + " 입니다."); return "직업이 무엇입니까?"; } @Override public String sayJob(String job) { return "나의 직업은 " + job + " 입니다."; } }
[ "user2@user2-PC" ]
user2@user2-PC
33403312a2c38729d49f3bb2f8163725fb1784b9
9db6efa2f14baa0f4172272e361e1ed0c9940065
/aliyun-java-sdk-slb/src/main/java/com/aliyuncs/slb/model/v20140515/ModifyLoadBalancerPayTypeResponse.java
87c7b88135fe8e0d570476a99c19eb5883f626bd
[ "Apache-2.0" ]
permissive
ResetFull/aliyun-openapi-java-sdk
31fb2c2f7c2b939df4c9067f7a221c3f2c7cef2e
e299d1778d514cd555c870a3b1de117ae3b34474
refs/heads/master
2021-08-31T04:50:07.771585
2017-12-20T12:28:50
2017-12-20T12:28:50
114,978,860
1
0
null
2017-12-21T07:57:54
2017-12-21T07:57:54
null
UTF-8
Java
false
false
1,670
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.aliyuncs.slb.model.v20140515; import com.aliyuncs.AcsResponse; import com.aliyuncs.slb.transform.v20140515.ModifyLoadBalancerPayTypeResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class ModifyLoadBalancerPayTypeResponse extends AcsResponse { private String requestId; private Long orderId; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public Long getOrderId() { return this.orderId; } public void setOrderId(Long orderId) { this.orderId = orderId; } @Override public ModifyLoadBalancerPayTypeResponse getInstance(UnmarshallerContext context) { return ModifyLoadBalancerPayTypeResponseUnmarshaller.unmarshall(this, context); } }
[ "haowei.yao@alibaba-inc.com" ]
haowei.yao@alibaba-inc.com
c0305777b561b4fc9c28aa7d356bc8c718a08cd8
b40a9ce69a555eb250975b341f98c76476b7574e
/thirdstage.mcon/src/main/java/thirdstage/mcon/meta/FieldFacetType.java
b6ca932b2e3241d279fc48ad3137bae92e92546d
[]
no_license
3rdstage/prototypes
07965b2f0b90140b2fb8b8ec93c71e1e47b73f3c
70a5f5213c2e6d786a494367824f5b43832e995d
refs/heads/master
2020-12-24T09:24:13.180727
2017-03-03T17:06:26
2017-03-03T17:06:26
73,292,495
0
0
null
null
null
null
UTF-8
Java
false
false
533
java
package thirdstage.mcon.meta; /** * Overall concept of facet is based on the facet of XML schema. * Facet is said to be a single defining aspect of a value space. * For more, read http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#facets * * @author 3rdstage * */ public enum FieldFacetType { LENGTH, MIN_LENGTH, MAX_LENGTH, PATTERN, ENUMERATION, MAX, // max inclusive, equal or less than MIN, // min inclusive, equal or more than MAX_EXCLUSIVE, //less than MIN_EXCLUSIVE, //more than }
[ "halfface@chollian.net" ]
halfface@chollian.net
3235622ef05d80370f29816c5bc30b5571bdf254
58da62dfc6e145a3c836a6be8ee11e4b69ff1878
/src/main/java/com/alipay/api/domain/DeviceTradeResponse.java
66551ebb8f5b3cfcd9a75a5cfe952fc041194738
[ "Apache-2.0" ]
permissive
zhoujiangzi/alipay-sdk-java-all
00ef60ed9501c74d337eb582cdc9606159a49837
560d30b6817a590fd9d2c53c3cecac0dca4449b3
refs/heads/master
2022-12-26T00:27:31.553428
2020-09-07T03:39:05
2020-09-07T03:39:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,224
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * iot交易设备信息 * * @author auto create * @since 1.0, 2019-02-25 16:47:04 */ public class DeviceTradeResponse extends AlipayObject { private static final long serialVersionUID = 8726593144669328199L; /** * 设备唯一标识 */ @ApiField("biz_tid") private String bizTid; /** * 设备sn,通常置于设备标签中 */ @ApiField("device_sn") private String deviceSn; /** * 交易错误提示 例如:未收录设备的SDK交易 */ @ApiField("iot_trade_error_type") private String iotTradeErrorType; /** * 物料id,由支付宝同学提供 */ @ApiField("item_id") private String itemId; /** * SDK加签名信息 */ @ApiField("terminal_sdk_sign_info") private String terminalSdkSignInfo; /** * 交易完成时间 */ @ApiField("trade_finish_time") private String tradeFinishTime; /** * 交易流水号 */ @ApiField("trade_no") private String tradeNo; public String getBizTid() { return this.bizTid; } public void setBizTid(String bizTid) { this.bizTid = bizTid; } public String getDeviceSn() { return this.deviceSn; } public void setDeviceSn(String deviceSn) { this.deviceSn = deviceSn; } public String getIotTradeErrorType() { return this.iotTradeErrorType; } public void setIotTradeErrorType(String iotTradeErrorType) { this.iotTradeErrorType = iotTradeErrorType; } public String getItemId() { return this.itemId; } public void setItemId(String itemId) { this.itemId = itemId; } public String getTerminalSdkSignInfo() { return this.terminalSdkSignInfo; } public void setTerminalSdkSignInfo(String terminalSdkSignInfo) { this.terminalSdkSignInfo = terminalSdkSignInfo; } public String getTradeFinishTime() { return this.tradeFinishTime; } public void setTradeFinishTime(String tradeFinishTime) { this.tradeFinishTime = tradeFinishTime; } public String getTradeNo() { return this.tradeNo; } public void setTradeNo(String tradeNo) { this.tradeNo = tradeNo; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
b6aeb333c17e83201a2be2c151cdefdb1e959423
bbc42646d24002abb5db8265415b1442efdd129c
/Java/JavaPatternsAndOther/0others/no_now/src/main/java/dev/gaudnik/no_now/FixedTimeProvider.java
6a300903ca92774ec690f6e3fee6912ff2225911
[]
no_license
wojciechGaudnik/Learning
223a162ddddc59aa4cfe49471ce08ba25587cf1b
dfffd4ddd453edf7667fe94b0fb4367235579424
refs/heads/master
2023-03-09T02:21:47.975665
2023-01-22T16:09:51
2023-01-22T16:09:51
201,742,343
0
0
null
2023-03-01T05:35:15
2019-08-11T09:10:46
C
UTF-8
Java
false
false
686
java
package dev.gaudnik.no_now; import dev.gaudnik.no_now.SystemTime.TimeProvider; import java.time.ZonedDateTime; import static com.google.common.base.Preconditions.checkNotNull; public class FixedTimeProvider implements TimeProvider { private ZonedDateTime currentZonedDateTime; public FixedTimeProvider(ZonedDateTime zonedDateTime) { checkNotNull(zonedDateTime); this.currentZonedDateTime = zonedDateTime; } @Override public ZonedDateTime provideCurrentZoneDateTime() { return currentZonedDateTime; } public void updateCurrentZoneDateTime(final ZonedDateTime newZonedDateTime) { checkNotNull(newZonedDateTime); this.currentZonedDateTime = newZonedDateTime; } }
[ "wojciech.gaudnik@gmail.com" ]
wojciech.gaudnik@gmail.com
05e7c0fcdc2b1966ab38aaae1db2e142766f8d15
705879dc61c41198fb2c4f4f6328bba190c8a465
/src/main/java/org/virtualbox/IMachineGetRTCUseUTCResponse.java
2297de611aca7fad7b7c52a240ca439e362c227b
[]
no_license
abiquo/hypervisor-mock
dcd1d6c8a2fdbc4db01c7a6e9a64edd101e8ed42
e49e4ca84930415eca72ab6c73140a0f2eea4bbe
refs/heads/master
2021-01-19T09:40:57.840712
2013-08-23T08:54:17
2013-08-23T08:54:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,256
java
package org.virtualbox; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="returnval" type="{http://www.w3.org/2001/XMLSchema}boolean"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "returnval" }) @XmlRootElement(name = "IMachine_getRTCUseUTCResponse") public class IMachineGetRTCUseUTCResponse { protected boolean returnval; /** * Gets the value of the returnval property. * */ public boolean isReturnval() { return returnval; } /** * Sets the value of the returnval property. * */ public void setReturnval(boolean value) { this.returnval = value; } }
[ "serafin.sedano@abiquo.com" ]
serafin.sedano@abiquo.com
484b95bbeba10bb6be344a234e5991113ca24e72
eba77a11fd0e41fef7f63c12df1119b8d4518928
/app/src/main/java/com/geekhive/foodey/Cakes/adapter/CakeShopStoreRecyclerAdapter.java
708c1f9531f8fb44ab7252043d6283dbb5af11de
[]
no_license
dprasad554/FoodeyResurant
0a64f014c504c945aadf7c1fa8cfc465a6b836de
40fa1753567ec15f4d47f71f45b917b18b314fcb
refs/heads/master
2023-04-03T15:41:55.851709
2021-05-03T08:39:01
2021-05-03T08:39:01
363,862,272
0
0
null
null
null
null
UTF-8
Java
false
false
4,087
java
package com.geekhive.foodey.Cakes.adapter; import android.content.Context; import android.content.Intent; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.geekhive.foodey.Cakes.activities.CakeShopSubCategoryActivity; import com.geekhive.foodey.Cakes.beans.cakestore.CakeStoreList; import com.geekhive.foodey.Cakes.utils.WebServices; import com.geekhive.foodey.R; import com.squareup.picasso.Picasso; public class CakeShopStoreRecyclerAdapter extends RecyclerView.Adapter<CakeShopStoreRecyclerAdapter.ViewHolder> { //Variables private Context mcontext; CakeStoreList cakeStoreList; String url = ""; public CakeShopStoreRecyclerAdapter(Context context, CakeStoreList cakeStoreList) { this.mcontext = context; this.cakeStoreList = cakeStoreList; } @NonNull @Override public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.cake_layout_shopstore, parent, false); return new ViewHolder(view); } @Override public void onBindViewHolder(@NonNull ViewHolder holder, final int position) { holder.shopname.setText(cakeStoreList.getCakeStore().get(position).getCakeStore().getName()); holder.shopAddress.setText(cakeStoreList.getCakeStore().get(position).getCakeStore().getAddress()); holder.tv_shopTime.setText(cakeStoreList.getCakeStore().get(position).getCakeStore().getDate()); if (cakeStoreList.getCakeStore().get(position).getCakeStore().getImage() != null) { url = WebServices.Foodey_Cakes_Image_Store + cakeStoreList.getCakeStore().get(position).getCakeStore().getImage(); } if (!url.equals("")) { Picasso.get() .load(url)//download URL .error(R.drawable.foodey_logo_)//if failed .into(holder.shopimage); } holder.shopimage.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(mcontext, CakeShopSubCategoryActivity.class); intent.putExtra("url", cakeStoreList.getCakeStore().get(position).getCakeStore().getImage()); intent.putExtra("title", cakeStoreList.getCakeStore().get(position).getCakeStore().getName()); intent.putExtra("storeid", cakeStoreList.getCakeStore().get(position).getCakeStore().getId()); mcontext.startActivity(intent); } }); if (cakeStoreList.getCakeStore().get(position).getCakeOffer().size() != 0){ holder.tv_offer.setVisibility(View.VISIBLE); holder.tv_offer.setText(cakeStoreList.getCakeStore().get(position).getCakeOffer().get(0).getDiscount() + " % Discount " + cakeStoreList.getCakeStore().get(position).getCakeOffer().get(0).getName()); } else { holder.tv_offer.setVisibility(View.GONE); holder.vI_cpn.setVisibility(View.GONE); } } @Override public int getItemCount() { return cakeStoreList.getCakeStore().size(); } public class ViewHolder extends RecyclerView.ViewHolder { ImageView shopimage,vI_cpn; TextView shopname, shopAddress, tv_shopTime, tv_offer; public ViewHolder(@NonNull View itemView) { super(itemView); shopimage = (ImageView) itemView.findViewById(R.id.iv_shopImage); shopname = (TextView) itemView.findViewById(R.id.tv_shopName); shopAddress = (TextView) itemView.findViewById(R.id.tv_shopDelivery); tv_shopTime = (TextView) itemView.findViewById(R.id.tv_shopTime); tv_offer = (TextView) itemView.findViewById(R.id.vT_offer_txt); vI_cpn = (ImageView)itemView.findViewById(R.id.vI_cpn); } } }
[ "rohitkumar.kr92@gmail.com" ]
rohitkumar.kr92@gmail.com
b157b9114c2d1d84edb1ab79b732b48824e62afe
582b3b233d9c979323aabed1749d83d7b9fa0228
/OBS/src/java/com/myapp/struts/ListChqServ.java
d5b7f721718e2f1c12a9b1b1fcfd58ba95229750
[]
no_license
PadminiNancy/Hiberuts
227abd500c6732327d7db190056161f901c9c336
db7991ccd548b0bfb936f1f290d4e95137da6d0d
refs/heads/master
2020-04-13T00:02:42.708308
2018-12-22T19:23:18
2018-12-22T19:23:18
162,836,329
1
0
null
null
null
null
UTF-8
Java
false
false
1,523
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.myapp.struts; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import java.util.*; import javax.servlet.http.HttpSession; /** * * @author dell */ public class ListChqServ extends org.apache.struts.action.Action { /* forward name="success" path="" */ private String s = "success"; /** * This is the action called from the Struts framework. * @param mapping The ActionMapping used to select this instance. * @param form The optional ActionForm bean for this request. * @param request The HTTP Request we are processing. * @param response The HTTP Response we are processing. * @throws java.lang.Exception * @return */ @Override public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { HttpSession session=request.getSession(); ArrayList al=new ChqModel().ChqReqDetails(); if(al.size()>0) { session.setAttribute("id","yes"); request.setAttribute("al",al); s="success"; }else { s="failure"; } return mapping.findForward(s); } }
[ "pdmnnancy@gmail.com" ]
pdmnnancy@gmail.com
e65ff96a45203937d6dfb63c45f2ed4c76dabdd7
6dc65713c5b751e9aca36710a2251e7673825a78
/gulimall-product/src/main/java/com/wubaba/gulimallproduct/service/impl/PmsCategoryServiceImpl.java
fed6531f511aa558f62a1eaf013059064eea3d99
[]
no_license
wujuxuan/mall-demo
4de64f82a96f9368ef8689b9c4c2c2a419becd91
da58931a903c6e4c7d613f0e3f905fa5f563e6ea
refs/heads/master
2023-06-02T01:54:21.310949
2021-06-25T09:11:59
2021-06-25T09:11:59
379,196,373
0
0
null
null
null
null
UTF-8
Java
false
false
641
java
package com.wubaba.gulimallproduct.service.impl; import org.springframework.stereotype.Service; import java.util.Map; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.wubaba.gulimallproduct.dao.PmsCategoryDao; import com.wubaba.gulimallproduct.entity.PmsCategoryEntity; import com.wubaba.gulimallproduct.service.PmsCategoryService; @Service("pmsCategoryService") public class PmsCategoryServiceImpl extends ServiceImpl<PmsCategoryDao, PmsCategoryEntity> implements PmsCategoryService { }
[ "100742869@qq.com" ]
100742869@qq.com
dbe788a105a6cf9e1b009d027ae9ce3031dcfe90
394a1e211fb5975cca5a79b15570bb5e022b7563
/src/main/java/com/fred/homeapp/web/rest/VilleResource.java
d08925f0f4203875df814aedbce0c04b0994f86c
[]
no_license
FredPi17/home-application-jhipster
adf6766973f7462a3493d0a23342fb3568302a61
227d1f9c94f745479b9c24cb7f792b7b2b621789
refs/heads/master
2020-04-29T15:11:47.256277
2019-04-04T09:01:24
2019-04-04T09:01:24
176,220,443
1
0
null
null
null
null
UTF-8
Java
false
false
5,202
java
package com.fred.homeapp.web.rest; import com.fred.homeapp.domain.Ville; import com.fred.homeapp.service.VilleService; import com.fred.homeapp.web.rest.errors.BadRequestAlertException; import com.fred.homeapp.web.rest.util.HeaderUtil; import io.github.jhipster.web.util.ResponseUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.net.URI; import java.net.URISyntaxException; import java.util.List; import java.util.Optional; /** * REST controller for managing Ville. */ @RestController @RequestMapping("/api") public class VilleResource { private final Logger log = LoggerFactory.getLogger(VilleResource.class); private static final String ENTITY_NAME = "ville"; private final VilleService villeService; public VilleResource(VilleService villeService) { this.villeService = villeService; } /** * POST /villes : Create a new ville. * * @param ville the ville to create * @return the ResponseEntity with status 201 (Created) and with body the new ville, or with status 400 (Bad Request) if the ville has already an ID * @throws URISyntaxException if the Location URI syntax is incorrect */ @PostMapping("/villes") public ResponseEntity<Ville> createVille(@RequestBody Ville ville) throws URISyntaxException { log.debug("REST request to save Ville : {}", ville); if (ville.getId() != null) { throw new BadRequestAlertException("A new ville cannot already have an ID", ENTITY_NAME, "idexists"); } Ville result = villeService.save(ville); return ResponseEntity.created(new URI("/api/villes/" + result.getId())) .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString())) .body(result); } /** * PUT /villes : Updates an existing ville. * * @param ville the ville to update * @return the ResponseEntity with status 200 (OK) and with body the updated ville, * or with status 400 (Bad Request) if the ville is not valid, * or with status 500 (Internal Server Error) if the ville couldn't be updated * @throws URISyntaxException if the Location URI syntax is incorrect */ @PutMapping("/villes") public ResponseEntity<Ville> updateVille(@RequestBody Ville ville) throws URISyntaxException { log.debug("REST request to update Ville : {}", ville); if (ville.getId() == null) { throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull"); } Ville result = villeService.save(ville); return ResponseEntity.ok() .headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, ville.getId().toString())) .body(result); } /** * GET /villes : get all the villes. * * @return the ResponseEntity with status 200 (OK) and the list of villes in body */ @GetMapping("/villes") public List<Ville> getAllVilles() { log.debug("REST request to get all Villes"); return villeService.findAll(); } /** * GET /villes/:id : get the "id" ville. * * @param id the id of the ville to retrieve * @return the ResponseEntity with status 200 (OK) and with body the ville, or with status 404 (Not Found) */ @GetMapping("/villes/{id}") public ResponseEntity<Ville> getVille(@PathVariable Long id) { log.debug("REST request to get Ville : {}", id); Optional<Ville> ville = villeService.findOne(id); return ResponseUtil.wrapOrNotFound(ville); } /** * DELETE /villes/:id : delete the "id" ville. * * @param id the id of the ville to delete * @return the ResponseEntity with status 200 (OK) */ @DeleteMapping("/villes/{id}") public ResponseEntity<Void> deleteVille(@PathVariable Long id) { log.debug("REST request to delete Ville : {}", id); villeService.delete(id); return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build(); } /** * GET /villes/getVille/{latitude}/{longitude} : get data for the city with those coordinates * @param latitude latitude of the city * @param longitude longitude of the city * @return the string of api call * @throws Exception */ @GetMapping("/villes/getVille/{latitude}/{longitude}") public String getDataFromVille(@PathVariable String latitude, @PathVariable String longitude) throws Exception { log.debug("REST request to get data for a city"); return villeService.getDataFromVille(latitude, longitude, ""); } /** * GET /villes/getVille/{cityName} : get data for the city * @param cityName city name * @return data for the city * @throws Exception */ @GetMapping("/villes/getVille/cityName/{cityName}") public String getDataFromCityName(@PathVariable String cityName) throws Exception { log.debug("REST request to get weather for: {}", cityName); return villeService.getDataFromVille("", "", cityName); } }
[ "fpinaud17@gmail.com" ]
fpinaud17@gmail.com
daae16687fd9903ccc07fe6f986f1f2862bf20de
b46f6500b3f68262df0376fce44112afa7a66a55
/rewrite-body/src/main/java/com/github/edgar615/spring/cloud/gateway/rewrite/Test.java
eea1f8ccd28a6610dd6f0a6f0000d11ece390a24
[]
no_license
edgar615/spring-cloud-gateway-example
4983cb70a7051929c1ae78738a9a8889d29d6d8a
36b5e5e8628bedd9ba3c32b682ba8cf10e7d395a
refs/heads/main
2023-01-25T01:09:11.757090
2020-12-03T02:59:53
2020-12-03T02:59:53
315,630,673
0
0
null
null
null
null
UTF-8
Java
false
false
254
java
package com.github.edgar615.spring.cloud.gateway.rewrite; import java.util.Base64; public class Test { public static void main(String[] args) { System.out.println(Base64.getEncoder().encodeToString("{\"foo\":\"bar\"}".getBytes())); } }
[ "edgar615@gmail.com" ]
edgar615@gmail.com
cf2d29ed5d8e8e3369b7d589cca3ca5262751997
7931f822df373f5db72fe819f1d9099ecbfca4d4
/app/src/main/java/com/example/yvtc/yvtc2011110902/ZooDetail.java
ad11222e85530a9d777f2f4d0ed3c71152915641
[]
no_license
Shaojung/YVTC2011110902
1313d8fb17646ccbc20477914cfac5da1aadedf0
e0c3e43798b8f6b90631af59364de0951e2ab07c
refs/heads/master
2021-08-08T00:46:19.688167
2017-11-09T07:54:26
2017-11-09T07:54:26
110,078,739
0
0
null
null
null
null
UTF-8
Java
false
false
141
java
package com.example.yvtc.yvtc2011110902; /** * Created by yvtc on 2017/11/9. */ public class ZooDetail { public ZooInfo[] results; }
[ "shaojung@gmail.com" ]
shaojung@gmail.com