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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fea12a7790c82c1b6c3759a655de88adc74b30d5
|
01b23223426a1eb84d4f875e1a6f76857d5e8cd9
|
/icemobile/tags/icemobile-1.0-beta3/icemobile/components/component/src/org/icefaces/component/scan/ScanRenderer.java
|
a474134e20533d58c12ef7d3cc8747469803607b
|
[] |
no_license
|
numbnet/icesoft
|
8416ac7e5501d45791a8cd7806c2ae17305cdbb9
|
2f7106b27a2b3109d73faf85d873ad922774aeae
|
refs/heads/master
| 2021-01-11T04:56:52.145182
| 2016-11-04T16:43:45
| 2016-11-04T16:43:45
| 72,894,498
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,084
|
java
|
/*
* Copyright 2004-2011 ICEsoft Technologies Canada Corp. (c)
*
* 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 an
* limitations under the License.
*/
package org.icefaces.component.scan;
import org.icefaces.component.utils.HTML;
import org.icefaces.component.utils.Utils;
import org.icefaces.impl.application.AuxUploadSetup;
import org.icefaces.impl.application.AuxUploadResourceHandler;
import org.icefaces.util.EnvUtils;
import org.icefaces.renderkit.BaseInputRenderer;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import java.net.URLEncoder;
import java.io.IOException;
import java.util.Map;
import java.util.logging.Logger;
public class ScanRenderer extends BaseInputRenderer {
private static Logger logger = Logger.getLogger(ScanRenderer.class.getName());
@Override
public void decode(FacesContext facesContext, UIComponent uiComponent) {
Scan scan = (Scan) uiComponent;
String clientId = scan.getClientId();
if (scan.isDisabled()) {
return;
}
Map requestParameterMap = facesContext.getExternalContext()
.getRequestParameterMap();
String valueId = clientId + "-text";
Object submitted = requestParameterMap.get(valueId);
if (null == submitted) {
Map auxMap = AuxUploadResourceHandler.getAuxRequestMap();
submitted = auxMap.get(valueId);
}
if (null != submitted) {
String submittedString = String.valueOf(submitted);
if (submittedString != null){
Object convertedValue = this.getConvertedValue(facesContext, uiComponent, submittedString);
this.setSubmittedValue(scan, convertedValue);
}
}
}
public void encodeBegin(FacesContext facesContext, UIComponent uiComponent)
throws IOException {
ResponseWriter writer = facesContext.getResponseWriter();
String clientId = uiComponent.getClientId(facesContext);
Scan scan = (Scan) uiComponent;
boolean disabled = scan.isDisabled();
// span as per MobI-18
boolean isEnhanced = EnvUtils.isEnhancedBrowser(facesContext);
boolean isAuxUpload = EnvUtils.isAuxUploadBrowser(facesContext);
if (!isEnhanced && !isAuxUpload) {
writer.startElement(HTML.SPAN_ELEM, uiComponent);
writer.startElement(HTML.INPUT_ELEM, uiComponent);
writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_TEXT, null);
writer.writeAttribute(HTML.ID_ATTR, clientId, null);
writer.writeAttribute(HTML.NAME_ATTR, clientId, null);
writer.endElement(HTML.INPUT_ELEM);
return;
}
writer.startElement(HTML.SPAN_ELEM, uiComponent);
writer.writeAttribute(HTML.ID_ATTR, clientId, null);
writer.startElement(HTML.INPUT_ELEM, uiComponent);
writer.writeAttribute(HTML.TYPE_ATTR, "button", null);
writer.writeAttribute(HTML.ID_ATTR, clientId + "-button", null);
writer.writeAttribute(HTML.VALUE_ATTR, "Scan QR Code", null);
Utils.writeConcatenatedStyleClasses(writer,
"mobi-button mobi-button-default",
scan.getStyleClass());
writer.writeAttribute(HTML.STYLE_ATTR, scan.getStyle(), HTML.STYLE_ATTR);
if (disabled) {
writer.writeAttribute("disabled", "disabled", null);
}
String script;
if (isAuxUpload) {
AuxUploadSetup auxUpload = AuxUploadSetup.getInstance();
String sessionID = EnvUtils.getSafeSession(facesContext).getId();
String uploadURL = auxUpload.getUploadURL();
String command = "scan?id=" + clientId;
script = "window.location='icemobile://c=" +
URLEncoder.encode(command) +
"&r='+escape(window.location)+'&" +
"JSESSIONID=" + sessionID + "&u=" +
URLEncoder.encode(uploadURL) + "';";
} else {
script = "ice.scan('" + clientId + "');";
}
writer.writeAttribute("onclick", script, null);
writer.endElement(HTML.INPUT_ELEM);
}
public void encodeEnd(FacesContext facesContext, UIComponent uiComponent)
throws IOException {
ResponseWriter writer = facesContext.getResponseWriter();
writer.endElement(HTML.SPAN_ELEM);
}
}
|
[
"ted.goddard@8668f098-c06c-11db-ba21-f49e70c34f74"
] |
ted.goddard@8668f098-c06c-11db-ba21-f49e70c34f74
|
1b4bb42251ee10ec062590897ec34bedf2bb3d96
|
7361846e16b9f439f692cd366ed9b8238bd74d34
|
/dongdong/chongdianbao/app/src/main/java/com/btkj/chongdianbao/utils/L.java
|
d662488e6617fe6f650bc5eb48b44d4c711c123a
|
[] |
no_license
|
wannaRunaway/btwork
|
9cfcb336e23c6805ee0efe315a4266b8e8f69744
|
e22f47660c1ef5696024419008a9aa1f6333b267
|
refs/heads/master
| 2023-07-14T08:35:04.472645
| 2021-08-30T12:13:11
| 2021-08-30T12:13:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,373
|
java
|
package com.btkj.chongdianbao.utils;
import android.util.Log;
/**
* Created by john on 2016/7/25.
*/
public class L {
private L() {
throw new UnsupportedOperationException("cannot be instantiated");
}
public static boolean isDebug = true;// 是否需要打印bug,可以在application的onCreate函数里面初始化
private static final String TAG = "---";
public static void e(String msg) {
if (!isDebug) return;
StackTraceElement targetStackTraceElement = getTargetStackTraceElement();
Log.e(TAG, "(" + targetStackTraceElement.getFileName() + ":"
+ targetStackTraceElement.getLineNumber() + ")");
Log.e(TAG, msg);
}
private static StackTraceElement getTargetStackTraceElement() {
// find the target invoked method
StackTraceElement targetStackTrace = null;
boolean shouldTrace = false;
StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
for (StackTraceElement stackTraceElement : stackTrace) {
boolean isLogMethod = stackTraceElement.getClassName().equals(L.class.getName());
if (shouldTrace && !isLogMethod) {
targetStackTrace = stackTraceElement;
break;
}
shouldTrace = isLogMethod;
}
return targetStackTrace;
}
}
|
[
"xuedicr7@gmail.com"
] |
xuedicr7@gmail.com
|
fc22650ce67e728be87cefd04cb69a17820b4a38
|
12b14b30fcaf3da3f6e9dc3cb3e717346a35870a
|
/examples/commons-math3/mutations/mutants-RiddersSolver/118/org/apache/commons/math3/analysis/solvers/RiddersSolver.java
|
9b3caf77212c29901c357c8784c7a9f16876049b
|
[
"BSD-3-Clause",
"Minpack",
"Apache-2.0"
] |
permissive
|
SmartTests/smartTest
|
b1de326998857e715dcd5075ee322482e4b34fb6
|
b30e8ec7d571e83e9f38cd003476a6842c06ef39
|
refs/heads/main
| 2023-01-03T01:27:05.262904
| 2020-10-27T20:24:48
| 2020-10-27T20:24:48
| 305,502,060
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,184
|
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.commons.math3.analysis.solvers;
import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.exception.NoBracketingException;
import org.apache.commons.math3.exception.TooManyEvaluationsException;
/**
* Implements the <a href="http://mathworld.wolfram.com/RiddersMethod.html">
* Ridders' Method</a> for root finding of real univariate functions. For
* reference, see C. Ridders, <i>A new algorithm for computing a single root
* of a real continuous function </i>, IEEE Transactions on Circuits and
* Systems, 26 (1979), 979 - 980.
* <p>
* The function should be continuous but not necessarily smooth.</p>
*
* @version $Id$
* @since 1.2
*/
public class RiddersSolver extends AbstractUnivariateSolver {
/** Default absolute accuracy. */
private static final double DEFAULT_ABSOLUTE_ACCURACY = 1e-6;
/**
* Construct a solver with default accuracy (1e-6).
*/
public RiddersSolver() {
this(DEFAULT_ABSOLUTE_ACCURACY);
}
/**
* Construct a solver.
*
* @param absoluteAccuracy Absolute accuracy.
*/
public RiddersSolver(double absoluteAccuracy) {
super(absoluteAccuracy);
}
/**
* Construct a solver.
*
* @param relativeAccuracy Relative accuracy.
* @param absoluteAccuracy Absolute accuracy.
*/
public RiddersSolver(double relativeAccuracy,
double absoluteAccuracy) {
super(relativeAccuracy, absoluteAccuracy);
}
/**
* {@inheritDoc}
*/
@Override
protected double doSolve()
throws TooManyEvaluationsException,
NoBracketingException {
double min = getMin();
double max = getMax();
// [x1, x2] is the bracketing interval in each iteration
// x3 is the midpoint of [x1, x2]
// x is the new root approximation and an endpoint of the new interval
double x1 = min;
double y1 = computeObjectiveValue(x1);
double x2 = max;
double y2 = computeObjectiveValue(x2);
// check for zeros before verifying bracketing
if (y1 == 0) {
return min;
}
if (y2 == 0) {
return max;
}
verifyBracketing(min, max);
final double absoluteAccuracy = getAbsoluteAccuracy();
final double functionValueAccuracy = getFunctionValueAccuracy();
final double relativeAccuracy = getRelativeAccuracy();
double oldx = Double.POSITIVE_INFINITY;
while (true) {
// calculate the new root approximation
final double x3 = 0.5 * (x1 + x2);
final double y3 = computeObjectiveValue(x3);
if (FastMath.abs(y3) <= functionValueAccuracy) {
return x3;
}
final double delta = 1 - (y1 * y2) / (y3 * y3); // delta > 1 due to bracketing
final double correction = (FastMath.signum(y2) * FastMath.signum(y3)) *
(x3 - x1) / FastMath.sqrt(delta);
final double x = x3 - correction; // correction != 0
final double y = computeObjectiveValue(x);
// check for convergence
final double tolerance = FastMath.max(relativeAccuracy * FastMath.abs(x), absoluteAccuracy);
if (FastMath.abs(x - oldx) <= tolerance) {
return x;
}
if (FastMath.abs(y) <= functionValueAccuracy) {
return x;
}
// prepare the new interval for next iteration
// Ridders' method guarantees x1 < x < x2
if (correction > 0.0) { // x1 < x < x3
if (FastMath.signum(y1) + FastMath.signum(y) == 0.0) {
x2 = x;
y2 = y;
} else {
x1 = x;
x2 = x3;
y1 = y;
y2 = y3;
}
} else { // x3 < x < x2
if (FastMath.signum(y2) + FastMath.signum(y) == 1.0) {
x1 = x;
y1 = y;
} else {
x1 = x3;
x2 = x;
y1 = y3;
y2 = y;
}
}
oldx = x;
}
}
}
|
[
"kesina@Kesinas-MBP.lan"
] |
kesina@Kesinas-MBP.lan
|
fd92cbfbddcd1d12577f3935b997585c2b7342e4
|
0e0dae718251c31cbe9181ccabf01d2b791bc2c2
|
/SCT2/branches/Bugfix_2.4.x/test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/syncfork/ISyncForkStatemachine.java
|
f9302abfd6e1aff41eebecbcf1f3ea93b353c529
|
[] |
no_license
|
huybuidac20593/yakindu
|
377fb9100d7db6f4bb33a3caa78776c4a4b03773
|
304fb02b9c166f340f521f5e4c41d970268f28e9
|
refs/heads/master
| 2021-05-29T14:46:43.225721
| 2015-05-28T11:54:07
| 2015-05-28T11:54:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 263
|
java
|
package org.yakindu.scr.syncfork;
import org.yakindu.scr.IStatemachine;
public interface ISyncForkStatemachine extends IStatemachine {
public interface SCInterface {
public void raiseE();
public void raiseF();
}
public SCInterface getSCInterface();
}
|
[
"a.muelder@googlemail.com"
] |
a.muelder@googlemail.com
|
b9a0c786b1fbea741dd10ad9742aa72593a1a23f
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/spoon/learning/2396/CtConditionalImpl.java
|
c367acc38a2de4f2d1bff88f19256bd71ba8c87f
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,986
|
java
|
/**
* Copyright (C) 2006-2018 INRIA and contributors
* Spoon - http://spoon.gforge.inria.fr/
*
* This software is governed by the CeCILL-C License under French law and
* abiding by the rules of distribution of free software. You can use, modify
* and/or redistribute the software under the terms of the CeCILL-C license as
* circulated by CEA, CNRS and INRIA at http://www.cecill.info.
*
* 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 CeCILL-C License for more details.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*/
package spoon.support.reflect.code;
import spoon.reflect.annotations.MetamodelPropertyField;
import spoon.reflect.code.CtConditional;
import spoon.reflect.code.CtExpression;
import spoon.reflect.visitor.CtVisitor;
import static spoon.reflect.path.CtRole.CONDITION;
import static spoon.reflect.path.CtRole.ELSE;
import static spoon.reflect.path.CtRole.THEN;
public class CtConditionalImpl<T> extends CtExpressionImpl<T> implements CtConditional< T> {
private static final long serialVersionUID = 1L;
@MetamodelPropertyField(role = ELSE)
CtExpression<T> elseExpression;
@MetamodelPropertyField(role = CONDITION)
CtExpression<Boolean> condition;
@MetamodelPropertyField(role = THEN)
CtExpression<T> thenExpression;
@Override
public void accept(CtVisitor visitor) {
visitor.visitCtConditional(this);
}
@Override
public CtExpression<T> getElseExpression() {
return elseExpression;
}
@Override
public CtExpression<Boolean> getCondition() {
return condition;
}
@Override
public CtExpression<T> getThenExpression() {
return thenExpression;
}
@Override
public <C extends CtConditional<T>> C setElseExpression(CtExpression<T> elseExpression) {
if (elseExpression != null) {
elseExpression.setParent(this);
}
getFactory().getEnvironment().getModelChangeListener().onObjectUpdate(this, ELSE, elseExpression, this.elseExpression);
this.elseExpression = elseExpression;
return (C) this;
}
@Override
public <C extends CtConditional<T>> C setCondition(CtExpression<Boolean> condition) {
if (condition != null) {
condition.setParent(this);
}
getFactory().getEnvironment().getModelChangeListener().onObjectUpdate(this, CONDITION, condition, this.condition);
this.condition = condition;
return (C) this;
}
@Override
public <C extends CtConditional<T>> C setThenExpression(CtExpression<T> thenExpression) {
if (thenExpression != null) {
thenExpression.setParent(this);
}
getFactory().getEnvironment().getModelChangeListener().onObjectUpdate(this, THEN, thenExpression, this.thenExpression);
this.thenExpression = thenExpression;
return (C) this;
}
@Override
public CtConditional<T> clone() {
return (CtConditional<T>) super.clone();
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
a0a572c9cb12a196e566132ea85c15dc9b5bba0b
|
6451c77ce976b7b927b6345e9dd4c586fd15b317
|
/src/main/java/com/learn/bases/testpoly/Main.java
|
336f7a7f08232d2e0289873e8ebbc81a58bb0c1a
|
[] |
no_license
|
dixit-anup/maventotalproject
|
eefae3fbc1de085b3057edd87dcb3605f7e8750b
|
2c0f5581d32dd1aa265e455a9447ab7d160cf5f1
|
refs/heads/master
| 2021-01-16T21:57:39.423961
| 2014-08-21T14:58:18
| 2014-08-21T14:58:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 368
|
java
|
package com.learn.bases.testpoly;
/**
* Created by IntelliJ IDEA.
* User: Flash
* Date: 05.05.12
* Time: 15:55
* To change this template use File | Settings | File Templates.
*/
public class Main {
public static void main(String[] args){
InterfaceMan oneMan = new SecondMan();
oneMan.printInfo();
oneMan.printAbstractInfo();
}
}
|
[
"dmitry.bilyk@gmail.com"
] |
dmitry.bilyk@gmail.com
|
5733ae614f0e207d069378aedd3a79b64ea0879f
|
fee36ba1d4fd00180de95287818416f1be54aa04
|
/Spring/spring8_json_root/src/main/java/com/json/jsonroot/dao/ServiceImpl.java
|
03501ee23e497159b8cf765fb055a8169f16b856
|
[] |
no_license
|
JungWonHong/Spring
|
721f53f48ca1795198ae87211cee6e899e32d706
|
bfdaaeb286fb9b1770db68f5c39f5d86b19eceb6
|
refs/heads/master
| 2020-04-16T13:40:14.444198
| 2019-01-14T09:56:16
| 2019-01-14T09:56:16
| 165,637,644
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 604
|
java
|
package com.json.jsonroot.dao;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.json.jsonroot.model.BoardVO;
@Service
public class ServiceImpl implements jsonService{
@Autowired
private DAO dao;
@Override
public int getMaxid() {
return dao.getMaxid();
}
@Override
public BoardVO get_whereid(int id) {
return dao.get_whereid(id);
}
@Override
public void setInsert(BoardVO b) {
dao.setInsert(b);
}
@Override
public List<BoardVO> selectall() {
return dao.selectall();
}
}
|
[
"sungwoo808@naver.com"
] |
sungwoo808@naver.com
|
86a33b6c6ba26328595eb5e94f40a26a6d7e133e
|
7df85c6c3477e52413ba7e1615c51a2bd5987827
|
/src/main/java/io/NIOServer.java
|
c67ad408654363d579bb7f456e7dfe71c75e2c3b
|
[] |
no_license
|
hjy628/test
|
17f949b28077d82b577096e465a23bffb7eacdde
|
89379c17a84aecadb1d44a6afb2766d26430d437
|
refs/heads/master
| 2022-06-23T06:17:54.031388
| 2019-12-03T07:29:15
| 2019-12-03T07:29:15
| 53,647,728
| 1
| 2
| null | 2022-06-21T00:47:02
| 2016-03-11T07:20:26
|
Java
|
UTF-8
|
Java
| false
| false
| 3,827
|
java
|
package io;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
import java.util.Iterator;
import java.util.Set;
/**
* Created by hjy on 17-7-11.
*/
public class NIOServer {
private static final Logger LOGGER = LoggerFactory.getLogger(NIOServer.class);
/* public static void main(String[] args) throws IOException {
Selector selector = Selector.open();
ServerSocketChannel serverSocketChannel = ServerSocketChannel.open();
serverSocketChannel.configureBlocking(false);
serverSocketChannel.bind(new InetSocketAddress(1234));
serverSocketChannel.register(selector, SelectionKey.OP_ACCEPT);
while (selector.select() > 0) {
Set<SelectionKey> keys = selector.selectedKeys();
Iterator<SelectionKey> iterator = keys.iterator();
while (iterator.hasNext()) {
SelectionKey key = iterator.next();
iterator.remove();
if (key.isAcceptable()) {
ServerSocketChannel acceptServerSocketChannel = (ServerSocketChannel) key.channel();
SocketChannel socketChannel = acceptServerSocketChannel.accept();
socketChannel.configureBlocking(false);
LOGGER.info("Accept request from {}", socketChannel.getRemoteAddress());
socketChannel.register(selector, SelectionKey.OP_READ);
} else if (key.isReadable()) {
SocketChannel socketChannel = (SocketChannel) key.channel();
ByteBuffer buffer = ByteBuffer.allocate(1024);
int count = socketChannel.read(buffer);
if (count <= 0) {
socketChannel.close();
key.cancel();
LOGGER.info("Received invalide data, close the connection");
continue;
}
LOGGER.info("Received message {}", new String(buffer.array()));
}
keys.remove(key);
}
}
}*/
public static void main(String[] args) throws IOException {
Selector selector = Selector.open();
ServerSocketChannel serverSocketChannel = ServerSocketChannel.open();
serverSocketChannel.configureBlocking(false);
serverSocketChannel.bind(new InetSocketAddress(1234));
serverSocketChannel.register(selector, SelectionKey.OP_ACCEPT);
while (true) {
if(selector.selectNow() < 0) {
continue;
}
Set<SelectionKey> keys = selector.selectedKeys();
Iterator<SelectionKey> iterator = keys.iterator();
while(iterator.hasNext()) {
SelectionKey key = iterator.next();
iterator.remove();
if (key.isAcceptable()) {
ServerSocketChannel acceptServerSocketChannel = (ServerSocketChannel) key.channel();
SocketChannel socketChannel = acceptServerSocketChannel.accept();
socketChannel.configureBlocking(false);
LOGGER.info("Accept request from {}", socketChannel.getRemoteAddress());
SelectionKey readKey = socketChannel.register(selector, SelectionKey.OP_READ);
readKey.attach(new Processor());
} else if (key.isReadable()) {
Processor processor = (Processor) key.attachment();
processor.process(key);
}
}
}
}
}
|
[
"hjy628@gmail.com"
] |
hjy628@gmail.com
|
31990ef85822bac85c1675c5c0dee546193ec5e5
|
d7918542c0b4086a487d4d8ad207604ec74b19fb
|
/src/main/java/com/tialys/edito/web/rest/errors/ErrorConstants.java
|
d8ce050f3de6135881cc3863457de96484e81cf9
|
[] |
no_license
|
talexone/edito
|
636e7d430affe1ca37be2b7fa7bc87cb2114508a
|
a46749d133854ebab3370050fcc67297b190bb57
|
refs/heads/main
| 2023-01-23T06:04:23.282125
| 2020-11-28T14:22:31
| 2020-11-28T14:22:31
| 316,584,056
| 0
| 0
| null | 2020-11-28T14:22:51
| 2020-11-27T19:28:32
|
Java
|
UTF-8
|
Java
| false
| false
| 907
|
java
|
package com.tialys.edito.web.rest.errors;
import java.net.URI;
public final class ErrorConstants {
public static final String ERR_CONCURRENCY_FAILURE = "error.concurrencyFailure";
public static final String ERR_VALIDATION = "error.validation";
public static final String PROBLEM_BASE_URL = "https://www.jhipster.tech/problem";
public static final URI DEFAULT_TYPE = URI.create(PROBLEM_BASE_URL + "/problem-with-message");
public static final URI CONSTRAINT_VIOLATION_TYPE = URI.create(PROBLEM_BASE_URL + "/constraint-violation");
public static final URI INVALID_PASSWORD_TYPE = URI.create(PROBLEM_BASE_URL + "/invalid-password");
public static final URI EMAIL_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/email-already-used");
public static final URI LOGIN_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/login-already-used");
private ErrorConstants() {}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
31403b93d836ee19b5e45e1747aa9d62f1d1263a
|
1e92687135b1c15d14fe40173888c61e9abd5aad
|
/src/exp/Aqualush/change7/VersionCompareGraph_Change7.java
|
c1eeefeedb85cd97d8f243f849603c92d4bce1cd
|
[] |
no_license
|
qynnine/RequirementUpdate
|
be21e103525cf77dbcac2cadebe505b793a39fa0
|
0ceceffad319001f1c076c82c47587f4bed65913
|
refs/heads/master
| 2021-01-10T04:51:51.134161
| 2015-12-28T11:57:13
| 2015-12-28T11:57:13
| 48,690,165
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,255
|
java
|
package exp.Aqualush.change7;
import core.dataset.TextDataset;
import core.type.Granularity;
import exp.Aqualush.AqualushSetting;
import relation.CallRelationGraph;
import relation.RelationInfo;
import visual.VersionCompareVisualRelationGraph;
/**
* Created by niejia on 15/12/27.
*/
public class VersionCompareGraph_Change7 {
public static void main(String[] args) {
TextDataset textDataset_change = new TextDataset(AqualushSetting.Aqualush_Change7_For_Every_Single_Method
,AqualushSetting.Aqualush_CleanedRequirement, AqualushSetting.AqualushOracleChange7);
RelationInfo relationInfo = new RelationInfo(AqualushSetting.Change6_JAR, AqualushSetting.Change7_JAR, AqualushSetting.MethodChanges7,
Granularity.METHOD, true);
// relationInfo.setPruning(-1);
relationInfo.setPruning(0.4);
CallRelationGraph callGraph = new CallRelationGraph(relationInfo);
String layoutPath = "data/Aqualush/relation/versionCompareGraph_change7.out";
VersionCompareVisualRelationGraph visualRelationGraph = new VersionCompareVisualRelationGraph(textDataset_change, callGraph, layoutPath, AqualushSetting.MethodChanges7, "Aqualush");
visualRelationGraph.show();
}
}
|
[
"qynnine@gmail.com"
] |
qynnine@gmail.com
|
78c5c5c16390e3a231804ab0eefa098b163bf6be
|
dd80a584130ef1a0333429ba76c1cee0eb40df73
|
/cts/tools/vm-tests-tf/src/dot/junit/opcodes/iput_char/d/T_iput_char_9.java
|
3cb3667d26cb0caf98911c471bc5a1be473ad0bb
|
[
"MIT"
] |
permissive
|
karunmatharu/Android-4.4-Pay-by-Data
|
466f4e169ede13c5835424c78e8c30ce58f885c1
|
fcb778e92d4aad525ef7a995660580f948d40bc9
|
refs/heads/master
| 2021-03-24T13:33:01.721868
| 2017-02-18T17:48:49
| 2017-02-18T17:48:49
| 81,847,777
| 0
| 2
|
MIT
| 2020-03-09T00:02:12
| 2017-02-13T16:47:00
| null |
UTF-8
|
Java
| false
| false
| 722
|
java
|
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dot.junit.opcodes.iput_char.d;
public class T_iput_char_9 {
public void run() {
}
}
|
[
"karun.matharu@gmail.com"
] |
karun.matharu@gmail.com
|
2ddf5e2fb5ca0be49c457c57cf1203336ddbf102
|
1e694075179ff36e8bb4ccb900f1212f4f71e137
|
/crm-provider/src/main/java/com/kycrm/member/service/feedback/FeedBackServiceImpl.java
|
155198d27521a773b55c799d875260e0f6d63393
|
[] |
no_license
|
benling1/bd
|
6d544203c51163b1d986789db5b3851a01d4d9e0
|
8847d9178ceca0e6cff59c23c1efe9a7be136240
|
refs/heads/master
| 2022-12-20T17:02:30.599118
| 2019-08-22T14:06:59
| 2019-08-22T14:06:59
| 203,808,240
| 1
| 0
| null | 2022-12-16T11:54:10
| 2019-08-22T14:08:43
|
Java
|
UTF-8
|
Java
| false
| false
| 760
|
java
|
package com.kycrm.member.service.feedback;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.kycrm.member.core.annotation.MyDataSource;
import com.kycrm.member.core.annotation.MyDataSourceAspect;
import com.kycrm.member.dao.feedback.IFeedBackDao;
import com.kycrm.member.domain.entity.feedback.FeedBack;
@Service("feedBackService")
@MyDataSource(MyDataSourceAspect.MASTER)
public class FeedBackServiceImpl implements IFeedBackService {
@Autowired
private IFeedBackDao feedBackDao;
/**
* 客户反馈信息保存
* @author HL
* @param orderCenterSetup
* @return
*/
public Long insertFeedBack(FeedBack feedBack){
return feedBackDao.insertFeedBack(feedBack);
}
}
|
[
"yubenling1004@163.com"
] |
yubenling1004@163.com
|
19606a2688cb11d684c1a2e86abc6e33215f9068
|
9de0b995964ff548ae79e3644b4a47f295a0921a
|
/codi-sys-core/src/main/java/com/codi/bus/core/sys/domain/CrawlerKeyword.java
|
50ae567a4bb4812aaaa4b699bf55c52d284f2b41
|
[] |
no_license
|
AsWinds/codi-fund
|
9629ab3308f971beebbbbf22d955b894db209152
|
6943891549f2b961788f98bde6b3b96ac25ea6a3
|
refs/heads/master
| 2020-05-09T12:36:16.194102
| 2017-09-01T03:14:02
| 2017-09-01T03:14:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 622
|
java
|
package com.codi.bus.core.sys.domain;
import com.codi.base.domain.BaseDomain;
/**
* 亲,写个类注释呗
* @author wangzhenhao
* @date 2017-05-08 13:12
*/
public class CrawlerKeyword extends BaseDomain {
private Integer id;
private String keyword;
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getKeyword() {
return keyword;
}
public void setKeyword(String keyword) {
this.keyword = keyword == null ? null : keyword.trim();
}
}
|
[
"chenlingjie@cd121.com"
] |
chenlingjie@cd121.com
|
54aad213755913d777651d53ca5bacab72725d4c
|
0907c886f81331111e4e116ff0c274f47be71805
|
/sources/com/google/android/gms/internal/ads/zzdb.java
|
1e1daf72aa7e3bd4e749f873c6bf2994086b3ca0
|
[
"MIT"
] |
permissive
|
Minionguyjpro/Ghostly-Skills
|
18756dcdf351032c9af31ec08fdbd02db8f3f991
|
d1a1fb2498aec461da09deb3ef8d98083542baaf
|
refs/heads/Android-OS
| 2022-07-27T19:58:16.442419
| 2022-04-15T07:49:53
| 2022-04-15T07:49:53
| 415,272,874
| 2
| 0
|
MIT
| 2021-12-21T10:23:50
| 2021-10-09T10:12:36
|
Java
|
UTF-8
|
Java
| false
| false
| 250
|
java
|
package com.google.android.gms.internal.ads;
final class zzdb implements Runnable {
private final /* synthetic */ zzcz zzsl;
zzdb(zzcz zzcz) {
this.zzsl = zzcz;
}
public final void run() {
this.zzsl.zzal();
}
}
|
[
"66115754+Minionguyjpro@users.noreply.github.com"
] |
66115754+Minionguyjpro@users.noreply.github.com
|
6ba5864a0e27df03e1adab1b63a6840d5f0ee155
|
2a6299f8b644309be99044a88ee3eba384eda799
|
/src/test/java/io/github/jhipster/application/web/rest/UserJWTControllerIntTest.java
|
9b39a6c92b1139e86401dbce62fd96cd10fded0c
|
[] |
no_license
|
amankmaharjan/jhipstermicroservicegateway
|
b3209cf33d8e55136a17cadf120c20a3916f481a
|
9105589478146b8b9d5fd4a54cb9bd6f055f90de
|
refs/heads/master
| 2020-03-26T01:56:50.736264
| 2018-08-11T13:59:27
| 2018-08-11T13:59:27
| 144,389,683
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,988
|
java
|
package io.github.jhipster.application.web.rest;
import io.github.jhipster.application.JhipstermicroservicegatewayApp;
import io.github.jhipster.application.domain.User;
import io.github.jhipster.application.repository.UserRepository;
import io.github.jhipster.application.security.jwt.TokenProvider;
import io.github.jhipster.application.web.rest.vm.LoginVM;
import io.github.jhipster.application.web.rest.errors.ExceptionTranslator;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.transaction.annotation.Transactional;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header;
import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.Matchers.isEmptyString;
import static org.hamcrest.Matchers.not;
/**
* Test class for the UserJWTController REST controller.
*
* @see UserJWTController
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = JhipstermicroservicegatewayApp.class)
public class UserJWTControllerIntTest {
@Autowired
private TokenProvider tokenProvider;
@Autowired
private AuthenticationManager authenticationManager;
@Autowired
private UserRepository userRepository;
@Autowired
private PasswordEncoder passwordEncoder;
@Autowired
private ExceptionTranslator exceptionTranslator;
private MockMvc mockMvc;
@Before
public void setup() {
UserJWTController userJWTController = new UserJWTController(tokenProvider, authenticationManager);
this.mockMvc = MockMvcBuilders.standaloneSetup(userJWTController)
.setControllerAdvice(exceptionTranslator)
.build();
}
@Test
@Transactional
public void testAuthorize() throws Exception {
User user = new User();
user.setLogin("user-jwt-controller");
user.setEmail("user-jwt-controller@example.com");
user.setActivated(true);
user.setPassword(passwordEncoder.encode("test"));
userRepository.saveAndFlush(user);
LoginVM login = new LoginVM();
login.setUsername("user-jwt-controller");
login.setPassword("test");
mockMvc.perform(post("/api/authenticate")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(login)))
.andExpect(status().isOk())
.andExpect(jsonPath("$.id_token").isString())
.andExpect(jsonPath("$.id_token").isNotEmpty())
.andExpect(header().string("Authorization", not(nullValue())))
.andExpect(header().string("Authorization", not(isEmptyString())));
}
@Test
@Transactional
public void testAuthorizeWithRememberMe() throws Exception {
User user = new User();
user.setLogin("user-jwt-controller-remember-me");
user.setEmail("user-jwt-controller-remember-me@example.com");
user.setActivated(true);
user.setPassword(passwordEncoder.encode("test"));
userRepository.saveAndFlush(user);
LoginVM login = new LoginVM();
login.setUsername("user-jwt-controller-remember-me");
login.setPassword("test");
login.setRememberMe(true);
mockMvc.perform(post("/api/authenticate")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(login)))
.andExpect(status().isOk())
.andExpect(jsonPath("$.id_token").isString())
.andExpect(jsonPath("$.id_token").isNotEmpty())
.andExpect(header().string("Authorization", not(nullValue())))
.andExpect(header().string("Authorization", not(isEmptyString())));
}
@Test
@Transactional
public void testAuthorizeFails() throws Exception {
LoginVM login = new LoginVM();
login.setUsername("wrong-user");
login.setPassword("wrong password");
mockMvc.perform(post("/api/authenticate")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(login)))
.andExpect(status().isUnauthorized())
.andExpect(jsonPath("$.id_token").doesNotExist())
.andExpect(header().doesNotExist("Authorization"));
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
65ab39586ad040a9a7a21de7c3f7ba95a501a61e
|
01ebbc94cd4d2c63501c2ebd64b8f757ac4b9544
|
/backend/gxqpt-pt/gxqpt-hardware-api-impl/src/main/java/com/hengyunsoft/platform/hardware/constant/ScriptEnum.java
|
db193525dfc36575e9f48748d7f49d1083e6ef85
|
[] |
no_license
|
KevinAnYuan/gxq
|
60529e527eadbbe63a8ecbbad6aaa0dea5a61168
|
9b59f4e82597332a70576f43e3f365c41d5cfbee
|
refs/heads/main
| 2023-01-04T19:35:18.615146
| 2020-10-27T06:24:37
| 2020-10-27T06:24:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 276
|
java
|
package com.hengyunsoft.platform.hardware.constant;
public enum ScriptEnum {
IP("config_ip"),
SERVERID("config_serverId");
private String msg;
ScriptEnum(String msg) {
this.msg = msg;
}
public String getMsg() {
return msg;
}
}
|
[
"470382668@qq.com"
] |
470382668@qq.com
|
f55462a0ef94a1bd6732eb46e8b95fc704db2082
|
a01eaed695583aad70bd7e1da1af0ec736c7bf22
|
/ncep/gov.noaa.nws.ncep.ui.pgen/src/gov/noaa/nws/ncep/ui/pgen/elements/KinkLine.java
|
c2f36d70b0daac811e1822b8e92c708a47c5e1c1
|
[] |
no_license
|
SeanTheGuyThatAlwaysHasComputerTrouble/awips2
|
600d3e6f7ea1b488471e387c642d54cb6eebca1a
|
c8f8c20ca34e41ac23ad8e757130e91c77b558fe
|
refs/heads/master
| 2021-01-19T18:00:12.598133
| 2013-03-26T17:06:45
| 2013-03-26T17:06:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,746
|
java
|
/*
* KinkLine
*
* Date created: 15 January 2009
*
* This code has been developed by the NCEP/SIB for use in the AWIPS2 system.
*/
package gov.noaa.nws.ncep.ui.pgen.elements;
import java.awt.Color;
import java.util.ArrayList;
import com.vividsolutions.jts.geom.Coordinate;
import gov.noaa.nws.ncep.ui.pgen.annotation.ElementOperations;
import gov.noaa.nws.ncep.ui.pgen.annotation.Operation;
import gov.noaa.nws.ncep.ui.pgen.display.IAttribute;
import gov.noaa.nws.ncep.ui.pgen.display.IKink;
import gov.noaa.nws.ncep.ui.pgen.display.ArrowHead.ArrowHeadType;
import gov.noaa.nws.ncep.ui.pgen.display.FillPatternList.FillPattern;
/**
* Class to represent a line element.
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 01/09 J. Wu Initial Creation.
* 05/09 #42 S. Gilbert Added pgenType and pgenCategory to constructors
*
* </pre>
*
* @author J. Wu
* @version 0.0.1
*/
@ElementOperations ( {Operation.COPY_MOVE, Operation.EXTRAPOLATE, Operation.DELETE_PART, Operation.DELETE_POINT} )
public class KinkLine extends Line implements IKink {
double kinkPosition;
ArrowHeadType arrowHeadType;
/**
* Default constructor
*/
public KinkLine() {
kinkPosition = 0.5;
arrowHeadType = ArrowHeadType.FILLED;
}
/**
* @param deleted
* @param range
* @param colors
* @param lineWidth
* @param sizeScale
* @param closed
* @param filled
* @param linePoints
* @param smoothFactor
* @param fillPattern
* @param pgenType
* @param pgenCategory
* @param kinkPosition
* @param arrowHeadType
*/
public KinkLine(Coordinate[] range, Color[] colors,
float lineWidth, double sizeScale, boolean closed, boolean filled,
ArrayList<Coordinate> linePoints, int smoothFactor, FillPattern fillPattern,
String pgenType, String pgenCategory, double kinkPosition,
ArrowHeadType arrowHeadType) {
super( range, colors, lineWidth, sizeScale, closed, filled,
linePoints, smoothFactor, fillPattern, pgenCategory, pgenType);
this.kinkPosition = kinkPosition;
this.arrowHeadType = arrowHeadType;
}
/**
* Gets the color for the object
*/
@Override
public Color getColor() {
return colors[0];
}
/**
* Sets the kink position for the object
* @return type
*/
public void setKinkPosition(double kinkPosition) {
this.kinkPosition = kinkPosition;
}
/**
* Gets the kink position for the object
*/
@Override
public double getKinkPosition() {
return kinkPosition;
}
/**
* Sets the arrow head type for the object
* @return type
*/
public void setArrowHeadType(ArrowHeadType arrowHeadType) {
this.arrowHeadType= arrowHeadType;
}
/**
* Gets the arrow head type for the object
*/
@Override
public ArrowHeadType getArrowHeadType() {
return arrowHeadType;
}
/**
* Gets the start point for the object
*/
@Override
public Coordinate getStartPoint() {
if ( linePoints.size() > 0 ) {
return linePoints.get(0);
}
else {
return null;
}
}
/**
* Gets the end point for the object
*/
@Override
public Coordinate getEndPoint() {
if ( linePoints.size() > 1 ) {
return linePoints.get(linePoints.size() - 1);
}
else {
return null;
}
}
/**
* Update the attributes for the object
*/
@Override
public void update(IAttribute iattr) {
if ( iattr instanceof IKink ){
super.update(attr);
IKink attr = (IKink)iattr;
this.setKinkPosition(attr.getKinkPosition());
this.setArrowHeadType(attr.getArrowHeadType());
ArrayList<Coordinate> coords = new ArrayList<Coordinate>();
coords.add(attr.getStartPoint());
coords.add(attr.getEndPoint());
this.setLinePoints( coords );
}
}
/**
* @return the string
*/
public String toString() {
StringBuilder result = new StringBuilder( getClass().getSimpleName());
result.append("Category:\t" + pgenCategory + "\n");
result.append("Type:\t" + pgenType + "\n");
result.append("Color:\t" + colors[0] + "\n");
result.append("LineWidth:\t" + lineWidth + "\n");
result.append("SizeScale:\t" + sizeScale + "\n");
result.append("Closed:\t" + closed + "\n");
result.append("Filled:\t" + filled + "\n");
result.append("FillPattern:\t" + fillPattern + "\n");
result.append("KinkPosition:\t" + kinkPosition + "\n");
result.append("ArrowHeadType:\t" + arrowHeadType + "\n");
result.append("Location:\t\n");
for ( Coordinate point : linePoints ) {
result.append("\t" + point.x + "\t" + point.y + "\n");
}
return result.toString();
}
}
|
[
"root@lightning.(none)"
] |
root@lightning.(none)
|
7578e39b5bf93f885241bdcd169e912eedc7d824
|
3542fea39a504b964e3fc67f71165f84fcb2c684
|
/src/main/java/com/wishhust/net/http/chapter6/CompressClient.java
|
6db8a69335b3c0d7fcf9edc081c829a77e48f52b
|
[] |
no_license
|
pallcard/learn-java
|
af73d539dbfdf1f718c7c0c4833ebd031765e138
|
6b3e7e2d26ce779a7bdcf3240ee7ae53cb764adf
|
refs/heads/master
| 2022-06-25T04:34:32.942927
| 2020-08-26T15:02:09
| 2020-08-26T15:02:09
| 228,840,443
| 0
| 0
| null | 2022-06-17T02:48:09
| 2019-12-18T12:57:14
|
Java
|
UTF-8
|
Java
| false
| false
| 2,255
|
java
|
package com.wishhust.net.http.chapter6;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
/* WARNING: this code can deadlock if a large file (more than a few
* 10's of thousands of bytes) is sent.
*/
public class CompressClient {
public static final int BUFSIZE = 256; // Size of read buffer
public static void main(String[] args) throws IOException {
if (args.length != 3) { // Test for correct # of args
throw new IllegalArgumentException("Parameter(s): <Server> <Port> <File>");
}
String server = args[0]; // Server name or IP address
int port = Integer.parseInt(args[1]); // Server port
String filename = args[2]; // File to read data from
// Open input and output file (named input.gz)
FileInputStream fileIn = new FileInputStream(filename);
FileOutputStream fileOut = new FileOutputStream(filename + ".gz");
// Create socket connected to server on specified port
Socket sock = new Socket(server, port);
// Send uncompressed byte stream to server
sendBytes(sock, fileIn);
// Receive compressed byte stream from server
InputStream sockIn = sock.getInputStream();
int bytesRead; // Number of bytes read
byte[] buffer = new byte[BUFSIZE]; // Byte buffer
while ((bytesRead = sockIn.read(buffer)) != -1) {
fileOut.write(buffer, 0, bytesRead);
System.out.print("R"); // Reading progress indicator
}
System.out.println(); // End progress indicator line
sock.close(); // Close the socket and its streams
fileIn.close(); // Close file streams
fileOut.close();
}
private static void sendBytes(Socket sock, InputStream fileIn)
throws IOException {
OutputStream sockOut = sock.getOutputStream();
int bytesRead; // Number of bytes read
byte[] buffer = new byte[BUFSIZE]; // Byte buffer
while ((bytesRead = fileIn.read(buffer)) != -1) {
sockOut.write(buffer, 0, bytesRead);
System.out.print("W"); // Writing progress indicator
}
sock.shutdownOutput(); // Finished sending
}
}
|
[
"18162327131@163.com"
] |
18162327131@163.com
|
4d221582cfd229110cec1c1c9a1798196b9c770a
|
305fe6dc70184b3b3397485e77dee46c39336416
|
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201306/cm/FeedItemError.java
|
8a722301110746c742b296b48e75d898e898ac29
|
[
"Apache-2.0"
] |
permissive
|
wangshuo870606/googleads-java-lib
|
a6b51f93bed1d56c9ca277218189a0f196a0dbed
|
dfb2bc36124297833805f08f322b2db8b97fc11f
|
refs/heads/master
| 2021-01-12T19:44:15.291058
| 2014-03-06T05:41:09
| 2014-03-06T05:41:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,559
|
java
|
package com.google.api.ads.adwords.jaxws.v201306.cm;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
*
* FeedItemService related errors.
*
*
* <p>Java class for FeedItemError complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="FeedItemError">
* <complexContent>
* <extension base="{https://adwords.google.com/api/adwords/cm/v201306}ApiError">
* <sequence>
* <element name="reason" type="{https://adwords.google.com/api/adwords/cm/v201306}FeedItemError.Reason" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "FeedItemError", propOrder = {
"reason"
})
public class FeedItemError
extends ApiError
{
protected FeedItemErrorReason reason;
/**
* Gets the value of the reason property.
*
* @return
* possible object is
* {@link FeedItemErrorReason }
*
*/
public FeedItemErrorReason getReason() {
return reason;
}
/**
* Sets the value of the reason property.
*
* @param value
* allowed object is
* {@link FeedItemErrorReason }
*
*/
public void setReason(FeedItemErrorReason value) {
this.reason = value;
}
}
|
[
"jradcliff@google.com"
] |
jradcliff@google.com
|
f8b30e55b04a89b149b7408d3366ca260a237c44
|
ba60c9c5c7728e12f583e5325baa059482937096
|
/Lec4/Sum_of_Digit.java
|
000576bf067f456d236d5f2313e39ab1cee7c2b2
|
[] |
no_license
|
antalparth/Parth
|
3a539058601bc25d27ae9b776fe7ac68271aef0e
|
2fe0b38d37188a12c7407eaebd723971f553e734
|
refs/heads/master
| 2023-05-29T08:39:11.158554
| 2023-05-19T11:18:18
| 2023-05-19T11:18:18
| 127,140,173
| 0
| 0
| null | 2023-05-19T11:18:09
| 2018-03-28T12:55:51
|
Java
|
UTF-8
|
Java
| false
| false
| 340
|
java
|
package Lec4;
import java.util.Scanner;
public class Sum_of_Digit {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int sum = 0;
while (n > 0) {
int rem = n % 10;
sum = sum + rem;
n = n / 10;
}
System.out.println(sum);
}
}
|
[
"monu012as@gmail.com"
] |
monu012as@gmail.com
|
d7152637fd6981b4662b6bbdab1ae464b025973b
|
f8a14fec331ec56dd7e070fc032604117f155085
|
/dist/gameserver/data/scripts/events/DropEvent/DropEvent.java
|
067eb4e9a510171c4d4a24498562f4d1288230bb
|
[] |
no_license
|
OFRF/BladeRush
|
c2f06d050a1f2d79a9b50567b9f1152d6d755149
|
87329d131c0fcc8417ed15479298fdb90bc8f1d2
|
refs/heads/master
| 2023-03-25T13:51:04.404738
| 2020-05-04T14:37:23
| 2020-05-04T14:37:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,882
|
java
|
package events.DropEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.l2.commons.lang.ArrayUtils;
import ru.l2.commons.util.Rnd;
import ru.l2.gameserver.Config;
import ru.l2.gameserver.listener.actor.OnDeathListener;
import ru.l2.gameserver.listener.script.OnInitScriptListener;
import ru.l2.gameserver.model.Creature;
import ru.l2.gameserver.model.Player;
import ru.l2.gameserver.model.actor.listener.CharListenerList;
import ru.l2.gameserver.model.instances.NpcInstance;
import ru.l2.gameserver.data.scripts.Functions;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Stream;
public class DropEvent extends Functions implements OnInitScriptListener {
private static final Logger LOGGER = LoggerFactory.getLogger(DropEvent.class);
private static final String EVENT_NAME = "DropEvent";
private static final DropEvent INSTANCE = new DropEvent();
private static final int MAX_LEVEL = 99;
private static boolean ACTIVE;
private static DropEventItem[][] ITEMS_BY_NPC_LVL;
private static Map<Integer, List<DropEventItem>> ITEMS_BY_NPC_ID;
private OnDeathListenerImpl deathListener = new OnDeathListenerImpl();
private static boolean isActive() {
return IsActive(EVENT_NAME);
}
private static DropEventItem parseItemInfo(final String itemInfo) {
final Pattern p = Pattern.compile("(\\d+)[:-](\\d+)\\((\\d+)\\)(<(\\d+)-(\\d+)>)?(\\[([\\d,]+)\\])?");
final Matcher m = p.matcher(itemInfo);
if (m.matches()) {
final int itemId = Integer.parseInt(m.group(1));
final long itemCount = Long.parseLong(m.group(2));
final double chance = Double.parseDouble(m.group(3));
int minLvl = (m.group(5) != null) ? Integer.parseInt(m.group(5)) : 1;
int maxLvl = (m.group(5) != null) ? Integer.parseInt(m.group(6)) : 99;
final List<Integer> npcIdsList = new ArrayList<>();
if (m.group(8) != null) {
minLvl = 0;
maxLvl = -1;
final String[] npcIdTexts = m.group(8).split(",");
Stream.of(npcIdTexts).map(Integer::parseInt).forEach(npcIdsList::add);
}
final int[] npcIds = new int[npcIdsList.size()];
for (int npcIdIdx = 0; npcIdIdx < npcIds.length; ++npcIdIdx) {
npcIds[npcIdIdx] = npcIdsList.get(npcIdIdx);
}
return new DropEventItem(itemId, itemCount, chance, npcIds, minLvl, maxLvl);
}
throw new RuntimeException("Can't parse drop event item \"" + itemInfo + "\"");
}
private static List<DropEventItem> parseDropEventItemsInfos(final String itemsInfos) {
final List<DropEventItem> dropEventItems = new ArrayList<>();
final StringTokenizer itemsListTokenizer = new StringTokenizer(itemsInfos, ";");
while (itemsListTokenizer.hasMoreTokens()) {
final String itemInfoTextTok = itemsListTokenizer.nextToken();
dropEventItems.add(parseItemInfo(itemInfoTextTok));
}
return dropEventItems;
}
private static void loadConfig() {
ITEMS_BY_NPC_ID = new HashMap<>();
ITEMS_BY_NPC_LVL = new DropEventItem[99][];
if (isActive()) {
final List<DropEventItem> dropEventItems = parseDropEventItemsInfos(Config.EVENT_DropEvent_Items);
for (final DropEventItem dropEventItem : dropEventItems) {
for (int lvl = dropEventItem.getMinLvl(); lvl <= dropEventItem.getMaxLvl(); ++lvl) {
if (lvl > 0) {
final DropEventItem[] byLvl = ITEMS_BY_NPC_LVL[lvl];
ITEMS_BY_NPC_LVL[lvl] = ArrayUtils.add(byLvl, dropEventItem);
}
}
for (final Integer npcId : dropEventItem.getNpcIds()) {
List<DropEventItem> items = ITEMS_BY_NPC_ID.computeIfAbsent(npcId, k -> new ArrayList<>());
items.add(dropEventItem);
}
}
}
}
public void startEvent() {
final Player player = getSelf();
if (!player.getPlayerAccess().IsEventGm) {
return;
}
if (SetActive("DropEvent", true)) {
if (!ACTIVE) {
CharListenerList.addGlobal(deathListener);
}
player.sendMessage("Event 'DropEvent' started.");
} else {
player.sendMessage("Event 'DropEvent' already started.");
}
ACTIVE = true;
show("admin/events/events.htm", player);
}
public void stopEvent() {
final Player player = getSelf();
if (!player.getPlayerAccess().IsEventGm) {
return;
}
if (SetActive("DropEvent", false)) {
if (ACTIVE) {
CharListenerList.removeGlobal(deathListener);
}
LOGGER.info("Event: 'DropEvent' stopped.");
} else {
player.sendMessage("Event: 'DropEvent' not started.");
}
ACTIVE = false;
show("admin/events/events.htm", player);
}
@Override
public void onInit() {
loadConfig();
if (isActive()) {
CharListenerList.addGlobal(deathListener);
ACTIVE = true;
LOGGER.info("Loaded Event: Drop Event [state: activated]");
} else {
LOGGER.info("Loaded Event: Drop Event [state: deactivated]");
}
}
private class OnDeathListenerImpl implements OnDeathListener {
@Override
public void onDeath(final Creature actor, final Creature killer) {
try {
if (!Functions.SimpleCheckDrop(actor, killer)) {
return;
}
final NpcInstance npc = (NpcInstance) actor;
final DropEventItem[] byLvl = ITEMS_BY_NPC_LVL[npc.getLevel()];
final List<DropEventItem> byId = ITEMS_BY_NPC_ID.get(npc.getNpcId());
final Set<DropEventItem> availableDropEventItems = new HashSet<>();
if (byLvl != null) {
availableDropEventItems.addAll(Arrays.asList(byLvl));
}
if (byId != null) {
availableDropEventItems.addAll(byId);
}
availableDropEventItems.stream().filter(dropEventItem -> Rnd.chance(dropEventItem.getChance())).forEach(dropEventItem -> npc.dropItem(killer.getPlayer(), dropEventItem.getItemId(), Config.EVENT_DropEvent_Rate ? ((long) (dropEventItem.getItemCount() * killer.getRateItems())) : dropEventItem.getItemCount()));
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
private static class DropEventItem {
private final int _itemId;
private final long _itemCount;
private final double _chance;
private final int[] _npcIds;
private final int _minLvl;
private final int _maxLvl;
private DropEventItem(final int itemId, final long itemCount, final double chance, final int[] npcIds, final int minLvl, final int maxLvl) {
Arrays.sort(npcIds);
_itemId = itemId;
_itemCount = itemCount;
_chance = chance;
_npcIds = npcIds;
_minLvl = minLvl;
_maxLvl = maxLvl;
}
public double getChance() {
return _chance;
}
public long getItemCount() {
return _itemCount;
}
public int getItemId() {
return _itemId;
}
public int getMaxLvl() {
return _maxLvl;
}
public int getMinLvl() {
return _minLvl;
}
public int[] getNpcIds() {
return _npcIds;
}
}
}
|
[
"yadrov995@gmail.com"
] |
yadrov995@gmail.com
|
4bbe2b100259ae9c4f900ebd9c0b4b0ee404d1ab
|
2476c4340138f7b7b376b0e80411d78584b51c8b
|
/src/main/java/ch/ralscha/extdirectspring/bean/Field.java
|
83278a1daf623ccc6381d810d7cc76f459fb08ba
|
[
"Apache-2.0"
] |
permissive
|
huangzhaorongit/extdirectspring
|
78d539fd1c768edd875a67116947a55239a88fd7
|
95dee4ce5e762149a953314b2f7c96ace5522bdc
|
refs/heads/master
| 2020-06-15T20:09:51.526959
| 2019-06-08T09:09:50
| 2019-06-08T09:09:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,414
|
java
|
/**
* Copyright 2010-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* 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 ch.ralscha.extdirectspring.bean;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
public class Field {
private final Map<String, Object> fieldData;
public Field(String name) {
this.fieldData = new LinkedHashMap<>();
this.fieldData.put("name", name);
}
public void setType(DataType type) {
this.fieldData.put("type", type.getName());
}
public void setAllowBlank(boolean allowBlank) {
this.fieldData.put("allowBlank", allowBlank);
}
public void setDateFormat(String dateFormat) {
this.fieldData.put("dateFormat", dateFormat);
}
public void addCustomProperty(String key, Object value) {
this.fieldData.put(key, value);
}
public Map<String, Object> getFieldData() {
return Collections.unmodifiableMap(this.fieldData);
}
}
|
[
"ralphschaer@gmail.com"
] |
ralphschaer@gmail.com
|
bf64a6cc3cb1bf98a7cc82b6f293e0daa5eb5e66
|
b77e54131dede28b3153d6c67f6c061ac739b7d7
|
/cts/tests/tests/database/src/android/database/cts/AbstractCursor_SelfContentObserverTest.java
|
2975e3d239e8bb663648c3bb69ad045a0f8c0f84
|
[] |
no_license
|
JeffreyLau/JJWD-K8_icsCream
|
2319be6b9b2abd5e9d4da1b5efe91a472539c6c2
|
a9790f6edf973d9e6b102f9be89c7b7f883f1cb2
|
refs/heads/master
| 2021-01-19T11:37:22.502930
| 2013-06-27T06:05:01
| 2013-06-27T06:05:01
| 10,987,138
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,134
|
java
|
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.database.cts;
import android.database.AbstractCursor;
import android.test.AndroidTestCase;
import dalvik.annotation.TestTargets;
import dalvik.annotation.TestLevel;
import dalvik.annotation.TestTargetNew;
import dalvik.annotation.TestTargetClass;
@TestTargetClass(AbstractCursor.class)
// should be @TestTargetClass(AbstractCursor.SelfContentObserver.class)
public class AbstractCursor_SelfContentObserverTest extends AndroidTestCase{
@TestTargetNew(
level = TestLevel.COMPLETE,
notes = "Test constructor of SelfContentObserver",
method = "SelfContentObserver",
args = {}
)
public void testConstructor() {
MockAbstractCursor mac = new MockAbstractCursor();
mac.getMockSelfContentObserver();
}
@TestTargetNew(
level = TestLevel.COMPLETE,
notes = "Test deliverSelfNotifications of SelfContentObserver",
method = "deliverSelfNotifications",
args = {}
)
public void testDeliverSelfNotifications() {
MockAbstractCursor mac = new MockAbstractCursor();
MockAbstractCursor.MockSelfContentObserver msc = mac.getMockSelfContentObserver();
assertFalse(msc.deliverSelfNotifications());
}
@TestTargetNew(
level = TestLevel.COMPLETE,
notes = "Test onChange of SelfContentObserver",
method = "onChange",
args = {boolean.class}
)
public void testOnChange() {
MockAbstractCursor mockCursor = new MockAbstractCursor();
MockAbstractCursor.MockSelfContentObserver msc = mockCursor.getMockSelfContentObserver();
mockCursor.registerContentObserver(msc);
// here, the directly call of AbstractCurso#onChange is intended to test
// SelfContentObserver#onChange
mockCursor.onChange(false);
assertTrue(msc.mIsOnChangeCalled);
assertFalse(msc.mOnChangeResult);
msc.mIsOnChangeCalled = false;
mockCursor.onChange(true);
assertFalse(msc.mIsOnChangeCalled);
assertFalse(msc.mOnChangeResult);
msc.mIsOnChangeCalled = false;
msc.setDeliverSelfNotificationsValue(true);
mockCursor.onChange(true);
assertTrue(msc.mIsOnChangeCalled);
assertTrue(msc.mOnChangeResult);
}
class MockAbstractCursor extends AbstractCursor {
@Override
public String[] getColumnNames() {
return null;
}
@Override
public int getCount() {
return 0;
}
@Override
public double getDouble(int column) {
return 0;
}
@Override
public float getFloat(int column) {
return 0;
}
@Override
public int getInt(int column) {
return 0;
}
@Override
public long getLong(int column) {
return 0;
}
@Override
public short getShort(int column) {
return 0;
}
@Override
public String getString(int column) {
return null;
}
@Override
public boolean isNull(int column) {
return false;
}
public MockSelfContentObserver getMockSelfContentObserver() {
return new MockSelfContentObserver(new MockAbstractCursor());
}
@Override
public void onChange(boolean selfChange) {
super.onChange(selfChange);
}
public class MockSelfContentObserver extends AbstractCursor.SelfContentObserver {
public MockAbstractCursor mMockAbstractCursor;
public boolean mIsOnChangeCalled;
public boolean mOnChangeResult;
private boolean mIsTrue;
public MockSelfContentObserver(AbstractCursor cursor) {
super(cursor);
mMockAbstractCursor = (MockAbstractCursor) cursor;
}
@Override
public void onChange(boolean selfChange) {
super.onChange(selfChange);
mOnChangeResult = selfChange;
mIsOnChangeCalled = true;
}
@Override
public boolean deliverSelfNotifications() {
if (mIsTrue) {
return true;
}
return super.deliverSelfNotifications();
}
public void setDeliverSelfNotificationsValue(boolean isTrue) {
mIsTrue = isTrue;
}
}
}
}
|
[
"meto.jeffrey@gmail.com"
] |
meto.jeffrey@gmail.com
|
777e9c609bef1f58c0a984fc93a0df3f42823f6f
|
9aca950475568296704a1282759bc080d45129f1
|
/src/net/minecraft/PathfinderGoalMakeLove.java
|
e50b8db784d8b3a6fba2687b8d65153e944ad857
|
[] |
no_license
|
jiangzhonghui/MinecraftServerDec
|
1ef67dc5a4f34abffeaf6a6253ef8a2fb6449957
|
ca2f62642a5629ebc3fa7ce356142e767be85e10
|
refs/heads/master
| 2021-01-22T16:13:27.101670
| 2014-11-09T10:15:49
| 2014-11-09T10:15:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,154
|
java
|
package net.minecraft;
public class PathfinderGoalMakeLove extends PathfinderGoal {
private EntityVillager b;
private EntityVillager c;
private World d;
private int e;
Village a;
public PathfinderGoalMakeLove(EntityVillager var1) {
this.b = var1;
this.d = var1.world;
this.setMutexBits(3);
}
public boolean canExecute() {
if (this.b.l() != 0) {
return false;
} else if (this.b.getRandom().nextInt(500) != 0) {
return false;
} else {
this.a = this.d.ae().a(new Position(this.b), 0);
if (this.a == null) {
return false;
} else if (this.f() && this.b.n(true)) {
Entity var1 = this.d.a(EntityVillager.class, this.b.getBoundingBox().grow(8.0D, 3.0D, 8.0D), (Entity) this.b);
if (var1 == null) {
return false;
} else {
this.c = (EntityVillager) var1;
return this.c.l() == 0 && this.c.n(true);
}
} else {
return false;
}
}
}
public void setup() {
this.e = 300;
this.b.l(true);
}
public void finish() {
this.a = null;
this.c = null;
this.b.l(false);
}
public boolean canContinue() {
return this.e >= 0 && this.f() && this.b.l() == 0 && this.b.n(false);
}
public void execute() {
--this.e;
this.b.getControllerLook().a(this.c, 10.0F, 30.0F);
if (this.b.getDistanceSquared(this.c) > 2.25D) {
this.b.getNavigation().moveTo((Entity) this.c, 0.25D);
} else if (this.e == 0 && this.c.ck()) {
this.g();
}
if (this.b.getRandom().nextInt(35) == 0) {
this.d.broadcastEntityEffect((Entity) this.b, (byte) 12);
}
}
private boolean f() {
if (!this.a.i()) {
return false;
} else {
int var1 = (int) ((double) ((float) this.a.c()) * 0.35D);
return this.a.e() < var1;
}
}
private void g() {
EntityVillager var1 = this.b.b((EntityAgeable) this.c);
this.c.b(6000);
this.b.b(6000);
this.c.o(false);
this.b.o(false);
var1.b(-24000);
var1.setPositionRotation(this.b.locationX, this.b.locationY, this.b.locationZ, 0.0F, 0.0F);
this.d.addEntity((Entity) var1);
this.d.broadcastEntityEffect((Entity) var1, (byte) 12);
}
}
|
[
"Shev4ik.den@gmail.com"
] |
Shev4ik.den@gmail.com
|
461a6889ea79a5ee0ea0675f843ca9d230176100
|
e47823f99752ec2da083ac5881f526d4add98d66
|
/test_data/14_Azureus2.3.0.6/src/org/gudy/azureus2/ui/swt/views/tableitems/pieces/BlockCountItem.java
|
bdaf62ea59cf7f00ee03950d8b0db1e7b572605d
|
[] |
no_license
|
Echtzeitsysteme/hulk-ase-2016
|
1dee8aca80e2425ab6acab18c8166542dace25cd
|
fbfb7aee1b9f29355a20e365f03bdf095afe9475
|
refs/heads/master
| 2020-12-24T05:31:49.671785
| 2017-05-04T08:18:32
| 2017-05-04T08:18:32
| 56,681,308
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,680
|
java
|
/*
* Copyright (C) 2004 Aelitis SARL, All rights Reserved
*
* 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.
*
* 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 ( see the LICENSE file ).
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* AELITIS, SARL au capital de 30,000 euros,
* 8 Allee Lenotre, La Grille Royale, 78600 Le Mesnil le Roi, France.
*/
package org.gudy.azureus2.ui.swt.views.tableitems.pieces;
import org.gudy.azureus2.core3.peer.PEPiece;
import org.gudy.azureus2.plugins.ui.tables.*;
import org.gudy.azureus2.ui.swt.views.table.utils.CoreTableColumn;
/**
*
* @author TuxPaper
* @since 2.0.8.5
*/
public class BlockCountItem
extends CoreTableColumn
implements TableCellRefreshListener
{
/** Default Constructor */
public BlockCountItem() {
super("numberofblocks", ALIGN_TRAIL, POSITION_LAST, 65, TableManager.TABLE_TORRENT_PIECES);
}
public void refresh(TableCell cell) {
PEPiece piece = (PEPiece)cell.getDataSource();
long value = (piece == null) ? 0 : piece.getNbBlocs();
if( !cell.setSortValue( value ) && cell.isValid() ) {
return;
}
cell.setText(""+value);
}
}
|
[
"sven.peldszus@stud.tu-darmstadt.de"
] |
sven.peldszus@stud.tu-darmstadt.de
|
3f867845ff5d7e09e3f126fce4cf420ffea4cefb
|
5d32348ec4ae9b871751662ba2735fc196eeb5e5
|
/ebook_concurrency_programming_wangwenjun_work/src/main/java/com/wangwenjun/concurrent/chapter29/MessageMatcherException.java
|
7a26e55aabaf7762fc9344407de95ee983357ae1
|
[] |
no_license
|
kingdelee/JDK11_Lee_Mvn_20181213
|
0060e4a3269dcf7a635ba20871fb6077aa47a790
|
c106c2b98ac466dba85756827fa26c0b2302550a
|
refs/heads/master
| 2020-04-13T11:56:27.280624
| 2019-03-28T10:06:20
| 2019-03-28T10:06:20
| 163,188,239
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 194
|
java
|
package com.wangwenjun.concurrent.chapter29;
public class MessageMatcherException extends RuntimeException {
public MessageMatcherException(String message) {
super(message);
}
}
|
[
"137211319@qq.com"
] |
137211319@qq.com
|
542416e50699572df45668d4343046fd81612e69
|
002140e0ea60a9fcfac9fc07f60bb3e9dc49ab67
|
/src/main/java/net/ibizsys/psrt/srv/wf/demodel/wfreminder/ac/WFReminderDefaultACModel.java
|
4f45514e894cf86e7fceef5e13865d987ddb619d
|
[] |
no_license
|
devibizsys/saibz5_all
|
ecacc91122920b8133c2cff3c2779c0ee0381211
|
87c44490511253b5b34cd778623f9b6a705cb97c
|
refs/heads/master
| 2021-01-01T16:15:17.146300
| 2017-07-20T07:52:21
| 2017-07-20T07:52:21
| 97,795,014
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 326
|
java
|
/**
* iBizSys 5.0 用户自定义代码
* http://www.ibizsys.net
*/
package net.ibizsys.psrt.srv.wf.demodel.wfreminder.ac;
/**
* 实体自动填充 [DEFAULT]对象模型
*/
public class WFReminderDefaultACModel extends WFReminderDefaultACModelBase {
public WFReminderDefaultACModel () {
super();
}
}
|
[
"dev@ibizsys.net"
] |
dev@ibizsys.net
|
0565088f623fbbd8da94bd6c95490e4fd50cdbcd
|
689cdf772da9f871beee7099ab21cd244005bfb2
|
/classes2/com/tencent/ʻˑ.java
|
3b37376d706f6895846328dcb3e259f044afd674
|
[] |
no_license
|
waterwitness/dazhihui
|
9353fd5e22821cb5026921ce22d02ca53af381dc
|
ad1f5a966ddd92bc2ac8c886eb2060d20cf610b3
|
refs/heads/master
| 2020-05-29T08:54:50.751842
| 2016-10-08T08:09:46
| 2016-10-08T08:09:46
| 70,314,359
| 2
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,865
|
java
|
package com.tencent;
import android.os.Handler;
import com.tencent.imsdk.QLog;
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Iterator;
import java.util.List;
final class ʻˑ
implements Runnable
{
ʻˑ(ʻˏ paramʻˏ, List paramList) {}
public final void run()
{
Object localObject1 = this.b.iterator();
int i = 0;
for (;;)
{
Object localObject3;
int j;
if (((Iterator)localObject1).hasNext())
{
localObject3 = (String)((Iterator)localObject1).next();
j = i + 1;
}
try
{
QLog.d("TIMFileElem", 1, "downloading from url: " + (String)localObject3);
localObject3 = (HttpURLConnection)new URL((String)localObject3).openConnection();
QLog.d("TIMFileElem", 1, "http resp code: " + ((HttpURLConnection)localObject3).getResponseCode() + "|descr: " + ((HttpURLConnection)localObject3).getResponseMessage());
if (((HttpURLConnection)localObject3).getResponseCode() != 200)
{
i = j;
if (j < this.b.size()) {
continue;
}
localObject1 = ((HttpURLConnection)localObject3).getResponseCode() + "|" + ((HttpURLConnection)localObject3).getResponseMessage();
this.a.b.post(new ʻי(this, (String)localObject1));
return;
}
}
catch (Exception localException1)
{
localException1.printStackTrace();
this.a.b.post(new ʻـ(this, localException1));
return;
}
try
{
BufferedInputStream localBufferedInputStream = new BufferedInputStream(((HttpURLConnection)localObject3).getInputStream());
localByteArrayOutputStream = new ByteArrayOutputStream();
byte[] arrayOfByte = new byte['⠀'];
for (;;)
{
i = localBufferedInputStream.read(arrayOfByte);
if (i < 0) {
break;
}
localByteArrayOutputStream.write(arrayOfByte, 0, i);
}
}
catch (Exception localException2)
{
ByteArrayOutputStream localByteArrayOutputStream;
localException2.printStackTrace();
Object localObject4 = localException2.toString();
this.a.b.post(new ʻᐧ(this, (String)localObject4));
((HttpURLConnection)localObject3).disconnect();
i = j;
continue;
localObject4 = localByteArrayOutputStream.toByteArray();
this.a.b.post(new ʻٴ(this, (byte[])localObject4));
return;
}
finally
{
((HttpURLConnection)localObject3).disconnect();
}
}
}
}
/* Location: E:\apk\dazhihui2\classes2-dex2jar.jar!\com\tencent\ʻˑ.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
9cce3bba369be1930a064bc95627ade8b42ef957
|
82adffa46f4d9b3bef068724e7a3fb5cc7299f47
|
/genesis_src/connections/JButtonBox.java
|
6cb4cf275ccd0eacbb9c3ccf6e32f9e701e70931
|
[] |
no_license
|
giripal/genesis
|
3fbe9577613a77b485212cfc8bc8ce87ad13b652
|
25e23a5fc1d9463cf54791a551ce0176daea2a99
|
refs/heads/master
| 2020-04-27T10:48:52.570891
| 2014-09-29T03:15:53
| 2014-09-29T03:15:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,870
|
java
|
/* 1: */ package connections;
/* 2: */
/* 3: */ import java.awt.event.ActionEvent;
/* 4: */ import java.awt.event.ActionListener;
/* 5: */ import javax.swing.JButton;
/* 6: */
/* 7: */ public class JButtonBox
/* 8: */ extends JButton
/* 9: */ implements WiredBox, ActionListener
/* 10: */ {
/* 11: */ private static final long serialVersionUID = -4407622739728274352L;
/* 12: */ public static final String ENABLE = "enable";
/* 13: */ public static final String VISIBLE = "visible";
/* 14:23 */ public static String output = "pushed";
/* 15: */
/* 16: */ public JButtonBox(String string)
/* 17: */ {
/* 18:26 */ super(string);
/* 19:27 */ addActionListener(this);
/* 20:28 */ Connections.getPorts(this).addSignalProcessor("enable", "enable");
/* 21:29 */ Connections.getPorts(this).addSignalProcessor("visible", "visible");
/* 22: */ }
/* 23: */
/* 24: */ public void enable(Object object)
/* 25: */ {
/* 26:34 */ if (object == Boolean.TRUE) {
/* 27:35 */ setEnabled(true);
/* 28:37 */ } else if (object == Boolean.FALSE) {
/* 29:38 */ setEnabled(false);
/* 30: */ }
/* 31: */ }
/* 32: */
/* 33: */ public void visible(Object object)
/* 34: */ {
/* 35:44 */ if (object == Boolean.TRUE) {
/* 36:45 */ setVisible(true);
/* 37:47 */ } else if (object == Boolean.FALSE) {
/* 38:48 */ setVisible(false);
/* 39: */ }
/* 40: */ }
/* 41: */
/* 42: */ public void actionPerformed(ActionEvent e)
/* 43: */ {
/* 44:53 */ Connections.getPorts(this).transmit(output);
/* 45: */ }
/* 46: */ }
/* Location: C:\Yuya\Development\Genesis\genesis.jar
* Qualified Name: connections.JButtonBox
* JD-Core Version: 0.7.0.1
*/
|
[
"yuyajeremyong@gmail.com"
] |
yuyajeremyong@gmail.com
|
b67c55a7a322e9e24bfff4c8b59d75276c260320
|
50eeacf730c67bfc5f989281e19d52f865a294c9
|
/trunk/myfaces-impl-2021override/src/main/java/org/apache/myfaces/ov2021/context/servlet/RequestParameterValuesMap.java
|
9213a632137368cdffa1fb41e2db23540642c200
|
[
"Apache-2.0"
] |
permissive
|
lu4242/ext-myfaces-2.0.2-patch
|
4dc5c2b49ce4a3cfc1261b78848bb3cea3b6d597
|
703d0dcf45469dbc69e84d8a607b913dd6be712a
|
refs/heads/master
| 2021-01-10T19:09:03.293299
| 2014-04-04T13:03:06
| 2014-04-04T13:03:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,164
|
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.myfaces.ov2021.context.servlet;
import java.util.Enumeration;
import javax.servlet.ServletRequest;
import org.apache.myfaces.ov2021.util.AbstractAttributeMap;
/**
* ServletRequest multi-value parameters as Map.
*
* @author Anton Koinov (latest modification by $Author: bommel $)
* @version $Revision: 1187700 $ $Date: 2011-10-22 14:19:37 +0200 (Sa, 22 Okt 2011) $
*/
public final class RequestParameterValuesMap extends AbstractAttributeMap<String[]>
{
private final ServletRequest _servletRequest;
RequestParameterValuesMap(final ServletRequest servletRequest)
{
_servletRequest = servletRequest;
}
@Override
protected String[] getAttribute(final String key)
{
return _servletRequest.getParameterValues(key);
}
@Override
protected void setAttribute(final String key, final String[] value)
{
throw new UnsupportedOperationException(
"Cannot set ServletRequest ParameterValues");
}
@Override
protected void removeAttribute(final String key)
{
throw new UnsupportedOperationException(
"Cannot remove ServletRequest ParameterValues");
}
@Override
@SuppressWarnings("unchecked")
protected Enumeration<String> getAttributeNames()
{
return _servletRequest.getParameterNames();
}
}
|
[
"lu4242@gmail.com"
] |
lu4242@gmail.com
|
8d4cc78a06697414cf15079edcda56d3eb6b3a41
|
7016cec54fb7140fd93ed805514b74201f721ccd
|
/src/java/com/echothree/model/control/employee/server/transfer/BaseEmployeeDescriptionTransferCache.java
|
1a9477a4d6a9707d501db40c8f6cf44a16790349
|
[
"MIT",
"Apache-1.1",
"Apache-2.0"
] |
permissive
|
echothreellc/echothree
|
62fa6e88ef6449406d3035de7642ed92ffb2831b
|
bfe6152b1a40075ec65af0880dda135350a50eaf
|
refs/heads/master
| 2023-09-01T08:58:01.429249
| 2023-08-21T11:44:08
| 2023-08-21T11:44:08
| 154,900,256
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,718
|
java
|
// --------------------------------------------------------------------------------
// Copyright 2002-2023 Echo Three, LLC
//
// 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.echothree.model.control.employee.server.transfer;
import com.echothree.model.control.employee.server.control.EmployeeControl;
import com.echothree.model.control.party.server.control.PartyControl;
import com.echothree.model.data.user.server.entity.UserVisit;
import com.echothree.util.common.transfer.BaseTransfer;
import com.echothree.util.server.persistence.BaseEntity;
import com.echothree.util.server.persistence.Session;
public abstract class BaseEmployeeDescriptionTransferCache<K extends BaseEntity, V extends BaseTransfer>
extends BaseEmployeeTransferCache<K, V> {
PartyControl partyControl;
/** Creates a new instance of BaseEmployeeDescriptionTransferCache */
protected BaseEmployeeDescriptionTransferCache(UserVisit userVisit, EmployeeControl employeeControl) {
super(userVisit, employeeControl);
partyControl = Session.getModelController(PartyControl.class);
}
}
|
[
"rich@echothree.com"
] |
rich@echothree.com
|
ab43d34166055ab0aa7796010f2d0e26d56859a9
|
892da9aca75f170957ae23194404c459ade37d27
|
/app/src/main/java/com/ddong/qingjie/view/MonitorProgressBar.java
|
68037017518d642d7b46130a285746cf7443caa9
|
[] |
no_license
|
KKWinter/DeepClean
|
96f1a237fdb235375224e7b9f9854d60d124d8dc
|
8f87673af313142608279938eb78685400b9f2e2
|
refs/heads/master
| 2020-04-11T11:43:01.792148
| 2018-12-18T03:41:35
| 2018-12-18T03:41:35
| 161,757,046
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,202
|
java
|
package com.ddong.qingjie.view;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.widget.ProgressBar;
import com.ddong.qingjie.R;
public class MonitorProgressBar extends ProgressBar {
//各种属性的设置
private static final int DEFAULT_TEXT_SIZE = 14;
private static final int DEFAULT_TEXT_COLOR = 0x88313131;
private static final int DEFAULT_COLOR_UNREACHED_COLOR = 0xffffff;
private static final int DEFAULT_COLOR_REACHED_COLOR = 0x6600a1ea;
private static final int DEFAULT_HEIGHT_REACHED_PROGRESS_BAR = 9;
private static final int DEFAULT_HEIGHT_UNREACHED_PROGRESS_BAR = 9;
private static final int DEFAULT_SIZE_TEXT_OFFSET = 10;
//就这一个画笔
protected Paint mPaint = new Paint();
//文字的颜色
protected int mTextColor = DEFAULT_TEXT_COLOR;
//文字的大小(sp转为px)
protected int mTextSize = sp2px(DEFAULT_TEXT_SIZE);
//进度条和文字之间的间距(dp转为px)
protected int mTextOffset = dp2px(DEFAULT_SIZE_TEXT_OFFSET);
//进度条的高度(已有进度)
protected int mReachedProgressBarHeight = dp2px(DEFAULT_HEIGHT_REACHED_PROGRESS_BAR);
//进度条的颜色(已有进度)
protected int mReachedBarColor = DEFAULT_COLOR_REACHED_COLOR;
//剩余进度条的高度
protected int mUnReachedProgressBarHeight = dp2px(DEFAULT_HEIGHT_UNREACHED_PROGRESS_BAR);
//剩余进度条的颜色
protected int mUnReachedBarColor = DEFAULT_COLOR_UNREACHED_COLOR;
/**
* view width except padding
*/
protected int mRealWidth;
protected boolean mIfDrawText = true;
protected static final int VISIBLE = 0;
public MonitorProgressBar(Context context, AttributeSet attrs){
this(context, attrs, 0);
}
public MonitorProgressBar(Context context, AttributeSet attrs,int defStyle) {
super(context, attrs, defStyle);
obtainStyledAttributes(attrs);
mPaint.setTextSize(mTextSize);
mPaint.setColor(mTextColor);
}
@Override
protected synchronized void onMeasure(int widthMeasureSpec,int heightMeasureSpec) {
int width = MeasureSpec.getSize(widthMeasureSpec);
int height = measureHeight(heightMeasureSpec);
setMeasuredDimension(width, height);
mRealWidth = getMeasuredWidth() - getPaddingRight() - getPaddingLeft();
}
private int measureHeight(int measureSpec){
int result = 0;
int specMode = MeasureSpec.getMode(measureSpec);
int specSize = MeasureSpec.getSize(measureSpec);
if (specMode == MeasureSpec.EXACTLY)
{
result = specSize;
} else
{
float textHeight = (mPaint.descent() - mPaint.ascent());
result = (int) (getPaddingTop() + getPaddingBottom() + Math.max(
Math.max(mReachedProgressBarHeight,
mUnReachedProgressBarHeight), Math.abs(textHeight)));
if (specMode == MeasureSpec.AT_MOST)
{
result = Math.min(result, specSize);
}
}
return result;
}
/**
* get the styled attributes
*
* @param attrs
*/
private void obtainStyledAttributes(AttributeSet attrs){
// init values from custom attributes
final TypedArray attributes = getContext().obtainStyledAttributes(
attrs, R.styleable.MonitorProgressBar);
mTextColor = attributes
.getColor(
R.styleable.MonitorProgressBar_progress_text_color,
DEFAULT_TEXT_COLOR);
mTextSize = (int) attributes.getDimension(
R.styleable.MonitorProgressBar_progress_text_size,
mTextSize);
mReachedBarColor = attributes
.getColor(
R.styleable.MonitorProgressBar_progress_reached_color,
DEFAULT_COLOR_REACHED_COLOR);
mUnReachedBarColor = attributes
.getColor(
R.styleable.MonitorProgressBar_progress_unreached_color,
DEFAULT_COLOR_UNREACHED_COLOR);
mReachedProgressBarHeight = (int) attributes
.getDimension(
R.styleable.MonitorProgressBar_progress_reached_bar_height,
mReachedProgressBarHeight);
mUnReachedProgressBarHeight = (int) attributes
.getDimension(
R.styleable.MonitorProgressBar_progress_unreached_bar_height,
mUnReachedProgressBarHeight);
mTextOffset = (int) attributes
.getDimension(
R.styleable.MonitorProgressBar_progress_text_offset,
mTextOffset);
int textVisible = attributes
.getInt(R.styleable.MonitorProgressBar_progress_text_visibility,
VISIBLE);
if (textVisible != VISIBLE)
{
mIfDrawText = false;
}
attributes.recycle();
}
private String size;
public void setText(String size){
this.size = size;
}
@Override
protected synchronized void onDraw(Canvas canvas){
canvas.save();
canvas.translate(getPaddingLeft(), getHeight() / 2);
boolean noNeedBg = false;
float radio = getProgress() * 1.0f / getMax();
float progressPosX = (int) (mRealWidth * radio);
String text = size;
// mPaint.getTextBounds(text, 0, text.length(), mTextBound);
float textWidth = mPaint.measureText(text);
float textHeight = (mPaint.descent() + mPaint.ascent()) / 2;
if (progressPosX + textWidth > mRealWidth)
{
progressPosX = mRealWidth - textWidth;
noNeedBg = true;
}
// draw reached bar
float endX = progressPosX - mTextOffset / 2;
if (endX > 0)
{
mPaint.setColor(mReachedBarColor);
mPaint.setStrokeWidth(mReachedProgressBarHeight);
canvas.drawLine(0, 0, endX, 0, mPaint);
}
// draw progress bar
// measure text bound
if (mIfDrawText)
{
mPaint.setColor(mTextColor);
canvas.drawText(text, progressPosX, -textHeight, mPaint);
}
// draw unreached bar
if (!noNeedBg)
{
float start = progressPosX + mTextOffset / 2 + textWidth;
mPaint.setColor(mUnReachedBarColor);
mPaint.setStrokeWidth(mUnReachedProgressBarHeight);
canvas.drawLine(start, 0, mRealWidth, 0, mPaint);
}
canvas.restore();
}
/**
* dp 2 px
*
* @param dpVal
*/
protected int dp2px(int dpVal){
return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
dpVal, getResources().getDisplayMetrics());
}
/**
* sp 2 px
*
* @param spVal
* @return
*/
protected int sp2px(int spVal)
{
return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP,
spVal, getResources().getDisplayMetrics());
}
}
|
[
"you@example.com"
] |
you@example.com
|
0853fec37bc6947905cf6e0527b00220af9f1ce6
|
40d844c1c780cf3618979626282cf59be833907f
|
/src/testcases/CWE369_Divide_by_Zero/s01/CWE369_Divide_by_Zero__float_connect_tcp_divide_71b.java
|
32821f6498614a5ec787024831feee71a12a9cca
|
[] |
no_license
|
rubengomez97/juliet
|
f9566de7be198921113658f904b521b6bca4d262
|
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
|
refs/heads/master
| 2023-06-02T00:37:24.532638
| 2021-06-23T17:22:22
| 2021-06-23T17:22:22
| 379,676,259
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,797
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE369_Divide_by_Zero__float_connect_tcp_divide_71b.java
Label Definition File: CWE369_Divide_by_Zero__float.label.xml
Template File: sources-sinks-71b.tmpl.java
*/
/*
* @description
* CWE: 369 Divide by zero
* BadSource: connect_tcp Read data using an outbound tcp connection
* GoodSource: A hardcoded non-zero number (two)
* Sinks: divide
* GoodSink: Check for zero before dividing
* BadSink : Dividing by a value that may be zero
* Flow Variant: 71 Data flow: data passed as an Object reference argument from one method to another in different classes in the same package
*
* */
package testcases.CWE369_Divide_by_Zero.s01;
import testcasesupport.*;
public class CWE369_Divide_by_Zero__float_connect_tcp_divide_71b
{
public void badSink(Object dataObject ) throws Throwable
{
float data = (Float)dataObject;
/* POTENTIAL FLAW: Possibly divide by zero */
int result = (int)(100.0 / data);
IO.writeLine(result);
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(Object dataObject ) throws Throwable
{
float data = (Float)dataObject;
/* POTENTIAL FLAW: Possibly divide by zero */
int result = (int)(100.0 / data);
IO.writeLine(result);
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink(Object dataObject ) throws Throwable
{
float data = (Float)dataObject;
/* FIX: Check for value of or near zero before dividing */
if (Math.abs(data) > 0.000001)
{
int result = (int)(100.0 / data);
IO.writeLine(result);
}
else
{
IO.writeLine("This would result in a divide by zero");
}
}
}
|
[
"you@example.com"
] |
you@example.com
|
91c1f430b20709d2890b953b1761240874713060
|
b47489e86b1779013a98b18eb8430030dd7afb83
|
/HowTomcatWorks/HowTomcatWorks/tomcat/4/4.1.12/jakarta-tomcat-4.1.12-src/tester/src/tester/org/apache/tester/GetLocales01.java
|
bfec05f50301f6394af7b402d19ea10b00da5077
|
[
"Apache-2.0",
"Apache-1.1",
"LicenseRef-scancode-mx4j"
] |
permissive
|
cuiyuemin365/books
|
66be7059d309745a8045426fc193439b95a288e4
|
4ffdd959b4fc894f085ee5e80031ff8f77d475e6
|
refs/heads/master
| 2023-01-09T19:30:48.718134
| 2021-04-08T07:52:00
| 2021-04-08T07:52:00
| 120,096,744
| 0
| 0
|
Apache-2.0
| 2023-01-02T21:56:51
| 2018-02-03T14:08:45
|
Java
|
UTF-8
|
Java
| false
| false
| 5,910
|
java
|
/* ========================================================================= *
* *
* The Apache Software License, Version 1.1 *
* *
* Copyright (c) 1999, 2000, 2001 The Apache Software Foundation. *
* All rights reserved. *
* *
* ========================================================================= *
* *
* Redistribution and use in source and binary forms, with or without modi- *
* fication, are permitted provided that the following conditions are met: *
* *
* 1. Redistributions of source code must retain the above copyright notice *
* notice, this list of conditions and the following disclaimer. *
* *
* 2. Redistributions in binary form must reproduce the above copyright *
* notice, this list of conditions and the following disclaimer in the *
* documentation and/or other materials provided with the distribution. *
* *
* 3. The end-user documentation included with the redistribution, if any, *
* must include the following acknowlegement: *
* *
* "This product includes software developed by the Apache Software *
* Foundation <http://www.apache.org/>." *
* *
* Alternately, this acknowlegement may appear in the software itself, if *
* and wherever such third-party acknowlegements normally appear. *
* *
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software *
* Foundation" must not be used to endorse or promote products derived *
* from this software without prior written permission. For written *
* permission, please contact <apache@apache.org>. *
* *
* 5. Products derived from this software may not be called "Apache" nor may *
* "Apache" appear in their names without prior written permission of the *
* Apache Software Foundation. *
* *
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY *
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL *
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS *
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) *
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, *
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
* POSSIBILITY OF SUCH DAMAGE. *
* *
* ========================================================================= *
* *
* This software consists of voluntary contributions made by many indivi- *
* duals on behalf of the Apache Software Foundation. For more information *
* on the Apache Software Foundation, please see <http://www.apache.org/>. *
* *
* ========================================================================= */
package org.apache.tester;
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
/**
* Part 1 of the request locale tests. Should receive a Locale that
* corresponds to "en_CA" Accept-Language header that is sent first.
*
* @author Craig R. McClanahan
* @version $Revision: 1.1 $ $Date: 2001/05/10 22:52:25 $
*/
public class GetLocales01 extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
response.reset();
response.setContentType("text/plain");
PrintWriter writer = response.getWriter();
Locale expected = new Locale("en", "CA");
Locale received = request.getLocale();
if (received == null)
writer.println("GetLocales01 FAILED - No locale was received");
else if (!expected.equals(received))
writer.println("GetLocales01 FAILED - Expected='" +
expected.toString() + "' Received='" +
received.toString() + "'");
else
writer.println("GetLocales01 PASSED");
while (true) {
String message = StaticLogger.read();
if (message == null)
break;
writer.println(message);
}
StaticLogger.reset();
}
}
|
[
"cuiyuemin@mofanghr.com"
] |
cuiyuemin@mofanghr.com
|
f284af0bd3fc8102827be756b5600b803a50c561
|
ef7ae15c606931e05cb5085d40939fd7510fb3a4
|
/src/main/java/com/nuvola/gxpenses/activity/transaction/AccountFragment.java
|
1fdfc2d744ad7587efbd28eb2c0c1bf0943f70a2
|
[] |
no_license
|
imrabti/gxpensesAndroid
|
e2ee03012e3def87fd45792b4ae2e6814e6c2b18
|
5d17d39073464e5222bfb8ec9ee20eb86fc72f7f
|
refs/heads/master
| 2021-01-01T19:14:59.985146
| 2013-01-02T10:02:11
| 2013-01-02T10:02:11
| 7,380,866
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,051
|
java
|
package com.nuvola.gxpenses.activity.transaction;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.ListView;
import com.google.web.bindery.requestfactory.shared.Receiver;
import com.nuvola.gxpenses.R;
import com.nuvola.gxpenses.adapter.AccountAdapter;
import com.nuvola.gxpenses.adapter.AccountAdapterFactory;
import com.nuvola.gxpenses.client.request.GxpensesRequestFactory;
import com.nuvola.gxpenses.client.request.proxy.AccountProxy;
import com.nuvola.gxpenses.util.Constants;
import com.nuvola.gxpenses.util.EnhancedListFragment;
import com.nuvola.gxpenses.util.ValueListFactory;
import javax.inject.Inject;
import java.util.ArrayList;
import java.util.List;
public class AccountFragment extends EnhancedListFragment {
public static final String TAG = AccountFragment.class.getName();
public static final boolean DEBUG = Constants.DEBUG;
@Inject
private GxpensesRequestFactory requestFactory;
@Inject
private ValueListFactory valueListFactory;
@Inject
private AccountAdapterFactory accountAdapterFactory;
private AccountAdapter accountDataItems;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
}
@Override
public void onStart() {
super.onStart();
new LoadAccountsTask().execute();
}
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {
menuInflater.inflate(R.menu.accounts_menu, menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.add_account_menu:
if (DEBUG) Log.d(TAG, "Add new Account Item Clicked");
Intent intent = new Intent(getActivity(), AddAccountActivity.class);
startActivity(intent);
return true;
case R.id.transfert_money_menu:
if (DEBUG) Log.d(TAG, "Transfer money Clicked");
Intent intentTransfer = new Intent(getActivity(), AccountTransferActivity.class);
startActivity(intentTransfer);
return true;
default:
return super.onOptionsItemSelected(item);
}
}
@Override
public void onListItemClick(ListView l, View v, int position, long id) {
if (DEBUG) Log.d(TAG, "Account Item Clicked");
Intent intent = new Intent(getActivity(), TransactionActivity.class);
intent.putExtra("accountId", accountDataItems.getItem(position).getId());
intent.putExtra("accountName", accountDataItems.getItem(position).getName());
intent.putExtra("accountBalance", accountDataItems.getItem(position).getBalance());
startActivity(intent);
}
private void initialiseData(List<AccountProxy> accounts) {
accountDataItems = accountAdapterFactory.create(getActivity(), R.layout.list_item_account, accounts);
setListAdapter(accountDataItems);
}
private class LoadAccountsTask extends AsyncTask<Void, Void, List<AccountProxy>> {
@Override
protected List<AccountProxy> doInBackground(Void... params) {
final List<AccountProxy> listAccounts = new ArrayList<AccountProxy>();
requestFactory.accountService().findAllAccountsByUserId().fire(new Receiver<List<AccountProxy>>() {
@Override
public void onSuccess(List<AccountProxy> results) {
listAccounts.addAll(results);
}
});
return listAccounts;
}
@Override
protected void onPostExecute(List<AccountProxy> accounts) {
if (DEBUG) Log.d(TAG, "Loading Accounts finish, Number of Accounts =>" + accounts.size());
initialiseData(accounts);
}
}
}
|
[
"imrabti@gmail.com"
] |
imrabti@gmail.com
|
dea97ad545c2bf9e47019027e22cee964401d8ba
|
c52d10478436bd84b4641e2ccbc8e30175d63edc
|
/domino-jna/src/main/java/com/mindoo/domino/jna/internal/NotesNativeAPI32V1000.java
|
77766cbeae659b6ec18419ca62a500eca7afc873
|
[
"Apache-2.0"
] |
permissive
|
klehmann/domino-jna
|
a04f90cbd44f6b724ccce03a9beca2814a8c4f22
|
4820a406702bbaab5de13ab6cd92409ab9ad199c
|
refs/heads/master
| 2023-05-26T13:58:42.713347
| 2022-05-31T13:27:03
| 2022-05-31T13:27:48
| 54,467,476
| 72
| 23
|
Apache-2.0
| 2023-04-14T18:50:03
| 2016-03-22T10:48:44
|
Java
|
UTF-8
|
Java
| false
| false
| 2,110
|
java
|
package com.mindoo.domino.jna.internal;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Map;
import com.mindoo.domino.jna.errors.NotesError;
import com.mindoo.domino.jna.gc.NotesGC;
import com.mindoo.domino.jna.utils.PlatformUtils;
import com.sun.jna.Native;
public class NotesNativeAPI32V1000 {
private static volatile INotesNativeAPI32V1000 m_instanceWithoutCrashLogging;
private static volatile INotesNativeAPI32V1000 m_instanceWithCrashLogging;
/**
* Gets called from {@link NotesNativeAPI#initialize()}
*
* @param instance
*/
static void set(INotesNativeAPI32V1000 instance) {
m_instanceWithoutCrashLogging = instance;
}
/**
* Returns the API instance used to call native Domino C API methods for 32 bit
*
* @return API
*/
public static INotesNativeAPI32V1000 get() {
NotesGC.ensureRunningInAutoGC();
if (NotesNativeAPI.m_initError!=null) {
if (NotesNativeAPI.m_initError instanceof RuntimeException)
throw (RuntimeException) NotesNativeAPI.m_initError;
else
throw new NotesError(0, "Error initializing Domino JNA API", NotesNativeAPI.m_initError);
}
if (m_instanceWithoutCrashLogging==null) {
m_instanceWithoutCrashLogging = AccessController.doPrivileged(new PrivilegedAction<INotesNativeAPI32V1000>() {
@Override
public INotesNativeAPI32V1000 run() {
Map<String,Object> libraryOptions = NotesNativeAPI.getLibraryOptions();
INotesNativeAPI32V1000 api;
if (PlatformUtils.isWindows()) {
api = Native.loadLibrary("nnotes", INotesNativeAPI32V1000.class, libraryOptions);
}
else {
api = Native.loadLibrary("notes", INotesNativeAPI32V1000.class, libraryOptions);
}
return api;
}
});
}
if (NotesGC.isLogCrashingThreadStacktrace()) {
if (m_instanceWithCrashLogging==null) {
m_instanceWithCrashLogging = NotesNativeAPI.wrapWithCrashStackLogging(INotesNativeAPI32V1000.class,
m_instanceWithoutCrashLogging);
}
return m_instanceWithCrashLogging;
}
else {
return m_instanceWithoutCrashLogging;
}
}
}
|
[
"karsten.lehmann@mindoo.de"
] |
karsten.lehmann@mindoo.de
|
a3d240dcd53383e6f4fb5c321a8abb71af9935ce
|
19688c536e3e23d40ed58d7a5ad25dcacf80358e
|
/src/facade/ParcelamentoPagamentoFacade.java
|
434a6775f1755f0542a978b8a3e33aad49a31e21
|
[] |
no_license
|
julioizidoro/systm
|
0a8e9817dda18d9c33cf1c78d8b120cade55b13f
|
023acf52bdcc2489f9696f4934bbc304ab55f82a
|
refs/heads/master
| 2021-01-17T13:11:40.575259
| 2016-05-17T19:36:36
| 2016-05-17T19:36:36
| 22,035,771
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,067
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package facade;
import dao.ParcelamentoPagamentoDao;
import java.sql.SQLException;
import java.util.List;
import model.Parcelamentopagamento;
/**
*
* @author Wolverine
*/
public class ParcelamentoPagamentoFacade {
ParcelamentoPagamentoDao parcelamentoPagamentoDao;
public Parcelamentopagamento salvar(Parcelamentopagamento parcelamento) throws SQLException{
parcelamentoPagamentoDao = new ParcelamentoPagamentoDao();
return parcelamentoPagamentoDao.salvar(parcelamento);
}
public List<Parcelamentopagamento> listar(int idFormaPagamento) throws SQLException{
parcelamentoPagamentoDao = new ParcelamentoPagamentoDao();
return parcelamentoPagamentoDao.listar(idFormaPagamento);
}
public void excluir(int idParcelamento) throws SQLException{
parcelamentoPagamentoDao = new ParcelamentoPagamentoDao();
parcelamentoPagamentoDao.excluir(idParcelamento);
}
}
|
[
"jizidoro@globo.com"
] |
jizidoro@globo.com
|
6daa6854c5c715b7197b9fe044b5c22c15b819fb
|
eadbd6ba5a2d5c960ffa9788f5f7e79eeb98384d
|
/src/com/google/android/m4b/maps/ay/ab$a.java
|
3a40410fcab96cf1a9bc37abf39dc79657de67fb
|
[] |
no_license
|
marcoucou/com.tinder
|
37edc3b9fb22496258f3a8670e6349ce5b1d8993
|
c68f08f7cacf76bf7f103016754eb87b1c0ac30d
|
refs/heads/master
| 2022-04-18T23:01:15.638983
| 2020-04-14T18:04:10
| 2020-04-14T18:04:10
| 255,685,521
| 0
| 0
| null | 2020-04-14T18:00:06
| 2020-04-14T18:00:05
| null |
UTF-8
|
Java
| false
| false
| 588
|
java
|
package com.google.android.m4b.maps.ay;
import java.io.DataInput;
public final class ab$a
extends ab
{
public static final a c = new a(5, 0);
private ab$a(int paramInt)
{
super(paramInt);
}
private ab$a(int paramInt1, int paramInt2)
{
super(80);
}
public static a b(DataInput paramDataInput)
{
return new a(paramDataInput.readUnsignedByte());
}
public final int d()
{
return a >> 4 & 0xF;
}
}
/* Location:
* Qualified Name: com.google.android.m4b.maps.ay.ab.a
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
8ced99756c03ae2b6d73fea343ad23be9463d483
|
9aafc02c39e925e18b0027cf73fc759321a67f79
|
/app/src/main/java/com/journals/ajabs/ui/viewmodel/AbstactDisplayViewModel.java
|
6e093d54d571f1120dc48fce7f16a72a86be54cc
|
[] |
no_license
|
suresh429/ajabs
|
468567f21aab35b195e82945a34a49387de79b24
|
c683ee59da2de32f83ab9d671fb43aa0771afc89
|
refs/heads/master
| 2023-03-08T05:42:17.182229
| 2021-02-25T06:32:33
| 2021-02-25T06:32:33
| 342,146,789
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,445
|
java
|
package com.journals.ajabs.ui.viewmodel;
import android.content.Context;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import com.google.gson.JsonObject;
import com.journals.ajabs.model.AbstractResponse;
import com.journals.ajabs.network.JournalRepository;
public class AbstactDisplayViewModel extends ViewModel {
private MutableLiveData<String> toastMessageObserver ;
private MutableLiveData<Boolean> progressbarObservable;
private MutableLiveData<AbstractResponse> mutableLiveData;
public void init(String abstractlink, Context context){
if (mutableLiveData != null){
return;
}
JournalRepository journalRepository = JournalRepository.getInstance(context);
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("abstractlink",abstractlink);
mutableLiveData = journalRepository.getAbstractDisplayData(jsonObject);
progressbarObservable = journalRepository.getProgressbarObservable();
toastMessageObserver = journalRepository.getToastObserver();
}
public LiveData<AbstractResponse> getAbstractDisplayRepository() {
return mutableLiveData;
}
public LiveData<String> getToastObserver(){
return toastMessageObserver;
}
public MutableLiveData<Boolean> getProgressbarObservable() {
return progressbarObservable;
}
}
|
[
"ksuresh.unique@gmail.com"
] |
ksuresh.unique@gmail.com
|
4a4a3a89337617d3bb19486a57f92078f4c8b205
|
b26b97a8c6d53b26cac46720d4dcceb3a13b72be
|
/RigitalVer.logic/src/main/java/co/edu/uniandes/csw/grupo/workstation/persistence/WorkstationPersistence.java
|
04eba2f78244340789748c479760c45c36b83b0e
|
[] |
no_license
|
jssalamanca1967/rigital
|
247d7bcd77c0a7940aa00b423507040028e06a5d
|
4486770d28a45a9df645e260dfb4e89ea5fa0f59
|
refs/heads/master
| 2020-12-24T13:20:26.330846
| 2014-10-22T15:13:17
| 2014-10-22T15:13:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,728
|
java
|
/* ========================================================================
* Copyright 2014 grupo
*
* Licensed under the MIT, The MIT License (MIT)
* Copyright (c) 2014 grupo
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.
* ========================================================================
Source generated by CrudMaker version 1.0.0.201408112050
*/
package co.edu.uniandes.csw.grupo.workstation.persistence;
import javax.ejb.Stateless;
import javax.enterprise.inject.Default;
import co.edu.uniandes.csw.grupo.workstation.persistence.api.IWorkstationPersistence;
import javax.ejb.LocalBean;
@Default
@Stateless
@LocalBean
public class WorkstationPersistence extends _WorkstationPersistence implements IWorkstationPersistence {
}
|
[
"pa.otoya757@uniandes.edu.co"
] |
pa.otoya757@uniandes.edu.co
|
4f15c49f10c83bd522f4f518858f2be46dfc0b0a
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdas_ReducedClassCount/applicationModule/src/main/java/applicationModulepackageJava6/Foo817.java
|
71d014651841bd0de30b86889db0873d9858146c
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 506
|
java
|
package applicationModulepackageJava6;
public class Foo817 {
public void foo0() {
new applicationModulepackageJava6.Foo816().foo9();
}
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();
}
public void foo9() {
foo8();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
2bc44c9fe295e94c9ad3de854c12b87c08fb3ab8
|
b341eb810e9ebd1568555c30bb3c8e808f461e87
|
/jmetal-core/src/test/java/org/uma/jmetal/util/neighborhood/impl/L5Test.java
|
391efb2b98ea7642e2ae2673fcaf55e4cf986e14
|
[] |
no_license
|
amspitangueira/jMetal
|
7b075a9ab12519dc232e711009c85d2d4d2b621e
|
fd7f60ccf210193cde12c56a01f6264f21aa9808
|
refs/heads/master
| 2021-01-18T06:07:43.007120
| 2015-06-10T11:23:46
| 2015-06-10T11:23:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,137
|
java
|
package org.uma.jmetal.util.neighborhood.impl;
import org.junit.Test;
import org.uma.jmetal.solution.IntegerSolution;
import java.util.ArrayList;
import java.util.List;
import static org.hamcrest.CoreMatchers.hasItem;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
/**
* Created by ajnebro on 26/5/15.
*/
public class L5Test {
private L5 neighborhood ;
/**
* Case 1
*
* Solution list:
* 0
*
* The solution location is 0, the neighborhood is 0
*/
@Test
public void shouldGetNeighborsReturnFourNeighborsCase1() {
int rows = 1 ;
int columns = 1 ;
neighborhood = new L5(rows, columns) ;
List<IntegerSolution> list = new ArrayList<>(rows*columns) ;
for (int i = 0 ; i < rows*columns; i++) {
list.add(mock(IntegerSolution.class)) ;
}
List<IntegerSolution> result = neighborhood.getNeighbors(list, 0) ;
assertEquals(4, result.size()) ;
assertThat(result, hasItem(list.get(0))) ;
}
/**
* Case 2
*
* Solution list:
* 0 1
*
* The solution location is 0, the neighborhood is 0, 1
*/
@Test
public void shouldGetNeighborsReturnFourNeighborsCase2() {
int rows = 1 ;
int columns = 2 ;
neighborhood = new L5(rows, columns) ;
List<IntegerSolution> list = new ArrayList<>(rows*columns) ;
for (int i = 0 ; i < rows*columns; i++) {
list.add(mock(IntegerSolution.class)) ;
}
List<IntegerSolution> result = neighborhood.getNeighbors(list, 0) ;
assertEquals(4, result.size()) ;
assertThat(result, hasItem(list.get(0))) ;
assertThat(result, hasItem(list.get(1))) ;
}
/**
* Case 3
*
* Solution list:
* 0 1
*
* The solution location is 1, the neighborhood is 0, 1
*/
@Test
public void shouldGetNeighborsReturnFourNeighborsCase3() {
int rows = 1 ;
int columns = 2 ;
neighborhood = new L5(rows, columns) ;
List<IntegerSolution> list = new ArrayList<>(rows*columns) ;
for (int i = 0 ; i < rows*columns; i++) {
list.add(mock(IntegerSolution.class)) ;
}
List<IntegerSolution> result = neighborhood.getNeighbors(list, 1) ;
assertEquals(4, result.size()) ;
assertThat(result, hasItem(list.get(0))) ;
assertThat(result, hasItem(list.get(1))) ;
}
/**
* Case 4
*
* Solution list:
* 0 1
* 2 3
*
* The solution location is 0, the neighborhood is 1, 2
*/
@Test
public void shouldGetNeighborsReturnFourNeighborsCase4() {
int rows = 2 ;
int columns = 2 ;
neighborhood = new L5(rows, columns) ;
List<IntegerSolution> list = new ArrayList<>(rows*columns) ;
for (int i = 0 ; i < rows*columns; i++) {
list.add(mock(IntegerSolution.class)) ;
}
List<IntegerSolution> result = neighborhood.getNeighbors(list, 0) ;
assertEquals(4, result.size()) ;
assertThat(result, hasItem(list.get(1))) ;
assertThat(result, hasItem(list.get(2))) ;
}
/**
* Case 5
*
* Solution list:
* 0 1
* 2 3
*
* The solution location is 1, the neighborhood is 1, 2
*/
@Test
public void shouldGetNeighborsReturnFourNeighborsCase5() {
int rows = 2 ;
int columns = 2 ;
neighborhood = new L5(rows, columns) ;
List<IntegerSolution> list = new ArrayList<>(rows*columns) ;
for (int i = 0 ; i < rows*columns; i++) {
list.add(mock(IntegerSolution.class)) ;
}
List<IntegerSolution> result = neighborhood.getNeighbors(list, 1) ;
assertEquals(4, result.size()) ;
assertThat(result, hasItem(list.get(0))) ;
assertThat(result, hasItem(list.get(3))) ;
}
/**
* Case 6
*
* Solution list:
* 0 1
* 2 3
*
* The solution location is 2, the neighborhood is 0, 3
*/
@Test
public void shouldGetNeighborsReturnFourNeighborsCase6() {
int rows = 2 ;
int columns = 2 ;
neighborhood = new L5(rows, columns) ;
List<IntegerSolution> list = new ArrayList<>(rows*columns) ;
for (int i = 0 ; i < rows*columns; i++) {
list.add(mock(IntegerSolution.class)) ;
}
List<IntegerSolution> result = neighborhood.getNeighbors(list, 2) ;
assertEquals(4, result.size()) ;
assertThat(result, hasItem(list.get(0))) ;
assertThat(result, hasItem(list.get(3))) ;
}
/**
* Case 7
*
* Solution list:
* 0 1
* 2 3
*
* The solution location is 3, the neighborhood is 1, 2
*/
@Test
public void shouldGetNeighborsReturnFourNeighborsCase7() {
int rows = 2 ;
int columns = 2 ;
neighborhood = new L5(rows, columns) ;
List<IntegerSolution> list = new ArrayList<>(rows*columns) ;
for (int i = 0 ; i < rows*columns; i++) {
list.add(mock(IntegerSolution.class)) ;
}
List<IntegerSolution> result = neighborhood.getNeighbors(list, 2) ;
assertEquals(4, result.size()) ;
assertThat(result, hasItem(list.get(0))) ;
assertThat(result, hasItem(list.get(3))) ;
}
/**
* Case 8
*
* Solution list:
* 0 1 2 3
* 4 5 6 7
*
* The solution location is 5, the neighborhood is 0, 1, 2, 4, 6
*/
@Test
public void shouldGetNeighborsReturnFourNeighborsCase8() {
int rows = 2 ;
int columns = 4 ;
neighborhood = new L5(rows, columns) ;
List<IntegerSolution> list = new ArrayList<>(rows*columns) ;
for (int i = 0 ; i < rows*columns; i++) {
list.add(mock(IntegerSolution.class)) ;
}
List<IntegerSolution> result = neighborhood.getNeighbors(list, 5) ;
assertEquals(4, result.size()) ;
assertThat(result, hasItem(list.get(1))) ;
assertThat(result, hasItem(list.get(4))) ;
assertThat(result, hasItem(list.get(6))) ;
}
/**
* Case 9
*
* Solution list:
* 0 1
* 2 3
* 4 5
* 6 7
*
* The solution location is 5, the neighborhood is 3, 4, 7
*/
@Test
public void shouldGetNeighborsReturnFourNeighborsCase9() {
int rows = 4 ;
int columns = 2 ;
neighborhood = new L5(rows, columns) ;
List<IntegerSolution> list = new ArrayList<>(rows*columns) ;
for (int i = 0 ; i < rows*columns; i++) {
list.add(mock(IntegerSolution.class)) ;
}
List<IntegerSolution> result = neighborhood.getNeighbors(list, 5) ;
assertEquals(4, result.size()) ;
assertThat(result, hasItem(list.get(3))) ;
assertThat(result, hasItem(list.get(4))) ;
assertThat(result, hasItem(list.get(7))) ;
}
/**
* Case 10
*
* Solution list:
* 0 1
* 2 3
* 4 5
* 6 7
*
* The solution location is 0, the neighborhood is 1, 2, 6
*/
@Test
public void shouldGetNeighborsReturnFourNeighborsCase10() {
int rows = 4 ;
int columns = 2 ;
neighborhood = new L5(rows, columns) ;
List<IntegerSolution> list = new ArrayList<>(rows*columns) ;
for (int i = 0 ; i < rows*columns; i++) {
list.add(mock(IntegerSolution.class)) ;
}
List<IntegerSolution> result = neighborhood.getNeighbors(list, 0) ;
assertEquals(4, result.size()) ;
assertThat(result, hasItem(list.get(1))) ;
assertThat(result, hasItem(list.get(2))) ;
assertThat(result, hasItem(list.get(6))) ;
}
}
|
[
"ajnebro@outlook.com"
] |
ajnebro@outlook.com
|
0fcd1bb77b0a11195bc14a3900dc08874072eb5e
|
88d785ca23def4ca733f7d52a146bc8d34c77429
|
/src/dev/zt/UpliftedVFFV/events/Floor4Aquarium/Building/EmpHale.java
|
10b1cff67e6f653f699337665d4b03073830a29c
|
[] |
no_license
|
Donpommelo/Uplifted.VFFV
|
30fe1e41a9aeefee16c1e224388af6ce55ebfcce
|
99b63eb2a00666eb4fdf84ac20cebebefad1a3dc
|
refs/heads/master
| 2020-12-24T17:44:19.147662
| 2016-06-01T21:46:13
| 2016-06-01T21:46:13
| 33,390,964
| 0
| 0
| null | 2015-08-25T01:57:41
| 2015-04-04T01:58:48
|
Java
|
UTF-8
|
Java
| false
| false
| 1,555
|
java
|
package dev.zt.UpliftedVFFV.events.Floor4Aquarium.Building;
import java.awt.image.BufferedImage;
import dev.zt.UpliftedVFFV.dialog.Dialog;
import dev.zt.UpliftedVFFV.entities.creatures.Player;
import dev.zt.UpliftedVFFV.events.Event;
import dev.zt.UpliftedVFFV.events.SpriteSorter;
import dev.zt.UpliftedVFFV.gfx.Assets;
public class EmpHale extends Event {
public static float xPos,yPos;
public static BufferedImage img=Assets.EmployeeF;
public static int numstage = 0;
public int move;
public EmpHale(float x, float y, int idnum) {
super(img,idnum,x, y, numstage);
xPos=x;
yPos=y;
move = 0;
this.test.runlast = 0;
}
public void run(){
test.setImgShown(SpriteSorter.SpriteSort(7,Assets.EmployeeF));
if (Player.runlast==0){
this.test.runlast = 1;
}
if (Player.runlast==1){
this.test.runlast = 0;
}
if (Player.runlast==2){
this.test.runlast = 3;
}
if (Player.runlast==3){
this.test.runlast = 2;
}
Dialog[] d = new Dialog[1];
d[0] = new Dialog("Employee","/CharacterBusts/3rdSouthOffices-3.png",1,"I don't know why I'd need a souvenir from a place that's one floor up from where I work.");
super.Dialog(d,0, this.getId(), true);
}
public void walkCycle(){
move++;
if(move >= 300){
int rand = (int)(Math.random()*4);
switch(rand){
case 0:
super.moveUp();
break;
case 1:
super.moveDown();
break;
case 2:
super.moveLeft();
break;
case 3:
super.moveRight();
break;
}
move = 0;
}
}
public boolean isSolid(int i){
return true;
}
}
|
[
"donpommelo@gmail"
] |
donpommelo@gmail
|
dd737afa35def88647d7a39123fdf1f3016482a7
|
c77b61046e1b706bb58b045ce532d973df6bfc05
|
/DemoTest/src/com/bruce/demo/array/ArraysOfPrimitives.java
|
f8794d35c95dfa7eddb0782bdc9649ae3646768b
|
[] |
no_license
|
BruceYuan1993/thinking-in-java
|
2df212c3c8f84f56275d9ab335831a50023df798
|
283c87baf533d2abd0cb582ea322de838b5d3bf2
|
refs/heads/master
| 2020-06-20T14:59:35.149880
| 2019-07-16T08:57:44
| 2019-07-16T08:57:44
| 197,157,772
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 304
|
java
|
package com.bruce.demo.array;
public class ArraysOfPrimitives {
public static void main(String[] args) {
int[] a1 = {1, 2, 3, 4, 5};
int[] a2;
a2 = a1;
for (int i = 0; i < a2.length; i++) {
a2[i] += 1;
}
for (int i = 0; i < a1.length; i++) {
System.out.println(a1[i]);
}
}
}
|
[
"bruceyuan@augmentum.com.cn"
] |
bruceyuan@augmentum.com.cn
|
892bdf43296ac406631733bbd8c1c1bb073d61a8
|
6fffa3ff4c26e55c71bc3a9f2c062335beff2d40
|
/chrome/test/android/javatests/src/org/chromium/chrome/test/BottomSheetTestRule.java
|
3258a236e571861ded2beb08bbaa05dddeb94ebb
|
[
"BSD-3-Clause"
] |
permissive
|
vasilyt/chromium
|
f69c311d0866090f187494fc7e335d8d08c9f264
|
aa7cd16211bca96985a7149783a82c3d20984a85
|
refs/heads/master
| 2022-12-23T22:47:24.086201
| 2019-10-31T18:39:35
| 2019-10-31T18:39:35
| 219,038,538
| 0
| 0
|
BSD-3-Clause
| 2019-11-01T18:10:04
| 2019-11-01T18:10:04
| null |
UTF-8
|
Java
| false
| false
| 7,212
|
java
|
// Copyright 2017 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.test;
import static org.chromium.base.test.util.ScalableTimeout.scaleTimeout;
import static org.chromium.chrome.browser.ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE;
import android.support.test.InstrumentationRegistry;
import android.support.test.uiautomator.UiDevice;
import android.view.ViewGroup;
import org.chromium.base.test.util.CallbackHelper;
import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet;
import org.chromium.chrome.browser.widget.bottomsheet.BottomSheetContent;
import org.chromium.chrome.browser.widget.bottomsheet.BottomSheetController;
import org.chromium.chrome.browser.widget.bottomsheet.BottomSheetController.StateChangeReason;
import org.chromium.chrome.browser.widget.bottomsheet.EmptyBottomSheetObserver;
import org.chromium.content_public.browser.test.util.TestThreadUtils;
/**
* Junit4 rule for tests testing the bottom sheet. This rule creates a new, separate bottom sheet
* to test with.
*/
@CommandLineFlags.Add({DISABLE_FIRST_RUN_EXPERIENCE})
public class BottomSheetTestRule extends ChromeTabbedActivityTestRule {
/** An observer used to record events that occur with respect to the bottom sheet. */
public static class Observer extends EmptyBottomSheetObserver {
/** A {@link CallbackHelper} that can wait for the bottom sheet to be closed. */
public final CallbackHelper mClosedCallbackHelper = new CallbackHelper();
/** A {@link CallbackHelper} that can wait for the bottom sheet to be opened. */
public final CallbackHelper mOpenedCallbackHelper = new CallbackHelper();
/** A {@link CallbackHelper} that can wait for the onOffsetChanged event. */
public final CallbackHelper mOffsetChangedCallbackHelper = new CallbackHelper();
/** A {@link CallbackHelper} that can wait for the onSheetContentChanged event. */
public final CallbackHelper mContentChangedCallbackHelper = new CallbackHelper();
/** A {@link CallbackHelper} that can wait for the sheet to be in its full state. */
public final CallbackHelper mFullCallbackHelper = new CallbackHelper();
/** A {@link CallbackHelper} that can wait for the sheet to be hidden. */
public final CallbackHelper mHiddenCallbackHelper = new CallbackHelper();
/** The last value that the onOffsetChanged event sent. */
private float mLastOffsetChangedValue;
@Override
public void onSheetOffsetChanged(float heightFraction, float offsetPx) {
mLastOffsetChangedValue = heightFraction;
mOffsetChangedCallbackHelper.notifyCalled();
}
@Override
public void onSheetOpened(@StateChangeReason int reason) {
mOpenedCallbackHelper.notifyCalled();
}
@Override
public void onSheetClosed(@StateChangeReason int reason) {
mClosedCallbackHelper.notifyCalled();
}
@Override
public void onSheetContentChanged(BottomSheetContent newContent) {
mContentChangedCallbackHelper.notifyCalled();
}
@Override
public void onSheetStateChanged(int newState) {
if (newState == BottomSheetController.SheetState.HIDDEN) {
mHiddenCallbackHelper.notifyCalled();
} else if (newState == BottomSheetController.SheetState.FULL) {
mFullCallbackHelper.notifyCalled();
}
}
/** @return The last value passed in to {@link #onSheetOffsetChanged(float)}. */
public float getLastOffsetChangedValue() {
return mLastOffsetChangedValue;
}
}
/** A bottom sheet to test with. */
private BottomSheet mBottomSheet;
/** A handle to the sheet's observer. */
private Observer mObserver;
private @BottomSheetController.SheetState int mStartingBottomSheetState =
BottomSheetController.SheetState.FULL;
protected void afterStartingActivity() {
TestThreadUtils.runOnUiThreadBlocking(() -> {
ViewGroup coordinator = getActivity().findViewById(R.id.coordinator);
mBottomSheet = getActivity()
.getLayoutInflater()
.inflate(R.layout.bottom_sheet, coordinator)
.findViewById(R.id.bottom_sheet);
mBottomSheet.init(coordinator, getActivity().getActivityTabProvider(),
getActivity().getFullscreenManager(), getActivity().getWindow(),
getActivity().getWindowAndroid().getKeyboardDelegate());
});
mObserver = new Observer();
getBottomSheet().addObserver(mObserver);
if (mStartingBottomSheetState == BottomSheetController.SheetState.PEEK) return;
setSheetState(mStartingBottomSheetState, /* animate = */ false);
}
public void startMainActivityOnBottomSheet(
@BottomSheetController.SheetState int startingSheetState) {
mStartingBottomSheetState = startingSheetState;
startMainActivityOnBlankPage();
}
// TODO (aberent): The Chrome test rules currently bypass ActivityTestRule.launchActivity, hence
// don't call beforeActivityLaunched and afterActivityLaunched as defined in the
// ActivityTestRule interface. To work round this override the methods that start activities.
// See https://crbug.com/726444.
@Override
public void startMainActivityOnBlankPage() {
super.startMainActivityOnBlankPage();
afterStartingActivity();
}
public Observer getObserver() {
return mObserver;
}
public BottomSheet getBottomSheet() {
return mBottomSheet;
}
/**
* Set the bottom sheet's state on the UI thread.
*
* @param state The state to set the sheet to.
* @param animate If the sheet should animate to the provided state.
*/
public void setSheetState(int state, boolean animate) {
TestThreadUtils.runOnUiThreadBlocking(() -> getBottomSheet().setSheetState(state, animate));
}
/**
* Set the bottom sheet's offset from the bottom of the screen on the UI thread.
*
* @param offset The offset from the bottom that the sheet should be.
*/
public void setSheetOffsetFromBottom(float offset) {
TestThreadUtils.runOnUiThreadBlocking(
() -> getBottomSheet().setSheetOffsetFromBottomForTesting(offset));
}
public BottomSheetContent getBottomSheetContent() {
return getBottomSheet().getCurrentSheetContent();
}
/**
* Wait for an update to start and finish.
*/
public static void waitForWindowUpdates() {
final long maxWindowUpdateTimeMs = scaleTimeout(1000);
UiDevice device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
device.waitForWindowUpdate(null, maxWindowUpdateTimeMs);
device.waitForIdle(maxWindowUpdateTimeMs);
}
}
|
[
"commit-bot@chromium.org"
] |
commit-bot@chromium.org
|
9d15f71d700948fd42ee635970209355a0dba957
|
957852f2339da953ee98948ab04df2ef937e38d1
|
/src ref/classes-dex2jar_source_from_jdcore/com/github/mikephil/charting/highlight/ChartHighlighter.java
|
d5cb19bf07731f069851c3fb65f6beb81be31c89
|
[] |
no_license
|
nvcervantes/apc_softdev_mi151_04
|
c58fdc7d9e7450654fcb3ce2da48ee62cda5394f
|
1d23bd19466d2528934110878fdc930c00777636
|
refs/heads/master
| 2020-03-22T03:00:40.022931
| 2019-05-06T04:48:09
| 2019-05-06T04:48:09
| 139,407,767
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,931
|
java
|
package com.github.mikephil.charting.highlight;
import com.github.mikephil.charting.components.YAxis.AxisDependency;
import com.github.mikephil.charting.data.BarLineScatterCandleBubbleData;
import com.github.mikephil.charting.data.DataSet.Rounding;
import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.interfaces.dataprovider.BarLineScatterCandleBubbleDataProvider;
import com.github.mikephil.charting.interfaces.datasets.IDataSet;
import com.github.mikephil.charting.utils.MPPointD;
import com.github.mikephil.charting.utils.Transformer;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class ChartHighlighter<T extends BarLineScatterCandleBubbleDataProvider>
implements IHighlighter
{
protected T mChart;
protected List<Highlight> mHighlightBuffer = new ArrayList();
public ChartHighlighter(T paramT)
{
mChart = paramT;
}
protected List<Highlight> buildHighlights(IDataSet paramIDataSet, int paramInt, float paramFloat, DataSet.Rounding paramRounding)
{
ArrayList localArrayList = new ArrayList();
Object localObject2 = paramIDataSet.getEntriesForXValue(paramFloat);
Object localObject1 = localObject2;
if (((List)localObject2).size() == 0)
{
paramRounding = paramIDataSet.getEntryForXValue(paramFloat, NaN.0F, paramRounding);
localObject1 = localObject2;
if (paramRounding != null) {
localObject1 = paramIDataSet.getEntriesForXValue(paramRounding.getX());
}
}
if (((List)localObject1).size() == 0) {
return localArrayList;
}
paramRounding = ((List)localObject1).iterator();
while (paramRounding.hasNext())
{
localObject1 = (Entry)paramRounding.next();
localObject2 = mChart.getTransformer(paramIDataSet.getAxisDependency()).getPixelForValues(((Entry)localObject1).getX(), ((Entry)localObject1).getY());
localArrayList.add(new Highlight(((Entry)localObject1).getX(), ((Entry)localObject1).getY(), (float)x, (float)y, paramInt, paramIDataSet.getAxisDependency()));
}
return localArrayList;
}
public Highlight getClosestHighlightByPixel(List<Highlight> paramList, float paramFloat1, float paramFloat2, YAxis.AxisDependency paramAxisDependency, float paramFloat3)
{
Object localObject1 = null;
int i = 0;
while (i < paramList.size())
{
Highlight localHighlight = (Highlight)paramList.get(i);
Object localObject2;
float f1;
if (paramAxisDependency != null)
{
localObject2 = localObject1;
f1 = paramFloat3;
if (localHighlight.getAxis() != paramAxisDependency) {}
}
else
{
float f2 = getDistance(paramFloat1, paramFloat2, localHighlight.getXPx(), localHighlight.getYPx());
localObject2 = localObject1;
f1 = paramFloat3;
if (f2 < paramFloat3)
{
localObject2 = localHighlight;
f1 = f2;
}
}
i += 1;
localObject1 = localObject2;
paramFloat3 = f1;
}
return localObject1;
}
protected BarLineScatterCandleBubbleData getData()
{
return mChart.getData();
}
protected float getDistance(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4)
{
return (float)Math.hypot(paramFloat1 - paramFloat3, paramFloat2 - paramFloat4);
}
public Highlight getHighlight(float paramFloat1, float paramFloat2)
{
MPPointD localMPPointD = getValsForTouch(paramFloat1, paramFloat2);
float f = (float)x;
MPPointD.recycleInstance(localMPPointD);
return getHighlightForX(f, paramFloat1, paramFloat2);
}
protected Highlight getHighlightForX(float paramFloat1, float paramFloat2, float paramFloat3)
{
List localList = getHighlightsAtXValue(paramFloat1, paramFloat2, paramFloat3);
if (localList.isEmpty()) {
return null;
}
if (getMinimumDistance(localList, paramFloat3, YAxis.AxisDependency.LEFT) < getMinimumDistance(localList, paramFloat3, YAxis.AxisDependency.RIGHT)) {}
for (YAxis.AxisDependency localAxisDependency = YAxis.AxisDependency.LEFT;; localAxisDependency = YAxis.AxisDependency.RIGHT) {
break;
}
return getClosestHighlightByPixel(localList, paramFloat2, paramFloat3, localAxisDependency, mChart.getMaxHighlightDistance());
}
protected float getHighlightPos(Highlight paramHighlight)
{
return paramHighlight.getYPx();
}
protected List<Highlight> getHighlightsAtXValue(float paramFloat1, float paramFloat2, float paramFloat3)
{
mHighlightBuffer.clear();
BarLineScatterCandleBubbleData localBarLineScatterCandleBubbleData = getData();
if (localBarLineScatterCandleBubbleData == null) {
return mHighlightBuffer;
}
int i = 0;
int j = localBarLineScatterCandleBubbleData.getDataSetCount();
while (i < j)
{
IDataSet localIDataSet = localBarLineScatterCandleBubbleData.getDataSetByIndex(i);
if (localIDataSet.isHighlightEnabled()) {
mHighlightBuffer.addAll(buildHighlights(localIDataSet, i, paramFloat1, DataSet.Rounding.CLOSEST));
}
i += 1;
}
return mHighlightBuffer;
}
protected float getMinimumDistance(List<Highlight> paramList, float paramFloat, YAxis.AxisDependency paramAxisDependency)
{
float f1 = Float.MAX_VALUE;
int i = 0;
while (i < paramList.size())
{
Highlight localHighlight = (Highlight)paramList.get(i);
float f2 = f1;
if (localHighlight.getAxis() == paramAxisDependency)
{
float f3 = Math.abs(getHighlightPos(localHighlight) - paramFloat);
f2 = f1;
if (f3 < f1) {
f2 = f3;
}
}
i += 1;
f1 = f2;
}
return f1;
}
protected MPPointD getValsForTouch(float paramFloat1, float paramFloat2)
{
return mChart.getTransformer(YAxis.AxisDependency.LEFT).getValuesByTouchPoint(paramFloat1, paramFloat2);
}
}
|
[
"shierenecervantes23@gmail.com"
] |
shierenecervantes23@gmail.com
|
26ef683334db01af854170870290584421b56afd
|
a33aac97878b2cb15677be26e308cbc46e2862d2
|
/data/libgdx/GLSurfaceViewAPI18_setRenderMode.java
|
6b837fdd26f300770ea359b7b8f883fe3b9b718c
|
[] |
no_license
|
GabeOchieng/ggnn.tensorflow
|
f5d7d0bca52258336fc12c9de6ae38223f28f786
|
7c62c0e8427bea6c8bec2cebf157b6f1ea70a213
|
refs/heads/master
| 2022-05-30T11:17:42.278048
| 2020-05-02T11:33:31
| 2020-05-02T11:33:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 321
|
java
|
public void setRenderMode(int renderMode) {
if (!((RENDERMODE_WHEN_DIRTY <= renderMode) && (renderMode <= RENDERMODE_CONTINUOUSLY))) {
throw new IllegalArgumentException("renderMode");
}
synchronized (sGLThreadManager) {
mRenderMode = renderMode;
sGLThreadManager.notifyAll();
}
}
|
[
"bdqnghi@gmail.com"
] |
bdqnghi@gmail.com
|
1d55272015e796d2d6eefe69676cb774bb1bb3ac
|
d98ed4986ecdd7df4c04e4ad09f38fdb7a7043e8
|
/Library_CategorizedAllocation/src/main/java/net/sf/anathema/library/persister/PossessedEntryPropertyPto.java
|
c285426690b4b7bdd0755975e5b57778ea71f465
|
[] |
no_license
|
bjblack/anathema_3e
|
3d1d42ea3d9a874ac5fbeed506a1a5800e2a99ac
|
963f37b64d7cf929f086487950d4870fd40ac67f
|
refs/heads/master
| 2021-01-19T07:12:42.133946
| 2018-12-18T23:57:41
| 2018-12-18T23:57:41
| 67,353,965
| 0
| 0
| null | 2016-09-04T15:47:48
| 2016-09-04T15:47:48
| null |
UTF-8
|
Java
| false
| false
| 154
|
java
|
package net.sf.anathema.library.persister;
public abstract class PossessedEntryPropertyPto
{
public String option;
public String description;
}
|
[
"BJ@BJ-PC"
] |
BJ@BJ-PC
|
1a0f55e10b772b71efc6d150d4a002312da90ed1
|
d5c53f710001ced5f98b2205ca74b8af841b6311
|
/app/src/main/java/com/c/ctgapp/mvvm/model/User.java
|
314be56c70a459b1df75e1187a36719602116503
|
[] |
no_license
|
zhujiammy/CTGApp
|
ceb851df0882ed2d120f0678c5ea1e05e74c0ac9
|
ee779147f39fb54297b7fb63acdb143b04cdd322
|
refs/heads/master
| 2021-03-14T19:00:26.661518
| 2020-06-04T01:18:17
| 2020-06-04T01:18:17
| 246,786,739
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,960
|
java
|
package com.c.ctgapp.mvvm.model;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;
import java.util.List;
import java.util.Objects;
@Entity
public class User {
@PrimaryKey(autoGenerate = true)
public int id;
public int userId;
public String telephone;
public String realName;
public String nickName;
public String sex;
public int status;
public String token;
public String ctgId;
public String birth;
public String file;
public int type;
public String industry;
public String loginCompanyIndustry;
public int defaultCompanyId;
public String defaultCompanyName;
public int allianceId;
public String allianceName;
public String allianceRole;
public int companyId;
public String companyName;
public String position;
public String expert;
public int belongStatus;
public List<String> companyList;
public List<String> allianceList;
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
User user = (User) o;
return userId == user.userId &&
status == user.status &&
type == user.type &&
defaultCompanyId == user.defaultCompanyId &&
allianceId == user.allianceId &&
companyId == user.companyId &&
belongStatus == user.belongStatus &&
Objects.equals(telephone, user.telephone) &&
Objects.equals(realName, user.realName) &&
Objects.equals(nickName, user.nickName) &&
Objects.equals(sex, user.sex) &&
Objects.equals(token, user.token) &&
Objects.equals(ctgId, user.ctgId) &&
Objects.equals(birth, user.birth) &&
Objects.equals(file, user.file) &&
Objects.equals(industry, user.industry) &&
Objects.equals(loginCompanyIndustry, user.loginCompanyIndustry) &&
Objects.equals(defaultCompanyName, user.defaultCompanyName) &&
Objects.equals(allianceName, user.allianceName) &&
Objects.equals(allianceRole, user.allianceRole) &&
Objects.equals(companyName, user.companyName) &&
Objects.equals(position, user.position) &&
Objects.equals(expert, user.expert) &&
Objects.equals(companyList, user.companyList) &&
Objects.equals(allianceList, user.allianceList);
}
@Override
public int hashCode() {
return Objects.hash(userId, telephone, realName, nickName, sex, status, token, ctgId, birth, file, type, industry, loginCompanyIndustry, defaultCompanyId, defaultCompanyName, allianceId, allianceName, allianceRole, companyId, companyName, position, expert, belongStatus, companyList, allianceList);
}
}
|
[
"945529210@qq.com"
] |
945529210@qq.com
|
426966afb045f6a2702f9387db20c798df145955
|
61948d1e51df6f29aac8d9a1bdfece7cecfe4c03
|
/src/main/java/com/mindata/ecserver/main/controller/AreaController.java
|
60be6ebb9e9321328105db6c16ba130b6f558454
|
[] |
no_license
|
hanliqianggithub/ec_server_scheduls
|
99d641aa8f6d72b6303ec6ca4a87f5e5455b0285
|
7cc963275214360991487bef5223de4843332058
|
refs/heads/master
| 2020-03-12T19:39:36.975725
| 2018-09-03T07:16:30
| 2018-09-03T07:16:30
| 130,789,001
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 687
|
java
|
package com.mindata.ecserver.main.controller;
import com.mindata.ecserver.main.manager.EcCodeAreaManager;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* 根据输入的字符串查询对应的城市
*
* @author wuweifeng wrote on 2017/11/13.
*/
@RestController
@RequestMapping("/area")
public class AreaController {
@Resource
private EcCodeAreaManager ecCodeAreaManager;
@GetMapping("")
public Object getArea(String area) {
return ecCodeAreaManager.findAreaCode(area);
}
}
|
[
"272551766@qq.com"
] |
272551766@qq.com
|
27b838483155c5c99896cdb03f8121bdc3a158a4
|
e426bc5f772843bb8a812ef8ec94d2f47d894ba3
|
/common/pixelmon/entities/pokemon/EntityAbra.java
|
02d5620a27ba13ec8a806d6992d85798232f6f14
|
[] |
no_license
|
Suppress/Pixelmon
|
55562e0d7004fdbac6585462cd84f3ec07eb06d7
|
6eb4d2125359eb690e8a2e2c7ba7052d7680021e
|
refs/heads/master
| 2021-01-20T23:45:36.644200
| 2012-08-31T05:50:50
| 2012-08-31T05:50:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,426
|
java
|
package pixelmon.entities.pokemon;
import pixelmon.entities.pixelmon.EntityGroundPixelmon;
import net.minecraft.src.Block;
import net.minecraft.src.EntityAILookIdle;
import net.minecraft.src.EntityAISwimming;
import net.minecraft.src.EntityAITasks;
import net.minecraft.src.EntityAITempt;
import net.minecraft.src.EntityAIWander;
import net.minecraft.src.EntityAIWatchClosest;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.MathHelper;
import net.minecraft.src.World;
public class EntityAbra extends EntityGroundPixelmon
{
public EntityAbra(World world)
{
super(world);
init();
}
public void init()
{
name = "Abra";
isImmuneToFire = false;
super.init();
tasks.field_75782_a.clear();
tasks.addTask(1, new EntityAISwimming(this));
}
public void onUpdate()
{
super.onUpdate();
EntityPlayer entityplayer = worldObj.getClosestPlayerToEntity(this, 7D);
if(entityplayer != null)
{
if(getOwner() == null)
{
teleportRandomly();
}
}
}
protected boolean teleportRandomly()
{
double d = posX + (rand.nextDouble() - 0.5D) * 64D;
double d1 = posY + (double)(rand.nextInt(64) - 32);
double d2 = posZ + (rand.nextDouble() - 0.5D) * 64D;
return teleportTo(d, d1, d2);
}
protected boolean teleportTo(double par1, double par3, double par5)
{
double d = posX;
double d1 = posY;
double d2 = posZ;
posX = par1;
posY = par3;
posZ = par5;
boolean flag = false;
int i = MathHelper.floor_double(posX);
int j = MathHelper.floor_double(posY);
int k = MathHelper.floor_double(posZ);
if (worldObj.blockExists(i, j, k))
{
boolean flag1;
for (flag1 = false; !flag1 && j > 0;)
{
int i1 = worldObj.getBlockId(i, j - 1, k);
if (i1 == 0 || !Block.blocksList[i1].blockMaterial.blocksMovement())
{
posY--;
j--;
}
else
{
flag1 = true;
}
}
if (flag1)
{
setPosition(posX, posY, posZ);
if (worldObj.getCollidingBoundingBoxes(this, boundingBox).size() == 0 && !worldObj.isAnyLiquid(boundingBox))
{
flag = true;
}
}
}
if (!flag)
{
setPosition(d, d1, d2);
return false;
}
int l = 128;
for (int j1 = 0; j1 < l; j1++)
{
double d3 = (double)j1 / ((double)l - 1.0D);
float f = (rand.nextFloat() - 0.5F) * 0.2F;
float f1 = (rand.nextFloat() - 0.5F) * 0.2F;
float f2 = (rand.nextFloat() - 0.5F) * 0.2F;
double d4 = d + (posX - d) * d3 + (rand.nextDouble() - 0.5D) * (double)width * 2D;
double d5 = d1 + (posY - d1) * d3 + rand.nextDouble() * (double)height;
double d6 = d2 + (posZ - d2) * d3 + (rand.nextDouble() - 0.5D) * (double)width * 2D;
worldObj.spawnParticle("portal", d4, d5, d6, f, f1, f2);
}
worldObj.playSoundEffect(d, d1, d2, "mob.endermen.portal", 1.0F, 1.0F);
worldObj.playSoundAtEntity(this, "mob.endermen.portal", 1.0F, 1.0F);
return true;
}
public void evolve()
{
}
}
|
[
"malc.geddes@gmail.com"
] |
malc.geddes@gmail.com
|
cd2c7506e543af0c41c5296f0eebc9eeafc26cae
|
993aa3e6ad102203a9cda87a99b2b6ea1bcf6bba
|
/lab1/src/lesson13/thread/TerminateThreadMain.java
|
67689c4f3b1f1b2e3761e843ffec0ecc4b617471
|
[] |
no_license
|
cocagolau/NEXT_13-02_Java-Lab
|
0715a02474ef61c38d3440289bddf5aaf873678b
|
c241c3b43c3641b2be6d01d27cc3e0648eaeef62
|
refs/heads/master
| 2018-12-31T17:03:54.754165
| 2014-07-07T13:00:47
| 2014-07-07T13:00:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 440
|
java
|
package lesson13.thread;
class TerminateThread extends Thread {
private boolean flag = false;
public void run() {
int count = 0;
System.out.println ("Start");
while (!flag) {
try {
this.sleep(100);
}
catch (InterruptedException e){
}
}
System.out.println ("End");
}
public void setFlag (boolean flag) {
this.flag = flag;
}
}
public class TerminateThreadMain {
}
|
[
"cocagolau@gmail.com"
] |
cocagolau@gmail.com
|
13d88ab1ee5c0e9064d43b853072bd7b156f280d
|
a0b3e77790630ac4de591c9105e2b1d4e3bd9c8f
|
/jrap-core/src/main/java/com/jingrui/jrap/excel/annotation/ExcelExport.java
|
2e364018b3044381adeb9357345d3876786a85ff
|
[] |
no_license
|
IvanStephenYuan/JRAP_Lease
|
799c0b1a88fecb0b7d4b9ab73f8da9b47ce19fdb
|
4b4b08d4c23e9181718374eb77676095d3a298dc
|
refs/heads/master
| 2022-12-23T07:54:57.213203
| 2019-06-11T07:43:48
| 2019-06-11T07:43:48
| 174,286,707
| 3
| 5
| null | 2022-12-16T09:43:59
| 2019-03-07T06:39:02
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 382
|
java
|
package com.jingrui.jrap.excel.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author jialong.zuo@jingrui.com on 2017/11/20.
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ExcelExport {
Class table();
}
|
[
"Ivan.Stphen.Y@gmail.com"
] |
Ivan.Stphen.Y@gmail.com
|
8303d3d4aaecf6b1b21a59880450b3cc03e15d14
|
f6ac0252c1cfaa1e2448f0efecfb80a31a5d5ada
|
/DataStructures/src/MultiThreading/MainThread3.java
|
b3a790b56b91e1dc4913f86116646a125e892ac5
|
[] |
no_license
|
mayankShukla17/BasicCoreJava
|
2d8630cb8682a8663f0e56f3acdf08b2120da103
|
5083ad7a18a0431f4c66568224ac6994a8f5a016
|
refs/heads/master
| 2022-04-16T08:14:30.622309
| 2020-04-11T08:13:21
| 2020-04-11T08:13:21
| 254,820,229
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 677
|
java
|
package MultiThreading;
public class MainThread3
{
static void display()
{
for (int i = 0; i <10; i++)
{
System.out.println(i);
if(i==5)
{
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
System.out.println(e);
}
}
}
}
static void print()
{
for (int i=65; i<=90;i++)
System.out.println((char)i);
}
public static void main(String[] args)
{
System.out.println("Main Method Started");
//display();
//print();
Thread t1=new DispThread();
Thread t2=new PrintThread();
t1.start();
//t1.start(); //IllegalThreadStateException
t2.start();
System.out.println("Main Method End");
}
}
|
[
"mayankgonda@gmail.com"
] |
mayankgonda@gmail.com
|
8e35d08a594df401047574b195c80b4e6197f051
|
9d2beb9f3a29ac65f2d6aa1d95fcafa225b91e98
|
/JACP.API/src/main/java/org/jacpfx/api/annotations/method/OnMessage.java
|
8a062daca0a1d44c0964c6854cac3a410cc7e6eb
|
[
"Apache-2.0"
] |
permissive
|
JimSow/JacpFX
|
1d8e79473c886638bd7dcfe93566063e5bf85230
|
14c2a4c332c6d63f7d86d26b899011ca23715996
|
refs/heads/master
| 2021-01-06T09:48:55.202541
| 2018-04-27T11:27:00
| 2018-04-27T11:27:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 460
|
java
|
package org.jacpfx.api.annotations.method;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Created by Andy Moncsek on 14.12.15. Defines a typed message annotation to run a annotated method in application thread thread.
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface OnMessage {
Class value();
}
|
[
"amo.ahcp@gmail.com"
] |
amo.ahcp@gmail.com
|
ef71bba2d628f81d09990213f333f81c890533d3
|
e73a1d6bcfa0f5837812c1620a1ac90620d70824
|
/restlet-1.1.6-5346-sonatype/modules/org.restlet.example/src/org/restlet/example/book/rest/ch3/S3Authorized.java
|
de65a543e74f4d0e8ab51695c3538edd7ca01935
|
[] |
no_license
|
sonatype/restlet1x
|
2141d145dfd2e6d54c9ad0bfad05a000e7b3bdb2
|
eaab5eef39f454da76fb6b8474b77a8d97d7d317
|
refs/heads/master
| 2023-06-28T09:46:08.216930
| 2012-11-30T14:09:57
| 2012-11-30T14:09:57
| 6,799,243
| 1
| 0
| null | 2016-10-03T20:22:53
| 2012-11-21T16:44:58
|
Java
|
UTF-8
|
Java
| false
| false
| 2,609
|
java
|
/**
* Copyright 2005-2008 Noelios Technologies.
*
* The contents of this file are subject to the terms of the following open
* source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 (the "Licenses"). You can
* select the license that you prefer but you may not use this file except in
* compliance with one of these Licenses.
*
* You can obtain a copy of the LGPL 3.0 license at
* http://www.gnu.org/licenses/lgpl-3.0.html
*
* You can obtain a copy of the LGPL 2.1 license at
* http://www.gnu.org/licenses/lgpl-2.1.html
*
* You can obtain a copy of the CDDL 1.0 license at
* http://www.sun.com/cddl/cddl.html
*
* See the Licenses for the specific language governing permissions and
* limitations under the Licenses.
*
* Alternatively, you can obtain a royaltee free commercial license with less
* limitations, transferable or non-transferable, directly at
* http://www.noelios.com/products/restlet-engine
*
* Restlet is a registered trademark of Noelios Technologies.
*/
package org.restlet.example.book.rest.ch3;
import org.restlet.Client;
import org.restlet.data.ChallengeResponse;
import org.restlet.data.ChallengeScheme;
import org.restlet.data.Method;
import org.restlet.data.Protocol;
import org.restlet.data.Request;
import org.restlet.data.Response;
import org.restlet.resource.Representation;
/**
* Amazon S3 client. Support class handling authorized requests.
*
* @author Jerome Louvel
*/
public class S3Authorized {
public final static String PUBLIC_KEY = "0F9DBXKB5274JKTJ8DG2";
public final static String PRIVATE_KEY = "GuUHQ086WawbwvVl3JPl9JIk4VOtLcllkvIb0b7w";
public final static String HOST = "https://s3.amazonaws.com/";
public static Response authorizedDelete(String uri) {
return handleAuthorized(Method.DELETE, uri, null);
}
public static Response authorizedGet(String uri) {
return handleAuthorized(Method.GET, uri, null);
}
public static Response authorizedHead(String uri) {
return handleAuthorized(Method.HEAD, uri, null);
}
public static Response authorizedPut(String uri, Representation entity) {
return handleAuthorized(Method.PUT, uri, entity);
}
private static Response handleAuthorized(Method method, String uri,
Representation entity) {
// Send an authenticated request
final Request request = new Request(method, uri, entity);
request.setChallengeResponse(new ChallengeResponse(
ChallengeScheme.HTTP_AWS_S3, PUBLIC_KEY, PRIVATE_KEY));
return new Client(Protocol.HTTPS).handle(request);
}
}
|
[
"tamas@cservenak.net"
] |
tamas@cservenak.net
|
df5de2b825be6bd9b60d3003b7ed1f8be246d078
|
cc8d57781b2b79a1f47d93ec20bb21ef0affae5e
|
/WORK/NewsStory/app/src/main/java/com/lyd/newsstory/ui/base/BaseFragent.java
|
66549b5e0c7bbe9216815acbcdead4c827ee73f7
|
[] |
no_license
|
Insider-MY/DMYProject
|
fff14db8230551da4330ce88d7ed861cb8aae863
|
8b7dc391d78722d0ecf52e8414e1900e4d553314
|
refs/heads/master
| 2020-09-22T22:05:39.510864
| 2019-12-02T09:39:16
| 2019-12-02T09:39:16
| 225,331,087
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,105
|
java
|
package com.lyd.newsstory.ui.base;
import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
public class BaseFragent extends Fragment {
@Override
public void onAttach(Activity activity) {
Log.e("NEWS", "ArrayListFragment **** onAttach...");
super.onAttach(activity);
}
@Override
public void onCreate(Bundle savedInstanceState) {
Log.e("NEWS", "ArrayListFragment **** onCreate...");
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
Log.e("NEWS", "ArrayListFragment **** onCreateView...");
return super.onCreateView(inflater, container, savedInstanceState);
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
Log.e("NEWS", "ArrayListFragment **** onActivityCreated...");
}
@Override
public void onStart() {
Log.e("HJJ", "ArrayListFragment **** onStart...");
super.onStart();
}
@Override
public void onResume() {
Log.e("NEWS", "ArrayListFragment **** onResume...");
super.onResume();
}
@Override
public void onPause() {
Log.e("NEWS", "ArrayListFragment **** onPause...");
super.onPause();
}
@Override
public void onStop() {
Log.e("NEWS", "ArrayListFragment **** onStop...");
super.onStop();
}
@Override
public void onDestroyView() {
Log.e("HJJ", "ArrayListFragment **** onDestroyView...");
super.onDestroyView();
}
@Override
public void onDestroy() {
Log.e("NEWS", "ArrayListFragment **** onDestroy...");
super.onDestroy();
}
@Override
public void onDetach() {
Log.e("NEWS", "ArrayListFragment **** onDetach...");
super.onDetach();
}
}
|
[
"123456"
] |
123456
|
1eef67f444cb029429ed4cb2dde66759ce8e50ec
|
88d589e6c22407b8d8b410238042867f494ad915
|
/src/main/java/com/easybusiness/usermanagement/services/user/GeneratePdfReport.java
|
1f29674caf36171192adb90418395caa71bf53ff
|
[] |
no_license
|
Sougata1233/usermanagementsystemwithmail
|
202933d744f54e0cc861e20bdea6fb9060521f9b
|
a3c4b18774eb4596f4c4b04fe6eda0460353a104
|
refs/heads/master
| 2020-04-05T20:31:16.553810
| 2018-11-12T08:57:10
| 2018-11-12T08:57:10
| 157,183,953
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,136
|
java
|
package com.easybusiness.usermanagement.services.user;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.util.List;
import com.easybusiness.usermanagement.entity.User;
import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Element;
import com.itextpdf.text.Font;
import com.itextpdf.text.FontFactory;
import com.itextpdf.text.Phrase;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPTable;
import com.itextpdf.text.pdf.PdfWriter;
public class GeneratePdfReport {
public static ByteArrayInputStream userRepost(List<User> users) {
Document document = new Document();
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
PdfPTable table = new PdfPTable(4);
table.setWidthPercentage(100);
table.setWidths(new int[]{1, 3, 3, 4});
Font headFont = FontFactory.getFont(FontFactory.HELVETICA_BOLD);
PdfPCell hcell;
hcell = new PdfPCell(new Phrase("Id", headFont));
hcell.setHorizontalAlignment(Element.ALIGN_CENTER);
table.addCell(hcell);
hcell = new PdfPCell(new Phrase("First Name", headFont));
hcell.setHorizontalAlignment(Element.ALIGN_CENTER);
table.addCell(hcell);
hcell = new PdfPCell(new Phrase("Last Name", headFont));
hcell.setHorizontalAlignment(Element.ALIGN_CENTER);
table.addCell(hcell);
hcell = new PdfPCell(new Phrase("Email", headFont));
hcell.setHorizontalAlignment(Element.ALIGN_CENTER);
table.addCell(hcell);
for(User user : users) {
PdfPCell cell;
cell = new PdfPCell(new Phrase(user.getId().toString()));
cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
table.addCell(cell);
cell = new PdfPCell(new Phrase(user.getFirstName().toString()));
cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
table.addCell(cell);
cell = new PdfPCell(new Phrase(user.getLastName().toString()));
cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
table.addCell(cell);
cell = new PdfPCell(new Phrase(user.getEmail().toString()));
cell.setVerticalAlignment(Element.ALIGN_MIDDLE);
cell.setHorizontalAlignment(Element.ALIGN_CENTER);
table.addCell(cell);
}
PdfWriter.getInstance(document, out);
document.open();
document.add(table);
document.close();
}catch(DocumentException e){
e.printStackTrace();
}
return new ByteArrayInputStream(out.toByteArray());
}
}
|
[
"sougata.roy9203@gmail.com"
] |
sougata.roy9203@gmail.com
|
37ff35daa8d8b213fa4d2abf433d31f8fc3952fd
|
718a8498e6da032fcdd976691ad07fb646bd9703
|
/test_12.4/src/code1/Test.java
|
4227e660c7dd3c0e8a47880954a68b7b9b4d2960
|
[] |
no_license
|
Nineodes19/happy-end
|
716cb8026e5e9d1175ac068fdd866852a97f9494
|
07ec40c587f5247cd8e59e259c1c9dc14d1c488e
|
refs/heads/master
| 2022-07-13T05:53:10.808060
| 2020-10-24T15:18:36
| 2020-10-24T15:18:36
| 217,953,407
| 0
| 0
| null | 2022-06-21T04:03:12
| 2019-10-28T02:47:47
|
Java
|
UTF-8
|
Java
| false
| false
| 3,320
|
java
|
package code1;
import org.omg.CORBA.CODESET_INCOMPATIBLE;
/**
* @program:test_12.4
* @author: Nine_odes
* @description:
* @create:2019-12-04 13:46
*/
class Employee extends Person{
private String id;
private String department;
public Employee(String name, String sex, int age,String id,String department) {
super(name, sex, age);
this.id = id;
this.department = department;
}
public String getId() {
return id;
}
public String getDepartment() {
return department;
}
}
class Customer extends Person{
private String address;
private String phone;
public Customer(String name, String sex, int age, String address, String phone) {
super(name, sex, age);
this.address = address;
this.phone = phone;
}
public String getAddress() {
return address;
}
public String getPhone() {
return phone;
}
}
class EmployeeArray{
private Employee[] personList;
public EmployeeArray(int size) {
personList = new Employee[size];
}
//在数组的index位置插入元素e,成功插入返回true
public boolean Insert(int index,Employee e){
if(index >= 0 && index < personList.length){
personList[index] = e;
return true;
}
return false;
}
//输出数组中下标为index的元素,如果index错误,返回null
public Employee get(int index){
if(index >= 0 && index < personList.length){
return personList[index];
}
return null;
}
}
class CustomerArray{
private Customer[] personList;
public CustomerArray(int size){
personList = new Customer[size];
}
public boolean Insert(int index, Customer e){
if(index >= 0 && index < personList.length){
personList[index] = e;
return true;
}
return false;
}
public Customer get(int index){
if(index >= 0 && index < personList.length){
return personList[index];
}
return null;
}
}
public class Test {
public static void main(String[] args) {
EmployeeArray ea = new EmployeeArray(5);
CustomerArray ca = new CustomerArray(5);
Employee e1 = new Employee("王晓东","男",25,"0001","生产部");
Employee e2 = new Employee("王文欢","男",20,"0002","营销部");
Employee e3 = new Employee("吴秋丹","女",26,"0003","生产部");
Employee e4 = new Employee("吴静空","男",23,"0004","生产部");
Employee e5 = new Employee("何物嗯","男",32,"0005","营销部");
ea.Insert(0,e1);
ea.Insert(1,e2);
ea.Insert(2,e3);
ea.Insert(3,e4);
ea.Insert(4,e5);
Employee e = ea.get(1);
System.out.println(e.getName());
Customer customer = new Customer("杨莹","女",21,"沈阳市和平区","1111111");
Customer customer1 = new Customer("李军","男",30,"沈阳市大东区","2222222");
Customer customer2 = new Customer("孙浩","男",25,"沈阳市皇姑区","3333333");
ca.Insert(0,customer);
ca.Insert(1,customer1);
ca.Insert(2,customer2);
Customer c = ca.get(0);
System.out.println(c.getName());
}
}
|
[
"3100863513@qq.com"
] |
3100863513@qq.com
|
3ca391c676daa1f81453cf3b3fd8b0b7460fa249
|
ad2f9357f7ca7ea69640a58a550aaf3fa6690e73
|
/TwoPhaseTermination Pattern/src/Main.java
|
7ec1f50b4ab6c99ff80b63d5117eba8f6491815a
|
[] |
no_license
|
nanwan03/Java-Concurrency
|
b1a2210f875ac8aaa8f3131817885ff8712bd92f
|
e902466a288baaf15ec78a2a7bb95b02513c5f1b
|
refs/heads/master
| 2021-01-10T06:55:38.563476
| 2016-01-15T03:37:07
| 2016-01-15T03:37:07
| 49,182,986
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 428
|
java
|
public class Main {
public static void main(String[] args) {
System.out.println("main: BEGIN");
try {
CountupThread t = new CountupThread();
t.start();
Thread.sleep(10000);
System.out.println("main: shutdownRequest");
t.shutdownRequest();
System.out.println("main: join");
t.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("main: END");
}
}
|
[
"wn1842@gmail.com"
] |
wn1842@gmail.com
|
e622dc1283f6ae9e74af1b580e4682a3c8c52c59
|
799cce351010ca320625a651fb2e5334611d2ebf
|
/Data Set/Synthetic/Before/before_2318.java
|
92faa55c50a01fd695b1a9e3b13d4344f4f66724
|
[] |
no_license
|
dareenkf/SQLIFIX
|
239be5e32983e5607787297d334e5a036620e8af
|
6e683aa68b5ec2cfe2a496aef7b467933c6de53e
|
refs/heads/main
| 2023-01-29T06:44:46.737157
| 2020-11-09T18:14:24
| 2020-11-09T18:14:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 272
|
java
|
public class Dummy {
void sendRequest(Connection conn) throws SQLException {
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT EMPLOYEE_ID, START_DATE, END_DATE FROM JOB_HISTORY WHERE START_DATE >" + val1+" OR END_DATE >" + rand0);
}
}
|
[
"jahin99@gmail.com"
] |
jahin99@gmail.com
|
6555ea1b0ae73c79dc871757f90f736d6153b289
|
12563229bd1c69d26900d4a2ea34fe4c64c33b7e
|
/nan21.dnet.module.hr/nan21.dnet.module.hr.presenter/src/main/java/net/nan21/dnet/module/hr/grade/ds/model/GradeRateLovDs.java
|
1c99ce8b6628aa11d7b02eb464d2351ad301b589
|
[] |
no_license
|
nan21/nan21.dnet.modules
|
90b002c6847aa491c54bd38f163ba40a745a5060
|
83e5f02498db49e3d28f92bd8216fba5d186dd27
|
refs/heads/master
| 2023-03-15T16:22:57.059953
| 2012-08-01T07:36:57
| 2012-08-01T07:36:57
| 1,918,395
| 0
| 1
| null | 2012-07-24T03:23:00
| 2011-06-19T05:56:03
|
Java
|
UTF-8
|
Java
| false
| false
| 742
|
java
|
/*
* DNet eBusiness Suite
* Copyright: 2008-2012 Nan21 Electronics SRL. All rights reserved.
* Use is subject to license terms.
*/
package net.nan21.dnet.module.hr.grade.ds.model;
import net.nan21.dnet.core.api.annotation.Ds;
import net.nan21.dnet.core.api.annotation.SortField;
import net.nan21.dnet.core.presenter.model.base.AbstractTypeLov;
import net.nan21.dnet.module.hr.grade.domain.entity.GradeRate;
@Ds(entity = GradeRate.class, jpqlWhere = " e.active = true ", sort = { @SortField(field = GradeRateLovDs.fNAME) })
public class GradeRateLovDs extends AbstractTypeLov<GradeRate> {
public GradeRateLovDs() {
super();
}
public GradeRateLovDs(GradeRate e) {
super(e);
}
}
|
[
"mathe_attila@yahoo.com"
] |
mathe_attila@yahoo.com
|
1b21f9d50e7fc6f736d9bb7d65c6efd00806b2f5
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/test/org/apache/camel/itest/jmh/DefaultUuidGeneratorTest.java
|
c6026f074022d1b248070d82b4ca4dac18eb890f
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 2,490
|
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.camel.itest.jmh;
import Mode.All;
import java.util.concurrent.TimeUnit;
import org.apache.camel.impl.DefaultUuidGenerator;
import org.junit.Test;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.TimeValue;
/**
* Tests the {@link DefaultUuidGenerator}.
* <p/>
* Thanks to this SO answer: https://stackoverflow.com/questions/30485856/how-to-run-jmh-from-inside-junit-tests
*/
public class DefaultUuidGeneratorTest {
@Test
public void launchBenchmark() throws Exception {
Options opt = // Set the following options as needed
// Specify which benchmarks to run.
// You can be more specific if you'd like to run only one benchmark per test.
new OptionsBuilder().include(((this.getClass().getName()) + ".*")).mode(All).timeUnit(TimeUnit.MICROSECONDS).warmupTime(TimeValue.seconds(1)).warmupIterations(2).measurementTime(TimeValue.seconds(1)).measurementIterations(2).threads(2).forks(1).shouldFailOnError(true).shouldDoGC(true).build();
run();
}
// The JMH samples are the best documentation for how to use it
// http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/
@State(Scope.Thread)
public static class BenchmarkState {
DefaultUuidGenerator uuid;
@Setup(Level.Trial)
public void initialize() {
uuid = new DefaultUuidGenerator();
}
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
f54d4c46a15566cb28ec3777c988edd17067bcb4
|
e73bd7bbae7ea4c75681f1fb03ca3e1851811cf2
|
/entando-components-enterprise/plugins/entando-plugin-jpemailmarketing/src/main/java/org/entando/entando/plugins/jpemailmarketing/aps/internalservlet/form/FormFrontEndAction.java
|
b67cf88d8c2fa4fe5c60288e4ada2bc0e3909c96
|
[] |
no_license
|
pietrangelo/entando-base-image-4.3.2
|
b4f3ee6bb98e5b3b651fdddf0803b88c5132af55
|
d8014859a2c0e8808efb34867e87d3c34764fe2c
|
refs/heads/master
| 2021-07-21T12:02:21.780905
| 2017-11-02T11:13:40
| 2017-11-02T11:13:40
| 109,249,644
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,944
|
java
|
/*
*
* Copyright 2013 Entando S.r.l. (http://www.entando.com) All rights reserved.
*
* This file is part of Entando Enterprise Edition software.
* You can redistribute it and/or modify it
* under the terms of the Entando's EULA
*
* See the file License for the specific language governing permissions
* and limitations under the License
*
*
*
* Copyright 2013 Entando S.r.l. (http://www.entando.com) All rights reserved.
*
*/
package org.entando.entando.plugins.jpemailmarketing.aps.internalservlet.form;
import java.io.InputStream;
import java.net.URLConnection;
import org.entando.entando.plugins.jpemailmarketing.aps.system.services.form.Form;
import org.entando.entando.plugins.jpemailmarketing.apsadmin.form.FormAction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class FormFrontEndAction extends FormAction {
private static final Logger _logger = LoggerFactory.getLogger(FormFrontEndAction.class);
/**
* In front end, results other than SUCCESS IS NULL
*/
public String viewFile(String type) {
try {
Form form = this.getFormManager().getForm(this.getCourseId());
if (null == form) {
_logger.warn("form {} is null", this.getCourseId());
return null;
}
if (type.equalsIgnoreCase("cover")) {
InputStream is = this.getFormManager().getCover(form.getCourseId());
this.setDownloadInputStream(is);
this.setDownloadFileName(form.getFileCoverName());
this.setDownloadContentType(URLConnection.guessContentTypeFromStream(is));
} else if (type.equalsIgnoreCase("incentive")) {
InputStream is = this.getFormManager().getIncentive(form.getCourseId());
this.setDownloadInputStream(is);
this.setDownloadFileName(form.getFileIncentiveName());
this.setDownloadContentType(URLConnection.guessContentTypeFromStream(is));
}
} catch (Throwable t) {
_logger.error("Error in view file of type {}", type, t);
return null;
}
return SUCCESS;
}
}
|
[
"p.masala@entando.com"
] |
p.masala@entando.com
|
a32b4e70701a9e4a596783074a146e904fcb988b
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE113_HTTP_Response_Splitting/CWE113_HTTP_Response_Splitting__Environment_addHeaderServlet_54d.java
|
ef91b30022f951971a41e76871532db5b75f1b5b
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 1,728
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE113_HTTP_Response_Splitting__Environment_addHeaderServlet_54d.java
Label Definition File: CWE113_HTTP_Response_Splitting.label.xml
Template File: sources-sinks-54d.tmpl.java
*/
/*
* @description
* CWE: 113 HTTP Response Splitting
* BadSource: Environment Read data from an environment variable
* GoodSource: A hardcoded string
* Sinks: addHeaderServlet
* GoodSink: URLEncode input
* BadSink : querystring to addHeader()
* Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package
*
* */
package testcases.CWE113_HTTP_Response_Splitting;
import testcasesupport.*;
import javax.servlet.http.*;
import java.net.URLEncoder;
public class CWE113_HTTP_Response_Splitting__Environment_addHeaderServlet_54d
{
public void bad_sink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE113_HTTP_Response_Splitting__Environment_addHeaderServlet_54e()).bad_sink(data , request, response);
}
/* goodG2B() - use goodsource and badsink */
public void goodG2B_sink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE113_HTTP_Response_Splitting__Environment_addHeaderServlet_54e()).goodG2B_sink(data , request, response);
}
/* goodB2G() - use badsource and goodsink */
public void goodB2G_sink(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
(new CWE113_HTTP_Response_Splitting__Environment_addHeaderServlet_54e()).goodB2G_sink(data , request, response);
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
0fd7f49d1790ba2f910062d143b4c36e52fa351b
|
d11fb0d15b73a28742caa97e349dcfbe70d2563f
|
/server/iih.ci/iih.ci.ord/src/main/java/iih/ci/ord/s/listener/UseBtOrSignListener.java
|
1c539d19c3b4b1558e0db98980635cea5d7d9f9c
|
[] |
no_license
|
fhis/order.client
|
50a363fd3e4f56d95ccc5aa288e907a0a8571031
|
56cfa7877f600a10c54fdb30306a32ffa28b8217
|
refs/heads/master
| 2021-08-22T20:50:59.511923
| 2017-12-01T07:10:27
| 2017-12-01T07:10:27
| 112,678,072
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,225
|
java
|
package iih.ci.ord.s.listener;
import java.util.HashMap;
import xap.mw.core.data.BizException;
import xap.mw.core.data.DOStatus;
import xap.mw.coreitf.d.FBoolean;
import xap.mw.coreitf.d.FDouble;
import iih.ci.ord.cior.d.CiOrderTypeEnum;
import iih.ci.ord.cior.d.OrdApBtDO;
import iih.ci.ord.cior.i.ICiorappbtMDORService;
import iih.ci.ord.ciorder.d.CiOrderDO;
import iih.ci.ord.ciorder.d.CiorderAggDO;
import iih.ci.ord.pub.CiOrPubUtils;
import iih.ci.ord.pub.CiOrdAppUtils;
import iih.ci.ord.pub.CiOrdUtils;
import iih.ci.ord.pub.listener.AbstractOrSignListener;
/**
* 下达用血医嘱侦听器插件
*/
public class UseBtOrSignListener extends AbstractOrSignListener {
@Override
protected void doYourActionAfterOrSign(CiOrderDO[] ors) throws BizException {
//改变备血医嘱的可用血余量
HashMap<String,FDouble> map = new HashMap<String,FDouble>();
String[] idors = new String[ors.length];
StringBuffer ids = new StringBuffer();
int i = 0;
for(CiOrderDO order : ors){
String id_or_rel = order.getId_or_rel();
//获得医嘱聚集数据集合
CiorderAggDO aggor = CiOrdAppUtils.getOrAggQryService().findById(order.getId_or());
FDouble quan_med=new FDouble(0);
if(aggor!=null){
quan_med = aggor.getOrdSrvDO()[0].getQuan_medu();
}
if(CiOrdUtils.isEmpty(id_or_rel)){
new BizException("用血医嘱关联的备血医嘱id为空!");
}
map.put(id_or_rel, quan_med);
idors[i] = id_or_rel;
ids.append("'"+id_or_rel+"'");
if(i!=ors.length-1){
ids.append(",");
}
i++;
}
ICiorappbtMDORService btService = CiOrdAppUtils.getICiorappbtMDORService();
OrdApBtDO[] apbtArray = btService.find(String.format("id_or in (%s)", ids), "", FBoolean.FALSE);
for(OrdApBtDO apbtdo : apbtArray){
double num = (apbtdo.getNum_margin_bu().toDouble()-map.get(apbtdo.getId_or()).toDouble());
apbtdo.setNum_margin_bu(new FDouble(num));
apbtdo.setStatus(DOStatus.UPDATED);
}
CiOrdAppUtils.getICiorappbtMDOCudService().save(apbtArray);
}
@Override
protected boolean isSpecificOrder(CiOrderDO or) {
//是否为用血医嘱判断
if (CiOrderTypeEnum.USEBTORDER.equals(CiOrPubUtils
.getCiOrderType(or)))
return true;
return false;
}
}
|
[
"27696830@qq.com"
] |
27696830@qq.com
|
e395d082f0838f304b3e8a34303f74c6faa930f7
|
d75b115fd4ae09938ce286d699de40e12b767b93
|
/spring-boot-starter/src/main/java/com/leone/boot/starter/config/HelloProperties.java
|
398420e80792f65c589ee9ccebc051aecbc7a8eb
|
[
"Apache-2.0"
] |
permissive
|
WEXROOT/spring-boot-examples
|
b6ac3ee82f579c957f5237384a68a03d28f12cc8
|
9e5ee3b5c6817ec91cce91e2f03a6b4f08f421e9
|
refs/heads/master
| 2020-05-24T06:19:35.826276
| 2019-05-17T02:20:27
| 2019-05-17T02:20:27
| 187,135,901
| 1
| 0
|
Apache-2.0
| 2019-05-17T02:50:53
| 2019-05-17T02:50:53
| null |
UTF-8
|
Java
| false
| false
| 391
|
java
|
package com.leone.boot.starter.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* @author leone
* @since 2018-05-12
**/
@ConfigurationProperties(prefix = "customer")
public class HelloProperties {
private String msg;
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}
|
[
"exklin@gmail.com"
] |
exklin@gmail.com
|
65cc073885e03b1fdd5255f13d33f4299a72d0da
|
a54bb73655149773e2a884e7bff518c902a3a5b2
|
/java-core/src/com/source/org/omg/PortableInterceptor/PolicyFactoryOperations.java
|
3c43087d330eaba5c8f828c27e91cd787b741bdb
|
[] |
no_license
|
fredomli/java-standard
|
071823b680555039f1284ce55a2909397392c989
|
c6e296c8d8e4a8626faa69bf0732e0ac4b3bb360
|
refs/heads/main
| 2023-08-29T22:43:53.023691
| 2021-11-05T15:31:14
| 2021-11-05T15:31:14
| 390,624,004
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,142
|
java
|
package org.omg.PortableInterceptor;
/**
* org/omg/PortableInterceptor/PolicyFactoryOperations.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/jenkins/workspace/8-2-build-windows-amd64-cygwin/jdk8u291/1294/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl
* Friday, April 9, 2021 12:03:37 AM PDT
*/
/**
* Enables policy types to be constructed using
* <code>CORBA.ORB.create_policy</code>.
* <p>
* A portable ORB service implementation registers an instance of the
* <code>PolicyFactory</code> interface during ORB initialization in order
* to enable its policy types to be constructed using
* <code>CORBA.ORB.create_policy</code>. The POA is required to preserve
* any policy which is registered with <code>ORBInitInfo</code> in this
* manner.
*
* @see ORBInitInfo#register_policy_factory
*/
public interface PolicyFactoryOperations
{
/**
* Returns an instance of the appropriate interface derived from
* <code>CORBA.Policy</code> whose value corresponds to the
* specified any.
* <p>
* The ORB calls <code>create_policy</code> on a registered
* <code>PolicyFactory</code> instance when
* <code>CORBA.ORB.create_policy</code> is called for the
* <code>PolicyType</code> under which the <code>PolicyFactory</code> has
* been registered. The <code>create_policy</code> operation then
* returns an instance of the appropriate interface derived from
* <code>CORBA.Policy</code> whose value corresponds to the specified
* any. If it cannot, it shall throw an exception as described for
* <code>CORBA.ORB.create_policy</code>.
*
* @param type An int specifying the type of policy being created.
* @param value An any containing data with which to construct the
* <code>CORBA.Policy</code>.
* @return A <code>CORBA.Policy<code> object of the specified type and
* value.
*/
org.omg.CORBA.Policy create_policy (int type, org.omg.CORBA.Any value) throws org.omg.CORBA.PolicyError;
} // interface PolicyFactoryOperations
|
[
"fredomli@163.com"
] |
fredomli@163.com
|
d9f9a6d75c63d7eb6f2b23aa4ff226d1712c3a9a
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/tests-without-trycatch/Collections-26/org.apache.commons.collections4.keyvalue.MultiKey/BBC-F0-opt-60/27/org/apache/commons/collections4/keyvalue/MultiKey_ESTest_scaffolding.java
|
a068bb6b197b788d366effe6820868236d3eb030
|
[
"CC-BY-4.0",
"MIT"
] |
permissive
|
pderakhshanfar/EMSE-BBC-experiment
|
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
|
fea1a92c2e7ba7080b8529e2052259c9b697bbda
|
refs/heads/main
| 2022-11-25T00:39:58.983828
| 2022-04-12T16:04:26
| 2022-04-12T16:04:26
| 309,335,889
| 0
| 1
| null | 2021-11-05T11:18:43
| 2020-11-02T10:30:38
| null |
UTF-8
|
Java
| false
| false
| 3,241
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Oct 22 17:50:50 GMT 2021
*/
package org.apache.commons.collections4.keyvalue;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class MultiKey_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.collections4.keyvalue.MultiKey";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
/*No java.lang.System property to set*/
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(MultiKey_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.collections4.keyvalue.MultiKey"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(MultiKey_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.apache.commons.collections4.keyvalue.MultiKey"
);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
d6b2f619b9f5a9bc0b8aea78fa09fa2f209fbf0d
|
ff39deb6e62f70ae05394309364bfb76ee65981b
|
/src/main/java/me/piggypiglet/funkytrees/commands/CommandHandler.java
|
c3378b56332e524030e5c695e42b479591294d08
|
[] |
no_license
|
GiansCode/FunkyTrees
|
e043d3d9c7afee8002939fd91518e8fbfb6a7292
|
6ad12c0fb0ad0d0acbf488ded9dc55c4064e0434
|
refs/heads/master
| 2022-11-30T15:21:13.977400
| 2020-08-15T03:17:40
| 2020-08-15T03:17:40
| 280,211,539
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,007
|
java
|
package me.piggypiglet.funkytrees.commands;
import com.google.common.collect.ImmutableSet;
import com.google.inject.Singleton;
import me.piggypiglet.funkytrees.commands.exceptions.NoDefaultCommandException;
import me.piggypiglet.funkytrees.commands.framework.Command;
import me.piggypiglet.funkytrees.commands.sender.ColouredCommandSender;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;
import java.util.Arrays;
import java.util.Optional;
import java.util.Set;
// ------------------------------
// Copyright (c) PiggyPiglet 2020
// https://www.piggypiglet.me
// ------------------------------
@Singleton
public final class CommandHandler implements CommandExecutor {
private Set<Command> commands;
private Command defaultCommand;
public void populate(@NotNull final Set<Command> commands) {
this.commands = commands;
defaultCommand = commands.stream()
.filter(Command::isDefault)
.findAny().orElseThrow(() -> new NoDefaultCommandException("No default command is present in the plugin."));
}
@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull final org.bukkit.command.Command bukkitCommand,
@NotNull final String label, @NotNull final String[] args) {
sender = new ColouredCommandSender(sender);
if (args.length == 0) {
if (performChecks(sender, defaultCommand)) {
defaultCommand.execute(sender, args);
}
return true;
}
final Optional<Command> optionalCommand = commands.stream()
.filter(cmd -> cmd.getPrefix().equalsIgnoreCase(args[0]))
.findAny();
if (!optionalCommand.isPresent()) {
sender.sendMessage("&cUnknown command.");
return true;
}
final Command command = optionalCommand.get();
if (!performChecks(sender, command)) return true;
if (!command.execute(sender, Arrays.copyOfRange(args, 1, args.length))) {
sender.sendMessage("&7Incorrect usage, correct usage is &c/ft " + args[0] + " " + command.getUsage());
}
return true;
}
@NotNull
public Set<Command> getCommands() {
return ImmutableSet.copyOf(commands);
}
private boolean performChecks(@NotNull final CommandSender sender, @NotNull final Command command) {
if (command.isPlayerOnly() && !(((ColouredCommandSender) sender).getComposition() instanceof Player)) {
sender.sendMessage("&cThis command can only be ran by a player.");
return false;
}
if (!command.getPermissions().isEmpty() && command.getPermissions().stream().noneMatch(sender::hasPermission)) {
sender.sendMessage("&cYou do not have permission to use this command.");
return false;
}
return true;
}
}
|
[
"noreply@piggypiglet.me"
] |
noreply@piggypiglet.me
|
38311f44e3cfcac2fd757dd2f2dd824ca0d61d36
|
805b2a791ec842e5afdd33bb47ac677b67741f78
|
/Mage.Sets/src/mage/sets/portalthreekingdoms/XunYuWeiAdvisor.java
|
f56ccedfbaa12117772ff6516bac410d0d492283
|
[] |
no_license
|
klayhamn/mage
|
0d2d3e33f909b4052b0dfa58ce857fbe2fad680a
|
5444b2a53beca160db2dfdda0fad50e03a7f5b12
|
refs/heads/master
| 2021-01-12T19:19:48.247505
| 2015-08-04T20:25:16
| 2015-08-04T20:25:16
| 39,703,242
| 2
| 0
| null | 2015-07-25T21:17:43
| 2015-07-25T21:17:42
| null |
UTF-8
|
Java
| false
| false
| 3,379
|
java
|
/*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``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 BetaSteward_at_googlemail.com 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.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.portalthreekingdoms;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.ActivateIfConditionActivatedAbility;
import mage.abilities.condition.common.MyTurnBeforeAttackersDeclaredCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.cards.CardImpl;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Rarity;
import mage.constants.Zone;
import mage.target.common.TargetControlledCreaturePermanent;
/**
*
* @author fireshoes
*/
public class XunYuWeiAdvisor extends CardImpl {
public XunYuWeiAdvisor(UUID ownerId) {
super(ownerId, 93, "Xun Yu, Wei Advisor", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{1}{B}{B}");
this.expansionSetCode = "PTK";
this.supertype.add("Legendary");
this.subtype.add("Human");
this.subtype.add("Advisor");
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// {tap}: Target creature you control gets +2/+0 until end of turn. Activate this ability only during your turn, before attackers are declared.
Ability ability = new ActivateIfConditionActivatedAbility(Zone.BATTLEFIELD,
new BoostTargetEffect(2, 0, Duration.EndOfTurn), new TapSourceCost(), MyTurnBeforeAttackersDeclaredCondition.getInstance());
ability.addTarget(new TargetControlledCreaturePermanent());
this.addAbility(ability);
}
public XunYuWeiAdvisor(final XunYuWeiAdvisor card) {
super(card);
}
@Override
public XunYuWeiAdvisor copy() {
return new XunYuWeiAdvisor(this);
}
}
|
[
"fireshoes@fireshoes-PC"
] |
fireshoes@fireshoes-PC
|
ff4322aef02e3649837f69041397623681e154b6
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-medium-project/src/test/java/org/gradle/test/performancenull_46/Testnull_4590.java
|
513e47654e41a35e6ee2757fc91d2113477babe3
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 304
|
java
|
package org.gradle.test.performancenull_46;
import static org.junit.Assert.*;
public class Testnull_4590 {
private final Productionnull_4590 production = new Productionnull_4590("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
8da7ab52cde96c91d20025281612dccf441b8101
|
4d6c00789d5eb8118e6df6fc5bcd0f671bbcdd2d
|
/src/main/java/com/alipay/api/request/AlipayOfflineMarketProductBatchqueryRequest.java
|
977091526d166acce45b2cbe9fa15753cd2e700a
|
[
"Apache-2.0"
] |
permissive
|
weizai118/payment-alipay
|
042898e172ce7f1162a69c1dc445e69e53a1899c
|
e3c1ad17d96524e5f1c4ba6d0af5b9e8fce97ac1
|
refs/heads/master
| 2020-04-05T06:29:57.113650
| 2018-11-06T11:03:05
| 2018-11-06T11:03:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,377
|
java
|
package com.alipay.api.request;
import com.alipay.api.domain.AlipayOfflineMarketProductBatchqueryModel;
import java.util.Map;
import com.alipay.api.AlipayRequest;
import com.alipay.api.internal.util.AlipayHashMap;
import com.alipay.api.response.AlipayOfflineMarketProductBatchqueryResponse;
import com.alipay.api.AlipayObject;
/**
* ALIPAY API: alipay.offline.market.product.batchquery request
*
* @author auto create
* @since 1.0, 2017-04-14 11:43:44
*/
public class AlipayOfflineMarketProductBatchqueryRequest implements AlipayRequest<AlipayOfflineMarketProductBatchqueryResponse> {
private AlipayHashMap udfParams; // add user-defined text parameters
private String apiVersion="1.0";
/**
* 通过该接口可以查询商户录入的所有商品编号
*/
private String bizContent;
/**
* Sets biz content.
*
* @param bizContent the biz content
*/
public void setBizContent(String bizContent) {
this.bizContent = bizContent;
}
/**
* Gets biz content.
*
* @return the biz content
*/
public String getBizContent() {
return this.bizContent;
}
private String terminalType;
private String terminalInfo;
private String prodCode;
private String notifyUrl;
private String returnUrl;
private boolean needEncrypt=false;
private AlipayObject bizModel=null;
public String getNotifyUrl() {
return this.notifyUrl;
}
public void setNotifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
}
public String getReturnUrl() {
return this.returnUrl;
}
public void setReturnUrl(String returnUrl) {
this.returnUrl = returnUrl;
}
public String getApiVersion() {
return this.apiVersion;
}
public void setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
}
public void setTerminalType(String terminalType){
this.terminalType=terminalType;
}
public String getTerminalType(){
return this.terminalType;
}
public void setTerminalInfo(String terminalInfo){
this.terminalInfo=terminalInfo;
}
public String getTerminalInfo(){
return this.terminalInfo;
}
public void setProdCode(String prodCode) {
this.prodCode=prodCode;
}
public String getProdCode() {
return this.prodCode;
}
public String getApiMethodName() {
return "alipay.offline.market.product.batchquery";
}
public Map<String, String> getTextParams() {
AlipayHashMap txtParams = new AlipayHashMap();
txtParams.put("biz_content", this.bizContent);
if(udfParams != null) {
txtParams.putAll(this.udfParams);
}
return txtParams;
}
/**
* Put other text param.
*
* @param key the key
* @param value the value
*/
public void putOtherTextParam(String key, String value) {
if(this.udfParams == null) {
this.udfParams = new AlipayHashMap();
}
this.udfParams.put(key, value);
}
public Class<AlipayOfflineMarketProductBatchqueryResponse> getResponseClass() {
return AlipayOfflineMarketProductBatchqueryResponse.class;
}
public boolean isNeedEncrypt() {
return this.needEncrypt;
}
public void setNeedEncrypt(boolean needEncrypt) {
this.needEncrypt=needEncrypt;
}
public AlipayObject getBizModel() {
return this.bizModel;
}
public void setBizModel(AlipayObject bizModel) {
this.bizModel=bizModel;
}
}
|
[
"hanley@thlws.com"
] |
hanley@thlws.com
|
88add3b9c1503194b5ae2ed4c551fa24f5e5cf44
|
ca0e9689023cc9998c7f24b9e0532261fd976e0e
|
/src/android/support/v4/view/d.java
|
31c1e9188b0c86afaf3d724ed5e91259fffb59e2
|
[] |
no_license
|
honeyflyfish/com.tencent.mm
|
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
|
ce6e605ff98164359a7073ab9a62a3f3101b8c34
|
refs/heads/master
| 2020-03-28T15:42:52.284117
| 2016-07-19T16:33:30
| 2016-07-19T16:33:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 962
|
java
|
package android.support.v4.view;
import android.content.Context;
import android.view.View;
public abstract class d
{
public a eV;
private b eW;
public final Context mContext;
public final void a(b paramb)
{
if ((eW != null) && (paramb != null)) {
new StringBuilder("setVisibilityListener: Setting a new ActionProvider.VisibilityListener when one is already set. Are you reusing this ").append(getClass().getSimpleName()).append(" instance while it is still in use somewhere else?");
}
eW = paramb;
}
public final void j(boolean paramBoolean)
{
if (eV != null) {
eV.k(paramBoolean);
}
}
public abstract View onCreateActionView();
public static abstract interface a
{
public abstract void k(boolean paramBoolean);
}
public static abstract interface b {}
}
/* Location:
* Qualified Name: android.support.v4.view.d
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
f539e0c9f2e523e2e709bb4f97226a5749bd190e
|
15737a9f72a22320093520ce91bf075bf0057956
|
/examples/hello-world-cloud-run-graal/src/test/java/hello/world/HelloControllerTest.java
|
d62e1acc3934c0b1940526b34f05258ada98b0f8
|
[
"Apache-2.0"
] |
permissive
|
viniciusccarvalho/micronaut-gcp
|
63c68385880248ee40c812d075ed3aa9194258e8
|
d08f1ec0ec22bbb87df15bdd08bc2ea97fc631ff
|
refs/heads/master
| 2023-01-23T13:47:32.637476
| 2020-11-19T15:44:20
| 2020-11-19T15:44:20
| 271,624,518
| 0
| 1
|
Apache-2.0
| 2023-01-23T00:02:37
| 2020-06-11T18:54:53
|
Java
|
UTF-8
|
Java
| false
| false
| 663
|
java
|
package hello.world;
import static org.junit.jupiter.api.Assertions.assertEquals;
import javax.inject.Inject;
import org.junit.jupiter.api.Test;
import io.micronaut.http.HttpRequest;
import io.micronaut.http.client.RxHttpClient;
import io.micronaut.http.client.annotation.Client;
import io.micronaut.test.annotation.MicronautTest;
@MicronautTest
public class HelloControllerTest {
@Inject
@Client("/")
RxHttpClient client;
@Test
public void testHello() throws Exception {
assertEquals( "Hello John",
client.retrieve(HttpRequest.GET("/hello/John"), Greeting.class).blockingFirst().getMessage());
}
}
|
[
"graeme.rocher@gmail.com"
] |
graeme.rocher@gmail.com
|
2efc75ea58bd45d74238a08a6f066cc313753835
|
61f20869ebbcc4854adf4b786769c72cc52d137a
|
/basic-soundcode/src/main/java/com/zyc/spring/importmy/ImPortBena.java
|
784ecab18731abe13551c5288b18b6d7a0e7ce53
|
[] |
no_license
|
TheCodeYinChao/basic-exercise
|
37fdf4df2d92e0289f6a4fe1633739eda10985eb
|
0d1a8645378b3d95e1d4019aa0390282821dc492
|
refs/heads/master
| 2022-12-24T12:15:39.130629
| 2021-03-25T09:53:50
| 2021-03-25T09:53:50
| 186,202,501
| 0
| 1
| null | 2022-12-12T21:42:08
| 2019-05-12T02:34:31
|
Java
|
UTF-8
|
Java
| false
| false
| 181
|
java
|
package com.zyc.spring.importmy;
/**
* Created by Admin on 2020/3/5.
*/
public class ImPortBena {
public void list() {
System.out.println("ImPortBena list");
}
}
|
[
"292306404@qq.com"
] |
292306404@qq.com
|
b979e7a159bf5bb0b97e287d2e5735e87d8c79d9
|
d2c22de54ef218277674a795ab975ea8cbebc43c
|
/app/src/main/java/com/beihui/market/ui/activity/ComWebViewActivity.java
|
2a6a226bd928c4b0d3caa1b87b1fb091b1a34346
|
[] |
no_license
|
dengjiaping/zima_anzhuo
|
7fdb93c47e88a7b95f12f1aad136f3d56512094c
|
c07933f95d75cb8641d572148e9c28742b1e9e85
|
refs/heads/master
| 2021-08-31T10:05:59.983667
| 2017-12-21T01:23:48
| 2017-12-21T01:23:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,492
|
java
|
package com.beihui.market.ui.activity;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.support.v7.widget.Toolbar;
import android.view.KeyEvent;
import android.view.View;
import android.webkit.DownloadListener;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.beihui.market.R;
import com.beihui.market.base.BaseComponentActivity;
import com.beihui.market.helper.SlidePanelHelper;
import com.beihui.market.injection.component.AppComponent;
import butterknife.BindView;
public class ComWebViewActivity extends BaseComponentActivity {
@BindView(R.id.tool_bar)
Toolbar toolbar;
@BindView(R.id.title)
TextView titleTv;
@BindView(R.id.web_view)
WebView webView;
@BindView(R.id.progress_bar)
ProgressBar progressBar;
@Override
protected void onDestroy() {
webView.getSettings().setJavaScriptEnabled(false);
webView.destroy();
webView = null;
super.onDestroy();
}
@Override
public int getLayoutId() {
return R.layout.activity_comm_web_view;
}
@SuppressLint("SetJavaScriptEnabled")
@Override
public void configViews() {
setupToolbar(toolbar);
webView.setWebChromeClient(new WebChromeClient() {
@Override
public void onProgressChanged(WebView view, int newProgress) {
progressBar.setProgress(newProgress);
if (newProgress == 100) {
progressBar.setVisibility(View.GONE);
}
}
});
webView.setWebViewClient(new WebViewClient() {
});
webView.setDownloadListener(new DownloadListener() {
@Override
public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) {
Uri uri = Uri.parse(url);
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivityWithoutOverride(intent);
}
});
WebSettings settings = webView.getSettings();
settings.setJavaScriptEnabled(true);
settings.setDomStorageEnabled(true);
settings.setSupportZoom(true);
settings.setBuiltInZoomControls(true);
settings.setDisplayZoomControls(false);
settings.setUseWideViewPort(true);
settings.setLoadWithOverviewMode(true);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
}
SlidePanelHelper.attach(this);
}
@Override
public void initDatas() {
String url = getIntent().getStringExtra("url");
if (url != null) {
webView.loadUrl(url);
}
String title = getIntent().getStringExtra("title");
if (title != null) {
titleTv.setText(title);
}
}
@Override
protected void configureComponent(AppComponent appComponent) {
}
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK && webView.canGoBack()) {
webView.goBack();
return true;
}
return super.onKeyUp(keyCode, event);
}
}
|
[
"812405389@qq.com"
] |
812405389@qq.com
|
fc8ad8355a40e3202f27d6ea88ea6fc4d296c16a
|
81a41c0f631b4756be2ff854e2e03738b3089572
|
/champions/Chronometer.java
|
2496953a7e9e82860305b1ec12886320c13cd49a
|
[] |
no_license
|
thomasjeffreyandersontwin/HeroCombatSimulator
|
3d6b42f4c7b40509cd813df214258f633bff6479
|
efb019c150f011e319a3c779500329b034f163d7
|
refs/heads/master
| 2021-05-06T16:28:17.088624
| 2018-03-09T08:02:56
| 2018-03-09T08:02:56
| 113,687,368
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,421
|
java
|
/*
* Chronometer.java
*
* Created on September 13, 2000, 10:01 PM
*/
package champions;
/**
*
* @author unknown
* @version
*/
public class Chronometer extends Object implements Cloneable, java.io.Serializable, Comparable<Chronometer> {
private long time;
private boolean turnend;
static private boolean[][] speedChart = {
{false, false, false, false, false, false, true , false, false, false, false, false},
{false, false, false, false, false, true , false, false, false, false, false, true },
{false, false, false, true , false, false, false, true , false, false, false, true },
{false, false, true , false, false, true , false, false, true , false, false, true },
{false, false, true , false, true , false, false, true , false, true , false, true },
{false, true , false, true , false, true , false, true , false, true , false, true },
{false, true , false, true , false, true , true , false, true , false, true , true },
{false, true , true , false, true , true , false, true , true , false, true , true },
{false, true , true , true , false, true , true , true , false, true , true , true },
{false, true , true , true , true , true , false, true , true , true , true , true },
{false, true , true , true , true , true , true , true , true , true , true , true },
{true, true , true , true , true , true , true , true , true , true , true , true } };
/** Creates new Chronometer */
public Chronometer() {
setTime(0);
}
public Chronometer(long time) {
setTime(time);
}
public Chronometer(long days, long hours, long minutes, long turns, long segments) {
setTime( days, hours, minutes, turns, segments);
}
public long getTime() {
return time;
}
public void setTime(long t) {
setTime(t, turnend);
}
public void setTime(long t, boolean turnend) {
time = t;
this.turnend = turnend;
}
public void setTime(long days, long hours, long minutes, long turns, long segments) {
time = days * 86400 + hours * 3600 + minutes * 60 + turns * 12 + segments;
turnend = false;
}
public int getSegment() {
// if ( time == 0 )
// return 12;
// else
return (int)(time - 1) % 12 + 1;
}
public long getTurn() {
// if ( time == 0 )
// return 0;
// else
return ( (time-1) / 12) % 5;
}
public long getAbsoluteTurn() {
// if ( time == 0 )
// return 0;
// else
return ( (time-1) / 12);
}
public long getMinute() {
return ( time - 1)/ 60 % 60;
}
public long getHour() {
return (time - 1) / 3600 % 24;
}
public long getDay() {
return (time - 1) / 84600;
}
public void incrementSegment(){
if ( turnend == true ) {
turnend = false;
time++;
} else if ( time == 0 || getSegment() == 12 ) {
turnend = true;
} else {
time++;
}
}
public void incrementSegment(long seconds){
time += seconds;
}
public boolean isTurnEnd() {
return turnend;
}
public void setTurnEnd(boolean t) {
turnend = t;
}
public boolean isActivePhase(int spd) {
if ( turnend == true ) return false;
if ( spd <=0 || spd >= 13 ) return false;
return speedChart[spd-1][(int)getSegment()-1];
}
public Chronometer clone() {
Chronometer clone = new Chronometer();
clone.setTime( this.getTime() );
clone.setTurnEnd( this.isTurnEnd() );
return clone;
}
public String toString() {
StringBuffer sb = new StringBuffer();
if ( time < 0 ) {
sb.append("Illegal Time: ").append(time);
} else {
if ( getDay() > 0 ) {
sb.append( "Day " );
sb.append( Long.toString( getDay() ) );
sb.append(", Hour ");
sb.append(Long.toString( getHour() ) );
sb.append(", Minute " );
sb.append( Long.toString( getMinute() ) );
sb.append( ", ");
} else if ( getHour() > 0 ) {
sb.append("Hour ");
sb.append(Long.toString( getHour() ) );
sb.append(", Minute ");
sb.append(Long.toString( getMinute() ));
sb.append(", ");
} else if ( getMinute() > 0 ) {
sb.append("Minute ");
sb.append(Long.toString( getMinute() ));
sb.append(", ");
}
sb.append("Turn ");
sb.append(Long.toString( getTurn() ));
sb.append(", Seg ");
sb.append(Long.toString( getSegment() ));
if ( isTurnEnd() ) {
sb.append( "(POST 12 RECOVER)");
}
}
// sb.append("[");
// sb.append( time );
// sb.append("s]");
return sb.toString();
}
public void add(long seconds) {
time += seconds;
}
public boolean equals(Object o) {
if ( o==null || o.getClass() != Chronometer.class ) return false;
Chronometer c = (Chronometer)o;
return ( time == c.time && turnend == c.turnend );
}
public int compareTo(Chronometer that) {
if ( that == null ) throw new NullPointerException();
else if ( time < that.time ) return -1;
else if ( time > that.time ) return 1;
else if ( turnend == true && that.turnend == false ) return 1;
else if ( turnend == false && that.turnend == true ) return -1;
else return 0;
}
/** Returns a new Chronometer which is set the Prior Post12 segment.
*/
public Chronometer getLeastTurnEndSegment(long secondIncrease) {
Chronometer newChronometer = (Chronometer)this.clone();
newChronometer.incrementSegment(secondIncrease);
if ( newChronometer.isTurnEnd() == false ) {
long newTime = newChronometer.getAbsoluteTurn() * 12;
newChronometer.setTime( newTime, true );
}
return newChronometer;
}
/** Return is this is a legal time.
*
* The time is illegal if it has been adjusted negatively.
*/
public boolean isLegal() {
return time >= 0;
}
/** Finds the next segment that a target with indicated speed will be active.
*
* Return -1 if Target will never be eligible for an action, given the indicated speed.
*/
static public int nextActiveSegment(int speed, Chronometer currentTime) {
int segment = currentTime.getSegment();
int i = segment + 1 ;
if ( i > 12 ) i = 1;
while ( i != segment ) {
if ( isActiveSegment(speed, i) ) return i;
i++;
if ( i > 12 ) i = 1;
}
return -1;
}
static public boolean isActiveSegment(int spd, int segment) {
if ( spd <=0 || spd >= 13 ) return false;
return speedChart[spd-1][(int)segment-1];
}
}
|
[
"thomasjeffreyandersontwin@gmail.com"
] |
thomasjeffreyandersontwin@gmail.com
|
4dd49b1adeb9775f590526344312e5e14f2c7876
|
11cfcbe5780d5aa0bed591ca915395edf312288f
|
/d200compro/src/java/net/ramptors/jee/UtilJee.java
|
8765003d1fd7d15b2dfb6597811eeebe787c6023
|
[] |
no_license
|
Osvimil/NetbeansMac
|
7b47dc4979661254650a88f55d221605e7c199e1
|
0073400ed8b219f600ddc1a5ef99c62ecbf2e628
|
refs/heads/master
| 2020-04-16T11:46:28.742706
| 2019-01-13T20:44:28
| 2019-01-13T20:44:28
| 165,550,841
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,201
|
java
|
/* Copyright 2017 Ricardo Armando Machorro Reyes. Licensed under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License. */
package net.ramptors.jee;
import java.math.BigDecimal;
import static java.nio.charset.StandardCharsets.UTF_8;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.text.DecimalFormat;
import java.text.Format;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Base64;
import java.util.Collection;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
/** Funciones de apoyo al procesamiento de datos. */
public class UtilJee {
private static final String FORMATO_ENTERO = "#,##0";
private static final String FORMATO_PRECIO = "#,##0.00";
private static final String FORMATO_FECHA = "yyyy-MM-dd";
private static final String FORMATO_HORA = "HH:mm";
private static final String FORMATO_FECHA_HORA = FORMATO_FECHA + "'T'"
+ FORMATO_HORA;
private static final String FORMATO_FECHA_HORA_TZ = FORMATO_FECHA_HORA + " z";
private UtilJee() {
}
public static String toUpperCase(String s) {
return s == null ? null : s.toUpperCase();
}
public static boolean isNullOrEmpty(String s) {
return s == null || s.length() == 0;
}
public static boolean isNullOrEmpty(Collection<?> c) {
return c == null || c.isEmpty();
}
public static String getMensaje(Throwable e) {
final String localizedMessage = e.getLocalizedMessage();
return isNullOrEmpty(localizedMessage) ? e.toString() : localizedMessage;
}
public static String encripta(final String texto) {
try {
if (UtilJee.isNullOrEmpty(texto)) {
return null;
} else {
final MessageDigest md = MessageDigest.getInstance("SHA-256");
final byte[] bytes = md.digest(texto.getBytes(UTF_8));
return Base64.getEncoder().encodeToString(bytes);
}
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e);
}
}
public static DecimalFormat getFormatoEntero() {
return new DecimalFormat(FORMATO_ENTERO);
}
public static DecimalFormat getFormatoPrecio() {
final DecimalFormat formato = new DecimalFormat(FORMATO_PRECIO);
formato.setParseBigDecimal(true);
return formato;
}
public static SimpleDateFormat getFormatoFecha() {
final SimpleDateFormat dateFormat = new SimpleDateFormat(FORMATO_FECHA,
Locale.US);
dateFormat.setTimeZone(getUtc());
return dateFormat;
}
public static SimpleDateFormat getFormatoHora() {
final SimpleDateFormat dateFormat
= new SimpleDateFormat(FORMATO_HORA, Locale.US);
dateFormat.setTimeZone(getUtc());
return dateFormat;
}
public static SimpleDateFormat getFormatoFechaHora(TimeZone timeZone) {
final SimpleDateFormat dateFormat
= new SimpleDateFormat(FORMATO_FECHA_HORA, Locale.US);
dateFormat.setTimeZone(timeZone);
return dateFormat;
}
public static SimpleDateFormat getFormatoWebFechaHoraTimeZone() {
return new SimpleDateFormat(FORMATO_FECHA_HORA_TZ, Locale.US);
}
public static TimeZone getUtc() {
return TimeZone.getTimeZone("UTC");
}
public static String format(Format formato, Object obj) {
if (obj == null) {
return "";
} else {
return formato.format(obj);
}
}
public static <T> T parse(Class<T> tipo, Format formato, String txt,
String mensajeDeError) {
try {
if (isNullOrEmpty(txt)) {
return null;
} else {
return tipo.cast(formato.parseObject(txt));
}
} catch (ParseException e) {
throw new RuntimeException(mensajeDeError);
}
}
public static Long parseEntero(String texto, String mensajeDeError) {
return parse(Long.class, getFormatoEntero(), texto, mensajeDeError);
}
public static BigDecimal parsePrecio(String texto, String mensajeDeError) {
return parse(BigDecimal.class, getFormatoPrecio(), texto, mensajeDeError);
}
public static Date parseFechaWeb(String texto, String mensajeDeError) {
return parse(Date.class, getFormatoWebFechaHoraTimeZone(),
texto == null ? null : texto + "T00:00 UTC", mensajeDeError);
}
public static Date parseHoraWeb(String texto, String mensajeDeError) {
return parse(Date.class, getFormatoWebFechaHoraTimeZone(),
texto == null ? null : "1970-01-01T" + texto + " UTC", mensajeDeError);
}
public static Date parseFechaHoraWeb(String texto, TimeZone timeZone,
String mensajeDeError) {
return parse(Date.class, getFormatoFechaHora(timeZone), texto,
mensajeDeError);
}
}
|
[
"oswaldoadidas@hotmail.com"
] |
oswaldoadidas@hotmail.com
|
f00fc1e0448cb69f6fa0ff2fd1e173994c6db9b1
|
52ff7561eada18eb0557b3d05428f51ba7b62df2
|
/src/main/java/com/ok2c/lightmtp/SMTPProtocolException.java
|
1df99aa64c9007341c48c5fa1ddb43f1d6ae669b
|
[] |
no_license
|
VijayEluri/lightmtp
|
86527c2334cbc1421a6d6624fd1d8876f3460435
|
2a673e15de5d779f29604e53a193fc4e503daccd
|
refs/heads/master
| 2020-05-20T11:04:57.892225
| 2013-09-28T19:12:19
| 2013-09-28T19:12:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 928
|
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.ok2c.lightmtp;
public class SMTPProtocolException extends Exception {
private static final long serialVersionUID = -4885790040225380751L;
public SMTPProtocolException(final String message) {
super(message);
}
public SMTPProtocolException(final String message, final Throwable cause) {
super(message, cause);
}
}
|
[
"olegk@apache.org"
] |
olegk@apache.org
|
d943902d561fb34715710e729976d72467794d0d
|
d0ebbd623d1552167c4989768056dcc28078ff85
|
/abc99/src/main/java/com/fastcode/abc99/domain/extended/rental/IRentalRepositoryExtended.java
|
fab50fab772c1428031d44b5534b3f030580de58
|
[] |
no_license
|
fastcoderepos/abc99
|
5f8383488094555e9001e2a5ae4a60c0f347146e
|
0f8e2681ee4dd5d35f8b83714c6ed3f3546ef8e5
|
refs/heads/master
| 2023-02-15T11:40:23.634524
| 2021-01-06T11:49:39
| 2021-01-06T11:49:39
| 327,296,257
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 310
|
java
|
package com.fastcode.abc99.domain.extended.rental;
import org.springframework.stereotype.Repository;
import com.fastcode.abc99.domain.core.rental.IRentalRepository;
@Repository("rentalRepositoryExtended")
public interface IRentalRepositoryExtended extends IRentalRepository {
//Add your custom code here
}
|
[
"info@nfinityllc.com"
] |
info@nfinityllc.com
|
c989c2d76cd836ab8ef80a32590f6c057fa264ee
|
afd572566a045184ec6af501ef2af11266a64704
|
/app/src/main/java/com/application/boxmadikv1/especialista/menu/buscarPropuesta/fragment/perfilPropuesta/perfilcliente/calificar/CalificarClienteView.java
|
b46ea0c9000fc77ec9fb1f5e10129dc90699a874
|
[] |
no_license
|
luisrojash/BoxMadikApp
|
393dd60c26e84a77a3eca00467c225f56f028a8d
|
cfb6b98bf57456ef5926d6bff00cc1772fe38de1
|
refs/heads/master
| 2022-11-23T12:41:35.067982
| 2020-07-03T15:42:36
| 2020-07-03T15:42:36
| 276,934,247
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 643
|
java
|
package com.application.boxmadikv1.especialista.menu.buscarPropuesta.fragment.perfilPropuesta.perfilcliente.calificar;
import com.application.boxmadikv1.base.activity.BaseActivityView;
import com.application.boxmadikv1.especialista.menu.buscarPropuesta.fragment.entidad.ItemUi;
public interface CalificarClienteView extends BaseActivityView<CalificarClientePresenter> {
void mostrarDataInicial(ItemUi itemUi, String nombreCliente, String paisCliente, String imagenCliente);
void mostrarMensaje(String mensaje);
void mostrarProgressBarDialog();
void ocultarProgressBarDialog();
void finishActivity(String mensaje);
}
|
[
"lerojas@farmaciasperuanas.pe"
] |
lerojas@farmaciasperuanas.pe
|
0327fec92dd55d32e7c79e8018e8baa74ec40600
|
7416031d4a7166798d9928565a97cd8a5ef0032e
|
/jgnash-swing/src/main/java/jgnash/ui/components/SortedListModel.java
|
dfc8f05e94b3a40aa42ef06de41bf3c18fb9cde3
|
[] |
no_license
|
KoufAndBazz/jgnash
|
ece67b126677df8d51e9f9848cd5eba5a0839a34
|
8f3f77496a48d45e623b82b0a49d827600df2bc6
|
refs/heads/master
| 2020-04-05T23:29:30.734866
| 2014-05-26T11:23:25
| 2014-05-26T11:23:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,269
|
java
|
/*
* jGnash, a personal finance application
* Copyright (C) 2001-2014 Craig Cavanaugh
*
* 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 jgnash.ui.components;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import javax.swing.AbstractListModel;
/**
* A Sorted list model
*
* @author Craig Cavanaugh
*/
public class SortedListModel<E extends Comparable<? super E>> extends AbstractListModel<E> {
final private List<E> list = new ArrayList<>();
public SortedListModel() {
}
public SortedListModel(final Collection<E> list) {
add(list);
}
/**
* Returns the number of components in this list.
* <p/>
* This method is identical to <tt>size()</tt>, which implements the <tt>List</tt> interface defined in the 1.2
* Collections framework. This method exists in conjunction with <tt>setSize()</tt> so that "size" is identifiable
* as a JavaBean property.
*
* @return the number of components in this list.
* @see ArrayList#size()
*/
@Override
public int getSize() {
return list.size();
}
/**
* Returns the component at the specified index. <blockquote> <b>Note:</b> Although this method is not deprecated,
* the preferred method to use is <tt>get(int)</tt>, which implements the <tt>List</tt> interface defined in the 1.2
* Collections framework. </blockquote>
*
* @param index an index into this list.
* @return the component at the specified index.
* @throws ArrayIndexOutOfBoundsException if the <tt>index</tt> is negative or not less than the current size of
* this list given.
* @see ArrayList#get(int)
*/
@Override
public E getElementAt(final int index) {
return list.get(index);
}
/**
* Add a list of objects, does not fire a notification
*
* @param aList collection of objects to add
*/
final void add(final Collection<E> aList) {
synchronized (list) {
list.addAll(aList);
Collections.sort(list);
}
}
/**
* Tests if the specified object is a component in this list.
*
* @param elem an object.
* @return <code>true</code> if the specified object is the same as a component in this list
* @see java.util.Vector#contains(Object)
*/
public boolean contains(final E elem) {
return list.contains(elem);
}
/**
* Searches for the first occurrence of the given argument.
*
* @param elem an object.
* @return the index of the first occurrence of the argument in this list; returns <code>-1</code> if the object is
* not found.
* @see java.util.Vector#indexOf(Object)
*/
int indexOf(final E elem) {
return list.indexOf(elem);
}
/**
* Adds the specified component to the end of this list.
*
* @param obj the component to be added.
* @see java.util.Vector#addElement(Object)
*/
public void addElement(final E obj) {
int i = Collections.binarySearch(list, obj);
if (i < 0) {
int index = -i - 1;
list.add(index, obj);
fireIntervalAdded(this, index, index);
}
}
/**
* Removes the first (lowest-indexed) occurrence of the argument from this list.
*
* @param obj the component to be removed.
* @return <code>true</code> if the argument was a component of this list; <code>false</code> otherwise.
* @see ArrayList#remove(Object)
*/
public boolean removeElement(final E obj) {
int index = indexOf(obj);
boolean rv = list.remove(obj);
if (index >= 0) {
fireIntervalRemoved(this, index, index);
}
return rv;
}
/**
* Returns an array containing all of the elements in this list in the correct order.
* <p/>
* Throws an <tt>ArrayStoreException</tt> if the runtime type of the array a is not a supertype of the runtime type
* of every element in this list.
*
* @return an array containing the elements of the list.
* @see ArrayList#toArray()
*/
public Object[] toArray() {
return list.toArray();
}
/**
* Returns a copy of the list
*
* @return copy of the internal list
*/
public List<E> asList() {
return new ArrayList<>(list);
}
/**
* Resorts the list and fires a notification
*/
public void fireContentsChanged() {
Collections.sort(list);
fireContentsChanged(this, 0, getSize() - 1);
}
}
|
[
"jgnash.devel@gmail.com"
] |
jgnash.devel@gmail.com
|
91c804513a73db5849246772f14600e4fa9c3111
|
8b6508edea76b7971b6a88d5fd97e53e11ff0194
|
/src/main/java/com/fasterxml/jackson/core/StreamWriteCapability.java
|
ba1cf6fcbe3419ccd9232cff1f99a6b423f70f62
|
[
"Apache-2.0"
] |
permissive
|
FasterXML/jackson-core
|
ef979e26f9a934c50ce4177b6ef39d556a38726c
|
9d9972a4f3778d416934064ea61da189adc208b0
|
refs/heads/2.16
| 2023-08-31T04:41:16.194890
| 2023-08-31T02:18:25
| 2023-08-31T02:18:25
| 3,037,907
| 1,897
| 816
|
Apache-2.0
| 2023-09-14T00:11:40
| 2011-12-23T02:00:51
|
Java
|
UTF-8
|
Java
| false
| false
| 1,726
|
java
|
package com.fasterxml.jackson.core;
import com.fasterxml.jackson.core.util.JacksonFeature;
/**
* Set of on/off capabilities that a {@link JsonGenerator} for given format
* (or in case of buffering, original format) has.
* Used in some cases to adjust aspects of things like content conversions and
* coercions by format-agnostic functionality.
* Specific or expected usage documented by individual capability entry Javadocs.
*
* @since 2.12
*/
public enum StreamWriteCapability
implements JacksonFeature
{
/**
* Capability that indicates that the data format is able to express binary
* data natively, without using textual encoding like Base64.
*<p>
* Capability is currently enabled for all binary formats and none of textual
* formats.
*/
CAN_WRITE_BINARY_NATIVELY(false),
/**
* Capability that indicates that the data format is able to write
* "formatted numbers": that is, output of numbers is done as Strings
* and caller is allowed to pass in logical number values as Strings.
*<p>
* Capability is currently enabled for most textual formats and none of binary
* formats.
*/
CAN_WRITE_FORMATTED_NUMBERS(false)
;
/**
* Whether feature is enabled or disabled by default.
*/
private final boolean _defaultState;
private final int _mask;
private StreamWriteCapability(boolean defaultState) {
_defaultState = defaultState;
_mask = (1 << ordinal());
}
@Override
public boolean enabledByDefault() { return _defaultState; }
@Override
public boolean enabledIn(int flags) { return (flags & _mask) != 0; }
@Override
public int getMask() { return _mask; }
}
|
[
"tatu.saloranta@iki.fi"
] |
tatu.saloranta@iki.fi
|
b7a43e578f79ce9ec078ce63d818427c48e1893c
|
417b0e3d2628a417047a7a70f28277471d90299f
|
/proxies/com/microsoft/bingads/v11/customermanagement/GetCustomerPilotFeaturesResponse.java
|
7d34fedb805d3a9160e5a05717089048f6e07c73
|
[
"MIT"
] |
permissive
|
jpatton14/BingAds-Java-SDK
|
30e330a5d950bf9def0c211ebc5ec677d8e5fb57
|
b928a53db1396b7e9c302d3eba3f3cc5ff7aa9de
|
refs/heads/master
| 2021-07-07T08:28:17.011387
| 2017-10-03T14:44:43
| 2017-10-03T14:44:43
| 105,914,216
| 0
| 0
| null | 2017-10-05T16:33:39
| 2017-10-05T16:33:39
| null |
UTF-8
|
Java
| false
| false
| 1,703
|
java
|
package com.microsoft.bingads.v11.customermanagement;
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="FeaturePilotFlags" type="{http://schemas.microsoft.com/2003/10/Serialization/Arrays}ArrayOfint" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"featurePilotFlags"
})
@XmlRootElement(name = "GetCustomerPilotFeaturesResponse")
public class GetCustomerPilotFeaturesResponse {
@XmlElement(name = "FeaturePilotFlags", nillable = true)
protected ArrayOfint featurePilotFlags;
/**
* Gets the value of the featurePilotFlags property.
*
* @return
* possible object is
* {@link ArrayOfint }
*
*/
public ArrayOfint getFeaturePilotFlags() {
return featurePilotFlags;
}
/**
* Sets the value of the featurePilotFlags property.
*
* @param value
* allowed object is
* {@link ArrayOfint }
*
*/
public void setFeaturePilotFlags(ArrayOfint value) {
this.featurePilotFlags = value;
}
}
|
[
"baliu@microsoft.com"
] |
baliu@microsoft.com
|
48a64e9066c1416a79a40c3994dd40cf0c535ff6
|
1415496f94592ba4412407b71dc18722598163dd
|
/doc/libjitisi/sources/org/jitsi/impl/neomedia/AbstractRTPConnector.java
|
582c62a9fefbdaee88eca8afd3a001a31a6a24ff
|
[
"Apache-2.0"
] |
permissive
|
lhzheng880828/VOIPCall
|
ad534535869c47b5fc17405b154bdc651b52651b
|
a7ba25debd4bd2086bae2a48306d28c614ce0d4a
|
refs/heads/master
| 2021-07-04T17:25:21.953174
| 2020-09-29T07:29:42
| 2020-09-29T07:29:42
| 183,576,020
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,036
|
java
|
package org.jitsi.impl.neomedia;
import java.io.IOException;
import java.net.InetAddress;
import javax.media.rtp.RTPConnector;
import javax.media.rtp.SessionAddress;
import org.jitsi.service.neomedia.StreamConnector;
public abstract class AbstractRTPConnector implements RTPConnector {
protected final StreamConnector connector;
private RTPConnectorInputStream controlInputStream;
private RTPConnectorOutputStream controlOutputStream;
private RTPConnectorInputStream dataInputStream;
private RTPConnectorOutputStream dataOutputStream;
public abstract RTPConnectorInputStream createControlInputStream() throws IOException;
public abstract RTPConnectorOutputStream createControlOutputStream() throws IOException;
public abstract RTPConnectorInputStream createDataInputStream() throws IOException;
public abstract RTPConnectorOutputStream createDataOutputStream() throws IOException;
public AbstractRTPConnector(StreamConnector connector) {
if (connector == null) {
throw new NullPointerException("connector");
}
this.connector = connector;
}
public void addTarget(SessionAddress target) throws IOException {
InetAddress controlAddress = target.getControlAddress();
if (controlAddress != null) {
getControlOutputStream().addTarget(controlAddress, target.getControlPort());
}
getDataOutputStream().addTarget(target.getDataAddress(), target.getDataPort());
}
public void close() {
if (this.dataOutputStream != null) {
this.dataOutputStream.close();
this.dataOutputStream = null;
}
if (this.controlOutputStream != null) {
this.controlOutputStream.close();
this.controlOutputStream = null;
}
if (this.dataInputStream != null) {
this.dataInputStream.close();
this.dataInputStream = null;
}
if (this.controlInputStream != null) {
this.controlInputStream.close();
this.controlInputStream = null;
}
this.connector.close();
}
public final StreamConnector getConnector() {
return this.connector;
}
public RTPConnectorInputStream getControlInputStream() throws IOException {
return getControlInputStream(true);
}
/* access modifiers changed from: protected */
public RTPConnectorInputStream getControlInputStream(boolean create) throws IOException {
if (this.controlInputStream == null && create) {
this.controlInputStream = createControlInputStream();
}
return this.controlInputStream;
}
public RTPConnectorOutputStream getControlOutputStream() throws IOException {
return getControlOutputStream(true);
}
/* access modifiers changed from: protected */
public RTPConnectorOutputStream getControlOutputStream(boolean create) throws IOException {
if (this.controlOutputStream == null && create) {
this.controlOutputStream = createControlOutputStream();
}
return this.controlOutputStream;
}
public RTPConnectorInputStream getDataInputStream() throws IOException {
return getDataInputStream(true);
}
/* access modifiers changed from: protected */
public RTPConnectorInputStream getDataInputStream(boolean create) throws IOException {
if (this.dataInputStream == null && create) {
this.dataInputStream = createDataInputStream();
}
return this.dataInputStream;
}
public RTPConnectorOutputStream getDataOutputStream() throws IOException {
return getDataOutputStream(true);
}
public RTPConnectorOutputStream getDataOutputStream(boolean create) throws IOException {
if (this.dataOutputStream == null && create) {
this.dataOutputStream = createDataOutputStream();
}
return this.dataOutputStream;
}
public int getReceiveBufferSize() {
return -1;
}
public double getRTCPBandwidthFraction() {
return -1.0d;
}
public double getRTCPSenderBandwidthFraction() {
return -1.0d;
}
public int getSendBufferSize() {
return -1;
}
public void removeTarget(SessionAddress target) {
if (this.controlOutputStream != null) {
this.controlOutputStream.removeTarget(target.getControlAddress(), target.getControlPort());
}
if (this.dataOutputStream != null) {
this.dataOutputStream.removeTarget(target.getDataAddress(), target.getDataPort());
}
}
public void removeTargets() {
if (this.controlOutputStream != null) {
this.controlOutputStream.removeTargets();
}
if (this.dataOutputStream != null) {
this.dataOutputStream.removeTargets();
}
}
public void setReceiveBufferSize(int size) throws IOException {
}
public void setSendBufferSize(int size) throws IOException {
}
}
|
[
"lhzheng@grandstream.cn"
] |
lhzheng@grandstream.cn
|
bd0756017be64fe60802d509058a270e7ac6ef75
|
64937eb5048777d4ec22e3a26606d80c2ed3f80c
|
/src/pl/sda/javawwa/FCTRL2/Main.java
|
b8294c17bdba7484467e7c83b18aea7ff5c1196a
|
[] |
no_license
|
Tojemojek/spoj
|
3d1c2099cf15aa9a25c4abddb8093f3f8d64048a
|
0926db27be45f28a0b90da63a031688946714fdf
|
refs/heads/master
| 2021-06-27T18:54:39.069093
| 2017-09-21T14:22:46
| 2017-09-21T14:22:46
| 103,055,373
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 684
|
java
|
package pl.sda.javawwa.FCTRL2;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int howMany = sc.nextInt();
Map<Integer, Long> silnie = new TreeMap<>();
int tmp;
silnie.put(0, 1L);
silnie.put(1, 1L);
for (int j = 2; j <= 100; j++) {
silnie.put(j, j * silnie.get(j - 1));
System.out.println(j+ " " + silnie.get(j - 1));
}
for (int i = 0; i < howMany; i++) {
tmp = sc.nextInt();
System.out.println(silnie.get(tmp));
}
}
}
|
[
"inz@kostrowski.pl"
] |
inz@kostrowski.pl
|
c45db3deb93dcc7ab1557845507ed8b0e68cb867
|
23a7445ec116d26823eeb1610c4d8dbe22f0b045
|
/aTalk/src/main/java/net/java/sip/communicator/util/SRVRecord.java
|
6459fddc95cd86c9609975b49d59b412527790ed
|
[
"Apache-2.0"
] |
permissive
|
Rudloff/atalk-android
|
e998e9d1787f5aa4c08efb38b1607c0ebdfa52f3
|
00ff07475bf0233a60ddb6ad93bd0ba4be4f3572
|
refs/heads/master
| 2020-03-17T15:27:35.236473
| 2018-05-07T10:45:33
| 2018-05-07T10:45:33
| 133,711,522
| 1
| 0
| null | 2018-05-16T19:06:01
| 2018-05-16T19:06:00
| null |
UTF-8
|
Java
| false
| false
| 2,317
|
java
|
/*
* Jitsi, the OpenSource Java VoIP and Instant Messaging client.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.java.sip.communicator.util;
/**
* This class describes an DNS'S SRV record.
*
* @author Sebastien Vincent
*/
public class SRVRecord
{
/**
* DNSJava SRVRecord.
*/
private org.xbill.DNS.SRVRecord record;
/**
* Constructor.
*
* @param record DNSJava SRVRecord
*/
public SRVRecord(org.xbill.DNS.SRVRecord record)
{
this.record = record;
}
/**
* Get port.
*
* @return port
*/
public int getPort()
{
return record.getPort();
}
/**
* Get target.
*
* @return target with the end dot stripped off
*/
public String getTarget()
{
String hostName = record.getTarget().toString();
return hostName.substring(0, hostName.length() - 1);
}
/**
* Get priority.
*
* @return priority
*/
public int getPriority()
{
return record.getPriority();
}
/**
* Get weight.
*
* @return weight
*/
public int getWeight()
{
return record.getWeight();
}
/**
* Get DNS TTL.
*
* @return DNS TTL
*/
public long getTTL()
{
return record.getTTL();
}
/**
* Get domain name.
*
* @return domain name
*/
public String getName()
{
return record.getName().toString();
}
/**
* Returns the toString of the org.xbill.DNS.SRVRecord that was passed to the constructor.
*
* @return the toString of the org.xbill.DNS.SRVRecord that was passed to the constructor.
*/
@Override
public String toString()
{
return record.toString();
}
}
|
[
"cmeng.gm@gmail.com"
] |
cmeng.gm@gmail.com
|
8fbbb9e1461f3a72aee5dd6da522ca509939cf80
|
35348f6624d46a1941ea7e286af37bb794bee5b7
|
/Ghidra/Debug/ProposedUtils/src/main/java/ghidra/pcode/emu/PcodeMachine.java
|
acb5dc7a82b9eaeb9c96b469c8c98c5c0f0e737a
|
[
"Apache-2.0",
"GPL-1.0-or-later",
"GPL-3.0-only",
"LicenseRef-scancode-public-domain",
"LGPL-2.1-only",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
StarCrossPortal/ghidracraft
|
7af6257c63a2bb7684e4c2ad763a6ada23297fa3
|
a960e81ff6144ec8834e187f5097dfcf64758e18
|
refs/heads/master
| 2023-08-23T20:17:26.250961
| 2021-10-22T00:53:49
| 2021-10-22T00:53:49
| 359,644,138
| 80
| 19
|
Apache-2.0
| 2021-10-20T03:59:55
| 2021-04-20T01:14:29
|
Java
|
UTF-8
|
Java
| false
| false
| 5,632
|
java
|
/* ###
* IP: GHIDRA
*
* 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 ghidra.pcode.emu;
import java.util.Collection;
import java.util.List;
import ghidra.app.plugin.processors.sleigh.SleighLanguage;
import ghidra.pcode.emu.DefaultPcodeThread.SleighEmulationLibrary;
import ghidra.pcode.exec.*;
import ghidra.program.model.address.Address;
/**
* A machine which execute p-code on state of an abstract type
*
* @param <T> the type of objects in the machine's state
*/
public interface PcodeMachine<T> {
/**
* Get the machine's SLEIGH language (processor model)
*
* @return the language
*/
SleighLanguage getLanguage();
/**
* Get the arithmetic applied by the machine
*
* @return the arithmetic
*/
PcodeArithmetic<T> getArithmetic();
/**
* Get the userop library common to all threads in the machine.
*
* <p>
* Note that threads may have larger libraries, but each should contain all the userops in this
* library.
*
* @return the userop library
*/
SleighUseropLibrary<T> getUseropLibrary();
/**
* Get a userop library which at least declares all userops available in thread userop
* libraries.
*
* <p>
* Thread userop libraries may have more userops than are defined in the machine's userop
* library. However, to compile SLEIGH programs linked to thread libraries, the thread's userops
* must be known to the compiler. The stub library will name all userops common among the
* threads, even if their definitions vary. <b>WARNING:</b> The stub library is not required to
* provide implementations of the userops. Often they will throw exceptions, so do not attempt
* to use the returned library in an executor.
*
* @return the stub library
*/
SleighUseropLibrary<T> getStubUseropLibrary();
/**
* Create a new thread with a default name in this machine
*
* @return the new thread
*/
PcodeThread<T> newThread();
/**
* Create a new thread with the given name in this machine
*
* @param name the name
* @return the new thread
*/
PcodeThread<T> newThread(String name);
/**
* Get the thread, if present, with the given name
*
* @param name the name
* @param createIfAbsent create a new thread if the thread does not already exist
* @return the thread, or {@code null} if absent and not created
*/
PcodeThread<T> getThread(String name, boolean createIfAbsent);
/**
* Collect all threads present in the machine
*
* @return the collection of threads
*/
Collection<? extends PcodeThread<T>> getAllThreads();
/**
* Get the machine's shared (memory) state
*
* <p>
* The returned state will may throw {@link IllegalArgumentException} if the client requests
* register values of it. This state is shared among all threads in this machine.
*
* @return the memory state
*/
PcodeExecutorState<T> getSharedState();
/**
* Compile the given SLEIGH code for execution by a thread of this machine
*
* <p>
* This links in the userop library given at construction time and those defining the emulation
* userops, e.g., {@code emu_swi}.
*
* @param sourceName a user-defined source name for the resulting "program"
* @param lines the lines of SLEIGH source code
* @return the compiled program
*/
PcodeProgram compileSleigh(String sourceName, List<String> lines);
/**
* Override the p-code at the given address with the given SLEIGH source
*
* <p>
* This will attempt to compile the given source against this machine's userop library and then
* will inject it at the given address. The resulting p-code <em>replaces</em> that which would
* be executed by decoding the instruction at the given address. The means the machine will not
* decode, nor advance its counter, unless the SLEIGH causes it. In most cases, the SLEIGH will
* call {@link SleighEmulationLibrary#emu_exec_decoded()} to cause the machine to decode and
* execute the overridden instruction.
*
* <p>
* Each address can have at most a single inject. If there is already one present, it is
* replaced and the old inject completely forgotten. The injector does not support chaining or
* double-wrapping, etc.
*
* @param address the address to inject at
* @param sleigh the SLEIGH source to compile and inject
*/
void inject(Address address, List<String> sleigh);
/**
* Remove the inject, if present, at the given address
*
* @param address the address to clear
*/
void clearInject(Address address);
/**
* Remove all injects from this machine
*/
void clearAllInjects();
/**
* Add a (conditional) breakpoint at the given address
*
* <p>
* Breakpoints are implemented at the p-code level using an inject, without modification to the
* emulated image. As such, it cannot coexist with another inject. A client needing to break
* during an inject must use {@link SleighEmulationLibrary#emu_swi()} in the injected SLEIGH.
*
* @param address the address at which to break
* @param sleighCondition a SLEIGH expression which controls the breakpoint
*/
void addBreakpoint(Address address, String sleighCondition);
}
|
[
"46821332+nsadeveloper789@users.noreply.github.com"
] |
46821332+nsadeveloper789@users.noreply.github.com
|
cedabf3d7eb95332e2d3ff5d1b0ec76a023e2b55
|
f2fc9daad3bc12a0e7e457df936953bc4534a11d
|
/18-04-06-BOS_Logistics_management_system/Logistics_bos-parent/Logistics_bos-domain/src/main/java/shun/bos/domain/QpWorkordermanage.java
|
ea98f43d80a4df49ab36928bad17e4119da81fed
|
[] |
no_license
|
chenzongshun/Spring-Struts-Hibernate
|
06d4861f1c3fd1da5c9434aa7e90cd158c22b3f3
|
df2025dcae634e94efeee2c35ecc428bdd1b2e20
|
refs/heads/master
| 2020-03-21T10:24:28.747175
| 2018-06-24T03:07:17
| 2018-06-24T03:07:17
| 138,449,283
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 6,073
|
java
|
package shun.bos.domain;
import java.util.Date;
/**
* 工作单,就是快递单
* id; // 工作快递单号
arrivecity; // 到达地
product; // 产品,包裹内容
r num; // 运送件数
weight; // 重量
floadreqr; // 配载配送要求,要空运吗?我开飞机的噢
prodtimelimit; // 配送时限(设计表上写的是产品时限)
prodtype; // 包裹类型(产品类型)
sendername; // 寄件人姓名
senderphone; // 寄件人电话
senderaddr; // 寄件人地址
receivername; // 收件人姓名
receiverphone; // 收件人电话
receiveraddr; // 收件人地址
feeitemnum; // 计费件数
actlweit; // 实际重量
vol; // 体积
managerCheck; // 是否审核配送
updatetime; // 更新时间
*/
public class QpWorkordermanage implements java.io.Serializable {
private static final long serialVersionUID = 1L;
private String id; // 工作快递单号
private String arrivecity; // 到达地
private String product; // 产品,包裹内容
private Integer num; // 运送件数
private Double weight; // 重量
private String floadreqr; // 配载配送要求,要空运吗?我开飞机的噢
private String prodtimelimit; // 配送时限(设计表上写的是产品时限)
private String prodtype; // 包裹类型(产品类型)
private String sendername; // 寄件人姓名
private String senderphone; // 寄件人电话
private String senderaddr; // 寄件人地址
private String receivername; // 收件人姓名
private String receiverphone; // 收件人电话
private String receiveraddr; // 收件人地址
private Integer feeitemnum; // 计费件数
private Double actlweit; // 实际重量
private String vol; // 体积
private String managerCheck; // 是否审核配送
private Date updatetime; // 更新时间
// Constructors
/** default constructor */
public QpWorkordermanage() {
}
/** minimal constructor */
public QpWorkordermanage(String id) {
this.id = id;
}
/** full constructor */
public QpWorkordermanage(String id, String arrivecity, String product, Integer num, Double weight, String floadreqr,
String prodtimelimit, String prodtype, String sendername, String senderphone, String senderaddr,
String receivername, String receiverphone, String receiveraddr, Integer feeitemnum, Double actlweit,
String vol, String managerCheck, Date updatetime) {
this.id = id;
this.arrivecity = arrivecity;
this.product = product;
this.num = num;
this.weight = weight;
this.floadreqr = floadreqr;
this.prodtimelimit = prodtimelimit;
this.prodtype = prodtype;
this.sendername = sendername;
this.senderphone = senderphone;
this.senderaddr = senderaddr;
this.receivername = receivername;
this.receiverphone = receiverphone;
this.receiveraddr = receiveraddr;
this.feeitemnum = feeitemnum;
this.actlweit = actlweit;
this.vol = vol;
this.managerCheck = managerCheck;
this.updatetime = updatetime;
}
// Property accessors
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
public String getArrivecity() {
return this.arrivecity;
}
public void setArrivecity(String arrivecity) {
this.arrivecity = arrivecity;
}
public String getProduct() {
return this.product;
}
public void setProduct(String product) {
this.product = product;
}
public Integer getNum() {
return this.num;
}
public void setNum(Integer num) {
this.num = num;
}
public Double getWeight() {
return this.weight;
}
public void setWeight(Double weight) {
this.weight = weight;
}
public String getFloadreqr() {
return this.floadreqr;
}
public void setFloadreqr(String floadreqr) {
this.floadreqr = floadreqr;
}
public String getProdtimelimit() {
return this.prodtimelimit;
}
public void setProdtimelimit(String prodtimelimit) {
this.prodtimelimit = prodtimelimit;
}
public String getProdtype() {
return this.prodtype;
}
public void setProdtype(String prodtype) {
this.prodtype = prodtype;
}
public String getSendername() {
return this.sendername;
}
public void setSendername(String sendername) {
this.sendername = sendername;
}
public String getSenderphone() {
return this.senderphone;
}
public void setSenderphone(String senderphone) {
this.senderphone = senderphone;
}
public String getSenderaddr() {
return this.senderaddr;
}
public void setSenderaddr(String senderaddr) {
this.senderaddr = senderaddr;
}
public String getReceivername() {
return this.receivername;
}
public void setReceivername(String receivername) {
this.receivername = receivername;
}
public String getReceiverphone() {
return this.receiverphone;
}
public void setReceiverphone(String receiverphone) {
this.receiverphone = receiverphone;
}
public String getReceiveraddr() {
return this.receiveraddr;
}
public void setReceiveraddr(String receiveraddr) {
this.receiveraddr = receiveraddr;
}
public Integer getFeeitemnum() {
return this.feeitemnum;
}
public void setFeeitemnum(Integer feeitemnum) {
this.feeitemnum = feeitemnum;
}
public Double getActlweit() {
return this.actlweit;
}
public void setActlweit(Double actlweit) {
this.actlweit = actlweit;
}
public String getVol() {
return this.vol;
}
public void setVol(String vol) {
this.vol = vol;
}
public String getManagerCheck() {
return this.managerCheck;
}
public void setManagerCheck(String managerCheck) {
this.managerCheck = managerCheck;
}
public Date getUpdatetime() {
return this.updatetime;
}
public void setUpdatetime(Date updatetime) {
this.updatetime = updatetime;
}
}
|
[
"you@example.com"
] |
you@example.com
|
23efb54c2022ba6d617654f52da8b3c1898b2b3f
|
1e708e4a1023e8fb9e66bed3e98d0b7969ad30da
|
/app/src/main/vysor/com/google/android/gms/internal/zzgb.java
|
d8ee42bb55b1b3fd548da7245ef484e3964efbf1
|
[] |
no_license
|
wjfsanhe/Vysor-Research
|
c139a2120bcf94057fc1145ff88bd9f6aa443281
|
f0b6172b9704885f95466a7e99f670fae760963f
|
refs/heads/master
| 2020-03-31T16:23:18.137882
| 2018-12-11T07:35:31
| 2018-12-11T07:35:31
| 152,373,344
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,869
|
java
|
//
// Decompiled by Procyon v0.5.30
//
package com.google.android.gms.internal;
import java.util.Iterator;
import org.json.JSONObject;
import java.util.AbstractMap;
import java.util.HashSet;
@zziy
public class zzgb implements zzga
{
private final zzfz zzbrj;
private final HashSet<AbstractMap.SimpleEntry<String, zzev>> zzbrk;
public zzgb(final zzfz zzbrj) {
this.zzbrj = zzbrj;
this.zzbrk = new HashSet<AbstractMap.SimpleEntry<String, zzev>>();
}
@Override
public void zza(final String s, final zzev zzev) {
this.zzbrj.zza(s, zzev);
this.zzbrk.add((AbstractMap.SimpleEntry<String, zzev>)new AbstractMap.SimpleEntry(s, zzev));
}
@Override
public void zza(final String s, final JSONObject jsonObject) {
this.zzbrj.zza(s, jsonObject);
}
@Override
public void zzb(final String s, final zzev zzev) {
this.zzbrj.zzb(s, zzev);
this.zzbrk.remove(new AbstractMap.SimpleEntry(s, zzev));
}
@Override
public void zzb(final String s, final JSONObject jsonObject) {
this.zzbrj.zzb(s, jsonObject);
}
@Override
public void zzj(final String s, final String s2) {
this.zzbrj.zzj(s, s2);
}
@Override
public void zznd() {
for (final AbstractMap.SimpleEntry<String, zzev> simpleEntry : this.zzbrk) {
final String value = String.valueOf(simpleEntry.getValue().toString());
String concat;
if (value.length() != 0) {
concat = "Unregistering eventhandler: ".concat(value);
}
else {
concat = new String("Unregistering eventhandler: ");
}
zzkn.v(concat);
this.zzbrj.zzb(simpleEntry.getKey(), simpleEntry.getValue());
}
this.zzbrk.clear();
}
}
|
[
"903448239@qq.com"
] |
903448239@qq.com
|
5e482b1b7f59112e56f854698b367cc348728c47
|
7a36a192d35fe60e9e0f2d434b377b2a235146de
|
/src/light/mvc/utils/echarts/style/ItemStyle.java
|
21a2573518f29742187c6764873e0894d5b5ea8c
|
[] |
no_license
|
wjl7123093/lightmvc
|
5671b91da1165e0c49da6c1789e83cb23542890d
|
bb1fe6dfc0bb8eb5141748737d54d0ef0dd90b1b
|
refs/heads/master
| 2021-07-16T12:41:22.110070
| 2017-10-23T08:53:27
| 2017-10-23T08:53:27
| 107,953,264
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,799
|
java
|
/*
* The MIT License (MIT)
*
* Copyright (c) 2014 abel533@gmail.com
*
* 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 light.mvc.utils.echarts.style;
import light.mvc.utils.echarts.style.itemstyle.Emphasis;
import light.mvc.utils.echarts.style.itemstyle.Normal;
/**
* Description: ItemStyle
*
* @author liuzh
*/
public class ItemStyle {
/**
* 默认样式
*/
private Normal normal;
/**
* 强调样式(悬浮时样式)
*/
private Emphasis emphasis;
/**
* 获取normal值
*/
public Normal normal() {
if (this.normal == null) {
this.normal = new Normal();
}
return this.normal;
}
/**
* 设置normal值
*
* @param normal
*/
public ItemStyle normal(Normal normal) {
this.normal = normal;
return this;
}
/**
* 获取emphasis值
*/
public Emphasis emphasis() {
if (this.emphasis == null) {
this.emphasis = new Emphasis();
}
return this.emphasis;
}
/**
* 设置emphasis值
*
* @param emphasis
*/
public ItemStyle emphasis(Emphasis emphasis) {
this.emphasis = emphasis;
return this;
}
/**
* 获取normal值
*/
public Normal getNormal() {
return normal;
}
/**
* 设置normal值
*
* @param normal
*/
public void setNormal(Normal normal) {
this.normal = normal;
}
/**
* 获取emphasis值
*/
public Emphasis getEmphasis() {
return emphasis;
}
/**
* 设置emphasis值
*
* @param emphasis
*/
public void setEmphasis(Emphasis emphasis) {
this.emphasis = emphasis;
}
}
|
[
"wjl7123093@163.com"
] |
wjl7123093@163.com
|
9f8502fa627bae2adf3d4d0d933664c300557ea1
|
c0ce4f8159f347fab24e251a4a1bfb7fd3bff71d
|
/src/main/java/com/site/mountain/service/impl/SseSceneTypeServiceImpl.java
|
7278c15bb0264930dafd9da2bb3061940f470a29
|
[] |
no_license
|
jinshw/wpmp
|
913e30ef2b30049bfbfda933382104075d61da8f
|
7484cf925b1aa9e88e4ed012f4fca3a9cadef991
|
refs/heads/master
| 2023-03-28T18:04:44.718037
| 2021-04-06T01:21:16
| 2021-04-06T01:21:16
| 353,034,961
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,956
|
java
|
package com.site.mountain.service.impl;
import com.site.mountain.dao.mysql.SseSceneTypeDao;
import com.site.mountain.entity.SseSceneDatas;
import com.site.mountain.entity.SseSceneType;
import com.site.mountain.entity.SysDept;
import com.site.mountain.service.SseSceneDatasService;
import com.site.mountain.service.SseSceneTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class SseSceneTypeServiceImpl implements SseSceneTypeService {
@Autowired
private SseSceneTypeDao sseSceneTypeDao;
@Autowired
private SseSceneDatasService sseSceneDatasService;
@Override
public SseSceneType getSseSceneType(SseSceneType sseSceneType) {
SseSceneType tree = new SseSceneType();
tree = sseSceneTypeDao.selectByid(sseSceneType.getStId());
SseSceneType parentSceneType = sseSceneTypeDao.selectByid(tree.getpId());
tree.setParentSceneType(parentSceneType);
SseSceneType spn = new SseSceneType();
spn.setpId(sseSceneType.getStId());
spn.setStType(sseSceneType.getStType());
List<SseSceneType> children = sseSceneTypeDao.selectByPid(spn);
for (SseSceneType sceneType : children) {
sceneType.setStType(sseSceneType.getStType());// 递归时设置类型为初始传递的值
SseSceneType s = getSseSceneType(sceneType);
tree.getChildren().add(s);
}
return tree;
}
@Override
public SseSceneType getSseSceneTypeTreeById(SseSceneType sseSceneType) {
SseSceneType tree = new SseSceneType();
tree = sseSceneTypeDao.selectByid(sseSceneType.getStId());
SseSceneType spn = new SseSceneType();
spn.setpId(sseSceneType.getStId());
List<SseSceneType> children = sseSceneTypeDao.selectByPid(spn);
for (SseSceneType sceneType : children) {
SseSceneType s = getSseSceneTypeTreeById(sceneType);
tree.getChildren().add(s);
}
return tree;
}
public int insert(SseSceneType pojo) {
return sseSceneTypeDao.insert(pojo);
}
public int updateOne(SseSceneType pojo) {
return sseSceneTypeDao.updateOne(pojo);
}
public Map<String, Object> deleteObj(SseSceneType pojo) {
Map<String, Object> map = new HashMap<>();
SseSceneDatas sseSceneDatas = new SseSceneDatas();
sseSceneDatas.setRoadType(pojo.getStId());
List<SseSceneDatas> tempList = sseSceneDatasService.findListByObj(sseSceneDatas);
if (tempList.size() == 0) {
map.put("status", 50000);
map.put("message", "场景道路类型有引用");
sseSceneDatas.setRoadType(null);
sseSceneDatas.setSceneType(pojo.getStId());
tempList = sseSceneDatasService.findListByObj(sseSceneDatas);
}
if (tempList.size() > 0) {
map.put("status", 50000);
map.put("message", "场景类型有引用");
} else {
SseSceneType tree = getSseSceneType(pojo);
if (tree.getChildren().size() == 0) {//删除的节点是叶子节点
int flag = sseSceneTypeDao.delete(pojo);
if (flag > 0) {
map.put("status", 20000);
map.put("message", "执行成功");
} else {
map.put("status", 50000);
map.put("message", "执行失败");
}
} else {
map.put("status", 50000);
map.put("message", "不是叶子节点");
}
}
return map;
}
public int delete(SseSceneType pojo) {
return sseSceneTypeDao.delete(pojo);
}
@Override
public SseSceneType selectByid(String id) {
return sseSceneTypeDao.selectByid(id);
}
}
|
[
"jinshengwang2007@163.com"
] |
jinshengwang2007@163.com
|
080acc933714b72da4f52b64d2cd2394f45474dc
|
0c19b17b6fd3ea61773014924746305cecb58374
|
/indexcity-report/src/main/java/io/indexcity/report/security/SecurityUtils.java
|
5f6b697a4654eb457181efae98fc408150ee86be
|
[
"Apache-2.0"
] |
permissive
|
pierre-filliolaud/indexcity
|
a106cb3231c28791b5241dc216fbf7a120af6be2
|
503d54f63ed53ab358af443dcc7d08f422870a53
|
refs/heads/master
| 2020-12-05T10:37:34.663053
| 2016-09-05T22:36:49
| 2016-09-05T22:36:49
| 67,450,724
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,950
|
java
|
package io.indexcity.report.security;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import java.util.Collection;
/**
* Utility class for Spring Security.
*/
public final class SecurityUtils {
private SecurityUtils() {
}
/**
* Get the login of the current user.
*
* @return the login of the current user
*/
public static String getCurrentUserLogin() {
SecurityContext securityContext = SecurityContextHolder.getContext();
Authentication authentication = securityContext.getAuthentication();
String userName = null;
if (authentication != null) {
if (authentication.getPrincipal() instanceof UserDetails) {
UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal();
userName = springSecurityUser.getUsername();
} else if (authentication.getPrincipal() instanceof String) {
userName = (String) authentication.getPrincipal();
}
}
return userName;
}
/**
* Check if a user is authenticated.
*
* @return true if the user is authenticated, false otherwise
*/
public static boolean isAuthenticated() {
SecurityContext securityContext = SecurityContextHolder.getContext();
Collection<? extends GrantedAuthority> authorities = securityContext.getAuthentication().getAuthorities();
if (authorities != null) {
for (GrantedAuthority authority : authorities) {
if (authority.getAuthority().equals(AuthoritiesConstants.ANONYMOUS)) {
return false;
}
}
}
return true;
}
/**
* If the current user has a specific authority (security role).
*
* <p>The name of this method comes from the isUserInRole() method in the Servlet API</p>
*
* @param authority the authority to check
* @return true if the current user has the authority, false otherwise
*/
public static boolean isCurrentUserInRole(String authority) {
SecurityContext securityContext = SecurityContextHolder.getContext();
Authentication authentication = securityContext.getAuthentication();
if (authentication != null) {
if (authentication.getPrincipal() instanceof UserDetails) {
UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal();
return springSecurityUser.getAuthorities().contains(new SimpleGrantedAuthority(authority));
}
}
return false;
}
}
|
[
"pierre.filliolaud@gmail.com"
] |
pierre.filliolaud@gmail.com
|
276506baf89b07c1e8f1773a366635830871558b
|
3a22e4b66382a4f8e9d660749b3dc2e146500901
|
/src/com/chinaedustar/sso/web/UpdateUserInfoByUsernameController.java
|
1ad631d897274109934ec1fd6e2bc50047450af3
|
[] |
no_license
|
yxxcrtd/UserMgr3
|
1a60e5498e4fa13d38454fe436032dc3d71525a3
|
7168b36498aa1e039de78eb5a3535a13ee44113b
|
refs/heads/master
| 2020-05-31T20:22:51.709067
| 2019-06-05T22:03:46
| 2019-06-05T22:03:46
| 190,474,792
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,347
|
java
|
package com.chinaedustar.sso.web;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
/**
* 根据用户名修改用户真实姓名、邮件地址和用户角色
*/
public class UpdateUserInfoByUsernameController extends BaseController {
@ResponseBody
protected ModelAndView handleRequestInternal(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
response.setContentType("text/html; charset=UTF-8");
String username = URLDecoder.decode(request.getParameter("username"), "UTF-8");
String trueName = URLDecoder.decode(request.getParameter("trueName"), "UTF-8");
String email = URLDecoder.decode(request.getParameter("email"), "UTF-8");
String role = request.getParameter("role");
if (null != username && !"".equals(username) && null != trueName && !"".equals(trueName) && null != email && !"".equals(email) && null != role && !"".equals(role)) {
userService.updateUserInfoByUsername(username, trueName, email, Integer.valueOf(role));
response.getWriter().print("ok");
} else {
response.getWriter().print("error");
}
return null;
}
}
|
[
"yxxcrtd@gmail.com"
] |
yxxcrtd@gmail.com
|
45e51c257ec75e17e3475892e5a8a801777da1e5
|
c9e50b5e1901436b362ec810a96cf99d9a59bca9
|
/apps/diva/src/android/support/v4/widget/PopupWindowCompatApi23.java
|
7228db4b63c071d760784d2a60c96bfcebec88c3
|
[] |
no_license
|
JOSHUAJEBARAJ/frida-android
|
da9626515f6fe8704c4bcc388cda85459f89c2ce
|
2bbc143a1ff266bfa7ee956fd6d9d81e84e63ad3
|
refs/heads/master
| 2020-06-03T18:39:31.715509
| 2019-06-17T05:07:50
| 2019-06-17T05:07:50
| 191,685,180
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 734
|
java
|
/*
* Decompiled with CFR 0_121.
*
* Could not load the following classes:
* android.widget.PopupWindow
*/
package android.support.v4.widget;
import android.widget.PopupWindow;
class PopupWindowCompatApi23 {
PopupWindowCompatApi23() {
}
static boolean getOverlapAnchor(PopupWindow popupWindow) {
return popupWindow.getOverlapAnchor();
}
static int getWindowLayoutType(PopupWindow popupWindow) {
return popupWindow.getWindowLayoutType();
}
static void setOverlapAnchor(PopupWindow popupWindow, boolean bl) {
popupWindow.setOverlapAnchor(bl);
}
static void setWindowLayoutType(PopupWindow popupWindow, int n) {
popupWindow.setWindowLayoutType(n);
}
}
|
[
"joshuajeabaraj.z@gmail.com"
] |
joshuajeabaraj.z@gmail.com
|
bf4284de082359b0aaf4629902efc394a1223119
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-12584-5-18-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/store/XWikiCacheStore_ESTest_scaffolding.java
|
6cb41c7a18f51eacd059aaef8af12a16aae38d7f
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 439
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Apr 03 19:45:04 UTC 2020
*/
package com.xpn.xwiki.store;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class XWikiCacheStore_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
4bb26a4f178c61844aa0de33ef1f2fbedd3aaca1
|
11e6f9b6f6daf350e64ff45614602ed59879fe14
|
/1218/src/com/example/vo/MemberVO.java
|
2e262ca9ac2513470c3f68c1fd1a30c287911adf
|
[] |
no_license
|
alrha486/SIST-Spring
|
cbecd05404a3a5991b67dfe7737a255d8b49a036
|
7e77f968ccf13c89bffee01d5c12a2c4dcf49bd9
|
refs/heads/master
| 2020-04-08T19:03:12.801882
| 2018-12-28T09:01:39
| 2018-12-28T09:01:39
| 159,637,181
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 862
|
java
|
package com.example.vo;
public class MemberVO {
private String userid;
private String name;
private int age;
private String gender;
private String city;
public String getUserid() {
return userid;
}
public void setUserid(String userid) {
this.userid = userid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
@Override
public String toString() {
return "MemberVO [userid=" + userid + ", name=" + name + ", age=" + age + ", gender=" + gender + ", city="
+ city + "]";
}
}
|
[
"alrha486@naver.com"
] |
alrha486@naver.com
|
a4c1df8d669504366389a8111def03e6b3660a97
|
fdec3692a0811400be8d8384f04ed3b8b48977a9
|
/Java-Development/05. Databases Frameworks - Hibernate & Spring Data/12. DB Advanced JSON Processing - Exercise (Car Dealer)/src/main/java/cardealer/service/CustomerService.java
|
eefcedbbd6cff0980171f6dbb6615979f408e6e2
|
[] |
no_license
|
did0sh/Softuni-Education
|
8d1a76a6af1f28947c4657a37cbc5a281d3a1c9e
|
af0051ab14512667c8cd75bfd15ca8e9d272fdd1
|
refs/heads/main
| 2023-04-19T12:01:15.109248
| 2021-05-12T17:56:16
| 2021-05-12T17:56:16
| 314,238,203
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 336
|
java
|
package cardealer.service;
import cardealer.domain.dto.CustomerOrderedByBirthDateView;
import cardealer.domain.dto.CustomerSeedDto;
import java.util.List;
public interface CustomerService {
void seedCustomers(CustomerSeedDto[] customerSeedDtos);
List<CustomerOrderedByBirthDateView> findAllCustomersOrderedByBirthDate();
}
|
[
"deyan.p.georgiev@gmail.com"
] |
deyan.p.georgiev@gmail.com
|
d89f85ebe294361044ed9a0177ac719e66644123
|
968447bedbea5842c2d0f62ff47c0bd4c2258012
|
/demos/umlastah/translations/astah-generated-code/astah-gen-java/package-class-diagrams/PackageF/Marriage4.java
|
c1a96711f1884585b11aa05b39d1d3b3888bd93e
|
[] |
no_license
|
paulnguyen/cmpe202
|
5c3fe070515e4664385ca8fde5d97564f35557e4
|
153b243e888f083733a180c571e0290ec49a67dd
|
refs/heads/master
| 2022-12-14T13:14:04.001730
| 2022-11-12T21:56:09
| 2022-11-12T21:56:09
| 10,661,668
| 53
| 441
| null | 2022-12-06T19:25:07
| 2013-06-13T08:09:27
|
Java
|
UTF-8
|
Java
| false
| false
| 251
|
java
|
package package-class-diagrams.PackageF;
import java.util.Date;
public class Marriage4 {
private Date date;
private String place;
private boolean divorced;
private int number;
private Woman3 husband;
private Man3 wife;
}
|
[
"paul.nguyen@sjsu.edu"
] |
paul.nguyen@sjsu.edu
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.