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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ff9c3bebc4d7b528512e919971884d1d73154679
|
77125f9fe31d0a2db8f1b440363d8be5ba30d54d
|
/rpc-register/src/main/java/com/github/houbb/rpc/register/domain/message/impl/DefaultRegisterMessage.java
|
8357e9ec787b37da12595c484d044cbdce614d97
|
[
"Apache-2.0"
] |
permissive
|
macrobussiness/rpc
|
2447ee8367e85a51a1739bb4a54a00ac371a7141
|
a40929fda09907743ffce4f662aa276905428f64
|
refs/heads/master
| 2022-12-26T01:41:55.252765
| 2019-11-08T05:54:00
| 2019-11-08T05:54:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,460
|
java
|
package com.github.houbb.rpc.register.domain.message.impl;
import com.github.houbb.rpc.register.domain.message.RegisterMessage;
import com.github.houbb.rpc.register.domain.message.RegisterMessageHeader;
/**
* 默认注册消息
* @author binbin.hou
* @since 0.0.8
*/
class DefaultRegisterMessage implements RegisterMessage {
private static final long serialVersionUID = 3979588494064088927L;
/**
* 唯一序列号标识
* @since 0.0.8
*/
private String seqId;
/**
* 头信息
* @since 0.0.8
*/
private RegisterMessageHeader header;
/**
* 消息信息体
* @since 0.0.8
*/
private Object body;
@Override
public String seqId() {
return seqId;
}
@Override
public DefaultRegisterMessage seqId(String seqId) {
this.seqId = seqId;
return this;
}
@Override
public RegisterMessageHeader header() {
return header;
}
public DefaultRegisterMessage header(RegisterMessageHeader header) {
this.header = header;
return this;
}
@Override
public Object body() {
return body;
}
public DefaultRegisterMessage body(Object body) {
this.body = body;
return this;
}
@Override
public String toString() {
return "DefaultRegisterMessage{" +
"header=" + header +
", body=" + body +
'}';
}
}
|
[
"1060732496@qq.com"
] |
1060732496@qq.com
|
f7f4186854b4abb5ddbed754da5d5166e7e128e2
|
9faa0b3e778c2c9fed3de4b7ccbceaaca06d8f41
|
/core/src/main/java/com/netflix/msl/entityauth/PresharedKeyStore.java
|
7b4cdf8fd33f2d56fa0386fd6d57f9e0151a6c1c
|
[
"Apache-2.0"
] |
permissive
|
Kryndex/msl
|
0a45449373ec526f41171d867efe5c6154e44eb4
|
ebd96018bd708f5bb001f49e7220377244bb0c46
|
refs/heads/master
| 2021-01-21T10:29:39.767050
| 2017-05-18T06:47:21
| 2017-05-18T06:47:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,930
|
java
|
/**
* Copyright (c) 2014 Netflix, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.netflix.msl.entityauth;
import javax.crypto.SecretKey;
/**
* A preshared key store contains trusted preshared keys.
*
* @author Wesley Miaw <wmiaw@netflix.com>
*/
public interface PresharedKeyStore {
/**
* A set of encryption, HMAC, and wrapping keys.
*/
public static class KeySet {
/**
* Create a new key set with the given keys.
*
* @param encryptionKey the encryption key.
* @param hmacKey the HMAC key.
* @param wrappingKey the wrapping key.
*/
public KeySet(final SecretKey encryptionKey, final SecretKey hmacKey, final SecretKey wrappingKey) {
this.encryptionKey = encryptionKey;
this.hmacKey = hmacKey;
this.wrappingKey = wrappingKey;
}
/** Encryption key. */
public final SecretKey encryptionKey;
/** HMAC key. */
public final SecretKey hmacKey;
/** Wrapping key. */
public final SecretKey wrappingKey;
}
/**
* Return the encryption, HMAC, and wrapping keys for the given identity.
*
* @param identity key set identity.
* @return the keys set associated with the identity or null if not found.
*/
public KeySet getKeys(final String identity);
}
|
[
"wmiaw@netflix.com"
] |
wmiaw@netflix.com
|
9c0f668d2dbc573a6b3508a93a0081b38d4e85ef
|
6b14c59fba946f80f261fcd83ac2ceba67bbecd2
|
/plugin-document/src/main/java/nl/xillio/xill/plugins/mongodb/MongoExpressionIterator.java
|
35e1aabaf857b3bed242541ac1157ce5e931f50a
|
[
"Apache-2.0"
] |
permissive
|
xillio/xill-platform
|
30c7fcef5f0508a6875e60b9ac4ff00512fc61ab
|
d6315b96b9d0ce9b92f91f611042eb2a2dd9a6ff
|
refs/heads/master
| 2022-09-15T09:38:24.601818
| 2022-08-03T14:37:29
| 2022-08-03T14:37:29
| 123,340,493
| 4
| 3
|
Apache-2.0
| 2022-09-08T01:07:07
| 2018-02-28T20:46:52
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,782
|
java
|
/**
* Copyright (C) 2014 Xillio (support@xillio.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 nl.xillio.xill.plugins.mongodb;
import com.mongodb.MongoCursorNotFoundException;
import nl.xillio.xill.api.components.MetaExpression;
import nl.xillio.xill.api.components.MetaExpressionIterator;
import nl.xillio.xill.api.errors.RobotRuntimeException;
import java.util.Iterator;
import java.util.function.Function;
/**
* Specific iterator to iterate through MongoDB expressions
*
* @author Edward van Egdom
*/
public class MongoExpressionIterator<E> extends MetaExpressionIterator<E> {
public MongoExpressionIterator(Iterator<E> source, Function<E, MetaExpression> transformer) {
super(source, transformer);
}
@Override
public boolean hasNext() {
try {
return super.hasNext();
} catch (MongoCursorNotFoundException e) {
throw new RobotRuntimeException("Iteration failed: Mongo cursor was not found", e);
}
}
@Override
public MetaExpression next() {
try {
return super.next();
} catch (MongoCursorNotFoundException e) {
throw new RobotRuntimeException("Iteration failed: Mongo cursor was not found", e);
}
}
}
|
[
"thomas.biesaart@outlook.com"
] |
thomas.biesaart@outlook.com
|
a903b1369760ae6bc8c118f16b82d292cf3a53f3
|
c3aa40f242a8349571ab38e288956d6b181f836c
|
/src/main/java/cn/zhucongqi/proxy/Walk.java
|
a3aa5c476875ffa2ae9c5606a5601e670e1d0e27
|
[] |
no_license
|
LearnedHub/learning-patterns
|
0a0fb0272a3ba4f23c1e712c2af2f04b1bdb1f7e
|
0da6015bdac490d96e7569a0cf02ee1912b36647
|
refs/heads/master
| 2021-07-25T14:27:49.045759
| 2019-12-09T16:29:00
| 2019-12-09T16:29:00
| 226,298,642
| 0
| 0
| null | 2020-10-13T18:05:55
| 2019-12-06T10:00:55
|
Java
|
UTF-8
|
Java
| false
| false
| 234
|
java
|
package cn.zhucongqi.proxy;
/**
* @author :Jobsz
* @project :learning-patterns
* @date :Created in 2019/12/9 23:18
* @description:
* @modified By:
* @version:
*/
public interface Walk {
void to(String addr);
}
|
[
"brucezcq@gmail.com"
] |
brucezcq@gmail.com
|
07b1fcd19ca06c9263fee095066610512531b2c4
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-new-fitness/results/LANG-1b-1-7-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage-opt/org/apache/commons/lang3/math/NumberUtils_ESTest_scaffolding.java
|
449285dc53f1993f712d5d62d569b1091c66be07
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,981
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Oct 29 04:11:29 UTC 2021
*/
package org.apache.commons.lang3.math;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class NumberUtils_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.lang3.math.NumberUtils";
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(NumberUtils_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.lang3.math.NumberUtils",
"org.apache.commons.lang3.StringUtils"
);
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
04614471eb79a49889ac4dcf6695a8293d9f03f8
|
f2e9603b216e21d34f25d8f2ff38e092dc6cbcdf
|
/4.IoC/src/main/java/com/denglitong/beanfactory/GroovyApplicationContextTest.java
|
6343e6045fe059e1ba9945638961b1d2d3c010c0
|
[] |
no_license
|
denglitong/proficient_in_4x_spring
|
2da474277ca9bc7d4ea744249a3d57007b52bfa6
|
d37eaac9db1fa3d167692bd9828f84ee379947f2
|
refs/heads/master
| 2023-06-16T07:09:12.860008
| 2021-07-11T09:02:01
| 2021-07-11T09:02:01
| 372,717,780
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 553
|
java
|
package com.denglitong.beanfactory;
import com.denglitong.reflect.Car;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.GenericGroovyApplicationContext;
/**
* @author litong.deng@foxmail.com
* @date 2021/6/3
*/
public class GroovyApplicationContextTest {
public static void main(String[] args) {
ApplicationContext ctx = new GenericGroovyApplicationContext("classpath:groovy-beans.groovy");
Car blueCar = ctx.getBean("blueCar", Car.class);
blueCar.introduce();
}
}
|
[
"litong.deng@foxmail.com"
] |
litong.deng@foxmail.com
|
9c1227cb4e258b532dba59ef0bc52714f72b2616
|
754132678372080f2d783ac0293e1a0ad5673488
|
/src/test/java/nl/hu/bep/shopping/tests/ShopperTest.java
|
554a515133b0e828cf5137e8eed39a39a59b6dcb
|
[] |
no_license
|
anass0347/BigShopperDemo
|
fbdc72bbe7fedc0ef0bc7ad08b4f22bd4b3e1531
|
16782ba54faaba71feeb3ff27e403520dc94cf8b
|
refs/heads/main
| 2023-06-02T05:59:48.842047
| 2021-06-07T16:51:19
| 2021-06-07T16:51:19
| 374,737,669
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 934
|
java
|
package nl.hu.bep.shopping.tests;
import nl.hu.bep.shopping.model.Product;
import nl.hu.bep.shopping.model.Shopper;
import nl.hu.bep.shopping.model.ShoppingList;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class ShopperTest {
private Shopper p;
private ShoppingList il, al;
@BeforeEach
public void setup() {
p = new Shopper("Dum-Dum");
il = new ShoppingList("initialList", p);
al = new ShoppingList("anotherList", p);
p.addList(il);
p.addList(al);
il.addItem(new Product("Cola Zero"), 4);
il.addItem(new Product("Cola Zero"), 4);
il.addItem(new Product("Toiletpapier 6stk"), 1);
al.addItem(new Product("Paracetamol 30stk"), 3);
}
@Test
public void shouldHaveTwoLists() {
assertEquals(2, p.getAllLists().size());
}
}
|
[
"66690702+github-classroom[bot]@users.noreply.github.com"
] |
66690702+github-classroom[bot]@users.noreply.github.com
|
625018e842245c2daf38a325d30c320da1750aba
|
590f065619a7168d487eec05db0fd519cfb103b5
|
/evosuite-tests/com/iluwatar/iterator/bst/BstIterator_ESTest_scaffolding.java
|
0f2cff0331f3ff8710124ddb0a99480d3078a113
|
[] |
no_license
|
parthenos0908/EvoSuiteTrial
|
3de131de94e8d23062ab3ba97048d01d504be1fb
|
46f9eeeca7922543535737cca3f5c62d71352baf
|
refs/heads/master
| 2023-02-17T05:00:39.572316
| 2021-01-18T00:06:01
| 2021-01-18T00:06:01
| 323,848,050
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,947
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Jan 11 08:43:55 GMT 2021
*/
package com.iluwatar.iterator.bst;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class BstIterator_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
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 = "com.iluwatar.iterator.bst.BstIterator";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
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.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("user.dir", "C:\\Users\\disto\\gitrepos\\EvoSuiteTrial");
java.lang.System.setProperty("java.io.tmpdir", "C:\\Users\\disto\\AppData\\Local\\Temp\\");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(BstIterator_ESTest_scaffolding.class.getClassLoader() ,
"com.iluwatar.iterator.bst.TreeNode",
"com.iluwatar.iterator.Iterator",
"com.iluwatar.iterator.bst.BstIterator"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(BstIterator_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"com.iluwatar.iterator.bst.BstIterator",
"com.iluwatar.iterator.bst.TreeNode"
);
}
}
|
[
"distortion0908@gmail.com"
] |
distortion0908@gmail.com
|
2fcaa022bca72837da8d8953758c5990e6b512a3
|
574afb819e32be88d299835d42c067d923f177b0
|
/src/net/minecraft/client/particle/ParticlePortal.java
|
c2151c687b6adaad8bf0143a5e529eaf9822cb53
|
[] |
no_license
|
SleepyKolosLolya/WintWare-Before-Zamorozka
|
7a474afff4d72be355e7a46a38eb32376c79ee76
|
43bff58176ec7422e826eeaf3ab8e868a0552c56
|
refs/heads/master
| 2022-07-30T04:20:18.063917
| 2021-04-25T18:16:01
| 2021-04-25T18:16:01
| 361,502,972
| 6
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,297
|
java
|
package net.minecraft.client.particle;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.entity.Entity;
import net.minecraft.world.World;
public class ParticlePortal extends Particle {
private final float portalParticleScale;
private final double portalPosX;
private final double portalPosY;
private final double portalPosZ;
protected ParticlePortal(World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn) {
super(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
this.motionX = xSpeedIn;
this.motionY = ySpeedIn;
this.motionZ = zSpeedIn;
this.posX = xCoordIn;
this.posY = yCoordIn;
this.posZ = zCoordIn;
this.portalPosX = this.posX;
this.portalPosY = this.posY;
this.portalPosZ = this.posZ;
float f = this.rand.nextFloat() * 0.6F + 0.4F;
this.particleScale = this.rand.nextFloat() * 0.2F + 0.5F;
this.portalParticleScale = this.particleScale;
this.particleRed = f * 0.9F;
this.particleGreen = f * 0.3F;
this.particleBlue = f;
this.particleMaxAge = (int)(Math.random() * 10.0D) + 40;
this.setParticleTextureIndex((int)(Math.random() * 8.0D));
}
public void moveEntity(double x, double y, double z) {
this.setEntityBoundingBox(this.getEntityBoundingBox().offset(x, y, z));
this.resetPositionToBB();
}
public void renderParticle(BufferBuilder worldRendererIn, Entity entityIn, float partialTicks, float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ) {
float f = ((float)this.particleAge + partialTicks) / (float)this.particleMaxAge;
f = 1.0F - f;
f *= f;
f = 1.0F - f;
this.particleScale = this.portalParticleScale * f;
super.renderParticle(worldRendererIn, entityIn, partialTicks, rotationX, rotationZ, rotationYZ, rotationXY, rotationXZ);
}
public int getBrightnessForRender(float p_189214_1_) {
int i = super.getBrightnessForRender(p_189214_1_);
float f = (float)this.particleAge / (float)this.particleMaxAge;
f *= f;
f *= f;
int j = i & 255;
int k = i >> 16 & 255;
k += (int)(f * 15.0F * 16.0F);
if (k > 240) {
k = 240;
}
return j | k << 16;
}
public void onUpdate() {
this.prevPosX = this.posX;
this.prevPosY = this.posY;
this.prevPosZ = this.posZ;
float f = (float)this.particleAge / (float)this.particleMaxAge;
float f1 = -f + f * f * 2.0F;
float f2 = 1.0F - f1;
this.posX = this.portalPosX + this.motionX * (double)f2;
this.posY = this.portalPosY + this.motionY * (double)f2 + (double)(1.0F - f);
this.posZ = this.portalPosZ + this.motionZ * (double)f2;
if (this.particleAge++ >= this.particleMaxAge) {
this.setExpired();
}
}
public static class Factory implements IParticleFactory {
public Particle createParticle(int particleID, World worldIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, int... p_178902_15_) {
return new ParticlePortal(worldIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn);
}
}
}
|
[
"ask.neverhide@gmail.com"
] |
ask.neverhide@gmail.com
|
e6b7dd2dc632d31af3454bbd682024a143c77168
|
84e064c973c0cc0d23ce7d491d5b047314fa53e5
|
/latest9.7/hej/net/sf/saxon/functions/ContextAccessorFunction.java
|
329015f1bfbd620525ac6aacce49c16a04d519e9
|
[] |
no_license
|
orbeon/saxon-he
|
83fedc08151405b5226839115df609375a183446
|
250c5839e31eec97c90c5c942ee2753117d5aa02
|
refs/heads/master
| 2022-12-30T03:30:31.383330
| 2020-10-16T15:21:05
| 2020-10-16T15:21:05
| 304,712,257
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,062
|
java
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2015 Saxonica Limited.
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
// This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
package net.sf.saxon.functions;
import net.sf.saxon.expr.XPathContext;
import net.sf.saxon.om.Function;
import net.sf.saxon.om.Sequence;
import net.sf.saxon.trans.XPathException;
/**
* A ContextAccessorFunction is a function that is dependent on the dynamic context. In the case
* of dynamic function calls, the context is bound at the point where the function is created,
* not at the point where the function is called.
*/
public abstract class ContextAccessorFunction extends SystemFunction {
/**
* Bind a context item to appear as part of the function's closure. If this method
* has been called, the supplied context item will be used in preference to the
* context item at the point where the function is actually called.
* @param context the context to which the function applies. Must not be null.
*/
public abstract Function bindContext(XPathContext context) throws XPathException;
/**
* Evaluate the expression
*
* @param context the dynamic evaluation context
* @param arguments the values of the arguments, supplied as Sequences
* @return the result of the evaluation, in the form of a Sequence
* @throws net.sf.saxon.trans.XPathException if a dynamic error occurs during the evaluation of the expression
*/
public Sequence call(XPathContext context, Sequence[] arguments) throws XPathException {
return bindContext(context).call(context, arguments);
}
}
|
[
"oneil@saxonica.com"
] |
oneil@saxonica.com
|
9f76cf7149a68d3139a473619fc390f9f652b20f
|
8a930767dca3788dacd40b3cb34ecd0d79528640
|
/src/main/java/com/exedosoft/plat/ui/bootstrap/form/DOResultListPopupPml.java
|
56be30a6c3b3b179c4fcacf3295e473943e669a6
|
[] |
no_license
|
mamacmm/eeplat
|
74c27603b8c34960ed909ce457ddab5c1dd6554f
|
6757848f6d76ba3e17006d6ae1f1a79cabd27b91
|
refs/heads/master
| 2021-01-02T04:53:11.428932
| 2014-03-05T07:22:11
| 2014-03-05T07:22:11
| 17,425,665
| 10
| 7
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,890
|
java
|
package com.exedosoft.plat.ui.bootstrap.form;
import java.util.Iterator;
import java.util.List;
import com.exedosoft.plat.bo.BOInstance;
import com.exedosoft.plat.bo.DOBO;
import com.exedosoft.plat.bo.DOService;
import com.exedosoft.plat.ui.DOFormModel;
import com.exedosoft.plat.ui.DOIModel;
import com.exedosoft.plat.ui.jquery.form.DOBaseForm;
import com.exedosoft.plat.ui.jquery.form.DOValueResultList;
import com.exedosoft.plat.util.DOGlobals;
import com.exedosoft.plat.util.Escape;
import com.exedosoft.plat.util.StringUtil;
public class DOResultListPopupPml extends DOBaseForm {
public DOResultListPopupPml() {
super();
}
public String getHtmlCode(DOIModel iModel) {
if(isUsingTemplate){
return super.getHtmlCode(iModel);
}
DOFormModel property = (DOFormModel) iModel;
return getPopupForm(property);
}
protected int max_pagesize = 50;
protected boolean default_data = false;
/**
* 获取动态列表形式的Select Form
*
* @param property
* TODO
* @param db
* @return
*/
String getPopupForm(DOFormModel fm) {
/**
* 可变动态下拉列表, 根据连接的FORMMODEL,一般静态staticlist 确定使用的服务
*/
boolean isDyn = false;
if (fm.getLinkForms() != null && !fm.getLinkForms().isEmpty()
&& fm.getInputConfig() != null) {
isDyn = true;
}
if (fm.getLinkService() == null && !isDyn) {
return " ";
}
StringBuffer buffer = new StringBuffer();
String theValue = fm.getValue();
BOInstance data = null;
if (fm.getL10n().equals("连接内容")) {
System.out.println("isDyn:::::::::::" + isDyn);
System.out.println("连接内容:::::::::::" + fm.getLinkForms());
System.out.println("fm.getInputConfig():::::::::::"
+ fm.getInputConfig());
}
if (theValue != null && !"".equals(theValue.trim())) {
DOBO corrBO = fm.getLinkBO();
if (corrBO == null && fm.getLinkService() != null) {
corrBO = fm.getLinkService().getBo();
}
/**
* 可变动态下拉列表, 根据连接的FORMMODEL,一般静态staticlist 确定使用的服务
*/
if (isDyn) {
DOFormModel linkFm = (DOFormModel) fm.getLinkForms().get(0);
String theLinkValue = fm.getData()
.getValue(linkFm.getColName());
if (theLinkValue != null) {
List list = StringUtil.getStaticList(fm.getInputConfig());
for (Iterator it = list.iterator(); it.hasNext();) {
String[] halfs = (String[]) it.next();
if ((theLinkValue != null && theLinkValue
.equals(halfs[0]))) {
DOService theCorrService = DOService
.getService(halfs[1]);
if (theCorrService != null) {
corrBO = theCorrService.getBo();
}
break;
}
}
}
data = DOValueResultList.getAInstance(null, corrBO, theValue);
} else {
data = DOValueResultList.getAInstance(fm, corrBO, theValue);
}
}
// if (default_data && data == null && fm.getLinkService() != null) {
// data = fm.getLinkService().getBo().getCorrInstance();
// if (data != null) {
// theValue = data.getUid();
// }
// }
buffer.append(" <div class='input-append'> <input type='hidden' class='resultlistpopup' name='")
.append(fm.getColName()).append("' id='")
.append(fm.getFullColID()).append("' serviceName='")
.append(fm.getLinkService().getName()).append("' ");
buffer.append(" title='").append(fm.getL10n().trim()).append("'");
if (theValue != null) {
buffer.append(" value='").append(theValue).append("'");
}
appendHtmlJs(buffer, fm,false);
buffer.append("/>");
buffer.append(
"<input type='text' onchange=\"if(this.value==''){this.previousSibling.value='';}\"'")
.append(" name='")
.append(fm.getFullColID()).append("_show' id='")
.append(fm.getFullColID()).append("_show' ");
buffer.append(this.appendValidateConfig(fm));
if (fm.getOnChangeJs() != null
&& !"".equals(fm.getOnChangeJs().trim())) {
buffer.append(" changejs='")
.append(Escape.unescape(fm.getOnChangeJs()))
.append("' ");
}
buffer.append(getDecoration(fm));
if (data != null) {
buffer.append(" value='").append(data.getName()).append("'");
}
// else{
// buffer.append(" value='").append(fm.getL10n())
// .append("'");
// }
if (data != null) {
buffer.append(" title='").append(data.getName()).append("'");
} else {
buffer.append(" title='").append(fm.getL10n()).append("'");
}
if (isReadOnly(fm)) {
buffer.append(" readonly='readonly' ");
}
buffer.append(" size='").append(getInputSize(fm)).append("' ");
/**
* 可变动态下拉列表, 根据连接的FORMMODEL,一般静态staticlist 确定使用的服务
*/
if (isDyn) {
DOFormModel linkFm = (DOFormModel) fm.getLinkForms().get(0);
buffer.append("linkformid='").append(linkFm.getFullColID())
.append("' inputconfig='").append(fm.getInputConfig())
.append("' ");
}
buffer.append("/>");
// 若有连接面板,则可弹出面板
if (fm.getLinkPaneModel() != null) {
// 下拉列表
buffer.append("<span class='add-on'> <img class='popupimg1' onclick=\"invokePopup(this")
.append(",'");
if (fm.getInputConstraint() != null) {
buffer.append(fm.getTargetForms());
}
buffer.append("','");
buffer.append(fm.getLinkService().getBo().getValueCol())
.append("',1,").append(max_pagesize);
if (fm.getInputConstraint() != null) {
buffer.append(",'").append(fm.getInputConstraint()).append("'");
}
buffer.append(")\" src='").append(DOGlobals.PRE_FULL_FOLDER)
.append("images/darraw.gif' align=absMiddle ");
buffer.append("/>");
// 连接面板
buffer.append("</span><span class='add-on'><img class='popupimg2' onclick=\"");
getInvokePmlJs(fm,buffer);
buffer.append("\" src='").append(DOGlobals.PRE_FULL_FOLDER)
.append("images/darraw2.gif' ");
buffer.append("/>");
} else {
buffer.append("<img class='popupimg' onclick=\"invokePopup(this")
.append(",'");
if (fm.getInputConstraint() != null) {
buffer.append(fm.getTargetForms());
}
buffer.append("','");
buffer.append(fm.getLinkService().getBo().getValueCol())
.append("',1,").append(max_pagesize);
if (fm.getInputConstraint() != null) {
buffer.append(",'").append(fm.getInputConstraint()).append("'");
}
buffer.append(")\" src='").append(DOGlobals.PRE_FULL_FOLDER)
.append("images/darraw.gif' ");
buffer.append("/>");
}
buffer.append("</span></div>");
if (fm.getNote() != null && !"".equals(fm.getNote())) {
buffer.append(fm.getNote());
}
if (fm.isNotNull()) {
buffer.append(" <font color='red'>*</font>");
}
return buffer.toString();
}
private void getInvokePmlJs(DOFormModel fm, StringBuffer buffer) {
if (fm.getLinkPaneModel() != null) {
buffer.append("invokePopupPml(this,'").append(fm.getFullColID());
buffer.append("','").append(fm.getLinkPaneModel().getName())
.append("'");
if (fm.getLinkPaneModel().getPaneWidth() != null) {
buffer.append(",'")
.append(fm.getLinkPaneModel().getPaneWidth())
.append("'");
} else {
buffer.append(",''");
}
if (fm.getLinkPaneModel().getPaneHeight() != null) {
buffer.append(",'")
.append(fm.getLinkPaneModel().getPaneHeight())
.append("'");
} else {
buffer.append(",''");
}
}
if (fm.getLinkPaneModel().getTitle() != null) {
buffer.append(",'").append(fm.getLinkPaneModel().getTitle())
.append("'");
} else {
buffer.append(",''");
}
if (fm.getGridModel() != null) {
buffer.append(",'a").append(fm.getGridModel().getObjUid())
.append("'");
} else {
buffer.append(",''");
}
if (fm.getTargetPaneModel() != null) {
buffer.append(",'").append(fm.getTargetPaneModel().getName())
.append("'");
} else {
buffer.append(",''");
}
buffer.append(")");
}
}
|
[
"toweikexin@gmail.com"
] |
toweikexin@gmail.com
|
06ab12f918a7906184b3bedf2dbe545970de294d
|
8dc84558f0058d90dfc4955e905dab1b22d12c08
|
/content/public/android/java/src/org/chromium/content/app/SandboxedProcessService24.java
|
15e1ffc0d7432962d9d24ab18c01ce1c3c125016
|
[
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] |
permissive
|
meniossin/src
|
42a95cc6c4a9c71d43d62bc4311224ca1fd61e03
|
44f73f7e76119e5ab415d4593ac66485e65d700a
|
refs/heads/master
| 2022-12-16T20:17:03.747113
| 2020-09-03T10:43:12
| 2020-09-03T10:43:12
| 263,710,168
| 1
| 0
|
BSD-3-Clause
| 2020-05-13T18:20:09
| 2020-05-13T18:20:08
| null |
UTF-8
|
Java
| false
| false
| 406
|
java
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.content.app;
/**
* This is needed to register multiple SandboxedProcess services so that we can have
* more than one sandboxed process.
*/
public class SandboxedProcessService24 extends SandboxedProcessService {
}
|
[
"arnaud@geometry.ee"
] |
arnaud@geometry.ee
|
b5eaadbec0e9637dc8a1771306ff7335978da3dc
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_b4da2cd498c4f7d3db22d69bc41baf0ebdbcb6bc/QuickContactActivity/2_b4da2cd498c4f7d3db22d69bc41baf0ebdbcb6bc_QuickContactActivity_s.java
|
53ac22bbb96b114b5126ea114e10b40a79ba371d
|
[] |
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,214
|
java
|
/*
* Copyright (C) 2009 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.contacts.quickcontact;
import com.android.contacts.ContactsActivity;
import android.content.ContentUris;
import android.content.Intent;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Bundle;
import android.provider.ContactsContract.QuickContact;
import android.provider.ContactsContract.RawContacts;
import android.util.Log;
/**
* Stub translucent activity that just shows {@link QuickContactWindow} floating
* above the caller. This temporary hack should eventually be replaced with
* direct framework support.
*/
public final class QuickContactActivity extends ContactsActivity
implements QuickContactWindow.OnDismissListener {
private static final String TAG = "QuickContactActivity";
static final boolean LOGV = false;
static final boolean FORCE_CREATE = false;
private QuickContactWindow mQuickContact;
@Override
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
if (LOGV) Log.d(TAG, "onCreate");
this.onNewIntent(getIntent());
}
@Override
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
if (LOGV) Log.d(TAG, "onNewIntent");
if (QuickContactWindow.TRACE_LAUNCH) {
android.os.Debug.startMethodTracing(QuickContactWindow.TRACE_TAG);
}
if (mQuickContact == null || FORCE_CREATE) {
if (LOGV) Log.d(TAG, "Preparing window");
mQuickContact = new QuickContactWindow(this, this);
}
// Use our local window token for now
Uri lookupUri = intent.getData();
// Check to see whether it comes from the old version.
if (android.provider.Contacts.AUTHORITY.equals(lookupUri.getAuthority())) {
final long rawContactId = ContentUris.parseId(lookupUri);
lookupUri = RawContacts.getContactLookupUri(getContentResolver(),
ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId));
}
final Bundle extras = intent.getExtras();
// Read requested parameters for displaying
final Rect target = intent.getSourceBounds();
final int mode = extras.getInt(QuickContact.EXTRA_MODE, QuickContact.MODE_MEDIUM);
final String[] excludeMimes = extras.getStringArray(QuickContact.EXTRA_EXCLUDE_MIMES);
mQuickContact.show(lookupUri, target, mode, excludeMimes);
}
/** {@inheritDoc} */
@Override
public void onBackPressed() {
if (LOGV) Log.w(TAG, "Unexpected back captured by stub activity");
finish();
}
@Override
protected void onPause() {
super.onPause();
if (LOGV) Log.d(TAG, "onPause");
// Dismiss any dialog when pausing
mQuickContact.dismiss();
}
@Override
protected void onDestroy() {
super.onDestroy();
if (LOGV) Log.d(TAG, "onDestroy");
}
/** {@inheritDoc} */
@Override
public void onDismiss(QuickContactWindow dialog) {
if (LOGV) Log.d(TAG, "onDismiss");
if (isTaskRoot() && !FORCE_CREATE) {
// Instead of stopping, simply push this to the back of the stack.
// This is only done when running at the top of the stack;
// otherwise, we have been launched by someone else so need to
// allow the user to go back to the caller.
moveTaskToBack(false);
} else {
finish();
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
88bd40dab7c24b467e4ede9f9e1a79ffd151c910
|
b9cda73f759b80eac1d37b169c76cc90dba059a9
|
/src/day56/tj_max/TJMaxx.java
|
7ed8f48ee760b6c4dcbfd2e911bddc99bc0dae3c
|
[] |
no_license
|
musajojo/Moses_CyberTek
|
07ce383eb2bad72b9601c71bb47ff9d2bc8c6e49
|
97d8d423d454fdba6ee0ffa3b5d818a51663d97e
|
refs/heads/master
| 2020-11-28T13:59:37.913082
| 2020-06-15T03:52:02
| 2020-06-15T03:52:02
| 229,839,863
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,930
|
java
|
package day56.tj_max;
// day 56 : TJMax Task : Solutions
import java.util.ArrayList;
import java.util.List;
/**
* represents TJMaxx store class.
* https://tjmaxx.com/
*/
public class TJMaxx {
/**
* Private lists to hold regular Item objects
* and OnSaleItem objects that represent items that sell in TJMaxx
*/
private List<Item> regularItems;
private List<OnSaleItem> onSaleItems;
/**
* Public no-args constructor - Instantiates regularItems and onSaleItems lists
* as new ArrayList
*/
public TJMaxx() {
regularItems = new ArrayList<>();
onSaleItems = new ArrayList<>();
}
/**
* adds an item object to regularItems list
*
* @param item
*/
public void addRegularItem(Item item) {
regularItems.add(item);
}
/**
* adds OnSaleItem object to onSaleItems list
*
* @param item
*/
public void addOnSaleItem(OnSaleItem item) {
onSaleItems.add(item);
}
/**
* getter for regularItems
*
* @return
*/
public List<Item> getRegularItems() {
return regularItems;
}
/**
* getter for onSaleItems
*
* @return
*/
public List<OnSaleItem> getOnSaleItems() {
return onSaleItems;
}
/**
* return count of regularItem object
*
* @return
*/
public int regularItemsCount() {
return regularItems.size();
}
/**
* returns count of onSaleItems in TJ Maxx
*
* @return
*/
public int onSaleItemsCount() {
//TODO change from -1
return onSaleItems.size();
}
/**
* returns the name of each item in TJ Maxx starting
* from regular item then onSaleItems
*
* @return
*/
public List<String> getAllItemNames() {
List<String> allNames = new ArrayList<>();
for (Item each : regularItems) {
allNames.add(each.getName());
}
for (OnSaleItem each : onSaleItems) {
allNames.add(each.getName());
}
return allNames;
}
/**
* gets catalog number and returns price for the item
* it will search for the item both regularItems and onsaleonSaleItems
*
* @param catalogNumber
* @returns 0.0 if product cannot be found with that catalognumber
*/
public double getItemPrice(int catalogNumber) {
for (Item each : regularItems) {
if (each.getCatalogNumber() == catalogNumber) {
return each.getPrice();
}
}
for (OnSaleItem each : onSaleItems) {
if (each.getCatalogNumber() == catalogNumber) {
return each.getPrice();
}
}
// at what point it will come here ??? IF NOTHING FOUND !!
return 0.0;
}
/**
* accepts a name then searches
* among onSaleItems. Once it finds, the method will return
* that OnSaleItem object
*
* @param name
* @return
*/
public OnSaleItem getOnSaleItem(String name) {
for (OnSaleItem each : onSaleItems) {
if (each.getName().equals(name)) {
return each;
}
}
return null;
}
/**
* removes the item with matching catalogNumber
* from both regularItems and onSaleItems.
* Does nothing if not found
*
* @param catalogNumber
*/
public void removeItem(int catalogNumber) {
// DO NOT REMOVE ITEM INSIDE FOR EACH LOOP | IT WILL NOT WORK !!!!!
//int targetIndex = -1 ;
for (int x = 0; x < regularItems.size(); x++) {
if (regularItems.get(x).getCatalogNumber() == catalogNumber) {
regularItems.remove(x);
x--; // shift the index so we can stay in same index for next iteration
}
}
for (int x = 0; x < onSaleItems.size(); x++) {
if (onSaleItems.get(x).getCatalogNumber() == catalogNumber) {
onSaleItems.remove(x);
x--; // shift the index so we can stay in same index for next iteration
}
}
}
/**
* - it accepts a catalog number and finds that item
* among regularItems and onSaleItems
* - if it finds the item:
* - decrease the count of the Item by 1
* - if count reaches 0 after decrementing then remove the product(call removeItem method)
*
* @param catalogNumber
*/
public void buyItem(int catalogNumber) {
for (int i = 0; i < regularItems.size(); i++) {
if (regularItems.get(i).getCatalogNumber() == catalogNumber) {
regularItems.get(i).setQuantity(regularItems.get(i).getQuantity() - 1);
if (regularItems.get(i).getQuantity() == 0) {
removeItem(catalogNumber);
}
}
}
}
}
|
[
"58441332+musajojo@users.noreply.github.com"
] |
58441332+musajojo@users.noreply.github.com
|
497ca62d91daf34ee725a8236cfa0592a1c71d71
|
b40988776a0f4765eee34071b9e45e0bedaac252
|
/seed-server/src/main/java/com/jadyer/seed/server/action/NetBankResultNotifyYEEPAYAction.java
|
d4ebf772f1370d77a62e6c18b7da4b8988f71f2d
|
[
"Apache-2.0"
] |
permissive
|
uestclife/seed
|
8368e9a186b42462ea4d4c93405a54abc87830fc
|
832120f9d0c5ecfc9692f419e8a5952620df38a4
|
refs/heads/master
| 2021-01-21T20:38:20.178152
| 2017-05-19T08:37:44
| 2017-05-19T08:37:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,166
|
java
|
package com.jadyer.seed.server.action;
import com.jadyer.seed.comm.util.LogUtil;
import com.jadyer.seed.comm.util.MoneyUtil;
import com.jadyer.seed.server.core.GenericAction;
import com.jadyer.seed.server.helper.MessageBuilder;
import com.jadyer.seed.server.model.NetBankResultNotify;
import org.apache.commons.lang3.RandomUtils;
import org.springframework.stereotype.Controller;
import java.util.HashMap;
import java.util.Map;
/**
* 易宝支付订单后台通知
* -----------------------------------------------------------------------------------------------------------
* GET /notify_yeepay?p1_MerId=10011355345&r0_Cmd=Buy&r1_Code=1&r2_TrxId=115261250976102I&r3_Amt=49.25&r4_Cur=RMB&r5_Pid=&r6_Order=20120924990001752530&r7_Uid=&r8_MP=&r9_BType=2&ru_Trxtime=20120924213012&ro_BankOrderId=2013568562120924&rb_BankId=BOCO-NET&rp_PayDate=20120924212549&rq_CardNo=&rq_SourceFee=0.0&rq_TargetFee=0.0&hmac=8f57aea4fe8b2696b3f9b487043bfbe2 HTTP/1.1
* Content-Type: application/x-www-form-urlencoded; charset=GBK
* Cache-Control: no-cache
* Pragma: no-cache
* User-Agent: Java/1.5.0_14
* Host: 123.125.97.248
* Accept: text/html, image/gif, image/jpeg, *; q=.2, 星号/*; q=.2
* Connection: keep-alive
*
* -----------------------------------------------------------------------------------------------------------
* HTTP/1.1 200 OK
* Content-Type: text/html; charset=GBK
* Content-Length: 28
*
* SUCCESS YeePay Return OK !!!
* -----------------------------------------------------------------------------------------------------------
* Created by 玄玉<http://jadyer.cn/> on 2013/9/3 20:42.
*/
@Controller
public class NetBankResultNotifyYEEPAYAction implements GenericAction {
@Override
public String execute(String message) {
String[] messageArray = message.split("&");
Map<String, String> param = new HashMap<>();
for (String aMessageArray : messageArray) {
String key = aMessageArray.substring(0, aMessageArray.indexOf("="));
String value = aMessageArray.substring(aMessageArray.indexOf("=") + 1);
param.put(key, value);
}
/*
* 验签
*/
if(!this.checkSign(param)){
return MessageBuilder.buildHTTPResponseMessage(500, null);
}
/*
* 与支付处理系统网银结果通知接口通信
*/
NetBankResultNotify nbrn = new NetBankResultNotify();
nbrn.setOrderNo(param.get("r6_Order"));
nbrn.setTradeResult("1".equals(param.get("r1_Code")) ? "1" : "0");
nbrn.setBankDate(param.get("rp_PayDate").length()>=8 ? param.get("rp_PayDate").substring(0,8) : param.get("rp_PayDate"));
nbrn.setBankSerialNo(param.get("r2_TrxId"));
nbrn.setNotifyType("2");
nbrn.setTradeAmount(MoneyUtil.moneyYuanToFen(param.get("r3_Amt")));
String messageToBusiPlatform = MessageBuilder.buildNetBankResultNotifyMessage(nbrn);
LogUtil.getLogger().info("易宝网银结果通知-->发往支付处理的报文[" + messageToBusiPlatform + "]");
//String respData = MinaUtil.sendTCPMessage(messageToBusiPlatform);
//LogUtil.getLogger().info("易宝网银结果通知-->支付处理的响应报文[" + respData + "]");
//
///**
// * 响应给易宝
// */
//if(respData.substring(6, 14).equals("99999999") && respData.split("`", -1)[23].equals("1")){
// return MessageUtil.buildHTTPResponseMessage("SUCCESS YeePay Return OK !!!");
//}else{
// return MessageUtil.buildHTTPResponseMessage(500, null);
//}
return MessageBuilder.buildHTTPResponseMessage("SUCCESS YeePay Return OK !!!");
}
/**
* 对易宝的请求参数进行验签
* @param param 易宝的请求参数
* @return 验签通过则返回true,反之则返回false
*/
private boolean checkSign(Map<String, String> param) {
//String merNo = ConfigUtil.INSTANCE.getProperty("yeepay.merNo");
//String p1_MerId = param.get("p1_MerId");
//if(!merNo.equals(p1_MerId)){
// LogUtil.getLogger().info("易宝网银结果通知-->验签未通过:易宝通知的商户号[" + p1_MerId + "]与本地存储的商户号[" + merNo + "]不一致");
// return false;
//}
//StringBuilder sb = new StringBuilder();
//sb.append(p1_MerId).append(param.get("r0_Cmd")).append(param.get("r1_Code")).append(param.get("r2_TrxId")).append(param.get("r3_Amt"))
// .append(param.get("r4_Cur")).append(param.get("r5_Pid")).append(param.get("r6_Order")).append(param.get("r7_Uid"))
// .append(param.get("r8_MP")).append(param.get("r9_BType"));
//if(param.get("hmac").equals(DigestUtil.hmacSign(sb.toString(), ConfigUtil.INSTANCE.getProperty("yeepay.privateKey")))){
//if(true){
// LogUtil.getLogger().info("易宝网银结果通知-->验签通过");
// return true;
//}else{
// LogUtil.getLogger().info("易宝网银结果通知-->验签未通过");
// return false;
//}
return RandomUtils.nextBoolean();
}
}
|
[
"jadyer@yeah.net"
] |
jadyer@yeah.net
|
0d140071f34bf38a15955bbc0b1c2afe42bbbe6c
|
c8c949b3710fbb4b983d03697ec9173a0ad3f79f
|
/src/String/Pow_x_n_.java
|
f6646bc722f0c753f1b039124f768407709e3652
|
[] |
no_license
|
mxx626/myleet
|
ae4409dec30d81eaaef26518cdf52a75fd3810bc
|
5da424b2f09342947ba6a9fffb1cca31b7101cf0
|
refs/heads/master
| 2020-03-22T15:11:07.145406
| 2018-07-09T05:12:28
| 2018-07-09T05:12:28
| 140,234,151
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,088
|
java
|
package String;
// TAG: Math, BinarySearch
public class Pow_x_n_ {
/**
* Implement pow(x, n), which calculates x raised to the power n (xn).
Example 1:
Input: 2.00000, 10
Output: 1024.00000
Example 2:
Input: 2.10000, 3
Output: 9.26100
Example 3:
Input: 2.00000, -2
Output: 0.25000
Explanation: 2-2 = 1/22 = 1/4 = 0.25
Note:
-100.0 < x < 100.0
n is a 32-bit signed integer, within the range [−231, 231 − 1]
* @param x
* @param n
* @return
*/
public double myPow(double x, int n) {
if (x==0.0) return 0.0;
if (x==1.0) return 1.0;
if (n<0) x = 1/x;
long m = Math.abs((long)n);
return calPow(x, m);
}
private double calPow (double x, long n){
if (n==0) return 1.0;
double res=0.0;
double half = calPow(x, n/2);
if (n%2==1){
res = half*half*x;
}
else if (n%2==0){
res = half*half;
}
return res;
}
}
|
[
"mxx626@outlook.com"
] |
mxx626@outlook.com
|
f19ce58043aba26847d1647024d5b24e5024b0e5
|
aa29946616a7655232e85c3a6671c8d152fccfa0
|
/core/src/test/java/org/jvnet/annox/parser/tests/K.java
|
785ecc40d0f7d9d7a5582e186048788b877bcc9a
|
[] |
permissive
|
highsource/annox
|
4141f937f772b64561bff9314285d1914f814f0d
|
6588904a08e41cd382d8380bd7482832f7580eb3
|
refs/heads/master
| 2023-08-10T00:54:37.980318
| 2017-01-22T11:16:58
| 2017-01-22T11:16:58
| 22,551,433
| 2
| 4
|
BSD-2-Clause
| 2023-07-20T13:56:40
| 2014-08-02T17:10:40
|
Java
|
UTF-8
|
Java
| false
| false
| 204
|
java
|
package org.jvnet.annox.parser.tests;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
public @interface K {
String[] value();
}
|
[
"aleksei.valikov@gmail.com"
] |
aleksei.valikov@gmail.com
|
8390e46d91382c33f3ddc6bc65b7022c0b0b285f
|
2687ce91040c5fc4709cc5810de2d444ee4cb46a
|
/SeguridadPersistencia/test/cl/bluex/seguridad/dao/seguridadDao/DaoBaseTest.java
|
81d3058c2c9731d54409b2c534ddbd5a18fc05fc
|
[] |
no_license
|
repositoriosbe/repositorioWS
|
0d5a1138b8a6e38d718d5d08c3d43e0468f629b4
|
5c57097fc59107f9c6483e28be0b5b791df26a29
|
refs/heads/master
| 2021-01-01T18:33:33.503764
| 2014-04-23T21:35:08
| 2014-04-23T21:35:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 647
|
java
|
package cl.bluex.seguridad.dao.seguridadDao;
import org.junit.Before;
import cl.bluex.seguridad.SeguridadDao;
import cl.bluex.seguridad.factory.SeguridadDaoFactory;
/**
* Test base para SeguridadDao.
*
* @author Edgardo Herrera
*
*/
public class DaoBaseTest {
private SeguridadDao dao;
/**
* Crea instancia de {@link DaoBaseTest}.
*
*/
public DaoBaseTest() {
super();
}
@Before
public void setUp() throws Exception {
dao = SeguridadDaoFactory.getInstance().getDaoFactory()
.getSeguridadDao();
// dao = new SeguridadDaoImpl();
}
/**
* @return the dao
*/
public SeguridadDao getDao() {
return dao;
}
}
|
[
"repositoriosbe@outlook.com"
] |
repositoriosbe@outlook.com
|
381ce95e65744197bb71a5e3e9b7ffa4df8aaab2
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/kylin/learning/4836/BasicService.java
|
52d92c3f397f512f96ab9a6040b53139f995d9b8
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,450
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kylin.rest.service;
import java.io.IOException;
import org.apache.kylin.common.KylinConfig;
import org.apache.kylin.cube.CubeDescManager;
import org.apache.kylin.cube.CubeManager;
import org.apache.kylin.job.execution.ExecutableManager;
import org.apache.kylin.metadata.TableMetadataManager;
import org.apache.kylin.metadata.acl.TableACLManager;
import org.apache.kylin.metadata.badquery.BadQueryHistoryManager;
import org.apache.kylin.metadata.draft.DraftManager;
import org.apache.kylin.metadata.model.DataModelManager;
import org.apache.kylin.metadata.project.ProjectManager;
import org.apache.kylin.metadata.streaming.StreamingManager;
import org.apache.kylin.metrics.MetricsManager;
import org.apache.kylin.source.kafka.KafkaConfigManager;import org.apache.kylin.storage.hybrid.HybridManager;
public abstract class BasicService {
public KylinConfig getConfig() {
KylinConfig kylinConfig = KylinConfig.getInstanceFromEnv();
if (kylinConfig == null) {
throw new IllegalArgumentException("Failed to load kylin config instance");
}
return kylinConfig;
}
public TableMetadataManager getTableManager() {
return TableMetadataManager.getInstance(getConfig());
}
public DataModelManager getDataModelManager() {
return DataModelManager.getInstance(getConfig());
}
public CubeManager getCubeManager() {
return CubeManager.getInstance(getConfig());
}
public StreamingManager getStreamingManager() {
return StreamingManager.getInstance(getConfig());
}
public KafkaConfigManager getKafkaManager() throws IOException {
return KafkaConfigManager.getInstance(getConfig());
}
public CubeDescManager getCubeDescManager() {
return CubeDescManager.getInstance(getConfig());
}
public ProjectManager getProjectManager() {
return ProjectManager.getInstance(getConfig());
}
public HybridManager getHybridManager() {
return HybridManager.getInstance(getConfig());
}
public ExecutableManager getExecutableManager() {
return ExecutableManager.getInstance(getConfig());
}
public BadQueryHistoryManager getBadQueryHistoryManager() {
return BadQueryHistoryManager.getInstance(getConfig());
}
public DraftManager getDraftManager() {
return DraftManager.getInstance(getConfig());
}
public TableACLManager getTableACLManager() {
return TableACLManager.getInstance(getConfig());
}
public MetricsManager getMetricsManager() {
return MetricsManager.getInstance();
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
7736170974b85f2832c7ce8ce00572f446b01f29
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project63/src/test/java/org/gradle/test/performance63_4/Test63_314.java
|
d5252b2ecfc762710072f289bd059a0aa3bf7100
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 292
|
java
|
package org.gradle.test.performance63_4;
import static org.junit.Assert.*;
public class Test63_314 {
private final Production63_314 production = new Production63_314("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
44a942cba5a9e9d4164eb182cf2ac43e3ae3a5da
|
3c4579582026bbc022bc69001a2e1e68b43bf110
|
/biometric-api/src/main/java/com/lulobank/biometric/api/exception/MFAUnauthorizedException.java
|
a6908427e5086315608c1ba6c43283b2c8c93701
|
[] |
no_license
|
juandevtoledo/biometric-mfa
|
3f119b08a68367a89fd0bf9f39ccb194b8e83bb7
|
ff45fdc77f12d3a61c4181c27736a7b26f5adfc3
|
refs/heads/master
| 2023-06-01T18:32:16.667647
| 2021-06-25T21:16:42
| 2021-06-25T21:16:42
| 380,355,293
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 316
|
java
|
package com.lulobank.biometric.api.exception;
import lombok.Getter;
@Getter
public class MFAUnauthorizedException extends RuntimeException {
private String detail;
public MFAUnauthorizedException(String detail) {
super("Unauthorized to access the resource");
this.detail = detail;
}
}
|
[
"juan.toledo@globant.com"
] |
juan.toledo@globant.com
|
f895d496246ae44c834fbc35ef861034e94e6412
|
3c2e586cccf483cf9f11d32eef75ddc669c28bff
|
/src/lk/ijse/sms/business/custom/impl/RegistrationBOImpl.java
|
83d483ba2d2e943a060116403d4fd82f4dcb6b5b
|
[] |
no_license
|
sahan1995/FX-Studen-Managemt-System-using-JPA
|
883b5e6809159d06270737a6a82bb14a3d5eac56
|
a2a24e0159c44d08adf8df9195a33e13ac613e92
|
refs/heads/master
| 2020-03-28T22:40:23.091494
| 2018-09-18T07:52:29
| 2018-09-18T07:52:29
| 149,249,343
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,787
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package lk.ijse.sms.business.custom.impl;
import lk.ijse.sms.business.custom.RegistrationBO;
import lk.ijse.sms.dao.DAOFactory;
import lk.ijse.sms.dao.custom.StudentBatchDAO;
import lk.ijse.sms.dao.custom.StudentDAO;
import lk.ijse.sms.dto.StudentBatchDTO;
import lk.ijse.sms.dto.StudentDTO;
import lk.ijse.sms.entity.StudentBatch;
/**
* @author Sahan Rajakaruna
*/
public class RegistrationBOImpl implements RegistrationBO {
private StudentDAO studentDAO;
private StudentBatchDAO student_batchDAO;
private StundetBOImpl studentBo;
private StudentBatchBOImpl studentBatchBO;
public RegistrationBOImpl() {
this.student_batchDAO = (StudentBatchDAO) DAOFactory.getInstance().getDAO(DAOFactory.DAOTypes.student_batch);
this.studentDAO = (StudentDAO) DAOFactory.getInstance().getDAO(DAOFactory.DAOTypes.student);
studentBo = new StundetBOImpl();
studentBatchBO = new StudentBatchBOImpl();
}
@Override
public boolean RegisterNewStudent(StudentDTO student, StudentBatchDTO studentBatch) throws Exception {
boolean first = studentBo.RegisterStudent(student);
boolean second = studentBatchBO.AddStudentBatch(studentBatch);
if(first&&second){
return true;
}else {
return false;
}
}
@Override
public boolean RegisterToBatch(StudentBatchDTO studentBatch) throws Exception {
return studentBatchBO.AddStudentBatch(new StudentBatchDTO(studentBatch.getId(), studentBatch.getBatch_bo()));
}
}
|
[
"sahanrajakaruna001@gmail.com"
] |
sahanrajakaruna001@gmail.com
|
6c189e93e293e46f7bf5d82c66132fc476d54457
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/JetBrains--intellij-community/6db5e53154f39a6e28ce860210e2f10c577994e2/before/HgChangesetsCommand.java
|
26f968d6a5a890e866dd2b152f03449c6efd94f0
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,177
|
java
|
// Copyright 2008-2010 Victor Iacoban
//
// 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.zmlx.hg4idea.command;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VirtualFile;
import org.jetbrains.annotations.Nullable;
import org.zmlx.hg4idea.HgRevisionNumber;
import org.zmlx.hg4idea.execution.HgCommandExecutor;
import org.zmlx.hg4idea.execution.HgCommandResult;
import org.zmlx.hg4idea.util.HgChangesetUtil;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/**
* Abstract base class for all commands that need to parse changeset information.
*/
public abstract class HgChangesetsCommand {
private static final Logger LOG = Logger.getInstance(HgChangesetsCommand.class.getName());
protected final Project project;
protected final String command;
public HgChangesetsCommand(Project project, String command) {
this.project = project;
this.command = command;
}
public List<HgRevisionNumber> execute(VirtualFile repo) {
return getRevisions(repo);
}
protected List<HgRevisionNumber> getRevisions(VirtualFile repo) {
List<String> args = new ArrayList<String>(Arrays.asList(
"--template",
HgChangesetUtil.makeTemplate("{rev}", "{node}", "{author}", "{desc|firstline}"),
"--quiet"
));
addArguments(args);
HgCommandResult result = executeCommand(repo, args);
if (result == null) {
return Collections.emptyList();
}
String output = result.getRawOutput();
if (StringUtil.isEmpty(output)) {
return Collections.emptyList();
}
String[] changesets = output.split(HgChangesetUtil.CHANGESET_SEPARATOR);
List<HgRevisionNumber> revisions = new ArrayList<HgRevisionNumber>(changesets.length);
for(String changeset: changesets) {
List<String> parts = StringUtil.split(changeset, HgChangesetUtil.ITEM_SEPARATOR);
if (parts.size() == 4) {
revisions.add(HgRevisionNumber.getInstance(parts.get(0), parts.get(1), parts.get(2), parts.get(3)));
} else {
LOG.warn("Could not parse changeset [" + changeset + "]");
}
}
return revisions;
}
@Nullable
protected HgCommandResult executeCommand(VirtualFile repo, List<String> args) {
final HgCommandExecutor executor = new HgCommandExecutor(project);
executor.setSilent(isSilentCommand());
return executor.executeInCurrentThread(repo, command, args);
}
protected boolean isSilentCommand() {
return false;
}
protected abstract void addArguments(List<String> args);
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
2c0d20f5ede8d1e738355ada3ebb0d1a54939d7c
|
be56ac4ae92c61a664023466fd1d5c3087095878
|
/mws/src/main/java/com/amazonservices/mws/orders/model/Message.java
|
a17ebb14bbb4f76d60937b4c7f3dcb6ec6bf97ac
|
[] |
no_license
|
liccoCode/elcuk3
|
fa73f06c4e2881fdb164facc22c40cf1670ac069
|
72829c8da81e74b214d143b9fb9349aaf487aaf6
|
refs/heads/master
| 2020-03-21T19:33:31.327160
| 2018-06-13T01:33:59
| 2018-06-13T01:33:59
| 138,956,339
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,607
|
java
|
package com.amazonservices.mws.orders.model;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for Message complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="Message">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Locale" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Text" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
* Generated by AWS Code Generator
* <p/>
* Sun Feb 06 00:05:50 UTC 2011
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Message", propOrder = {
"locale",
"text"
})
public class Message {
@XmlElement(name = "Locale")
protected String locale;
@XmlElement(name = "Text")
protected String text;
/**
* Default constructor
*
*/
public Message() {
super();
}
/**
* Value constructor
*
*/
public Message(final String locale, final String text) {
this.locale = locale;
this.text = text;
}
/**
* Gets the value of the locale property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLocale() {
return locale;
}
/**
* Sets the value of the locale property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLocale(String value) {
this.locale = value;
}
public boolean isSetLocale() {
return (this.locale!= null);
}
/**
* Gets the value of the text property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getText() {
return text;
}
/**
* Sets the value of the text property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setText(String value) {
this.text = value;
}
public boolean isSetText() {
return (this.text!= null);
}
/**
* Sets the value of the Locale property.
*
* @param value
* @return
* this instance
*/
public Message withLocale(String value) {
setLocale(value);
return this;
}
/**
* Sets the value of the Text property.
*
* @param value
* @return
* this instance
*/
public Message withText(String value) {
setText(value);
return this;
}
/**
*
* XML fragment representation of this object
*
* @return XML fragment for this object. Name for outer
* tag expected to be set by calling method. This fragment
* returns inner properties representation only
*/
protected String toXMLFragment() {
StringBuffer xml = new StringBuffer();
if (isSetLocale()) {
xml.append("<Locale>");
xml.append(escapeXML(getLocale()));
xml.append("</Locale>");
}
if (isSetText()) {
xml.append("<Text>");
xml.append(escapeXML(getText()));
xml.append("</Text>");
}
return xml.toString();
}
/**
*
* Escape XML special characters
*/
private String escapeXML(String string) {
StringBuffer sb = new StringBuffer();
int length = string.length();
for (int i = 0; i < length; ++i) {
char c = string.charAt(i);
switch (c) {
case '&':
sb.append("&");
break;
case '<':
sb.append("<");
break;
case '>':
sb.append(">");
break;
case '\'':
sb.append("'");
break;
case '"':
sb.append(""");
break;
default:
sb.append(c);
}
}
return sb.toString();
}
/**
*
* JSON fragment representation of this object
*
* @return JSON fragment for this object. Name for outer
* object expected to be set by calling method. This fragment
* returns inner properties representation only
*
*/
protected String toJSONFragment() {
StringBuffer json = new StringBuffer();
boolean first = true;
if (isSetLocale()) {
if (!first) json.append(", ");
json.append(quoteJSON("Locale"));
json.append(" : ");
json.append(quoteJSON(getLocale()));
first = false;
}
if (isSetText()) {
if (!first) json.append(", ");
json.append(quoteJSON("Text"));
json.append(" : ");
json.append(quoteJSON(getText()));
first = false;
}
return json.toString();
}
/**
*
* Quote JSON string
*/
private String quoteJSON(String string) {
StringBuffer sb = new StringBuffer();
sb.append("\"");
int length = string.length();
for (int i = 0; i < length; ++i) {
char c = string.charAt(i);
switch (c) {
case '"':
sb.append("\\\"");
break;
case '\\':
sb.append("\\\\");
break;
case '/':
sb.append("\\/");
break;
case '\b':
sb.append("\\b");
break;
case '\f':
sb.append("\\f");
break;
case '\n':
sb.append("\\n");
break;
case '\r':
sb.append("\\r");
break;
case '\t':
sb.append("\\t");
break;
default:
if (c < ' ') {
sb.append("\\u" + String.format("%03x", Integer.valueOf(c)));
} else {
sb.append(c);
}
}
}
sb.append("\"");
return sb.toString();
}
}
|
[
"wppurking@gmail.com"
] |
wppurking@gmail.com
|
8373816b1de09edd202bf22b05c4388ab3082bc7
|
52aa753885647b44c60abf691bfb0116be6fca4e
|
/src/edu/cmu/cs/stage3/alice/scenegraph/renderer/directx7renderer/LinearFogProxy.java
|
6f3939513b4653b08267d019eefce4fe865c6df7
|
[
"MIT"
] |
permissive
|
ai-ku/langvis
|
10083029599dac0a0098cdc4cbf77f3e1bdf6d43
|
4ccd37107a3dea4b7b12696270a25df9c17d579d
|
refs/heads/master
| 2020-12-24T15:14:43.644569
| 2014-03-26T13:43:25
| 2014-03-26T14:09:03
| 15,770,922
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 920
|
java
|
package edu.cmu.cs.stage3.alice.scenegraph.renderer.directx7renderer;
class LinearFogProxy extends edu.cmu.cs.stage3.alice.scenegraph.renderer.nativerenderer.LinearFogProxy {
//from ElementProxy
protected native void createNativeInstance();
protected native void releaseNativeInstance();
//from ComponentProxy
protected native void onAbsoluteTransformationChange( javax.vecmath.Matrix4d m );
protected native void addToScene( edu.cmu.cs.stage3.alice.scenegraph.renderer.nativerenderer.SceneProxy scene );
protected native void removeFromScene( edu.cmu.cs.stage3.alice.scenegraph.renderer.nativerenderer.SceneProxy scene );
//from FogProxy
protected native void onColorChange( double r, double g, double b, double a );
//from LinearFogProxy
protected native void onNearDistanceChange( double value );
protected native void onFarDistanceChange( double value );
}
|
[
"emreunal99@gmail.com"
] |
emreunal99@gmail.com
|
9d9dcf14c1d03c97701c9e7c4ff8d4f244db0cf7
|
56a5f8b10df25231b6cd61db29ae67b64d15e006
|
/bookkeeper/src/main/java/com/wqb/dao/arch/ArchDao.java
|
adfad0096a18a57263ff424de1d93a557f6aa5b2
|
[] |
no_license
|
sengeiou/wqb_yzj
|
6c95324b1f5fe4a1e690bfcc0087c363f67ef1ed
|
0fb66c7d95c60a216966a6aa52da19a95e8d041d
|
refs/heads/master
| 2020-05-16T17:29:01.797564
| 2019-04-23T17:59:52
| 2019-04-23T17:59:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,562
|
java
|
package com.wqb.dao.arch;
import com.wqb.common.BusinessException;
import com.wqb.model.Arch;
import java.util.List;
import java.util.Map;
public interface ArchDao {
// 工资添加
void insertArch(Arch arch) throws BusinessException;
// 批量添加
int insertBath(List<Arch> list) throws BusinessException;
// 查询是否存在重复数据
List<Arch> queryByCodeAndAcperiod(Map<String, Object> map) throws BusinessException;
// 综合查询 分页(区间,姓名)
List<Arch> queryListPage(Map<String, Object> map) throws BusinessException;
// 删除
void delById(Map<String, String> map) throws BusinessException;
// 批量删除
void delBathById(Map<String, Object> map) throws BusinessException;
// 查询需要计提的工资列表
List<Arch> query2vouch(Map<String, Object> map) throws BusinessException;
// 获取薪资数据所包含的部门信息
List<Map<String, Object>> queryDepart(Map<String, Object> param) throws BusinessException;
// 查询期间工资总数量
int queryCount(Map<String, Object> param) throws BusinessException;
// 查询做账期间所有工资月份
String queryArchDate(Map<String, Object> param) throws BusinessException;
List<String> querycode(Map<String, Object> param) throws BusinessException;
// 查询发放薪资数据
Object queryFfArchData(Map<String, Object> param) throws BusinessException;
// 查询薪资数据
List<Arch> queryArchData(Map<String, Object> param) throws BusinessException;
}
|
[
"441653192@qq.com"
] |
441653192@qq.com
|
cfc0d00b76943080778308f2393e7b4d0afff46d
|
99c03face59ec13af5da080568d793e8aad8af81
|
/muJava/result/ChessBoard/traditional_mutants/java.lang.String_toString()/AOIS_100/ChessBoard.java
|
d96b8639b0e296437992c29d1d09e4d52b019950
|
[] |
no_license
|
fouticus/HOMClassifier
|
62e5628e4179e83e5df6ef350a907dbf69f85d4b
|
13b9b432e98acd32ae962cbc45d2f28be9711a68
|
refs/heads/master
| 2021-01-23T11:33:48.114621
| 2020-05-13T18:46:44
| 2020-05-13T18:46:44
| 93,126,040
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,740
|
java
|
// This is a mutant program.
// Author : ysma
public class ChessBoard
{
private ChessPiece[][] board;
public ChessBoard()
{
board = new ChessPiece[8][8];
}
public void initialize()
{
Pawn[] wpawns = new Pawn[8];
for (int i = 0; i < 8; i++) {
wpawns[i] = new Pawn( this, ChessPiece.Color.WHITE );
board[1][i] = wpawns[i];
wpawns[i].setRow( 1 );
wpawns[i].setColumn( i );
}
Pawn[] bpawns = new Pawn[8];
for (int i = 0; i < 8; i++) {
bpawns[i] = new Pawn( this, ChessPiece.Color.BLACK );
board[6][i] = bpawns[i];
bpawns[i].setRow( 6 );
bpawns[i].setColumn( i );
}
Rook[] wrooks = new Rook[2];
for (int i = 0; i < 2; i++) {
wrooks[i] = new Rook( this, ChessPiece.Color.WHITE );
}
board[0][0] = wrooks[0];
board[0][7] = wrooks[1];
wrooks[0].setPosition( "a1" );
wrooks[1].setPosition( "h1" );
Rook[] brooks = new Rook[2];
for (int i = 0; i < 2; i++) {
brooks[i] = new Rook( this, ChessPiece.Color.BLACK );
}
board[7][0] = brooks[0];
board[7][7] = brooks[1];
brooks[0].setPosition( "a8" );
brooks[1].setPosition( "h8" );
Knight[] wknights = new Knight[2];
for (int i = 0; i < 2; i++) {
wknights[i] = new Knight( this, ChessPiece.Color.WHITE );
}
board[0][1] = wknights[0];
board[0][6] = wknights[1];
wknights[0].setPosition( "b1" );
wknights[1].setPosition( "g1" );
Knight[] bknights = new Knight[2];
for (int i = 0; i < 2; i++) {
bknights[i] = new Knight( this, ChessPiece.Color.BLACK );
}
board[7][1] = bknights[0];
board[7][6] = bknights[1];
bknights[0].setPosition( "b8" );
bknights[1].setPosition( "g8" );
Bishop[] wbishops = new Bishop[2];
for (int i = 0; i < 2; i++) {
wbishops[i] = new Bishop( this, ChessPiece.Color.WHITE );
}
board[0][2] = wbishops[0];
board[0][5] = wbishops[1];
wbishops[0].setPosition( "c1" );
wbishops[1].setPosition( "f1" );
Bishop[] bbishops = new Bishop[2];
for (int i = 0; i < 2; i++) {
bbishops[i] = new Bishop( this, ChessPiece.Color.BLACK );
}
board[7][2] = bbishops[0];
board[7][5] = bbishops[1];
bbishops[0].setPosition( "c8" );
bbishops[1].setPosition( "f8" );
Queen wqueen = new Queen( this, ChessPiece.Color.WHITE );
Queen bqueen = new Queen( this, ChessPiece.Color.BLACK );
board[0][3] = wqueen;
board[7][3] = bqueen;
wqueen.setPosition( "d1" );
bqueen.setPosition( "d8" );
King wking = new King( this, ChessPiece.Color.WHITE );
;
King bking = new King( this, ChessPiece.Color.BLACK );
board[0][4] = wking;
board[7][4] = bking;
wking.setPosition( "e1" );
bking.setPosition( "e8" );
}
public ChessPiece getPiece( java.lang.String position )
{
char letter = position.charAt( 0 );
char digit = position.charAt( 1 );
int row;
int column;
switch (letter) {
case 'a' :
column = 0;
break;
case 'b' :
column = 1;
break;
case 'c' :
column = 2;
break;
case 'd' :
column = 3;
break;
case 'e' :
column = 4;
break;
case 'f' :
column = 5;
break;
case 'g' :
column = 6;
break;
case 'h' :
column = 7;
break;
default :
column = 0;
}
row = digit - '0' - 1;
return board[row][column];
}
public boolean placePiece( ChessPiece piece, java.lang.String position )
{
if (getPiece( position ) != null) {
return false;
}
char letter = position.charAt( 0 );
char digit = position.charAt( 1 );
int row;
int column;
switch (letter) {
case 'a' :
column = 0;
break;
case 'b' :
column = 1;
break;
case 'c' :
column = 2;
break;
case 'd' :
column = 3;
break;
case 'e' :
column = 4;
break;
case 'f' :
column = 5;
break;
case 'g' :
column = 6;
break;
case 'h' :
column = 7;
break;
default :
column = 0;
}
row = digit - '0' - 1;
piece.setPosition( position );
board[row][column] = piece;
return true;
}
public boolean move( java.lang.String fromPosition, java.lang.String toPosition )
{
ChessPiece cp = getPiece( fromPosition );
if (cp == null) {
return false;
} else {
if (cp.legalMoves() != null && cp.legalMoves().contains( toPosition )) {
board[cp.getRow()][cp.getColumn()] = null;
return placePiece( cp, toPosition );
}
}
return false;
}
public java.lang.String toString()
{
java.lang.String chess = "";
java.lang.String upperLeft = "┌";
java.lang.String upperRight = "┐";
java.lang.String horizontalLine = "─";
java.lang.String horizontal3 = horizontalLine + " " + horizontalLine;
java.lang.String verticalLine = "│";
java.lang.String upperT = "┬";
java.lang.String bottomLeft = "└";
java.lang.String bottomRight = "┘";
java.lang.String bottomT = "┴";
java.lang.String plus = "┼";
java.lang.String leftT = "├";
java.lang.String rightT = "┤";
java.lang.String topLine = upperLeft;
for (int i = 0; i < 7; i++) {
topLine += horizontal3 + upperT;
}
topLine += horizontal3 + upperRight;
java.lang.String bottomLine = bottomLeft;
for (int i = 0; i < 7; i++) {
bottomLine += horizontal3 + bottomT;
}
bottomLine += horizontal3 + bottomRight;
chess += topLine + "\n";
for (int row = 7; row >= 0; row--) {
java.lang.String midLine = "";
for (int col = 0; col < 8; col++) {
if (board[row][col] == null) {
if ((row + col--) % 2 == 0) {
midLine += " " + " B ";
} else {
midLine += " " + " W ";
}
} else {
midLine += verticalLine + " " + board[row][col] + " ";
}
}
midLine += verticalLine;
java.lang.String midLine2 = leftT;
for (int i = 0; i < 7; i++) {
midLine2 += horizontal3 + plus;
}
midLine2 += horizontal3 + rightT;
chess += midLine + "\n";
if (row >= 1) {
chess += midLine2 + "\n";
}
}
chess += bottomLine;
return chess;
}
public static void main( java.lang.String[] args )
{
ChessBoard board = new ChessBoard();
System.out.println( board.toString() );
board.initialize();
System.out.println( board );
board.move( "c2", "c4" );
System.out.println( board.toString() );
}
}
|
[
"fout.alex@gmail.com"
] |
fout.alex@gmail.com
|
a1f5ff3cc9e33cfd3904f6935ed30816cb478def
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/20/371.java
|
676c170fc9b839da2e39cf1b9f72692d68fa49db
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,029
|
java
|
package <missing>;
public class GlobalMembers
{
public static void Main()
{
final String str = "";
final String substr = "";
final String temp = "";
int n;
int i;
int j;
int t;
int k;
while (scanf("%s",str) != EOF)
{
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
substr = tempVar.charAt(0);
}
n = str.length();
temp = str;
for (j = 1;j <= n - 1;j++)
{
for (i = 0;i < n - j;i++)
{
if (temp.charAt(i) > temp.charAt(i + 1))
{
t = temp.charAt(i);
temp = tangible.StringFunctions.changeCharacter(temp, i, temp.charAt(i + 1));
temp = tangible.StringFunctions.changeCharacter(temp, i + 1, t);
}
}
}
for (i = 0;i < n;i++)
{
if (str.charAt(i) == temp.charAt(n - 1))
{
k = i;
break;
}
}
for (i = 0;i <= k;i++)
{
System.out.printf("%c",str.charAt(i));
}
System.out.printf("%s",substr);
for (i = k + 1;i < n;i++)
{
System.out.printf("%c",str.charAt(i));
}
System.out.print("\n");
}
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
ee4e398e6de3168b0935186dd91a79c92a11122c
|
2c51199857f4db795585e6feb70ee84fba62fdff
|
/src/test/java/com/ip/lambdaexpression/SampleFilterTest.java
|
4ff2db0c3467a8a26b753880a4fb1282f3e8dc88
|
[] |
no_license
|
7978606023/PluralsightLambdaStream
|
9315764c06dfef00d73bf1c85949443ed9b486b1
|
26f861d90d428ed301384b7d67f56d9e6f68a8e6
|
refs/heads/master
| 2022-12-27T09:48:31.403759
| 2020-04-21T15:22:56
| 2020-04-21T15:22:56
| 257,637,087
| 0
| 0
| null | 2020-10-13T21:23:12
| 2020-04-21T15:22:03
|
Java
|
UTF-8
|
Java
| false
| false
| 844
|
java
|
package com.ip.lambdaexpression;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
public class SampleFilterTest {
/**
*call to implemnet class.
*/
private SampleFilter samplefilter = null;
/**
*object creation of implement class.
**/
@BeforeTest
public void setUP() {
//samplefilter = new SampleFilter();
}
/**
* first test case with check even numbers.
*/
@Test
public void checkEven() {
List<Integer> l = new ArrayList();
l.add(1);
l.add(2);
l.add(1);
l.add(2);
l.add(2);
List<Integer> actual = samplefilter.findOutEvenNum(l);
List<Integer> expected = Arrays.asList(2,2,2);
Assert.assertEquals(actual, expected);
}
}
|
[
"anubhavwhitebox@gmail.com"
] |
anubhavwhitebox@gmail.com
|
a723eb6d50e21d28ba030774960310999a56c2df
|
9757b9287eaac2478fd93c4a5ff1272250c54ab2
|
/org.schema/src/main/java/org/schema/VideoObject.java
|
272b3848b61ef063945a2a3829a80b550ae1498c
|
[] |
no_license
|
schwichti/astro
|
2d24e0310967cde7b5b2d19f2abf4405288f07a9
|
ac550bf483579d78dc2cedba1d5b8fbf8f1cf22e
|
refs/heads/master
| 2021-05-05T15:15:39.769858
| 2018-11-26T20:28:21
| 2018-11-26T20:28:21
| 117,298,133
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,688
|
java
|
package org.schema;
/**
* A video file.
*/
public class VideoObject extends MediaObject{
/**
* If this MediaObject is an AudioObject or VideoObject, the transcript of that object.
*
* Ranges: Text
*/
private String _transcript;
public String getTranscript() throws ClassCastException{
return (String) _transcript;
}
public void setTranscript(String value) throws ClassCastException{
_transcript = value;
}
/**
* An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip.
*
* Ranges: Person
*/
private Person _actors;
public Person getActors() throws ClassCastException{
return (Person) _actors;
}
public void setActors(Person value) throws ClassCastException{
_actors = value;
}
/**
* A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip.
*
* Ranges: Person
*/
private Person _directors;
public Person getDirectors() throws ClassCastException{
return (Person) _directors;
}
public void setDirectors(Person value) throws ClassCastException{
_directors = value;
}
/**
* An actor, e.g. in tv, radio, movie, video games etc., or in an event. Actors can be associated with individual items or with a series, episode, clip.
*
* Ranges: Person
*/
private Person _actor;
public Person getActor() throws ClassCastException{
return (Person) _actor;
}
public void setActor(Person value) throws ClassCastException{
_actor = value;
}
/**
* Thumbnail image for an image or video.
*
* Ranges: ImageObject
*/
private ImageObject _thumbnail;
public ImageObject getThumbnail() throws ClassCastException{
return (ImageObject) _thumbnail;
}
public void setThumbnail(ImageObject value) throws ClassCastException{
_thumbnail = value;
}
/**
* A director of e.g. tv, radio, movie, video gaming etc. content, or of an event. Directors can be associated with individual items or with a series, episode, clip.
*
* Ranges: Person
*/
private Person _director;
public Person getDirector() throws ClassCastException{
return (Person) _director;
}
public void setDirector(Person value) throws ClassCastException{
_director = value;
}
/**
* The composer of the soundtrack.
*
* Ranges: MusicGroup, Person
*/
private Object _musicBy;
public <T> T getMusicBy(Class<T> c) throws ClassCastException{
return (T) _musicBy;
}
public void setMusicBy(MusicGroup value) throws ClassCastException{
_musicBy = value;
}
public void setMusicBy(Person value) throws ClassCastException{
_musicBy = value;
}
/**
* The frame size of the video.
*
* Ranges: Text
*/
private String _videoFrameSize;
public String getVideoFrameSize() throws ClassCastException{
return (String) _videoFrameSize;
}
public void setVideoFrameSize(String value) throws ClassCastException{
_videoFrameSize = value;
}
/**
* The caption for this object.
*
* Ranges: Text
*/
private String _caption;
public String getCaption() throws ClassCastException{
return (String) _caption;
}
public void setCaption(String value) throws ClassCastException{
_caption = value;
}
/**
* The quality of the video.
*
* Ranges: Text
*/
private String _videoQuality;
public String getVideoQuality() throws ClassCastException{
return (String) _videoQuality;
}
public void setVideoQuality(String value) throws ClassCastException{
_videoQuality = value;
}
}
|
[
"schwicht@mail.upb.de"
] |
schwicht@mail.upb.de
|
6c3d8e0b01869f6ca710ea1d0b6409fc30073858
|
4b75bc0d8c00b9f22653d7895f866efd086147a2
|
/git/smart-new/smart-mvc/src/main/java/com/smart/mvc/interceptor/StopWatchHandlerInterceptor.java
|
2618aa8fd38a6837e6b67844af0797ebfab19235
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
King-Maverick007/websites
|
90e40eeb13ba4086ee1d78e755d8a1e9fc3f7c85
|
fd5ddf7f79ce12658e95e26cd58e3488c90749e2
|
refs/heads/master
| 2022-12-19T01:25:54.795195
| 2019-02-19T06:04:40
| 2019-02-19T06:04:40
| 300,188,105
| 0
| 0
|
Apache-2.0
| 2020-10-01T07:33:49
| 2020-10-01T07:30:32
| null |
UTF-8
|
Java
| false
| false
| 1,554
|
java
|
package com.smart.mvc.interceptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.NamedThreadLocal;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
/**
* 性能监控拦截
*
* @author Joe
*/
public class StopWatchHandlerInterceptor extends HandlerInterceptorAdapter {
private static final Logger LOGGER = LoggerFactory.getLogger(StopWatchHandlerInterceptor.class);
private NamedThreadLocal<Long> startTimeThreadLocal = new NamedThreadLocal<Long>("StopWatch-StartTime");
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
long beginTime = System.currentTimeMillis();// 1、开始时间
startTimeThreadLocal.set(beginTime);// 线程绑定变量(该数据只有当前请求的线程可见)
return true;// 继续流程
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
throws Exception {
long endTime = System.currentTimeMillis();// 2、结束时间
long beginTime = startTimeThreadLocal.get();// 得到线程绑定的局部变量(开始时间)
long consumeTime = endTime - beginTime;// 3、消耗的时间
if (consumeTime > 500) {// 此处认为处理时间超过500毫秒的请求为慢请求
LOGGER.info(String.format("%s consume %d millis", request.getRequestURI(), consumeTime));
}
}
}
|
[
"evangel_a@sina.com"
] |
evangel_a@sina.com
|
3fe1f918fbff82f2fca91bb7c799a7a59a170181
|
afb2df10a705ec29aeb0f0b87595c70880bf65a5
|
/app/src/main/java/com/luomor/yiaroundad/entity/video/HDVideoInfo.java
|
b82651a556b7be1159cb5a49d520b5ec3614fb0a
|
[] |
no_license
|
zhangchunsheng/yi-around-ad
|
646055ebbf8bdb20499a26915802b5650160a284
|
1a407a4ace4ac7464b7b61883f1e49d195ec57fd
|
refs/heads/master
| 2022-09-03T07:02:59.091189
| 2022-08-16T07:59:47
| 2022-08-16T07:59:47
| 138,878,015
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,679
|
java
|
package com.luomor.yiaroundad.entity.video;
import java.util.List;
/**
* Created by Peter on 18/6/30 19:50
* 1097692918@qq.com
* <p/>
* 网站高清视频
*/
public class HDVideoInfo {
private int code;
private HDVideoBean result;
private String msg;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public HDVideoBean getResult() {
return result;
}
public void setResult(HDVideoBean result) {
this.result = result;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public static class HDVideoBean {
private String from;
private String data;
private String format;
private int timelength;
private String accept_format;
private String seek_param;
private String seek_type;
private List<Integer> accept_quality;
private List<DurlEntity> durl;
public String getFrom() {
return from;
}
public void setFrom(String from) {
this.from = from;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
public String getFormat() {
return format;
}
public void setFormat(String format) {
this.format = format;
}
public int getTimelength() {
return timelength;
}
public void setTimelength(int timelength) {
this.timelength = timelength;
}
public String getAccept_format() {
return accept_format;
}
public void setAccept_format(String accept_format) {
this.accept_format = accept_format;
}
public String getSeek_param() {
return seek_param;
}
public void setSeek_param(String seek_param) {
this.seek_param = seek_param;
}
public String getSeek_type() {
return seek_type;
}
public void setSeek_type(String seek_type) {
this.seek_type = seek_type;
}
public List<Integer> getAccept_quality() {
return accept_quality;
}
public void setAccept_quality(List<Integer> accept_quality) {
this.accept_quality = accept_quality;
}
public List<DurlEntity> getDurl() {
return durl;
}
public void setDurl(List<DurlEntity> durl) {
this.durl = durl;
}
}
public static class DurlEntity {
private int order;
private int length;
private int size;
private String url;
private List<String> backup_url;
public int getOrder() {
return order;
}
public void setOrder(int order) {
this.order = order;
}
public int getLength() {
return length;
}
public void setLength(int length) {
this.length = length;
}
public int getSize() {
return size;
}
public void setSize(int size) {
this.size = size;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public List<String> getBackup_url() {
return backup_url;
}
public void setBackup_url(List<String> backup_url) {
this.backup_url = backup_url;
}
}
}
|
[
"zhangchunsheng423@gmail.com"
] |
zhangchunsheng423@gmail.com
|
67c7b55bd8903e1444124db8ed023b45f06d0c82
|
7eecef9e67ac192503b049fced4ca2c59b5767f6
|
/src/main/java/com/ringcentral/definitions/BulkProvisionUnassignedExtensionsResponseResource.java
|
4034b0ff0998acb43186b73e9a9e0f2a8f1b6b5a
|
[] |
no_license
|
PacoVu/ringcentral-java
|
985edecd37a92751a5f3206b7a045d9a99a63980
|
df6833104538fc75757a41a3542c3263cf421d28
|
refs/heads/master
| 2020-05-29T12:56:18.438431
| 2019-05-30T14:42:02
| 2019-05-30T14:42:02
| 140,632,299
| 0
| 0
| null | 2018-07-11T22:08:32
| 2018-07-11T22:08:31
| null |
UTF-8
|
Java
| false
| false
| 366
|
java
|
package com.ringcentral.definitions;
import com.alibaba.fastjson.annotation.JSONField;
public class BulkProvisionUnassignedExtensionsResponseResource
{
//
public ExtensionAssignmentResult[] items;
public BulkProvisionUnassignedExtensionsResponseResource items(ExtensionAssignmentResult[] items) {
this.items = items;
return this;
}
}
|
[
"tyler4long@gmail.com"
] |
tyler4long@gmail.com
|
3610db57ae2f6820e587d3a2a27dec2e56208004
|
ecdd850cda1661bfddf0e9d23d9a488154d7877a
|
/Simple Loops/12. Equal Pairs.java
|
545c09f0e2d4f1992d8484afcd0346f8a9eb1eb6
|
[] |
no_license
|
IvanBorislavovDimitrov/Programming-Basics---Java
|
5ee18ebbb38a83a597d82d5a592fc23b2a3c04a5
|
846d37afd5d3b02f9841da43a117f60deed594cf
|
refs/heads/master
| 2021-05-02T08:16:15.187768
| 2018-07-21T12:22:09
| 2018-07-21T12:22:09
| 120,799,969
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,063
|
java
|
import java.util.Scanner;
public class EqualPears {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int n = input.nextInt();
int maxDiff = Integer.MIN_VALUE;
int number = 0, prevNumber = 0, lastSum = 0, sum = 0, flag = 0;
for (int i = 0; i < 2 * n; ++i){
number = input.nextInt();
if (i % 2 != 0 && i == 1){
sum = number + prevNumber;
lastSum = number + prevNumber;
}
else if (i % 2 != 0){
sum = number + prevNumber;
}
if (sum != lastSum){
flag = 1;
if (maxDiff < (Math.abs(lastSum - sum))){
maxDiff = (Math.abs(lastSum - sum));
}
}
prevNumber = number;
lastSum = sum;
}
if (flag == 0){
System.out.printf("Yes, value=%d\n", sum);
}
else {
System.out.printf("No, maxdiff=%d\n", maxDiff);
}
}
}
|
[
"starstrucks1997@gmail.com"
] |
starstrucks1997@gmail.com
|
649333e06b7833688079a4a7424df4c24ee1d32c
|
ab93497aad6018484cf8e31ad08c0910435761f5
|
/src/workbench/interfaces/SqlHistoryProvider.java
|
44ce77cee6aef3ba665669e95edb25e928e8fcce
|
[] |
no_license
|
anieruddha/sqlworkbench
|
33ca0289d4bb5e613853f74e9a96e5dc3900c717
|
058a44b0de0194732f68c52cc0815a9b27ec57e3
|
refs/heads/master
| 2020-08-05T21:05:16.706354
| 2019-10-06T01:32:18
| 2019-10-06T01:32:18
| 212,709,628
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,041
|
java
|
/*
* SqlHistoryProvider.java
*
* This file is part of SQL Workbench/J, https://www.sql-workbench.eu
*
* Copyright 2002-2019, Thomas Kellerer
*
* Licensed under a modified Apache License, Version 2.0
* that restricts the use for certain governments.
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at.
*
* https://www.sql-workbench.eu/manual/license.html
*
* 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.
*
* To contact the author please send an email to: support@sql-workbench.eu
*
*/
package workbench.interfaces;
import java.util.List;
/**
*
* @author Thomas Kellerer
*/
public interface SqlHistoryProvider
{
List<String> getHistoryEntries();
String getHistoryEntry(int index);
}
|
[
"aniruddha.gaikwad@skipthedishes.ca"
] |
aniruddha.gaikwad@skipthedishes.ca
|
7e198979a6d960e0fd465e184b6d2a35c73f5591
|
2df4793e4f113ad42629268b28d8f3287f906758
|
/人工智能导论/gvgai-assignment3/gvgai-assignment3/src/controllers/human/Agent.java
|
665a68e803e5a0141a99bd4e352a756074d0d358
|
[
"MIT"
] |
permissive
|
jocelyn2002/NJUAI_CodingHW
|
7c692a08fb301f5cac146fef6da3f94d5043f2e9
|
002c5ecbad671b75059290065db73a7152c98db9
|
refs/heads/main
| 2023-04-29T06:25:46.607063
| 2021-05-25T02:45:58
| 2021-05-25T02:45:58
| 448,436,119
| 5
| 1
|
MIT
| 2022-01-16T02:06:27
| 2022-01-16T02:06:26
| null |
UTF-8
|
Java
| false
| false
| 1,520
|
java
|
package controllers.human;
import core.game.Game;
import core.game.StateObservation;
import core.player.AbstractPlayer;
import ontology.Types;
import tools.ElapsedCpuTimer;
import tools.Utils;
import tools.Vector2d;
/**
* Created by diego on 06/02/14.
*/
public class Agent extends AbstractPlayer
{
/**
* Public constructor with state observation and time due.
* @param so state observation of the current game.
* @param elapsedTimer Timer for the controller creation.
*/
public Agent(StateObservation so, ElapsedCpuTimer elapsedTimer)
{
}
/**
* Picks an action. This function is called every game step to request an
* action from the player.
* @param stateObs Observation of the current state.
* @param elapsedTimer Timer when the action returned is due.
* @return An action for the current state
*/
public Types.ACTIONS act(StateObservation stateObs, ElapsedCpuTimer elapsedTimer)
{
Vector2d move = Utils.processMovementActionKeys(Game.ki.getMask());
boolean useOn = Utils.processUseKey(Game.ki.getMask());
//In the keycontroller, move has preference.
Types.ACTIONS action = Types.ACTIONS.fromVector(move);
if(action == Types.ACTIONS.ACTION_NIL && useOn)
action = Types.ACTIONS.ACTION_USE;
return action;
}
public void result(StateObservation stateObservation, ElapsedCpuTimer elapsedCpuTimer)
{
//System.out.println("Thanks for playing!");
}
}
|
[
"dinghao12601@126.com"
] |
dinghao12601@126.com
|
bd3c41abf2b87f79d13564d54782b9e55304b597
|
39b208bc5aed7ff144035a7a2c19ad032d49651f
|
/icardea-caremanagementdb/src/main/java/org/hl7/v3/ParticipationVia.java
|
98a23ef7f9d52a922a0003917f590652c60d4fea
|
[] |
no_license
|
coderunner4/icardea
|
8f28864aaa7993dd71ac100f43a54af0b146133a
|
de50d91b8ede37acc6aaf48eea62bdda47710c4f
|
refs/heads/master
| 2021-01-10T13:04:54.315708
| 2013-02-27T13:27:24
| 2013-02-27T13:27:24
| 46,989,557
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,000
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2010.08.03 at 01:53:04 PM EEST
//
package org.hl7.v3;
import javax.xml.bind.annotation.XmlEnum;
/**
* <p>Java class for ParticipationVia.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="ParticipationVia">
* <restriction base="{urn:hl7-org:v3}cs">
* <enumeration value="VIA"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlEnum
public enum ParticipationVia {
VIA;
public String value() {
return name();
}
public static ParticipationVia fromValue(String v) {
return valueOf(v);
}
}
|
[
"yildiraykabak@gmail.com"
] |
yildiraykabak@gmail.com
|
25f5b02cc5f1bcfb9fc2207c94da82922a73889e
|
6ee92ecc85ba29f13769329bc5a90acea6ef594f
|
/bizcore/WEB-INF/retailscm_core_src/com/doublechaintech/retailscm/leveltwocategory/LevelTwoCategoryVersionChangedException.java
|
53e0c4b33d1eafa6c8e9164980c1120a8142bf24
|
[] |
no_license
|
doublechaintech/scm-biz-suite
|
b82628bdf182630bca20ce50277c41f4a60e7a08
|
52db94d58b9bd52230a948e4692525ac78b047c7
|
refs/heads/master
| 2023-08-16T12:16:26.133012
| 2023-05-26T03:20:08
| 2023-05-26T03:20:08
| 162,171,043
| 1,387
| 500
| null | 2023-07-08T00:08:42
| 2018-12-17T18:07:12
|
Java
|
UTF-8
|
Java
| false
| false
| 359
|
java
|
package com.doublechaintech.retailscm.leveltwocategory;
import com.doublechaintech.retailscm.EntityNotFoundException;
public class LevelTwoCategoryVersionChangedException extends LevelTwoCategoryManagerException {
private static final long serialVersionUID = 1L;
public LevelTwoCategoryVersionChangedException(String string) {
super(string);
}
}
|
[
"zhangxilai@doublechaintech.com"
] |
zhangxilai@doublechaintech.com
|
f68dc154cc9452bd777b31fc03a6123c904e0873
|
a6e2cd9ea01bdc5cfe58acce25627786fdfe76e9
|
/src/main/java/com/alipay/api/domain/ZolozIdentificationUserWebInitializeModel.java
|
1652739db701e67be038f2aa1723b1d41a31316a
|
[
"Apache-2.0"
] |
permissive
|
cc-shifo/alipay-sdk-java-all
|
38b23cf946b73768981fdeee792e3dae568da48c
|
938d6850e63160e867d35317a4a00ed7ba078257
|
refs/heads/master
| 2022-12-22T14:06:26.961978
| 2020-09-23T04:00:10
| 2020-09-23T04:00:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,442
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* H5刷脸认证初始化
*
* @author auto create
* @since 1.0, 2018-07-31 12:02:23
*/
public class ZolozIdentificationUserWebInitializeModel extends AlipayObject {
private static final long serialVersionUID = 5225421419276913699L;
/**
* 商户请求的唯一标识,该标识作为对账的关键信息,商户要保证其唯一性
*/
@ApiField("biz_id")
private String bizId;
/**
* 预留扩展业务参数
*/
@ApiField("extern_param")
private String externParam;
/**
* 用户身份信息
*/
@ApiField("identity_param")
private IdentityParam identityParam;
/**
* 环境参数
*/
@ApiField("metainfo")
private String metainfo;
public String getBizId() {
return this.bizId;
}
public void setBizId(String bizId) {
this.bizId = bizId;
}
public String getExternParam() {
return this.externParam;
}
public void setExternParam(String externParam) {
this.externParam = externParam;
}
public IdentityParam getIdentityParam() {
return this.identityParam;
}
public void setIdentityParam(IdentityParam identityParam) {
this.identityParam = identityParam;
}
public String getMetainfo() {
return this.metainfo;
}
public void setMetainfo(String metainfo) {
this.metainfo = metainfo;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
153ce0645f42d2c74b776b0f8624174747a502f8
|
dd5955640aaedfb90fab90cecc8e9f8cf68ac77f
|
/app/src/main/java/com/example/notification30032020/MainActivity.java
|
ead9c0f8e2511028a692a901208f232f89b39027
|
[] |
no_license
|
phamtanphat/Notification30032020
|
7548bc14bca2fc642317af8f7314843c4d80830b
|
815fa22c35445187425802f06d7988922785e6e4
|
refs/heads/master
| 2022-08-01T13:01:55.158248
| 2020-05-27T13:56:12
| 2020-05-27T13:56:12
| 267,320,512
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,991
|
java
|
package com.example.notification30032020;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.NotificationCompat;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.graphics.BitmapFactory;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
Button mBtnOpen, mBtnClose;
String CHANEL_ID = "2";
String CHANEL_NAME = "chanel_app";
NotificationManager mNotificationManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mBtnClose = findViewById(R.id.buttonClose);
mBtnOpen = findViewById(R.id.buttonOpen);
// 1 : Tao giao dien notification : NotificationCompat.Builder
// 2 : Khi click notification se thuc thi viec gi : PendingIntent
// 3 : Tat notification
Intent intent = getIntent();
if (intent != null){
String chuoi = intent.getStringExtra("chuoi");
Toast.makeText(this, chuoi, Toast.LENGTH_SHORT).show();
}
mNotificationManager =
(NotificationManager) getSystemService(NOTIFICATION_SERVICE);
mBtnOpen.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this,MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
intent.putExtra("chuoi","Hello main");
PendingIntent pendingIntent =
PendingIntent.getActivity(
MainActivity.this,
123,
intent,
PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Builder builder =
new NotificationCompat.Builder(MainActivity.this, CHANEL_ID)
.setContentTitle("Co thong bao moi")
.setContentText("Co phien moi ban muon cap nhap khong")
.setSmallIcon(R.mipmap.ic_launcher)
.setWhen(System.currentTimeMillis())
.setContentIntent(pendingIntent)
.setStyle(
new NotificationCompat
.BigPictureStyle()
.bigPicture(
BitmapFactory
.decodeResource(
getResources(),
R.mipmap.ic_launcher))
);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){
NotificationChannel notificationChannel = new NotificationChannel
(CHANEL_ID , CHANEL_NAME , NotificationManager.IMPORTANCE_DEFAULT );
notificationChannel.enableVibration(true);
mNotificationManager.createNotificationChannel(notificationChannel);
}
mNotificationManager.notify(1 ,builder.build());
}
});
mBtnClose.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mNotificationManager.cancel(1);
}
});
}
}
|
[
"phatdroid94@gmail.com"
] |
phatdroid94@gmail.com
|
14c59379ad59d75315e38d916cf6931771729b55
|
faad188c4d5c2b8944ac7c47316e451f5143aa63
|
/src/main/java/de/processmining/app/web/rest/errors/ExceptionTranslator.java
|
869977d49c89a388c25fe6a5a1b1cde0ed748c7b
|
[] |
no_license
|
ChristopherWy/processmining
|
bdc8e05435d7251bb10aba13f56a2bc95ad355a7
|
2ebd3eda2b89cca833acd2232d6c8ff89752d5ba
|
refs/heads/master
| 2023-01-22T08:39:34.245517
| 2020-12-05T20:49:19
| 2020-12-05T20:49:19
| 287,061,773
| 0
| 0
| null | 2020-10-20T19:46:18
| 2020-08-12T16:23:30
|
Java
|
UTF-8
|
Java
| false
| false
| 6,193
|
java
|
package de.processmining.app.web.rest.errors;
import io.github.jhipster.web.util.HeaderUtil;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.dao.ConcurrencyFailureException;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.context.request.NativeWebRequest;
import org.zalando.problem.DefaultProblem;
import org.zalando.problem.Problem;
import org.zalando.problem.ProblemBuilder;
import org.zalando.problem.Status;
import org.zalando.problem.spring.web.advice.ProblemHandling;
import org.zalando.problem.spring.web.advice.security.SecurityAdviceTrait;
import org.zalando.problem.violations.ConstraintViolationProblem;
/**
* Controller advice to translate the server side exceptions to client-friendly json structures.
* The error response follows RFC7807 - Problem Details for HTTP APIs (https://tools.ietf.org/html/rfc7807).
*/
@ControllerAdvice
public class ExceptionTranslator implements ProblemHandling, SecurityAdviceTrait {
private static final String FIELD_ERRORS_KEY = "fieldErrors";
private static final String MESSAGE_KEY = "message";
private static final String PATH_KEY = "path";
private static final String VIOLATIONS_KEY = "violations";
@Value("${jhipster.clientApp.name}")
private String applicationName;
/**
* Post-process the Problem payload to add the message key for the front-end if needed.
*/
@Override
public ResponseEntity<Problem> process(@Nullable ResponseEntity<Problem> entity, NativeWebRequest request) {
if (entity == null) {
return entity;
}
Problem problem = entity.getBody();
if (!(problem instanceof ConstraintViolationProblem || problem instanceof DefaultProblem)) {
return entity;
}
ProblemBuilder builder = Problem
.builder()
.withType(Problem.DEFAULT_TYPE.equals(problem.getType()) ? ErrorConstants.DEFAULT_TYPE : problem.getType())
.withStatus(problem.getStatus())
.withTitle(problem.getTitle())
.with(PATH_KEY, request.getNativeRequest(HttpServletRequest.class).getRequestURI());
if (problem instanceof ConstraintViolationProblem) {
builder
.with(VIOLATIONS_KEY, ((ConstraintViolationProblem) problem).getViolations())
.with(MESSAGE_KEY, ErrorConstants.ERR_VALIDATION);
} else {
builder.withCause(((DefaultProblem) problem).getCause()).withDetail(problem.getDetail()).withInstance(problem.getInstance());
problem.getParameters().forEach(builder::with);
if (!problem.getParameters().containsKey(MESSAGE_KEY) && problem.getStatus() != null) {
builder.with(MESSAGE_KEY, "error.http." + problem.getStatus().getStatusCode());
}
}
return new ResponseEntity<>(builder.build(), entity.getHeaders(), entity.getStatusCode());
}
@Override
public ResponseEntity<Problem> handleMethodArgumentNotValid(MethodArgumentNotValidException ex, @Nonnull NativeWebRequest request) {
BindingResult result = ex.getBindingResult();
List<FieldErrorVM> fieldErrors = result
.getFieldErrors()
.stream()
.map(f -> new FieldErrorVM(f.getObjectName().replaceFirst("DTO$", ""), f.getField(), f.getCode()))
.collect(Collectors.toList());
Problem problem = Problem
.builder()
.withType(ErrorConstants.CONSTRAINT_VIOLATION_TYPE)
.withTitle("Method argument not valid")
.withStatus(defaultConstraintViolationStatus())
.with(MESSAGE_KEY, ErrorConstants.ERR_VALIDATION)
.with(FIELD_ERRORS_KEY, fieldErrors)
.build();
return create(ex, problem, request);
}
@ExceptionHandler
public ResponseEntity<Problem> handleEmailAlreadyUsedException(
de.processmining.app.service.EmailAlreadyUsedException ex,
NativeWebRequest request
) {
EmailAlreadyUsedException problem = new EmailAlreadyUsedException();
return create(
problem,
request,
HeaderUtil.createFailureAlert(applicationName, true, problem.getEntityName(), problem.getErrorKey(), problem.getMessage())
);
}
@ExceptionHandler
public ResponseEntity<Problem> handleUsernameAlreadyUsedException(
de.processmining.app.service.UsernameAlreadyUsedException ex,
NativeWebRequest request
) {
LoginAlreadyUsedException problem = new LoginAlreadyUsedException();
return create(
problem,
request,
HeaderUtil.createFailureAlert(applicationName, true, problem.getEntityName(), problem.getErrorKey(), problem.getMessage())
);
}
@ExceptionHandler
public ResponseEntity<Problem> handleInvalidPasswordException(
de.processmining.app.service.InvalidPasswordException ex,
NativeWebRequest request
) {
return create(new InvalidPasswordException(), request);
}
@ExceptionHandler
public ResponseEntity<Problem> handleBadRequestAlertException(BadRequestAlertException ex, NativeWebRequest request) {
return create(
ex,
request,
HeaderUtil.createFailureAlert(applicationName, true, ex.getEntityName(), ex.getErrorKey(), ex.getMessage())
);
}
@ExceptionHandler
public ResponseEntity<Problem> handleConcurrencyFailure(ConcurrencyFailureException ex, NativeWebRequest request) {
Problem problem = Problem.builder().withStatus(Status.CONFLICT).with(MESSAGE_KEY, ErrorConstants.ERR_CONCURRENCY_FAILURE).build();
return create(ex, problem, request);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
ffbeb597e473128eedd9ce5e4883b9d8117e9241
|
0d74f8ea491be582339d4ec7abae5e9a3f495f90
|
/src/p1/NonChildWithinPkg.java
|
60515667dc9eb48fa146326f9551f44eb4eb5e70
|
[] |
no_license
|
ssiedu/InheritanceExamples-18-06-2020
|
31254feaaf257d1355a76875cf7f27540d0ade4d
|
1caa832b9fb0255e6440c1de190c1332868380af
|
refs/heads/master
| 2022-11-09T22:03:16.450271
| 2020-06-27T06:56:39
| 2020-06-27T06:56:39
| 273,164,088
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 183
|
java
|
package p1;
public class NonChildWithinPkg {
public void test(){
Main ob=new Main();
ob.a=1;
ob.b=2;
ob.c=3;
// ob.d=4;
}
}
|
[
"manojs121@rediffmail.com"
] |
manojs121@rediffmail.com
|
2b7f0762c3ea77ddc20290f63308ab9a0a993356
|
41a5724ef5cf75d2d63f97113865f29d5bd71344
|
/plugins/com.seekon.mars.wf.engine/src/Main/com/seekon/mars/wf/engine/internal/strategy/untread/AnyUntreadStrategy.java
|
bf8a0aab6b6a805413740ff7bccd42ca23331efd
|
[] |
no_license
|
undyliu/mars
|
dcf9e68813c0af19ea71be0a3725029e5ae54575
|
63e6c569ca1e253f10a9fe5fdc758cadad993c71
|
refs/heads/master
| 2021-01-10T18:31:16.111134
| 2013-08-19T12:55:38
| 2013-08-19T12:55:38
| 10,619,113
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,233
|
java
|
package com.seekon.mars.wf.engine.internal.strategy.untread;
import java.util.List;
import com.seekon.mars.wf.engine.exception.WorkflowException;
import com.seekon.mars.wf.engine.internal.Environment;
import com.seekon.mars.wf.engine.internal.mapper.WFDaoFactory;
import com.seekon.mars.wf.engine.internal.mapper.WFRuntimeMapper;
import com.seekon.mars.wf.engine.internal.strategy.UntreadStrategy;
import com.seekon.mars.wf.engine.model.runtime.ActionModel;
//条件退回策略
public class AnyUntreadStrategy implements UntreadStrategy{
public void apply(Environment env) throws WorkflowException {
Long instanceId = env.getContext().getInstanceId();
Long currentNodeId = env.getCurrentNode().getNodeId();
String executor=env.getCurrentExecutor().getCode();
ActionModel action=new ActionModel();
action.setInstanceId(instanceId);
action.setNodeId(currentNodeId);
action.setExecutor(executor);
WFRuntimeMapper runtimeDao = WFDaoFactory.getWFRuntimeDao();
List actionList=runtimeDao.getAction(action);
if(actionList!=null && actionList.size()>0){
throw new WorkflowException("其他代办人的任务已经提交,任务不能收回!");
}
}
}
|
[
"undyliu@126.com"
] |
undyliu@126.com
|
12af94f3535e54ac08421c01e0a3279bb350b4d5
|
9fe933ea64a0f4090253915a55bb6b4b79261711
|
/src/com/neuedu/part07/Printer.java
|
f98864730d03f7ae5799121f8636f1ac4dd9feb1
|
[] |
no_license
|
zhangjingyan-date/testEclipse
|
9d70f4087d590cc7ef0f6a7abf98773cc900d3a9
|
229e565217903a7d2d9e7ba5392480dd5508423c
|
refs/heads/master
| 2023-02-19T10:07:03.567425
| 2021-01-25T11:30:57
| 2021-01-25T11:30:57
| 332,718,751
| 0
| 0
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 255
|
java
|
package com.neuedu.part07;
public class Printer {
/**
* ´òÓ¡
*/
public void doPrint(){
}
public static void main(String[] args) {
Printer printer = new Printer();
printer.doPrint();
}
}
class blackPrinter extends Printer{
}
|
[
"you@example.com"
] |
you@example.com
|
0278b311a9de85827bda2caba1180468c72fe1fe
|
0c547cb4c80ee369533541afab9b126755e17cc3
|
/app/src/main/java/com/fhzc/app/android/android/ui/fragment/CustomerMineFragment.java
|
0791bc4f552bebe189f34642440a7e361d7f254a
|
[] |
no_license
|
chengyue5923/fuhuagit
|
1bbb90dcbdb52bb8624c26e67af174df16b38c57
|
12bd8356bca6b7e68a153f456a36b4fcd1cc9ecf
|
refs/heads/master
| 2020-07-09T02:24:04.319489
| 2016-11-17T11:20:09
| 2016-11-17T11:20:09
| 74,019,879
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,539
|
java
|
package com.fhzc.app.android.android.ui.fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.base.framwork.net.lisener.ViewNetCallBack;
import com.fhzc.app.android.R;
import com.fhzc.app.android.android.ui.view.adapter.CustomerMinePagerAdapter;
import com.fhzc.app.android.android.ui.view.widget.CommonToolBar;
import com.fhzc.app.android.controller.EventManager;
import com.fhzc.app.android.dao.MessageDao;
import com.fhzc.app.android.event.IMEvent;
import com.fhzc.app.android.utils.android.IntentTools;
import com.fhzc.app.android.utils.im.CommonUtil;
import java.io.Serializable;
import java.util.Map;
import butterknife.Bind;
import butterknife.ButterKnife;
/**
* Created by yanbo on 16-7-11.
*/
public class CustomerMineFragment extends Fragment implements ViewNetCallBack,CommonToolBar.ClickRightListener{
CustomerMinePagerAdapter pagerAdapter;
@Bind(R.id.myTabLayout)
TabLayout myTabLayout;
@Bind(R.id.my_pager)
ViewPager myPager;
@Bind(R.id.rootLayout)
LinearLayout rootLayout;
@Bind(R.id.messageLayout)
RelativeLayout messageLayout;
@Bind(R.id.messageIv)
ImageView messageIv;
@Bind(R.id.messageRedImage)
TextView messageRedImage;
public static CustomerMineFragment newInstance() {
CustomerMineFragment squareFragmentV2 = new CustomerMineFragment();
return squareFragmentV2;
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_wealth, container, false);
ButterKnife.bind(this, view);
if (!EventManager.getInstance().isRegister(this)) {
EventManager.getInstance().register(this);
}
initView();
initData();
return view;
}
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
}
@Override
public void onDestroyView() {
super.onDestroyView();
ButterKnife.unbind(this);
if (EventManager.getInstance().isRegister(this)) {
EventManager.getInstance().unregister(this);
}
}
private void initView() {
if (CommonUtil.isUpperKK()) {
View view = new View(getActivity());
view.setBackgroundColor(getResources().getColor(R.color.common_title));
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, CommonUtil.getStatusBarHeight(getActivity()));
view.setLayoutParams(layoutParams);
rootLayout.addView(view, 0);
}
myPager.setOffscreenPageLimit(4);
}
private void initData() {
int count = new MessageDao().getUnReadCount();
messageRedImage.setVisibility(count > 0 ? View.VISIBLE : View.GONE);
messageRedImage.setText(String.valueOf(count));
// myToolBar.setRedImage(new MessageDao().getUnReadCount());
String[] strings = getResources().getStringArray(R.array.my_tab);
pagerAdapter = new CustomerMinePagerAdapter(getChildFragmentManager(), strings);
myPager.setAdapter(pagerAdapter);
myTabLayout.setupWithViewPager(myPager);
myTabLayout.setTabsFromPagerAdapter(pagerAdapter);
// UserController.getInstance().mine(this);
// myToolBar.setClickRightListener(this);
messageLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
IntentTools.startChatList(getActivity());
}
});
messageIv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
IntentTools.startChatList(getActivity());
}
});
}
public void onEventMainThread(IMEvent event) {
try{
if (null != event) {
int count = new MessageDao().getUnReadCount();
messageRedImage.setVisibility(count > 0 ? View.VISIBLE : View.GONE);
messageRedImage.setText(String.valueOf(count));
}
}catch (Exception e){
e.printStackTrace();
}
}
@Override
public void onResume() {
super.onResume();
int count = new MessageDao().getUnReadCount();
messageRedImage.setVisibility(count > 0 ? View.VISIBLE : View.GONE);
messageRedImage.setText(String.valueOf(count));
CommonUtil.FlymeSetStatusBarLightMode(getActivity().getWindow(), true);
CommonUtil.MIUISetStatusBarLightMode(getActivity().getWindow(), true);
}
@Override
public void onData(Serializable result, int flag, boolean fromNet, Object o, Map<String, Object> param) {
}
@Override
public void onConnectStart() {
}
@Override
public void onFail(Exception e) {
}
@Override
public void onConnectEnd() {
}
@Override
public void OnClickRight(View view) {
IntentTools.startChatList(getActivity());
}
}
|
[
"chengyue5923@163.com"
] |
chengyue5923@163.com
|
794fd1d2d1d3afa77fc6fa60a1844e1ba39459fe
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/com/tencent/tencentmap/mapsdk/a/b$a.java
|
c32ef959848a7109b89a8f3d8d0ccd5cecb06e19
|
[] |
no_license
|
0jinxing/wechat-apk-source
|
544c2d79bfc10261eb36389c1edfdf553d8f312a
|
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
|
refs/heads/master
| 2020-06-07T20:06:03.580028
| 2019-06-21T09:17:26
| 2019-06-21T09:17:26
| 193,069,132
| 9
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,492
|
java
|
package com.tencent.tencentmap.mapsdk.a;
import android.util.SparseArray;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.tencentmap.mapsdk.maps.a.ag;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
final class b$a extends b
{
private ScheduledExecutorService b;
private SparseArray<ScheduledFuture<?>> c;
public b$a()
{
AppMethodBeat.i(97764);
this.b = null;
this.c = null;
this.b = Executors.newScheduledThreadPool(3);
this.c = new SparseArray();
AppMethodBeat.o(97764);
}
public final void a(int paramInt)
{
try
{
AppMethodBeat.i(97767);
ScheduledFuture localScheduledFuture = (ScheduledFuture)this.c.get(paramInt);
if ((localScheduledFuture != null) && (!localScheduledFuture.isCancelled()))
{
ag.b("cancel a old future!", new Object[0]);
localScheduledFuture.cancel(true);
}
this.c.remove(paramInt);
AppMethodBeat.o(97767);
return;
}
finally
{
}
}
public final void a(int paramInt, Runnable paramRunnable, long paramLong1, long paramLong2)
{
long l = 0L;
label136:
while (true)
{
try
{
AppMethodBeat.i(97766);
if (paramRunnable == null)
{
ag.d("task runner should not be null", new Object[0]);
AppMethodBeat.o(97766);
return;
}
if (paramLong1 > 0L)
l = paramLong1;
if (!a)
break label136;
if (paramLong2 > 10000L)
{
a(paramInt);
paramRunnable = this.b.scheduleAtFixedRate(paramRunnable, l, paramLong2, TimeUnit.MILLISECONDS);
if (paramRunnable != null)
{
ag.b("add a new future! taskId: %d , periodTime: %d", new Object[] { Integer.valueOf(paramInt), Long.valueOf(paramLong2) });
this.c.put(paramInt, paramRunnable);
}
AppMethodBeat.o(97766);
continue;
}
}
finally
{
}
paramLong2 = 10000L;
}
}
public final void a(Runnable paramRunnable)
{
try
{
AppMethodBeat.i(97765);
if (paramRunnable == null)
{
ag.d("task runner should not be null", new Object[0]);
AppMethodBeat.o(97765);
}
while (true)
{
return;
this.b.execute(paramRunnable);
AppMethodBeat.o(97765);
}
}
finally
{
}
throw paramRunnable;
}
public final void a(Runnable paramRunnable, long paramLong)
{
while (true)
{
try
{
AppMethodBeat.i(97768);
if (paramRunnable == null)
{
ag.d("task runner should not be null", new Object[0]);
AppMethodBeat.o(97768);
return;
}
if (paramLong > 0L)
{
this.b.schedule(paramRunnable, paramLong, TimeUnit.MILLISECONDS);
AppMethodBeat.o(97768);
continue;
}
}
finally
{
}
paramLong = 0L;
}
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes-dex2jar.jar
* Qualified Name: com.tencent.tencentmap.mapsdk.a.b.a
* JD-Core Version: 0.6.2
*/
|
[
"172601673@qq.com"
] |
172601673@qq.com
|
1d27b601d2a93f4ff910e23115f99beee77a4165
|
9b9b19971e805a9bd69aad7960b430b45d4670bb
|
/app/src/main/java/com/sofar/widget/recycler/StackCardAdapter.java
|
53441330432c79fc1ca27f7190f647e9ac5dc50f
|
[] |
no_license
|
hustersf/Sofar
|
edee609a12f6f51969d4f36a23776ea341f282bf
|
f3afdfb5cf0717a97d0436bae5adf7d850e4a562
|
refs/heads/master
| 2023-06-23T11:31:47.260784
| 2023-06-18T12:24:47
| 2023-06-18T12:24:47
| 220,133,278
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,180
|
java
|
package com.sofar.widget.recycler;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import com.sofar.R;
import com.sofar.base.recycler.RecyclerAdapter;
import com.sofar.base.viewbinder.RecyclerViewBinder;
import com.sofar.utility.ToastUtil;
import com.sofar.utility.ViewUtil;
public class StackCardAdapter extends RecyclerAdapter {
private int loopCount = 200;
public StackCardAdapter(int loopCount) {
this.loopCount = loopCount;
}
@NonNull
@Override
protected View onCreateView(ViewGroup parent, int viewType) {
return ViewUtil.inflate(parent, R.layout.stack_card_item);
}
@NonNull
@Override
protected RecyclerViewBinder onCreateViewBinder(int viewType) {
return new OverLayViewBinder(getList().size());
}
@Override
public int getItemCount() {
return super.getItemCount() * loopCount;
}
@Nullable
@Override
public Object getItem(int position) {
position = position % super.getItemCount();
return super.getItem(position);
}
private static class OverLayViewBinder extends RecyclerViewBinder {
ImageView mImageView;
TextView mTextView;
int bannerSize;
public OverLayViewBinder(int size) {
this.bannerSize = size;
}
@Override
protected void onCreate() {
super.onCreate();
mImageView = view.findViewById(R.id.image);
mTextView = view.findViewById(R.id.text);
}
@Override
protected void onBind(Object data) {
super.onBind(data);
if (viewAdapterPosition % 2 == 0) {
mImageView
.setBackgroundColor(ContextCompat.getColor(view.getContext(), R.color.themeColor));
} else {
mImageView
.setBackgroundColor(ContextCompat.getColor(view.getContext(), R.color.colorAccent));
}
int position = viewAdapterPosition % bannerSize;
mTextView.setText(position + "号");
view.setOnClickListener(v -> {
ToastUtil.startShort(context, "我是" + position + "号");
});
}
}
}
|
[
"sofarsogood001@163.com"
] |
sofarsogood001@163.com
|
31ab3ff344f2abadc76bbdb00aceb46a67dcefac
|
5572a1241f16e6a0a0930c8c5f549d3841be86de
|
/src/main/java/jobicade/betterhud/element/settings/SettingAbsolutePosition.java
|
2f403cd95f8607206b2737555b96179f0d341a0f
|
[
"MIT"
] |
permissive
|
Snapshotlight/better-hud
|
ffac850485a3ba5f99cc1ae77b47e22bcba37a81
|
6279cd7fbbc6c63e4b9d54d180f4b1d95d33634b
|
refs/heads/master
| 2022-11-30T22:27:22.250676
| 2020-08-05T15:37:43
| 2020-08-05T15:37:43
| 276,788,037
| 0
| 0
|
MIT
| 2020-07-03T02:22:34
| 2020-07-03T02:22:33
| null |
UTF-8
|
Java
| false
| false
| 5,312
|
java
|
package jobicade.betterhud.element.settings;
import static jobicade.betterhud.BetterHud.SPACER;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import jobicade.betterhud.geom.Point;
import jobicade.betterhud.geom.Rect;
import jobicade.betterhud.gui.GuiElementSettings;
import jobicade.betterhud.gui.GuiOffsetChooser;
import jobicade.betterhud.gui.GuiUpDownButton;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.client.resources.I18n;
public class SettingAbsolutePosition extends Setting {
public GuiTextField xBox, yBox;
public GuiButton pick;
private GuiButton xUp, xDown, yUp, yDown;
private final SettingPosition position;
protected int x, y, cancelX, cancelY;
protected boolean isPicking = false;
public boolean isPicking() {
return isPicking;
}
public SettingAbsolutePosition(String name) {
this(name, null);
}
public SettingAbsolutePosition(String name, SettingPosition position) {
super(name);
this.position = position;
}
@Override
public Point getGuiParts(List<Gui> parts, Map<Gui, Setting> callbacks, Point origin) {
parts.add(xBox = new GuiTextField(0, Minecraft.getMinecraft().fontRenderer, origin.getX() - 106, origin.getY() + 1, 80, 18));
xBox.setText(String.valueOf(x));
parts.add(yBox = new GuiTextField(0, Minecraft.getMinecraft().fontRenderer, origin.getX() + 2, origin.getY() + 1, 80, 18));
yBox.setText(String.valueOf(y));
parts.add(xUp = new GuiUpDownButton(true ).setBounds(new Rect(origin.getX() - 22, origin.getY(), 0, 0)).setId(0).setRepeat());
parts.add(xDown = new GuiUpDownButton(false).setBounds(new Rect(origin.getX() - 22, origin.getY() + 10, 0, 0)).setId(1).setRepeat());
parts.add(yUp = new GuiUpDownButton(true ).setBounds(new Rect(origin.getX() + 86, origin.getY(), 0, 0)).setId(2).setRepeat());
parts.add(yDown = new GuiUpDownButton(false).setBounds(new Rect(origin.getX() + 86, origin.getY() + 10, 0, 0)).setId(3).setRepeat());
if(position != null) {
parts.add(pick = new GuiButton(4, origin.getX() - 100, origin.getY() + 22, 200, 20, I18n.format("betterHud.menu.pick")));
callbacks.put(pick, this);
}
callbacks.put(xBox, this);
callbacks.put(yBox, this);
callbacks.put(xUp, this);
callbacks.put(xDown, this);
callbacks.put(yUp, this);
callbacks.put(yDown, this);
return origin.add(0, 42 + SPACER);
}
public void updateText() {
if(xBox != null && yBox != null) {
xBox.setText(String.valueOf(x));
yBox.setText(String.valueOf(y));
}
}
@Override
public void actionPerformed(GuiElementSettings gui, GuiButton button) {
switch(button.id) {
case 0: xBox.setText(String.valueOf(++x)); break;
case 1: xBox.setText(String.valueOf(--x)); break;
case 2: yBox.setText(String.valueOf(++y)); break;
case 3: yBox.setText(String.valueOf(--y)); break;
case 4: Minecraft.getMinecraft().displayGuiScreen(new GuiOffsetChooser(gui, position)); break;
}
}
/** Forgets the original position and keeps the current picked position */
public void finishPicking() {
isPicking = false;
//pick.displayString = I18n.format("betterHud.menu.pick");
}
public void set(Point value) {
x = value.getX();
y = value.getY();
updateText();
}
public Point get() {
return new Point(x, y);
}
@Override
public boolean hasValue() {
return true;
}
@Override
public String getStringValue() {
return x + ", " + y;
}
@Override
public void loadStringValue(String val) {
int comma = val.indexOf(',');
if (comma == -1) {
//return false;
}
int x, y;
try {
x = Integer.parseInt(val.substring(0, comma).trim());
y = Integer.parseInt(val.substring(comma + 1).trim());
} catch (NumberFormatException e) {
//return false;
return;
}
set(new Point(x, y));
}
@Override
public void updateGuiParts(Collection<Setting> settings) {
super.updateGuiParts(settings);
boolean enabled = enabled();
xBox.setEnabled(enabled);
yBox.setEnabled(enabled);
if(pick != null) pick.enabled = enabled;
if(enabled) {
try {
x = Integer.parseInt(xBox.getText());
xUp.enabled = xDown.enabled = true;
} catch(NumberFormatException e) {
x = 0;
xUp.enabled = xDown.enabled = false;
}
try {
y = Integer.parseInt(yBox.getText());
yUp.enabled = yDown.enabled = true;
} catch(NumberFormatException e) {
y = 0;
yUp.enabled = yDown.enabled = false;
}
} else {
xUp.enabled = xDown.enabled = yUp.enabled = yDown.enabled = false;
}
}
}
|
[
"4602020+mccreery@users.noreply.github.com"
] |
4602020+mccreery@users.noreply.github.com
|
fb9ccf0553300b740773b7aa3a9cedeb7032d990
|
33e47549a7f3f7621be100b68efac0df9f671553
|
/src/com/huaixuan/network/biz/service/shop/impl/ArticleCatServiceImpl.java
|
ce4c8ee9c31db72d6d54b48a71e9916320ee9b44
|
[] |
no_license
|
Maddox-Zhao/admin
|
150b60074e5b89692da52bcdb0b789bdd581a915
|
67ff15e6a5731aa39c0b747dfca35efc4c87a121
|
refs/heads/master
| 2022-08-20T00:06:19.244070
| 2019-10-31T05:58:30
| 2019-10-31T05:58:30
| 218,693,988
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,902
|
java
|
package com.huaixuan.network.biz.service.shop.impl;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.huaixuan.network.biz.dao.shop.ArticleCatDao;
import com.huaixuan.network.biz.domain.shop.ArticleCat;
import com.huaixuan.network.biz.service.shop.ArticleCatService;
@Service("ArticleCatService")
public class ArticleCatServiceImpl implements ArticleCatService {
Log log = LogFactory.getLog(this.getClass());
@Autowired
public ArticleCatDao articleCatDao;
@Override
public void addArticleCat(ArticleCat articleCatDao) {
log.info("ArticleCatManagerImpl.addArticleCat method");
try {
this.articleCatDao.addArticleCat(articleCatDao);
} catch (Exception e) {
log.error(e.getMessage());
}
}
@Override
public void editArticleCat(ArticleCat articleCat) {
log.info("ArticleCatManagerImpl.editArticleCat method");
try {
this.articleCatDao.editArticleCat(articleCat);
} catch (Exception e) {
log.error(e.getMessage());
}
}
@Override
public void removeArticleCat(Long articleCatId) {
log.info("ArticleCatManagerImpl.removeArticleCat method");
try {
this.articleCatDao.removeArticleCat(articleCatId);
} catch (Exception e) {
log.error(e.getMessage());
}
}
@Override
public ArticleCat getArticleCat(Long articleCatId) {
log.info("ArticleCatManagerImpl.getArticleCat method");
try {
return this.articleCatDao.getArticleCat(articleCatId);
} catch (Exception e) {
log.error(e.getMessage());
}
return null;
}
@Override
public List<ArticleCat> getArticleCats() {
log.info("ArticleCatManagerImpl.getArticleCats method");
try {
return this.articleCatDao.getArticleCats();
} catch (Exception e) {
log.error(e.getMessage());
}
return null;
}
}
|
[
"919965842@qq.com"
] |
919965842@qq.com
|
c5b1cc6bc00bf8434b2b836f8860b7ccbee320cf
|
bccc159c3063829cbd66d845c9f0e12aa93cb5f2
|
/Observer/src/Car.java
|
f765d86d09c7643656fe15fce5edb1061a6fd9e2
|
[] |
no_license
|
11michi11/SDJ2
|
012e60437376f04e708643ac7fc1a91eba24fb4f
|
46138e29290465f789961eb4f0d3b9625b0b6b1b
|
refs/heads/master
| 2018-09-07T12:53:47.265852
| 2018-06-09T16:35:19
| 2018-06-09T16:35:19
| 120,578,391
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 284
|
java
|
public class Car extends Vehicle {
public Car(Semafor semafor) {
super(semafor);
}
@Override
public void update() {
if(subject.getState().equals(Semafor.GREEN))
System.out.println("Car " + id + ": GO!");
else
System.out.println("Car " + id + ": wait...");
}
}
|
[
"11michi11@gmail.com"
] |
11michi11@gmail.com
|
adcfdb7642bcfcd57fcf0763572b698268cdcd75
|
2cf9cbafdfd5df582a9a46dcf85e5162901ef337
|
/uml/src/main/java/uk/ac/ukc/cs/kmf/kmfstudio/uml/Foundation/Core/AssociationClass$Factory.java
|
33454e6a0bd686d81e80f652ff4fff09d21ed989
|
[
"Apache-2.0"
] |
permissive
|
opatrascoiu/jmf
|
918303cf7ff6a5428157ea5deedc863386f457fb
|
be597da51fa5964f07ee74213640894af8fff535
|
refs/heads/master
| 2022-02-28T08:57:39.220759
| 2019-10-17T08:48:14
| 2019-10-17T08:48:14
| 110,419,420
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 732
|
java
|
/**
*
* Class AssociationClass$Factory.java
*
* Generated by KMFStudio at 29 July 2003 10:22:57
* Visit http://www.cs.ukc.ac.uk/kmf
*
*/
package uk.ac.ukc.cs.kmf.kmfstudio.uml.Foundation.Core;
import uk.ac.ukc.cs.kmf.kmfstudio.uml.UmlFactory;
import uk.ac.ukc.cs.kmf.kmfstudio.uml.UmlVisitable;
public interface AssociationClass$Factory
extends
UmlFactory,
UmlVisitable
{
/** Default builder */
public Object build();
/** Specialized builder */
public Object build(uk.ac.ukc.cs.kmf.kmfstudio.uml.Foundation.Data_Types.Name name, uk.ac.ukc.cs.kmf.kmfstudio.uml.Foundation.Data_Types.VisibilityKind visibility, Boolean isSpecification, Boolean isRoot, Boolean isLeaf, Boolean isAbstract, Boolean isActive);
}
|
[
"opatrascoiu@yahoo.com"
] |
opatrascoiu@yahoo.com
|
f8347c9bfa1cd02f7622a181ef6e64682c7501c2
|
208ba847cec642cdf7b77cff26bdc4f30a97e795
|
/zd/zb/src/main/java/org.wp.zb/ui/notifications/NotificationDismissBroadcastReceiver.java
|
a59e01f70b0a83f04b87efeade2741d5729e8e14
|
[] |
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
| 1,126
|
java
|
package org.wp.zb.ui.notifications;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.NotificationManagerCompat;
import org.wp.zb.GCMMessageService;
/*
* Clears the notification map when a user dismisses a notification
*/
public class NotificationDismissBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
int notificationId = intent.getIntExtra("notificationId", 0);
if (notificationId == GCMMessageService.GROUP_NOTIFICATION_ID) {
GCMMessageService.clearNotifications();
} else {
GCMMessageService.removeNotification(notificationId);
// Dismiss the grouped notification if a user dismisses all notifications from a wear device
if (!GCMMessageService.hasNotifications()) {
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);
notificationManager.cancel(GCMMessageService.GROUP_NOTIFICATION_ID);
}
}
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
dc6575fb23c804939bcf970643090942978f2936
|
ab2888afa1f9f143bcfeca16b5a0226d3d3556e1
|
/src/main/java/com/ecodation/ornek/bolum010/list/ListAllOrnek.java
|
b49b18db87ae0bdab17b99e73cbade76304d5e6a
|
[] |
no_license
|
hamitmizrak/Ecodation-JAVA-SE
|
a34c30c0b05928726f094abededf9dc8cf5f6301
|
17ba06f75fb81e9debad9b0ee0aae28b34308a48
|
refs/heads/master
| 2023-01-05T13:04:29.229965
| 2020-11-08T10:16:39
| 2020-11-08T10:16:39
| 299,309,036
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 690
|
java
|
package com.ecodation.ornek.bolum010.list;
import java.util.ArrayList;
import java.util.List;
public class ListAllOrnek {
public static void main(String[] args) {
List<String> list = new ArrayList<String>();
String database = "dsfsdfsdf sdfsdfsfd";
// String[] dizi = kelime.split();
list.add("Malatya");
list.add("Elazığ");
list.add("Nevşehir");
List<String> list2 = new ArrayList<String>();
list2.add("Melekbaba");
list2.add("Taştepe");
list2.add("Çöşnük");
list2.add("Ecodation");
System.out.println("-------------------");
list.addAll(list2);
for (String list21 : list) {
System.out.println(list21);
}
}
}
|
[
"hamitmizrak@gmail.com"
] |
hamitmizrak@gmail.com
|
3bb7edac4d69f8c7a9daabb57f1768ad40d00606
|
0df09e852f1e433426ae5201837b09c4bc320471
|
/phase1_java/interface_demo/src/java8_interface/MyMain.java
|
0e92c871d082b5c4af9625799022f0f73d668991
|
[] |
no_license
|
vinayingalahalli/simplilearn_TVS
|
c9ffbdcec8af60eac5ea64ac46034368816a4a2c
|
936ca39160231785b8f61e0349df9181498632e7
|
refs/heads/master
| 2023-01-29T18:08:20.798903
| 2020-12-11T10:22:52
| 2020-12-11T10:22:52
| 302,533,190
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 223
|
java
|
package java8_interface;
public class MyMain implements HelloJava8Interface{
public static void main(String[] args) {
HelloJava8Interface.helloStatic();
HelloJava8Interface h=new MyMain();
h.helloDefault();
}
}
|
[
"vinay.ingalahalli@revature.com"
] |
vinay.ingalahalli@revature.com
|
229ff51244aa45e844045b5a1452d224d4c8b7d4
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.browser-base/sources/defpackage/Mp1.java
|
1cbf94c05b2e8a72158700ebabaeb612e3fc18e1
|
[] |
no_license
|
phwd/quest-tracker
|
286e605644fc05f00f4904e51f73d77444a78003
|
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
|
refs/heads/main
| 2023-03-29T20:33:10.959529
| 2021-04-10T22:14:11
| 2021-04-10T22:14:11
| 357,185,040
| 4
| 2
| null | 2021-04-12T12:28:09
| 2021-04-12T12:28:08
| null |
UTF-8
|
Java
| false
| false
| 1,284
|
java
|
package defpackage;
import sun.misc.Unsafe;
/* renamed from: Mp1 reason: default package */
/* compiled from: chromium-OculusBrowser.apk-stable-281887347 */
public final class Mp1 extends Np1 {
public Mp1(Unsafe unsafe) {
super(unsafe);
}
@Override // defpackage.Np1
public boolean c(Object obj, long j) {
return this.f8578a.getBoolean(obj, j);
}
@Override // defpackage.Np1
public byte d(Object obj, long j) {
return this.f8578a.getByte(obj, j);
}
@Override // defpackage.Np1
public double e(Object obj, long j) {
return this.f8578a.getDouble(obj, j);
}
@Override // defpackage.Np1
public float f(Object obj, long j) {
return this.f8578a.getFloat(obj, j);
}
@Override // defpackage.Np1
public void k(Object obj, long j, boolean z) {
this.f8578a.putBoolean(obj, j, z);
}
@Override // defpackage.Np1
public void l(Object obj, long j, byte b) {
this.f8578a.putByte(obj, j, b);
}
@Override // defpackage.Np1
public void m(Object obj, long j, double d) {
this.f8578a.putDouble(obj, j, d);
}
@Override // defpackage.Np1
public void n(Object obj, long j, float f) {
this.f8578a.putFloat(obj, j, f);
}
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
4b032d8f1e1542afd340c210235c239bcc0cf3d9
|
4af46c51990059c509ed9278e8708f6ec2067613
|
/java/l2server/gameserver/network/serverpackets/PartySmallWindowAll.java
|
0b21688e6a4b820125ad128abb3d219486d752e3
|
[] |
no_license
|
bahamus007/l2helios
|
d1519d740c11a66f28544075d9e7c628f3616559
|
228cf88db1981b1169ea5705eb0fab071771a958
|
refs/heads/master
| 2021-01-12T13:17:19.204718
| 2017-11-15T02:16:52
| 2017-11-15T02:16:52
| 72,180,803
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,537
|
java
|
/*
* 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 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program. If
* not, see <http://www.gnu.org/licenses/>.
*/
package l2server.gameserver.network.serverpackets;
import l2server.gameserver.instancemanager.PartySearchManager;
import l2server.gameserver.model.L2Party;
import l2server.gameserver.model.actor.instance.L2PcInstance;
import l2server.gameserver.model.actor.instance.L2SummonInstance;
/**
* sample 63 01 00 00 00 count
* <p>
* c1 b2 e0 4a object id 54 00 75 00 65 00 73 00 64 00 61 00 79 00 00 00 name 5a 01 00 00 hp 5a 01
* 00 00 hp max 89 00 00 00 mp 89 00 00 00 mp max 0e 00 00 00 level 12 00 00 00 class 00 00 00 00 01
* 00 00 00
* <p>
* <p>
* format d (dSdddddddd)
*
* @version $Revision: 1.6.2.1.2.5 $ $Date: 2005/03/27 15:29:57 $
*/
public final class PartySmallWindowAll extends L2GameServerPacket
{
private L2Party _party;
private L2PcInstance _exclude;
private int _dist, _LeaderOID;
public PartySmallWindowAll(L2PcInstance exclude, L2Party party)
{
_exclude = exclude;
_party = party;
_LeaderOID = _party.getPartyLeaderOID();
_dist = _party.getLootDistribution();
}
@Override
protected final void writeImpl()
{
writeD(_LeaderOID);
writeC(_dist);
writeC(_party.getMemberCount() - 1);
for (L2PcInstance member : _party.getPartyMembers())
{
if (member != null && member != _exclude)
{
writeD(member.getObjectId());
writeS(member.getName());
writeD((int) member.getCurrentCp()); // c4
writeD(member.getMaxCp()); // c4
writeD((int) member.getCurrentHp());
writeD(member.getMaxVisibleHp());
writeD((int) member.getCurrentMp());
writeD(member.getMaxMp());
writeD(member.getVitalityPoints());
writeC(member.getLevel());
writeH(member.getCurrentClass().getId());
writeC(0x01); // ???
writeC(member.getRace().ordinal());
writeC(PartySearchManager.getInstance().getWannaToChangeThisPlayer(member.getObjectId()) ? 0x01 :
0x00); // GoD unknown
writeD(member.getSummons().size() + (member.getPet() != null ? 1 : 0));
for (L2SummonInstance summon : member.getSummons())
{
writeD(summon.getObjectId());
writeD(summon.getNpcId() + 1000000);
writeC(summon.getSummonType());
writeS(summon.getName());
writeD((int) summon.getCurrentHp());
writeD(summon.getMaxHp());
writeD((int) summon.getCurrentMp());
writeD(summon.getMaxMp());
writeC(summon.getLevel());
}
if (member.getPet() != null)
{
writeD(member.getPet().getObjectId());
writeD(member.getPet().getNpcId() + 1000000);
writeC(member.getPet().getSummonType());
writeS(member.getPet().getName());
writeD((int) member.getPet().getCurrentHp());
writeD(member.getPet().getMaxHp());
writeD((int) member.getPet().getCurrentMp());
writeD(member.getPet().getMaxMp());
writeC(member.getPet().getLevel());
}
}
}
}
}
|
[
"singto52@hotmail.com"
] |
singto52@hotmail.com
|
a9564e83a4b5cdcb42df667a87fb6b8ba8c18cc4
|
6f5a4d2f99a3ac8081c1afd54a2558bc1ff880fe
|
/codesignal/src/main/java/Arcade/Intro/The_Journey_Begins/CenturyFromYearClass.java
|
95adfe2b7b4570099961eaf27a68632e1f960800
|
[] |
no_license
|
tvttavares/competitive-programming
|
19a43154813db7a28c4701413e06f7ab16b841c5
|
6fc6033832a1e725a901fadae765439ec30eac30
|
refs/heads/master
| 2022-06-30T03:00:16.359238
| 2022-05-26T01:18:10
| 2022-05-26T01:18:10
| 209,412,704
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 299
|
java
|
package Arcade.Intro.The_Journey_Begins;
public class CenturyFromYearClass {
public static int centuryFromYear(int year) {
int res = year / 100;
int r = year % 100;
if (r == 0) {
return res;
} else {
return res + 1;
}
}
}
|
[
"tvttavares@gmail.com"
] |
tvttavares@gmail.com
|
ac01e5ac3817683e7d7a733a6f5eaea0860b9832
|
baba7ae4f32f0e680f084effcd658890183e7710
|
/MutationFramework/muJava/muJavaMutantStructure/Persistence/PayCardSPL/PayCard/boolean_charge__wrappee__Paycard(int)/AOIS_14/PayCard.java
|
f52ffad6ad260a992cac3ea56d802439aed7da72
|
[
"Apache-2.0"
] |
permissive
|
TUBS-ISF/MutationAnalysisForDBC-FormaliSE21
|
75972c823c3c358494d2a2e9ec12e0a00e26d771
|
de825bc9e743db851f5ec1c5133dca3f04d20bad
|
refs/heads/main
| 2023-04-22T21:29:28.165271
| 2021-05-17T07:43:22
| 2021-05-17T07:43:22
| 368,096,901
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,820
|
java
|
// This is a mutant program.
// Author : ysma
public class PayCard
{
/*@
@ public instance invariant balance >= 0;
@ public instance invariant limit > 0;
@*/
public int limit = 1000;
public int id;
public int balance = 0;
public PayCard( int limit )
{
balance = 0;
this.limit = limit;
}
public PayCard()
{
balance = 0;
}
/*@
@ ensures \result.limit==100;
@*/
public static PayCard createJuniorCard()
{
return new PayCard( 100 );
}
/*@
@ public normal_behavior
@ requires amount>0;
@ {|
@ requires amount + balance < limit && isValid() == true;
@ ensures \result == true;
@ ensures balance == amount + \old(balance);
@ assignable balance;
@
@ also
@
@ requires amount + balance >= limit || isValid() == false;
@ ensures \result == false;
@ |}
@
@ also
@
@ public exceptional_behavior
@ requires amount <= 0;
@*/
private boolean charge__wrappee__Paycard( int amount )
throws java.lang.IllegalArgumentException
{
if (amount <= 0) {
throw new java.lang.IllegalArgumentException();
}
if (this.balance + --amount < this.limit && this.isValid()) {
this.balance = this.balance + amount;
return true;
} else {
return false;
}
}
/*@ also
@
@ public normal_behavior
@ requires amount>0;
@ requires amount + balance >= limit || isValid() == false;
@ ensures unsuccessfulOperations == \old(unsuccessfulOperations) + 1;
@ assignable unsuccessfulOperations;
@*/
public boolean charge( int amount )
throws java.lang.IllegalArgumentException
{
boolean success = charge__wrappee__Paycard( amount );
if (!success) {
this.unsuccessfulOperations++;
}
return success;
}
// contract remains identical
public void chargeAndRecord( int amount )
{
if (charge( amount )) {
try {
log.addRecord( balance );
} catch ( CardException e ) {
throw new java.lang.IllegalArgumentException();
}
}
}
// contract remains identical
public /*@pure@*/ boolean isValid()
{
if (unsuccessfulOperations <= 3) {
return true;
} else {
return false;
}
}
public java.lang.String infoCardMsg()
{
return " Current balance on card is " + balance;
}
public protected LogFile log;
/*@
@ public instance invariant unsuccessfulOperations >= 0;
@*/
public int unsuccessfulOperations = 0;
}
|
[
"a.knueppel@tu-bs.de"
] |
a.knueppel@tu-bs.de
|
83d8c79185f0e385552d294e5cea8dd8196b48ca
|
da1489356ca38c6dbafd48242da0c45c503abb94
|
/querydsl-jpa/src/test/java/com/mysema/query/jpa/domain/sql/SNamed.java
|
078520c72e4c421daafb7c68887e8d65ce30cb97
|
[] |
no_license
|
john7doe/querydsl
|
8920e7e3752a053d363710e41b714b6ddf3b7d07
|
2a9b59233360333eb2293bd493488ac3de85877b
|
refs/heads/master
| 2021-01-18T11:07:37.268450
| 2012-05-16T17:22:33
| 2012-05-16T17:22:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,109
|
java
|
package com.mysema.query.jpa.domain.sql;
import static com.mysema.query.types.PathMetadataFactory.*;
import com.mysema.query.types.*;
import com.mysema.query.types.path.*;
import javax.annotation.Generated;
/**
* SNamed is a Querydsl query type for SNamed
*/
@Generated("com.mysema.query.sql.MetaDataSerializer")
public class SNamed extends com.mysema.query.sql.RelationalPathBase<SNamed> {
private static final long serialVersionUID = -116118296;
public static final SNamed named = new SNamed("NAMED_");
public final NumberPath<Long> id = createNumber("ID", Long.class);
public final StringPath name = createString("NAME");
public final com.mysema.query.sql.PrimaryKey<SNamed> sql120219232326590 = createPrimaryKey(id);
public SNamed(String variable) {
super(SNamed.class, forVariable(variable), "APP", "NAMED_");
}
public SNamed(Path<? extends SNamed> entity) {
super(entity.getType(), entity.getMetadata(), "APP", "NAMED_");
}
public SNamed(PathMetadata<?> metadata) {
super(SNamed.class, metadata, "APP", "NAMED_");
}
}
|
[
"timo.westkamper@mysema.com"
] |
timo.westkamper@mysema.com
|
0e41e41458adfab782beb73cd2305effe4b13f8c
|
e314136b38a27d444415c20a6f1312242f293593
|
/app/src/main/java/com/xiaohu/fireworkssystem/control/sale_detail_goods/SaleDetailSearchView.java
|
e68261c2322823edc318d437ceaa41195bf79727
|
[] |
no_license
|
Finderchangchang/lingbule
|
88f2f42c178f6ff9e8bde76931f03394aafd63ce
|
8fcdbe706ce7ce2dd77288cbb383ee679e5552d5
|
refs/heads/master
| 2021-05-09T06:49:22.278522
| 2018-02-07T07:53:13
| 2018-02-07T07:53:13
| 118,394,332
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 278
|
java
|
package com.xiaohu.fireworkssystem.control.sale_detail_goods;
import com.xiaohu.fireworkssystem.model.view.ViewProductSaleModel;
import java.util.List;
public interface SaleDetailSearchView {
void SaleDetailSearchView(String message, List<ViewProductSaleModel> list);
}
|
[
"chang19930228"
] |
chang19930228
|
a65fde539f4a9d7d5bfed8cb4aad2dbd895b3d34
|
297d94988a89455f9a9f113bfa107f3314d21f51
|
/trade-api/src/main/java/com/hbc/api/trade/fund/MISFundAccountController.java
|
468cd6d5e0f6361ac7e51ffa4f5f2987e6749517
|
[] |
no_license
|
whyoyyx/trade
|
408e86aba9a0d09aa5397eef194d346169ff15cc
|
9d3f30fafca42036385280541e31eb38d2145e03
|
refs/heads/master
| 2020-12-28T19:11:46.342249
| 2016-01-15T03:29:44
| 2016-01-15T03:29:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,878
|
java
|
/**
* @Author lukangle
* @2015年11月14日@下午5:16:52
*/
package com.hbc.api.trade.fund;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONObject;
import com.hbc.api.fund.account.enums.AccountChangeType;
import com.hbc.api.fund.account.enums.AccountType;
import com.hbc.api.fund.account.enums.BalanceReturnCodeEnum;
import com.hbc.api.fund.account.enums.BizType;
import com.hbc.api.fund.account.mapping.gen.bean.FundAccount;
import com.hbc.api.fund.account.parm.AccountParam;
import com.hbc.api.fund.account.parm.PayParm;
import com.hbc.api.fund.account.service.FundAccountService;
import com.hbc.api.fund.account.service.RechargeService;
import com.hbc.api.trade.bdata.common.rsp.ReturnResult;
import com.hbc.api.trade.fund.req.MisGuideRePunish;
import com.hbc.api.trade.order.service.FundLogService;
import com.hbc.api.trade.sec.TradeAccountContext;
@RestController
@RequestMapping("fund")
public class MISFundAccountController {
@Autowired
private FundAccountService fundAccountService;
@RequestMapping(value = "v1.0/e/createAccount", method = RequestMethod.POST, produces = "application/json; charset=utf-8")
public ReturnResult dailyOrder(@Valid AccountParam accountParam, BindingResult result, HttpServletRequest request) {
String areacode = accountParam.getAreacode();
String mobile = accountParam.getMobile();
String accountName = accountParam.getAccountName();
String userId = accountParam.getUserId();
AccountType accountType = AccountType.getType(accountParam.getAccountType());
ReturnResult returnResult = new ReturnResult();
JSONObject jobj = new JSONObject();
jobj.put("accountNo", fundAccountService.addAccount(areacode, mobile, accountName, userId, accountType));
returnResult.setData(jobj);
return returnResult;
}
@Autowired
FundLogService fundLogService;
@Autowired
private TradeAccountContext tradeAccountContext;
@RequestMapping(value = "v1.0/e/account/balances", method = RequestMethod.GET, produces = "application/json; charset=utf-8")
public ReturnResult getAccountBalances(String fundAccount, HttpServletRequest request) {
FundAccount fundAccountBean = fundAccountService.getFundAccount(fundAccount);
Map<String, Double> data = new HashMap<>(2);
data.put("totalAmount", fundLogService.getFutureAmount(fundAccountBean.getAccountNo()));
double useableAmount = fundAccountBean.getAmount();
data.put("useableAmount", useableAmount < 0.0 ? 0.0 : useableAmount);
ReturnResult returnResult = new ReturnResult();
returnResult.setData(data);
return returnResult;
}
@RequestMapping(value = "v1.0/e/account/created/flowing/user/register", method = RequestMethod.POST, produces = "application/json; charset=utf-8")
public ReturnResult createAccount(@Valid AccountParam accountParam, BindingResult result, HttpServletRequest request) {
String accountNo = accountParam.getAccountNo();
String areacode = accountParam.getAreacode();
String mobile = accountParam.getMobile();
String accountName = accountParam.getAccountName();
String userId = accountParam.getUserId();
AccountType accountType = AccountType.getType(accountParam.getAccountType());
fundAccountService.addAccount(accountNo, areacode, mobile, accountName, userId, accountType);
return new ReturnResult();
}
@RequestMapping(value = "v1.0/e/account/detail", method = RequestMethod.GET, produces = "application/json; charset=utf-8")
public ReturnResult findAccount(@RequestParam(required = true) String accountNo, BindingResult bindResult, HttpServletRequest request) {
FundAccount result = fundAccountService.getFundAccount(accountNo);
ReturnResult returnResult = new ReturnResult();
returnResult.setData(result);
return returnResult;
}
@RequestMapping(value = "v1.0/e/account/pay", method = RequestMethod.POST, produces = "application/json; charset=utf-8")
public ReturnResult payAccount(@Valid PayParm payParm, BindingResult result, HttpServletRequest request) {
fundAccountService.pay(payParm);
ReturnResult returnResult = new ReturnResult();
returnResult.setStatus(200);
return returnResult;
}
@RequestMapping(value = "v1.0/e/account/enable", method = RequestMethod.POST, produces = "application/json; charset=utf-8")
public ReturnResult fund_account_enable(@RequestParam(required = true) String accountNo, @RequestParam(required = true) String optId, @RequestParam(required = true) String optName,
HttpServletRequest request) {
boolean result = fundAccountService.enable(accountNo, optId, optName);
ReturnResult returnResult = new ReturnResult();
if (result) {
returnResult.setMessage(BalanceReturnCodeEnum.ACCOUNT_ENABLE_SUCCESS.getMessage());
} else {
returnResult.setStatus(BalanceReturnCodeEnum.ACCOUNT_ENABLE_FAILED.getCode());
returnResult.setMessage(BalanceReturnCodeEnum.ACCOUNT_ENABLE_FAILED.getMessage());
}
return returnResult;
}
@RequestMapping(value = "v1.0/e/account/disable", method = RequestMethod.POST, produces = "application/json; charset=utf-8")
public ReturnResult fund_account_disable(@RequestParam(required = true) String accountNo, @RequestParam(required = true) String optId, @RequestParam(required = true) String optName,
HttpServletRequest request) {
boolean result = fundAccountService.disable(accountNo, optId, optName);
ReturnResult returnResult = new ReturnResult();
if (result) {
returnResult.setMessage(BalanceReturnCodeEnum.ACCOUNT_DISABLE_SUCCESS.getMessage());
} else {
returnResult.setStatus(BalanceReturnCodeEnum.ACCOUNT_DISABLE_FAILED.getCode());
returnResult.setMessage(BalanceReturnCodeEnum.ACCOUNT_DISABLE_FAILED.getMessage());
}
return returnResult;
}
@RequestMapping(value = "v1.0/e/account/reword", method = RequestMethod.POST, produces = "application/json; charset=utf-8")
public ReturnResult guideReword(@RequestParam(required = true) String fundAccount, @RequestParam(required = true) Double amount, @RequestParam(required = true) String optId,
@RequestParam(required = true) String optName, HttpServletRequest request) {
ReturnResult returnResult = new ReturnResult();
if (amount < 100 && amount > 0 && fundAccount != null && fundAccount.length() > 0) {
fundAccountService.pay(fundAccount, amount, BizType.REWARD_BY_YINGDAOYOU, optId, optName);
} else {
returnResult.setStatus(400);
}
return returnResult;
}
@Autowired
RechargeService rechargeService;
@RequestMapping(value = "v1.0/e/account/rewordPunished", method = RequestMethod.POST, produces = "application/json; charset=utf-8")
public ReturnResult guidePunished(@Valid MisGuideRePunish misGuideRePunish, BindingResult result, HttpServletRequest request) {
ReturnResult returnResult = new ReturnResult();
Integer rtype = misGuideRePunish.getRtype();
if (1 == rtype) {
// 导游奖励
fundAccountService.pay(misGuideRePunish.getFundAccount(), misGuideRePunish.getAmount(), BizType.REWARD_BY_MIS,
AccountChangeType.MISCG,misGuideRePunish.getOrderNo(),misGuideRePunish.getOptId(), misGuideRePunish.getOptName(),
misGuideRePunish.getRemark());
} else if (2 == rtype) {
rechargeService.punished(misGuideRePunish.getFundAccount(), misGuideRePunish.getAmount(), BizType.PUNISH_BY_MIS,
AccountChangeType.MISCG,misGuideRePunish.getOrderNo(),misGuideRePunish.getOptId(), misGuideRePunish.getOptName(),
misGuideRePunish.getRemark());
}else {
returnResult.setStatus(400);
}
return returnResult;
}
}
|
[
"fuyongtian@huangbaoche.com"
] |
fuyongtian@huangbaoche.com
|
bf96649fe9966e068fef3d3c527a512b42081715
|
0e009665f5bd69b2e84a4fcc1cb0f03cccb80431
|
/bpmn.metamodel.test.edit/src/bpmn2/provider/FlowNodeItemProvider.java
|
63c9f69a9c87ce41dc9cf417c9b18c427ebbd7c5
|
[] |
no_license
|
takarabt/bpmn
|
b0920d8a5fe19436ce4037899df08e1915f9231d
|
2c917dafcc7d643ea2c98bc97f76c9c9943918cc
|
refs/heads/master
| 2016-09-16T15:40:58.481064
| 2013-02-14T15:04:40
| 2013-02-14T15:04:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,915
|
java
|
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package bpmn2.provider;
import bpmn2.Bpmn2Package;
import bpmn2.FlowNode;
import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
/**
* This is the item provider adapter for a {@link bpmn2.FlowNode} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class FlowNodeItemProvider
extends FlowElementItemProvider
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FlowNodeItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addIncomingPropertyDescriptor(object);
addLanesPropertyDescriptor(object);
addOutgoingPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Incoming feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addIncomingPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FlowNode_incoming_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FlowNode_incoming_feature", "_UI_FlowNode_type"),
Bpmn2Package.eINSTANCE.getFlowNode_Incoming(),
true,
false,
true,
null,
null,
null));
}
/**
* This adds a property descriptor for the Lanes feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addLanesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FlowNode_lanes_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FlowNode_lanes_feature", "_UI_FlowNode_type"),
Bpmn2Package.eINSTANCE.getFlowNode_Lanes(),
true,
false,
true,
null,
null,
null));
}
/**
* This adds a property descriptor for the Outgoing feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addOutgoingPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_FlowNode_outgoing_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_FlowNode_outgoing_feature", "_UI_FlowNode_type"),
Bpmn2Package.eINSTANCE.getFlowNode_Outgoing(),
true,
false,
true,
null,
null,
null));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((FlowNode)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_FlowNode_type") :
getString("_UI_FlowNode_type") + " " + label;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
}
|
[
"ali.takarabt@gmail.com"
] |
ali.takarabt@gmail.com
|
758802d3d134d110b97d9cc0aedb242c05beaf3a
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/orientechnologies--orientdb/c451a00ae93071e63b4f70a3b7c2f9afe01c08ce/before/OSQLAsynchQuery.java
|
4d2e58143f3f248ef288aa835165d7f7176efbbf
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,752
|
java
|
/*
* Copyright 1999-2010 Luca Garulli (l.garulli--at--orientechnologies.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 com.orientechnologies.orient.core.sql.query;
import com.orientechnologies.orient.core.query.OAsynchQuery;
import com.orientechnologies.orient.core.query.OAsynchQueryResultListener;
import com.orientechnologies.orient.core.record.ORecordInternal;
import com.orientechnologies.orient.core.record.ORecordSchemaAware;
import com.orientechnologies.orient.core.storage.ORecordBrowsingListener;
/**
* SQL asynchronous query. When executed the caller doesn't wait the the execution, rather the listener will be called foreach item
* found in the query. OSQLAsynchQuery has been built on top of this.
*
* @author luca
*
* @param <T>
* @see OSQLSynchQuery
*/
public class OSQLAsynchQuery<T extends ORecordSchemaAware<?>> extends OSQLQuery<T> implements OAsynchQuery<T>,
ORecordBrowsingListener {
protected OAsynchQueryResultListener<T> resultListener;
protected int resultCount = 0;
/**
* Empty constructor for unmarshalling.
*/
public OSQLAsynchQuery() {
}
public OSQLAsynchQuery(final String iText) {
this(iText, null);
}
public OSQLAsynchQuery(final String iText, final OAsynchQueryResultListener<T> iResultListener) {
super(iText);
resultListener = iResultListener;
}
public Object execute(final String iText) {
return execute(iText, -1);
}
public Object execute(final String iText, final int iLimit) {
compiledFilter = null;
return execute(iLimit);
}
public T executeFirst() {
execute(1);
return null;
}
@SuppressWarnings("unchecked")
public boolean foreach(final ORecordInternal<?> iRecord) {
T record = (T) iRecord;
if (filter(record)) {
resultCount++;
resultListener.result((T) record.copy());
if (limit > -1 && resultCount == limit)
// BREAK THE EXECUTION
return false;
}
return true;
}
protected boolean filter(final T iRecord) {
return compiledFilter.evaluate(database, iRecord);
}
public OAsynchQueryResultListener<T> getResultListener() {
return resultListener;
}
public void setResultListener(final OAsynchQueryResultListener<T> resultListener) {
this.resultListener = resultListener;
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
cd2490f7847f82c7fc98904f7bba9e6df4498e57
|
b2f07f3e27b2162b5ee6896814f96c59c2c17405
|
/javax/swing/text/html/ListView.java
|
17cef65fb071c78ada0ec6db53fcf66bf5a6fbde
|
[] |
no_license
|
weiju-xi/RT-JAR-CODE
|
e33d4ccd9306d9e63029ddb0c145e620921d2dbd
|
d5b2590518ffb83596a3aa3849249cf871ab6d4e
|
refs/heads/master
| 2021-09-08T02:36:06.675911
| 2018-03-06T05:27:49
| 2018-03-06T05:27:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,672
|
java
|
/* */ package javax.swing.text.html;
/* */
/* */ import java.awt.Graphics;
/* */ import java.awt.Rectangle;
/* */ import java.awt.Shape;
/* */ import javax.swing.text.Element;
/* */
/* */ public class ListView extends BlockView
/* */ {
/* */ private StyleSheet.ListPainter listPainter;
/* */
/* */ public ListView(Element paramElement)
/* */ {
/* 44 */ super(paramElement, 1);
/* */ }
/* */
/* */ public float getAlignment(int paramInt)
/* */ {
/* 54 */ switch (paramInt) {
/* */ case 0:
/* 56 */ return 0.5F;
/* */ case 1:
/* 58 */ return 0.5F;
/* */ }
/* 60 */ throw new IllegalArgumentException("Invalid axis: " + paramInt);
/* */ }
/* */
/* */ public void paint(Graphics paramGraphics, Shape paramShape)
/* */ {
/* 73 */ super.paint(paramGraphics, paramShape);
/* 74 */ Rectangle localRectangle1 = paramShape.getBounds();
/* 75 */ Rectangle localRectangle2 = paramGraphics.getClipBounds();
/* */
/* 80 */ if (localRectangle2.x + localRectangle2.width < localRectangle1.x + getLeftInset()) {
/* 81 */ Rectangle localRectangle3 = localRectangle1;
/* 82 */ localRectangle1 = getInsideAllocation(paramShape);
/* 83 */ int i = getViewCount();
/* 84 */ int j = localRectangle2.y + localRectangle2.height;
/* 85 */ for (int k = 0; k < i; k++) {
/* 86 */ localRectangle3.setBounds(localRectangle1);
/* 87 */ childAllocation(k, localRectangle3);
/* 88 */ if (localRectangle3.y >= j) break;
/* 89 */ if (localRectangle3.y + localRectangle3.height >= localRectangle2.y)
/* 90 */ this.listPainter.paint(paramGraphics, localRectangle3.x, localRectangle3.y, localRectangle3.width, localRectangle3.height, this, k);
/* */ }
/* */ }
/* */ }
/* */
/* */ protected void paintChild(Graphics paramGraphics, Rectangle paramRectangle, int paramInt)
/* */ {
/* 112 */ this.listPainter.paint(paramGraphics, paramRectangle.x, paramRectangle.y, paramRectangle.width, paramRectangle.height, this, paramInt);
/* 113 */ super.paintChild(paramGraphics, paramRectangle, paramInt);
/* */ }
/* */
/* */ protected void setPropertiesFromAttributes() {
/* 117 */ super.setPropertiesFromAttributes();
/* 118 */ this.listPainter = getStyleSheet().getListPainter(getAttributes());
/* */ }
/* */ }
/* Location: C:\Program Files\Java\jdk1.7.0_79\jre\lib\rt.jar
* Qualified Name: javax.swing.text.html.ListView
* JD-Core Version: 0.6.2
*/
|
[
"yuexiahandao@gmail.com"
] |
yuexiahandao@gmail.com
|
b9572099edf509f033be956a1fd334935a71fc52
|
92dd6bc0a9435c359593a1f9b309bb58d3e3f103
|
/src/LeetcodeTemplate/_0037SudokuSolver.java
|
122731d78954e07e391593b3e07913f976a5d7cb
|
[
"MIT"
] |
permissive
|
darshanhs90/Java-Coding
|
bfb2eb84153a8a8a9429efc2833c47f6680f03f4
|
da76ccd7851f102712f7d8dfa4659901c5de7a76
|
refs/heads/master
| 2023-05-27T03:17:45.055811
| 2021-06-16T06:18:08
| 2021-06-16T06:18:08
| 36,981,580
| 3
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,374
|
java
|
package LeetcodeTemplate;
public class _0037SudokuSolver {
public static void main(String[] args) {
solveSudoku(new char[][] { new char[] { '5', '3', '.', '.', '7', '.', '.', '.', '.' },
new char[] { '6', '.', '.', '1', '9', '5', '.', '.', '.' },
new char[] { '.', '9', '8', '.', '.', '.', '.', '6', '.' },
new char[] { '8', '.', '.', '.', '6', '.', '.', '.', '3' },
new char[] { '4', '.', '.', '8', '.', '3', '.', '.', '1' },
new char[] { '7', '.', '.', '.', '2', '.', '.', '.', '6' },
new char[] { '.', '6', '.', '.', '.', '.', '2', '8', '.' },
new char[] { '.', '.', '.', '4', '1', '9', '.', '.', '5' },
new char[] { '.', '.', '.', '.', '8', '.', '.', '7', '9' } });
solveSudoku(new char[][] { new char[] { '8', '3', '.', '.', '7', '.', '.', '.', '.' },
new char[] { '6', '.', '.', '1', '9', '5', '.', '.', '.' },
new char[] { '.', '9', '8', '.', '.', '.', '.', '6', '.' },
new char[] { '8', '.', '.', '.', '6', '.', '.', '.', '3' },
new char[] { '4', '.', '.', '8', '.', '3', '.', '.', '1' },
new char[] { '7', '.', '.', '.', '2', '.', '.', '.', '6' },
new char[] { '.', '6', '.', '.', '.', '.', '2', '8', '.' },
new char[] { '.', '.', '.', '4', '1', '9', '.', '.', '5' },
new char[] { '.', '.', '.', '.', '8', '.', '.', '7', '9' } });
}
public static void solveSudoku(char[][] board) {
s
}
}
|
[
"hsdars@gmail.com"
] |
hsdars@gmail.com
|
7054c00f5eb1d8c75dcaeeb8b44d271f731c94e0
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/cloudphoto-20170711/src/main/java/com/aliyun/cloudphoto20170711/models/DeleteAlbumsRequest.java
|
ca29aa3e0fc77e0e8b066de7f33fd8a15cbcd9b8
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,195
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.cloudphoto20170711.models;
import com.aliyun.tea.*;
public class DeleteAlbumsRequest extends TeaModel {
@NameInMap("StoreName")
public String storeName;
@NameInMap("LibraryId")
public String libraryId;
@NameInMap("AlbumId")
public java.util.List<Integer> albumId;
public static DeleteAlbumsRequest build(java.util.Map<String, ?> map) throws Exception {
DeleteAlbumsRequest self = new DeleteAlbumsRequest();
return TeaModel.build(map, self);
}
public DeleteAlbumsRequest setStoreName(String storeName) {
this.storeName = storeName;
return this;
}
public String getStoreName() {
return this.storeName;
}
public DeleteAlbumsRequest setLibraryId(String libraryId) {
this.libraryId = libraryId;
return this;
}
public String getLibraryId() {
return this.libraryId;
}
public DeleteAlbumsRequest setAlbumId(java.util.List<Integer> albumId) {
this.albumId = albumId;
return this;
}
public java.util.List<Integer> getAlbumId() {
return this.albumId;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
7270faef29c485d4f04369a80409c4ddfefe7be0
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes5.dex_source_from_JADX/com/google/android/gms/internal/zztf.java
|
1933533c52e7094545f78369c15953407c605013
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,565
|
java
|
package com.google.android.gms.internal;
import java.lang.reflect.Array;
public class zztf<M extends zzte<M>, T> {
protected final int f6974a;
protected final Class<T> f6975b;
public final int f6976c;
protected final boolean f6977d;
private int m13009b(Object obj) {
int i = 0;
int length = Array.getLength(obj);
for (int i2 = 0; i2 < length; i2++) {
if (Array.get(obj, i2) != null) {
i += m13011c(Array.get(obj, i2));
}
}
return i;
}
private void m13010b(Object obj, zztd com_google_android_gms_internal_zztd) {
try {
com_google_android_gms_internal_zztd.m12999b(this.f6976c);
switch (this.f6974a) {
case 10:
zztk com_google_android_gms_internal_zztk = (zztk) obj;
int b = zztn.m13047b(this.f6976c);
com_google_android_gms_internal_zztd.m12998a(com_google_android_gms_internal_zztk);
com_google_android_gms_internal_zztd.m13003e(b, 4);
return;
case 11:
com_google_android_gms_internal_zztd.m13001b((zztk) obj);
return;
default:
throw new IllegalArgumentException("Unknown type " + this.f6974a);
}
} catch (Throwable e) {
throw new IllegalStateException(e);
}
}
private int m13011c(Object obj) {
int i = this.f6976c >>> 3;
switch (this.f6974a) {
case 10:
return (zztd.m12985h(i) * 2) + ((zztk) obj).m12903d();
case 11:
return zztd.m12978c(i, (zztk) obj);
default:
throw new IllegalArgumentException("Unknown type " + this.f6974a);
}
}
private void m13012c(Object obj, zztd com_google_android_gms_internal_zztd) {
int length = Array.getLength(obj);
for (int i = 0; i < length; i++) {
Object obj2 = Array.get(obj, i);
if (obj2 != null) {
m13010b(obj2, com_google_android_gms_internal_zztd);
}
}
}
final int m13013a(Object obj) {
return this.f6977d ? m13009b(obj) : m13011c(obj);
}
final void m13014a(Object obj, zztd com_google_android_gms_internal_zztd) {
if (this.f6977d) {
m13012c(obj, com_google_android_gms_internal_zztd);
} else {
m13010b(obj, com_google_android_gms_internal_zztd);
}
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
52760e77f659981a036859151acd13afcc8f1dc4
|
3285e8fe4c150aaccf9d589e8ac58d09f9b41a6f
|
/src/com/handsomezhou/appsearch/activity/MainActivity.java
|
3fa98fb19e681793ebfe07ef27d59abca838223a
|
[
"Apache-2.0"
] |
permissive
|
wgcwgc/Android_AppSearch
|
f3df329be0b3411d0a5731c935a4dd5def8e91c2
|
8f9064fac04cfba7017c8044005db87b3a017f7c
|
refs/heads/master
| 2020-04-19T09:59:53.734438
| 2016-08-31T03:17:01
| 2016-08-31T03:17:01
| 66,994,826
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,422
|
java
|
package com.handsomezhou.appsearch.activity;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.KeyEvent;
import android.widget.Toast;
import com.handsomezhou.appsearch.R;
import com.handsomezhou.appsearch.fragment.MainFragment;
import com.handsomezhou.appsearch.service.AppSearchService;
@SuppressLint("ResourceAsColor")
public class MainActivity extends BaseSingleFragmentActivity {
@SuppressWarnings("unused")
private static final String TAG = "MainActivity";
private Context mContext;
@SuppressWarnings("unused")
private MainFragment mMainFragment;
private static final int DOUBLE_CLICK_EXIT_TIME_INTERVAL_MILLIS = 2000;// ms
private static long mBackPressedTimeMillis;
@Override
protected void onCreate(Bundle savedInstanceState) {
mContext = this;
setFullScreen(false);
initData();
initView();
initListener();
super.onCreate(savedInstanceState);
}
@Override
protected void onResume() {
super.onResume();
}
@Override
protected void onPause() {
super.onPause();
}
@Override
protected Fragment createFragment() {
return mMainFragment= new MainFragment();
}
@Override
protected boolean isRealTimeLoadFragment() {
return false;
}
@Override
public void onBackPressed() {
doubleClickExit();
}
@Override
public boolean onKeyDown(int keycode, KeyEvent e) {
switch(keycode) {
case KeyEvent.KEYCODE_MENU:
enterAbout();
return true;
}
return super.onKeyDown(keycode, e);
}
private void initData() {
return;
}
private void initView() {
return;
}
private void initListener() {
return;
}
private void doubleClickExit() {
if (mBackPressedTimeMillis + DOUBLE_CLICK_EXIT_TIME_INTERVAL_MILLIS > System
.currentTimeMillis()) {
moveTaskToBack(true);
AppSearchService.startEasyHelperService(getApplicationContext());
} else {
String DoubleBackPressExitApp = mContext.getString(
R.string.double_back_press_exit_app,
mContext.getString(R.string.app_name));
Toast.makeText(mContext, DoubleBackPressExitApp, Toast.LENGTH_SHORT)
.show();
}
mBackPressedTimeMillis = System.currentTimeMillis();
}
private void enterAbout(){
Intent intent=new Intent(getContext(), AboutActivity.class);
startActivity(intent);
}
}
|
[
"1348066599@qq.com"
] |
1348066599@qq.com
|
66e1955f7efce49f99707e71b54580a0b1417335
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/MATH-70b-2-6-PESA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/analysis/solvers/BisectionSolver_ESTest.java
|
634c789932067bdab15ac303e7651189692d975d
|
[] |
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
| 826
|
java
|
/*
* This file was automatically generated by EvoSuite
* Thu Apr 02 13:07:12 UTC 2020
*/
package org.apache.commons.math.analysis.solvers;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.apache.commons.math.analysis.solvers.BisectionSolver;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class BisectionSolver_ESTest extends BisectionSolver_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
BisectionSolver bisectionSolver0 = new BisectionSolver();
// Undeclared exception!
bisectionSolver0.solve((-0.5926872495289567), 1.0);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
451adc47090e51b7fd9043dfa01523d2c2fba779
|
08c9c90bb4fd347269a896fda27d51ed8fb573d7
|
/src/main/java/br/mp/mppe/recadastramento/web/rest/errors/LoginAlreadyUsedException.java
|
00534ce492ff4650d8eec07a2e24c9b039ddcfe1
|
[] |
no_license
|
acsn2/recadastramento
|
ff51720bdd52709628d1e6f6acffc59adc7c9b7c
|
b5e9e1258c513ef987a4b097afeb311dbfa9afdd
|
refs/heads/master
| 2020-03-21T06:14:14.102288
| 2018-06-21T19:15:40
| 2018-06-21T19:15:40
| 138,205,626
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 346
|
java
|
package br.mp.mppe.recadastramento.web.rest.errors;
public class LoginAlreadyUsedException extends BadRequestAlertException {
private static final long serialVersionUID = 1L;
public LoginAlreadyUsedException() {
super(ErrorConstants.LOGIN_ALREADY_USED_TYPE, "Login name already used!", "userManagement", "userexists");
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
47880ffa23c4f76a7d64e2994d6e92d2e1caebba
|
8592ba0914fdbd076048d9ee1481c9d263ef1e8a
|
/framework/java/implementations/java/org.hl7.fhir.dstu2016may/src/org/hl7/fhir/dstu2016may/model/codesystems/MedicationAdminStatusEnumFactory.java
|
b72311bc78ea1b160b775cf48f18ba2c0c74732f
|
[] |
no_license
|
HL7/UTG
|
a6f35d038b76f4bf172c453c95fe0ed67cb88889
|
cc0ed03ee9b576e6d22bfd3e3ea34d694abc9d5b
|
refs/heads/master
| 2023-08-04T12:13:53.870641
| 2023-07-25T15:45:21
| 2023-07-25T15:45:21
| 133,315,209
| 9
| 9
| null | 2023-09-07T17:39:11
| 2018-05-14T06:33:02
|
Java
|
UTF-8
|
Java
| false
| false
| 3,070
|
java
|
package org.hl7.fhir.dstu2016may.model.codesystems;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0
import org.hl7.fhir.dstu2016may.model.EnumFactory;
public class MedicationAdminStatusEnumFactory implements EnumFactory<MedicationAdminStatus> {
public MedicationAdminStatus fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
return null;
if ("in-progress".equals(codeString))
return MedicationAdminStatus.INPROGRESS;
if ("on-hold".equals(codeString))
return MedicationAdminStatus.ONHOLD;
if ("completed".equals(codeString))
return MedicationAdminStatus.COMPLETED;
if ("entered-in-error".equals(codeString))
return MedicationAdminStatus.ENTEREDINERROR;
if ("stopped".equals(codeString))
return MedicationAdminStatus.STOPPED;
throw new IllegalArgumentException("Unknown MedicationAdminStatus code '"+codeString+"'");
}
public String toCode(MedicationAdminStatus code) {
if (code == MedicationAdminStatus.INPROGRESS)
return "in-progress";
if (code == MedicationAdminStatus.ONHOLD)
return "on-hold";
if (code == MedicationAdminStatus.COMPLETED)
return "completed";
if (code == MedicationAdminStatus.ENTEREDINERROR)
return "entered-in-error";
if (code == MedicationAdminStatus.STOPPED)
return "stopped";
return "?";
}
public String toSystem(MedicationAdminStatus code) {
return code.getSystem();
}
}
|
[
"ywang@imo-online.com"
] |
ywang@imo-online.com
|
9ccd071c1476b24c4357826bfbcb919ca933ee73
|
e7e4c88c5e48006ed8e54416fb55b74752303bb8
|
/core/src/main/java/com/omega/core/database/impl/morphia/converter/GuildTypeConverter.java
|
19403ede085bdd4a82911ee115e5a3a8be07e705
|
[] |
no_license
|
KyuBlade/BotOfSteel
|
a08311edb46fe387a6e0046e6d6abdbc9b05cce8
|
a1c918a6c982e833af4a05cb79829f966564e5a4
|
refs/heads/master
| 2020-05-26T15:35:59.843758
| 2018-10-22T15:39:31
| 2018-10-22T15:39:31
| 82,493,599
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 997
|
java
|
package com.omega.core.database.impl.morphia.converter;
import com.omega.core.BotManager;
import org.mongodb.morphia.converters.SimpleValueConverter;
import org.mongodb.morphia.converters.TypeConverter;
import org.mongodb.morphia.mapping.MappedField;
import sx.blah.discord.handle.impl.obj.Guild;
import sx.blah.discord.handle.obj.IGuild;
public class GuildTypeConverter extends TypeConverter implements SimpleValueConverter {
public GuildTypeConverter() {
super(IGuild.class, Guild.class);
}
@Override
public Object decode(Class<?> targetClass, Object fromDBObject, MappedField optionalExtraInfo) {
if (fromDBObject == null) {
return null;
}
return BotManager.getInstance().getClient().getGuildByID((long) fromDBObject);
}
@Override
public Object encode(Object value, MappedField optionalExtraInfo) {
if (value == null) {
return null;
}
return ((IGuild) value).getLongID();
}
}
|
[
"jonesadev@gmail.com"
] |
jonesadev@gmail.com
|
12319d24fdce280b877741439553eccf7cb11c7e
|
092c76fcc6c411ee77deef508e725c1b8277a2fe
|
/hybris/bin/ext-addon/cistax/testsrc/de/hybris/platform/integration/cis/tax/populators/CisLineItemPopulatorTest.java
|
14248b51e6a520be070d8bd2b455bd90172139cc
|
[
"MIT"
] |
permissive
|
BaggaShivanshu2/hybris-bookstore-tutorial
|
4de5d667bae82851fe4743025d9cf0a4f03c5e65
|
699ab7fd8514ac56792cb911ee9c1578d58fc0e3
|
refs/heads/master
| 2022-11-28T12:15:32.049256
| 2020-08-05T11:29:14
| 2020-08-05T11:29:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,510
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2014 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.integration.cis.tax.populators;
import static org.mockito.BDDMockito.given;
import de.hybris.bootstrap.annotations.UnitTest;
import de.hybris.platform.commerceservices.externaltax.TaxCodeStrategy;
import de.hybris.platform.core.model.order.AbstractOrderEntryModel;
import de.hybris.platform.core.model.order.AbstractOrderModel;
import de.hybris.platform.core.model.product.ProductModel;
import de.hybris.platform.integration.commons.OndemandDiscountedOrderEntry;
import java.math.BigDecimal;
import junit.framework.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import com.hybris.cis.api.model.CisLineItem;
/**
*
*
*/
@UnitTest
public class CisLineItemPopulatorTest
{
private final static String PRODUCT_CODE = "test-product";
private final static String PRODUCT_DESC = "This is a product";
private final static String PRODUCT_TAX_CODE = "test-tax-code";
private CisLineItemPopulator cisLineItemPopulator;
@Mock
private TaxCodeStrategy taxCodeStrategy;
@Before
public void setUp()
{
MockitoAnnotations.initMocks(this);
cisLineItemPopulator = new CisLineItemPopulator();
cisLineItemPopulator.setTaxCodeStrategy(taxCodeStrategy);
}
@Test
public void shouldPopulateLineItem()
{
final CisLineItem cisLineItem = new CisLineItem();
final OndemandDiscountedOrderEntry ondemandDiscountedOrderEntry = Mockito.mock(OndemandDiscountedOrderEntry.class);
final AbstractOrderEntryModel abstractOrderEntry = Mockito.mock(AbstractOrderEntryModel.class);
final ProductModel productModel = Mockito.mock(ProductModel.class);
final AbstractOrderModel abstractOrder = Mockito.mock(AbstractOrderModel.class);
given(abstractOrderEntry.getEntryNumber()).willReturn(Integer.valueOf(1));
given(productModel.getCode()).willReturn(PRODUCT_CODE);
given(productModel.getName()).willReturn(PRODUCT_DESC);
given(abstractOrderEntry.getProduct()).willReturn(productModel);
given(abstractOrderEntry.getQuantity()).willReturn(Long.valueOf(1));
given(abstractOrderEntry.getTotalPrice()).willReturn(Double.valueOf(15.95));
given(abstractOrderEntry.getOrder()).willReturn(abstractOrder);
given(taxCodeStrategy.getTaxCodeForCodeAndOrder(PRODUCT_CODE, abstractOrder)).willReturn(PRODUCT_TAX_CODE);
given(ondemandDiscountedOrderEntry.getDiscountedUnitPrice()).willReturn(BigDecimal.valueOf(15.95));
given(ondemandDiscountedOrderEntry.getOrderEntry()).willReturn(abstractOrderEntry);
cisLineItemPopulator.populate(ondemandDiscountedOrderEntry, cisLineItem);
Assert.assertEquals(abstractOrderEntry.getEntryNumber(), cisLineItem.getId());
Assert.assertEquals(PRODUCT_CODE, cisLineItem.getItemCode());
Assert.assertEquals(PRODUCT_DESC, cisLineItem.getProductDescription());
Assert.assertEquals(Integer.valueOf(abstractOrderEntry.getQuantity().intValue()), cisLineItem.getQuantity());
Assert.assertEquals(BigDecimal.valueOf(abstractOrderEntry.getTotalPrice().doubleValue()), cisLineItem.getUnitPrice());
Assert.assertEquals(PRODUCT_TAX_CODE, cisLineItem.getTaxCode());
}
}
|
[
"xelilim@hotmail.com"
] |
xelilim@hotmail.com
|
9ca80f12b2d6f735db5332b060077e40824410a5
|
e63363389e72c0822a171e450a41c094c0c1a49c
|
/Mate20_10_1_0/src/main/java/com/huawei/nb/model/collectencrypt/DicEventPolicyHelper.java
|
cd3caacdd59fcef7af1dd57d4332d3a549119f44
|
[] |
no_license
|
solartcc/HwFrameWorkSource
|
fc23ca63bcf17865e99b607cc85d89e16ec1b177
|
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
|
refs/heads/master
| 2022-12-04T21:14:37.581438
| 2020-08-25T04:30:43
| 2020-08-25T04:30:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,755
|
java
|
package com.huawei.nb.model.collectencrypt;
import android.database.Cursor;
import com.huawei.odmf.database.Statement;
import com.huawei.odmf.model.AEntityHelper;
public class DicEventPolicyHelper extends AEntityHelper<DicEventPolicy> {
private static final DicEventPolicyHelper INSTANCE = new DicEventPolicyHelper();
private DicEventPolicyHelper() {
}
public static DicEventPolicyHelper getInstance() {
return INSTANCE;
}
public void bindValue(Statement statement, DicEventPolicy object) {
Integer mId = object.getMId();
if (mId != null) {
statement.bindLong(1, (long) mId.intValue());
} else {
statement.bindNull(1);
}
Integer mEventType = object.getMEventType();
if (mEventType != null) {
statement.bindLong(2, (long) mEventType.intValue());
} else {
statement.bindNull(2);
}
String mEventName = object.getMEventName();
if (mEventName != null) {
statement.bindString(3, mEventName);
} else {
statement.bindNull(3);
}
String mEventDesc = object.getMEventDesc();
if (mEventDesc != null) {
statement.bindString(4, mEventDesc);
} else {
statement.bindNull(4);
}
Integer mColdDownTime = object.getMColdDownTime();
if (mColdDownTime != null) {
statement.bindLong(5, (long) mColdDownTime.intValue());
} else {
statement.bindNull(5);
}
Integer mMaxRecordOneday = object.getMMaxRecordOneday();
if (mMaxRecordOneday != null) {
statement.bindLong(6, (long) mMaxRecordOneday.intValue());
} else {
statement.bindNull(6);
}
Integer mReservedInt = object.getMReservedInt();
if (mReservedInt != null) {
statement.bindLong(7, (long) mReservedInt.intValue());
} else {
statement.bindNull(7);
}
String mReservedText = object.getMReservedText();
if (mReservedText != null) {
statement.bindString(8, mReservedText);
} else {
statement.bindNull(8);
}
}
@Override // com.huawei.odmf.model.AEntityHelper
public DicEventPolicy readObject(Cursor cursor, int offset) {
return new DicEventPolicy(cursor);
}
public void setPrimaryKeyValue(DicEventPolicy object, long value) {
object.setMId(Integer.valueOf((int) value));
}
public Object getRelationshipObject(String field, DicEventPolicy object) {
return null;
}
@Override // com.huawei.odmf.model.AEntityHelper
public int getNumberOfRelationships() {
return 0;
}
}
|
[
"lygforbs0@gmail.com"
] |
lygforbs0@gmail.com
|
ea7dd30d3d739b566090ca87343fb6518643cf1e
|
51d205aa1216eb18a7cf687d6730269d07e9233d
|
/Exercise1_06/src/Sum.java
|
a2905f2b6cb23548a7a1445c2b2427fe222f1946
|
[] |
no_license
|
11michi11/SDJ1
|
15363a0dde1a5a6af98b16dc07a45b5ac079dc13
|
0d0265e38a3dc845eab30551857714b4b67d1878
|
refs/heads/master
| 2021-09-01T02:14:40.395758
| 2017-12-24T10:43:32
| 2017-12-24T10:43:32
| 106,025,331
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 276
|
java
|
public class Sum
{
public static void main(String[] args) {
int item1 = 7, item2 = 9, item3 = 13, sum = 0;
sum = item1 + item2 + item3;
float x = 7.5f;
char z = 'h';
sum = item1/3;
System.out.println("Sum:" + sum);
}
}
|
[
"11michi11@gmail.com"
] |
11michi11@gmail.com
|
9252de7cd336b4ce2ee6c97b78c7a1e624621a65
|
997aa9253f43c4543fcd1fc6959531077038f2ad
|
/src/main/java/com/bjpowernode/crm/settings/domain/User.java
|
d9ff49c111f0e9afd947065be2f00fdd6cdcaa0c
|
[] |
no_license
|
bjpowernodeAdmin/crm_30
|
9c188acc850f9b99b510a1029e322ccaedffb719
|
58d702efb6223aeec25455b15b2b3367e8751d3d
|
refs/heads/master
| 2020-05-04T15:29:58.031344
| 2019-04-03T08:18:33
| 2019-04-03T08:18:33
| 179,243,488
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,940
|
java
|
package com.bjpowernode.crm.settings.domain;
public class User {
/*
*
* 关于时间:
*
* 对于企业级项目中,时间字符串的应用
* 有两种形式
* 年月日:yyyy-MM-dd 10位字符串
* 年月日时分秒:yyyy-MM-dd HH:mm:ss 19位字符串
*
* 对于我们的tbl_user用户表,其中有两处使用到了时间
* expireTime:失效时间 19位
* createTime/editTime:创建/修改 时间 19位
*
*
*
* 关于登录:
*
* 需要验证账号密码,如果账号密码正确
* 需要验证 失效时间,锁定状态,允许访问的ip地址
*
*
*
*
*/
private String id; //主键
private String loginAct; //登录账号
private String name; //用户的真实姓名
private String loginPwd; //登录密码
private String email; //邮箱
private String expireTime; //失效时间
private String lockState; //锁定状态
private String deptno; //部门编号
private String allowIps; //允许访问的ip地址
private String createTime; //创建时间
private String createBy; //创建人
private String editTime; //修改时间
private String editBy; //修改人
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getLoginAct() {
return loginAct;
}
public void setLoginAct(String loginAct) {
this.loginAct = loginAct;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLoginPwd() {
return loginPwd;
}
public void setLoginPwd(String loginPwd) {
this.loginPwd = loginPwd;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getExpireTime() {
return expireTime;
}
public void setExpireTime(String expireTime) {
this.expireTime = expireTime;
}
public String getLockState() {
return lockState;
}
public void setLockState(String lockState) {
this.lockState = lockState;
}
public String getDeptno() {
return deptno;
}
public void setDeptno(String deptno) {
this.deptno = deptno;
}
public String getAllowIps() {
return allowIps;
}
public void setAllowIps(String allowIps) {
this.allowIps = allowIps;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public String getEditTime() {
return editTime;
}
public void setEditTime(String editTime) {
this.editTime = editTime;
}
public String getEditBy() {
return editBy;
}
public void setEditBy(String editBy) {
this.editBy = editBy;
}
}
|
[
"zs@bjpowernode.com"
] |
zs@bjpowernode.com
|
a2bb63f64c2eceaf6d3c9070819516c1bf102df0
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/9/9_30ed10b824bbe8662f1f7a837cbec30302ca047e/Dashboard/9_30ed10b824bbe8662f1f7a837cbec30302ca047e_Dashboard_t.java
|
be81645a1bdacfa3c0e77552ff9fcf4c3f87d6fb
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,997
|
java
|
package timeSheet;
import timeSheet.database.entity.Employee;
import javax.servlet.http.HttpSession;
/**
* User: John Lawrence
* Date: 12/10/10
* Time: 12:43 AM
*/
public class Dashboard {
private HttpSession session;
public Dashboard(HttpSession session) {
this.session = session;
}
public String getMenu() {
StringBuilder sortedMenu = new StringBuilder();
if (session.getAttribute(SessionConst.employee.toString()) == null) {
return "";
}
Employee currentEmployee = (Employee) session.getAttribute(SessionConst.employee.toString());
switch (currentEmployee.getRole()) {
case Administrator:
sortedMenu.append("<a href=\"manageGroups.jsp\">Manage Groups</a><br />");
sortedMenu.append("<a href=\"manageEmployees.jsp\">Manage Employees</a><br />");
sortedMenu.append("<a href=\"manageSettings.jsp\">Manage Settings</a><br />");
sortedMenu.append("<a href=\"manageHourTypes.jsp\">Manage Hour Types</a><br />");
case Executive:
sortedMenu.append("<a href=\"reports/reports.jsp\">Reports</a><br />");
case Manager:
case AssistantManager:
case TimeSheetApproval:
sortedMenu.insert(0, "<a href=\"manageTime.jsp\">Manage Time</a><br />");
case Employee:
sortedMenu.insert(0, "<a href=\"manageUser.jsp\">Manage Account</a><br />");
if (!currentEmployee.getSalary()) {
sortedMenu.insert(0, "<a href=\"timeEntering.jsp\">Enter Time</a><br />");
}
}
return sortedMenu.toString();
}
public String getName() {
Object attribute = session.getAttribute(SessionConst.employee.toString());
if (attribute != null) {
return ((Employee) attribute).getName();
}
return "";
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
e7a7743b4e460d51a0504e30b1a5df0797572dbe
|
f8e300aa04370f8836393455b8a10da6ca1837e5
|
/CounselorAPP/app/src/main/java/com/cesaas/android/counselor/order/global/AppMenuPower.java
|
76a974e48e4bfcf01f0fe20dac3a43394c35d33c
|
[] |
no_license
|
FlyBiao/CounselorAPP
|
d36f56ee1d5989c279167064442d9ea3e0c3a3ae
|
b724c1457d7544844ea8b4f6f5a9205021c33ae3
|
refs/heads/master
| 2020-03-22T21:30:14.904322
| 2018-07-12T12:21:37
| 2018-07-12T12:21:37
| 140,691,614
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,370
|
java
|
package com.cesaas.android.counselor.order.global;
import java.io.Serializable;
/**
* App菜单权限
* @author FGB
*
*/
public class AppMenuPower implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
//订单
public static String APP_ORDER="APP_Order";
//会员
public static String APP_MENBER="APP_Member";
//微信拉粉
public static String APP_WX_LAFANS="APP_WeChat powder";
//店务
public static String APP_SHOP="APP_Shop";
//统计数据中心
public static String APP_DATA_CENTER="APP_datacenter";
//报数
public static String APP_NUMBER="APP_Number";
//商品
public static String APP_COMMODITY="APP_Commodity";
//商学院
public static String APP_COLLEGE="APP_College";
//POS收银
public static String APP_POS_CASHIER="APP_POSCashier";
//个人中心
public static String APP_PERSONAL_CENTER="APP_Personal Center";
//设置
public static String APP_SET_UP="APP_Set up";
//店员管理
public static String APP_SHOP_STAFF_MANGER="APP_Shop_staff";
public int APPORDER;
public int APPMENBER;
public int APPWXLAFANS;
public int APPSHOP;
public int APPDATACENTER;
public int APPNUMBER;
public int APPCOMMODITY;
public int APPCOLLEGE;
public int APPPOS_CASHIER;
public int APPPERSONALCENTER;
public int APPSET_UP;
public int APP_SHOPSTAFF_MANGER;
}
|
[
"fengguangbiao@163.com"
] |
fengguangbiao@163.com
|
c640126610235902dcca9b73689bda89bcf31a30
|
6452a69a89d2ca1227d2c83f7504ba33a4a6a1b0
|
/src/main/java/com/alok/mobilegateway/config/LoggingAspectConfiguration.java
|
40704acb91313d3c425b62adfe72002b4b8e3413
|
[] |
no_license
|
alokkulkarni/mobileGateway
|
d550ced4b53687b7ea37c791e98085ee590cd84f
|
f910779eb0034643a0371d33bf468c3deb353c9c
|
refs/heads/master
| 2021-06-15T23:57:14.949326
| 2019-06-28T10:00:56
| 2019-06-28T10:00:56
| 194,250,153
| 1
| 0
| null | 2021-04-29T21:52:44
| 2019-06-28T09:52:13
|
Java
|
UTF-8
|
Java
| false
| false
| 506
|
java
|
package com.alok.mobilegateway.config;
import com.alok.mobilegateway.aop.logging.LoggingAspect;
import io.github.jhipster.config.JHipsterConstants;
import org.springframework.context.annotation.*;
import org.springframework.core.env.Environment;
@Configuration
@EnableAspectJAutoProxy
public class LoggingAspectConfiguration {
@Bean
@Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)
public LoggingAspect loggingAspect(Environment env) {
return new LoggingAspect(env);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
8dbb01d091d397203c6a154f031cd6ed0bef3caa
|
54c1dcb9a6fb9e257c6ebe7745d5008d29b0d6b6
|
/app/src/main/java/com/p118pd/sdk/oO000O0.java
|
7399bf9e72256c8fa068c1f1e28fc1621ecd6f3a
|
[] |
no_license
|
rcoolboy/guilvN
|
3817397da465c34fcee82c0ca8c39f7292bcc7e1
|
c779a8e2e5fd458d62503dc1344aa2185101f0f0
|
refs/heads/master
| 2023-05-31T10:04:41.992499
| 2021-07-07T09:58:05
| 2021-07-07T09:58:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,075
|
java
|
package com.p118pd.sdk;
import androidx.annotation.NonNull;
import com.bumptech.glide.Priority;
import com.bumptech.glide.load.DataSource;
import com.p118pd.sdk.AbstractC7662o0oOooo0;
import com.p118pd.sdk.AbstractC7770oO00000o;
/* renamed from: com.pd.sdk.oO000O0 */
public class oO000O0<Model> implements AbstractC7770oO00000o<Model, Model> {
public static final oO000O0<?> OooO00o = new oO000O0<>();
/* renamed from: com.pd.sdk.oO000O0$OooO00o */
public static class OooO00o<Model> implements AbstractC7771oO0000O<Model, Model> {
public static final OooO00o<?> OooO00o = new OooO00o<>();
public static <T> OooO00o<T> OooO00o() {
return (OooO00o<T>) OooO00o;
}
@Override // com.p118pd.sdk.AbstractC7771oO0000O
/* renamed from: OooO00o reason: collision with other method in class */
public void m19427OooO00o() {
}
@Override // com.p118pd.sdk.AbstractC7771oO0000O
@NonNull
public AbstractC7770oO00000o<Model, Model> OooO00o(C7772oO0000o oo0000o) {
return oO000O0.OooO00o();
}
}
/* renamed from: com.pd.sdk.oO000O0$OooO0O0 */
public static class OooO0O0<Model> implements AbstractC7662o0oOooo0<Model> {
public final Model OooO00o;
public OooO0O0(Model model) {
this.OooO00o = model;
}
@Override // com.p118pd.sdk.AbstractC7662o0oOooo0, com.p118pd.sdk.AbstractC7662o0oOooo0, com.p118pd.sdk.AbstractC7662o0oOooo0
/* renamed from: OooO00o reason: collision with other method in class */
public void m19429OooO00o() {
}
@Override // com.p118pd.sdk.AbstractC7662o0oOooo0
public void OooO00o(@NonNull Priority priority, @NonNull AbstractC7662o0oOooo0.OooO00o<? super Model> oooO00o) {
oooO00o.OooO00o((Object) this.OooO00o);
}
@Override // com.p118pd.sdk.AbstractC7662o0oOooo0
public void cancel() {
}
@Override // com.p118pd.sdk.AbstractC7662o0oOooo0, com.p118pd.sdk.AbstractC7662o0oOooo0, com.p118pd.sdk.AbstractC7662o0oOooo0
@NonNull
/* renamed from: OooO00o reason: collision with other method in class */
public Class<Model> m19428OooO00o() {
return (Class<Model>) this.OooO00o.getClass();
}
@Override // com.p118pd.sdk.AbstractC7662o0oOooo0, com.p118pd.sdk.AbstractC7662o0oOooo0, com.p118pd.sdk.AbstractC7662o0oOooo0
@NonNull
public DataSource OooO00o() {
return DataSource.LOCAL;
}
}
public static <T> oO000O0<T> OooO00o() {
return (oO000O0<T>) OooO00o;
}
@Override // com.p118pd.sdk.AbstractC7770oO00000o
public boolean OooO00o(@NonNull Model model) {
return true;
}
@Override // com.p118pd.sdk.AbstractC7770oO00000o
public AbstractC7770oO00000o.OooO00o<Model> OooO00o(@NonNull Model model, int i, int i2, @NonNull C7648o0oOoOo o0ooooo) {
return new AbstractC7770oO00000o.OooO00o<>(new C7885oO0Oo00O(model), new OooO0O0(model));
}
}
|
[
"593746220@qq.com"
] |
593746220@qq.com
|
ce3511817c07c4a58697b8bd81b0b7b595fe0041
|
faf825ce4412a786aba44c9ced5f673d446fcd3c
|
/1.10.2/src/main/java/stevekung/mods/moreplanets/module/planets/nibiru/items/ItemInfectedSugarCane.java
|
97bd7fec6a8d232b4f3bc6a625f82fb8889e2432
|
[] |
no_license
|
AugiteSoul/MorePlanets
|
87022c06706c3194bde6926039ee7f28acf4983f
|
dd1941d7d520cb372db41abee67d865bd5125f87
|
refs/heads/master
| 2021-08-15T12:23:01.538212
| 2017-11-16T16:00:34
| 2017-11-16T16:00:34
| 111,147,939
| 0
| 0
| null | 2017-11-17T20:32:07
| 2017-11-17T20:32:06
| null |
UTF-8
|
Java
| false
| false
| 3,351
|
java
|
package stevekung.mods.moreplanets.module.planets.nibiru.items;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSnow;
import net.minecraft.block.SoundType;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import stevekung.mods.moreplanets.module.planets.nibiru.blocks.NibiruBlocks;
import stevekung.mods.moreplanets.util.blocks.BlockBushMP;
import stevekung.mods.moreplanets.util.helper.BlockStateHelper;
import stevekung.mods.moreplanets.util.items.EnumSortCategoryItem;
import stevekung.mods.moreplanets.util.items.ItemBaseMP;
public class ItemInfectedSugarCane extends ItemBaseMP
{
public ItemInfectedSugarCane(String name)
{
super();
this.setUnlocalizedName(name);
}
@Override
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ)
{
IBlockState iblockstate = world.getBlockState(pos);
Block block = iblockstate.getBlock();
BlockBushMP cane = NibiruBlocks.INFECTED_SUGAR_CANE_BLOCK;
if (block == Blocks.SNOW_LAYER && iblockstate.getValue(BlockSnow.LAYERS).intValue() < 1 || block == NibiruBlocks.INFECTED_SNOW_LAYER && iblockstate.getValue(BlockStateHelper.LAYERS).intValue() < 1)
{
facing = EnumFacing.UP;
}
else if (!block.isReplaceable(world, pos))
{
pos = pos.offset(facing);
}
if (player.canPlayerEdit(pos, facing, stack) && stack.stackSize != 0 && world.canBlockBePlaced(cane, pos, false, facing, (Entity)null, stack))
{
IBlockState iblockstate1 = cane.getStateForPlacement(world, pos, facing, hitX, hitY, hitZ, 0, player, stack);
if (!world.setBlockState(pos, iblockstate1, 11))
{
return EnumActionResult.FAIL;
}
else
{
iblockstate1 = world.getBlockState(pos);
if (iblockstate1.getBlock() == cane)
{
ItemBlock.setTileEntityNBT(world, player, pos, stack);
iblockstate1.getBlock().onBlockPlacedBy(world, pos, iblockstate1, player, stack);
}
SoundType soundtype = iblockstate1.getBlock().getSoundType(iblockstate1, world, pos, player);
world.playSound(player, pos, soundtype.getPlaceSound(), SoundCategory.BLOCKS, (soundtype.getVolume() + 1.0F) / 2.0F, soundtype.getPitch() * 0.8F);
--stack.stackSize;
return EnumActionResult.SUCCESS;
}
}
else
{
return EnumActionResult.FAIL;
}
}
@Override
public EnumSortCategoryItem getItemCategory(int meta)
{
return EnumSortCategoryItem.PLACEABLE_PLANT;
}
@Override
public String getName()
{
return "infected_sugar_cane";
}
}
|
[
"mccommander_minecraft@hotmail.com"
] |
mccommander_minecraft@hotmail.com
|
41ea23d0603dc95a9dc62ada584e974484472c4a
|
eb5f5353f49ee558e497e5caded1f60f32f536b5
|
/java/lang/management/PlatformLoggingMXBean.java
|
2e07c497efb59d4b9b58b65910daffdedf7f6f11
|
[] |
no_license
|
mohitrajvardhan17/java1.8.0_151
|
6fc53e15354d88b53bd248c260c954807d612118
|
6eeab0c0fd20be34db653f4778f8828068c50c92
|
refs/heads/master
| 2020-03-18T09:44:14.769133
| 2018-05-23T14:28:24
| 2018-05-23T14:28:24
| 134,578,186
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 605
|
java
|
package java.lang.management;
import java.util.List;
public abstract interface PlatformLoggingMXBean
extends PlatformManagedObject
{
public abstract List<String> getLoggerNames();
public abstract String getLoggerLevel(String paramString);
public abstract void setLoggerLevel(String paramString1, String paramString2);
public abstract String getParentLoggerName(String paramString);
}
/* Location: C:\Program Files (x86)\Java\jre1.8.0_151\lib\rt.jar!\java\lang\management\PlatformLoggingMXBean.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 0.7.1
*/
|
[
"mohit.rajvardhan@ericsson.com"
] |
mohit.rajvardhan@ericsson.com
|
f09f502124c824dc08e8d02993e10e7111765be1
|
0278c5e7eda93a5d4df0c9a1f5332817a826cf7c
|
/spring-jwt/src/main/java/com/tampro/config/JwtRequestFilter.java
|
bae40cb94e855d7600a5ecfbdf285e6216b8eba0
|
[] |
no_license
|
xomrayno1/spring-jwt
|
b46a818757a7efc1d79d993a78c5a151c2e64ae9
|
3a998b627c00ebccde67bdccd5dc4dccca526878
|
refs/heads/master
| 2023-02-10T23:58:11.589542
| 2021-01-10T11:34:48
| 2021-01-10T11:34:48
| 328,367,174
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,254
|
java
|
package com.tampro.config;
import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;
import com.tampro.service.JwtUserDetailsService;
import io.jsonwebtoken.ExpiredJwtException;
/*
* check token gữi lên
*
*/
@Component
public class JwtRequestFilter extends OncePerRequestFilter{
@Autowired
private JwtUserDetailsService jwtUserDetailsService;
@Autowired
private JwtTokenUtil jwtTokenUtil;
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
// TODO Auto-generated method stub
final String requestTokenHeader = request.getHeader("Authorization"); //lấy ra token
String username = null;
String jwtToken = null;
// JWT Token is in the form "Bearer token". Remove Bearer word and get
// only the Token
if (requestTokenHeader != null && requestTokenHeader.startsWith("Bearer ")) { //check token
jwtToken = requestTokenHeader.substring(7);
try {
username = jwtTokenUtil.getUsernameFromToken(jwtToken);
} catch (IllegalArgumentException e) {
System.out.println("Unable to get JWT Token");
} catch (ExpiredJwtException e) {
System.out.println("JWT Token has expired");
}
} else {
logger.warn("JWT Token does not begin with Bearer String");
}
// Once we get the token validate it.
if (username != null && SecurityContextHolder.getContext().getAuthentication() == null) {
UserDetails userDetails = this.jwtUserDetailsService.loadUserByUsername(username);
// if token is valid configure Spring Security to manually set
// authentication
if (jwtTokenUtil.validateToken(jwtToken, userDetails)) {
UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken = new UsernamePasswordAuthenticationToken(
userDetails, null, userDetails.getAuthorities());
usernamePasswordAuthenticationToken
.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
// After setting the Authentication in the context, we specify
// that the current user is authenticated. So it passes the
// Spring Security Configurations successfully.
SecurityContextHolder.getContext().setAuthentication(usernamePasswordAuthenticationToken);
}
}
filterChain.doFilter(request, response);
}
}
|
[
"xomrayno5"
] |
xomrayno5
|
cc7d0bec2cd969fcd968f2c5087f66e31166cd78
|
6889f8f30f36928a2cd8ba880032c855ac1cc66c
|
/SemplestServiceMSNv8r3/src/com/microsoft/adcenter/v8/HoursOfOperation.java
|
1d0f5904fcdfc9d464a6f43d592309a6614d53db
|
[] |
no_license
|
enterstudio/semplest2
|
77ceb4fe6d076f8c161d24b510048802cd029b67
|
44eeade468a78ef647c62deb4cec2bea4318b455
|
refs/heads/master
| 2022-12-28T18:35:54.723459
| 2012-11-20T15:39:09
| 2012-11-20T15:39:09
| 86,645,696
| 0
| 0
| null | 2020-10-14T08:14:22
| 2017-03-30T01:32:35
|
Roff
|
UTF-8
|
Java
| false
| false
| 6,403
|
java
|
/**
* HoursOfOperation.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package com.microsoft.adcenter.v8;
public class HoursOfOperation implements java.io.Serializable {
private com.microsoft.adcenter.v8.Day day;
private com.microsoft.adcenter.v8.DayTimeInterval openTime1;
private com.microsoft.adcenter.v8.DayTimeInterval openTime2;
public HoursOfOperation() {
}
public HoursOfOperation(
com.microsoft.adcenter.v8.Day day,
com.microsoft.adcenter.v8.DayTimeInterval openTime1,
com.microsoft.adcenter.v8.DayTimeInterval openTime2) {
this.day = day;
this.openTime1 = openTime1;
this.openTime2 = openTime2;
}
/**
* Gets the day value for this HoursOfOperation.
*
* @return day
*/
public com.microsoft.adcenter.v8.Day getDay() {
return day;
}
/**
* Sets the day value for this HoursOfOperation.
*
* @param day
*/
public void setDay(com.microsoft.adcenter.v8.Day day) {
this.day = day;
}
/**
* Gets the openTime1 value for this HoursOfOperation.
*
* @return openTime1
*/
public com.microsoft.adcenter.v8.DayTimeInterval getOpenTime1() {
return openTime1;
}
/**
* Sets the openTime1 value for this HoursOfOperation.
*
* @param openTime1
*/
public void setOpenTime1(com.microsoft.adcenter.v8.DayTimeInterval openTime1) {
this.openTime1 = openTime1;
}
/**
* Gets the openTime2 value for this HoursOfOperation.
*
* @return openTime2
*/
public com.microsoft.adcenter.v8.DayTimeInterval getOpenTime2() {
return openTime2;
}
/**
* Sets the openTime2 value for this HoursOfOperation.
*
* @param openTime2
*/
public void setOpenTime2(com.microsoft.adcenter.v8.DayTimeInterval openTime2) {
this.openTime2 = openTime2;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof HoursOfOperation)) return false;
HoursOfOperation other = (HoursOfOperation) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
((this.day==null && other.getDay()==null) ||
(this.day!=null &&
this.day.equals(other.getDay()))) &&
((this.openTime1==null && other.getOpenTime1()==null) ||
(this.openTime1!=null &&
this.openTime1.equals(other.getOpenTime1()))) &&
((this.openTime2==null && other.getOpenTime2()==null) ||
(this.openTime2!=null &&
this.openTime2.equals(other.getOpenTime2())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
if (getDay() != null) {
_hashCode += getDay().hashCode();
}
if (getOpenTime1() != null) {
_hashCode += getOpenTime1().hashCode();
}
if (getOpenTime2() != null) {
_hashCode += getOpenTime2().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(HoursOfOperation.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://adcenter.microsoft.com/v8", "HoursOfOperation"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("day");
elemField.setXmlName(new javax.xml.namespace.QName("https://adcenter.microsoft.com/v8", "Day"));
elemField.setXmlType(new javax.xml.namespace.QName("https://adcenter.microsoft.com/v8", "Day"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("openTime1");
elemField.setXmlName(new javax.xml.namespace.QName("https://adcenter.microsoft.com/v8", "openTime1"));
elemField.setXmlType(new javax.xml.namespace.QName("https://adcenter.microsoft.com/v8", "DayTimeInterval"));
elemField.setMinOccurs(0);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("openTime2");
elemField.setXmlName(new javax.xml.namespace.QName("https://adcenter.microsoft.com/v8", "openTime2"));
elemField.setXmlType(new javax.xml.namespace.QName("https://adcenter.microsoft.com/v8", "DayTimeInterval"));
elemField.setMinOccurs(0);
elemField.setNillable(true);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
|
[
"mitch@02200ff9-b5b2-46f0-9171-221b09c08c7b"
] |
mitch@02200ff9-b5b2-46f0-9171-221b09c08c7b
|
b7d38ec35db93470fdd75a35ccb59664e6528f5b
|
672a48f7fdd9dab4224b3c504e34fed1c170a8f5
|
/src/ru/nsu/ccfit/zuev/osu/SkinManager.java
|
a4d1ee010764dbc92c26734fd89e5acdc86e3506
|
[
"Apache-2.0"
] |
permissive
|
yuki4dev/osu-droid
|
f1402df178a326705bb8e024c28a0310991c6f13
|
892695ca197cb0a09ab13d9b5fb1951fe65e6f93
|
refs/heads/master
| 2023-03-14T13:44:36.928214
| 2023-02-24T05:58:09
| 2023-02-24T05:58:09
| 260,174,517
| 0
| 0
|
Apache-2.0
| 2020-04-30T09:55:12
| 2020-04-30T09:55:11
| null |
UTF-8
|
Java
| false
| false
| 3,902
|
java
|
package ru.nsu.ccfit.zuev.osu;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
public class SkinManager {
private static SkinManager instance = new SkinManager();
private static Map<String, Integer> frameCount = new HashMap<String, Integer>();
private static Map<String, Integer> stdframeCount = new HashMap<String, Integer>();
private static boolean skinEnabled = true;
static {
stdframeCount.put("sliderb", 10);
stdframeCount.put("followpoint", 1);
stdframeCount.put("scorebar-colour", 4);
stdframeCount.put("play-skip", 1);
stdframeCount.put("sliderfollowcircle", 1);
frameCount.putAll(stdframeCount);
}
private final RGBColor sliderColor = new RGBColor(1, 1, 1);
private String skinname = "";
private SkinManager() {
}
public static SkinManager getInstance() {
return instance;
}
public static boolean isSkinEnabled() {
return skinEnabled;
}
public static void setSkinEnabled(final boolean skinEnabled) {
SkinManager.skinEnabled = skinEnabled;
}
public static int getFrames(final String texname) {
if (frameCount.containsKey(texname) == false) {
return 0;
}
return frameCount.get(texname);
}
public static void setFrames(final String texname, final int frames) {
frameCount.put(texname, frames);
}
public RGBColor getSliderColor() {
return sliderColor;
}
public void presetFrameCount() {
stdframeCount.put("sliderb", 10);
stdframeCount.put("followpoint", 1);
stdframeCount.put("scorebar-colour", 4);
stdframeCount.put("play-skip", 1);
stdframeCount.put("sliderfollowcircle", 1);
for (final String s : stdframeCount.keySet()) {
final int fcount = ResourceManager.getInstance().getFrameCount(s);
if (fcount >= 0) {
stdframeCount.put(s, fcount);
}
}
frameCount.clear();
frameCount.putAll(stdframeCount);
}
public void loadBeatmapSkin(final String beatmapFolder) {
skinEnabled = true;
if (skinname.equals(beatmapFolder)) {
return;
}
clearSkin();
skinname = beatmapFolder;
final File folderFile = new File(beatmapFolder);
for (final File f : folderFile.listFiles()) {
if (f.isFile() == false) {
continue;
}
if (Config.isUseCustomSounds()
&& (f.getName().toLowerCase().matches(".*[.]wav")
|| f.getName().toLowerCase().matches(".*[.]mp3"))) {
ResourceManager.getInstance().loadCustomSound(f);
} else if (Config.isUseCustomSkins()
&& (f.getName().toLowerCase().matches(".*[.]png")
|| f.getName().toLowerCase().matches(".*[.]jpg"))) {
ResourceManager.getInstance().loadCustomTexture(f);
}
}
if (!Config.isUseCustomSkins()) return;
for (final String s : frameCount.keySet()) {
final int fcount = ResourceManager.getInstance().getFrameCount(s);
if (fcount >= 0) {
frameCount.put(s, fcount);
}
}
}
public void clearSkin() {
if (skinname.equals("")) {
return;
}
skinname = "";
frameCount.put("sliderb", stdframeCount.get("sliderb"));
frameCount.put("followpoint", stdframeCount.get("followpoint"));
frameCount.put("scorebar-colour", stdframeCount.get("scorebar-colour"));
frameCount.put("play-skip", stdframeCount.get("play-skip"));
frameCount.put("sliderfollowcircle",
stdframeCount.get("sliderfollowcircle"));
ResourceManager.getInstance().clearCustomResources();
}
}
|
[
"793971297@qq.com"
] |
793971297@qq.com
|
1f2bdd2bd374eb20af65e2c29605de503d748671
|
7d9147f42358d85df4f3b077c8eca7ae57b0816a
|
/src/com/nieyue/dao/BaseDao.java
|
a192281e59286cbf696c0a5286a81e10bd046369
|
[] |
no_license
|
nieyue/DecisionTreeC45
|
dc30ffa490a6d16ebffe3421e14e689dd94fb811
|
cfa0e92c1a4c541757bf7d895798ee5a8dce362a
|
refs/heads/master
| 2020-03-18T01:54:06.553816
| 2018-06-08T16:18:10
| 2018-06-08T16:18:10
| 134,165,058
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,207
|
java
|
package com.nieyue.dao;
import java.util.List;
import java.util.Map;
/**
* 基础数据访问接口
* @author 聂跃
* @date 2018年4月17日
*/
public interface BaseDao<T, ID> {
/** 新增*/
public boolean add(T t) ;
/** 删除*/
public boolean delete(Integer ID) ;
/** 更新*/
public boolean update(T t) ;
/** 装载*/
public T load(Integer ID) ;
/**
* 装载
* eq = 等于
* gt > 大于
* ge >= 大于等于
* lt < 小于
* between 两个之间
* like 模糊查询
* in 范围里面
* and 并且 (自定义时需要)
* or 或者(自定义时需要)
*/
public int countAll(
Map<String,Object> eq,
Map<String,Object> gt,
Map<String,Object> ge,
Map<String,Object> lt,
Map<String,Object> le,
Map<String,List<Object>> between,
Map<String,Object> like,
Map<String,List<Object>> in
);
/** 浏览*/
public List<T> list(
int pageNum,
int pageSize,
String orderName,
String orderWay,
Map<String,Object> eq,
Map<String,Object> gt,
Map<String,Object> ge,
Map<String,Object> lt,
Map<String,Object> le,
Map<String,List<Object>> between,
Map<String,Object> like,
Map<String,List<Object>> in
);
}
|
[
"278076304@qq.com"
] |
278076304@qq.com
|
837dd7975cca369da356a34ba63f08bcba96d4a5
|
37fc6588a4287932675faa6c6fa80b5230a0710d
|
/yeju-service-interfaces/yeju-sms-service-interfaces/src/main/java/pers/lbf/yeju/service/interfaces/sms/pojo/SmsTemplateUpdateArgs.java
|
fa5fc4094bd2174ba91b45cecf9cca63c7374be8
|
[
"Apache-2.0"
] |
permissive
|
bingfenglai/yeju
|
80abf56300ddfe6c0aca510540a4a64d654e8149
|
56902cd26ed79eb2a79b200219b36ba4ddbf8128
|
refs/heads/main
| 2023-06-10T11:46:43.566400
| 2021-06-21T09:54:26
| 2021-06-21T09:54:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,682
|
java
|
/*
* Copyright 2020 赖柄沣 bingfengdev@aliyun.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 pers.lbf.yeju.service.interfaces.sms.pojo;
import pers.lbf.yeju.common.core.args.IUpdateArgs;
import java.io.Serializable;
import java.util.Date;
/**
* TODO
*
* @author 赖柄沣 bingfengdev@aliyun.com
* @version 1.0
* @date 2021/4/15 22:02
*/
public class SmsTemplateUpdateArgs extends SmsTemplateCreateArgs implements Serializable, IUpdateArgs {
private Long id;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更改者
*/
private Long changedBy;
@Override
public void setChangedBy(String account) {
this.changedBy = Long.valueOf(account);
}
@Override
public void setUpdateTime(Date date) {
this.updateTime = date;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Date getUpdateTime() {
return updateTime;
}
public Long getChangedBy() {
return changedBy;
}
public void setChangedBy(Long changedBy) {
this.changedBy = changedBy;
}
}
|
[
"bingfengdev@aliyun.com"
] |
bingfengdev@aliyun.com
|
7757ad487c73ca68f188aa47b0462269dd0611b2
|
31e1037290bba086bbf3d32b5e05479b254addbc
|
/todo-jms/src/main/java/com/example/todojms/err/ToDoErrorHnadler.java
|
51ccb343eec5e508d7f88d73b3c678efc4249d01
|
[] |
no_license
|
nimakashian/boot-tut
|
7f09da7d3d49d906984d813b51b5795ff6afd9e3
|
d2ca132937cdc6b42af180059d9f373a6bb88f36
|
refs/heads/master
| 2020-06-05T20:20:48.614018
| 2019-09-08T12:17:26
| 2019-09-08T12:17:26
| 192,537,200
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 447
|
java
|
package com.example.todojms.err;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.ErrorHandler;
public class ToDoErrorHnadler implements ErrorHandler {
private static Logger logger= LoggerFactory.getLogger(ToDoErrorHnadler.class);
@Override
public void handleError(Throwable throwable) {
logger.warn("ToDo Error ...");
logger.info(throwable.getCause().getMessage());
}
}
|
[
"a@a.com"
] |
a@a.com
|
8773cd1979c0cfe65cbe3edcbdf443631bde99ab
|
1742b6719b988e5519373002305e31d28b8bd691
|
/sdk/java/src/main/java/com/pulumi/aws/servicediscovery/inputs/InstanceState.java
|
f5cdbb6f919a4d9f7a7803a97b3581feafa69a89
|
[
"BSD-3-Clause",
"Apache-2.0",
"MPL-2.0"
] |
permissive
|
pulumi/pulumi-aws
|
4f7fdb4a816c5ea357cff2c2e3b613c006e49f1a
|
42b0a0abdf6c14da248da22f8c4530af06e67b98
|
refs/heads/master
| 2023-08-03T23:08:34.520280
| 2023-08-01T18:09:58
| 2023-08-01T18:09:58
| 97,484,940
| 384
| 171
|
Apache-2.0
| 2023-09-14T14:48:40
| 2017-07-17T14:20:33
|
Java
|
UTF-8
|
Java
| false
| false
| 4,795
|
java
|
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.aws.servicediscovery.inputs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class InstanceState extends com.pulumi.resources.ResourceArgs {
public static final InstanceState Empty = new InstanceState();
/**
* A map contains the attributes of the instance. Check the [doc](https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html#API_RegisterInstance_RequestSyntax) for the supported attributes and syntax.
*
*/
@Import(name="attributes")
private @Nullable Output<Map<String,String>> attributes;
/**
* @return A map contains the attributes of the instance. Check the [doc](https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html#API_RegisterInstance_RequestSyntax) for the supported attributes and syntax.
*
*/
public Optional<Output<Map<String,String>>> attributes() {
return Optional.ofNullable(this.attributes);
}
/**
* The ID of the service instance.
*
*/
@Import(name="instanceId")
private @Nullable Output<String> instanceId;
/**
* @return The ID of the service instance.
*
*/
public Optional<Output<String>> instanceId() {
return Optional.ofNullable(this.instanceId);
}
/**
* The ID of the service that you want to use to create the instance.
*
*/
@Import(name="serviceId")
private @Nullable Output<String> serviceId;
/**
* @return The ID of the service that you want to use to create the instance.
*
*/
public Optional<Output<String>> serviceId() {
return Optional.ofNullable(this.serviceId);
}
private InstanceState() {}
private InstanceState(InstanceState $) {
this.attributes = $.attributes;
this.instanceId = $.instanceId;
this.serviceId = $.serviceId;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(InstanceState defaults) {
return new Builder(defaults);
}
public static final class Builder {
private InstanceState $;
public Builder() {
$ = new InstanceState();
}
public Builder(InstanceState defaults) {
$ = new InstanceState(Objects.requireNonNull(defaults));
}
/**
* @param attributes A map contains the attributes of the instance. Check the [doc](https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html#API_RegisterInstance_RequestSyntax) for the supported attributes and syntax.
*
* @return builder
*
*/
public Builder attributes(@Nullable Output<Map<String,String>> attributes) {
$.attributes = attributes;
return this;
}
/**
* @param attributes A map contains the attributes of the instance. Check the [doc](https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html#API_RegisterInstance_RequestSyntax) for the supported attributes and syntax.
*
* @return builder
*
*/
public Builder attributes(Map<String,String> attributes) {
return attributes(Output.of(attributes));
}
/**
* @param instanceId The ID of the service instance.
*
* @return builder
*
*/
public Builder instanceId(@Nullable Output<String> instanceId) {
$.instanceId = instanceId;
return this;
}
/**
* @param instanceId The ID of the service instance.
*
* @return builder
*
*/
public Builder instanceId(String instanceId) {
return instanceId(Output.of(instanceId));
}
/**
* @param serviceId The ID of the service that you want to use to create the instance.
*
* @return builder
*
*/
public Builder serviceId(@Nullable Output<String> serviceId) {
$.serviceId = serviceId;
return this;
}
/**
* @param serviceId The ID of the service that you want to use to create the instance.
*
* @return builder
*
*/
public Builder serviceId(String serviceId) {
return serviceId(Output.of(serviceId));
}
public InstanceState build() {
return $;
}
}
}
|
[
"public@paulstack.co.uk"
] |
public@paulstack.co.uk
|
8b34b2c587d0abb01d691ed5535272ffc5ce9da3
|
b481557b5d0e85a057195d8e2ed85555aaf6b4e7
|
/src/test/java/com/jlee/leetcodesolutions/TestLeetCode0874.java
|
5ec167b26f40b4b1cf25b7b06d8ed875618663e0
|
[] |
no_license
|
jlee301/leetcodesolutions
|
b9c61d7fbe96bcb138a2727b69b3a39bbe153911
|
788ac8c1c95eb78eda27b21ecb7b29eea1c7b5a4
|
refs/heads/master
| 2021-06-05T12:27:42.795124
| 2019-08-11T23:04:07
| 2019-08-11T23:04:07
| 113,272,040
| 0
| 1
| null | 2020-10-12T23:39:27
| 2017-12-06T05:16:39
|
Java
|
UTF-8
|
Java
| false
| false
| 4,368
|
java
|
package com.jlee.leetcodesolutions;
import com.jlee.leetcodesolutions.LeetCode0874;
import org.junit.Assert;
import org.junit.Test;
public class TestLeetCode0874 {
@Test
public void testProblemCase1() {
// Input: commands = [4,-1,3], obstacles = []
// Output: 25
int[] commands = {4,-1,3};
int[][] obstacles = {};
LeetCode0874 solution = new LeetCode0874();
Assert.assertEquals(25, solution.robotSim(commands, obstacles));
}
@Test
public void testProblemCase2() {
// Input: commands = [4,-1,4,-2,4], obstacles = [[2,4]]
// Output: 65
int[] commands = {4,-1,4,-2,4};
int[][] obstacles = {{2,4}};
LeetCode0874 solution = new LeetCode0874();
Assert.assertEquals(65, solution.robotSim(commands, obstacles));
}
@Test
public void testProblemCase3() {
int[] commands = { 2, 5, 2, 5, -1, 3, 4, 2, 4, -2, 5, 8, -1, -2, -2, -1, 8, -1, -2, -2, -1, -1, 5, -1, -1, 1, 5, 9,
1, -1, -2, -1, -2, 3, 7, 2, 3, 5, 9, -2, 5, 2, 1, 4, 6, 5, 9, 1, 9, 6, 3, -1, -1, 9, 9, -1, 1, 6, 3, -2, 2, 2,
5, -1, -1, -2, 9, 6, 5, 5, 9, 2, 5, -2, -2, 5, 7, -1, -2, -1, 2, -1, 1, -1, -1, 2, 8, -1, 8, 3, -2, 3, -1, -2,
4, 7, 3, 8, -1, 2 };
int[][] obstacles = { { -5, -77 }, { 35, 40 }, { 58, -30 }, { 31, -96 }, { 40, 14 }, { -25, 50 }, { 37, -38 },
{ -54, -31 }, { 64, -41 }, { 72, 53 }, { 83, -95 }, { -31, -61 }, { 68, 32 }, { -56, 16 }, { 88, -81 },
{ -48, -31 }, { 56, -57 }, { -74, 24 }, { -42, -59 }, { 72, -86 }, { 40, 34 }, { -85, -45 }, { 22, -35 },
{ -95, 56 }, { -66, 42 }, { -67, 94 }, { 46, 10 }, { 35, 27 }, { -9, -6 }, { -84, -97 }, { 38, -22 },
{ 3, -39 }, { 71, -97 }, { -40, -86 }, { -45, 56 }, { -91, 59 }, { 24, -11 }, { 91, 100 }, { -68, 43 },
{ 34, 27 }, { -60, 32 }, { -20, 34 }, { -34, 34 }, { -31, -53 }, { 52, -98 }, { -70, -15 }, { 73, -41 },
{ -94, 95 }, { -78, -42 }, { -7, -11 }, { -37, -94 }, { 26, -74 }, { -53, 68 }, { 72, 2 }, { -80, -58 },
{ -94, 48 }, { -80, -57 }, { -35, 69 }, { 17, -45 }, { -72, -76 }, { 21, 99 }, { -25, -19 }, { -48, 86 },
{ 86, -47 }, { 59, -66 }, { -38, -16 }, { 47, -44 }, { 28, 96 }, { 92, -64 }, { -62, -35 }, { -63, -87 },
{ -83, 95 }, { 25, -89 }, { 30, -40 }, { -75, 93 }, { 47, -21 }, { 12, -93 }, { 70, -22 }, { -64, -43 },
{ -17, -86 }, { -33, 93 }, { -74, -7 }, { -78, 5 }, { -37, -11 }, { -84, -29 }, { -29, -11 }, { 17, 9 },
{ -64, 10 }, { 25, 29 }, { 14, 25 }, { 19, 42 }, { 71, 52 }, { 30, -76 }, { 19, 66 }, { 40, 99 }, { -61, -95 },
{ -17, 40 }, { 6, -21 }, { 7, 28 }, { -4, 85 }, { 71, 99 }, { 50, 99 }, { -53, -95 }, { -8, 8 }, { 63, -79 },
{ 88, -35 }, { 50, -38 }, { -60, -31 }, { -2, -8 }, { -8, 91 }, { -14, 50 }, { -25, -26 }, { 1, 71 },
{ -91, -64 }, { -40, 46 }, { 30, -97 }, { 9, -55 }, { -36, -75 }, { 71, 99 }, { 90, -53 }, { -68, -20 },
{ -73, 89 }, { -14, 74 }, { -8, 72 }, { 82, 48 }, { 45, 2 }, { -42, 12 }, { 77, 22 }, { 87, 56 }, { 73, -21 },
{ 78, 15 }, { -6, -75 }, { 24, 46 }, { -11, -70 }, { -90, -77 }, { 57, 43 }, { -66, 10 }, { -30, -47 },
{ 91, -37 }, { -4, -67 }, { -88, 19 }, { 66, 29 }, { 86, 97 }, { -4, 67 }, { 54, -92 }, { -54, 71 },
{ -42, -17 }, { 57, -91 }, { -9, -15 }, { -26, 56 }, { -57, -58 }, { -72, 91 }, { -55, 35 }, { -20, 29 },
{ 51, 70 }, { -61, 88 }, { -62, 99 }, { 52, 17 }, { -75, -32 }, { 91, -22 }, { 54, 33 }, { -45, -59 },
{ 47, -48 }, { 53, -98 }, { -91, 83 }, { 81, 12 }, { -34, -90 }, { -79, -82 }, { -15, -86 }, { -24, 66 },
{ -35, 35 }, { 3, 31 }, { 87, 93 }, { 2, -19 }, { 87, -93 }, { 24, -10 }, { 84, -53 }, { 86, 87 }, { -88, -18 },
{ -51, 89 }, { 96, 66 }, { -77, -94 }, { -39, -1 }, { 89, 51 }, { -23, -72 }, { 27, 24 }, { 53, -80 },
{ 52, -33 }, { 32, 4 }, { 78, -55 }, { -25, 18 }, { -23, 47 }, { 79, -5 }, { -23, -22 }, { 14, -25 },
{ -11, 69 }, { 63, 36 }, { 35, -99 }, { -24, 82 }, { -29, -98 } };
LeetCode0874 solution = new LeetCode0874();
Assert.assertEquals(1954, solution.robotSim(commands, obstacles));
}
@Test
public void testProblemCase4() {
int[] commands = { -1, 2, -2, -2, -2, -2, 2};
int[][] obstacles = {};
LeetCode0874 solution = new LeetCode0874();
Assert.assertEquals(16, solution.robotSim(commands, obstacles));
}
}
|
[
"john.m.lee@gmail.com"
] |
john.m.lee@gmail.com
|
ad9570b679b77265470d2047dbd6c7144e41fc5b
|
be609a4c07073521cd84c09ef242690cf45a583d
|
/schedule-console/src/main/java/com/asiainfo/monitor/busi/dao/impl/AIMonLogMapDAOImpl.java
|
c15c8a4f12abb616e9d4356048a60ece0bffc59b
|
[
"Apache-2.0"
] |
permissive
|
zhengpeng2006/aischedule
|
23d852ae656f0674684fec39c393c7b1f67af931
|
5ff3138b8efb6f7c6f365dcdf34fc3d40400877b
|
refs/heads/master
| 2020-04-23T01:32:47.970514
| 2019-01-10T08:45:45
| 2019-01-10T08:45:45
| 170,816,132
| 0
| 1
|
Apache-2.0
| 2019-02-15T06:52:34
| 2019-02-15T06:52:32
| null |
UTF-8
|
Java
| false
| false
| 570
|
java
|
package com.asiainfo.monitor.busi.dao.impl;
import com.asiainfo.monitor.busi.dao.interfaces.IAIMonLogMapDAO;
import com.asiainfo.monitor.exeframe.config.bo.BOAIMonLogBean;
import com.asiainfo.monitor.exeframe.config.bo.BOAIMonLogEngine;
public class AIMonLogMapDAOImpl implements IAIMonLogMapDAO{
/**
* appmonitor日志记录到数据库
*/
public void recordLogToDB(BOAIMonLogBean logBean) {
try {
logBean.setLogId(BOAIMonLogEngine.getNewId().longValue());
BOAIMonLogEngine.save(logBean);
} catch (Exception e) {
e.printStackTrace();
}
}
}
|
[
"wangfeng3@asiainfo.com"
] |
wangfeng3@asiainfo.com
|
83ce8bc8c0b1aa134722794cad8903dcf1720760
|
e294196964464b5955bc19443c08b46cd3a6663f
|
/src/main/java/quickfix/fix50sp1/component/ContAmtGrp.java
|
b009e1307532df626a33302eccfa95a32fbb4752
|
[] |
no_license
|
fortexjava/ftquickfix
|
acb910e42c77c78f3802289f7ec0bc18f1caea5d
|
1a52a384bd7d013f77609c6f3441097b2a8b840e
|
refs/heads/master
| 2021-01-20T07:38:19.196683
| 2017-05-02T11:05:39
| 2017-05-02T11:05:39
| 90,023,265
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,664
|
java
|
package quickfix.fix50sp1.component;
import quickfix.FieldNotFound;
import quickfix.Group;
public class ContAmtGrp extends quickfix.MessageComponent {
static final long serialVersionUID = 20050617;
public static final String MSGTYPE = "";
private int[] componentFields = { };
protected int[] getFields() { return componentFields; }
private int[] componentGroups = { 518, };
protected int[] getGroupFields() { return componentGroups; }
public ContAmtGrp() {
super();
}
public void set(quickfix.field.NoContAmts value) {
setField(value);
}
public quickfix.field.NoContAmts get(quickfix.field.NoContAmts value) throws FieldNotFound {
getField(value);
return value;
}
public quickfix.field.NoContAmts getNoContAmts() throws FieldNotFound {
return get(new quickfix.field.NoContAmts());
}
public boolean isSet(quickfix.field.NoContAmts field) {
return isSetField(field);
}
public boolean isSetNoContAmts() {
return isSetField(518);
}
public static class NoContAmts extends Group {
static final long serialVersionUID = 20050617;
public NoContAmts() {
super(518, 519,
new int[] {519, 520, 521, 0 });
}
public void set(quickfix.field.ContAmtType value) {
setField(value);
}
public quickfix.field.ContAmtType get(quickfix.field.ContAmtType value) throws FieldNotFound {
getField(value);
return value;
}
public quickfix.field.ContAmtType getContAmtType() throws FieldNotFound {
return get(new quickfix.field.ContAmtType());
}
public boolean isSet(quickfix.field.ContAmtType field) {
return isSetField(field);
}
public boolean isSetContAmtType() {
return isSetField(519);
}
public void set(quickfix.field.ContAmtValue value) {
setField(value);
}
public quickfix.field.ContAmtValue get(quickfix.field.ContAmtValue value) throws FieldNotFound {
getField(value);
return value;
}
public quickfix.field.ContAmtValue getContAmtValue() throws FieldNotFound {
return get(new quickfix.field.ContAmtValue());
}
public boolean isSet(quickfix.field.ContAmtValue field) {
return isSetField(field);
}
public boolean isSetContAmtValue() {
return isSetField(520);
}
public void set(quickfix.field.ContAmtCurr value) {
setField(value);
}
public quickfix.field.ContAmtCurr get(quickfix.field.ContAmtCurr value) throws FieldNotFound {
getField(value);
return value;
}
public quickfix.field.ContAmtCurr getContAmtCurr() throws FieldNotFound {
return get(new quickfix.field.ContAmtCurr());
}
public boolean isSet(quickfix.field.ContAmtCurr field) {
return isSetField(field);
}
public boolean isSetContAmtCurr() {
return isSetField(521);
}
}
}
|
[
"22345195@qq.com"
] |
22345195@qq.com
|
d35da15b0e744e73b1c3f51a094ab37287a9efc9
|
a3fed7817dac8a7ad7151acc30817c62530d78dc
|
/chapter12/src/test/java/com/tamingthymeleaf/application/TamingThymeleafApplicationTests.java
|
70907cbdae1513bc80d9eee196ce72b01e61cdca
|
[] |
no_license
|
Ganeshk750/taming-thymeleaf-sources
|
0e0429d1bfbf0a32f7575f03126e96f8f8188be5
|
a63a0abbaba17f4806e964a91675864352d34e91
|
refs/heads/main
| 2023-04-03T05:56:11.162544
| 2021-04-13T13:03:07
| 2021-04-13T13:03:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 492
|
java
|
package com.tamingthymeleaf.application;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
@SpringBootTest
@ActiveProfiles("spring-boot-test")
@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE)
class TamingThymeleafApplicationTests {
@Test
void contextLoads() {
}
}
|
[
"wim.deblauwe@gmail.com"
] |
wim.deblauwe@gmail.com
|
b0c93812e6c35988274164b2ca56bfeeac334986
|
e63363389e72c0822a171e450a41c094c0c1a49c
|
/Mate20_9_0_0/src/main/java/com/android/server/rms/iaware/memory/policy/MemoryExecutorServer.java
|
aba0295a3fd58d8f1384058efafa528e40c9e4d7
|
[] |
no_license
|
solartcc/HwFrameWorkSource
|
fc23ca63bcf17865e99b607cc85d89e16ec1b177
|
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
|
refs/heads/master
| 2022-12-04T21:14:37.581438
| 2020-08-25T04:30:43
| 2020-08-25T04:30:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,055
|
java
|
package com.android.server.rms.iaware.memory.policy;
import android.os.Bundle;
import android.os.HandlerThread;
import android.rms.iaware.AwareLog;
import com.android.server.rms.iaware.memory.utils.MemoryConstant;
import com.android.server.rms.iaware.memory.utils.PollingTimer;
public class MemoryExecutorServer {
private static final String TAG = "AwareMem_MemExecSvr";
private static final Object mLock = new Object();
private static MemoryExecutorServer sMemoryExecutorServer;
boolean mBigMemAppLaunching = false;
private final AbsMemoryExecutor mBigMemoryExecutor = new BigMemoryExecutor();
private final AbsMemoryExecutor mIdleMemoryExecutor = new IdleMemoryExecutor();
MemoryScenePolicyList mMemoryScenePolicyList = null;
PollingTimer mPollingTimer = new PollingTimer();
MemoryScenePolicy mRunningPolicy = null;
public static MemoryExecutorServer getInstance() {
MemoryExecutorServer memoryExecutorServer;
synchronized (mLock) {
if (sMemoryExecutorServer == null) {
sMemoryExecutorServer = new MemoryExecutorServer();
}
memoryExecutorServer = sMemoryExecutorServer;
}
return memoryExecutorServer;
}
private MemoryExecutorServer() {
}
public void enable() {
this.mIdleMemoryExecutor.enableMemoryRecover();
this.mBigMemoryExecutor.enableMemoryRecover();
setPollingPeriod(MemoryConstant.getDefaultTimerPeriod());
this.mMemoryScenePolicyList.clear();
}
public void disable() {
this.mPollingTimer.stopTimer();
this.mIdleMemoryExecutor.disableMemoryRecover();
this.mBigMemoryExecutor.disableMemoryRecover();
this.mMemoryScenePolicyList.reset();
}
public void executeMemoryRecover(String scene, Bundle extras, int event, long timeStamp) {
if (getBigMemAppLaunching()) {
AwareLog.i(TAG, "executeMemoryRecover big mem app is running");
} else if (extras == null || this.mMemoryScenePolicyList == null) {
AwareLog.e(TAG, "executeMemoryRecover null policy!!");
} else {
extras.putInt("event", event);
extras.putLong("timeStamp", timeStamp);
if (MemoryConstant.MEM_SCENE_BIGMEM.equals(scene)) {
this.mBigMemoryExecutor.executeMemoryRecover(extras);
} else {
this.mIdleMemoryExecutor.executeMemoryRecover(extras);
}
}
}
public void stopMemoryRecover() {
if (getBigMemAppLaunching()) {
AwareLog.i(TAG, "stopExecuteMemoryRecover big memory app is running");
return;
}
this.mBigMemoryExecutor.stopMemoryRecover();
this.mIdleMemoryExecutor.stopMemoryRecover();
stopMemoryPolicy(false);
}
public void setMemHandlerThread(HandlerThread handlerThread) {
if (handlerThread != null) {
this.mIdleMemoryExecutor.setMemHandlerThread(handlerThread);
this.mPollingTimer.setPollingTimerHandler(handlerThread);
String str = TAG;
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("setHandler: object=");
stringBuilder.append(handlerThread);
AwareLog.d(str, stringBuilder.toString());
return;
}
AwareLog.e(TAG, "setHandler: why handlerThread is null!!");
}
public void setRunningPolicy(MemoryScenePolicy memoryScenePolicy) {
synchronized (mLock) {
this.mRunningPolicy = memoryScenePolicy;
}
}
public MemoryScenePolicy getRunningPolicy() {
MemoryScenePolicy memoryScenePolicy;
synchronized (mLock) {
memoryScenePolicy = this.mRunningPolicy;
}
return memoryScenePolicy;
}
public void setPollingPeriod(long pollingPeriod) {
if (this.mPollingTimer != null) {
this.mPollingTimer.setPollingPeriod(pollingPeriod);
this.mPollingTimer.resetTimer();
}
}
public boolean getBigMemAppLaunching() {
boolean z;
synchronized (mLock) {
z = this.mBigMemAppLaunching;
}
return z;
}
public void setBigMemAppLaunching(boolean isBigMemAppLaunching) {
synchronized (mLock) {
this.mBigMemAppLaunching = isBigMemAppLaunching;
}
}
public void setMemoryScenePolicyList(MemoryScenePolicyList memoryScenePolicyList) {
this.mMemoryScenePolicyList = memoryScenePolicyList;
}
public MemoryScenePolicyList getMemoryScenePolicyList() {
return this.mMemoryScenePolicyList;
}
public boolean stopMemoryPolicy(boolean forced) {
boolean interrupt;
synchronized (mLock) {
interrupt = getRunningPolicy() != null ? getRunningPolicy().interrupt(forced) : true;
}
return interrupt;
}
public void notifyProtectLruState(int state) {
this.mIdleMemoryExecutor.setProtectCacheFlag(state);
}
}
|
[
"lygforbs0@mail.com"
] |
lygforbs0@mail.com
|
1bb6c4f947675c5e4a233e1781823e9596728507
|
18b731ab437622d5936e531ece88c3dd0b2bb2ea
|
/pbtd-manager-hebei/src/main/java/com/pbtd/manager/util/ActivemqUtils.java
|
459bf199084dac5710d134eca79fd68ab62096e9
|
[] |
no_license
|
harry0102/bai_project
|
b6c130e7235d220f2f0d4294a3f87b58f77cd265
|
674c6ddff7cf5dae514c69d2639d4b0245c0761f
|
refs/heads/master
| 2021-10-07T20:32:15.985439
| 2018-12-05T06:50:11
| 2018-12-05T06:50:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,929
|
java
|
package com.pbtd.manager.util;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.jms.Topic;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.command.ActiveMQTextMessage;
public class ActivemqUtils {
public static void testQueueProducer(String tcp,String queueName,String text ) throws Exception {
// 1、创建一个连接工程ConnectionFactory对象。指定服务的ip及端口号
ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(tcp);
// 2、使用ConnectionFactory对象创建一个Connection对象。
Connection connection = connectionFactory.createConnection();
// 3、开启连接,调用start方法
connection.start();
// 4、使用Connection对象创建一个Session对象。
// 第一个参数:是否开启事务,一般不开启。当参数为false时,第二个参数才有意义。
// 第二个参数:消息的应答模式。手动应答和自动应答。一般使用自动应答
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
// 5、使用Session对象创建一个Destination,目的地有两种queue、topic
Queue queue = session.createQueue(queueName);
// 6、使用Session对象创建一个Producer对象。
MessageProducer producer = session.createProducer(queue);
// 7、使用producer发送消息。
TextMessage textMessage = new ActiveMQTextMessage();
textMessage.setText(text);
// TextMessage textMessage2 = session.createTextMessage("使用activemq发送的队列消息");
producer.send(textMessage);
// 8、关闭资源。
producer.close();
session.close();
connection.close();
}
public static void testTopicProducer(String tcp,String topicName,String text,String MQ_flag) throws Exception {
if(MQ_flag != null && "YES".equalsIgnoreCase(MQ_flag)){
// 创建一个连接工厂对象
ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(tcp);
// 使用连接工厂对象创建一个连接
Connection connection = connectionFactory.createConnection();
// 开启连接
connection.start();
// 使用连接对象创建一个session对象
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
// 使用session对象创建一个topic
Topic topic = session.createTopic(topicName);
// 使用session创建一个producer,指定目的地时候topic。
MessageProducer producer = session.createProducer(topic);
// 创建一个TextMessage对象
TextMessage message = session.createTextMessage(text);
// 使用producer对象发送消息。
producer.send(message);
// 关闭资源
producer.close();
session.close();
connection.close();
}else{
System.out.println("~~~~~~~~~~~~~~~~~~~~~MQ已关闭~~~~~~~~~~~~~~~~~");
}
}
}
|
[
"750460470@qq.com"
] |
750460470@qq.com
|
93f49d5b84ae5bebd41d6aff2e4dabee421f69bc
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_5903dd70c7b02c210046ea1278824583a8f8b179/FVPortMod/2_5903dd70c7b02c210046ea1278824583a8f8b179_FVPortMod_t.java
|
c536370a8ca5ff9804657297342eeac069beb709
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,946
|
java
|
package org.flowvisor.message;
import org.flowvisor.classifier.FVClassifier;
import org.flowvisor.log.FVLog;
import org.flowvisor.log.LogLevel;
import org.flowvisor.slicer.FVSlicer;
import org.openflow.protocol.OFPhysicalPort;
import org.openflow.protocol.OFPortMod;
import org.openflow.protocol.OFError.OFPortModFailedCode;
public class FVPortMod extends OFPortMod implements Classifiable, Slicable {
/**
* Send to all slices with this port
*
* FIXME: decide if port_mod's can come *up* from switch?
*/
@Override
public void classifyFromSwitch(FVClassifier fvClassifier) {
FVLog.log(LogLevel.DEBUG, fvClassifier, "recv from switch: " + this);
for (FVSlicer fvSlicer : fvClassifier.getSlicers())
if (fvSlicer.portInSlice(this.portNumber))
fvSlicer.sendMsg(this, fvClassifier);
}
/**
* First, check to see if this port is available in this slice Second, check
* to see if they're changing the FLOOD bit FIXME: prevent slices from
* administratrively bringing down a port!
*/
@Override
public void sliceFromController(FVClassifier fvClassifier, FVSlicer fvSlicer) {
// First, check if this port is in the slice
if (!fvSlicer.portInSlice(this.portNumber)) {
fvSlicer.sendMsg(FVMessageUtil.makeErrorMsg(
OFPortModFailedCode.OFPPMFC_BAD_PORT, this), fvClassifier);
return;
}
// Second, update the port's flood state
boolean oldValue = fvSlicer.getFloodPortStatus(this.portNumber);
FVLog.log(LogLevel.DEBUG, fvSlicer, "Setting port " + this.portNumber + " to " +
((this.mask & OFPhysicalPort.OFPortConfig.OFPPC_NO_FLOOD.getValue()) == 0));
fvSlicer.setFloodPortStatus(this.portNumber,
(this.mask & OFPhysicalPort.OFPortConfig.OFPPC_NO_FLOOD
.getValue()) == 0);
if (oldValue != fvSlicer.getFloodPortStatus(this.portNumber))
FVLog.log(LogLevel.CRIT, fvSlicer,
"FIXME: need to implement FLOODING port changes");
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
ef1e0b4231798ead13e5defe52ad7366a915d71a
|
803b187e89e7d90f15a1fb175e7631bbf858e5dc
|
/src/main/java/generics/ohranichenia/InheritBounds.java
|
98ad26115cb1e4990af614c9739452f9c7f73a2a
|
[] |
no_license
|
lanaflonPerso/LearnJava_Core
|
4c50f647db7e75f3c05fe3d943f7ba188273e901
|
f4036383c88049de78c849ee55af409ff4a9234f
|
refs/heads/master
| 2020-12-06T00:39:36.901879
| 2019-10-28T11:33:18
| 2019-10-28T11:33:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 964
|
java
|
package generics.ohranichenia;
class HoldItem<T> {
T item;
HoldItem(T item) { this.item = item; }
T getItem() { return item; }
}
class Colored2<T extends HasColor> extends HoldItem<T> {
Colored2(T item) { super(item); }
java.awt.Color color() { return item.getColor(); }
}
class ColoredDimension2<T extends Dimension & HasColor> extends Colored2<T> {
ColoredDimension2(T item) { super(item); }
int getX() { return item.tamanoPequenio; }
int getY() { return item.tamanoMediano; }
int getZ() { return item.tamanoGrande; }
}
class Solid2<T extends Dimension & HasColor & Weight> extends ColoredDimension2<T> {
Solid2(T item) { super(item); }
int weight() { return item.weight(); }
}
public class InheritBounds {
public static void main(String[] args) {
Solid2<Bounded> solid2 = new Solid2<Bounded>(new Bounded());
solid2.color();
solid2.getY();
solid2.weight();
}
}
|
[
"tsyupryk.roman.lyubomyrovych@gmail.com"
] |
tsyupryk.roman.lyubomyrovych@gmail.com
|
68dba3c88956571dd33701013d3f95449019876d
|
a9163d3aa27d3ec5bbaa0f1eb85df8c15aaf5621
|
/src/main/java/com/hlx/nutritionist/service/impl/LoginServiceImpl.java
|
3a40cdb6a73db8bcb4159b22e0bef60e2b7eed51
|
[] |
no_license
|
WPZC/nutritionist
|
ea55d934457bd96abb5b1452671c329c4267cfc3
|
c42bf5f031434694ffacc8a21ce36f46a36b4b06
|
refs/heads/master
| 2021-05-19T23:44:12.591705
| 2020-04-01T06:22:44
| 2020-04-01T06:22:44
| 252,089,740
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 884
|
java
|
package com.hlx.nutritionist.service.impl;
import com.hlx.nutritionist.dao.TbUserDao;
import com.hlx.nutritionist.entity.TbUserEntity;
import com.hlx.nutritionist.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @Author WQY
* @Date 2020/3/30 15:44
* @Version 1.0
*/
@Service
public class LoginServiceImpl implements LoginService {
@Autowired
private TbUserDao tbUserDao;
@Override
public TbUserEntity findByUsernameAndPassword(String username, String password) {
//根据用户名密码查询用户信息
TbUserEntity tbUserEntity = tbUserDao.findByUsernameAndPassword(username,password);
//用户信息不等于空则用户名密码正确
if(tbUserEntity!=null){
return tbUserEntity;
}
return null;
}
}
|
[
"1272722954@qq.com"
] |
1272722954@qq.com
|
e832d6412b59050d7a489a6629d0d21fc87398ed
|
c4a8a89aca8a50cbb81c2255c8e33215827e5d55
|
/egakat-integration-core-files/src/main/java/com/egakat/integration/core/files/components/checkers/ValorObligatorioChecker.java
|
26564fd7770b3f65ae5625c1dee6cc649d969c70
|
[] |
no_license
|
github-ek/egakat-integration
|
5dba020e97d2530471152e3580418e0f6d2d2f62
|
d451bf5da61c15d89df71d36a7af7dd8167b6ee9
|
refs/heads/master
| 2022-07-13T13:43:21.010260
| 2019-09-23T04:00:29
| 2019-09-23T04:00:29
| 136,370,505
| 1
| 1
| null | 2022-06-28T15:22:36
| 2018-06-06T18:31:59
|
Java
|
UTF-8
|
Java
| false
| false
| 732
|
java
|
package com.egakat.integration.core.files.components.checkers;
import org.springframework.util.StringUtils;
import com.egakat.integration.commons.archivos.dto.CampoDto;
public class ValorObligatorioChecker implements CampoChecker<String> {
@Override
public void check(CampoDto campo, String valor) {
if (!StringUtils.hasLength(valor) && campo.isObligatorioEstructura()) {
// @formatter:off
String message = String.format(
getError(),
campo.getCodigo(),
campo.getNombre());
// @formatter:on
throw new RuntimeException(message);
}
}
@Override
public String getError() {
return "%s:No se suministró un valor en el campo %s. Este campo es obligatorio y siempre debe ser diligenciado.";
}
}
|
[
"esb.ega.kat@gmail.com"
] |
esb.ega.kat@gmail.com
|
4256674764f17c62a9427cb7b6ba56e24cca8793
|
02ae91abffd7b902cb2de9deec92d8a05b94071c
|
/plugins/org.jkiss.dbeaver.ext.postgresql.ui/src/org/jkiss/dbeaver/ext/postgresql/tools/PostgreToolBackup.java
|
49a368bd0e93dc3c3ea8c55a281b3b59d6fa35d7
|
[
"Apache-2.0",
"EPL-2.0"
] |
permissive
|
ass-a2s/dbeaver
|
c43367ad15c7230b235d0e38c4535631a1a6098b
|
1a22fe48c8955b16feb7fdd14e74c4bfbb8d9c2d
|
refs/heads/devel
| 2020-05-01T16:17:35.236759
| 2019-04-17T08:02:23
| 2019-04-17T08:02:23
| 177,568,601
| 1
| 0
|
Apache-2.0
| 2019-04-17T08:02:29
| 2019-03-25T10:57:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,398
|
java
|
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2019 Serge Rider (serge@jkiss.org)
*
* 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.jkiss.dbeaver.ext.postgresql.tools;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.struct.DBSObject;
import org.jkiss.dbeaver.tools.IExternalTool;
import org.jkiss.dbeaver.ui.dialogs.tools.ToolWizardDialog;
import java.util.Collection;
/**
* Database export
*/
public class PostgreToolBackup implements IExternalTool
{
@Override
public void execute(IWorkbenchWindow window, IWorkbenchPart activePart, Collection<DBSObject> objects) throws DBException
{
ToolWizardDialog dialog = new ToolWizardDialog(
window,
new PostgreBackupWizard(objects));
dialog.open();
}
}
|
[
"serge@jkiss.org"
] |
serge@jkiss.org
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.