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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
722ace8c5bfad19fcdc42ccf957bba7cd8bdb939 | 3194a774dfa815eaa89b84fa82fdbdd27095300b | /src/main/java/havis/net/ui/middleware/client/utils/Utils.java | 85fb8b41ad837c998477407d57314a9bce883e7e | [
"Apache-2.0"
] | permissive | menucha-de/Middleware.UI | 27e8fd74160c4fbe6d1d83f3df943f1678285004 | 0405009676c714405a95d593a5a3c4ed4644cfe4 | refs/heads/main | 2023-03-22T09:19:58.366002 | 2021-03-17T15:02:41 | 2021-03-17T15:02:41 | 348,751,041 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,263 | java | package havis.net.ui.middleware.client.utils;
import havis.middleware.ale.service.ECTime;
import havis.net.ui.middleware.client.shared.resourcebundle.ResourceBundle;
import java.util.Date;
import org.fusesource.restygwt.client.FailedResponseException;
import org.fusesource.restygwt.client.JsonEncoderDecoder;
import com.google.gwt.dom.client.Element;
import com.google.gwt.http.client.Response;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.Widget;
public class Utils {
private static final String EXCEPTION = "Exception: ";
public static final int INVALID_TIME = -1;
/**
* Returns true if the given string is null or is an empty string.
*
* @param str
* a string reference to check
* @return true if the string is null or is an empty string
*/
public static boolean isNullOrEmpty(CharSequence str) {
if (str == null || str.toString().trim().isEmpty())
return true;
else
return false;
}
/**
* Returns the reason of the {@code throwable}
*
* @param throwable
* @return the reason
*/
public static String getReason(Throwable throwable) {
if (throwable != null) {
String returnMessage = throwable.getMessage();
if (FailedResponseException.class.equals(throwable.getClass())) {
Response response = ((FailedResponseException) throwable).getResponse();
if (response != null) {
if (!isNullOrEmpty(response.getText())) {
returnMessage = response.getText();
int offset = returnMessage.indexOf(EXCEPTION);
if (offset >= 0) {
returnMessage = returnMessage.substring(offset + EXCEPTION.length());
}
}
}
}
return returnMessage;
}
return null;
}
public static ECTime getTime() {
ECTime result = new ECTime();
result.setValue(INVALID_TIME);
result.setUnit("MS");
return result;
}
public static boolean isTimeSet(ECTime time) {
return time != null && time.getValue() != INVALID_TIME;
}
public static String getNewId() {
return "NEW_" + new Date().getTime();
}
public static boolean isNewId(String id) {
return id.startsWith("NEW_");
}
public static void blockUi(final PopupPanel overlay, int delayMillis) {
if (overlay != null) {
overlay.show();
Timer tim = new Timer() {
@Override
public void run() {
overlay.hide();
}
};
tim.schedule(delayMillis);
}
}
/**
* Performs a click event on the given element
*
* @param elem
*/
public final static native void clickElement(Element elem) /*-{
elem.click();
}-*/;
/**
* Adds the CSS class which highlights the content of the widget as invalid.
*
* @param widget
*/
public static void addErrorStyle(Widget widget) {
widget.addStyleName(ResourceBundle.INSTANCE.css().webuiInputError());
}
/**
* Removes the CSS class which highlights the content of the widget as
* invalid.
*
* @param widget
*/
public static void removeErrorStyle(Widget widget) {
widget.removeStyleName(ResourceBundle.INSTANCE.css().webuiInputError());
}
/**
* @return tab inner height
*/
public static final native int getWindowParentInnerHeight()/*-{
return window.parent.parent.innerHeight;
}-*/;
/**
* @return offsetTop of iframe which serves as container for the webui
*/
public static final native int getContentOffsetTop()/*-{
if (window.parent.parent.document.getElementById("content") != null) {
return window.parent.parent.document.getElementById("content").offsetTop;
} else {
return 0;
}
}-*/;
/**
* @return scrollTop position of body element.
*/
public static final native int getContentScrollTop()/*-{
if (window.parent.parent.document.body != null) {
// Implementation for Chrome. IE and Firefox will always return 0
var result = window.parent.parent.document.body.scrollTop;
if (result == 0){
// Implementation for IE and Firefox. Chrome will always return 0
if (window.parent.parent.document.documentElement != null) {
result = window.parent.parent.document.documentElement.scrollTop;
}
}
return result;
} else {
return 0;
}
}-*/;
/**
* Replacing all properties in {@code dest} by {@code src} properties
*
* @param dest
* The properties of src will be copied in this object.
* @param src
* Object which contains the new properties for the dest object
*/
public final static native <T extends Object> void flush(T dest, T src)/*-{
for ( var i in dest) {
dest[i] = null;
}
for ( var i in src) {
dest[i] = src[i];
}
}-*/;
/**
* Creates a deep copy of the value
*
* @param codec
* JsonEncoderDecoder for the class of the value
* @param value
* The value that shall be copied.
* @return A deep copy of value
*/
public static <T extends Object> T clone(JsonEncoderDecoder<T> codec, T value) {
String clone = codec.encode(value).toString();
clone = clone.replace("\"schemaVersion\":\"1.1\"", "\"schemaVersion\":1.1");
return codec.decode(clone);
}
}
| [
"abrams@peramic.io"
] | abrams@peramic.io |
e5657413c4b1bb5adc6173d92d4d3331698d2ec1 | f7689b3296ce91b6cc79295b31ed64d190973bf6 | /src/chap15/textbook/s150401/Student.java | 710aba9da3f38976ea94f7f67fc5665d041ba4f8 | [] | no_license | Hangeony/java20200929 | e5939ae6174d5a9ed9be4c53343416d53e1366e7 | 9ce8ff8479b9708f79824d6391ae25e6e2fa6d14 | refs/heads/master | 2023-01-03T12:34:56.187354 | 2020-11-03T07:38:37 | 2020-11-03T07:38:37 | 299,485,594 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 442 | java | package chap15.textbook.s150401;
public class Student {
public int sno;
public String name;
public Student(int sno, String name) {
this.sno = sno;
this.name = name;
}
public boolean equals(Object obj) {
if(obj instanceof Student) {
Student student = (Student)obj;
return (sno == student.sno) && (name == student.name);
}
else {
return false;
}
}
public int hashCode() {
return sno + name.hashCode();
}
}
| [
"geonhui95@naver.com"
] | geonhui95@naver.com |
2f6404ba1a54678bc776c9bd8f0e203c8d3881fc | 129f58086770fc74c171e9c1edfd63b4257210f3 | /src/testcases/CWE369_Divide_by_Zero/CWE369_Divide_by_Zero__int_Environment_modulo_51a.java | 921c93b4b3dee506329c2b37ba3971f36d76acc0 | [] | 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 | 3,527 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE369_Divide_by_Zero__int_Environment_modulo_51a.java
Label Definition File: CWE369_Divide_by_Zero__int.label.xml
Template File: sources-sinks-51a.tmpl.java
*/
/*
* @description
* CWE: 369 Divide by zero
* BadSource: Environment Read data from an environment variable
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: modulo
* GoodSink: Check for zero before modulo
* BadSink : Modulo by a value that may be zero
* Flow Variant: 51 Data flow: data passed as an argument from one function to another in different classes in the same package
*
* */
package testcases.CWE369_Divide_by_Zero;
import testcasesupport.*;
import java.sql.*;
import javax.servlet.http.*;
import java.security.SecureRandom;
import java.util.logging.Level;
import java.util.logging.Logger;
public class CWE369_Divide_by_Zero__int_Environment_modulo_51a extends AbstractTestCase
{
public void bad() throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* Initialize data */
/* get environment variable ADD */
/* POTENTIAL FLAW: Read data from an environment variable */
{
String s_data = System.getenv("ADD");
if (s_data != null) // avoid NPD incidental warnings
{
try
{
data = Integer.parseInt(s_data.trim());
}
catch(NumberFormatException nfe)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", nfe);
}
}
}
(new CWE369_Divide_by_Zero__int_Environment_modulo_51b()).bad_sink(data );
}
public void good() throws Throwable
{
goodG2B();
goodB2G();
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
int data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
(new CWE369_Divide_by_Zero__int_Environment_modulo_51b()).goodG2B_sink(data );
}
/* goodB2G() - use badsource and goodsink */
private void goodB2G() throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* Initialize data */
/* get environment variable ADD */
/* POTENTIAL FLAW: Read data from an environment variable */
{
String s_data = System.getenv("ADD");
if (s_data != null) // avoid NPD incidental warnings
{
try
{
data = Integer.parseInt(s_data.trim());
}
catch(NumberFormatException nfe)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", nfe);
}
}
}
(new CWE369_Divide_by_Zero__int_Environment_modulo_51b()).goodB2G_sink(data );
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
| [
"guillermo.pando@gmail.com"
] | guillermo.pando@gmail.com |
699fd0cf767cebc98840c081eec69aa839455b01 | 5b8f0cbd2076b07481bd62f26f5916d09a050127 | /src/HEG6.java | d9f56ef2cad5797be9502eaf9db92141f1326a11 | [] | no_license | micgogi/micgogi_algo | b45664de40ef59962c87fc2a1ee81f86c5d7c7ba | 7cffe8122c04059f241270bf45e033b1b91ba5df | refs/heads/master | 2022-07-13T00:00:56.090834 | 2022-06-15T14:02:51 | 2022-06-15T14:02:51 | 209,986,655 | 7 | 3 | null | 2020-10-20T07:41:03 | 2019-09-21T13:06:43 | Java | UTF-8 | Java | false | false | 3,018 | java | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
/**
* @author Micgogi
* on 4/29/2020 10:27 AM
* Rahul Gogyani
*/
public class HEG6 {
class Edge implements Comparable<Edge>{
int src, dest, weight;
@Override
public int compareTo(Edge o) {
return this.weight-o.weight;
}
}
class Subset{
int parent, rank;
}
int v, e;
Edge edge[];
HEG6(int v, int e){
this.v = v;
this.e = e;
edge = new Edge[e];
for (int i = 0; i <e ; i++) {
edge[i] = new Edge();
}
}
int find(Subset subset[], int i){
if(subset[i].parent!=i){
subset[i].parent = find(subset,subset[i].parent);
}
return subset[i].parent;
}
void union(Subset subset[], int x, int y){
int xparent = find(subset,x);
int yparent = find(subset,y);
if(subset[xparent].rank<subset[yparent].rank){
subset[xparent].parent = yparent;
}else if(subset[xparent].rank>subset[yparent].rank){
subset[yparent].parent = xparent;
}else{
subset[yparent].parent = xparent;
subset[xparent].rank++;
}
}
Edge result[];
void kruskal(){
result = new Edge[v+1];
int e = 0;
int i =0;
for (int j = 0; j <=v ; j++) {
result[j] = new Edge();
}
Arrays.sort(edge);
Subset subset[] = new Subset[v+1];
for (int j = 0; j <=v ; j++) {
subset[j] = new Subset();
}
for (int j = 0; j <=v ; j++) {
subset[j].parent = j;
subset[j].rank = 0;
}
while(e<v-1){
Edge nextEdge = edge[i++];
int x = find(subset, nextEdge.src);
int y = find(subset, nextEdge.dest);
if(x!=y){
result[e++]= nextEdge;
union(subset,x,y);
}
}
for (int j = 0; j <e ; j++) {
System.out.println(result[j].src+"----"+result[j].dest+"---"+result[j].weight);
}
}
public static void main(String[] args) {
try{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s1[] = br.readLine().split(" ");
int v = Integer.parseInt(s1[0]);
int e = Integer.parseInt(s1[1]);
HEG6 graph = new HEG6(v,e);
for (int i = 0; i <e ; i++) {
String s2[] = br.readLine().split(" ");
graph.edge[i].src= Integer.parseInt(s2[0]);
graph.edge[i].dest = Integer.parseInt(s2[1]);
graph.edge[i].weight = Integer.parseInt(s2[2]);
}
graph.kruskal();
int sum =0;
for (int i = 0; i <graph.result.length ; i++) {
sum+=graph.result[i].weight;
}
System.out.println(sum);
}catch (Exception e){
e.printStackTrace();
}
}
}
| [
"rahul.gogyani@gmail.com"
] | rahul.gogyani@gmail.com |
7bee4be6e775593f755148236fa969b0199bd75c | 4dcdab2b7e086fad289efc49904a48af203a5569 | /Java/src/LinkedList/ListNode.java | 684446c5d517e7323e8807b12f362f903024aed8 | [] | no_license | jamie2017/EverydayCoding | 9d70f59dfe298debced978f36b3be4ea178133d7 | 8a5107438411756ae85721b09c192747b3035dc0 | refs/heads/master | 2021-04-26T21:49:27.449050 | 2018-03-08T23:29:53 | 2018-03-08T23:29:53 | 124,162,965 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 150 | java | package LinkedList;
/**
* Created by jianmei on 6/21/16.
*/
public class ListNode {
int val;
ListNode next;
public ListNode(int x) {val = x;}
}
| [
"yjm.code@gmail.com"
] | yjm.code@gmail.com |
53b1fc0f6c72bc75cedae010e7ca2a64ce2dffb8 | 96670d2b28a3fb75d2f8258f31fc23d370af8a03 | /reverse_engineered/sources/com/baidu/mapapi/search/route/C1181n.java | 6e95c0e3d8275ee91c18c93d699ac178bceabaf8 | [] | no_license | P79N6A/speedx | 81a25b63e4f98948e7de2e4254390cab5612dcbd | 800b6158c7494b03f5c477a8cf2234139889578b | refs/heads/master | 2020-05-30T18:43:52.613448 | 2019-06-02T07:57:10 | 2019-06-02T08:15:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 675 | java | package com.baidu.mapapi.search.route;
import android.os.Parcel;
import android.os.Parcelable.Creator;
/* renamed from: com.baidu.mapapi.search.route.n */
final class C1181n implements Creator<SuggestAddrInfo> {
C1181n() {
}
/* renamed from: a */
public SuggestAddrInfo m4442a(Parcel parcel) {
return new SuggestAddrInfo(parcel);
}
/* renamed from: a */
public SuggestAddrInfo[] m4443a(int i) {
return new SuggestAddrInfo[i];
}
public /* synthetic */ Object createFromParcel(Parcel parcel) {
return m4442a(parcel);
}
public /* synthetic */ Object[] newArray(int i) {
return m4443a(i);
}
}
| [
"Gith1974"
] | Gith1974 |
2a51190bd2dc86deb4c719d6851edf66f996b495 | 4645f0902adad06800f349d83790fa8563cf4de0 | /intarsys-tools-runtime/src/main/java/de/intarsys/tools/adapter/IAdapterSupport.java | eca73ed5ba04e165d4130c13387eb7172ea60b58 | [
"BSD-3-Clause"
] | permissive | intarsys/runtime | 51436fd883c1021238572a1967a1ca99177946a7 | 00afced0b6629dbdda4463e4b440ec962225b4ec | refs/heads/master | 2023-09-03T02:50:13.190773 | 2023-07-25T12:52:50 | 2023-08-23T13:41:40 | 11,248,689 | 1 | 4 | null | null | null | null | UTF-8 | Java | false | false | 2,716 | java | /*
* Copyright (c) 2007, intarsys GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of intarsys nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package de.intarsys.tools.adapter;
/**
* An object that is able to be adapted to another type.
* <p>
* This can be interpreted as a "dynamic" cast to a type that is not statically
* declared for the receiver. This pattern allows more freedom in layered /
* component oriented architectures, as the receiver object is not forced to
* implement a certain interface at compile time. Moreover, the "instanceof"
* predicate can be implemented on a per instance base.
* <p>
* A generic implementation of this method could use the {@link IAdapterOutlet}
* singleton to delegate adapter creation to a registered
* {@link IAdapterFactory}.
*
* <pre>
* public <T> T getAdapter(Class<T> clazz) {
* return AdapterOutlet.get().getAdapter(this, clazz);
* }
* </pre>
*/
public interface IAdapterSupport {
/**
* Return an object of type <code>clazz</code> that represents the receiver.
* <p>
* This method should return <code>null</code> if adaption is not possible.
*
* @param <T>
* @param clazz
* @return Return an object of type <code>clazz</code> that represents the
* receiver.
*/
public <T> T getAdapter(Class<T> clazz);
}
| [
"eheck@intarsys.de"
] | eheck@intarsys.de |
4bba037aacdda038df37ed6a0dfb98c0707b3635 | e6d8ca0907ff165feb22064ca9e1fc81adb09b95 | /src/main/java/com/vmware/vim25/ArrayOfOvfFileItem.java | 78737b2c9491fe569054750c38fd9e16fca0bb59 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | incloudmanager/incloud-vijava | 5821ada4226cb472c4e539643793bddeeb408726 | f82ea6b5db9f87b118743d18c84256949755093c | refs/heads/inspur | 2020-04-23T14:33:53.313358 | 2019-07-02T05:59:34 | 2019-07-02T05:59:34 | 171,236,085 | 0 | 1 | BSD-3-Clause | 2019-02-20T02:08:59 | 2019-02-18T07:32:26 | Java | UTF-8 | Java | false | false | 2,078 | java | /*================================================================================
Copyright (c) 2013 Steve Jin. All Rights Reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the names of copyright holders nor the names of its contributors may be used
to endorse or promote products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
================================================================================*/
package com.vmware.vim25;
/**
* @author Steve Jin (http://www.doublecloud.org)
* @version 5.1
*/
public class ArrayOfOvfFileItem {
public OvfFileItem[] OvfFileItem;
public OvfFileItem[] getOvfFileItem() {
return this.OvfFileItem;
}
public OvfFileItem getOvfFileItem(int i) {
return this.OvfFileItem[i];
}
public void setOvfFileItem(OvfFileItem[] OvfFileItem) {
this.OvfFileItem=OvfFileItem;
}
} | [
"sjin2008@3374d856-466b-4dc9-8cc5-e1e8506a9ea1"
] | sjin2008@3374d856-466b-4dc9-8cc5-e1e8506a9ea1 |
e3620465dd653869ff80062e5bbee1614e5ab367 | 4699df8f9a56ec0b09e36d6089761a6d8c8ae147 | /framework/bundles/org.jboss.tools.rsp.server.spi/src/main/java/org/jboss/tools/rsp/server/spi/discovery/IDiscoveryPathModel.java | 60e014043fa71d33d1da2fce5e435107d943165c | [] | no_license | adietish/rsp-server | 7286e042490100b5fad8accc4962b67f44332e96 | 38eb5fb0c445b96ae2468041b12eac6079bddc2c | refs/heads/master | 2020-03-27T08:34:51.490734 | 2018-12-14T12:20:36 | 2018-12-14T12:20:36 | 146,269,085 | 0 | 0 | null | 2019-05-14T15:27:42 | 2018-08-27T08:27:43 | Java | UTF-8 | Java | false | false | 1,235 | java | /*******************************************************************************
* Copyright (c) 2018 Red Hat, Inc. Distributed under license by Red Hat, Inc.
* All rights reserved. This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: Red Hat, Inc.
******************************************************************************/
package org.jboss.tools.rsp.server.spi.discovery;
import java.io.File;
import java.io.IOException;
import java.util.List;
import org.jboss.tools.rsp.api.dao.DiscoveryPath;
public interface IDiscoveryPathModel {
public void addListener(IDiscoveryPathListener l);
public void removeListener(IDiscoveryPathListener l);
public List<DiscoveryPath> getPaths();
/**
* Return whether the path was added.
* @param path
* @return
*/
public boolean addPath(DiscoveryPath path);
/**
* Return whether the path was removed
* @param path
* @return
*/
public boolean removePath(DiscoveryPath path);
public void loadDiscoveryPaths(File data) throws IOException;
public void saveDiscoveryPaths(File data) throws IOException;
}
| [
"rob@oxbeef.net"
] | rob@oxbeef.net |
86460b6645565425267db103aa2307651e07d7cf | d3a9f222a0c0737ebb700fac8759484b1b56099a | /bridge-impl/src/main/java/com/liferay/faces/bridge/internal/BridgeURIWrapper.java | 971f4159f86024a50b6e13c27a19f05164fa7b49 | [
"Apache-2.0"
] | permissive | ngriffin7a/liferay-faces-bridge-impl | d2c9a7236ff6c09187cf1c4b27d0e11475812f49 | 0d3bae144a3b19433403e10948eb51b86b6462d8 | refs/heads/master | 2020-12-31T05:40:56.524690 | 2016-12-22T21:27:24 | 2016-12-22T21:27:24 | 54,403,784 | 0 | 1 | null | 2016-03-21T16:09:05 | 2016-03-21T16:09:05 | null | UTF-8 | Java | false | false | 2,458 | java | /**
* Copyright (c) 2000-2016 Liferay, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.liferay.faces.bridge.internal;
import java.util.Map;
import javax.faces.FacesWrapper;
import javax.portlet.faces.Bridge;
/**
* @author Neil Griffin
*/
public abstract class BridgeURIWrapper implements BridgeURI, FacesWrapper<BridgeURI> {
@Override
public abstract BridgeURI getWrapped();
@Override
public String getContextRelativePath(String contextPath) {
return getWrapped().getContextRelativePath(contextPath);
}
@Override
public String getParameter(String name) {
return getWrapped().getParameter(name);
}
@Override
public Map<String, String[]> getParameterMap() {
return getWrapped().getParameterMap();
}
@Override
public String getPath() {
return getWrapped().getPath();
}
@Override
public Bridge.PortletPhase getPortletPhase() {
return getWrapped().getPortletPhase();
}
@Override
public String getQuery() {
return getWrapped().getQuery();
}
@Override
public boolean isAbsolute() {
return getWrapped().isAbsolute();
}
@Override
public boolean isEscaped() {
return getWrapped().isEscaped();
}
@Override
public boolean isExternal(String contextPath) {
return getWrapped().isExternal(contextPath);
}
@Override
public boolean isHierarchical() {
return getWrapped().isHierarchical();
}
@Override
public boolean isOpaque() {
return getWrapped().isOpaque();
}
@Override
public boolean isPathRelative() {
return getWrapped().isPathRelative();
}
@Override
public boolean isPortletScheme() {
return getWrapped().isPortletScheme();
}
@Override
public boolean isRelative() {
return getWrapped().isRelative();
}
@Override
public String removeParameter(String name) {
return getWrapped().removeParameter(name);
}
@Override
public void setParameter(String name, String value) {
getWrapped().setParameter(name, value);
}
}
| [
"neil.griffin.scm@gmail.com"
] | neil.griffin.scm@gmail.com |
092abaf666738e5d1659f446acd96d5ce2e5a100 | c94f888541c0c430331110818ed7f3d6b27b788a | /mq/java/src/main/java/com/antgroup/antchain/openapi/mq/models/UpdateTopicResponse.java | defc5cfbe81a78c2e0080efdbd3e4db67ddd45c6 | [
"MIT",
"Apache-2.0"
] | permissive | alipay/antchain-openapi-prod-sdk | 48534eb78878bd708a0c05f2fe280ba9c41d09ad | 5269b1f55f1fc19cf0584dc3ceea821d3f8f8632 | refs/heads/master | 2023-09-03T07:12:04.166131 | 2023-09-01T08:56:15 | 2023-09-01T08:56:15 | 275,521,177 | 9 | 10 | MIT | 2021-03-25T02:35:20 | 2020-06-28T06:22:14 | PHP | UTF-8 | Java | false | false | 1,804 | java | // This file is auto-generated, don't edit it. Thanks.
package com.antgroup.antchain.openapi.mq.models;
import com.aliyun.tea.*;
public class UpdateTopicResponse extends TeaModel {
// 请求唯一ID,用于链路跟踪和问题排查
@NameInMap("req_msg_id")
public String reqMsgId;
// 结果码,一般OK表示调用成功
@NameInMap("result_code")
public String resultCode;
// 异常信息的文本描述
@NameInMap("result_msg")
public String resultMsg;
// id
@NameInMap("id")
public String id;
// instance id
@NameInMap("instance_id")
public String instanceId;
public static UpdateTopicResponse build(java.util.Map<String, ?> map) throws Exception {
UpdateTopicResponse self = new UpdateTopicResponse();
return TeaModel.build(map, self);
}
public UpdateTopicResponse setReqMsgId(String reqMsgId) {
this.reqMsgId = reqMsgId;
return this;
}
public String getReqMsgId() {
return this.reqMsgId;
}
public UpdateTopicResponse setResultCode(String resultCode) {
this.resultCode = resultCode;
return this;
}
public String getResultCode() {
return this.resultCode;
}
public UpdateTopicResponse setResultMsg(String resultMsg) {
this.resultMsg = resultMsg;
return this;
}
public String getResultMsg() {
return this.resultMsg;
}
public UpdateTopicResponse setId(String id) {
this.id = id;
return this;
}
public String getId() {
return this.id;
}
public UpdateTopicResponse setInstanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
public String getInstanceId() {
return this.instanceId;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
35899c0390c9464b050c3681bce66a61fd1fad13 | 61775d5ab720aaba9280f8bd3cc327498c10d96e | /src/com.mentor.nucleus.bp.ui.graphics/src/com/mentor/nucleus/bp/ui/graphics/commands/ConnectorBendpointCreateCommand.java | d98aa69ba86bf29d26772ffc146d648aee23d2f5 | [
"Apache-2.0"
] | permissive | NDGuthrie/bposs | bf1cbec3d0bd5373edecfbe87906417b5e14d9f1 | 2c47abf74a3e6fadb174b08e57aa66a209400606 | refs/heads/master | 2016-09-05T17:26:54.796391 | 2014-11-17T15:24:00 | 2014-11-17T15:24:00 | 28,010,057 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,546 | java | //========================================================================
//
//File: $RCSfile: ConnectorBendpointCreateCommand.java,v $
//Version: $Revision: 1.7 $
//Modified: $Date: 2013/01/10 23:05:45 $
//
//(c) Copyright 2005-2014 by Mentor Graphics Corp. All rights reserved.
//
//========================================================================
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy
// of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
//========================================================================
//
package com.mentor.nucleus.bp.ui.graphics.commands;
import org.eclipse.gef.ConnectionEditPart;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.requests.BendpointRequest;
import com.mentor.nucleus.bp.ui.canvas.Connector_c;
import com.mentor.nucleus.bp.ui.graphics.parts.ConnectorEditPart;
import com.mentor.nucleus.bp.ui.graphics.parts.DiagramEditPart;
public class ConnectorBendpointCreateCommand extends Command implements
IValidateDeltaCommand {
private BendpointRequest fRequest;
public ConnectorBendpointCreateCommand(BendpointRequest request) {
fRequest = request;
}
public void execute() {
ConnectionEditPart source = fRequest.getSource();
Connector_c connector = (Connector_c) source.getModel();
source.getFigure().translateToRelative(fRequest.getLocation());
connector.Createbendpoint(fRequest.getIndex(),
fRequest.getLocation().x, fRequest.getLocation().y);
// this call will handle persisting any changes
// made to the connetion, plus child text and
// attached connectors;
((ConnectorEditPart) source).transferLocation();
DiagramEditPart diagramPart = (DiagramEditPart) fRequest.getSource()
.getViewer().getContents();
diagramPart.resizeContainer();
}
@Override
public void redo() {
}
@Override
public void undo() {
}
@Override
public boolean shouldExecute() {
// the bendpoint at this time will always
// be created, thus there will always be
// a delta
return true;
}
}
| [
"keith_brown@mentor.com"
] | keith_brown@mentor.com |
fee8effb41af8e1e72c64297e80006d7d113ca46 | db351f57c47389712aedfa30a7f27843eaceb874 | /src/main/java/io/protostuff/jetbrains/plugin/psi/ProtoPsiFileRoot.java | caac3ecef692f53b4f14f736d5a11d8e82224d6c | [
"Apache-2.0"
] | permissive | rpirsc13/protobuf-jetbrains-plugin | 7e1f20ea88cc67d37fdab71d53f21b9c2dca59f4 | 6db6dd25644d28884dfba6b828d99c1363ce79e2 | refs/heads/master | 2021-01-21T16:22:03.045053 | 2016-09-05T21:47:14 | 2016-09-05T21:47:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,565 | java | package io.protostuff.jetbrains.plugin.psi;
import com.intellij.extapi.psi.PsiFileBase;
import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.FileViewProvider;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiNamedElement;
import io.protostuff.jetbrains.plugin.Icons;
import io.protostuff.jetbrains.plugin.ProtoFileType;
import io.protostuff.jetbrains.plugin.ProtoLanguage;
import org.antlr.jetbrains.adapter.psi.ScopeNode;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
/**
* @author Kostiantyn Shchepanovskyi
*/
public class ProtoPsiFileRoot extends PsiFileBase implements ScopeNode {
public ProtoPsiFileRoot(@NotNull FileViewProvider viewProvider) {
super(viewProvider, ProtoLanguage.INSTANCE);
}
@NotNull
@Override
public FileType getFileType() {
return ProtoFileType.INSTANCE;
}
@Override
public String toString() {
final VirtualFile virtualFile = getVirtualFile();
return "ProtobufFile: " + (virtualFile != null ? virtualFile.getName() : "<unknown>");
}
@Override
public Icon getIcon(int flags) {
return Icons.PROTO;
}
/**
* Return null since a file scope has no enclosing scope. It is
* not itself in a scope.
*/
@Override
public ScopeNode getContext() {
return null;
}
@Nullable
@Override
public PsiElement resolve(PsiNamedElement element) {
return null;
}
}
| [
"schepanovsky@gmail.com"
] | schepanovsky@gmail.com |
829c24d7d3020e52fe6ec6c9b49021bebce3bc80 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/26/26_8b8126b5c7d2f30e3f1ee7872cb807fed649591e/GetFrontendDirectoryStep/26_8b8126b5c7d2f30e3f1ee7872cb807fed649591e_GetFrontendDirectoryStep_s.java | 856107d7afbd00b5f33a891c1189856488c6de83 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 4,227 | java | package cz.cuni.mff.odcleanstore.installer;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.io.File;
import java.io.IOException;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import cz.cuni.mff.odcleanstore.installer.ui.InstallationWizardFrame;
import cz.cuni.mff.odcleanstore.installer.ui.InstallationWizardStep;
import cz.cuni.mff.odcleanstore.installer.utils.AwtUtils;
import cz.cuni.mff.odcleanstore.installer.utils.FileUtils;
import cz.cuni.mff.odcleanstore.installer.utils.FileUtils.DirectoryException;
/**
* A step for getting odcleanstore front end destination directory from user.
*
* @author Petr Jerman
*/
public class GetFrontendDirectoryStep extends InstallationWizardStep {
private JPanel panel;
private JLabel jlbDirectory;
private JTextField jtfDirectory;
private JButton jbDirectory;
/**
* Create instance for getting odcleanstore front end destination directory from user.
*
* @param wizardFrame parent wizard frame
*/
protected GetFrontendDirectoryStep(InstallationWizardFrame wizardFrame) {
super(wizardFrame);
}
/**
* @see cz.cuni.mff.odcleanstore.installer.ui.InstallationWizardStep#getStepTitle()
*/
@Override
public String getStepTitle() {
return "setting the front end directory";
}
/**
* @see cz.cuni.mff.odcleanstore.installer.ui.InstallationWizardStep#getFormPanel()
*/
@Override
public JPanel getFormPanel() {
panel = new JPanel();
panel.setLayout(new FlowLayout(FlowLayout.LEFT));
jlbDirectory = new JLabel("Front end directory:");
panel.add(jlbDirectory);
jtfDirectory = new JTextField(53);
panel.add(jtfDirectory);
jbDirectory = AwtUtils.createImageButton("/folder.png");
jbDirectory.setToolTipText("Choose front end directory");
panel.add(jbDirectory);
jbDirectory.addActionListener(getWizardFrame().getActionListener());
return panel;
}
/**
* Validate odcleanstore front end destination directory from user.
*
* @see cz.cuni.mff.odcleanstore.installer.ui.InstallationWizardStep#onNext()
*/
@Override
public boolean onNext() {
String dirName = jtfDirectory.getText();
if (dirName.isEmpty()) {
getWizardFrame().showWarningDialog("Front end directory is empty - enter it", "Error");
return false;
}
File file = new File(dirName);
if (!file.exists()) {
String message = String.format("Create directory %s?", file.getAbsolutePath());
if (getWizardFrame().showConfirmDialog(message, "Creating not existing front end directory")) {
try {
FileUtils.satisfyDirectory(dirName);
if (!file.exists()) {
String messageError = String.format("Error creating %s directory.", file.getAbsolutePath());
getWizardFrame().showWarningDialog(messageError, "Creating not existing front end directory");
return false;
}
} catch (DirectoryException e) {
String messageError = String.format("Error creating %s directory.", file.getAbsolutePath());
getWizardFrame().showWarningDialog(messageError, "Creating not existing front end directory");
return false;
}
} else {
return false;
}
}
if (file.list().length > 0) {
if (!getWizardFrame().showConfirmDialog("Directory is not empty,\n do you want to continue?", "warning")) {
return false;
}
}
return true;
}
/**
* @see cz.cuni.mff.odcleanstore.installer.ui.InstallationWizardStep#onFormEvent(java.awt.event.ActionEvent)
*/
@Override
public void onFormEvent(ActionEvent arg) {
if (arg.getSource() == jbDirectory) {
JFileChooser fc = new JFileChooser();
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
if (fc.showOpenDialog(panel) == JFileChooser.APPROVE_OPTION) {
try {
String path = fc.getSelectedFile().getCanonicalPath();
jtfDirectory.setText(path);
} catch (IOException e) {
jtfDirectory.setText("");
}
}
}
}
/**
* @return front end destination directory
*/
public File getFrontendDirectory() {
return new File(jtfDirectory.getText());
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
f53f0cf65efcba5383058c643755390075c81dea | 8a787e93fea9c334122441717f15bd2f772e3843 | /odfdom/src/main/java/org/odftoolkit/odfdom/dom/attribute/style/StyleScriptTypeAttribute.java | 6835cc922645784e0d88e8897e53e568a2b4560a | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"W3C",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | apache/odftoolkit | 296ea9335bfdd78aa94829c915a6e9c24e5b5166 | 99975f3be40fc1c428167a3db7a9a63038acfa9f | refs/heads/trunk | 2023-07-02T16:30:24.946067 | 2018-10-02T11:11:40 | 2018-10-02T11:11:40 | 5,212,656 | 39 | 45 | Apache-2.0 | 2018-04-11T11:57:17 | 2012-07-28T07:00:12 | Java | UTF-8 | Java | false | false | 3,788 | java | /************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
*
* Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
*
* Use is subject to license terms.
*
* 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. You can also
* obtain a copy of the License at http://odftoolkit.org/docs/license.txt
*
* 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.
*
************************************************************************/
/*
* This file is automatically generated.
* Don't edit manually.
*/
package org.odftoolkit.odfdom.dom.attribute.style;
import org.odftoolkit.odfdom.dom.OdfDocumentNamespace;
import org.odftoolkit.odfdom.pkg.OdfAttribute;
import org.odftoolkit.odfdom.pkg.OdfFileDom;
import org.odftoolkit.odfdom.pkg.OdfName;
/**
* DOM implementation of OpenDocument attribute {@odf.attribute style:script-type}.
*
*/
public class StyleScriptTypeAttribute extends OdfAttribute {
public static final OdfName ATTRIBUTE_NAME = OdfName.newName(OdfDocumentNamespace.STYLE, "script-type");
/**
* Create the instance of OpenDocument attribute {@odf.attribute style:script-type}.
*
* @param ownerDocument The type is <code>OdfFileDom</code>
*/
public StyleScriptTypeAttribute(OdfFileDom ownerDocument) {
super(ownerDocument, ATTRIBUTE_NAME);
}
/**
* Returns the attribute name.
*
* @return the <code>OdfName</code> for {@odf.attribute style:script-type}.
*/
@Override
public OdfName getOdfName() {
return ATTRIBUTE_NAME;
}
/**
* @return Returns the name of this attribute.
*/
@Override
public String getName() {
return ATTRIBUTE_NAME.getLocalName();
}
/**
* The value set of {@odf.attribute style:script-type}.
*/
public enum Value {
ASIAN("asian"), COMPLEX("complex"), IGNORE("ignore"), LATIN("latin") ;
private String mValue;
Value(String value) {
mValue = value;
}
@Override
public String toString() {
return mValue;
}
public static Value enumValueOf(String value) {
for(Value aIter : values()) {
if (value.equals(aIter.toString())) {
return aIter;
}
}
return null;
}
}
/**
* @param attrValue The <code>Enum</code> value of the attribute.
*/
public void setEnumValue(Value attrValue) {
setValue(attrValue.toString());
}
/**
* @return Returns the <code>Enum</code> value of the attribute
*/
public Value getEnumValue() {
return Value.enumValueOf(this.getValue());
}
/**
* Returns the default value of {@odf.attribute style:script-type}.
*
* @return the default value as <code>String</code> dependent of its element name
* return <code>null</code> if the default value does not exist
*/
@Override
public String getDefault() {
return null;
}
/**
* Default value indicator. As the attribute default value is dependent from its element, the attribute has only a default, when a parent element exists.
*
* @return <code>true</code> if {@odf.attribute style:script-type} has an element parent
* otherwise return <code>false</code> as undefined.
*/
@Override
public boolean hasDefault() {
return false;
}
/**
* @return Returns whether this attribute is known to be of type ID (i.e. xml:id ?)
*/
@Override
public boolean isId() {
return false;
}
}
| [
"dev-null@apache.org"
] | dev-null@apache.org |
a905f2592b3955d9f1abd73d109f2d4e7c3a57cc | ab6c0bc74dff2b522618ae4192b63ca879f3d07a | /utp-trade-ht/utp-sdk/utp-sdk-precard/src/test/java/cn/kingnet/utp/sdk/precard/test/QueryAccountEntryTest.java | 767261721989c14d290a44d50e11af98c6d94202 | [] | no_license | exyangbang/learngit | 9669cb329c9686db96bd250a6ceceaf44f02e945 | 12c92df41a6b778a9db132c37dd136bedfd5b56f | refs/heads/master | 2023-02-16T20:49:57.437363 | 2021-01-16T07:45:17 | 2021-01-16T07:45:17 | 330,107,905 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,714 | java | package cn.kingnet.utp.sdk.precard.test;
import cn.kingnet.utp.sdk.core.enums.AuthType;
import cn.kingnet.utp.sdk.core.utils.DataUtil;
import cn.kingnet.utp.sdk.core.utils.StringUtil;
import cn.kingnet.utp.sdk.precard.PreCardClient;
import cn.kingnet.utp.sdk.precard.UtpPreCardTestCase;
import cn.kingnet.utp.sdk.precard.dto.QueryAccountEntryReqDTO;
import cn.kingnet.utp.sdk.precard.dto.QueryAccountEntryRespDTO;
import com.alibaba.fastjson.JSON;
import org.junit.Test;
import java.io.UnsupportedEncodingException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
/**
* @Description : 预付费卡入账结果查询
* @Author : linkaigui@scenetec.com
* @Create : 2018/12/18 15:09
*/
public class QueryAccountEntryTest extends UtpPreCardTestCase {
/**
* 预付费卡入账结果查询
*
* @throws Exception
*/
@Test
public void testMain(){
try {
final CountDownLatch latch = new CountDownLatch(1);
PreCardClient client = new PreCardClient(createAuthorization(AuthType.HTSIGN), host);
PreCardClient.Builder<QueryAccountEntryRespDTO> builder = client.newQueryAccountEntryBuilder();
QueryAccountEntryReqDTO reqDTO = new QueryAccountEntryReqDTO();
reqDTO.setClientTradeId(String.valueOf(System.currentTimeMillis()));
reqDTO.setBatchNo("185421");
reqDTO.setEntryDate("20181219");
builder.setReqData(reqDTO);
long start = System.currentTimeMillis();
builder.execute().whenComplete((respDTO, throwable) -> {
System.out.println("总共耗时:"+ (System.currentTimeMillis() - start));
if (throwable != null) {
throwable.printStackTrace();
}
if (respDTO != null) {
System.out.println(JSON.toJSONString(respDTO));
if("true".equalsIgnoreCase(respDTO.getSuccess()) && !StringUtil.isEmpty(respDTO.getContent())){
byte[] fAy = DataUtil.inflaterAndDecode64(respDTO.getContent());
DataUtil.byte2File(fAy,"D:\\file",String.format("%s_%s.txt",respDTO.getEntryDate(),respDTO.getBatchNo()));
try {
System.out.println(new String(fAy,"utf-8"));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
}
latch.countDown();
});
latch.await(30, TimeUnit.SECONDS);
} catch (Exception e) {
e.printStackTrace();
}
}
}
| [
"945288603@qq.com"
] | 945288603@qq.com |
b29d0cc61259d2ec77401daa0e3bba60bda67668 | 3c6728230582df15cde51e06e3fd67b69ab76b5e | /BackEnd/src/main/java/edu/agh/fis/core/user/services/UserServiceImpl.java | ade24a3620fa9adfb1493ac2eaf8e4958f8665ee | [] | no_license | wemstar/PracaInzynierska | c91285c5029d09031bb60c82701c785096767ccb | 96924a73da919e5b3839e6b25903066ffeb910af | refs/heads/master | 2021-01-23T12:06:09.831825 | 2015-01-21T23:48:49 | 2015-01-21T23:48:50 | 23,556,187 | 0 | 0 | null | 2014-09-06T01:02:17 | 2014-09-01T21:24:45 | Java | UTF-8 | Java | false | false | 1,212 | java | package edu.agh.fis.core.user.services;
import edu.agh.fis.core.user.presistance.UserDAO;
import edu.agh.fis.entity.user.UserEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
* Created by wemstar on 10.01.15.
*/
@Service
public class UserServiceImpl implements UserService {
@Autowired
private UserDAO dao;
@Override
public boolean validateUser(String login, String password) {
UserEntity entity = dao.locate(login);
StringBuffer sb = new StringBuffer();
try {
MessageDigest md = MessageDigest.getInstance("SHA-1");
;
md.update(password.getBytes());
byte byteData[] = md.digest();
if (entity == null) return false;
for (int i = 0; i < byteData.length; i++) {
sb.append(Integer.toString((byteData[i] & 0xff) + 0x100, 16).substring(1));
}
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException(e);
}
return sb.toString().equals(entity.getPassword());
}
}
| [
"sylwestermacura@gmail.com"
] | sylwestermacura@gmail.com |
55ae49c6d7cbbfc00b139d9c6754d49b81ab7e1e | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/1/1_40b248bbe84c29aff40a05e96a3667df41b68aaf/Footer/1_40b248bbe84c29aff40a05e96a3667df41b68aaf_Footer_s.java | cc06cd8deeb4b315372d244d0316c57a654c663b | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 3,052 | java | /*
* JBoss, Home of Professional Open Source
* Copyright 2011 Red Hat Inc. and/or its affiliates and other contributors
* as indicated by the @author tags. All rights reserved.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License, v. 2.1.
* This program is distributed in the hope that it will be useful, but WITHOUT A
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License,
* v.2.1 along with this distribution; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package org.jboss.as.console.client.core;
import com.google.gwt.dom.client.Style;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.LayoutPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;
import com.gwtplatform.mvp.client.proxy.PlaceRequest;
import org.jboss.as.console.client.Console;
import org.jboss.as.console.client.auth.CurrentUser;
/**
* @author Heiko Braun
* @date 1/28/11
*/
public class Footer {
private Label userName;
@Inject
public Footer(EventBus bus, CurrentUser user) {
this.userName = new Label();
this.userName.setText(user.getUserName());
}
public Widget asWidget() {
LayoutPanel layout = new LayoutPanel();
layout.setStyleName("footer-panel");
HTML settings = new HTML(Console.CONSTANTS.common_label_settings());
settings.setStyleName("html-link");
settings.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Console.MODULES.getPlaceManager().revealPlace(
new PlaceRequest(NameTokens.SettingsPresenter)
);
}
});
layout.add(settings);
HTML version = new HTML(org.jboss.as.console.client.Build.VERSION);
version.getElement().setAttribute("style", "color:#ffffff;font-size:10px; align:left");
layout.add(version);
layout.setWidgetLeftWidth(version, 20, Style.Unit.PX, 200, Style.Unit.PX);
layout.setWidgetTopHeight(version, 3, Style.Unit.PX, 16, Style.Unit.PX);
layout.setWidgetRightWidth(settings, 5, Style.Unit.PX, 100, Style.Unit.PX);
layout.setWidgetTopHeight(settings, 2, Style.Unit.PX, 28, Style.Unit.PX);
return layout;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
8567c1a6c547528f5643aa0ee0b095faaec0706e | 8810972d0375c0a853e3a66bd015993932be9fad | /modelicaml/kepler/org.openmodelica.modelicaml.tabbedproperties.editors.glue/src/org/openmodelica/modelicaml/tabbedproperties/editors/glue/edit/part/PropertiesSectionXtextEditorKeyListener.java | 0a2a501f4e40319827f13ada656ebb77039589f6 | [] | no_license | OpenModelica/MDT | 275ffe4c61162a5292d614cd65eb6c88dc58b9d3 | 9ffbe27b99e729114ea9a4b4dac4816375c23794 | refs/heads/master | 2020-09-14T03:35:05.384414 | 2019-11-27T22:35:04 | 2019-11-27T23:08:29 | 222,999,464 | 3 | 2 | null | 2019-11-27T23:08:31 | 2019-11-20T18:15:27 | Java | WINDOWS-1252 | Java | false | false | 4,541 | java | /*
* This file is part of OpenModelica.
*
* Copyright (c) 1998-CurrentYear, Open Source Modelica Consortium (OSMC),
* c/o Linköpings universitet, Department of Computer and Information Science,
* SE-58183 Linköping, Sweden.
*
* All rights reserved.
*
* THIS PROGRAM IS PROVIDED UNDER THE TERMS OF GPL VERSION 3 LICENSE OR
* THIS OSMC PUBLIC LICENSE (OSMC-PL) VERSION 1.2.
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
* OF THE OSMC PUBLIC LICENSE OR THE GPL VERSION 3, ACCORDING TO RECIPIENTS CHOICE.
*
* The OpenModelica software and the Open Source Modelica
* Consortium (OSMC) Public License (OSMC-PL) are obtained
* from OSMC, either from the above address,
* from the URLs: http://www.ida.liu.se/projects/OpenModelica or
* http://www.openmodelica.org, and in the OpenModelica distribution.
* GNU version 3 is obtained from: http://www.gnu.org/copyleft/gpl.html.
*
* This program is distributed WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE, EXCEPT AS EXPRESSLY SET FORTH
* IN THE BY RECIPIENT SELECTED SUBSIDIARY LICENSE CONDITIONS OF OSMC-PL.
*
* See the full OSMC Public License conditions for more details.
*
* Main author: Wladimir Schamai, EADS Innovation Works / Linköping University, 2009-2013
*
* Contributors:
* Uwe Pohlmann, University of Paderborn 2009-2010, contribution to the Modelica code generation for state machine behavior, contribution to Papyrus GUI adaptations
*/
package org.openmodelica.modelicaml.tabbedproperties.editors.glue.edit.part;
import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.jface.text.contentassist.IContentAssistant;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.VerifyKeyListener;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.VerifyEvent;
// TODO: Auto-generated Javadoc
/**
* The listener interface for receiving propertiesSectionXtextEditorKey events.
* The class that is interested in processing a propertiesSectionXtextEditorKey
* event implements this interface, and the object created
* with that class is registered with a component using the
* component's <code>addPropertiesSectionXtextEditorKeyListener<code> method. When
* the propertiesSectionXtextEditorKey event occurs, that object's appropriate
* method is invoked.
*
* @author koehnlein
*/
public class PropertiesSectionXtextEditorKeyListener extends KeyAdapter implements VerifyKeyListener {
/** The popup xtext editor helper. */
private final PropertiesSectionXtextEditorHelper popupXtextEditorHelper;
/** The content assistant. */
private ContentAssistant contentAssistant;
/** The is ignore next esc. */
private boolean isIgnoreNextESC;
/**
* This element comes from the XText/GMF integration example, and was not originally documented.
*
* @param popupXtextEditorHelper the popup xtext editor helper
* @param contentAssistant the content assistant
*/
public PropertiesSectionXtextEditorKeyListener(PropertiesSectionXtextEditorHelper popupXtextEditorHelper, IContentAssistant contentAssistant) {
this.popupXtextEditorHelper = popupXtextEditorHelper;
this.contentAssistant = contentAssistant instanceof ContentAssistant ? (ContentAssistant) contentAssistant
: null;
isIgnoreNextESC = false;
}
/**
* Key pressed.
*
* @param e the e
*/
@Override
public void keyPressed(KeyEvent e) {
int keyCode = e.keyCode;
if ((e.stateMask & SWT.CTRL) != 0 && ((keyCode == SWT.KEYPAD_CR) || (keyCode == SWT.CR))) {
// this.popupXtextEditorHelper.closeEditor(false);
}
if (keyCode == SWT.ESC) {
if (isIgnoreNextESC) {
isIgnoreNextESC = false;
} else {
// this.popupXtextEditorHelper.closeEditor(false);
}
}
if ((e.stateMask & SWT.CTRL) != 0 && (keyCode == ' ')) {
this.contentAssistant.showPossibleCompletions() ;
this.isIgnoreNextESC = true ;
}
}
/**
* Verify key.
*
* @param e the e
*/
public void verifyKey(VerifyEvent e) {
if (e.keyCode == SWT.ESC && isContentAssistActive()) {
isIgnoreNextESC = true;
}
if ((e.stateMask & SWT.CTRL) != 0 && ((e.keyCode == SWT.KEYPAD_CR) || (e.keyCode == SWT.CR))) {
e.doit = false;
}
}
/**
* Checks if is content assist active.
*
* @return true, if is content assist active
*/
private boolean isContentAssistActive() {
return contentAssistant != null && contentAssistant.hasProposalPopupFocus();
}
} | [
"wschamai"
] | wschamai |
b52dfd98bc4a64d76543b7ac33b951ecf76324a1 | 43ea91f3ca050380e4c163129e92b771d7bf144a | /services/devstar/src/main/java/com/huaweicloud/sdk/devstar/v1/model/RunDevstarTemplateJobRequest.java | cf8aa02186285c244de27ca8078ed6a132aeb99f | [
"Apache-2.0"
] | permissive | wxgsdwl/huaweicloud-sdk-java-v3 | 660602ca08f32dc897d3770995b496a82a1cc72d | ee001d706568fdc7b852792d2e9aefeb9d13fb1e | refs/heads/master | 2023-02-27T14:20:54.774327 | 2021-02-07T11:48:35 | 2021-02-07T11:48:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,325 | java | package com.huaweicloud.sdk.devstar.v1.model;
import java.util.Collections;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.huaweicloud.sdk.devstar.v1.model.TemplateJobInfo;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Consumer;
import java.util.Objects;
/**
* Request Object
*/
public class RunDevstarTemplateJobRequest {
/**
* Gets or Sets xLanguage
*/
public static final class XLanguageEnum {
/**
* Enum ZH_CN for value: "zh-cn"
*/
public static final XLanguageEnum ZH_CN = new XLanguageEnum("zh-cn");
/**
* Enum EN_US for value: "en-us"
*/
public static final XLanguageEnum EN_US = new XLanguageEnum("en-us");
private static final Map<String, XLanguageEnum> STATIC_FIELDS = createStaticFields();
private static Map<String, XLanguageEnum> createStaticFields() {
Map<String, XLanguageEnum> map = new HashMap<>();
map.put("zh-cn", ZH_CN);
map.put("en-us", EN_US);
return Collections.unmodifiableMap(map);
}
private String value;
XLanguageEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return String.valueOf(value);
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static XLanguageEnum fromValue(String value) {
if( value == null ){
return null;
}
XLanguageEnum result = STATIC_FIELDS.get(value);
if (result == null) {
result = new XLanguageEnum(value);
}
return result;
}
public static XLanguageEnum valueOf(String value) {
if( value == null ){
return null;
}
XLanguageEnum result = STATIC_FIELDS.get(value);
if (result != null) {
return result;
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
@Override
public boolean equals(Object obj) {
if (obj != null && obj instanceof XLanguageEnum) {
return this.value.equals(((XLanguageEnum) obj).value);
}
return false;
}
@Override
public int hashCode() {
return this.value.hashCode();
}
}
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="X-Language")
private XLanguageEnum xLanguage = XLanguageEnum.ZH_CN;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="body")
private TemplateJobInfo body = null;
public RunDevstarTemplateJobRequest withXLanguage(XLanguageEnum xLanguage) {
this.xLanguage = xLanguage;
return this;
}
/**
* Get xLanguage
* @return xLanguage
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="X-Language")
public XLanguageEnum getXLanguage() {
return xLanguage;
}
public void setXLanguage(XLanguageEnum xLanguage) {
this.xLanguage = xLanguage;
}
public RunDevstarTemplateJobRequest withBody(TemplateJobInfo body) {
this.body = body;
return this;
}
public RunDevstarTemplateJobRequest withBody(Consumer<TemplateJobInfo> bodySetter) {
if(this.body == null ){
this.body = new TemplateJobInfo();
bodySetter.accept(this.body);
}
return this;
}
/**
* Get body
* @return body
*/
public TemplateJobInfo getBody() {
return body;
}
public void setBody(TemplateJobInfo body) {
this.body = body;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
RunDevstarTemplateJobRequest runDevstarTemplateJobRequest = (RunDevstarTemplateJobRequest) o;
return Objects.equals(this.xLanguage, runDevstarTemplateJobRequest.xLanguage) &&
Objects.equals(this.body, runDevstarTemplateJobRequest.body);
}
@Override
public int hashCode() {
return Objects.hash(xLanguage, body);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class RunDevstarTemplateJobRequest {\n");
sb.append(" xLanguage: ").append(toIndentedString(xLanguage)).append("\n");
sb.append(" body: ").append(toIndentedString(body)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
dafde535a5ce2087374e9325963ad66aa6c0644e | 5f060f957678704037fa343b7c2bb2b23697bc56 | /src/Project2_Mayis1/Special2DArray_DONE.java | 4ce014a857bef02a4efebb627da1c45f517c9f04 | [] | no_license | kemalyayil/Batch4SaturdayProjects | ab7dd0d6819edfb3181169192abe89dab9fd9fef | 90aeeb34690c3482c7697afdee6b4edcaf1684bc | refs/heads/master | 2023-06-17T02:17:58.545106 | 2021-07-10T15:53:59 | 2021-07-10T15:53:59 | 384,720,972 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,715 | java | package Project2_Mayis1;
import java.util.Arrays;
public class Special2DArray_DONE {
/*
Create a 2D int array
The 2D array has 5 element arrays
Each element array length is equal its index in the 2D array
Each element array contains int values of its index number
Print the 2D array
So, the output must be: [[], [1], [2, 2], [3, 3, 3], [4, 4, 4, 4]]
DO NOT HARDCODE! USE LOOPS!
Note: There is no test case provided for this assignment in the Tests class. You can test it by yourself.
*/
public static void main(String[] args) {
int[][] myArray = new int[5][];
for (int i = 0;i < myArray.length; i++){
myArray[i] = new int[i]; // bu en onemli yeri.
for(int j = 0; j < i ; j++){
myArray[i][j] = i;
//
}
}
System.out.println(Arrays.deepToString(myArray));
}
}// cozum icin 8 mayis mentoring video ya bak. hocaninin kodu
//System.out.println("Enter the length of the array: ");
// Scanner scanner = new Scanner(System.in);
// int len = scanner.nextInt();
//
// int[][] int2dArray = new int[len][]; // The 2D array has 5 element arrays
//
// for (int i = 0; i < int2dArray.length; i++) {
// int2dArray[i] = new int[i]; // Each element array length is equal its index in the 2D array
// for (int j = 0; j < i; j++) {
// int2dArray[i][j] = i; // Each element array contains int values of its index number
// // Arrays.fill(int2dArray[i], i); Optional code
// }
// }
// System.out.println(Arrays.deepToString(int2dArray)); // Print the 2D array
| [
"kemalyayil@gmail.com"
] | kemalyayil@gmail.com |
32ce90f5bd68dc116944456388d55c45413a0236 | 8a59fc6208231e2d7843e523cfdc9a3a362813b4 | /org.caleydo.view.tourguide/src/main/java/org/caleydo/view/tourguide/internal/serialize/DataDomainAdapter.java | ae95853073ab37f16910289cfaa9d2879042d4df | [] | no_license | Caleydo/caleydo | 17c51b10a465512a0c077e680da648d9a6061136 | c2f1433baf5bd2c0c5bea8c0990d67e946ed5412 | refs/heads/develop | 2020-04-07T06:26:03.464510 | 2016-12-15T17:07:08 | 2016-12-15T17:07:08 | 9,451,506 | 37 | 11 | null | 2016-12-15T17:07:08 | 2013-04-15T15:13:38 | Java | UTF-8 | Java | false | false | 1,050 | java | /*******************************************************************************
* Caleydo - Visualization for Molecular Biology - http://caleydo.org
* Copyright (c) The Caleydo Team. All rights reserved.
* Licensed under the new BSD license, available at http://caleydo.org/license
******************************************************************************/
package org.caleydo.view.tourguide.internal.serialize;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import org.caleydo.core.data.datadomain.ATableBasedDataDomain;
import org.caleydo.core.data.datadomain.DataDomainManager;
/**
* @author Samuel Gratzl
*
*/
public class DataDomainAdapter extends XmlAdapter<String, ATableBasedDataDomain> {
@Override
public ATableBasedDataDomain unmarshal(String v) throws Exception {
if (v == null)
return null;
return (ATableBasedDataDomain) DataDomainManager.get().getDataDomainByID(v);
}
@Override
public String marshal(ATableBasedDataDomain v) throws Exception {
return v == null ? null : v.getDataDomainID();
}
}
| [
"samuel_gratzl@gmx.at"
] | samuel_gratzl@gmx.at |
4d10d3a8bc5e7eef817d99d71174c2f2a1ef0b17 | 78c24aae9a1d334f85287cfbbc85dc6c36c148fb | /src/main/java/class517.java | 9d5cf553c4e708efa9592fa190cebd9b4fc19937 | [] | no_license | jjordantb/bliss | 4cdfb563482df71df820c2cbdbbaaf772d8de658 | 72580e09bcbd897567405eac7a93333fce28f958 | refs/heads/master | 2020-04-10T18:56:44.939402 | 2018-12-14T18:15:54 | 2018-12-14T18:15:54 | 161,218,036 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,193 | java | public class class517 extends class535 {
static int field4328 = 127;
static int field4329 = 0;
public class517(int var1, class838 var2) {
super(var1, var2);
}
public class517(class838 var1) {
super(var1);
}
static boolean method2719(class718 var0, int var1) {
try {
if (var0 == null) {
return false;
} else if (!var0.field3525) {
return false;
} else if (!var0.method2063(class491.field7798, 655699987)) {
return false;
} else if (class740.field3210.method2942((long) var0.field3499) != null) {
return false;
} else {
return class740.field3211.method2942((long) var0.field3532) == null;
}
} catch (RuntimeException var3) {
throw class158.method3445(var3, "aer.bn(" + ')');
}
}
public static boolean method2720(byte var0, short var1) {
try {
int var2 = var0 & 255;
if (var2 == 0) {
return false;
} else {
return var2 < 128 || var2 >= 160 || class519.field4212[var2 - 128] != 0;
}
} catch (RuntimeException var3) {
throw class158.method3445(var3, "aer.b(" + ')');
}
}
int method2272(int var1) {
return 127;
}
int method2273(int var1, int var2) {
return 1;
}
void method2275(int var1, int var2) {
try {
super.field3708 = var1;
} catch (RuntimeException var4) {
throw class158.method3445(var4, "aer.p(" + ')');
}
}
public int method2717(int var1) {
try {
return super.field3708;
} catch (RuntimeException var3) {
throw class158.method3445(var3, "aer.z(" + ')');
}
}
public void method2718(byte var1) {
try {
if (super.field3708 < 0 && super.field3708 > 127) {
super.field3708 = this.method2272(-1091362223);
}
} catch (RuntimeException var3) {
throw class158.method3445(var3, "aer.s(" + ')');
}
}
}
| [
"jordan.florchinger@uleth.ca"
] | jordan.florchinger@uleth.ca |
b1273e2c9864df68614a039e7c151a8fe90dfcdf | 6515fe29cb39c1fbd3eae25b4e2d5ac36bd4aaa3 | /src/Reika/GameCalendar/Util/DoublePoint.java | 72bf73d85327ff8c60dc8edd52a94a08b0820f32 | [] | no_license | ReikaKalseki/GameCalendar | 3145e082e4a710e25bbab5b13d9b144ed0bee8c5 | 501f66222f39834da8f426043ca526b50e415acc | refs/heads/master | 2023-07-09T18:01:33.570477 | 2021-08-09T06:33:38 | 2021-08-09T06:33:38 | 288,303,442 | 6 | 0 | null | null | null | null | UTF-8 | Java | false | false | 508 | java | package Reika.GameCalendar.Util;
public class DoublePoint {
public final double x;
public final double y;
public DoublePoint(double x, double y) {
this.x = x;
this.y = y;
}
@Override
public int hashCode() {
return Double.hashCode(x)^Double.hashCode(y);
}
@Override
public boolean equals(Object o) {
if (o instanceof DoublePoint) {
DoublePoint d = (DoublePoint)o;
return d.x == x && d.y == y;
}
return false;
}
@Override
public String toString() {
return x+","+y;
}
}
| [
"reikasminecraft@gmail.com"
] | reikasminecraft@gmail.com |
f9b0e77607d1793a5edf5a78f2692836636ade38 | e1de859ab00d157a365765b8c0156e4fc71c3045 | /yckx/src/com/i4evercai/development/ImageLoader/FileCache.java | 059012dce52417bd8da993803ea6af0174f57609 | [] | no_license | paomian2/yckx | fedf1370a723a3284e3687c95acb06e3f7b73d39 | 07e074bfcac2b2558385acc374f433868c4d41d1 | refs/heads/master | 2021-01-10T05:22:37.434059 | 2016-04-11T05:23:19 | 2016-04-11T05:23:19 | 55,936,017 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 817 | java | package com.i4evercai.development.ImageLoader;
import java.io.File;
import android.content.Context;
public class FileCache {
private File cacheDir;
public FileCache(Context context) {
// 找一个用来缓存图片的路径
if (android.os.Environment.getExternalStorageState().equals(
android.os.Environment.MEDIA_MOUNTED))
cacheDir = new File(android.os.Environment.getExternalStorageDirectory(),
"文件夹名称");
else
cacheDir = context.getCacheDir();
if (!cacheDir.exists())
cacheDir.mkdirs();
}
public File getFile(String url) {
String filename = String.valueOf(url.hashCode());
File f = new File(cacheDir, filename);
return f;
}
public void clear() {
File[] files = cacheDir.listFiles();
if (files == null)
return;
for (File f : files)
f.delete();
}
} | [
"497490337@qq.com"
] | 497490337@qq.com |
9746750c674e61049adfaf69cce3c1b2ede096eb | 12a99ab3fe76e5c7c05609c0e76d1855bd051bbb | /src/main/java/com/alipay/api/response/AlipayInsDataAutodamageImageUploadResponse.java | 4f62399b3a4bb2be8a705bc1e1581c6149ce4f07 | [
"Apache-2.0"
] | permissive | WindLee05-17/alipay-sdk-java-all | ce2415cfab2416d2e0ae67c625b6a000231a8cfc | 19ccb203268316b346ead9c36ff8aa5f1eac6c77 | refs/heads/master | 2022-11-30T18:42:42.077288 | 2020-08-17T05:57:47 | 2020-08-17T05:57:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 687 | java | package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.ins.data.autodamage.image.upload response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class AlipayInsDataAutodamageImageUploadResponse extends AlipayResponse {
private static final long serialVersionUID = 5551351484697888181L;
/**
* 图像文件在oss存储上的路径
*/
@ApiField("image_path")
private String imagePath;
public void setImagePath(String imagePath) {
this.imagePath = imagePath;
}
public String getImagePath( ) {
return this.imagePath;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
d756ccfdad9caaf0c6391bd38a7ef43520ad4734 | 341c99982956c480b660d8e3d45e6cc861e93fb5 | /jbpm-human-task/jbpm-human-task-core/src/main/java/org/jbpm/services/task/commands/GetTaskOwnedByExpDateCommand.java | 05f332d14d90a412d91932e38dc911bde4c63210 | [] | no_license | vanilla-sky/jbpm | 95ca8b3ad054461519e674d8a607ff1e45b341d6 | bebdcf489a228d9075b0f33bb48cb4e63dce3a38 | refs/heads/master | 2020-12-24T05:18:02.404527 | 2014-05-29T18:34:28 | 2014-05-29T18:34:28 | 20,324,263 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,984 | java | package org.jbpm.services.task.commands;
import java.util.Date;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.kie.api.task.model.Status;
import org.kie.api.task.model.TaskSummary;
import org.kie.internal.command.Context;
@XmlRootElement(name="get-task-owned-exp-date-command")
@XmlAccessorType(XmlAccessType.NONE)
public class GetTaskOwnedByExpDateCommand extends UserGroupCallbackTaskCommand<List<TaskSummary>> {
private static final long serialVersionUID = 5077599352603072633L;
@XmlElement
private List<Status> status;
@XmlElement
private Date expirationDate;
@XmlElement
private boolean optional;
public GetTaskOwnedByExpDateCommand() {
}
public GetTaskOwnedByExpDateCommand(String userId, List<Status> status, Date expirationDate, boolean optional) {
this.userId = userId;
this.status = status;
this.expirationDate = expirationDate;
this.optional = optional;
}
public List<Status> getStatuses() {
return status;
}
public void setStatuses(List<Status> status) {
this.status = status;
}
public Date getExpirationDate() {
return expirationDate;
}
public void setExpirationDate(Date expirationDate) {
this.expirationDate = expirationDate;
}
public boolean isOptional() {
return optional;
}
public void setOptional(boolean optional) {
this.optional = optional;
}
public List<TaskSummary> execute(Context cntxt) {
TaskContext context = (TaskContext) cntxt;
doCallbackUserOperation(userId, context);
if (optional) {
return context.getTaskQueryService().getTasksOwnedByExpirationDateOptional(userId, status, expirationDate);
} else {
return context.getTaskQueryService().getTasksOwnedByExpirationDate(userId, status, expirationDate);
}
}
}
| [
"mswiders@redhat.com"
] | mswiders@redhat.com |
57d019b1e629caf65804af7196e8b471e3938f04 | 9a7506a709624f0ceaf8bc6865e402a4eec7f4d1 | /app/src/main/java/com/example/qimiao/zz/uitls/OKHttpUpdateHttpService.java | 5bce4741123a536f094c4ea178ffead26262a428 | [] | no_license | lkxiaojian/zxqmzz | cc91caade862c1eedb487ee3989ed409b301abad | 7e2aecc91d0d6fa8e2d359d79a74f3c374c7d894 | refs/heads/master | 2020-05-31T04:40:42.330479 | 2019-07-05T09:42:51 | 2019-07-05T09:42:51 | 190,102,937 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,008 | java | /*
* Copyright (C) 2018 xuexiangjys(xuexiangjys@163.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.example.qimiao.zz.uitls;
import android.support.annotation.NonNull;
import com.xuexiang.xupdate.proxy.IUpdateHttpService;
import com.zhy.http.okhttp.OkHttpUtils;
import com.zhy.http.okhttp.callback.FileCallBack;
import com.zhy.http.okhttp.callback.StringCallback;
import java.io.File;
import java.util.Map;
import java.util.TreeMap;
import okhttp3.Call;
import okhttp3.Request;
/**
* 使用okhttp
*
* @author xuexiang
* @since 2018/7/10 下午4:04
*/
public class OKHttpUpdateHttpService implements IUpdateHttpService {
public OKHttpUpdateHttpService() {
OkHttpUtils.getInstance();
}
@Override
public void asyncGet(@NonNull String url, @NonNull Map<String, Object> params, final @NonNull Callback callBack) {
OkHttpUtils.get()
.url(url)
.params(transform(params))
.build()
.execute(new StringCallback() {
@Override
public void onError(Call call, Exception e, int id) {
}
@Override
public void onResponse(String response, int id) {
callBack.onSuccess(response);
}
});
}
@Override
public void asyncPost(@NonNull String url, @NonNull Map<String, Object> params, final @NonNull Callback callBack) {
OkHttpUtils.post()
.url(url)
.params(transform(params))
.build()
.execute(new StringCallback() {
@Override
public void onError(Call call, Exception e, int id) {
callBack.onError(e);
}
@Override
public void onResponse(String response, int id) {
callBack.onSuccess(response);
}
});
}
@Override
public void download(@NonNull String url, @NonNull String path, @NonNull String fileName, final @NonNull DownloadCallback callback) {
OkHttpUtils.get()
.url(url)
.build()
.execute(new FileCallBack(path, fileName) {
@Override
public void inProgress(float progress, long total, int id) {
callback.onProgress(progress, total);
}
@Override
public void onError(Call call, Exception e, int id) {
callback.onError(e);
}
@Override
public void onResponse(File response, int id) {
callback.onSuccess(response);
}
@Override
public void onBefore(Request request, int id) {
super.onBefore(request, id);
callback.onStart();
}
});
}
@Override
public void cancelDownload(@NonNull String url) {
}
private Map<String, String> transform(Map<String, Object> params) {
Map<String, String> map = new TreeMap<>();
for (Map.Entry<String, Object> entry : params.entrySet()) {
map.put(entry.getKey(), entry.getValue().toString());
}
return map;
}
} | [
"18513075404@163.com"
] | 18513075404@163.com |
46e1fe6e86d3604de227d7c785ddf4a95c77c3c0 | 7c76db8235ca9aeff01ec0431aa3c9f733756cb0 | /src/main/java/printlnInOutProbe/SystemSetInputPrintStream.java | cfdb5f4e0a9db855f7e16e39c303b0a3fe41fc9e | [] | no_license | jezhische/TrainingTasks | f98e94617b8c280ae3f715d66b350e37265d1aa8 | 03c1241bf76878248d24aef796006439b91f7dfd | refs/heads/master | 2020-05-21T19:52:09.674832 | 2017-08-22T01:56:23 | 2017-08-22T01:56:23 | 62,608,297 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 181 | java | package printlnInOutProbe;
/**
* Created by Ежище on 27.07.2016.
*/
public class SystemSetInputPrintStream {
public static void main(String[] args) {
}
}
| [
"jezhische@gmail.com"
] | jezhische@gmail.com |
0adae5c78558804e139af85447bd00dad0e1c549 | 9bb5c8ae2c8ec8e2fd38d43ef07c8772edb706e9 | /app/src/main/java/com/a/a/d/an.java | 1cb16d2e98f179cb59a77d652aa074dd75ac5619 | [] | no_license | yucz/008xposed | 0be57784b681b4495db224b9c509bcf5f6b08d38 | 3777608796054e389e30c9b543a2a1ac888f0a68 | refs/heads/master | 2021-05-11T14:32:57.902655 | 2017-09-29T16:57:34 | 2017-09-29T16:57:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 726 | java | package com.a.a.d;
import java.io.IOException;
import java.lang.reflect.Type;
public final class an
implements bb
{
public static an a = new an();
public final void a(ap paramap, Object paramObject1, Object paramObject2, Type paramType)
throws IOException
{
paramap = paramap.j();
paramObject1 = (Number)paramObject1;
if (paramObject1 == null)
{
if (paramap.b(bl.h))
{
paramap.a('0');
return;
}
paramap.a();
return;
}
paramap.a(paramObject1.intValue());
}
}
/* Location: D:\AndroidKiller_v1.3.1\projects\008\ProjectSrc\smali\
* Qualified Name: com.XhookMethod.XhookMethod.getMap.an
* JD-Core Version: 0.7.0.1
*/ | [
"3450559631@qq.com"
] | 3450559631@qq.com |
25cc58071a5ae19d784922ce70b0852321ff2f04 | a1867ecc49299b37cc7435ac9f78306ff5cf871a | /app/src/main/java/me/lancer/xupt/mvp/repository/RepositoryBean.java | 446d327c076ecc0f4703816df61f28f3a0bb62e7 | [] | no_license | 1anc3r/XUPT | dceb6899a8220830e1bda85698de160500cfe4e2 | 1070e166d1d660b4b4f6c688026f9242111df6ff | refs/heads/master | 2021-01-12T08:40:18.231383 | 2019-03-02T11:33:09 | 2019-03-02T11:33:09 | 76,649,727 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,003 | java | package me.lancer.xupt.mvp.repository;
/**
* Created by HuangFangzhi on 2017/5/9.
*/
public class RepositoryBean {
private String img;
private String name;
private String description;
private String download;
private String blog;
public RepositoryBean(){
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getDownload() {
return download;
}
public void setDownload(String download) {
this.download = download;
}
public String getBlog() {
return blog;
}
public void setBlog(String blog) {
this.blog = blog;
}
public String getImg() {
return img;
}
public void setImg(String img) {
this.img = img;
}
}
| [
"huangfangzhi@icloud.com"
] | huangfangzhi@icloud.com |
9175b2bfd9361bbb4589404518567c3f90d054e5 | 133787956ef11bdf0b0508f4b6013af6db5bfb46 | /src/weibo4j/ShortUrl.java | 7f2a4719fc0cf25367ec206a2781a48bcaae9078 | [] | no_license | 623860762/BotBgSystem | ceacf41848e758ec501bf2ad1e578b2ccafa0116 | daff3b08360cd110b0cec5fa72ef61d3645a3cbc | refs/heads/master | 2020-04-02T21:36:43.243884 | 2016-06-25T17:06:59 | 2016-06-25T17:06:59 | 61,952,308 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,374 | java | package weibo4j;
import java.util.ArrayList;
import java.util.HashMap;
import weibo4j.model.PostParameter;
import weibo4j.model.WeiboException;
import weibo4j.org.json.JSONArray;
import weibo4j.org.json.JSONException;
import weibo4j.org.json.JSONObject;
import weibo4j.util.WeiboConfig;
public class ShortUrl extends Weibo{
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* 长链接转为短链接
*
*
*/
public JSONObject longToShortUrl (String url_long) throws WeiboException {
return client.get(WeiboConfig.getValue("baseURL") + "short_url/shorten.json",new PostParameter[] {
new PostParameter("url_long",url_long)
}).asJSONObject();
}
/**
* 短链接转为长链接
*
*/
public JSONObject shortToLongUrl (String url_short) throws WeiboException {
return client.get(WeiboConfig.getValue("baseURL") + "short_url/expand.json",new PostParameter[] {
new PostParameter("url_short",url_short)
}).asJSONObject();
}
public JSONObject shortToLongUrlList(ArrayList<String> longurls) throws WeiboException {
PostParameter[] pars = new PostParameter[longurls.size()];
for(int i=0;i<longurls.size();i++){
pars[i] = new PostParameter("url_long", longurls.get(i));
}
return client.post(
WeiboConfig.getValue("baseURL") + "short_url/shorten.json",//http://i2.api.weibo.com/2/short_url/shorten.json
pars
).asJSONObject();
}
public HashMap<String, String> getShortUrlMap(ArrayList<String> longurls){
HashMap<String, String> urlMap = new HashMap<String, String>();
JSONObject json = new JSONObject();
try {
json = shortToLongUrlList(longurls);
JSONArray urls = json.getJSONArray("urls");
if(urls!=null){
for(int i=0;i<urls.length();i++){
JSONObject shortUrl = (JSONObject)urls.get(i);
String url_long = shortUrl.getString("url_long");
String url_short = shortUrl.getString("url_short");
urlMap.put(url_long, url_short);
}
}else{
throw new WeiboException(json.toString());
}
} catch (Exception e) {
e.printStackTrace();
}
return urlMap;
}
/**
* 获取短链接的总点击数
*
*
*/
public JSONObject clicksOfUrl (String url_short) throws WeiboException {
return client.get(WeiboConfig.getValue("baseURL") + "short_url/clicks.json",new PostParameter[] {
new PostParameter("url_short",url_short)
}).asJSONObject();
}
/**
* 获取一个短链接点击的referer来源和数量
*
*
*/
public JSONObject referersOfUrl (String url_short) throws WeiboException {
return client.get(WeiboConfig.getValue("baseURL") + "short_url/referers.json",new PostParameter[] {
new PostParameter("url_short",url_short)
}).asJSONObject();
}
/**
*
* 获取一个短链接点击的地区来源和数量
*
*/
public JSONObject locationsOfUrl (String url_short) throws WeiboException {
return client.get(WeiboConfig.getValue("baseURL") + "short_url/locations.json",new PostParameter[] {
new PostParameter("url_short",url_short)
}).asJSONObject();
}
/**
* 获取短链接在微博上的微博分享数
*
*
*
*/
public JSONObject shareCountsOfUrl (String url_short) throws WeiboException {
return client.get(WeiboConfig.getValue("baseURL") + "short_url/share/counts.json",new PostParameter[] {
new PostParameter("url_short",url_short)
}).asJSONObject();
}
/**
* 获取包含指定单个短链接的最新微博内容
*
*
*/
public JSONObject statusesContentUrl (String url_short) throws WeiboException {
return client.get(WeiboConfig.getValue("baseURL") + "short_url/share/statuses.json",new PostParameter[] {
new PostParameter("url_short",url_short)
}).asJSONObject();
}
/**
* 获取短链接在微博上的微博评论数
*
*
*/
public JSONObject commentCountOfUrl (String url_short) throws WeiboException {
return client.get(WeiboConfig.getValue("baseURL") + "short_url/comment/counts.json",new PostParameter[] {
new PostParameter("url_short",url_short)
}).asJSONObject();
}
/**
* 获取包含指定单个短链接的最新微博评论
*
*/
public JSONObject commentsContentUrl (String url_short) throws WeiboException {
return client.get(WeiboConfig.getValue("baseURL") + "short_url/comment/comments.json",new PostParameter[] {
new PostParameter("url_short",url_short)
}).asJSONObject();
}
}
| [
"623860762@qq.com"
] | 623860762@qq.com |
501554ab4b6d7ce2239b1d71aa873815c6cf15c8 | 71636a3185b582ff452900f564e00f9e4b45be46 | /catalog-service/src/main/java/com/example/catalogservice/jpa/CatalogEntity.java | 7cc1b5796e0dcc2b0e4f144dfef178db5254b88a | [] | no_license | ha-jinwoo/inflearn-spring-cloud | 069853e8fd5fd518698eaff02b88b186449b7d69 | 2f8a552d81f92ddbf2699dfd79499fe25df39a1b | refs/heads/master | 2023-08-13T20:18:01.869053 | 2021-09-14T00:06:08 | 2021-09-14T00:06:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 753 | java | package com.example.catalogservice.jpa;
import lombok.Data;
import org.hibernate.annotations.ColumnDefault;
import javax.persistence.*;
import java.time.LocalDateTime;
@Data
@Entity
@Table(name = "catalog")
public class CatalogEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false, length = 120, unique = true)
private String productId;
@Column(nullable = false)
private String productName;
@Column(nullable = false)
private Integer stock;
@Column(nullable = false)
private Integer unitPrice;
@ColumnDefault(value = "CURRENT_TIMESTAMP")
@Column(nullable = false, updatable = false, insertable = false)
private LocalDateTime createAt;
}
| [
"yjs2952@naver.com"
] | yjs2952@naver.com |
d420329a10b0633e1ad6175ec898fc1cf324d805 | 421f0a75a6b62c5af62f89595be61f406328113b | /generated_tests/no_seeding/69_lhamacaw-macaw.presentationLayer.OntologyTermsPanel-1.0-6/macaw/presentationLayer/OntologyTermsPanel_ESTest_scaffolding.java | e2515ca6068b72e70ae259e80f71cdae8e26b87d | [] | no_license | tigerqiu712/evosuite-model-seeding-empirical-evaluation | c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6 | 11a920b8213d9855082d3946233731c843baf7bc | refs/heads/master | 2020-12-23T21:04:12.152289 | 2019-10-30T08:02:29 | 2019-10-30T08:02:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 548 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Oct 28 19:49:19 GMT 2019
*/
package macaw.presentationLayer;
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 OntologyTermsPanel_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pderakhshanfar@bsr01.win.tue.nl"
] | pderakhshanfar@bsr01.win.tue.nl |
15df81709abc98ad0fa94e84508ea0ad6f82f9aa | a78e998b0cb3c096a6d904982bb449da4003ff8b | /app/src/main/java/com/alipay/api/domain/ModelQueryParam.java | b851c0c7f8a42628fe3501eb7a625f95f25437de | [
"Apache-2.0"
] | permissive | Zhengfating/F2FDemo | 4b85b598989376b3794eefb228dfda48502ca1b2 | 8654411f4269472e727e2230e768051162a6b672 | refs/heads/master | 2020-05-03T08:30:29.641080 | 2019-03-30T07:50:30 | 2019-03-30T07:50:30 | 178,528,073 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 926 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 模型查询参数
*
* @author auto create
* @since 1.0, 2017-04-27 14:36:26
*/
public class ModelQueryParam extends AlipayObject {
private static final long serialVersionUID = 6175628728638428183L;
/**
* 条件查询参数
*/
@ApiField("key")
private String key;
/**
* 操作计算符,目前仅支持EQ
*/
@ApiField("operate")
private String operate;
/**
* 查询参数值
*/
@ApiField("value")
private String value;
public String getKey() {
return this.key;
}
public void setKey(String key) {
this.key = key;
}
public String getOperate() {
return this.operate;
}
public void setOperate(String operate) {
this.operate = operate;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
}
| [
"452139060@qq.com"
] | 452139060@qq.com |
73c612263707e01f1b7097a0f32c7d6d598b2100 | eebf046f3861f1f6e928aa1af785f45367a1cb99 | /app/src/main/java/com/google/protos/proto2/bridge/MessageSet.java | 56e54f340f543b22dcc61e9138fdc9f4965a8aff | [] | no_license | AndroidTVDeveloper/TVLauncher-Sony | 5cbff163627993f3c55ec40cdfa949cbafad2ae6 | abe3b6fa43b006b76dcd13677cae2afd07fae108 | refs/heads/master | 2021-02-07T03:55:25.371409 | 2020-02-29T15:00:56 | 2020-02-29T15:00:56 | 243,980,541 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,560 | java | package com.google.protos.proto2.bridge;
import com.google.protobuf.ByteString;
import com.google.protobuf.CodedInputStream;
import com.google.protobuf.ExtensionRegistryLite;
import com.google.protobuf.GeneratedMessageLite;
import com.google.protobuf.InvalidProtocolBufferException;
import com.google.protobuf.Parser;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
public final class MessageSet extends GeneratedMessageLite.ExtendableMessage<MessageSet, Builder> implements MessageSetOrBuilder {
/* access modifiers changed from: private */
public static final MessageSet DEFAULT_INSTANCE;
private static volatile Parser<MessageSet> PARSER;
private byte memoizedIsInitialized = 2;
private MessageSet() {
}
public static MessageSet parseFrom(ByteBuffer data) throws InvalidProtocolBufferException {
return (MessageSet) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, data);
}
public static MessageSet parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException {
return (MessageSet) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, data, extensionRegistry);
}
public static MessageSet parseFrom(ByteString data) throws InvalidProtocolBufferException {
return (MessageSet) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, data);
}
public static MessageSet parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException {
return (MessageSet) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, data, extensionRegistry);
}
public static MessageSet parseFrom(byte[] data) throws InvalidProtocolBufferException {
return (MessageSet) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, data);
}
public static MessageSet parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException {
return (MessageSet) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, data, extensionRegistry);
}
public static MessageSet parseFrom(InputStream input) throws IOException {
return (MessageSet) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, input);
}
public static MessageSet parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException {
return (MessageSet) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static MessageSet parseDelimitedFrom(InputStream input) throws IOException {
return (MessageSet) parseDelimitedFrom(DEFAULT_INSTANCE, input);
}
public static MessageSet parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException {
return (MessageSet) parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static MessageSet parseFrom(CodedInputStream input) throws IOException {
return (MessageSet) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, input);
}
public static MessageSet parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException {
return (MessageSet) GeneratedMessageLite.parseFrom(DEFAULT_INSTANCE, input, extensionRegistry);
}
public static Builder newBuilder() {
return (Builder) DEFAULT_INSTANCE.createBuilder();
}
public static Builder newBuilder(MessageSet prototype) {
return (Builder) DEFAULT_INSTANCE.createBuilder(prototype);
}
public static final class Builder extends GeneratedMessageLite.ExtendableBuilder<MessageSet, Builder> implements MessageSetOrBuilder {
private Builder() {
super(MessageSet.DEFAULT_INSTANCE);
}
}
/* access modifiers changed from: protected */
public final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) {
switch (method) {
case NEW_MUTABLE_INSTANCE:
return new MessageSet();
case NEW_BUILDER:
return new Builder();
case BUILD_MESSAGE_INFO:
return newMessageInfo(DEFAULT_INSTANCE, "\u0003\u0000", null);
case GET_DEFAULT_INSTANCE:
return DEFAULT_INSTANCE;
case GET_PARSER:
Parser<MessageSet> parser = PARSER;
if (parser == null) {
synchronized (MessageSet.class) {
parser = PARSER;
if (parser == null) {
parser = new GeneratedMessageLite.DefaultInstanceBasedParser<>(DEFAULT_INSTANCE);
PARSER = parser;
}
}
}
return parser;
case GET_MEMOIZED_IS_INITIALIZED:
return Byte.valueOf(this.memoizedIsInitialized);
case SET_MEMOIZED_IS_INITIALIZED:
this.memoizedIsInitialized = (byte) (arg0 == null ? 0 : 1);
return null;
default:
throw new UnsupportedOperationException();
}
}
static {
MessageSet defaultInstance = new MessageSet();
DEFAULT_INSTANCE = defaultInstance;
GeneratedMessageLite.registerDefaultInstance(MessageSet.class, defaultInstance);
}
public static MessageSet getDefaultInstance() {
return DEFAULT_INSTANCE;
}
public static Parser<MessageSet> parser() {
return DEFAULT_INSTANCE.getParserForType();
}
}
| [
"eliminater74@gmail.com"
] | eliminater74@gmail.com |
4dd7fce50dbd760428e886c27f63ec16b28951ea | 4aa90348abcb2119011728dc067afd501f275374 | /app/src/main/java/com/tencent/mm/plugin/freewifi/e/i$1.java | 27a571841db97e5902fdef204638a02cc0430dc4 | [] | no_license | jambestwick/HackWechat | 0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6 | 6a34899c8bfd50d19e5a5ec36a58218598172a6b | refs/heads/master | 2022-01-27T12:48:43.446804 | 2021-12-29T10:36:30 | 2021-12-29T10:36:30 | 249,366,791 | 0 | 0 | null | 2020-03-23T07:48:32 | 2020-03-23T07:48:32 | null | UTF-8 | Java | false | false | 722 | java | package com.tencent.mm.plugin.freewifi.e;
import com.tencent.mm.plugin.freewifi.a.a;
import com.tencent.mm.plugin.freewifi.m;
import com.tencent.mm.sdk.platformtools.x;
class i$1 implements Runnable {
final /* synthetic */ i mFu;
final /* synthetic */ String val$url;
i$1(i iVar, String str) {
this.mFu = iVar;
this.val$url = str;
}
public final void run() {
x.i("MicroMsg.FreeWifi.Protocol33", "sessionKey=%s, step=%d, method=Protocol33.httpAuthentication, desc=it sends http request for authentication. http url=%s", new Object[]{m.D(this.mFu.intent), Integer.valueOf(m.E(this.mFu.intent)), this.val$url});
a.aLn();
a.a(this.val$url, new 1(this));
}
}
| [
"malin.myemail@163.com"
] | malin.myemail@163.com |
826e1e3dd6d79beb4759a6580b3d52a0f7c4cd34 | 1035b0ff60dba99d82ee99f946bc562b17eed577 | /providers/denominator-ultradns/src/main/java/denominator/ultradns/GroupGeoRecordByNameTypeIterator.java | 3f32bdcb060a3265ba2bcc3c6a93eb69606ecd21 | [
"Apache-2.0"
] | permissive | amit-git/denominator | a64e20c3ce4d92c030365768bf2b5c753125e48e | 81f3344aa078a22201857bd16004ca6962e5b2c2 | refs/heads/master | 2021-01-15T20:38:03.309084 | 2013-08-12T19:45:44 | 2013-08-12T19:45:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,791 | java | package denominator.ultradns;
import static denominator.common.Util.peekingIterator;
import static denominator.ultradns.UltraDNSFunctions.forTypeAndRData;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import javax.inject.Inject;
import denominator.common.PeekingIterator;
import denominator.model.ResourceRecordSet;
import denominator.model.ResourceRecordSet.Builder;
import denominator.model.profile.Geo;
import denominator.ultradns.UltraDNS.DirectionalRecord;
/**
* Generally, this iterator will produce {@link ResourceRecordSet} for only a
* single record type. However, there are special cases where this can produce
* multiple. For example, {@link DirectionalPool.RecordType#IPV4} and
* {@link DirectionalPool.RecordType#IPV6} emit both address ({@code A} or
* {@code AAAA}) and {@code CNAME} records.
*/
class GroupGeoRecordByNameTypeIterator implements Iterator<ResourceRecordSet<?>> {
static final class Factory {
private final UltraDNS api;
@Inject
Factory(UltraDNS api) {
this.api = api;
}
/**
* @param sortedIterator
* only contains records with the same
* {@link DirectionalRecord#name()}, sorted by
* {@link DirectionalRecord#type()},
* {@link DirectionalRecord#getGeolocationGroup()} or
* {@link DirectionalRecord#group()}
*/
Iterator<ResourceRecordSet<?>> create(Iterator<DirectionalRecord> sortedIterator) {
return new GroupGeoRecordByNameTypeIterator(api, sortedIterator);
}
}
private final Map<String, Geo> cache = new LinkedHashMap<String, Geo>();
private final UltraDNS api;
private final PeekingIterator<DirectionalRecord> peekingIterator;
private GroupGeoRecordByNameTypeIterator(UltraDNS api, Iterator<DirectionalRecord> sortedIterator) {
this.api = api;
this.peekingIterator = peekingIterator(sortedIterator);
}
/**
* skips no response records as they aren't portable
*/
@Override
public boolean hasNext() {
if (!peekingIterator.hasNext())
return false;
DirectionalRecord record = peekingIterator.peek();
if (record.noResponseRecord) {
// TODO: log as this is unsupported
peekingIterator.next();
}
return true;
}
@Override
public ResourceRecordSet<?> next() {
DirectionalRecord record = peekingIterator.next();
Builder<Map<String, Object>> builder = ResourceRecordSet.builder().name(record.name).type(record.type)
.qualifier(record.geoGroupName).ttl(record.ttl);
builder.add(forTypeAndRData(record.type, record.rdata));
if (!cache.containsKey(record.geoGroupId)) {
Geo profile = Geo.create(api.getDirectionalGroup(record.geoGroupId).regionToTerritories);
cache.put(record.geoGroupId,profile);
}
builder.addProfile(cache.get(record.geoGroupId));
while (hasNext()) {
DirectionalRecord next = peekingIterator.peek();
if (typeTTLAndGeoGroupEquals(next, record)) {
peekingIterator.next();
builder.add(forTypeAndRData(record.type, next.rdata));
} else {
break;
}
}
return builder.build();
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
static boolean typeTTLAndGeoGroupEquals(DirectionalRecord actual, DirectionalRecord expected) {
return actual.type.equals(expected.type) && actual.ttl == expected.ttl
&& actual.geoGroupId.equals(expected.geoGroupId);
}
}
| [
"adrian.f.cole@gmail.com"
] | adrian.f.cole@gmail.com |
690d66f47effab440e35b19d4cd0dfa9232a2dcc | 12b75ba88d14631e2c99a2fff6b3f3683aafc976 | /nts/texmf/source/nts/nts-1.00-beta/nts/command/JobNamePrim.java | 244742072627c21f544308df95a6b3da293b691e | [] | no_license | tex-other/nts | 50b4f66b3cafa870be4572dff92d23ab4321ddc8 | b4b333723326dc06a84bcd28e2672a76537d9752 | refs/heads/master | 2021-09-09T07:41:55.366960 | 2018-03-14T07:37:37 | 2018-03-14T07:37:37 | 125,165,059 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,005 | java | // Copyright 2001 by
// DANTE e.V. and any individual authors listed elsewhere in this file.
//
// This file is part of the NTS system.
// ------------------------------------
//
// It may be distributed and/or modified under the
// conditions of the NTS Public License (NTSPL), either version 1.0
// of this license or (at your option) any later version.
// The latest version of this license is in
// http://www.dante.de/projects/nts/ntspl.txt
// and version 1.0 or later is part of all distributions of NTS
// version 1.0-beta or later.
//
// The list of all files belonging to the NTS distribution is given in
// the file `manifest.txt'.
//
// Filename: nts/command/JobNamePrim.java
// $Id: JobNamePrim.java,v 1.1.1.1 1999/05/31 11:18:48 ksk Exp $
package nts.command;
/* TeXtp[470] */
public class JobNamePrim extends ExpandablePrim {
public JobNamePrim(String name) { super(name); }
public void expand(Token src)
{ insertList(new TokenList(getIOHandler().getJobName())); }
}
| [
"shreevatsa.public@gmail.com"
] | shreevatsa.public@gmail.com |
b3c0b203d67bbf4e460d2b47d995d2ed86e5f625 | 1e72ae4be7576fa703c8564cc1a2a058bcb8458d | /src/main/java/org/decimal4j/truncate/OverflowMode.java | 23d1437b58b3f1096405e3a1e5b2f672fff3a207 | [
"MIT"
] | permissive | javalibrary/decimal4j | f8138716ad7cabfd2a3f79fdbb117817365c8c7d | cdbd60db7c4816f3d895b5dbb51dbddec4c12096 | refs/heads/master | 2020-03-18T08:48:42.599892 | 2018-04-03T15:14:25 | 2018-04-03T15:14:25 | 134,529,365 | 1 | 0 | null | 2018-05-23T07:16:48 | 2018-05-23T07:16:47 | null | UTF-8 | Java | false | false | 1,761 | java | /**
* The MIT License (MIT)
*
* Copyright (c) 2015-2017 decimal4j (tools4j), Marco Terzer
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.decimal4j.truncate;
/**
* Mode to apply if arithmetic operations cause an overflow.
*/
public enum OverflowMode {
/**
* Operations causing an overflow silently return the truncated result (the
* low order bytes of the extended result); no exception is thrown.
*/
UNCHECKED, //
/**
* Operations causing an overflow throw an {@link ArithmeticException}.
*/
CHECKED;
/**
* Returns true if overflow leads to an {@link ArithmeticException}
*
* @return true if {@code this == CHECKED}
*/
public final boolean isChecked() {
return this == CHECKED;
}
}
| [
"terzerm@gmail.com"
] | terzerm@gmail.com |
09b835a4c1adee2e3211bbf0cced037f790c0904 | 125f147787ec146d83234eef2a25776f0535b835 | /out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/src/java/util/concurrent/atomic/AtomicBoolean.java | 40cddcab6eeaa4511e7002d4e4ba162d79fe7cdc | [] | no_license | team-miracle/android-7.1.1_r13_apps-lib | f9230d7c11d3c1d426d3412d275057be0ae6d1f7 | 9b978d982de9c87c7ee23806212e11785d12bddd | refs/heads/master | 2021-01-09T05:47:54.721201 | 2019-05-09T05:36:23 | 2019-05-09T05:36:23 | 80,803,682 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,064 | java | /*
* Written by Doug Lea with assistance from members of JCP JSR-166
* Expert Group and released to the public domain, as explained at
* http://creativecommons.org/publicdomain/zero/1.0/
*/
package java.util.concurrent.atomic;
public class AtomicBoolean
implements java.io.Serializable
{
public AtomicBoolean(boolean initialValue) { throw new RuntimeException("Stub!"); }
public AtomicBoolean() { throw new RuntimeException("Stub!"); }
public final boolean get() { throw new RuntimeException("Stub!"); }
public final boolean compareAndSet(boolean expect, boolean update) { throw new RuntimeException("Stub!"); }
public boolean weakCompareAndSet(boolean expect, boolean update) { throw new RuntimeException("Stub!"); }
public final void set(boolean newValue) { throw new RuntimeException("Stub!"); }
public final void lazySet(boolean newValue) { throw new RuntimeException("Stub!"); }
public final boolean getAndSet(boolean newValue) { throw new RuntimeException("Stub!"); }
public java.lang.String toString() { throw new RuntimeException("Stub!"); }
}
| [
"c1john0803@gmail.com"
] | c1john0803@gmail.com |
14a293760916a1046729f3a8805ddd4d53024912 | 75c4712ae3f946db0c9196ee8307748231487e4b | /src/main/java/com/alipay/api/domain/ClassRateInfo.java | 1293ccc8ec19ad3671784e365d6cef6a81710d47 | [
"Apache-2.0"
] | permissive | yuanbaoMarvin/alipay-sdk-java-all | 70a72a969f464d79c79d09af8b6b01fa177ac1be | 25f3003d820dbd0b73739d8e32a6093468d9ed92 | refs/heads/master | 2023-06-03T16:54:25.138471 | 2021-06-25T14:48:21 | 2021-06-25T14:48:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,455 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 分级汇率信息
*
* @author auto create
* @since 1.0, 2020-03-15 16:03:47
*/
public class ClassRateInfo extends AlipayObject {
private static final long serialVersionUID = 5126718744679952281L;
/**
* 汇率等级有两种
1.权益等级汇率:
- diamond(钻石权益)
- platinum(铂金权益)
- others(无权益)
2.会员等级汇率:
- diamond(钻石会员)
- platinum(铂金会员)
- golden(黄金会员)
- primary(大众会员)
*/
@ApiField("grade")
private String grade;
/**
* 汇率等级描述
*/
@ApiField("grade_desc")
private String gradeDesc;
/**
* 汇率值
*/
@ApiField("rate")
private String rate;
/**
* 汇率金额,单位元
*/
@ApiField("rate_amount")
private String rateAmount;
public String getGrade() {
return this.grade;
}
public void setGrade(String grade) {
this.grade = grade;
}
public String getGradeDesc() {
return this.gradeDesc;
}
public void setGradeDesc(String gradeDesc) {
this.gradeDesc = gradeDesc;
}
public String getRate() {
return this.rate;
}
public void setRate(String rate) {
this.rate = rate;
}
public String getRateAmount() {
return this.rateAmount;
}
public void setRateAmount(String rateAmount) {
this.rateAmount = rateAmount;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
a163568a9fd39012edef2bbaeb4fe024716096c5 | 89ec9113afe74b7e97f6152b76d0b3d6ac6bb9aa | /src/main/java/sparsebitmap/IntIterator.java | 1dcd716397a1b0c44bbf71dc3743f22376402d98 | [
"Apache-2.0"
] | permissive | samytto/sparsebitmap | 523150cb8bc45c3235c3fb24a79c2562fba63548 | 9b46a6405167a2e837705592b9aa8b5d96ac65ff | refs/heads/master | 2021-01-16T17:45:21.366609 | 2015-07-18T19:25:13 | 2015-07-18T19:31:14 | 7,783,490 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,091 | java | /**
* Copyright 2012 Daniel Lemire
*
* 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 sparsebitmap;
/**
* The purpose of this class is to provide a simple iterator interface
* for integers. It is mostly just used for better performance compared
* to the default Java iterator.
*
* @author Daniel Lemire
*/
public interface IntIterator {
/**
* Is there more?
*
* @return true, if there is more, false otherwise
*/
public boolean hasNext();
/**
* Returns the next integer
*
* @return the integer
*/
public int next();
}
| [
"lemire@gmail.com"
] | lemire@gmail.com |
0e9a83cbe1078cb9ebafbbf4b6a65169236f254d | 48e835e6f176a8ac9ae3ca718e8922891f1e5a18 | /benchmark/training/org/jboss/as/test/integration/ejb/remote/contextdata/ClientInterceptorReturnDataLocalTestCase.java | 32d3a5ecc88d5819d98027f84927c0c0a98bc88b | [] | 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 | 1,744 | java | /**
* JBoss, Home of Professional Open Source.
* Copyright 2018, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 2110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.as.test.integration.ejb.remote.contextdata;
import javax.ejb.EJB;
import org.jboss.arquillian.junit.Arquillian;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
/**
* Tests that context data from the server is returned to client interceptors
* for an in-vm invocation.
*
* @author Stuart Douglas
*/
@RunWith(Arquillian.class)
public class ClientInterceptorReturnDataLocalTestCase {
@EJB
TestRemote testSingleton;
@Test
public void testInvokeWithClientInterceptorData() throws Exception {
String result = testSingleton.invoke();
Assert.assertEquals("DATA:client interceptor data(client data):bean context data", result);
}
}
| [
"benjamin.danglot@inria.fr"
] | benjamin.danglot@inria.fr |
74e2002a2b50e37d8afa6142c06a87ac4c328b77 | d32aa1cda3bcc76c1daa796394af72b8d1d285a5 | /src/main/java/org/jboss/essc/web/util/SimpleRelativeDateFormatter.java | 346422647937e84ab307e8a6acb385d25fb88ff7 | [] | no_license | OndraZizka/wicket-components | 45b9b2a5032e66db3a8ede719b3cb415b79afa06 | 907ce048c4a301ca8700c7d8b0b63cdd1e2afca2 | refs/heads/master | 2016-09-05T19:01:16.120068 | 2013-01-10T09:03:47 | 2013-01-10T09:03:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,689 | java |
package org.jboss.essc.web.util;
import java.util.Date;
/**
*
* @author ozizka@redhat.com
*/
public class SimpleRelativeDateFormatter {
public static String format( Date date ){
return format( date, new Date() );
}
public static String format( Date when, Date now ) {
long diff = (now.getTime() - when.getTime()) / 1000;
boolean past = diff >= 0;
if( ! past ) diff = -diff;
if( diff < 10 ) return "now";
boolean sameDay = now.getDate() == when.getDate();
return diffTimeString( diff, sameDay, past );
}
/**
*
* @param diffSec Difference in seconds. Non-negative number.
* @param sameDay Are the two moments in the same day? (For determining yesterday.)
* @param past Is it in the past or future?
* @returns String like "23 hours ago" or "in a month".
*/
private static String diffTimeString( final long diffSec, boolean sameDay, boolean past ) {
String in = past ? "" : "in ";
String ago = past ? " ago" : "";
long diff = diffSec;
if( diff < 30 ) return in + "few moments" + ago;
if( diff < 80 ) return in + "a minute" + ago;
if( diff < 140 ) return in + "2 minutes" + ago;
if( diff < 3540 ) return in + diff/60 + " minutes" + ago;
if( diff < 4000 ) return in + "an hour" + ago;
//if( diff < 7200 ) return "an hour and something" + ago;
// Hours
diff /= 3600;
if( diff < 24 ) return in + diff + " hours" + ago;
if( diff < 48 && ! sameDay ) return "yesterday";
long diffDays = diff /= 24; // Days
if( diff < 7 ) return in + diff + " days" + ago;
if( diff < 8 ) return in + "a week" + ago;
if( diff < 14 ) return in + diff + " days" + ago;
long weeks = diff / 7;
if( weeks < 4 ) return in + diff + " weeks" + ago;
if( weeks < 5 ) return in + "a month" + ago;
if( weeks < 8 ) return in + diff + " weeks" + ago;
diff /= 30; // Months, cca.
if( diff < 12 ) return in + diff + " months" + ago;
if( diff < 13 ) return in + "a year" + ago;
if( diff < 24 ) return in + "a year " + (diff % 12) + " months" + ago;
if( diff < 48 ) return in + (diff/12) + " yrs " + (diff % 12) + " months" + ago;
diff = diffDays / 365; // Years, cca.
if( diff < 200 ) return in + diff + " years" + ago;
if( diff < 1000 ) return in + "few centuries" + ago;
return past ? "ages ago" : "in eternity";
}
}
| [
"zizka@seznam.cz"
] | zizka@seznam.cz |
b9fe2f3a26089751c1b95aef1641382e2335e1b9 | 0613bb6cf1c71b575419651fc20330edb9f916d2 | /CheatBreaker/src/main/java/net/minecraft/network/play/server/S3BPacketScoreboardObjective.java | a0c5e8ddedd9f7b0a027c9701c85dcffa9e06e4a | [] | no_license | Decencies/CheatBreaker | 544fdae14e61c6e0b1f5c28d8c865e2bbd5169c2 | 0cf7154272c8884eee1e4b4c7c262590d9712d68 | refs/heads/master | 2023-09-04T04:45:16.790965 | 2023-03-17T09:51:10 | 2023-03-17T09:51:10 | 343,514,192 | 98 | 38 | null | 2023-08-21T03:54:20 | 2021-03-01T18:18:19 | Java | UTF-8 | Java | false | false | 1,959 | java | package net.minecraft.network.play.server;
import java.io.IOException;
import net.minecraft.network.INetHandler;
import net.minecraft.network.Packet;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.play.INetHandlerPlayClient;
import net.minecraft.scoreboard.ScoreObjective;
public class S3BPacketScoreboardObjective extends Packet
{
private String field_149343_a;
private String field_149341_b;
private int field_149342_c;
public S3BPacketScoreboardObjective() {}
public S3BPacketScoreboardObjective(ScoreObjective p_i45224_1_, int p_i45224_2_)
{
this.field_149343_a = p_i45224_1_.getName();
this.field_149341_b = p_i45224_1_.getDisplayName();
this.field_149342_c = p_i45224_2_;
}
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer p_148837_1_) throws IOException
{
this.field_149343_a = p_148837_1_.readStringFromBuffer(16);
this.field_149341_b = p_148837_1_.readStringFromBuffer(32);
this.field_149342_c = p_148837_1_.readByte();
}
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer p_148840_1_) throws IOException
{
p_148840_1_.writeStringToBuffer(this.field_149343_a);
p_148840_1_.writeStringToBuffer(this.field_149341_b);
p_148840_1_.writeByte(this.field_149342_c);
}
public void processPacket(INetHandlerPlayClient p_148833_1_)
{
p_148833_1_.handleScoreboardObjective(this);
}
public String func_149339_c()
{
return this.field_149343_a;
}
public String func_149337_d()
{
return this.field_149341_b;
}
public int func_149338_e()
{
return this.field_149342_c;
}
public void processPacket(INetHandler p_148833_1_)
{
this.processPacket((INetHandlerPlayClient)p_148833_1_);
}
}
| [
"66835910+Decencies@users.noreply.github.com"
] | 66835910+Decencies@users.noreply.github.com |
a0cbbd356dc896405ad704579f0747e0ee2ebc22 | 413f5a7e33d184ecb44ebfc63a378da39f202461 | /cloud-may-server/src/main/java/nio/BuffersUtils.java | 908e743a09268b2030bc5f024ccd2f59f430af80 | [] | no_license | LevinMK23/cloud-may-2021 | 08fd7561940150bb2fdb16079ac82e2704d8f2f0 | 829e8cc603943bd3dc7bcb937bc92c4d42192d23 | refs/heads/master | 2023-05-07T21:07:42.315301 | 2021-06-01T18:30:29 | 2021-06-01T18:30:29 | 366,480,681 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 945 | java | package nio;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.charset.StandardCharsets;
public class BuffersUtils {
public static void main(String[] args) throws IOException {
ByteBuffer buffer = ByteBuffer.allocate(5);
RandomAccessFile raf = new RandomAccessFile("cloud-may-server/src/main/resources/nio/1.txt", "rw");
FileChannel fileChannel = raf.getChannel();
int read = 0;
while ((read = fileChannel.read(buffer)) != -1) {
buffer.flip();
while (buffer.hasRemaining()) {
System.out.print((char) buffer.get());
}
buffer.clear();
}
buffer.clear();
//fileChannel.position(0);
fileChannel.write(ByteBuffer.wrap("Hello".getBytes(StandardCharsets.UTF_8)));
}
}
| [
"mikelevin@yandex-team.ru"
] | mikelevin@yandex-team.ru |
9b673b3de380b5bff179fb969a8287b50e59fc65 | bc9d05c50461d0eec4ca1026b438a180eed5f014 | /src/main/java/com/shishu/utility/exception/BusinessException.java | 2bcb9495a0dcadb3bf41498dd1ef89090630466a | [] | no_license | chuckma/utility | 4c7edcf11ee350b2624eaab47c4cf085d2b54832 | 614fe2eb494e34c880540449bf155fd3d3e8dd50 | refs/heads/master | 2021-01-12T08:56:00.063908 | 2016-12-17T13:09:38 | 2016-12-17T13:09:38 | 76,724,097 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,945 | java | package com.shishu.utility.exception;
import java.util.Locale;
/**
*
* 业务异常基类.
* @author: qiaoel@zjhcsosft.com
* @date: 2014年2月24日 下午6:58:49
*/
@SuppressWarnings("serial")
public class BusinessException extends RuntimeException {
private Object[] args;
private String message = "";
private String code = "";
// private ErrorMessage errorMessage;
public BusinessException() {
}
public BusinessException(String message){
this.setMessage(message);
}
private static String createFriendlyErrMsg(String msgBody){
String prefixStr = "抱歉,";
String suffixStr = " 请稍后再试或与管理员联系!";
StringBuffer friendlyErrMsg = new StringBuffer("");
friendlyErrMsg.append(prefixStr);
friendlyErrMsg.append(msgBody);
friendlyErrMsg.append(suffixStr);
return friendlyErrMsg.toString();
}
public BusinessException(String messageCode, Object... args) {
message = ErrorMessage.getErrorMessage(messageCode, args);
}
/**
* 为了保持兼容,保留了这个方法,但是原功能已经不存在,请不要再使用这个方法
*/
public BusinessException(String messageCode, Locale locale, Object... args) {
message = ErrorMessage.getErrorMessage(messageCode, args);
}
public BusinessException(String message, Throwable cause) {
super(message, cause);
}
@Override
public String getMessage() {
return message;
}
public BusinessException(Throwable cause) {
super(cause);
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public void setMessage(String message) {
this.message = message;
}
public Object[] getArgs() {
return args;
}
public void setArgs(Object[] args) {
this.args = args;
}
}
| [
"robbincen@163.com"
] | robbincen@163.com |
cb243b0d5e94975f5ba82bfcf092f3d86114dd45 | 07f4bd3ac0228a06f0e6470dd09867d31069b0c8 | /rule-engine-web/src/main/java/com/engine/web/service/RulePublishService.java | 3163ddcb0f3c3e7f507394265eefd555e8282c78 | [
"Apache-2.0"
] | permissive | landscape-Melo/rule-engine | e65d0c2966ed6ad671a7a26cb6cae4419051d425 | 46335c3d23a432cb46a35716bbeb1752bd6b0368 | refs/heads/master | 2023-01-13T09:14:57.389058 | 2020-11-18T16:51:05 | 2020-11-18T16:51:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 537 | java | package com.engine.web.service;
import com.engine.core.rule.Rule;
import java.util.List;
/**
* 〈一句话功能简述〉<br>
* 〈〉
*
* @author dingqianwen
* @date 2020/9/4
* @since 1.0.0
*/
public interface RulePublishService {
/**
* 获取所有的已发布规则
*
* @return rule
*/
List<Rule> getAllPublishRule();
/**
* 根据规则code,查询发布规则
*
* @param ruleCode 规则code
* @return 规则
*/
Rule getPublishRuleByCode(String ruleCode);
}
| [
"761945125@qq.com"
] | 761945125@qq.com |
bfdf6c68ffa5f54edbdcb9502b35072ca438a68a | 023f8818650434b4f5745d73c228e6c2fe61187b | /src/vnmrj/src/vnmr/util/VSliderMotifUI.java | 1f3dc98eecea4a247242b28b40281c7797fc32ab | [
"Apache-2.0",
"GPL-3.0-only"
] | permissive | OpenVnmrJ/OpenVnmrJ | da72bcb6dc10b1a7b7a56522e0d1028a06aa9fe6 | 0a35daed7d5ea2f512c5aa6248045979002c5ea1 | refs/heads/master | 2023-08-29T03:14:51.582756 | 2023-08-28T20:56:16 | 2023-08-28T20:56:16 | 50,125,031 | 39 | 112 | Apache-2.0 | 2023-09-08T19:54:30 | 2016-01-21T17:42:10 | C | UTF-8 | Java | false | false | 5,951 | java | /*
* Copyright (C) 2015 University of Oregon
*
* You may distribute under the terms of either the GNU General Public
* License or the Apache License, as specified in the LICENSE file.
*
* For more information, see the LICENSE file.
*/
package vnmr.util;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.plaf.*;
import javax.swing.Timer.*;
import javax.swing.plaf.basic.BasicSliderUI;
import com.sun.java.swing.plaf.motif.MotifSliderUI;
/**
* Motif VSlider
*/
public class VSliderMotifUI extends MotifSliderUI implements VSliderUI {
private sliderMouseListener ml;
private boolean inThumb = false;
private int smallStep = 1;
private int largeStep = 2;
private int moveStep = 0;
private int button = 1;
private int curX = 0;
private int curY = 0;
private boolean negativeMove;
private Timer sliderTimer;
private sliderTimerListener sliderListener;
public VSliderMotifUI(JSlider b) {
super(b);
}
public static ComponentUI createUI(JComponent b) {
return new VSliderMotifUI((JSlider)b);
}
public void installUI(JComponent c) {
super.installUI(c);
c.removeMouseListener(trackListener);
c.removeMouseMotionListener(trackListener);
ml = new sliderMouseListener();
c.addMouseListener(ml);
c.addMouseMotionListener(ml);
sliderListener = new sliderTimerListener();
sliderTimer = new Timer( 100, sliderListener );
sliderTimer.setInitialDelay( 500 );
}
public void setEditMode(boolean s) {
if (s) {
slider.removeMouseListener(ml);
slider.removeMouseMotionListener(ml);
}
else {
slider.addMouseListener(ml);
slider.addMouseMotionListener(ml);
}
}
public void setSmallStep(int a) {
smallStep = a;
}
public void setLargeStep(int a) {
largeStep = a;
}
public boolean toScroll() {
Rectangle r = thumbRect;
/*
switch ( slider.getOrientation() ) {
case JSlider.VERTICAL:
if (negativeMove) {
if (r.y + r.height <= curY)
return false;
}
else if (r.y >= curY)
return false;
break;
default:
if (negativeMove) {
if (r.x + r.width <= curX)
return false;
}
else if (r.x >= curX)
return false;
break;
}
*/
if (negativeMove) {
if (slider.getValue() <= slider.getMinimum())
return false;
}
else {
if (slider.getValue() >= slider.getMaximum())
return false;
}
return true;
}
private void moveOneStep() {
int v = slider.getValue();
if (negativeMove) {
v = v - moveStep;
if (v <= slider.getMinimum())
v = slider.getMinimum();
}
else {
v = v + moveStep;
if (v >= slider.getMaximum())
v = slider.getMaximum();
}
slider.setValue( v );
}
private class sliderMouseListener extends MouseInputAdapter {
private int offset;
public void mouseReleased(MouseEvent e) {
inThumb = false;
sliderTimer.stop();
if ( !slider.isEnabled() )
return;
slider.setValueIsAdjusting(false);
}
public void mouseDragged( MouseEvent e ) {
if ( !slider.isEnabled() )
return;
if (!inThumb)
return;
int thumbMiddle = 0;
switch ( slider.getOrientation() ) {
case JSlider.VERTICAL:
int thumbTop = e.getY() - offset;
thumbMiddle = thumbTop + thumbRect.height / 2;
slider.setValue( valueForYPosition( thumbMiddle ) );
break;
default:
int thumbLeft = e.getX() - offset;
thumbMiddle = thumbLeft + thumbRect.width / 2;
slider.setValue( valueForXPosition( thumbMiddle ) );
break;
}
}
public void mousePressed(MouseEvent e) {
if ( !slider.isEnabled() )
return;
slider.requestFocus();
curX = e.getX();
curY = e.getY();
slider.setValueIsAdjusting(true);
sliderTimer.stop();
if ( thumbRect.contains(curX, curY) ) {
switch ( slider.getOrientation() ) {
case JSlider.VERTICAL:
offset = curY - thumbRect.y;
break;
case JSlider.HORIZONTAL:
offset = curX - thumbRect.x;
break;
}
inThumb = true;
return;
}
button = 1;
moveStep = smallStep;
int modify = e.getModifiers();
if ((modify & InputEvent.BUTTON2_MASK) != 0) {
button = 2;
switch ( slider.getOrientation() ) {
case JSlider.VERTICAL:
slider.setValue( valueForYPosition( curY ) );
offset = thumbRect.height / 2;
break;
default:
slider.setValue( valueForXPosition( curX ) );
offset = thumbRect.width / 2;
break;
}
inThumb = true;
return;
}
if ((modify & InputEvent.BUTTON3_MASK) != 0) {
button = 3;
moveStep = largeStep;
}
switch ( slider.getOrientation() ) {
case JSlider.VERTICAL:
if (curY < thumbRect.y)
negativeMove = true;
else
negativeMove = false;
break;
default:
if (curX < thumbRect.x)
negativeMove = true;
else
negativeMove = false;
break;
}
moveOneStep();
if (toScroll())
sliderTimer.start();
}
public void mouseMoved(MouseEvent e) {
}
} // class sliderMouseListener
private class sliderTimerListener implements ActionListener {
public sliderTimerListener() {
}
public void actionPerformed(ActionEvent e) {
moveOneStep();
if (!toScroll())
sliderTimer.stop();
}
} // class sliderTimerListener
}
| [
"timburrow@me.com"
] | timburrow@me.com |
061a02a73fde06fe09459eee74f2c2f588a24d60 | 768ad165559d7f7786119b53063c16b6bc0e5013 | /Erp/src/com/yf/erp/test/OnLine.java | 5e66191957577d46b9515c09b39cc2ea89d30451 | [] | no_license | yanglangfei/ErpServer | 27719620774e6764417c6d0332b8f4d25afa5a2b | b537b15f55701a712fc6c106c20360d46aa4dd6c | refs/heads/master | 2021-01-18T23:38:15.455299 | 2017-03-20T10:02:09 | 2017-03-20T10:02:09 | 72,731,717 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 3,297 | java | package com.yf.erp.test;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.http.util.TextUtils;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.yf.erp.bean.MessageObject;
import com.yf.erp.util.LogUtil;
import com.yf.erp.util.StringUtil;
/**
* @author 杨朗飞
*2017年3月20日 下午1:48:39
*
*/
public class OnLine extends HttpServlet {
private static final long serialVersionUID = 1L;
private List<String> users=new ArrayList<String>();
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setCharacterEncoding("UTF-8");
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html");
PrintWriter out = response.getWriter();
Cookie[] cookies = request.getCookies();
HttpSession session = request.getSession();
String top = request.getParameter("top");
LogUtil.print(top+">>>>", true);
if(cookies!=null){
for (Cookie cookie : cookies) {
String name = cookie.getName();
String value = cookie.getValue();
}
}
//获取所有参数名称
Enumeration<String> parameterNames = request.getParameterNames();
//获取所有header名称
Enumeration<String> headerNames = request.getHeaderNames();
if(parameterNames!=null){
while (parameterNames.hasMoreElements()) {
String paramterName = (String) parameterNames.nextElement();
LogUtil.print("name:"+paramterName+" value:"+request.getParameter(paramterName), true);
}
}
if(headerNames!=null){
while (headerNames.hasMoreElements()) {
String name = (String) headerNames.nextElement();
LogUtil.print("name="+name+" value="+request.getHeader(name), true);
}
}
String user=request.getParameter("user");
if(!TextUtils.isEmpty(user)){
if(!users.contains(user)){
users.add(user);
System.out.println("新用户");
}else{
System.out.println("旧用户");
}
}
int topId = HandleMessage.getTopId(getServletContext());
MessageObject msg=new MessageObject(topId, "hello"+topId, 1, 1, 0);
HandleMessage.saveMessage(getServletContext(), msg);
JsonArray array=new JsonArray();
for(String u : users){
JsonObject object=new JsonObject();
object.addProperty("name", u);
array.add(object);
}
//out.println(array.toString());
List<MessageObject> message = HandleMessage.getMessage(getServletContext(), StringUtil.isNotNull(top)&&StringUtil.isInteger(top) ? Integer.parseInt(top) : 0,true);
JsonArray msgArray=new JsonArray();
for (MessageObject messageObject : message) {
JsonObject object=new JsonObject();
object.addProperty("msg", messageObject.getMsg());
object.addProperty("id",messageObject.getId());
msgArray.add(object);
}
out.print(msgArray.toString());
out.flush();
out.close();
}
}
| [
"185601452@qq.com"
] | 185601452@qq.com |
cab41e38e67fefb0bbdf3a84fc0ce4398f912a0a | 0be6826ea59357f42ffe0aa07628abc2c9c556c2 | /hiz-web-services/src/com/tactusoft/webservice/client/holders/BapicurefHolder.java | 2a146c28932d24d91934f5140cb1649f05bf94dc | [] | no_license | tactusoft/anexa | 900fdf1072ac4ff624877680dc4981ac3d5d380b | 8db0e544c18f958d8acd020dc70355e8a5fa76e9 | refs/heads/master | 2021-01-12T03:29:27.472185 | 2017-06-22T03:45:44 | 2017-06-22T03:45:44 | 78,216,940 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 508 | java | /**
* BapicurefHolder.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
*/
package com.tactusoft.webservice.client.holders;
public final class BapicurefHolder implements javax.xml.rpc.holders.Holder {
public com.tactusoft.webservice.client.objects.Bapicuref value;
public BapicurefHolder() {
}
public BapicurefHolder(com.tactusoft.webservice.client.objects.Bapicuref value) {
this.value = value;
}
}
| [
"carlossarmientor@gmail.com"
] | carlossarmientor@gmail.com |
5c2e797b16edcff9f11f5418eb750a7b84fbed1d | 1c51de2d06863702100414a55d025785dd9e7ae8 | /rewards-ksession-per-process/ejb/src/main/java/com/sample/ProcessOperationException.java | 1a044b97d60b1f40e59c79b58ec2fbf5abffc4fc | [] | no_license | ibrahima-c/jbpm5example | cd574eadeaa1477fed18127a2ea96a1989b06409 | 6e7d90d2c8a635d19a4582c6bf80cdbf7544590f | refs/heads/master | 2021-05-30T00:11:58.873889 | 2015-07-27T08:11:36 | 2015-07-27T08:11:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 414 | java | package com.sample;
/**
*
* Used for recoverable exception like OptimisticLockException
*
*/
public class ProcessOperationException extends Exception {
private static final long serialVersionUID = 1L;
public ProcessOperationException(String message, Throwable cause) {
super(message, cause);
}
public ProcessOperationException(String message) {
super(message);
}
}
| [
"toshiyakobayashi@gmail.com"
] | toshiyakobayashi@gmail.com |
7fdd1ec5b58dce7eb4a9677655dd555a01064383 | 3ceb6a7eca73df1207d0fddfae65dd44283b8ab4 | /MeerkatProject/MeerkatUI/src/ui/dialogwindow/AboutMeerkatDialog.java | 69fa86b55d5d384bdc9d544030fa5e54cc1d6647 | [] | no_license | mahdi-zafarmand/MeerkatProject | 7047cd0f72fe9bb796696d50834ce7b0bec0bf64 | 173cea98154381d9e33ca58f8cca9a4223376fc5 | refs/heads/master | 2023-07-02T04:55:41.801035 | 2021-08-04T14:34:27 | 2021-08-04T14:34:27 | 372,331,365 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 7,806 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ui.dialogwindow;
import analysisscreen.AnalysisController;
import config.LangConfig;
import config.StatusMsgsConfig;
import java.awt.Desktop;
import java.net.URI;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Hyperlink;
import javafx.scene.control.Label;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.Border;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.stage.Modality;
import javafx.stage.Stage;
import meerkat.registration.MeerkatSoftwareValidator;
/**
* Class Name : AboutMeerkatDialog
* Created Date : 2016-01-18
* Description : Information about Meerkat
* Version : 1.0
* @author : Talat
*
* EDIT HISTORY (most recent at the top)
* Date Author Description
*
*
*/
public class AboutMeerkatDialog {
/* *************************************************************** */
/* ******************* VARIABLES *********************** */
/* *************************************************************** */
private static String strAboutMeerkat = "" ;
/* *************************************************************** */
/* **************** GETTERS & SETTERS ****************** */
/* *************************************************************** */
public static String getAboutMeerkat () {
return strAboutMeerkat ;
}
/* *************************************************************** */
/* ******************** METHODS ************************ */
/* *************************************************************** */
/**
* Method Name : setParameters()
* Created Date : 2016-01-18
* Description : Sets the parameters of the About Meerkat that are to be displayed in the dialog box on clicking the menu option
* Version : 1.0
* @author : Talat
*
* @param pstrAboutMeerkat : String
*
* EDIT HISTORY (most recent at the top)
* Date Author Description
*
*
*/
public static void setParameters (
String pstrAboutMeerkat
) {
strAboutMeerkat = pstrAboutMeerkat ;
}
/**
* Method Name : Display()
* Created Date : 2016-01-18
* Description : The Dialog Box to be showed when the option is clicked
* Version : 1.0
* @author : Talat
*
* @param pController ; AnalysisController
* @param pstrTitle : String
*
* EDIT HISTORY (most recent at the top)
* Date Author Description
*
*
*/
public static void Display(AnalysisController pController, String pstrTitle) {
Stage stgAboutMeerkatDialog = new Stage();
stgAboutMeerkatDialog.initModality(Modality.APPLICATION_MODAL);
//Label lblAboutMeerkat = new Label(strAboutMeerkat);
String aboutMeerkat = "Meerkat is a social network analysis tool developed at AMII, Department of Computing Science, University of Alberta, "
+ "under the leadership of Dr. Osmar Zaïane.";
String meerkatURL = "https://www.amii.ca/meerkat";
Hyperlink link = new Hyperlink(meerkatURL);
link.setBorder(Border.EMPTY);
link.setPadding(new Insets(0, 0, 0, 0));
link.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent e) {
try{
if( Desktop.isDesktopSupported() )
{
new Thread(() -> {
try {
Desktop.getDesktop().browse( new URI( meerkatURL ) );
} catch (Exception et) {
System.out.println("Exception in hyperlink click in AboutMeerkat:Disply()");
}
}).start();
}
stgAboutMeerkatDialog.close();
}catch(Exception exp){
System.out.println("Exception in hyperlink click in AboutMeerkat:Disply()");
}
}
});
String meerkatEmail = "meerkat@cs.ualberta.ca ";
String details = "For more details please visit us online at: ";
String emailDetails = " or email us at: meerkat@cs.ualberta.ca";
String meerkatVersion = "Meerkat Version: "+MeerkatSoftwareValidator.getMeerkatVersion();
String meerkatReleaseDate = "Version Release Date: 2018 February 02";
String meerkatcurrentDevs = "Current Developers : Sankalp Prabhakar, Talat Iqbal Syed";
String meerkatPastDevs = "Past and Present Team Members (alphabetically): Abhimanyu Panwar, Ali Yadollahi, Afra Abnar, Amin Travelsi, Eric Verbeek, Farzad Sangi, Justin Fagnan, \n" +
"Jiyang Chen, Matt Gallivan, Mansoureh Takaffoli, Reihaneh Rabbany, Sankalp Prabhakar, Shiva Zamani Gharaghooshi, "
+ "Talat Iqbal Syed, Xiaoxiao Li.";
VBox labels = new VBox();
Label label1 = new Label(aboutMeerkat);
Label label2 = new Label(details);
Label label3 = new Label(emailDetails);
HBox hbox = new HBox();
hbox.getChildren().addAll(label2, link, label3);
Label version = new Label(meerkatVersion);
Label releaseDate = new Label(meerkatReleaseDate);
Label currDevs = new Label(meerkatcurrentDevs);
Label pastDevs = new Label(meerkatPastDevs);
labels.getChildren().addAll(label1,hbox,version,releaseDate,currDevs,pastDevs);
labels.setPadding(new Insets(5, 10, 5, 10));
labels.setSpacing(10);
// Build a VBox
Button btnOK = new Button(LangConfig.GENERAL_OK);
VBox vboxRows = new VBox(5);
vboxRows.setPadding(new Insets(5,10,5,10));
vboxRows.getChildren().addAll(labels, btnOK);
vboxRows.setAlignment(Pos.CENTER);
Scene scnAboutMeerkatDialog = new Scene(vboxRows);
scnAboutMeerkatDialog.addEventFilter(KeyEvent.KEY_PRESSED, (KeyEvent evt) -> {
if (evt.getCode().equals(KeyCode.ESCAPE)) {
stgAboutMeerkatDialog.close();
pController.updateStatusBar(false, StatusMsgsConfig.WINDOW_CLOSED);
}
});
//stgAboutMeerkatDialog.initModality(Modality.WINDOW_MODAL);
stgAboutMeerkatDialog.setTitle(pstrTitle);
stgAboutMeerkatDialog.setResizable(false);
// Events
btnOK.setOnAction((ActionEvent e) -> {
// Close the dialog box
stgAboutMeerkatDialog.close();
// Update the Status bar
pController.updateStatusBar(false, StatusMsgsConfig.ABOUT_CLOSED);
});
stgAboutMeerkatDialog.setScene(scnAboutMeerkatDialog);
stgAboutMeerkatDialog.show();
// Update the status bar
pController.updateStatusBar(true, StatusMsgsConfig.ABOUT_SHOW);
}
} | [
"zafarmand.mahdi@gmail.com"
] | zafarmand.mahdi@gmail.com |
7f95bc13538209c81a9f21cac1f0db8d5928b340 | 605c28cc4d7ffd35583f6aba8cc58c7068f237e2 | /src/com/dxjr/base/mapper/BaseMailSendRecordMapper.java | b5314bb5fb2a21890a66732c3d6bb5a619490641 | [] | no_license | Lwb6666/dxjr_portal | 7ffb56c79f0bd07a39ac94f30b2280f7cc98a2e4 | cceef6ee83d711988e9d1340f682e0782e392ba0 | refs/heads/master | 2023-04-21T07:38:25.528219 | 2021-05-10T02:47:22 | 2021-05-10T02:47:22 | 351,003,513 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,175 | java | package com.dxjr.base.mapper;
import com.dxjr.base.entity.MailSendRecord;
/**
*
* <p>
* Description:邮件发送记录数据访问类<br />
* </p>
*
* @title BaseMailSendRecordMapper.java
* @package com.dxjr.base.mapper
* @author yangshijin
* @version 0.1 2014年9月15日
*/
public interface BaseMailSendRecordMapper {
/**
*
* <p>
* Description:插入记录到关联人表,返回新增的主键ID<br />
* </p>
*
* @author yangshijin
* @version 0.1 2014年9月15日
* @param mailSendRecord
* @return
* @throws Exception int
*/
public int insertEntity(MailSendRecord mailSendRecord) throws Exception;
/**
*
* <p>
* Description:根据id查询记录<br />
* </p>
*
* @author yangshijin
* @version 0.1 2014年9月15日
* @param id
* @return
* @throws Exception MailSendRecord
*/
public MailSendRecord queryById(Integer id) throws Exception;
/**
*
* <p>
* Description:更新记录<br />
* </p>
*
* @author yangshijin
* @version 0.1 2014年9月15日
* @param mailSendRecord
* @return
* @throws Exception int
*/
public int updateEntity(MailSendRecord mailSendRecord) throws Exception;
}
| [
"1677406532@qq.com"
] | 1677406532@qq.com |
9d377bb13e8ba4aa8b087879152cd67ea2305c37 | a55b85b6dd6a4ebf856b3fd80c9a424da2cd12bd | /core/src/test/java/org/marketcetera/marketdata/MockDataRequestTranslator.java | e8722a4b5f76a22ee5145b348676c1399d7eae6b | [] | no_license | jeffreymu/marketcetera-2.2.0-16652 | a384a42b2e404bcc6140119dd2c6d297d466596c | 81cdd34979492f839233552432f80b3606d0349f | refs/heads/master | 2021-12-02T11:18:01.399940 | 2013-08-09T14:36:21 | 2013-08-09T14:36:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,236 | java | package org.marketcetera.marketdata;
import org.marketcetera.core.CoreException;
/**
* Test implementation of <code>AbstractMessageTranslator</code>.
*
* @author <a href="mailto:colin@marketcetera.com">Colin DuPlantis</a>
* @version $Id: MockDataRequestTranslator.java 16154 2012-07-14 16:34:05Z colin $
* @since 0.5.0
*/
public class MockDataRequestTranslator
implements DataRequestTranslator<String>
{
private static boolean sTranslateThrows = false;
/**
* Create a new TestMessageTranslator instance.
*
*/
public MockDataRequestTranslator()
{
}
public static boolean getTranslateThrows()
{
return sTranslateThrows;
}
public static void setTranslateThrows(boolean inTranslateThrows)
{
sTranslateThrows = inTranslateThrows;
}
/* (non-Javadoc)
* @see org.marketcetera.marketdata.DataRequestTranslator#translate(org.marketcetera.module.DataRequest)
*/
@Override
public String fromDataRequest(MarketDataRequest inMessage)
throws CoreException
{
if(getTranslateThrows()) {
throw new NullPointerException("This exception is expected");
}
return inMessage.toString();
}
}
| [
"vladimir_petrovich@yahoo.com"
] | vladimir_petrovich@yahoo.com |
3ac75efea90a4c11e7a58e03f7abd7336d21e91e | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/java-design-patterns/learning/3497/UserCreatedEventHandler.java | beaa3679281860c6eebd32ab0b476937f6c576e9 | [] | 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 | 1,706 | java | /**
* The MIT License
* Copyright (c) 2014-2016 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.eda.handler;
import com.iluwatar.eda.event.UserCreatedEvent;
import com. iluwatar.eda.framework.Handler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Handles the {@link UserCreatedEvent} message.
*/
public class UserCreatedEventHandler implements Handler<UserCreatedEvent> {
private static final Logger LOGGER = LoggerFactory.getLogger(UserCreatedEventHandler.class);
@Override
public void onEvent(UserCreatedEvent event) {
LOGGER.info("User '{}' has been Created!", event.getUser().getUsername());
}
}
| [
"bloriot97@gmail.com"
] | bloriot97@gmail.com |
64257bfb95f6f8ae979e2d607870ec2642f0ab45 | 816e53ced1f741006ed5dd568365aba0ec03f0cf | /TeamBattle/temp/src/minecraft/net/minecraft/item/ItemHangingEntity.java | 657e5745e4aed166a435ff7c8c8e1f6329a25d89 | [] | no_license | TeamBattleClient/TeamBattleRemake | ad4eb8379ebc673ef1e58d0f2c1a34e900bd85fe | 859afd1ff2cd7527abedfbfe0b3d1dae09d5cbbc | refs/heads/master | 2021-03-12T19:41:51.521287 | 2015-03-08T21:34:32 | 2015-03-08T21:34:32 | 31,624,440 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,063 | java | package net.minecraft.item;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityHanging;
import net.minecraft.entity.item.EntityItemFrame;
import net.minecraft.entity.item.EntityPainting;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraft.world.World;
public class ItemHangingEntity extends Item {
private final Class field_82811_a;
private static final String __OBFID = "CL_00000038";
public ItemHangingEntity(Class p_i45342_1_) {
this.field_82811_a = p_i45342_1_;
this.func_77637_a(CreativeTabs.field_78031_c);
}
public boolean func_77648_a(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) {
if(p_77648_7_ == 0) {
return false;
} else if(p_77648_7_ == 1) {
return false;
} else {
int var11 = Direction.field_71579_d[p_77648_7_];
EntityHanging var12 = this.func_82810_a(p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_, var11);
if(!p_77648_2_.func_82247_a(p_77648_4_, p_77648_5_, p_77648_6_, p_77648_7_, p_77648_1_)) {
return false;
} else {
if(var12 != null && var12.func_70518_d()) {
if(!p_77648_3_.field_72995_K) {
p_77648_3_.func_72838_d(var12);
}
--p_77648_1_.field_77994_a;
}
return true;
}
}
}
private EntityHanging func_82810_a(World p_82810_1_, int p_82810_2_, int p_82810_3_, int p_82810_4_, int p_82810_5_) {
return (EntityHanging)(this.field_82811_a == EntityPainting.class?new EntityPainting(p_82810_1_, p_82810_2_, p_82810_3_, p_82810_4_, p_82810_5_):(this.field_82811_a == EntityItemFrame.class?new EntityItemFrame(p_82810_1_, p_82810_2_, p_82810_3_, p_82810_4_, p_82810_5_):null));
}
}
| [
"honzajurak@hotmail.co.uk"
] | honzajurak@hotmail.co.uk |
0132322a7d7063d6f70766fdf455484660194c67 | c66b5179a75c8ff48e59bc7fd5e7748bb97f4c67 | /hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/codesystems/ConditionalDeleteStatus.java | 9c902bf0f7b5f28c4227b50d790da18937090d85 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | hareemmughis/hapi-fhir | b0aa6e31cc1766f91b6b14f2cc4f6828c09b720d | 06f9d86bf1ff0aa4c630aaaf9049ee7a73482c27 | refs/heads/master | 2023-08-29T13:46:32.756125 | 2017-01-19T03:26:10 | 2017-01-19T03:26:10 | 79,456,893 | 0 | 0 | Apache-2.0 | 2022-10-20T07:50:11 | 2017-01-19T13:40:24 | Java | UTF-8 | Java | false | false | 3,897 | java | package org.hl7.fhir.dstu3.model.codesystems;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Tue, Dec 6, 2016 09:42-0500 for FHIR v1.8.0
import org.hl7.fhir.exceptions.FHIRException;
public enum ConditionalDeleteStatus {
/**
* No support for conditional deletes.
*/
NOTSUPPORTED,
/**
* Conditional deletes are supported, but only single resources at a time.
*/
SINGLE,
/**
* Conditional deletes are supported, and multiple resources can be deleted in a single interaction.
*/
MULTIPLE,
/**
* added to help the parsers
*/
NULL;
public static ConditionalDeleteStatus fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("not-supported".equals(codeString))
return NOTSUPPORTED;
if ("single".equals(codeString))
return SINGLE;
if ("multiple".equals(codeString))
return MULTIPLE;
throw new FHIRException("Unknown ConditionalDeleteStatus code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case NOTSUPPORTED: return "not-supported";
case SINGLE: return "single";
case MULTIPLE: return "multiple";
default: return "?";
}
}
public String getSystem() {
return "http://hl7.org/fhir/conditional-delete-status";
}
public String getDefinition() {
switch (this) {
case NOTSUPPORTED: return "No support for conditional deletes.";
case SINGLE: return "Conditional deletes are supported, but only single resources at a time.";
case MULTIPLE: return "Conditional deletes are supported, and multiple resources can be deleted in a single interaction.";
default: return "?";
}
}
public String getDisplay() {
switch (this) {
case NOTSUPPORTED: return "Not Supported";
case SINGLE: return "Single Deletes Supported";
case MULTIPLE: return "Multiple Deletes Supported";
default: return "?";
}
}
}
| [
"jamesagnew@gmail.com"
] | jamesagnew@gmail.com |
5308663ee452263391398d48e91937eab16d52b0 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/26/26_af515e27d113f8ebc897e10a6bf3cb941f9524d3/PuppetMaster/26_af515e27d113f8ebc897e10a6bf3cb941f9524d3_PuppetMaster_t.java | b932665767a63ab381ac20ec5723c47ef879ddcc | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 5,032 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package simulator.agents;
import agents.AgentInterface;
import jade.core.AID;
import jade.core.Agent;
import jade.lang.acl.ACLMessage;
import jade.wrapper.AgentController;
import jade.wrapper.StaleProxyException;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Zagadka
*/
public class PuppetMaster extends Agent implements AgentInterface {
ArrayList<String> usedNames = new ArrayList<String>();
ArrayList<String> names = new ArrayList<String>();
@Override
public void setup() {
System.out.println("Hello I am the PuppetMaster agent my name is: "
+ this.getLocalName());
//start the actor controller:
try {
((AgentController) getContainerController().createNewAgent(ACTORCONTROL, "simulator.agents.Controller", null)).start();
} catch (StaleProxyException ex) {
Logger.getLogger(PuppetMaster.class.getName()).log(Level.SEVERE, null, ex);
}
//start the collector agent:
try {
((AgentController) getContainerController().createNewAgent(COLLECTOR, "simulator.agents.Collector", null)).start();
} catch (StaleProxyException ex) {
Logger.getLogger(PuppetMaster.class.getName()).log(Level.SEVERE, null, ex);
}
doWait(1000);
//startNewPerson("now");
//Starting up all the stores:
try {
Scanner s = new Scanner(new BufferedReader(new FileReader("src/stores.txt")));
while (s.hasNextLine()) {
Scanner s2 = new Scanner(s.nextLine());
s2.useDelimiter(",");
//set delimiter to ,<space>
String name = s2.next();
//String pos = s.next();
Object[] args = {s2.next(), s2.next()};
try {
startNewStore(name, args);
} catch (StaleProxyException ex) {
Logger.getLogger(PuppetMaster.class.getName()).log(Level.SEVERE, null, ex);
}
}
} catch (FileNotFoundException ex) {
System.out.println("src/stores.txt not found");
}
//starting up the Crosssections:
try {
Scanner s = new Scanner(new BufferedReader(new FileReader("src/cross.txt")));
while (s.hasNextLine()) {
Scanner s2 = new Scanner(s.nextLine());
s2.useDelimiter(",");
ArrayList<String> tmp = new ArrayList<String>();
String res, name;
name = s2.next();
res = s2.next();
/*Sending the position data of the crossection to the PersonControl
* so that it knows where it can legally generate persons:
*/
ACLMessage aclMessage = new ACLMessage(ACLMessage.INFORM);
aclMessage.setConversationId("fullcrosssectiondata");
AID r = new AID(ACTORCONTROL, AID.ISLOCALNAME);
aclMessage.addReceiver(r);
aclMessage.setContent(res);
this.send(aclMessage);
/*...............................................................*/
//put the remainder in a zone array:
while (s2.hasNext()) {
String value = s2.next();
tmp.add(value);
System.out.print(value);
}
System.out.println(",");
Object[] args = new Object[tmp.size() + 1];
args[0] = res;
for (int i = 1; i <= tmp.size(); i++) {
args[i] = tmp.get(i - 1);
}
try {
startNewCrossSection(name, args);
} catch (StaleProxyException ex) {
Logger.getLogger(PuppetMaster.class.getName()).log(Level.SEVERE, null, ex);
}
}
} catch (FileNotFoundException ex) {
System.out.println("src/cross.txt not found");
}
}
private void startNewStore(String agentName, Object[] arguments) throws StaleProxyException {
((AgentController) getContainerController().createNewAgent(agentName, "agents.actors.GeneralStore", arguments)).start();
}
private void startNewCrossSection(String agentName, Object[] arguments) throws StaleProxyException {
((AgentController) getContainerController().createNewAgent(agentName, "agents.actors.CrossSection", arguments)).start();
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
96a5a1c92e8a5aab5b33b0cd7792293823bba78e | e10f31ab9ec97bb591d2079d58fdac2157863914 | /cb4j-core/src/main/java/io/github/benas/cb4j/core/api/BatchEngine.java | c4ac1c0e0ce4e0c94d70eb01a89ec00e92dd822a | [
"MIT"
] | permissive | natlantisprog/cb4j | ee7e70ef07c342da8a77a6b32d461bb67fe1e8a9 | 6cbc63611feab60d81ee36408bd3b46bf2a2eaa0 | refs/heads/master | 2021-01-24T20:59:50.175863 | 2013-09-21T21:16:48 | 2013-09-21T21:16:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,685 | java | /*
* The MIT License
*
* Copyright (c) 2013, benas (md.benhassine@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 io.github.benas.cb4j.core.api;
import java.util.concurrent.Callable;
/**
* Interface for batch engine.<br/>
*
* This interface should not be implemented directly, {@link io.github.benas.cb4j.core.impl.DefaultBatchEngineImpl} should be extended instead
*
* @author benas (md.benhassine@gmail.com)
*/
public interface BatchEngine extends Callable<BatchReport> {
/**
* initialize the engine.
*/
void init();
/**
* shutdown the engine.
*/
void shutdown();
}
| [
"md.benhassine@gmail.com"
] | md.benhassine@gmail.com |
c784c36b72759ba42a21e58b9bdab68f2a007e51 | 2c8931832908c4cdd18b0eb5aa314300449588b7 | /src/Day037_Inheritence/SubClass2.java | a05b94cc006f2a8f0e5096eaff71df86241118d4 | [] | no_license | KailibinuerAbuduaini/JavaStudyByKalbi | 46b3f4e4bb40230da73bf0b66309967e1afe40a2 | 37790f00294cb66ef61860bf91b5d7a73d5e0663 | refs/heads/master | 2020-09-08T22:40:30.172367 | 2020-05-03T22:22:27 | 2020-05-03T22:22:27 | 221,262,371 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 192 | java | package Day037_Inheritence;
public class SubClass2 {
// super(); it is calling the constructor from the parentclass
//this(); it is calling the constructor from child class constructor
}
| [
"myEmail@Gmail.com"
] | myEmail@Gmail.com |
ec4c65b76c7c3a105d702fe10a54c69152fca9e5 | e25091e6ebf0df0e68a701cd607c4e9b0a084986 | /saminda/cipres-airavata/cipres-portal/portal2/src/main/java/org/ngbw/web/model/impl/tool/clustalwValidator.java | de1e74b1bb701ad928f8949974ee38a71dfbecd5 | [
"Apache-2.0"
] | permissive | SciGaP/Cipres-Airavata-POC | d5c4d9054d497eec13aea1a8df75dbac292aa63c | a2f3dce75ce6c8e23c8cdde14ece708b5a0ad4ab | refs/heads/master | 2021-05-28T05:22:56.382757 | 2015-02-16T20:14:21 | 2015-02-16T20:14:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,153 | java | package org.ngbw.web.model.impl.tool;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.ngbw.sdk.api.tool.ParameterValidator;
import org.ngbw.sdk.common.util.BaseValidator;
import org.ngbw.sdk.database.TaskInputSourceDocument;
public class clustalwValidator implements ParameterValidator
{
private Set<String> requiredParameters;
private Set<String> requiredInput;
public clustalwValidator() {
requiredParameters = new HashSet<String>();
requiredInput = new HashSet<String>();
requiredParameters.add("runtime_");
requiredParameters.add("actions_");
}
public Map<String, String> validateParameters(Map<String, String> parameters) {
Map<String, String> errors = new HashMap<String, String>();
Set<String> missingRequired = validateRequiredParameters(parameters);
for (String missing : missingRequired) {
errors.put(missing, "You must enter a value for \"" + missing + "\"");
}
for (String param : parameters.keySet()) {
String error = validate(param, parameters.get(param));
if (error != null)
errors.put(param, error);
}
return errors;
}
public Map<String, String> validateInput(Map<String, List<TaskInputSourceDocument>> input) {
Map<String, String> errors = new HashMap<String, String>();
Set<String> missingRequired = validateRequiredInput(input);
for (String missing : missingRequired) {
errors.put(missing, "You must enter a value for \"" + missing + "\"");
}
for (String param : input.keySet()) {
String error = validate(param, input.get(param));
if (error != null)
errors.put(param, error);
}
return errors;
}
public String validate(String parameter, Object value) {
if (parameter.equals("runtime_")) {
if (BaseValidator.validateDouble(value) == false)
return "\"" + parameter + "\" must be a Double.";
if (BaseValidator.validateString(value) == false)
return "You must enter a value for \"" + parameter + "\"";
return null;
}
if (parameter.equals("actions_")) {
if (BaseValidator.validateString(value) == false)
return "You must enter a value for \"" + parameter + "\"";
return null;
}
if (parameter.equals("gapopen_")) {
if (BaseValidator.validateInteger(value) == false)
return "\"" + parameter + "\" must be an integer.";
return null;
}
if (parameter.equals("gapext_")) {
if (BaseValidator.validateDouble(value) == false)
return "\"" + parameter + "\" must be a Double.";
return null;
}
if (parameter.equals("gapdist_")) {
if (BaseValidator.validateInteger(value) == false)
return "\"" + parameter + "\" must be an integer.";
return null;
}
if (parameter.equals("maxdiv_")) {
if (BaseValidator.validateInteger(value) == false)
return "\"" + parameter + "\" must be an integer.";
return null;
}
if (parameter.equals("transweight_")) {
if (BaseValidator.validateDouble(value) == false)
return "\"" + parameter + "\" must be a Double.";
return null;
}
if (parameter.equals("ktuple_")) {
if (BaseValidator.validateInteger(value) == false)
return "\"" + parameter + "\" must be an integer.";
return null;
}
if (parameter.equals("topdiags_")) {
if (BaseValidator.validateInteger(value) == false)
return "\"" + parameter + "\" must be an integer.";
return null;
}
if (parameter.equals("window_")) {
if (BaseValidator.validateInteger(value) == false)
return "\"" + parameter + "\" must be an integer.";
return null;
}
if (parameter.equals("pairgap_")) {
if (BaseValidator.validateDouble(value) == false)
return "\"" + parameter + "\" must be a Double.";
return null;
}
if (parameter.equals("pwgapopen_")) {
if (BaseValidator.validateDouble(value) == false)
return "\"" + parameter + "\" must be a Double.";
return null;
}
if (parameter.equals("pwgapext_")) {
if (BaseValidator.validateDouble(value) == false)
return "\"" + parameter + "\" must be a Double.";
return null;
}
if (parameter.equals("bootstrap_")) {
if (BaseValidator.validateInteger(value) == false)
return "\"" + parameter + "\" must be an integer.";
return null;
}
if (parameter.equals("seed_")) {
if (BaseValidator.validateInteger(value) == false)
return "\"" + parameter + "\" must be an integer.";
return null;
}
if (parameter.equals("helixgap_")) {
if (BaseValidator.validateInteger(value) == false)
return "\"" + parameter + "\" must be an integer.";
return null;
}
if (parameter.equals("strandgap_")) {
if (BaseValidator.validateInteger(value) == false)
return "\"" + parameter + "\" must be an integer.";
return null;
}
if (parameter.equals("loopgap_")) {
if (BaseValidator.validateInteger(value) == false)
return "\"" + parameter + "\" must be an integer.";
return null;
}
if (parameter.equals("terminalgap_")) {
if (BaseValidator.validateInteger(value) == false)
return "\"" + parameter + "\" must be an integer.";
return null;
}
if (parameter.equals("helixendin_")) {
if (BaseValidator.validateInteger(value) == false)
return "\"" + parameter + "\" must be an integer.";
return null;
}
if (parameter.equals("helixendout_")) {
if (BaseValidator.validateInteger(value) == false)
return "\"" + parameter + "\" must be an integer.";
return null;
}
if (parameter.equals("strandendin_")) {
if (BaseValidator.validateInteger(value) == false)
return "\"" + parameter + "\" must be an integer.";
return null;
}
if (parameter.equals("strandendout_")) {
if (BaseValidator.validateInteger(value) == false)
return "\"" + parameter + "\" must be an integer.";
return null;
}
return null;
}
private Set<String> validateRequiredParameters(Map<String, String> parameters) {
Set<String> required = new HashSet<String>(requiredParameters.size());
required.addAll(requiredParameters);
for (String parameter : parameters.keySet()) {
if (required.contains(parameter))
required.remove(parameter);
}
return required;
}
private Set<String> validateRequiredInput(Map<String, List<TaskInputSourceDocument>> input) {
Set<String> required = new HashSet<String>(requiredInput.size());
required.addAll(requiredInput);
for (String parameter : input.keySet()) {
if (required.contains(parameter))
required.remove(parameter);
}
return required;
}
} | [
"samindaw@gmail.com"
] | samindaw@gmail.com |
39d9461c1273c8cfccbf97cd9cf1d9cbd7b26da9 | 4f0968da7ac2711910fae06a99a04f557d704abe | /forge/src/forge/util/FileSection.java | 0f0ad5bd336eaf5c1458c4dd459043fe7447a241 | [] | no_license | lzybluee/Reeforge | 00c6e0900f55fb2927f2e85b130cebb1da4b350b | 63d0dadcb9cf86c9c64630025410951e3e044117 | refs/heads/master | 2021-06-04T16:52:31.413465 | 2020-11-08T14:04:33 | 2020-11-08T14:04:33 | 101,260,125 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,869 | java | /*
* Forge: Play Magic: the Gathering.
* Copyright (C) 2011 Forge Team
*
* 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 forge.util;
import java.text.NumberFormat;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.TreeMap;
import java.util.regex.Pattern;
import org.apache.commons.lang3.StringUtils;
/**
* TODO: Write javadoc for this type.
*
*/
public class FileSection {
/** The lines. */
private final Map<String, String> lines;
/**
* Gets the lines.
*
* @return the lines
*/
protected final Map<String, String> getLines() {
return this.lines;
}
/**
* Instantiates a new file section.
*/
protected FileSection() {
this(new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER));
}
protected FileSection(Map<String, String> lines0) {
lines = lines0;
}
/**
* Parses the.
*
* @param line the line
* @param kvSeparator the kv separator
* @param pairSeparator the pair separator
* @return the file section
*/
public static FileSection parse(final String line, final String kvSeparator, final String pairSeparator) {
Map<String, String> map = parseToMap(line, kvSeparator, pairSeparator);
return new FileSection(map);
}
public static Map<String, String> parseToMap(final String line, final String kvSeparator, final String pairSeparator) {
Map<String, String> result = new TreeMap<String, String>(String.CASE_INSENSITIVE_ORDER);
if (!StringUtils.isEmpty(line)) {
final String[] pairs = line.split(Pattern.quote(pairSeparator));
final Pattern splitter = Pattern.compile(Pattern.quote(kvSeparator));
for (final String dd : pairs) {
final String[] v = splitter.split(dd, 2);
result.put(v[0].trim(), v.length > 1 ? v[1].trim() : "");
}
}
return result;
}
/**
* Parses the.
*
* @param lines the lines
* @param kvSeparator the kv separator
* @return the file section
*/
public static FileSection parse(final Iterable<String> lines, final String kvSeparator) {
final FileSection result = new FileSection();
final Pattern splitter = Pattern.compile(Pattern.quote(kvSeparator));
for (final String dd : lines) {
final String[] v = splitter.split(dd, 2);
result.lines.put(v[0].trim(), v.length > 1 ? v[1].trim() : "");
}
return result;
}
/**
* Gets the.
*
* @param fieldName the field name
* @return the string
*/
public String get(final String fieldName) {
return this.lines.get(fieldName);
}
public String get(final String fieldName, final String defaultValue) {
return lines.containsKey(fieldName) ? this.lines.get(fieldName) : defaultValue;
}
public boolean contains(String keyName) {
return lines.containsKey(keyName);
}
/**
* Gets the double.
*
* @param fieldName the field name
* @return the int
*/
public double getDouble(final String fieldName) {
return this.getDouble(fieldName, 0.0F);
}
/**
* Gets the double.
*
* @param fieldName the field name
* @param defaultValue the default value
* @return the int
*/
public double getDouble(final String fieldName, final double defaultValue) {
try {
if (this.get(fieldName) == null) {
return defaultValue;
}
NumberFormat format = NumberFormat.getInstance(Locale.ENGLISH);
Number number = format.parse(this.get(fieldName));
return number.doubleValue();
} catch (final NumberFormatException | ParseException ex) {
return defaultValue;
}
}
/**
* Gets the int.
*
* @param fieldName the field name
* @return the int
*/
public int getInt(final String fieldName) {
return this.getInt(fieldName, 0);
}
/**
* Gets the int.
*
* @param fieldName the field name
* @param defaultValue the default value
* @return the int
*/
public int getInt(final String fieldName, final int defaultValue) {
try {
return Integer.parseInt(this.get(fieldName));
} catch (final NumberFormatException ex) {
return defaultValue;
}
}
/**
* Gets the boolean.
*
* @param fieldName the field name
* @return the boolean
*/
public boolean getBoolean(final String fieldName) {
return this.getBoolean(fieldName, false);
}
/**
* Gets the boolean.
*
* @param fieldName the field name
* @param defaultValue the default value
* @return the boolean
*/
public boolean getBoolean(final String fieldName, final boolean defaultValue) {
final String s = this.get(fieldName);
if (s == null) {
return defaultValue;
}
return "true".equalsIgnoreCase(s);
}
/**
* Parses the sections.
*
* @param source
* the source
* @return the map
*/
@SuppressWarnings("unchecked")
public static Map<String, List<String>> parseSections(final List<String> source) {
final Map<String, List<String>> result = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
String currentSection = "";
List<String> currentList = null;
for (final String s : source) {
final String st = s.trim();
if (st.length() == 0) {
continue;
}
if (st.startsWith("[") && st.endsWith("]")) {
if ((currentList != null) && (currentList.size() > 0)) {
final Object oldVal = result.get(currentSection);
if ((oldVal != null) && (oldVal instanceof List<?>)) {
currentList.addAll((List<String>) oldVal);
}
result.put(currentSection, currentList);
}
final String newSection = st.substring(1, st.length() - 1);
currentSection = newSection;
currentList = null;
} else {
if (currentList == null) {
currentList = new ArrayList<String>();
}
currentList.add(st);
}
}
// save final block
if ((currentList != null) && (currentList.size() > 0)) {
final Object oldVal = result.get(currentSection);
if ((oldVal != null) && (oldVal instanceof List<?>)) {
currentList.addAll((List<String>) oldVal);
}
result.put(currentSection, currentList);
}
return result;
}
}
| [
"lzybluee@gmail.com"
] | lzybluee@gmail.com |
63b79925b394b7fa422227583dfa947127ff334a | 76e574615c61dc1b967696ae526d73123beebc05 | /ksghi-manageSystem/src/main/java/com/itech/ups/app/business/stats/application/service/OperatorDataService.java | 2087773aa49a10be3078a96534a0664d31adecbe | [] | no_license | happyjianguo/ksghi | 10802f386d82b97e530bfcf3a4f765cb654a411c | 6df11c7453883c7b0dd1763de5bb11ff02dba8ce | refs/heads/master | 2022-11-08T18:54:06.289842 | 2020-05-17T08:23:47 | 2020-05-17T08:23:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,116 | java | package com.itech.ups.app.business.stats.application.service;
import java.util.List;
import java.util.Map;
/**
* @author 张可乐
* @version 1.0
* @description 互联网金融信息披露数据、企业数据报送
* @update 2017-9-19 下午3:09:23
*/
public interface OperatorDataService {
/**
* @param params
* @param rowStart
* @param rowEnd
* @return
* @description 互联网金融信息披露数据
* @version 1.0
* @author 张可乐
* @update 2017-9-19 下午3:12:42
*/
List<Map<String, Object>> selectFinancialDisclosure(Map<String, Object> params, int rowStart, int rowEnd);
int selectFinancialDisclosureTotalCount(Map<String, Object> params);
/**
* @param params
* @param rowStart
* @param rowEnd
* @return
* @description 企业数据报送
* @version 1.0
* @author 张可乐
* @update 2017-9-19 下午3:12:53
*/
List<Map<String, Object>> selectenterpriseData(Map<String, Object> params, int rowStart, int rowEnd);
int selectenterpriseDataTotalCount(Map<String, Object> params);
}
| [
"weiliejun@163.com"
] | weiliejun@163.com |
8f456d2cf7281bdf764394f21457025b44f7611b | 0b85e873533b87ad235934118b7c80429f5a913b | /basicJava/JavaEE练习题/src/day06_oject类等/Test05_Date类的使用.java | 738d10dee0c7670439aa31f07b0aa85b241ffabf | [] | no_license | lqt1401737962/Java-Notes | 0eeed847d45957b0e8f5d2017287238eea910e62 | 9ceb16dd89fe9343fd80cf5a861fe6da5e502b07 | refs/heads/master | 2022-08-05T21:43:04.183997 | 2021-04-06T09:04:26 | 2021-04-06T09:04:26 | 228,815,761 | 0 | 0 | null | 2022-06-21T04:16:04 | 2019-12-18T10:28:35 | Java | UTF-8 | Java | false | false | 531 | java | package day06_oject类等;
import java.text.SimpleDateFormat;
import java.util.Date;
/*
五、请用代码实现:获取当前的日期,并把这个日期转换为指定格式的字符串,如2088-08-08 08:08:08。
*/
public class Test05_Date类的使用 {
public static void main(String[] args) {
Date date = new Date();
System.out.println(date);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String format = sdf.format(date);
System.out.println(format);
}
}
| [
"1401737962@qq.com"
] | 1401737962@qq.com |
a7db4d5aaa17dff4a3865337d2c946eb46b2f779 | 6733fd7192861fc99c3801f3d5f221c439f51950 | /app/src/main/java/com/anwesome/uiview/animqueue/MainActivity.java | f72d88c22ad98c3d5cc551930a4360f3dc618f4e | [] | no_license | Anwesh43/AnimQueue | 74715344f28d62bd5f8d8fad67b55e79540ad941 | 908c8d0053e746f7db8c3fe3eb33a698a2628c23 | refs/heads/master | 2020-06-16T11:29:47.911953 | 2016-11-29T18:55:54 | 2016-11-29T18:55:54 | 75,108,591 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,405 | java | package com.anwesome.uiview.animqueue;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
import com.anwesome.uiview.animationqueue.AnimationComponent;
import com.anwesome.uiview.animationqueue.AnimationMode;
import com.anwesome.uiview.animationqueue.AnimationQueue;
public class MainActivity extends AppCompatActivity {
private AnimationQueue animationQueue = new AnimationQueue();
private TextView t1,t2,t3,t4;
private AnimationComponent c1,c2,c3,c4;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
initUi();
animationQueue.pushAnimation(c1);
animationQueue.pushAnimation(c2);
animationQueue.pushAnimation(c3);
animationQueue.pushAnimation(c4);
}
public void initUi() {
t1 = (TextView)findViewById(R.id.t1);
t2 = (TextView)findViewById(R.id.t2);
t3 = (TextView)findViewById(R.id.t3);
t4 = (TextView)findViewById(R.id.t4);
c1 = new AnimationComponent(t1, AnimationMode.ROTATE_Z,1000,0,360);
c2 = new AnimationComponent(t2, AnimationMode.ROTATE_X,1000,0,360);
c3 = new AnimationComponent(t3, AnimationMode.ROTATE_Y,10000,0,360);
c4 = new AnimationComponent(t4, AnimationMode.ROTATE_Z,10000,0,360);
}
}
| [
"anweshthecool0@gmail.com"
] | anweshthecool0@gmail.com |
dfa1fddf7a692ab2441517d59d542674276b28a8 | c188408c9ec0425666250b45734f8b4c9644a946 | /open-sphere-base/control-panels/src/main/java/io/opensphere/controlpanels/layers/base/Constants.java | e98d968ac5d6d1f20eaf282b44c90a1095d93491 | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | rkausch/opensphere-desktop | ef8067eb03197c758e3af40ebe49e182a450cc02 | c871c4364b3456685411fddd22414fd40ce65699 | refs/heads/snapshot_5.2.7 | 2023-04-13T21:00:00.575303 | 2020-07-29T17:56:10 | 2020-07-29T17:56:10 | 360,594,280 | 0 | 0 | Apache-2.0 | 2021-04-22T17:40:38 | 2021-04-22T16:58:41 | null | UTF-8 | Java | false | false | 417 | java | package io.opensphere.controlpanels.layers.base;
/**
* Contains constants used by the base classes.
*/
public final class Constants
{
/**
* The minimum number of data types selected before confirmation dialogs are
* shown to the user.
*/
public static final int SELECT_WARN_THRESHOLD = 10;
/**
* Not constructible.
*/
private Constants()
{
}
}
| [
"kauschr@opensphere.io"
] | kauschr@opensphere.io |
cc89a00a6c0daccbc486c317fce87ce795b6fa7b | 8091dc59cc76869befe9b0a8f350fbc56c2836e5 | /sql12/plugins/graph/src/test/java/net/sourceforge/squirrel_sql/plugins/graph/xmlbeans/FormatXmlBeanTest.java | 6be64a9884592c1d2ab2fc932cfba90ea96c7ce3 | [] | no_license | igorhvr/squirrel-sql | 4560c39c9221f04a49487b5f3d66b1559a32c21a | 3457d91b397392e1a9649ffb00cbfd093e453654 | refs/heads/master | 2020-04-05T08:32:51.484469 | 2011-08-10T18:59:26 | 2011-08-10T18:59:26 | 2,188,276 | 2 | 5 | null | null | null | null | UTF-8 | Java | false | false | 1,935 | java | package net.sourceforge.squirrel_sql.plugins.graph.xmlbeans;
/*
* Copyright (C) 2008 Rob Manning
* manningr@users.sourceforge.net
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
import net.sourceforge.squirrel_sql.BaseSQuirreLJUnit4TestCase;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
/**
* Test class for FormatXmlBean
*/
public class FormatXmlBeanTest extends BaseSQuirreLJUnit4TestCase {
FormatXmlBean classUnderTest = new FormatXmlBean();
@Test
public void testGetName() throws Exception
{
classUnderTest.setName("aTestString");
assertEquals("aTestString", classUnderTest.getName());
}
@Test
public void testGetWidth() throws Exception
{
classUnderTest.setWidth(10);
assertEquals(10, classUnderTest.getWidth(), 0);
}
@Test
public void testGetHeight() throws Exception
{
classUnderTest.setHeight(10);
assertEquals(10, classUnderTest.getHeight(), 0);
}
@Test
public void testIsSelected() throws Exception
{
classUnderTest.setSelected(true);
assertEquals(true, classUnderTest.isSelected());
}
@Test
public void testIsLandscape() throws Exception
{
classUnderTest.setLandscape(true);
assertEquals(true, classUnderTest.isLandscape());
}
}
| [
"manningr@0ceafaf9-a5ae-48a7-aaeb-8ec3e0f2870c"
] | manningr@0ceafaf9-a5ae-48a7-aaeb-8ec3e0f2870c |
23079fd7ba186518a950c7af59d61df3c6671fad | 50023378bef26739a7037fc04759663fcc66e4a8 | /GooglePrepare/src/main/java/hou/forme/GooglePrepare/GooglePrepare/easy/BinaryWatch.java | fdfcb40acab8102befbac1f4dee4da7a378e8a48 | [] | no_license | houweitao/Leetcode | dde59bfff97daa14f4634c2e158b318ae9b47944 | 78035bf2b2d9dff4fb9c8f0d2a6d4db6114186ef | refs/heads/master | 2020-05-21T17:54:35.721046 | 2016-12-20T09:11:10 | 2016-12-20T09:11:10 | 62,659,590 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,823 | java | package hou.forme.GooglePrepare.GooglePrepare.easy;
import java.util.ArrayList;
import java.util.List;
/**
* @author houweitao
* @date 2016年12月9日下午2:44:32
* @end 2016年12月09日15:02:26
*/
public class BinaryWatch {
public static void main(String[] args) {
BinaryWatch bw = new BinaryWatch();
System.out.println(bw.readBinaryWatch(2));
}
public List<String> readBinaryWatch(int num) {
List<String> ret = new ArrayList<>();
for (int i = 0; i <= num; i++) {
help(i, num - i, ret);
}
return ret;
}
private void help(int up, int down, List<String> ret) {
if (up > 4 || up < 0 || down < 0 || down > 6)
return;
List<String> upList = get(up, 4);
List<String> downList = get(down, 6);
for (String shi : upList) {
String u = getShi(shi);
if (u == null)
continue;
for (String fen : downList) {
String d = fetFen(fen);
if (d == null)
continue;
ret.add(u + ":" + d);
}
}
}
private String fetFen(String str) {
int[] shi = { 1, 2, 4, 8, 16, 32 };
int sum = 0;
for (int i = 0; i < str.length(); i++) {
int cur = str.charAt(i) - '0';
sum += shi[cur];
}
if (sum > 59)
return null;
else if (sum < 10)
return "0" + sum;
else
return sum + "";
}
private String getShi(String str) {
int[] shi = { 1, 2, 4, 8 };
int sum = 0;
for (int i = 0; i < str.length(); i++) {
int cur = str.charAt(i) - '0';
sum += shi[cur];
}
if (sum >= 12)
return null;
else
return sum + "";
}
private List<String> get(int up, int top) {
List<String> ret = new ArrayList<>();
dfs(up, -1, "", ret, top);
return ret;
}
private void dfs(int up, int pos, String pre, List<String> ret, int top) {
if (up == 0)
ret.add(pre);
for (int i = pos + 1; i < top; i++) {
dfs(up - 1, i, pre + i, ret, top);
}
}
}
| [
"hou103880@163.com"
] | hou103880@163.com |
1253091e2efcbfb2eb815fb5f46429809cdc3d53 | f232c2c7966e5769d1f68af87c83615fe4202870 | /frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/system/ErrorPopupManager.java | f5d3a0b3f332f0d0f840985e8460472d3f2134fd | [] | no_license | BillTheBest/ovirt-engine | 54d0d3cf5b103c561c4e72e65856948f252b41a1 | 7d5d711b707e080a69920eb042f6f547dfa9443f | refs/heads/master | 2016-08-05T16:52:16.557733 | 2011-11-07T02:49:42 | 2011-11-07T02:49:42 | 2,938,776 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,252 | java | package org.ovirt.engine.ui.webadmin.system;
import org.ovirt.engine.ui.webadmin.presenter.ErrorPopupPresenterWidget;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HasHandlers;
import com.google.inject.Inject;
import com.gwtplatform.mvp.client.proxy.RevealRootPopupContentEvent;
/**
* Convenience class used to reveal {@link ErrorPopupPresenterWidget} as a global popup.
*/
public class ErrorPopupManager implements HasHandlers {
private final EventBus eventBus;
private final ErrorPopupPresenterWidget errorPopup;
private boolean showPopups;
@Inject
public ErrorPopupManager(EventBus eventBus, ErrorPopupPresenterWidget errorPopup) {
this.eventBus = eventBus;
this.errorPopup = errorPopup;
this.showPopups = true;
}
public void setShowPopups(boolean showPopups) {
this.showPopups = showPopups;
}
@Override
public void fireEvent(GwtEvent<?> event) {
eventBus.fireEvent(event);
}
public void show(String errorMessage) {
if (showPopups) {
errorPopup.prepare(errorMessage);
RevealRootPopupContentEvent.fire(this, errorPopup);
}
}
}
| [
"liuyang3240@gmail.com"
] | liuyang3240@gmail.com |
d1d3364f6d7126934343ee2f0fca6990111b6afc | cce856a509604df337f92cc1e69f85bfa050e9f5 | /src/test/java/com/lazulite/zp/security/SecurityUtilsUnitTest.java | da9da2055dac839ff0c37253b5b47d5af412a21a | [] | no_license | bit-star/zp | 801cb208f17cfb74a81920f612afd91580ca703a | 94df5aff8215d51caf081957dd2f21a3023e7473 | refs/heads/master | 2022-12-22T14:22:20.728009 | 2019-05-23T13:53:01 | 2019-05-23T13:53:01 | 187,021,890 | 0 | 0 | null | 2022-12-16T04:52:18 | 2019-05-16T12:18:18 | Java | UTF-8 | Java | false | false | 3,197 | java | package com.lazulite.zp.security;
import org.junit.jupiter.api.Test;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
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 java.util.ArrayList;
import java.util.Collection;
import java.util.Optional;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Test class for the {@link SecurityUtils} utility class.
*/
public class SecurityUtilsUnitTest {
@Test
public void testGetCurrentUserLogin() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "admin"));
SecurityContextHolder.setContext(securityContext);
Optional<String> login = SecurityUtils.getCurrentUserLogin();
assertThat(login).contains("admin");
}
@Test
public void testgetCurrentUserJWT() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "token"));
SecurityContextHolder.setContext(securityContext);
Optional<String> jwt = SecurityUtils.getCurrentUserJWT();
assertThat(jwt).contains("token");
}
@Test
public void testIsAuthenticated() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "admin"));
SecurityContextHolder.setContext(securityContext);
boolean isAuthenticated = SecurityUtils.isAuthenticated();
assertThat(isAuthenticated).isTrue();
}
@Test
public void testAnonymousIsNotAuthenticated() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
Collection<GrantedAuthority> authorities = new ArrayList<>();
authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.ANONYMOUS));
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("anonymous", "anonymous", authorities));
SecurityContextHolder.setContext(securityContext);
boolean isAuthenticated = SecurityUtils.isAuthenticated();
assertThat(isAuthenticated).isFalse();
}
@Test
public void testIsCurrentUserInRole() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
Collection<GrantedAuthority> authorities = new ArrayList<>();
authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.USER));
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("user", "user", authorities));
SecurityContextHolder.setContext(securityContext);
assertThat(SecurityUtils.isCurrentUserInRole(AuthoritiesConstants.USER)).isTrue();
assertThat(SecurityUtils.isCurrentUserInRole(AuthoritiesConstants.ADMIN)).isFalse();
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
05aa12eefaee016ac561a73e6c80b777603595c6 | 48e835e6f176a8ac9ae3ca718e8922891f1e5a18 | /benchmark/training/org/mapstruct/ap/test/bugs/_880/Issue880Test.java | e4a5f8b62f642a320797aeb3dd26fa49606ee090 | [] | 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 | 1,950 | java | /**
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.test.bugs._880;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mapstruct.ap.testutil.WithClasses;
import org.mapstruct.ap.testutil.compilation.annotation.CompilationResult;
import org.mapstruct.ap.testutil.compilation.annotation.Diagnostic;
import org.mapstruct.ap.testutil.compilation.annotation.ExpectedCompilationOutcome;
import org.mapstruct.ap.testutil.compilation.annotation.ProcessorOption;
import org.mapstruct.ap.testutil.compilation.annotation.ProcessorOptions;
import org.mapstruct.ap.testutil.runner.AnnotationProcessorTestRunner;
import org.mapstruct.ap.testutil.runner.GeneratedSource;
import org.springframework.stereotype.Component;
import static javax.tools.Diagnostic.Kind.WARNING;
/**
*
*
* @author Andreas Gudian
*/
@RunWith(AnnotationProcessorTestRunner.class)
@WithClasses({ UsesConfigFromAnnotationMapper.class, DefaultsToProcessorOptionsMapper.class, Poodle.class, Config.class })
@ProcessorOptions({ @ProcessorOption(name = "mapstruct.defaultComponentModel", value = "spring"), @ProcessorOption(name = "mapstruct.unmappedTargetPolicy", value = "ignore") })
public class Issue880Test {
@Rule
public GeneratedSource generatedSource = new GeneratedSource();
@Test
@ExpectedCompilationOutcome(value = CompilationResult.SUCCEEDED, diagnostics = @Diagnostic(kind = WARNING, type = UsesConfigFromAnnotationMapper.class, line = 16, messageRegExp = "Unmapped target property: \"core\"\\."))
public void compilationSucceedsAndAppliesCorrectComponentModel() {
generatedSource.forMapper(UsesConfigFromAnnotationMapper.class).containsNoImportFor(Component.class);
generatedSource.forMapper(DefaultsToProcessorOptionsMapper.class).containsImportFor(Component.class);
}
}
| [
"benjamin.danglot@inria.fr"
] | benjamin.danglot@inria.fr |
974cebfcfcdea3dff1b122969171f6334c6af3f9 | 3b091bb35f0f0352b341c3e3f385adf5d3f0a490 | /like-shiro/src/main/java/com/janita/like/dao/ShiroSessionDAO.java | 239e430eeb35f19c8d6e0a9930ded2521bc31b75 | [] | no_license | janforp/shiro-parent | abdf15014a2f15b172719a227f18345b3a65ee04 | fff157938e5b1c400f183cdd6a924e76cbce037f | refs/heads/master | 2020-04-05T13:05:08.352725 | 2017-07-04T08:10:31 | 2017-07-04T08:10:31 | 94,745,581 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 556 | java | package com.janita.like.dao;
import com.janita.like.entity.ShiroSession;
import java.util.List;
/**
* Created by com.janita.like.MybatisCodeGenerate on 2017-06-21
*/
public interface ShiroSessionDAO {
int deleteByPrimaryKey(String sessionId);
void insert(ShiroSession record);
void insertSelective(ShiroSession record);
void insertBatch(List<ShiroSession> records);
ShiroSession selectByPrimaryKey(String sessionId);
int updateByPrimaryKeySelective(ShiroSession record);
int updateByPrimaryKey(ShiroSession record);
} | [
"zcj880902"
] | zcj880902 |
1b37ec987ed0faaa4a9de625c2410a15f4664f6d | 7ef66bb12d0a0c8a721df339f1ab65c704a3b314 | /src/com/preppa/web/pages/contribution/tag/NewTagPage.java | c4748f2ac27398b6cc82ca076aa91c7e80b34c8c | [] | no_license | newtonik/preppa | 89f47d424e8e20c514289af380094f1d28ed110b | ade2019a891a711f4d098cd1957e658b5364dfeb | refs/heads/master | 2020-05-20T06:49:30.117318 | 2009-10-13T04:00:40 | 2009-10-13T04:00:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 182 | java | package com.preppa.web.pages.contribution.tag;
import org.springframework.security.annotation.Secured;
/**
*
* @author nwt
*/
@Secured("ROLE_USER")
public class NewTagPage {
}
| [
"devnull@localhost"
] | devnull@localhost |
4bfa36b9e6d9f7f54236337f167eef14612bbee5 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/5/5_f90d9c2b92a7568ab5aac066025fa9e2eb807a16/Prueba/5_f90d9c2b92a7568ab5aac066025fa9e2eb807a16_Prueba_s.java | 3df299dc690c47f72e64fc2cd2303e773014915d | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 2,323 | java | import java.util.ArrayList;
import java.util.Scanner;
import CuevanaApi.Captcha;
import CuevanaApi.Content;
import CuevanaApi.Content.ContentType;
import CuevanaApi.CuevanaApi;
import CuevanaApi.NotValidCaptcha;
import CuevanaApi.Source;
import CuevanaApi.SourceSearcher;
public class Prueba {
static CuevanaApi api = new CuevanaApi();
static Scanner input = new Scanner(System.in);
static boolean DEBUG = true;
public static void main(String[] args) throws Exception {
String url = null;
if(args.length > 0)
{
url = args[0];
}else
{
if(DEBUG)
{
url = "http://www.cuevana.tv/#!/series/3497/how-i-met-your-mother/come-on";
}else
{
System.out.println("Usage: java " + Prueba.class.getName() + " <URL>");
return;
}
}
System.out.println("[+] Test Cuevana API: ");
System.out.println("[!] URL: " + url);
Content contenido = null;
try
{
if (api.get_type(url) == ContentType.EPISODE) {
contenido = api.get_episode(url);
} else {
contenido = api.get_movie(url);
}
}catch(Exception NotValidURL)
{
System.out.println("[!] Lo siento, URL invalida");
return;
}
System.out.println(contenido.toString());
ArrayList<Source> sources = contenido.getSources();
System.out.println("[+] Existen " + sources.size() + " sources:");
for (int i = 0; i < sources.size(); i++) {
System.out.println("\t[" + (i + 1) + "] " + sources.get(i).toString());
}
int opcion = 0;
do {
System.out.print("[+] Source a buscar : ");
try {
opcion = Integer.valueOf(input.nextLine());
} catch (Exception e) {
continue;
}
} while (opcion <= 0 || opcion > sources.size());
SourceSearcher ss = new SourceSearcher(sources.get(1));
while(true)
{
Captcha cacha = ss.getCaptcha();
System.out.println("[+] Captcha image url: " + cacha.getUrl());
System.out.print("[?] Solucion?: ");
if(input.hasNext())
{
try{
String sol = input.nextLine().trim();
System.out.println("[+] Link: " + ss.getLink(sol));
break;
}catch(Exception e)
{
System.out.println("[!] Error: " + e.getMessage() );
}
}
}
System.out.println("[+] Subtitulos: " + sources.get(1).getSubUrl());
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
752665779333ea5943dc67f420ff9774b5afb6d9 | 3bdd95fdc85b141656c818f93d0699a6a2213b82 | /app/src/main/java/com/mantra/fm220/MasterActivity.java | 4da963487c573e144d333f12aceb138aa8de390b | [] | no_license | Ankushds/Eclipse | e27b659f0b5a8e3ad13aef272ba9594260685a2c | 3f32797e0ae6937b89014829e60326d68d824b83 | refs/heads/master | 2021-09-24T05:58:24.056185 | 2018-10-04T10:57:43 | 2018-10-04T10:57:43 | 107,240,784 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,641 | java | package com.mantra.fm220;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import com.access.aadharapp220.DepartmentActivity;
import com.access.aadharapp220.DesignationActivity;
import com.access.aadharapp220.MainActivity;
import com.access.aadharapp220.R;
import com.aadharmachine.rssolution.AttendanceActivity;
import com.aadharmachine.rssolution.HelpActivity;
import com.aadharmachine.rssolution.ReportActivity;
import com.aadharmachine.rssolution.UserDetailActivity;
public class MasterActivity extends Activity implements OnClickListener {
Button designation, batchManager, userDetails,department,
enrolluser, attendance, help, report;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_master);
designation = (Button) findViewById(R.id.designation);
department = (Button) findViewById(R.id.department);
userDetails = (Button) findViewById(R.id.empdetails);
attendance = (Button) findViewById(R.id.attendence);
help = (Button) findViewById(R.id.helpview);
report = (Button) findViewById(R.id.report);
batchManager = (Button) findViewById(R.id.employee);
designation.setOnClickListener(this);
department.setOnClickListener(this);
userDetails.setOnClickListener(this);
attendance.setOnClickListener(this);
help.setOnClickListener(this);
report.setOnClickListener(this);
batchManager.setOnClickListener(this);
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.department:
Intent intent = new Intent(MasterActivity.this, DepartmentActivity.class);
startActivity(intent);
break;
case R.id.designation:
Intent intent11 = new Intent(MasterActivity.this, DesignationActivity.class);
startActivity(intent11);
break;
case R.id.employee:
Intent intent1 = new Intent(MasterActivity.this, MainActivity.class);
startActivity(intent1);
break;
case R.id.empdetails:
Intent intent2 = new Intent (MasterActivity.this, UserDetailActivity.class);
startActivity(intent2);
break;
case R.id.attendence: {
startActivity(new Intent(MasterActivity.this, AttendanceActivity.class));
}
break;
case R.id.helpview: {
startActivity(new Intent(MasterActivity.this, HelpActivity.class));
}
break;
case R.id.report: {
startActivity(new Intent(MasterActivity.this, ReportActivity.class));
}
break;
}
}
}
| [
"you@example.com"
] | you@example.com |
6c9024e35648a32a87b58b902fb15ed5ad6c4930 | d74a7ac4b88aa2cc3bb06cec898a462312ae2759 | /src/main/java/com/cczu/model/service/IAqpxKsjlService.java | b82baa9d075b855fad030b162dcc34fc88357ad7 | [] | no_license | wuyufei2019/test110 | 74dbfd15af2dfd72640032a8207f7ad5aa5da604 | 8a8621370eb92e6071f517dbcae9d483ccc4db36 | refs/heads/master | 2022-12-21T12:28:37.800274 | 2019-11-18T08:33:53 | 2019-11-18T08:33:53 | 222,402,348 | 0 | 0 | null | 2022-12-16T05:03:11 | 2019-11-18T08:45:49 | Java | UTF-8 | Java | false | false | 1,213 | java | package com.cczu.model.service;
import java.util.List;
import java.util.Map;
import com.cczu.model.entity.AQPX_TestpaperEntity;
public interface IAqpxKsjlService {
/**
* 添加
* @param at
*/
public void addInfo(AQPX_TestpaperEntity at);
/**
* 修改
* @param at
*/
public void updateInfo(AQPX_TestpaperEntity at);
/**
* 查找获取考试记录
* @param ygid
* @param bs
* @return
*/
public List<AQPX_TestpaperEntity> getlist(Long ygid, String bs);
/**
* 通过员工id查询所有的考试记录
* @param ygid
* @return
*/
public List<AQPX_TestpaperEntity> getall(Long ygid);
/**
* 通过员工id与课程的id查询
* @param ygid
* @param gzid
* @return
*/
public List<AQPX_TestpaperEntity> getkcsj(Long ygid, Long kcid);
/**
* 根据试卷标识查询试卷信息
* @param bs 试卷标识
* @return
*/
public List<Map<String, Object>> getsjxx(String bs);
/**
* 根据试卷标识查询试卷错题信息
* @param bs 试卷标识
* @return
*/
List<Map<String, Object>> getctxx(String bs);
/**
* 根据试卷标识查询试卷错题题号
* @param bs 试卷标识
* @return
*/
}
| [
"wuyufei2019@sina.com"
] | wuyufei2019@sina.com |
02de3c5b9cd8e9cf6f922c7f4b9e62db82d3d7bc | 31ca1e08b49557b86c5232d7cf453ee6b3f1e4ec | /src/test/java/com/kk/test/proxy/LogTest.java | c491baee90b01068bfa14ae3be902967b2d0751a | [] | no_license | zyylele123/netty4-rpc | 12184f11a7c8f7d1513b02a980983aa217a1058d | 60a15b97f9cc03cc533234693424ebf452c1c529 | refs/heads/master | 2020-04-12T02:17:34.807141 | 2018-11-26T13:28:00 | 2018-11-26T13:28:00 | 162,244,632 | 1 | 0 | null | 2018-12-18T06:59:22 | 2018-12-18T06:59:22 | null | UTF-8 | Java | false | false | 327 | java | package com.kk.test.proxy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author zhihui.kzh
* @create 23/1/1810:40
*/
public class LogTest {
private final static Logger logger = LoggerFactory.getLogger(LogTest.class);
public static void main(String[] args) {
logger.info("xxx");
}
}
| [
"563150913@qq.com"
] | 563150913@qq.com |
44939e61e5d89e4dba39de40e9c5595fcd163e6f | 92dd6bc0a9435c359593a1f9b309bb58d3e3f103 | /src/Nov2020_GoogPrep/_049AndroidUnlockPatterns.java | 4ee28de9dd7cbbebbc1005de18f2bd550a31ad9e | [
"MIT"
] | permissive | darshanhs90/Java-Coding | bfb2eb84153a8a8a9429efc2833c47f6680f03f4 | da76ccd7851f102712f7d8dfa4659901c5de7a76 | refs/heads/master | 2023-05-27T03:17:45.055811 | 2021-06-16T06:18:08 | 2021-06-16T06:18:08 | 36,981,580 | 3 | 3 | null | null | null | null | UTF-8 | Java | false | false | 1,177 | java | package Nov2020_GoogPrep;
public class _049AndroidUnlockPatterns {
public static void main(String[] args) {
System.out.println(numberOfPatterns(1, 1));
System.out.println(numberOfPatterns(1, 2));
}
public static int numberOfPatterns(int m, int n) {
boolean visited[] = new boolean[10];
int[][] skip = new int[10][10];
skip[1][3] = skip[3][1] = 2;
skip[1][7] = skip[7][1] = 4;
skip[3][9] = skip[9][3] = 6;
skip[7][9] = skip[9][7] = 8;
skip[2][8] = skip[8][2] = 5;
skip[1][9] = skip[9][1] = 5;
skip[3][7] = skip[7][3] = 5;
skip[4][6] = skip[6][4] = 5;
int count = 0;
for (int i = m; i <= n; i++) {
count += dfs(visited, skip, i - 1, 1) * 4;
count += dfs(visited, skip, i - 1, 2) * 4;
count += dfs(visited, skip, i - 1, 5);
}
return count;
}
public static int dfs(boolean[] visited, int[][] skip, int limit, int curr) {
if (limit < 0)
return 0;
if (limit == 0)
return 1;
int count = 0;
visited[curr] = true;
for (int i = 1; i <= 9; i++) {
if (!visited[i] && (skip[curr][i] == 0 || visited[skip[curr][i]])) {
count += dfs(visited, skip, limit - 1, i);
}
}
visited[curr] = false;
return count;
}
}
| [
"hsdars@gmail.com"
] | hsdars@gmail.com |
b12655b98b28a895d9bdf70e13ba40f8f0f59a0e | b4c47b649e6e8b5fc48eed12fbfebeead32abc08 | /android/net/IpSecUdpEncapResponse.java | 14039c121fbe05ece706c228dc2c47925b3bc4e8 | [] | no_license | neetavarkala/miui_framework_clover | 300a2b435330b928ac96714ca9efab507ef01533 | 2670fd5d0ddb62f5e537f3e89648d86d946bd6bc | refs/heads/master | 2022-01-16T09:24:02.202222 | 2018-09-01T13:39:50 | 2018-09-01T13:39:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,943 | java | // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
package android.net;
import android.os.*;
import java.io.FileDescriptor;
import java.io.IOException;
public final class IpSecUdpEncapResponse
implements Parcelable
{
public IpSecUdpEncapResponse(int i)
{
if(i == 0)
{
throw new IllegalArgumentException("Valid status implies other args must be provided");
} else
{
status = i;
resourceId = 0;
port = -1;
fileDescriptor = null;
return;
}
}
public IpSecUdpEncapResponse(int i, int j, int k, FileDescriptor filedescriptor)
throws IOException
{
ParcelFileDescriptor parcelfiledescriptor = null;
super();
if(i == 0 && filedescriptor == null)
throw new IllegalArgumentException("Valid status implies FD must be non-null");
status = i;
resourceId = j;
port = k;
if(status == 0)
parcelfiledescriptor = ParcelFileDescriptor.dup(filedescriptor);
fileDescriptor = parcelfiledescriptor;
}
private IpSecUdpEncapResponse(Parcel parcel)
{
status = parcel.readInt();
resourceId = parcel.readInt();
port = parcel.readInt();
fileDescriptor = (ParcelFileDescriptor)parcel.readParcelable(android/os/ParcelFileDescriptor.getClassLoader());
}
IpSecUdpEncapResponse(Parcel parcel, IpSecUdpEncapResponse ipsecudpencapresponse)
{
this(parcel);
}
public int describeContents()
{
int i;
if(fileDescriptor != null)
i = 1;
else
i = 0;
return i;
}
public void writeToParcel(Parcel parcel, int i)
{
parcel.writeInt(status);
parcel.writeInt(resourceId);
parcel.writeInt(port);
parcel.writeParcelable(fileDescriptor, 1);
}
public static final android.os.Parcelable.Creator CREATOR = new android.os.Parcelable.Creator() {
public IpSecUdpEncapResponse createFromParcel(Parcel parcel)
{
return new IpSecUdpEncapResponse(parcel, null);
}
public volatile Object createFromParcel(Parcel parcel)
{
return createFromParcel(parcel);
}
public IpSecUdpEncapResponse[] newArray(int i)
{
return new IpSecUdpEncapResponse[i];
}
public volatile Object[] newArray(int i)
{
return newArray(i);
}
}
;
private static final String TAG = "IpSecUdpEncapResponse";
public final ParcelFileDescriptor fileDescriptor;
public final int port;
public final int resourceId;
public final int status;
}
| [
"hosigumayuugi@gmail.com"
] | hosigumayuugi@gmail.com |
091a4d514fbb91ccd24345e27f8034c641ad0d60 | 4501cb2b736cac553b498ba82c4e7b81d620eac8 | /core/src/com/kennycason/starlight/movement/Movement.java | 9e4c9342d3c4944750e993fb38f3d3ac6377c783 | [] | no_license | kennycason/starlight | 1a72c6fe97525a8db9ffad5a7a62aaa4cdbdc62c | feda657075dbcc28f866a0876e12e3e996b85e16 | refs/heads/master | 2021-01-10T08:18:26.259789 | 2016-01-06T00:48:56 | 2016-01-06T00:48:56 | 48,624,051 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 211 | java | package com.kennycason.starlight.movement;
import com.kennycason.starlight.entity.Entity;
/**
* Created by kenny on 4/25/15.
*/
public interface Movement {
void move(Entity entity, float deltaTime);
}
| [
"kenneth.cason@gmail.com"
] | kenneth.cason@gmail.com |
bfff469761dd090e5d4613401931ce7894719b13 | c6ea5f9c0a14e221b535905d8c9eae7f4bb385c3 | /src/com/vod/common/OmniRollbackException.java | c946c31aef7f7f0da6dff3e315fc6940ce3a35b7 | [
"MIT"
] | permissive | diwang011/vod | 0efe6a196d6e51297c97cac8f0517b218b7b3048 | f264db76656ff69bf6d860b6c1151fa32224fa8b | refs/heads/master | 2021-01-21T23:13:05.022627 | 2017-06-30T08:34:33 | 2017-06-30T08:34:33 | 95,206,235 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 767 | java | package com.vod.common;
/**
* This exception is for Transaction Management, throw/re-throw this exception when the transaction requires rollback.
* It should be thrown in BizService implementation's ..Tx method ONLY
* @author Haoyu Tang
*
*
*/
public class OmniRollbackException extends RuntimeException
{
/**
*
*/
private static final long serialVersionUID = 7923687226961120919L;
/**
* Use rollback(msg) instead
* @param reason
*/
@Deprecated
public OmniRollbackException(String reason)
{
super(reason);
}
/**
* Use rollback(e) instead
* @param Exception e
*/
@Deprecated
public OmniRollbackException(Throwable e)
{
super(e);
}
}
| [
"feizhou@omniselling.net"
] | feizhou@omniselling.net |
fd8ca6e80ee9b0899c57f3593797afb75befcf6d | f83f02b7073419251ac135bdb5893f6d0b20e64a | /workspace/Module13/src/TakingScreenShot.java | f7407916c816961a90c747e9bc41c9d421955db1 | [] | no_license | sheel2006/Mylearning | e9aebdb470bb3b0117807b4d4a8d57ff601c1402 | b5a00623e48f4a4495ddb8fe362ac685cdb51bf7 | refs/heads/master | 2020-03-12T06:25:36.721299 | 2018-04-22T06:17:49 | 2018-04-22T06:17:49 | 130,484,988 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 691 | java | import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class TakingScreenShot {
public static void main(String[] args) throws Throwable {
// TODO Auto-generated method stub
WebDriver driver = new FirefoxDriver();
driver.manage().window().maximize();
driver.get("http://www.echoecho.com/htmlforms10.htm");
File srcfile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(srcfile, new File("d:\\bbc.png"));
}
}
| [
"sheel2006@gmail.com"
] | sheel2006@gmail.com |
11805db20d7241a6085781c720e552eff926e0de | 8fa3fe6cf1d723170f9a27df93ff0b89b3fef1fb | /eureka-core/src/main/java/com/netflix/eureka/registry/InstanceRegistry.java | 5b1c40f94030ce80f72d6db6ef904a313f878046 | [] | no_license | diqichengshi/zhao_distributed | 08c5619cca63218475a6ac9d586ba7024beed797 | 8c4756842134025203ad13cd0f75b0c575578d29 | refs/heads/master | 2022-12-24T03:18:26.045941 | 2020-01-14T09:23:51 | 2020-01-14T09:23:51 | 223,307,793 | 0 | 1 | null | 2022-12-12T21:41:33 | 2019-11-22T02:33:52 | Java | UTF-8 | Java | false | false | 3,469 | java | package com.netflix.eureka.registry;
import com.netflix.appinfo.ApplicationInfoManager;
import com.netflix.appinfo.InstanceInfo;
import com.netflix.appinfo.InstanceInfo.InstanceStatus;
import com.netflix.discovery.shared.Application;
import com.netflix.discovery.shared.Applications;
import com.netflix.discovery.shared.LookupService;
import com.netflix.discovery.shared.Pair;
import com.netflix.eureka.lease.LeaseManager;
import java.util.List;
import java.util.Map;
/**
* @author Tomasz Bak
*/
public interface InstanceRegistry extends LeaseManager<InstanceInfo>, LookupService<String> {
void openForTraffic(ApplicationInfoManager applicationInfoManager, int count);
void shutdown();
@Deprecated
void storeOverriddenStatusIfRequired(String id, InstanceStatus overriddenStatus);
void storeOverriddenStatusIfRequired(String appName, String id, InstanceStatus overriddenStatus);
boolean statusUpdate(String appName, String id, InstanceStatus newStatus,
String lastDirtyTimestamp, boolean isReplication);
boolean deleteStatusOverride(String appName, String id, InstanceStatus newStatus,
String lastDirtyTimestamp, boolean isReplication);
Map<String, InstanceStatus> overriddenInstanceStatusesSnapshot();
Applications getApplicationsFromLocalRegionOnly();
List<Application> getSortedApplications();
/**
* Get application information.
*
* @param appName The name of the application
* @param includeRemoteRegion true, if we need to include applications from remote regions
* as indicated by the region {@link java.net.URL} by this property
* {@link com.netflix.eureka.EurekaServerConfig#getRemoteRegionUrls()}, false otherwise
* @return the application
*/
Application getApplication(String appName, boolean includeRemoteRegion);
/**
* Gets the {@link InstanceInfo} information.
*
* @param appName the application name for which the information is requested.
* @param id the unique identifier of the instance.
* @return the information about the instance.
*/
InstanceInfo getInstanceByAppAndId(String appName, String id);
/**
* Gets the {@link InstanceInfo} information.
*
* @param appName the application name for which the information is requested.
* @param id the unique identifier of the instance.
* @param includeRemoteRegions true, if we need to include applications from remote regions
* as indicated by the region {@link java.net.URL} by this property
* {@link com.netflix.eureka.EurekaServerConfig#getRemoteRegionUrls()}, false otherwise
* @return the information about the instance.
*/
InstanceInfo getInstanceByAppAndId(String appName, String id, boolean includeRemoteRegions);
void clearRegistry();
void initializedResponseCache();
ResponseCache getResponseCache();
long getNumOfRenewsInLastMin();
int getNumOfRenewsPerMinThreshold();
int isBelowRenewThresold();
List<Pair<Long, String>> getLastNRegisteredInstances();
List<Pair<Long, String>> getLastNCanceledInstances();
/**
* Checks whether lease expiration is enabled.
* @return true if enabled
*/
boolean isLeaseExpirationEnabled();
boolean isSelfPreservationModeEnabled();
}
| [
"1209829998@qq.com"
] | 1209829998@qq.com |
670cefb2ea8288e641c8070aae803cf1e12a9994 | 3e5eb14b2fd0ad097e83bb12c53790875b602827 | /easyexcel-poi/src/main/java/com/feng/easyexcelpoi/easyexcel/ConverterDataListener.java | fedadf5d8fa0b7fb9eefa2482ad3f885042d61b6 | [] | no_license | judelawlee/public-repository | 25331e4f0564f309b6fc15aab5888a777fe7fdb0 | 565dd9ccca9c9f5f97dcac5541c9f6b50c5b3ffc | refs/heads/master | 2021-03-23T22:20:47.584915 | 2020-03-10T02:57:27 | 2020-03-10T02:57:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,410 | java | package com.feng.easyexcelpoi.easyexcel;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.fastjson.JSON;
/**
* 模板的读取类
*
* @author Jiaju Zhuang
*/
public class ConverterDataListener extends AnalysisEventListener<ConverterData> {
private static final Logger LOGGER = LoggerFactory.getLogger(ConverterDataListener.class);
/**
* 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收
*/
private static final int BATCH_COUNT = 5;
List<ConverterData> list = new ArrayList<ConverterData>();
@Override
public void invoke(ConverterData data, AnalysisContext context) {
LOGGER.info("解析到一条数据:{}", JSON.toJSONString(data));
list.add(data);
if (list.size() >= BATCH_COUNT) {
saveData();
list.clear();
}
}
@Override
public void doAfterAllAnalysed(AnalysisContext context) {
saveData();
LOGGER.info("所有数据解析完成!");
}
/**
* 加上存储数据库
*/
private void saveData() {
LOGGER.info("{}条数据,开始存储数据库!", list.size());
LOGGER.info("存储数据库成功!");
}
}
| [
"445121408@qq.com"
] | 445121408@qq.com |
503befddd2539d455d9260150d37de32403dbc75 | 4be72dee04ebb3f70d6e342aeb01467e7e8b3129 | /bin/ext-commerce/commerceservices/testsrc/de/hybris/platform/commerceservices/strategies/impl/DefaultCartValidationStrategyTest.java | bd9215230779c55be008b34bc977af42d32a453f | [] | no_license | lun130220/hybris | da00774767ba6246d04cdcbc49d87f0f4b0b1b26 | 03c074ea76779f96f2db7efcdaa0b0538d1ce917 | refs/heads/master | 2021-05-14T01:48:42.351698 | 2018-01-07T07:21:53 | 2018-01-07T07:21:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,589 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2000-2015 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.commerceservices.strategies.impl;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;
import de.hybris.bootstrap.annotations.UnitTest;
import de.hybris.platform.commerceservices.order.CommerceCartModification;
import de.hybris.platform.commerceservices.order.CommerceCartModificationStatus;
import de.hybris.platform.commerceservices.stock.CommerceStockService;
import de.hybris.platform.core.model.order.CartEntryModel;
import de.hybris.platform.core.model.order.CartModel;
import de.hybris.platform.core.model.order.payment.PaymentInfoModel;
import de.hybris.platform.core.model.product.ProductModel;
import de.hybris.platform.core.model.user.AddressModel;
import de.hybris.platform.core.model.user.UserModel;
import de.hybris.platform.order.CartService;
import de.hybris.platform.product.ProductService;
import de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException;
import de.hybris.platform.servicelayer.model.ModelService;
import de.hybris.platform.servicelayer.user.UserService;
import de.hybris.platform.store.BaseStoreModel;
import de.hybris.platform.store.services.BaseStoreService;
import java.util.Collections;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
@UnitTest
public class DefaultCartValidationStrategyTest
{
private DefaultCartValidationStrategy strategy;
@Mock
private ModelService modelService;
@Mock
private CartService cartService;
@Mock
private ProductService productService;
@Mock
private CommerceStockService commerceStockService;
@Mock
private BaseStoreService baseStoreService;
@Mock
private UserService userService;
@Mock
private CartModel cart;
@Mock
private CartEntryModel cartEntry;
@Mock
private ProductModel product;
@Mock
private BaseStoreModel store;
@Mock
private UserModel previousUser;
@Mock
private UserModel currentUser;
@Before
public void setUp()
{
MockitoAnnotations.initMocks(this);
strategy = new DefaultCartValidationStrategy();
strategy.setModelService(modelService);
strategy.setCartService(cartService);
strategy.setProductService(productService);
strategy.setCommerceStockService(commerceStockService);
strategy.setBaseStoreService(baseStoreService);
strategy.setUserService(userService);
given(cartEntry.getProduct()).willReturn(product);
given(product.getCode()).willReturn("1");
given(baseStoreService.getCurrentBaseStore()).willReturn(store);
given(cartService.getEntriesForProduct(cart, product)).willReturn(Collections.<CartEntryModel> emptyList());
}
@Test
public void testUnavailableStock()
{
given(productService.getProductForCode(cartEntry.getProduct().getCode())).willThrow(
new UnknownIdentifierException("Product is unavailable."));
final CommerceCartModification modification = strategy.validateCartEntry(cart, cartEntry);
Assert.assertEquals(CommerceCartModificationStatus.UNAVAILABLE, modification.getStatusCode());
}
@Test
public void testNoStock()
{
given(productService.getProductForCode(cartEntry.getProduct().getCode())).willReturn(product);
given(commerceStockService.getStockLevelForProductAndBaseStore(product, store)).willReturn(Long.valueOf(0));
given(cartEntry.getQuantity()).willReturn(Long.valueOf(20));
final CommerceCartModification modification = strategy.validateCartEntry(cart, cartEntry);
Assert.assertEquals(CommerceCartModificationStatus.NO_STOCK, modification.getStatusCode());
}
@Test
public void testLowStock()
{
given(productService.getProductForCode(cartEntry.getProduct().getCode())).willReturn(product);
given(commerceStockService.getStockLevelForProductAndBaseStore(product, store)).willReturn(Long.valueOf(10));
given(cartEntry.getQuantity()).willReturn(Long.valueOf(20));
final CommerceCartModification modification = strategy.validateCartEntry(cart, cartEntry);
Assert.assertEquals(CommerceCartModificationStatus.LOW_STOCK, modification.getStatusCode());
}
@Test
public void testShouldRemovePaymentAndDelivery()
{
final CartModel cartToBeCleaned = new CartModel();
setupCartToBeCleaned(cartToBeCleaned);
given(userService.getCurrentUser()).willReturn(currentUser);
strategy.cleanCart(cartToBeCleaned);
Assert.assertNull(cartToBeCleaned.getPaymentInfo());
Assert.assertNull(cartToBeCleaned.getDeliveryAddress());
}
@Test
public void testShouldNotRemovePaymentAndDelivery()
{
final CartModel cartToBeCleaned = new CartModel();
setupCartToBeCleaned(cartToBeCleaned);
given(userService.getCurrentUser()).willReturn(previousUser);
strategy.cleanCart(cartToBeCleaned);
Assert.assertNotNull(cartToBeCleaned.getPaymentInfo());
Assert.assertNotNull(cartToBeCleaned.getDeliveryAddress());
}
protected void setupCartToBeCleaned(final CartModel cartModel)
{
final PaymentInfoModel paymentInfo = mock(PaymentInfoModel.class);
given(paymentInfo.getUser()).willReturn(previousUser);
cartModel.setPaymentInfo(paymentInfo);
final AddressModel deliveryAddress = mock(AddressModel.class);
given(deliveryAddress.getOwner()).willReturn(previousUser);
cartModel.setDeliveryAddress(deliveryAddress);
}
} | [
"lun130220@gamil.com"
] | lun130220@gamil.com |
59f3c212ddbc526cc9b8038bd72bfdc78fc225b5 | cfd19cdabb61608bdb5e9b872e840305084aec07 | /SmartUniversity/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/bridge/JSIModuleType.java | 153185ff3c49728961e9cdc6a716d4104eecb2b4 | [
"MIT"
] | permissive | Roshmar/React-Native | bab2661e6a419083bdfb2a44af26d40e0b67786c | 177d8e47731f3a0b82ba7802752976df1ceb78aa | refs/heads/main | 2023-06-24T17:33:00.264894 | 2021-07-19T23:01:12 | 2021-07-19T23:01:12 | 387,580,266 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 128 | java | version https://git-lfs.github.com/spec/v1
oid sha256:a72452772ba062f4dadc5aaf3d18c4d1652146071fce9a38bc21fdd4f1c47101
size 408
| [
"martin.roshko@student.tuke.sk"
] | martin.roshko@student.tuke.sk |
479c94cf605b544e5b5854cf5e68d8625a74d758 | 352224b7deceb4698efa66bfcc9909ad0786b796 | /src/main/java/com/myself/wxpay/service/PayService.java | f819929a0edc10586dd80f2a248f3ac1e49a222f | [] | no_license | UncleCatMySelf/EsayWxPay | 4f62ee1a8d180c8b9a1cfdfd9b40436204b1a00f | d74184c684079e79842457bd003a1a389d03c350 | refs/heads/master | 2020-03-24T13:12:31.903657 | 2018-07-29T07:10:53 | 2018-07-29T07:10:53 | 142,738,674 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 523 | java | package com.myself.wxpay.service;
import com.lly835.bestpay.model.PayResponse;
import com.myself.wxpay.bean.OrderDTO;
import com.myself.wxpay.bean.WxRefundResponse;
import com.myself.wxpay.bean.WxResponse;
/**
* @Author:UncleCatMySelf
* @Email:zhupeijie_java@126.com
* @QQ:1341933031
* @Date:Created in 14:46 2018\7\29 0029
*/
public interface PayService {
WxResponse create(OrderDTO orderDTO);
PayResponse notify(String notifyData);
WxRefundResponse refund(OrderDTO orderDTO);
}
| [
"awakeningcode@126.com"
] | awakeningcode@126.com |
3dd0083b0baded5d2463ad62ce456497ad61dbe0 | 53d677a55e4ece8883526738f1c9d00fa6560ff7 | /com/tencent/mm/plugin/remittance/bankcard/ui/BankRemitBankcardInputUI$24.java | 6bc40a5c9eebb2fc9ffe26d903cb9de0eb553ad5 | [] | no_license | 0jinxing/wechat-apk-source | 544c2d79bfc10261eb36389c1edfdf553d8f312a | f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d | refs/heads/master | 2020-06-07T20:06:03.580028 | 2019-06-21T09:17:26 | 2019-06-21T09:17:26 | 193,069,132 | 9 | 4 | null | null | null | null | UTF-8 | Java | false | false | 1,308 | java | package com.tencent.mm.plugin.remittance.bankcard.ui;
import android.text.Editable;
import android.text.TextWatcher;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.platformtools.al;
final class BankRemitBankcardInputUI$24
implements TextWatcher
{
BankRemitBankcardInputUI$24(BankRemitBankcardInputUI paramBankRemitBankcardInputUI)
{
}
public final void afterTextChanged(Editable paramEditable)
{
AppMethodBeat.i(44540);
BankRemitBankcardInputUI.q(this.pMO);
al.n(new Runnable()
{
public final void run()
{
AppMethodBeat.i(44539);
BankRemitBankcardInputUI.k(BankRemitBankcardInputUI.24.this.pMO);
AppMethodBeat.o(44539);
}
}
, 200L);
AppMethodBeat.o(44540);
}
public final void beforeTextChanged(CharSequence paramCharSequence, int paramInt1, int paramInt2, int paramInt3)
{
}
public final void onTextChanged(CharSequence paramCharSequence, int paramInt1, int paramInt2, int paramInt3)
{
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes7-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.remittance.bankcard.ui.BankRemitBankcardInputUI.24
* JD-Core Version: 0.6.2
*/ | [
"172601673@qq.com"
] | 172601673@qq.com |
de2db7ea9d4734f2c5ca5f9e31159f127e4959b5 | 3459e9d4acac2a611b7be4af3112e5b344cab224 | /app/src/main/java/com/v1ncent/awesome/widget/custom_dialog/anim/Jelly.java | 91dd9082b94d9f3b024f8bbd2111595d8d6217cf | [] | no_license | v1ncent9527/aweSome | dd66d29e8e3a8d53e165b5d3c942d7535dc39d89 | f2910434bbcf0b5a6683982c817e3fd389f88d5c | refs/heads/master | 2020-04-05T14:38:53.235246 | 2017-08-14T02:12:18 | 2017-08-14T02:12:18 | 94,726,374 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 505 | java | package com.v1ncent.awesome.widget.custom_dialog.anim;
import android.animation.ObjectAnimator;
import android.view.View;
public class Jelly extends BaseAnimatorSet {
public Jelly() {
duration = 700;
}
@Override
public void setAnimation(View view) {
animatorSet.playTogether(//
ObjectAnimator.ofFloat(view, "scaleX", 0.3f, 0.5f, 0.9f, 0.8f, 0.9f, 1),//
ObjectAnimator.ofFloat(view, "scaleY", 0.3f, 0.5f, 0.9f, 0.8f, 0.9f, 1),//
ObjectAnimator.ofFloat(view, "alpha", 0.2f, 1));
}
}
| [
"1041066648@qq.com"
] | 1041066648@qq.com |
c9b4199a5d2c9025dec1c99ca8e3505ffd8c34f3 | 9b32926df2e61d54bd5939d624ec7708044cb97f | /src/main/java/com/rocket/summer/framework/expression/EvaluationException.java | c1610e02e1c2a7ad31e6fed5f2033840d6dd90bf | [] | no_license | goder037/summer | d521c0b15c55692f9fd8ba2c0079bfb2331ef722 | 6b51014e9a3e3d85fb48899aa3898812826378d5 | refs/heads/master | 2022-10-08T12:23:58.088119 | 2019-11-19T07:58:13 | 2019-11-19T07:58:13 | 89,110,409 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,785 | java | package com.rocket.summer.framework.expression;
/**
* Represent an exception that occurs during expression evaluation.
*
* @author Andy Clement
* @since 3.0
*/
public class EvaluationException extends ExpressionException {
/**
* Create a new expression evaluation exception.
* @param message description of the problem that occurred
*/
public EvaluationException(String message) {
super(message);
}
/**
* Create a new expression evaluation exception.
* @param message description of the problem that occurred
* @param cause the underlying cause of this exception
*/
public EvaluationException(String message, Throwable cause) {
super(message,cause);
}
/**
* Create a new expression evaluation exception.
* @param position the position in the expression where the problem occurred
* @param message description of the problem that occurred
*/
public EvaluationException(int position, String message) {
super(position, message);
}
/**
* Create a new expression evaluation exception.
* @param expressionString the expression that could not be evaluated
* @param message description of the problem that occurred
*/
public EvaluationException(String expressionString, String message) {
super(expressionString, message);
}
/**
* Create a new expression evaluation exception.
* @param position the position in the expression where the problem occurred
* @param message description of the problem that occurred
* @param cause the underlying cause of this exception
*/
public EvaluationException(int position, String message, Throwable cause) {
super(position, message, cause);
}
}
| [
"liujie152@hotmail.com"
] | liujie152@hotmail.com |
32ca127cff6adc8654f9bd0c045240d198382c92 | 56cd6c71083ea0ca4df72bf957bd7d637b575309 | /gallerycommon/src/com/android/gallery3d/util/Log.java | 7d86ba1049dec603f13e42ca827a97e85b2faece | [] | no_license | fuchao/mtkgalleryO | 2c69623a3901828a31de04fd2430686fb8653aec | 8fd356b42b95006efb57d1a7e75ad2c5a7044411 | refs/heads/master | 2020-04-12T18:52:40.440057 | 2018-05-22T08:20:06 | 2018-05-22T08:20:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,270 | java | package com.android.gallery3d.util;
import android.os.SystemProperties;
/**
* Log wrapper.
*/
public class Log {
private static final String TAG = "MtkGallery2/Log";
private static final int CUST_LOG_LEVEL_V = 0;
private static final int CUST_LOG_LEVEL_D = 1;
private static final int CUST_LOG_LEVEL_I = 2;
private static final int CUST_LOG_LEVEL_W = 3;
private static final int CUST_LOG_LEVEL_E = 4;
private static final String BUILD_TYPE = SystemProperties.get("ro.build.type");
private static final boolean IS_ENG = "eng".equalsIgnoreCase(BUILD_TYPE);
private static final int LOG_LEVEL_IN_PROPERTY =
SystemProperties.getInt("debug.gallery.loglevel", CUST_LOG_LEVEL_I);
private static final int CUST_LOG_LEVEL =
LOG_LEVEL_IN_PROPERTY >= CUST_LOG_LEVEL_V && LOG_LEVEL_IN_PROPERTY <= CUST_LOG_LEVEL_E
? LOG_LEVEL_IN_PROPERTY : CUST_LOG_LEVEL_I;
private static final boolean FORCE_ENABLE =
"1".equals(SystemProperties.get("gallery.log.enable"));
static {
android.util.Log.d(TAG, "BUILD_TYPE: " + BUILD_TYPE + ", IS_ENG: " + IS_ENG
+ ", CUST_LOG_LEVEL: " + CUST_LOG_LEVEL + ", FORCE_ENABLE: " + FORCE_ENABLE);
}
/**
* Log.v.
* @param tag log tag
* @param msg log message
*/
public static void v(String tag, String msg) {
if (tag == null) {
return;
}
if (IS_ENG || FORCE_ENABLE || enableCustLog(CUST_LOG_LEVEL_V)) {
android.util.Log.v(tag, msg);
}
}
/**
* Log.v.
* @param tag log tag
* @param msg log message
* @param tr throwable
*/
public static void v(String tag, String msg, Throwable tr) {
if (tag == null) {
return;
}
if (IS_ENG || FORCE_ENABLE || enableCustLog(CUST_LOG_LEVEL_V)) {
android.util.Log.v(tag, msg, tr);
}
}
/**
* Log.d.
* @param tag log tag
* @param msg log message
*/
public static void d(String tag, String msg) {
if (tag == null) {
return;
}
if (IS_ENG || FORCE_ENABLE || enableCustLog(CUST_LOG_LEVEL_D)) {
android.util.Log.d(tag, msg);
}
}
/**
* Log.d.
* @param tag log tag
* @param msg log message
* @param tr throwable
*/
public static void d(String tag, String msg, Throwable tr) {
if (tag == null) {
return;
}
if (IS_ENG || FORCE_ENABLE || enableCustLog(CUST_LOG_LEVEL_D)) {
android.util.Log.d(tag, msg, tr);
}
}
/**
* Log.i.
* @param tag log tag
* @param msg log message
*/
public static void i(String tag, String msg) {
if (tag == null) {
return;
}
if (IS_ENG || FORCE_ENABLE || enableCustLog(CUST_LOG_LEVEL_I)) {
android.util.Log.i(tag, msg);
}
}
/**
* Log.i.
* @param tag log tag
* @param msg log message
* @param tr throwable
*/
public static void i(String tag, String msg, Throwable tr) {
if (tag == null) {
return;
}
if (IS_ENG || FORCE_ENABLE || enableCustLog(CUST_LOG_LEVEL_I)) {
android.util.Log.i(tag, msg, tr);
}
}
/**
* Log.w.
* @param tag log tag
* @param msg log message
*/
public static void w(String tag, String msg) {
if (tag == null) {
return;
}
if (IS_ENG || FORCE_ENABLE || enableCustLog(CUST_LOG_LEVEL_W)) {
android.util.Log.w(tag, msg);
}
}
/**
* Log.w.
* @param tag log tag
* @param tr throwable
*/
public static void w(String tag, Throwable tr) {
if (tag == null) {
return;
}
if (IS_ENG || FORCE_ENABLE || enableCustLog(CUST_LOG_LEVEL_W)) {
android.util.Log.w(tag, tr);
}
}
/**
* Log.w.
* @param tag log tag
* @param msg log message
* @param tr throwable
*/
public static void w(String tag, String msg, Throwable tr) {
if (tag == null) {
return;
}
if (IS_ENG || FORCE_ENABLE || enableCustLog(CUST_LOG_LEVEL_W)) {
android.util.Log.w(tag, msg, tr);
}
}
/**
* Log.e.
* @param tag log tag
* @param msg log message
*/
public static void e(String tag, String msg) {
if (tag == null) {
return;
}
if (IS_ENG || FORCE_ENABLE || enableCustLog(CUST_LOG_LEVEL_E)) {
android.util.Log.e(tag, msg);
}
}
/**
* Log.e.
* @param tag log tag
* @param msg log message
* @param tr throwable
*/
public static void e(String tag, String msg, Throwable tr) {
if (tag == null) {
return;
}
if (IS_ENG || FORCE_ENABLE || enableCustLog(CUST_LOG_LEVEL_E)) {
android.util.Log.e(tag, msg, tr);
}
}
private static boolean enableCustLog(int custLogLevel) {
if (CUST_LOG_LEVEL >= 0 && CUST_LOG_LEVEL <= 4) {
return custLogLevel >= CUST_LOG_LEVEL;
}
return false;
}
}
| [
"gulincheng@droi.com"
] | gulincheng@droi.com |
c64ad6bd4174505801f82f736be2abc546eb7038 | b75867b52256591b6c7b4fa03554c318dd8f4779 | /src/main/java/org/theseed/utils/RestartableBaseProcessor.java | a4e1758496ae222f42e1b4c1d45a1adfbb59e48d | [] | no_license | SEEDtk/shared | fccce571f1f34642a49150509f0418d6a9e58a99 | c16d824a692baa734a656875acdfed0c29c8b757 | refs/heads/master | 2023-09-03T23:05:20.724602 | 2023-08-31T01:32:42 | 2023-08-31T01:32:42 | 195,569,448 | 0 | 0 | null | 2021-11-13T18:54:52 | 2019-07-06T18:06:40 | Java | UTF-8 | Java | false | false | 4,781 | java | /**
*
*/
package org.theseed.utils;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import org.kohsuke.args4j.Option;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.theseed.io.TabbedLineReader;
/**
* This is a base class for restartable processes. It is presumed that the output file is tab-delimited with headers,
* and one of the columns contains item IDs.
*
* The "--resume" option specifies the old output file for resuming.
*
* Call "isProcessed" to find out of an item is already processed.
*
* Call "markProcessed" for each item processed.
*
* Call "println" or "format" to write to the output stream.
*
* Call "setup" to set up the output stream.
*
* @author Bruce Parrello
*
*/
public abstract class RestartableBaseProcessor extends BaseProcessor {
// FIELDS
/** logging facility */
protected static Logger log = LoggerFactory.getLogger(RestartableBaseProcessor.class);
/** output stream */
private PrintStream output;
/** set of IDs for items already processed */
private Set<String> processedItems;
// COMMAND-LINE OPTIONS
/** old output file if we are resuming */
@Option(name = "--resume", metaVar = "output.log", usage = "if we are resuming, the output file from the interrupted run")
private File resumeFile;
/**
* Construct a restartable processor.
*/
public RestartableBaseProcessor() {
this.resumeFile = null;
}
/**
* Check for a resume situation. (This should be called during validation.)
*
* @param header heading line for output file
* @param idCol name of ID column
*
* @return the number of items already processed
*
* @throws IOException
*/
protected int setup(String header, String idCol) throws IOException {
int retVal = 0;
this.processedItems = new HashSet<String>();
// Check for a resume situation.
if (this.resumeFile == null) {
// Normal processing. Put the log to the standard output.
System.out.println(header);
this.output = System.out;
} else if (! this.resumeFile.exists()) {
// Here the resume file is a new file. Create it and put the header in it.
FileOutputStream outStream = new FileOutputStream(this.resumeFile);
this.output = new PrintStream(outStream, true);
this.output.println(header);
} else {
// Resume processing. Save the roles we've already seen.
try (TabbedLineReader reader = new TabbedLineReader(this.resumeFile)) {
int idColIdx = reader.findField(idCol);
for (TabbedLineReader.Line line : reader) {
this.processedItems.add(line.get(idColIdx));
}
}
// Open the resume file for append-style output with autoflush.
FileOutputStream outStream = new FileOutputStream(this.resumeFile, true);
this.output = new PrintStream(outStream, true);
// Count the number of items already processed.
retVal = this.processedItems.size();
}
return retVal;
}
/**
* @return TRUE if the specified item has already been processed
*/
protected boolean isProcessed(String itemId) {
boolean retVal = false;
if (this.processedItems.contains(itemId)) {
log.info("Skipping {}: already processed.", itemId);
retVal = true;
}
return retVal;
}
/**
* Denote that an item has been processed.
*
* @param itemId ID of the processed item
*
* @return the total number of items processed so far
*/
protected int markProcessed(String itemId) {
this.processedItems.add(itemId);
return this.processedItems.size();
}
/**
* Write a line of formatted output.
*
* @param format output format string
* @param args arguments
*/
public void format(String format, Object... args) {
this.output.format(format, args);
}
/**
* Write a string as a line of output.
*
* @param line text to write
*/
public void println(String line) {
this.output.println(line);
}
/**
* Remove the processed items from a collection.
*
* @param itemSet collection to update
*/
public void removeProcessed(Collection<String> itemSet) {
itemSet.removeAll(this.processedItems);
}
/**
* Close the output stream.
*/
public void closeOutput() {
this.output.close();
}
}
| [
"bparrello@figresearch.com"
] | bparrello@figresearch.com |
de9d3316b41ffe35d90af65430dc2101aa0c0712 | 9b294c3bf262770e9bac252b018f4b6e9412e3ee | /camerazadas/source/apk/com.sonyericsson.android.camera/src-cfr-nocode/com/google/android/gms/games/internal/IRoomServiceCallbacks.java | dd4b6f4a3562c5f56a6133fe82a23bd90de76f55 | [] | no_license | h265/camera | 2c00f767002fd7dbb64ef4dc15ff667e493cd937 | 77b986a60f99c3909638a746c0ef62cca38e4235 | refs/heads/master | 2020-12-30T22:09:17.331958 | 2015-08-25T01:22:25 | 2015-08-25T01:22:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,292 | java | /*
* Decompiled with CFR 0_100.
*/
package com.google.android.gms.games.internal;
import android.os.Binder;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Parcel;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
import com.google.android.gms.games.internal.ConnectionInfo;
public interface IRoomServiceCallbacks
extends IInterface {
public void a(ParcelFileDescriptor var1, int var2) throws RemoteException;
public void a(ConnectionInfo var1) throws RemoteException;
public void a(String var1, byte[] var2, int var3) throws RemoteException;
public void a(String var1, String[] var2) throws RemoteException;
public void aD(IBinder var1) throws RemoteException;
public void b(String var1, String[] var2) throws RemoteException;
public void bP(String var1) throws RemoteException;
public void bQ(String var1) throws RemoteException;
public void bR(String var1) throws RemoteException;
public void bS(String var1) throws RemoteException;
public void bT(String var1) throws RemoteException;
public void bU(String var1) throws RemoteException;
public void c(int var1, int var2, String var3) throws RemoteException;
public void c(String var1, byte[] var2) throws RemoteException;
public void c(String var1, String[] var2) throws RemoteException;
public void d(String var1, String[] var2) throws RemoteException;
public void dF(int var1) throws RemoteException;
public void e(String var1, String[] var2) throws RemoteException;
public void f(String var1, String[] var2) throws RemoteException;
public void g(String var1, String[] var2) throws RemoteException;
public void i(String var1, boolean var2) throws RemoteException;
public void kK() throws RemoteException;
public void kL() throws RemoteException;
public void onP2PConnected(String var1) throws RemoteException;
public void onP2PDisconnected(String var1) throws RemoteException;
public void v(String var1, int var2) throws RemoteException;
/*
* Exception performing whole class analysis ignored.
*/
public static abstract class Stub
extends Binder
implements IRoomServiceCallbacks {
public Stub();
public static IRoomServiceCallbacks aE(IBinder var0);
@Override
public boolean onTransact(int var1, Parcel var2, Parcel var3, int var4) throws RemoteException;
/*
* Exception performing whole class analysis.
* Exception performing whole class analysis ignored.
*/
private static class Proxy
implements IRoomServiceCallbacks {
private IBinder lb;
Proxy(IBinder var1);
@Override
public void a(ParcelFileDescriptor var1, int var2) throws RemoteException;
@Override
public void a(ConnectionInfo var1) throws RemoteException;
@Override
public void a(String var1, byte[] var2, int var3) throws RemoteException;
@Override
public void a(String var1, String[] var2) throws RemoteException;
@Override
public void aD(IBinder var1) throws RemoteException;
@Override
public IBinder asBinder();
@Override
public void b(String var1, String[] var2) throws RemoteException;
@Override
public void bP(String var1) throws RemoteException;
@Override
public void bQ(String var1) throws RemoteException;
@Override
public void bR(String var1) throws RemoteException;
@Override
public void bS(String var1) throws RemoteException;
@Override
public void bT(String var1) throws RemoteException;
@Override
public void bU(String var1) throws RemoteException;
@Override
public void c(int var1, int var2, String var3) throws RemoteException;
@Override
public void c(String var1, byte[] var2) throws RemoteException;
@Override
public void c(String var1, String[] var2) throws RemoteException;
@Override
public void d(String var1, String[] var2) throws RemoteException;
@Override
public void dF(int var1) throws RemoteException;
@Override
public void e(String var1, String[] var2) throws RemoteException;
@Override
public void f(String var1, String[] var2) throws RemoteException;
@Override
public void g(String var1, String[] var2) throws RemoteException;
@Override
public void i(String var1, boolean var2) throws RemoteException;
@Override
public void kK() throws RemoteException;
@Override
public void kL() throws RemoteException;
@Override
public void onP2PConnected(String var1) throws RemoteException;
@Override
public void onP2PDisconnected(String var1) throws RemoteException;
@Override
public void v(String var1, int var2) throws RemoteException;
}
}
}
| [
"jmrm@ua.pt"
] | jmrm@ua.pt |
e690ef375dd1e4f40380a126fad0e8f4b6aed04b | 00bfe82cc06143d8827559ffa079a66f60008d2f | /javaSourceLearn/src/source/com/sun/corba/se/spi/activation/Server.java | 6a9732bdedbb85bda3d67cc71b7586a8d7898e6f | [] | no_license | Zhangeaky/JAVASE | de7680058b491cb25e70284f237364dc67ca4927 | 2e97e3dbb9019f89356e9386545509726bf16324 | refs/heads/master | 2023-04-12T02:58:36.605425 | 2021-05-21T12:36:05 | 2021-05-21T12:36:05 | 335,182,265 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 552 | java | package com.sun.corba.se.spi.activation;
/**
* com/sun/corba/se/spi/activation/Server.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /scratch/jenkins/workspace/8-2-build-linux-amd64/jdk8u281/880/corba/src/share/classes/com/sun/corba/se/spi/activation/activation.idl
* Wednesday, December 9, 2020 12:38:46 PM GMT
*/
/** Server callback API, passed to Activator in active method.
*/
public interface Server extends ServerOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity
{
} // interface Server
| [
"zyk090104@163.com"
] | zyk090104@163.com |
f3dcdde4c0ae1bd968bb478731289311a6438c5d | 8f0d508be866a9a5c515c1bbbc5bf85693ef3ffd | /java393/src/main/java/soupply/java393/protocol/play_clientbound/PlayerListItem.java | 75bb06e5f149eae2fbc3d9e61d0e79ed8401411d | [
"MIT"
] | permissive | hanbule/java | 83e7e1e2725b48370b0151a2ac1ec222b5e99264 | 40fecf30625bdbdc71cce4c6e3222022c0387c6e | refs/heads/master | 2021-09-21T22:43:25.890116 | 2018-09-02T09:28:23 | 2018-09-02T09:28:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,951 | java | package soupply.java393.protocol.play_clientbound;
import java.util.*;
import soupply.util.*;
public class PlayerListItem extends soupply.java393.Packet
{
public static final int ID = 48;
public int action;
public PlayerListItem()
{
}
public PlayerListItem(int action)
{
this.action = action;
}
@Override
public int getId()
{
return ID;
}
@Override
public void encodeBody(Buffer _buffer)
{
_buffer.writeVaruint(action);
}
@Override
public void decodeBody(Buffer _buffer) throws DecodeException
{
action = _buffer.readVaruint();
}
public static PlayerListItem fromBuffer(byte[] buffer)
{
PlayerListItem packet = new PlayerListItem();
packet.safeDecode(buffer);
return packet;
}
private void encodeMainBody(Buffer _buffer)
{
this.encodeBody(_buffer);
}
public class AddPlayer extends Type
{
public soupply.java393.type.ListAddPlayer[] players;
public AddPlayer()
{
}
public AddPlayer(soupply.java393.type.ListAddPlayer[] players)
{
this.players = players;
}
@Override
public void encodeBody(Buffer _buffer)
{
action = 0;
encodeMainBody(_buffer);
_buffer.writeVaruint((int)players.length);
for(soupply.java393.type.ListAddPlayer cxevc:players)
{
cxevc.encodeBody(_buffer);
}
}
@Override
public void decodeBody(Buffer _buffer) throws DecodeException
{
final int bbylcm = _buffer.readVaruint();
players = new soupply.java393.type.ListAddPlayer[bbylcm];
for(int cxevc=0;cxevc<players.length;cxevc++)
{
players[cxevc].decodeBody(_buffer);
}
}
}
public class UpdateGamemode extends Type
{
public soupply.java393.type.ListUpdateGamemode[] players;
public UpdateGamemode()
{
}
public UpdateGamemode(soupply.java393.type.ListUpdateGamemode[] players)
{
this.players = players;
}
@Override
public void encodeBody(Buffer _buffer)
{
action = 1;
encodeMainBody(_buffer);
_buffer.writeVaruint((int)players.length);
for(soupply.java393.type.ListUpdateGamemode cxevc:players)
{
cxevc.encodeBody(_buffer);
}
}
@Override
public void decodeBody(Buffer _buffer) throws DecodeException
{
final int bbylcm = _buffer.readVaruint();
players = new soupply.java393.type.ListUpdateGamemode[bbylcm];
for(int cxevc=0;cxevc<players.length;cxevc++)
{
players[cxevc].decodeBody(_buffer);
}
}
}
public class UpdateLatency extends Type
{
public soupply.java393.type.ListUpdateLatency[] players;
public UpdateLatency()
{
}
public UpdateLatency(soupply.java393.type.ListUpdateLatency[] players)
{
this.players = players;
}
@Override
public void encodeBody(Buffer _buffer)
{
action = 2;
encodeMainBody(_buffer);
_buffer.writeVaruint((int)players.length);
for(soupply.java393.type.ListUpdateLatency cxevc:players)
{
cxevc.encodeBody(_buffer);
}
}
@Override
public void decodeBody(Buffer _buffer) throws DecodeException
{
final int bbylcm = _buffer.readVaruint();
players = new soupply.java393.type.ListUpdateLatency[bbylcm];
for(int cxevc=0;cxevc<players.length;cxevc++)
{
players[cxevc].decodeBody(_buffer);
}
}
}
public class UpdateDisplayName extends Type
{
public soupply.java393.type.ListUpdateDisplayName[] players;
public UpdateDisplayName()
{
}
public UpdateDisplayName(soupply.java393.type.ListUpdateDisplayName[] players)
{
this.players = players;
}
@Override
public void encodeBody(Buffer _buffer)
{
action = 3;
encodeMainBody(_buffer);
_buffer.writeVaruint((int)players.length);
for(soupply.java393.type.ListUpdateDisplayName cxevc:players)
{
cxevc.encodeBody(_buffer);
}
}
@Override
public void decodeBody(Buffer _buffer) throws DecodeException
{
final int bbylcm = _buffer.readVaruint();
players = new soupply.java393.type.ListUpdateDisplayName[bbylcm];
for(int cxevc=0;cxevc<players.length;cxevc++)
{
players[cxevc].decodeBody(_buffer);
}
}
}
public class RemovePlayer extends Type
{
public UUID[] players;
public RemovePlayer()
{
}
public RemovePlayer(UUID[] players)
{
this.players = players;
}
@Override
public void encodeBody(Buffer _buffer)
{
action = 4;
encodeMainBody(_buffer);
_buffer.writeVaruint((int)players.length);
for(UUID cxevc:players)
{
_buffer.writeUUID(cxevc);
}
}
@Override
public void decodeBody(Buffer _buffer) throws DecodeException
{
final int bbylcm = _buffer.readVaruint();
players = new UUID[bbylcm];
for(int cxevc=0;cxevc<players.length;cxevc++)
{
players[cxevc] = _buffer.readUUID();
}
}
}
}
| [
"selutils@mail.com"
] | selutils@mail.com |
9c692e891fd236e102b9009d41b6fc53bb33193f | e42070d056f0ee578e9cf74abd0499a7f18c9a42 | /modules/cpr/src/main/java/org/atmosphere/annotation/WebSocketProcessorServiceProcessor.java | 1a9479e9d1c9077b7c91d9c4efb019702f75c99e | [] | no_license | Ocramius/atmosphere | 21a6fc20aa421e0eb0482c2fdbbecf7a8a0e9ac8 | 6f2f54a81761dccb94965b0d98f63b9f5f896377 | refs/heads/master | 2021-01-16T22:19:47.070604 | 2015-10-20T07:21:21 | 2015-10-20T07:21:21 | 44,595,728 | 2 | 0 | null | 2015-10-20T09:24:29 | 2015-10-20T09:24:29 | null | UTF-8 | Java | false | false | 1,652 | java | /*
* Copyright 2015 Async-IO.org
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package org.atmosphere.annotation;
import org.atmosphere.config.AtmosphereAnnotation;
import org.atmosphere.config.service.WebSocketProcessorService;
import org.atmosphere.cpr.AtmosphereFramework;
import org.atmosphere.websocket.WebSocketProcessor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@AtmosphereAnnotation(WebSocketProcessorService.class)
public class WebSocketProcessorServiceProcessor implements Processor<WebSocketProcessor> {
private static final Logger logger = LoggerFactory.getLogger(WebSocketProcessorServiceProcessor.class);
private boolean hasBeenSet;
@Override
public void handle(AtmosphereFramework framework, Class<WebSocketProcessor> annotatedClass) {
try {
if (!hasBeenSet) {
hasBeenSet = true;
framework.setWebsocketProcessorClassName(annotatedClass.getName());
} else {
logger.warn("WebSocketProcessor already configured");
}
} catch (Throwable e) {
logger.warn("", e);
}
}
}
| [
"jfarcand@apache.org"
] | jfarcand@apache.org |
9dc7179a312e97aa7caea7468b5fcc8d7f021985 | c6e4c765862b98d11f12f800789e0982a980e5d9 | /test/plugin/scenarios/feign-scenario/src/main/java/org/apache/skywalking/apm/testcase/feign/controller/RestRequest.java | 918c7394b45a65cc8d6a7780a90670c5bae33ca1 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | Fxdemon/incubator-skywalking | ba70e8a481c2613aa966e941a187f6eb140a67f2 | 89183fbc3830313566b58dbbab0a45cd94023141 | refs/heads/master | 2020-04-19T03:23:51.307175 | 2019-12-09T03:33:10 | 2019-12-09T03:33:10 | 152,511,085 | 2 | 0 | Apache-2.0 | 2019-01-28T01:10:09 | 2018-10-11T01:14:13 | Java | UTF-8 | Java | false | false | 2,077 | 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.skywalking.apm.testcase.feign.controller;
import feign.Body;
import feign.Feign;
import feign.Headers;
import feign.Logger;
import feign.Param;
import feign.RequestLine;
import feign.codec.Decoder;
import feign.gson.GsonDecoder;
import org.apache.skywalking.apm.testcase.feign.entity.User;
public interface RestRequest {
@RequestLine("GET /get/{id}")
User getById(@Param("id") int id);
@RequestLine("POST /create/")
@Headers("Content-Type: application/json")
@Body("%7B\"id\": \"{id}\", \"userName\": \"{userName}\"%7D")
void createUser(@Param("id") int id, @Param("userName") String userName);
@RequestLine("PUT /update/{id}")
@Headers("Content-Type: application/json")
@Body("%7B\"id\": \"{id}\", \"userName\": \"{userName}\"%7D")
User updateUser(@Param("id") int id, @Param("userName") String userName);
@RequestLine("DELETE /delete/{id}")
void deleteUser(@Param("id") int id);
static RestRequest connect() {
Decoder decoder = new GsonDecoder();
return Feign.builder()
.decoder(decoder)
.logger(new Logger.ErrorLogger())
.logLevel(Logger.Level.BASIC)
.target(RestRequest.class, "http://localhost:8080/feign-scenario");
}
}
| [
"wu.sheng@foxmail.com"
] | wu.sheng@foxmail.com |
f41998d5d250c72f358cecc5f39d80927cb72efa | 4436baf7696c892cc3c2333bc06caf00b0a111f8 | /entity/src/main/java/com/pengda/domain/UserLogin.java | ca0d4eecad004668af80db1638ab24fcd1fd8ebc | [] | no_license | IronMan-202/sb | 7f1000e98cbe1937460cb4e900233d38992099c7 | e925e9c499a6033ba8fa97a802853a0d644ca986 | refs/heads/master | 2020-03-11T02:19:58.508407 | 2018-04-17T07:38:18 | 2018-04-17T07:38:18 | 129,716,488 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 353 | java | package com.pengda.domain;
import lombok.Data;
import javax.persistence.*;
/**
* Created by Administrator on 2017/11/2.
*/
@Data
@Entity
public class UserLogin {
@Id
@GeneratedValue(strategy= GenerationType.AUTO)
@Column
private int id ;
@Column
private String loginName ;
@Column
private String loginPassword ;
}
| [
"12345678"
] | 12345678 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.