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
7d8079a7f95b39cde1d0e807c5dbf8d4c2db3d52
26183990a4c6b9f6104e6404ee212239da2d9f62
/components/distribution_tool/src/java/tests/com/topcoder/util/distribution/stresstests/ConvertToPDFCommandStressTest.java
150efec77997c6d8444e05af3037d0fd08f7d821
[]
no_license
topcoder-platform/tc-java-components
34c5798ece342a9f1804daeb5acc3ea4b0e0765b
51b204566eb0df3902624c15f4fb69b5f99dc61b
refs/heads/dev
2023-08-08T22:09:32.765506
2022-02-25T06:23:56
2022-02-25T06:23:56
138,811,944
0
8
null
2022-02-23T21:06:12
2018-06-27T01:10:36
Rich Text Format
UTF-8
Java
false
false
2,773
java
/* * Copyright (C) 2010 TopCoder Inc., All Rights Reserved. */ package com.topcoder.util.distribution.stresstests; import java.io.File; import java.util.ArrayList; import junit.framework.Test; import junit.framework.TestSuite; import com.topcoder.util.distribution.DistributionScriptExecutionContext; import com.topcoder.util.distribution.commands.CommandExecutionCondition; import com.topcoder.util.distribution.commands.ConvertToPDFCommand; /** * <p> * Stress tests for <code>ConvertToPDFCommand</code> class. * </p> * * @author TCSDEVELOPER * @version 1.0 */ public class ConvertToPDFCommandStressTest extends StressTestBase { /** * <p> * Returns the test suite of this class. * </p> * * @return the test suite of this class. */ public static Test suite() { return new TestSuite(ConvertToPDFCommandStressTest.class); } /** * <p> * Sets up test environment. * </p> * * @throws Exception * to junit */ public void setUp() throws Exception { super.setUp(); File file; for (int i = 0; i < 1000; ++i) { file = new File(STRESSTEST_BASE + "converted_file" + i + ".pdf"); if (file.isFile()) { file.delete(); } } } /** * <p> * Tears down test environment. * </p> * * @throws Exception * to junit */ public void tearDown() throws Exception { super.tearDown(); File file; for (int i = 0; i < 1000; ++i) { file = new File(STRESSTEST_BASE + "converted_file" + i + ".pdf"); if (file.isFile()) { file.delete(); } } } /** * <p> * Stress test for method execute(DistributionScriptExecutionContext context). * </p> * * @throws Exception * to JUnit */ public void testExecuteCommand_Stress() throws Exception { DistributionScriptExecutionContext context = new DistributionScriptExecutionContext(); long start = System.currentTimeMillis(); for (int i = 0; i < 1000; ++i) { ConvertToPDFCommand cmd = new ConvertToPDFCommand(null, new ArrayList<CommandExecutionCondition>(), STRESSTEST_BASE + "stresstest_rs.rtf", STRESSTEST_BASE + "converted_file" + i + ".pdf"); cmd.execute(context); assertTrue("The pdf file should be converted successfully.", checkPDF(STRESSTEST_BASE + "converted_file" + i + ".pdf")); } System.out.println("Running ConvertToPDFCommand.execute() to convert 1000 files used " + (System.currentTimeMillis() - start) + "ms."); } }
[ "pvmagacho@gmail.com" ]
pvmagacho@gmail.com
07be0d4e50aa7564f20ad5129d1d2659ea9cf21b
f784159f8292cb3e1521783c1b426de6f9116a48
/src/cbls115676khmt61/TranHuuThuy-BKHN/LocalSearchOpenCBLS/src/com/company/appliaction/CSP.java
5c6b7f58919609add6d5a06625110bb063627715
[]
no_license
vunamson/CourseCPCBLS
e549dfc36aecc962b35124da8becc9f8db96ad02
44f4cfeea69895a06eb83e17aae7792d0c68ea42
refs/heads/master
2022-09-15T16:21:45.511625
2020-06-02T02:10:20
2020-06-02T02:10:20
268,677,190
0
0
null
2020-06-02T01:59:20
2020-06-02T01:59:20
null
UTF-8
Java
false
false
1,321
java
package com.company.appliaction; import com.company.localsearch.HillCimbingSearch; import localsearch.constraints.basic.Implicate; import localsearch.constraints.basic.IsEqual; import localsearch.constraints.basic.LessOrEqual; import localsearch.constraints.basic.NotEqual; import localsearch.functions.basic.FuncPlus; import localsearch.functions.sum.Sum; import localsearch.model.ConstraintSystem; import localsearch.model.LocalSearchManager; import localsearch.model.VarIntLS; public class CSP { public static void main(String[] args) { LocalSearchManager mgr = new LocalSearchManager(); ConstraintSystem S = new ConstraintSystem(mgr); VarIntLS[]X = new VarIntLS[5]; for(int i = 0; i < 5; i++){ X[i] = new VarIntLS(mgr, 1, 5); } S.post(new NotEqual(new FuncPlus(X[2] ,3), X[1])); S.post(new LessOrEqual(X[3], X[4])); S.post(new IsEqual(new FuncPlus(X[2], X[3]), new FuncPlus(X[0],1))); S.post(new LessOrEqual(X[4], 3)); S.post(new IsEqual(new FuncPlus(X[1], X[4]), 7)); S.post(new Implicate(new IsEqual(X[2], 1), new NotEqual(X[4], 2))); S.post(new LessOrEqual(new Sum(X), 12)); mgr.close(); HillCimbingSearch hill = new HillCimbingSearch(); hill.search(S, 1_000_000); } }
[ "dungkhmt@gmail.com" ]
dungkhmt@gmail.com
1a44578797517006b830e1bef717e9be2017fce0
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/elastic--elasticsearch/a4a4f19d13c8a76e84dde5fa70dd8f1c83a878c2/before/NestedQueryParser.java
b8d4a80417ad79b05a6464b1411e0af8cba70442
[]
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
6,917
java
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch 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.elasticsearch.index.query; import org.apache.lucene.search.ConstantScoreQuery; import org.apache.lucene.search.Filter; import org.apache.lucene.search.FilteredQuery; import org.apache.lucene.search.Query; import org.apache.lucene.search.join.ScoreMode; import org.apache.lucene.search.join.ToParentBlockJoinQuery; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Strings; import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.query.support.InnerHitsQueryParserHelper; import org.elasticsearch.index.query.support.NestedInnerQueryParseSupport; import org.elasticsearch.search.fetch.innerhits.InnerHitsContext; import org.elasticsearch.search.internal.SubSearchContext; import java.io.IOException; public class NestedQueryParser implements QueryParser { public static final String NAME = "nested"; private final InnerHitsQueryParserHelper innerHitsQueryParserHelper; @Inject public NestedQueryParser(InnerHitsQueryParserHelper innerHitsQueryParserHelper) { this.innerHitsQueryParserHelper = innerHitsQueryParserHelper; } @Override public String[] names() { return new String[]{NAME, Strings.toCamelCase(NAME)}; } @Override public Query parse(QueryParseContext parseContext) throws IOException, QueryParsingException { XContentParser parser = parseContext.parser(); final ToBlockJoinQueryBuilder builder = new ToBlockJoinQueryBuilder(parseContext); float boost = 1.0f; ScoreMode scoreMode = ScoreMode.Avg; String queryName = null; String currentFieldName = null; XContentParser.Token token; while ((token = parser.nextToken()) != XContentParser.Token.END_OBJECT) { if (token == XContentParser.Token.FIELD_NAME) { currentFieldName = parser.currentName(); } else if (token == XContentParser.Token.START_OBJECT) { if ("query".equals(currentFieldName)) { builder.query(); } else if ("filter".equals(currentFieldName)) { builder.filter(); } else if ("inner_hits".equals(currentFieldName)) { builder.setInnerHits(innerHitsQueryParserHelper.parse(parseContext)); } else { throw new QueryParsingException(parseContext.index(), "[nested] query does not support [" + currentFieldName + "]"); } } else if (token.isValue()) { if ("path".equals(currentFieldName)) { builder.setPath(parser.text()); } else if ("boost".equals(currentFieldName)) { boost = parser.floatValue(); } else if ("score_mode".equals(currentFieldName) || "scoreMode".equals(currentFieldName)) { String sScoreMode = parser.text(); if ("avg".equals(sScoreMode)) { scoreMode = ScoreMode.Avg; } else if ("max".equals(sScoreMode)) { scoreMode = ScoreMode.Max; } else if ("total".equals(sScoreMode) || "sum".equals(sScoreMode)) { scoreMode = ScoreMode.Total; } else if ("none".equals(sScoreMode)) { scoreMode = ScoreMode.None; } else { throw new QueryParsingException(parseContext.index(), "illegal score_mode for nested query [" + sScoreMode + "]"); } } else if ("_name".equals(currentFieldName)) { queryName = parser.text(); } else { throw new QueryParsingException(parseContext.index(), "[nested] query does not support [" + currentFieldName + "]"); } } } builder.setScoreMode(scoreMode); ToParentBlockJoinQuery joinQuery = builder.build(); if (joinQuery != null) { joinQuery.setBoost(boost); if (queryName != null) { parseContext.addNamedQuery(queryName, joinQuery); } } return joinQuery; } public static class ToBlockJoinQueryBuilder extends NestedInnerQueryParseSupport { private ScoreMode scoreMode; private Tuple<String, SubSearchContext> innerHits; public ToBlockJoinQueryBuilder(QueryParseContext parseContext) throws IOException { super(parseContext); } public void setScoreMode(ScoreMode scoreMode) { this.scoreMode = scoreMode; } public void setInnerHits(Tuple<String, SubSearchContext> innerHits) { this.innerHits = innerHits; } @Nullable public ToParentBlockJoinQuery build() throws IOException { Query innerQuery; if (queryFound) { innerQuery = getInnerQuery(); } else if (filterFound) { Filter innerFilter = getInnerFilter(); if (innerFilter != null) { innerQuery = new ConstantScoreQuery(getInnerFilter()); } else { innerQuery = null; } } else { throw new QueryParsingException(parseContext.index(), "[nested] requires either 'query' or 'filter' field"); } if (innerHits != null) { InnerHitsContext.NestedInnerHits nestedInnerHits = new InnerHitsContext.NestedInnerHits(innerHits.v2(), innerQuery, null, getParentObjectMapper(), nestedObjectMapper); String name = innerHits.v1() != null ? innerHits.v1() : path; parseContext.addInnerHits(name, nestedInnerHits); } if (innerQuery != null) { return new ToParentBlockJoinQuery(new FilteredQuery(innerQuery, childFilter), parentFilter, scoreMode); } else { return null; } } } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
79a76728098b92ab1a65905006e8c3eaa261c6f4
b38309aaf95756f22720968af3d17d4f18622fd8
/core/src/io/anuke/novi/network/packets/ClassSwitchPacket.java
49366b447372ac8fb3f07c7b7d9e5000414a0620
[]
no_license
Anuken/Novi
b32dc8746d8ce446156c1e6cb6fa9edef6830434
303b04f443993023ed7e1fd4421093b29fb8e7b1
refs/heads/master
2021-01-23T04:40:55.832965
2017-07-07T00:43:57
2017-07-07T00:43:57
80,371,304
16
4
null
null
null
null
UTF-8
Java
false
false
152
java
package io.anuke.novi.network.packets; import io.anuke.novi.items.ShipType; public class ClassSwitchPacket{ public long id; public ShipType type; }
[ "arnukren@gmail.com" ]
arnukren@gmail.com
dc6b21d50abe8f399dbcea82de139ff70ace0a6a
2c7bbc8139c4695180852ed29b229bb5a0f038d7
/android/support/v4/graphics/drawable/RoundedBitmapDrawable21.java
8379bc8874ed976d2ef7a1b2674aa33984357398
[]
no_license
suliyu/evolucionNetflix
6126cae17d1f7ea0bc769ee4669e64f3792cdd2f
ac767b81e72ca5ad636ec0d471595bca7331384a
refs/heads/master
2020-04-27T05:55:47.314928
2017-05-08T17:08:22
2017-05-08T17:08:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,171
java
// // Decompiled by Procyon v0.5.30 // package android.support.v4.graphics.drawable; import android.view.Gravity; import android.graphics.Rect; import android.graphics.Outline; import android.graphics.Bitmap; import android.content.res.Resources; import android.annotation.TargetApi; @TargetApi(21) class RoundedBitmapDrawable21 extends RoundedBitmapDrawable { protected RoundedBitmapDrawable21(final Resources resources, final Bitmap bitmap) { super(resources, bitmap); } public void getOutline(final Outline outline) { this.updateDstRect(); outline.setRoundRect(this.mDstRect, this.getCornerRadius()); } @Override void gravityCompatApply(final int n, final int n2, final int n3, final Rect rect, final Rect rect2) { Gravity.apply(n, n2, n3, rect, rect2, 0); } @Override public boolean hasMipMap() { return this.mBitmap != null && this.mBitmap.hasMipMap(); } @Override public void setMipMap(final boolean hasMipMap) { if (this.mBitmap != null) { this.mBitmap.setHasMipMap(hasMipMap); this.invalidateSelf(); } } }
[ "sy.velasquez10@uniandes.edu.co" ]
sy.velasquez10@uniandes.edu.co
d36832657baaf2f6cf85f50eb4dd101d0eb3ecc7
9d36ccc88df7a32912b6b6dc6ded442218e1539e
/src/main/java/it/zerono/mods/extremereactors/gamecontent/multiblock/common/part/powertap/PowerTapHandlerFE.java
64997580117813680e8ac6e155ad54128cb86fba
[]
no_license
gentlegiantJGC/ExtremeReactors2
fd2aba36686966d91345cc18b959d2f73ed205d3
7d84d971353170b78b61c93702e07addfeec1fa8
refs/heads/master
2023-05-07T22:00:58.240548
2021-05-31T21:33:24
2021-05-31T21:33:24
372,606,115
0
0
null
2021-05-31T19:12:52
2021-05-31T19:12:51
null
UTF-8
Java
false
false
6,334
java
/* * * PowerTapHandlerFE.java * * This file is part of Extreme Reactors 2 by ZeroNoRyouki, a Minecraft mod. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * * DO NOT REMOVE OR EDIT THIS HEADER * */ package it.zerono.mods.extremereactors.gamecontent.multiblock.common.part.powertap; import it.zerono.mods.extremereactors.gamecontent.multiblock.common.AbstractGeneratorMultiblockController; import it.zerono.mods.extremereactors.gamecontent.multiblock.common.part.AbstractMultiblockEntity; import it.zerono.mods.extremereactors.gamecontent.multiblock.common.variant.IMultiblockGeneratorVariant; import it.zerono.mods.zerocore.lib.block.multiblock.IMultiblockVariantProvider; import it.zerono.mods.zerocore.lib.data.IoMode; import it.zerono.mods.zerocore.lib.energy.EnergySystem; import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockReader; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityInject; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; import javax.annotation.Nullable; public class PowerTapHandlerFE<Controller extends AbstractGeneratorMultiblockController<Controller, V>, V extends IMultiblockGeneratorVariant, T extends AbstractMultiblockEntity<Controller> & IMultiblockVariantProvider<? extends IMultiblockGeneratorVariant>> extends AbstractPowerTapHandler<Controller, V, T> implements IEnergyStorage { public PowerTapHandlerFE(final T part, final IoMode mode) { super(EnergySystem.ForgeEnergy, part, mode); this._consumer = null; this._capability = LazyOptional.of(() -> this); } //region IPowerTapHandler /** * Send energy to the connected consumer (if there is one and we are in active mode) * * @param amount amount of energy to send * @return the amount of energy accepted by the consumer */ public double outputEnergy(double amount) { if (null == this._consumer || this.isPassive()) { return 0; } final int maxUnits = (int) Math.min(amount, Integer.MAX_VALUE); return this._consumer.receiveEnergy(maxUnits, false); } /** * @return true if there is a consumer connected, false otherwise */ public boolean isConnected() { return null != this._consumer; } /** * Check for connections * * @param world the PowerTap world * @param position the PowerTap position */ public void checkConnections(@Nullable IBlockReader world, BlockPos position) { this._consumer = this.lookupConsumer(world, position, CAPAP_FORGE_ENERGYSTORAGE, te -> te instanceof IPowerTapHandler, this._consumer); } @Override public void invalidate() { this._capability.invalidate(); } /** * Get the requested capability if supported * * @param capability the capability * @param direction the direction the request is coming from * @param <T> the type of the capability * @return the capability (if supported) or null (if not) */ @Override @Nullable public <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction direction) { if (CAPAP_FORGE_ENERGYSTORAGE == capability) { return this._capability.cast(); } return null; } //endregion //region IEnergyStorage /** * Adds energy to the storage. Returns quantity of energy that was accepted. * * @param maxReceive Maximum amount of energy to be inserted. * @param simulate If TRUE, the insertion will only be simulated. * @return Amount of energy that was (or would have been, if simulated) accepted by the storage. */ @Override public int receiveEnergy(int maxReceive, boolean simulate) { // we never accept energy return 0; } /** * Removes energy from the storage. Returns quantity of energy that was removed. * * @param maxExtract Maximum amount of energy to be extracted. * @param simulate If TRUE, the extraction will only be simulated. * @return Amount of energy that was (or would have been, if simulated) extracted from the storage. */ @Override public int extractEnergy(int maxExtract, boolean simulate) { return this.canExtract() ? (int) this.getEnergyProvider().extractEnergy(this.getEnergySystem(), null, maxExtract, simulate) : 0; } /** * Returns the amount of energy currently stored. */ @Override public int getEnergyStored() { return (int) this.getEnergyProvider().getEnergyStored(this.getEnergySystem(), null); } /** * Returns the maximum amount of energy that can be stored. */ @Override public int getMaxEnergyStored() { return (int) this.getEnergyProvider().getCapacity(this.getEnergySystem(), null); } /** * Returns if this storage can have energy extracted. * If this is false, then any calls to extractEnergy will return 0. */ @Override public boolean canExtract() { return this.isPassive(); } /** * Used to determine if this storage can receive energy. * If this is false, then any calls to receiveEnergy will return 0. */ @Override public boolean canReceive() { // we never accept energy return false; } //endregion //region internals @SuppressWarnings("FieldMayBeFinal") @CapabilityInject(IEnergyStorage.class) private static Capability<IEnergyStorage> CAPAP_FORGE_ENERGYSTORAGE = null; private IEnergyStorage _consumer; private final LazyOptional<IEnergyStorage> _capability; //endregion }
[ "zeronoryouki@gmail.com" ]
zeronoryouki@gmail.com
42934cd132295e51ecb5038b394c2e435ec7eea9
4e3c5dc1cfd033b0e7c1bea625f9ee64ae12871a
/com/vungle/publisher/et.java
b806f5f341ee04b95e99b089e217912f481f40d2
[]
no_license
haphan2014/idle_heroes
ced0f6301b7a618e470ebfa722bef3d4becdb6ba
5bcc66f8e26bf9273a2a8da2913c27a133b7d60a
refs/heads/master
2021-01-20T05:01:54.157508
2017-08-25T14:06:51
2017-08-25T14:06:51
101,409,563
1
4
null
null
null
null
UTF-8
Java
false
false
1,231
java
package com.vungle.publisher; import com.vungle.publisher.ep.C1750a; import dagger.MembersInjector; import javax.inject.Provider; /* compiled from: vungle */ public final class et implements MembersInjector<ep> { static final /* synthetic */ boolean f1799a = (!et.class.desiredAssertionStatus()); private final Provider<cq> f1800b; private final Provider<C1750a> f1801c; public final /* synthetic */ void injectMembers(Object obj) { ep epVar = (ep) obj; if (epVar == null) { throw new NullPointerException("Cannot inject members into a null reference"); } epVar.f1551v = (cq) this.f1800b.get(); epVar.f1791h = (C1750a) this.f1801c.get(); } private et(Provider<cq> provider, Provider<C1750a> provider2) { if (f1799a || provider != null) { this.f1800b = provider; if (f1799a || provider2 != null) { this.f1801c = provider2; return; } throw new AssertionError(); } throw new AssertionError(); } public static MembersInjector<ep> m1652a(Provider<cq> provider, Provider<C1750a> provider2) { return new et(provider, provider2); } }
[ "hien.bui@vietis.com.vn" ]
hien.bui@vietis.com.vn
cbeba10c9a68f2d92c796ddcc24d5bbca7cd5202
b0d338e076ac7b4b4a659b4e85eeddb3fb3c23af
/src/main/java/com/yufan/pigcode/info/InfoBusinessParam.java
2812cca85fc1c844ea24e9c9a7035e33d2f0ace5
[]
no_license
lirf2018/pig-code-java
0ad32759344adfd7cf6c8c893d46e065bfe2242c
783a7d71c4d1949aae70b1bb4b3ad0fc0cf5a402
refs/heads/master
2022-12-07T14:15:40.338037
2019-07-09T01:49:27
2019-07-09T01:49:27
195,912,435
0
0
null
2022-11-24T04:45:08
2019-07-09T01:49:21
PigLatin
UTF-8
Java
false
false
1,960
java
package com.yufan.pigcode.info; import com.alibaba.fastjson.JSONObject; import org.apache.commons.lang3.StringUtils; import org.apache.pig.EvalFunc; import org.apache.pig.data.Tuple; import org.apache.pig.data.TupleFactory; import java.io.IOException; /** * 创建人: lirf * 创建时间: 2019/4/10 14:42 * 功能介绍: 处理info接口接收处理业务 */ public class InfoBusinessParam extends EvalFunc<Tuple> { @Override public Tuple exec(Tuple input) throws IOException { if (input == null || input.size() == 0) { return null; } //获取输入字符串 String strs = (String) input.get(0); if (StringUtils.isEmpty(strs)) { return null; } String[] businessArray = strs.split("接收参数:"); if (businessArray.length > 1) { JSONObject result = JSONObject.parseObject(businessArray[1]); String reqType = result.getString("req_type");//获取业务类型 if (null == reqType) { return null; } String[] dateArray = businessArray[0].split(" ");//获取日期 String date = dateArray[0]; TupleFactory newTuple = TupleFactory.getInstance(); Tuple tt = newTuple.newTuple(2); tt.set(0, date); tt.set(1, reqType); return tt; } return null; } // public static void main(String[] args) throws Exception { // String strs = "2019-04-10 11:37:53,475 INFO [com.uhuibao.common.action.InfoAction] - 【1554867473475】接收参数:{\"req_type\":\"card_main_info\",\"data\":{\"channel_code\":\"jb\"},\"locale\":\"CN\"}"; // TupleFactory input = TupleFactory.getInstance(); // Tuple tt = input.newTuple(1); // tt.set(0, strs); // InfoBusinessParam log = new InfoBusinessParam(); // Tuple out = log.exec(tt); // System.out.println(out); // } }
[ "512164882@qq.com" ]
512164882@qq.com
f2afb9eeab0d4023e364ef8d5211d4110cbd50db
7683938be3d4e276106ee60b227a8bf9351ff906
/app/src/main/java/com/zige/robot/xmlresult/ReadWordResult.java
f87ae56207773e7566e645b81b2a8c3b21002109
[]
no_license
PhoneSj/Robot
a42aad4c1c0b34607ed68d8ed777190e18dd2721
59a5978ef4ba8338edd7afa78c57fb0edae6b92e
refs/heads/master
2021-07-16T02:52:12.023042
2017-10-10T11:47:42
2017-10-10T11:47:42
106,408,173
0
0
null
null
null
null
UTF-8
Java
false
false
1,229
java
/** * */ package com.zige.robot.xmlresult; import com.zige.robot.xmlresult.util.ResultFormatUtil; /** * <p>Title: ReadWordResult</p> * <p>Description: </p> * <p>Company: www.iflytek.com</p> * @author iflytek * @date 2015年1月12日 下午5:03:50 */ public class ReadWordResult extends Result { public ReadWordResult() { category = "read_word"; } @Override public String toString() { StringBuffer buffer = new StringBuffer(); if ("cn".equals(language)) { buffer.append("[总体结果]\n") .append("评测内容:" + content + "\n") .append("朗读时长:" + time_len + "\n") .append("总分:" + total_score + "\n\n") .append("[朗读详情]") .append(ResultFormatUtil.formatDetails_CN(sentences)); } else { if (is_rejected) { buffer.append("检测到乱读,") .append("except_info:" + except_info + "\n\n"); // except_info代码说明详见《语音评测参数、结果说明文档》 } buffer.append("[总体结果]\n") .append("评测内容:" + content + "\n") .append("总分:" + total_score + "\n\n") .append("[朗读详情]") .append(ResultFormatUtil.formatDetails_EN(sentences)); } return buffer.toString(); } }
[ "724430327@qq.com" ]
724430327@qq.com
cf40cd0e57850f52bf27353491c4d65bfa2986b9
ff79e46531d5ad204abd019472087b0ee67d6bd5
/components/captcha/src/och/comp/captcha/impl/recaptcha/ReCaptcha.java
33206757d4ea4897879d45c9d7cc60df7c18d5d7
[ "Apache-2.0" ]
permissive
Frankie-666/live-chat-engine
24f927f152bf1ef46b54e3d55ad5cf764c37c646
3125d34844bb82a34489d05f1dc5e9c4aaa885a0
refs/heads/master
2020-12-25T16:36:00.156135
2015-08-16T09:16:57
2015-08-16T09:16:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,365
java
/* * Copyright 2007 Soren Davidsen, Tanesha Networks * * 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 och.comp.captcha.impl.recaptcha; import java.util.Properties; public interface ReCaptcha { /** * Creates HTML output with embedded recaptcha. The string response should be output on a HTML page (eg. inside a JSP). * * @param errorMessage An errormessage to display in the captcha, null if none. * @param options Options for rendering, <code>tabindex</code> and <code>theme</code> are currently supported by recaptcha. You can * put any options here though, and they will be added to the RecaptchaOptions javascript array. * @return */ public String createRecaptchaHtml(String errorMessage, Properties options); /** * Creates HTML output with embedded recaptcha. The string response should be output on a HTML page (eg. inside a JSP). * * This is just a wrapper that accepts the properties known to recaptcha.net * * @param errorMessage The error message to show in the recaptcha ouput * @param theme The theme to use for the recaptcha output (null if default) * @param tabindex The tabindex to use for the recaptcha element (null if default) * @return */ public String createRecaptchaHtml(String errorMessage, String theme, Integer tabindex); /** * Validates a reCaptcha challenge and response. * * @param remoteAddr The address of the user, eg. request.getRemoteAddr() * @param challenge The challenge from the reCaptcha form, this is usually request.getParameter("recaptcha_challenge_field") in your code. * @param response The response from the reCaptcha form, this is usually request.getParameter("recaptcha_response_field") in your code. * @return */ public ReCaptchaResponse checkAnswer(String remoteAddr, String challenge, String response) throws Exception; }
[ "evgenij.dolganov@gmail.com" ]
evgenij.dolganov@gmail.com
c2bc74be95431617e4a43f9243b5dcd953c464e6
0a5b533571ade9d5ac00149911953f7c8749dc7d
/src/osv/model/players/combat/DamageEffect.java
0dfe972b034cc390bab8b2627db595501cbc19be
[]
no_license
DKisKING/-R-rY-eZ-g9EG-Server
b6768e3e5b00b2f708afc361d1ba83f326984bc3
ee5b95357577bd6caf3266180d0301bfa73f3828
refs/heads/master
2021-06-25T23:37:52.395201
2017-09-10T20:41:08
2017-09-10T20:41:08
102,985,462
0
0
null
2017-09-11T06:46:16
2017-09-09T21:16:36
Java
UTF-8
Java
false
false
1,067
java
package osv.model.players.combat; import osv.model.npcs.NPC; import osv.model.players.Player; /** * * @author Jason MacKeigan * @date Nov 24, 2014, 9:47:29 PM */ public interface DamageEffect { /** * Executes some effect during the damage step of a player attack * * @param attacker the attacking player in combat * @param defender the defending player in combat * @param damage the damage dealt during this step */ public void execute(Player attacker, Player defender, Damage damage); /** * Executes some effect during the damage step of a player attack * * @param attacker the attacking player in combat * @param defender the defending npc in combat * @param damage the damage dealt during this step */ public void execute(Player attacker, NPC defender, Damage damage); /** * Determines if the event is executable by the operator * * @param operator the player executing the effect * @return true if it can be executed based on some operation, otherwise false */ public boolean isExecutable(Player operator); }
[ "dkisking123@hotmail.com" ]
dkisking123@hotmail.com
70c1845d64c592da32932df1d34c76f7e787aa65
a8e47979b45aa428a32e16ddc4ee2578ec969dfe
/base/capi/src/main/java/org/artifactory/sapi/security/SecurityConstants.java
bafd379bdbc5ad5177eac5b86c87e4df68409045
[]
no_license
nuance-sspni/artifactory-oss
da505cac1984da131a61473813ee2c7c04d8d488
af3fcf09e27cac836762e9957ad85bdaeec6e7f8
refs/heads/master
2021-07-22T20:04:08.718321
2017-11-02T20:49:33
2017-11-02T20:49:33
109,313,757
0
1
null
null
null
null
UTF-8
Java
false
false
952
java
/* * * Artifactory is a binaries repository manager. * Copyright (C) 2016 JFrog Ltd. * * Artifactory is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Artifactory 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Artifactory. If not, see <http://www.gnu.org/licenses/>. * */ package org.artifactory.sapi.security; /** * Date: 7/27/11 * Time: 5:04 PM * * @author Fred Simon */ public interface SecurityConstants { String DEFAULT_REALM = "artifactory"; }
[ "tuan-anh.nguyen@nuance.com" ]
tuan-anh.nguyen@nuance.com
09dc2dd71ce9abbacba4862e606b47d716b49f2c
c00bda3a60fddd59714898e3926dbe9650abcf88
/src/main/core/com/gypsyengineer/tlsbunny/tls13/connection/action/composite/IncomingCertificateRequest.java
6c3ad43a3feaab4c68ffa0e25c9a0bc1bd45eb47
[ "Apache-2.0" ]
permissive
artem-smotrakov/tlsbunny-and-docker
291ac521d323320d87d2b27b35ae963bd9dbd716
325bba4f406bfe0ee1c1f34073aa29b33c3552a4
refs/heads/master
2021-04-06T10:45:44.026115
2019-04-19T18:03:58
2019-04-19T18:03:58
199,166,454
0
0
null
null
null
null
UTF-8
Java
false
false
2,174
java
package com.gypsyengineer.tlsbunny.tls13.connection.action.composite; import com.gypsyengineer.tlsbunny.tls13.connection.action.AbstractAction; import com.gypsyengineer.tlsbunny.tls13.connection.action.Action; import com.gypsyengineer.tlsbunny.tls13.connection.action.ActionFailed; import com.gypsyengineer.tlsbunny.tls13.crypto.AEADException; import com.gypsyengineer.tlsbunny.tls13.struct.*; import com.gypsyengineer.tlsbunny.tls13.utils.TLS13Utils; import java.io.IOException; import java.util.ArrayList; import java.util.List; public class IncomingCertificateRequest extends AbstractAction { @Override public String name() { return "CertificateRequest"; } @Override public Action run() throws ActionFailed, AEADException, IOException { Handshake handshake = processEncryptedHandshake(); if (!handshake.containsCertificateRequest()) { throw new ActionFailed("expected a CertificateRequest message"); } processCertificateRequest(handshake); return this; } private void processCertificateRequest(Handshake handshake) throws IOException { CertificateRequest certificateRequest = context.factory().parser().parseCertificateRequest( handshake.getBody()); context.certificateRequestContext(certificateRequest.certificateRequestContext()); context.setServerCertificateRequest(handshake); Extension extension = TLS13Utils.findExtension( ExtensionType.signature_algorithms, certificateRequest.extensions().toList()); if (extension == null) { throw new IOException("no signature_algorithms extension"); } SignatureSchemeList list = context.factory().parser().parseSignatureSchemeList( extension.extensionData().bytes()); List<String> signature_algorithms = new ArrayList<>(); for (SignatureScheme scheme : list.getSupportedSignatureAlgorithms().toList()) { signature_algorithms.add(scheme.toString()); } output.info("CertificateRequest, algorithms: %s", String.join(", ", signature_algorithms)); } }
[ "artem.smotrakov@gmail.com" ]
artem.smotrakov@gmail.com
021b3c36515b673f9ca334126d62396dda9258e5
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_1/src/h/h/j/Calc_1_1_7795.java
88301d7064a39a2d2b3d1f67bd6f8954d42eb74e
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
131
java
package h.h.j; public class Calc_1_1_7795 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
bc2d5b32c5a73bcbbc750f71dc84f2f87722d48e
e7cb38a15026d156a11e4cf0ea61bed00b837abe
/groundwork-monitor-platform/agents/cloudhub/src/main/java/org/groundwork/cloudhub/connectors/rhev/restapi/DetailedLinks.java
4d32eaa692eab88f9dd6cf88d55217218a9deb6d
[]
no_license
wang-shun/groundwork-trunk
5e0ce72c739fc07f634aeefc8f4beb1c89f128af
ea1ca766fd690e75c3ee1ebe0ec17411bc651a76
refs/heads/master
2020-04-01T08:50:03.249587
2018-08-20T21:21:57
2018-08-20T21:21:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,356
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 // 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: 2013.02.07 at 03:07:31 PM PST // package org.groundwork.cloudhub.connectors.rhev.restapi; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import java.util.ArrayList; import java.util.List; /** * <p>Java class for DetailedLinks complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="DetailedLinks"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="link" type="{}DetailedLink" maxOccurs="unbounded"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "DetailedLinks", propOrder = { "links" }) public class DetailedLinks { @XmlElement(name = "link", required = true) protected List<DetailedLink> links; /** * Gets the value of the links property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the links property. * * <p> * For example, to add a new item, do as follows: * <pre> * getLinks().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link DetailedLink } * * */ public List<DetailedLink> getLinks() { if (links == null) { links = new ArrayList<DetailedLink>(); } return this.links; } public boolean isSetLinks() { return ((this.links!= null)&&(!this.links.isEmpty())); } public void unsetLinks() { this.links = null; } }
[ "gibaless@gmail.com" ]
gibaless@gmail.com
e1dbdeb9ab01af2bd0753916839f4ad55d44a189
aa424ea451ae34fb82c259ab0d40d8d7dd8fdbb8
/src/com/jatools/common/QueryConditionUtil.java
9c6d147ed5d5f7a436a5230a532443f648ccb07a
[]
no_license
lejingw/wlscm
494fc3e8b39cd4ff5d20854f48a629c3c92842e8
f152aaf93657e712722283f53a6bd62091398799
refs/heads/master
2020-12-24T16:50:31.168377
2013-11-08T09:35:58
2013-11-08T09:35:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,372
java
package com.jatools.common; import java.util.Map; import javax.servlet.http.HttpServletRequest; import com.jatools.web.util.StringUtil; import com.jatools.web.view.BaseMultiActionController; public class QueryConditionUtil { public static final String QUERY_SQL_SESSION_KEY = "query_sql_session_key"; /** * 从session获取值 * @param req * @param condition * @param keys */ public static void getSessionParameter(BaseMultiActionController controller, HttpServletRequest req, Map<String, String> condition, String... keys){ if(null == keys||keys.length<1){ return ; } String conditionSessionKey = getConditionSessionKey(controller); //检查是否进行页面查询 if(isUnQuerys(condition)){//显示页面,从session获取查询条件 Object obj = req.getSession().getAttribute(conditionSessionKey); if(null != obj && obj instanceof Map){ Map<String, String> ssnCondition = (Map<String, String>)obj; for(String key:ssnCondition.keySet()){ condition.put(key, ssnCondition.get(key)); } } }else{ try { //页面查询,保存查询条件到session Object obj = req.getSession().getAttribute(QueryConditionUtil.QUERY_SQL_SESSION_KEY); if(null != obj && obj instanceof String){ if(!"-1".equals(obj.toString())){ condition.put("_q_sql", (String)obj); }else{ condition.put("_q_sql", null); } req.getSession().removeAttribute(QueryConditionUtil.QUERY_SQL_SESSION_KEY); } } catch (Exception e) { e.printStackTrace(); } } req.getSession().setAttribute(conditionSessionKey, condition); } public static void resetCondition(BaseMultiActionController controller, HttpServletRequest req){ String conditionSessionKey = getConditionSessionKey(controller); Map<String, String> condition = (Map<String, String>)req .getSession().getAttribute(conditionSessionKey); if(condition != null && condition.containsKey("_q_sql")) { condition.put("_q_sql", null); } } private static boolean isUnQuerys(Map<String, String> condition){ if(StringUtil.isNotEmpty(condition.get("start")) || StringUtil.isNotEmpty(condition.get("limit"))){ return false; } return true; } private static String getConditionSessionKey(BaseMultiActionController controller){ return "query_key_" + controller.getSessionKey(); } }
[ "lejingw@163.com" ]
lejingw@163.com
e326e765d59ad2faaaaba03122b346606c0a38b2
9a2869eff7ed86c6ca9ea441ed530891d154e099
/SisBancoCompleto/src/sisbancocompleto/SisBancoCompleto.java
f20c46424df8e81f2197dc3d98c60420014a5395
[]
no_license
cmontellanob/SistemasDistribuidos
40fc3e49d94cad90b9446c2f2b8aee1a2ddd7c9a
5f72fbcd3543ad36ca9de853e7fa62bebdd20e77
refs/heads/master
2023-04-30T12:19:51.881581
2019-07-01T17:50:03
2019-07-01T17:50:03
175,741,012
0
0
null
2023-04-14T17:49:02
2019-03-15T03:19:44
Java
UTF-8
Java
false
false
438
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 sisbancocompleto; /** * * @author Carlos */ public class SisBancoCompleto { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here } }
[ "carlosmontellano@gmail.com" ]
carlosmontellano@gmail.com
2e3e153210d43abc3a6abefe98f1c7d11ad89549
395e11531a072ac3f84ab6283a60a2ec9cb0e54f
/src/main/java/com/google/android/gms/wallet/firstparty/zzl.java
031226599486ff8708455d2179933ec37d3372c4
[]
no_license
subdiox/senkan
c2b5422064735c8e9dc93907d613d2e7c23f62e4
cbe5bce08abf2b09ea6ed5da09c52c4c1cde3621
refs/heads/master
2020-04-01T20:20:01.021143
2017-07-18T10:24:01
2017-07-18T10:24:01
97,585,160
0
1
null
null
null
null
UTF-8
Java
false
false
634
java
package com.google.android.gms.wallet.firstparty; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.zza; public final class zzl extends zza { public static final Creator<zzl> CREATOR = new zzm(); private final int mVersionCode; int[] zzbPI; zzl() { this(1, null); } zzl(int i, int[] iArr) { this.mVersionCode = i; this.zzbPI = iArr; } public int getVersionCode() { return this.mVersionCode; } public void writeToParcel(Parcel parcel, int i) { zzm.zza(this, parcel, i); } }
[ "subdiox@gmail.com" ]
subdiox@gmail.com
d8ab3f3b43b0e6715bbfe9e53e19d4e4b71f0bff
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/30/30_d40e1723ec63cc55aad5c4105e8dc5c2d4d546a2/ChartFactory/30_d40e1723ec63cc55aad5c4105e8dc5c2d4d546a2_ChartFactory_t.java
0a8331323ee7701551c001adb58ec7ed6cb1667d
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,552
java
package org.motechproject.carereporting.web.chart; import org.motechproject.carereporting.domain.IndicatorEntity; import org.motechproject.carereporting.domain.IndicatorValueEntity; import org.motechproject.carereporting.domain.ReportEntity; import org.motechproject.carereporting.domain.types.ReportType; import org.motechproject.carereporting.exception.CareNoValuesException; import org.motechproject.carereporting.service.ReportService; import org.motechproject.carereporting.web.chart.builder.AxisBuilder; import org.motechproject.carereporting.web.chart.builder.BarsBuilder; import org.motechproject.carereporting.web.chart.builder.ChartBuilder; import org.motechproject.carereporting.web.chart.builder.GridBuilder; import org.motechproject.carereporting.web.chart.builder.LegendBuilder; import org.motechproject.carereporting.web.chart.builder.MouseBuilder; import org.motechproject.carereporting.web.chart.builder.PieBuilder; import org.motechproject.carereporting.web.chart.builder.SelectionBuilder; import org.motechproject.carereporting.web.chart.builder.SerieBuilder; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.List; @Component public final class ChartFactory { @Autowired private ReportService reportService; private static final int CREATE_LINE_CHART_VARIABLE = 4; private static final double BAR_WIDTH = .5; private static final int EXPLOSION_NUMBER = 6; private static final int SELECTION_FPS = 30; public Chart createLineChart(IndicatorEntity indicator, List<IndicatorValueEntity> values) { if (values.size() == 0) { throw new CareNoValuesException(); } return createTemplateChart(indicator.getName()) .xAxis(new AxisBuilder() .minorTickFreq(CREATE_LINE_CHART_VARIABLE) .mode(AxisBuilder.Mode.TIME) .timeformat("%m/%d/%y")) .grid(new GridBuilder() .minorVerticalLines(true)) .selection(new SelectionBuilder() .fps(SELECTION_FPS) .mode(SelectionBuilder.Mode.X)) .serie(createSerieForIndicatorValues(values)) .build(); } private Serie createSerieForIndicatorValues(List<IndicatorValueEntity> values) { SerieBuilder serieBuilder = new SerieBuilder(); for (IndicatorValueEntity value: values) { serieBuilder.point(BigDecimal.valueOf(value.getDate().getTime()), value.getValue()); } return serieBuilder.build(); } public Chart createBarChart(IndicatorEntity indicator, List<IndicatorValueEntity> values) { BigDecimal latestIndicatorValue = values.size() != 0 ? values.get(values.size() - 1).getValue() : BigDecimal.ZERO; ReportEntity reportEntity = reportService.getReportByTypeAndIndicatorId( ReportType.BarChart, indicator.getId()); String labelX = (reportEntity.getLabelX() == null) ? "" : reportEntity.getLabelX(); String labelY = (reportEntity.getLabelY() == null) ? "" : reportEntity.getLabelY(); return createTemplateChart(indicator.getName()) .bars(new BarsBuilder() .show(true) .horizontal(true) .shadowSize(0) .barWidth(BAR_WIDTH)) .xAxis(new AxisBuilder() .min(0) .autoScaleMargin(1)) .serie(new SerieBuilder() .label(labelX) .point(latestIndicatorValue, BigDecimal.ONE)) .serie(new SerieBuilder() .label(labelY) .point(BigDecimal.ONE.subtract(latestIndicatorValue), 1 + BAR_WIDTH)) .build(); } public Chart createPieChart(IndicatorEntity indicator, List<IndicatorValueEntity> values) { if (values.size() == 0) { throw new CareNoValuesException(); } BigDecimal indicatorNumeratorsCombined = BigDecimal.ZERO; BigDecimal indicatorDenominatorsCombined = BigDecimal.ZERO; for (IndicatorValueEntity value : values) { indicatorNumeratorsCombined = indicatorNumeratorsCombined.add(value.getNumerator()); indicatorDenominatorsCombined = indicatorDenominatorsCombined.add(value.getDenominator()); } BigDecimal chartValue = indicatorNumeratorsCombined.divide(indicatorDenominatorsCombined, 4, RoundingMode.HALF_UP); ReportEntity reportEntity = reportService.getReportByTypeAndIndicatorId( ReportType.PieChart, indicator.getId()); String labelX = (reportEntity.getLabelX() == null) ? "" : reportEntity.getLabelX(); String labelY = (reportEntity.getLabelY() == null) ? "" : reportEntity.getLabelY(); return createTemplateChart(indicator.getName()) .grid(new GridBuilder() .verticalLines(false) .horizontalLines(false)) .xAxis(new AxisBuilder() .showLabels(false)) .yAxis(new AxisBuilder() .showLabels(false)) .pie(new PieBuilder() .show(true) .explode(EXPLOSION_NUMBER)) .serie(new SerieBuilder() .label(labelX) .point(BigDecimal.ZERO, chartValue)) .serie(new SerieBuilder() .label(labelY) .point(BigDecimal.ZERO, BigDecimal.ONE.subtract(chartValue))) .build(); } private ChartBuilder createTemplateChart(String title) { return new ChartBuilder() .title(title) .htmlText(false) .legend(new LegendBuilder() .position(LegendBuilder.Position.BOTTOM_LEFT) .backgroundColor("#D2E8FF")) .mouse(new MouseBuilder() .track(true) .relative(true) .position("s")); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
6421d48d51cf9f95425d3b125efb051d7fa3346b
22c74db7c1d0de3db87a22fcde261e96a97ab8e1
/src/main/java/com/neodem/common/command/Application.java
5e86f6d2fc5c4e675f6d612426fbed087e3f5fa6
[]
no_license
neodem/neodem-common
e5aee70f0884585101d7126604f897c9da44d6a3
e9f61cc00da08e1ea3db51d222894f69d8614a95
refs/heads/master
2021-01-20T11:25:35.930279
2018-02-05T22:52:18
2018-02-05T22:52:18
3,393,166
0
0
null
null
null
null
UTF-8
Java
false
false
299
java
/* file : Application.java * created : Dec 29, 2005 * modified : */ package com.neodem.common.command; /** * @author Vincent Fumo (neodem@gmail.com) * */ public interface Application { public void setup(String[] args); public void start() throws ApplicationException; }
[ "neodem@gmail.com" ]
neodem@gmail.com
cdcc4486899d518d2e948ccb666049d54bd25a28
2b8c47031dddd10fede8bcf16f8db2b52521cb4f
/subject SPLs and test cases/BerkeleyDB(5)/BerkeleyDB_P4/evosuite-tests5/com/sleepycat/je/utilint/TinyHashSet_ESTest_scaffolding5.java
b1252dfbce5210eec994fe8199b2ddca52b63795
[]
no_license
psjung/SRTST_experiments
6f1ff67121ef43c00c01c9f48ce34f31724676b6
40961cb4b4a1e968d1e0857262df36832efb4910
refs/heads/master
2021-06-20T04:45:54.440905
2019-09-06T04:05:38
2019-09-06T04:05:38
206,693,757
1
0
null
2020-10-13T15:50:41
2019-09-06T02:10:06
Java
UTF-8
Java
false
false
1,450
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Sat Apr 22 12:35:22 KST 2017 */ package com.sleepycat.je.utilint; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class TinyHashSet_ESTest_scaffolding5 { @org.junit.Rule public org.junit.rules.Timeout globalTimeout = new org.junit.rules.Timeout(4000); 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.sleepycat.je.utilint.TinyHashSet"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } }
[ "psjung@kaist.ac.kr" ]
psjung@kaist.ac.kr
7f46cb8ce87dbe49649b9842d95e11dea8ea3aa1
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a004/A004908Test.java
f9bb070fc31b81bf0cb3d0b7ba4dcbc736db5873
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a004; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A004908Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
69a8a93db031e9d319875f27d8c0e89e27e52165
4fdb3d11b2a6f7ec83bd6c603d95b24db8a8a3f5
/plugin/src/main/java/com/stratio/cassandra/lucene/search/SearchBuilder.java
cc8cbb02f343579c903ca773c9087fa3a64ee482
[ "Apache-2.0" ]
permissive
adelapena/cassandra-lucene-index
ab3e87c931feecb86b7214ed9adbd551801782ef
b54d4e646104c33c20283bfd57287e18f7db3cca
refs/heads/branch-2.2.4
2021-01-01T05:24:10.488883
2016-03-04T14:03:17
2016-03-04T14:03:17
48,164,726
1
0
null
2015-12-17T09:21:35
2015-12-17T09:21:35
null
UTF-8
Java
false
false
5,473
java
/* * Licensed to STRATIO (C) under one or more contributor license agreements. * See the NOTICE file distributed with this work for additional information * regarding copyright ownership. The STRATIO (C) licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.stratio.cassandra.lucene.search; import com.stratio.cassandra.lucene.IndexException; import com.stratio.cassandra.lucene.search.condition.Condition; import com.stratio.cassandra.lucene.search.condition.builder.ConditionBuilder; import com.stratio.cassandra.lucene.search.sort.Sort; import com.stratio.cassandra.lucene.search.sort.builder.SortBuilder; import com.stratio.cassandra.lucene.search.sort.builder.SortFieldBuilder; import com.stratio.cassandra.lucene.util.Builder; import com.stratio.cassandra.lucene.util.JsonSerializer; import org.codehaus.jackson.annotate.JsonProperty; import java.io.IOException; /** * Class for building a new {@link Search}. * * @author Andres de la Pena {@literal <adelapena@stratio.com>} */ public class SearchBuilder implements Builder<Search> { /** The {@link Condition} for querying, maybe {@code null} meaning no querying. */ @JsonProperty("query") private ConditionBuilder<?, ?> queryBuilder; /** The {@link Condition} for filtering, maybe {@code null} meaning no filtering. */ @JsonProperty("filter") private ConditionBuilder<?, ?> filterBuilder; /** The {@link Sort} for the query, maybe {@code null} meaning no filtering. */ @JsonProperty("sort") private SortBuilder sortBuilder; /** If this search must force the refresh the index before reading it. */ @JsonProperty("refresh") private boolean refresh; /** Default constructor. */ public SearchBuilder() { } /** * Returns this builder with the specified querying condition. * * @param queryBuilder The querying condition to be set. * @return This builder with the specified querying condition. */ public SearchBuilder query(ConditionBuilder<?, ?> queryBuilder) { this.queryBuilder = queryBuilder; return this; } /** * Returns this builder with the specified filtering condition. * * @param filterBuilder The filtering condition to be set. * @return This builder with the specified filtering condition. */ public SearchBuilder filter(ConditionBuilder<?, ?> filterBuilder) { this.filterBuilder = filterBuilder; return this; } /** * Returns this builder with the specified sorting. * * @param sortBuilder The sorting fields to be set. * @return This builder with the specified sorting. */ public SearchBuilder sort(SortBuilder sortBuilder) { this.sortBuilder = sortBuilder; return this; } /** * Returns this builder with the specified sorting. * * @param sortFieldBuilders The sorting fields to be set. * @return This builder with the specified sorting. */ public SearchBuilder sort(SortFieldBuilder... sortFieldBuilders) { this.sortBuilder = new SortBuilder(sortFieldBuilders); return this; } /** * Sets if the {@link Search} to be built must refresh the index before reading it. * * @param refresh If the {@link Search} to be built must refresh the index before reading it. * @return This builder with the specified refresh. */ public SearchBuilder refresh(boolean refresh) { this.refresh = refresh; return this; } /** * Returns the {@link Search} represented by this builder. * * @return The {@link Search} represented by this builder. */ public Search build() { Condition query = queryBuilder == null ? null : queryBuilder.build(); Condition filter = filterBuilder == null ? null : filterBuilder.build(); Sort sort = sortBuilder == null ? null : sortBuilder.build(); return new Search(query, filter, sort, refresh); } /** * Returns the JSON representation of this object. * * @return the JSON representation of this object. */ public String toJson() { build(); try { return JsonSerializer.toString(this); } catch (IOException e) { throw new IndexException(e, "Unformateable JSON search: %s", e.getMessage()); } } /** * Returns the {@link SearchBuilder} represented by the specified JSON {@code String}. * * @param json A JSON {@code String} representing a {@link SearchBuilder}. * @return The {@link SearchBuilder} represented by the specified JSON {@code String}. */ public static SearchBuilder fromJson(String json) { try { return JsonSerializer.fromString(json, SearchBuilder.class); } catch (IOException e) { throw new IndexException(e, "Unparseable JSON search: %s", e.getMessage()); } } }
[ "a.penya.garcia@gmail.com" ]
a.penya.garcia@gmail.com
c8c3a6ce5c2be180ba97930ceb3abcc7e2605e4f
f86938ea6307bf6d1d89a07b5b5f9e360673d9b8
/CodeComment_Data/Code_Jam/val/Standing_Ovation/S/one(6).java
5019fc63893dbe5b66bc461d8c0f40da27dc1bf1
[]
no_license
yxh-y/code_comment_generation
8367b355195a8828a27aac92b3c738564587d36f
2c7bec36dd0c397eb51ee5bd77c94fa9689575fa
refs/heads/master
2021-09-28T18:52:40.660282
2018-11-19T14:54:56
2018-11-19T14:54:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
772
java
package methodEmbedding.Standing_Ovation.S.LYD970; import java.util.Scanner; public class one { public static void main(String[] args) { Scanner inp = new Scanner(System.in); int T = inp.nextInt(); for (int i = 0; i < T; i++) { int res = 0; int s = inp.nextInt(); String per = inp.next(); int sum = Integer.parseInt(per.charAt(0)+""); for (int j = 1; j <= s; j++) { int temp = Integer.parseInt(per.charAt(j)+""); if(sum < j && temp > 0){ res += (j-sum); sum += (j-sum); } sum += temp; } System.out.println("Case #"+(i+1)+": "+res); } } }
[ "liangyuding@sjtu.edu.cn" ]
liangyuding@sjtu.edu.cn
0a49463595dad4d1da6e7a11c7dae3cf76bdead1
9d32980f5989cd4c55cea498af5d6a413e08b7a2
/A5_8_1_0/src/main/java/com/android/server/wm/-$Lambda$MMmeixlGtfvS8ONgeh16gZdfDeA.java
fb7b33942bb350e5022b424c037d026f087c9c86
[]
no_license
liuhaosource/OppoFramework
e7cc3bcd16958f809eec624b9921043cde30c831
ebe39acabf5eae49f5f991c5ce677d62b683f1b6
refs/heads/master
2023-06-03T23:06:17.572407
2020-11-30T08:40:07
2020-11-30T08:40:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
781
java
package com.android.server.wm; import java.util.function.Predicate; final /* synthetic */ class -$Lambda$MMmeixlGtfvS8ONgeh16gZdfDeA implements Predicate { /* renamed from: -$f0 */ private final /* synthetic */ Object f388-$f0; /* renamed from: -$f1 */ private final /* synthetic */ Object f389-$f1; private final /* synthetic */ boolean $m$0(Object arg0) { return ((DetectBlack) this.f388-$f0).m205lambda$-com_android_server_wm_DetectBlack_1698((WindowSurfaceController) this.f389-$f1, (WindowState) arg0); } public /* synthetic */ -$Lambda$MMmeixlGtfvS8ONgeh16gZdfDeA(Object obj, Object obj2) { this.f388-$f0 = obj; this.f389-$f1 = obj2; } public final boolean test(Object obj) { return $m$0(obj); } }
[ "dstmath@163.com" ]
dstmath@163.com
6d327117625a816abaa91e03239727b3977858e5
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/kylin/learning/2407/JobMetricsFacade.java
41d49e064c0dc9c91e34d4df52ec4221d340b341
[]
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
6,778
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.job.metrics; import java.util.Locale; import org.apache.kylin.common.KylinConfig; import org.apache.kylin.metrics.MetricsManager; import org.apache.kylin.metrics.lib.impl.RecordEvent; import org.apache.kylin.metrics.lib.impl.TimedRecordEvent; import org.apache.kylin.metrics.property.JobPropertyEnum; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class JobMetricsFacade { private static final Logger logger = LoggerFactory.getLogger(JobMetricsFacade.class); public static void updateMetrics(JobStatisticsResult jobStats) { if (!KylinConfig.getInstanceFromEnv().isKylinMetricsReporterForJobEnabled()) { return; } /** * report job related metrics */ RecordEvent metricsEvent; if (jobStats.throwable == null) { metricsEvent = new TimedRecordEvent(KylinConfig.getInstanceFromEnv().getKylinMetricsSubjectJob()); setJobWrapper(metricsEvent, jobStats.user, jobStats.projectName, jobStats.cubeName, jobStats.jobId, jobStats.jobType, jobStats.cubingType); setJobStats(metricsEvent, jobStats.tableSize, jobStats.cubeSize, jobStats.buildDuration, jobStats.waitResourceTime, jobStats.perBytesTimeCost, // jobStats.dColumnDistinct, jobStats.dDictBuilding, jobStats.dCubingInmem, jobStats.dHfileConvert); } else { metricsEvent = new TimedRecordEvent(KylinConfig.getInstanceFromEnv().getKylinMetricsSubjectJobException()); setJobExceptionWrapper(metricsEvent, jobStats.user, jobStats.projectName, jobStats.cubeName, jobStats.jobId, jobStats.jobType, jobStats.cubingType, // jobStats.throwable.getClass() ); } MetricsManager.getInstance().update(metricsEvent); } private static void setJobWrapper(RecordEvent metricsEvent, String user, String projectName, String cubeName, String jobId, String jobType, String cubingType) { metricsEvent.put(JobPropertyEnum.USER.toString(), user); metricsEvent.put(JobPropertyEnum.PROJECT.toString(), projectName); metricsEvent.put(JobPropertyEnum.CUBE.toString(), cubeName); metricsEvent.put(JobPropertyEnum.ID_CODE.toString(), jobId); metricsEvent.put(JobPropertyEnum.TYPE.toString(), jobType); metricsEvent.put(JobPropertyEnum.ALGORITHM.toString(), cubingType); } private static void setJobStats(RecordEvent metricsEvent, long tableSize, long cubeSize, long buildDuration, long waitResourceTime, double perBytesTimeCost, long dColumnDistinct, long dDictBuilding, long dCubingInmem, long dHfileConvert) { metricsEvent.put(JobPropertyEnum.SOURCE_SIZE.toString(), tableSize); metricsEvent.put(JobPropertyEnum.CUBE_SIZE.toString(), cubeSize); metricsEvent.put(JobPropertyEnum.BUILD_DURATION.toString(), buildDuration); metricsEvent.put(JobPropertyEnum.WAIT_RESOURCE_TIME.toString(), waitResourceTime); metricsEvent.put(JobPropertyEnum.PER_BYTES_TIME_COST.toString(), perBytesTimeCost); metricsEvent.put(JobPropertyEnum.STEP_DURATION_DISTINCT_COLUMNS.toString(), dColumnDistinct); metricsEvent.put(JobPropertyEnum.STEP_DURATION_DICTIONARY.toString(), dDictBuilding); metricsEvent.put(JobPropertyEnum.STEP_DURATION_INMEM_CUBING.toString(), dCubingInmem); metricsEvent.put(JobPropertyEnum.STEP_DURATION_HFILE_CONVERT.toString(), dHfileConvert); } private static <T extends Throwable> void setJobExceptionWrapper(RecordEvent metricsEvent, String user, String projectName, String cubeName, String jobId, String jobType, String cubingType, Class<T> throwableClass) { setJobWrapper(metricsEvent, user, projectName, cubeName, jobId, jobType, cubingType); metricsEvent.put(JobPropertyEnum.EXCEPTION.toString(), throwableClass.getName()); } public static class JobStatisticsResult { // dimensions private String user; private String projectName; private String cubeName; private String jobId; private String jobType; private String cubingType; // statistics private long tableSize; private long cubeSize; private long buildDuration; private long waitResourceTime; private double perBytesTimeCost; // step statistics private long dColumnDistinct = 0L; private long dDictBuilding = 0L; private long dCubingInmem = 0L; private long dHfileConvert = 0L; // exception private Throwable throwable; public void setWrapper(String user, String projectName, String cubeName, String jobId, String jobType, String cubingType) { this.user = user; this.projectName = projectName == null ? null : projectName.toUpperCase(Locale.ROOT); this.cubeName = cubeName; this.jobId = jobId; this.jobType = jobType; this.cubingType = cubingType; } public void setJobStats(long tableSize, long cubeSize, long buildDuration, long waitResourceTime, double perBytesTimeCost) { this.tableSize = tableSize; this.cubeSize = cubeSize; this.buildDuration = buildDuration; this.waitResourceTime = waitResourceTime; this.perBytesTimeCost = perBytesTimeCost; } public void setJobStepStats(long dColumnDistinct, long dDictBuilding, long dCubingInmem, long dHfileConvert) { this.dColumnDistinct = dColumnDistinct; this.dDictBuilding = dDictBuilding; this.dCubingInmem = dCubingInmem; this.dHfileConvert = dHfileConvert; } public void setJobException(Throwable throwable) { this.throwable = throwable; } } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
38ebd2a0e7bfbe10b3f69089222f93c3e678d2c7
0493ffe947dad031c7b19145523eb39209e8059a
/OpenJdk8uTest/src/test/java/time/test/java/time/TestZonedDateTime.java
c0df4471388faf205f1d88f6294329fa3e4edb7c
[]
no_license
thelinh95/Open_Jdk8u_Test
7612f1b63b5001d1df85c1df0d70627b123de80f
4df362a71e680dbd7dfbb28c8922e8f20373757a
refs/heads/master
2021-01-16T19:27:30.506632
2017-08-13T23:26:05
2017-08-13T23:26:05
100,169,775
0
1
null
null
null
null
UTF-8
Java
false
false
3,202
java
/* * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * This file is available under and governed by the GNU General Public * License version 2 only, as published by the Free Software Foundation. * However, the following notice accompanied the original version of this * file: * * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos * * 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 JSR-310 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 OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package test.java.time.test.java.time; import java.time.ZonedDateTime; import org.testng.annotations.Test; /** * Test ZonedDateTime. */ @Test public class TestZonedDateTime extends AbstractTest { @Test public void test_immutable() { assertImmutable(ZonedDateTime.class); } }
[ "truongthelinh95@gmail.com" ]
truongthelinh95@gmail.com
9937d103f019d999f439233b63f70e23bf04a707
662d6c93c22658c05a33c96d13f237532463cbde
/src/main/java/com/fwtai/image/ImgCode.java
2b6b369c99ace782fe39047bd2c07878378b869a
[]
no_license
gzstyp/imageCode
d3b1c04f5afe32936decc100c76b88b8f82dcefc
8dbb12a91489d01d3b56e5daa9d34d9158d75f25
refs/heads/master
2023-07-06T05:25:17.699949
2021-08-08T04:34:47
2021-08-08T04:34:47
290,386,584
0
0
null
null
null
null
UTF-8
Java
false
false
4,480
java
package com.fwtai.image; import javax.imageio.ImageIO; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.awt.*; import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.Serializable; import java.util.Random; /** * 基于算术生成图形验证码 * @作者 田应平 * @版本 v1.0 * @创建时间 2017年1月12日 01:09:28 * @QQ号码 444141300 * @官网 http://www.fwtai.com */ public final class ImgCode extends HttpServlet implements Serializable { /**图片的宽度*/ private final static short WIDTH = 122; /**图片的高度*/ private final static short HEIGHT = 40; private String sessionKey = "imgCode"; /** * 默认的session的key是imgCode * @作者 田应平 * @QQ 444141300 * @创建时间 2020/6/2 12:06 */ public ImgCode(){} /** * 指定session的key * @param sessionKey 指定session的key * @作者 田应平 * @QQ 444141300 * @创建时间 2020年6月2日 12:07:27 */ public ImgCode(final String sessionKey){ this.sessionKey = sessionKey; } /** * 画随机码图 * @param text * @param g * @param width * @param height * @throws IOException */ private final void Render(final String text,final Graphics g,final short width,final short height){ g.setColor(Color.WHITE); // 背景色 g.fillRect(0, 0, width, height); g.setColor(new Color(173, 180, 190)); final Random random = new Random(); for (int i = 0; i < 50; i++){ g.drawOval(random.nextInt(88),random.nextInt(10),100 + random.nextInt(10),100 + random.nextInt(10)); } final Font mFont = new Font("Arial",Font.BOLD,30);//字体大小 g.setFont(mFont); g.setColor(getRandColor(128,200)); g.drawString(text,0,31);//字迹位置 } /** * 给定范围获得随机颜色 * @param * @作者 田应平 * @QQ 444141300 * @创建时间 2019/9/9 0:58 */ protected final Color getRandColor(int fc, int bc){ if(fc > 255) fc = 254; if(bc > 255) bc = 255; final int result = bc - fc; final Random random = new Random(); int r = fc + random.nextInt(result); int g = fc + random.nextInt(result); int b = fc + random.nextInt(result); return new Color(r, g, b); } @Override protected void service(final HttpServletRequest request,final HttpServletResponse response) throws IOException{ final HttpSession session = request.getSession(); response.setContentType("image/jpeg"); final ServletOutputStream sos = response.getOutputStream(); // 设置浏览器不要缓存此图片 response.setHeader("Pragma", "No-cache"); response.setHeader("Cache-Control", "no-cache"); response.setDateHeader("Expires", 0); // 创建内存图象并获得其图形上下文 final BufferedImage image = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_3BYTE_BGR); final Graphics g = image.getGraphics(); final int subtractor = new Random().nextInt(99); final int minuend = new Random().nextInt(99); int value = subtractor - minuend; String result = subtractor+"-"+minuend+"=?"; final String[] arr = {"+","-","x"}; final int random = new Random().nextInt(3); final String operator = arr[random]; switch (operator){ case "+": value = minuend + subtractor; result = minuend+"+"+subtractor+"=?"; break; case "x": value = minuend * subtractor; result = minuend+"×"+subtractor+"=?"; break; default: if(minuend > subtractor){ value = minuend - subtractor; result = minuend+"-"+subtractor+"=?"; } break; } Render(result,g,WIDTH,HEIGHT); g.dispose(); // 将图像输出到客户端 final ByteArrayOutputStream bos = new ByteArrayOutputStream(); ImageIO.write(image, "JPEG", bos); final byte[] buf = bos.toByteArray(); response.setContentLength(buf.length); // 下面的语句也可写成: bos.writeTo(sos); sos.write(buf); bos.close(); sos.close(); session.setAttribute(this.sessionKey,value); } }
[ "444141300@qq.com" ]
444141300@qq.com
9003e9c87eca6676083d8eb8f4605488dbc7405e
79595075622ded0bf43023f716389f61d8e96e94
/app/src/main/java/android/text/style/AbsoluteSizeSpan.java
8d0d8f3739919f2fa98a76995c0bab5fad0f4f22
[]
no_license
dstmath/OppoR15
96f1f7bb4d9cfad47609316debc55095edcd6b56
b9a4da845af251213d7b4c1b35db3e2415290c96
refs/heads/master
2020-03-24T16:52:14.198588
2019-05-27T02:24:53
2019-05-27T02:24:53
142,840,716
7
4
null
null
null
null
UTF-8
Java
false
false
1,679
java
package android.text.style; import android.os.Parcel; import android.text.ParcelableSpan; import android.text.TextPaint; public class AbsoluteSizeSpan extends MetricAffectingSpan implements ParcelableSpan { private boolean mDip; private final int mSize; public AbsoluteSizeSpan(int size) { this.mSize = size; } public AbsoluteSizeSpan(int size, boolean dip) { this.mSize = size; this.mDip = dip; } public AbsoluteSizeSpan(Parcel src) { boolean z = false; this.mSize = src.readInt(); if (src.readInt() != 0) { z = true; } this.mDip = z; } public int getSpanTypeId() { return getSpanTypeIdInternal(); } public int getSpanTypeIdInternal() { return 16; } public int describeContents() { return 0; } public void writeToParcel(Parcel dest, int flags) { writeToParcelInternal(dest, flags); } public void writeToParcelInternal(Parcel dest, int flags) { dest.writeInt(this.mSize); dest.writeInt(this.mDip ? 1 : 0); } public int getSize() { return this.mSize; } public boolean getDip() { return this.mDip; } public void updateDrawState(TextPaint ds) { if (this.mDip) { ds.setTextSize(((float) this.mSize) * ds.density); } else { ds.setTextSize((float) this.mSize); } } public void updateMeasureState(TextPaint ds) { if (this.mDip) { ds.setTextSize(((float) this.mSize) * ds.density); } else { ds.setTextSize((float) this.mSize); } } }
[ "toor@debian.toor" ]
toor@debian.toor
b9d102bf07b7e19f5515d28bdc4a14bc5974208f
bdb880513a6d1333b3251e8986fbaa9411b049e8
/.svn/pristine/b9/b9d102bf07b7e19f5515d28bdc4a14bc5974208f.svn-base
cb0245d84979135114bb154b74c1af63e2afe373
[]
no_license
wang-shun/qmt
fe937cffe59781815fdefccdfa88362cef68b113
c3c2e6a1bd9b4f3d852a698f64b6831b977093d1
refs/heads/master
2020-04-12T23:23:29.066091
2018-12-17T12:51:58
2018-12-17T12:51:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,114
package com.lesports.qmt.cms.converter.support; import com.lesports.api.common.Channel; import com.lesports.qmt.config.api.dto.TDictEntry; import com.lesports.qmt.converter.support.AbstractTDtoConverter; import com.lesports.qmt.model.support.QmtModel; import org.apache.commons.lang3.StringUtils; import org.apache.thrift.TBase; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * User: ellios * Time: 16-10-28 : 下午2:56 */ abstract public class AbstractCmsTDtoConverter<M extends QmtModel, T extends TBase> extends AbstractTDtoConverter<M, T> { protected static final Logger LOG = LoggerFactory.getLogger(AbstractCmsTDtoConverter.class); /** * 把字典转化为频道 * * @param entry * @return */ protected Channel convertDictToChannel(TDictEntry entry) { Channel channel = new Channel(); if (entry == null) { channel.setId(-1); channel.setName(StringUtils.EMPTY); } else { channel.setId(entry.getId()); channel.setName(entry.getName()); } return channel; } }
[ "ryan@192.168.3.101" ]
ryan@192.168.3.101
1a4853053bd5103a380cc4b036eeb6a6c0278ec2
9f27472bd79c3d2afda29f08834ce82b2c8851ac
/app/src/main/java/com/yuyh/sprintnba/ui/adapter/VPGameDetailAdapter.java
94f8c6868e41284a43ece9c41d24d7621b7b7f76
[]
no_license
hanweida/SprintNBA
3532e9c585d7e7ccfabde47c1a1982f25ca1d524
8169f8709f0a81e633f3f6e20d274a020b1e39ab
refs/heads/master
2023-03-26T08:49:51.204336
2021-03-25T09:23:13
2021-03-25T09:23:13
104,290,048
0
0
null
2017-09-21T02:11:00
2017-09-21T02:11:00
null
UTF-8
Java
false
false
3,270
java
package com.yuyh.sprintnba.ui.adapter; import android.content.Context; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.yuyh.library.utils.DimenUtils; import com.yuyh.library.view.viewpager.indicator.FragmentListPageAdapter; import com.yuyh.library.view.viewpager.indicator.IndicatorViewPager; import com.yuyh.sprintnba.R; import com.yuyh.sprintnba.http.bean.match.MatchBaseInfo; import com.yuyh.sprintnba.ui.fragment.MatchDataFragment; import com.yuyh.sprintnba.ui.fragment.MatchLiveFragment; import com.yuyh.sprintnba.ui.fragment.MatchLookForwardFragment; import com.yuyh.sprintnba.ui.fragment.MatchPlayerDataFragment; import com.yuyh.sprintnba.ui.fragment.MatchVideoFragment; /** * Created by Kyrie.Y on 2016/6/6. */ public class VPGameDetailAdapter extends IndicatorViewPager.IndicatorFragmentPagerAdapter { private LayoutInflater inflate; private String[] names; private String mid; private boolean isStart; private MatchBaseInfo.BaseInfo info; public VPGameDetailAdapter(Context context, String[] names, FragmentManager fragmentManager, String mid, boolean isStart, MatchBaseInfo.BaseInfo info) { super(fragmentManager); inflate = LayoutInflater.from(context); this.names = names; this.mid = mid; this.isStart = isStart; this.info = info; } @Override public int getCount() { return names.length; } @Override public View getViewForTab(int position, View convertView, ViewGroup container) { if (convertView == null) { convertView = inflate.inflate(R.layout.tab_game_detail, container, false); } TextView textView = (TextView) convertView; textView.setText(names[position % names.length]); int padding = DimenUtils.dpToPxInt(14); textView.setPadding(padding, 0, padding, 0); return convertView; } @Override public Fragment getFragmentForPage(int position) { Fragment fragment = null; if (isStart) { switch (position) { case 0: fragment = MatchDataFragment.newInstance(mid, info); break; case 1: fragment = MatchPlayerDataFragment.newInstance(mid); break; case 2: fragment = MatchLiveFragment.newInstance(mid); break; case 3: default: fragment = MatchVideoFragment.newInstance(mid); break; } } else { switch (position) { case 0: fragment = MatchLookForwardFragment.newInstance(mid); break; case 1: default: fragment = MatchLiveFragment.newInstance(mid); break; } } return fragment; } @Override public int getItemPosition(Object object) { return FragmentListPageAdapter.POSITION_NONE; } }
[ "352091626@qq.com" ]
352091626@qq.com
526243cd9b63d8691027882815d57193e19b5626
74acea1b7f2a3a509b9ead48f186c9349bf55cc8
/framework/src/main/java/com/enjoyf/platform/service/tools/AuditStatus.java
28a0fb69d8d1323e511e8e16bcbeed4ef8c36a1e
[]
no_license
liu67224657/besl-platform
6cd2bfcc7320a4039e61b114173d5f350345f799
68c126bea36c289526e0cc62b9d5ce6284353d11
refs/heads/master
2022-04-16T02:23:40.178907
2020-04-17T09:00:01
2020-04-17T09:00:01
109,520,110
1
1
null
null
null
null
UTF-8
Java
false
false
1,906
java
package com.enjoyf.platform.service.tools; import java.io.Serializable; /** * Author: zhaoxin * Date: 11-10-27 * Time: 下午6:09 * Desc: 二进制 1111111111(1023) 十位判断位 按位与进行判断 */ public class AuditStatus implements Serializable { //审核过文本 public static final Integer AUDIT_STATUS_TEXT = 1; //审核过图片 public static final Integer AUDIT_STATUS_IMG = 2; //审核过视频 public static final Integer AUDIT_STATUS_VIDEO =4; //审核过音乐 public static final Integer AUDIT_STATUS_AUDIO =8; //审核过人 public static final Integer AUDIT_STATUS_PROFILE = 16; private Integer value = 0; public AuditStatus() { } public AuditStatus(Integer v){ this.value = v; } //是否审核过文字 public boolean hasAuditText(){ return (value & AUDIT_STATUS_TEXT) > 0; } //是否审核过图片 public boolean hasAuditImg(){ return (value & AUDIT_STATUS_IMG) > 0; } //是否审核过视频 public boolean hasAuditVideo(){ return (value & AUDIT_STATUS_VIDEO) > 0; } //是否审核过音乐 public boolean hasAuditAudio(){ return (value & AUDIT_STATUS_AUDIO) > 0; } //是否审核过音乐 public boolean hasProfile(){ return (value & AUDIT_STATUS_PROFILE) > 0; } public boolean hasAudit(Integer auditContent){ return (value & auditContent) > 0; } public AuditStatus has(Integer v){ this.value += v; return this; } public Integer getValue() { return value; } @Override public int hashCode() { return value; } @Override public String toString() { return "AuditStatus value=" + value; } public static AuditStatus getByValue(Integer v){ return new AuditStatus(v); } }
[ "ericliu@staff.joyme.com" ]
ericliu@staff.joyme.com
7fc36d13df898d39f41e922ce036b49d366c25ca
d901cec87792969e4e4f707512814d2ebb0990ce
/Junit/src/test/java/TestService/TestValidatePerson.java
5627b021cadf8b294d428f3be4b8c72964c7a873
[]
no_license
Hariteja25/Work-Space-2
c6afb51b1515649128d64ffae8daf175a17e78b2
db020a3eed4860ae79b6af32a9c6d38db34d7ee3
refs/heads/master
2023-03-29T04:44:02.034678
2021-04-03T13:49:42
2021-04-03T13:49:42
354,303,328
0
0
null
null
null
null
UTF-8
Java
false
false
1,167
java
package TestService; import org.junit.Assert; import org.junit.Test; import service.Person; import service.Service; import service.ServiceException; public class TestValidatePerson { Service service = new Service(); @Test public void testValid() throws ServiceException { //prepare Person p = new Person("user1", 19, "hyderabad", "admin", null, null); //call method boolean res = service.processRegistration(p); //validate Assert.assertTrue("expected succeesul validation", res); } //test case when age <18 @Test(expected= ServiceException.class) public void invadlidAge() throws ServiceException { //prepare Person p = new Person("user1", 15, "hyderabad", "admin", null,null); //call the method service.processRegistration(p); } @Test(expected= ServiceException.class) public void testInValidACity() throws ServiceException { Person p = new Person("user1", 19, "pune", "admin", null,null); service.processRegistration(p); } @Test(expected= ServiceException.class) public void testInValidCityNull() throws ServiceException { Person p = new Person("user1", 19, null, "admin", null,null); service.processRegistration(p); } }
[ "kudamalahariteja@gmail.com" ]
kudamalahariteja@gmail.com
193ba98191ad98286471e4524c7e6f2d372d178a
ba8e58ffd654a413d316147d9d35718bbf62bb41
/src/main/java/com/petsvalley/controller/PostController.java
f8c6b6cdc6414db380da10c06e9ba5ea1e731d6b
[ "Apache-2.0" ]
permissive
ruoxia/petsvalley
56539d33d0c13277714ff056d36a98e43bcbc7ec
82c9e39f271bd18c2bd6aee654bca0dc11773c6a
refs/heads/master
2022-01-08T01:48:44.264019
2018-12-04T07:30:04
2018-12-04T07:30:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,940
java
package com.petsvalley.controller; import com.petsvalley.entity.Customer; import com.petsvalley.entity.Img; import com.petsvalley.entity.Post; import com.petsvalley.service.CommentService; import com.petsvalley.service.CustomerService; import com.petsvalley.service.ImgService; import com.petsvalley.service.PostService; import com.petsvalley.util.PageModel; import com.petsvalley.util.PostUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import javax.servlet.annotation.MultipartConfig; import javax.servlet.http.HttpServletRequest; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.UUID; @RestController @MultipartConfig @RequestMapping("/post") //@MultipartConfig(location="d:/SoftWare") public class PostController { @Autowired private PostService postService; @Autowired private ImgService imgService; @Autowired private CustomerService customerService; @Autowired private CommentService commentService; private static final long serialVersionUID = 1L; private String fileName=null; @RequestMapping("/insert") public Post insert(HttpServletRequest request,String content,String title,@RequestParam("files") MultipartFile[] files) throws IOException { //存储图片路径在webapp/upload上 String path = request.getSession().getServletContext().getRealPath("/upload/"); int postId=(int)(Math.random()*9*Math.pow(10,9-1)) + (int)Math.pow(10,9-1); Customer customer=(Customer)request.getSession().getAttribute("customer"); Post post = new Post(); post.setPostId(postId); post.setPostContent(content); post.setPostTime(new Date()); post.setPostTitle(title); post.setPostState(0); post.setPostCount(11); post.setCustId(customer.getCustId()); postService.save(post); if(files!=null&&files.length>0){ //循环获取file数组中得文件 for(int i = 0;i<files.length;i++){ MultipartFile file = files[i]; //保存文件 String imgpath=saveFile(file, path); String[] paths=imgpath.split("/"); String filepath="/upload/"+fileName; System.out.println(filepath); Img img=new Img(); img.setCustId(customer.getCustId()); img.setPath(filepath); img.setPostId(postId); imgService.save(img); } } return post; } private String saveFile(MultipartFile file, String path) { // 判断文件是否为空 if (!file.isEmpty()) { try { File filepath = new File(path); if (!filepath.exists()) filepath.mkdirs(); // 文件保存路径 String uuid=UUID.randomUUID().toString(); String savePath = path +uuid+file.getOriginalFilename(); //System.out.println(file.getOriginalFilename()); fileName=uuid+file.getOriginalFilename(); // 转存文件 file.transferTo(new File(savePath)); return savePath; } catch (Exception e) { e.printStackTrace(); } } return null; } @RequestMapping(value = "/getall",method =RequestMethod.GET) public PageModel<PostUtil> getAll(String name,int page,String spare,PageModel<PostUtil> pageModel,HttpServletRequest request){ List<Post> posts=postService.getByCommCount(); pageModel.setCurrentPageCode(page); pageModel.setPageSize(5); pageModel.setStartRecord((page-1)*pageModel.getPageSize()); if (spare.equals("1")||spare.equals("3")){ pageModel.setTotalRecord(postService.recordCount2()); } else if (!name.equals("pets")){ pageModel.setTotalRecord(postService.recordCount3(name)); } else { pageModel.setTotalRecord(postService.recordCount(spare)); } pageModel.setTotalPages(pageModel.getTotalRecord()%pageModel.getPageSize()==0 ? pageModel.getTotalRecord()/pageModel.getPageSize():pageModel.getTotalRecord()/pageModel.getPageSize()+1); pageModel.setEndRecord(pageModel.getCurrentPageCode()*pageModel.getPageSize()-1); List<PostUtil> postUtilList=new ArrayList<>(); List<Post> postList= postService.getByPage(pageModel,name,spare); for (Post post:postList){ PostUtil postUtil=new PostUtil(); List<Img> imgList=imgService.getByPostId(post.getPostId()); Customer customer=customerService.queryById(post.getCustId()); Integer commentCount=commentService.recordCount(post.getPostId()); postUtil.setCommentCount(commentCount); postUtil.setPost(post); postUtil.setImgList(imgList); postUtil.setCustomer(customer); postUtilList.add(postUtil); } postUtilList.get(0).setPostList(posts); pageModel.setModelList(postUtilList); return pageModel; } @RequestMapping("/getone") public Post getOne(Integer id){ return null; } @RequestMapping("getAllByCustId") public String getAllByCustId(Integer id,HttpServletRequest request){ List<Post> postList=postService.getAllById(id); request.getSession().setAttribute("postList",postList); return "personal_center"; } @RequestMapping("/delete") public int delete(Integer postId){ int rows=postService.delete(postId); return rows; } @RequestMapping(value="/postCount",method = RequestMethod.GET) public Post updatePostCount(int postId){ postService.updatePostCountOfAdd(postId); Post post= postService.getByPostId(postId); return post; } @RequestMapping(value="/postCountReduce",method = RequestMethod.GET) public Post updatePostCountReduce(int postId){ postService.updatePostOfReduce(postId); Post post= postService.getByPostId(postId); return post; } @RequestMapping("/record") public List<Post> getByRecord(HttpServletRequest request) { Customer customer= (Customer)request.getSession().getAttribute("customer"); if (customer!=null){ String key=customer.getCustId().toString(); List<Post> postList=(List<Post>)request.getSession().getAttribute(key); return postList; } return null; } }
[ "849962874@qq.com" ]
849962874@qq.com
00796689684d3421ddbb89729b324025fadf3fbe
64ee71a87fd0a40cd3a21083b825eeb24f004bb4
/src/test/java/be/naturalsciences/bmdc/metadata/model/impl/Keyword.java
8301c6a6563acee7fec3ea4f3d5bf4e24d027922
[ "MIT" ]
permissive
naturalsciences/metadata-generator
224af3065b29c9e02f1f954a0e1de1e1d6662146
234882e034e901537606ba16112befa1dd885719
refs/heads/master
2023-08-31T10:58:32.068634
2023-08-16T15:53:48
2023-08-16T15:53:48
158,531,363
0
0
null
null
null
null
UTF-8
Java
false
false
2,589
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 be.naturalsciences.bmdc.metadata.model.impl; import be.naturalsciences.bmdc.metadata.model.IKeyword; import be.naturalsciences.bmdc.metadata.model.Thesaurus; public class Keyword implements IKeyword { private Long seqno; private String url; private String prefLabel; private String type; private Thesaurus thesaurus; public Keyword(Long seqno, String url, String prefLabel, String type, Thesaurus thesaurus/*Title, Date thesaurusPublicationDate, String thesaurusVersion, String thesaurusUrl*/) { this.seqno = seqno; this.url = url; this.prefLabel = prefLabel; this.type = type; /* this.thesaurusTitle = thesaurusTitle; this.thesaurusPublicationDate = thesaurusPublicationDate; this.thesaurusVersion = thesaurusVersion; this.thesaurusUrl = thesaurusUrl;*/ } public Long getSeqno() { return seqno; } public void setSeqno(Long seqno) { this.seqno = seqno; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getPrefLabel() { return prefLabel; } public void setPrefLabel(String prefLabel) { this.prefLabel = prefLabel; } public String getType() { return type; } public void setType(String type) { this.type = type; } public Thesaurus getThesaurus() { return thesaurus; } public void setThesaurus(Thesaurus thesaurus) { this.thesaurus = thesaurus; } /* public String getThesaurusTitle() { return thesaurusTitle; } public void setThesaurusTitle(String thesaurusTitle) { this.thesaurusTitle = thesaurusTitle; } public Date getThesaurusPublicationDate() { return thesaurusPublicationDate; } public void setThesaurusPublicationDate(Date thesaurusPublicationDate) { this.thesaurusPublicationDate = thesaurusPublicationDate; } public String getThesaurusVersion() { return thesaurusVersion; } public void setThesaurusVersion(String thesaurusVersion) { this.thesaurusVersion = thesaurusVersion; } public String getThesaurusUrl() { return thesaurusUrl; } public void setThesaurusUrl(String thesaurusUrl) { this.thesaurusUrl = thesaurusUrl; }*/ }
[ "tvandenberghe@naturalsciences.be" ]
tvandenberghe@naturalsciences.be
514bccd09a7e17d016d3538d9215c1f5ddf77a6f
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/28/28_dd1aa7681701a11ddfaaf9e5161fab54bc012131/NhttpConstants/28_dd1aa7681701a11ddfaaf9e5161fab54bc012131_NhttpConstants_t.java
e5b38f42ec857c1772a0c94bca0c280316702858
[]
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,309
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.synapse.transport.nhttp; public class NhttpConstants { public static final String SC_ACCEPTED = "SC_ACCEPTED"; public static final String SENDING_FAULT = "sending_fault"; public static final String FORCE_HTTP_1_0 = "FORCE_HTTP_1.0"; public static final String WSDL_EPR_PREFIX = "WSDLEPRPrefix"; public static final String REMOTE_HOST ="REMOTE_HOST"; public static final String BIND_ADDRESS = "bind-address"; }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
3b13009c623246c7e9dfa0c0befd5e6215517d41
c606b6395c88dfbbd3a2973ba6008515f1bf13d9
/Cy_3/src/org/apache/commons/math3/ode/nonstiff/AdamsIntegrator.java
aa7047e4f5790f2eaaa40d968680afa493cdf3e6
[]
no_license
OliverKramer02/Cy_3
1dfcc9d16ce54a491d9ec2133e3789d4754b6561
7458d36ce13b716f9d104dd7b2f7f05c8c4fd539
refs/heads/master
2020-05-17T07:57:48.802053
2014-09-12T21:42:52
2014-09-12T21:42:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,890
java
/* 1: */ package org.apache.commons.math3.ode.nonstiff; /* 2: */ /* 3: */ import org.apache.commons.math3.exception.MathIllegalArgumentException; /* 4: */ import org.apache.commons.math3.exception.MathIllegalStateException; /* 5: */ import org.apache.commons.math3.linear.Array2DRowRealMatrix; /* 6: */ import org.apache.commons.math3.ode.ExpandableStatefulODE; /* 7: */ import org.apache.commons.math3.ode.MultistepIntegrator; /* 8: */ /* 9: */ public abstract class AdamsIntegrator /* 10: */ extends MultistepIntegrator /* 11: */ { /* 12: */ private final AdamsNordsieckTransformer transformer; /* 13: */ /* 14: */ public AdamsIntegrator(String name, int nSteps, int order, double minStep, double maxStep, double scalAbsoluteTolerance, double scalRelativeTolerance) /* 15: */ throws IllegalArgumentException /* 16: */ { /* 17: 57 */ super(name, nSteps, order, minStep, maxStep, scalAbsoluteTolerance, scalRelativeTolerance); /* 18: */ /* 19: 59 */ this.transformer = AdamsNordsieckTransformer.getInstance(nSteps); /* 20: */ } /* 21: */ /* 22: */ public AdamsIntegrator(String name, int nSteps, int order, double minStep, double maxStep, double[] vecAbsoluteTolerance, double[] vecRelativeTolerance) /* 23: */ throws IllegalArgumentException /* 24: */ { /* 25: 82 */ super(name, nSteps, order, minStep, maxStep, vecAbsoluteTolerance, vecRelativeTolerance); /* 26: */ /* 27: 84 */ this.transformer = AdamsNordsieckTransformer.getInstance(nSteps); /* 28: */ } /* 29: */ /* 30: */ public abstract void integrate(ExpandableStatefulODE paramExpandableStatefulODE, double paramDouble) /* 31: */ throws MathIllegalStateException, MathIllegalArgumentException; /* 32: */ /* 33: */ protected Array2DRowRealMatrix initializeHighOrderDerivatives(double h, double[] t, double[][] y, double[][] yDot) /* 34: */ { /* 35: 97 */ return this.transformer.initializeHighOrderDerivatives(h, t, y, yDot); /* 36: */ } /* 37: */ /* 38: */ public Array2DRowRealMatrix updateHighOrderDerivativesPhase1(Array2DRowRealMatrix highOrder) /* 39: */ { /* 40:112 */ return this.transformer.updateHighOrderDerivativesPhase1(highOrder); /* 41: */ } /* 42: */ /* 43: */ public void updateHighOrderDerivativesPhase2(double[] start, double[] end, Array2DRowRealMatrix highOrder) /* 44: */ { /* 45:131 */ this.transformer.updateHighOrderDerivativesPhase2(start, end, highOrder); /* 46: */ } /* 47: */ } /* Location: C:\Users\Olli\Desktop\NetworkPrioritizer-1.01.jar * Qualified Name: org.apache.commons.math3.ode.nonstiff.AdamsIntegrator * JD-Core Version: 0.7.0.1 */
[ "ok082355@uni-greifswald.de" ]
ok082355@uni-greifswald.de
dc8450f0c449d9998366d7dc21f9ede4e2dad390
bd729ef9fcd96ea62e82bb684c831d9917017d0e
/MileageService/src/com/ctfo/mileageservice/util/SystemUtil.java
25b842789e895a03448b268b7868e7b0d3e13093
[]
no_license
shanghaif/workspace-kepler
849c7de67b1f3ee5e7da55199c05c737f036780c
ac1644be26a21f11a3a4a00319c450eb590c1176
refs/heads/master
2023-03-22T03:38:55.103692
2018-03-24T02:39:41
2018-03-24T02:39:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,845
java
/** * */ package com.ctfo.mileageservice.util; import java.io.File; import java.io.FileWriter; import java.io.IOException; import org.apache.commons.lang3.SystemUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * */ public class SystemUtil { private static Logger log = LoggerFactory.getLogger(SystemUtil.class); private SystemUtil() { } /** * 删除PID文件 */ public static void deletePid(){ String filePath = null; try { filePath = SystemUtils.getUserDir() + System.getProperty("file.separator") + "PID"; File file = new File(filePath); if(file.exists()){ file.deleteOnExit(); log.info("Delete PID File:{} Success!", filePath); } else { log.error("Delete PID File:{} Error!", filePath); } } catch (Exception e) { log.error("Delete PID File:" + filePath + " Error:" + e.getMessage(), e); } } /** * 生成PID文件 * @throws Exception */ public static void generagePid() throws Exception { String processName = null; String pid = null; String filePath = null; FileWriter fw = null; try { processName = java.lang.management.ManagementFactory.getRuntimeMXBean().getName(); pid = processName.split("@")[0]; filePath = SystemUtils.getUserDir() + System.getProperty("file.separator") + "PID"; File file = new File(filePath); fw = new FileWriter(file); if (!file.exists()) { file.mkdirs(); } fw.write(pid); fw.close(); log.info("PID文件创建完成:" + filePath); } catch (Exception e) { log.error("生成PID文件异常, 路径:" + filePath, e); throw new Exception("生成PID文件异常, 路径:" + filePath, e); } finally { try { if (fw != null) { fw.close(); } } catch (IOException e) { log.error("生成PID文件关闭资源异常, 路径:" + filePath, e); } } } }
[ "zhangjunfang0505@163.com" ]
zhangjunfang0505@163.com
2d5d718b2b42c03c711d49e2f03a8aa2d927278f
6a486ae008103520e48ec9c3b24ff9177838b2db
/src/main/java/org/gateway/application/config/FeignConfiguration.java
19c7e3138853d7b52de99d361a9e0ef655d8d6b1
[]
no_license
pmarrupe/ApiGateWay
8bdfbe17da034f93bcf63c4f17fbc8af310161bd
f353b9ba2bdb713985358c786acfe28c0d7a292b
refs/heads/master
2021-01-24T16:52:21.643209
2018-02-28T02:18:50
2018-02-28T02:18:50
123,216,328
0
0
null
null
null
null
UTF-8
Java
false
false
284
java
package org.gateway.application.config; import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.context.annotation.Configuration; @Configuration @EnableFeignClients(basePackages = "org.gateway.application") public class FeignConfiguration { }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
1bc16980b04f1d3e24ab3bf31c32dd4a5495aef3
fb41c04a4ead3b79625d0eb30ca85f0fd1c2d4c9
/main/boofcv-geo/src/test/java/boofcv/alg/geo/trifocal/TestTrifocalExtractGeometries.java
8ceae6189e8d86acd48005559c761116744f35a2
[ "Apache-2.0", "LicenseRef-scancode-takuya-ooura" ]
permissive
thhart/BoofCV
899dcf1b4302bb9464520c36a9e54c6fe35969c7
43f25488673dc27590544330323c676f61c1a17a
refs/heads/SNAPSHOT
2023-08-18T10:19:50.269999
2023-07-15T23:13:25
2023-07-15T23:13:25
90,468,259
0
0
Apache-2.0
2018-10-26T08:47:44
2017-05-06T14:24:01
Java
UTF-8
Java
false
false
4,538
java
/* * Copyright (c) 2021, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.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 boofcv.alg.geo.trifocal; import boofcv.alg.geo.MultiViewOps; import boofcv.alg.geo.PerspectiveOps; import boofcv.struct.geo.TrifocalTensor; import georegression.geometry.GeometryMath_F64; import georegression.struct.point.Point2D_F64; import georegression.struct.point.Point3D_F64; import georegression.struct.se.Se3_F64; import org.ejml.data.DMatrixRMaj; import org.ejml.dense.row.CommonOps_DDRM; import org.ejml.dense.row.MatrixFeatures_DDRM; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; /** * @author Peter Abeles */ public class TestTrifocalExtractGeometries extends CommonTrifocalChecks { /** * Randomly general several scenarios and see if it produces the correct solution */ @Test void extractEpipoles() { TrifocalExtractGeometries alg = new TrifocalExtractGeometries(); for( int i = 0; i < 5; i++ ) { createRandomScenario(false); Point3D_F64 found2 = new Point3D_F64(); Point3D_F64 found3 = new Point3D_F64(); TrifocalTensor input = tensor.copy(); alg.setTensor(input); alg.extractEpipoles(found2, found3); // make sure the input was not modified for( int j = 0; j < 3; j++ ) assertTrue(MatrixFeatures_DDRM.isIdentical(tensor.getT(j), input.getT(j), 1e-8)); Point3D_F64 space = new Point3D_F64(); // check to see if it is the left-null space of their respective Fundamental matrices GeometryMath_F64.multTran(F2, found2, space); assertEquals(0,space.norm(),1e-8); GeometryMath_F64.multTran(F3, found3, space); assertEquals(0,space.norm(),1e-8); } } @Test void extractCamera() { TrifocalLinearPoint7 linear = new TrifocalLinearPoint7(); TrifocalExtractGeometries alg = new TrifocalExtractGeometries(); DMatrixRMaj P2 = new DMatrixRMaj(3,4); DMatrixRMaj P3 = new DMatrixRMaj(3,4); for( int trial = 0; trial < 5; trial++ ) { createRandomScenario(false); // solve for the tensor to make this more realistic linear.process(observationsPixels,found); alg.setTensor(found); alg.extractCamera(P2, P3); // Using found camera matrices render the point's location Point3D_F64 X = new Point3D_F64(0.1,0.05,2); Point2D_F64 x1 = new Point2D_F64(X.x/X.z,X.y/X.z); Point2D_F64 x2 = PerspectiveOps.renderPixel(P2, X); Point2D_F64 x3 = PerspectiveOps.renderPixel(P3, X); // validate correctness by testing a constraint on the points DMatrixRMaj A = new DMatrixRMaj(3,3); MultiViewOps.constraint(found, x1, x2, x3, A); for( int i = 0; i < 3; i++ ) { for( int j = 0; j < 3; j++ ) { assertEquals(0,A.get(i,j),1e-7); } } } } @Test void extractFundmental() { TrifocalExtractGeometries alg = new TrifocalExtractGeometries(); DMatrixRMaj found2 = new DMatrixRMaj(3,3); DMatrixRMaj found3 = new DMatrixRMaj(3,3); for( int trial = 0; trial < 5; trial++ ) { createRandomScenario(false); TrifocalTensor input = tensor.copy(); alg.setTensor(input); alg.extractFundmental(found2, found3); // make sure the input was not modified for( int i = 0; i < 3; i++ ) assertTrue(MatrixFeatures_DDRM.isIdentical(tensor.getT(i),input.getT(i),1e-8)); CommonOps_DDRM.scale(1.0/CommonOps_DDRM.elementMaxAbs(found2),found2); CommonOps_DDRM.scale(1.0/CommonOps_DDRM.elementMaxAbs(found3),found3); Point3D_F64 X = new Point3D_F64(0.1,0.05,2); // remember the first view is assumed to have a projection matrix of [I|0] Point2D_F64 x1 = PerspectiveOps.renderPixel(new Se3_F64(), X, null); Point2D_F64 x2 = PerspectiveOps.renderPixel(worldToCam2, K, X, null); Point2D_F64 x3 = PerspectiveOps.renderPixel(worldToCam3, K, X, null); assertEquals(0, MultiViewOps.constraint(found2, x1, x2), 1e-8); assertEquals(0, MultiViewOps.constraint(found3, x1, x3), 1e-8); } } }
[ "peter.abeles@gmail.com" ]
peter.abeles@gmail.com
883ae775bcda0ad072379406dcb22fa7a0080e04
0e0dae718251c31cbe9181ccabf01d2b791bc2c2
/SCT2/tags/TAG_20110503_1020_PRE_XTEXT2.0_CHANGE/plugins/org.yakindu.sct.statechart.diagram/src/org/yakindu/sct/statechart/diagram/extensions/IValidationProvider.java
bfba1e281cbd65cfcb398c9df229c77ea2641e78
[]
no_license
huybuidac20593/yakindu
377fb9100d7db6f4bb33a3caa78776c4a4b03773
304fb02b9c166f340f521f5e4c41d970268f28e9
refs/heads/master
2021-05-29T14:46:43.225721
2015-05-28T11:54:07
2015-05-28T11:54:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
329
java
package org.yakindu.sct.statechart.diagram.extensions; import java.util.Set; import org.eclipse.core.runtime.IStatus; import org.eclipse.emf.ecore.EObject; /** * * @author muelder * */ public interface IValidationProvider extends ISCTProvider { public Set<IStatus> validate(EObject semanticElement); }
[ "a.muelder@googlemail.com" ]
a.muelder@googlemail.com
f99cbefcc52d51a2740750a228fe2cee874ff2bc
d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb
/PROMISE/archives/camel/1.4/org/apache/camel/spi/ComponentResolver.java
3a0b404051e7fed4193d3a5f67134e00ee62ebeb
[]
no_license
hvdthong/DEFECT_PREDICTION
78b8e98c0be3db86ffaed432722b0b8c61523ab2
76a61c69be0e2082faa3f19efd76a99f56a32858
refs/heads/master
2021-01-20T05:19:00.927723
2018-07-10T03:38:14
2018-07-10T03:38:14
89,766,606
5
1
null
null
null
null
UTF-8
Java
false
false
884
java
package org.apache.camel.spi; import org.apache.camel.CamelContext; import org.apache.camel.Component; import org.apache.camel.Exchange; /** * Represents a resolver of components from a URI to be able to auto-load them using some * discovery mechanism like {@link org.apache.camel.impl.DefaultComponentResolver} * * @version $Revision: 659849 $ */ public interface ComponentResolver<E extends Exchange> { /** * Attempts to resolve the component for the given URI * * @param name the component name to resolve * @param context the context to load the component if it can be resolved * @return the component which is added to the context or null if it can not be resolved * @throws Exception is thrown if the the component could not be loaded */ Component<E> resolveComponent(String name, CamelContext context) throws Exception; }
[ "hvdthong@github.com" ]
hvdthong@github.com
d2daad8a941b09ac38342711e6b4e382222bf633
cb5310ae9cb5a81c191a3e2f358b94f463b2fa6b
/cocoatouch/src/main/java/org/robovm/apple/uikit/UITextFieldDelegateAdapter.java
d8f1e64d4547e3b6f404a83302f46b13cec9eed4
[ "Apache-2.0" ]
permissive
jiangwh/robovm
a3da6d97083eab70ddeb4942d5bafa82d231aec2
a58b3a1928a60ea132b41cd0e51fae5550e224f5
refs/heads/master
2020-12-25T04:47:23.403516
2014-07-17T00:35:34
2014-07-17T00:35:34
21,945,788
1
0
null
null
null
null
UTF-8
Java
false
false
2,813
java
/* * Copyright (C) 2014 Trillian Mobile AB * * 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.robovm.apple.uikit; /*<imports>*/ import java.io.*; import java.nio.*; import java.util.*; import org.robovm.objc.*; import org.robovm.objc.annotation.*; import org.robovm.objc.block.*; import org.robovm.rt.*; import org.robovm.rt.bro.*; import org.robovm.rt.bro.annotation.*; import org.robovm.rt.bro.ptr.*; import org.robovm.apple.foundation.*; import org.robovm.apple.coreanimation.*; import org.robovm.apple.coregraphics.*; import org.robovm.apple.coredata.*; import org.robovm.apple.coreimage.*; /*</imports>*/ /*<javadoc>*/ /*</javadoc>*/ /*<annotations>*//*</annotations>*/ /*<visibility>*/public/*</visibility>*/ class /*<name>*/UITextFieldDelegateAdapter/*</name>*/ extends /*<extends>*/NSObject/*</extends>*/ /*<implements>*/implements UITextFieldDelegate/*</implements>*/ { /*<ptr>*/ /*</ptr>*/ /*<bind>*/ /*</bind>*/ /*<constants>*//*</constants>*/ /*<constructors>*//*</constructors>*/ /*<properties>*/ /*</properties>*/ /*<members>*//*</members>*/ /*<methods>*/ @NotImplemented("textFieldShouldBeginEditing:") public boolean shouldBeginEditing(UITextField textField) { throw new UnsupportedOperationException(); } @NotImplemented("textFieldDidBeginEditing:") public void didBeginEditing(UITextField textField) { throw new UnsupportedOperationException(); } @NotImplemented("textFieldShouldEndEditing:") public boolean shouldEndEditing(UITextField textField) { throw new UnsupportedOperationException(); } @NotImplemented("textFieldDidEndEditing:") public void didEndEditing(UITextField textField) { throw new UnsupportedOperationException(); } @NotImplemented("textField:shouldChangeCharactersInRange:replacementString:") public boolean shouldChangeCharacters(UITextField textField, @ByVal NSRange range, String string) { throw new UnsupportedOperationException(); } @NotImplemented("textFieldShouldClear:") public boolean shouldClear(UITextField textField) { throw new UnsupportedOperationException(); } @NotImplemented("textFieldShouldReturn:") public boolean shouldReturn(UITextField textField) { throw new UnsupportedOperationException(); } /*</methods>*/ }
[ "niklas@therning.org" ]
niklas@therning.org
8fef1c0eb90e72a1974ed37fde093bf67b3e1187
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_365/Testnull_36443.java
aac890226ebc19ca7879310c65e1ff3f4d1a301b
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_365; import static org.junit.Assert.*; public class Testnull_36443 { private final Productionnull_36443 production = new Productionnull_36443("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
dc253dabb6a712bbebce3f705219197ec4248cd5
b783502faf6fda33eb03575c054a198306541f81
/PODM/SW/pod-manager/podm-discovery/src/main/java/com/intel/podm/discovery/external/ExternalServiceMonitoringEvent.java
334fea51e7572b979edc1bc7c4d723b57689e7d7
[ "Apache-2.0" ]
permissive
intelsdi-x/intelRSD
53f763e386de0b1cb9c50427d76943327e2b6315
de77af174608d3b30232625e0f0e6e7cbbae8b59
refs/heads/master
2022-11-23T03:14:50.978516
2022-11-07T23:02:34
2022-11-07T23:02:34
153,187,714
0
0
null
2018-10-15T22:06:10
2018-10-15T22:06:09
null
UTF-8
Java
false
false
1,848
java
/* * Copyright (c) 2017-2018 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.intel.podm.discovery.external; import java.util.UUID; import static com.intel.podm.discovery.external.ExternalServiceMonitoringEvent.MonitoringState.STARTED; import static com.intel.podm.discovery.external.ExternalServiceMonitoringEvent.MonitoringState.STOPPED; public final class ExternalServiceMonitoringEvent { private final UUID uuid; private final MonitoringState monitoringState; private ExternalServiceMonitoringEvent(UUID externalServiceUuid, MonitoringState monitoringState) { this.uuid = externalServiceUuid; this.monitoringState = monitoringState; } static ExternalServiceMonitoringEvent externalServiceMonitoringStartedEvent(UUID externalServiceUuid) { return new ExternalServiceMonitoringEvent(externalServiceUuid, STARTED); } static ExternalServiceMonitoringEvent externalServiceMonitoringStoppedEvent(UUID externalServiceUuid) { return new ExternalServiceMonitoringEvent(externalServiceUuid, STOPPED); } public UUID getExternalServiceUuid() { return uuid; } public MonitoringState getMonitoringState() { return monitoringState; } public enum MonitoringState { STARTED, STOPPED } }
[ "tomasz.bykowski@intel.com" ]
tomasz.bykowski@intel.com
d2b93413da6ae622bc44608315eca6475f63353c
2a80c8f3004960d07f3461ab7f32072095fd3a67
/src/main/java/com/tencentcloudapi/cdb/v20170320/models/DescribeAccountsResponse.java
428b0a97ee02a4d644ccc1801858b80fb9b1d9db
[ "Apache-2.0" ]
permissive
kennyshittu/tencentcloud-sdk-java-intl-en
495a6e9cf3936406a0d95974aee666ded6632118
2ed6e287c3f451e3709791a3c7ac4b5316205670
refs/heads/master
2022-04-15T06:59:48.967043
2020-04-02T14:13:10
2020-04-02T14:13:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,208
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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.tencentcloudapi.cdb.v20170320.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class DescribeAccountsResponse extends AbstractModel{ /** * Number of eligible accounts. */ @SerializedName("TotalCount") @Expose private Long TotalCount; /** * Details of eligible accounts. */ @SerializedName("Items") @Expose private AccountInfo [] Items; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. */ @SerializedName("RequestId") @Expose private String RequestId; /** * Get Number of eligible accounts. * @return TotalCount Number of eligible accounts. */ public Long getTotalCount() { return this.TotalCount; } /** * Set Number of eligible accounts. * @param TotalCount Number of eligible accounts. */ public void setTotalCount(Long TotalCount) { this.TotalCount = TotalCount; } /** * Get Details of eligible accounts. * @return Items Details of eligible accounts. */ public AccountInfo [] getItems() { return this.Items; } /** * Set Details of eligible accounts. * @param Items Details of eligible accounts. */ public void setItems(AccountInfo [] Items) { this.Items = Items; } /** * Get The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @return RequestId The unique request ID, which is returned for each request. RequestId is required for locating a problem. */ public String getRequestId() { return this.RequestId; } /** * Set The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @param RequestId The unique request ID, which is returned for each request. RequestId is required for locating a problem. */ public void setRequestId(String RequestId) { this.RequestId = RequestId; } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "TotalCount", this.TotalCount); this.setParamArrayObj(map, prefix + "Items.", this.Items); this.setParamSimple(map, prefix + "RequestId", this.RequestId); } }
[ "hapsyou@foxmail.com" ]
hapsyou@foxmail.com
e16ff3585c4f3107972a258e5d29fa5aca655e55
2fb66c71bbbe0be20baf6b1130cbe5c3c4dc99f0
/src/main/java/com/ji/algo/L0_50/FrstMissingPositive.java
3b7905623605f457c1a2fab0413830efc3128d58
[]
no_license
jiwawa123/myleetcode
f4aadeab23e066717cae62768710bc30033e7e18
d2719615678e9fa0b7be3b9269cbc453b6c331b1
refs/heads/master
2023-08-22T12:55:29.013924
2023-08-11T13:21:45
2023-08-11T13:21:45
179,252,894
4
1
null
2020-10-13T12:40:33
2019-04-03T09:09:24
Java
UTF-8
Java
false
false
1,454
java
package com.ji.algo.L0_50;/* user ji data 2019/4/11 time 8:45 AM */ import java.util.Arrays; import java.util.HashMap; import java.util.Map; public class FrstMissingPositive { public static void main(String[] args) { int arr[] = {3, 4, 0, 2}; System.out.println(firstMissingPositiveII(arr)); } public int firstMissingPositive(int[] nums) { int res = 1; Map<Integer, Integer> map = new HashMap<>(); for (int i = 0; i < nums.length; i++) { map.put(nums[i], 1); } while (map.containsKey(res)) { res++; } return res; } public static int firstMissingPositiveII(int[] nums) { if (nums == null || nums.length == 0) return 1; Arrays.sort(nums); if (nums[0] > 1) return 1; int res = 1; int next = 1; boolean flag = false; for (int i = 0; i < nums.length; i++) { if (nums[i] < res) continue; if (nums[i] == res) { flag = true; next = res + 1; continue; } if (flag) { if (nums[i] - res == 1) { res = nums[i]; next = res + 1; continue; } else { return next; } } } return next; } }
[ "252099562@qq.com" ]
252099562@qq.com
8f4f9abbf52a9b4d313b889383bfaed895e77582
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/XRENDERING-481-1-29-Single_Objective_GGA-WeightedSum-BasicBlockCoverage/org/xwiki/rendering/internal/macro/toc/TreeParametersBuilder_ESTest.java
c1b071cb6c99a0c16bb73ab7923ba94d0998634d
[ "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
2,005
java
/* * This file was automatically generated by EvoSuite * Mon May 18 06:24:32 UTC 2020 */ package org.xwiki.rendering.internal.macro.toc; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import java.util.Map; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; import org.xwiki.rendering.block.MacroBlock; import org.xwiki.rendering.internal.macro.toc.TreeParametersBuilder; import org.xwiki.rendering.listener.reference.ResourceReference; import org.xwiki.rendering.listener.reference.ResourceType; import org.xwiki.rendering.macro.toc.TocMacroParameters; import org.xwiki.rendering.transformation.MacroTransformationContext; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class TreeParametersBuilder_ESTest extends TreeParametersBuilder_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { MacroTransformationContext macroTransformationContext0 = new MacroTransformationContext(); ResourceType resourceType0 = ResourceType.UNKNOWN; ResourceReference resourceReference0 = new ResourceReference("2M", resourceType0); ResourceReference resourceReference1 = resourceReference0.clone(); Map<String, String> map0 = resourceReference1.getParameters(); MacroBlock macroBlock0 = new MacroBlock("", map0, true); macroTransformationContext0.setCurrentMacroBlock(macroBlock0); macroTransformationContext0.clone(); TocMacroParameters tocMacroParameters0 = new TocMacroParameters(); TocMacroParameters.Scope tocMacroParameters_Scope0 = TocMacroParameters.Scope.LOCAL; tocMacroParameters0.setScope(tocMacroParameters_Scope0); TreeParametersBuilder treeParametersBuilder0 = new TreeParametersBuilder(); // Undeclared exception! treeParametersBuilder0.build(macroBlock0, tocMacroParameters0, macroTransformationContext0); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
a2598a41ecaddaa70eb8dfc38054d5a8338128cc
2271b5133092ee414bafa2e55818b9ebd393aa67
/clients/java-msf4j/generated/src/gen/java/org/openapitools/api/ApiException.java
f6cecb4173863badd15df827b770e825abe9bebe
[ "Apache-2.0" ]
permissive
Vikash-Kothary/swagger-aem
def818fa53b645c27514e63926ee25bf18a29d22
1022c50e32378a23e9c83374498523bfbd2c5b6b
refs/heads/master
2021-09-09T15:45:32.667977
2021-09-02T07:28:44
2021-09-02T07:28:44
202,803,446
0
0
Apache-2.0
2021-09-02T13:41:27
2019-08-16T21:50:33
Java
UTF-8
Java
false
false
338
java
package org.openapitools.api; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaMSF4JServerCodegen", date = "2019-08-04T23:41:25.207Z[GMT]") public class ApiException extends Exception{ private int code; public ApiException (int code, String msg) { super(msg); this.code = code; } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
b10e47833bf9c18169187ba69b692c58413e1d40
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_900c4ce23e44ee10a2bce0f47a277b1f3b3e39d0/TodaysLunchWidget/5_900c4ce23e44ee10a2bce0f47a277b1f3b3e39d0_TodaysLunchWidget_s.java
0537c61dc7eedae8367f5e664018703ca12ccc5e
[]
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,780
java
package jp.oxiden.todayslunch; import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProvider; import android.content.Context; import android.content.Intent; import android.util.Log; public class TodaysLunchWidget extends AppWidgetProvider { private final String TAG = "TodaysLunch"; /* * 一番はじめのWidget設置時のみ呼ばれる */ @Override public void onEnabled(Context context) { Log.d(TAG, "onEnabled----------------------------------"); super.onEnabled(context); } /* * Widget設置のたび呼ばれる */ @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { Log.d(TAG, "onUpdate----------------------------------"); super.onUpdate(context, appWidgetManager, appWidgetIds); // サービスの起動 Intent intent = new Intent(context, RefreshMenuService.class); context.startService(intent); Log.d(TAG, "service started.=========================="); } /* * Widget削除のたび呼ばれる */ @Override public void onDeleted(Context context, int[] appWidgetIds) { Log.d(TAG, "onDeleted----------------------------------"); super.onDeleted(context, appWidgetIds); } /* * 一番さいごのWidget削除時のみ呼ばれる */ @Override public void onDisabled(Context context) { Log.d(TAG, "onDisabled----------------------------------"); super.onDisabled(context); } /* * 上記コールバック関数の直後、及びupdatePeriodMillis設定時間ごと(※0以外)呼ばれる */ @Override public void onReceive(Context context, Intent intent) { Log.d(TAG, "onReceive===================================="); super.onReceive(context, intent); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
13dcd0a05553c2743f20f6deeb91ba1b53cbbc98
718f1006b64582b6c0b0840033a210d1709f8444
/src/main/java/com/stylefeng/guns/modular/system/controller/MenuController.java
0c920ca9fba53edae3d80992b8a27832fb9c38ed
[ "Apache-2.0" ]
permissive
luchangjiang/secret
192159f7293ba1a08e170488497e9450bb641470
98f824dd0b4ca24c7dfe0003303b83c1f0f1dc8a
refs/heads/master
2020-05-26T02:09:34.603456
2019-05-22T15:57:50
2019-05-22T15:57:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,785
java
package com.stylefeng.guns.modular.system.controller; import com.stylefeng.guns.common.annotion.Permission; import com.stylefeng.guns.common.annotion.log.BussinessLog; import com.stylefeng.guns.common.constant.Const; import com.stylefeng.guns.common.constant.Dict; import com.stylefeng.guns.common.constant.factory.ConstantFactory; import com.stylefeng.guns.common.constant.state.MenuStatus; import com.stylefeng.guns.common.constant.tips.Tip; import com.stylefeng.guns.common.controller.BaseController; import com.stylefeng.guns.common.exception.BizExceptionEnum; import com.stylefeng.guns.common.exception.BussinessException; import com.stylefeng.guns.common.node.ZTreeNode; import com.stylefeng.guns.common.persistence.dao.MenuMapper; import com.stylefeng.guns.common.persistence.model.SecretMenu; import com.stylefeng.guns.core.log.LogObjectHolder; import com.stylefeng.guns.core.support.BeanKit; import com.stylefeng.guns.core.util.ToolUtil; import com.stylefeng.guns.modular.system.dao.MenuDao; import com.stylefeng.guns.modular.system.service.IMenuService; import com.stylefeng.guns.modular.system.warpper.MenuWarpper; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import javax.annotation.Resource; import javax.validation.Valid; import java.util.List; import java.util.Map; /** * 菜单控制器 * * @author fengshuonan * @Date 2017年2月12日21:59:14 */ @Controller @RequestMapping("/menu") public class MenuController extends BaseController { private static String PREFIX = "/system/menu/"; @Resource MenuMapper menuMapper; @Resource MenuDao menuDao; @Resource IMenuService menuService; /** * 跳转到菜单列表列表页面 */ @RequestMapping("") public String index() { return PREFIX + "menu.html"; } /** * 跳转到菜单列表列表页面 */ @RequestMapping(value = "/menu_add") public String menuAdd() { return PREFIX + "menu_add.html"; } /** * 跳转到菜单详情列表页面 */ @Permission(Const.ADMIN_NAME) @RequestMapping(value = "/menu_edit/{menuId}") public String menuEdit(@PathVariable Integer menuId, Model model) { if (ToolUtil.isEmpty(menuId)) { throw new BussinessException(BizExceptionEnum.REQUEST_NULL); } SecretMenu secretMenu = this.menuMapper.selectById(menuId); //获取父级菜单的id SecretMenu temp = new SecretMenu(); temp.setMenuCode(secretMenu.getPcode()); SecretMenu pSecretMenu = this.menuMapper.selectOne(temp); //如果父级是顶级菜单 if(pSecretMenu == null){ secretMenu.setPcode("0"); }else{ //设置父级菜单的code为父级菜单的id secretMenu.setPcode(String.valueOf(pSecretMenu.getId())); } Map<String, Object> menuMap = BeanKit.beanToMap(secretMenu); menuMap.put("pcodeName",ConstantFactory.me().getMenuNameByCode(temp.getMenuCode())); model.addAttribute("secretMenu", menuMap); LogObjectHolder.me().set(secretMenu); return PREFIX + "menu_edit.html"; } /** * 修该菜单 */ @Permission(Const.ADMIN_NAME) @RequestMapping(value = "/edit") @BussinessLog(value = "修改菜单", key = "name", dict = Dict.MenuDict) @ResponseBody public Tip edit(@Valid SecretMenu secretMenu, BindingResult result) { if (result.hasErrors()) { throw new BussinessException(BizExceptionEnum.REQUEST_NULL); } //设置父级菜单编号 menuSetPcode(secretMenu); this.menuMapper.updateById(secretMenu); return SUCCESS_TIP; } /** * 获取菜单列表 */ @Permission(Const.ADMIN_NAME) @RequestMapping(value = "/list") @ResponseBody public Object list(@RequestParam(required = false) String menuName, @RequestParam(required = false) String level) { List<Map<String, Object>> menus = this.menuDao.selectMenus(menuName, level); return super.warpObject(new MenuWarpper(menus)); } /** * 新增菜单 */ @Permission(Const.ADMIN_NAME) @RequestMapping(value = "/add") @BussinessLog(value = "菜单新增", key = "name", dict = Dict.MenuDict) @ResponseBody public Tip add(@Valid SecretMenu secretMenu, BindingResult result) { if (result.hasErrors()) { throw new BussinessException(BizExceptionEnum.REQUEST_NULL); } //设置父级菜单编号 menuSetPcode(secretMenu); secretMenu.setMenuStatus(MenuStatus.ENABLE.getCode()); this.menuMapper.insert(secretMenu); return SUCCESS_TIP; } /** * 删除菜单 */ @Permission(Const.ADMIN_NAME) @RequestMapping(value = "/remove") @BussinessLog(value = "删除菜单", key = "menuId", dict = Dict.DeleteDict) @ResponseBody public Tip remove(@RequestParam Integer menuId) { if (ToolUtil.isEmpty(menuId)) { throw new BussinessException(BizExceptionEnum.REQUEST_NULL); } //缓存菜单的名称 LogObjectHolder.me().set(ConstantFactory.me().getMenuName(menuId)); this.menuService.delMenu(menuId); return SUCCESS_TIP; } /** * 查看菜单 */ @RequestMapping(value = "/view/{menuId}") @ResponseBody public Tip view(@PathVariable Integer menuId) { if (ToolUtil.isEmpty(menuId)) { throw new BussinessException(BizExceptionEnum.REQUEST_NULL); } this.menuMapper.selectById(menuId); return SUCCESS_TIP; } /** * 获取菜单列表(首页用) */ @RequestMapping(value = "/menuTreeList") @ResponseBody public List<ZTreeNode> menuTreeList() { List<ZTreeNode> roleTreeList = this.menuDao.menuTreeList(); return roleTreeList; } /** * 获取菜单列表(选择父级菜单用) */ @RequestMapping(value = "/selectMenuTreeList") @ResponseBody public List<ZTreeNode> selectMenuTreeList() { List<ZTreeNode> roleTreeList = this.menuDao.menuTreeList(); roleTreeList.add(ZTreeNode.createParent()); return roleTreeList; } /** * 获取角色列表 */ @RequestMapping(value = "/menuTreeListByRoleId/{roleId}") @ResponseBody public List<ZTreeNode> menuTreeListByRoleId(@PathVariable Integer roleId) { List<Integer> menuIds = this.menuDao.getMenuIdsByRoleId(roleId); if (ToolUtil.isEmpty(menuIds)) { List<ZTreeNode> roleTreeList = this.menuDao.menuTreeList(); return roleTreeList; } else { List<ZTreeNode> roleTreeListByUserId = this.menuDao.menuTreeListByMenuIds(menuIds); return roleTreeListByUserId; } } /** * 根据请求的父级菜单编号设置pcode和层级 */ private void menuSetPcode(@Valid SecretMenu secretMenu) { if(ToolUtil.isEmpty(secretMenu.getPcode()) || secretMenu.getPcode().equals("0")){ secretMenu.setPcode("0"); secretMenu.setLevels(1); }else{ int code = Integer.parseInt(secretMenu.getPcode()); SecretMenu pSecretMenu = menuMapper.selectById(code); Integer pLevels = pSecretMenu.getLevels(); secretMenu.setPcode(pSecretMenu.getMenuCode()); secretMenu.setLevels(pLevels + 1); } } }
[ "20207075@qq.com" ]
20207075@qq.com
a2e64fbd74259186a7d1ee38191ad85fda8ca37e
a55a5fd9337709c10270f734828dd271c118afcd
/sql2xml/src/gudusoft/gsqlparser/sql2xml/model/interval_qualifier.java
b53f1e8add1a300d41657b0d6e92e2a8c53c2a2d
[ "Apache-2.0" ]
permissive
sqlparser/sql2xml
321653c4b136acf00b64f314e90253159e1fe6f8
e8e336923b11951e03fe50b182752012e7e8b481
refs/heads/master
2021-01-01T17:28:37.685251
2014-01-10T10:51:42
2014-01-10T10:51:42
14,269,568
6
1
null
null
null
null
UTF-8
Java
false
false
748
java
package gudusoft.gsqlparser.sql2xml.model; import org.simpleframework.xml.Element; public class interval_qualifier { @Element(required = false) private start_to_end_field start_to_end_field; @Element(required = false) private single_datetime_field single_datetime_field; public start_to_end_field getStart_to_end_field( ) { return start_to_end_field; } public void setStart_to_end_field( start_to_end_field start_to_end_field ) { this.start_to_end_field = start_to_end_field; } public single_datetime_field getSingle_datetime_field( ) { return single_datetime_field; } public void setSingle_datetime_field( single_datetime_field single_datetime_field ) { this.single_datetime_field = single_datetime_field; } }
[ "cnfree2000@hotmail.com" ]
cnfree2000@hotmail.com
df7deaeded0268e91bda9c7bab71e345a4129752
78b231055d482d900ede027683af0be2891c1a60
/springcloud-tcc-bank2/src/test/java/com/example/tccbank2/SpringcloudTccBank2ApplicationTests.java
0e4d6e6ff69daacdb882e1ef3a9750f0173304a6
[]
no_license
heanhan/springcloud-demo
a8543668c0a0596767cc7e760495859f86091fb8
67870f527c5f527b1b3420028697f41f66c5e59d
refs/heads/master
2020-08-03T03:20:49.558338
2019-12-11T09:22:29
2019-12-11T09:22:29
211,610,115
0
0
null
null
null
null
UTF-8
Java
false
false
359
java
package com.example.tccbank2; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class SpringcloudTccBank2ApplicationTests { @Test public void contextLoads() { } }
[ "1763124707@qq.com" ]
1763124707@qq.com
01fc24e07d97229b4a26eb6f675ee44fcede72f5
96aaca3a14f63192c85ac5b1b8d7554660c10e77
/java-project/src68/main/java/java100/app/web/listener/AppInitListener.java
f109bcc263fa8133e3ba6396e2b68e5bdbf73359
[]
no_license
sehyun94/bitcamp
6b46c51df9f15dc4c45d49f3f380d3af4537ec6d
f408cc8113a8b191c5c28f6b1481b31e03d23258
refs/heads/master
2018-12-25T17:01:02.866040
2018-10-19T01:30:42
2018-10-19T01:30:42
104,423,407
1
0
null
null
null
null
UTF-8
Java
false
false
859
java
package java100.app.web.listener; import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import javax.servlet.annotation.WebListener; // 웹 애플리케이션이 시작될 때 준비 작업을 수행한다. @WebListener public class AppInitListener implements ServletContextListener { @Override public void contextInitialized(ServletContextEvent sce) { // 웹 애플리케이션이 시작될 때 호출 ServletContext ctx = sce.getServletContext(); // JSP에서 사용할 웹애플리케이션 루트 경로를 저장한다. ctx.setAttribute("contextPath", ctx.getContextPath()); } @Override public void contextDestroyed(ServletContextEvent sce) { // 웹 애플리케이션이 종료될 때 호출 } }
[ "k52140@naver.com" ]
k52140@naver.com
e0033f2e9f5a6c1060b8f57e0eee72f7ea1de326
4ff3314f6c52a83ad05471d630aada28345aeab1
/src/main/java/ro/db/springboot/web/rest/util/HeaderUtil.java
1d53ddc760bc09df328f380b75d6cba49fca901e
[]
no_license
SimonaIordache/hrapp
d132dc1d325501c556fad6e58aa7eab372cc0cbe
4355f1a2022175c27d23ab7eedca3ebf9df44c38
refs/heads/master
2021-06-11T02:47:22.404128
2018-04-05T07:32:51
2018-04-05T07:32:51
128,171,767
0
1
null
2020-09-18T16:59:58
2018-04-05T07:17:11
Java
UTF-8
Java
false
false
1,548
java
package ro.db.springboot.web.rest.util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpHeaders; /** * Utility class for HTTP headers creation. */ public final class HeaderUtil { private static final Logger log = LoggerFactory.getLogger(HeaderUtil.class); private HeaderUtil() { } public static HttpHeaders createAlert(String message, String param) { HttpHeaders headers = new HttpHeaders(); headers.add("X-hrappApp-alert", message); headers.add("X-hrappApp-params", param); return headers; } public static HttpHeaders createEntityCreationAlert(String entityName, String param) { return createAlert("A new " + entityName + " is created with identifier " + param, param); } public static HttpHeaders createEntityUpdateAlert(String entityName, String param) { return createAlert("A " + entityName + " is updated with identifier " + param, param); } public static HttpHeaders createEntityDeletionAlert(String entityName, String param) { return createAlert("A " + entityName + " is deleted with identifier " + param, param); } public static HttpHeaders createFailureAlert(String entityName, String errorKey, String defaultMessage) { log.error("Entity processing failed, {}", defaultMessage); HttpHeaders headers = new HttpHeaders(); headers.add("X-hrappApp-error", defaultMessage); headers.add("X-hrappApp-params", entityName); return headers; } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
9de62bac66ddf96d13af840686754737367365b4
ed551db77c18c6e0f8acdd5b6c80c4bb93c7f602
/shell/core/src/main/java/org/apache/karaf/shell/support/parsing/DefaultParser.java
762d92d822316687ab50e7bf7226e99aa6d13ce9
[ "BSD-3-Clause", "EPL-1.0", "MIT", "Apache-2.0", "LicenseRef-scancode-public-domain" ]
permissive
sho25/karaf
df43b8540b374dae00715d454679f3f264b530af
95110009181760c3e7ef86e96834a763899962db
refs/heads/master
2023-08-03T18:58:47.471570
2020-03-09T17:56:12
2020-03-09T17:56:12
255,053,862
0
0
Apache-2.0
2023-07-23T11:42:03
2020-04-12T09:59:19
Java
UTF-8
Java
false
false
4,137
java
begin_unit|revision:0.9.5;language:Java;cregit-version:0.0.1 begin_comment comment|/* * 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. */ end_comment begin_comment comment|// DWB14: parser loops if // comment at start of program end_comment begin_comment comment|// DWB15: allow program to have trailing ';' end_comment begin_package package|package name|org operator|. name|apache operator|. name|karaf operator|. name|shell operator|. name|support operator|. name|parsing package|; end_package begin_import import|import name|java operator|. name|util operator|. name|List import|; end_import begin_import import|import name|org operator|. name|apache operator|. name|karaf operator|. name|shell operator|. name|api operator|. name|console operator|. name|CommandLine import|; end_import begin_import import|import name|org operator|. name|apache operator|. name|karaf operator|. name|shell operator|. name|api operator|. name|console operator|. name|Parser import|; end_import begin_import import|import name|org operator|. name|apache operator|. name|karaf operator|. name|shell operator|. name|api operator|. name|console operator|. name|Session import|; end_import begin_class specifier|public class|class name|DefaultParser implements|implements name|Parser block|{ annotation|@ name|Override specifier|public name|CommandLine name|parse parameter_list|( name|Session name|session parameter_list|, name|String name|command parameter_list|, name|int name|cursor parameter_list|) block|{ name|GogoParser name|parser init|= operator|new name|GogoParser argument_list|( name|command argument_list|, name|cursor argument_list|) decl_stmt|; name|List argument_list|< name|String argument_list|> name|args init|= name|parser operator|. name|statement argument_list|() decl_stmt|; return|return operator|new name|CommandLineImpl argument_list|( name|args operator|. name|toArray argument_list|( operator|new name|String index|[ name|args operator|. name|size argument_list|() index|] argument_list|) argument_list|, name|parser operator|. name|cursorArgumentIndex argument_list|() argument_list|, name|parser operator|. name|argumentPosition argument_list|() argument_list|, name|cursor argument_list|, name|command operator|. name|substring argument_list|( literal|0 argument_list|, name|parser operator|. name|position argument_list|() argument_list|) argument_list|) return|; block|} annotation|@ name|Override specifier|public name|String name|preprocess parameter_list|( name|Session name|session parameter_list|, name|CommandLine name|cmdLine parameter_list|) block|{ name|StringBuilder name|parsed init|= operator|new name|StringBuilder argument_list|() decl_stmt|; for|for control|( name|int name|i init|= literal|0 init|; name|i operator|< name|cmdLine operator|. name|getArguments argument_list|() operator|. name|length condition|; name|i operator|++ control|) block|{ name|String name|arg init|= name|cmdLine operator|. name|getArguments argument_list|() index|[ name|i index|] decl_stmt|; if|if condition|( name|i operator|> literal|0 condition|) block|{ name|parsed operator|. name|append argument_list|( literal|" " argument_list|) expr_stmt|; block|} name|parsed operator|. name|append argument_list|( name|arg argument_list|) expr_stmt|; block|} return|return name|parsed operator|. name|toString argument_list|() return|; block|} block|} end_class end_unit
[ "gnodet@gmail.com" ]
gnodet@gmail.com
1a920ab71385fa505ee10deb7e9b59db488cf710
db3914d0ff14629bb1e95cb0ad55e8ffeaf00d69
/game-core/src/test/java/com/wjybxx/fastjgame/test/CuratorTest.java
f568b4c739955f753e74b4d40cf640c583023e06
[ "Apache-2.0" ]
permissive
lochakho/fastjgame
63ee5b7630b257ffdfbf63b6eaaeae3701cf55fc
04903847825c91b4f71584e2a78bdda14b22b9b6
refs/heads/master
2020-06-03T18:31:06.915752
2019-06-06T08:14:26
2019-06-06T08:14:26
191,683,558
2
0
Apache-2.0
2019-06-13T03:20:50
2019-06-13T03:20:50
null
UTF-8
Java
false
false
1,864
java
package com.wjybxx.fastjgame.test; import com.wjybxx.fastjgame.mrg.CuratorMrg; import com.wjybxx.fastjgame.mrg.GameConfigMrg; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.recipes.cache.ChildData; import org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent; import org.apache.zookeeper.CreateMode; import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Map; /** * @author wjybxx * @version 1.0 * @date 2019/5/14 19:02 * @github - https://github.com/hl845740757 */ public class CuratorTest { public static void main(String[] args) throws Exception { GameConfigMrg gameConfigMrg = new GameConfigMrg(); CuratorMrg curatorMrg = new CuratorMrg(gameConfigMrg); curatorMrg.start(); List<ChildData> childrenData = curatorMrg.watchChildren("/", CuratorTest::onEvent); childrenData.forEach(CuratorTest::printChild); } private static void onEvent(CuratorFramework client, PathChildrenCacheEvent event) throws Exception{ ChildData childData = event.getData(); if (childData==null){ System.out.println(String.format("thread=%s, eventType=%s", Thread.currentThread().getName(), event.getType())); }else { System.out.println(String.format("thread=%s, eventType=%s, path=%s, data=%s", Thread.currentThread().getName(), event.getType(), childData.getPath(), new String(childData.getData(), StandardCharsets.UTF_8))); } } private static void printChild(ChildData childData){ System.out.println(String.format("childData: path=%s, data=%s",childData.getPath(), new String(childData.getData(),StandardCharsets.UTF_8))); } }
[ "845740757@qq.com" ]
845740757@qq.com
ee344924de27b51dfd0c9f4cf967a47d523fb5e3
3efa417c5668b2e7d1c377c41d976ed31fd26fdc
/src/br/com/mind5/stats/statsOwnerSale/ownerSale/model/action/SowalVisiMergeSowalive.java
fc2382393ad11439bac8207154e1549d11ebe0c5
[]
no_license
grazianiborcai/Agenda_WS
4b2656716cc49a413636933665d6ad8b821394ef
e8815a951f76d498eb3379394a54d2aa1655f779
refs/heads/master
2023-05-24T19:39:22.215816
2023-05-15T15:15:15
2023-05-15T15:15:15
109,902,084
0
0
null
2022-06-29T19:44:56
2017-11-07T23:14:21
Java
UTF-8
Java
false
false
1,229
java
package br.com.mind5.stats.statsOwnerSale.ownerSale.model.action; import java.util.List; import br.com.mind5.model.action.ActionVisitorTemplateMerge; import br.com.mind5.model.decisionTree.DeciTree; import br.com.mind5.model.decisionTree.DeciTreeOption; import br.com.mind5.stats.statsOwnerSale.ownerSale.info.SowalInfo; import br.com.mind5.stats.statsOwnerSale.ownerSale.info.SowalMerger; import br.com.mind5.stats.statsOwnerSale.ownerSaleLive.info.SowaliveInfo; import br.com.mind5.stats.statsOwnerSale.ownerSaleLive.model.decisionTree.SowaliveRootSelect; public final class SowalVisiMergeSowalive extends ActionVisitorTemplateMerge<SowalInfo, SowaliveInfo> { public SowalVisiMergeSowalive(DeciTreeOption<SowalInfo> option) { super(option, SowaliveInfo.class); } @Override protected Class<? extends DeciTree<SowaliveInfo>> getTreeClassHook() { return SowaliveRootSelect.class; } @Override protected List<SowalInfo> mergeHook(List<SowalInfo> baseInfos, List<SowaliveInfo> selectedInfos) { return SowalMerger.mergeWithSowalive(baseInfos, selectedInfos); } @Override protected boolean shouldMergeWhenEmptyHook() { return super.DONT_MERGE_WHEN_EMPTY; } }
[ "mmaciel@mind5.com.br" ]
mmaciel@mind5.com.br
cf4934194829bdb1721df063e12a2038659470a6
bd2139703c556050403c10857bde66f688cd9ee6
/skara/86/webrev.01/bots/mlbridge/src/main/java/org/openjdk/skara/bots/mlbridge/WebrevStorage.java
4be3177ba50238ad80789d3966e5720f1897f63d
[]
no_license
isabella232/cr-archive
d03427e6fbc708403dd5882d36371e1b660ec1ac
8a3c9ddcfacb32d1a65d7ca084921478362ec2d1
refs/heads/master
2023-02-01T17:33:44.383410
2020-12-17T13:47:48
2020-12-17T13:47:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,843
java
/* * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package org.openjdk.skara.bots.mlbridge; import org.openjdk.skara.email.EmailAddress; import org.openjdk.skara.host.HostedRepository; import org.openjdk.skara.host.network.URIBuilder; import org.openjdk.skara.vcs.*; import org.openjdk.skara.webrev.Webrev; import java.io.*; import java.net.URI; import java.nio.file.*; import java.util.Comparator; class WebrevStorage { private final HostedRepository storage; private final String storageRef; private final Path baseFolder; private final URI baseUri; private final EmailAddress author; WebrevStorage(HostedRepository storage, String ref, Path baseFolder, URI baseUri, EmailAddress author) { this.baseFolder = baseFolder; this.baseUri = baseUri; this.storage = storage; storageRef = ref; this.author = author; } private void generate(PullRequestInstance prInstance, Path folder, Hash base, Hash head) throws IOException { Files.createDirectories(folder); Webrev.repository(prInstance.localRepo()).output(folder) .generate(base, head); } private void push(Repository localStorage, Path webrevFolder) throws IOException { var files = Files.walk(webrevFolder).toArray(Path[]::new); localStorage.add(files); var hash = localStorage.commit("Added webrev", author.fullName().orElseThrow(), author.address()); localStorage.push(hash, storage.getUrl(), storageRef); } private static void clearDirectory(Path directory) { try { Files.walk(directory) .map(Path::toFile) .sorted(Comparator.reverseOrder()) .forEach(File::delete); } catch (IOException io) { throw new RuntimeException(io); } } URI createAndArchive(PullRequestInstance prInstance, Path scratchPath, Hash base, Hash head, String identifier) { try { var localStorage = Repository.materialize(scratchPath, storage.getUrl(), storageRef); var relativeFolder = baseFolder.resolve(String.format("%s/webrev.%s", prInstance.id(), identifier)); var outputFolder = scratchPath.resolve(relativeFolder); // If a previous operation was interrupted there may be content here already - overwrite if so if (Files.exists(outputFolder)) { clearDirectory(outputFolder); } generate(prInstance, outputFolder, base, head); if (!localStorage.isClean()) { push(localStorage, outputFolder); } return URIBuilder.base(baseUri).appendPath(relativeFolder.toString().replace('\\', '/')).build(); } catch (IOException e) { throw new UncheckedIOException(e); } } }
[ "duke@openjdk.java.net" ]
duke@openjdk.java.net
79a70c0a71c84007d14bf74168d11a8169f46ee0
8caef0b9d107196fef3302cd419eaecd4117a675
/src/com/syntax/class04/ClearCommand.java
fba55aec588a54d0aeefcf31cf0e00a82a90b9eb
[]
no_license
Elizabeth8353/Selenium-batch10
2db32bcc0a5cd59edaafbb082639d5054a48bd10
ceb07f3fb887d78544ebf4bfb28cf3bd6b5ee5e7
refs/heads/main
2023-08-23T16:43:55.980973
2021-10-23T05:08:25
2021-10-23T05:08:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
989
java
package com.syntax.class04; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; public class ClearCommand { public static void main(String[] args) throws InterruptedException { System.setProperty("webdriver.chrome.driver","Drivers/chromedriver.exe"); WebDriver driver=new ChromeDriver(); driver.get("http://secure.smartbearsoftware.com/samples/testcomplete11/WebOrders/login.aspx"); WebElement username= driver.findElement(By.id("ctl00_MainContent_username")); username.sendKeys("Tester"); WebElement password=driver.findElement(By.id("ctl00_MainContent_password"));//assigning our located webelement to a variable password.sendKeys("test");// sending our password Thread.sleep(2000); username.clear();//clearing text sent to our user password.clear();//clearing text sent in our password } }
[ "evaldivieso6@gmail.com" ]
evaldivieso6@gmail.com
5cd3bf7e239dc75c42fa0694c04716a1f6e26f72
c395f01ea6c34ecdc905bc345b780882b8834c46
/WanAndroid/app/src/main/java/com/lst/wanandroid/core/bean/project/ProjectListResponse.java
01ee37e61a00dff1523c9c93bcdf063b350383ac
[]
no_license
lisongting/Android-Projects
3c03bdcb69c2bb06f4a3e0ec93b08caa49d50633
23ac196fca8e786629d829852c9597dc197d25ae
refs/heads/master
2020-06-26T16:43:35.076004
2018-12-09T15:42:02
2018-12-09T15:42:02
74,548,801
6
2
null
null
null
null
UTF-8
Java
false
false
339
java
package com.lst.wanandroid.core.bean.project; import com.lst.wanandroid.core.bean.BaseResponse; public class ProjectListResponse extends BaseResponse { private ProjectListData data; public ProjectListData getData() { return data; } public void setData(ProjectListData data) { this.data = data; } }
[ "501648152@qq.com" ]
501648152@qq.com
85ff25319eadf75a99746c8fc6050c772b731757
08c5675ad0985859d12386ca3be0b1a84cc80a56
/src/main/java/javax/xml/ws/EndpointReference.java
4f295be49ad3c25bf5e9879ea927a255b0190df8
[]
no_license
ytempest/jdk1.8-analysis
1e5ff386ed6849ea120f66ca14f1769a9603d5a7
73f029efce2b0c5eaf8fe08ee8e70136dcee14f7
refs/heads/master
2023-03-18T04:37:52.530208
2021-03-09T02:51:16
2021-03-09T02:51:16
345,863,779
0
0
null
null
null
null
UTF-8
Java
false
false
7,833
java
/* * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.xml.ws; import javax.xml.bind.annotation.XmlTransient; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.stream.StreamResult; import javax.xml.ws.spi.Provider; import javax.xml.ws.wsaddressing.W3CEndpointReference; import java.io.StringWriter; /** * This class represents an WS-Addressing EndpointReference * which is a remote reference to a web service endpoint. * See <a href="http://www.w3.org/TR/2006/REC-ws-addr-core-20060509/"> * Web Services Addressing 1.0 - Core</a> * for more information on WS-Addressing EndpointReferences. * <p> * This class is immutable as the typical web service developer * need not be concerned with its contents. The web service * developer should use this class strictly as a mechanism to * reference a remote web service endpoint. See the {@link Service} APIs * that clients can use to that utilize an <code>EndpointReference</code>. * See the {@link javax.xml.ws.Endpoint}, and * {@link javax.xml.ws.BindingProvider} APIs on how * <code>EndpointReferences</code> can be created for published * endpoints. * <p> * Concrete implementations of this class will represent * an <code>EndpointReference</code> for a particular version of Addressing. * For example the {@link W3CEndpointReference} is for use * with W3C Web Services Addressing 1.0 - Core Recommendation. * If JAX-WS implementors need to support different versions * of addressing, they should write their own * <code>EndpointReference</code> subclass for that version. * This will allow a JAX-WS implementation to create * a vendor specific <code>EndpointReferences</code> that the * vendor can use to flag a different version of * addressing. * <p> * Web service developers that wish to pass or return * <code>EndpointReference</code> in Java methods in an * SEI should use * concrete instances of an <code>EndpointReference</code> such * as the <code>W3CEndpointReference</code>. This way the * schema mapped from the SEI will be more descriptive of the * type of endpoint reference being passed. * <p> * JAX-WS implementors are expected to extract the XML infoset * from an <CODE>EndpointReferece</CODE> using the * <code>{@link EndpointReference#writeTo}</code> * method. * <p> * JAXB will bind this class to xs:anyType. If a better binding * is desired, web services developers should use a concrete * subclass such as {@link W3CEndpointReference}. * * @see W3CEndpointReference * @see Service * @since JAX-WS 2.1 */ @XmlTransient // to treat this class like Object as far as databinding is concerned (proposed JAXB 2.1 feature) public abstract class EndpointReference { // //Default constructor to be only called by derived types. // protected EndpointReference() { } /** * Factory method to read an EndpointReference from the infoset contained in * <code>eprInfoset</code>. This method delegates to the vendor specific * implementation of the {@link javax.xml.ws.spi.Provider#readEndpointReference} method. * * @param eprInfoset The <code>EndpointReference</code> infoset to be unmarshalled * @return the EndpointReference unmarshalled from <code>eprInfoset</code> * never <code>null</code> * @throws WebServiceException if an error occurs while creating the * <code>EndpointReference</code> from the <CODE>eprInfoset</CODE> * @throws java.lang.IllegalArgumentException if the <code>null</code> <code>eprInfoset</code> value is given. */ public static EndpointReference readFrom(Source eprInfoset) { return Provider.provider().readEndpointReference(eprInfoset); } /** * write this <code>EndpointReference</code> to the specified infoset format * * @param result for writing infoset * @throws WebServiceException if there is an error writing the * <code>EndpointReference</code> to the specified <code>result</code>. * @throws java.lang.IllegalArgumentException If the <code>null</code> <code>result</code> value is given. */ public abstract void writeTo(Result result); /** * The <code>getPort</code> method returns a proxy. If there * are any reference parameters in the * <code>EndpointReference</code> instance, then those reference * parameters MUST appear as SOAP headers, indicating them to be * reference parameters, on all messages sent to the endpoint. * The parameter <code>serviceEndpointInterface</code> specifies * the service endpoint interface that is supported by the * returned proxy. * The <code>EndpointReference</code> instance specifies the * endpoint that will be invoked by the returned proxy. * In the implementation of this method, the JAX-WS * runtime system takes the responsibility of selecting a protocol * binding (and a port) and configuring the proxy accordingly from * the WSDL Metadata from this <code>EndpointReference</code> or from * annotations on the <code>serviceEndpointInterface</code>. For this method * to successfully return a proxy, WSDL metadata MUST be available and the * <code>EndpointReference</code> instance MUST contain an implementation understood * <code>serviceName</code> metadata. * <p> * Because this port is not created from a <code>Service</code> object, handlers * will not automatically be configured, and the <code>HandlerResolver</code> * and <code>Executor</code> cannot be get or set for this port. The * <code>BindingProvider().getBinding().setHandlerChain()</code> * method can be used to manually configure handlers for this port. * * @param serviceEndpointInterface Service endpoint interface * @param features An array of <code>WebServiceFeatures</code> to configure on the * proxy. Supported features not in the <code>features * </code> parameter will have their default values. * @return Object Proxy instance that supports the * specified service endpoint interface * @throws WebServiceException <UL> * <LI>If there is an error during creation * of the proxy * <LI>If there is any missing WSDL metadata * as required by this method * <LI>If this * <code>endpointReference</code> * is invalid * <LI>If an illegal * <code>serviceEndpointInterface</code> * is specified * <LI>If a feature is enabled that is not compatible with * this port or is unsupported. * </UL> * @see java.lang.reflect.Proxy * @see WebServiceFeature **/ public <T> T getPort(Class<T> serviceEndpointInterface, WebServiceFeature... features) { return Provider.provider().getPort(this, serviceEndpointInterface, features); } /** * Displays EPR infoset for debugging convenience. */ public String toString() { StringWriter w = new StringWriter(); writeTo(new StreamResult(w)); return w.toString(); } }
[ "787491096@qq.com" ]
787491096@qq.com
54a7fa53df4f68f00188353b051800eb385a1aa2
375ed503afa17a9835e5993ac06cf0288cf12928
/MVC/src/com/Dao/StuDao.java
3d61953deb6cca6809501e30e2c2d06128409285
[]
no_license
rz0310/JavaWeb
cac34ab8d5e6d664daecc3acd1de7a654b223857
820bc89252790577729b24bf62253872cb2c9bdc
refs/heads/master
2020-04-28T10:25:03.288416
2019-04-08T14:58:29
2019-04-08T14:58:29
175,200,442
1
0
null
null
null
null
UTF-8
Java
false
false
625
java
package com.Dao; import com.JavaBean.Student; import java.util.List; public interface StuDao { // 增加 boolean insertStu(Student stu); // 修改 boolean updateStu(Student student); // 删除 List<Student> delStu(String name); // 查看所有 List<Student> QueryAll(); // 按编号搜索 List<Student> queryById(int id); // 按姓名搜索 List<Student> queryByName(String name); // 按年龄搜索 List<Student> queryByAge(int age); // 按班级搜索 List<Student> queryByClass(String clazz); // 按专业搜索 List<Student> queryByMajor(String major); }
[ "43040390+rz0310@users.noreply.github.com" ]
43040390+rz0310@users.noreply.github.com
afd478dfdd83800c315fb008e4ca39f6b6ec47db
e29cc4f45ee5e223bb72fa096d021f9c63a9594b
/src/main/java/uk/ac/soton/ldanalytics/piotre/server/user/User.java
9601bdcb1b991e2f745395b0a0a72870d249fb04
[]
no_license
eugenesiow/piotre-web
ae63e6e5089521314bf55bd0d26f3b6a83eccdfc
8b225c6aad0353e1f90fafb776fca6bbee560e14
refs/heads/master
2021-01-18T00:26:51.223044
2016-10-16T16:47:55
2016-10-16T16:47:55
65,021,646
0
0
null
null
null
null
UTF-8
Java
false
false
647
java
package uk.ac.soton.ldanalytics.piotre.server.user; public class User { public String getUsername() { return username; } public String getSalt() { return salt; } public String getHashedPassword() { return hashedPassword; } public String getApiKey() { return apiKey; } public void setApiKey(String apiKey) { this.apiKey = apiKey; } public User(String username, String salt, String hashedPassword, String apiKey) { super(); this.username = username; this.salt = salt; this.hashedPassword = hashedPassword; this.apiKey = apiKey; } String username; String salt; String hashedPassword; String apiKey; }
[ "kyo116@gmail.com" ]
kyo116@gmail.com
2bf5cce00602e0d06840573e830c2ae3d0ec8965
369270a14e669687b5b506b35895ef385dad11ab
/java.corba/com/sun/corba/se/spi/activation/ServerIdsHelper.java
d95cb09003348c0e9c5e96ebd4380efe6e3fe217
[]
no_license
zcc888/Java9Source
39254262bd6751203c2002d9fc020da533f78731
7776908d8053678b0b987101a50d68995c65b431
refs/heads/master
2021-09-10T05:49:56.469417
2018-03-20T06:26:03
2018-03-20T06:26:03
125,970,208
3
3
null
null
null
null
UTF-8
Java
false
false
2,287
java
package com.sun.corba.se.spi.activation; /** * com/sun/corba/se/spi/activation/ServerIdsHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from /scratch/opt/mach5/mesos/work_dir/slaves/5af44a71-976a-41b7-81de-5773b84ec572-S39643/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/a3f74ad9-294f-4385-b9cc-31da721d8f41/runs/504babbb-611e-4037-9ed3-2563bc56551c/workspace/corba/src/java.corba/share/classes/com/sun/corba/se/spi/activation/activation.idl * Tuesday, December 19, 2017 6:09:01 PM PST */ abstract public class ServerIdsHelper { private static String _id = "IDL:activation/ServerIds:1.0"; public static void insert (org.omg.CORBA.Any a, int[] that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); a.type (type ()); write (out, that); a.read_value (out.create_input_stream (), type ()); } public static int[] extract (org.omg.CORBA.Any a) { return read (a.create_input_stream ()); } private static org.omg.CORBA.TypeCode __typeCode = null; synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { __typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long); __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.corba.se.spi.activation.ServerIdHelper.id (), "ServerId", __typeCode); __typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode); __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (com.sun.corba.se.spi.activation.ServerIdsHelper.id (), "ServerIds", __typeCode); } return __typeCode; } public static String id () { return _id; } public static int[] read (org.omg.CORBA.portable.InputStream istream) { int value[] = null; int _len0 = istream.read_long (); value = new int[_len0]; for (int _o1 = 0;_o1 < value.length; ++_o1) value[_o1] = com.sun.corba.se.spi.activation.ServerIdHelper.read (istream); return value; } public static void write (org.omg.CORBA.portable.OutputStream ostream, int[] value) { ostream.write_long (value.length); for (int _i0 = 0;_i0 < value.length; ++_i0) com.sun.corba.se.spi.activation.ServerIdHelper.write (ostream, value[_i0]); } }
[ "841617433@qq.com" ]
841617433@qq.com
653d7de43ed0bc99630b74cd5d6ac339fed3bcd3
1a1fa9d2b103d3e8ba3d940316343ee34c2fe5b6
/ddal-core/src/main/java/studio/raptor/ddal/core/parser/result/merger/GroupByColumn.java
a3ffa54896a4d8404e0fc1ff7083b6388d97ea5e
[ "Apache-2.0" ]
permissive
mf1389004071/incubator-ddal
70ab4f8c6bd0a8ca394f5f20253702777a168e39
b5a827dfcfbf07c380dc5ea3ecb4c61749426a81
refs/heads/master
2022-01-30T12:38:38.491395
2018-08-24T06:17:19
2018-08-24T06:17:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,087
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 studio.raptor.ddal.core.parser.result.merger; import com.google.common.base.Optional; import studio.raptor.ddal.core.parser.result.merger.OrderByColumn.OrderByType; /** * 分组列对象. * * @author jackcao */ public final class GroupByColumn extends AbstractSortableColumn implements IndexColumn { private int columnIndex; public GroupByColumn(final Optional<String> owner, final String name, final Optional<String> alias, final OrderByType orderByType) { super(owner, Optional.of(name), alias, orderByType); } public GroupByColumn(final Optional<String> owner, final String name, final OrderByType orderByType) { super(owner, Optional.of(name), orderByType); } @Override public Optional<String> getColumnLabel() { return getAlias(); } @Override public Optional<String> getColumnName() { return getName(); } @Override public int getColumnIndex() { return columnIndex; } @Override public void setColumnIndex(int columnIndex) { this.columnIndex = columnIndex; } @Override public String toString() { return "GroupByColumn{" + "columnIndex=" + columnIndex + "} " + super.toString(); } }
[ "charleywu@aliyun.com" ]
charleywu@aliyun.com
cb66bc7cf29d1a4002d6668248c6d1da3bb10edb
e2037579bb0ee3534ee833291804439100e133e7
/src/com/coffee/spring/s06/aop/proxy/ProxyFactory.java
0a6e61dcd090dc4782dc6fbe8f7f3a84375dde74
[]
no_license
sunyurui/Spring
f9852536c443a0c961f6d67748b2a60e3188e432
4f718adebe128ecdfd7cd96d4eed623ee6211af2
refs/heads/master
2021-05-23T17:41:28.355033
2018-04-18T09:22:57
2018-04-18T09:22:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,142
java
/** * <p>Title: ProxyFactory.java</p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2018</p> * @author coffeeliu * @date 2018-4-15 * @version 1.0 */ package com.coffee.spring.s06.aop.proxy; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; /** * @author coffeeliu * */ public class ProxyFactory implements InvocationHandler { private Object stu; /* (non-Javadoc) * @see java.lang.reflect.InvocationHandler#invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) */ public Object createStudentProxy(Object stu) { this.stu = stu; return Proxy.newProxyInstance( stu.getClass().getClassLoader(), stu.getClass().getInterfaces(), this); } @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { StudentBean s = (StudentBean) stu; Object object = null; if ((s.getName() != null)&&(s.getAge()>0)&&method.getName().equals("say")) object = method.invoke(stu, args); else System.out.println("不能不填!"); return object; } }
[ "394776565@qq.com" ]
394776565@qq.com
f2a5c52f86c649f4163fa6511e2f4693a8861683
1ef06556efb17bd350003465d877b5f268d3a59b
/jmx/jmx-core/src/main/java/org/apache/aries/jmx/cm/ConfigurationAdminMBeanHandler.java
5a84b1f5f949edc7fb2ac30cc20bdc760e2490c2
[ "Apache-2.0" ]
permissive
apache/aries
fed792e0641d23c42dc6645b9632c14255bf810a
9f88cf73fb5b6d7e9d49f898c141cb1703f81112
refs/heads/trunk
2023-08-28T00:54:27.831800
2023-07-23T05:11:13
2023-07-23T05:11:13
322,018
91
173
Apache-2.0
2023-09-04T17:20:42
2009-09-30T08:00:10
Java
UTF-8
Java
false
false
2,766
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.aries.jmx.cm; import javax.management.NotCompliantMBeanException; import javax.management.StandardMBean; import org.apache.aries.jmx.AbstractCompendiumHandler; import org.apache.aries.jmx.Logger; import org.apache.aries.jmx.MBeanHandler; import org.apache.aries.jmx.agent.JMXAgentContext; import org.osgi.jmx.service.cm.ConfigurationAdminMBean; import org.osgi.service.log.LogService; /** * <p> * Implementation of <code>MBeanHandler</code> which manages the <code>ConfigurationAdminMBean</code> implementation * * @see MBeanHandler </p> * * @version $Rev$ $Date$ */ public class ConfigurationAdminMBeanHandler extends AbstractCompendiumHandler { /** * Constructs new ConfigurationAdminMBeanHandler instance * * @param agentContext * JMXAgentContext instance */ public ConfigurationAdminMBeanHandler(JMXAgentContext agentContext) { super(agentContext, "org.osgi.service.cm.ConfigurationAdmin"); } /** * @see org.apache.aries.jmx.AbstractCompendiumHandler#constructInjectMBean(java.lang.Object) */ @Override protected StandardMBean constructInjectMBean(Object targetService) { ConfigurationAdminMBean caMBean = new org.apache.aries.jmx.cm.ConfigurationAdmin( (org.osgi.service.cm.ConfigurationAdmin) targetService); StandardMBean mbean = null; try { mbean = new StandardMBean(caMBean, ConfigurationAdminMBean.class); } catch (NotCompliantMBeanException e) { Logger logger = agentContext.getLogger(); logger.log(LogService.LOG_ERROR, "Failed to instantiate MBean for " + ConfigurationAdminMBean.class.getName(), e); } return mbean; } /** * @see org.apache.aries.jmx.AbstractCompendiumHandler#getBaseName() */ protected String getBaseName() { return ConfigurationAdminMBean.OBJECTNAME; } }
[ "davidb@apache.org" ]
davidb@apache.org
2236192efd5f68855e27fe0edf896bdf2b74e160
be71bc9c35464b19483876e3e1739a6f3e0fff1f
/Flynas/src/test/java/flynas/web/uat/regression/TC37_EmpLoginStaffConfmedModifyExtras.java
adb4ea2cc50092eaa2be8314649acc049596b9ee
[]
no_license
E003901cigniti/Flynas_IOS
7d077dc67a7a3042e607b1ccfef554d929cfbe79
123e773deb7e02eb0b46e4d44bdc6f74ca4a7e52
refs/heads/master
2021-09-19T02:36:09.052168
2018-07-22T07:06:22
2018-07-22T07:06:22
111,407,173
0
0
null
null
null
null
UTF-8
Java
false
false
4,272
java
package flynas.web.uat.regression; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import com.ctaf.accelerators.TestEngine; import com.ctaf.support.ExcelReader; import com.ctaf.support.HtmlReportSupport; import com.ctaf.utilities.Reporter; import flynas.web.testObjects.BookingPageLocators; import flynas.web.workflows.BookingPageFlow; public class TC37_EmpLoginStaffConfmedModifyExtras extends BookingPageFlow{ ExcelReader xls = new ExcelReader(configProps.getProperty("TestDataIBEUAT"),"FL_WEB_16"); @Test(dataProvider = "testData",groups={"Chrome"}) public void TC_37_EmpLoginStaffConfmedModifyExtras(String bookingClass,String mobilenum, String paymentType,String newDate,String pickDate,String rtndate,String origin,String dest,String triptype, String adult,String child,String infant,String selectseat,String Description) throws Throwable { try { TestEngine.testDescription.put(HtmlReportSupport.tc_name, Description); String deptdate = pickDate(pickDate); String rtrndate = pickDate(rtndate); String[] Credentials = pickCredentials("EmployeeCreds"); String username =Credentials[0]; String password =Credentials[1]; driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS); click(emplogin_lnk, "Employe Login"); switchtoChildWindow(); login(username,password); inputBookingDetails(triptype,origin, dest, deptdate, "", "", rtrndate,adult, child, infant,"","",paymentType); selectClassForStaff(bookingClass); waitforElement(BookingPageLocators.mobileNum); waitUtilElementhasAttribute(BookingPageLocators.body); if(getText(BookingPageLocators.mobileNum,"MobileNumber")=="") { type(BookingPageLocators.mobileNum, mobilenum, "MobileNumber"); clickContinueBtn(); } else { clickContinueBtn(); } coninueOnBaggage(); continueOnSeatSelection(); payment(paymentType, ""); String strpnr = getReferenceNumber().trim(); searchFlight(strpnr, username, "", ""); modifyExtras(); Baggage_Extra(triptype); addSportsEqpmnt(triptype); Select_A_Meal(); Select_lounge(); inputExtras("12"); waitforElement(BookingPageLocators.manageMyBookingTittle); waitUtilElementhasAttribute(BookingPageLocators.body); click(BookingPageLocators.modifySeat, "Seat Selection"); waitforElement(BookingPageLocators.selectseattittle); waitUtilElementhasAttribute(BookingPageLocators.body); if(isElementDisplayedTemp(BookingPageLocators.selectseattittle)){ selectallSeats(selectseat, "1", triptype); }else{ System.out.println("No seat Select Page"); } waitforElement(BookingPageLocators.paynow); waitUtilElementhasAttribute(BookingPageLocators.body); click(BookingPageLocators.paynow, "Pay Now"); payment(paymentType, ""); String strPNR = getReferenceNumber().trim(); validate_ticketStatus(strPNR); Reporter.SuccessReport("TC37_EmpLoginStaffConfmedModifyExtras", "Pass"); } catch (Exception e) { e.printStackTrace(); Reporter.failureReport("TC37_EmpLoginStaffConfmedModifyExtras", "Failed"); } } @DataProvider(name="testData") public Object[][] createdata1() { return (Object[][]) new Object[][] { { xls.getCellValue("EmployeEmail", "Value"), xls.getCellValue("Password", "Value"), xls.getCellValue("Booking Class", "Value"), xls.getCellValue("Mobile", "Value"), xls.getCellValue("Payment Type", "Value"), xls.getCellValue("NewDate", "Value"), xls.getCellValue("Departure Date", "Value"), xls.getCellValue("Return Date", "Value"), xls.getCellValue("Origin", "Value1"), xls.getCellValue("Destination", "Value1"), xls.getCellValue("Trip Type", "Value"), xls.getCellValue("Adults Count", "Value"), xls.getCellValue("Child Count", "Value"), xls.getCellValue("Infant Count", "Value"), xls.getCellValue("Select Seat", "Value"), "Validate Employe Login Round Trip One Adult StaffConformed Modify Extras"}}; } }
[ "RahuRam.k_33723617+E003901cigniti@users.noreply.github.com" ]
RahuRam.k_33723617+E003901cigniti@users.noreply.github.com
cf62c8a6e298e8194eaffc8d0641f3ac2b7e866d
d97527c4ba38df7e3b8f13b619b13526ba1a4ba1
/springboot-websocket/src/main/java/com/learn/springbootwebsocket/config/WebSocketConfig.java
492623e3bd2e708a5b8bb03371c1b6a94a8d3851
[]
no_license
liman657/learn2019
472d2713b53e0fd73fb9617279c73b7a06ca4732
8e65320752b742463f2a43a41df75b15c0452477
refs/heads/master
2023-06-10T05:26:05.929419
2023-06-04T08:10:18
2023-06-04T08:10:18
174,538,097
2
0
null
2022-06-21T04:20:15
2019-03-08T12:58:17
JavaScript
UTF-8
Java
false
false
1,413
java
package com.learn.springbootwebsocket.config; import org.springframework.context.annotation.Configuration; import org.springframework.messaging.simp.config.MessageBrokerRegistry; import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker; import org.springframework.web.socket.config.annotation.StompEndpointRegistry; import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer; /** * autor:liman * createtime:2020/10/26 * comment: */ @Configuration @EnableWebSocketMessageBroker public class WebSocketConfig implements WebSocketMessageBrokerConfigurer { /** * 注册端点,发布或者订阅消息的时候需要连接此端点 * setAllowedOrigins 非必须,*表示允许其他域进行连接 * withSockJS 表示开始sockejs支持 */ public void registerStompEndpoints(StompEndpointRegistry registry) { registry.addEndpoint("/endpoint-websocket").setAllowedOrigins("*").withSockJS(); } /** * 配置消息代理(中介) * enableSimpleBroker 服务端推送给客户端的路径前缀 * setApplicationDestinationPrefixes 客户端发送数据给服务器端的一个前缀 */ @Override public void configureMessageBroker(MessageBrokerRegistry registry) { registry.enableSimpleBroker("/topic"); registry.setApplicationDestinationPrefixes("/app"); } }
[ "657271181@qq.com" ]
657271181@qq.com
fd26e3b5f83d1228cbd1cd89e34014f33d3e52b1
06280d92f5b3c087bc9ffe35804edd75a6b9fb10
/cdt-java-client/src/main/java/com/github/kklisura/cdt/services/factory/impl/DefaultWebSocketContainerFactory.java
3a400cdb208fdb2f0fc5e2d5458bc645cad924fc
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
ZYunf/chrome-devtools-java-client
e84c908b47f2e5dda5f0418382427cf0fc2808c9
1edd19259b2f8eafd5ba20af45b6fb32ce63c6fd
refs/heads/master
2023-01-03T22:35:43.005515
2020-11-01T01:11:28
2020-11-01T01:11:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,545
java
package com.github.kklisura.cdt.services.factory.impl; /*- * #%L * cdt-java-client * %% * Copyright (C) 2018 - 2020 Kenan Klisura * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import static com.github.kklisura.cdt.services.utils.ConfigurationUtils.systemProperty; import com.github.kklisura.cdt.services.factory.WebSocketContainerFactory; import javax.websocket.WebSocketContainer; import org.glassfish.tyrus.client.ClientManager; import org.glassfish.tyrus.container.grizzly.client.GrizzlyClientContainer; /** * Default WebSocketContainer factory creates a WebSocketContainer from GrizzlyContainerProvider. * This class sets 8MB as internal receiving buffer, which was 4MB by default. By using {@link * #WEBSOCKET_INCOMING_BUFFER_PROPERTY} this can further be increased if required. The following * code sets the the incoming buffer size to 24 MB. * * <pre> * static { * System.setProperty( * DefaultWebSocketContainerFactory.WEBSOCKET_INCOMING_BUFFER_PROPERTY, * Long.toString((long) DefaultWebSocketContainerFactory.MB * 24) * ); * } * </pre> * * @author Kenan Klisura */ public class DefaultWebSocketContainerFactory implements WebSocketContainerFactory { public static final String WEBSOCKET_INCOMING_BUFFER_PROPERTY = "com.github.kklisura.cdt.services.config.incomingBuffer"; public static final int KB = 1024; public static final int MB = 1024 * KB; private static final int DEFAULT_INCOMING_BUFFER_SIZE = 8 * MB; private static final long INCOMING_BUFFER_SIZE = systemProperty(WEBSOCKET_INCOMING_BUFFER_PROPERTY, DEFAULT_INCOMING_BUFFER_SIZE); public static final String INCOMING_BUFFER_SIZE_PROPERTY = "org.glassfish.tyrus.incomingBufferSize"; @Override public WebSocketContainer getWebSocketContainer() { final ClientManager client = ClientManager.createClient(GrizzlyClientContainer.class.getName()); client.getProperties().put(INCOMING_BUFFER_SIZE_PROPERTY, INCOMING_BUFFER_SIZE); return client; } }
[ "kklisura@hotmail.com" ]
kklisura@hotmail.com
8e543d2108a5f5342608bd29f1b6cb290fc42a30
00ed1308bccfbb24fd45d31798d60a3e4a5c9aef
/squidb/src/com/yahoo/squidb/sql/View.java
686f03ec7530126dfd5f8563dd804a472ebfd86f
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
maniacs-db/squidb
5dc903d4c518e74eb4bc3625cbd6fc0c54e80cb6
cf35046974e2cf7ef6d1f727c9aaf72d9780275f
refs/heads/master
2021-01-12T14:19:01.061513
2016-09-02T22:09:12
2016-09-02T22:09:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,563
java
/* * Copyright 2015, Yahoo Inc. * Copyrights licensed under the Apache 2.0 License. * See the accompanying LICENSE file for terms. */ package com.yahoo.squidb.sql; import com.yahoo.squidb.data.ViewModel; import com.yahoo.squidb.utility.VersionCode; /** * A SQLite View. Views are read-only tables composed from a pre-defined SELECT statement. */ public class View extends QueryTable { private boolean temporary; private View(Class<? extends ViewModel> modelClass, Property<?>[] properties, String expression, String databaseName, String alias, Query query, boolean temporary) { super(modelClass, properties, expression, databaseName, query); this.alias = alias; this.temporary = temporary; } /** * Construct a View from the given query and with the given name * * @param query the {@link Query} that composes this View * @param name the name for this View * @return a new View instance */ public static View fromQuery(Query query, String name) { return fromQuery(query, name, null, null); } /** * Construct a View from the given query with the given name and represented by the given model class * * @param query the {@link Query} that composes this View * @param name the name for this View * @param modelClass the model class representing this View * @return a new View instance */ public static View fromQuery(Query query, String name, Class<? extends ViewModel> modelClass, Property<?>[] properties) { return new View(modelClass, properties, name, null, null, query, false); } /** * Construct a temporary View from the given query and with the given name * * @param query the {@link Query} that composes this View * @param name the name for this View * @return a new View instance */ public static View temporaryFromQuery(Query query, String name) { return temporaryFromQuery(query, name, null, null); } /** * Construct a temporary View from the given query with the given name and represented by the given model class * * @param query the {@link Query} that composes this View * @param name the name for this View * @param modelClass the model class representing this View * @return a new View instance */ public static View temporaryFromQuery(Query query, String name, Class<? extends ViewModel> modelClass, Property<?>[] properties) { return new View(modelClass, properties, name, null, null, query, true); } public View qualifiedFromDatabase(String databaseName) { return new View(modelClass, properties, getExpression(), databaseName, alias, query, temporary); } @Override public View as(String newAlias) { return (View) super.as(newAlias); } @Override protected View asNewAliasWithPropertiesArray(String newAlias, Property<?>[] newProperties) { return new View(modelClass, newProperties, getExpression(), qualifier, newAlias, query, temporary); } /** * Append the SQL statement that creates this View to the given {@link StringBuilder} */ public void createViewSql(VersionCode sqliteVersion, StringBuilder sql) { sql.append("CREATE "); if (temporary) { sql.append("TEMPORARY "); } sql.append("VIEW IF NOT EXISTS ") .append(getExpression()).append(" AS ") .append(query.toRawSql(sqliteVersion)); } }
[ "sboz88@gmail.com" ]
sboz88@gmail.com
c5282e8088bd17cc5e728a22057bea755f2b235e
dd76d0b680549acb07278b2ecd387cb05ec84d64
/divestory-CFR/androidx/core/graphics/PathUtils.java
8da23e0c8183f370160c58ed645ad5cd45894d54
[]
no_license
ryangardner/excursion-decompiling
43c99a799ce75a417e636da85bddd5d1d9a9109c
4b6d11d6f118cdab31328c877c268f3d56b95c58
refs/heads/master
2023-07-02T13:32:30.872241
2021-08-09T19:33:37
2021-08-09T19:33:37
299,657,052
0
0
null
null
null
null
UTF-8
Java
false
false
1,292
java
/* * Decompiled with CFR <Could not determine version>. * * Could not load the following classes: * android.graphics.Path * android.graphics.PointF */ package androidx.core.graphics; import android.graphics.Path; import android.graphics.PointF; import androidx.core.graphics.PathSegment; import java.util.ArrayList; import java.util.Collection; public final class PathUtils { private PathUtils() { } public static Collection<PathSegment> flatten(Path path) { return PathUtils.flatten(path, 0.5f); } public static Collection<PathSegment> flatten(Path arrf, float f) { arrf = arrf.approximate(f); int n = arrf.length / 3; ArrayList<PathSegment> arrayList = new ArrayList<PathSegment>(n); int n2 = 1; while (n2 < n) { int n3 = n2 * 3; int n4 = (n2 - 1) * 3; f = arrf[n3]; float f2 = arrf[n3 + 1]; float f3 = arrf[n3 + 2]; float f4 = arrf[n4]; float f5 = arrf[n4 + 1]; float f6 = arrf[n4 + 2]; if (f != f4 && (f2 != f5 || f3 != f6)) { arrayList.add(new PathSegment(new PointF(f5, f6), f4, new PointF(f2, f3), f)); } ++n2; } return arrayList; } }
[ "ryan.gardner@coxautoinc.com" ]
ryan.gardner@coxautoinc.com
e588b8ebc1fca82363ce5ea459eddfe0764c2c0f
bc5b4ba58d5bc5c5fa17c39d6e09cc30293c018d
/app/src/main/java/com/kaqi/niuniu/ireader/ui/base/adapter/BaseListAdapter.java
97f2bdd700ae5bfde6be14090feed2642aec8088
[ "Apache-2.0" ]
permissive
nances/INNBook
9bf533ff4a00e709952c0a3f16498636f5fff832
9729177ee5c9ee7153c6249bcea6b8d49d7a8842
refs/heads/master
2020-05-17T00:51:41.618413
2019-07-24T08:13:49
2019-07-24T08:13:49
183,406,972
0
2
null
null
null
null
UTF-8
Java
false
false
4,503
java
package com.kaqi.niuniu.ireader.ui.base.adapter; import android.os.Handler; import android.support.v7.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; import java.util.ArrayList; import java.util.Collections; import java.util.List; /** * Created by newbiechen on 17-3-21. */ public abstract class BaseListAdapter <T> extends RecyclerView.Adapter<RecyclerView.ViewHolder>{ private static final String TAG = "BaseListAdapter"; /*common statement*/ protected final List<T> mList = new ArrayList<>(); protected OnItemClickListener mClickListener; protected OnItemLongClickListener mLongClickListener; /************************abstract area************************/ protected abstract IViewHolder<T> createViewHolder(int viewType); /*************************rewrite logic area***************************************/ @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { IViewHolder<T> viewHolder = createViewHolder(viewType); View view = viewHolder.createItemView(parent); //初始化 RecyclerView.ViewHolder holder = new BaseViewHolder(view, viewHolder); return holder; } @Override public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { //防止别人直接使用RecyclerView.ViewHolder调用该方法 if (!(holder instanceof BaseViewHolder)) throw new IllegalArgumentException("The ViewHolder item must extend BaseViewHolder"); IViewHolder<T> iHolder = ((BaseViewHolder) holder).holder; iHolder.onBind(getItem(position),position); //设置点击事件 holder.itemView.setOnClickListener((v)->{ if (mClickListener != null){ mClickListener.onItemClick(v,position); } //adapter监听点击事件 iHolder.onClick(); onItemClick(v,position); }); //设置长点击事件 holder.itemView.setOnLongClickListener( (v) -> { boolean isClicked = false; if (mLongClickListener != null){ isClicked = mLongClickListener.onItemLongClick(v,position); } //Adapter监听长点击事件 onItemLongClick(v,position); return isClicked; } ); } @Override public int getItemCount() { return mList.size(); } protected void onItemClick(View v,int pos){ } protected void onItemLongClick(View v,int pos){ } /******************************public area***********************************/ public void setOnItemClickListener(OnItemClickListener mListener) { this.mClickListener = mListener; } public void setOnItemLongClickListener(OnItemLongClickListener mListener){ this.mLongClickListener = mListener; } public void addItem(T value){ mList.add(value); notifyDataSetChanged(); } public void addItem(int index,T value){ mList.add(index, value); notifyDataSetChanged(); } public List<T> getAlldata() { return new ArrayList<>(mList); } public void addItems(List<T> values){ mList.addAll(values); Handler handler = new Handler(); handler.post(new Runnable() { @Override public void run() { notifyDataSetChanged(); } }); } public void removeItem(T value){ mList.remove(value); notifyDataSetChanged(); } public void removeItems(List<T> value){ mList.removeAll(value); notifyDataSetChanged(); } public T getItem(int position){ return mList.get(position); } public List<T> getItems(){ return Collections.unmodifiableList(mList); } public int getItemSize(){ return mList.size(); } public void refreshItems(List<T> list){ mList.clear(); mList.addAll(list); notifyDataSetChanged(); } public void clear(){ mList.clear(); } /***************************inner class area***********************************/ public interface OnItemClickListener{ void onItemClick(View view, int pos); } public interface OnItemLongClickListener{ boolean onItemLongClick(View view, int pos); } }
[ "niqiao1111@163.com" ]
niqiao1111@163.com
e91279bcedaeb81001946382e654667259551e18
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/13/13_ef8b0e134912b4562e324536417c13116da48b6d/JmxJacorbJacorbTest/13_ef8b0e134912b4562e324536417c13116da48b6d_JmxJacorbJacorbTest_s.java
2c8148bccdcec49ae7dfb198a51d43cffce59493
[]
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,775
java
/* * JacORB - a free Java ORB * * Copyright (C) 1999-2006 Gerald Brose * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ package org.jacorb.test.jmx; import java.util.Properties; import org.jacorb.test.common.TestUtils; import junit.framework.Test; import junit.framework.TestSuite; public class JmxJacorbJacorbTest extends AbstractJMXTest { public JmxJacorbJacorbTest(String name, JMXClientServerSetup setup) { super(name, setup); } public static Test suite() throws Exception { Properties props = new Properties(); props.put ("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB"); props.put ("org.omg.CORBA.ORBSingletonClass", "org.jacorb.orb.ORBSingleton"); TestSuite suite = new TestSuite(); JMXClientServerSetup setup = new JMXClientServerSetup(suite, "ignored", props, props); TestUtils.addToSuite(suite, setup, JmxJacorbJacorbTest.class); return setup; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f6f0c4921c8e9b1ece25789cb0320844c5f4e99a
eb5bda214a4c3875fe911eaae3243371b8d3bd1c
/app/src/main/java/com/pc/profnavykt/ProfessiiCode/S20_02_04.java
8c350513d2ff546e1b3bb36344865664e70acbed
[]
no_license
bokunoheya/Prof_Navigation_Yakutia
edc894d7d05473261d36e08bf25a6b771fa6bf13
9e691a17676ec49901d02bd158a1db3e47c308ad
refs/heads/master
2022-12-06T09:01:49.228729
2020-08-13T01:18:53
2020-08-13T01:18:53
261,056,835
0
0
null
null
null
null
UTF-8
Java
false
false
3,349
java
package com.pc.profnavykt.ProfessiiCode; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.pc.profnavykt.MainActivity; import com.pc.profnavykt.R; import androidx.fragment.app.Fragment; /** * A simple {@link Fragment} subclass. * Use the {@link S20_02_04#newInstance} factory method to * create an instance of this fragment. */ public class S20_02_04 extends Fragment { // TODO: Rename parameter arguments, choose names that match // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER private static final String ARG_PARAM1 = "param1"; private static final String ARG_PARAM2 = "param2"; // TODO: Rename and change types of parameters private String mParam1; private String mParam2; public S20_02_04() { // Required empty public constructor } /** * Use this factory method to create a new instance of * this fragment using the provided parameters. * * @param param1 Parameter 1. * @param param2 Parameter 2. * @return A new instance of fragment S13_02_03. */ // TODO: Rename and change types and number of parameters public static S20_02_04 newInstance(String param1, String param2) { S20_02_04 fragment = new S20_02_04(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { mParam1 = getArguments().getString(ARG_PARAM1); mParam2 = getArguments().getString(ARG_PARAM2); } } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View root= inflater.inflate(R.layout.fragment_s20_02_04, container, false); TextView upText=root.findViewById(R.id.upText); TextView kv=root.findViewById(R.id.textView26); TextView lvl=root.findViewById(R.id.textView28); TextView srokO9=root.findViewById(R.id.srok_o9);// TextView srokO11=root.findViewById(R.id.srok_o11); TextView srokZ9=root.findViewById(R.id.srok_z9); TextView srokZ11=root.findViewById(R.id.srok_z11);// TextView formEd9=root.findViewById(R.id.textView32); TextView formEd11=root.findViewById(R.id.textView13); TextView mestoO9=root.findViewById(R.id.mesto_o9); TextView mestoO11=root.findViewById(R.id.mesto_o11); TextView mestoZ9=root.findViewById(R.id.mesto_z9); TextView mestoZ11=root.findViewById(R.id.mesto_z11); switch(MainActivity.item){ case "vvt": lvl.setText(R.string.minus); //- srokO9.setText(R.string.srok_3_10); mestoO9.setText(R.string.com_osn_m25); break; case "ck": srokO11.setText(R.string.srok_2_10);//2 года 10 мес mestoO11.setText(R.string.budjet_m25); break; } return root; } }
[ "ikkisuruk@gmail.com" ]
ikkisuruk@gmail.com
632a7d4a6d82c0022bf0687452df45f214c8d67b
4a4605c97c2cce4a2b73ca4215974b63f55cd7ea
/app/src/main/java/com/xpf/android/andfixdemo/MyApplication.java
a605d1f6422014899873bd007c7add777f5b7cfb
[]
no_license
xinpengfei520/AndFixDemo
0bff9c2a5ab3fb24c50756924dba6c41e154c317
6af0f8862a2d9c9b34c57be35c62b0a10227c8a6
refs/heads/master
2020-06-11T01:33:54.659714
2019-06-27T07:53:04
2019-06-27T07:53:04
193,816,679
0
0
null
null
null
null
UTF-8
Java
false
false
1,463
java
package com.xpf.android.andfixdemo; import android.app.Application; import android.os.Environment; import android.util.Log; import com.alipay.euler.andfix.patch.PatchManager; import com.xpf.android.andfixdemo.utils.AppUtils; import java.io.IOException; /** * Created by x-sir on 2019-06-25 :) * Function: */ public class MyApplication extends Application { private static final String TAG = "MyApplication"; private static final String APATCH_PATH = "/fix.apatch"; private static PatchManager mPatchManager; @Override public void onCreate() { super.onCreate(); initAndFix(); } private void initAndFix() { mPatchManager = new PatchManager(this); // current app version mPatchManager.init(AppUtils.getVersionName(this)); // Load patch mPatchManager.loadPatch(); try { String patchFileStringPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getPath() + APATCH_PATH; // /storage/emulated/0/fix.apatch Log.i(TAG, "patchFileStringPath:" + patchFileStringPath); // path of the patch file that was downloaded mPatchManager.addPatch(patchFileStringPath); } catch (IOException e) { e.printStackTrace(); Log.e(TAG, "error:" + e.getMessage()); } } public PatchManager getPatchManager() { return mPatchManager; } }
[ "542270559@qq.com" ]
542270559@qq.com
f2370b6c7d262d7e20eeca56be57fbce15c4ad90
4dbbf63c1937a523890390c5ee34e81589f78e5e
/bus-office/src/main/java/org/aoju/bus/office/bridge/LocalOfficeContextAware.java
48065f7f895f09876e490b57ba8f73cc07fc26a7
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
q040407/bus
9b0970b829264899857a5035396ddbb1052e0aac
f10136c6ea472e8886355a76caa331cb607d59ef
refs/heads/master
2022-04-23T10:10:50.686780
2020-04-14T06:43:17
2020-04-14T06:43:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,792
java
/********************************************************************************* * * * The MIT License * * * * Copyright (c) 2015-2020 aoju.org and other contributors. * * * * Permission is hereby granted, free of charge, to any person obtaining a copy * * of this software and associated documentation files (the "Software"), to deal * * in the Software without restriction, including without limitation the rights * * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * * copies of the Software, and to permit persons to whom the Software is * * furnished to do so, subject to the following conditions: * * * * The above copyright notice and this permission notice shall be included in * * all copies or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * * THE SOFTWARE. * ********************************************************************************/ package org.aoju.bus.office.bridge; import com.sun.star.frame.XComponentLoader; import com.sun.star.frame.XDesktop; import com.sun.star.uno.XComponentContext; import org.aoju.bus.office.Context; /** * 表示用于本地转换的office上下文 * * @author Kimi Liu * @version 5.8.6 * @since JDK 1.8+ */ public interface LocalOfficeContextAware extends Context { /** * 获取此上下文的office组件加载程序. * * @return 组件加载程序. */ XComponentLoader getComponentLoader(); /** * 获取此上下文的office组件上下文. * * @return 组件的上下文. */ XComponentContext getComponentContext(); /** * 获取此上下文的office桌面. * * @return 桌面. */ XDesktop getDesktop(); }
[ "839536@qq.com" ]
839536@qq.com
c702b68477e553eb2b0c114af29b3d49db26d67c
005267e4fb5e86467607cd6b5462ad0d76bfb855
/hello/src/hello/StudentScore.java
b414b8de8d9b2dee07d3217921da73e60b58e8a9
[]
no_license
wecloud2008/javaquickstart
c61162e3318fbef22bef14411f8ef8f92e2af98d
a3db84e2272648344ce92261263a039fb62fdcf2
refs/heads/master
2020-04-02T08:54:45.000626
2020-03-23T02:02:08
2020-03-23T02:02:08
154,267,128
0
0
null
null
null
null
GB18030
Java
false
false
486
java
package hello; import java.util.Scanner; public class StudentScore { public static void main(String[] args) { // TODO Auto-generated method stub final int PASS=60; Scanner in = new Scanner(System.in); int score = in.nextInt(); System.out.println("你输入的成绩是"+score); if(score<PASS) System.out.println("很遗憾,这个成绩没有及格"); else { System.out.println("祝贺你,这个成绩及格了"); System.out.println("再见"); } } }
[ "root@qq.com" ]
root@qq.com
bc506b4b58a9bd6344669481f8c287dcb2571a33
a4e2fcf2da52f479c2c25164599bbdb2628a1ffa
/soft/sextante_lib/algorithms/src/es/unex/sextante/imageAnalysis/texture/features/TextureASMAlgorithm.java
8cce83104cd5bdfc888bfdc2fcb155e057649f94
[]
no_license
GRSEB9S/sextante
126ffc222a2bed9918bae3b59f87f30158b9bbfe
8ea12c6c40712df01e2e87b02d722d51adb912ea
refs/heads/master
2021-05-28T19:24:23.306514
2013-03-04T15:21:30
2013-03-04T15:21:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
744
java
package es.unex.sextante.imageAnalysis.texture.features; import es.unex.sextante.core.Sextante; import es.unex.sextante.imageAnalysis.texture.base.BaseTextureAnalysisAlgorithm; public class TextureASMAlgorithm extends BaseTextureAnalysisAlgorithm { @Override public void defineCharacteristics() { super.defineCharacteristics(); this.setName(Sextante.getText("Texture_ASM")); } @Override protected double getTextureFeature() { double dASM = 0; for (int i = 0; i < GRAYSCALE_LEVELS; i++) { for (int j = 0; j < GRAYSCALE_LEVELS; j++) { dASM += (m_GLCM[i][j] * m_GLCM[i][j]); } } return dASM; } }
[ "volayaf@gmail.com" ]
volayaf@gmail.com
61e9499a92c92ee3ccfa39b426a87ac2bac935bc
a9982d313c9a342d9b7aee0e2f157f682518b0d3
/src/mc/alk/arena/util/ExpUtil.java
c9ae1bdb6088cffda858a20b5aa1c8137c01b072
[]
no_license
Fronix/BattleArena
89555d445799cf71e1bcf8e56cca04b6563b6977
eb82876e0c35141e1a979ec95504c54d090a7d8d
refs/heads/master
2021-01-18T09:42:17.794429
2012-11-02T21:25:11
2012-11-02T21:25:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,655
java
package mc.alk.arena.util; import org.bukkit.entity.Player; /** * @author alkarin * version: 1.4 * * This class is strictly used because Bukkit DOES NOT UPDATE experience after enchanting * so using player.getTotalExperience() returns an INCORRECT amount * * Levels based off of 1.3 exp formulas verified by myself. * Formulas used. * lvl <= 15 : 17*lvl; * 15 < lvl < 31 : 17*l + 3*(0.5*l2*(l2+1)), and 17 + 3*l2, where l2 = (l - 16) * lvl > 30 : 17*l + 3*(0.5*l2*(l2+1))+4*(0.5*l3*(l3+1)) and * 17+inc, 17 + 3*l2 +4*l3, where l2 = (l-16) and l3=(l-31) * * The forms you see in the functions are simplifications of the above */ public class ExpUtil { /** * Get the total amount of experience that a player has * @param p * @return */ public static int getTotalExperience(Player p){ return getTotalExperience(p.getLevel(),p.getExp()); } /** * Get the total amount of experience to a level with a fractional exp bar * @param level * @param bar * @return */ public static int getTotalExperience(int level, double bar){ return getTotalExpToLevel(level) + (int) (getExpToLevel(level+1)*bar); } /** * Get the total amount of experience needed to get to level * @param level * @return */ public static int getTotalExpToLevel(int level){ if (level < 16){ return 17*level; } else if (level < 31){ return (int) (1.5*level*level -29.5*level+360 ); } else { return (int) (3.5*level*level-151.5*level+2220); } } /** * Get the amount of experience needed to go from level -1 to level * @param level * @return */ public static int getExpToLevel(int level) { if (level < 16){ return 17; } else if (level < 31){ return 3*level - 31; } else { return 7*level - 155; } } /** * Set the total amount of experience for a player * @param player * @param exp */ public static void setTotalExperience(Player player, int exp){ player.setTotalExperience(0); player.setLevel(0); player.setExp(0); if (exp > 0) player.giveExp(exp); } /** * Set the level of a player * @param player * @param level */ public static void setLevel(Player player, int level){ player.setTotalExperience(0); player.setLevel(0); player.setExp(0); if (level > 0) player.giveExp(getExpToLevel(level)); } /** * Give experience to a player * @param player * @param exp */ public static void giveExperience(Player player, int exp){ final int currentExp = getTotalExperience(player); player.setTotalExperience(0); player.setLevel(0); player.setExp(0); final int newexp = currentExp + exp; if (newexp > 0) player.giveExp(newexp); } }
[ "alkarin.v@gmail.com" ]
alkarin.v@gmail.com
0ee5ec9b237a1cf039aff7b2da8505a787062e9e
09d0ddd512472a10bab82c912b66cbb13113fcbf
/TestApplications/TF-BETA-THERMATK-v5.7.1/DecompiledCode/Fernflower/src/main/java/org/telegram/ui/_$$Lambda$ChannelAdminLogActivity$qxESsL3_0yZHIVgE4y2ybeWozac.java
bc83b184683eb20d9928fec16fd49de482893eab
[]
no_license
sgros/activity_flow_plugin
bde2de3745d95e8097c053795c9e990c829a88f4
9e59f8b3adacf078946990db9c58f4965a5ccb48
refs/heads/master
2020-06-19T02:39:13.865609
2019-07-08T20:17:28
2019-07-08T20:17:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
580
java
package org.telegram.ui; import android.view.View; import android.view.View.OnClickListener; // $FF: synthetic class public final class _$$Lambda$ChannelAdminLogActivity$qxESsL3_0yZHIVgE4y2ybeWozac implements OnClickListener { // $FF: synthetic field private final ChannelAdminLogActivity f$0; // $FF: synthetic method public _$$Lambda$ChannelAdminLogActivity$qxESsL3_0yZHIVgE4y2ybeWozac(ChannelAdminLogActivity var1) { this.f$0 = var1; } public final void onClick(View var1) { this.f$0.lambda$createView$10$ChannelAdminLogActivity(var1); } }
[ "crash@home.home.hr" ]
crash@home.home.hr
d64b64f973ab3320a77f37a6f12834354d31ef46
9058631379df783219e76467a8ec7c415a20f6b8
/src/main/java/com/manyTomany/api/repository/CustomerRepository.java
66b55b99d3b2790d526a7129f4d5e90bac223c79
[]
no_license
CodeAndCollaborait/Springboot_ManyToMany
009f5961cd28faa428562650bf2ef743e245c24c
20839fe5d6d26a54c1fb69625cb073198fe0f6e7
refs/heads/master
2022-11-11T02:06:04.198966
2020-06-29T18:46:41
2020-06-29T18:46:41
275,898,666
0
0
null
null
null
null
UTF-8
Java
false
false
293
java
package com.manyTomany.api.repository; import com.manyTomany.api.model.Customer; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository public interface CustomerRepository extends JpaRepository<Customer, Long> { }
[ "meetmmpatel@gmail.com" ]
meetmmpatel@gmail.com
1cc2b38ed427dc3f7767df021e03365ac0f35a8d
36073e09d6a12a275cc85901317159e7fffa909e
/mockito_mockito/modifiedFiles/4/fix/RegisteredInvocations.java
5740a7c5ee8a26de25a40fe8f6209b0d1385a401
[]
no_license
monperrus/bug-fixes-saner16
a867810451ddf45e2aaea7734d6d0c25db12904f
9ce6e057763db3ed048561e954f7aedec43d4f1a
refs/heads/master
2020-03-28T16:00:18.017068
2018-11-14T13:48:57
2018-11-14T13:48:57
148,648,848
3
0
null
null
null
null
UTF-8
Java
false
false
1,064
java
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.verification; import java.util.Collections; import java.util.LinkedList; import java.util.List; import org.mockito.internal.invocation.Invocation; import org.mockito.internal.util.ListUtil; import org.mockito.internal.util.ListUtil.Filter; public class RegisteredInvocations { private final List<Invocation> invocations = Collections.synchronizedList(new LinkedList<Invocation>()); public void add(Invocation invocation) { invocations.add(invocation); } public void removeLast() { invocations.remove(invocations.size()-1); } public List<Invocation> getAll() { return ListUtil.filter(new LinkedList<Invocation>(invocations), new RemoveToString()); } private static class RemoveToString implements Filter<Invocation> { public boolean isOut(Invocation invocation) { return Invocation.isToString(invocation); } } }
[ "martin.monperrus@gnieh.org" ]
martin.monperrus@gnieh.org
b8d2b35a7103ab29c000bc752c513693ff48886d
a17d87adc42abcb08b7aeb8201940084ae4458f0
/limber-core/src/main/java/no/kantega/lab/limber/kernel/container/CreatorInstanceKey.java
b7e0f647b0c0b79438e05f6056d6b64b0ccd245d
[]
no_license
raphw/limber
177c37bf6636f55b071f3d67ce6d2e1ad4d32540
95e77613cb638e5ae6b01bc92851b140d4d99284
refs/heads/master
2023-08-29T01:44:56.977969
2013-07-30T09:44:01
2013-07-30T09:44:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,121
java
package no.kantega.lab.limber.kernel.container; import no.kantega.lab.limber.kernel.AbstractRenderable; import no.kantega.lab.limber.kernel.creator.IInstanceCreationMapper; import no.kantega.lab.limber.kernel.request.IRequestMapping; import javax.annotation.Nonnull; import java.util.UUID; class CreatorInstanceKey extends InstanceKey { private final IInstanceCreationMapper instanceCreationMapper; private final IRequestMapping requestMapping; CreatorInstanceKey(@Nonnull IInstanceCreationMapper instanceCreationMapper, @Nonnull IRequestMapping requestMapping, @Nonnull String sessionId, @Nonnull Class<? extends AbstractRenderable> renderableClass, UUID versionNumber) { super(sessionId, renderableClass, versionNumber); this.instanceCreationMapper = instanceCreationMapper; this.requestMapping = requestMapping; } @Nonnull IInstanceCreationMapper getInstanceCreationMapper() { return instanceCreationMapper; } @Nonnull IRequestMapping getRequestMapping() { return requestMapping; } }
[ "rafael.wth@web.de" ]
rafael.wth@web.de
9dc00ded89f167c740b066e4d0cce74282ca3129
cb2e0b45e47ebeb518f1c8d7d12dfa0680aed01c
/openbanking-api-soap-transform/src/main/gen/com/laegler/openbanking/soap/model/ServicingAccessChannel2.java
33fa29b70eef0d63d87999a9f8cba1e4d6f24cd5
[ "MIT" ]
permissive
thlaegler/openbanking
4909cc9e580210267874c231a79979c7c6ec64d8
924a29ac8c0638622fba7a5674c21c803d6dc5a9
refs/heads/develop
2022-12-23T15:50:28.827916
2019-10-30T09:11:26
2019-10-31T05:43:04
213,506,933
1
0
MIT
2022-11-16T11:55:44
2019-10-07T23:39:49
HTML
UTF-8
Java
false
false
1,982
java
package com.laegler.openbanking.soap.model; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for ServicingAccessChannel2. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="ServicingAccessChannel2"&gt; * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"&gt; * &lt;enumeration value="ATM"/&gt; * &lt;enumeration value="Branch"/&gt; * &lt;enumeration value="CallCentre"/&gt; * &lt;enumeration value="Post"/&gt; * &lt;enumeration value="MobileBankingApp"/&gt; * &lt;enumeration value="Online"/&gt; * &lt;enumeration value="PostOffice"/&gt; * &lt;enumeration value="RelationshipManager"/&gt; * &lt;enumeration value="Text"/&gt; * &lt;/restriction&gt; * &lt;/simpleType&gt; * </pre> * */ @XmlType(name = "ServicingAccessChannel2") @XmlEnum public enum ServicingAccessChannel2 { ATM("ATM"), @XmlEnumValue("Branch") BRANCH("Branch"), @XmlEnumValue("CallCentre") CALL_CENTRE("CallCentre"), @XmlEnumValue("Post") POST("Post"), @XmlEnumValue("MobileBankingApp") MOBILE_BANKING_APP("MobileBankingApp"), @XmlEnumValue("Online") ONLINE("Online"), @XmlEnumValue("PostOffice") POST_OFFICE("PostOffice"), @XmlEnumValue("RelationshipManager") RELATIONSHIP_MANAGER("RelationshipManager"), @XmlEnumValue("Text") TEXT("Text"); private final String value; ServicingAccessChannel2(String v) { value = v; } public String value() { return value; } public static ServicingAccessChannel2 fromValue(String v) { for (ServicingAccessChannel2 c: ServicingAccessChannel2 .values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
[ "thomas.laegler@googlemail.com" ]
thomas.laegler@googlemail.com
d7ff213e88697241af8c865190f34b4a45c34fc2
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/8_gfarcegestionfa-fr.unice.gfarce.interGraph.ModifierFormationAction-0.5-1/fr/unice/gfarce/interGraph/ModifierFormationAction_ESTest_scaffolding.java
99a7e0241913f690e395b0bf7192c264cbcdfc85
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
556
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Oct 29 08:12:09 GMT 2019 */ package fr.unice.gfarce.interGraph; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class ModifierFormationAction_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
aeae712f7dbd626f74c5e1a8d83db2e953a8c654
df7bcbdbbe91a7a2390a5bff1ab28a252d4f0295
/src/test/java/jp/saka1029/csp/test/TestCSP.java
1ed8e8c2ace3a22dc363db90c736ef70ff705026
[]
no_license
saka1029/JavaCSP
fd38e86ca494355930ae517ed9bf061ecb0f1307
59c00de21314901d70fb4f8002cdff303cf18771
refs/heads/master
2022-08-02T15:24:22.860583
2020-05-26T11:37:38
2020-05-26T11:37:38
259,027,396
0
0
null
null
null
null
UTF-8
Java
false
false
1,554
java
package jp.saka1029.csp.test; import static org.junit.jupiter.api.Assertions.*; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.junit.jupiter.api.Test; import jp.saka1029.csp.Constraint; import jp.saka1029.csp.Domain; import jp.saka1029.csp.Problem; import jp.saka1029.csp.Solver; import jp.saka1029.csp.Variable; class TestCSP { @Test void testAll() { Problem problem = new Problem(); Domain domain = Domain.of(1, 2, 3); Variable A = problem.variable("A", domain); Variable B = problem.variable("B", domain); Variable C = problem.variable("C", domain); Constraint X = problem.constraint(a -> a[0] + a[1] == a[2], A, B, C); Constraint Y = problem.constraint(a -> a[0] < a[1], A, B); Solver solver = new Solver(); Set<Map<Variable, Integer>> actualResult = new HashSet<>(); solver.solve(problem, r -> System.out.println(r)); solver.solve(problem, r -> actualResult.add(Map.copyOf(r))); assertEquals("[1, 2, 3]", domain.toString()); assertEquals(A, problem.variable("A")); assertEquals("A", A.name); assertEquals("A", A.toString()); assertEquals("制約[A, B, C]", X.toString()); Set<Map<Variable, Integer>> expectedResult = Set.of( Map.of(A, 1, B, 2, C, 3)); assertEquals(expectedResult, actualResult); try { problem.variable("A", Domain.of(0)); fail(); } catch (IllegalArgumentException e) { } } }
[ "saka1029@gmail.com" ]
saka1029@gmail.com
946dd8880f86ea1bb80b5e5b85b3483d47e39173
795d1de4f536d35cff09f22ac14ef2069a66ba21
/src/main/java/org/spring/boot/annotation/initdestroy/ConsoleWriter.java
7285a4847099659e51865ca207204c19b06cb834
[]
no_license
rzuniga64/springboot
49171d325927d792c94c20bcb3d1e2d66517596d
daa058c0e11f9160235105a20f60772ceb03b6f1
refs/heads/master
2020-12-30T15:30:32.115650
2017-05-13T06:32:49
2017-05-13T06:32:49
91,153,166
0
0
null
null
null
null
UTF-8
Java
false
false
289
java
package org.spring.boot.annotation.initdestroy; /** * ConsoleWriter Class. */ public class ConsoleWriter implements LogWriter { /** * Write to the console. * @param text text */ public void write(final String text) { System.out.println(text); } }
[ "rzuniga64@gmail.com" ]
rzuniga64@gmail.com
c5e79273e24ddc1e62bcb6f549505c9e3686b3fe
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/32/32_ef1300ec4df5b9223cf12c13c36573a37d7238f8/ConnectorConfiguration/32_ef1300ec4df5b9223cf12c13c36573a37d7238f8_ConnectorConfiguration_s.java
c947fdd4caf885f0dffbc32b2ae973dd2cea76f6
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,683
java
package com.camunda.fox.cycle.entity; import java.util.HashMap; import java.util.Map; import javax.persistence.CollectionTable; import javax.persistence.Column; import javax.persistence.ElementCollection; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.MapKeyColumn; import javax.persistence.Table; import com.camunda.fox.cycle.connector.ConnectorLoginMode; @Entity @Table(name = "cy_connector_config") public class ConnectorConfiguration extends AbstractEntity { private static final long serialVersionUID = 1L; @Column private String globalUser; @Column private String globalPassword; /** * Name of the configuration */ @Column private String name; /** * Name of the backing connector (e.g. VFS connector) */ @Column private String connectorName; /** * Class name of the backing connector (e.g. some.package.VFSConnector) */ @Column private String connectorClass; @Enumerated(EnumType.STRING) private ConnectorLoginMode loginMode; @ElementCollection(fetch=FetchType.EAGER) @MapKeyColumn(name = "name") @Column(name = "value") @CollectionTable(name = "cy_connector_attributes", joinColumns = @JoinColumn(name = "configuration_id")) private Map<String, String> properties = new HashMap<String, String>(); public String getGlobalUser() { return globalUser; } public void setGlobalUser(String globalUser) { this.globalUser = globalUser; } public String getGlobalPassword() { return globalPassword; } public void setGlobalPassword(String globalPassword) { this.globalPassword = globalPassword; } public String getConnectorClass() { return connectorClass; } public void setConnectorClass(String connectorClass) { this.connectorClass = connectorClass; } public Map<String, String> getProperties() { return properties; } public void setProperties(Map<String, String> properties) { this.properties = properties; } public String getName() { return name; } public void setName(String name) { this.name = name; } public ConnectorLoginMode getLoginMode() { return loginMode; } public void setLoginMode(ConnectorLoginMode loginMode) { this.loginMode = loginMode; } public void setConnectorName(String connectorName) { this.connectorName = connectorName; } public String getConnectorName() { return connectorName; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
631ce23c995b97d3619cae2cbf8ab8b1379e7d4f
dee13699fb392c3f1ad8d7c07682df0b3c71db96
/src/gui/Configuration.java
ee233291d40c04b29f1081a98a972bc85bef37bf
[]
no_license
uday246/Oct18
6e251d2949815b158b22acd2ca16d8501f9fa4d5
7c6b6d635d6bd2e6a3c7f3434e9a94d9b89a4b9a
refs/heads/master
2020-08-15T07:39:34.550052
2019-10-15T13:13:10
2019-10-15T13:13:10
215,302,334
0
0
null
null
null
null
UTF-8
Java
false
false
322
java
package gui; public class Configuration { private int score; private String config; public Configuration(int aScore, String aConfig) { super(); score = aScore; config = aConfig; } public int getScore() { return score; } public String getStringConfiguration() { return config; } }
[ "teegalaudaykumar@gmail.com" ]
teegalaudaykumar@gmail.com
7b82727ff1dc9a0f2439ec001de7e94ad404cb26
1aa461e803687f3b09534200deaafbbbd71f12bb
/ObjectOriented/src/com/jay/java/jdbc/testORM/TestMapStore.java
789a5d6d31fda703c55612f29fba6fbef8a5ef85
[]
no_license
heathjay/StudyJava
01d457c310ae53c30bec80dea26a03902aab9afb
b8c44954dea6507e1dbd8fd35db1480981973a0f
refs/heads/master
2020-08-01T23:24:37.140043
2020-04-28T21:14:52
2020-04-28T21:14:52
211,156,488
0
0
null
null
null
null
UTF-8
Java
false
false
3,174
java
package com.jay.java.jdbc.testORM; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 1. 使用map封装记录 * 2. 使用List<Map>储存多条记录 * 3. 使用Map<Map>再套一个map * @author jay * */ public class TestMapStore { public static void test01() { Connection conn = JDBCUtil.getMysqlConn(); PreparedStatement ps = null; ResultSet rs = null; Map<String,Object> row = new HashMap<String,Object>();//使用一个map封装一条记录 try { ps =conn.prepareStatement("select empname,salary,age from Emp where id>?"); ps.setObject(1, 0); rs = ps.executeQuery(); while(rs.next()) { row.put("empname", rs.getObject(1)); row.put("salary", rs.getObject(2)); row.put("age", rs.getObject(3)); } //链接关闭后仍然能保存信息 } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); }finally { JDBCUtil.close(rs, ps, conn); } for(String key : row.keySet()) { System.out.print(key + "--" + row.get(key)+"\t"); } } public static void test02() { Connection conn = JDBCUtil.getMysqlConn(); PreparedStatement ps = null; ResultSet rs = null; List<Map<String,Object>> list = new ArrayList<Map<String,Object>>(); try { ps =conn.prepareStatement("select empname,salary,age from Emp where id>?"); ps.setObject(1, 0); rs = ps.executeQuery(); while(rs.next()) { Map<String,Object> row = new HashMap<String,Object>(); row.put("empname", rs.getObject(1)); row.put("salary", rs.getObject(2)); row.put("age", rs.getObject(3)); list.add(row); } //链接关闭后仍然能保存信息 } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); }finally { JDBCUtil.close(rs, ps, conn); } for(Map<String,Object> row :list) { for(String key : row.keySet()) { System.out.print(key + "--" + row.get(key)+"\t"); } System.out.println(); } } public static void test03() { Connection conn = JDBCUtil.getMysqlConn(); PreparedStatement ps = null; ResultSet rs = null; Map<String, Map<String,Object>> map = new HashMap<String,Map<String,Object>>(); try { ps =conn.prepareStatement("select empname,salary,age from Emp where id>?"); ps.setObject(1, 0); rs = ps.executeQuery(); while(rs.next()) { Map<String,Object> row = new HashMap<String,Object>(); row.put("empname", rs.getObject(1)); row.put("salary", rs.getObject(2)); row.put("age", rs.getObject(3)); map.put((String) rs.getObject(1), row); } //链接关闭后仍然能保存信息 } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); }finally { JDBCUtil.close(rs, ps, conn); } for(String empname: map.keySet()) { for(String key : map.get(empname).keySet()) { System.out.print(key + "--" + map.get(empname).get(key)+"\t"); } System.out.println(); } } public static void main(String[] args) { } }
[ "jpmzy@163.com" ]
jpmzy@163.com
bd06dfb926abdb356bc019424fa3221cd70a4d90
0727e69617e2c9adc743bedba90973d367ee9215
/ec-manager/src/com/sunmw/web/bean/dataInterface/impl/ErpInterfaceServicesImpl.java
ea561ad8e3800a096793e7d7b5e2384c6e80ae81
[]
no_license
jasperred/ec
d9e71009a69c73579791a48ea983019a6034507d
f72bf3f4ddc742eccddedb1a958044362dba23d3
refs/heads/master
2021-01-10T21:37:25.276458
2013-08-06T05:36:07
2013-08-06T05:36:07
8,854,766
0
1
null
null
null
null
UTF-8
Java
false
false
8,043
java
package com.sunmw.web.bean.dataInterface.impl; import java.io.File; import java.io.FileFilter; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.log4j.Logger; import com.sunmw.taobao.bean.product.TbItemServices; import com.sunmw.web.bean.dataInterface.ErpInterfaceServices; import com.sunmw.web.bean.product.ProductServices; import com.sunmw.web.bean.store.StoreServices; import com.sunmw.web.common.GetBeanServlet; import com.sunmw.web.dao.ReportServicesMapper; import com.sunmw.web.util.WebConfigProperties; import com.sunmw.web.util.WebUtil; public class ErpInterfaceServicesImpl implements ErpInterfaceServices { static Logger logger = Logger.getLogger(ErpInterfaceServicesImpl.class); @Override public Map dailySaleAndRefundReport(Map param) { Map result = new HashMap(); String date = WebUtil.formatDateString(new Date(System.currentTimeMillis()-24*60*60*1000), "yyyy-MM-dd"); ReportServicesMapper reportServicesMapper = (ReportServicesMapper) GetBeanServlet.getBean("reportServicesMapper"); List<Map> srList = reportServicesMapper.selectDailySaleAndRefundReportByExample(WebUtil.toMap("StoreId", param.get("StoreId"),"StartDate",date+" 00:00:00","EndDate",date+" 23:59:59")); String fileName = "EOD-"+param.get("StoreId")+"-"+WebUtil.formatDateString(new Date(System.currentTimeMillis()-24*60*60*1000), "yyyyMMdd")+".csv"; String path = (String) param.get("FilePath"); if(WebUtil.isNull(path)) path = WebConfigProperties.getProperties("report.sale.daily.path"); // 分不同公司路径 if (WebUtil.isNotNull(param.get("StoreId"))) { StoreServices storeServices = (StoreServices) GetBeanServlet .getBean("storeServices"); Map storeInfo = (Map) storeServices.storeInfo(param).get( "StoreInfo"); if (storeInfo != null && WebUtil.isNotNull(storeInfo.get("CompanyId"))) { path = path + storeInfo.get("CompanyId") + "/"; } } WebUtil.exportCSV(new String[]{"Sell Date","Order No","Item","Qty","Amount" }, new String[]{"orderDate","origOrderNo","skuCd","qty","amt"}, srList, path, fileName); result.put("Flag", "success"); return result; } @Override public Map refreshDailySaleAndRefundReport(Map param) { Map result = new HashMap(); result.put("Flag", "success"); String startDate = (String) param.get("startDate"); String endDate = (String) param.get("endDate"); if(WebUtil.isNull(startDate)) return result; if(WebUtil.isNull(endDate)) endDate = WebUtil.formatDateString(new Date(System.currentTimeMillis()), "yyyy-MM-dd"); ReportServicesMapper reportServicesMapper = (ReportServicesMapper) GetBeanServlet.getBean("reportServicesMapper"); String path = (String) param.get("FilePath"); if(WebUtil.isNull(path)) path = WebConfigProperties.getProperties("report.sale.daily.path"); // 分不同公司路径 if (WebUtil.isNotNull(param.get("StoreId"))) { StoreServices storeServices = (StoreServices) GetBeanServlet .getBean("storeServices"); Map storeInfo = (Map) storeServices.storeInfo(param).get( "StoreInfo"); if (storeInfo != null && WebUtil.isNotNull(storeInfo.get("CompanyId"))) { path = path + storeInfo.get("CompanyId") + "/"; } } while(endDate.compareToIgnoreCase(startDate)>0) { List<Map> srList = reportServicesMapper.selectDailySaleAndRefundReportByExample(WebUtil.toMap("StoreId", param.get("StoreId"),"StartDate",startDate+" 00:00:00","EndDate",startDate+" 23:59:59")); String fileName = "EOD-"+param.get("StoreId")+"-"+startDate.replaceAll("-", "")+".csv"; WebUtil.exportCSV(new String[]{"Sell Date","Order No","Item","Qty","Amount" }, new String[]{"orderDate","origOrderNo","skuCd","qty","amt"}, srList, path, fileName); startDate = WebUtil.formatDateString(new Date(WebUtil.toDateForString(startDate, "yyyy-MM-dd").getTime()+24*60*60*1000), "yyyy-MM-dd"); } return result; } @Override public Map importItemPrice(Map param) { long ctm = System.currentTimeMillis(); logger.info("接口【导入价格】开始执行"); Map result = new HashMap(); result.put("Flag", "success"); if (WebUtil.isNull(param.get("StoreId"))) { result.put("Flag", "error"); result.put("Message", "店铺ID没有传入"); return result; } String path = WebConfigProperties.getProperties("price.import.path"); if (WebUtil.isNotNull(param.get("FilePath"))) path = (String) param.get("FilePath"); String bakpath = WebConfigProperties .getProperties("price.bak.path"); if (WebUtil.isNotNull(param.get("BakFilePath"))) bakpath = (String) param.get("BakFilePath"); // 分不同公司路径 if (WebUtil.isNotNull(param.get("StoreId"))) { StoreServices storeServices = (StoreServices) GetBeanServlet .getBean("storeServices"); Map storeInfo = (Map) storeServices.storeInfo(param).get( "StoreInfo"); if (storeInfo != null && WebUtil.isNotNull(storeInfo.get("CompanyId"))) { path = path + storeInfo.get("CompanyId") + "/"; bakpath = bakpath + storeInfo.get("CompanyId") + "/"; } } //统一价格文件,不含店铺 File directory = new File(path); if (!directory.isDirectory()) { result.put("Flag", "error"); result.put("Message", "价格目录不存在"); return result; } File[] files = directory.listFiles(new FileFilter() { @Override public boolean accept(File pathname) { if (pathname.getName().endsWith(".csv")) return true; return false; } }); List<File> fileList = new ArrayList(); if(files!=null) { for(File f:files) { if(f!=null) fileList.add(f); } } //店铺价格文件 File directory2 = new File(path+param.get("StoreId")+"/"); if (directory2.isDirectory()) { File[] files2 = directory.listFiles(new FileFilter() { @Override public boolean accept(File pathname) { if (pathname.getName().endsWith(".csv")) return true; return false; } }); if(files2!=null) { for(File f:files2) { if(f!=null) fileList.add(f); } } } ProductServices productServices = (ProductServices) GetBeanServlet .getBean("productServices"); for (File file : files) { List<Map> l = WebUtil.readerCsv(file, true); if (WebUtil.isNullForList(l)) { logger.info(file.getName() + ":文件没有内容"); continue; } productServices.importItemPrice(WebUtil.toMap("StoreId", param.get("StoreId"),"PriceList",l)); // 备份文件 File bakFile = new File(bakpath + WebUtil.formatDateString(new Date(), "yyyyMMddHHmmss")+" "+file.getName()); File bakDir = new File(bakpath); try { if(!bakDir.exists()) bakDir.mkdirs(); WebUtil.fileCopy(file, bakFile); System.gc(); System.gc(); file.delete(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } logger.info("接口【导入价格】执行结束,耗时:" + (System.currentTimeMillis() - ctm)); return result; } @Override public Map syncItemFromTb(Map param) { long ctm = System.currentTimeMillis(); Map result = new HashMap(); logger.info("接口【从淘宝同步商品】开始执行"); Integer storeId = (Integer) param.get("StoreId"); if (storeId == null) { logger.error("店铺ID是空"); result.put("Flag", "error"); return result; } TbItemServices tbItemServices = (TbItemServices) GetBeanServlet .getBean("tbItemServices"); Map r = tbItemServices.getTbItemAll(storeId); ProductServices productServices = (ProductServices)GetBeanServlet.getBean("productServices"); productServices.synchronizationTbItemToErp(r); result.put("Flag", "success"); logger.info("接口【从淘宝同步商品】执行结束,耗时:" + (System.currentTimeMillis() - ctm)); return result; } }
[ "jasper.sun@gmail.com" ]
jasper.sun@gmail.com
8b71781513895d06121b5a271f11b665373664d2
895707bd4939454b5764fbd67626bb22fd46c0a3
/src/test/java/learningtest/org/springframework/util/PropertyPlaceholderHelperTests.java
44dfea34258b4778c3d598c8ce42aa82dce1ff48
[]
no_license
izeye/spring-boot-throwaway-branches
c5336680bda9f5d9c7e587e6f1b869d0ab93c435
ef881ecdaa61a0de9edd2b0c412de3853d63e0bb
refs/heads/master
2023-01-23T12:21:58.670926
2023-01-09T05:41:26
2023-01-09T05:41:26
42,772,457
8
4
null
null
null
null
UTF-8
Java
false
false
723
java
package learningtest.org.springframework.util; import org.springframework.util.PropertyPlaceholderHelper; import java.util.Properties; import org.junit.jupiter.api.Test; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.core.Is.is; /** * Created by izeye on 15. 12. 23.. */ class PropertyPlaceholderHelperTests { @Test void testReplacePlaceholders() { PropertyPlaceholderHelper propertyPlaceholderHelper = new PropertyPlaceholderHelper("{", "}"); Properties properties = new Properties(); properties.setProperty("name", "Johnny"); String result = propertyPlaceholderHelper.replacePlaceholders("Hello, {name}!", properties); assertThat(result, is("Hello, Johnny!")); } }
[ "izeye@naver.com" ]
izeye@naver.com
09452914e18d0ff4d389bb25014cb55a70ec254f
93f3578669fb0d0030a550316aebe0d7b4221631
/task-supplychain/src/main/java/glsx/com/cn/task/mapper/SalesSummarizingMaterialDetailMapper.java
c19bd618c116722318ebbad0489324811531dc1e
[]
no_license
shanghaif/supplychain
4d7de62809b6c88ac5080a85a77fc4bf3d856db8
c36c771b0304c5739de98bdfc322c0082a9e523d
refs/heads/master
2023-02-09T19:01:35.562699
2021-01-05T09:39:11
2021-01-05T09:39:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
654
java
package glsx.com.cn.task.mapper; import org.apache.ibatis.annotations.Mapper; import org.oreframework.datasource.mybatis.mapper.OreMapper; import glsx.com.cn.task.model.SalesSummarizingMaterialDetail; import java.util.List; @Mapper public interface SalesSummarizingMaterialDetailMapper extends OreMapper<SalesSummarizingMaterialDetail> { int add(SalesSummarizingMaterialDetail salesSummarizingMaterialDetail); List<SalesSummarizingMaterialDetail>getSalesSummarizingMaterialDetailList(SalesSummarizingMaterialDetail salesSummarizingMaterialDetail); int insertList(List<SalesSummarizingMaterialDetail> salesSummarizingMaterialDetails); }
[ "3064741443@qq.com" ]
3064741443@qq.com
8f1393890db780d0b028c8c6e46af34260f221ab
fc6c869ee0228497e41bf357e2803713cdaed63e
/weixin6519android1140/src/sourcecode/com/tencent/mm/protocal/c/ko.java
343213d956518ee094a96dd239b653dab2be6282
[]
no_license
hyb1234hi/reverse-wechat
cbd26658a667b0c498d2a26a403f93dbeb270b72
75d3fd35a2c8a0469dbb057cd16bca3b26c7e736
refs/heads/master
2020-09-26T10:12:47.484174
2017-11-16T06:54:20
2017-11-16T06:54:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,551
java
package com.tencent.mm.protocal.c; import b.a.a.b; import com.tencent.gmtrace.GMTrace; import java.util.LinkedList; public final class ko extends azh { public String jWt; public String ubp; public ko() { GMTrace.i(16870094667776L, 125692); GMTrace.o(16870094667776L, 125692); } protected final int a(int paramInt, Object... paramVarArgs) { GMTrace.i(16870228885504L, 125693); if (paramInt == 0) { paramVarArgs = (b.a.a.c.a)paramVarArgs[0]; if (this.uND == null) { throw new b("Not all required fields were included: BaseResponse"); } if (this.ubp == null) { throw new b("Not all required fields were included: retcode"); } if (this.uND != null) { paramVarArgs.fm(1, this.uND.aYq()); this.uND.a(paramVarArgs); } if (this.ubp != null) { paramVarArgs.e(2, this.ubp); } if (this.jWt != null) { paramVarArgs.e(3, this.jWt); } GMTrace.o(16870228885504L, 125693); return 0; } int i; if (paramInt == 1) { i = 0; if (this.uND != null) { i = b.a.a.a.fj(1, this.uND.aYq()) + 0; } paramInt = i; if (this.ubp != null) { paramInt = i + b.a.a.b.b.a.f(2, this.ubp); } i = paramInt; if (this.jWt != null) { i = paramInt + b.a.a.b.b.a.f(3, this.jWt); } GMTrace.o(16870228885504L, 125693); return i; } if (paramInt == 2) { paramVarArgs = new b.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler); for (paramInt = azh.a(paramVarArgs); paramInt > 0; paramInt = azh.a(paramVarArgs)) { if (!super.a(paramVarArgs, this, paramInt)) { paramVarArgs.csW(); } } if (this.uND == null) { throw new b("Not all required fields were included: BaseResponse"); } if (this.ubp == null) { throw new b("Not all required fields were included: retcode"); } GMTrace.o(16870228885504L, 125693); return 0; } if (paramInt == 3) { Object localObject1 = (b.a.a.a.a)paramVarArgs[0]; ko localko = (ko)paramVarArgs[1]; paramInt = ((Integer)paramVarArgs[2]).intValue(); switch (paramInt) { default: GMTrace.o(16870228885504L, 125693); return -1; case 1: paramVarArgs = ((b.a.a.a.a)localObject1).Gv(paramInt); i = paramVarArgs.size(); paramInt = 0; while (paramInt < i) { Object localObject2 = (byte[])paramVarArgs.get(paramInt); localObject1 = new es(); localObject2 = new b.a.a.a.a((byte[])localObject2, unknownTagHandler); for (boolean bool = true; bool; bool = ((es)localObject1).a((b.a.a.a.a)localObject2, (com.tencent.mm.bm.a)localObject1, azh.a((b.a.a.a.a)localObject2))) {} localko.uND = ((es)localObject1); paramInt += 1; } GMTrace.o(16870228885504L, 125693); return 0; case 2: localko.ubp = ((b.a.a.a.a)localObject1).yqV.readString(); GMTrace.o(16870228885504L, 125693); return 0; } localko.jWt = ((b.a.a.a.a)localObject1).yqV.readString(); GMTrace.o(16870228885504L, 125693); return 0; } GMTrace.o(16870228885504L, 125693); return -1; } } /* Location: D:\tools\apktool\weixin6519android1140\jar\classes3-dex2jar.jar!\com\tencent\mm\protocal\c\ko.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "robert0825@gmail.com" ]
robert0825@gmail.com
10dc668b8d1fe4acb4371ec373c01912d9d40b24
99e44fc1db97c67c7ae8bde1c76d4612636a2319
/app/src/main/java/com/android/gallery3d/filtershow/editors/BasicEditor.java
af694d8112e44125555aa011e9032aeb10ca28b4
[ "MIT" ]
permissive
wossoneri/AOSPGallery4AS
add7c34b2901e3650d9b8518a02dd5953ba48cef
0be2c89f87e3d5bd0071036fe89d0a1d0d9db6df
refs/heads/master
2022-03-21T04:42:57.965745
2022-02-23T08:44:51
2022-02-23T08:44:51
113,425,141
3
2
MIT
2022-02-23T08:44:52
2017-12-07T08:45:41
Java
UTF-8
Java
false
false
3,852
java
/* * Copyright (C) 2013 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.gallery3d.filtershow.editors; import android.content.Context; import com.android.gallery3d.R; import com.android.gallery3d.filtershow.controller.Control; import com.android.gallery3d.filtershow.controller.FilterView; import com.android.gallery3d.filtershow.controller.Parameter; import com.android.gallery3d.filtershow.controller.ParameterInteger; import com.android.gallery3d.filtershow.filters.FilterBasicRepresentation; import com.android.gallery3d.filtershow.filters.FilterRepresentation; /** * The basic editor that all the one parameter filters */ public class BasicEditor extends ParametricEditor implements ParameterInteger { public static int ID = R.id.basicEditor; private final String LOGTAG = "BasicEditor"; public BasicEditor() { super(ID, R.layout.filtershow_default_editor, R.id.basicEditor); } protected BasicEditor(int id) { super(id, R.layout.filtershow_default_editor, R.id.basicEditor); } protected BasicEditor(int id, int layoutID, int viewID) { super(id, layoutID, viewID); } @Override public void reflectCurrentFilter() { super.reflectCurrentFilter(); if (getLocalRepresentation() != null && getLocalRepresentation() instanceof FilterBasicRepresentation) { FilterBasicRepresentation interval = (FilterBasicRepresentation) getLocalRepresentation(); updateText(); } } private FilterBasicRepresentation getBasicRepresentation() { FilterRepresentation tmpRep = getLocalRepresentation(); if (tmpRep != null && tmpRep instanceof FilterBasicRepresentation) { return (FilterBasicRepresentation) tmpRep; } return null; } @Override public int getMaximum() { FilterBasicRepresentation rep = getBasicRepresentation(); if (rep == null) { return 0; } return rep.getMaximum(); } @Override public int getMinimum() { FilterBasicRepresentation rep = getBasicRepresentation(); if (rep == null) { return 0; } return rep.getMinimum(); } @Override public int getDefaultValue() { return 0; } @Override public int getValue() { FilterBasicRepresentation rep = getBasicRepresentation(); if (rep == null) { return 0; } return rep.getValue(); } @Override public String getValueString() { return null; } @Override public void setValue(int value) { FilterBasicRepresentation rep = getBasicRepresentation(); if (rep == null) { return; } rep.setValue(value); commitLocalRepresentation(); } @Override public String getParameterName() { FilterBasicRepresentation rep = getBasicRepresentation(); return mContext.getString(rep.getTextId()); } @Override public String getParameterType() { return sParameterType; } @Override public void setController(Control c) { } @Override public void setFilterView(FilterView editor) { } @Override public void copyFrom(Parameter src) { } }
[ "siyolatte@gmail.com" ]
siyolatte@gmail.com
99db9396f7f4e9ed08b058af506ee005d18b58d0
4312a71c36d8a233de2741f51a2a9d28443cd95b
/RawExperiments/DB/Math 3.2 RC4/AstorMain-Math 3.2 RC4/src/variant-304/org/apache/commons/math/analysis/solvers/BrentSolver.java
7bca0c16d29869ab02ac88346ee4bb8a35e85187
[]
no_license
SajjadZaidi/AutoRepair
5c7aa7a689747c143cafd267db64f1e365de4d98
e21eb9384197bae4d9b23af93df73b6e46bb749a
refs/heads/master
2021-05-07T00:07:06.345617
2017-12-02T18:48:14
2017-12-02T18:48:14
112,858,432
0
0
null
null
null
null
UTF-8
Java
false
false
6,670
java
package org.apache.commons.math.analysis.solvers; public class BrentSolver extends org.apache.commons.math.analysis.solvers.UnivariateRealSolverImpl { private static final java.lang.String NON_BRACKETING_MESSAGE = "function values at endpoints do not have different signs. " + "Endpoints: [{0}, {1}], Values: [{2}, {3}]"; private static final long serialVersionUID = 7694577816772532779L; @java.lang.Deprecated public BrentSolver(org.apache.commons.math.analysis.UnivariateRealFunction f) { super(f, 100, 1.0E-6); } public BrentSolver() { super(100, 1.0E-6); } @java.lang.Deprecated public double solve(double min, double max) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { return solve(f, min, max); } @java.lang.Deprecated public double solve(double min, double max, double initial) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { return solve(f, min, max, initial); } public double solve(final org.apache.commons.math.analysis.UnivariateRealFunction f, final double min, final double max, final double initial) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { clearResult(); verifySequence(min, initial, max); double yInitial = f.value(initial); if ((java.lang.Math.abs(yInitial)) <= (functionValueAccuracy)) { setResult(initial, 0); return result; } return java.lang.Float.NaN; double yMin = f.value(min); if ((java.lang.Math.abs(yMin)) <= (functionValueAccuracy)) { setResult(yMin, 0); return result; } if ((yInitial * yMin) < 0) { return solve(f, min, yMin, initial, yInitial, min, yMin); } double yMax = f.value(max); if ((java.lang.Math.abs(yMax)) <= (functionValueAccuracy)) { setResult(yMax, 0); return result; } if ((yInitial * yMax) < 0) { return solve(f, initial, yInitial, max, yMax, initial, yInitial); } return solve(f, min, yMin, max, yMax, initial, yInitial); } public double solve(final org.apache.commons.math.analysis.UnivariateRealFunction f, final double min, final double max) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { clearResult(); verifyInterval(min, max); double ret = java.lang.Double.NaN; double yMin = f.value(min); double yMax = f.value(max); double sign = yMin * yMax; if (sign > 0) { if ((java.lang.Math.abs(yMin)) <= (functionValueAccuracy)) { setResult(min, 0); ret = min; } else { if ((java.lang.Math.abs(yMax)) <= (functionValueAccuracy)) { setResult(max, 0); ret = max; } else { throw org.apache.commons.math.MathRuntimeException.createIllegalArgumentException(org.apache.commons.math.analysis.solvers.BrentSolver.NON_BRACKETING_MESSAGE, min, max, yMin, yMax); } } } else { if (sign < 0) { ret = solve(f, min, yMin, max, yMax, min, yMin); } else { if (yMin == 0.0) { ret = min; } else { ret = max; } } } return ret; } private double solve(final org.apache.commons.math.analysis.UnivariateRealFunction f, double x0, double y0, double x1, double y1, double x2, double y2) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { double delta = x1 - x0; double oldDelta = delta; int i = 0; while (i < (maximalIterationCount)) { if ((java.lang.Math.abs(y2)) < (java.lang.Math.abs(y1))) { x0 = x1; x1 = x2; x2 = x0; y0 = y1; y1 = y2; y2 = y0; } if ((java.lang.Math.abs(y1)) <= (functionValueAccuracy)) { setResult(x1, i); return result; } double dx = x2 - x1; double tolerance = java.lang.Math.max(((relativeAccuracy) * (java.lang.Math.abs(x1))), absoluteAccuracy); if ((java.lang.Math.abs(dx)) <= tolerance) { setResult(x1, i); return result; } if (((java.lang.Math.abs(oldDelta)) < tolerance) || ((java.lang.Math.abs(y0)) <= (java.lang.Math.abs(y1)))) { delta = 0.5 * dx; oldDelta = delta; } else { double r3 = y1 / y0; double p; double p1; if (x0 == x2) { p = dx * r3; p1 = 1.0 - r3; } else { double r1 = y0 / y2; double r2 = y1 / y2; p = r3 * (((dx * r1) * (r1 - r2)) - ((x1 - x0) * (r2 - 1.0))); p1 = ((r1 - 1.0) * (r2 - 1.0)) * (r3 - 1.0); } if (p > 0.0) { p1 = -p1; } else { p = -p; } if (((2.0 * p) >= (((1.5 * dx) * p1) - (java.lang.Math.abs((tolerance * p1))))) || (p >= (java.lang.Math.abs(((0.5 * oldDelta) * p1))))) { delta = 0.5 * dx; oldDelta = delta; } else { oldDelta = delta; delta = p / p1; } } x0 = x1; y0 = y1; if ((java.lang.Math.abs(delta)) > tolerance) { x1 = x1 + delta; } else { if (dx > 0.0) { x1 = x1 + (0.5 * tolerance); } else { if (dx <= 0.0) { x1 = x1 - (0.5 * tolerance); } } } y1 = f.value(x1); if ((y1 > 0) == (y2 > 0)) { x2 = x0; y2 = y0; delta = x1 - x0; oldDelta = delta; } i++; } throw new org.apache.commons.math.MaxIterationsExceededException(maximalIterationCount); } }
[ "sajjad.syed@ucalgary.ca" ]
sajjad.syed@ucalgary.ca
0b568dbe77d2a9f3a52ed4efc0626c2e329e654a
605c28cc4d7ffd35583f6aba8cc58c7068f237e2
/src/com/dxjr/utils/exception/AppException.java
d1b71bbb480439b2d0be44c21119309c50fbd54a
[]
no_license
Lwb6666/dxjr_portal
7ffb56c79f0bd07a39ac94f30b2280f7cc98a2e4
cceef6ee83d711988e9d1340f682e0782e392ba0
refs/heads/master
2023-04-21T07:38:25.528219
2021-05-10T02:47:22
2021-05-10T02:47:22
351,003,513
0
0
null
null
null
null
UTF-8
Java
false
false
2,887
java
package com.dxjr.utils.exception; /** * <p> * Description:系统运行时业务异常<br /> * </p> * * @title AppException.java * @package com.util.exception * @author justin.xu * @version 0.1 2014年5月8日 */ public class AppException extends Exception { private static final long serialVersionUID = -5914165266382469973L; protected Throwable myException; protected String errType; protected int errCode; protected String errMsg; protected String contextMsg; protected String cusMsg; protected String Msg; /** * <p> * Title: * </p> * <p> * Description: * </p> * * @param exception */ public AppException(Exception exception) { super(exception.getMessage()); errType = ""; errMsg = ""; contextMsg = ""; cusMsg = ""; Msg = ""; myException = exception; errMsg = exception.getMessage(); } public AppException(String s) { super(s); errType = ""; errMsg = ""; contextMsg = ""; cusMsg = ""; Msg = ""; errMsg = s; } public AppException(int i, String s, String s1) { super(s1); errType = ""; errMsg = ""; contextMsg = ""; cusMsg = ""; Msg = ""; errCode = i; errType = s; errMsg = s1; } public AppException(int i, String s, String s1, Throwable throwable) { super(throwable.getMessage()); errType = ""; errMsg = ""; contextMsg = ""; cusMsg = ""; Msg = ""; errCode = i; errType = s; errMsg = s1; myException = throwable; } public AppException(int i, String s, String s1, String s2, String s3, Throwable throwable) { super(throwable.getMessage()); errType = ""; errMsg = ""; contextMsg = ""; cusMsg = ""; Msg = ""; errMsg = s1; errType = s; contextMsg = s2; cusMsg = s3; myException = throwable; } public AppException(int i, String s, String s1, String s2, String s3) { super(s1); errType = ""; errMsg = ""; contextMsg = ""; cusMsg = ""; Msg = ""; errMsg = s1; errType = s; contextMsg = s2; cusMsg = s3; } public void printStackTrace() { if (myException != null) myException.printStackTrace(); } public String msgFormat() { StringBuffer stringbuffer = new StringBuffer(); stringbuffer.append(errType); stringbuffer.append(errCode); stringbuffer.append(contextMsg); stringbuffer.append(errMsg); stringbuffer.append(cusMsg); return stringbuffer.toString(); } public String getContextMsg() { return contextMsg; } public String getCusMsg() { return cusMsg; } public long getErrCode() { return (long) errCode; } public void setContextMsg(String s) { contextMsg = s; } public void setCusMsg(String s) { cusMsg = s; } public void setErrCode(int i) { errCode = i; } public String getErrMsg() { return errMsg; } public void setErrMsg(String s) { errMsg = s; } public String getErrType() { return errType; } public void setErrType(String s) { errType = s; } }
[ "1677406532@qq.com" ]
1677406532@qq.com
53841c0a92b4ee530d816b972abd5adcd8f9bb37
8b744d2e536ce3925c441c1fd4bc3c4b24f45dee
/commons-command/src/main/java/com/qfox/commons/command/SeparableCommand.java
c28e3443d7357bf5afbd22d185d238dd9ddd2829
[]
no_license
core-lib/commons
52bf9d9a7c3d89e165bc31406ef09aa02ae0e9a2
26576beec8007849af670c20ffa944994d9bda87
refs/heads/master
2021-05-04T11:22:26.271045
2015-12-27T02:31:29
2015-12-27T02:31:29
48,630,194
0
1
null
null
null
null
UTF-8
Java
false
false
659
java
package com.qfox.commons.command; /** * * * * @Description: 可拆分命令,约定 实现这个接口的命令 将任务拆分成多个子命令 本身的 execute 方法实现将子命令的结果汇总生成新的结果 * @author Change * @date 2013年12月26日 * * 修订记录<br/> * 姓名:Change<br/> * 时间:2013年12月26日<br/> * 内容:初始<br/> * */ public interface SeparableCommand<Result> extends Command<Result> { /** * 主命令准备 */ void prepare(); /** * 拆分成多个子命令 * * @return 子命令数组 */ Command<?>[] separate(); }
[ "646742615@qq.com" ]
646742615@qq.com