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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
821ce5db057593929e2a475ee8bd1b97f5603c78
|
35f60505133c66bd1782a89151ff6c03920b509c
|
/src/main/java/org/drip/learning/kernel/EigenFunctionRdToR1.java
|
3e899b84e512b2a62d5ce7d894f56a9601909699
|
[
"Apache-2.0"
] |
permissive
|
YasserKarim/DROP
|
28baba9993ebf3f4bc8a104d54f90cbbddb0d36e
|
b2bd4f22c500ea92676babe9915f3a6b507ea26a
|
refs/heads/master
| 2020-07-15T05:17:12.835806
| 2019-08-23T06:50:02
| 2019-08-23T06:50:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,279
|
java
|
package org.drip.learning.kernel;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/
/*!
* Copyright (C) 2019 Lakshmi Krishnamurthy
* Copyright (C) 2018 Lakshmi Krishnamurthy
* Copyright (C) 2017 Lakshmi Krishnamurthy
* Copyright (C) 2016 Lakshmi Krishnamurthy
* Copyright (C) 2015 Lakshmi Krishnamurthy
*
* This file is part of DROP, an open-source library targeting risk, transaction costs, exposure, margin
* calculations, and portfolio construction within and across fixed income, credit, commodity, equity,
* FX, and structured products.
*
* https://lakshmidrip.github.io/DROP/
*
* DROP is composed of three main modules:
*
* - DROP Analytics Core - https://lakshmidrip.github.io/DROP-Analytics-Core/
* - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/
* - DROP Numerical Core - https://lakshmidrip.github.io/DROP-Numerical-Core/
*
* DROP Analytics Core implements libraries for the following:
* - Fixed Income Analytics
* - Asset Backed Analytics
* - XVA Analytics
* - Exposure and Margin Analytics
*
* DROP Portfolio Core implements libraries for the following:
* - Asset Allocation Analytics
* - Transaction Cost Analytics
*
* DROP Numerical Core implements libraries for the following:
* - Statistical Learning Library
* - Numerical Optimizer Library
* - Machine Learning Library
* - Spline Builder Library
*
* Documentation for DROP is Spread Over:
*
* - Main => https://lakshmidrip.github.io/DROP/
* - Wiki => https://github.com/lakshmiDRIP/DROP/wiki
* - GitHub => https://github.com/lakshmiDRIP/DROP
* - Javadoc => https://lakshmidrip.github.io/DROP/Javadoc/index.html
* - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal
* - Release Versions => https://lakshmidrip.github.io/DROP/version.html
* - Community Credits => https://lakshmidrip.github.io/DROP/credits.html
* - Issues Catalog => https://github.com/lakshmiDRIP/DROP/issues
* - JUnit => https://lakshmidrip.github.io/DROP/junit/index.html
* - Jacoco => https://lakshmidrip.github.io/DROP/jacoco/index.html
*
* 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.
*/
/**
* <i>EigenFunctionRdToR1</i> holds the Eigen-vector Function and its corresponding Space of the
* R<sup>d</sup> To R<sup>1</sup> Kernel Linear Integral Operator defined by:
*
* T_k [f(.)] := Integral Over Input Space {k (., y) * f(y) * d[Prob(y)]}
*
* <br><br>
* The References are:
* <br><br>
* <ul>
* <li>
* Ash, R. (1965): <i>Information Theory</i> <b>Inter-science</b> New York
* </li>
* <li>
* Konig, H. (1986): <i>Eigenvalue Distribution of Compact Operators</i> <b>Birkhauser</b> Basel,
* Switzerland
* </li>
* <li>
* Smola, A. J., A. Elisseff, B. Scholkopf, and R. C. Williamson (2000): Entropy Numbers for Convex
* Combinations and mlps, in: <i>Advances in Large Margin Classifiers, A. Smola, P. Bartlett, B.
* Scholkopf, and D. Schuurmans - editors</i> <b>MIT Press</b> Cambridge, MA
* </li>
* </ul>
*
* <br><br>
* <ul>
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/NumericalCore.md">Numerical Core Module</a></li>
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/StatisticalLearningLibrary.md">Statistical Learning</a></li>
* <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/learning">Learning</a></li>
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/learning/kernel">Kernel</a></li>
* </ul>
*
* @author Lakshmi Krishnamurthy
*/
public abstract class EigenFunctionRdToR1 extends org.drip.spaces.rxtor1.NormedRdToNormedR1 {
private double _dblAgnosticUpperBound = java.lang.Double.NaN;
protected EigenFunctionRdToR1 (
final org.drip.spaces.metric.RdNormed rdContinuousInput,
final org.drip.spaces.metric.R1Normed r1ContinuousOutput,
final org.drip.function.definition.RdToR1 funcRdToR1,
final double dblAgnosticUpperBound)
throws java.lang.Exception
{
super (rdContinuousInput, r1ContinuousOutput, funcRdToR1);
if (!org.drip.numerical.common.NumberUtil.IsValid (_dblAgnosticUpperBound = dblAgnosticUpperBound))
throw new java.lang.Exception ("EigenFunctionRdToR1 ctr: Invalid Inputs");
}
/**
* Retrieve the Agnostic Upper Bound of the Eigen-Function
*
* @return The Agnostic Upper Bound of the Eigen-Function
*/
public double agnosticUpperBound()
{
return _dblAgnosticUpperBound;
}
}
|
[
"lakshmimv7977@gmail.com"
] |
lakshmimv7977@gmail.com
|
386c8795d6f57525db9e112e08985e42155410e6
|
cb9756a5857c5aed806bf93b7aa8770b5e4bf4ff
|
/src/main/java/com/mlsc/waste/enterprise/dao/impl/EnterpriseDaoImpl.java
|
7bfd934e523b3b04a96c4ca4e72ef7ff1c340f24
|
[] |
no_license
|
SUZHOUTEAM/swp
|
f28b2dc192a2258c1f96c6492bf20bbf5ea18fae
|
d5b62d2748b660e65f9ff834b2359453cd664eb2
|
refs/heads/master
| 2020-03-28T15:38:21.455615
| 2018-09-13T08:22:42
| 2018-09-13T08:22:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,821
|
java
|
package com.mlsc.waste.enterprise.dao.impl;
import com.mlsc.epdp.common.exception.DaoAccessException;
import com.mlsc.waste.enterprise.dao.EnterpriseDao;
import com.mlsc.waste.enterprise.model.RPCSysEnterpriseBaseVo;
import com.mlsc.waste.utils.CodeTypeConstant;
import com.mlsc.waste.wastecircle.model.EnterpriseVo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.stereotype.Repository;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author sunjl
*
*/
@Repository
public class EnterpriseDaoImpl implements EnterpriseDao {
@Autowired
private NamedParameterJdbcTemplate namedjdbctemp;
@Override
public RPCSysEnterpriseBaseVo getCantonNameByEnterpriseId(String enterpriseId) throws DaoAccessException {
Map<String, Object> map = new HashMap<String, Object>();
StringBuffer querySql = new StringBuffer("select CantonName");
querySql.append(" from sys_canton");
querySql.append(" LEFT JOIN sys_enterprise_base");
querySql.append(" on sys_canton.CantonCode = left(sys_enterprise_base.CantonCode,2)");
querySql.append(" where sys_enterprise_base.entId = '" + enterpriseId + "'");
querySql.append(" and sys_canton.IsEndNode = '0'");
List<RPCSysEnterpriseBaseVo> resultList = namedjdbctemp.query(querySql.toString(), map, new BeanPropertyRowMapper<RPCSysEnterpriseBaseVo>(RPCSysEnterpriseBaseVo.class));
if (resultList != null && resultList.size() > 0) {
return resultList.get(0);
} else {
return null;
}
}
@Override
public RPCSysEnterpriseBaseVo getDistrictByEnterpriseId(String enterpriseId) throws DaoAccessException {
Map<String, Object> map = new HashMap<String, Object>();
StringBuffer querySql = new StringBuffer("select CantonName");
querySql.append(" from sys_canton");
querySql.append(" LEFT JOIN sys_enterprise_base");
querySql.append(" on sys_canton.CantonCode = sys_enterprise_base.CantonCode ");
querySql.append(" where sys_enterprise_base.entId = '" + enterpriseId + "'");
List<RPCSysEnterpriseBaseVo> resultList = namedjdbctemp.query(querySql.toString(), map, new BeanPropertyRowMapper<RPCSysEnterpriseBaseVo>(RPCSysEnterpriseBaseVo.class));
if (resultList != null && resultList.size() > 0) {
return resultList.get(0);
} else {
return null;
}
}
@Override
public List<EnterpriseVo> getEnterpriseVosByName(String enterpriseName,String enterpriseType) {
Map<String, Object> map = new HashMap<String, Object>();
StringBuffer sqlWhere = new StringBuffer();
sqlWhere.append("SELECT e.entId,e.entName,e.entAddress, ");
sqlWhere.append(" u.business_code as businessCode,u.file_id as fileId, ");
sqlWhere.append(" entType.code as entTypeCode,entType.value as entTypeValue ");
sqlWhere.append(" from sys_enterprise_base e ");
sqlWhere.append(" left JOIN waste_enterprise_type enterpriseType on enterpriseType.enterprise_id=e.entId ");
sqlWhere.append(" LEFT JOIN code_value entType ON enterpriseType.enterprise_type_id = entType.id ");
sqlWhere.append(" LEFT JOIN upload_file u on u.reference_id=e.entId and u.file_type='a' ");
sqlWhere.append(" LEFT JOIN enterprise_extended ex ON e.entId = ex.sys_enterprise_base_id AND ex.valid = '1' ");
sqlWhere.append(" LEFT JOIN code_value entStatus ON ex.enterprise_status = entStatus.id ");
sqlWhere.append(" where e.entName like '%" + enterpriseName + "%' ");
sqlWhere.append(" AND entStatus.code = '"+CodeTypeConstant.USER_EVENT_STATUS_PASS+"' ");
if(StringUtils.isNoneBlank(enterpriseType)){
sqlWhere.append(" AND entType.code = '"+enterpriseType+"' ");
}
sqlWhere.append(" limit 100");
List<EnterpriseVo> queryList = namedjdbctemp.query(sqlWhere.toString(), map, new BeanPropertyRowMapper<EnterpriseVo>(EnterpriseVo.class));
return queryList;
}
@Override
public List<EnterpriseVo> getCZEnterpriseVosByName(String enterpriseName) {
Map<String, Object> map = new HashMap<String, Object>();
StringBuffer sqlWhere = new StringBuffer();
sqlWhere.append("SELECT e.entId,e.entName,e.entAddress, ");
sqlWhere.append(" u.business_code as businessCode,u.file_id as fileId, ");
sqlWhere.append(" entType.code as entTypeCode,entType.value as entTypeValue ");
sqlWhere.append(" from sys_enterprise_base e ");
sqlWhere.append(" left JOIN waste_enterprise_type enterpriseType on enterpriseType.enterprise_id=e.entId ");
sqlWhere.append(" LEFT JOIN code_value entType ON enterpriseType.enterprise_type_id = entType.id ");
sqlWhere.append(" LEFT JOIN upload_file u on u.reference_id=e.entId and u.file_type='a' ");
sqlWhere.append(" LEFT JOIN enterprise_extended ex ON e.entId = ex.sys_enterprise_base_id AND ex.valid = '1' ");
sqlWhere.append(" LEFT JOIN code_value entStatus ON ex.enterprise_status = entStatus.id ");
sqlWhere.append(" where e.entName like '%" + enterpriseName + "%' ");
sqlWhere.append(" AND entStatus.code = '"+CodeTypeConstant.USER_EVENT_STATUS_PASS+"' ");
sqlWhere.append(" AND (entType.code ='DISPOSITION' or entType.code ='DIS_FACILITATOR') ");
sqlWhere.append(" limit 100");
List<EnterpriseVo> queryList = namedjdbctemp.query(sqlWhere.toString(), map, new BeanPropertyRowMapper<EnterpriseVo>(EnterpriseVo.class));
return queryList;
}
}
|
[
"517829464@qq.com"
] |
517829464@qq.com
|
6507ff7f9ea42ce3b7b036b344f709d8f57b2ed1
|
e1262848cb2f5a1b0c8cfd3ca09cf4fbf30d5584
|
/mclabels/src/main/java/com/shangpin/iog/mclabels/dao/DistributionCenterList.java
|
9fd29aa9f163b99ff7fa00eaf0271f18111e8bec
|
[] |
no_license
|
tianxinghua/pachong
|
e619f8e34904ada839cd2d30f8781495de276230
|
a3fc6ea97ce9053f1269d5c3536b6677d5588138
|
refs/heads/master
| 2020-04-14T16:53:51.579843
| 2019-01-04T02:42:26
| 2019-01-04T02:42:26
| 163,964,124
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 210
|
java
|
package com.shangpin.iog.mclabels.dao;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class DistributionCenterList {
private DistributionCenterInfoSubmit DistributionCenterInfoSubmit;
}
|
[
"1085024903@qq.com"
] |
1085024903@qq.com
|
a2073b06230b9b2b8add2ebe1a9bee227107c84e
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/1/1_07938a0203df10068af1a52c1f2bb1ad4acb4f3e/GoalEngine/1_07938a0203df10068af1a52c1f2bb1ad4acb4f3e_GoalEngine_t.java
|
30b69696bc8e0ef91012a669dd8b01160c224a1a
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,652
|
java
|
package org.eclipse.dltk.ti;
import java.util.HashMap;
import java.util.LinkedList;
import org.eclipse.core.runtime.Assert;
import org.eclipse.dltk.ti.goals.GoalEvaluator;
import org.eclipse.dltk.ti.goals.IGoal;
/**
* Main working class for type inference. Purpose of this class is simple:
* evaluate goals and manage their dependencies of subgoals. Also this
* class allows pruning: before evaluating every goal(except root goal) could
* be pruned by provided prunner.
*/
public class GoalEngine {
// private final static boolean TRACE_GOALS = Boolean
// .valueOf(
// Platform
// .getDebugOption("org.eclipse.dltk.core/typeInferencing/traceGoals"))
// .booleanValue();
//
// private final static boolean SHOW_STATISTICS = Boolean
// .valueOf(
// Platform
// .getDebugOption("org.eclipse.dltk.core/typeInferencing/showStatistics"))
// .booleanValue();
private final IGoalEvaluatorFactory evaluatorFactory;
private final LinkedList workingQueue = new LinkedList();
private final HashMap goalStates = new HashMap ();
private final HashMap evaluatorStates = new HashMap();
private class EvalutorState {
public int subgoalsLeft;
public EvalutorState(int subgoalsLeft) {
this.subgoalsLeft = subgoalsLeft;
}
}
private class WorkingPair {
private IGoal goal;
private GoalEvaluator creator;
public WorkingPair(IGoal goal, GoalEvaluator parent) {
this.goal = goal;
this.creator = parent;
}
}
private class GoalEvaluationState {
public GoalEvaluator creator;
public GoalState state;
public Object result;
}
public GoalEngine(IGoalEvaluatorFactory evaluatorFactory) {
this.evaluatorFactory = evaluatorFactory;
}
private void storeGoal (IGoal goal, GoalState state, Object result, GoalEvaluator creator) {
GoalEvaluationState es = new GoalEvaluationState();
es.result = result;
es.state = state;
es.creator = creator;
goalStates.put(goal, es);
}
private void notifyEvaluator (GoalEvaluator evaluator, IGoal subGoal) {
GoalEvaluationState subGoalState = (GoalEvaluationState) goalStates.get(subGoal);
Object result = subGoalState.result;
GoalState state = subGoalState.state;
if (state == GoalState.WAITING)
state = GoalState.RECURSIVE;
IGoal[] newGoals = evaluator.subGoalDone(subGoal, result, state);
for (int i = 0; i < newGoals.length; i++) {
workingQueue.add(new WorkingPair(newGoals[i], evaluator));
}
EvalutorState ev = (EvalutorState) evaluatorStates.get(evaluator);
ev.subgoalsLeft--;
ev.subgoalsLeft += newGoals.length;
if (ev.subgoalsLeft == 0) {
Object newRes = evaluator.produceResult();
GoalEvaluationState st = (GoalEvaluationState) goalStates.get(evaluator.getGoal());
Assert.isNotNull(st);
st.state = GoalState.DONE;
st.result = newRes;
if (st.creator != null)
notifyEvaluator(st.creator, evaluator.getGoal());
}
}
public Object evaluateGoal(IGoal rootGoal, IPruner pruner) {
reset();
if (pruner != null)
pruner.init();
workingQueue.add(new WorkingPair(rootGoal, null));
while (!workingQueue.isEmpty()) {
WorkingPair pair = (WorkingPair) workingQueue.getFirst();
workingQueue.removeFirst();
GoalEvaluationState state = (GoalEvaluationState) goalStates.get(pair.goal);
if (state != null && pair.creator != null) {
notifyEvaluator(pair.creator, pair.goal);
} else {
boolean prune = false;
if (pruner != null && pair.creator != null)
prune = pruner.prune(pair.goal);
if (prune) {
storeGoal (pair.goal, GoalState.PRUNED, null, pair.creator);
notifyEvaluator(pair.creator, pair.goal);
} else {
GoalEvaluator evaluator = evaluatorFactory.createEvaluator(pair.goal);
Assert.isNotNull(evaluator);
System.out.println("Evaluating " + pair.goal + " with a " + evaluator);
IGoal[] newGoals = evaluator.init();
if (newGoals.length > 0) {
for (int i = 0; i < newGoals.length; i++) {
workingQueue.add(new WorkingPair(newGoals[i], evaluator));
}
evaluatorStates.put(evaluator, new EvalutorState(newGoals.length));
storeGoal(pair.goal, GoalState.WAITING, null, pair.creator);
} else {
Object result = evaluator.produceResult();
storeGoal(pair.goal, GoalState.DONE, result, pair.creator);
if (pair.creator != null)
notifyEvaluator(pair.creator, pair.goal);
}
}
}
}
GoalEvaluationState s = (GoalEvaluationState) goalStates.get(rootGoal);
//
// if (TRACE_GOALS || SHOW_STATISTICS)
// System.out.println("Root goal done: " + rootGoal.toString()
// + ", answer is "
// + String.valueOf(lastObtainedSubgoalResult)
// + (timeLimitCondition ? " [time limit exceeded]" : ""));
// if (SHOW_STATISTICS) {
// System.out.println("Time spent: "
// + (System.currentTimeMillis() - endTime + timeLimit)
// + " ms");
// System.out
// .println("Total goals requested: " + totalGoalsRequested);
// System.out.println("Total goals calculated: "
// + totalGoalsCalculated);
// System.out.println("Total cache hits: " + cacheHits);
// System.out.println("Maximal stack size: " + maxStackSize);
// System.out
// .println("Cached goal answers: " + answersCache.size());
// System.out.println();
// }
//
Assert.isTrue(s.state == GoalState.DONE);
return s.result;
}
private void reset() {
workingQueue.clear();
goalStates.clear();
evaluatorStates.clear();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
37016f9d0dbb15dafbc7d8c6b933691ceb973f03
|
1b523bf1b3bfd9782227ca394ac20143baf4974c
|
/official/chapter05/phoneme/phoneme_feature-mr3-rel-src-b01-17_jul_2008/jsr226/perseus2/engine/src/module/com/sun/perseus/model/TimeInterval.java
|
80531b14a6760d4b1c93ffc4a050e863f6676ad7
|
[] |
no_license
|
Joyounger/armlinuxbook
|
66c80192a2d4ea068bba2e21c92067705da08949
|
b7fea1d8c235cbd1f4551b5495bbacc777d91916
|
refs/heads/master
| 2021-05-06T10:17:58.433025
| 2018-03-31T09:14:02
| 2018-03-31T09:14:02
| 114,165,147
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,208
|
java
|
/*
* $RCSfile: TimeInterval.java,v $
*
* Copyright 1990-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
*
* This program 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 program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License version 2 for more details (a copy is
* included at /legal/license.txt).
*
* 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 Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 or visit www.sun.com if you need additional
* information or have any questions.
*/
package com.sun.perseus.model;
import java.util.Vector;
/**
* A <code>TimeInterval</code> models a specific 'run' of a
* <code>TimedElement</code>. It has a begin and end time and
* a list of <code>IntervalTimeInstance</code>s depending on its begin
* or end time.
*
* @version $Id: TimeInterval.java,v 1.3 2006/04/21 06:39:30 st125089 Exp $
*/
public final class TimeInterval {
/**
* The interval's begin time.
*/
Time begin;
/**
* The interval's end time
*/
Time end;
/**
* The end of the last simple duration
*/
Time lastDur;
/**
* The list of dependent begin time instances.
* Contains <code>IntervalTimeInstance</code> objects.
*/
Vector beginDependents;
/**
* The list of end dependents. Contains
* <code>IntervalTimeInstance</code> objects.
*/
Vector endDependents;
/**
* Creates a new interval with a specific begin and end times.
*
* @param begin the initial begin time. This time should be resolved.
* Otherwise, an <code>IllegalStateException</code> is thrown.
* Should not be null.
* @param end the initial end time. Should not be null.
*/
TimeInterval(final Time begin, final Time end) {
if (begin == null || end == null) {
throw new NullPointerException();
}
setBegin(begin);
setEnd(end);
}
/**
* Adds a new <code>IntervalTimeInstance</code> dependent.
* If <code>timeInstance</code> synchronizes on begin, it is
* added to the <code>beginDependent</code> list. Otherwise,
* it is added to the <code>endDependent</code> list.
*
* @param timeInstance the new <code>IntervalTimeInstance</code>.
* If null, throws a <code>NullPointerException</code>.
*/
void addDependent(final IntervalTimeInstance timeInstance) {
Vector dependents = beginDependents;
if (!timeInstance.isBeginSync) {
dependents = endDependents;
}
if (dependents == null) {
dependents = new Vector(1);
if (timeInstance.isBeginSync) {
beginDependents = dependents;
} else {
endDependents = dependents;
}
}
dependents.addElement(timeInstance);
}
/**
* Removes the input <code>IntervalTimeInstance</code> dependent.
*
* @param timeInstance the <code>IntervalTimeInstance</code> to
* remove from this interval. Throws a
* <code>NullPointerException</code> if null.
*/
void removeDependent(final IntervalTimeInstance timeInstance) {
Vector dependents = beginDependents;
if (!timeInstance.isBeginSync) {
dependents = endDependents;
}
if (dependents == null) {
return;
}
dependents.removeElement(timeInstance);
}
/**
* Updates the begin time. Note that an unresolved begin time is
* illegal. Trying to set one will cause an exception to be thrown
* (an IllegalArgumentException).
* Dependent end conditions are notified of begin time change.
*
* @param newBegin the new begin time.
*/
void setBegin(final Time newBegin) {
if (!newBegin.isResolved()) {
throw new IllegalArgumentException("" + newBegin);
}
this.begin = newBegin;
if (beginDependents != null) {
int n = beginDependents.size();
for (int i = 0; i < n; i++) {
((IntervalTimeInstance) beginDependents.elementAt(i))
.onIntervalUpdate();
}
}
}
/**
* Updates the end time. Dependent end conditions are notified
* of the end time change. A
*
* @param newEnd the new end time.
*/
void setEnd(final Time newEnd) {
if (newEnd == null) {
throw new NullPointerException();
}
this.end = newEnd;
if (endDependents != null) {
int n = endDependents.size();
for (int i = 0; i < n; i++) {
((IntervalTimeInstance) endDependents.elementAt(i))
.onIntervalUpdate();
}
}
}
/**
* Called when the interval is pruned from a timed element. The result is
* that all dependent time instances should be removed from their respective
* instance lists.
*/
void prune() {
int n = beginDependents != null ? beginDependents.size() : 0;
for (int i = n - 1; i >= 0; i--) {
IntervalTimeInstance iti =
(IntervalTimeInstance) beginDependents.elementAt(i);
iti.timedElement.removeTimeInstance(iti);
iti.dispose();
}
n = endDependents != null ? endDependents.size() : 0;
for (int i = n - 1; i >= 0; i--) {
IntervalTimeInstance iti =
(IntervalTimeInstance) endDependents.elementAt(i);
iti.timedElement.removeTimeInstance(iti);
iti.dispose();
}
}
}
|
[
"942510346@qq.com"
] |
942510346@qq.com
|
9016daa42fa12444ebfd1af78c65040e7b57f646
|
0adcb787c2d7b3bbf81f066526b49653f9c8db40
|
/src/main/java/com/alipay/api/java_websocket/handshake/HandshakeImpl1Client.java
|
fa27ea876a5021888d5661cbca9c844be5ec3b0e
|
[
"Apache-2.0"
] |
permissive
|
yikey/alipay-sdk-java-all
|
1cdca570c1184778c6f3cad16fe0bcb6e02d2484
|
91d84898512c5a4b29c707b0d8d0cd972610b79b
|
refs/heads/master
| 2020-05-22T13:40:11.064476
| 2019-04-11T14:11:02
| 2019-04-11T14:11:02
| 186,365,665
| 1
| 0
| null | 2019-05-13T07:16:09
| 2019-05-13T07:16:08
| null |
UTF-8
|
Java
| false
| false
| 1,788
|
java
|
/*
* Copyright (c) 2010-2018 Nathan Rajlich
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
package com.alipay.api.java_websocket.handshake;
/**
* Implementation for a client handshake
*/
public class HandshakeImpl1Client extends HandshakedataImpl1 implements ClientHandshakeBuilder {
/**
* Attribute for the resource descriptor
*/
private String resourceDescriptor = "*";
public void setResourceDescriptor( String resourceDescriptor ) throws IllegalArgumentException {
if(resourceDescriptor==null)
throw new IllegalArgumentException( "http resource descriptor must not be null" );
this.resourceDescriptor = resourceDescriptor;
}
public String getResourceDescriptor() {
return resourceDescriptor;
}
}
|
[
"liuqun.lq@alibaba-inc.com"
] |
liuqun.lq@alibaba-inc.com
|
aa78151666aa5865962de8ed07befc6f394e827e
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/9/9_58affd8a6a12e058504efa035b8869a81b6b0b27/RuleBaseElement/9_58affd8a6a12e058504efa035b8869a81b6b0b27_RuleBaseElement_s.java
|
6e4a2249507a05dc9472bdf4a1ae6cf880ec76f1
|
[] |
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,216
|
java
|
/**
* Copyright 2010 OpenEngSB Division, Vienna University of Technology
*
* 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.openengsb.core.workflow.model;
import org.openengsb.core.common.workflow.model.RuleBaseElementId;
import org.openengsb.core.common.workflow.model.RuleBaseElementType;
public class RuleBaseElement {
private String code;
private RuleBaseElementType type;
private String packageName;
private String name;
public RuleBaseElement() {
}
public RuleBaseElement(RuleBaseElementId id) {
this.name = id.getName();
this.packageName = id.getPackageName();
this.type = id.getType();
}
public RuleBaseElement(RuleBaseElementId id, String code) {
this(id);
this.code = code;
}
public RuleBaseElementType getType() {
return this.type;
}
public void setType(RuleBaseElementType type) {
this.type = type;
}
public String getPackageName() {
return this.packageName;
}
public void setPackageName(String packageName) {
this.packageName = packageName;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public RuleBaseElementId getId() {
return new RuleBaseElementId(type, packageName, name);
}
@Override
public String toString() {
return String.format("%s %s[%s]", type, packageName, name);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
56ec2c3b32842cd6d68d70f606a30a74949860d0
|
2586f3b8626c14aa53e9f87ac0844689b22a8b48
|
/src/org/graalvm/compiler/lir/alloc/lsra/LinearScan_OptionDescriptors.java
|
44beccbab42bdeb4e3f734c5a44eed36746166ae
|
[] |
no_license
|
shaoxiongdu/LearningJDK
|
46fd841471f5d0e2737ebcd3570ef6f018a90ddb
|
406e4de55d107648ed6497d625239c637227aa66
|
refs/heads/master
| 2022-11-12T14:30:01.400708
| 2022-11-08T13:00:17
| 2022-11-08T13:00:17
| 350,005,058
| 18
| 11
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,631
|
java
|
// CheckStyle: stop header check
// CheckStyle: stop line length check
// GENERATED CONTENT - DO NOT EDIT
// Source: LinearScan.java
package org.graalvm.compiler.lir.alloc.lsra;
import java.util.*;
import org.graalvm.compiler.options.*;
import org.graalvm.compiler.options.OptionType;
public class LinearScan_OptionDescriptors implements OptionDescriptors {
@Override
public OptionDescriptor get(String value) {
switch (value) {
// CheckStyle: stop line length check
case "LIROptLSRAOptimizeSpillPosition": {
return OptionDescriptor.create(
/*name*/ "LIROptLSRAOptimizeSpillPosition",
/*optionType*/ OptionType.Debug,
/*optionValueType*/ Boolean.class,
/*help*/ "Enable spill position optimization",
/*declaringClass*/ LinearScan.Options.class,
/*fieldName*/ "LIROptLSRAOptimizeSpillPosition",
/*option*/ LinearScan.Options.LIROptLSRAOptimizeSpillPosition);
}
// CheckStyle: resume line length check
}
return null;
}
@Override
public Iterator<OptionDescriptor> iterator() {
return new Iterator<OptionDescriptor>() {
int i = 0;
@Override
public boolean hasNext() {
return i < 1;
}
@Override
public OptionDescriptor next() {
switch (i++) {
case 0: return get("LIROptLSRAOptimizeSpillPosition");
}
throw new NoSuchElementException();
}
};
}
}
|
[
"kangjianwei1990@qq.com"
] |
kangjianwei1990@qq.com
|
09476f0c25c37536268227b1e6bbb0caf6424e4a
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Lang/58/org/apache/commons/lang/StringUtils_chop_3541.java
|
e4a07d7c442e688b83cd8c80caeb1e0b87af3756
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 8,030
|
java
|
org apach common lang
oper link java lang string
code code safe
empti isempti blank isblank
check string text
trim strip
remov lead trail whitespac
equal
compar string safe
index indexof index lastindexof
safe index check
index indexofani index lastindexofani index indexofanybut index lastindexofanybut
index set string
containsonli containsnon
string charact
substr left mid
safe substr extract
substr substringbefor substr substringaft substr substringbetween
substr extract rel string
split join
split string arrai substr vice versa
remov delet
remov part string
replac overlai
search string replac string
chomp chop
remov part string
left pad leftpad pad rightpad center repeat
pad string
upper case uppercas lower case lowercas swap case swapcas capit uncapit
string
count match countmatch
count number occurr string
alpha isalpha numer isnumer whitespac iswhitespac ascii printabl isasciiprint
check charact string
default string defaultstr
protect input string
revers revers delimit reversedelimit
revers string
abbrevi
abbrevi string ellipsi
differ
compar string report differ
levenstein distanc levensteindist
number need chang string
code string util stringutil code defin word relat
string handl
code code
empti length string code code
space space charact code code
whitespac charact defin link charact whitespac iswhitespac
trim charact link string trim
code string util stringutil code handl code code input string quietli
code code input code code
code code code code return
detail vari method
side effect code code handl
code null pointer except nullpointerexcept code consid bug
code string util stringutil code deprec method
method give sampl code explain oper
symbol code code input includ code code
java lang string
author href http jakarta apach org turbin apach jakarta turbin
author href mailto jon latchkei jon steven
author href mailto dlr finemaltcod daniel rall
author href mailto gcoladonato yahoo greg coladonato
author href mailto apach org korthof
author href mailto rand mcneeli yahoo rand neeli mcneeli
author stephen colebourn
author href mailto fredrik westermarck fredrik westermarck
author holger krauth
author href mailto alex purpletech alexand dai chaffe
author href mailto hp intermeta hen schmiedehausen
author arun mammen thoma
author gari gregori
author phil steitz
author chou
author michael davei
author reuben sivan
author chri hyzer
version
string util stringutil
remov charact string
string end code code remov
pre
string util stringutil chop
string util stringutil chop
string util stringutil chop abc abc
string util stringutil chop abc abc
string util stringutil chop abc abc
string util stringutil chop abc
string util stringutil chop abc nabc abc nab
string util stringutil chop
string util stringutil chop
string util stringutil chop
string util stringutil chop
pre
param str string chop charact
string charact code code string input
string chop string str
str
str len strlen str length
str len strlen
empti
idx lastidx str len strlen
string ret str substr idx lastidx
str charat idx lastidx
char util charutil
ret charat idx lastidx char util charutil
ret substr idx lastidx
ret
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
78c1358dd4872833b6d4be09d733e6bc0100ba4f
|
639db33873cb87583c933f4ef88435961426261f
|
/aliyun-java-sdk-cms/src/main/java/com/aliyuncs/cms/model/v20180308/ModifyTaskRequest.java
|
418bcf4e91953d0bf8150ea4c912f27bde55b120
|
[
"Apache-2.0"
] |
permissive
|
ssy352959096/aliyun-openapi-java-sdk
|
f179d22043a253d77ee5f29ed7242420674a095c
|
7decd0e2273445b4311d576202fb6151e2194596
|
refs/heads/master
| 2020-04-15T05:25:56.754428
| 2019-04-02T09:33:41
| 2019-04-02T09:33:41
| 164,422,068
| 0
| 0
|
NOASSERTION
| 2019-04-02T09:33:42
| 2019-01-07T11:22:14
|
Java
|
UTF-8
|
Java
| false
| false
| 3,096
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.cms.model.v20180308;
import com.aliyuncs.RpcAcsRequest;
/**
* @author auto create
* @version
*/
public class ModifyTaskRequest extends RpcAcsRequest<ModifyTaskResponse> {
public ModifyTaskRequest() {
super("Cms", "2018-03-08", "ModifyTask", "cms");
}
private String caller;
private String address;
private String ispCity;
private String alertIds;
private String options;
private String taskName;
private String interval;
private String alertRule;
private String taskId;
public String getCaller() {
return this.caller;
}
public void setCaller(String caller) {
this.caller = caller;
if(caller != null){
putQueryParameter("caller", caller);
}
}
public String getAddress() {
return this.address;
}
public void setAddress(String address) {
this.address = address;
if(address != null){
putQueryParameter("Address", address);
}
}
public String getIspCity() {
return this.ispCity;
}
public void setIspCity(String ispCity) {
this.ispCity = ispCity;
if(ispCity != null){
putQueryParameter("IspCity", ispCity);
}
}
public String getAlertIds() {
return this.alertIds;
}
public void setAlertIds(String alertIds) {
this.alertIds = alertIds;
if(alertIds != null){
putQueryParameter("AlertIds", alertIds);
}
}
public String getOptions() {
return this.options;
}
public void setOptions(String options) {
this.options = options;
if(options != null){
putQueryParameter("Options", options);
}
}
public String getTaskName() {
return this.taskName;
}
public void setTaskName(String taskName) {
this.taskName = taskName;
if(taskName != null){
putQueryParameter("TaskName", taskName);
}
}
public String getInterval() {
return this.interval;
}
public void setInterval(String interval) {
this.interval = interval;
if(interval != null){
putQueryParameter("Interval", interval);
}
}
public String getAlertRule() {
return this.alertRule;
}
public void setAlertRule(String alertRule) {
this.alertRule = alertRule;
if(alertRule != null){
putQueryParameter("AlertRule", alertRule);
}
}
public String getTaskId() {
return this.taskId;
}
public void setTaskId(String taskId) {
this.taskId = taskId;
if(taskId != null){
putQueryParameter("TaskId", taskId);
}
}
@Override
public Class<ModifyTaskResponse> getResponseClass() {
return ModifyTaskResponse.class;
}
}
|
[
"haowei.yao@alibaba-inc.com"
] |
haowei.yao@alibaba-inc.com
|
c15cc90bb934b185510430772ccfcfca0bc92d73
|
c8664fc194971e6e39ba8674b20d88ccfa7663b1
|
/com/tencent/mm/plugin/shake/ui/TVThumbPreference.java
|
bc9e1725d071579ea8ebf1bf7a26a6b64223094b
|
[] |
no_license
|
raochuan/wexin1120
|
b926bc8d4143c4b523ed43e265cd20ef0c89ad40
|
1eaa71e1e3e7c9f9b9f96db8de56db3dfc4fb4d3
|
refs/heads/master
| 2020-05-17T23:57:00.000696
| 2017-11-03T02:33:27
| 2017-11-03T02:33:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,357
|
java
|
package com.tencent.mm.plugin.shake.ui;
import android.content.Context;
import android.graphics.Bitmap;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.tencent.gmtrace.GMTrace;
import com.tencent.mm.R.h;
import com.tencent.mm.R.i;
import com.tencent.mm.platformtools.j;
import com.tencent.mm.platformtools.j.a;
import com.tencent.mm.plugin.shake.e.b;
import com.tencent.mm.ui.base.preference.Preference;
import com.tencent.mm.ui.base.preference.f;
import java.util.List;
public class TVThumbPreference
extends Preference
implements j.a
{
public f jqf;
public ImageView pAu;
public ImageView pAv;
public ImageView pAw;
List<String> pAx;
public TVThumbPreference(Context paramContext)
{
this(paramContext, null);
GMTrace.i(6590358880256L, 49102);
GMTrace.o(6590358880256L, 49102);
}
public TVThumbPreference(Context paramContext, AttributeSet paramAttributeSet)
{
this(paramContext, paramAttributeSet, 0);
GMTrace.i(6590224662528L, 49101);
GMTrace.o(6590224662528L, 49101);
}
public TVThumbPreference(Context paramContext, AttributeSet paramAttributeSet, int paramInt)
{
super(paramContext, paramAttributeSet, paramInt);
GMTrace.i(6590090444800L, 49100);
this.pAx = null;
setLayoutResource(R.i.dhh);
setWidgetLayoutResource(0);
j.a(this);
GMTrace.o(6590090444800L, 49100);
}
public final void k(String paramString, final Bitmap paramBitmap)
{
GMTrace.i(6590761533440L, 49105);
if ((paramString == null) || (paramBitmap == null) || (paramBitmap.isRecycled()))
{
GMTrace.o(6590761533440L, 49105);
return;
}
if ((this.pAu != null) && (this.pAu.getTag() != null) && (paramString.equals((String)this.pAu.getTag())))
{
this.pAu.post(new Runnable()
{
public final void run()
{
GMTrace.i(6541772062720L, 48740);
TVThumbPreference.this.pAu.setImageBitmap(paramBitmap);
if (TVThumbPreference.this.jqf != null) {
TVThumbPreference.this.jqf.notifyDataSetChanged();
}
GMTrace.o(6541772062720L, 48740);
}
});
GMTrace.o(6590761533440L, 49105);
return;
}
if ((this.pAv != null) && (this.pAv.getTag() != null) && (paramString.equals((String)this.pAv.getTag())))
{
this.pAv.post(new Runnable()
{
public final void run()
{
GMTrace.i(6581634727936L, 49037);
TVThumbPreference.this.pAv.setImageBitmap(paramBitmap);
if (TVThumbPreference.this.jqf != null) {
TVThumbPreference.this.jqf.notifyDataSetChanged();
}
GMTrace.o(6581634727936L, 49037);
}
});
GMTrace.o(6590761533440L, 49105);
return;
}
if ((this.pAw != null) && (this.pAw.getTag() != null) && (paramString.equals((String)this.pAw.getTag()))) {
this.pAw.post(new Runnable()
{
public final void run()
{
GMTrace.i(6582171598848L, 49041);
TVThumbPreference.this.pAw.setImageBitmap(paramBitmap);
if (TVThumbPreference.this.jqf != null) {
TVThumbPreference.this.jqf.notifyDataSetChanged();
}
GMTrace.o(6582171598848L, 49041);
}
});
}
GMTrace.o(6590761533440L, 49105);
}
protected final void onBindView(View paramView)
{
GMTrace.i(6590627315712L, 49104);
super.onBindView(paramView);
this.pAu = ((ImageView)paramView.findViewById(R.h.cAD));
this.pAv = ((ImageView)paramView.findViewById(R.h.cAE));
this.pAw = ((ImageView)paramView.findViewById(R.h.cAF));
if (this.pAx != null)
{
if (this.pAx.size() <= 0)
{
GMTrace.o(6590627315712L, 49104);
return;
}
paramView = new b((String)this.pAx.get(0));
this.pAu.setTag(paramView.Pi());
paramView = j.a(paramView);
if ((paramView != null) && (!paramView.isRecycled())) {
this.pAu.setImageBitmap(paramView);
}
this.pAu.setVisibility(0);
if (1 >= this.pAx.size())
{
GMTrace.o(6590627315712L, 49104);
return;
}
paramView = new b((String)this.pAx.get(1));
this.pAv.setTag(paramView.Pi());
paramView = j.a(paramView);
if ((paramView != null) && (!paramView.isRecycled())) {
this.pAv.setImageBitmap(paramView);
}
this.pAv.setVisibility(0);
if (2 >= this.pAx.size())
{
GMTrace.o(6590627315712L, 49104);
return;
}
paramView = new b((String)this.pAx.get(2));
this.pAw.setTag(paramView.Pi());
paramView = j.a(paramView);
if ((paramView != null) && (!paramView.isRecycled())) {
this.pAw.setImageBitmap(paramView);
}
this.pAw.setVisibility(0);
}
GMTrace.o(6590627315712L, 49104);
}
protected final View onCreateView(ViewGroup paramViewGroup)
{
GMTrace.i(6590493097984L, 49103);
paramViewGroup = super.onCreateView(paramViewGroup);
GMTrace.o(6590493097984L, 49103);
return paramViewGroup;
}
}
/* Location: /Users/xianghongyan/decompile/dex2jar/classes2-dex2jar.jar!/com/tencent/mm/plugin/shake/ui/TVThumbPreference.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"15223790237@139.com"
] |
15223790237@139.com
|
53644e95b8c52f8a9b7f97a7f14f6a4a02b78e7a
|
35b710e9bc210a152cc6cda331e71e9116ba478c
|
/tc-wars/tc/src/main/java/com/topcoder/web/tc/controller/request/development/TCCC06ContestDetails.java
|
78f157ae27718f3adb859b2888d078c24872d15c
|
[] |
no_license
|
appirio-tech/tc1-tcnode
|
d17649afb38998868f9a6d51920c4fe34c3e7174
|
e05a425be705aca8f530caac1da907d9a6c4215a
|
refs/heads/master
| 2023-08-04T19:58:39.617425
| 2016-05-15T00:22:36
| 2016-05-15T00:22:36
| 56,892,466
| 1
| 8
| null | 2022-04-05T00:47:40
| 2016-04-23T00:27:46
|
Java
|
UTF-8
|
Java
| false
| false
| 5,592
|
java
|
package com.topcoder.web.tc.controller.request.development;
import com.topcoder.shared.dataAccess.DataAccessInt;
import com.topcoder.shared.dataAccess.Request;
import com.topcoder.shared.dataAccess.resultSet.ResultSetContainer;
import com.topcoder.shared.util.DBMS;
import com.topcoder.web.common.TCWebException;
import com.topcoder.web.tc.model.UserContestDetail;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Map;
/**
* @author dok
* @version $Revision: 57980 $ Date: 2005/01/01 00:00:00
* Create Date: Jul 25, 2006
*/
public class TCCC06ContestDetails extends StatBase {
public String getCommandName() {
return "tccc06_contest_projects";
}
public String getDataSourceName() {
return DBMS.TCS_OLTP_DATASOURCE_NAME;
}
public String getPageName() {
return "/tournaments/tccc06/contest_det.jsp";
}
private ArrayList arr = new ArrayList();
int getMax() {
return 4;
}
public void statProcessing() throws com.topcoder.web.common.TCWebException {
Map result2 = (Map) getRequest().getAttribute("resultMap");
ResultSetContainer rsc = (ResultSetContainer) result2.get("contest_projects");
DecimalFormat dfmt = new DecimalFormat("$#,##0.00");
int[] placementPoints = new int[]{10, 7, 5, 4, 0};
for (int i = 0; i < rsc.size(); i++) {
//for each contest, get details and build array
Request dataRequest = new Request();
Map result;
try {
dataRequest.setContentHandle("tccc06_project_results_all");
dataRequest.setProperty("ct", getRequest().getParameter("ct"));
dataRequest.setProperty("pj", String.valueOf(rsc.getIntItem(i, "project_id")));
DataAccessInt dai = getDataAccess(DBMS.TCS_DW_DATASOURCE_NAME, true);
result = dai.getData(dataRequest);
} catch (Exception e) {
throw new TCWebException(e);
}
ResultSetContainer rscDetails = (ResultSetContainer) result.get("tccc06_project_results_all");
ResultSetContainer rscComplete = (ResultSetContainer) result.get("project_details");
boolean isComplete = false;
if (!rscComplete.isEmpty() && rscComplete.getIntItem(0, "complete_status") == 1) {
isComplete = true;
}
for (int j = 0; j < rscDetails.size(); j++) {
int pts = 0;
if (rscDetails.getItem(j, "final_score").getResultData() != null) {
if (rscDetails.getDoubleItem(j, "final_score") >= 75) {
if (j < placementPoints.length) {
pts = placementPoints[j];
}
}
}
addPoints(rscDetails.getStringItem(j, "handle"), rscDetails.getIntItem(j, "user_id"), pts,
isComplete, rscDetails.getIntItem(j, "submit_ind") == 1);
}
}
//add prizes
Request dataRequest = new Request();
Map result;
try {
dataRequest.setContentHandle("tccc06_contest_prizes");
dataRequest.setProperty("ct", getRequest().getParameter("ct"));
DataAccessInt dai = getDataAccess(DBMS.TCS_DW_DATASOURCE_NAME, true);
result = dai.getData(dataRequest);
} catch (Exception e) {
throw new TCWebException(e);
}
ResultSetContainer rscPrizes = (ResultSetContainer) result.get("tccc06_contest_prizes");
for (int i = 0; i < rscPrizes.size(); i++) {
addPrize(rscPrizes.getIntItem(i, "user_id"), dfmt.format(rscPrizes.getDoubleItem(i, "prize_payment")));
}
Collections.sort(arr, new myComparator());
getRequest().setAttribute("results", arr);
}
public void addPrize(int userId, String prz) {
UserContestDetail user = null;
for (int i = 0; i < arr.size(); i++) {
UserContestDetail item = (UserContestDetail) arr.get(i);
if (item.getUserID() == userId) {
user = item;
break;
}
}
user.setPayment(prz);
}
public void addPoints(String handle, int userId, int pts, boolean completed, boolean isSubmitted) {
UserContestDetail user = null;
for (int i = 0; i < arr.size(); i++) {
UserContestDetail item = (UserContestDetail) arr.get(i);
if (item.getUserID() == userId) {
user = item;
break;
}
}
if (user == null) {
user = new UserContestDetail(handle, userId);
arr.add(user);
}
user.addPoints(pts, getMax());
if (completed) {
user.setComplete(user.getComplete() + 1);
} else {
user.setIncomplete(user.getIncomplete() + 1);
}
if (isSubmitted) {
user.setSubmissionCount(user.getSubmissionCount() + 1);
}
}
public class myComparator implements Comparator {
public int compare(Object o1, Object o2) {
UserContestDetail a1 = (UserContestDetail) o1;
UserContestDetail a2 = (UserContestDetail) o2;
if (a1.getPoints() == a2.getPoints()) {
return a1.getHandle().compareToIgnoreCase(a2.getHandle());
}
return a2.getPoints() - a1.getPoints();
}
}
}
|
[
"dongzhengbin@winterflames-MacBook-Pro.local"
] |
dongzhengbin@winterflames-MacBook-Pro.local
|
94e1f2ca4b04c67b7825511bd53c6c7254256a1d
|
3b481b302b02edf57b816acac9e5ff3b7ec602e2
|
/src/com/twitter/android/media/camera/a.java
|
08e219719ec57341696d64b4aacbe182659c0caa
|
[] |
no_license
|
reverseengineeringer/com.twitter.android
|
53338ae009b2b6aa79551a8273875ec3728eda99
|
f834eee04284d773ccfcd05487021200de30bd1e
|
refs/heads/master
| 2021-04-15T04:35:06.232782
| 2016-07-21T03:51:19
| 2016-07-21T03:51:19
| 63,835,046
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 639
|
java
|
package com.twitter.android.media.camera;
import android.content.Intent;
import com.twitter.media.model.MediaFile;
import com.twitter.media.model.MediaType;
class a
implements i
{
a(CameraActivity paramCameraActivity) {}
public void a()
{
a.setResult(0);
a.finish();
}
public void a(MediaType paramMediaType, MediaFile paramMediaFile)
{
a.setResult(-1, a.getIntent().putExtra("media_type", paramMediaType).putExtra("media_file", paramMediaFile));
a.finish();
}
}
/* Location:
* Qualified Name: com.twitter.android.media.camera.a
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
1565e8dc9a085db95db60cae13aedcf04f7c9977
|
c95c03f659007f347cc02e293faeb339eff85a59
|
/DataBase/MethodsDataBase/incubator-dubbo-dubbo-2.6.5/FailfastClusterInvokerTest/testNoInvoke.txt
|
c606791ba452b25b29e65d6fe89db2f8be388517
|
[] |
no_license
|
dormaayan/TestsReposirotry
|
e2bf6c247d933b278fcc47082afa7282dd916baa
|
75520c8fbbbd5f721f4c216ae7f142ec861e2c67
|
refs/heads/master
| 2020-04-11T21:34:56.287920
| 2019-02-06T13:34:31
| 2019-02-06T13:34:31
| 162,110,352
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 604
|
txt
|
@Test() public void testNoInvoke(){
dic=mock(Directory.class);
given(dic.getUrl()).willReturn(url);
given(dic.list(invocation)).willReturn(null);
given(dic.getInterface()).willReturn(FailfastClusterInvokerTest.class);
invocation.setMethodName("method1");
invokers.add(invoker1);
resetInvoker1ToNoException();
FailfastClusterInvoker<FailfastClusterInvokerTest> invoker=new FailfastClusterInvoker<FailfastClusterInvokerTest>(dic);
try {
invoker.invoke(invocation);
fail();
}
catch ( RpcException expected) {
assertFalse(expected.getCause() instanceof RpcException);
}
}
|
[
"dor.d.ma@gmail.com"
] |
dor.d.ma@gmail.com
|
c66debf290baf26cee4f2cca6c1106f9feabcd60
|
d71e879b3517cf4fccde29f7bf82cff69856cfcd
|
/ExtractedJars/iRobot_com.irobot.home/javafiles/com/irobot/home/a$2$1.java
|
c98124d9818735d7f17ef87461ada259c2d1721f
|
[
"MIT"
] |
permissive
|
Andreas237/AndroidPolicyAutomation
|
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
|
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
|
refs/heads/master
| 2020-04-10T02:14:08.789751
| 2019-05-16T19:29:11
| 2019-05-16T19:29:11
| 160,739,088
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,045
|
java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package com.irobot.home;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import com.irobot.core.*;
import com.irobot.home.b.l;
import com.irobot.home.b.m;
import java.util.ArrayList;
// Referenced classes of package com.irobot.home:
// a
class a$2$1
implements com.irobot.home.view.ableView.b
{
public void a(int i)
{
FloorPlanListItem floorplanlistitem = com.irobot.home.a.a(a.a).e(i);
// 0 0:aload_0
// 1 1:getfield #16 <Field a$2 a>
// 2 4:getfield #24 <Field a a$2.a>
// 3 7:invokestatic #29 <Method l a.a(a)>
// 4 10:iload_1
// 5 11:invokevirtual #35 <Method FloorPlanListItem l.e(int)>
// 6 14:astore_2
MapsUIServiceData mapsuiservicedata = MapsUIServiceData.create();
// 7 15:invokestatic #41 <Method MapsUIServiceData MapsUIServiceData.create()>
// 8 18:astore_3
mapsuiservicedata.setFloorPlanListMapId(floorplanlistitem.getMapIdString());
// 9 19:aload_3
// 10 20:aload_2
// 11 21:invokevirtual #47 <Method String FloorPlanListItem.getMapIdString()>
// 12 24:invokevirtual #51 <Method void MapsUIServiceData.setFloorPlanListMapId(String)>
mapsuiservicedata.setFloorPlanListMapVersionId(floorplanlistitem.getMapVersion());
// 13 27:aload_3
// 14 28:aload_2
// 15 29:invokevirtual #54 <Method String FloorPlanListItem.getMapVersion()>
// 16 32:invokevirtual #57 <Method void MapsUIServiceData.setFloorPlanListMapVersionId(String)>
com.irobot.home.a.b(a.a).sendCommand(MapsUIServiceCommand.DeleteFloorPlanListItem, mapsuiservicedata);
// 17 35:aload_0
// 18 36:getfield #16 <Field a$2 a>
// 19 39:getfield #24 <Field a a$2.a>
// 20 42:invokestatic #61 <Method MapsUIService a.b(a)>
// 21 45:getstatic #67 <Field MapsUIServiceCommand MapsUIServiceCommand.DeleteFloorPlanListItem>
// 22 48:aload_3
// 23 49:invokevirtual #73 <Method void MapsUIService.sendCommand(MapsUIServiceCommand, MapsUIServiceData)>
com.irobot.home.a.c(a.a).remove(((Object) (floorplanlistitem)));
// 24 52:aload_0
// 25 53:getfield #16 <Field a$2 a>
// 26 56:getfield #24 <Field a a$2.a>
// 27 59:invokestatic #77 <Method ArrayList a.c(a)>
// 28 62:aload_2
// 29 63:invokevirtual #83 <Method boolean ArrayList.remove(Object)>
// 30 66:pop
com.irobot.home.a.a(a.a).a(com.irobot.home.a.c(a.a));
// 31 67:aload_0
// 32 68:getfield #16 <Field a$2 a>
// 33 71:getfield #24 <Field a a$2.a>
// 34 74:invokestatic #29 <Method l a.a(a)>
// 35 77:aload_0
// 36 78:getfield #16 <Field a$2 a>
// 37 81:getfield #24 <Field a a$2.a>
// 38 84:invokestatic #77 <Method ArrayList a.c(a)>
// 39 87:invokevirtual #86 <Method void l.a(ArrayList)>
com.irobot.home.a.a(a.a).d(i);
// 40 90:aload_0
// 41 91:getfield #16 <Field a$2 a>
// 42 94:getfield #24 <Field a a$2.a>
// 43 97:invokestatic #29 <Method l a.a(a)>
// 44 100:iload_1
// 45 101:invokevirtual #89 <Method void l.d(int)>
// 46 104:return
}
final a._cls2 a;
a$2$1(a._cls2 _pcls2)
{
a = _pcls2;
// 0 0:aload_0
// 1 1:aload_1
// 2 2:putfield #16 <Field a$2 a>
super();
// 3 5:aload_0
// 4 6:invokespecial #19 <Method void Object()>
// 5 9:return
}
// Unreferenced inner class com/irobot/home/a$2
/* anonymous class */
class a._cls2 extends m
{
public void a(android.support.v7.widget.RecyclerView.u u, ArrayList arraylist)
{
arraylist.add(((Object) ((new com.irobot.home.view.RevealableView.a(((Context) (a.getActivity())))).a(0x7f0600a1).b(0x7f08012c).a(((com.irobot.home.view.RevealableView.b) (new a._cls2._cls1(this)))).a())));
// 0 0:aload_2
// 1 1:new #23 <Class com.irobot.home.view.RevealableView$a>
// 2 4:dup
// 3 5:aload_0
// 4 6:getfield #16 <Field a a>
// 5 9:invokevirtual #27 <Method android.support.v4.app.FragmentActivity a.getActivity()>
// 6 12:invokespecial #30 <Method void com.irobot.home.view.RevealableView$a(Context)>
// 7 15:ldc1 #31 <Int 0x7f0600a1>
// 8 17:invokevirtual #34 <Method com.irobot.home.view.RevealableView$a com.irobot.home.view.RevealableView$a.a(int)>
// 9 20:ldc1 #35 <Int 0x7f08012c>
// 10 22:invokevirtual #38 <Method com.irobot.home.view.RevealableView$a com.irobot.home.view.RevealableView$a.b(int)>
// 11 25:new #11 <Class a$2$1>
// 12 28:dup
// 13 29:aload_0
// 14 30:invokespecial #41 <Method void a$2$1(a$2)>
// 15 33:invokevirtual #44 <Method com.irobot.home.view.RevealableView$a com.irobot.home.view.RevealableView$a.a(com.irobot.home.view.RevealableView$b)>
// 16 36:invokevirtual #47 <Method com.irobot.home.view.RevealableView com.irobot.home.view.RevealableView$a.a()>
// 17 39:invokevirtual #53 <Method boolean ArrayList.add(Object)>
// 18 42:pop
// 19 43:return
}
final a a;
{
a = a1;
// 0 0:aload_0
// 1 1:aload_1
// 2 2:putfield #16 <Field a a>
super(context, recyclerview);
// 3 5:aload_0
// 4 6:aload_2
// 5 7:aload_3
// 6 8:invokespecial #19 <Method void m(Context, RecyclerView)>
// 7 11:return
}
}
}
|
[
"silenta237@gmail.com"
] |
silenta237@gmail.com
|
902a51eff7ae79b1434c8673171edd699b190550
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/4/4_0bbc11cc961519f5c9426314ee3a7dbd0665287d/BiojavaJmol/4_0bbc11cc961519f5c9426314ee3a7dbd0665287d_BiojavaJmol_t.java
|
3d85b2b81bd232cb3604a346f257a7a5826b62d8
|
[] |
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,381
|
java
|
/*
* BioJava development code
*
* This code may be freely distributed and modified under the
* terms of the GNU Lesser General Public Licence. This should
* be distributed with the code. If you do not have a copy,
* see:
*
* http://www.gnu.org/copyleft/lesser.html
*
* Copyright for this code is held jointly by the individual
* authors. These should be listed in @author doc comments.
*
* For more information on the BioJava project and its aims,
* or to join the biojava-l mailing list, visit the home page
* at:
*
* http://www.biojava.org/
*
* Created on 24.05.2004
* @author Andreas Prlic
*
*/
package org.biojava.bio.structure.gui;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import javax.swing.JFrame;
import javax.swing.JPanel;
import org.biojava.bio.structure.Structure;
import org.biojava.bio.structure.io.PDBFileReader;
public class BiojavaJmol {
public static final String viewer = "org.jmol.api.JmolSimpleViewer";
public static final String adapter = "org.jmol.api.JmolAdapter";
public static final String smartAdapter = "org.jmol.adapter.smarter.SmarterJmolAdapter";
//public static final String viewer = "JmolSimpleViewer";
Structure structure;
JmolPanel jmolPanel;
JFrame frame ;
public static void main(String[] args){
try {
PDBFileReader pdbr = new PDBFileReader();
//pdbr.setAutoFetch(true);
pdbr.setPath("/Path/To/PDB/DIR/");
String pdbCode = "5pti";
Structure struc = pdbr.getStructureById(pdbCode);
BiojavaJmol jmolPanel = new BiojavaJmol();
jmolPanel.setStructure(struc);
// send some RASMOL style commands to Jmol
jmolPanel.evalString("select * ; color chain;");
jmolPanel.evalString("select *; spacefill off; wireframe off; backbone 0.4; ");
} catch (Exception e){
e.printStackTrace();
}
}
public BiojavaJmol() {
frame = new JFrame();
frame.addWindowListener(new ApplicationCloser());
Container contentPane = frame.getContentPane();
try {
jmolPanel = new JmolPanel();
} catch (ClassNotFoundException e){
e.printStackTrace();
System.err.println("could not find Jmol in classpath, please install first");
return;
}
jmolPanel.setPreferredSize(new Dimension(200,200));
contentPane.add(jmolPanel);
frame.pack();
frame.setVisible(true);
}
public void evalString(String rasmolScript){
if ( jmolPanel == null ){
System.err.println("please install Jmol first");
return;
}
jmolPanel.evalString(rasmolScript);
}
public void setStructure(Structure s) {
if ( jmolPanel == null ){
System.err.println("please install Jmol first");
return;
}
frame.setName(s.getPDBCode());
// actually this is very simple
// just convert the structure to a PDB file
String pdb = s.toPDB();
// Jmol could also read the file directly from your file system
//viewer.openFile("/Path/To/PDB/1tim.pdb");
//System.out.println(pdb);
jmolPanel.openStringInline(pdb);
// send the PDB file to Jmol.
// there are also other ways to interact with Jmol, e.g make it directly
// access the biojava structure object, but they require more
// code. See the SPICE code repository for how to do this.
}
public void setTitle(String label){
frame.setTitle(label);
}
static class ApplicationCloser extends WindowAdapter {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
}
static class JmolPanel extends JPanel {
/**
*
*/
private static final long serialVersionUID = -3661941083797644242L;
Class viewerC;
Class adapterC;
Class smartAdapterC;
Object viewerO;
Object adapterO;
Method evalString;
Method renderScreenImage;
Method openStringInline;
//JmolSimpleViewer viewer;
//JmolAdapter adapter;
JmolPanel() throws ClassNotFoundException {
try {
viewerC = Class.forName(viewer);
adapterC = Class.forName(adapter);
smartAdapterC = Class.forName(smartAdapter);
Method m = viewerC.getMethod("allocateSimpleViewer", new Class[]{Component.class,adapterC});
Constructor constructor = smartAdapterC.getConstructor(new Class[]{});
adapterO = constructor.newInstance(new Object[]{});
//viewerC = JmolSimpleViewer.allocateSimpleViewer(this, adapter);
viewerO = m.invoke(viewerC, this, adapterO);
evalString = viewerC.getMethod("evalString",String.class);
renderScreenImage = viewerC.getMethod("renderScreenImage",
new Class[]{Graphics.class,Dimension.class, Rectangle.class});
openStringInline = viewerC.getMethod("openStringInline", new Class[]{String.class});
} catch (InstantiationException e){
e.printStackTrace();
} catch (NoSuchMethodException e){
e.printStackTrace();
} catch ( InvocationTargetException e){
e.printStackTrace();
} catch ( IllegalAccessException e){
e.printStackTrace();
}
}
public Class getViewer() {
return viewerC;
}
public void evalString(String rasmolScript){
try {
evalString.invoke(viewerO, rasmolScript);
} catch (Exception e){
e.printStackTrace();
}
}
public void openStringInline(String pdbFile){
try {
openStringInline.invoke(viewerO, pdbFile);
} catch (Exception e){
e.printStackTrace();
}
}
public void executeCmd(String rasmolScript){
try {
evalString.invoke(viewerO, rasmolScript);
} catch (Exception e){
e.printStackTrace();
}
}
final Dimension currentSize = new Dimension();
final Rectangle rectClip = new Rectangle();
public void paint(Graphics g) {
getSize(currentSize);
g.getClipBounds(rectClip);
//viewer.renderScreenImage(g, currentSize, rectClip);
try {
renderScreenImage.invoke(viewerO,g,currentSize,rectClip);
} catch (Exception e){
e.printStackTrace();
}
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
a2b2d367f79b2cd9c78f3251fcb2833c83b740e3
|
717f8e14760e63707f5302b96376004537dfc0c3
|
/common/mytms-common/src/main/java/org/mytms/common/util/EntityManagerUtil.java
|
b808043c6e88e8d9debcd9bdb37ade87dd8d0b75
|
[] |
no_license
|
bulong0721/mytms
|
0fe12ac2d78bb351cf30ce16b252c9d33f00b7a1
|
8e2c0219fd8c56ce5ccc7c258079b50eea80ff9f
|
refs/heads/master
| 2021-01-20T02:57:01.726460
| 2017-05-30T14:01:35
| 2017-05-30T14:01:35
| 89,471,867
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,808
|
java
|
package org.mytms.common.util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.jpa.EntityManagerFactoryUtils;
import org.springframework.orm.jpa.EntityManagerHolder;
import org.springframework.stereotype.Component;
import org.springframework.transaction.support.TransactionSynchronizationManager;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.PersistenceContext;
/**
* <p>Classe permettant de manipuler le EntityManager.</p>
*
* <p>Utilisée dans les tests pour ouvrir la session au début d'un test et la fermet à la fin</p>
*/
@Component
public class EntityManagerUtil {
@Autowired
private EntityManagerFactory entityManagerFactory;
@PersistenceContext
private EntityManager entityManager;
/**
* Mise en place du EntityManager
*/
public EntityManager openEntityManager() {
if (TransactionSynchronizationManager.hasResource(entityManagerFactory)) {
return ((EntityManagerHolder) TransactionSynchronizationManager.getResource(entityManagerFactory)).getEntityManager();
} else {
EntityManager entityManager = entityManagerFactory.createEntityManager();
TransactionSynchronizationManager.bindResource(entityManagerFactory, new EntityManagerHolder(entityManager));
return entityManager;
}
}
/**
* Suppression du EntityManager.
*/
public void closeEntityManager() {
if (TransactionSynchronizationManager.hasResource(entityManagerFactory)) {
EntityManagerHolder entityManagerHolder = (EntityManagerHolder) TransactionSynchronizationManager.unbindResource(entityManagerFactory);
EntityManagerFactoryUtils.closeEntityManager(entityManagerHolder.getEntityManager());
}
}
public EntityManager getEntityManager() {
return entityManager;
}
}
|
[
"bulong0721@163.com"
] |
bulong0721@163.com
|
5f9639b7cbed47acd802279fadb74ca0e20d7669
|
eed9d6187792f2a61932df552dcc332b61a12111
|
/src/main/java/com/synclock/Util.java
|
9a32e15552ddc84f5e27b42460eb30aabb7e7741
|
[] |
no_license
|
JaxYoun/Concurrent
|
83356decf11d0c9425fdc421548414e185f11003
|
2cc09b39b238a6b075272c0e314f148048432096
|
refs/heads/master
| 2021-01-02T08:58:17.275570
| 2017-09-11T04:54:17
| 2017-09-11T04:54:17
| 99,105,563
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,437
|
java
|
package com.synclock;
public class Util {
public static void main(String[] args) {
// objectLockTest();
// oneToOneTest();
classLock();
}
/**
* 多个线程公用同一对象,并调用对象的加锁方法,会导致对象被锁,
* 持有对象锁的线程才能调用对象的方法,其他线程只能阻塞
*/
public static void objectLockTest(){
Actor actor = new Actor();
ThreadA a = new ThreadA(actor);
ThreadB b = new ThreadB(actor);
ThreadC c = new ThreadC(actor);
a.start();
b.start();
c.start();
}
/**
* 多个线程公持有各自的对象,并调用对象的加锁方法,不会导致对象被锁,
* 由于各个线程独占各自的对象锁,线程能顺利调用各自对象的方法,个线程并行执行
*/
public static void oneToOneTest(){
Actor actorA = new Actor();
Actor actorB = new Actor();
Actor actorC = new Actor();
ThreadA a = new ThreadA(actorA);
ThreadB b = new ThreadB(actorB);
ThreadC c = new ThreadC(actorC);
a.start();
b.start();
c.start();
}
/**
*
*/
public static void classLock(){
Actor actorA = new Actor();
Actor actorB = new Actor();
Actor actorC = new Actor();
Actor actorD = new Actor();
ThreadA a = new ThreadA(actorA);
ThreadB b = new ThreadB(actorB);
ThreadC c = new ThreadC(actorC);
ThreadD d = new ThreadD(actorD);
d.start();
a.start();
b.start();
c.start();
}
}
|
[
"gao88jie@qq.com"
] |
gao88jie@qq.com
|
6f20f4abe2639b3b38c9db3b871e583b40cb7445
|
f6539477076aad7a37a18915531f6cae701d0484
|
/java/tags/agent-1.1.7/src/test/java/org/nhindirect/stagent/mail/WrappedMessageTest.java
|
e12a58687b898add25f9f8abf060fc5af599103a
|
[] |
no_license
|
ssavarala/nhin-d
|
bf3a4f4773479875972fb52f4b3aae434d7665f8
|
4208b12ba138d50c25d80849585d4b18dd5df491
|
refs/heads/master
| 2020-05-29T11:40:19.748872
| 2016-09-15T18:45:34
| 2016-09-15T18:45:34
| 67,622,081
| 1
| 1
| null | 2016-09-07T15:56:12
| 2016-09-07T15:56:12
| null |
UTF-8
|
Java
| false
| false
| 2,174
|
java
|
package org.nhindirect.stagent.mail;
import java.io.ByteArrayInputStream;
import java.util.Arrays;
import java.util.UUID;
import javax.mail.internet.MimeMessage;
import org.nhindirect.stagent.DefaultNHINDAgent;
import org.nhindirect.stagent.NHINDStandard;
import org.nhindirect.stagent.OutgoingMessage;
import org.nhindirect.stagent.utils.TestUtils;
import junit.framework.TestCase;
public class WrappedMessageTest extends TestCase
{
public void testCopyNHINDStandard_assertPromotedCCHeaders() throws Exception
{
Message msg = new Message();
String msgId = UUID.randomUUID().toString();
msg.addHeader(MailStandard.Headers.MessageID, msgId);
msg.addHeader(MailStandard.Headers.CC, "test@testdomain.com, gm2552@cerner.com");
msg.addHeader(MimeStandard.VersionHeader, "1.0");
msg.setContent("SomeText", "text/plain");
Message wrappedMessage = WrappedMessage.create(msg, NHINDStandard.MailHeadersUsed);
String ccHeader = wrappedMessage.getHeader(MailStandard.Headers.CC, ",");
assertNotNull(ccHeader);
assertEquals("test@testdomain.com, gm2552@cerner.com", ccHeader);
}
public void testCopyNHINDStandard_fromFullMessage_assertPromotedCCHeaders() throws Exception
{
String testMessage = TestUtils.readResource("CCTestMessage.txt");
Message msg = new Message(new ByteArrayInputStream(testMessage.getBytes("ASCII")));
Message wrappedMessage = WrappedMessage.create(msg, NHINDStandard.MailHeadersUsed);
String ccHeader = wrappedMessage.getHeader(MailStandard.Headers.CC, ",");
assertNotNull(ccHeader);
assertEquals("User1@Cerner.com, gm2552@cerner.com", ccHeader);
}
public void testCopyNHINDStandard_encyrptMessage_assertPromotedInvalidCCHeaders() throws Exception
{
DefaultNHINDAgent agent = TestUtils.getStockAgent(Arrays.asList(new String[]{"cerner.com"}));
String testMessage = TestUtils.readResource("CCTestMessage.txt");
OutgoingMessage SMIMEenvMessage = agent.processOutgoing(testMessage);
String ccHeader = SMIMEenvMessage.getMessage().getHeader(MailStandard.Headers.CC, ",");
assertNotNull(ccHeader);
assertEquals("User1@Cerner.com", ccHeader);
}
}
|
[
"marcusm@localhost"
] |
marcusm@localhost
|
054ab5326f3dca204070ee27b3f925abc131006d
|
139960e2d7d55e71c15e6a63acb6609e142a2ace
|
/mobile_app1/module549/src/main/java/module549packageJava0/Foo34.java
|
3ba2f5f5849bfce50b16ed65aacf0446c5e830e5
|
[
"Apache-2.0"
] |
permissive
|
uber-common/android-build-eval
|
448bfe141b6911ad8a99268378c75217d431766f
|
7723bfd0b9b1056892cef1fef02314b435b086f2
|
refs/heads/master
| 2023-02-18T22:25:15.121902
| 2023-02-06T19:35:34
| 2023-02-06T19:35:34
| 294,831,672
| 83
| 7
|
Apache-2.0
| 2021-09-24T08:55:30
| 2020-09-11T23:27:37
|
Java
|
UTF-8
|
Java
| false
| false
| 509
|
java
|
package module549packageJava0;
import java.lang.Integer;
public class Foo34 {
Integer int0;
Integer int1;
public void foo0() {
new module549packageJava0.Foo33().foo8();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
public void foo6() {
foo5();
}
public void foo7() {
foo6();
}
public void foo8() {
foo7();
}
}
|
[
"oliviern@uber.com"
] |
oliviern@uber.com
|
9f4ffae321647a1352c4e7b033e5f3d233cf3e5d
|
0f6a517ee2031bc5f4c4f04489433c361398dede
|
/javabatchexperiments/src/student/exceptions/StudentNotFoundException.java
|
871c8f42c9618aac17b6a9b44bd7aa8b49e52347
|
[] |
no_license
|
vineetsemwal/cg-javareact-2021-ls
|
30d21bf1a8d87d3cb93ef7f9b6229f951094a1b8
|
350f67f3c9c7c361b68a677bf14f3cd2e67117a0
|
refs/heads/master
| 2023-04-06T15:54:41.317120
| 2021-04-22T14:24:44
| 2021-04-22T14:24:44
| 335,256,122
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 172
|
java
|
package student.exceptions;
public class StudentNotFoundException extends RuntimeException{
public StudentNotFoundException(String msg){
super(msg);
}
}
|
[
"vineetsemwal82@gmail.com"
] |
vineetsemwal82@gmail.com
|
ab50ca42616f32e7387bb5f3aefdc68f293cbe43
|
a617e2219c65e730f71584dcb325b9ecce66fa59
|
/aserv-server/src/main/java/com/absir/aserv/system/admin/AdminServer.java
|
a85331be3b1bb3eb33d7108bedc4ab850cb33dec
|
[
"Apache-2.0"
] |
permissive
|
destmay/aserv
|
192c61b901f2f77eeda8e0bd6c7eb5c0303e51f6
|
186c21c3201b43d3e65f146c1956ef0640b65998
|
refs/heads/master
| 2021-01-01T06:00:43.670069
| 2017-07-11T10:26:39
| 2017-07-11T10:26:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,456
|
java
|
/**
* Copyright 2013 ABSir's Studio
* <p/>
* All right reserved
* <p/>
* Create on 2013-4-6 下午1:06:37
*/
package com.absir.aserv.system.admin;
import com.absir.aserv.crud.CrudSupply;
import com.absir.aserv.crud.ICrudSupply;
import com.absir.aserv.menu.MenuContextUtils;
import com.absir.aserv.system.bean.value.JeRoleLevel;
import com.absir.aserv.system.helper.HelperInput;
import com.absir.aserv.system.security.SecurityContext;
import com.absir.aserv.system.server.ServerResolverRedirect;
import com.absir.aserv.system.service.CrudService;
import com.absir.aserv.system.service.SecurityService;
import com.absir.aserv.system.service.statics.EntityStatics;
import com.absir.aserv.transaction.TransactionIntercepter;
import com.absir.bean.inject.value.Inject;
import com.absir.bean.inject.value.InjectType;
import com.absir.bean.inject.value.Value;
import com.absir.core.helper.HelperFileName;
import com.absir.core.kernel.KernelArray;
import com.absir.core.kernel.KernelCollection;
import com.absir.core.kernel.KernelString;
import com.absir.core.util.UtilAbsir;
import com.absir.orm.value.JoEntity;
import com.absir.server.exception.ServerException;
import com.absir.server.exception.ServerStatus;
import com.absir.server.in.InMethod;
import com.absir.server.in.InModel;
import com.absir.server.in.Input;
import com.absir.server.on.OnPut;
import com.absir.server.route.IRoute;
import com.absir.server.route.RouteAction;
import com.absir.server.route.RouteMapping;
import com.absir.server.route.returned.ReturnedResolverView;
import com.absir.server.value.*;
import com.absir.servlet.InputRequest;
import org.hibernate.exception.ConstraintViolationException;
import java.lang.reflect.Method;
import java.util.List;
import java.util.Map.Entry;
@Interceptors(AdminServer.Route.class)
public abstract class AdminServer {
@Value("admin.login.remember")
protected static boolean remember = true;
@Value("admin.login.level")
protected static int roleLevel = JeRoleLevel.ROLE_ADMIN.ordinal();
private static String route = "admin";
public static String getRoute() {
return route;
}
@Before
protected SecurityContext onAuthentication(Input input) throws Exception {
SecurityContext securityContext = SecurityService.ME.autoLogin("admin", true, JeRoleLevel.ROLE_ADMIN.ordinal(), input);
if (securityContext == null || !securityContext.getUser().isActivation()) {
ServerResolverRedirect.redirect(MenuContextUtils.getAdminRoute() + "login?redirect=" + MenuContextUtils.getSiteRoute() + input.getUri(), false, input);
}
return securityContext;
}
@After
protected void onView(OnPut onPut) {
if (onPut.getReturnedResolver() == null) {
RouteAction routeAction = onPut.getInput().getRouteAction();
if (routeAction != null) {
Class<?> returnType = routeAction.getRouteMethod().getMethod().getReturnType();
if (returnType == void.class || returnType == String.class) {
if (returnType == void.class || onPut.getReturnValue() == null) {
String routeView = routeAction.getRouteView();
if (routeView == null) {
routeView = HelperFileName.normalizeNoEndSeparator(new String(onPut.getInput().getRouteMatcher().getMapping()));
routeView = routeView.replaceFirst(route, "admin");
routeAction.setRouteView(routeView);
}
onPut.setReturnValue(routeView);
}
onPut.setReturnedResolver(ReturnedResolverView.ME);
}
}
}
}
@OnException(Exception.class)
protected void onException(Exception e, OnPut onPut) throws Exception {
Input input = onPut.getInput();
InModel model = input.getModel();
Throwable throwable = UtilAbsir.forCauseThrowable(e);
model.put("e", throwable);
if (throwable instanceof ConstraintViolationException) {
model.put("message", throwable.getCause().getMessage());
} else {
if (throwable.getClass() == ServerException.class) {
model.put("message", ((ServerException) throwable).getServerStatus());
} else {
throw e;
}
}
if (HelperInput.isAjax(input)) {
onPut.setReturnedResolver(ReturnedResolverView.ME, "admin/exception.ajax");
} else {
onPut.setReturnedResolver(ReturnedResolverView.ME, "admin/exception");
}
}
/**
* CRUDSupply统一入口
*/
protected ICrudSupply getCrudSupply(String entityName, Input input) {
ICrudSupply crudSupply = CrudService.ME.getCrudSupply(entityName);
if (crudSupply == null) {
throw new ServerException(ServerStatus.IN_404);
}
if (input != null) {
JoEntity joEntity = new JoEntity(entityName, crudSupply.getEntityClass(entityName));
input.setAttribute("joEntity", joEntity);
}
return crudSupply;
}
/**
* 选择授权
*/
protected void suggest(String entityName, ICrudSupply crudSupply, Input input) {
if (crudSupply instanceof CrudSupply || !(input instanceof InputRequest)) {
throw new ServerException(ServerStatus.IN_404);
}
if (((InputRequest) input).getSession(EntityStatics.suggestKey(entityName)) == null) {
throw new ServerException(ServerStatus.ON_DENIED);
}
}
public static class Route extends TransactionIntercepter implements IRoute {
@Inject(type = InjectType.Selectable)
private void setRoute(@Value(value = "admin.route") String route) {
AdminServer.route = route;
}
@Override
public void routeMapping(String name, Entry<Mapping, List<String>> mapping, Method method, List<String> parameterPathNames, List<String> mappings, List<InMethod> inMethods) {
RouteMapping.routeMapping(!KernelString.isEmpty(name) && name.equals("open") ? null : AdminServer.route, name, mapping, method, method.getName(), KernelString.implode(KernelArray.repeat('*', parameterPathNames.size()), '/'),
KernelCollection.toArray(parameterPathNames, String.class), mappings, inMethods);
}
}
}
|
[
"absir@qq.com"
] |
absir@qq.com
|
7541c15c11d07a32e87649e6e680a0f4a533f0b3
|
7466a4bccde9c9fe24db1955feae1a5ce67875b6
|
/0000000000000/boot-mongo-admin/java/src/main/java/com/shuogesha/platform/action/admin/JobLogAct.java
|
9c730d8000dc1d38ba37f1a89184fc89b713766e
|
[
"Apache-2.0"
] |
permissive
|
ppayaoxing/jun_product_center
|
88903baa2e03d1acb54715e07901e355563c3ff0
|
85b2086b12dd0fdd79a1a92b36117e31fc5ff79a
|
refs/heads/master
| 2023-08-14T15:35:12.274785
| 2021-08-30T15:29:31
| 2021-08-30T15:29:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,878
|
java
|
package com.shuogesha.platform.action.admin;
import static com.shuogesha.platform.web.mongo.SimplePage.cpn;
import java.io.UnsupportedEncodingException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.shuogesha.common.util.JsonResult;
import com.shuogesha.common.util.ResultCode;
import com.shuogesha.platform.entity.JobLog;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import com.shuogesha.platform.service.JobLogService;
import com.shuogesha.platform.web.mongo.Pagination;
@RestController
@RequestMapping("/api/jobLog/")
@Api(tags = "数据字典")
public class JobLogAct {
@GetMapping(value = "/list")
@ApiOperation(value = "获取列表", notes = "名称、分页、页码")
@ApiImplicitParams({ @ApiImplicitParam(name = "pageNo", value = "当前页", required = true, dataType = "int"),
@ApiImplicitParam(name = "pageSize", value = "每页显示", required = true, dataType = "int") })
public Object v_list(String name, Integer pageNo, Integer pageSize, HttpServletRequest request,
HttpServletResponse response) throws UnsupportedEncodingException {
Pagination pagination = jobLogService.getPage(name, cpn(pageNo), pageSize);
return new JsonResult(ResultCode.SUCCESS, pagination);
}
@GetMapping(value = "/get")
@ApiOperation(value = "根据id获取详细信息", notes = "获取单个详细信息")
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long")
public Object v_get(String id) {
JobLog bean = jobLogService.findById(id);
return new JsonResult(ResultCode.SUCCESS, bean);
}
@PostMapping(value = "/save")
@ApiOperation(value = "保存", notes = "保存")
public Object o_save(@RequestBody JobLog bean) {
jobLogService.save(bean);
return new JsonResult(ResultCode.SUCCESS, true);
}
@PostMapping(value = "/update")
@ApiOperation(value = "更新", notes = "更新")
public Object o_update(@RequestBody JobLog bean) {
jobLogService.update(bean);
return new JsonResult(ResultCode.SUCCESS, true);
}
@GetMapping(value = "/delete")
@ApiOperation(value = "批量删除", notes = "批量删除")
public Object o_delete(String[] ids) {
jobLogService.removeByIds(ids);
return new JsonResult(ResultCode.SUCCESS, true);
}
@Autowired
public JobLogService jobLogService;
}
|
[
"wujun728@163.com"
] |
wujun728@163.com
|
1cbbe5b7071b336f96792b8c1f6741c0c34bb176
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/IntroClassJava/dataset/median/c716ee619761838749589cbd08d5fd56830bff349039f8587e988a5b0cd6310e04844d8e0ee98c5ffee3275aa227bd2c92fcde0993637fcf3bfbd41a37378833/001/mutations/190/median_c716ee61_001.java
|
96d97e31b97853fccd44237857ca0d407f86455f
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,393
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class median_c716ee61_001 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
median_c716ee61_001 mainClass = new median_c716ee61_001 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj A = new IntObj (), B = new IntObj (), C = new IntObj ();
output +=
(String.format ("Pleaes enter 3 numbers separated by spaces > "));
A.value = scanner.nextInt ();
B.value = scanner.nextInt ();
C.value = scanner.nextInt ();
if (A.value > B.value && A.value < C.value) {
output += (String.format ("%d is the median\n", A.value));
}
if (A.value > C.value && A.value < B.value) {
output += (String.format ("%d is the median\n", A.value));
}
if (B.value > C.value && B.value < A.value) {
output += (String.format ("%d is the median\n", B.value));
}
if ((B.value) > (A.value)) && ((B.value) < (C.value) && B.value < C.value) {
output += (String.format ("%d is the median\n", B.value));
}
if (C.value > A.value && C.value < B.value) {
output += (String.format ("%d is the median\n", C.value));
}
if (C.value > B.value && C.value < A.value) {
output += (String.format ("%d is the median\n", C.value));
}
if (true)
return;;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
66be7969e254cb45e5c56443a6c7e22d0b0fb6dd
|
a5276aa546ba07aa9c0e3715fd797db611e85bdd
|
/src/Fuentes y JavaDoc/aon-ui-form/src/com/code/aon/ui/form/tree/controller/TreeNode.java
|
6b7e66a01f72c59466aef409010d182870b848b2
|
[] |
no_license
|
esle-elkartea/lankidetza00016
|
03116465e454857d9dcace0f9d0c22f616999afe
|
6f9a16e6179ccf330a605f89d9c472a44bacd3fb
|
refs/heads/master
| 2021-01-17T17:16:10.956738
| 2016-06-24T12:07:46
| 2016-06-24T12:07:46
| 61,881,706
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,816
|
java
|
package com.code.aon.ui.form.tree.controller;
import org.apache.myfaces.custom.tree2.TreeNodeBase;
import com.code.aon.common.tree.ITreeNodeTO;
/**
* TreeNode represents a node within a Tree.
*
* @author Consulting & Development. euke - 14-mar-2006
*/
public class TreeNode extends TreeNodeBase {
/** The object contained in the node */
private ITreeNodeTO to;
/** Indicates if the node has been executed */
private boolean deployed = false;
/**
* Creates a node with the especified identifier and the especified ITreeNodeTO.
*
* @param to the ITreeNode object
* @param identifier the identifier of the node
*/
public TreeNode(String identifier,ITreeNodeTO to) {
super();
setIdentifier( identifier);
setTo(to);
}
/**
* Gets the to.
*
* @return the to
*/
public ITreeNodeTO getTo() {
return to;
}
/**
* Sets the to.
*
* @param to the to
*/
public void setTo(ITreeNodeTO to) {
this.to = to;
setDescription(to.getLabel());
}
/**
* Gets the type.
*
* @return the type
*/
/* (non-Javadoc)
* @see org.apache.myfaces.custom.tree2.TreeNodeBase#getType()
*/
public String getType() {
return to.getType().toString();
}
/**
* Gets the description.
*
* @return the description
*/
/* (non-Javadoc)
* @see org.apache.myfaces.custom.tree2.TreeNodeBase#getDescription()
*/
@Override
public String getDescription() {
return to.getLabel();
}
/**
* Checks if is deployed.
*
* @return true, if is deployed
*/
public boolean isDeployed() {
return deployed ;
}
/**
* Sets the deployed.
*
* @param deployed the deployed
*/
public void setDeployed(boolean deployed) {
this.deployed = deployed;
}
}
|
[
"noreply@esle.eu"
] |
noreply@esle.eu
|
0d854001126883cdd5d841db03b8d3fd11f42308
|
712aedb07b0eeaaa9183297f95b80eb3d75b13a5
|
/ajaxcrud/src/main/java/cafe/jjdev/ajaxajaxcrud/member/service/MemberService.java
|
7cd0a593e2feaecae52fceb282752753b702c9e8
|
[] |
no_license
|
choiJH2013/ajaxcrud
|
bed4cebffe57d4c401bf762aefcea6a6004f3cc9
|
298be45a018c18cfb6d9fca9e21efb19ccc6a161
|
refs/heads/master
| 2020-05-29T13:19:42.992442
| 2019-05-29T05:44:49
| 2019-05-29T05:44:49
| 188,193,722
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,674
|
java
|
package cafe.jjdev.ajaxajaxcrud.member.service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import cafe.jjdev.ajaxajaxcrud.member.mapper.MemberMapper;
import cafe.jjdev.ajaxajaxcrud.member.vo.Member;
@Service
@Transactional
public class MemberService {
@Autowired private MemberMapper memberMapper;
// 리스트 LIMIT 몇번째 부터 보여줄지 사용할 값에 영향을 주기위한 값
public Map<String, Object> selectMemberList(int startPage){
//맵을 사용한다
Map<String, Object> map = new HashMap<String, Object>();
// 몇개를 보여줄 변수를 선언한다
final int ROW_PER_PAGE = 10;
//페이징에 사용할 변수 startRow:몇번째데이터 부터 보여줄지를 정함
int startRow = (startPage-1)*ROW_PER_PAGE;
System.out.println("startRow : " + startRow);
// 셀렉트쿼리문 몇번째부터 몇개를 보여줄 데이터 map에 담음
map.put("startRow", startRow);
map.put("rowPerPage", ROW_PER_PAGE);
List<Member> list = memberMapper.selectMemberList(map);
// 라스트 페이지를 구하기위해 데이터 총개수를 구함
int allCount = memberMapper.selectMemberCount();
System.out.println("allCount 총인원 : " + allCount);
// 마지막페이지
int lastPage = 0;
// 나눠서 나머지가 있을경우 예 : 105%10 은 10.5 이므로 완전히 나눌수없어서 나머지가 있다. 이경우 데이터가 남아있기에 페이지를 한장더 있어야 나머지 5개의 데이터를 볼 수 있다.
// ※ SQL은 알아서 마지막남은걸 보여주지만 / 마지막도 갯수를 알려줘야 하는것도 있다.
if(allCount % ROW_PER_PAGE == 0) {
lastPage = allCount/ROW_PER_PAGE;
}else {
lastPage = allCount/ROW_PER_PAGE+1;
}
// 맵에 담아서 뷰에필요한 값을 리턴한다.
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("startPage", startPage);
resultMap.put("list", list);
resultMap.put("lastPage", lastPage);
return resultMap;
}
// 추가
public int insertMember(Member member) {
return memberMapper.insertMember(member);
}
// 삭제
public int deleteMember(Member member) {
return memberMapper.deleteMember(member);
}
// 수정
public int updateMember(Member member) {
return memberMapper.updateMember(member);
}
}
|
[
"Administrator@MSDN-SPECIAL"
] |
Administrator@MSDN-SPECIAL
|
56945ff53ace795d4107a44b861c81707b063d24
|
425c6c4317bfdecf52ca7f2da3dd6574ea99981a
|
/benchmark/src/main/java/com/jackvanlightly/rabbittesttool/topology/model/consumers/AckMode.java
|
1e167322629d8400b5a1ba155e14e1a91b347e00
|
[
"MIT"
] |
permissive
|
isabella232/RabbitTestTool
|
d9656465aaf915a0567e9397c13df3604441a2d9
|
e1e1fb6d2b03e890f2f3d4afa255a8991ad35bee
|
refs/heads/master
| 2023-03-12T06:22:39.177587
| 2020-10-02T15:06:25
| 2020-10-02T15:06:25
| 326,470,844
| 0
| 0
|
MIT
| 2021-02-24T10:48:48
| 2021-01-03T18:10:31
| null |
UTF-8
|
Java
| false
| false
| 2,617
|
java
|
package com.jackvanlightly.rabbittesttool.topology.model.consumers;
import com.jackvanlightly.rabbittesttool.topology.TopologyException;
public class AckMode {
boolean manualAcks;
short consumerPrefetch;
boolean globalPrefetch;
int ackInterval;
int ackIntervalMs;
int requeueEveryNth;
public AckMode() {
}
public AckMode(boolean manualAcks,
short consumerPrefetch,
boolean globalPrefetch,
int ackInterval,
int ackIntervalMs,
int requeueEveryNth) {
this.manualAcks = manualAcks;
this.consumerPrefetch = consumerPrefetch;
this.globalPrefetch = globalPrefetch;
this.ackInterval = ackInterval;
this.ackIntervalMs = ackIntervalMs;
this.requeueEveryNth = requeueEveryNth;
if(requeueEveryNth > 0 && ackInterval > 1)
throw new TopologyException("Invalid AckMode: cannot use requeuing with an ack interval > 1");
}
public static AckMode withNoAck() {
return new AckMode();
}
public static AckMode withManualAcks(short consumerPrefetch,
boolean globalPrefetch,
int ackInterval,
int ackIntervalMs,
int requeueEveryNth) {
return new AckMode(true, consumerPrefetch, globalPrefetch, ackInterval, ackIntervalMs, requeueEveryNth);
}
public boolean isManualAcks() {
return manualAcks;
}
public void setManualAcks(boolean manualAcks) {
this.manualAcks = manualAcks;
}
public short getConsumerPrefetch() {
return consumerPrefetch;
}
public void setConsumerPrefetch(short consumerPrefetch) {
this.consumerPrefetch = consumerPrefetch;
}
public int getAckInterval() {
return ackInterval;
}
public void setAckInterval(int ackInterval) {
this.ackInterval = ackInterval;
}
public int getAckIntervalMs() {
return ackIntervalMs;
}
public void setAckIntervalMs(int ackIntervalMs) {
this.ackIntervalMs = ackIntervalMs;
}
public boolean isGlobalPrefetch() {
return globalPrefetch;
}
public void setGlobalPrefetch(boolean globalPrefetch) {
this.globalPrefetch = globalPrefetch;
}
public int getRequeueEveryNth() {
return requeueEveryNth;
}
public void setRequeueEveryNth(int requeueEveryNth) {
this.requeueEveryNth = requeueEveryNth;
}
}
|
[
"vanlightly@gmail.com"
] |
vanlightly@gmail.com
|
4914e89acd0c84cae534ddb74f88c5103af21820
|
d376366b7891db88b044b3a8bc7bd6feb4cd7c56
|
/r01fBusinessServices/r01fBusinessServicesCore/r01fBusinessServicesCoreSearchPersistence/r01fSearchLuceneClasses/src/main/java/r01f/persistence/lucene/LuceneDirectoryProvider.java
|
ddd8a560ba942e71dda71cd7b4c1b02fdc77630c
|
[] |
no_license
|
opendata-euskadi/java-utils
|
b3b7ec4a4e7f2d55832d572e8a12fdfe8dde2144
|
6f66dc26c2bd0dc136742e27a2214f2f2b43d938
|
refs/heads/master
| 2022-12-24T22:54:31.220835
| 2019-07-29T23:32:29
| 2019-07-29T23:32:29
| 133,263,797
| 0
| 0
| null | 2022-12-16T04:56:14
| 2018-05-13T18:28:24
|
Java
|
UTF-8
|
Java
| false
| false
| 6,435
|
java
|
package r01f.persistence.lucene;
import java.io.File;
import java.io.IOException;
import org.apache.lucene.store.Directory;
import org.apache.lucene.store.FSDirectory;
import r01f.types.Path;
/**
* @link Directory} provider
* <ul>
* <li>FileSystem</li>
* <li>JdbDirectory (only Lucene 4)</li>
* </ul>
*/
public class LuceneDirectoryProvider {
/////////////////////////////////////////////////////////////////////////////////////////
// FileSystem
/////////////////////////////////////////////////////////////////////////////////////////
/**
* Builds a {@link Directory} impl FileSystem based
* (lucene index is stored at a FileSystem location)
* @param indexFilesPath filesystem path where lucene index is stored
* @return
*/
public Directory provideFileSystemDirectory(final Path indexFilesPath) throws IOException {
return this.provideFileSystemDirectory(indexFilesPath.asString());
}
/**
* Builds a {@link Directory} impl FileSystem based
* (lucene index is stored at a FileSystem location)
* @param indexFilesPath filesystem path where lucene index is stored
* @return
*/
@SuppressWarnings("static-method")
public Directory provideFileSystemDirectory(final String indexFilesPath) throws IOException {
Directory outDir = FSDirectory.open(new File(indexFilesPath));
return outDir;
}
/////////////////////////////////////////////////////////////////////////////////////////
// Jdbc (only lucene 3)
/////////////////////////////////////////////////////////////////////////////////////////
// /**
// * Builds a {@link Directory} impl DB based
// * (lucene index is stored as DB tables)
// * <b>BEWARE!!</b>
// * This impl uses Commet lib for lucene that was DISCONTINUED by 2009
// * ... so it DOES NOT supports Lucene4
// * @param dataSource DB dataSoucre
// * @param dialect DB dialect (oracle/mySql)
// * @param tableName DB table name storing lucene indes
// * @return the {@link Directory} impl
// */
// public Directory provideJdbcDirectory(final DataSource dataSource,
// final Dialect dialect,
// final String tableName) throws IOException {
// return new LuceneJdbcDirectory(dataSource,
// dialect,
// tableName);
// }
// import java.io.IOException;
//
// import javax.inject.Inject;
// import javax.sql.DataSource;
//
// import org.apache.lucene.store.Directory;
// import org.apache.lucene.store.jdbc.JdbcDirectory;
// import org.apache.lucene.store.jdbc.JdbcDirectorySettings;
// import org.apache.lucene.store.jdbc.JdbcStoreException;
// import org.apache.lucene.store.jdbc.dialect.Dialect;
// import org.apache.lucene.store.jdbc.support.JdbcTable;
//
// public class LuceneJdbcDirectory
// extends JdbcDirectory {
// /////////////////////////////////////////////////////////////////////////////////////////
// // FIELDS
// /////////////////////////////////////////////////////////////////////////////////////////
// /**
// * DataSource
// */
// private DataSource _dataSource;
// /////////////////////////////////////////////////////////////////////////////////////////
// // CONSTRUCTORS
// /////////////////////////////////////////////////////////////////////////////////////////
// public LuceneJdbcDirectory(final DataSource dataSource,final Dialect dialect,
// final String tableName) {
// super(dataSource, dialect, tableName);
// }
// public LuceneJdbcDirectory(final DataSource dataSource,final Dialect dialect,final JdbcDirectorySettings settings,
// final String tableName) {
// super(dataSource, dialect, settings, tableName);
// }
// public LuceneJdbcDirectory(final DataSource dataSource,final JdbcDirectorySettings settings,
// final String tableName) throws JdbcStoreException {
// super(dataSource, settings, tableName);
// }
// public LuceneJdbcDirectory(final DataSource dataSource,
// final JdbcTable table) {
// super(dataSource, table);
// }
// public LuceneJdbcDirectory(final DataSource dataSource,
// final String tableName)throws JdbcStoreException {
// super(dataSource, tableName);
// }
// /////////////////////////////////////////////////////////////////////////////////////////
// // METODOS OVERRIDEN
// /////////////////////////////////////////////////////////////////////////////////////////
// @Override
// public String[] listAll() throws IOException {
// return super.list(); // Simply delegate
// }
// }
// import org.apache.lucene.store.Directory;
// import org.apache.lucene.store.jdbc.JdbcDirectory;
// import org.apache.lucene.store.jdbc.dialect.Dialect;
// import org.apache.lucene.store.jdbc.dialect.MySQLDialect;
// import org.apache.lucene.store.jdbc.dialect.OracleDialect;
//
// import r01f.exceptions.Throwables;
// import r01f.types.enums.Enums;
//
// public class LuceneJdbcDirectoryDialectProvider {
// /////////////////////////////////////////////////////////////////////////////////////////
// //
// /////////////////////////////////////////////////////////////////////////////////////////
// /**
// * Returs a {@link Dialect} to be used with {@link JdbcDirectory}
// * @param dialect
// * @return
// */
// public Dialect provideDialect(final LuceneJdbcDirectoryDialect dialect) {
// Dialect outDialect = null;
// switch(dialect) {
// case ORACLE:
// outDialect = new OracleDialect();
// break;
// case MYSQL:
// outDialect = new MySQLDialect();
// break;
// default:
// outDialect = new MySQLDialect();
// break;
// }
// return outDialect;
// }
// /**
// * Returns a {@link Dialect} to be used with {@link JdbcDirectory}
// * @param dialectStr
// * @return
// */
// public Dialect provideDialect(final String dialectStr) {
// LuceneJdbcDirectoryDialect dialect = Enums.of(LuceneJdbcDirectoryDialect.class)
// .fromName(dialectStr);
// if (dialect == null) throw new IllegalArgumentException(Throwables.message("The Lucene JdbcDirectory Dialect provider '{}' is NOT valid. The valid options are {}",
// dialectStr,LuceneJdbcDirectoryDialect.values()));
// return this.provideDialect(dialect);
// }
// /////////////////////////////////////////////////////////////////////////////////////////
// //
// /////////////////////////////////////////////////////////////////////////////////////////
// private enum LuceneJdbcDirectoryDialect {
// ORACLE,
// MYSQL;
// }
// }
}
|
[
"futuretelematics@gmail.com"
] |
futuretelematics@gmail.com
|
4d903aa062541f6d21eab525b05b951a710f38a5
|
6f70c0131012323b284a83471a362c8234f1adcb
|
/other_app_source_code/OlaCabs_V3.3.07/com/google/android/m4b/maps/p044k/LocationRequestCreator.java
|
8917510a1474bac4ee5d89e9d29d52564670d45c
|
[] |
no_license
|
iamrahulyadav/iwms
|
83e51b561b0d14aa069e843e95b4885004746e53
|
4e51c8f16b3f63e4ccc42d5c7918d8c86538655a
|
refs/heads/master
| 2020-04-04T18:29:04.455657
| 2015-10-19T19:00:21
| 2015-10-19T19:00:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,711
|
java
|
package com.google.android.m4b.maps.p044k;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import android.support.v4.internal.view.SupportMenu;
import com.google.android.m4b.maps.p037h.SafeParcelReader;
import com.google.android.m4b.maps.p037h.SafeParcelWriter;
import com.olacabs.customer.utils.Constants;
import com.sothree.slidinguppanel.p086a.R.R;
import org.apache.http.HttpStatus;
/* renamed from: com.google.android.m4b.maps.k.f */
public final class LocationRequestCreator implements Creator<LocationRequest> {
public final /* synthetic */ Object createFromParcel(Parcel parcel) {
return LocationRequestCreator.m10554a(parcel);
}
public final /* bridge */ /* synthetic */ Object[] newArray(int i) {
return new LocationRequest[i];
}
public static LocationRequest m10554a(Parcel parcel) {
boolean z = false;
int a = SafeParcelReader.m10468a(parcel);
int i = HttpStatus.SC_PROCESSING;
long j = Constants.MILLIS_IN_AN_HOUR;
long j2 = 600000;
long j3 = Long.MAX_VALUE;
int i2 = Integer.MAX_VALUE;
float f = 0.0f;
int i3 = 0;
while (parcel.dataPosition() < a) {
int readInt = parcel.readInt();
switch (SupportMenu.USER_MASK & readInt) {
case R.SlidingUpPanelLayout_umanoShadowHeight /*1*/:
i = SafeParcelReader.m10478f(parcel, readInt);
break;
case R.SlidingUpPanelLayout_umanoParalaxOffset /*2*/:
j = SafeParcelReader.m10480h(parcel, readInt);
break;
case R.SlidingUpPanelLayout_umanoFadeColor /*3*/:
j2 = SafeParcelReader.m10480h(parcel, readInt);
break;
case R.SlidingUpPanelLayout_umanoFlingVelocity /*4*/:
z = SafeParcelReader.m10475c(parcel, readInt);
break;
case R.SlidingUpPanelLayout_umanoDragView /*5*/:
j3 = SafeParcelReader.m10480h(parcel, readInt);
break;
case R.SlidingUpPanelLayout_umanoOverlay /*6*/:
i2 = SafeParcelReader.m10478f(parcel, readInt);
break;
case R.SlidingUpPanelLayout_umanoClipPanel /*7*/:
f = SafeParcelReader.m10481i(parcel, readInt);
break;
case Constants.MILLIS_IN_A_SECOND /*1000*/:
i3 = SafeParcelReader.m10478f(parcel, readInt);
break;
default:
SafeParcelReader.m10472b(parcel, readInt);
break;
}
}
if (parcel.dataPosition() == a) {
return new LocationRequest(i3, i, j, j2, z, j3, i2, f);
}
throw new SafeParcelReader.SafeParcelReader("Overread allowed size end=" + a, parcel);
}
static void m10555a(LocationRequest locationRequest, Parcel parcel) {
int a = SafeParcelWriter.m10487a(parcel);
SafeParcelWriter.m10492a(parcel, 1, locationRequest.f7448a);
SafeParcelWriter.m10492a(parcel, (int) Constants.MILLIS_IN_A_SECOND, locationRequest.m10552b());
SafeParcelWriter.m10493a(parcel, 2, locationRequest.f7449b);
SafeParcelWriter.m10493a(parcel, 3, locationRequest.f7450c);
SafeParcelWriter.m10501a(parcel, 4, locationRequest.f7451d);
SafeParcelWriter.m10493a(parcel, 5, locationRequest.f7452e);
SafeParcelWriter.m10492a(parcel, 6, locationRequest.f7453f);
SafeParcelWriter.m10491a(parcel, 7, locationRequest.f7454g);
SafeParcelWriter.m10488a(parcel, a);
}
}
|
[
"rakesh.cherakkara@gmail.com"
] |
rakesh.cherakkara@gmail.com
|
decf08e0f3cd87670c9da41e070949a513d4f8e6
|
038ee6b20cae51169a2ed4ed64a7b8e99b5cbaad
|
/schemaOrgGson/src/org/kyojo/schemaorg/m3n4/gson/pending/container/LegislationJurisdictionDeserializer.java
|
76e566325fd7dc00b59cab7b96b1360405b692db
|
[
"Apache-2.0"
] |
permissive
|
nagaikenshin/schemaOrg
|
3dec1626781913930da5585884e3484e0b525aea
|
4c9d6d098a2741c2dc2a814f1c708ee55c36e9a8
|
refs/heads/master
| 2021-06-25T04:52:49.995840
| 2019-05-12T06:22:37
| 2019-05-12T06:22:37
| 134,319,974
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,163
|
java
|
package org.kyojo.schemaorg.m3n4.gson.pending.container;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Map;
import org.kyojo.gson.JsonDeserializationContext;
import org.kyojo.gson.JsonDeserializer;
import org.kyojo.gson.JsonElement;
import org.kyojo.gson.JsonParseException;
import org.kyojo.schemaorg.m3n4.pending.impl.LEGISLATION_JURISDICTION;
import org.kyojo.schemaorg.m3n4.pending.Container.LegislationJurisdiction;
import org.kyojo.schemaorg.m3n4.gson.DeserializerTemplate;
public class LegislationJurisdictionDeserializer implements JsonDeserializer<LegislationJurisdiction> {
public static Map<String, Field> fldMap = new HashMap<>();
@Override
public LegislationJurisdiction deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context)
throws JsonParseException {
if(jsonElement.isJsonPrimitive()) {
return new LEGISLATION_JURISDICTION(jsonElement.getAsString());
}
return DeserializerTemplate.deserializeSub(jsonElement, type, context,
new LEGISLATION_JURISDICTION(), LegislationJurisdiction.class, LEGISLATION_JURISDICTION.class, fldMap);
}
}
|
[
"nagai@nagaikenshin.com"
] |
nagai@nagaikenshin.com
|
5673db26e3a2b93e0c5be3485c860c6e074577b9
|
2c4b70a3ed83a43d05e9d8935c605e3830928617
|
/src/org/omg/PortableServer/LIFESPAN_POLICY_ID.java
|
471e441d5bd8251131479abf533dab69e4a1d382
|
[] |
no_license
|
rocky-peng/jdk8-sourcecode-read
|
5a6b911a2a0a6288a781a41745e5a8e124e7672c
|
7dc48fa88cb2b23e45fc976354ad254f6b155ec0
|
refs/heads/master
| 2021-11-15T05:59:08.895902
| 2021-08-13T02:03:29
| 2021-08-13T02:03:29
| 220,774,468
| 4
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 473
|
java
|
package org.omg.PortableServer;
/**
* org/omg/PortableServer/LIFESPAN_POLICY_ID.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u144/9417/corba/src/share/classes/org/omg/PortableServer/poa.idl
* Friday, July 21, 2017 10:09:19 PM PDT
*/
public interface LIFESPAN_POLICY_ID
{
/**
* The value representing LIFESPAN_POLICY_ID.
*/
public static final int value = (int)(17L);
}
|
[
"rocky.peng@qq.com"
] |
rocky.peng@qq.com
|
da2ab43bef529b749fcfaa410ff931d937fc4fd8
|
cacd87f8831b02e254d65c5e86d48264c7493d78
|
/pc/financesystem/financesystem/src/main/java/com/manji/financesystem/service/AccountInfoService.java
|
f31cbb2f16c2f0b1a201b2431c0719ca210c299e
|
[] |
no_license
|
lichaoqian1992/beautifulDay
|
1a5a30947db08d170968611068673d2f0b626eb2
|
44e000ecd47099dc5342ab8a208edea73602760b
|
refs/heads/master
| 2021-07-24T22:48:33.067359
| 2017-11-03T09:06:15
| 2017-11-03T09:06:15
| 108,791,908
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 380
|
java
|
package com.manji.financesystem.service;
import com.manji.financesystem.responseData.AccountInfoResult;
import java.util.List;
/**
* Created by pudding on 2017-1-17.
* 账户信息Service
*/
public interface AccountInfoService {
/**
* 获取账号汇总信息
* @return
*/
public List<AccountInfoResult> getAccountInfo();
}
|
[
"1015598423@qq.com"
] |
1015598423@qq.com
|
f8a10ceb9355ccefd1ebbba7967b6dab5dbcb88e
|
9f394e1e92907e53aa08d704a74ce4ffe0274af1
|
/gs/src/main/java/org/mmocore/gameserver/model/chat/chatfilter/ChatMsg.java
|
bfe0a8bdbfd99813f5272da2b9f12b7d7ebad7c5
|
[] |
no_license
|
forzec/l-all
|
47371658728deb59c22fef1b2f9d180cf874c8d4
|
fb98c98b2bc0fe8f99d8ba9d38286388818bf768
|
refs/heads/master
| 2021-01-10T11:39:14.017480
| 2016-04-03T12:47:18
| 2016-04-03T12:47:18
| 54,064,490
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 683
|
java
|
package org.mmocore.gameserver.model.chat.chatfilter;
import org.mmocore.gameserver.network.l2.components.ChatType;
/**
* Запись о сообщении в чат, для сохранения в списке последних сообщений игрока, используемом фильтрами чата.
*
* @author G1ta0
*/
public class ChatMsg
{
public final ChatType chatType;
public final int recipient;
public final int msgHashcode;
public final int time;
public ChatMsg(ChatType chatType, int recipient, int msgHashcode, int time)
{
this.chatType = chatType;
this.recipient = recipient;
this.msgHashcode = msgHashcode;
this.time = time;
}
}
|
[
"yurii.barbeu@gmail.com"
] |
yurii.barbeu@gmail.com
|
2158b58d2070384ac247a5316e2588bc10cf9727
|
07d350ac583063b22dc49a6105c3f916d8e6ed1f
|
/src/main/java/io/paratek/seeker/net/Packet.java
|
41aa3ee7d18e662baa6e0b9dc8ea94f68ec29a58
|
[] |
no_license
|
jjordantb/seeker
|
729c5c4d802a66d12e9261206f42d83182e5dc32
|
ab40b872fdda8937b5b9e1d4684a985262969f5c
|
refs/heads/master
| 2020-04-12T12:35:32.027952
| 2018-12-20T04:38:02
| 2018-12-20T04:38:02
| 162,496,525
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 410
|
java
|
package io.paratek.seeker.net;
import java.io.Serializable;
public class Packet implements Serializable {
private final int op;
private final Serializable payload;
public Packet(int op, Serializable payload) {
this.op = op;
this.payload = payload;
}
public int getOp() {
return op;
}
public Serializable getPayload() {
return payload;
}
}
|
[
"jordan.florchinger@uleth.ca"
] |
jordan.florchinger@uleth.ca
|
7deca1cbc3844672c5c60defc56be88ea809a4de
|
95f2fdb228c3021634c573769ec9e46e26549391
|
/premiun-springJPA/jpacore/jpashop/src/main/java/jpacore/jpashop/controller/ItemController.java
|
a4a88c424836b21367fc64f779fc2c54e7646628
|
[] |
no_license
|
Yumin-Kim/Java-SpringStudy
|
aafeb50042f3ea9af7de30e58d356ae22b332281
|
72a4cd76a55febd1bd842687ac80a3db24214454
|
refs/heads/master
| 2023-08-25T17:47:45.667803
| 2021-10-20T14:41:30
| 2021-10-20T14:41:30
| 380,800,790
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,494
|
java
|
package jpacore.jpashop.controller;
import jpacore.jpashop.domain.Item;
import jpacore.jpashop.domain.items.Book;
import jpacore.jpashop.service.ItemSerrvice;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import java.util.Arrays;
import java.util.List;
@Controller
@RequiredArgsConstructor
public class ItemController {
private final ItemSerrvice itemSerrvice;
@GetMapping("/items/new")
public String createForm(Model model) {
model.addAttribute("form", new BookForm());
return "items/createItemForm";
}
@PostMapping("/items/new")
public String create(BookForm bookForm) {
Book book = new Book();
book.setName(bookForm.getName());
book.setAuthor(bookForm.getAuthor());
book.setIsbn(bookForm.getIsbn());
book.setStackQuantity(bookForm.getStockQuantity());
book.setPrice(bookForm.getPrice());
itemSerrvice.saveItem(book);
return "redirect:/";
}
@GetMapping("/items")
public String list(Model model) {
model.addAttribute("items", itemSerrvice.findItems());
return "items/itemList";
}
@GetMapping("items/{itemId}/edit")
public String updateItemForm(@PathVariable("itemId") Long id, Model model) {
Book item = (Book) itemSerrvice.findOne(id); // 캐스팅하는 방법은 유연하지 못한 방법
BookForm form = new BookForm();
form.setAuthor(item.getAuthor());
form.setIsbn(item.getIsbn());
form.setPrice(item.getPrice());
form.setId(item.getId());
form.setStockQuantity(item.getStackQuantity());
model.addAttribute("form", form);
return "items/updateItemForm";
}
@PostMapping("items/{itemId}/edit")
public String updateItem(@PathVariable("itemId") Long id,@ModelAttribute("form") BookForm form) {
Book book = new Book();
book.setAuthor(form.getAuthor());
book.setIsbn(form.getIsbn());
book.setPrice(form.getPrice());
book.setId(id);
book.setStackQuantity(form.getStockQuantity());
itemSerrvice.saveItem(book);
return "redirect:/items";
}
}
|
[
"dbals0@naver.com"
] |
dbals0@naver.com
|
71f9e494c7db215e584ae4d66d3a66223508513c
|
42786befcc2abf65082812618f1bb8596c7fb7e4
|
/src/main/java/jpuppeteer/cdp/client/entity/page/Viewport.java
|
d4d11e933399ce3f3e3b607db819b8652bd429d5
|
[
"Apache-2.0"
] |
permissive
|
sunshinex/jpuppeteer
|
3e30fcd434d7ddedabd0d9eeb35620707cd5bd87
|
0b60d1800e31decf309311671ee5f9262ea22ca5
|
refs/heads/2.0
| 2023-07-20T14:27:19.565745
| 2023-07-12T17:32:48
| 2023-07-12T17:32:48
| 203,903,640
| 33
| 7
|
Apache-2.0
| 2023-07-12T17:34:26
| 2019-08-23T01:49:32
|
Java
|
UTF-8
|
Java
| false
| false
| 1,758
|
java
|
package jpuppeteer.cdp.client.entity.page;
/**
* Viewport for capturing screenshot.
*/
public class Viewport {
/**
* X offset in device independent pixels (dip).
*/
private java.math.BigDecimal x;
/**
* Y offset in device independent pixels (dip).
*/
private java.math.BigDecimal y;
/**
* Rectangle width in device independent pixels (dip).
*/
private java.math.BigDecimal width;
/**
* Rectangle height in device independent pixels (dip).
*/
private java.math.BigDecimal height;
/**
* Page scale factor.
*/
private java.math.BigDecimal scale;
public void setX (java.math.BigDecimal x) {
this.x = x;
}
public java.math.BigDecimal getX() {
return this.x;
}
public void setY (java.math.BigDecimal y) {
this.y = y;
}
public java.math.BigDecimal getY() {
return this.y;
}
public void setWidth (java.math.BigDecimal width) {
this.width = width;
}
public java.math.BigDecimal getWidth() {
return this.width;
}
public void setHeight (java.math.BigDecimal height) {
this.height = height;
}
public java.math.BigDecimal getHeight() {
return this.height;
}
public void setScale (java.math.BigDecimal scale) {
this.scale = scale;
}
public java.math.BigDecimal getScale() {
return this.scale;
}
public Viewport(java.math.BigDecimal x, java.math.BigDecimal y, java.math.BigDecimal width, java.math.BigDecimal height, java.math.BigDecimal scale) {
this.x = x;
this.y = y;
this.width = width;
this.height = height;
this.scale = scale;
}
public Viewport() {
}
}
|
[
"jarvis.xu@vipshop.com"
] |
jarvis.xu@vipshop.com
|
fa6fd1dab11c4b0ab1446c5f263dae8d24d3018b
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project25/src/main/java/org/gradle/test/performance25_3/Production25_208.java
|
ce1360e4dd61cd2aa199ad32f8a044e2c26f96ec
|
[] |
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
| 305
|
java
|
package org.gradle.test.performance25_3;
public class Production25_208 extends org.gradle.test.performance12_3.Production12_208 {
private final String property;
public Production25_208() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
b57098dc9ae786f10f92d30a7e2dfd3cffae7b90
|
fff8f77f810bbd5fb6b4e5f7a654568fd9d3098d
|
/src/main/java/androidx/core/app/ComponentActivity.java
|
40f528c8a03b797a1961a65f45ef8aae51e0c9ce
|
[] |
no_license
|
TL148/gorkiy
|
b6ac8772587e9e643d939ea399bf5e7a42e89f46
|
da8fbd017277cf72020c8c800326954bb1a0cee3
|
refs/heads/master
| 2021-05-21T08:24:39.286900
| 2020-04-03T02:57:49
| 2020-04-03T02:57:49
| 252,618,229
| 0
| 0
| null | 2020-04-03T02:54:39
| 2020-04-03T02:54:39
| null |
UTF-8
|
Java
| false
| false
| 2,292
|
java
|
package androidx.core.app;
import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import androidx.collection.SimpleArrayMap;
import androidx.core.view.KeyEventDispatcher;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LifecycleRegistry;
import androidx.lifecycle.ReportFragment;
public class ComponentActivity extends Activity implements LifecycleOwner, KeyEventDispatcher.Component {
private SimpleArrayMap<Class<? extends ExtraData>, ExtraData> mExtraDataMap = new SimpleArrayMap<>();
private LifecycleRegistry mLifecycleRegistry = new LifecycleRegistry(this);
@Deprecated
public static class ExtraData {
}
@Deprecated
public void putExtraData(ExtraData extraData) {
this.mExtraDataMap.put(extraData.getClass(), extraData);
}
/* access modifiers changed from: protected */
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
ReportFragment.injectIfNeededIn(super);
}
/* access modifiers changed from: protected */
public void onSaveInstanceState(Bundle bundle) {
this.mLifecycleRegistry.markState(Lifecycle.State.CREATED);
super.onSaveInstanceState(bundle);
}
@Deprecated
public <T extends ExtraData> T getExtraData(Class<T> cls) {
return (ExtraData) this.mExtraDataMap.get(cls);
}
public Lifecycle getLifecycle() {
return this.mLifecycleRegistry;
}
public boolean superDispatchKeyEvent(KeyEvent keyEvent) {
return super.dispatchKeyEvent(keyEvent);
}
public boolean dispatchKeyShortcutEvent(KeyEvent keyEvent) {
View decorView = getWindow().getDecorView();
if (decorView == null || !KeyEventDispatcher.dispatchBeforeHierarchy(decorView, keyEvent)) {
return super.dispatchKeyShortcutEvent(keyEvent);
}
return true;
}
public boolean dispatchKeyEvent(KeyEvent keyEvent) {
View decorView = getWindow().getDecorView();
if (decorView == null || !KeyEventDispatcher.dispatchBeforeHierarchy(decorView, keyEvent)) {
return KeyEventDispatcher.dispatchKeyEvent(this, decorView, this, keyEvent);
}
return true;
}
}
|
[
"itaysontesterlab@gmail.com"
] |
itaysontesterlab@gmail.com
|
277684dcfce85909b3b46d624bbb9dd26c866687
|
fc7c1e3e88775217e89245c31e7a333e4c75c38f
|
/water-java-core/src/main/java/jp/gr/java_conf/kgd/library/water/java/core/value/ObjectColor4.java
|
a03c241867191ad2d6333c14d8ce74036552aadf
|
[
"MIT"
] |
permissive
|
t-kgd/library-water
|
a76bbee205802bd25fd27404cc58e3c6f26d51fc
|
e19822eb5d7a0414d1056852ea3ae90e1e24467b
|
refs/heads/master
| 2016-09-11T02:58:39.515546
| 2015-07-09T08:01:38
| 2015-07-09T08:01:38
| 38,787,571
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,466
|
java
|
/*
* The MIT License
*
* Copyright 2015 misakura.
*
* 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 jp.gr.java_conf.kgd.library.water.java.core.value;
/**
* 4次元の色を表すインターフェース。
*
* インターフェース上にミューテータは存在しませんが、状態が不変であるかどうかは実装依存です。
*
* @author misakura
* @param <T> 任意の型。
*/
public interface ObjectColor4<T> {
/**
* この色の赤成分にあたる値を返す。
*
* 得られる値が防御的にコピーされたものであるかどうかは実装依存です。
*
* @return 赤成分の値。
*/
T getRed();
/**
* この色の緑成分にあたる値を返す。
*
* 得られる値が防御的にコピーされたものであるかどうかは実装依存です。
*
* @return 緑成分の値。
*/
T getGreen();
/**
* この色の青成分にあたる値を返す。
*
* 得られる値が防御的にコピーされたものであるかどうかは実装依存です。
*
* @return 青成分の値。
*/
T getBlue();
/**
* この色の透明度にあたる値を返す。
*
* 得られる値が防御的にコピーされたものであるかどうかは実装依存です。
*
* @return 透明度の値。
*/
T getAlpha();
}
|
[
"t-kgd@users.noreply.github.com"
] |
t-kgd@users.noreply.github.com
|
48328e3a3e0447d06d73abd6091b71834cae2418
|
696e35ccdf167c3f6b1a7f5458406d3bb81987c9
|
/chrome/android/java/src/org/chromium/chrome/browser/toolbar/bottom/ScrollingBottomViewResourceFrameLayout.java
|
0200eb7f9255610662f280b6a7940f4b61b28f87
|
[
"BSD-3-Clause"
] |
permissive
|
mgh3326/iridium-browser
|
064e91a5e37f4e8501ea971483bd1c76297261c3
|
e7de6a434d2659f02e94917be364a904a442d2d0
|
refs/heads/master
| 2023-03-30T16:18:27.391772
| 2019-04-24T02:14:32
| 2019-04-24T02:14:32
| 183,128,065
| 0
| 0
|
BSD-3-Clause
| 2019-11-30T06:06:02
| 2019-04-24T02:04:51
| null |
UTF-8
|
Java
| false
| false
| 3,872
|
java
|
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.toolbar.bottom;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.MotionEvent;
import org.chromium.chrome.browser.compositor.layouts.eventfilter.EdgeSwipeHandler;
import org.chromium.chrome.browser.contextualsearch.SwipeRecognizer;
import org.chromium.chrome.browser.widget.ViewResourceFrameLayout;
import org.chromium.ui.resources.dynamics.ViewResourceAdapter;
/**
* A {@link ViewResourceFrameLayout} that specifically handles redraw of the top shadow of the view
* it represents.
*/
public class ScrollingBottomViewResourceFrameLayout extends ViewResourceFrameLayout {
/** A cached rect to avoid extra allocations. */
private final Rect mCachedRect = new Rect();
/** The height of the shadow sitting above the bottom view in px. */
private int mTopShadowHeightPx;
/** A swipe recognizer for handling swipe gestures. */
private SwipeRecognizer mSwipeRecognizer;
public ScrollingBottomViewResourceFrameLayout(Context context, AttributeSet attrs) {
super(context, attrs);
}
/**
* Set the swipe handler for this view and set {@link #isClickable()} to true to allow motion
* events to be intercepted by the view itself.
* @param handler A handler for swipe events on this view.
*/
public void setSwipeDetector(EdgeSwipeHandler handler) {
mSwipeRecognizer = new SwipeRecognizer(getContext());
mSwipeRecognizer.setSwipeHandler(handler);
// TODO(mdjones): This line of code makes it impossible to scroll through the bottom
// toolbar. If the user accidentally swipes up on this view, the scroll no longer goes
// through to the web contents. We should figure out how to make this work while also
// supporting the toolbar swipe behavior.
setClickable(true);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent event) {
boolean handledEvent = false;
if (mSwipeRecognizer != null) handledEvent = mSwipeRecognizer.onTouchEvent(event);
return handledEvent || super.onInterceptTouchEvent(event);
}
@Override
public boolean onTouchEvent(MotionEvent event) {
boolean handledEvent = false;
if (mSwipeRecognizer != null) handledEvent = mSwipeRecognizer.onTouchEvent(event);
return handledEvent || super.onTouchEvent(event);
}
@Override
protected ViewResourceAdapter createResourceAdapter() {
return new ViewResourceAdapter(this) {
@Override
public void onCaptureStart(Canvas canvas, Rect dirtyRect) {
mCachedRect.set(dirtyRect);
if (mCachedRect.intersect(0, 0, getWidth(), mTopShadowHeightPx)) {
canvas.save();
// Clip the canvas to only the section of the dirty rect that contains the top
// shadow of the view.
canvas.clipRect(mCachedRect);
// Clear the shadow so redrawing does not make it progressively darker.
canvas.drawColor(0, PorterDuff.Mode.CLEAR);
canvas.restore();
}
super.onCaptureStart(canvas, dirtyRect);
}
};
}
/**
* @param height The height of the view's top shadow in px.
*/
public void setTopShadowHeight(int height) {
mTopShadowHeightPx = height;
}
/**
* @return The height of the view's top shadow in px.
*/
public int getTopShadowHeight() {
return mTopShadowHeightPx;
}
}
|
[
"commit-bot@chromium.org"
] |
commit-bot@chromium.org
|
0a27e82a18e4c3ba8ec0c0748ea122700f9ae8a8
|
2c6e2ba03eb71ca45fe690ff6e4586f6e2fa0f17
|
/material/apks/banco/sources/com/google/android/gms/common/util/zzy.java
|
593a6feb1b3565bcfdfd949a3ffeccb1f3afed5a
|
[] |
no_license
|
lcrcastor/curso-mobile-2019
|
3088a196139b3e980ed6e09797a0bbf5efb6440b
|
7585fccb6437a17c841772c1d9fb0701d6c68042
|
refs/heads/master
| 2023-04-06T21:46:32.333236
| 2020-10-30T19:47:54
| 2020-10-30T19:47:54
| 308,680,747
| 0
| 1
| null | 2023-03-26T06:57:57
| 2020-10-30T16:08:31
|
Java
|
UTF-8
|
Java
| false
| false
| 1,043
|
java
|
package com.google.android.gms.common.util;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.pm.PackageManager.NameNotFoundException;
import android.util.Log;
import com.google.android.gms.common.zzf;
import com.google.android.gms.internal.zzsi;
public final class zzy {
@TargetApi(19)
public static boolean zzb(Context context, int i, String str) {
return zzsi.zzcr(context).zzg(i, str);
}
public static boolean zzf(Context context, int i) {
if (!zzb(context, i, "com.google.android.gms")) {
return false;
}
try {
return zzf.zzbz(context).zzb(context.getPackageManager(), context.getPackageManager().getPackageInfo("com.google.android.gms", 64));
} catch (NameNotFoundException unused) {
if (Log.isLoggable("UidVerifier", 3)) {
Log.d("UidVerifier", "Package manager can't find google play services package, defaulting to false");
}
return false;
}
}
}
|
[
"luis@MARK-2.local"
] |
luis@MARK-2.local
|
86e38dba25a63e56f22c6290bc19884e790e7cdb
|
61cf3109eaf4561e071d93f9daf0d3cf9155ca9f
|
/src/com/rbt/service/impl/RolerightService.java
|
29d1304dbae5d9d3d73ea9405607c68e8051fe28
|
[] |
no_license
|
haoouwen/epf
|
b620fe05c93db178a122cfef778d31c036a2a822
|
abe0f1ed564f33dcf766591c5f9b04ce2b5e8094
|
refs/heads/master
| 2021-01-19T13:46:10.278247
| 2017-08-20T10:40:12
| 2017-08-20T10:40:12
| 100,859,509
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,410
|
java
|
/*
* Package:com.rbt.servie.impl
* FileName: RolerightService.java
*/
package com.rbt.service.impl;
import it.unimi.dsi.fastutil.Hash;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rbt.dao.IRolerightDao;
import com.rbt.model.Roleright;
import com.rbt.service.IRolerightService;
/**
* @function 功能 角色权限业务实现类
* @author 创建人 QJY
* @date 创建日期 Jun 28, 2014 4:03:16 PM
*/
@Service
public class RolerightService extends GenericService<Roleright, String>
implements IRolerightService {
IRolerightDao rolerightDao;
@Autowired
public RolerightService(IRolerightDao rolerightDao) {
super(rolerightDao);
this.rolerightDao = rolerightDao;
}
/*
* (non-Javadoc)
*
* @see com.rbt.service.IRolerightService#getRolerightMenuList(java.util.Map)
*/
public List getRolerightMenuList(Map map) {
return this.rolerightDao.getRolerightMenuList(map);
}
/*
* (non-Javadoc)
*
* @see com.rbt.service.IRolerightService#getRolerightLogsList(java.util.Map)
*/
public List getRolerightLogsList(Map map) {
return rolerightDao.getRolerightLogsList(map);
}
/**
* @author:HXM
* @date:Jun 4, 20143:05:43 PM
* @param:syscode标记权限操作类型
* @param:权限操作字符串
* @Description:获得权限操作集合,用于添加 角色 时用于分配用户能添加那些指定的操作权限
*/
public List getOperRightList(String syscode,String oper_right){
List<Map<String, String>> allOperList = new ArrayList<Map<String, String>>();
List<Map<String, String>> returnList = new ArrayList<Map<String, String>>();
//获得菜单列表
Map map = new HashMap();
map.put("syscode", syscode);
allOperList = this.rolerightDao.getList(map);
String [] operList =null;
//all为超级管理员(系统初始化管理员)
if("all".equals(oper_right)){
return allOperList;
}else{
operList=oper_right.replace(" ", "").split(",");
}
for (int i = 0; i < operList.length; i++) {
String oper_right_x = operList[i];
for (Map<String, String> ob : allOperList) {
String oper_right_y = ob.get("right_id").toString();
if (oper_right_x.equals(oper_right_y)) {
returnList.add(ob);
}
}
}
return returnList;
}
}
|
[
"Administrator@USER-20170608NM"
] |
Administrator@USER-20170608NM
|
38132687bb5e2a41dfe3d5be5fa178d496c2b1cf
|
6a123b6cf379a555cc68e92d0d640380133d0ea5
|
/custom/gpcommerce/gpcommercecore/testsrc/com/gp/commerce/core/services/impl/GPDefaultStoreProductServiceTest.java
|
b94232bef65cc086b989ef6bdeef142d5d6bece1
|
[] |
no_license
|
Myzenvei/Docs
|
c9357221bc306dc754b322350fc676dee1972e39
|
45809ee928669142073354e1126e7444dedd4730
|
refs/heads/master
| 2020-06-30T17:23:52.981874
| 2019-07-15T09:39:19
| 2019-07-15T09:39:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,238
|
java
|
package com.gp.commerce.core.services.impl;
import static org.mockito.Mockito.when;
import java.util.Collections;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.springframework.test.util.ReflectionTestUtils;
import com.gp.commerce.core.dao.GPStoreProductDao;
import com.gp.commerce.core.model.StoreProductModel;
import de.hybris.bootstrap.annotations.UnitTest;
@UnitTest
public class GPDefaultStoreProductServiceTest {
@InjectMocks
GPDefaultStoreProductService gpStoreProductService = new GPDefaultStoreProductService();
@Mock
private StoreProductModel storeProduct;
@Mock
private GPStoreProductDao storeProductDao;
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
ReflectionTestUtils.setField(gpStoreProductService, "storeProductDao", storeProductDao);
Mockito.when(storeProductDao.getStoreProducts()).thenReturn(Collections.singletonList(storeProduct));
}
@Test
public void testRemoveSelectedWishlists1() {
Assert.assertTrue(gpStoreProductService.getStoreProducts().get(0).equals(storeProduct));
}
}
|
[
"shikhgupta@deloitte.com"
] |
shikhgupta@deloitte.com
|
7b44f507afda9450d376ce9e17b567b1f05876cc
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Lang/9/org/apache/commons/lang3/concurrent/MultiBackgroundInitializer_initializerNames_319.java
|
2c8289ee2b4355cec66ae17df52212040faa7012
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 3,013
|
java
|
org apach common lang3 concurr
special link background initi backgroundiniti implement deal
multipl background initi task
similar purpos link background initi backgroundiniti
limit singl background initi task
manag arbitrari number code background initi backgroundiniti object
execut wait complet initi
applic perform multipl initi task
run parallel depend
take care manag code executor servic executorservic share
code background initi backgroundiniti object respons
applic bother detail
typic usag scenario code multi background initi multibackgroundiniti
creat instanc option pass pre configur
code executor servic executorservic altern code multi background initi multibackgroundiniti
creat temporari code executor servic executorservic delet initi
complet
creat special link background initi backgroundiniti object
initi task perform add code
multi background initi multibackgroundiniti
link add initi addiniti string background initi backgroundiniti method
initi ad call link start method
access result object produc code
background initi backgroundiniti object need call link method
object return access result object creat
initi store inform except
occur
code multi background initi multibackgroundiniti start special control task
start code background initi backgroundiniti object ad instanc
initi start check initi
code executor servic executorservic set code
executor servic executorservic run background task
current code executor servic executorservic code multi background initi multibackgroundiniti
share initi
easiest deal manag
code executor servic executorservic extern code executor servic executorservic
provid creat temporari code executor servic executorservic
capabl execut background task parallel destroi
end background process
altern extern code executor servic executorservic provid
construct time call
link set extern executor setexternalexecutor executor servic executorservic method
background task schedul extern code executor servic executorservic
strong import note strong extern code
executor servic executorservic number thread manag servic
larg deadlock happen
scenario code multi background initi multibackgroundiniti start task
start regist code background initi backgroundiniti object wait
complet instanc singl thread code executor servic executorservic
background task execut task creat
code multi background initi multibackgroundiniti wait forev
version
multi background initi multibackgroundiniti
return set name code background initi backgroundiniti
object manag code multi background initi multibackgroundiniti
unmodifi set name manag code
background initi backgroundiniti object
set string initi name initializernam
collect unmodifi set unmodifiableset initi kei set keyset
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
77e8ed13d37ecd189b842ad829d9f5f19be3f163
|
1ebd71e2179be8a2baec90ff3f326a3f19b03a54
|
/hybris/bin/modules/commerce-services/commerceservices/testsrc/de/hybris/platform/commerceservices/strategies/impl/user/AlwaysNegativeUserPropertyMatchingStrategyTest.java
|
f2ae5a425fa5ee454e0d9fcac75f4e62ea322767
|
[] |
no_license
|
shaikshakeeb785/hybrisNew
|
c753ac45c6ae264373e8224842dfc2c40a397eb9
|
228100b58d788d6f3203333058fd4e358621aba1
|
refs/heads/master
| 2023-08-15T06:31:59.469432
| 2021-09-03T09:02:04
| 2021-09-03T09:02:04
| 402,680,399
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,055
|
java
|
/*
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*/
package de.hybris.platform.commerceservices.strategies.impl.user;
import static org.mockito.BDDMockito.given;
import de.hybris.bootstrap.annotations.UnitTest;
import de.hybris.platform.commerceservices.customer.CustomerService;
import de.hybris.platform.core.model.user.CustomerModel;
import de.hybris.platform.core.model.user.UserModel;
import java.util.Optional;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
/**
* JUnit test suite for {@link AlwaysNegativeUserPropertyMatchingStrategy}
*/
@UnitTest
public class AlwaysNegativeUserPropertyMatchingStrategyTest
{
private static final String CUSTOMER_ID = "6a2a41a3-c54c-4ce8-a2d2-0324e1c32a23";
private AlwaysNegativeUserPropertyMatchingStrategy strategy;
@Mock
private CustomerModel customer;
@Mock
private CustomerService customerService;
@Before
public void setUp()
{
MockitoAnnotations.initMocks(this);
strategy = new AlwaysNegativeUserPropertyMatchingStrategy();
}
@Test
public void getCustomerByPropertyShouldReturnEmptyOptional()
{
given(customerService.getCustomerByCustomerId(CUSTOMER_ID)).willReturn(customer);
final Optional<CustomerModel> userOptional = strategy.getUserByProperty(CUSTOMER_ID, CustomerModel.class);
Assert.assertTrue(userOptional.isEmpty());
}
@Test
public void getUserByPropertyShouldReturnEmptyOptional()
{
given(customerService.getCustomerByCustomerId(CUSTOMER_ID)).willReturn(customer);
final Optional<UserModel> userOptional = strategy.getUserByProperty(CUSTOMER_ID, UserModel.class);
Assert.assertTrue(userOptional.isEmpty());
}
@Test(expected = IllegalArgumentException.class)
public void shouldThrowExceptionIfNullProperty()
{
strategy.getUserByProperty(null, UserModel.class);
}
@Test(expected = IllegalArgumentException.class)
public void shouldThrowExceptionIfNullClazz()
{
strategy.getUserByProperty(CUSTOMER_ID, null);
}
}
|
[
"sauravkr82711@gmail.com"
] |
sauravkr82711@gmail.com
|
7f9cea202acf0e678ffef1ea2cbca2dcb76ef6c2
|
4b981edcab83368f318ac91160b69470264409d7
|
/jingwei-webconsole/src/main/java/com/taobao/jingwei/webconsole/model/JingweiApplierMetaType.java
|
0f2c44fa1716b7d4b6480728680114882394ea73
|
[] |
no_license
|
alileohe/jingwei-all
|
07b076dd1efc1e792ca94318b1aad11ea792f59c
|
0e23f4b2276e9ad11b5544779529f85f87e2676d
|
refs/heads/master
| 2021-09-15T19:54:23.058837
| 2018-06-09T14:35:43
| 2018-06-09T14:35:59
| null | 0
| 0
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 4,469
|
java
|
package com.taobao.jingwei.webconsole.model;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.alibaba.common.lang.StringUtil;
import com.taobao.jingwei.common.node.applier.EventFilterNode;
import com.taobao.jingwei.common.node.applier.EventFilterNode.ColumnFilterConditionNode;
import com.taobao.jingwei.common.node.applier.MetaApplierNode;
import com.taobao.jingwei.webconsole.common.JingweiWebConsoleConstance;
public class JingweiApplierMetaType {
private static final Log log = LogFactory.getLog(JingweiWebConsoleConstance.JINGWEI_LOG);
private String appMetaTopic;
private String appShardColumn;
private boolean appSplitTxEvent;
private int appMaxEventSize;
private long appSendTimeOut;
private boolean appEnableColumnFilter;
private String appColumnFilterString;
private String appCompressionType;
private boolean appInsert;
private boolean appUpdate;
private boolean appDelete;
// ·ÏÆúÊôÐÔ
private boolean multiThread;
private int queueCapacity;
private int maxThreadCount;
public MetaApplierNode getMetaApplierNode() {
MetaApplierNode node = new MetaApplierNode();
node.setMetaTopic(this.appMetaTopic);
node.setShardColumn(this.appShardColumn);
node.setSplitTxEvent(this.appSplitTxEvent);
node.setMaxEventSize(this.appMaxEventSize);
node.setSendTimeOut(this.appSendTimeOut);
node.setEnableColumnfilter(this.appEnableColumnFilter);
node.setCompressionType(this.appCompressionType);
EventFilterNode filter = new EventFilterNode();
filter.setIncludeInsert(this.appInsert);
filter.setIncludeUpdate(this.appUpdate);
filter.setIncludeDelete(this.appDelete);
try {
if (this.appEnableColumnFilter && StringUtil.isNotBlank(this.appColumnFilterString)) {
Map<String, HashMap<String, ColumnFilterConditionNode>> condition = JingweiModelHelper
.columnFilterStringToJson(this.appColumnFilterString);
filter.setConditions(condition);
}
node.setEventFilterData(filter.toJSONString());
} catch (Exception e) {
log.error("½âÎöEvent Filter Node³ö´í", e);
}
return node;
}
public String getAppMetaTopic() {
return appMetaTopic;
}
public void setAppMetaTopic(String appMetaTopic) {
this.appMetaTopic = appMetaTopic;
}
public String getAppShardColumn() {
return appShardColumn;
}
public void setAppShardColumn(String appShardColumn) {
this.appShardColumn = appShardColumn;
}
public boolean isAppSplitTxEvent() {
return this.appSplitTxEvent;
}
public void setAppSplitTxEvent(boolean appSplitTxEvent) {
this.appSplitTxEvent = appSplitTxEvent;
}
public int getAppMaxEventSize() {
return appMaxEventSize;
}
public void setAppMaxEventSize(int appMaxEventSize) {
this.appMaxEventSize = appMaxEventSize;
}
public boolean isMultiThread() {
return multiThread;
}
public void setMultiThread(boolean multiThread) {
this.multiThread = multiThread;
}
public int getQueueCapacity() {
return queueCapacity;
}
public void setQueueCapacity(int queueCapacity) {
this.queueCapacity = queueCapacity;
}
public int getMaxThreadCount() {
return maxThreadCount;
}
public void setMaxThreadCount(int maxThreadCount) {
this.maxThreadCount = maxThreadCount;
}
public long getAppSendTimeOut() {
return appSendTimeOut;
}
public void setAppSendTimeOut(long appSendTimeOut) {
this.appSendTimeOut = appSendTimeOut;
}
public boolean isAppEnableColumnFilter() {
return appEnableColumnFilter;
}
public void setAppEnableColumnFilter(boolean appEnableColumnFilter) {
this.appEnableColumnFilter = appEnableColumnFilter;
}
public String getAppColumnFilterString() {
return appColumnFilterString;
}
public void setAppColumnFilterString(String appColumnFilterString) {
this.appColumnFilterString = appColumnFilterString;
}
public String getAppCompressionType() {
return appCompressionType;
}
public void setAppCompressionType(String appCompressionType) {
this.appCompressionType = appCompressionType;
}
public boolean isAppInsert() {
return appInsert;
}
public void setAppInsert(boolean appInsert) {
this.appInsert = appInsert;
}
public boolean isAppUpdate() {
return appUpdate;
}
public void setAppUpdate(boolean appUpdate) {
this.appUpdate = appUpdate;
}
public boolean isAppDelete() {
return appDelete;
}
public void setAppDelete(boolean appDelete) {
this.appDelete = appDelete;
}
}
|
[
"diwayou@qq.com"
] |
diwayou@qq.com
|
07d4d1370329542dbb3a5bd6e72fe4f41aa9c5ac
|
47bf37af89e6db89791e73a5e1a5ee743be52912
|
/src/main/java/lottery/domains/content/dao/UserSysMessageDao.java
|
8600d0636cd8c96ac8ff4de84723ab0b9d89bac0
|
[] |
no_license
|
changsha136/testAdminManager
|
814d9dec3f4dd5e054cd6b140a3be4195e8fad0e
|
c062d3a785bc876e333a5775e899e3d863dca388
|
refs/heads/master
| 2022-12-24T09:29:53.222876
| 2019-06-27T15:43:00
| 2019-06-27T15:43:01
| 194,052,599
| 2
| 0
| null | 2022-12-16T04:28:46
| 2019-06-27T08:14:54
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 289
|
java
|
package lottery.domains.content.dao;
import java.util.List;
import lottery.domains.content.entity.UserSysMessage;
public interface UserSysMessageDao {
boolean add(UserSysMessage entity);
List<UserSysMessage> listUnread(int userId);
boolean updateUnread(int userId, int[] ids);
}
|
[
"11111111"
] |
11111111
|
abec17f6dc376846172bc4dab32fd2d47d418058
|
3c9049e9cf84aaf14ae04ec249542a0223d40fd2
|
/src/main/java/edu/wpi/first/outlineviewer/view/dialog/AddBooleanArrayDialog.java
|
c41a419a91cf693dba7cc92c1c761568df45d2fa
|
[
"BSD-3-Clause"
] |
permissive
|
wpilibsuite/OutlineViewer
|
e7e93fcd91f4ee987a3c38f8fbfc5074959d41fa
|
4b302efc00c429f02a14d67214465686edcd5481
|
refs/heads/main
| 2021-06-09T22:23:32.578139
| 2021-01-30T19:11:27
| 2021-01-30T19:11:27
| 58,487,664
| 9
| 19
|
NOASSERTION
| 2021-01-30T19:11:29
| 2016-05-10T19:21:57
|
Java
|
UTF-8
|
Java
| false
| false
| 1,395
|
java
|
package edu.wpi.first.outlineviewer.view.dialog;
import com.google.common.primitives.Booleans;
import edu.wpi.first.outlineviewer.view.IndexedValue;
import edu.wpi.first.outlineviewer.view.ToggleSwitchListCell;
import java.util.stream.Collectors;
import javafx.scene.control.ListCell;
import javafx.scene.control.ListView;
import javafx.util.Callback;
/**
* Dialog for adding boolean arrays to network tables.
*/
public class AddBooleanArrayDialog extends AddEntryArrayDialog<IndexedValue<Boolean>, boolean[]> {
public AddBooleanArrayDialog() {
super("Boolean Array");
}
@Override
@SuppressWarnings({"PMD.UseVarargs", "PMD.AvoidInstantiatingObjectsInLoops"})
public void setInitial(boolean[] initialValues) {
list.getItems().clear();
int index = 0;
for (Boolean value : initialValues) {
list.getItems().add(new IndexedValue<>(index++, value));
}
}
@Override
protected IndexedValue<Boolean> getDefaultItem() {
return new IndexedValue<>(list.getItems().size() + 1, false);
}
@Override
protected Callback<ListView<IndexedValue<Boolean>>, ListCell<IndexedValue<Boolean>>>
getCellFactory() {
return __ -> new ToggleSwitchListCell();
}
@Override
protected boolean[] getData() {
return Booleans.toArray(list.getItems()
.stream()
.map(IndexedValue::getValue)
.collect(Collectors.toList()));
}
}
|
[
"johnson.peter@gmail.com"
] |
johnson.peter@gmail.com
|
d9ef0cd5c97070de1c337d7c752816ae38845e24
|
8a54596667e3e732804d92c2490cf0914334ddaf
|
/src/main/java/com/std/certi/core/JsonUtils.java
|
a135e51a6dac80e43ba53e69b034ed81f32a40f8
|
[] |
no_license
|
13110992819/std-certi
|
eac9286057cb2a148c576514ca0d5b35094db5ff
|
8004eaaf360349e4c476db5043685edc79b5615c
|
refs/heads/master
| 2020-03-08T20:31:39.018392
| 2017-07-26T03:16:07
| 2017-07-26T03:16:07
| 128,384,299
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 883
|
java
|
package com.std.certi.core;
import com.google.gson.Gson;
import com.std.certi.common.JsonValidator;
public class JsonUtils {
public static <T> T json2Bean(String json, Class<T> clazz) {
boolean isJson = new JsonValidator().validate(json);
if (!isJson) {
throw new ValidException("830xxx", "json格式不正确");
}
T t = null;
try {
Gson gson = new Gson();
t = (T) gson.fromJson(json, clazz);
} catch (Exception e) {
throw new ValidException("830xxx", "json2Bean不正确:" + e.getMessage());
}
return t;
}
public static String object2Json(Object bean) {
Gson gson = new Gson();
return gson.toJson(bean);
}
public static String string2Json(String key, String value) {
return "{\"" + key + "\":\"" + value + "\"}";
}
}
|
[
"pyez1158@163.com"
] |
pyez1158@163.com
|
c7c0563f7cc30a4176e8e8b581f9ccb80f6a9df6
|
5979994b215fabe125cd756559ef2166c7df7519
|
/aimir-fep/src/main/java/com/aimir/fep/bypass/dlms/DLMSTag.java
|
2ec1ddd974d0c74d4559db3c5421ccfa702d5e1f
|
[] |
no_license
|
TechTinkerer42/Haiti
|
91c45cb1b784c9afc61bf60d43e1d5623aeba888
|
debaea96056d1d4611b79bd846af8f7484b93e6e
|
refs/heads/master
| 2023-04-28T23:39:43.176592
| 2021-05-03T10:49:42
| 2021-05-03T10:49:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,870
|
java
|
//
// --------------------------------------------------------------------------
// Gurux Ltd
//
//
//
// Filename: $HeadURL$
//
// Version: $Revision$,
// $Date$
// $Author$
//
// Copyright (c) Gurux Ltd
//
//---------------------------------------------------------------------------
//
// DESCRIPTION
//
// This file is a part of Gurux Device Framework.
//
// Gurux Device Framework is Open Source software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; version 2 of the License.
// Gurux Device Framework is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// More information of Gurux products: http://www.gurux.org
//
// This code is licensed under the GNU General Public License v2.
// Full text may be retrieved at http://www.gnu.org/licenses/gpl-2.0.txt
//---------------------------------------------------------------------------
package com.aimir.fep.bypass.dlms;
/**
DLMSTag is a key value pair to retrieve or set extra communication parameters,
when establishing a connection to the DLMS/COSEM metering device.
*/
public class DLMSTag
{
private byte[] privateData;
private int privateID;
/**
Identification of the key valprivatedataue.
*/
public final int getID()
{
return privateID;
}
public final void setID(int value)
{
privateID = value;
}
/**
The value of the key value.
*/
public final byte[] getData()
{
return privateData;
}
public final void setData(byte[] value)
{
privateData = value;
}
}
|
[
"marsr0913@nuritelecom.com"
] |
marsr0913@nuritelecom.com
|
f879a798f6f769176fc825fcef13cd6c52296cf6
|
872aeeefa6444fca80ad41e2f8ca3b4a8ec87bb4
|
/src/main/java/com/firecode/datastructuretest/concurrent/WaitTest.java
|
d23f150d89db34e5144048c9daa485e606627b3d
|
[] |
no_license
|
firechiang/data-structure-test
|
0b24b456452845a485cac25f4ba6b12f94110f09
|
badb98a2b673f3babff37ce507e7f141776b6517
|
refs/heads/master
| 2022-06-19T23:04:50.998266
| 2020-06-30T03:35:53
| 2020-06-30T03:35:53
| 161,981,794
| 0
| 0
| null | 2022-05-25T06:33:51
| 2018-12-16T08:26:04
|
Java
|
UTF-8
|
Java
| false
| false
| 1,578
|
java
|
package com.firecode.datastructuretest.concurrent;
import java.util.concurrent.TimeUnit;
/**
* wait,notify,Thread.sleep 简单测试
* wait 使线程无限等待(注意:在等待的过程中会释放锁,其它线程可访问)
* notify 唤醒线程继续执行(注意:在唤醒的过程中不会释放锁)
* Thread.sleep 使线程有限等待(注意:在等待的过程中不会释放锁,其它线程不可访问)
*
* 一个对象或类某个同步方法被锁住以后,其它函数是否可调用,如果其它函数是同步函数则,不可调用,,如果是非同步函数则,可调用。
* 注意:一个对象或类只有一把锁
* @author JIANG
*/
public class WaitTest {
static Lock lock = new Lock();
public static void main(String[] args) throws InterruptedException {
new Thread(()-> {
//lock.sleep();
lock.waitX(true);
}).start();
TimeUnit.SECONDS.sleep(1);
new Thread(()-> {
lock.normal();
lock.waitX(false);
lock.sleep();
}).start();
}
public static class Lock {
public synchronized void sleep() {
try {
TimeUnit.SECONDS.sleep(100000);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.err.println("sleep执行了");
}
public synchronized void waitX(boolean isWait) {
if(isWait){
try {
this.wait();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
System.err.println("waitX执行了");
}
public void normal() {
System.err.println("normal执行了");
}
}
}
|
[
"chiang-fire@outlook.com"
] |
chiang-fire@outlook.com
|
20a3400956c8efb985d4f05e69920df517863747
|
4cfda4f1b4d7703e1b460359012082c158103476
|
/miliconvert/xsmt/branches/xsmt-1.0.0/org.miliconvert.xsmt.tmodel/src/org/miliconvert/xsmt/tmodel/functions/Library.java
|
de3e917047a7bc579be99da1bdd84a7fce3109e0
|
[] |
no_license
|
opensourcejavadeveloper/military_xml_project_miliconvert
|
e62dee54499fdb8abaa76a9d44ed97ace19dc887
|
bb0276970c243ec3acc07fd4b255673d6d7dd080
|
refs/heads/master
| 2022-01-10T18:11:39.021413
| 2018-08-20T12:45:02
| 2018-08-20T12:45:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,462
|
java
|
/* ***** BEGIN LICENSE BLOCK *****
* Version: GPL 2.0
*
* The contents of this file are subject to the GNU General Public
* License Version 2 or later (the "GPL").
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Initial Developer of the Original Code is
* BT Global Services / Etat français Ministre de la Défense
*
* ***** END LICENSE BLOCK ***** */
package org.miliconvert.xsmt.tmodel.functions;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
/**
* Lists avalaible transformation functions
*
* The list is still hardcoded for now.
*
* TODO: think more about user functions...
*
* @author tom
*
*/
public class Library {
public static final String PF = "org.miliconvert.xsmt.functions."; //$NON-NLS-1$
private static Map<FunctionCategory, List<FunctionDescriptor>> idx;
static {
idx = new HashMap<FunctionCategory, List<FunctionDescriptor>>();
// ajouter les FunctionsExtensions
FunctionExtensionParser functionExtensionParser = new FunctionExtensionParser();
for (FunctionExtension functionExtension : functionExtensionParser
.getFunctionExtensionParsed()) {
putFunc(functionExtension.getFunctionCategory(), functionExtension
.getFunctionName(), functionExtension.getFunctionComment(),
functionExtension.getFunctionClass(), functionExtension
.getMandatoryProperties());
}
}
private static void putFunc(FunctionCategory cat, String name,
String comment, String sClass, String mandatoryP) {
System.out.println("Adding function: cat: " + cat + ", name:" + name); //$NON-NLS-1$ //$NON-NLS-2$
String[] mp = new String[0];
if (mandatoryP != null) {
mp = mandatoryP.split(";"); //$NON-NLS-1$
}
putFunc(cat, name, comment, sClass, mp);
}
private static void putFunc(FunctionCategory cat, String name,
String comment, String sClass, String[] mandatoryProperties) {
FunctionDescriptor fd = new FunctionDescriptor(name, "", sClass, cat, //$NON-NLS-1$
mandatoryProperties);
List<FunctionDescriptor> l = idx.get(cat);
if (l == null) {
l = new LinkedList<FunctionDescriptor>();
idx.put(cat, l);
}
l.add(fd);
}
public static Map<FunctionCategory, List<FunctionDescriptor>> list() {
return idx;
}
}
|
[
"you@example.com"
] |
you@example.com
|
877bae5b8d5381f4cc003f76bc5f7c503f495194
|
c2b6d703c832c23e15a8642b0e587184c49e90e9
|
/gulimall-member/src/main/java/com/pluto/gulimall/member/controller/MemberReceiveAddressController.java
|
f882fd75105b2bade895e7fc31f9190be1fd432a
|
[] |
no_license
|
superlyzh/gulimaill
|
2c403f0c65e95348308294093cdde2aba766adb2
|
e1866ae9d828465b5b5ad6bb930d46e1c16a8c23
|
refs/heads/main
| 2023-02-20T16:17:09.514666
| 2021-01-25T00:43:45
| 2021-01-25T00:43:45
| 330,070,006
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,564
|
java
|
package com.pluto.gulimall.member.controller;
import java.util.Arrays;
import java.util.Map;
//import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.pluto.gulimall.member.entity.MemberReceiveAddressEntity;
import com.pluto.gulimall.member.service.MemberReceiveAddressService;
import com.pluto.common.utils.PageUtils;
import com.pluto.common.utils.R;
/**
* 会员收货地址
*
* @author pluto
* @email 1776309879@qq.com
* @date 2021-01-18 14:14:25
*/
@RestController
@RequestMapping("member/memberreceiveaddress")
public class MemberReceiveAddressController {
@Autowired
private MemberReceiveAddressService memberReceiveAddressService;
/**
* 列表
*/
@RequestMapping("/list")
// @RequiresPermissions("member:memberreceiveaddress:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = memberReceiveAddressService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
// @RequiresPermissions("member:memberreceiveaddress:info")
public R info(@PathVariable("id") Long id){
MemberReceiveAddressEntity memberReceiveAddress = memberReceiveAddressService.getById(id);
return R.ok().put("memberReceiveAddress", memberReceiveAddress);
}
/**
* 保存
*/
@RequestMapping("/save")
// @RequiresPermissions("member:memberreceiveaddress:save")
public R save(@RequestBody MemberReceiveAddressEntity memberReceiveAddress){
memberReceiveAddressService.save(memberReceiveAddress);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
// @RequiresPermissions("member:memberreceiveaddress:update")
public R update(@RequestBody MemberReceiveAddressEntity memberReceiveAddress){
memberReceiveAddressService.updateById(memberReceiveAddress);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
// @RequiresPermissions("member:memberreceiveaddress:delete")
public R delete(@RequestBody Long[] ids){
memberReceiveAddressService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}
|
[
"l"
] |
l
|
74e9549ed0700d28de847ac81c9634ecd23af20c
|
6482753b5eb6357e7fe70e3057195e91682db323
|
/org/apache/logging/log4j/core/net/MimeMessageBuilder.java
|
25b7c546e02efae42074203defa5bb8f139b181f
|
[] |
no_license
|
TheShermanTanker/Server-1.16.3
|
45cf9996afa4cd4d8963f8fd0588ae4ee9dca93c
|
48cc08cb94c3094ebddb6ccfb4ea25538492bebf
|
refs/heads/master
| 2022-12-19T02:20:01.786819
| 2020-09-18T21:29:40
| 2020-09-18T21:29:40
| 296,730,962
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,544
|
java
|
package org.apache.logging.log4j.core.net;
import javax.mail.internet.AddressException;
import java.nio.charset.StandardCharsets;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.internet.InternetAddress;
import javax.mail.Address;
import javax.mail.Session;
import javax.mail.internet.MimeMessage;
import org.apache.logging.log4j.core.util.Builder;
public class MimeMessageBuilder implements Builder<MimeMessage> {
private final MimeMessage message;
public MimeMessageBuilder(final Session session) {
this.message = new MimeMessage(session);
}
public MimeMessageBuilder setFrom(final String from) throws MessagingException {
final InternetAddress address = parseAddress(from);
if (null != address) {
this.message.setFrom((Address)address);
}
else {
try {
this.message.setFrom();
}
catch (Exception ex) {
this.message.setFrom((Address)null);
}
}
return this;
}
public MimeMessageBuilder setReplyTo(final String replyTo) throws MessagingException {
final InternetAddress[] addresses = parseAddresses(replyTo);
if (null != addresses) {
this.message.setReplyTo((Address[])addresses);
}
return this;
}
public MimeMessageBuilder setRecipients(final Message.RecipientType recipientType, final String recipients) throws MessagingException {
final InternetAddress[] addresses = parseAddresses(recipients);
if (null != addresses) {
this.message.setRecipients(recipientType, (Address[])addresses);
}
return this;
}
public MimeMessageBuilder setSubject(final String subject) throws MessagingException {
if (subject != null) {
this.message.setSubject(subject, StandardCharsets.UTF_8.name());
}
return this;
}
@Deprecated
public MimeMessage getMimeMessage() {
return this.build();
}
public MimeMessage build() {
return this.message;
}
private static InternetAddress parseAddress(final String address) throws AddressException {
return (address == null) ? null : new InternetAddress(address);
}
private static InternetAddress[] parseAddresses(final String addresses) throws AddressException {
return (InternetAddress[])((addresses == null) ? null : InternetAddress.parse(addresses, true));
}
}
|
[
"tanksherman27@gmail.com"
] |
tanksherman27@gmail.com
|
bbd4d8299b62f59a612ae2cb6e028a18dbfa6c60
|
83465b95a4780a7a12c8eb594c5aaa51d55da5e8
|
/src/com/afollestad/twitter/preferences/TweetViewerFragment.java
|
872701ec1be7a471c4773f26fa7f3c633aaea822
|
[] |
no_license
|
Daoudbk/boid-v2
|
525844a484ef24ab0ee37e9fc91bf3c80e579669
|
3f59c9e578349b23f059bbaec2f6f8e9ad28db1c
|
refs/heads/master
| 2020-12-26T02:59:48.837032
| 2013-11-22T04:17:28
| 2013-11-22T04:17:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 491
|
java
|
package com.afollestad.twitter.preferences;
import android.os.Bundle;
import android.preference.PreferenceFragment;
import com.afollestad.twitter.R;
/**
* The 'tweet viewer' preference category.
*
* @author Aidan Follestad (afollestad)
*/
public class TweetViewerFragment extends PreferenceFragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.pref_tweet_viewer);
}
}
|
[
"drummer.aidan@gmail.com"
] |
drummer.aidan@gmail.com
|
d04326f93c8e9f5a8f54b6fa54687de5c09c3fd5
|
753458bb1ef870387666f338449521c2985d8f0a
|
/src-ext-mod-api/hu/scelightapi/sc2/rep/model/gameevents/IGameEvents.java
|
df6eef0a91f89f9bf2e1e12a90832d64dcbaeb76
|
[
"Apache-2.0"
] |
permissive
|
icza/scelight
|
f4f7099404077f994aa9c4738a0d38a6b29fe702
|
7360c30765c9bc2f25b069da4377b37e47d4b426
|
refs/heads/master
| 2022-08-23T09:15:32.451515
| 2022-08-12T13:35:16
| 2022-08-12T13:35:16
| 51,061,294
| 128
| 23
|
Apache-2.0
| 2023-09-12T20:20:51
| 2016-02-04T08:04:52
|
Java
|
UTF-8
|
Java
| false
| false
| 2,124
|
java
|
/*
* Project Scelight
*
* Copyright (c) 2013 Andras Belicza <iczaaa@gmail.com>
*
* This software is the property of Andras Belicza.
* Copying, modifying, distributing, refactoring without the author's permission
* is prohibited and protected by Law.
*/
package hu.scelightapi.sc2.rep.model.gameevents;
import hu.scelightapi.sc2.rep.model.IEvent;
/**
* StarCraft II Replay game events.
*
* @author Andras Belicza
*/
public interface IGameEvents {
/** Id of the CameraUpdate game event. */
int ID_CAMERA_UPDATE = 49;
/** Id of the SelectionDelta game event. */
int ID_SELECTION_DELTA = 28;
/** Id of the Cmd game event. */
int ID_CMD = 27;
/** Id of the ControlGroupUpdate game event. */
int ID_CONTROL_GROUP_UPDATE = 29;
/** Id of the CameraSave game event. */
int ID_CAMERA_SAVE = 14;
/** Id of the SaveGame game event. */
int ID_SAVE_GAME = 21;
/** Id of the SaveGameDone game event. */
int ID_SAVE_GAME_DONE = 22;
/** Id of the PlayerLeave game event. */
int ID_PLAYER_LEAVE = 25;
/** Id of the GameCheat game event. */
int ID_GAME_CHEAT = 26;
/** Id of the ResourceTrade game event. */
int ID_RESOURCE_TRADE = 31;
/** Id of the SetAbsoluteGameSpeed game event. */
int ID_SET_ABSOLUTE_GAME_SPEED = 34;
/** Id of the AddAbsoluteGameSpeed game event. */
int ID_ADD_ABSOLUTE_GAME_SPEED = 35;
/** Id of the Alliance game event. */
int ID_ALLIANCE = 38;
/** Id of the ResourceRequest game event. */
int ID_RESOURCE_REQUEST = 70;
/** Id of the ResourceRequestFulfill game event. */
int ID_RESOURCE_REQUEST_FULFILL = 71;
/** Id of the ResourceRequestCancel game event. */
int ID_RESOURCE_REQUEST_CANCEL = 72;
/** Id of the GameUserLeave game event. */
int ID_GAME_USER_LEAVE = 101;
/**
* Returns the array of game events.
*
* @return the array of game events
*/
IEvent[] getEvents();
}
|
[
"iczaaa@gmail.com"
] |
iczaaa@gmail.com
|
7db0d2bc1bd9527caffff280b19ae408cd7d508c
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/neo4j/learning/6860/InvalidIdGeneratorException.java
|
e64b483b990ed9a8c6ed6aec12779f94a98bff2f
|
[] |
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
| 956
|
java
|
/*
* Copyright (c) 2002-2018 "Neo4j,"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.kernel.impl.store;
public class InvalidIdGeneratorException extends StoreFailureException
{
public InvalidIdGeneratorException( String msg )
{
super( msg);
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
5e038b6477dede79d7d3ff9fc486b7912bd6a780
|
68ff06645241faacb5ba914eadb9771508e50b35
|
/app/src/main/java/com/lihang/selfmvc/bean/LoginMessage.java
|
9bf70594b403f89aef34ef3811e42a6882aba8bc
|
[] |
no_license
|
msdgwzhy6/EasyOk
|
8c9bbed740d048717b2a6d97c18bf9d080f6b2e6
|
39064bd1482d58edd801268903669d03a0ba634a
|
refs/heads/master
| 2020-07-01T00:53:16.018039
| 2019-08-07T02:45:21
| 2019-08-07T02:45:21
| 201,000,592
| 1
| 0
| null | 2019-08-07T07:50:33
| 2019-08-07T07:50:32
| null |
UTF-8
|
Java
| false
| false
| 611
|
java
|
package com.lihang.selfmvc.bean;
import java.io.Serializable;
/**
* Created by leo
* on 2019/8/2.
*/
public class LoginMessage implements Serializable {
private String message;
private String type;
public LoginMessage(String message, String type) {
this.message = message;
this.type = type;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
|
[
"lihangleo2@163.com"
] |
lihangleo2@163.com
|
93794f1ee5169080d31ada247e3734afff9e8127
|
3af9afaef943e4a87f3eb142bd7f5a7eaa49728c
|
/src/main/java/com/unmsm/fisi/service/exception/EscenarioException.java
|
09a3864f6f8824bdb1379159f162d0ec9cd1a396
|
[] |
no_license
|
Carlos-21/QualityEggsSpring
|
3629893685a52ef5fe849d419725c268a8e29bad
|
56bb74ae772851568c92f659e00d325cdbba34ae
|
refs/heads/master
| 2023-08-10T13:28:29.834969
| 2020-08-01T18:00:06
| 2020-08-01T18:00:06
| 187,538,893
| 0
| 0
| null | 2023-07-22T06:09:04
| 2019-05-19T23:34:01
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 236
|
java
|
package com.unmsm.fisi.service.exception;
public class EscenarioException extends SimpException
{
private static final long serialVersionUID = 1L;
public EscenarioException(String mensaje)
{
super(mensaje);
}
}
|
[
"carlos.llontop3@unmsm.edu.pe"
] |
carlos.llontop3@unmsm.edu.pe
|
51b369d74087a7dfdcdac5171821934b626cedd9
|
7c51653a4859fd6356acd73f800f34bdab99e412
|
/app/src/main/java/com/yiyue/user/util/compressutil/Engine.java
|
ce666e4507abca3a55ba151c103f44c7b6419cae
|
[] |
no_license
|
wuqiuyun/yy_user
|
95e10fddf4c6fec9d8f744d2ab4322e6b1dcf95b
|
3eadb224413d4d741107b4a0bf608b2ee6e2418b
|
refs/heads/master
| 2020-04-15T01:30:12.500585
| 2019-01-06T05:51:49
| 2019-01-06T05:51:49
| 164,279,063
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,731
|
java
|
package com.yiyue.user.util.compressutil;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
/**
* Responsible for starting compress and managing active and cached resources.
*/
class Engine {
private InputStreamProvider srcImg;
private File tagImg;
private int srcWidth;
private int srcHeight;
private boolean focusAlpha;
Engine(InputStreamProvider srcImg, File tagImg, boolean focusAlpha) throws IOException {
this.tagImg = tagImg;
this.srcImg = srcImg;
this.focusAlpha = focusAlpha;
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
options.inSampleSize = 1;
BitmapFactory.decodeStream(srcImg.open(), null, options);
this.srcWidth = options.outWidth;
this.srcHeight = options.outHeight;
}
private int computeSize() {
srcWidth = srcWidth % 2 == 1 ? srcWidth + 1 : srcWidth;
srcHeight = srcHeight % 2 == 1 ? srcHeight + 1 : srcHeight;
int longSide = Math.max(srcWidth, srcHeight);
int shortSide = Math.min(srcWidth, srcHeight);
float scale = ((float) shortSide / longSide);
if (scale <= 1 && scale > 0.5625) {
if (longSide < 1664) {
return 1;
} else if (longSide < 4990) {
return 2;
} else if (longSide > 4990 && longSide < 10240) {
return 4;
} else {
return longSide / 1280 == 0 ? 1 : longSide / 1280;
}
} else if (scale <= 0.5625 && scale > 0.5) {
return longSide / 1280 == 0 ? 1 : longSide / 1280;
} else {
return (int) Math.ceil(longSide / (1280.0 / scale));
}
}
private Bitmap rotatingImage(Bitmap bitmap, int angle) {
Matrix matrix = new Matrix();
matrix.postRotate(angle);
return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
}
File compress() throws IOException {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inSampleSize = computeSize();
Bitmap tagBitmap = BitmapFactory.decodeStream(srcImg.open(), null, options);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
if (Checker.SINGLE.isJPG(srcImg.open())) {
tagBitmap = rotatingImage(tagBitmap, Checker.SINGLE.getOrientation(srcImg.open()));
}
tagBitmap.compress(focusAlpha ? Bitmap.CompressFormat.PNG : Bitmap.CompressFormat.JPEG, 60, stream);
tagBitmap.recycle();
FileOutputStream fos = new FileOutputStream(tagImg);
fos.write(stream.toByteArray());
fos.flush();
fos.close();
stream.close();
return tagImg;
}
}
|
[
"wuqiuyun_9629@163.com"
] |
wuqiuyun_9629@163.com
|
9e3d15fc72db92253873dbdfc30803137efa53ca
|
89343cd043d33b66b9f4a54e480d618ad8e88ff9
|
/centit-database/src/main/java/com/centit/support/database/orm/GeneratorType.java
|
79da9009fa171bdec4a8d8a7d0816c18205f88c6
|
[] |
no_license
|
moyanxiaoq/centit-commons
|
77ca8adf838b67a4709c84fe496df44cc07b3d56
|
c4f1726c9af209ac7028556f2bd87d443997909b
|
refs/heads/master
| 2021-06-30T06:10:08.849819
| 2017-09-20T04:45:33
| 2017-09-20T04:45:33
| 106,496,347
| 1
| 1
| null | 2017-10-11T02:39:02
| 2017-10-11T02:39:02
| null |
UTF-8
|
Java
| false
| false
| 277
|
java
|
package com.centit.support.database.orm;
/**
* Created by codefan on 17-8-29.
*/
public enum GeneratorType {
AUTO, // 数据库自动增长
SEQUENCE, //数据库序列
UUID, //uuid 32bit
CONSTANT, //常量
FUNCTIION // 函数,比如 当前日期
}
|
[
"codefan@centit.com"
] |
codefan@centit.com
|
591dcc4462eb88dce07f0f8d9652a3b10c6e5c14
|
e75be673baeeddee986ece49ef6e1c718a8e7a5d
|
/submissions/blizzard/Corpus/tomcat70/1515.java
|
b28e24436cd690ee5609f835ef9e955c766ca6a0
|
[
"MIT"
] |
permissive
|
zhendong2050/fse18
|
edbea132be9122b57e272a20c20fae2bb949e63e
|
f0f016140489961c9e3c2e837577f698c2d4cf44
|
refs/heads/master
| 2020-12-21T11:31:53.800358
| 2018-07-23T10:10:57
| 2018-07-23T10:10:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,498
|
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.catalina.security;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Locale;
import java.util.Set;
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.res.StringManager;
public class SecurityListener implements LifecycleListener {
private static final Log log = LogFactory.getLog(SecurityListener.class);
private static final StringManager sm = StringManager.getManager(Constants.PACKAGE);
private static final String UMASK_PROPERTY_NAME = Constants.PACKAGE + ".SecurityListener.UMASK";
private static final String UMASK_FORMAT = "%04o";
/**
* The list of operating system users not permitted to run Tomcat.
*/
private Set<String> checkedOsUsers = new HashSet<String>();
/**
* The minimum umask that must be configured for the operating system user
* running Tomcat. The umask is handled as an octal.
*/
private Integer minimumUmask = Integer.valueOf(7);
public SecurityListener() {
checkedOsUsers.add("root");
}
@Override
public void lifecycleEvent(LifecycleEvent event) {
// This is the earliest event in Lifecycle
if (event.getType().equals(Lifecycle.BEFORE_INIT_EVENT)) {
doChecks();
}
}
/**
* Set the list of operating system users not permitted to run Tomcat. By
* default, only root is prevented from running Tomcat. Calling this method
* with null or the empty string will clear the list of users and
* effectively disables this check. User names will always be checked in a
* case insensitive manner using the system default Locale.
*
* @param userNameList A comma separated list of operating system users not
* permitted to run Tomcat
*/
public void setCheckedOsUsers(String userNameList) {
if (userNameList == null || userNameList.length() == 0) {
checkedOsUsers.clear();
} else {
String[] userNames = userNameList.split(",");
for (String userName : userNames) {
if (userName.length() > 0) {
checkedOsUsers.add(userName.toLowerCase(Locale.getDefault()));
}
}
}
}
/**
* Returns the current list of operating system users not permitted to run
* Tomcat.
*
* @return A comma separated list of operating sytem user names.
*/
public String getCheckedOsUsers() {
if (checkedOsUsers.size() == 0) {
return "";
}
StringBuilder result = new StringBuilder();
Iterator<String> iter = checkedOsUsers.iterator();
result.append(iter.next());
while (iter.hasNext()) {
result.append(',');
result.append(iter.next());
}
return result.toString();
}
/**
* Set the minimum umask that must be configured before Tomcat will start.
*
* @param umask The 4-digit umask as returned by the OS command <i>umask</i>
*/
public void setMinimumUmask(String umask) {
if (umask == null || umask.length() == 0) {
minimumUmask = Integer.valueOf(0);
} else {
minimumUmask = Integer.valueOf(umask, 8);
}
}
/**
* Get the minimum umask that must be configured before Tomcat will start.
*
* @return The 4-digit umask as used by the OS command <i>umask</i>
*/
public String getMinimumUmask() {
return String.format(UMASK_FORMAT, minimumUmask);
}
/**
* Execute the security checks. Each check should be in a separate method.
*/
protected void doChecks() {
checkOsUser();
checkUmask();
}
protected void checkOsUser() {
String userName = System.getProperty("user.name");
if (userName != null) {
String userNameLC = userName.toLowerCase(Locale.getDefault());
if (checkedOsUsers.contains(userNameLC)) {
// Have to throw Error to force start process to be aborted
throw new Error(sm.getString("SecurityListener.checkUserWarning", userName));
}
}
}
protected void checkUmask() {
String prop = System.getProperty(UMASK_PROPERTY_NAME);
Integer umask = null;
if (prop != null) {
try {
umask = Integer.valueOf(prop, 8);
} catch (NumberFormatException nfe) {
log.warn(sm.getString("SecurityListener.checkUmaskParseFail", prop));
}
}
if (umask == null) {
if (Constants.CRLF.equals(Constants.LINE_SEP)) {
// Probably running on Windows so no umask
if (log.isDebugEnabled()) {
log.debug(sm.getString("SecurityListener.checkUmaskSkip"));
}
return;
} else {
if (minimumUmask.intValue() > 0) {
log.warn(sm.getString("SecurityListener.checkUmaskNone", UMASK_PROPERTY_NAME, getMinimumUmask()));
}
return;
}
}
if ((umask.intValue() & minimumUmask.intValue()) != minimumUmask.intValue()) {
throw new Error(sm.getString("SecurityListener.checkUmaskFail", String.format(UMASK_FORMAT, umask), getMinimumUmask()));
}
}
}
|
[
"tim.menzies@gmail.com"
] |
tim.menzies@gmail.com
|
b31275b98c28421bd46a02d17f26e975c207a95b
|
8d3f62fb5f3ae00cf29502ea519be8733665f39c
|
/dterp/src/qcs/crm_deliver/dealwith_ok.java
|
4ec37d1c730dde56e72826540525cb9abbfd792b
|
[] |
no_license
|
xu03101431/dterp
|
8f14c6f360235d39d24a249437f4100fe12b0ad9
|
a84ec9ce7bc9bee5cb9f5a8a2c62cdc04f294bdf
|
refs/heads/master
| 2021-01-19T09:51:52.382108
| 2010-12-21T02:27:40
| 2010-12-21T02:27:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,287
|
java
|
/*
*this file is part of nseer erp
*Copyright (C)2006-2010 Nseer(Beijing) Technology co.LTD/http://www.nseer.com
*
*This program is free software; you can redistribute it and/or
*modify it under the terms of the GNU General Public License
*as published by the Free Software Foundation; either
*version 2 of the License, or (at your option) any later version.
*/
package qcs.crm_deliver;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.*;
import java.sql.*;
import java.text.SimpleDateFormat;
import include.nseer_db.*;
import include.nseer_cookie.*;
import java.io.*;
import java.util.*;
import com.jspsmart.upload.*;
import include.nseer_cookie.counter;
public class dealwith_ok extends HttpServlet{
public synchronized void service(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException{
HttpSession dbSession=request.getSession();
JspFactory _jspxFactory=JspFactory.getDefaultFactory();
PageContext pageContext = _jspxFactory.getPageContext(this,request,response,"",true,8192,true);
ServletContext dbApplication=dbSession.getServletContext();
try{
//实例化
HttpSession session=request.getSession();
ServletContext context=session.getServletContext();
String path=context.getRealPath("/");
counter count=new counter(dbApplication);
nseer_db_backup1 qcs_db = new nseer_db_backup1(dbApplication);
if(qcs_db.conn((String)dbSession.getAttribute("unit_db_name"))){
String stock_name =request.getParameter("stock_name");
String stock_id =request.getParameter("stock_id");
String qcs_id =request.getParameter("qcs_id");
String apply_id=request.getParameter("apply_id");
String dealwith_tag =request.getParameter("dealwith_tag");
String product_id =request.getParameter("product_id");
String qualified =request.getParameter("qualified");
String unqualified_amount = request.getParameter("unqualified");
String sql = "update qcs_crm_deliver set dealwith_tag='"+dealwith_tag+"' where qcs_id='"+qcs_id+"'";
qcs_db.executeUpdate(sql);
sql="select * from qcs_apply where apply_id='"+apply_id+"'";
ResultSet rs=qcs_db.executeQuery(sql);
if(rs.next()){
String crmDeliver_id=rs.getString("crmDeliver_id");
String sql1="select * from stock_pre_paying where pay_id='"+rs.getString("crmDeliver_id")+"'and product_id='"+product_id+"' and stock_id='"+stock_id+"'";
ResultSet rs1=qcs_db.executeQuery(sql1);
if(rs1.next()){
Double qualified_amount_temp=Double.parseDouble(qualified)+rs1.getDouble("qualified_amount");
String sql2="update stock_pre_paying set qualified_amount='"+qualified_amount_temp+"' where pay_id='"+crmDeliver_id+"' and product_id='"+product_id+"' and stock_id='"+stock_id+"'";
qcs_db.executeUpdate(sql2);
sql="update qcs_apply_details set qcs_tag='0',demand_amount='"+unqualified_amount+"' where apply_id='"+apply_id+"'";
qcs_db.executeUpdate(sql);
}
sql="update qcs_apply_details set qcs_tag='1' where apply_id='"+apply_id+"' and demand_amount='0'";
qcs_db.executeUpdate(sql);
}
response.sendRedirect("qcs/crm_deliver/dealwith_ok.jsp?finished_tag=0");
qcs_db.commit();
qcs_db.close();
}else{
response.sendRedirect("error_conn.htm");
}
}catch(Exception ex){
ex.printStackTrace();
}
}
}
|
[
"koldwang@c656a910-b44f-1779-863a-4890726b0c2b"
] |
koldwang@c656a910-b44f-1779-863a-4890726b0c2b
|
1dbc94b15280f011a8d1234d6c59a16dcb77252f
|
7e0ea8126d0cc04055490d3758305bb7a67e10bc
|
/src/main/java/com/lamdevops/optional/StreamAndOptional.java
|
ad88bd53078756ca3b82c46326ef36b94196134b
|
[] |
no_license
|
greenlucky/JavaCore
|
a555af19710b72f16d3dfbdf2dd34d031ddbaddb
|
bf7de262687ca1b46d2320b66fec0e05080dc17c
|
refs/heads/master
| 2021-06-13T10:15:45.473001
| 2018-07-13T01:35:11
| 2018-07-13T01:35:11
| 95,560,793
| 0
| 0
| null | 2017-08-08T15:58:52
| 2017-06-27T13:24:19
|
Java
|
UTF-8
|
Java
| false
| false
| 1,453
|
java
|
package com.lamdevops.optional;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static org.junit.jupiter.api.Assertions.assertEquals;
/**
* Created by lamdevops on 7/27/17.
*/
public class StreamAndOptional {
@Test
public void testSteamAndOptional() throws Exception {
List<Optional<String>> listOfOptionals = Arrays.asList(
Optional.empty(),
Optional.of("foo"),
Optional.empty(),
Optional.of("bar")
);
//usering filter
List<String> filterList = listOfOptionals
.stream()
.filter(Optional::isPresent)
.map(Optional::get)
.collect(Collectors.toList());
assertEquals(2, filterList.size());
//flatmap
List<String> flatMapList = listOfOptionals
.stream()
.flatMap(o -> o.isPresent() ? Stream.of(o.get()) : Stream.empty())
.collect(Collectors.toList());
assertEquals(2, flatMapList.size());
//flatmap
List<String> flatMapList2 = listOfOptionals
.stream()
.flatMap(o -> o.map(Stream::of).orElseGet(Stream::empty))
.collect(Collectors.toList());
assertEquals(2, flatMapList2.size());
}
}
|
[
"nguyenlamit86@gmail.com"
] |
nguyenlamit86@gmail.com
|
a7cb0b307139bd8c8a7806777cfa2baf83634250
|
9e20645e45cc51e94c345108b7b8a2dd5d33193e
|
/L2J_Mobius_C6_Interlude/java/org/l2jmobius/gameserver/network/serverpackets/GMViewPledgeInfo.java
|
cf31c3b8ba53e9c1f458e28c760f801ca67192be
|
[] |
no_license
|
Enryu99/L2jMobius-01-11
|
2da23f1c04dcf6e88b770f6dcbd25a80d9162461
|
4683916852a03573b2fe590842f6cac4cc8177b8
|
refs/heads/master
| 2023-09-01T22:09:52.702058
| 2021-11-02T17:37:29
| 2021-11-02T17:37:29
| 423,405,362
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,790
|
java
|
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.l2jmobius.gameserver.network.serverpackets;
import java.util.Collection;
import org.l2jmobius.commons.network.PacketWriter;
import org.l2jmobius.gameserver.data.sql.ClanTable;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.clan.Clan;
import org.l2jmobius.gameserver.model.clan.ClanMember;
import org.l2jmobius.gameserver.network.OutgoingPackets;
/**
* format SdSS dddddddd d (Sddddd)
* @version $Revision: 1.1.2.1.2.3 $ $Date: 2005/03/27 15:29:57 $
*/
public class GMViewPledgeInfo implements IClientOutgoingPacket
{
private final Clan _clan;
private final PlayerInstance _player;
public GMViewPledgeInfo(Clan clan, PlayerInstance player)
{
_clan = clan;
_player = player;
}
@Override
public boolean write(PacketWriter packet)
{
final int TOP = ClanTable.getInstance().getTopRate(_clan.getClanId());
OutgoingPackets.GM_VIEW_PLEDGE_INFO.writeId(packet);
packet.writeS(_player.getName());
packet.writeD(_clan.getClanId());
packet.writeD(0x00);
packet.writeS(_clan.getName());
packet.writeS(_clan.getLeaderName());
packet.writeD(_clan.getCrestId()); // -> no, it's no longer used (nuocnam) fix by game
packet.writeD(_clan.getLevel());
packet.writeD(_clan.getCastleId());
packet.writeD(_clan.getHideoutId());
packet.writeD(TOP);
packet.writeD(_clan.getReputationScore());
packet.writeD(0);
packet.writeD(0);
packet.writeD(_clan.getAllyId()); // c2
packet.writeS(_clan.getAllyName()); // c2
packet.writeD(_clan.getAllyCrestId()); // c2
packet.writeD(_clan.isAtWar()); // c3
final Collection<ClanMember> members = _clan.getMembers();
packet.writeD(members.size());
for (ClanMember member : members)
{
packet.writeS(member.getName());
packet.writeD(member.getLevel());
packet.writeD(member.getClassId());
packet.writeD(0);
packet.writeD(1);
packet.writeD(member.isOnline() ? member.getObjectId() : 0);
packet.writeD(0);
}
return true;
}
}
|
[
"MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b"
] |
MobiusDevelopment@7325c9f8-25fd-504a-9f63-8876acdc129b
|
83c6fd0cdfeffb5e89f6ab1d17f1c7b64deb7519
|
64eaf5bd1069f0bdffb4422d2b6285f41d5a2721
|
/PublicAPi/src/test/java/com/publicApi/Listners/Retry.java
|
0ee865ea9316dc1acee2362c5033df12b4d89070
|
[] |
no_license
|
DevikaS/gdam
|
892f731c69ded3ee48474f3326f8d06d8f77e3f0
|
7ebd8f5059d88e8f7e34b463e3111fe2e090da21
|
refs/heads/master
| 2021-10-28T10:29:01.637709
| 2019-04-23T13:31:11
| 2019-04-23T13:31:11
| 183,001,214
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 864
|
java
|
/**
*
*/
package com.publicApi.Listners;
import org.testng.IRetryAnalyzer;
import org.testng.ITestResult;
/**
* @author Laxmi.Somni
*
*/
public class Retry implements IRetryAnalyzer {
private int retryCount = 0;
private int maxRetryCount = 1;
@Override
public boolean retry(ITestResult result) {
if(retryCount<maxRetryCount){
System.out.println("Retrying test " + result.getName() + " with status "
+ getResultStatusName(result.getStatus()) + " for the " + (retryCount+1) + " time(s).");
retryCount++;
return true;
}
return false;
}
public String getResultStatusName(int status) {
String resultName = null;
if(status==1)
resultName = "SUCCESS";
if(status==2)
resultName = "FAILURE";
if(status==3)
resultName = "SKIP";
return resultName;
}
}
|
[
"Devika.Subramanian@adstream.com"
] |
Devika.Subramanian@adstream.com
|
8e03c87cefddc6271f6fc9f5329241fcc6fc255e
|
2a0b5df31c675070761dca0d3d719733fc2ea187
|
/java/oreilly/ORDesignPatternsInJava/src/DecoratorPattern/TextField.java
|
d8ba60cb098cd7d974f9ef8aa0217648410384f1
|
[] |
no_license
|
oussamad-blip/bookcode-compile-lang
|
55ff480d50f6101fd727bbfedb60587cb9930b60
|
87a959cf821624765df34eff506faf28ae429b4c
|
refs/heads/master
| 2023-05-05T00:05:49.387277
| 2019-02-17T10:08:17
| 2019-02-17T10:08:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 704
|
java
|
package DecoratorPattern;
import java.util.LinkedList;
import java.util.List;
public class TextField implements GraphicalComponent {
private List<String> lines = new LinkedList<String>();
@Override
public void paint() {
System.out.println("Start textfield....");
for(String l: this.lines) {
System.out.println(l);
}
System.out.println("End Textfield");
}
@Override
public GraphicalComponent addContent(Object content) {
assert(content instanceof String);
this.lines.add((String)content);
if(this.lines.size() > 2) {
return new ScrollbarDecorator(this);
}
return this;
}
}
|
[
"jimagile@gmail.com"
] |
jimagile@gmail.com
|
9ae4f022bbd856a3b97660cc9752586b6f6dbf3d
|
82de1e98e30a0836b892f00e07bfcc0954dbc517
|
/hotcomm-data/hotcomm-data-view/src/main/java/com/hotcomm/data/view/cview/DeviceView.java
|
f96d875820837961aa1a50e0eef7e131de19f4d5
|
[] |
no_license
|
jiajiales/hangkang-qingdao
|
ab319048b61f6463f8cf1ac86ac5c74bd3df35d7
|
60a0a4b1d1fb9814d8aa21188aebbf72a1d6b25d
|
refs/heads/master
| 2020-04-22T17:07:34.569613
| 2019-02-13T15:14:07
| 2019-02-13T15:14:07
| 170,530,164
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,055
|
java
|
package com.hotcomm.data.view.cview;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class DeviceView {
public static final String DEVICE_IMPORT_PAGE = "service/device-import";
public static final String DEVICE_EXPORT_PAGE = "service/device-export";
public static final String DEVICE_BA_DEVICEGROUP_PAGE = "service/device-ba-deviceGroup";
public static final String DEVICE_DATA_VIEW_PAGE = "service/device-data-view";
@GetMapping("/service/deviceImport")
public String deviceImport(Model model) {
return DEVICE_IMPORT_PAGE;
}
@GetMapping("/service/deviceExport")
public String deviceExport(Model model) {
return DEVICE_EXPORT_PAGE;
}
@GetMapping("/service/baDeviceGroup")
public String baDeviceGroup(Model model) {
return DEVICE_BA_DEVICEGROUP_PAGE;
}
@GetMapping("/service/deviceDataView")
public String deviceView(Model model) {
return DEVICE_DATA_VIEW_PAGE;
}
}
|
[
"562910919@qq.com"
] |
562910919@qq.com
|
f39275baeedae5f56ed5beaeda3eeb8d26c6966f
|
f396ed7753bf45d8aa88685e67478fd30ff17a53
|
/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/autoimport/AsyncFileChangeListenerBase.java
|
c96fad8b717e30064be050767d8a5d09cb277878
|
[
"Apache-2.0"
] |
permissive
|
markusmo3/intellij-community
|
21ed168d69f9c7528e2550e007d8957caf2a74ba
|
dbe64d485d4013a5c3dbeffa39d38ff1f7bcc207
|
refs/heads/master
| 2022-01-12T18:21:26.219608
| 2019-07-14T18:46:37
| 2019-07-14T18:46:37
| 191,056,167
| 0
| 0
|
Apache-2.0
| 2019-06-27T19:32:28
| 2019-06-09T21:16:28
| null |
UTF-8
|
Java
| false
| false
| 3,982
|
java
|
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.externalSystem.service.project.autoimport;
import com.intellij.openapi.progress.ProcessCanceledException;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.vfs.AsyncFileListener;
import com.intellij.openapi.vfs.VfsUtilCore;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VirtualFileVisitor;
import com.intellij.openapi.vfs.newvfs.NewVirtualFile;
import com.intellij.openapi.vfs.newvfs.events.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
public abstract class AsyncFileChangeListenerBase implements AsyncFileListener {
protected abstract boolean isRelevant(String path);
protected abstract void prepareFileDeletion(@NotNull VirtualFile file);
protected abstract void updateFile(@NotNull VirtualFile file, @NotNull VFileEvent event);
protected abstract void reset();
protected abstract void apply();
@Override
public boolean needsReadAction() {
return true;
}
@Nullable
@Override
public ChangeApplier prepareChange(@NotNull List<? extends VFileEvent> events) {
List<VFileEvent> relevantEvents = new ArrayList<>();
try {
for (VFileEvent each : events) {
ProgressManager.checkCanceled();
if (each instanceof VFileDeleteEvent) {
deleteRecursively(each.getFile());
}
else {
if (!isRelevant(each.getPath())) continue;
relevantEvents.add(each);
if (each instanceof VFilePropertyChangeEvent && ((VFilePropertyChangeEvent)each).isRename()) {
deleteRecursively(each.getFile());
}
else if (each instanceof VFileMoveEvent) {
VFileMoveEvent moveEvent = (VFileMoveEvent)each;
String newPath = moveEvent.getNewParent().getPath() + "/" + moveEvent.getFile().getName();
if (!isRelevant(newPath)) {
deleteRecursively(moveEvent.getFile());
}
}
}
}
}
catch (ProcessCanceledException e) {
reset();
throw e;
}
return new ChangeApplier() {
@Override
public void beforeVfsChange() {
apply();
}
@Override
public void afterVfsChange() {
after(relevantEvents);
}
};
}
private void deleteRecursively(VirtualFile f) {
VfsUtilCore.visitChildrenRecursively(f, new VirtualFileVisitor() {
@Override
public boolean visitFile(@NotNull VirtualFile f) {
if (isRelevant(f.getPath())) {
prepareFileDeletion(f);
}
return true;
}
@Nullable
@Override
public Iterable<VirtualFile> getChildrenIterable(@NotNull VirtualFile f) {
return f.isDirectory() && f instanceof NewVirtualFile ? ((NewVirtualFile)f).iterInDbChildren() : null;
}
});
}
private void after(@NotNull List<? extends VFileEvent> relevantEvents) {
for (VFileEvent each : relevantEvents) {
if (each instanceof VFileCreateEvent) {
VirtualFile newChild = each.getFile();
if (newChild != null) {
updateFile(newChild, each);
}
}
else if (each instanceof VFileCopyEvent) {
VFileCopyEvent copyEvent = (VFileCopyEvent)each;
VirtualFile newChild = copyEvent.getNewParent().findChild(copyEvent.getNewChildName());
if (newChild != null) {
updateFile(newChild, each);
}
}
else if (each instanceof VFileContentChangeEvent ||
each instanceof VFileMoveEvent ||
each instanceof VFilePropertyChangeEvent && ((VFilePropertyChangeEvent)each).isRename()) {
updateFile(Objects.requireNonNull(each.getFile()), each);
}
}
apply();
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
f04c03aa75384829fe88defd9cf07bbe56c0d8e4
|
2c945e39697a6daf24ffacd06e47766c44a94f85
|
/jgroups/stu/src/main/java/com/kylin/jgroups/advanced/BridgeTest.java
|
21570c0cdf8a11a13f662f23e0cd445c172965f6
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
kwang2014/cluster
|
e08c154614fef8885806a87a61fc6070c9722578
|
11bb8a3279eafe0abe46a7f70bbba71a81ca3d40
|
refs/heads/master
| 2020-12-24T10:11:09.345406
| 2014-04-01T14:31:23
| 2014-04-01T14:31:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,223
|
java
|
package com.kylin.jgroups.advanced;
/**
* What's this?
* Tests for JGroups Bridging between remote clusters
*
* If you have 2 local clusters (data centers), you can use JGroups' RELAY to bridge the 2 and make them appear as if
* they were a (virtual) global cluster.
*
* Assume we have 2 data centers located in 2 places, one in Beijing, The other in Shanghai;
* Use com.kylin.jgroups.demo.ChatDemo to illustrate data transfer between 2 data center
*
* There are 3 configuration files which are needed to do this:
* 1. jgroups-relay1.xml and jgroups-relay2.xml define configurations for 2 different local clusters (data centers): they both
* include RELAY (configured with jgroups-tcp.xml to be used as bridge), and only differ in mcast_addr andmcast_port, and in
* the site ("Beijing" or "Shanghai").
* 2. jgroups-tcp.xml: this configured the JGroups bridge to be used between 2 data centers
*
* How to Build?
* mvn clean install dependency:copy-dependencies
*
* How to Run?
* java -cp jgroups-3.2.6.Final.jar:jgroups-stu.jar:log4j-1.2.16.jar -Djava.net.preferIPv4Stack=true com.kylin.jgroups.demo.ChatDemo -n A -c Beijing-Groups -p jgroups-relay1.xml -discardOwn
* java -cp jgroups-3.2.6.Final.jar:jgroups-stu.jar:log4j-1.2.16.jar -Djava.net.preferIPv4Stack=true com.kylin.jgroups.demo.ChatDemo -n B -c Beijing-Groups -p jgroups-relay1.xml -discardOwn
* java -cp jgroups-3.2.6.Final.jar:jgroups-stu.jar:log4j-1.2.16.jar -Djava.net.preferIPv4Stack=true com.kylin.jgroups.demo.ChatDemo -n C -c Beijing-Groups -p jgroups-relay1.xml -discardOwn
*
* java -cp jgroups-3.2.6.Final.jar:jgroups-stu.jar:log4j-1.2.16.jar -Djava.net.preferIPv4Stack=true com.kylin.jgroups.demo.ChatDemo -n D -c Shanghai-Groups -p jgroups-relay2.xml -discardOwn
* java -cp jgroups-3.2.6.Final.jar:jgroups-stu.jar:log4j-1.2.16.jar -Djava.net.preferIPv4Stack=true com.kylin.jgroups.demo.ChatDemo -n E -c Shanghai-Groups -p jgroups-relay2.xml -discardOwn
* java -cp jgroups-3.2.6.Final.jar:jgroups-stu.jar:log4j-1.2.16.jar -Djava.net.preferIPv4Stack=true com.kylin.jgroups.demo.ChatDemo -n F -c Shanghai-Groups -p jgroups-relay2.xml -discardOwn
*
*/
|
[
"songzhiqi_1214@yahoo.com.cn"
] |
songzhiqi_1214@yahoo.com.cn
|
e9373e50f84c56b8a20f315d313d7112df8f17f2
|
353c42d919fdc6c0c389e911fce9181c018e253e
|
/ss.core/src/ss/client/ui/forward/SphereTableLabelProvider.java
|
b8df2bfb8674c41d633875ad016386b8bdc358d4
|
[] |
no_license
|
djat/suprabrowser
|
ca5decc6fc27a66d7acd6068060285e6c6ac7659
|
110d84094e3ac6abda2af09f4f20368683103f80
|
refs/heads/master
| 2023-05-11T06:34:57.322343
| 2014-02-08T01:31:07
| 2014-02-08T01:31:07
| 10,919,796
| 1
| 2
| null | 2014-02-08T01:31:08
| 2013-06-24T20:45:03
|
Java
|
UTF-8
|
Java
| false
| false
| 1,596
|
java
|
/**
*
*/
package ss.client.ui.forward;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.swt.graphics.Image;
/**
* @author roman
*
*/
public class SphereTableLabelProvider implements ITableLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
*/
public Image getColumnImage(Object arg0, int arg1) {
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
*/
public String getColumnText(Object obj, int arg1) {
return (String)obj;
}
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
*/
public void addListener(ILabelProviderListener arg0) {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
*/
public void dispose() {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
*/
public boolean isLabelProperty(Object arg0, String arg1) {
// TODO Auto-generated method stub
return false;
}
/* (non-Javadoc)
* @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
*/
public void removeListener(ILabelProviderListener arg0) {
// TODO Auto-generated method stub
}
}
|
[
"mexwebdev@gmail.com"
] |
mexwebdev@gmail.com
|
14410349eec98db0e40fc04df37039332c2da0f5
|
f140118cd3f1b4a79159154087e7896960ca0c88
|
/core/target/java/org/apache/spark/storage/ArrayValues$.java
|
ffca0fc8f5afa6bf59b997229ec3876a654cc2f3
|
[] |
no_license
|
loisZ/miaomiaomiao
|
d45dc779355e2280fe6f505d959b5e5c475f9b9c
|
6236255e4062d1788d7a212fa49af1849965f22c
|
refs/heads/master
| 2021-08-24T09:22:41.648169
| 2017-12-09T00:56:41
| 2017-12-09T00:56:41
| 111,349,685
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 419
|
java
|
package org.apache.spark.storage;
// no position
// not preceding
public class ArrayValues$ extends scala.runtime.AbstractFunction1<java.lang.Object[], org.apache.spark.storage.ArrayValues> implements scala.Serializable {
/**
* Static reference to the singleton instance of this Scala object.
*/
public static final ArrayValues$ MODULE$ = null;
public ArrayValues$ () { throw new RuntimeException(); }
}
|
[
"283802073@qq.com"
] |
283802073@qq.com
|
396850f8eb19d5120872e0eafee04d693730d5c6
|
68842f654335de805bd48c34f3fc0ac741c7bd6a
|
/command/src/main/java/org/ko/command/demo1/CloseCourseVideoCommand.java
|
58e0d9a9e64343bfcf3355fa20c7eb94ee52dcc2
|
[] |
no_license
|
fjzy/design-pattern
|
05f1a3985838f3c56098ef0f7c74f9de39564b3f
|
58608eca355d8c6ae6cfe4a8fce79aed41a84160
|
refs/heads/master
| 2022-03-23T02:20:22.322236
| 2019-11-23T07:37:49
| 2019-11-23T07:37:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 346
|
java
|
package org.ko.command.demo1;
/**
* 关闭课程链接
*/
public class CloseCourseVideoCommand implements Command {
private CourseVideo courseVideo;
public CloseCourseVideoCommand(CourseVideo courseVideo) {
this.courseVideo = courseVideo;
}
@Override
public void execute() {
courseVideo.close();
}
}
|
[
"ko.shen@hotmail.com"
] |
ko.shen@hotmail.com
|
5355e90eceb40c61df9855cecad8106441cbc5c9
|
3796c118b0f5ae0a28b669c07f78d5974f76cc9a
|
/src/main/java/sen_964/lecture_3/Lec3_8.java
|
d70e630e952aecab29889f1daa359657c8ef7de7
|
[] |
no_license
|
murtala/JAVA_CORE
|
ec598c34362c787360e0b6161b3583f39b12d83e
|
305c63c197601f8b2efb9bb6f1149188b3aa531e
|
refs/heads/master
| 2021-01-20T19:56:55.387920
| 2016-07-17T00:15:24
| 2016-07-17T00:15:24
| 62,185,443
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,276
|
java
|
package sen_964.lecture_3;
// use Interface to find a biggest one
import java.util.Random;
import sen_964.lecture_3.Person.Comparab;
public class Lec3_8 {
public static void main(String[] x) {
//int a[][] = new int[3][];
int a[] = {1,2,053, 4};
int b[][]= {{1,2,4}, {2,2,1},{0,43,2}};
//a[1] = new int[]{1,2,3};
//a[2]= new int[]{4,5};
//System.out.println(a[1][1]);
// int c[]={1,2,3,4};
System.out.println(a[2] == b[2][1]);
//Person[] persAr = new Person[4];
/*persAr[0] = new Person("John", 19800220, 76);
persAr[1] = new Person("Susan", 19821123, 66.5f);
persAr[2] = new Person("James", 19780215, 76);
persAr[3] = new Person("Gilbert", 19830503, 66.5f);
*/
// int m = findBiggest(persAr);
// System.out.printf("biggest %d\n", m);
}
// This method is written so that it can find the biggest
// in an array of Comparab
static int findBiggest(Comparab[] c) {
int loc = 0;
for (int k = 0; k < c.length; k++)
if (c[loc].smaller(c[k])) // particular syntax is unimportant
loc = k;
return loc;
}
}
class Person {
public Person(String string, int i, int j) {
}
public Person(String string, int i, float f) {
}
class Comparab {
public boolean smaller(Comparab comparab) {
return false;
}
}
}
|
[
"moortala@gmail.com"
] |
moortala@gmail.com
|
dc3b12a870b2d2814813845786d01e31cf8bcfa3
|
46fa5d39a3091f4d42b9e07baf3ad2633ba9c21d
|
/evaluation/subjects/github_authmreloaded_safe/src/fr/xephi/authme/util/FileUtils.java
|
bc1bef41cfa7da9778419abed8b7c8042b93d03d
|
[
"Apache-2.0"
] |
permissive
|
yannicnoller/qfuzz
|
0231db497de3c16937c1a4501f44385ddfde5774
|
ca03bf187cb1127763a9c78f7547cda536a69a4e
|
refs/heads/master
| 2023-04-14T15:36:20.927575
| 2021-05-17T00:35:36
| 2021-05-17T00:35:36
| 204,430,941
| 12
| 2
|
Apache-2.0
| 2021-12-03T03:41:05
| 2019-08-26T08:28:10
|
Java
|
UTF-8
|
Java
| false
| false
| 5,780
|
java
|
package fr.xephi.authme.util;
import com.google.common.io.Files;
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.ConsoleLogger;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import static java.lang.String.format;
/**
* File utilities.
*/
public final class FileUtils {
private static final DateTimeFormatter CURRENT_DATE_STRING_FORMATTER =
DateTimeFormatter.ofPattern("yyyyMMdd_HHmm");
// Utility class
private FileUtils() {
}
/**
* Copy a resource file (from the JAR) to the given file if it doesn't exist.
*
* @param destinationFile The file to check and copy to (outside of JAR)
* @param resourcePath Local path to the resource file (path to file within JAR)
*
* @return False if the file does not exist and could not be copied, true otherwise
*/
public static boolean copyFileFromResource(File destinationFile, String resourcePath) {
if (destinationFile.exists()) {
return true;
} else if (!createDirectory(destinationFile.getParentFile())) {
ConsoleLogger.warning("Cannot create parent directories for '" + destinationFile + "'");
return false;
}
try (InputStream is = getResourceFromJar(resourcePath)) {
if (is == null) {
ConsoleLogger.warning(format("Cannot copy resource '%s' to file '%s': cannot load resource",
resourcePath, destinationFile.getPath()));
} else {
java.nio.file.Files.copy(is, destinationFile.toPath());
return true;
}
} catch (IOException e) {
ConsoleLogger.logException(format("Cannot copy resource '%s' to file '%s':",
resourcePath, destinationFile.getPath()), e);
}
return false;
}
/**
* Creates the given directory.
*
* @param dir the directory to create
* @return true upon success, false otherwise
*/
public static boolean createDirectory(File dir) {
if (!dir.exists() && !dir.mkdirs()) {
ConsoleLogger.warning("Could not create directory '" + dir + "'");
return false;
}
return dir.isDirectory();
}
/**
* Returns a JAR file as stream. Returns null if it doesn't exist.
*
* @param path the local path (starting from resources project, e.g. "config.yml" for 'resources/config.yml')
* @return the stream if the file exists, or false otherwise
*/
public static InputStream getResourceFromJar(String path) {
// ClassLoader#getResourceAsStream does not deal with the '\' path separator: replace to '/'
final String normalizedPath = path.replace("\\", "/");
return AuthMe.class.getClassLoader().getResourceAsStream(normalizedPath);
}
/**
* Delete a given directory and all its content.
*
* @param directory The directory to remove
*/
public static void purgeDirectory(File directory) {
if (!directory.isDirectory()) {
return;
}
File[] files = directory.listFiles();
if (files == null) {
return;
}
for (File target : files) {
if (target.isDirectory()) {
purgeDirectory(target);
}
delete(target);
}
}
/**
* Delete the given file or directory and log a message if it was unsuccessful.
* Method is null safe and does nothing when null is passed.
*
* @param file the file to delete
*/
public static void delete(File file) {
if (file != null) {
boolean result = file.delete();
if (!result) {
ConsoleLogger.warning("Could not delete file '" + file + "'");
}
}
}
/**
* Creates the given file or throws an exception.
*
* @param file the file to create
*/
public static void create(File file) {
try {
boolean result = file.createNewFile();
if (!result) {
throw new IllegalStateException("Could not create file '" + file + "'");
}
} catch (IOException e) {
throw new IllegalStateException("Error while creating file '" + file + "'", e);
}
}
/**
* Construct a file path from the given elements, i.e. separate the given elements by the file separator.
*
* @param elements The elements to create a path with
*
* @return The created path
*/
public static String makePath(String... elements) {
return String.join(File.separator, elements);
}
/**
* Creates a textual representation of the current time (including minutes), e.g. useful for
* automatically generated backup files.
*
* @return string of the current time for use in file names
*/
public static String createCurrentTimeString() {
return LocalDateTime.now().format(CURRENT_DATE_STRING_FORMATTER);
}
/**
* Returns a path to a new file (which doesn't exist yet) with a timestamp in the name in the same
* folder as the given file and containing the given file's filename.
*
* @param file the file based on which a new file path should be created
* @return path to a file suitably named for storing a backup
*/
public static String createBackupFilePath(File file) {
String filename = "backup_" + Files.getNameWithoutExtension(file.getName())
+ "_" + createCurrentTimeString()
+ "." + Files.getFileExtension(file.getName());
return makePath(file.getParent(), filename);
}
}
|
[
"yannic.noller@gmx.de"
] |
yannic.noller@gmx.de
|
23f68d84cd72e20f8efbbb38370b44c0bcf9ec6e
|
611e55265243c5f05f15cfc98409e822b7ede691
|
/src/com/hua/test/fragment/TestFragment.java
|
ace7686ac5eb4c5cd7205cceba94ba96360cf700
|
[] |
no_license
|
tianshiaimili/MyNewsAppTest_v2
|
f9db6ede8f2230da604839402847adc55301c188
|
da7fa01f3b2b4109bda282bb86bf8eaac26c5ded
|
refs/heads/master
| 2021-01-02T08:33:03.461897
| 2015-01-21T06:22:36
| 2015-01-21T06:22:36
| 29,574,911
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,487
|
java
|
package com.hua.test.fragment;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.hua.test.utils.LogUtils2;
public class TestFragment extends Fragment{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LogUtils2.i("***onCreate***");
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
LogUtils2.i("***onCreateView***");
String con = "Testing...";
if(savedInstanceState != null){
Bundle mBundle = savedInstanceState;
con = mBundle.getString("textContent");
}
TextView mTextView = new TextView(getActivity());
mTextView.setText(con);
mTextView.setTextSize(50f);
return mTextView;
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
LogUtils2.i("***onViewCreated***");
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
LogUtils2.i("***onActivityCreated***");
}
@Override
public void onStart() {
super.onStart();
LogUtils2.i("***onStart***");
}
@Override
public void onResume() {
super.onResume();
LogUtils2.i("***onResume***");
}
}
|
[
"913540483@qq.com"
] |
913540483@qq.com
|
d7226a12da2391487427c4815d3e8c702bc56a00
|
92225460ebca1bb6a594d77b6559b3629b7a94fa
|
/src/com/kingdee/eas/fdc/market/ChargeTypeFactory.java
|
257a0c0add98bcfff46eb7b19b21926cf54cee68
|
[] |
no_license
|
yangfan0725/sd
|
45182d34575381be3bbdd55f3f68854a6900a362
|
39ebad6e2eb76286d551a9e21967f3f5dc4880da
|
refs/heads/master
| 2023-04-29T01:56:43.770005
| 2023-04-24T05:41:13
| 2023-04-24T05:41:13
| 512,073,641
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,397
|
java
|
package com.kingdee.eas.fdc.market;
import com.kingdee.bos.BOSException;
import com.kingdee.bos.BOSObjectFactory;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.Context;
public class ChargeTypeFactory
{
private ChargeTypeFactory()
{
}
public static com.kingdee.eas.fdc.market.IChargeType getRemoteInstance() throws BOSException
{
return (com.kingdee.eas.fdc.market.IChargeType)BOSObjectFactory.createRemoteBOSObject(new BOSObjectType("AAF3C09F") ,com.kingdee.eas.fdc.market.IChargeType.class);
}
public static com.kingdee.eas.fdc.market.IChargeType getRemoteInstanceWithObjectContext(Context objectCtx) throws BOSException
{
return (com.kingdee.eas.fdc.market.IChargeType)BOSObjectFactory.createRemoteBOSObjectWithObjectContext(new BOSObjectType("AAF3C09F") ,com.kingdee.eas.fdc.market.IChargeType.class, objectCtx);
}
public static com.kingdee.eas.fdc.market.IChargeType getLocalInstance(Context ctx) throws BOSException
{
return (com.kingdee.eas.fdc.market.IChargeType)BOSObjectFactory.createBOSObject(ctx, new BOSObjectType("AAF3C09F"));
}
public static com.kingdee.eas.fdc.market.IChargeType getLocalInstance(String sessionID) throws BOSException
{
return (com.kingdee.eas.fdc.market.IChargeType)BOSObjectFactory.createBOSObject(sessionID, new BOSObjectType("AAF3C09F"));
}
}
|
[
"yfsmile@qq.com"
] |
yfsmile@qq.com
|
47de72d424379a2ae40077d3c0b9246ef0f25531
|
51ca49bb5cfc5220d8af834756d3962450205067
|
/src/org/waveprotocol/wave/federation/WaveletFederationProvider.java
|
ace99c833c6d926fc0599a38a72f767f49d0fee7
|
[
"Apache-2.0"
] |
permissive
|
vega113/WaveInCloud
|
c08f2e33503511e9754888ad63b2a674f348300b
|
7a240021b931b240c33dca0b8443152fb82e0487
|
refs/heads/master
| 2021-01-01T17:47:13.719444
| 2011-11-15T18:00:21
| 2011-11-15T18:00:21
| 1,935,818
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,125
|
java
|
/**
* Copyright 2009 Google Inc.
*
* 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.waveprotocol.wave.federation;
import com.google.protobuf.ByteString;
import org.waveprotocol.wave.federation.FederationErrorProto.FederationError;
import org.waveprotocol.wave.federation.Proto.ProtocolHashedVersion;
import org.waveprotocol.wave.federation.Proto.ProtocolSignedDelta;
import org.waveprotocol.wave.federation.Proto.ProtocolSignerInfo;
import org.waveprotocol.wave.model.id.WaveletName;
import java.util.List;
/**
* The WaveletFederationProvider is an interface that should be implemented by
* the provider, or host, of wavelets. It may be used to pass requests upstream
* with the intention of eventually hitting the authoritative master of a
* specific wavelet. This interface forms one half of the Federation Bus when
* paired with a WaveletFederationListener.
*
* This should be implemented by both the Wavelet Server and the Federation
* Remote. The Federation Remote will then be able to forward these requests out
* over-the-wire to the relevant federated server. The Wavelet Server will
* receive requests over this interface from the Federation Host, i.e., from
* remote servers seeking information of wavelets authoritatively hosted here.
*
* @author jochen@google.com (Jochen Bekmann)
*/
public interface WaveletFederationProvider {
/**
* Base interface for federation listeners which can fail with a federation error code.
*/
interface FederationListener {
/**
* Called when a request fails.
*/
void onFailure(FederationError errorMessage);
}
/**
* Request submission of signed delta.
*
* @param waveletName name of wavelet.
* @param delta delta signed by the submitting WSP.
* @param listener callback for the result.
*/
void submitRequest(WaveletName waveletName, ProtocolSignedDelta delta,
SubmitResultListener listener);
interface SubmitResultListener extends FederationListener {
/**
* Called when a submit succeeds.
*
* @param operationsApplied number of ops applied
* @param hashedVersionAfterApplication wavelet version after the delta
* @param applicationTimestamp timestamp of the application
*/
void onSuccess(int operationsApplied, ProtocolHashedVersion hashedVersionAfterApplication,
long applicationTimestamp);
}
/**
* Retrieve delta history for the given wavelet.
*
* @param waveletName name of wavelet.
* @param domain the domain of the requester, used to determine whether there is
* a user on the wavelet matching the domain to the requester.
* @param startVersion beginning of range (inclusive), minimum 0.
* @param endVersion end of range (exclusive).
* @param lengthLimit estimated size, in bytes, as an upper limit on the amount of data
* returned.
* @param listener callback for the result.
*/
void requestHistory(WaveletName waveletName, String domain,
ProtocolHashedVersion startVersion, ProtocolHashedVersion endVersion,
long lengthLimit, HistoryResponseListener listener);
interface HistoryResponseListener extends FederationListener {
/**
* @param deltaList of serialised {@code ProtocolAppliedWaveletDelta}s, represented as
* {@code ByteString}s. Note that these are not guaranteed to parse correctly as
* applied deltas, so it is up to the implementation of onSuccess to deal with this.
* @param lastCommittedVersion of the wavelet that is committed to persistent
* storage, if smaller than the end version of deltas, null otherwise
* @param versionTruncatedAt the end version of the deltas if less than the
* requested endVersion in the call to {@code requestHistory}
*/
void onSuccess(List<ByteString> deltaList,
ProtocolHashedVersion lastCommittedVersion, long versionTruncatedAt);
}
/**
* Retrieve info for a signer of an applied delta.
*
* This is called by a federation remote when it receives an applied delta from
* a call to requestHistory or from a wavelet update and it doesn't already have
* the info for a signer of the delta.
*
* If you host a wavelet, you MUST maintain a copy of the SignerInfo of every signer used to
* sign any applied delta in the delta history and serve it to anyone who knows the hashed
* version of the wavelet immediately after the delta was applied.
*
* @param signerId the identifier of the signer (the hash of its certificate chain)
* @param waveletName name of wavelet that the delta belongs to.
* @param deltaEndVersion the version of the wavelet immediately after the delta was applied.
* @param listener callback for the result.
*/
void getDeltaSignerInfo(ByteString signerId,
WaveletName waveletName, ProtocolHashedVersion deltaEndVersion,
DeltaSignerInfoResponseListener listener);
interface DeltaSignerInfoResponseListener extends FederationListener {
void onSuccess(ProtocolSignerInfo signerInfo);
}
/**
* Post signer info. This should be called in advance of any call to submitRequest
* with a delta signed by the signer with this info.
*
* @param destinationDomain the domain to post this signer info to.
* @param signerInfo info of a signer.
* @param listener callback for the result.
*/
void postSignerInfo(String destinationDomain, ProtocolSignerInfo signerInfo,
PostSignerInfoResponseListener listener);
interface PostSignerInfoResponseListener extends FederationListener {
void onSuccess();
}
}
|
[
"anorth@google.com"
] |
anorth@google.com
|
60ddc541363146f3d399f41ae6f001bb612262b5
|
22b1fe6a0af8ab3c662551185967bf2a6034a5d2
|
/experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation2/Class_164.java
|
72df20bf9571c12e4af39402603b953d2cce000c
|
[
"Apache-2.0"
] |
permissive
|
lesaint/experimenting-annotation-processing
|
b64ed2182570007cb65e9b62bb2b1b3f69d168d6
|
1e9692ceb0d3d2cda709e06ccc13290262f51b39
|
refs/heads/master
| 2021-01-23T11:20:19.836331
| 2014-11-13T10:37:14
| 2014-11-13T10:37:14
| 26,336,984
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 145
|
java
|
package fr.javatronic.blog.massive.annotation2;
import fr.javatronic.blog.processor.Annotation_002;
@Annotation_002
public class Class_164 {
}
|
[
"sebastien.lesaint@gmail.com"
] |
sebastien.lesaint@gmail.com
|
0c22849c4d7fc070835f446eb431868db40c062f
|
12a99ab3fe76e5c7c05609c0e76d1855bd051bbb
|
/src/main/java/com/alipay/api/domain/ZhimaCreditPeIndustryTradeCloseModel.java
|
8cab28d12a628455d84ea3cf968086182081b71d
|
[
"Apache-2.0"
] |
permissive
|
WindLee05-17/alipay-sdk-java-all
|
ce2415cfab2416d2e0ae67c625b6a000231a8cfc
|
19ccb203268316b346ead9c36ff8aa5f1eac6c77
|
refs/heads/master
| 2022-11-30T18:42:42.077288
| 2020-08-17T05:57:47
| 2020-08-17T05:57:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,149
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 信用服务产品交易关闭
*
* @author auto create
* @since 1.0, 2019-05-16 11:34:53
*/
public class ZhimaCreditPeIndustryTradeCloseModel extends AlipayObject {
private static final long serialVersionUID = 4644786345291192599L;
/**
* 关闭时间,接入方通过其他渠道实际收款时间,应小于当前时间. 可空,不传将默认取服务器当前时间
*/
@ApiField("close_time")
private String closeTime;
/**
* 扩展信息字段,格式:json,注意,如果字符串对应的json对象包含中文字符,需要对包含中文的字段进行编码
*/
@ApiField("ext_info")
private String extInfo;
/**
* 操作类型,close:资金单关闭,finish:资金单完结,已经通过其他渠道完成交易
*/
@ApiField("operate")
private String operate;
/**
* 商户扣款时传入的扣款资金单号,需要保证唯一
*/
@ApiField("out_fund_no")
private String outFundNo;
/**
* 签约产品码
*/
@ApiField("product_code")
private String productCode;
/**
* 平台订单号
*/
@ApiField("zm_order_id")
private String zmOrderId;
public String getCloseTime() {
return this.closeTime;
}
public void setCloseTime(String closeTime) {
this.closeTime = closeTime;
}
public String getExtInfo() {
return this.extInfo;
}
public void setExtInfo(String extInfo) {
this.extInfo = extInfo;
}
public String getOperate() {
return this.operate;
}
public void setOperate(String operate) {
this.operate = operate;
}
public String getOutFundNo() {
return this.outFundNo;
}
public void setOutFundNo(String outFundNo) {
this.outFundNo = outFundNo;
}
public String getProductCode() {
return this.productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
public String getZmOrderId() {
return this.zmOrderId;
}
public void setZmOrderId(String zmOrderId) {
this.zmOrderId = zmOrderId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
f8da25cc82fecdaec8b32265c36bc5ed95436f96
|
183d057ee3f1255551c9f2bc6080dfcc23262639
|
/app/src/main/java/com/cliffex/videomaker/videoeditor/introvd/template/sdk/utils/C8549f.java
|
bdd339790e7f88e710230a11cc7a460d31e66f85
|
[] |
no_license
|
datcoind/VideoMaker-1
|
5567ff713f771b19154ba463469b97d18d0164ec
|
bcd6697db53b1e76ee510e6e805e46b24a4834f4
|
refs/heads/master
| 2023-03-19T20:33:16.016544
| 2019-09-27T13:55:07
| 2019-09-27T13:55:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,369
|
java
|
package com.introvd.template.sdk.utils;
import com.introvd.template.sdk.utils.p394b.C8501a;
import xiaoying.engine.QEngine;
import xiaoying.engine.base.QUtils;
/* renamed from: com.introvd.template.sdk.utils.f */
public class C8549f {
private static Boolean egI;
private static Boolean egJ;
private static Boolean egK;
private static Boolean egL;
private static Boolean egM;
private static Boolean egN;
private static Boolean egO;
public static boolean aJc() {
if (egL != null) {
return egL.booleanValue();
}
QEngine aJv = C8501a.aJs().aJv();
boolean z = false;
if (aJv == null) {
return false;
}
if (QUtils.IsSupportHD(aJv) == 2 || isHD2KSupport() || isHD4KSupport()) {
z = true;
}
egL = Boolean.valueOf(z);
return egL.booleanValue();
}
public static boolean aJd() {
if (egO != null) {
return egO.booleanValue();
}
QEngine aJv = C8501a.aJs().aJv();
boolean z = false;
if (aJv == null) {
return false;
}
if (m25002d(aJv) || m25001c(aJv)) {
z = true;
}
egO = Boolean.valueOf(z);
return egO.booleanValue();
}
public static Boolean aJe() {
if (egK != null) {
return egK;
}
QEngine aJv = C8501a.aJs().aJv();
boolean z = false;
if (aJv == null) {
return Boolean.valueOf(false);
}
if (m25002d(aJv) || m25001c(aJv)) {
z = true;
}
egK = Boolean.valueOf(z);
return egK;
}
public static Boolean aJf() {
if (egJ != null) {
return egJ;
}
QEngine aJv = C8501a.aJs().aJv();
if (aJv == null) {
return Boolean.valueOf(false);
}
egJ = Boolean.valueOf(m25001c(aJv));
return egJ;
}
public static boolean aJg() {
if (egI != null) {
return egI.booleanValue();
}
QEngine aJv = C8501a.aJs().aJv();
if (aJv == null) {
return false;
}
egI = Boolean.valueOf(m25002d(aJv));
return egI.booleanValue();
}
/* renamed from: c */
private static boolean m25001c(QEngine qEngine) {
return (QUtils.IsSupportHD(qEngine) & 16) != 0;
}
/* renamed from: d */
private static boolean m25002d(QEngine qEngine) {
return QUtils.IsSupportHD(qEngine) != 0 && !m25001c(qEngine);
}
public static boolean isHD2KSupport() {
if (egM != null) {
return egM.booleanValue();
}
QEngine aJv = C8501a.aJs().aJv();
boolean z = false;
if (aJv == null) {
return false;
}
if (QUtils.IsSupportHD(aJv) == 4) {
z = true;
}
egM = Boolean.valueOf(z);
return egM.booleanValue();
}
public static boolean isHD4KSupport() {
if (egN != null) {
return egN.booleanValue();
}
QEngine aJv = C8501a.aJs().aJv();
boolean z = false;
if (aJv == null) {
return false;
}
if (QUtils.IsSupportHD(aJv) == 8) {
z = true;
}
egN = Boolean.valueOf(z);
return egN.booleanValue();
}
}
|
[
"bhagat.singh@cliffex.com"
] |
bhagat.singh@cliffex.com
|
e343abd4570d54d526dcd60e09191beae1a3bad2
|
b111b77f2729c030ce78096ea2273691b9b63749
|
/db-example-large-multi-project/project5/src/test/java/org/gradle/test/performance/mediumjavamultiproject/project5/p28/Test569.java
|
8cf26688a6ab93f6aa0bd4503f968a04b0572921
|
[] |
no_license
|
WeilerWebServices/Gradle
|
a1a55bdb0dd39240787adf9241289e52f593ccc1
|
6ab6192439f891256a10d9b60f3073cab110b2be
|
refs/heads/master
| 2023-01-19T16:48:09.415529
| 2020-11-28T13:28:40
| 2020-11-28T13:28:40
| 256,249,773
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,608
|
java
|
package org.gradle.test.performance.mediumjavamultiproject.project5.p28;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test569 {
Production569 objectUnderTest = new Production569();
@Test
public void testProperty0() throws Exception {
Production566 value = new Production566();
objectUnderTest.setProperty0(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() throws Exception {
Production567 value = new Production567();
objectUnderTest.setProperty1(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() throws Exception {
Production568 value = new Production568();
objectUnderTest.setProperty2(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() throws Exception {
String value = "value";
objectUnderTest.setProperty3(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() throws Exception {
String value = "value";
objectUnderTest.setProperty4(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() throws Exception {
String value = "value";
objectUnderTest.setProperty5(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() throws Exception {
String value = "value";
objectUnderTest.setProperty6(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() throws Exception {
String value = "value";
objectUnderTest.setProperty7(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() throws Exception {
String value = "value";
objectUnderTest.setProperty8(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() throws Exception {
String value = "value";
objectUnderTest.setProperty9(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty9());
}
}
|
[
"nateweiler84@gmail.com"
] |
nateweiler84@gmail.com
|
f51ae61913bf74aee017f86cd89e431ed536f28a
|
df01a06d04afc97668a12655c863303c5e8ad71b
|
/src/main/java/ma/lucidea/abcidea/web/rest/RegionResource.java
|
5250cb2d934a2f538217d1fcd8378ac7f12b67f1
|
[] |
no_license
|
zaiche/abcidea-application
|
3e6c4f4c723d367ffbbcb4f6f6f95671115bc96c
|
57bf4d67a51c9cc11a5a1b787746acc712495dfa
|
refs/heads/master
| 2020-05-01T11:53:46.782000
| 2019-03-24T18:41:54
| 2019-03-24T18:41:54
| 177,453,885
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,268
|
java
|
package ma.lucidea.abcidea.web.rest;
import ma.lucidea.abcidea.domain.Region;
import ma.lucidea.abcidea.service.RegionService;
import ma.lucidea.abcidea.web.rest.errors.BadRequestAlertException;
import ma.lucidea.abcidea.web.rest.util.HeaderUtil;
import io.github.jhipster.web.util.ResponseUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.Optional;
/**
* REST controller for managing Region.
*/
@RestController
@RequestMapping("/api")
public class RegionResource {
private final Logger log = LoggerFactory.getLogger(RegionResource.class);
private static final String ENTITY_NAME = "abcideaAppRegion";
private final RegionService regionService;
public RegionResource(RegionService regionService) {
this.regionService = regionService;
}
/**
* POST /regions : Create a new region.
*
* @param region the region to create
* @return the ResponseEntity with status 201 (Created) and with body the new region, or with status 400 (Bad Request) if the region has already an ID
* @throws URISyntaxException if the Location URI syntax is incorrect
*/
@PostMapping("/regions")
public ResponseEntity<Region> createRegion(@RequestBody Region region) throws URISyntaxException {
log.debug("REST request to save Region : {}", region);
if (region.getId() != null) {
throw new BadRequestAlertException("A new region cannot already have an ID", ENTITY_NAME, "idexists");
}
Region result = regionService.save(region);
return ResponseEntity.created(new URI("/api/regions/" + result.getId()))
.headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))
.body(result);
}
/**
* PUT /regions : Updates an existing region.
*
* @param region the region to update
* @return the ResponseEntity with status 200 (OK) and with body the updated region,
* or with status 400 (Bad Request) if the region is not valid,
* or with status 500 (Internal Server Error) if the region couldn't be updated
* @throws URISyntaxException if the Location URI syntax is incorrect
*/
@PutMapping("/regions")
public ResponseEntity<Region> updateRegion(@RequestBody Region region) throws URISyntaxException {
log.debug("REST request to update Region : {}", region);
if (region.getId() == null) {
throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
}
Region result = regionService.save(region);
return ResponseEntity.ok()
.headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, region.getId().toString()))
.body(result);
}
/**
* GET /regions : get all the regions.
*
* @return the ResponseEntity with status 200 (OK) and the list of regions in body
*/
@GetMapping("/regions")
public List<Region> getAllRegions() {
log.debug("REST request to get all Regions");
return regionService.findAll();
}
/**
* GET /regions/:id : get the "id" region.
*
* @param id the id of the region to retrieve
* @return the ResponseEntity with status 200 (OK) and with body the region, or with status 404 (Not Found)
*/
@GetMapping("/regions/{id}")
public ResponseEntity<Region> getRegion(@PathVariable Long id) {
log.debug("REST request to get Region : {}", id);
Optional<Region> region = regionService.findOne(id);
return ResponseUtil.wrapOrNotFound(region);
}
/**
* DELETE /regions/:id : delete the "id" region.
*
* @param id the id of the region to delete
* @return the ResponseEntity with status 200 (OK)
*/
@DeleteMapping("/regions/{id}")
public ResponseEntity<Void> deleteRegion(@PathVariable Long id) {
log.debug("REST request to delete Region : {}", id);
regionService.delete(id);
return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
3c5041a65ff345180a9acd4bebad77118737adac
|
5e2cab8845e635b75f699631e64480225c1cf34d
|
/modules/core/org.jowidgets.spi/src/main/java/org/jowidgets/spi/widgets/IToggleButtonSpi.java
|
7ae18ab18682a2041c43d7017888c4b8ad4e0763
|
[
"BSD-3-Clause"
] |
permissive
|
alec-liu/jo-widgets
|
2277374f059500dfbdb376333743d5507d3c57f4
|
a1dde3daf1d534cb28828795d1b722f83654933a
|
refs/heads/master
| 2022-04-18T02:36:54.239029
| 2018-06-08T13:08:26
| 2018-06-08T13:08:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,698
|
java
|
/*
* Copyright (c) 2010, Michael Grossmann
* 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 the jo-widgets.org 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 org.jowidgets.spi.widgets;
public interface IToggleButtonSpi extends ICheckBoxSpi, IIconSpi {
}
|
[
"herrgrossmann@users.noreply.github.com"
] |
herrgrossmann@users.noreply.github.com
|
680880c9199497de58b1fa45d9985a58b42c9919
|
2dce9d7d707547bf5bc076021bd6a7f970506ef4
|
/src/main/java/com/mjvs/jgsp/dto/LineDTO.java
|
b7366b7ffb7fb01a0e447a26d460df3b9b3f2370
|
[] |
no_license
|
Korma96/jgsp
|
45a0092cd687e1eee8c0080fd5d32f83f6103fd3
|
0e48be9e3600774cf78a58f11d26094f66d2111b
|
refs/heads/master
| 2020-04-20T06:07:14.012109
| 2019-01-31T12:31:36
| 2019-01-31T12:31:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 689
|
java
|
package com.mjvs.jgsp.dto;
public class LineDTO {
private Long id;
private String name;
private boolean active;
public LineDTO() {
}
public LineDTO(Long id, String name, boolean active) {
this.id = id;
this.name = name;
this.active = active;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public boolean isActive() {
return active;
}
public void setActive(boolean active) {
this.active = active;
}
}
|
[
"sunjkajovo@gmail.com"
] |
sunjkajovo@gmail.com
|
0b74116664d9441c99965f355342f6d9dcacecd7
|
ef321145599197d3b071db188beb071c8d691614
|
/src/main/java/cn/onyx/helloworld2/ClientHandle.java
|
093c3ee8e299a51c316b1cf7ddc6d17943984c83
|
[] |
no_license
|
changhe626/netty-demo
|
79c7a7b617dfa1c51dedba2ceb19196e175ea65c
|
1addb8c857102dac8610ea15de7e979e4bb054bf
|
refs/heads/master
| 2020-03-26T11:38:26.014963
| 2018-09-25T13:22:14
| 2018-09-25T13:22:14
| 144,851,890
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,407
|
java
|
package cn.onyx.helloworld2;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.util.ReferenceCountUtil;
public class ClientHandle extends ChannelInboundHandlerAdapter {
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
try {
User user = (User) msg;
System.out.println("客户端接收到的信息是:"+user);
}finally {
//客户端一定要释放
//因为服务端在向外写数据的时候会自动的去释放,不需要手动,所以没有,大师客户端需要,
//否则链接多了就会造成缓冲区的溢出
ReferenceCountUtil.release(msg);
}
}
@Override
public void channelReadComplete(ChannelHandlerContext ctx) throws Exception {
System.out.println("客户端数据读取完毕");
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
cause.printStackTrace();
cause.getClass();
}
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
System.out.println("激活了");
//向服务的发送数据
User user = new User();
user.setId(1);
user.setName("zhaojun");
ctx.writeAndFlush(user);
}
}
|
[
"changhe626@163.com"
] |
changhe626@163.com
|
64a249cc7717600d654031e94fabd9f75b30b92a
|
c71856e5634fcf93e7a08508c8a5270ff0f346bb
|
/java/com/hmdzl/spspd/effects/particles/FlameParticle.java
|
58c8f2bfccf093c414e07fd55e904c6580e6f27c
|
[] |
no_license
|
hmdzl001/SPS-PD
|
3c97581f46fd20d89ebfcfc02016883e2ed53b4f
|
32c5549700634f1a92dd8f7fec9e2731026d03c0
|
refs/heads/master
| 2023-08-17T04:50:22.543027
| 2023-08-12T01:45:10
| 2023-08-12T01:45:10
| 88,491,986
| 43
| 19
| null | 2019-09-03T19:52:33
| 2017-04-17T09:15:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,607
|
java
|
/*
* Pixel Dungeon
* Copyright (C) 2012-2014 Oleg Dolya
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.hmdzl.spspd.effects.particles;
import com.watabou.noosa.particles.Emitter;
import com.watabou.noosa.particles.Emitter.Factory;
import com.watabou.noosa.particles.PixelParticle;
public class FlameParticle extends PixelParticle.Shrinking {
public static final Emitter.Factory FACTORY = new Factory() {
@Override
public void emit(Emitter emitter, int index, float x, float y) {
((FlameParticle) emitter.recycle(FlameParticle.class)).reset(x, y);
}
@Override
public boolean lightMode() {
return true;
}
};
public FlameParticle() {
super();
color(0xEE7722);
lifespan = 0.6f;
acc.set(0, -80);
}
public void reset(float x, float y) {
revive();
this.x = x;
this.y = y;
left = lifespan;
size = 4;
speed.set(0);
}
@Override
public void update() {
super.update();
float p = left / lifespan;
am = p > 0.8f ? (1 - p) * 5 : 1;
}
}
|
[
"295754791@qq.com"
] |
295754791@qq.com
|
545468dcf76cd2bf27285f61d51eb6a895d89e6e
|
6c0d4f3828966746d72471b2131f68a05b4036bf
|
/src/product/cmc/com/topvision/ems/cmc/ccmts/service/impl/CmcAutoClearServiceImpl.java
|
98bbdc8a44165cbf5ecdaf628dcb51f15d86c73f
|
[] |
no_license
|
kevinXiao2016/topvision-server
|
b5b97de7436edcae94ad2648bce8a34759f7cf0b
|
b5934149c50f22661162ac2b8903b61a50bc63e9
|
refs/heads/master
| 2020-04-12T00:54:33.351152
| 2018-12-18T02:16:14
| 2018-12-18T02:16:14
| 162,215,931
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,414
|
java
|
/***********************************************************************
* $Id: CmcAutoClearServiceImpl.java,v1.0 2016年11月14日 下午2:06:18 $
*
* @author: Rod John
*
* (c)Copyright 2011 Topvision All rights reserved.
***********************************************************************/
package com.topvision.ems.cmc.ccmts.service.impl;
import static org.quartz.JobBuilder.newJob;
import static org.quartz.SimpleScheduleBuilder.repeatSecondlyForever;
import static org.quartz.TriggerBuilder.newTrigger;
import java.util.Date;
import org.quartz.JobDetail;
import org.quartz.SimpleTrigger;
import org.quartz.TriggerBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.topvision.ems.autoclear.dao.AutoClearDao;
import com.topvision.ems.cmc.ccmts.dao.CmcDao;
import com.topvision.ems.cmc.ccmts.job.CmcAutoClearJob;
import com.topvision.ems.cmc.ccmts.service.CmcService;
import com.topvision.ems.network.service.EntityService;
import com.topvision.ems.template.service.EntityTypeService;
import com.topvision.framework.service.BaseService;
import com.topvision.platform.service.SchedulerService;
import com.topvision.platform.service.SystemPreferencesService;
/**
* @author Rod John
* @created @2016年11月14日-下午2:06:18
*
*/
@Service
public class CmcAutoClearServiceImpl extends BaseService {
@Autowired
private EntityService entityService;
@Autowired
private SystemPreferencesService systemPreferencesService;
@Autowired
private CmcDao cmcDao;
@Autowired
private CmcService cmcService;
@Autowired
private AutoClearDao autoClearDao;
@Autowired
private EntityTypeService entityTypeService;
@Autowired
private SchedulerService schedulerService;
/*
* (non-Javadoc)
*
* @see com.topvision.framework.service.BaseService#initialize()
*/
@Override
public void initialize() {
super.initialize();
}
/*
* (non-Javadoc)
*
* @see com.topvision.framework.service.BaseService#start()
*/
@Override
public void start() {
try {
JobDetail job = newJob(CmcAutoClearJob.class).withIdentity("CmcAutoClearJob").build();
job.getJobDataMap().put(EntityService.class.getSimpleName(), entityService);
job.getJobDataMap().put(EntityTypeService.class.getSimpleName(), entityTypeService);
job.getJobDataMap().put(SystemPreferencesService.class.getSimpleName(), systemPreferencesService);
job.getJobDataMap().put(CmcDao.class.getSimpleName(), cmcDao);
job.getJobDataMap().put(CmcService.class.getSimpleName(), cmcService);
job.getJobDataMap().put(AutoClearDao.class.getSimpleName(), autoClearDao);
TriggerBuilder<SimpleTrigger> builder = newTrigger().withIdentity(job.getKey().getName(),
job.getKey().getGroup()).withSchedule(repeatSecondlyForever(24 * 3600));
builder.startAt(new Date(System.currentTimeMillis() + 24 * 3600 * 1000));
schedulerService.scheduleJob(job, builder.build());
} catch (Exception e) {
logger.error("", e);
}
}
/*
* (non-Javadoc)
*
* @see com.topvision.framework.service.BaseService#destroy()
*/
@Override
public void destroy() {
super.destroy();
}
}
|
[
"785554043@qq.com"
] |
785554043@qq.com
|
a662047534f89a8b689b81e5074d5ae73324bd58
|
389e2751dc19c8e6213ae566e6fbd70fff820de9
|
/tropicraft/1.5.1/src/packages/tropicraft/entities/ai/jobs/v3/JobSleep.java
|
ec468adb310a77561a7d27b75a4bf2c101ef8f7c
|
[] |
no_license
|
Cojomax99/Tropicraft-Archive
|
9bbb47da5e00bf45ed1397fea1db9d45b546294c
|
130497ac9cd146af3a6f6c800474e382c909b710
|
refs/heads/master
| 2021-01-13T02:24:11.791169
| 2014-11-06T16:54:06
| 2014-11-06T16:54:06
| 26,279,814
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,114
|
java
|
package tropicraft.entities.ai.jobs.v3;
import tropicraft.items.ItemTropicsPickaxe;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import CoroAI.componentAI.jobSystem.JobBase;
import CoroAI.componentAI.jobSystem.JobManager;
public class JobSleep extends JobBase {
public boolean sleeping = true;
public JobSleep(JobManager jm) {
super(jm);
}
@Override
public boolean shouldExecute() {
return true;
}
@Override
public boolean shouldContinue() {
return !sleeping;
}
@Override
public boolean hookHit(DamageSource ds, int damage) {
//System.out.println(ds.toString());
if (ds.getEntity() instanceof EntityPlayer) {
sleeping = false;
ItemStack is = ((EntityPlayer)ds.getEntity()).getCurrentEquippedItem();
if (is != null && (is.getItem() instanceof ItemPickaxe || is.getItem() instanceof ItemTropicsPickaxe)) {
return true;
}
return false;
}
return false;
}
@Override
public void onIdleTick() {
if (!sleeping) super.onIdleTick();
}
}
|
[
"cojomax99@gmail.com"
] |
cojomax99@gmail.com
|
0d4a40875af5b125cd504c0b0d4c289ddc93b736
|
ea65710a42cfd1a0d4c4141ac5ba297c5e6287aa
|
/FoodSpoty/FoodSpoty/src/com/google/android/gms/internal/pm.java
|
d53748c5b56ac69e349da89670ccac5b64fdb088
|
[] |
no_license
|
kanwarbirsingh/ANDROID
|
bc27197234c4c3295d658d73086ada47a0833d07
|
f84b29f0f6bd483d791983d5eeae75555e997c36
|
refs/heads/master
| 2020-03-18T02:26:55.720337
| 2018-05-23T18:05:47
| 2018-05-23T18:05:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,835
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.google.android.gms.internal;
import android.os.Parcel;
import com.google.android.gms.common.internal.safeparcel.a;
import com.google.android.gms.common.internal.safeparcel.b;
import java.util.HashSet;
import java.util.Set;
public class pm
implements android.os.Parcelable.Creator
{
public pm()
{
}
static void a(pi.b.a a1, Parcel parcel, int i)
{
i = b.H(parcel);
Set set = a1.aon;
if (set.contains(Integer.valueOf(1)))
{
b.c(parcel, 1, a1.CK);
}
if (set.contains(Integer.valueOf(2)))
{
b.c(parcel, 2, a1.apJ);
}
if (set.contains(Integer.valueOf(3)))
{
b.c(parcel, 3, a1.apK);
}
b.H(parcel, i);
}
public Object createFromParcel(Parcel parcel)
{
return dC(parcel);
}
public pi.b.a dC(Parcel parcel)
{
int k = 0;
int l = com.google.android.gms.common.internal.safeparcel.a.G(parcel);
HashSet hashset = new HashSet();
int j = 0;
int i = 0;
do
{
if (parcel.dataPosition() < l)
{
int i1 = com.google.android.gms.common.internal.safeparcel.a.F(parcel);
switch (com.google.android.gms.common.internal.safeparcel.a.aH(i1))
{
default:
com.google.android.gms.common.internal.safeparcel.a.b(parcel, i1);
break;
case 1: // '\001'
i = com.google.android.gms.common.internal.safeparcel.a.g(parcel, i1);
hashset.add(Integer.valueOf(1));
break;
case 2: // '\002'
j = com.google.android.gms.common.internal.safeparcel.a.g(parcel, i1);
hashset.add(Integer.valueOf(2));
break;
case 3: // '\003'
k = com.google.android.gms.common.internal.safeparcel.a.g(parcel, i1);
hashset.add(Integer.valueOf(3));
break;
}
} else
{
if (parcel.dataPosition() != l)
{
throw new com.google.android.gms.common.internal.safeparcel.a.a((new StringBuilder()).append("Overread allowed size end=").append(l).toString(), parcel);
}
return new pi.b.a(hashset, i, j, k);
}
} while (true);
}
public pi.b.a[] fA(int i)
{
return new pi.b.a[i];
}
public Object[] newArray(int i)
{
return fA(i);
}
}
|
[
"singhkanwar235@gmail.com"
] |
singhkanwar235@gmail.com
|
5fca087658ec711c2891079e58478dbd1969f0b5
|
a2272f1002da68cc554cd57bf9470322a547c605
|
/src/jdk/jdk.internal.vm.compiler/org.graalvm.compiler.jtt/src/org/graalvm/compiler/jtt/optimize/ArrayCopy06.java
|
b506154abff20ee3396ff0d1bb856db806a241ab
|
[] |
no_license
|
framework-projects/java
|
50af8953ab46c509432c467c9ad69cc63818fa63
|
2d131cb46f232d3bf909face20502e4ba4b84db0
|
refs/heads/master
| 2023-06-28T05:08:00.482568
| 2021-08-04T08:42:32
| 2021-08-04T08:42:32
| 312,414,414
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,748
|
java
|
/*
* Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.graalvm.compiler.jtt.optimize;
import org.graalvm.compiler.jtt.JTTTest;
import org.junit.Before;
import org.junit.Test;
/*
* Tests calls to the array copy method.
*/
public class ArrayCopy06 extends JTTTest {
public static short[] array = new short[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
public static short[] array0 = new short[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
static {
// Ensure System is resolved
System.arraycopy(array, 0, array, 0, array.length);
}
@Before
public void setUp() {
System.currentTimeMillis();
for (int i = 0; i < array.length; i++) {
array[i] = array0[i];
}
}
public static short[] test(int srcPos, int destPos, int length) {
System.arraycopy(array, srcPos, array, destPos, length);
return array;
}
@Test
public void run0() throws Throwable {
runTest("test", 0, 0, 0);
}
@Test
public void run1() throws Throwable {
runTest("test", 0, 0, -1);
}
@Test
public void run2() throws Throwable {
runTest("test", -1, 0, 0);
}
@Test
public void run3() throws Throwable {
runTest("test", 0, -1, 0);
}
@Test
public void run4() throws Throwable {
runTest("test", 0, 0, 2);
}
@Test
public void run5() throws Throwable {
runTest("test", 0, 1, 11);
}
@Test
public void run6() throws Throwable {
runTest("test", 1, 0, 11);
}
@Test
public void run7() throws Throwable {
runTest("test", 1, 1, -1);
}
@Test
public void run8() throws Throwable {
runTest("test", 0, 1, 2);
}
@Test
public void run9() throws Throwable {
runTest("test", 1, 0, 2);
}
@Test
public void run10() throws Throwable {
runTest("test", 1, 1, 2);
}
@Test
public void run11() throws Throwable {
runTest("test", 0, 0, 6);
}
@Test
public void run12() throws Throwable {
runTest("test", 0, 1, 5);
}
@Test
public void run13() throws Throwable {
runTest("test", 1, 0, 5);
}
@Test
public void run14() throws Throwable {
runTest("test", 1, 1, 5);
}
@Test
public void run15() throws Throwable {
runTest("test", 0, 0, 11);
}
@Test
public void run16() throws Throwable {
runTest("test", 0, 1, 10);
}
@Test
public void run17() throws Throwable {
runTest("test", 1, 0, 10);
}
}
|
[
"chovavea@outlook.com"
] |
chovavea@outlook.com
|
f05f221f7e176979452f1947286999fd4d78f8ce
|
d7c5121237c705b5847e374974b39f47fae13e10
|
/airspan.netspan/src/main/java/Netspan/NBI_17_0/Statistics/EmbmsDailyGetResponse.java
|
0c9fa7983c928b16ddd1512824cf51768a12ef6f
|
[] |
no_license
|
AirspanNetworks/SWITModules
|
8ae768e0b864fa57dcb17168d015f6585d4455aa
|
7089a4b6456621a3abd601cc4592d4b52a948b57
|
refs/heads/master
| 2022-11-24T11:20:29.041478
| 2020-08-09T07:20:03
| 2020-08-09T07:20:03
| 184,545,627
| 1
| 0
| null | 2022-11-16T12:35:12
| 2019-05-02T08:21:55
|
Java
|
UTF-8
|
Java
| false
| false
| 1,801
|
java
|
package Netspan.NBI_17_0.Statistics;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="EmbmsDailyGetResult" type="{http://Airspan.Netspan.WebServices}StatsLteEmbmsResponse" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"embmsDailyGetResult"
})
@XmlRootElement(name = "EmbmsDailyGetResponse")
public class EmbmsDailyGetResponse {
@XmlElement(name = "EmbmsDailyGetResult")
protected StatsLteEmbmsResponse embmsDailyGetResult;
/**
* Gets the value of the embmsDailyGetResult property.
*
* @return
* possible object is
* {@link StatsLteEmbmsResponse }
*
*/
public StatsLteEmbmsResponse getEmbmsDailyGetResult() {
return embmsDailyGetResult;
}
/**
* Sets the value of the embmsDailyGetResult property.
*
* @param value
* allowed object is
* {@link StatsLteEmbmsResponse }
*
*/
public void setEmbmsDailyGetResult(StatsLteEmbmsResponse value) {
this.embmsDailyGetResult = value;
}
}
|
[
"dshalom@airspan.com"
] |
dshalom@airspan.com
|
a6376939d81e0d16a01fa7a7ce403fdf68f1119f
|
4b72bc24afcb650b84ed7914839e678fdaa2740a
|
/app/src/main/java/com/havrylyuk/animationexample/adapter/AnimationsAdapter.java
|
43fa20c877d832a11ab42298d91b84a7b46b08cd
|
[
"Apache-2.0"
] |
permissive
|
graviton57/AnimationExample
|
8e734bd3f6abe002993ab7b7cb8daadf8d9b9a75
|
ce74042cfddff65b356ea9f25c6ea1a3e3361b57
|
refs/heads/master
| 2021-01-22T22:08:44.438362
| 2017-03-27T21:15:09
| 2017-03-27T21:15:09
| 85,511,322
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,378
|
java
|
package com.havrylyuk.animationexample.adapter;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import com.havrylyuk.animationexample.fragment.AnimationFragment;
import com.havrylyuk.animationexample.fragment.AnimationFragment.AnimationType;
import java.util.List;
/**
*
* Created by Igor Havrylyuk on 19.03.2017.
*/
public class AnimationsAdapter extends FragmentStatePagerAdapter {
private List<AnimationType> itemList;
public AnimationsAdapter(FragmentManager fm, List<AnimationType> animations) {
super(fm);
this.itemList = animations;
}
public void addItem(AnimationType item) {
itemList.add(item);
notifyDataSetChanged();
}
public void addItems(List<AnimationType> data) {
itemList.addAll(data);
notifyDataSetChanged();
}
@Override
public CharSequence getPageTitle(int position) {
return itemList.get(position).getName();
}
@Override
public Fragment getItem(int position) {
return AnimationFragment.getInstance(itemList.get(position).ordinal());
}
@Override
public int getCount() {
return itemList != null ? itemList.size() : 0;
}
public void clear() {
itemList.clear();
notifyDataSetChanged();
}
}
|
[
"gavrilyuk.igor@gmail.com"
] |
gavrilyuk.igor@gmail.com
|
7066817b50db46a72a9cb5b751c6ff94c8adaa74
|
84b239dc22b2632a6b301fda03c60095234aee8d
|
/src/com/lsfb/cysj/zoom/VersionedGestureDetector.java
|
c27780b8ff9a91c7b95201a4a97bc557da1eaed8
|
[] |
no_license
|
zgscwjm/cy718
|
f3b495d119c75e0b83d5bec0f3ed4a648820b300
|
eaf104a77aa547890b3ceec5d68604c38849057b
|
refs/heads/master
| 2021-01-11T10:47:04.056528
| 2015-09-24T06:41:17
| 2015-09-24T06:41:17
| 42,852,234
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,733
|
java
|
package com.lsfb.cysj.zoom;
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.util.FloatMath;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import android.view.ScaleGestureDetector.OnScaleGestureListener;
import android.view.VelocityTracker;
import android.view.ViewConfiguration;
public abstract class VersionedGestureDetector {
static final String LOG_TAG = "VersionedGestureDetector";
OnGestureListener mListener;
public static VersionedGestureDetector newInstance(Context context, OnGestureListener listener) {
final int sdkVersion = Build.VERSION.SDK_INT;
VersionedGestureDetector detector = null;
if (sdkVersion < Build.VERSION_CODES.ECLAIR) {
detector = new CupcakeDetector(context);
} else if (sdkVersion < Build.VERSION_CODES.FROYO) {
detector = new EclairDetector(context);
} else {
detector = new FroyoDetector(context);
}
detector.mListener = listener;
return detector;
}
public abstract boolean onTouchEvent(MotionEvent ev);
public abstract boolean isScaling();
public static interface OnGestureListener {
public void onDrag(float dx, float dy);
public void onFling(float startX, float startY, float velocityX, float velocityY);
public void onScale(float scaleFactor, float focusX, float focusY);
}
private static class CupcakeDetector extends VersionedGestureDetector {
float mLastTouchX;
float mLastTouchY;
final float mTouchSlop;
final float mMinimumVelocity;
public CupcakeDetector(Context context) {
final ViewConfiguration configuration = ViewConfiguration.get(context);
mMinimumVelocity = configuration.getScaledMinimumFlingVelocity();
mTouchSlop = configuration.getScaledTouchSlop();
}
private VelocityTracker mVelocityTracker;
private boolean mIsDragging;
float getActiveX(MotionEvent ev) {
return ev.getX();
}
float getActiveY(MotionEvent ev) {
return ev.getY();
}
public boolean isScaling() {
return false;
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
switch (ev.getAction()) {
case MotionEvent.ACTION_DOWN: {
mVelocityTracker = VelocityTracker.obtain();
mVelocityTracker.addMovement(ev);
mLastTouchX = getActiveX(ev);
mLastTouchY = getActiveY(ev);
mIsDragging = false;
break;
}
case MotionEvent.ACTION_MOVE: {
final float x = getActiveX(ev);
final float y = getActiveY(ev);
final float dx = x - mLastTouchX, dy = y - mLastTouchY;
if (!mIsDragging) {
// Use Pythagoras to see if drag length is larger than
// touch slop
mIsDragging = FloatMath.sqrt((dx * dx) + (dy * dy)) >= mTouchSlop;
}
if (mIsDragging) {
mListener.onDrag(dx, dy);
mLastTouchX = x;
mLastTouchY = y;
if (null != mVelocityTracker) {
mVelocityTracker.addMovement(ev);
}
}
break;
}
case MotionEvent.ACTION_CANCEL: {
// Recycle Velocity Tracker
if (null != mVelocityTracker) {
mVelocityTracker.recycle();
mVelocityTracker = null;
}
break;
}
case MotionEvent.ACTION_UP: {
if (mIsDragging) {
if (null != mVelocityTracker) {
mLastTouchX = getActiveX(ev);
mLastTouchY = getActiveY(ev);
// Compute velocity within the last 1000ms
mVelocityTracker.addMovement(ev);
mVelocityTracker.computeCurrentVelocity(1000);
final float vX = mVelocityTracker.getXVelocity(), vY = mVelocityTracker.getYVelocity();
// If the velocity is greater than minVelocity, call
// listener
if (Math.max(Math.abs(vX), Math.abs(vY)) >= mMinimumVelocity) {
mListener.onFling(mLastTouchX, mLastTouchY, -vX, -vY);
}
}
}
// Recycle Velocity Tracker
if (null != mVelocityTracker) {
mVelocityTracker.recycle();
mVelocityTracker = null;
}
break;
}
}
return true;
}
}
@TargetApi(5)
private static class EclairDetector extends CupcakeDetector {
private static final int INVALID_POINTER_ID = -1;
private int mActivePointerId = INVALID_POINTER_ID;
private int mActivePointerIndex = 0;
public EclairDetector(Context context) {
super(context);
}
@Override
float getActiveX(MotionEvent ev) {
try {
return ev.getX(mActivePointerIndex);
} catch (Exception e) {
return ev.getX();
}
}
@Override
float getActiveY(MotionEvent ev) {
try {
return ev.getY(mActivePointerIndex);
} catch (Exception e) {
return ev.getY();
}
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
final int action = ev.getAction();
switch (action & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN:
mActivePointerId = ev.getPointerId(0);
break;
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
mActivePointerId = INVALID_POINTER_ID;
break;
case MotionEvent.ACTION_POINTER_UP:
final int pointerIndex = (ev.getAction() & MotionEvent.ACTION_POINTER_INDEX_MASK) >> MotionEvent.ACTION_POINTER_INDEX_SHIFT;
final int pointerId = ev.getPointerId(pointerIndex);
if (pointerId == mActivePointerId) {
// This was our active pointer going up. Choose a new
// active pointer and adjust accordingly.
final int newPointerIndex = pointerIndex == 0 ? 1 : 0;
mActivePointerId = ev.getPointerId(newPointerIndex);
mLastTouchX = ev.getX(newPointerIndex);
mLastTouchY = ev.getY(newPointerIndex);
}
break;
}
mActivePointerIndex = ev.findPointerIndex(mActivePointerId != INVALID_POINTER_ID ? mActivePointerId : 0);
return super.onTouchEvent(ev);
}
}
@TargetApi(8)
private static class FroyoDetector extends EclairDetector {
private final ScaleGestureDetector mDetector;
// Needs to be an inner class so that we don't hit
// VerifyError's on API 4.
private final OnScaleGestureListener mScaleListener = new OnScaleGestureListener() {
@Override
public boolean onScale(ScaleGestureDetector detector) {
mListener.onScale(detector.getScaleFactor(), detector.getFocusX(), detector.getFocusY());
return true;
}
@Override
public boolean onScaleBegin(ScaleGestureDetector detector) {
return true;
}
@Override
public void onScaleEnd(ScaleGestureDetector detector) {
// NO-OP
}
};
public FroyoDetector(Context context) {
super(context);
mDetector = new ScaleGestureDetector(context, mScaleListener);
}
@Override
public boolean isScaling() {
return mDetector.isInProgress();
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
mDetector.onTouchEvent(ev);
return super.onTouchEvent(ev);
}
}
}
|
[
"749937855@qq.com"
] |
749937855@qq.com
|
4af6349924ef7dab7d0a6cb131203c211971de5d
|
bb4dcbb9342cbce21a277944b32d6aa543750f19
|
/src/main/java/org/kapott/hbci/sepa/jaxb/pain_008_001_01/PostalAddress5.java
|
d1732f5bcd0d67e62bce03e282c9c26860f54676
|
[] |
no_license
|
lithomas/hbci4java
|
a299e1f62b9cb946d71abe0a4d644d28e5528167
|
8500adaa2d0374ba40be13645404055bd2a2c57d
|
refs/heads/master
| 2021-01-15T10:36:05.962046
| 2015-10-14T18:56:04
| 2015-10-14T18:56:04
| 44,268,240
| 0
| 0
| null | 2015-10-14T18:34:03
| 2015-10-14T18:34:01
| null |
UTF-8
|
Java
| false
| false
| 2,556
|
java
|
package org.kapott.hbci.sepa.jaxb.pain_008_001_01;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for PostalAddress5 complex type.
*
* <p>
* The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="PostalAddress5">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="AdrLine" type="{urn:sepade:xsd:pain.008.001.01}Max70Text" maxOccurs="2"/>
* <element name="Ctry" type="{urn:sepade:xsd:pain.008.001.01}CountryCode"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PostalAddress5", namespace = "urn:sepade:xsd:pain.008.001.01", propOrder = { "adrLine", "ctry" })
public class PostalAddress5 {
@XmlElement(name = "AdrLine", namespace = "urn:sepade:xsd:pain.008.001.01", required = true)
protected List<String> adrLine;
@XmlElement(name = "Ctry", namespace = "urn:sepade:xsd:pain.008.001.01", required = true)
protected String ctry;
/**
* Gets the value of the adrLine 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 adrLine property.
*
* <p>
* For example, to add a new item, do as follows:
*
* <pre>
* getAdrLine().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list {@link String }
*
*
*/
public List<String> getAdrLine() {
if (adrLine == null) {
adrLine = new ArrayList<String>();
}
return this.adrLine;
}
/**
* Gets the value of the ctry property.
*
* @return possible object is {@link String }
*
*/
public String getCtry() {
return ctry;
}
/**
* Sets the value of the ctry property.
*
* @param value
* allowed object is {@link String }
*
*/
public void setCtry(String value) {
this.ctry = value;
}
}
|
[
"thomas.linowsky@gmx.net"
] |
thomas.linowsky@gmx.net
|
d7bae64ca44a47d23e816d84c730a5f4f4480009
|
7460a95f18f6bbd59653adfc3de3809a722d0f6f
|
/markdown-processor/src/main/java/com/yydcdut/markdown/utils/TextHelper.java
|
6c26851a4171e6af236ba1b919b6e789e326d469
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] |
permissive
|
stripysock/RxMarkdown
|
31c392137be44b4d1f48d94f222ba6af93c79d2a
|
97ed8ef0f1507c41654c4ad6ac7f571ce61e86e8
|
refs/heads/master
| 2020-08-09T12:27:00.026432
| 2019-10-10T05:18:10
| 2019-10-10T05:18:10
| 214,087,559
| 0
| 0
| null | 2019-10-10T04:36:55
| 2019-10-10T04:36:55
| null |
UTF-8
|
Java
| false
| false
| 7,634
|
java
|
/*
* Copyright (C) 2017 yydcdut (yuyidong2015@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yydcdut.markdown.utils;
import android.support.annotation.NonNull;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.util.Pair;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Utility class for edit controller in RxMarkdown
* <p>
* Created by yuyidong on 2017/6/6.
*/
public class TextHelper {
/**
* find '\n' from "start" position
* if not find, return -1
*
* @param s text
* @param start start position
* @return the '\n' position
*/
public static int findNextNewLineChar(CharSequence s, int start) {
for (int i = start; i < s.length(); i++) {
if (s.charAt(i) == '\n') {
return i;
}
}
return -1;
}
/**
* find '\n' from "start" position
* if not find, return s.length()
*
* @param s text
* @param start start position
* @return the '\n' position
*/
public static int findNextNewLineCharCompat(CharSequence s, int start) {
int position = findNextNewLineChar(s, start);
if (position == -1) {
return s.length();
}
return position;
}
/**
* find '\n' before "start" position
*
* @param s text
* @param start start position
* @return the '\n' position
*/
public static int findBeforeNewLineChar(CharSequence s, int start) {
for (int i = start - 1; i > 0; i--) {
if (s.charAt(i) == '\n') {
return i;
}
}
return -1;
}
/**
* whether the content contains the key
*
* @param key the key string
* @param string the content
* @param beforeString the text text before key position
* @param afterString the text text after key position
* @return boolean
*/
public static boolean isNeedFormat(String key, String string, String beforeString, String afterString) {
return string.contains(key) || key.equals(beforeString) || key.equals(afterString);
}
/**
* find the key code start positions and end positions
* especially for code syntax
*
* @param text the content
* @param KEY_CODE the key code
* @return the list contains start positions and end positions for key code
*/
public static List<Pair<Integer, Integer>> find(@NonNull String text, @NonNull String KEY_CODE) {
List<Pair<Integer, Integer>> list = new ArrayList<>();
String[] lines = text.split("\n");
int start = -1;
int end = -1;
int currentLength = 0;
for (int i = 0; i < lines.length; i++) {
if (lines[i].startsWith(KEY_CODE)) {
if (start == -1) {
start = currentLength;
} else if (end == -1 && TextUtils.equals(lines[i], KEY_CODE)) {
end = currentLength;
}
if (start != -1 && end != -1) {
list.add(new Pair<>(start, end));
start = -1;
end = -1;
}
}
currentLength += lines[i].length() + "\n".length();
}
return list;
}
/**
* get the positions of '\n' from SpannableStringBuilder from start to end
*
* @param ssb the content
* @param start the start position
* @param end the end position
* @return the '\n' positions
*/
public static List<Integer> getNewLineCharPosition(SpannableStringBuilder ssb, int start, int end) {
List<Integer> list = new ArrayList<>();
for (int i = start; i < end; i++) {
if (ssb.charAt(i) == '\n') {
list.add(i);
}
}
return list;
}
/**
* get place holder for match string
*
* @param matchString String, the match string
* @return the place holder string
*/
public static String getPlaceHolder(String matchString) {
int length = matchString.length();
StringBuilder placeHolder = new StringBuilder();
for (int i = 0; i < length; i++) {
placeHolder.append(" ");
}
return placeHolder.toString();
}
/**
* replace line change, DOS to Unix and Mac to Unix
*
* @param text the original text content
* @param regex the regex to match
* @param replacement the replacement text
* @return the text after replace
*/
public static StringBuilder standardizeLineEndings(StringBuilder text, String regex, String replacement) {
Pattern p = Pattern.compile(regex, Pattern.MULTILINE);
Matcher m = p.matcher(text);
StringBuffer sb = new StringBuffer();
while (m.find()) {
m.appendReplacement(sb, replacement);
}
m.appendTail(sb);
return new StringBuilder(sb);
}
/**
* replace line change, DOS to Unix and Mac to Unix
*
* @param ssb the original text content
* @param target the target to match
* @param replacement the replacement text
*/
public static void standardizeLineEndings(SpannableStringBuilder ssb, String target, String replacement) {
String string = ssb.toString();
while (string.indexOf(target) != -1) {
int start = string.indexOf(target);
ssb.replace(start, start + target.length(), replacement);
string = ssb.toString();
}
}
/**
* format SpannableStringBuilder for _todo syntax or done syntax
*
* @param ssb the original text
* @param isTodo is _todo or done?
* @return the formatted text
*/
public static String formatTodoLine(SpannableStringBuilder ssb, boolean isTodo) {
if (isTodo) {
return new StringBuilder().append("- [ ] ").append(ssb.subSequence(TextHelper.safePosition("- [ ] ".length(), ssb), TextHelper.safePosition(ssb.length() - 1, ssb))).toString();
} else {
return new StringBuilder().append("- [x] ").append(ssb.subSequence(TextHelper.safePosition("- [x] ".length(), ssb), TextHelper.safePosition(ssb.length() - 1, ssb))).toString();
}
}
/**
* get char from char array
*
* @param array char array
* @param index the index in the char array
* @return the char
*/
public static char getChar(char[] array, int index) {
if (array == null || index < 0 || index >= array.length) {
return 0;
}
return array[index];
}
/**
* get position safely
*
* @param position the position
* @param s the CharSequence
* @return the safe position
*/
public static int safePosition(int position, CharSequence s) {
return position > s.length() ? s.length() : (position < 0 ? 0 : position);
}
}
|
[
"378040621@qq.com"
] |
378040621@qq.com
|
2b4aa95c401cc6e3fff1ec046848ae025c4eb163
|
8f86c6cd69af01feddf6ad852cb43d63d5486439
|
/src/main/java/com/viettel/construction/screens/atemp/adapter/ImageCategoryAdapter.java
|
df67166a0caa3c6704e15ae8650c33063b617f0c
|
[] |
no_license
|
si1991Van/xay-lap
|
3d36c57d3b91cbc2815f35faf270cd229ab0f1d1
|
4cb6c327fbee09ee01b43666b87eb5c1397eb2c8
|
refs/heads/master
| 2022-10-01T14:12:58.413336
| 2020-06-08T01:05:35
| 2020-06-08T01:05:35
| 267,989,939
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,204
|
java
|
package com.viettel.construction.screens.atemp.adapter;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.SimpleTarget;
import com.bumptech.glide.request.transition.Transition;
import com.viettel.construction.screens.atemp.other.FullScreenCategoryActivity;
import com.viettel.construction.server.util.StringUtil;
import java.io.File;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import com.viettel.construction.R;
import com.viettel.construction.model.api.ConstructionImageInfo;
/**
* Created by Ramona on 2/21/2018.
*/
public class ImageCategoryAdapter extends RecyclerView.Adapter<ImageCategoryAdapter.ImageViewHolder> {
private List<ConstructionImageInfo> mList;
private Context mContext;
private Boolean isShow;
private RequestOptions requestOptions;
private OnClickDelete onClickDelete;
public ImageCategoryAdapter(List<ConstructionImageInfo> mList, Context context, Boolean isShow) {
this.mList = mList;
this.isShow = isShow;
this.mContext = context;
requestOptions = new RequestOptions();
requestOptions.placeholder(R.drawable.img_default);
requestOptions.diskCacheStrategy(DiskCacheStrategy.ALL);
requestOptions.error(R.drawable.img_default);
}
@Override
public ImageViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
LayoutInflater inflater = LayoutInflater.from(parent.getContext());
View view = inflater.inflate(R.layout.item_image_from_url, parent, false);
return new ImageViewHolder(view);
}
public void loadImageFromUrl(String base64, ImageView imageView) {
RequestOptions requestOptions = new RequestOptions();
requestOptions.placeholder(R.drawable.img_default);
requestOptions.diskCacheStrategy(DiskCacheStrategy.ALL);
requestOptions.error(R.drawable.img_default);
Glide.with(mContext)
.setDefaultRequestOptions(requestOptions)
.asBitmap()
.load(StringUtil.setImage(base64))
.into(imageView);
}
@Override
public void onBindViewHolder(final ImageViewHolder holder, final int position) {
ConstructionImageInfo image = (ConstructionImageInfo) mList.get(position);
holder.IVItem.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent i = new Intent(mContext, FullScreenCategoryActivity.class);
i.putExtra("position", position);
mContext.startActivity(i);
}
});
holder.IVItem.setClickable(false);
if (!isShow) {
holder.IVDelete.setVisibility(View.GONE);
} else
holder.IVDelete.setVisibility(View.VISIBLE);
// 1 : is server ======= image name is filePath of image
if (image.getStatus() == 1 || image.getStatus() == 49){
// holder.IVItem.setImageBitmap(StringUtil.setImage(image.getBase64String()));
Glide.with(mContext).setDefaultRequestOptions(requestOptions.override(200,200)).asBitmap().load(StringUtil.setImage(image.getBase64String())).into(new SimpleTarget<Bitmap>() {
@Override
public void onResourceReady(Bitmap resource, Transition<? super Bitmap> glideAnimation) {
holder.IVItem.setImageBitmap(resource);
holder.IVItem.setClickable(true);
}
});
}else {
// 0 : is local
Glide.with(mContext).setDefaultRequestOptions(requestOptions.override(200,200)).load(new File(image.getImageName())).into(holder.IVItem);
}
// holder.IVDelete.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
//
//// AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
//// builder.setTitle("Xóa ảnh");
//// builder.setMessage("Bạn có muốn xóa ảnh ?");
//// builder.setCancelable(false);
//// builder.setPositiveButton("Xóa", new DialogInterface.OnClickListener() {
//// @Override
//// public void onClick(DialogInterface dialogInterface, int i) {
//// dialogInterface.dismiss();
//// ((DetailInProcessActivity)mContext).mListUrlUpload.get(position).setStatus(-1);
//// mList.remove(position);
//// notifyDataSetChanged();
//// }
//// });
//// builder.setNegativeButton("Không", new DialogInterface.OnClickListener() {
//// @Override
//// public void onClick(DialogInterface dialogInterface, int i) {
//// dialogInterface.dismiss();
//// }
//// });
//// AlertDialog alertDialog = builder.create();
//// alertDialog.show();
//// alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE).setTextColor(mContext.getResources().getColor(R.color.c5));
//// alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setTextColor(mContext.getResources().getColor(R.color.c5));
////
//
//
//
// }
// });
// holder.IVItem.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View view) {
// Intent i = new Intent(mContext, FullScreenCategoryActivity.class);
// i.putExtra("position", position);
// mContext.startActivity(i);
// }
// });
// loadImageFromUrl(image.getUrl(),holder.IVItem);
// Glide.with(mContext).asBitmap().load(image.getUrl()).into(holder.IVItem);
}
@Override
public int getItemCount() {
return mList.size();
}
public class ImageViewHolder extends RecyclerView.ViewHolder {
@BindView(R.id.img_item)
ImageView IVItem;
@BindView(R.id.btn_image_delete)
ImageView IVDelete;
public ImageViewHolder(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
IVDelete.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
onClickDelete.onDelete(getLayoutPosition());
}
});
}
}
public interface OnClickDelete{
void onDelete(int pos);
}
}
|
[
"sivannguyen1991@gmail.com"
] |
sivannguyen1991@gmail.com
|
2f1a181787e05b89eb0e92341ed6964b4e2db752
|
ba265207a90e5a1764f6f1eaf48360bcb300a8fa
|
/flower.filter/flower.filter.opentracing/src/main/java/com/ly/train/flower/filter/impl/OpenTracingFilter.java
|
273700bd5ab40820b2a5d0ee73cc6dd9aa952c32
|
[
"Apache-2.0"
] |
permissive
|
ibean/flower
|
602cbbd9db26951e3fa312e9f130991878319065
|
c4ca0d5241351e0a3306700286008ae83046c046
|
refs/heads/master
| 2020-07-27T20:15:08.982260
| 2019-08-30T10:44:58
| 2019-08-30T10:44:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,168
|
java
|
/**
* Copyright © 2019 同程艺龙 (zhihui.li@ly.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
*
*/
package com.ly.train.flower.filter.impl;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import com.ly.train.flower.common.core.service.ServiceContext;
import com.ly.train.flower.common.exception.FlowException;
import com.ly.train.flower.common.logging.Logger;
import com.ly.train.flower.common.logging.LoggerFactory;
import com.ly.train.flower.filter.AbstractFilter;
import com.ly.train.flower.filter.FilterChain;
import brave.Tracing;
import brave.opentracing.BraveTracer;
import io.opentracing.Scope;
import io.opentracing.Span;
import io.opentracing.SpanContext;
import io.opentracing.Tracer;
import io.opentracing.Tracer.SpanBuilder;
import io.opentracing.log.Fields;
import io.opentracing.propagation.Format;
import io.opentracing.propagation.TextMap;
import io.opentracing.propagation.TextMapAdapter;
import io.opentracing.tag.Tags;
import zipkin2.reporter.AsyncReporter;
import zipkin2.reporter.okhttp3.OkHttpSender;
/**
* @author leeyazhou
*
*/
public class OpenTracingFilter extends AbstractFilter {
static final Logger logger = LoggerFactory.getLogger(OpenTracingFilter.class);
private volatile Tracer tracer = null;
@Override
public Object doFilter(Object message, ServiceContext context, FilterChain chain) {
String spanName = context.getFlowName() + "." + context.getCurrentServiceName();
SpanBuilder spanBuilder = tracer.buildSpan(spanName);
SpanContext spanContext = null;
Map<String, String> headerMap = getMap(context);
if (headerMap != null) {
spanContext = tracer.extract(Format.Builtin.TEXT_MAP, new TextMapAdapter(headerMap));
if (spanContext != null) {
spanBuilder.asChildOf(spanContext);
}
}
Span span = spanBuilder.start();
span.log("Flower Trace start.");
span.setTag(Tags.SPAN_KIND.getKey(), Tags.SPAN_KIND_SERVER);
Scope scope = tracer.scopeManager().activate(span);
addAttachements(context, span);
span.setTag("id", context.getId());
span.setTag("sync", context.isSync());
span.setTag("codec", context.getCodec());
span.setTag("flowName", context.getFlowName());
span.setTag("serviceName", context.getCurrentServiceName());
span.setTag("flowMessage.transactionId", context.getFlowMessage().getTransactionId());
span.setTag("flowMessage.messageType", context.getFlowMessage().getMessageType());
try {
return chain.doFilter(message, context);
} catch (Exception ex) {
Tags.ERROR.set(span, true);
Map<String, Object> map = new HashMap<String, Object>();
map.put(Fields.EVENT, "error");
map.put(Fields.ERROR_OBJECT, ex);
map.put(Fields.MESSAGE, ex.getMessage());
span.log(map);
throw new FlowException(ex);
} finally {
span.log("Flower Trace end.");
scope.close();
span.finish();
}
}
private Map<String, String> getMap(ServiceContext context) {
Map<String, String> map = null;
// 注入请求头:X-B3-SpanId=a435b7758253d491
// 注入请求头:X-B3-Sampled=1
// 注入请求头:X-B3-TraceId=a435b7758253d491
String key = "X-B3-TraceId";
String value = (String) context.getAttachment(key);
if (value != null) {
map = new HashMap<>();
map.put(key, value);
key = "X-B3-SpanId";
value = (String) context.getAttachment(key);
map.put(key, value);
key = "X-B3-Sampled";
value = (String) context.getAttachment(key);
map.put(key, value);
}
return map;
}
private void addAttachements(ServiceContext request, Span span) {
tracer.inject(span.context(), Format.Builtin.TEXT_MAP, new TextMap() {
@Override
public Iterator<Entry<String, String>> iterator() {
throw new UnsupportedOperationException("TextMapInjectAdapter should only be used with Tracer.inject()");
}
@Override
public void put(String key, String value) {
request.addAttachment(key, value);
}
});
}
public Tracer getTracer() {
if (tracer != null) {
return tracer;
}
final String endpoint = "http://10.100.216.147:9411/api/v2/spans";
tracer = BraveTracer.create(Tracing.newBuilder()
// send to zipkin by okhttp
.spanReporter(AsyncReporter.create(OkHttpSender.create(endpoint)))
// log to the console
.spanReporter(span -> {
logger.info("flower report span : {}", span.toString());
})
//
.localServiceName("flower-filter").build());
return tracer;
}
}
|
[
"lee_yazhou@163.com"
] |
lee_yazhou@163.com
|
4344e1785ded004feba0386ba05c5d2b9d93844b
|
fdbe7ae2cf66afd34b275583441da8b7c437ae8f
|
/app/src/main/java/com/example/lijinfeng/eses/constants/ESConstants.java
|
7f7c519ff7262b068a3dd9c9aca89414c279a7e8
|
[] |
no_license
|
jinfengli/Eses
|
93ba178c90b4aa8ed6a36fe3cbf32a0fa725c9e3
|
cbe25ced7e13d79dcd4d632c7ee51341fdc5cb2e
|
refs/heads/master
| 2021-01-17T10:59:23.398263
| 2016-06-16T08:23:18
| 2016-06-16T08:23:18
| 41,034,793
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,802
|
java
|
package com.example.lijinfeng.eses.constants;
/*
* TODO: 常量类
*
* Date: 15-9-28 下午9:42
* Copyright (c) li.jf All rights reserved.
*/
public class ESConstants {
public static final String TYPE_SLEEP = "type_sleep";
public static final String TYPE_EXERCISE = "type_exercise";
public static final String USER_NAME = "user_account";
public static final String USER_EMAIL = "user_email";
public static final String USER_PWD = "user_pwd";
public static final String USER_REGISTER_TIME = "user_register_time";
// 使用LeanCloud的初始化配置
public static final String APPLICATION_ID = "XrARrV25Agqi3mfaQVY3uO3y";
public static final String CLIENT_KEY = "ATIbQxIBymfdHHhWCK3hWYHk";
public static final String START_DATE_TIME = "start_date_time";
public static final String SLEEP_DATE_TIME = "sleep_date_time";
public static final String SLEEP_TIME_SECOND = "sleep_time_second";
public static final String RECORD_COMMENT = "record_comment";
public static final String EXCEPTION_FLAG = "exception_flag";
public static final String START_DATE = "start_date";
public static final String START_TIME = "start_time";
public static final String SLEEP_DATE = "sleep_date";
public static final String SLEEP_TIME = "sleep_time";
public static final String RECORD_NO = "record_no";
/** 匹配邮件格式的正则表达式 */
public static final String EMAIL_REGEX_1 = "^\\s*\\w+(?:\\.{0,1}[\\w-]+)*@[a-zA-Z0-9]+(?:[-.][a-zA-Z0-9]+)*\\.[a-zA-Z]+\\s*$";
/**
* 正则表达式匹配
* ref: http://blog.csdn.net/fatherican/article/details/8853062
* */
public static final String EMAIL_REGEX = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$";
}
|
[
"lijinfeng.ljf@gmail.com"
] |
lijinfeng.ljf@gmail.com
|
ac70d2542454b3798c38e1cfa350e55261827134
|
d2e16f1f85f7e6c0a3ddc3fbe11039c11d51b3f0
|
/aljoin-file/src/main/java/aljoin/file/object/UploadParam.java
|
169e70c649f1e8509148c623ebe6460d245d9482
|
[] |
no_license
|
jqmtony/micro-service-mybatis
|
7cfda24851146473f563995f0073ca14260e0e26
|
cef9da0a6c4b46189e48f290072fe32c4b7a6bb3
|
refs/heads/master
| 2020-03-20T02:05:08.773021
| 2018-05-03T05:09:27
| 2018-05-03T05:09:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 927
|
java
|
package aljoin.file.object;
import java.util.List;
/**
* 文件上传参数对象
*
* @author zhongjy
* @date 2018/04/08
*/
public class UploadParam {
/**
* 要上传的文件
*/
private List<AljoinFile> fileList;
/**
* 允许上传的文件类型
*/
private List<String> allowTypeList;
/**
* 单个文件最大限制(KB)
*/
private long maxSize;
public List<AljoinFile> getFileList() {
return fileList;
}
public void setFileList(List<AljoinFile> fileList) {
this.fileList = fileList;
}
public List<String> getAllowTypeList() {
return allowTypeList;
}
public void setAllowTypeList(List<String> allowTypeList) {
this.allowTypeList = allowTypeList;
}
public long getMaxSize() {
return maxSize;
}
public void setMaxSize(long maxSize) {
this.maxSize = maxSize;
}
}
|
[
"1032998173@qq.com"
] |
1032998173@qq.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.