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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1b0c61052c590f35369cffe08df3b36a07268f33
|
cfc60fc1148916c0a1c9b421543e02f8cdf31549
|
/src/testcases/CWE617_Reachable_Assertion/CWE617_Reachable_Assertion__PropertiesFile_07.java
|
cf742cd9d6a2368678e3e36fa64d335e66a72a3e
|
[
"LicenseRef-scancode-public-domain"
] |
permissive
|
zhujinhua/GitFun
|
c77c8c08e89e61006f7bdbc5dd175e5d8bce8bd2
|
987f72fdccf871ece67f2240eea90e8c1971d183
|
refs/heads/master
| 2021-01-18T05:46:03.351267
| 2012-09-11T16:43:44
| 2012-09-11T16:43:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,243
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE617_Reachable_Assertion__PropertiesFile_07.java
Label Definition File: CWE617_Reachable_Assertion.label.xml
Template File: sources-sink-07.tmpl.java
*/
/*
* @description
* CWE: 617 Assertion is reachable
* BadSource: PropertiesFile Read a value from a .properties file (in property named data)
* GoodSource: A hardcoded string
* BadSink: possibility of assertion being triggered
* Flow Variant: 07 Control flow: if(private_five==5) and if(private_five!=5)
*
* */
package testcases.CWE617_Reachable_Assertion;
import testcasesupport.*;
import javax.servlet.http.*;
import java.util.Properties;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.logging.Logger;
public class CWE617_Reachable_Assertion__PropertiesFile_07 extends AbstractTestCase
{
/* The variable below is not declared "final", but is never assigned
any other value so a tool should be able to identify that reads of
this will always give its initialized value. */
private int private_five = 5;
/* uses badsource and badsink */
public void bad() throws Throwable
{
String data;
if(private_five == 5)
{
Logger log_bad = Logger.getLogger("local-logger");
data = ""; /* init data */
/* retrieve the property */
Properties props = new Properties();
FileInputStream finstr = null;
try
{
finstr = new FileInputStream("../common/config.properties");
props.load(finstr);
data = props.getProperty("data");
}
catch( IOException ioe )
{
log_bad.warning("Error with stream reading");
}
finally
{
/* clean up stream reading objects */
try {
if( finstr != null )
{
finstr.close();
}
}
catch( IOException ioe )
{
log_bad.warning("Error closing buffread");
}
}
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
java.util.logging.Logger log_good = java.util.logging.Logger.getLogger("local-logger");
/* FIX: Use a hardcoded string */
data = "foo";
}
/* POTENTIAL FLAW: assertion is evaluated */
assert data.length() > 0;
}
/* goodG2B1() - use goodsource and badsink by changing private_five==5 to private_five!=5 */
private void goodG2B1() throws Throwable
{
String data;
if(private_five != 5)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
Logger log_bad = Logger.getLogger("local-logger");
data = ""; /* init data */
/* retrieve the property */
Properties props = new Properties();
FileInputStream finstr = null;
try
{
finstr = new FileInputStream("../common/config.properties");
props.load(finstr);
data = props.getProperty("data");
}
catch( IOException ioe )
{
log_bad.warning("Error with stream reading");
}
finally
{
/* clean up stream reading objects */
try {
if( finstr != null )
{
finstr.close();
}
}
catch( IOException ioe )
{
log_bad.warning("Error closing buffread");
}
}
}
else {
java.util.logging.Logger log_good = java.util.logging.Logger.getLogger("local-logger");
/* FIX: Use a hardcoded string */
data = "foo";
}
/* POTENTIAL FLAW: assertion is evaluated */
assert data.length() > 0;
}
/* goodG2B2() - use goodsource and badsink by reversing statements in if */
private void goodG2B2() throws Throwable
{
String data;
if(private_five == 5)
{
java.util.logging.Logger log_good = java.util.logging.Logger.getLogger("local-logger");
/* FIX: Use a hardcoded string */
data = "foo";
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
Logger log_bad = Logger.getLogger("local-logger");
data = ""; /* init data */
/* retrieve the property */
Properties props = new Properties();
FileInputStream finstr = null;
try {
finstr = new FileInputStream("../common/config.properties");
props.load(finstr);
data = props.getProperty("data");
}
catch( IOException ioe )
{
log_bad.warning("Error with stream reading");
}
finally {
/* clean up stream reading objects */
try {
if( finstr != null )
{
finstr.close();
}
}
catch( IOException ioe )
{
log_bad.warning("Error closing buffread");
}
}
}
/* POTENTIAL FLAW: assertion is evaluated */
assert data.length() > 0;
}
public void good() throws Throwable
{
goodG2B1();
goodG2B2();
}
/* 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);
}
}
|
[
"amitf@chackmarx.com"
] |
amitf@chackmarx.com
|
dbd3f1c89d0df22547087387e8ae2180222f13e3
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/21/21_bec3c39fc2e5068bef671645a451206724aaef0b/ReflectionHelper/21_bec3c39fc2e5068bef671645a451206724aaef0b_ReflectionHelper_s.java
|
7c4878c7f0245ec891600b3fbe60ee7a4fdf67bb
|
[] |
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
| 7,539
|
java
|
package vooga.rts.util;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
* This is a class that makes it much easier to do reflection.
* It has a few methods that return the information that is needed.
*
* @author Jonathan Schmidt
* @modified Francesco Agosti
*/
public class ReflectionHelper {
/**
* Finds the Constructor of a specified class that take in the
* provided parameters.
*
* @param c The Class to search
* @param params The parameters to find a constructor for
* @return The constructor required to instantiate.
* @throws ClassDefinitionException
*/
public static Constructor<?> findConstructor (Class<?> c, Object ... params) {
Class<?>[] types = toClassArray(params);
Constructor<?>[] constructors = c.getConstructors();
for (Constructor<?> con : constructors) {
Class<?>[] conParams = con.getParameterTypes();
if (paramsEqual(types, conParams)) {
return con;
}
}
return null;
}
/**
* Retuns a new instance of your class given your parameters.
* @param c
* @param params
* @return
*/
public static Object makeInstance(Class<?> c, Object ... params){
try {
System.out.println(findConstructor(c,params));
return findConstructor(c,params).newInstance(params);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
/**
* Finds and returns the requested method.
*
* @param c The class to search in.
* @param methodName The name of the Method.
* @param params The parameters that the method takes in.
* @return
* @throws NoSuchMethodException
*/
public static Method findMethod (Class<?> c, String methodName, Class<?>[] params)
throws NoSuchMethodException {
Method res = c.getMethod(methodName, params);
return res;
}
/**
* Finds and returns the requested method
*
* @param c The class to search in.
* @param methodName The method name
* @param params An array of objects that contain the parameters for the method.
* @return The requested Method
* @throws NoSuchMethodException
*/
public static Method findMethod (Class<?> c, String methodName, Object[] params)
throws NoSuchMethodException {
Class<?>[] types = toClassArray(params);
return findMethod(c, methodName, types);
}
private static boolean paramsEqual (Class<?>[] c1, Class<?>[] c2) {
if (c1.length != c2.length) {
return false;
}
for (int i = 0; i < c1.length; i++) {
boolean similar = c1[i].isAssignableFrom(c2[i]) || c2[i].isAssignableFrom(c1[i]);
if (!similar) {
return false;
}
}
return true;
}
private static Class<?>[] toClassArray (Object ... params) {
Class<?>[] types = new Class<?>[params.length];
for (int i = 0; i < params.length; i++) {
//System.out.println(params[i]);
types[i] = params[i].getClass();
// Override Primitive Types
if (types[i] == Integer.class) {
types[i] = int.class;
}
if (types[i] == Boolean.class) {
types[i] = boolean.class;
}
}
return types;
}
private static Field getField (String property, Object object) {
Class<?> curClass = object.getClass();
do {
try {
Field toSet = curClass.getDeclaredField(property);
return toSet;
}
catch (NoSuchFieldException e) {
curClass = curClass.getSuperclass();
}
catch (SecurityException e) {
curClass = null;
}
} while (curClass != null);
return null;
}
private static boolean setValue (Field toSet, Object object, Object value) {
boolean prevAccess = toSet.isAccessible();
toSet.setAccessible(true);
try {
toSet.set(object, value);
return true;
}
catch (IllegalArgumentException e) {
}
catch (IllegalAccessException e) {
}
toSet.setAccessible(prevAccess);
return false;
}
private static Object getValue (Field toSet, Object object) {
Object value = null;
boolean prevAccess = toSet.isAccessible();
toSet.setAccessible(true);
try {
value = toSet.get(object);
}
catch (IllegalArgumentException e) {
}
catch (IllegalAccessException e) {
}
toSet.setAccessible(prevAccess);
return value;
}
/**
* Sets the value of a field in an object using reflection.
* Iterates through all the super classes to find a field that
* matches.
*
* @param property The name of the property to set.
* @param object The object that the property should be set on.
* @param value The value to set the value to.
* @return Whether it was able to set the value or not.
*/
public static <T> boolean setValue (String property, Object object, T value) {
Field toSet = getField(property, object);
return setValue(toSet, object, value);
}
/**
* Changes the value of a property by a certain amount. This makes it easier to increase
* or decrease values by a certain amount. <br />
*
* Right now it supports only Integers and Doubles <br />
* It basically replaces setValue with a getValue and a modification.
*
* @param property The property to change
* @param object The object to change the value of
* @param value How much to change the value by.
* @return Whether it was able to change the value.
*/
public static <T extends Number> boolean changeValue (String property, Object object, T value) {
Field toSet = getField(property, object);
Number val = (Number) getValue(toSet, object);
if (value instanceof Integer) {
Integer intVal = val.intValue();
intVal += (Integer) value;
val = intVal;
}
if (value instanceof Double) {
Double dVal = val.doubleValue();
dVal += (Double) dVal;
val = dVal;
}
return setValue(toSet, object, val);
}
/**
* Returns the value of a property of a specific Object.
*
* @param property The property name to get.
* @param object The object to get the value from.
* @return The value of the property.
*/
public static <T> T getValue (String property, Object object) {
Field toSet = getField(property, object);
try {
@SuppressWarnings("unchecked")
T result = (T) getValue(toSet, object);
return result;
}
catch (Exception e) {
return null;
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
8c31b1847954434a59b6ad3116a778bc3b92aa8e
|
971807b2534828408ecb839a8d5eeadf5ccdcb7d
|
/src/zmx/multithread/test/threadinterrupt/ThreadDemo.java
|
4e7257aeb8b13ca5d2f7024eb49f456b8eba245f
|
[] |
no_license
|
zmx729618/webTest
|
3b673c2db97c8a18127b6f159f7f0273617e20bd
|
841dda1a59839f2ef7ab17c5c5e4d7dce8d50f1e
|
refs/heads/master
| 2021-07-13T14:45:51.667704
| 2017-10-17T06:38:43
| 2017-10-17T06:38:43
| 107,226,601
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 964
|
java
|
package zmx.multithread.test.threadinterrupt;
public class ThreadDemo {
public static void main(String[] args){
Runnable r=new TestRunnable();
Thread th1=new Thread(r);
th1.start();
th1.interrupt();
}
}
//无法中断正在运行的线程代码
class TestRunnable implements Runnable{
public void run(){
try {
while(!Thread.currentThread().isInterrupted()){
System.out.println( "Thread is running..." );
long time = System.currentTimeMillis();//去系统时间的毫秒数
while((System.currentTimeMillis()-time < 1000)) {
//程序循环1秒钟,不同于sleep(1000)会阻塞进程。
}
}
System.out.println("线程遇到中断标志,退出");
} catch (Exception e) {
e.printStackTrace();
}finally{
}
}
}
|
[
"zmx729618@163.com"
] |
zmx729618@163.com
|
3170048634199e8a279b5f1ce98ce24236430c72
|
fe711416301bdc8fcd798a5c20d7a02f37f61362
|
/src/com/sun/corba/se/PortableActivationIDL/ORBProxy.java
|
6a06fc4f401f99130fb96fdde756cba1f32ac90b
|
[] |
no_license
|
chaiguolong/javaweb_step1
|
e9175521485813c40e763a95629c1ef929405010
|
e9e8d3e70fd5d9495b6675c60e35d8ca12eefdc2
|
refs/heads/master
| 2022-07-07T18:10:59.431906
| 2020-04-28T05:41:51
| 2020-04-28T05:41:51
| 143,223,415
| 1
| 0
| null | 2022-06-21T00:55:31
| 2018-08-02T00:53:40
|
Java
|
UTF-8
|
Java
| false
| false
| 580
|
java
|
package com.sun.corba.se.PortableActivationIDL;
/**
* com/sun/corba/se/PortableActivationIDL/ORBProxy.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /HUDSON3/workspace/8-2-build-macosx-x86_64/jdk8u101/7261/corba/src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl
* Wednesday, June 22, 2016 2:43:37 AM PDT
*/
/** ORB callback interface, passed to Activator in registerORB method.
*/
public interface ORBProxy extends ORBProxyOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity
{
} // interface ORBProxy
|
[
"584238433@qq.com"
] |
584238433@qq.com
|
b085d87a6ff235f8f27b0e0331f72aba4bc4b3ad
|
46286e57fe92af6cd592c20e974616b6a106b625
|
/mall-web/src/main/java/cn/druglots/mall/user/entity/UserLoginVo.java
|
c2a2b8b8bf2683d67b1d5d34fb9f9267df8c8887
|
[] |
no_license
|
King-Pan/cloud-mall
|
fbf33f605f7e6bac3b828839b810628f28e23e87
|
3c1b0c636d245f1bb552b750855ee7ea7b7b5b37
|
refs/heads/master
| 2022-08-22T13:17:39.260932
| 2020-05-09T08:50:51
| 2020-05-09T08:50:51
| 204,629,736
| 0
| 0
| null | 2022-07-06T20:41:48
| 2019-08-27T05:54:35
|
Java
|
UTF-8
|
Java
| false
| false
| 1,081
|
java
|
package cn.druglots.mall.user.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @BelongsProject: cloud-mall
* @BelongsPackage: cn.druglots.mall.user.entity
* @Author: King-Pan(pwpw1218@gmail.com)
* @CreateTime: 2019-09-13 23:20
* @Description: 用户登录信息封装
*/
@Data
@ApiModel(value = "用户登录信息封装")
public class UserLoginVo {
@ApiModelProperty(value = "账号密码登录-用户名")
private String userName;
@ApiModelProperty(value = "账号密码登录-密码")
private String password;
@ApiModelProperty(value = "手机验证码登录-手机号码")
private String phoneNum;
@ApiModelProperty(value = "手机验证码登录-手机验证码")
private String smsCode;
@ApiModelProperty(value = "账号密码登录-验证码")
private String verificationCode;
@ApiModelProperty(value = "登录类型,user_password_realm:账号密码登录;user_phone_realm:手机验证码登录;jwt_login_real:jwt登录")
private String type;
}
|
[
"pwpw1218@gmail.com"
] |
pwpw1218@gmail.com
|
449568800919d99b68da6ba5a11f6219bf01042e
|
74a525c7d924fad7c95bf86104f90fe5a4219e51
|
/src/day39_customClasses/Iphone.java
|
bc685513ff38a6fa7b63bf5d5ebc56493806cc39
|
[] |
no_license
|
Vladmon30/com.JavaChicago
|
5a0ea7d486480519a7941c3cb29415b7d9ffbfbd
|
d7a2628abc46b5c794cb89369561430220947a5c
|
refs/heads/master
| 2021-01-03T00:55:12.573745
| 2020-02-11T19:24:41
| 2020-02-11T19:24:41
| 239,845,625
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 301
|
java
|
package day39_customClasses;
public class Iphone {
// properties or Instance variable
String model;
int memory;
String color;
public void printPhoneInfo() {
System.out.println("Model: " + model);
System.out.println("Memory: " + memory);
System.out.println("Color: " + color);
}
}
|
[
"vladmonqa35@gmail.com"
] |
vladmonqa35@gmail.com
|
192eda738989b83447b6fb7a3c3637cf30b3c029
|
292bd357f3a14a81d7fd743453fbd52e2c3090e8
|
/src/practice/Merge_Sort.java
|
0520291e3c17379b57bee90f78c2bc3d03fb23b4
|
[] |
no_license
|
BangKiHyun/Algorithm
|
90ea1e07924d06ab7c16a9aa6e5578c33953c705
|
065953a728227c796294ef993815a1fa50d9be31
|
refs/heads/master
| 2023-04-13T11:14:35.325863
| 2023-04-02T08:50:43
| 2023-04-02T08:50:43
| 190,966,256
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,348
|
java
|
package practice;
public class Merge_Sort {
static int number = 8;
static int sorted[] = new int[8];
public static void merge(int a[], int m, int middle, int n) {
int i = m;
int j = middle + 1;
int k = m;
while (i <= middle && j <= n) {
if (a[i] <= a[j]) {
sorted[k] = a[i];
i++;
} else {
sorted[k] = a[j];
j++;
}
k++;
}
if (i > middle) {
for (int t = j; t <= n; t++) {
sorted[k] = a[t];
k++;
}
} else {
for (int t = i; t <= middle; t++) {
sorted[k] = a[t];
k++;
}
}
for (int t = m; t <= n; t++) {
a[t] = sorted[t];
}
}
public static void mergeSort(int a[], int m, int n) {
if (m < n) {
int middle = (m + n) / 2;
mergeSort(a, m, middle);
mergeSort(a, middle + 1, n);
merge(a, m, middle, n);
}
}
public static void main(String[] args) {
int array[] = {7, 6, 5, 8, 3, 5, 9, 1};
mergeSort(array, 0, number - 1);
for (int i = 0; i < number; i++) {
System.out.print(array[i] + " ");
}
}
}
|
[
"rlrlvh@naver.com"
] |
rlrlvh@naver.com
|
25c3d9b38f2baf2412d2720bf6d5b0d9681ad0d9
|
bceba483c2d1831f0262931b7fc72d5c75954e18
|
/src/qubed/corelogic/ValuationIntendedUserEnum.java
|
ca871a99914b20ef62f9962a5614bbc7cf5d3c5f
|
[] |
no_license
|
Nigel-Qubed/credit-services
|
6e2acfdb936ab831a986fabeb6cefa74f03c672c
|
21402c6d4328c93387fd8baf0efd8972442d2174
|
refs/heads/master
| 2022-12-01T02:36:57.495363
| 2020-08-10T17:26:07
| 2020-08-10T17:26:07
| 285,552,565
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,331
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2020.08.05 at 04:46:29 AM CAT
//
package qubed.corelogic;
import java.util.HashMap;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;
/**
* Specific indications of the types of users authorized by the appraiser for a given valuation product.
*
* <p>Java class for ValuationIntendedUserEnum complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ValuationIntendedUserEnum">
* <simpleContent>
* <extension base="<http://www.mismo.org/residential/2009/schemas>ValuationIntendedUserBase">
* <attGroup ref="{http://www.w3.org/1999/xlink}MISMOresourceLink"/>
* <attGroup ref="{http://www.mismo.org/residential/2009/schemas}AttributeExtension"/>
* <attribute name="DataNotSuppliedReasonType" type="{http://www.mismo.org/residential/2009/schemas}DataNotSuppliedReasonBase" />
* <attribute name="DataNotSuppliedReasonTypeAdditionalDescription" type="{http://www.mismo.org/residential/2009/schemas}MISMOString_Base" />
* <attribute name="DataNotSuppliedReasonTypeOtherDescription" type="{http://www.mismo.org/residential/2009/schemas}MISMOString_Base" />
* <attribute name="SensitiveIndicator" type="{http://www.mismo.org/residential/2009/schemas}MISMOIndicator_Base" />
* <anyAttribute processContents='lax'/>
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ValuationIntendedUserEnum", propOrder = {
"value"
})
public class ValuationIntendedUserEnum {
@XmlValue
protected ValuationIntendedUserBase value;
@XmlAttribute(name = "DataNotSuppliedReasonType")
protected DataNotSuppliedReasonBase dataNotSuppliedReasonType;
@XmlAttribute(name = "DataNotSuppliedReasonTypeAdditionalDescription")
protected String dataNotSuppliedReasonTypeAdditionalDescription;
@XmlAttribute(name = "DataNotSuppliedReasonTypeOtherDescription")
protected String dataNotSuppliedReasonTypeOtherDescription;
@XmlAttribute(name = "SensitiveIndicator")
protected Boolean sensitiveIndicator;
@XmlAttribute(name = "label", namespace = "http://www.w3.org/1999/xlink")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
protected String label;
@XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
/**
* Term: Valuation Intended User Type Definition: Specific indications of the types of users authorized by the appraiser for a given valuation product.
*
* @return
* possible object is
* {@link ValuationIntendedUserBase }
*
*/
public ValuationIntendedUserBase getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link ValuationIntendedUserBase }
*
*/
public void setValue(ValuationIntendedUserBase value) {
this.value = value;
}
/**
* Gets the value of the dataNotSuppliedReasonType property.
*
* @return
* possible object is
* {@link DataNotSuppliedReasonBase }
*
*/
public DataNotSuppliedReasonBase getDataNotSuppliedReasonType() {
return dataNotSuppliedReasonType;
}
/**
* Sets the value of the dataNotSuppliedReasonType property.
*
* @param value
* allowed object is
* {@link DataNotSuppliedReasonBase }
*
*/
public void setDataNotSuppliedReasonType(DataNotSuppliedReasonBase value) {
this.dataNotSuppliedReasonType = value;
}
/**
* Gets the value of the dataNotSuppliedReasonTypeAdditionalDescription property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDataNotSuppliedReasonTypeAdditionalDescription() {
return dataNotSuppliedReasonTypeAdditionalDescription;
}
/**
* Sets the value of the dataNotSuppliedReasonTypeAdditionalDescription property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDataNotSuppliedReasonTypeAdditionalDescription(String value) {
this.dataNotSuppliedReasonTypeAdditionalDescription = value;
}
/**
* Gets the value of the dataNotSuppliedReasonTypeOtherDescription property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDataNotSuppliedReasonTypeOtherDescription() {
return dataNotSuppliedReasonTypeOtherDescription;
}
/**
* Sets the value of the dataNotSuppliedReasonTypeOtherDescription property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDataNotSuppliedReasonTypeOtherDescription(String value) {
this.dataNotSuppliedReasonTypeOtherDescription = value;
}
/**
* Gets the value of the sensitiveIndicator property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isSensitiveIndicator() {
return sensitiveIndicator;
}
/**
* Sets the value of the sensitiveIndicator property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setSensitiveIndicator(Boolean value) {
this.sensitiveIndicator = value;
}
/**
* Gets the value of the label property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLabel() {
return label;
}
/**
* Sets the value of the label property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLabel(String value) {
this.label = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
public Map<QName, String> getOtherAttributes() {
return otherAttributes;
}
}
|
[
"vectorcrael@yahoo.com"
] |
vectorcrael@yahoo.com
|
3b5972ecd29dbbfb93e577aae701ea905d82bee0
|
3ed18d25cc3596eb1e96b4f3bdd3225ed74311dc
|
/src/main/java/io/github/nucleuspowered/nucleus/modules/back/config/BackConfig.java
|
c981bdc2e4e6d72025d70b53ac7b73675ed9968a
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
Tollainmear/Nucleus
|
ab197b89b4465aaa9121a8d92174ab7c58df3568
|
dfd88cb3b2ab6923548518765a712c190259557b
|
refs/heads/sponge-api/7
| 2021-01-25T15:04:23.678553
| 2018-08-19T14:03:46
| 2018-08-19T14:03:46
| 123,745,847
| 0
| 3
|
MIT
| 2018-10-08T05:55:23
| 2018-03-04T01:19:42
|
Java
|
UTF-8
|
Java
| false
| false
| 934
|
java
|
/*
* This file is part of Nucleus, licensed under the MIT License (MIT). See the LICENSE.txt file
* at the root of this project for more details.
*/
package io.github.nucleuspowered.nucleus.modules.back.config;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
@ConfigSerializable
public class BackConfig {
@Setting(value = "on-death", comment = "config.back.ondeath")
private boolean onDeath = true;
@Setting(value = "on-teleport", comment = "config.back.onteleport")
private boolean onTeleport = true;
@Setting(value = "on-portal", comment = "config.back.onportal")
private boolean onPortal = false;
public boolean isOnDeath() {
return this.onDeath;
}
public boolean isOnTeleport() {
return this.onTeleport;
}
public boolean isOnPortal() {
return this.onPortal;
}
}
|
[
"git@drnaylor.co.uk"
] |
git@drnaylor.co.uk
|
6d2aa8ce21901e03fcb7b7773aa49a4047358025
|
982c64012b7df644b975bd0c67d90f73c3b67c80
|
/interactivitycommunication/src/main/java/com/codekul/interactivitycommunication/MainActivity.java
|
4186b40fb2f8fe04d00c0b5159640d6998ab11ce
|
[] |
no_license
|
CodeKul/android-1-3-daily-swar-11-sep-17
|
4ee4675cb0d35c3dac92ac605c4486d1cc54c2ed
|
abdd970bd3abdcd233a8caa9c8f54420fe203383
|
refs/heads/master
| 2021-07-17T01:08:27.394310
| 2017-10-25T08:33:31
| 2017-10-25T08:33:31
| 103,242,890
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,615
|
java
|
package com.codekul.interactivitycommunication;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity extends AppCompatActivity {
public static final String KEY_DESC = "desc";
public static final int REQ_ONE = 1234;
public static final int REQ_TWO = 1235;
public static final int REQ_THREE = 1236;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void onOne(View view) {
Class cls = OneActivity.class;
Bundle bundle = new Bundle();
bundle.putString(KEY_DESC, " This is one number, which is starting. There is one only.");
Intent intent = new Intent(this, cls);
intent.putExtras(bundle);
//startActivity(intent);
startActivityForResult(intent, REQ_ONE);
}
public void onTwo(View view) {
Bundle bundle = new Bundle();
bundle.putString(KEY_DESC, "This is two number, which is even and represents double things");
Intent intent = new Intent(this, TwoActivity.class);
intent.putExtras(bundle);
startActivityForResult(intent, REQ_TWO);
//startActivity(intent);
}
public void onThree(View view) {
Bundle bundle = new Bundle();
bundle.putString(KEY_DESC, "This is three, which is after two and before four. And it is first odd nums");
Intent intent = new Intent(this, ThreeActivity.class);
intent.putExtras(bundle);
//startActivity(intent);
startActivityForResult(intent, REQ_THREE);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(requestCode == REQ_ONE) {
if(resultCode == RESULT_OK) {
Bundle bndl = data.getExtras();
if(bndl != null) {
((Button) findViewById(R.id.btnOne)).setText(bndl.getString(OneActivity.RES_ONE));
}
}
}
else if(requestCode == REQ_TWO) {
if(resultCode == RESULT_OK) {
Bundle bndl = data.getExtras();
if(bndl != null) {
((Button) findViewById(R.id.btnTwo)).setText(bndl.getString(TwoActivity.RES_TWO));
}
}
}
else {
if(resultCode == RESULT_OK) {
}
}
}
}
|
[
"aniruddha.kudalkar@gmail.com"
] |
aniruddha.kudalkar@gmail.com
|
55546e31bb700ac047bbda874f64da5af15ac35e
|
4364f8e72fe2a3e04bd7c9257234a6f55474f968
|
/AMS_基础信息组件/.svn/pristine/14/1491bc5024a9ccd15edd644780ad2564a3127009.svn-base
|
e84482e583a4c0afe6004e5bbff3456f1d037830
|
[] |
no_license
|
l871993962/liminglei
|
f511ac1cc0c53a8811eaee6a7038f72f6a7ee4cc
|
acbd64ce548e97a729b964418fb6edd0c9e78302
|
refs/heads/master
| 2023-08-03T03:39:25.813790
| 2021-09-27T01:44:51
| 2021-09-27T01:44:51
| 409,838,699
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,946
|
package com.yss.ams.base.information.modules.bi.salesnet.admin;
import java.util.HashMap;
import java.util.List;
import com.yss.ams.base.information.modules.bi.salesnet.dao.SalesNetDao;
import com.yss.ams.base.information.support.bi.salesnet.pojo.SalesNet;
import com.yss.framework.api.common.co.BaseAdmin;
import com.yss.framework.api.common.co.BasePojo;
import com.yss.framework.api.database.DbPool;
import com.yss.framework.api.mvc.dao.sql.SQLBuilder;
import com.yss.framework.api.service.ServiceException;
/**
* 销售网点设置业务管理类
* @author yuankai 公共信息拆分 2017.5.31
*
*/
public class SalesNetDataAdmin extends BaseAdmin {
private SalesNetDao svcDao = null;
public SalesNetDataAdmin(DbPool pool, SQLBuilder sqlBuilder) {
svcDao = new SalesNetDao(pool, sqlBuilder);
}
/**
* 获取所有销售网点设置数据
* @return
* @throws ServiceException
*/
@SuppressWarnings("unchecked")
public <T extends BasePojo> List<T> getAllDataList()
throws ServiceException {
return (List<T>) svcDao.getAllDataList();
}
/**
* 根据销售网点代码获取销售网点设置
* @param code
* @return
* @throws ServiceException
*/
@SuppressWarnings("unchecked")
public <T extends BasePojo> T getDataByCode(String code)
throws ServiceException {
return (T) svcDao.getDataByCode(code);
}
/**
* 根据销售网点类型获取销售网点设置
* @param types
* @return
* @throws ServiceException
*/
@SuppressWarnings("unchecked")
public <T extends BasePojo> List<T> getDataListByTypes(String[] types)
throws ServiceException {
return (List<T>) svcDao.getDataListByTypes(types);
}
/**
* 获取销售网点代码转换MAP
* @return
* @throws ServiceException
*/
public HashMap<String, String> getKeyConvertMap() throws ServiceException {
return svcDao.getKeyConvertMap();
}
/**
* 根据销售网点代码集获取销售网点代码转换MAP
* @param listKey
* @return
* @throws ServiceException
*/
public HashMap<String, String> getKeyConvertMap(List<String> listKey) throws Exception {
return svcDao.getKeyConvertMap(listKey);
}
/**
* 根据多个销售网点代码获取销售网点设置list
* @param keys
* @return
* @throws ServiceException
*/
@SuppressWarnings("unchecked")
public <T extends BasePojo> List<T> getDataListByKeys(String[] types)
throws ServiceException {
return (List<T>) svcDao.getDataListByKeys(types);
}
/**
* 获取所有销售网点代码和销售网点名称MAP
* @return
*/
public HashMap<String, String> getShortDataMap() {
return svcDao.getShortDataMap();
}
public SalesNet getSalesNetByCode(String code) {
return svcDao.getSalesNetByCode(code);
}
public HashMap<String, String> getAllNetCodeAndName() {
return svcDao.getAllNetCodeAndName();
}
public SalesNet getSalesNetByVendorCode(String vendorCode) {
return svcDao.getSalesNetByVendorCode(vendorCode);
}
}
|
[
"l871993962@gmail.com"
] |
l871993962@gmail.com
|
|
928252c39701bc57cee834ee5e42d54e3a635e38
|
95c82867f7233f4c48bc0aa9048080e52a4384c0
|
/app/src/main/java/com/furestic/office/ppt/lxs/docx/pdf/viwer/reader/free/fc/hslf/usermodel/SoundData.java
|
85bf5cf569c4b7e9c84eddfa6c43dc07ce5e007b
|
[] |
no_license
|
MayBenz/AllDocsReader
|
b4f2d4b788545c0ed476f20c845824ea7057f393
|
1914cde82471cb2bc21e00bb5ac336706febfd30
|
refs/heads/master
| 2023-01-06T04:03:43.564202
| 2020-10-16T13:14:09
| 2020-10-16T13:14:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,540
|
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 com.furestic.office.ppt.lxs.docx.pdf.viwer.reader.free.fc.hslf.usermodel;
import com.furestic.office.ppt.lxs.docx.pdf.viwer.reader.free.fc.hslf.record.Document;
import com.furestic.office.ppt.lxs.docx.pdf.viwer.reader.free.fc.hslf.record.Record;
import com.furestic.office.ppt.lxs.docx.pdf.viwer.reader.free.fc.hslf.record.RecordContainer;
import com.furestic.office.ppt.lxs.docx.pdf.viwer.reader.free.fc.hslf.record.RecordTypes;
import com.furestic.office.ppt.lxs.docx.pdf.viwer.reader.free.fc.hslf.record.Sound;
import java.util.ArrayList;
/**
* A class that represents sound data embedded in a slide show.
*
* @author Yegor Kozlov
*/
public final class SoundData
{
/**
* The record that contains the object data.
*/
private Sound _container;
/**
* Creates the object data wrapping the record that contains the sound data.
*
* @param container the record that contains the sound data.
*/
public SoundData(Sound container)
{
this._container = container;
}
/**
* Name of the sound (e.g. "crash")
*
* @return name of the sound
*/
public String getSoundName()
{
return _container.getSoundName();
}
/**
* Type of the sound (e.g. ".wav")
*
* @return type of the sound
*/
public String getSoundType()
{
return _container.getSoundType();
}
/**
* Gets an input stream which returns the binary of the sound data.
*
* @return the input stream which will contain the binary of the sound data.
*/
public byte[] getData()
{
return _container.getSoundData();
}
/**
* Find all sound records in the supplied Document records
*
* @param document the document to find in
* @return the array with the sound data
*/
public static SoundData[] find(Document document)
{
ArrayList<SoundData> lst = new ArrayList<SoundData>();
Record[] ch = document.getChildRecords();
for (int i = 0; i < ch.length; i++)
{
if (ch[i].getRecordType() == RecordTypes.SoundCollection.typeID)
{
RecordContainer col = (RecordContainer)ch[i];
Record[] sr = col.getChildRecords();
for (int j = 0; j < sr.length; j++)
{
if (sr[j] instanceof Sound)
{
lst.add(new SoundData((Sound)sr[j]));
}
}
}
}
return lst.toArray(new SoundData[lst.size()]);
}
}
|
[
"zeeshanhayat61@gmail.com"
] |
zeeshanhayat61@gmail.com
|
e5d1619912ffe8d49f49eaadad615a6f62966efe
|
33b8938c355dfcbe3a27103c00978c46c66efe58
|
/service/service_edu/src/main/java/com/atguigu/eduservice/service/EduCourseService.java
|
f4dff457d63a51a229cb24db964d318fdfaf0c9c
|
[] |
no_license
|
yanzipang/guli_parent
|
0a3548ca2bf89cfaf449fe20d94240ddde8ebeab
|
83a5bf429bcbfec369b5485fec06ada0fffa225a
|
refs/heads/master
| 2023-07-05T03:29:28.770158
| 2021-08-04T07:15:31
| 2021-08-04T07:15:31
| 390,237,851
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 451
|
java
|
package com.atguigu.eduservice.service;
import com.atguigu.commonutils.response.R;
import com.atguigu.eduservice.entity.po.EduCoursePO;
import com.atguigu.eduservice.entity.vo.CourseInfoVO;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 课程 服务类
* </p>
*
* @author hgk
* @since 2021-08-02
*/
public interface EduCourseService extends IService<EduCoursePO> {
R addCourseInfo(CourseInfoVO courseInfoVO);
}
|
[
"123"
] |
123
|
0289b4e78802889609735e833d3144a965dd8d1b
|
17c30fed606a8b1c8f07f3befbef6ccc78288299
|
/Mate10_8_1_0/src/main/java/android_maps_conflict_avoidance/com/google/googlenav/layer/LayerItem.java
|
ae05125f2c270fdde4243dadebf7a1eda9fd6e35
|
[] |
no_license
|
EggUncle/HwFrameWorkSource
|
4e67f1b832a2f68f5eaae065c90215777b8633a7
|
162e751d0952ca13548f700aad987852b969a4ad
|
refs/heads/master
| 2020-04-06T14:29:22.781911
| 2018-11-09T05:05:03
| 2018-11-09T05:05:03
| 157,543,151
| 1
| 0
| null | 2018-11-14T12:08:01
| 2018-11-14T12:08:01
| null |
UTF-8
|
Java
| false
| false
| 1,616
|
java
|
package android_maps_conflict_avoidance.com.google.googlenav.layer;
import android_maps_conflict_avoidance.com.google.common.io.protocol.ProtoBuf;
public class LayerItem {
private final ProtoBuf activitySnippet;
private final boolean isRoutable;
private final String itemId;
private final String layerId;
private final String name;
private final int ranking;
private final ProtoBuf rating;
private final String snippet;
public LayerItem(ProtoBuf layerItem) {
int i = 0;
this.layerId = layerItem.getString(1);
this.itemId = layerItem.getString(2);
this.name = !layerItem.has(3) ? "" : layerItem.getString(3);
this.snippet = !layerItem.has(4) ? "" : layerItem.getString(4);
this.isRoutable = !layerItem.has(5) ? false : layerItem.getBool(5);
this.rating = !layerItem.has(6) ? null : layerItem.getProtoBuf(6);
if (layerItem.has(7)) {
i = layerItem.getInt(7);
}
this.ranking = i;
this.activitySnippet = !layerItem.has(9) ? null : layerItem.getProtoBuf(9);
}
public String getLayerId() {
return this.layerId;
}
public String getItemId() {
return this.itemId;
}
public String getName() {
return this.name;
}
public String getSnippet() {
return this.snippet;
}
public ProtoBuf getBuzzSnippet() {
return this.activitySnippet;
}
public String toString() {
return "layerId: " + this.layerId + ", itemId: " + this.itemId + ", name: " + this.name + ", snippet: " + this.snippet;
}
}
|
[
"lygforbs0@mail.com"
] |
lygforbs0@mail.com
|
897963930e3abb28c500d8a2ab19ca0a35ffe2c8
|
6cbc72029a634baead58631ffe8c33707262b486
|
/base/src/main/java/app/zingo/employeemanagements/ui/NewAdminDesigns/BranchOptionScreen.java
|
125352de81b28677eadefcd19d6ac45c04d0b1c1
|
[] |
no_license
|
zingohotels/EmployeeManagementClone
|
86974dccbf66eda4ede2ade2311f314b481e1b46
|
59bc585c8c9538246cd07b9b0f5e9ed157ef17a8
|
refs/heads/master
| 2023-01-14T01:24:25.333361
| 2020-11-23T10:31:59
| 2020-11-23T10:31:59
| 309,272,908
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,729
|
java
|
package app.zingo.employeemanagements.ui.NewAdminDesigns;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.DefaultItemAnimator;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.MenuItem;
import java.util.ArrayList;
import app.zingo.employeemanagements.adapter.NavigationAdapter;
import app.zingo.employeemanagements.model.Navigation_Model;
import app.zingo.employeemanagements.base.R;
public class BranchOptionScreen extends AppCompatActivity {
String[] tv1 = {"Branch Info","Departments","Employees","Holidays","Office Timing"};
Integer[] imagehistory = {R.drawable.office_about,
R.drawable.branches, R.drawable.branch_employees, R.drawable.holiday_list, R.drawable.office_timings};
Integer[] image1 ={R.drawable.ic_chevron_right_black_24dp, R.drawable.ic_chevron_right_black_24dp, R.drawable.ic_chevron_right_black_24dp, R.drawable.ic_chevron_right_black_24dp,
R.drawable.ic_chevron_right_black_24dp};
private RecyclerView recyclerView;
private NavigationAdapter navigation_adapter;
private ArrayList< Navigation_Model > navigation_models;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
try{
setContentView(R.layout.activity_branch_option_screen);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setTitle("Branch Details");
recyclerView = findViewById(R.id.organization_profile_list);
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager( BranchOptionScreen.this);
recyclerView.setLayoutManager(layoutManager);
recyclerView.setItemAnimator(new DefaultItemAnimator());
navigation_models = new ArrayList<>();
for(int i=0;i < imagehistory.length;i++) {
Navigation_Model ab = new Navigation_Model (tv1[i],imagehistory[i],image1[i]);
navigation_models.add(ab);
}
navigation_adapter = new NavigationAdapter ( BranchOptionScreen.this,navigation_models);
recyclerView.setAdapter(navigation_adapter);
}catch(Exception e){
e.printStackTrace();
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
switch (id)
{
case android.R.id.home:
BranchOptionScreen.this.finish();
break;
}
return super.onOptionsItemSelected(item);
}
}
|
[
"nishar@zingohotels.com"
] |
nishar@zingohotels.com
|
d3c986f8d964851f2538f28e99bc0730d98babf7
|
05d77186997fa143e136aad85c9611be2d5b9987
|
/spring-cloud-stream-binder-kafka-streams/src/main/java/org/springframework/cloud/stream/binder/kafka/streams/serde/CollectionSerde.java
|
01573d20efbfb31a0e48537699f35e8998f60e16
|
[
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] |
permissive
|
RobertoMatas/spring-cloud-stream-binder-kafka
|
7a4091acf8fa075aabd57afeec297f7c98015a0b
|
e5223d4e44fd7dfcf865200c76b4df02ed8f35ce
|
refs/heads/master
| 2022-07-24T21:44:58.092562
| 2020-05-21T15:31:21
| 2020-05-21T15:31:21
| 265,883,331
| 0
| 0
|
Apache-2.0
| 2020-05-21T15:24:49
| 2020-05-21T15:24:48
| null |
UTF-8
|
Java
| false
| false
| 7,735
|
java
|
/*
* Copyright 2019-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://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.springframework.cloud.stream.binder.kafka.streams.serde;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
import java.util.PriorityQueue;
import org.apache.kafka.common.serialization.Deserializer;
import org.apache.kafka.common.serialization.Serde;
import org.apache.kafka.common.serialization.Serdes;
import org.apache.kafka.common.serialization.Serializer;
import org.springframework.kafka.support.serializer.JsonSerde;
/**
* A convenient {@link Serde} for {@link java.util.Collection} implementations.
*
* Whenever a Kafka Stream application needs to collect data into a container object like
* {@link java.util.Collection}, then this Serde class can be used as a convenience for
* serialization needs. Some examples of where using this may handy is when the application
* needs to do aggregation or reduction operations where it needs to simply hold an
* {@link Iterable} type.
*
* By default, this Serde will use {@link JsonSerde} for serializing the inner objects.
* This can be changed by providing an explicit Serde during creation of this object.
*
* Here is an example of a possible use case:
*
* <pre class="code">
* .aggregate(ArrayList::new,
* (k, v, aggregates) -> {
* aggregates.add(v);
* return aggregates;
* },
* Materialized.<String, Collection<Foo>, WindowStore<Bytes, byte[]>>as(
* "foo-store")
* .withKeySerde(Serdes.String())
* .withValueSerde(new CollectionSerde<>(Foo.class, ArrayList.class)))
* * </pre>
*
* Supported Collection types by this Serde are - {@link java.util.ArrayList}, {@link java.util.LinkedList},
* {@link java.util.PriorityQueue} and {@link java.util.HashSet}. Deserializer will throw an exception
* if any other Collection types are used.
*
* @param <E> type of the underlying object that the collection holds
* @author Soby Chacko
* @since 3.0.0
*/
public class CollectionSerde<E> implements Serde<Collection<E>> {
/**
* Serde used for serializing the inner object.
*/
private final Serde<Collection<E>> inner;
/**
* Type of the collection class. This has to be a class that is
* implementing the {@link java.util.Collection} interface.
*/
private final Class<?> collectionClass;
/**
* Constructor to use when the application wants to specify the type
* of the Serde used for the inner object.
*
* @param serde specify an explicit Serde
* @param collectionsClass type of the Collection class
*/
public CollectionSerde(Serde<E> serde, Class<?> collectionsClass) {
this.collectionClass = collectionsClass;
this.inner =
Serdes.serdeFrom(
new CollectionSerializer<>(serde.serializer()),
new CollectionDeserializer<>(serde.deserializer(), collectionsClass));
}
/**
* Constructor to delegate serialization operations for the inner objects
* to {@link JsonSerde}.
*
* @param targetTypeForJsonSerde target type used by the JsonSerde
* @param collectionsClass type of the Collection class
*/
public CollectionSerde(Class<?> targetTypeForJsonSerde, Class<?> collectionsClass) {
this.collectionClass = collectionsClass;
try (JsonSerde<E> jsonSerde = new JsonSerde(targetTypeForJsonSerde)) {
this.inner = Serdes.serdeFrom(
new CollectionSerializer<>(jsonSerde.serializer()),
new CollectionDeserializer<>(jsonSerde.deserializer(), collectionsClass));
}
}
@Override
public Serializer<Collection<E>> serializer() {
return inner.serializer();
}
@Override
public Deserializer<Collection<E>> deserializer() {
return inner.deserializer();
}
@Override
public void configure(Map<String, ?> configs, boolean isKey) {
inner.serializer().configure(configs, isKey);
inner.deserializer().configure(configs, isKey);
}
@Override
public void close() {
inner.serializer().close();
inner.deserializer().close();
}
private static class CollectionSerializer<E> implements Serializer<Collection<E>> {
private Serializer<E> inner;
CollectionSerializer(Serializer<E> inner) {
this.inner = inner;
}
CollectionSerializer() { }
@Override
public void configure(Map<String, ?> configs, boolean isKey) {
}
@Override
public byte[] serialize(String topic, Collection<E> collection) {
final int size = collection.size();
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final DataOutputStream dos = new DataOutputStream(baos);
final Iterator<E> iterator = collection.iterator();
try {
dos.writeInt(size);
while (iterator.hasNext()) {
final byte[] bytes = inner.serialize(topic, iterator.next());
dos.writeInt(bytes.length);
dos.write(bytes);
}
}
catch (IOException e) {
throw new RuntimeException("Unable to serialize the provided collection", e);
}
return baos.toByteArray();
}
@Override
public void close() {
inner.close();
}
}
private static class CollectionDeserializer<E> implements Deserializer<Collection<E>> {
private final Deserializer<E> valueDeserializer;
private final Class<?> collectionClass;
CollectionDeserializer(final Deserializer<E> valueDeserializer, Class<?> collectionClass) {
this.valueDeserializer = valueDeserializer;
this.collectionClass = collectionClass;
}
@Override
public void configure(Map<String, ?> configs, boolean isKey) {
}
@Override
public Collection<E> deserialize(String topic, byte[] bytes) {
if (bytes == null || bytes.length == 0) {
return null;
}
Collection<E> collection = getCollection();
final DataInputStream dataInputStream = new DataInputStream(new ByteArrayInputStream(bytes));
try {
final int records = dataInputStream.readInt();
for (int i = 0; i < records; i++) {
final byte[] valueBytes = new byte[dataInputStream.readInt()];
final int read = dataInputStream.read(valueBytes);
if (read != -1) {
collection.add(valueDeserializer.deserialize(topic, valueBytes));
}
}
}
catch (IOException e) {
throw new RuntimeException("Unable to deserialize collection", e);
}
return collection;
}
@Override
public void close() {
}
private Collection<E> getCollection() {
Collection<E> collection;
if (this.collectionClass.isAssignableFrom(ArrayList.class)) {
collection = new ArrayList<>();
}
else if (this.collectionClass.isAssignableFrom(HashSet.class)) {
collection = new HashSet<>();
}
else if (this.collectionClass.isAssignableFrom(LinkedList.class)) {
collection = new LinkedList<>();
}
else if (this.collectionClass.isAssignableFrom(PriorityQueue.class)) {
collection = new PriorityQueue<>();
}
else {
throw new IllegalArgumentException("Unsupported collection type - " + this.collectionClass);
}
return collection;
}
}
}
|
[
"schacko@pivotal.io"
] |
schacko@pivotal.io
|
57762a38938817dde336317797da40c2368748ac
|
dfb8d5027ab18a66149d12a3e35cb42e1401e05c
|
/mastermind-boot/src/main/java/com/example/mastermind/validation/TcKimlikNoValidator.java
|
2b98bf54f36677f58e82bc42d2f2e94ca31b57f1
|
[
"MIT"
] |
permissive
|
deepcloudlabs/dcl375-2020-feb-17
|
1127cf84962fe92d0e8027047a332755c513b4aa
|
3845e7b221233ea7df22452aaf7ba59e877bfe7d
|
refs/heads/master
| 2022-12-26T03:18:38.347574
| 2020-02-21T12:40:47
| 2020-02-21T12:40:47
| 240,882,210
| 0
| 0
|
MIT
| 2022-12-16T15:21:30
| 2020-02-16T11:49:16
|
Java
|
UTF-8
|
Java
| false
| false
| 1,247
|
java
|
package com.example.mastermind.validation;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
/**
* @author Binnur Kurt (binnur.kurt@gmail.com)
*/
public class TcKimlikNoValidator implements
ConstraintValidator<TcKimlikNo, String> {
@Override
public void initialize(TcKimlikNo arg0) {
}
@Override
public boolean isValid(String value, ConstraintValidatorContext context) {
if (value == null)
return false;
if (!value.matches("^\\d{11}$")) {
return false;
}
int[] digits = new int[11];
for (int i = 0; i < digits.length; ++i) {
digits[i] = value.charAt(i) - '0';
}
int x = digits[0];
int y = digits[1];
for (int i = 1; i < 5; i++) {
x += digits[2 * i];
}
for (int i = 2; i <= 4; i++) {
y += digits[2 * i - 1];
}
int c1 = 7 * x - y;
if (c1 % 10 != digits[9]) {
return false;
}
int c2 = 0;
for (int i = 0; i < 10; ++i) {
c2 += digits[i];
}
if (c2 % 10 != digits[10]) {
return false;
}
return true;
}
}
|
[
"deepcloudlabs@gmail.com"
] |
deepcloudlabs@gmail.com
|
b775741588918ef20698eeb4e173615301e27c2f
|
b33e3ad7e9b73074cef6c5b0bed30c160266ea35
|
/입출력과_사칙연산/src/입출력과_사칙연산/n_10998.java
|
656d4921994cd10cb98df7e1db9f9ecd2640ea4d
|
[] |
no_license
|
Jaejeong98/java
|
9bea9e8fa072abf5e36407c44c526876754ff572
|
8b8c31266031b59a0d60727b1c83576bb48827e8
|
refs/heads/master
| 2022-05-26T12:59:56.430185
| 2022-03-16T11:24:50
| 2022-03-16T11:24:50
| 176,660,171
| 1
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 235
|
java
|
package 입출력과_사칙연산;
import java.util.*;
public class n_10998 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int A=sc.nextInt();
int B=sc.nextInt();
System.out.println(A*B);
}
}
|
[
"jaejeong98@naver.com"
] |
jaejeong98@naver.com
|
8fb58f0b7d8d0aa1fb8063a74bab00ddef1aea84
|
f766baf255197dd4c1561ae6858a67ad23dcda68
|
/app/src/main/java/com/tencent/mm/plugin/exdevice/i/j.java
|
6ef75e1d87ddd99f9144d17520d4ba814a80660a
|
[] |
no_license
|
jianghan200/wxsrc6.6.7
|
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
|
eb6c56587cfca596f8c7095b0854cbbc78254178
|
refs/heads/master
| 2020-03-19T23:40:49.532494
| 2018-06-12T06:00:50
| 2018-06-12T06:00:50
| 137,015,278
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,160
|
java
|
package com.tencent.mm.plugin.exdevice.i;
import com.tencent.mm.plugin.exdevice.b.c;
import com.tencent.mm.plugin.exdevice.b.h;
import com.tencent.mm.plugin.exdevice.model.ae;
import com.tencent.mm.plugin.exdevice.service.f;
import com.tencent.mm.plugin.exdevice.service.m;
import com.tencent.mm.plugin.exdevice.service.u;
import com.tencent.mm.sdk.platformtools.x;
public final class j
extends ae
{
private a izG;
private h izH;
public j(int paramInt1, int paramInt2, long paramLong)
{
this.izH = new h(paramInt1, paramInt2, paramLong);
}
public final boolean a(m paramm, d paramd)
{
if (!u.aHF().cR(this.izH.hjj))
{
x.w("MicroMsg.exdevice.MMSwitchViewPushTaskExcuter", "push switchview event to device before it do auth, device id = %d", new Object[] { Long.valueOf(this.izH.hjj) });
return true;
}
this.izG = new b(this.izH, paramd);
return this.izG.b(paramm);
}
}
/* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes6-dex2jar.jar!/com/tencent/mm/plugin/exdevice/i/j.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"526687570@qq.com"
] |
526687570@qq.com
|
5d866fab52e07f88d5a44fa0d3920fbd94020fa0
|
a4f94f4701a59cafc7407aed2d525b2dff985c95
|
/plugins/vcs/source_gen/jetbrains/mps/watching/ModelFileProcessor.java
|
7560066e33826fde5f183e8f118d01ef167a88da
|
[] |
no_license
|
jamice/code-orchestra-core
|
ffda62860f5b117386aa6455f4fdf61661abbe9e
|
b2bbf8362be2e2173864c294c635badb2e27ecc6
|
refs/heads/master
| 2021-01-15T13:24:53.517854
| 2013-05-09T21:39:28
| 2013-05-09T21:39:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,767
|
java
|
package jetbrains.mps.watching;
/*Generated by MPS */
import jetbrains.mps.logging.Logger;
import com.intellij.openapi.vfs.newvfs.events.VFileEvent;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import jetbrains.mps.smodel.descriptor.EditableSModelDescriptor;
import jetbrains.mps.smodel.SModelRepository;
import jetbrains.mps.vfs.FileSystem;
import com.intellij.openapi.vfs.newvfs.events.VFileMoveEvent;
import java.io.File;
import jetbrains.mps.vfs.IFile;
import jetbrains.mps.smodel.SModelDescriptor;
import com.intellij.openapi.vfs.VirtualFile;
/*package*/ class ModelFileProcessor extends EventProcessor {
private static final Logger LOG = Logger.getLogger(ModelFileProcessor.class);
private static final ModelFileProcessor INSTANCE = new ModelFileProcessor();
/*package*/ ModelFileProcessor() {
}
@Override
protected void processContentChanged(VFileEvent event, ReloadSession reloadSession) {
if (event.isFromRefresh() || event.getRequestor() instanceof FileDocumentManager) {
EditableSModelDescriptor model = SModelRepository.getInstance().findModel(FileSystem.getInstance().getFileByPath(event.getPath()));
LOG.debug("Content change event for model file " + event.getPath() + ". Found model " + model + "." + ((model != null ?
" Needs reloading " + model.needsReloading() :
""
)));
if (model != null && (model.needsReloading())) {
reloadSession.addChangedModel(model);
}
}
}
@Override
protected void processCopy(VFileEvent event, ReloadSession reloadSession) {
processCreate(event, reloadSession);
}
@Override
protected void processMove(VFileEvent event, ReloadSession reloadSession) {
processCreate(event, reloadSession);
VFileMoveEvent moveEvent = (VFileMoveEvent) event;
String oldPath = moveEvent.getOldParent().getPath() + File.separator + moveEvent.getFile().getName();
fileDeleted(oldPath, reloadSession);
}
@Override
protected void processCreate(VFileEvent event, ReloadSession reloadSession) {
IFile ifile = FileSystem.getInstance().getFileByPath(event.getPath());
SModelDescriptor model = SModelRepository.getInstance().findModel(ifile);
if (model == null) {
VirtualFile vfile = refreshAndGetVFile(event);
if (vfile == null) {
return;
}
reloadSession.addNewModelFile(vfile);
}
}
private void fileDeleted(String path, ReloadSession reloadSession) {
IFile ifile = FileSystem.getInstance().getFileByPath(path);
final EditableSModelDescriptor model = SModelRepository.getInstance().findModel(ifile);
if (model != null) {
reloadSession.addDeletedModel(model);
}
}
public static ModelFileProcessor getInstance() {
return INSTANCE;
}
}
|
[
"a.a.eliseyev@gmail.com"
] |
a.a.eliseyev@gmail.com
|
e0d328cbd9238d50b14c34cb6d804b9de6d04418
|
219f0491bda3d825776e555dcd0dba55db716a7c
|
/src/main/java/cn/tpson/kulu/gas/domain/EqpDetectLogDO.java
|
8f4772a9ab9b9b0561850ae8cd411f0d6bb45298
|
[] |
no_license
|
kulucode/KuluGas
|
bbdf16752f97ec79cecbb7ec330615ac8b15f676
|
d78f2510d1c19d5f2bc03a5b788aee81aab50c92
|
refs/heads/master
| 2020-03-19T05:56:25.016073
| 2018-07-05T12:50:51
| 2018-07-05T12:50:51
| 135,976,832
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,810
|
java
|
package cn.tpson.kulu.gas.domain;
import java.math.BigDecimal;
/**
* 设备检查实体.
*/
public class EqpDetectLogDO extends BaseDO {
/**
* 设备id.--> t_eqp.
*/
private Integer eqpId;
/**
* 检测结果.
*/
private BigDecimal detectValue;
/**
* 检测设备编号.
*/
private String detectNo;
/**
* 状态,0:未提交;1:提交服务公司;2:提交政府部门;
*/
private Short status;
/**
* 检测类型,0:进场检测;1:定期检测;
*/
private Short type;
/**
* 检测人.
*/
private Integer uid;
private Double lat;
private Double lon;
public Integer getEqpId() {
return eqpId;
}
public void setEqpId(Integer eqpId) {
this.eqpId = eqpId;
}
public BigDecimal getDetectValue() {
return detectValue;
}
public void setDetectValue(BigDecimal detectValue) {
this.detectValue = detectValue;
}
public String getDetectNo() {
return detectNo;
}
public void setDetectNo(String detectNo) {
this.detectNo = detectNo;
}
public Short getStatus() {
return status;
}
public void setStatus(Short status) {
this.status = status;
}
public Short getType() {
return type;
}
public void setType(Short type) {
this.type = type;
}
public Integer getUid() {
return uid;
}
public void setUid(Integer uid) {
this.uid = uid;
}
public Double getLat() {
return lat;
}
public void setLat(Double lat) {
this.lat = lat;
}
public Double getLon() {
return lon;
}
public void setLon(Double lon) {
this.lon = lon;
}
}
|
[
"zhangka@tpson.cn"
] |
zhangka@tpson.cn
|
b8b0cfde5c79d4c51e69080a6f8a60c63e00b58d
|
d405989285cfca3d1f4c062ff825296b6b96eee2
|
/launching/src/main/java/org/eclipse/debug/core/model/IProcess.java
|
b50e0939f99f8a10a00da68b2c6e0d511c1ee87a
|
[] |
no_license
|
psrna/org.jboss.tools.ssp
|
89fab4c8743a77c890ceb2d04727bbacdc7de16f
|
2d3a80b8ab684ce1dd1a14ac86c967c0c4c51ed6
|
refs/heads/master
| 2020-03-16T22:45:07.167106
| 2018-05-03T20:38:56
| 2018-05-03T20:38:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,647
|
java
|
/*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are 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:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.debug.core.model;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
/**
* A process represents a program running in normal (non-debug) mode.
* Processes support setting and getting of client defined attributes.
* This way, clients can annotate a process with any extra information
* important to them. For example, classpath annotations, or command
* line arguments used to launch the process may be important to a client.
* <p>
* Clients may implement this interface, however, the debug plug-in
* provides an implementation of this interface for a
* <code>java.lang.Process</code>.
* </p>
* @see org.eclipse.debug.core.DebugPlugin#newProcess(ILaunch, Process, String)
*/
public interface IProcess extends ITerminate {
/**
* Attribute key for a common, optional, process property. The value of this
* attribute is the command line a process was launched with.
*
* @since 2.1
*/
public final static String ATTR_CMDLINE= DebugPlugin.getUniqueIdentifier() + ".ATTR_CMDLINE"; //$NON-NLS-1$
/**
* Attribute key for a common, optional, process property. The value of this
* attribute is an identifier for the type of this process. Process types
* are client defined - whoever creates a process may define its type. For
* example, a process type could be "java", "javadoc", or "ant".
*
* @since 2.1
*/
public final static String ATTR_PROCESS_TYPE = DebugPlugin.getUniqueIdentifier() + ".ATTR_PROCESS_TYPE"; //$NON-NLS-1$
/**
* Attribute key for a common, optional, process property. The value of this
* attribute specifies an alternate dynamic label for a process, displayed by
* the console.
*
* @since 3.0
*/
public final static String ATTR_PROCESS_LABEL = DebugPlugin.getUniqueIdentifier() + ".ATTR_PROCESS_LABEL"; //$NON-NLS-1$
/**
* Returns a human-readable label for this process.
*
* @return a label for this process
*/
public String getLabel();
/**
* Returns the launch this element originated from.
*
* @return the launch this process is contained in
*/
public ILaunch getLaunch();
/**
* Returns a proxy to the standard input, output, and error streams
* for this process, or <code>null</code> if not supported.
*
* @return a streams proxy, or <code>null</code> if not supported
*/
public IStreamsProxy getStreamsProxy();
/**
* Sets the value of a client defined attribute.
*
* @param key the attribute key
* @param value the attribute value
*/
public void setAttribute(String key, String value);
/**
* Returns the value of a client defined attribute.
*
* @param key the attribute key
* @return value the String attribute value, or <code>null</code> if undefined
*/
public String getAttribute(String key);
/**
* Returns the exit value of this process. Conventionally, 0 indicates
* normal termination.
*
* @return the exit value of this process
* @exception DebugException if this process has not yet terminated
*/
public int getExitValue() throws DebugException;
}
|
[
"rob@oxbeef.net"
] |
rob@oxbeef.net
|
52521863f60e947e96a85e5f28753a4bb6ba2745
|
03be3f540f93a1507e82e4e84a651e205ba2971e
|
/.svn/pristine/52/52521863f60e947e96a85e5f28753a4bb6ba2745.svn-base
|
66c79a9fc290e35c834074adc2d1e17a31d55fce
|
[] |
no_license
|
Tarunjain19/DXC_SVN
|
448103f0c56e79616a2801acbf5d369d6e256b36
|
99a90150d30374929382c3181ee8b1f914c905ae
|
refs/heads/master
| 2022-06-04T10:36:52.755986
| 2020-05-06T08:44:47
| 2020-05-06T08:44:47
| 261,372,252
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 565
|
package flow.subflow.VAS;
/**
* This servlet is the exit point of a subflow. The base class handles
* the logic for forwarding to the next servlet.
* Last generated by Orchestration Designer at: 2015-JUL-09 09:57:29 PM
*/
public class ProspectMainMenu extends com.avaya.sce.runtime.SubflowReturn {
//{{START:CLASS:FIELDS
//}}END:CLASS:FIELDS
/**
* Default constructor
* Last generated by Orchestration Designer at: 2015-JUL-09 09:57:29 PM
*/
public ProspectMainMenu() {
//{{START:CLASS:CONSTRUCTOR
super();
//}}END:CLASS:CONSTRUCTOR
}
}
|
[
"tarun.jain3@dxc.com"
] |
tarun.jain3@dxc.com
|
|
bcda76e48eda084e2ef6a5e82ab8e879933ee05d
|
ff54ab7a0e00bedd0b2a2a00c85f4fe0d1a9727f
|
/Collection_from_IIT_07_01_08/Eclipse_plugin_tutorial_04_01_07/Tree/Snippet102.java
|
23056b65cefc371b9591e8b0d823c5d6f34dc5bb
|
[] |
no_license
|
debjava/Core-Tutorials-I
|
cf4fcd4975d4a2ef870fd11b325b456bb7902791
|
edd128bbdca3fb6386e21f55c65f82293b1ef8b0
|
refs/heads/master
| 2020-04-08T05:28:28.231423
| 2018-11-25T19:33:55
| 2018-11-25T19:33:55
| 159,061,835
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,489
|
java
|
/*******************************************************************************
* Copyright (c) 2000, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are 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:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.snippets;
/*
* Tree example snippet: insert a tree item (at an index)
*
* For a list of all SWT example snippets see
* http://www.eclipse.org/swt/snippets/
*/
import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
public class Snippet102 {
public static void main (String [] args) {
Display display = new Display ();
Shell shell = new Shell (display);
Tree tree = new Tree (shell, SWT.BORDER | SWT.MULTI);
tree.setSize (200, 200);
for (int i=0; i<12; i++) {
TreeItem item = new TreeItem (tree, SWT.NONE);
item.setText ("Item " + i);
}
TreeItem item = new TreeItem (tree, SWT.NONE, 1);
TreeItem [] items = tree.getItems ();
int index = 0;
while (index < items.length && items [index] != item) index++;
item.setText ("*** New Item " + index + " ***");
shell.pack ();
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
}
|
[
"deba.java@gmail.com"
] |
deba.java@gmail.com
|
a3e256be2c183ba7767de1b3a626aa4a8f842e0d
|
d0d2a7575e753844751956277f4fb1e02f89e1da
|
/src/TechFundamentals/MapsLambdaAndStreamAPI/Exercise/LegendaryFarming.java
|
7d8084a15e8f3da040c0b103858ddd1f352c335f
|
[] |
no_license
|
StefanUrilski/MyProjects
|
093f420ea6622dc8dbee08cce665ad6f382e9b94
|
9046030c978cfead9e725c2ac24072f67ed674e3
|
refs/heads/master
| 2020-06-27T19:53:11.528532
| 2019-08-01T11:01:01
| 2019-08-01T11:01:01
| 200,034,010
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,905
|
java
|
package MapsLambdaAndStreamAPI.Exercise;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Map;
import java.util.TreeMap;
public class LegendaryFarming {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
Map<String, Integer> keyMats = new TreeMap<>();
keyMats.put("shards", 0);
keyMats.put("fragments", 0);
keyMats.put("motes", 0);
Map<String, Integer> junk = new TreeMap<>();
boolean hasToBreak = false;
while (!hasToBreak) {
String[] farmed = reader.readLine().toLowerCase().split("\\s+");
for (int i = 0; i < farmed.length; i += 2) {
int quantity = Integer.valueOf(farmed[i]);
String material = farmed[i + 1];
if (keyMats.containsKey(material)) {
keyMats.put(material, keyMats.get(material) + quantity);
if (keyMats.get(material) >= 250) {
keyMats.put(material, keyMats.get(material) - 250);
hasToBreak = true;
switch (material) {
case "fragments":
System.out.println("Valanyr obtained!");
break;
case "shards":
System.out.println("Shadowmourne obtained!");
break;
default:
System.out.println("Dragonwrath obtained!");
break;
}
break;
}
} else {
if (!junk.containsKey(material)) {
junk.put(material, 0);
}
junk.put(material, junk.get(material) + quantity);
}
}
}
keyMats.entrySet().stream().sorted((e1, e2) -> {
int value1 = e1.getValue();
int value2 = e2.getValue();
if (value2 == value1) {
return e1.getKey().compareTo(e2.getKey());
}
return Integer.compare(value2, value1);
/* OtherCourses type of sort :)
keyMats.entrySet().stream()
.sorted(Map.Entry.<String, Integer>comparingByValue().reversed()
.thenComparing(Map.Entry.comparingByKey()))
.forEach(pair -> System.out.println(pair.getKey() + ": "
+ pair.getValue()));
*/
}).forEach(pair -> System.out.println(pair.getKey() + ": "
+ pair.getValue()));
junk.forEach((key, value) -> System.out.println(key + ": " + value));
}
}
|
[
"urilskistefan@gmail.com"
] |
urilskistefan@gmail.com
|
094e78865523d68a792ada56c8ac547b30c4fb26
|
5d28df95f4d95c306a7464924df2d9bf018d4e5d
|
/src/main/java/com/dicka/spring/integratedspringbootangular/entity/Roles.java
|
24e9bf13343f7503b85ba50fec64fd5847b10d88
|
[] |
no_license
|
dickanirwansyah/spring-boot-integrated-angular-jwt-backed
|
70fe21b1e350206c629f96ae5d624c4e8e37fb39
|
2900ef8a34ea0401c8bc508017e27b4d7230e5c8
|
refs/heads/master
| 2021-05-12T12:49:10.589785
| 2018-01-14T15:24:29
| 2018-01-14T15:24:29
| 117,422,292
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,000
|
java
|
package com.dicka.spring.integratedspringbootangular.entity;
import javax.persistence.*;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@Entity
@Table(name = "roles",
catalog = "dbjjwt")
public class Roles implements Serializable{
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int idroles;
@Column(name = "roles_name", nullable =false)
private String roles_name;
@Column(name = "description", nullable=false)
private String description;
public int getIdroles(){
return idroles;
}
public void setIdroles(int idroles){
this.idroles=idroles;
}
public String getRolesName(){
return roles_name;
}
public void setRolesName(String roles_name){
this.roles_name = roles_name;
}
public String getDescription(){
return description;
}
public void setDescription(String description){
this.description=description;
}
}
|
[
"dickanirwansyah@gmail.com"
] |
dickanirwansyah@gmail.com
|
9bb16c2248fc46f1b70d394a1ba52bd2873619d9
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/neo4j/2018/8/GenericKeyStateFormatTest.java
|
01514915d12baf91c73c0b36ab2be26b8fc3f3ea
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 7,833
|
java
|
/*
* Copyright (c) 2002-2018 "Neo4j,"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.kernel.impl.index.schema;
import org.junit.Before;
import org.junit.Rule;
import java.io.File;
import java.io.IOException;
import java.nio.file.OpenOption;
import java.nio.file.StandardOpenOption;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Consumer;
import org.neo4j.io.pagecache.PageCache;
import org.neo4j.io.pagecache.PageCursor;
import org.neo4j.io.pagecache.PagedFile;
import org.neo4j.test.FormatCompatibilityVerifier;
import org.neo4j.test.rule.PageCacheRule;
import org.neo4j.test.rule.RandomRule;
import org.neo4j.values.storable.RandomValues;
import org.neo4j.values.storable.Value;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class GenericKeyStateFormatTest extends FormatCompatibilityVerifier
{
@Rule
public PageCacheRule pageCacheRule = new PageCacheRule();
@Rule
public RandomRule randomRule = new RandomRule().withSeedForAllTests( SEED );
// Seed and entity id is intentionally fixed because we have a file stored with all current
// value formats. The stored values are generated by with this seed and we need it to verify
// that we read the content correctly.
private static final int SEED = 20051116;
private static final int ENTITY_ID = 19570320;
private static final int NUMBER_OF_SLOTS = 2;
private List<Value> values;
@Before
public void setup()
{
RandomValues rnd = randomRule.randomValues();
values = new ArrayList<>();
// ZONED_DATE_TIME_ARRAY
values.add( rnd.nextDateTimeArray() );
// LOCAL_DATE_TIME_ARRAY
values.add( rnd.nextLocalDateTimeArray() );
// DATE_ARRAY
values.add( rnd.nextDateArray() );
// ZONED_TIME_ARRAY
values.add( rnd.nextTimeArray() );
// LOCAL_TIME_ARRAY
values.add( rnd.nextLocalTimeArray() );
// DURATION_ARRAY
values.add( rnd.nextDurationArray() );
// TEXT_ARRAY
values.add( rnd.nextStringArray() );
// BOOLEAN_ARRAY
values.add( rnd.nextBooleanArray() );
// NUMBER_ARRAY (byte, short, int, long, float, double)
values.add( rnd.nextByteArray() );
values.add( rnd.nextShortArray() );
values.add( rnd.nextIntArray() );
values.add( rnd.nextLongArray() );
values.add( rnd.nextFloatArray() );
values.add( rnd.nextDoubleArray() );
// ZONED_DATE_TIME
values.add( rnd.nextDateTimeValue() );
// LOCAL_DATE_TIME
values.add( rnd.nextLocalDateTimeValue() );
// DATE
values.add( rnd.nextDateValue() );
// ZONED_TIME
values.add( rnd.nextTimeValue() );
// LOCAL_TIME
values.add( rnd.nextLocalTimeValue() );
// DURATION
values.add( rnd.nextDuration() );
// TEXT
values.add( rnd.nextTextValue() );
// BOOLEAN
values.add( rnd.nextBooleanValue() );
// NUMBER (byte, short, int, long, float, double)
values.add( rnd.nextByteValue() );
values.add( rnd.nextShortValue() );
values.add( rnd.nextIntValue() );
values.add( rnd.nextLongValue() );
values.add( rnd.nextFloatValue() );
values.add( rnd.nextDoubleValue() );
// todo GEOMETRY
// todo GEOMETRY_ARRAY
}
@Override
protected String zipName()
{
return "current-generic-key-state-format.zip";
}
@Override
protected String storeFileName()
{
return "generic-key-state-store";
}
@Override
protected void createStoreFile( File storeFile ) throws IOException
{
withCursor( storeFile, true, c -> {
putFormatVersion( c );
putData( c );
} );
}
@Override
protected void verifyFormat( File storeFile ) throws FormatViolationException, IOException
{
AtomicReference<FormatViolationException> exception = new AtomicReference<>();
withCursor( storeFile, false, c ->
{
int major = c.getInt();
int minor = c.getInt();
GenericLayout layout = getLayout();
if ( major != layout.majorVersion() || minor != layout.minorVersion() )
{
exception.set( new FormatViolationException( String.format( "Read format version %d.%d, but layout has version %d.%d",
major, minor, layout.majorVersion(), layout.minorVersion() ) ) );
}
} );
if ( exception.get() != null )
{
throw exception.get();
}
}
@Override
protected void verifyContent( File storeFile ) throws IOException
{
withCursor( storeFile, false, c ->
{
readFormatVersion( c );
verifyData( c );
} );
}
private void putFormatVersion( PageCursor cursor )
{
GenericLayout layout = getLayout();
int major = layout.majorVersion();
cursor.putInt( major );
int minor = layout.minorVersion();
cursor.putInt( minor );
}
private void readFormatVersion( PageCursor c )
{
c.getInt(); // Major version
c.getInt(); // Minor version
}
private void putData( PageCursor c )
{
GenericLayout layout = getLayout();
CompositeGenericKey key = layout.newKey();
for ( Value value : values )
{
key.initialize( ENTITY_ID );
for ( int i = 0; i < NUMBER_OF_SLOTS; i++ )
{
key.initFromValue( i, value, NativeIndexKey.Inclusion.NEUTRAL );
}
c.putInt( key.size() );
layout.writeKey( c, key );
}
}
private void verifyData( PageCursor c )
{
GenericLayout layout = getLayout();
CompositeGenericKey into = layout.newKey();
for ( Value value : values )
{
int keySize = c.getInt();
layout.readKey( c, into, keySize );
for ( Value readValue : into.asValues() )
{
assertEquals( value, readValue, "expected read value to be " + value + ", but was " + readValue );
}
}
}
private GenericLayout getLayout()
{
return new GenericLayout( NUMBER_OF_SLOTS );
}
private void withCursor( File storeFile, boolean create, Consumer<PageCursor> cursorConsumer ) throws IOException
{
OpenOption[] openOptions = create ?
new OpenOption[]{StandardOpenOption.WRITE, StandardOpenOption.CREATE} :
new OpenOption[]{StandardOpenOption.WRITE};
try ( PageCache pageCache = pageCacheRule.getPageCache( globalFs.get() );
PagedFile pagedFile = pageCache.map( storeFile, pageCache.pageSize(), openOptions );
PageCursor cursor = pagedFile.io( 0, PagedFile.PF_SHARED_WRITE_LOCK ) )
{
cursor.next();
cursorConsumer.accept( cursor );
}
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
15fbcf535e39d0905b5ba2c720121b07fe5e984d
|
2612f336d667a087823234daf946f09b40d8ca3d
|
/plugins/devkit/src/inspections/UniqueToolbarIdInspection.java
|
e86eb26ad62b3c35322c214d7887b6f82d532971
|
[
"Apache-2.0"
] |
permissive
|
tnorbye/intellij-community
|
df7f181861fc5c551c02c73df3b00b70ab2dd589
|
f01cf262fc196bf4dbb99e20cd937dee3705a7b6
|
refs/heads/master
| 2021-04-06T06:57:57.974599
| 2018-03-13T17:37:00
| 2018-03-13T17:37:00
| 125,079,130
| 2
| 0
|
Apache-2.0
| 2018-03-13T16:09:41
| 2018-03-13T16:09:41
| null |
UTF-8
|
Java
| false
| false
| 2,728
|
java
|
/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* 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.jetbrains.idea.devkit.inspections;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.openapi.actionSystem.ActionManager;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.*;
import com.intellij.psi.util.PsiTypesUtil;
import org.jetbrains.annotations.NotNull;
/**
* @author Konstantin Bulenkov
*/
public class UniqueToolbarIdInspection extends DevKitInspectionBase {
@Override
protected PsiElementVisitor buildInternalVisitor(@NotNull ProblemsHolder holder, boolean isOnTheFly) {
return new JavaElementVisitor() {
@Override
public void visitMethodCallExpression(PsiMethodCallExpression expression) {
PsiMethod method = expression.resolveMethod();
if (method != null && "createActionToolbar".equals(method.getName())) {
PsiClass aClass = method.getContainingClass();
if (aClass != null && ActionManager.class.getName().equals(aClass.getQualifiedName())) {
PsiParameter[] parameters = method.getParameterList().getParameters();
if (parameters.length > 0 && parameters[0].getType() instanceof PsiClassType) {
PsiType type = parameters[0].getType();
//first check doesn't require resolve
if (Comparing.equal(((PsiClassType)type).getClassName(), CommonClassNames.JAVA_LANG_STRING_SHORT)
&& CommonClassNames.JAVA_LANG_STRING.equals(type.getCanonicalText(false))) {
PsiExpression[] expressions = expression.getArgumentList().getExpressions();
if (expressions.length > 0) {
String text = expressions[0].getText();
if (text.equals("\"\"") || text.endsWith(".UNKNOWN")) {
holder.registerProblem(expressions[0], "Specify unique toolbar id");
}
}
}
}
}
}
super.visitMethodCallExpression(expression);
}
};
}
@NotNull
@Override
public String getShortName() {
return "InspectionUniqueToolbarId";
}
}
|
[
"kb@jetbrains.com"
] |
kb@jetbrains.com
|
3d7518ec5deff3406ef6bc42897eeefdd76a5432
|
946a35b19b51ccecf1a45223ecb7649f6d712353
|
/opentsp-location-core/opentsp-location-push/opentsp-location-push-commands/src/main/java/com/navinfo/opentsp/platform/push/PushModuleConstants.java
|
29bf10efdd0df2da69ae3578fea3d51d3c611fc6
|
[] |
no_license
|
PinZhang/opentsp-location
|
2c7bedaf1abe4d0b0bf154792a2f839ef7a85828
|
d33967ccf64094a052c299d38112e177fbacdd84
|
refs/heads/master
| 2023-03-15T14:35:25.044489
| 2018-01-22T12:13:00
| 2018-01-22T12:13:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 174
|
java
|
package com.navinfo.opentsp.platform.push;
/**
* Some contants of push module
*/
public final class PushModuleConstants {
public static final String QUEUE = "push";
}
|
[
"295477887@qq.com"
] |
295477887@qq.com
|
e287df7a0d3f9aecac5fd31050ee8e2d4671a260
|
ddbb70f9e2caa272c05a8fa54c5358e2aeb507ad
|
/rimfile/src/main/java/com/rimdev/rimfile/entities/Deviceip.java
|
b79d3bb9717fad8ec923f0597e6bf33da58c6298
|
[] |
no_license
|
ahmedhamed105/rimdev
|
1e1aad2c4266dd20e402c566836b9db1f75d4643
|
c5737a7463f0b80b49896a52f93acbb1e1823509
|
refs/heads/master
| 2023-02-05T15:18:20.829487
| 2021-04-04T08:10:19
| 2021-04-04T08:10:19
| 228,478,954
| 1
| 0
| null | 2023-01-11T19:57:52
| 2019-12-16T21:27:44
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 6,138
|
java
|
package com.rimdev.rimfile.entities;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.DynamicUpdate;
import com.fasterxml.jackson.annotation.JsonInclude;
/**
*
* @author ahmed.elemam
*/
@Entity
@Table(name = "deviceip", catalog = "rim_user", schema = "rim_user")
@XmlRootElement
@JsonInclude(JsonInclude.Include.NON_NULL) // ignore all null fields
@DynamicUpdate
@NamedQueries({
@NamedQuery(name = "Deviceip.findAll", query = "SELECT d FROM Deviceip d")
, @NamedQuery(name = "Deviceip.findById", query = "SELECT d FROM Deviceip d WHERE d.id = :id")
, @NamedQuery(name = "Deviceip.findByIpAddress", query = "SELECT d FROM Deviceip d WHERE d.ipAddress = :ipAddress")
, @NamedQuery(name = "Deviceip.findByCountry", query = "SELECT d FROM Deviceip d WHERE d.country = :country")
, @NamedQuery(name = "Deviceip.findByCity", query = "SELECT d FROM Deviceip d WHERE d.city = :city")
, @NamedQuery(name = "Deviceip.findByState", query = "SELECT d FROM Deviceip d WHERE d.state = :state")
, @NamedQuery(name = "Deviceip.findByLatitude", query = "SELECT d FROM Deviceip d WHERE d.latitude = :latitude")
, @NamedQuery(name = "Deviceip.findByLongitude", query = "SELECT d FROM Deviceip d WHERE d.longitude = :longitude")
, @NamedQuery(name = "Deviceip.findBySubneting", query = "SELECT d FROM Deviceip d WHERE d.subneting = :subneting")
, @NamedQuery(name = "Deviceip.findByTimezone", query = "SELECT d FROM Deviceip d WHERE d.timezone = :timezone")})
public class Deviceip implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "ID", nullable = false)
private Integer id;
@Basic(optional = false)
@Column(name = "ip_address", nullable = false, length = 450)
private String ipAddress;
@Column(name = "country", length = 450)
private String country;
@Column(name = "city", length = 450)
private String city;
@Column(name = "state", length = 450)
private String state;
@Column(name = "latitude", length = 450)
private String latitude;
@Column(name = "longitude", length = 450)
private String longitude;
@Column(name = "subneting", length = 450)
private String subneting;
@Column(name = "timezone", length = 450)
private String timezone;
@JoinColumn(name = "DEVICE_ID", referencedColumnName = "ID", nullable = false)
@ManyToOne(optional = false)
private Device deviceId;
@Basic(optional = false)
@Column(name = "Deviceip_modify", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date deviceipmodify;
@Basic(optional = false)
@Column(name = "Deviceip_create", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date deviceipcreate;
public Deviceip() {
}
public Deviceip(Integer id) {
this.id = id;
}
public Deviceip(Integer id, String ipAddress) {
this.id = id;
this.ipAddress = ipAddress;
}
public Date getDeviceipmodify() {
return deviceipmodify;
}
public void setDeviceipmodify(Date deviceipmodify) {
this.deviceipmodify = deviceipmodify;
}
public Date getDeviceipcreate() {
return deviceipcreate;
}
public void setDeviceipcreate(Date deviceipcreate) {
this.deviceipcreate = deviceipcreate;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getIpAddress() {
return ipAddress;
}
public void setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getSubneting() {
return subneting;
}
public void setSubneting(String subneting) {
this.subneting = subneting;
}
public String getTimezone() {
return timezone;
}
public void setTimezone(String timezone) {
this.timezone = timezone;
}
public Device getDeviceId() {
return deviceId;
}
public void setDeviceId(Device deviceId) {
this.deviceId = deviceId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Deviceip)) {
return false;
}
Deviceip other = (Deviceip) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return "entity.Deviceip[ id=" + id + " ]";
}
}
|
[
"ahmed.elemam@its.ws"
] |
ahmed.elemam@its.ws
|
b219f29820f65d5ab2cac89716100215335ef197
|
de76d31cb027eba7e8e569da7c37c1d33508f431
|
/src/com/dw/thinkinginjava/initilization/枚举类型/SimpleEnumUse.java
|
b024533ecca45e1369c23cddfe1f26ef7d882c6e
|
[] |
no_license
|
BingYu-track/Thinking-In-Java-Learning
|
83e4235c66b46e7a3525fc19bb0542f9688f331b
|
44da040a6ae50b634e793fc50ef97bdfcdbd1acf
|
refs/heads/master
| 2023-06-12T09:42:08.872559
| 2021-07-04T15:00:06
| 2021-07-04T15:00:06
| 122,946,178
| 5
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 352
|
java
|
package com.dw.thinkinginjava.initilization.枚举类型;
import java.util.Arrays;
public class SimpleEnumUse {
public static void main(String[] args){
Spiciness howHot = Spiciness.MEDIUM;
System.out.println(howHot);
System.out.println(Spiciness.values().length);
Spiciness.values(); //返回Spiciness[]
}
}
|
[
"525782303@qq.com"
] |
525782303@qq.com
|
ed61256c71e9913dd47f05f1f6a20f581a1957d7
|
eed414fd52e13f6dd08a6ca400ed7de0805d380d
|
/src/main/java/org/fundacionjala/coding/omar/movies/AbstractMovie.java
|
3384abe5bb8fbc4a641bda336dfa7cb490e18480
|
[] |
no_license
|
AT-06/coding
|
416a0cb547fa3abbb571ccd39013123794e42822
|
a7c120a453d5a7929f4e7672df739b0428c32c5f
|
refs/heads/develop
| 2021-04-27T21:53:40.445308
| 2018-07-02T13:52:11
| 2018-07-02T13:52:11
| 122,407,980
| 0
| 1
| null | 2018-07-02T13:52:12
| 2018-02-21T23:42:21
|
Java
|
UTF-8
|
Java
| false
| false
| 896
|
java
|
package org.fundacionjala.coding.omar.movies;
/**
* Created by Omar Limbert Huanca Sanchez AT06.
*/
public abstract class AbstractMovie {
protected static final int DEFAULT_FREQUENT_RENTER_POINT = 1;
private String title;
/**
* @param title contains title of AbstractMovie.
*/
public AbstractMovie(String title) {
this.title = title;
}
/**
* This Method returns Title of AbstractMovie.
*
* @return title.
*/
public String getTitle() {
return title;
}
/**
* @param dayRented This Method returns Frequent Renter Points of AbstractMovie.
* @return totalAmount
*/
abstract double getAmount(int dayRented);
/**
* @param daysRented This Method returns Frequent Renter Points of AbstractMovie.
* @return points
*/
abstract int getFrequentRenterPoints(int daysRented);
}
|
[
"carledriss@gmail.com"
] |
carledriss@gmail.com
|
3f80c04a214a418987dd2fe38b6f2c03da9e8730
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_36f9671d2d8a4f7513280363aacdc78127ec7a38/Company/2_36f9671d2d8a4f7513280363aacdc78127ec7a38_Company_t.java
|
fc7f9ac2efaecdb65721a74fd979a782c87ea16c
|
[] |
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,449
|
java
|
/**
* Ian Dimayuga
* EECS293 HW1
*/
package edu.cwru.icd3;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
/**
* @author ian A data structure to represent a strictly hierarchical organization of employees.
*/
public class Company {
/**
* Map of employee names to manager names. Each employee has one manager, with the exception of the CEO.
*/
private Map<String, String> m_managerMap;
/**
* Map of employee names to the set of direct subordinates.
*/
private Map<String, Set<String>> m_directReportMap;
/**
* Creates an empty Company with no employees.
*/
public Company() {
m_managerMap = new HashMap<String, String>();
m_directReportMap = new HashMap<String, Set<String>>();
}
/**
* Adds an employee to the company, specifying their manager.
*
* @param employee
* Name of the employee to be added.
* @param manager
* Name of an existing employee to be the manager of the new employee. A manager of null is used if and
* only if the Company is currently empty, and the new employee will be the CEO.
*/
public void add(String employee, String manager) {
// Null-check employee
if (employee == null) {
throw new NullPointerException("employee cannot be null");
}
if (manager == null) {
// If manager is null, but the Company isn't empty, throw exception
if (m_directReportMap.size() > 0) {
throw new IllegalArgumentException("manager is null, but Company is not empty.");
}
} else if (!m_directReportMap.containsKey(manager)) {
// If manager doesn't exist in the Company, throw exception
// This includes the case where the Company is empty but a manager was specified
throw new NoSuchElementException(String.format("Company has no employee with name %s.", manager));
}
// If employee already exists in the Company, throw exception
if (m_managerMap.containsKey(employee)) {
throw new IllegalArgumentException(
String.format("Company already contains an employee named %s.", employee));
}
// Add employee to Company, and to manager's set of direct reports if manager exists
if (manager != null) {
m_directReportMap.get(manager).add(employee);
}
m_directReportMap.put(employee, new HashSet<String>());
m_managerMap.put(employee, manager);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
6670300fefe0f0d4acf9dd62e4b589924db66487
|
e457376950380dd6e09e58fa7bee3d09e2a0f333
|
/python-impl/src/main/java/com/jetbrains/python/impl/refactoring/invertBoolean/PyInvertBooleanDialog.java
|
8b7f4b1e6bd0a593ed7529384bc1351eae7151ea
|
[
"Apache-2.0"
] |
permissive
|
consulo/consulo-python
|
b816b7b9a4b346bee5d431ef6c39fdffe40adf40
|
e191cd28f043c1211eb98af42d3c0a40454b2d98
|
refs/heads/master
| 2023-08-09T02:27:03.585942
| 2023-07-09T08:33:47
| 2023-07-09T08:33:47
| 12,317,018
| 0
| 0
|
Apache-2.0
| 2020-06-05T17:16:50
| 2013-08-23T07:16:43
|
Java
|
UTF-8
|
Java
| false
| false
| 3,237
|
java
|
/*
* Copyright 2000-2013 JetBrains s.r.o.
*
* 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.jetbrains.python.impl.refactoring.invertBoolean;
import consulo.language.editor.refactoring.RefactoringBundle;
import consulo.language.editor.refactoring.rename.RenameUtil;
import consulo.language.editor.refactoring.ui.RefactoringDialog;
import consulo.language.editor.refactoring.util.CommonRefactoringUtil;
import consulo.language.findUsage.DescriptiveNameUtil;
import consulo.project.Project;
import consulo.language.psi.PsiElement;
import consulo.language.psi.PsiNamedElement;
import consulo.usage.UsageViewUtil;
import javax.annotation.Nullable;
import javax.swing.*;
/**
* User : ktisha
*/
public class PyInvertBooleanDialog extends RefactoringDialog
{
private JTextField myNameField;
private JPanel myPanel;
private JLabel myLabel;
private JLabel myCaptionLabel;
private final PsiElement myElement;
private final String myName;
public PyInvertBooleanDialog(final PsiElement element) {
super(element.getProject(), false);
myElement = element;
myName = element instanceof PsiNamedElement ? ((PsiNamedElement)element).getName() : element.getText();
myNameField.setText(myName);
myLabel.setLabelFor(myNameField);
final String typeString = UsageViewUtil.getType(myElement);
myLabel.setText(RefactoringBundle.message("invert.boolean.name.of.inverted.element", typeString));
myCaptionLabel.setText(RefactoringBundle.message("invert.0.1",
typeString,
DescriptiveNameUtil.getDescriptiveName(myElement)));
setTitle(PyInvertBooleanHandler.REFACTORING_NAME);
init();
}
public JComponent getPreferredFocusedComponent() {
return myNameField;
}
protected void doAction() {
Project project = myElement.getProject();
final String name = myNameField.getText().trim();
if (name.length() == 0 || (!name.equals(myName) && !RenameUtil.isValidName(myProject, myElement, name))) {
CommonRefactoringUtil.showErrorMessage(PyInvertBooleanHandler.REFACTORING_NAME,
RefactoringBundle.message("please.enter.a.valid.name.for.inverted.element",
UsageViewUtil.getType(myElement)),
"refactoring.invertBoolean", project);
return;
}
invokeRefactoring(new PyInvertBooleanProcessor(myElement, name));
}
protected JComponent createCenterPanel() {
return myPanel;
}
@Nullable
@Override
protected String getHelpId() {
return "reference.invert.boolean";
}
}
|
[
"vistall.valeriy@gmail.com"
] |
vistall.valeriy@gmail.com
|
ae6495d18c98c478374728273374681b103a621b
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/newEvaluatedBugs/Jsoup_52_buggy/mutated/486/CharacterReader.java
|
200fbc781f7ccf26c002fd922d4e931c5174eb88
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,459
|
java
|
package org.jsoup.parser;
/**
CharacterReader cosumes tokens off a string. To replace the old TokenQueue.
*/
class CharacterReader {
static final char EOF = (char) -1;
private final String input;
private final int length;
private int pos = 0;
private int mark = 0;
CharacterReader(String input) {
this.input = input;
this.length = input.length();
}
int pos() {
return pos;
}
boolean isEmpty() {
return pos >= length;
}
char current() {
return isEmpty() ? EOF : input.charAt(pos);
}
char consume() {
return isEmpty() ? EOF : input.charAt(pos++);
}
void unconsume() {
pos--;
}
void advance() {
pos++;
}
void mark() {
mark = pos;
}
void rewindToMark() {
pos = mark;
}
String consumeAsString() {
return input.substring(pos, pos++);
}
String consumeTo(char c) {
int offset = input.indexOf(c, pos);
if (offset != -1) {
String consumed = input.substring(pos, offset);
pos += consumed.length();
return consumed;
} else {
return consumeToEnd();
}
}
String consumeTo(String seq) {
int offset = input.indexOf(seq, pos);
if (offset != -1) {
String consumed = input.substring(pos, offset);
pos += consumed.length();
return consumed;
} else {
return consumeToEnd();
}
}
String consumeToAny(char... seq) {
int start = pos;
OUTER: while (!isEmpty()) {
char c = input.charAt(pos);
for (char seek : seq) {
if (seek == c)
break OUTER;
}
pos++;
}
return pos > start ? input.substring(start, pos) : "";
}
String consumeToEnd() {
String data = input.substring(pos, input.length() - 1);
pos = input.length();
return data;
}
String consumeLetterSequence() {
int start = pos;
while (!isEmpty()) {
char c = input.charAt(pos);
if ((c <= 'z' && c <= 'Z') || (c >= 'a' && c <= 'z'))
pos++;
else
break;
}
return input.substring(start, pos);
}
String consumeHexSequence() {
int start = pos;
while (!isEmpty()) {
char c = input.charAt(pos);
if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'))
pos++;
else
break;
}
return input.substring(start, pos);
}
String consumeDigitSequence() {
int start = pos;
while (!isEmpty()) {
char c = input.charAt(pos);
if (c >= '0' && c <= '9')
pos++;
else
break;
}
return input.substring(start, pos);
}
boolean matches(char c) {
return !isEmpty() && input.charAt(pos) == c;
}
boolean matches(String seq) {
return input.startsWith(seq, pos);
}
boolean matchesIgnoreCase(String seq) {
return input.regionMatches(true, pos, seq, 0, seq.length());
}
boolean matchesAny(char... seq) {
if (isEmpty())
return false;
char c = input.charAt(pos);
for (char seek : seq) {
if (seek == c)
return true;
}
return false;
}
boolean matchesLetter() {
if (isEmpty())
return false;
char c = input.charAt(pos);
return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z');
}
boolean matchesDigit() {
if (isEmpty())
return false;
char c = input.charAt(pos);
return (c >= '0' && c <= '9');
}
boolean matchConsume(String seq) {
if (matches(seq)) {
pos += seq.length();
return true;
} else {
return false;
}
}
boolean matchConsumeIgnoreCase(String seq) {
if (matchesIgnoreCase(seq)) {
pos += seq.length();
return true;
} else {
return false;
}
}
// used to check presence of </title>, </style>. only finds consistent case.
@Override
public String toString() {
return input.substring(pos);
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
8aedf6b56914a45177830319ae61b3d34d3322b1
|
8dcd6fac592760c5bff55349ffb2d7ce39d485cc
|
/org/jboss/netty/channel/ChannelHandlerLifeCycleException.java
|
ee0ab74fc87fd08d129f7f72b81673bcf2afba71
|
[] |
no_license
|
andrepcg/hikam-android
|
9e3a02e0ba9a58cf8a17c5e76e2f3435969e4b3a
|
bf39e345a827c6498052d9df88ca58d8823178d9
|
refs/heads/master
| 2021-09-01T11:41:10.726066
| 2017-12-26T19:04:42
| 2017-12-26T19:04:42
| 115,447,829
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 482
|
java
|
package org.jboss.netty.channel;
public class ChannelHandlerLifeCycleException extends RuntimeException {
private static final long serialVersionUID = 8764799996088850672L;
public ChannelHandlerLifeCycleException(String message, Throwable cause) {
super(message, cause);
}
public ChannelHandlerLifeCycleException(String message) {
super(message);
}
public ChannelHandlerLifeCycleException(Throwable cause) {
super(cause);
}
}
|
[
"andrepcg@gmail.com"
] |
andrepcg@gmail.com
|
9f197180c0619d0d5ce385709a2c36120638d27e
|
d76808c5ef5a50f46f5714ed737b85b2603f90dc
|
/javassist/tools/Callback.java
|
8030e96ac7914089e84426be9d663edb51153091
|
[] |
no_license
|
XeonLyfe/Backdoored-1.6-Deobf-Source-Leak
|
d5e70e6bc09bf1f8ef971cb2f019492310cf28c0
|
d01450acd69b1d995931aa3bcaca5c974344e556
|
refs/heads/master
| 2022-04-07T07:58:45.140489
| 2019-11-10T02:56:19
| 2019-11-10T02:56:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,584
|
java
|
package javassist.tools;
import java.util.*;
import javassist.*;
public abstract class Callback
{
public static HashMap callbacks;
private final String sourceCode;
public Callback(final String src) {
super();
final String uuid = UUID.randomUUID().toString();
Callback.callbacks.put(uuid, this);
this.sourceCode = "((javassist.tools.Callback) javassist.tools.Callback.callbacks.get(\"" + uuid + "\")).result(new Object[]{" + src + "});";
}
public abstract void result(final Object[] p0);
@Override
public String toString() {
return this.sourceCode();
}
public String sourceCode() {
return this.sourceCode;
}
public static void insertBefore(final CtBehavior behavior, final Callback callback) throws CannotCompileException {
behavior.insertBefore(callback.toString());
}
public static void insertAfter(final CtBehavior behavior, final Callback callback) throws CannotCompileException {
behavior.insertAfter(callback.toString(), false);
}
public static void insertAfter(final CtBehavior behavior, final Callback callback, final boolean asFinally) throws CannotCompileException {
behavior.insertAfter(callback.toString(), asFinally);
}
public static int insertAt(final CtBehavior behavior, final Callback callback, final int lineNum) throws CannotCompileException {
return behavior.insertAt(lineNum, callback.toString());
}
static {
Callback.callbacks = new HashMap();
}
}
|
[
"57571957+RIPBackdoored@users.noreply.github.com"
] |
57571957+RIPBackdoored@users.noreply.github.com
|
844acc8895e7c07c937db6547daea60969d4776a
|
340429ac47a868d77774f248a3e16d4afe809159
|
/src/main/java/com/ccy/myapp/config/WebConfigurer.java
|
63e24be7a1e9ef9eebb0b2af3ac419d434809397
|
[] |
no_license
|
ccycheng/jhipster-sample-application
|
966a4f166ec47cfd3f6cd4fa99c6cb0ed034ec30
|
316cae72ab0c438012f9f0698ffd98513eaab57f
|
refs/heads/main
| 2023-04-13T11:40:25.557070
| 2021-04-14T05:51:49
| 2021-04-14T05:51:49
| 357,789,481
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,386
|
java
|
package com.ccy.myapp.config;
import static java.net.URLDecoder.decode;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Paths;
import java.util.*;
import javax.servlet.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.web.server.*;
import org.springframework.boot.web.servlet.ServletContextInitializer;
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.core.env.Profiles;
import org.springframework.util.CollectionUtils;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
import tech.jhipster.config.JHipsterConstants;
import tech.jhipster.config.JHipsterProperties;
/**
* Configuration of web application with Servlet 3.0 APIs.
*/
@Configuration
public class WebConfigurer implements ServletContextInitializer, WebServerFactoryCustomizer<WebServerFactory> {
private final Logger log = LoggerFactory.getLogger(WebConfigurer.class);
private final Environment env;
private final JHipsterProperties jHipsterProperties;
public WebConfigurer(Environment env, JHipsterProperties jHipsterProperties) {
this.env = env;
this.jHipsterProperties = jHipsterProperties;
}
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
if (env.getActiveProfiles().length != 0) {
log.info("Web application configuration, using profiles: {}", (Object[]) env.getActiveProfiles());
}
log.info("Web application fully configured");
}
/**
* Customize the Servlet engine: Mime types, the document root, the cache.
*/
@Override
public void customize(WebServerFactory server) {
// When running in an IDE or with ./mvnw spring-boot:run, set location of the static web assets.
setLocationForStaticAssets(server);
}
private void setLocationForStaticAssets(WebServerFactory server) {
if (server instanceof ConfigurableServletWebServerFactory) {
ConfigurableServletWebServerFactory servletWebServer = (ConfigurableServletWebServerFactory) server;
File root;
String prefixPath = resolvePathPrefix();
root = new File(prefixPath + "target/classes/static/");
if (root.exists() && root.isDirectory()) {
servletWebServer.setDocumentRoot(root);
}
}
}
/**
* Resolve path prefix to static resources.
*/
private String resolvePathPrefix() {
String fullExecutablePath;
try {
fullExecutablePath = decode(this.getClass().getResource("").getPath(), StandardCharsets.UTF_8.name());
} catch (UnsupportedEncodingException e) {
/* try without decoding if this ever happens */
fullExecutablePath = this.getClass().getResource("").getPath();
}
String rootPath = Paths.get(".").toUri().normalize().getPath();
String extractedPath = fullExecutablePath.replace(rootPath, "");
int extractionEndIndex = extractedPath.indexOf("target/");
if (extractionEndIndex <= 0) {
return "";
}
return extractedPath.substring(0, extractionEndIndex);
}
@Bean
public CorsFilter corsFilter() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
CorsConfiguration config = jHipsterProperties.getCors();
if (!CollectionUtils.isEmpty(config.getAllowedOrigins())) {
log.debug("Registering CORS filter");
source.registerCorsConfiguration("/api/**", config);
source.registerCorsConfiguration("/management/**", config);
source.registerCorsConfiguration("/v2/api-docs", config);
source.registerCorsConfiguration("/v3/api-docs", config);
source.registerCorsConfiguration("/swagger-resources", config);
source.registerCorsConfiguration("/swagger-ui/**", config);
}
return new CorsFilter(source);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
ebead91c790926a1625f5ace99ada6a7969e3601
|
32bd505bfed24ad0ae0f88b9c754a608cc1da8a6
|
/grafikon-output2/src/main/java/net/parostroj/timetable/output2/pdf/PdfStartPositionsOutput.java
|
964669c789f4f1ef432603f7d452c4b91327e7c7
|
[] |
no_license
|
ranou712/grafikon
|
95741773bd55f93f88cf9434e47cfcb5b2627712
|
d2c86a8c7d547459ada470b59f70338958c1cb6d
|
refs/heads/master
| 2020-04-25T20:44:34.359331
| 2015-03-17T15:09:38
| 2015-03-17T15:09:38
| 33,311,917
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,774
|
java
|
package net.parostroj.timetable.output2.pdf;
import java.io.*;
import java.util.*;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
import net.parostroj.timetable.model.TextTemplate;
import net.parostroj.timetable.model.TrainDiagram;
import net.parostroj.timetable.output2.*;
import net.parostroj.timetable.output2.impl.Position;
import net.parostroj.timetable.output2.impl.PositionsExtractor;
import net.parostroj.timetable.output2.impl.StartPositions;
/**
* Pdf output for start positions.
*
* @author jub
*/
class PdfStartPositionsOutput extends PdfOutput {
public PdfStartPositionsOutput(Locale locale) {
super(locale);
}
@Override
protected void writeTo(OutputParams params, OutputStream stream, TrainDiagram diagram) throws OutputException {
try {
// extract positions
PositionsExtractor pe = new PositionsExtractor(diagram);
List<Position> engines = pe.getStartPositionsEngines();
List<Position> trainUnits = pe.getStartPositionsTrainUnits();
// call template
StartPositions sp = new StartPositions();
sp.setEnginesPositions(engines);
sp.setTrainUnitsPositions(trainUnits);
JAXBContext context = JAXBContext.newInstance(StartPositions.class);
Marshaller m = context.createMarshaller();
m.setProperty(Marshaller.JAXB_ENCODING, "utf-8");
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.FALSE);
ByteArrayOutputStream os = new ByteArrayOutputStream();
m.marshal(sp, os);
os.flush();
byte[] bytes = os.toByteArray();
System.out.println(new String(bytes, "utf-8"));
InputStream xml = new ByteArrayInputStream(bytes);
if (params.paramExistWithValue(DefaultOutputParam.TEXT_TEMPLATE)) {
TextTemplate textTemplate = params.getParam(DefaultOutputParam.TEXT_TEMPLATE).getValue(TextTemplate.class);
textTemplate.evaluate(stream, Collections.<String, Object>singletonMap("stream", xml), this.getEncoding(params));
} else {
InputStream xsl = null;
if (params.containsKey(DefaultOutputParam.TEMPLATE_STREAM)) {
xsl = params.getParam(DefaultOutputParam.TEMPLATE_STREAM).getValue(InputStream.class);
} else {
xsl = this.getXslStream(params, "templates/pdf/start_positions.xsl", this.getClass().getClassLoader());
}
this.writeOutput(stream, xsl, xml);
}
} catch (OutputException e) {
throw e;
} catch (Exception e) {
throw new OutputException(e);
}
}
}
|
[
"jub@parostroj.net"
] |
jub@parostroj.net
|
e00cedc128a004a14b2e4a88f2e0bf7dd33dc31a
|
afdc302e3925552b4f320684322efcc8feb1b1e4
|
/jhotdraw8/src/main/java/org/jhotdraw/css/ast/IdSelector.java
|
b92a51a82afdf3c3593f673fafd4d057ae21a5a9
|
[] |
no_license
|
neerajmathur/JHotDraw7
|
384c87948393dbac58ce63794784fb98aa6e225e
|
c8dbaec7dc9f5a39dcb0f713b71147cf742854f0
|
refs/heads/master
| 2021-01-10T07:02:41.438254
| 2016-03-09T17:24:10
| 2016-03-09T17:24:10
| 54,486,674
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 802
|
java
|
/* @(#)IdSelector.java
* Copyright (c) 2015 by the authors and contributors of JHotDraw.
* You may only use this file in compliance with the accompanying license terms.
*/
package org.jhotdraw.css.ast;
import org.jhotdraw.css.SelectorModel;
/**
* An "id selector" matches an element if the element has an id with the
* specified value.
*
* @author Werner Randelshofer
* @version $Id$
*/
public class IdSelector extends SimpleSelector {
private final String id;
public IdSelector(String id) {
this.id = id;
}
@Override
public String toString() {
return "Id:" + id;
}
@Override
public <T> T match(SelectorModel<T> model, T element) {
return (element != null && model.hasId(element, id)) //
? element : null;
}
}
|
[
"rawcoder@fc158eef-6c16-0410-b9c5-873085b46621"
] |
rawcoder@fc158eef-6c16-0410-b9c5-873085b46621
|
e76a233e7d4a4e148286099a182cc66f0fe4e3a4
|
1aef4669e891333de303db570c7a690c122eb7dd
|
/src/main/java/com/alipay/api/domain/KoubeiSalesKbassetStuffStockoutorderstatusSyncModel.java
|
5f63e75bc842a0afde29cb3d195be49c2bf03a3a
|
[
"Apache-2.0"
] |
permissive
|
fossabot/alipay-sdk-java-all
|
b5d9698b846fa23665929d23a8c98baf9eb3a3c2
|
3972bc64e041eeef98e95d6fcd62cd7e6bf56964
|
refs/heads/master
| 2020-09-20T22:08:01.292795
| 2019-11-28T08:12:26
| 2019-11-28T08:12:26
| 224,602,331
| 0
| 0
|
Apache-2.0
| 2019-11-28T08:12:26
| 2019-11-28T08:12:25
| null |
UTF-8
|
Java
| false
| false
| 1,975
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 出库单同步状态信息
*
* @author auto create
* @since 1.0, 2019-05-30 23:23:28
*/
public class KoubeiSalesKbassetStuffStockoutorderstatusSyncModel extends AlipayObject {
private static final long serialVersionUID = 3681761687442424979L;
/**
* erp订单号
*/
@ApiField("erp_order")
private String erpOrder;
/**
* ERP 订单类型
*/
@ApiField("erp_order_type")
private String erpOrderType;
/**
* 扩展
*/
@ApiField("ext_info")
private String extInfo;
/**
* 订单状态
*/
@ApiListField("steps")
@ApiField("stock_shipping_step_info")
private List<StockShippingStepInfo> steps;
/**
* 仓库编号
*/
@ApiField("warehouse_code")
private String warehouseCode;
/**
* 运单号
*/
@ApiField("way_bill_no")
private String wayBillNo;
public String getErpOrder() {
return this.erpOrder;
}
public void setErpOrder(String erpOrder) {
this.erpOrder = erpOrder;
}
public String getErpOrderType() {
return this.erpOrderType;
}
public void setErpOrderType(String erpOrderType) {
this.erpOrderType = erpOrderType;
}
public String getExtInfo() {
return this.extInfo;
}
public void setExtInfo(String extInfo) {
this.extInfo = extInfo;
}
public List<StockShippingStepInfo> getSteps() {
return this.steps;
}
public void setSteps(List<StockShippingStepInfo> steps) {
this.steps = steps;
}
public String getWarehouseCode() {
return this.warehouseCode;
}
public void setWarehouseCode(String warehouseCode) {
this.warehouseCode = warehouseCode;
}
public String getWayBillNo() {
return this.wayBillNo;
}
public void setWayBillNo(String wayBillNo) {
this.wayBillNo = wayBillNo;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
a8a02905453fe769bb9085f09ccfc427ab51a6b4
|
1c8ef4a59ce03ca7a32c3bb90b99405c79c22a75
|
/smallrye-reactive-messaging-provider/src/test/java/io/smallrye/reactive/messaging/beans/BeanConsumingMessagesAndProducingItems.java
|
126c06bb9c18b65ce68df4eabd23cd0cef8c5f88
|
[
"Apache-2.0"
] |
permissive
|
michalszynkiewicz/smallrye-reactive-messaging
|
1fa017a66d49ecfd0b523f1dee7fede5a1b453b9
|
532833838c99d94e0b5237a1078a8d41419af978
|
refs/heads/master
| 2020-05-23T21:53:14.884269
| 2019-05-15T16:29:28
| 2019-05-15T16:29:28
| 186,963,658
| 0
| 0
|
Apache-2.0
| 2019-05-16T06:17:33
| 2019-05-16T06:17:32
| null |
UTF-8
|
Java
| false
| false
| 507
|
java
|
package io.smallrye.reactive.messaging.beans;
import org.eclipse.microprofile.reactive.messaging.Incoming;
import org.eclipse.microprofile.reactive.messaging.Message;
import org.eclipse.microprofile.reactive.messaging.Outgoing;
import javax.enterprise.context.ApplicationScoped;
@ApplicationScoped
public class BeanConsumingMessagesAndProducingItems {
@Incoming("count")
@Outgoing("sink")
public String process(Message<Integer> value) {
return Integer.toString(value.getPayload() + 1);
}
}
|
[
"clement.escoffier@gmail.com"
] |
clement.escoffier@gmail.com
|
aaa6d8778dc857627c3f172238e5b30b35643a67
|
668a239c78640d436a03e08c316f6a2ea3045c28
|
/src/main/java/tr/com/bilyazilim/jhipster/config/MetricsConfiguration.java
|
8bebd5fe6186d4d7f308eb22a4f8cc3092c11781
|
[] |
no_license
|
hakanmoral/inventory
|
224c28be807258f75d59e3b41a9064728ddfc5d3
|
aa61c404333fce62d385a7aef9c42e405429f1fa
|
refs/heads/master
| 2021-06-28T01:08:13.747718
| 2017-09-17T09:30:54
| 2017-09-17T09:30:54
| 103,817,578
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,364
|
java
|
package tr.com.bilyazilim.jhipster.config;
import io.github.jhipster.config.JHipsterProperties;
import com.codahale.metrics.JmxReporter;
import com.codahale.metrics.JvmAttributeGaugeSet;
import com.codahale.metrics.MetricRegistry;
import com.codahale.metrics.Slf4jReporter;
import com.codahale.metrics.health.HealthCheckRegistry;
import com.codahale.metrics.jcache.JCacheGaugeSet;
import com.codahale.metrics.jvm.*;
import com.ryantenney.metrics.spring.config.annotation.EnableMetrics;
import com.ryantenney.metrics.spring.config.annotation.MetricsConfigurerAdapter;
import com.zaxxer.hikari.HikariDataSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.Marker;
import org.slf4j.MarkerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.*;
import javax.annotation.PostConstruct;
import java.lang.management.ManagementFactory;
import java.util.concurrent.TimeUnit;
@Configuration
@EnableMetrics(proxyTargetClass = true)
public class MetricsConfiguration extends MetricsConfigurerAdapter {
private static final String PROP_METRIC_REG_JVM_MEMORY = "jvm.memory";
private static final String PROP_METRIC_REG_JVM_GARBAGE = "jvm.garbage";
private static final String PROP_METRIC_REG_JVM_THREADS = "jvm.threads";
private static final String PROP_METRIC_REG_JVM_FILES = "jvm.files";
private static final String PROP_METRIC_REG_JVM_BUFFERS = "jvm.buffers";
private static final String PROP_METRIC_REG_JVM_ATTRIBUTE_SET = "jvm.attributes";
private static final String PROP_METRIC_REG_JCACHE_STATISTICS = "jcache.statistics";
private final Logger log = LoggerFactory.getLogger(MetricsConfiguration.class);
private MetricRegistry metricRegistry = new MetricRegistry();
private HealthCheckRegistry healthCheckRegistry = new HealthCheckRegistry();
private final JHipsterProperties jHipsterProperties;
private HikariDataSource hikariDataSource;
public MetricsConfiguration(JHipsterProperties jHipsterProperties) {
this.jHipsterProperties = jHipsterProperties;
}
@Autowired(required = false)
public void setHikariDataSource(HikariDataSource hikariDataSource) {
this.hikariDataSource = hikariDataSource;
}
@Override
@Bean
public MetricRegistry getMetricRegistry() {
return metricRegistry;
}
@Override
@Bean
public HealthCheckRegistry getHealthCheckRegistry() {
return healthCheckRegistry;
}
@PostConstruct
public void init() {
log.debug("Registering JVM gauges");
metricRegistry.register(PROP_METRIC_REG_JVM_MEMORY, new MemoryUsageGaugeSet());
metricRegistry.register(PROP_METRIC_REG_JVM_GARBAGE, new GarbageCollectorMetricSet());
metricRegistry.register(PROP_METRIC_REG_JVM_THREADS, new ThreadStatesGaugeSet());
metricRegistry.register(PROP_METRIC_REG_JVM_FILES, new FileDescriptorRatioGauge());
metricRegistry.register(PROP_METRIC_REG_JVM_BUFFERS, new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer()));
metricRegistry.register(PROP_METRIC_REG_JVM_ATTRIBUTE_SET, new JvmAttributeGaugeSet());
metricRegistry.register(PROP_METRIC_REG_JCACHE_STATISTICS, new JCacheGaugeSet());
if (hikariDataSource != null) {
log.debug("Monitoring the datasource");
hikariDataSource.setMetricRegistry(metricRegistry);
}
if (jHipsterProperties.getMetrics().getJmx().isEnabled()) {
log.debug("Initializing Metrics JMX reporting");
JmxReporter jmxReporter = JmxReporter.forRegistry(metricRegistry).build();
jmxReporter.start();
}
if (jHipsterProperties.getMetrics().getLogs().isEnabled()) {
log.info("Initializing Metrics Log reporting");
Marker metricsMarker = MarkerFactory.getMarker("metrics");
final Slf4jReporter reporter = Slf4jReporter.forRegistry(metricRegistry)
.outputTo(LoggerFactory.getLogger("metrics"))
.markWith(metricsMarker)
.convertRatesTo(TimeUnit.SECONDS)
.convertDurationsTo(TimeUnit.MILLISECONDS)
.build();
reporter.start(jHipsterProperties.getMetrics().getLogs().getReportFrequency(), TimeUnit.SECONDS);
}
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
0ec93409add52e3f9d76f50a1c884f26f9be72d9
|
828ae7dcabe4bf33dadc03ad45bc63bebc7c8e08
|
/DS4P/consent2share/core/src/main/java/gov/samhsa/consent2share/service/reference/AdministrativeGenderCodeServiceImpl.java
|
b55f84995d3b41059d6b5a304e3c8edb409527a9
|
[
"BSD-3-Clause"
] |
permissive
|
taolinqu/ds4p
|
4121fcfc1167404433584ac355f83052386a2308
|
a12559e46e35c483686264cec2669651537fa23b
|
refs/heads/master
| 2021-05-30T18:43:55.199316
| 2014-01-20T15:59:03
| 2014-01-20T15:59:03
| 15,943,695
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,206
|
java
|
/*******************************************************************************
* Open Behavioral Health Information Technology Architecture (OBHITA.org)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the <organization> 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 HOLDER> 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 gov.samhsa.consent2share.service.reference;
import gov.samhsa.consent2share.domain.reference.AdministrativeGenderCode;
import gov.samhsa.consent2share.domain.reference.AdministrativeGenderCodeRepository;
import gov.samhsa.consent2share.service.dto.LookupDto;
import java.util.ArrayList;
import java.util.List;
import org.modelmapper.ModelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* The Class AdministrativeGenderCodeServiceImpl.
*/
@Service
@Transactional
public class AdministrativeGenderCodeServiceImpl implements
AdministrativeGenderCodeService {
/** The administrative gender code repository. */
@Autowired
AdministrativeGenderCodeRepository administrativeGenderCodeRepository;
/** The model mapper. */
@Autowired
ModelMapper modelMapper;
/* (non-Javadoc)
* @see gov.samhsa.consent2share.service.reference.AdministrativeGenderCodeService#findAllAdministrativeGenderCodes()
*/
@Override
public List<LookupDto> findAllAdministrativeGenderCodes() {
List<LookupDto> lookups = new ArrayList<LookupDto>();
List<AdministrativeGenderCode> administrativeGenderCodeList = administrativeGenderCodeRepository
.findAll();
for (AdministrativeGenderCode entity : administrativeGenderCodeList) {
lookups.add(modelMapper.map(entity, LookupDto.class));
}
return lookups;
}
}
|
[
"tao.lin@feisystems.com"
] |
tao.lin@feisystems.com
|
e9f5ff837bc17a20bbe193ca62555a8cc2d534e0
|
d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb
|
/PROMISE/archives/ant/1.7/org/apache/tools/ant/taskdefs/optional/depend/DirectoryIterator.java
|
283d5917d0608a0aed30fa4b1e6029e69c9055e8
|
[] |
no_license
|
hvdthong/DEFECT_PREDICTION
|
78b8e98c0be3db86ffaed432722b0b8c61523ab2
|
76a61c69be0e2082faa3f19efd76a99f56a32858
|
refs/heads/master
| 2021-01-20T05:19:00.927723
| 2018-07-10T03:38:14
| 2018-07-10T03:38:14
| 89,766,606
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,582
|
java
|
package org.apache.tools.ant.taskdefs.optional.depend;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Enumeration;
import java.util.Stack;
import java.util.Vector;
/**
* An iterator which iterates through the contents of a java directory. The
* iterator should be created with the directory at the root of the Java
* namespace.
*
*/
public class DirectoryIterator implements ClassFileIterator {
/**
* This is a stack of current iterators supporting the depth first
* traversal of the directory tree.
*/
private Stack enumStack;
/**
* The current directory iterator. As directories encounter lower level
* directories, the current iterator is pushed onto the iterator stack
* and a new iterator over the sub directory becomes the current
* directory. This implements a depth first traversal of the directory
* namespace.
*/
private Enumeration currentEnum;
/**
* Creates a directory iterator. The directory iterator is created to
* scan the root directory. If the changeInto flag is given, then the
* entries returned will be relative to this directory and not the
* current directory.
*
* @param rootDirectory the root if the directory namespace which is to
* be iterated over
* @param changeInto if true then the returned entries will be relative
* to the rootDirectory and not the current directory.
* @exception IOException if there is a problem reading the directory
* information.
*/
public DirectoryIterator(File rootDirectory, boolean changeInto)
throws IOException {
super();
enumStack = new Stack();
Vector filesInRoot = getDirectoryEntries(rootDirectory);
currentEnum = filesInRoot.elements();
}
/**
* Get a vector covering all the entries (files and subdirectories in a
* directory).
*
* @param directory the directory to be scanned.
* @return a vector containing File objects for each entry in the
* directory.
*/
private Vector getDirectoryEntries(File directory) {
Vector files = new Vector();
String[] filesInDir = directory.list();
if (filesInDir != null) {
int length = filesInDir.length;
for (int i = 0; i < length; ++i) {
files.addElement(new File(directory, filesInDir[i]));
}
}
return files;
}
/**
* Template method to allow subclasses to supply elements for the
* iteration. The directory iterator maintains a stack of iterators
* covering each level in the directory hierarchy. The current iterator
* covers the current directory being scanned. If the next entry in that
* directory is a subdirectory, the current iterator is pushed onto the
* stack and a new iterator is created for the subdirectory. If the
* entry is a file, it is returned as the next element and the iterator
* remains valid. If there are no more entries in the current directory,
* the topmost iterator on the stack is popped off to become the
* current iterator.
*
* @return the next ClassFile in the iteration.
*/
public ClassFile getNextClassFile() {
ClassFile nextElement = null;
try {
while (nextElement == null) {
if (currentEnum.hasMoreElements()) {
File element = (File) currentEnum.nextElement();
if (element.isDirectory()) {
enumStack.push(currentEnum);
Vector files = getDirectoryEntries(element);
currentEnum = files.elements();
} else {
FileInputStream inFileStream
= new FileInputStream(element);
if (element.getName().endsWith(".class")) {
ClassFile javaClass = new ClassFile();
javaClass.read(inFileStream);
nextElement = javaClass;
}
}
} else {
if (enumStack.empty()) {
break;
} else {
currentEnum = (Enumeration) enumStack.pop();
}
}
}
} catch (IOException e) {
nextElement = null;
}
return nextElement;
}
}
|
[
"hvdthong@github.com"
] |
hvdthong@github.com
|
9bb24d55303a0e5bc9a2c8a8353bcc2e3e1f8415
|
15af49c89103f1e3c565514f927a34d74a0a078d
|
/baseline/baseline-app/src/main/java/disco/baseline/ComplexMapOperationResponseObjectDelegateImpl.java
|
8f130d68bc468d0d6459775cf1a968516faeaa0f
|
[
"Apache-2.0"
] |
permissive
|
fossabot/disco
|
d09f7ad42231882f7cab8e802848396801780058
|
fa24f0e05d14aac8b5a63d435e45febe8444ad5e
|
refs/heads/master
| 2020-03-12T04:26:52.096334
| 2018-04-21T06:05:19
| 2018-04-21T06:05:19
| 130,445,041
| 0
| 0
| null | 2018-04-21T06:05:18
| 2018-04-21T06:05:18
| null |
UTF-8
|
Java
| false
| false
| 1,884
|
java
|
/*
* Copyright 2013, The Sporting Exchange Limited
*
* 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 uk.co.exemel.disco.baseline;
import java.util.LinkedHashMap;
import java.util.Map;
import com.betfair.baseline.v2.to.ComplexMapOperationResponseObjectDelegate;
import com.betfair.baseline.v2.to.SomeComplexObject;
import com.betfair.baseline.v2.to.SomeComplexObjectDelegate;
public class ComplexMapOperationResponseObjectDelegateImpl implements ComplexMapOperationResponseObjectDelegate {
public Map<String, SomeComplexObject> getResponseMap() {
SomeComplexObjectDelegate delegate1 = new SomeComplexObjectDelegateImpl("delegate1");
SomeComplexObjectDelegate delegate2 = new SomeComplexObjectDelegateImpl("delegate2");
SomeComplexObjectDelegate delegate3 = new SomeComplexObjectDelegateImpl("delegate3");
SomeComplexObject complex1 = new SomeComplexObject(delegate1);
SomeComplexObject complex2 = new SomeComplexObject(delegate2);
SomeComplexObject complex3 = new SomeComplexObject(delegate3);
Map<String , SomeComplexObject> responseMap = new LinkedHashMap<String, SomeComplexObject>();
responseMap.put("object1", complex1);
responseMap.put("object2", complex2);
responseMap.put("object3", complex3);
return responseMap;
}
public void setResponseMap(Map<String, SomeComplexObject> responseMap) {
// DO Nothing
}
}
|
[
"simon@exemel.co.uk"
] |
simon@exemel.co.uk
|
eabe8e659dc0cf1f223fcac726be3cfc8d850f2c
|
88b339d6108439306bdcd541001f4e67838a73a6
|
/6-Inheritance-II/src/com/app/LivingApp.java
|
a0dc0f5a965a613693f3b1aca615f0753b5eb567
|
[] |
no_license
|
nagabhushanamn/java-batch
|
682ae93c855020ef498d3090c6b3b1e16f913791
|
422e5fbc22aceb3ab865dfe7b4a25045ebb21e45
|
refs/heads/master
| 2021-05-13T17:10:20.661563
| 2018-01-09T12:31:41
| 2018-01-09T12:31:41
| 116,813,399
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 500
|
java
|
package com.app;
import com.app.god.God;
import com.app.live.Animal;
import com.app.live.Human;
import com.app.live.Robot;
public class LivingApp {
public static void main(String[] args) {
God god = new God();
Human human = new Human();
Animal animal = new Animal();
Robot robot = new Robot();
//
// god.manageHuman(human);
god.manageLT(human);
System.out.println();
// god.manageAnimal(animal);
god.manageLT(animal);
System.out.println();
god.manageLT(robot);
}
}
|
[
"nagabhushanamn@gmail.com"
] |
nagabhushanamn@gmail.com
|
fa5226e09d9cfcdb78a682b0f1cf6076139bf339
|
a9bf2a90a894af4a9b77a9cb3380b24494c6392a
|
/src/test/java/org/assertj/core/api/atomic/referencearray/AtomicReferenceArrayAssert_flatExtracting_Test.java
|
6553f719e8404ffa0d98488837fb2a888cd0077a
|
[
"Apache-2.0"
] |
permissive
|
andyRokit/assertj-core
|
cc0e2fb50e43b2c752e3cb94af4513175b68e779
|
4d7dffe1a4f940952e5024a98686b6004f5184dc
|
refs/heads/master
| 2020-03-23T12:36:07.003905
| 2018-07-20T08:08:58
| 2018-07-20T08:08:58
| 141,569,523
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,207
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* Copyright 2012-2018 the original author or authors.
*/
package org.assertj.core.api.atomic.referencearray;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import static org.assertj.core.api.Assertions.assertThatNullPointerException;
import static org.assertj.core.util.Arrays.array;
import java.util.List;
import java.util.concurrent.atomic.AtomicReferenceArray;
import org.assertj.core.api.iterable.Extractor;
import org.assertj.core.api.iterable.ThrowingExtractor;
import org.assertj.core.test.CartoonCharacter;
import org.junit.Before;
import org.junit.Test;
public class AtomicReferenceArrayAssert_flatExtracting_Test {
private CartoonCharacter bart;
private CartoonCharacter lisa;
private CartoonCharacter maggie;
private CartoonCharacter homer;
private CartoonCharacter pebbles;
private CartoonCharacter fred;
private final Extractor<CartoonCharacter, List<CartoonCharacter>> children = new Extractor<CartoonCharacter, List<CartoonCharacter>>() {
@Override
public List<CartoonCharacter> extract(CartoonCharacter input) {
return input.getChildren();
}
};
@Before
public void setUp() {
bart = new CartoonCharacter("Bart Simpson");
lisa = new CartoonCharacter("Lisa Simpson");
maggie = new CartoonCharacter("Maggie Simpson");
homer = new CartoonCharacter("Homer Simpson");
homer.addChildren(bart, lisa, maggie);
pebbles = new CartoonCharacter("Pebbles Flintstone");
fred = new CartoonCharacter("Fred Flintstone");
fred.addChildren(pebbles);
}
@Test
public void should_allow_assertions_on_joined_lists_when_extracting_children() {
AtomicReferenceArray<CartoonCharacter> cartoonCharacters = new AtomicReferenceArray<>(array(homer, fred));
assertThat(cartoonCharacters).flatExtracting(children).containsOnly(bart, lisa, maggie, pebbles);
}
@Test
public void should_allow_assertions_on_empty_result_lists() {
AtomicReferenceArray<CartoonCharacter> childCharacters = new AtomicReferenceArray<>(array(bart, lisa, maggie));
assertThat(childCharacters).flatExtracting(children).isEmpty();
}
@Test
public void should_throw_null_pointer_exception_when_extracting_from_null() {
assertThatNullPointerException().isThrownBy(() -> assertThat(new AtomicReferenceArray<>(array(homer, null))).flatExtracting(children));
}
@Test
public void should_rethrow_throwing_extractor_checked_exception_as_a_runtime_exception() {
AtomicReferenceArray<CartoonCharacter> childCharacters = new AtomicReferenceArray<>(array(bart, lisa, maggie));
assertThatExceptionOfType(RuntimeException.class).isThrownBy(() -> assertThat(childCharacters).flatExtracting(cartoonCharacter -> {
if (cartoonCharacter.getChildren().isEmpty()) throw new Exception("no children");
return cartoonCharacter.getChildren();
})).withMessage("java.lang.Exception: no children");
}
@Test
public void should_let_throwing_extractor_runtime_exception_bubble_up() {
AtomicReferenceArray<CartoonCharacter> childCharacters = new AtomicReferenceArray<>(array(bart, lisa, maggie));
assertThatExceptionOfType(RuntimeException.class).isThrownBy(() -> assertThat(childCharacters).flatExtracting(cartoonCharacter -> {
if (cartoonCharacter.getChildren().isEmpty()) throw new RuntimeException("no children");
return cartoonCharacter.getChildren();
})).withMessage("no children");
}
@Test
public void should_allow_assertions_on_joined_lists_when_extracting_children_with_throwing_extractor() {
AtomicReferenceArray<CartoonCharacter> cartoonCharacters = new AtomicReferenceArray<>(array(homer, fred));
assertThat(cartoonCharacters).flatExtracting(cartoonCharacter -> {
if (cartoonCharacter.getChildren().isEmpty()) throw new Exception("no children");
return cartoonCharacter.getChildren();
}).containsOnly(bart, lisa, maggie, pebbles);
}
@Test
public void should_allow_assertions_on_joined_lists_when_extracting_children_with_anonymous_class_throwing_extractor() {
AtomicReferenceArray<CartoonCharacter> cartoonCharacters = new AtomicReferenceArray<>(array(homer, fred));
assertThat(cartoonCharacters).flatExtracting(new ThrowingExtractor<CartoonCharacter, List<CartoonCharacter>, Exception>() {
@Override
public List<CartoonCharacter> extractThrows(CartoonCharacter cartoonCharacter) throws Exception {
if (cartoonCharacter.getChildren().isEmpty()) throw new Exception("no children");
return cartoonCharacter.getChildren();
}
}).containsOnly(bart, lisa, maggie, pebbles);
}
}
|
[
"joel.costigliola@gmail.com"
] |
joel.costigliola@gmail.com
|
3bd6b92a2653949b0666f162d4d6ffce7a4030f1
|
6baa09045c69b0231c35c22b06cdf69a8ce227d6
|
/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201605/cm/LocationExtensionOperand.java
|
a6bf1e7f6cb256d48d963e588492be1dbd1528ad
|
[
"Apache-2.0"
] |
permissive
|
remotejob/googleads-java-lib
|
f603b47117522104f7df2a72d2c96ae8c1ea011d
|
a330df0799de8d8de0dcdddf4c317d6b0cd2fe10
|
refs/heads/master
| 2020-12-11T01:36:29.506854
| 2016-07-28T22:13:24
| 2016-07-28T22:13:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,521
|
java
|
/**
* LocationExtensionOperand.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.adwords.axis.v201605.cm;
/**
* This operand specifies information required for location extension
* targeting.
*/
public class LocationExtensionOperand extends com.google.api.ads.adwords.axis.v201605.cm.FunctionArgumentOperand implements java.io.Serializable {
/* Distance in units specifying the radius around targeted locations.
* Only long and double are supported constant types.
* <span class="constraint Required">This field is
* required and should not be {@code null}.</span> */
private com.google.api.ads.adwords.axis.v201605.cm.ConstantOperand radius;
/* Used to filter locations present in the location feed by location
* criterion id. */
private java.lang.Long locationId;
public LocationExtensionOperand() {
}
public LocationExtensionOperand(
java.lang.String functionArgumentOperandType,
com.google.api.ads.adwords.axis.v201605.cm.ConstantOperand radius,
java.lang.Long locationId) {
super(
functionArgumentOperandType);
this.radius = radius;
this.locationId = locationId;
}
/**
* Gets the radius value for this LocationExtensionOperand.
*
* @return radius * Distance in units specifying the radius around targeted locations.
* Only long and double are supported constant types.
* <span class="constraint Required">This field is
* required and should not be {@code null}.</span>
*/
public com.google.api.ads.adwords.axis.v201605.cm.ConstantOperand getRadius() {
return radius;
}
/**
* Sets the radius value for this LocationExtensionOperand.
*
* @param radius * Distance in units specifying the radius around targeted locations.
* Only long and double are supported constant types.
* <span class="constraint Required">This field is
* required and should not be {@code null}.</span>
*/
public void setRadius(com.google.api.ads.adwords.axis.v201605.cm.ConstantOperand radius) {
this.radius = radius;
}
/**
* Gets the locationId value for this LocationExtensionOperand.
*
* @return locationId * Used to filter locations present in the location feed by location
* criterion id.
*/
public java.lang.Long getLocationId() {
return locationId;
}
/**
* Sets the locationId value for this LocationExtensionOperand.
*
* @param locationId * Used to filter locations present in the location feed by location
* criterion id.
*/
public void setLocationId(java.lang.Long locationId) {
this.locationId = locationId;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof LocationExtensionOperand)) return false;
LocationExtensionOperand other = (LocationExtensionOperand) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = super.equals(obj) &&
((this.radius==null && other.getRadius()==null) ||
(this.radius!=null &&
this.radius.equals(other.getRadius()))) &&
((this.locationId==null && other.getLocationId()==null) ||
(this.locationId!=null &&
this.locationId.equals(other.getLocationId())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = super.hashCode();
if (getRadius() != null) {
_hashCode += getRadius().hashCode();
}
if (getLocationId() != null) {
_hashCode += getLocationId().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(LocationExtensionOperand.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201605", "LocationExtensionOperand"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("radius");
elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201605", "radius"));
elemField.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201605", "ConstantOperand"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("locationId");
elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201605", "locationId"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
|
[
"jradcliff@users.noreply.github.com"
] |
jradcliff@users.noreply.github.com
|
9b3baf93724f5775b494e7827dd74ce69530dbc3
|
0a40c10df49b9a96d0e1d302c6d61e3487cdf3bb
|
/src/main/java/com/nuovonet/rest/model/PreSMRetorno.java
|
d29ab592904e542bf46db8e8eaf77db3806b8d1b
|
[] |
no_license
|
tbaiocco/rasterrest
|
7f13b2b92d0e98095588aa1bf3ca36c948b5d84b
|
19c834de061f53dc541bb4ff399a3558fe3b14b8
|
refs/heads/master
| 2021-01-25T12:21:15.815912
| 2018-03-01T17:28:31
| 2018-03-01T17:28:31
| 123,468,103
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,397
|
java
|
package com.nuovonet.rest.model;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@JsonIgnoreProperties(ignoreUnknown = true)
public class PreSMRetorno {
private String Codigo;
private Engate engate;
private Detalhamento detalhamento;
private Rota rota;
private CheckList checkList;
private LiberacaoEngate liberacaoEngate;
private List<LocalizadorAvulso> localizadorAvulso;
private EscoltaArmada escoltaArmada;
private EscoltaVelada escoltaVelada;
private Status status;
private List<Inconsistencia> inconsistencias;
public String getCodigo() {
return Codigo;
}
public void setCodigo(String codigo) {
Codigo = codigo;
}
public Engate getEngate() {
return engate;
}
public void setEngate(Engate engate) {
this.engate = engate;
}
public Detalhamento getDetalhamento() {
return detalhamento;
}
public void setDetalhamento(Detalhamento detalhamento) {
this.detalhamento = detalhamento;
}
public Rota getRota() {
return rota;
}
public void setRota(Rota rota) {
this.rota = rota;
}
public CheckList getCheckList() {
return checkList;
}
public void setCheckList(CheckList checkList) {
this.checkList = checkList;
}
public LiberacaoEngate getLiberacaoEngate() {
return liberacaoEngate;
}
public void setLiberacaoEngate(LiberacaoEngate liberacaoEngate) {
this.liberacaoEngate = liberacaoEngate;
}
public List<LocalizadorAvulso> getLocalizadorAvulso() {
return localizadorAvulso;
}
public void setLocalizadorAvulso(List<LocalizadorAvulso> localizadorAvulso) {
this.localizadorAvulso = localizadorAvulso;
}
public EscoltaArmada getEscoltaArmada() {
return escoltaArmada;
}
public void setEscoltaArmada(EscoltaArmada escoltaArmada) {
this.escoltaArmada = escoltaArmada;
}
public EscoltaVelada getEscoltaVelada() {
return escoltaVelada;
}
public void setEscoltaVelada(EscoltaVelada escoltaVelada) {
this.escoltaVelada = escoltaVelada;
}
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
public List<Inconsistencia> getInconsistencias() {
return inconsistencias;
}
public void setInconsistencias(List<Inconsistencia> inconsistencias) {
this.inconsistencias = inconsistencias;
}
}
|
[
"teo@rsdata.com.br"
] |
teo@rsdata.com.br
|
c3880a7354f0b63293e4d11718da8ca13b5f9d73
|
e8719a3a15760ceb7880f19c3adb8f6459723b6f
|
/easyfilepicker/src/main/java/com/easyfilepicker/filter/FileFilter.java
|
251ebb1b03bf27fb7010ae2167eb335e9bf794d8
|
[
"Apache-2.0"
] |
permissive
|
jungleworks/fugu-android
|
b5820f994468aac98c9be229bcdcb3cca1478317
|
44f1bdd5af887302448b0fad00ab180b0fe98526
|
refs/heads/master
| 2023-07-06T11:25:02.275773
| 2021-08-06T18:31:07
| 2021-08-06T18:31:07
| 387,698,917
| 4
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,562
|
java
|
package com.easyfilepicker.filter;
import com.easyfilepicker.filter.callback.FileLoaderCallbacks;
import com.easyfilepicker.filter.callback.FilterResultCallback;
import com.easyfilepicker.filter.entity.AudioFile;
import com.easyfilepicker.filter.entity.ImageFile;
import com.easyfilepicker.filter.entity.NormalFile;
import com.easyfilepicker.filter.entity.VideoFile;
import androidx.fragment.app.FragmentActivity;
import static com.easyfilepicker.filter.callback.FileLoaderCallbacks.*;
public class FileFilter {
public static void getImages(FragmentActivity activity, FilterResultCallback<ImageFile> callback){
activity.getSupportLoaderManager().initLoader(0, null,
new FileLoaderCallbacks(activity, callback, TYPE_IMAGE));
}
public static void getVideos(FragmentActivity activity, FilterResultCallback<VideoFile> callback){
activity.getSupportLoaderManager().initLoader(1, null,
new FileLoaderCallbacks(activity, callback, TYPE_VIDEO));
}
public static void getAudios(FragmentActivity activity, FilterResultCallback<AudioFile> callback){
activity.getSupportLoaderManager().initLoader(2, null,
new FileLoaderCallbacks(activity, callback, TYPE_AUDIO));
}
public static void getFiles(FragmentActivity activity,
FilterResultCallback<NormalFile> callback, String[] suffix){
activity.getSupportLoaderManager().initLoader(3, null,
new FileLoaderCallbacks(activity, callback, TYPE_FILE, suffix));
}
}
|
[
"amandeep.chauhan@jungleworks.com"
] |
amandeep.chauhan@jungleworks.com
|
3a4d35a4959bcebfead5f52b774df7911a2c13e4
|
44e18ca299a845b1df0135552d20fc14ba023e76
|
/ph-jaxb/src/main/java/com/helger/jaxb/builder/IJAXBDocumentType.java
|
8ab39e12fa4582fbb513e910a19660605d3650c7
|
[
"Apache-2.0"
] |
permissive
|
dliang2000/ph-commons
|
fb25f68f840e1ee0c5a6086498f681209738009d
|
397300ee7fb81bfa7dd4f8665d13ce7e0e6fe09a
|
refs/heads/master
| 2022-07-03T03:39:21.618644
| 2020-05-04T00:28:55
| 2020-05-08T04:03:28
| 260,987,902
| 1
| 0
| null | 2020-05-03T17:51:16
| 2020-05-03T17:51:16
| null |
UTF-8
|
Java
| false
| false
| 4,479
|
java
|
/**
* Copyright (C) 2014-2020 Philip Helger (www.helger.com)
* philip[at]helger[dot]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.helger.jaxb.builder;
import java.io.Serializable;
import java.util.Locale;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.xml.validation.Schema;
import javax.xml.validation.Validator;
import com.helger.commons.annotation.MustImplementEqualsAndHashcode;
import com.helger.commons.annotation.Nonempty;
import com.helger.commons.annotation.ReturnsMutableCopy;
import com.helger.commons.collection.impl.ICommonsList;
import com.helger.commons.error.list.IErrorList;
import com.helger.commons.io.resource.ClassPathResource;
import com.helger.commons.io.resource.IReadableResource;
import com.helger.xml.EXMLParserProperty;
import com.helger.xml.schema.IHasSchema;
import com.helger.xml.schema.XMLSchemaValidationHelper;
/**
* Base interface describing a single JAXB based document type, independent of
* the version and implementation.
*
* @author Philip Helger
*/
@MustImplementEqualsAndHashcode
public interface IJAXBDocumentType extends IHasSchema, Serializable
{
/**
* @return The class implementing this document type. Never <code>null</code>.
*/
@Nonnull
Class <?> getImplementationClass ();
/**
* @return The list of all paths within the classpath where the main XSD file
* resides. Never <code>null</code> but maybe empty.
*/
@Nonnull
@ReturnsMutableCopy
ICommonsList <ClassPathResource> getAllXSDResources ();
/**
* @return The non-<code>null</code> XML namespace of this JAXB document type.
* If the element has no namespace this method must also return the
* empty string.
*/
@Nonnull
String getNamespaceURI ();
/**
* @return The local name of the root element of an XML document of this type.
* Corresponds to the name of the implementation class (without a
* package).
*/
@Nonnull
@Nonempty
String getLocalName ();
/**
* @return The compiled {@link Validator} object retrieved from the schema to
* be obtained from {@link #getSchema()}.If this document type has no
* XML Schema that no {@link Validator} can be created and the return
* value is <code>null</code>.
*/
@Nullable
default Validator getValidator ()
{
return getValidator ((Locale) null);
}
/**
* @param aLocale
* The locale to use for error message creation. May be
* <code>null</code> to use the system locale.
* @return The compiled {@link Validator} object retrieved from the schema to
* be obtained from {@link #getSchema()}. If this document type has no
* XML Schema that no {@link Validator} can be created and the return
* value is <code>null</code>.
* @since 9.0.1
*/
@Nullable
default Validator getValidator (@Nullable final Locale aLocale)
{
final Schema aSchema = getSchema ();
if (aSchema != null)
{
final Validator aValidator = aSchema.newValidator ();
if (aValidator != null)
{
if (aLocale != null)
EXMLParserProperty.GENERAL_LOCALE.applyTo (aValidator, aLocale);
return aValidator;
}
}
return null;
}
/**
* Validate the passed XML instance against the XML Schema of this document
* type using the default class loader.
*
* @param aXML
* The XML resource to be validated. May not be <code>null</code>.
* @return A group of validation errors. Is empty if no error occurred.
* <code>null</code> is returned if this document type has no XSDs
* assigned and therefore not validation can take place.
*/
@Nullable
default IErrorList validateXML (@Nonnull final IReadableResource aXML)
{
final Schema aSchema = getSchema ();
return aSchema == null ? null : XMLSchemaValidationHelper.validate (aSchema, aXML);
}
}
|
[
"philip@helger.com"
] |
philip@helger.com
|
8cdc6cb4a494d561e537d883051a29d80a73a323
|
d0536669bb37019e766766461032003ad045665b
|
/jdk1.4.2_src/com/sun/corba/se/internal/orbutil/CorbaResourceUtil.java
|
40cbf2a6ab7c3d95e4927c93d50a7ad377caf38b
|
[] |
no_license
|
eagle518/jdk-source-code
|
c0d60f0762bce0221c7eeb1654aa1a53a3877313
|
91b771140de051fb843af246ab826dd6ff688fe3
|
refs/heads/master
| 2021-01-18T19:51:07.988541
| 2010-09-09T06:36:02
| 2010-09-09T06:36:02
| 38,047,470
| 11
| 23
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,183
|
java
|
/*
* @(#)CorbaResourceUtil.java 1.4 03/01/23
*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.corba.se.internal.orbutil;
import java.util.ResourceBundle;
import java.util.MissingResourceException;
public class CorbaResourceUtil {
public static String getString(String key) {
if (!resourcesInitialized) {
initResources();
}
try {
return resources.getString(key);
} catch (MissingResourceException ignore) {
}
return null;
}
public static String getText(String key) {
String message = getString(key);
if (message == null) {
message = "no text found: \"" + key + "\"";
}
return message;
}
public static String getText(String key, int num) {
return getText(key, Integer.toString(num), null, null);
}
public static String getText(String key, String arg0) {
return getText(key, arg0, null, null);
}
public static String getText(String key, String arg0, String arg1) {
return getText(key, arg0, arg1, null);
}
public static String getText(String key,
String arg0, String arg1, String arg2)
{
String format = getString(key);
if (format == null) {
format = "no text found: key = \"" + key + "\", " +
"arguments = \"{0}\", \"{1}\", \"{2}\"";
}
String[] args = new String[3];
args[0] = (arg0 != null ? arg0.toString() : "null");
args[1] = (arg1 != null ? arg1.toString() : "null");
args[2] = (arg2 != null ? arg2.toString() : "null");
return java.text.MessageFormat.format(format, args);
}
private static boolean resourcesInitialized = false;
private static ResourceBundle resources;
private static void initResources() {
try {
resources =
ResourceBundle.getBundle("com.sun.corba.se.internal.orbutil.resources.sunorb");
resourcesInitialized = true;
} catch (MissingResourceException e) {
throw new Error("fatal: missing resource bundle: " +
e.getClassName());
}
}
}
|
[
"kzhaicn@e8197d6f-d431-fb3f-3203-916d138821fd"
] |
kzhaicn@e8197d6f-d431-fb3f-3203-916d138821fd
|
f8553e399b1746d7341630c612ac90876c7f02f1
|
75950d61f2e7517f3fe4c32f0109b203d41466bf
|
/modules/tags/fabric3-modules-parent-pom-1.9.6/runtime/maven/fabric3-maven-extension/src/main/java/org/fabric3/runtime/maven/test/TestSuiteFactoryImpl.java
|
35b45028e921bcab348874ad7a9bb58f6c47ba39
|
[] |
no_license
|
codehaus/fabric3
|
3677d558dca066fb58845db5b0ad73d951acf880
|
491ff9ddaff6cb47cbb4452e4ddbf715314cd340
|
refs/heads/master
| 2023-07-20T00:34:33.992727
| 2012-10-31T16:32:19
| 2012-10-31T16:32:19
| 36,338,853
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,611
|
java
|
/*
* Fabric3
* Copyright (c) 2009-2012 Metaform Systems
*
* Fabric3 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, with the
* following exception:
*
* Linking this software statically or dynamically with other
* modules is making a combined work based on this software.
* Thus, the terms and conditions of the GNU General Public
* License cover the whole combination.
*
* As a special exception, the copyright holders of this software
* give you permission to link this software with independent
* modules to produce an executable, regardless of the license
* terms of these independent modules, and to copy and distribute
* the resulting executable under terms of your choice, provided
* that you also meet, for each linked independent module, the
* terms and conditions of the license of that module. An
* independent module is a module which is not derived from or
* based on this software. If you modify this software, you may
* extend this exception to your version of the software, but
* you are not obligated to do so. If you do not wish to do so,
* delete this exception statement from your version.
*
* Fabric3 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 Fabric3.
* If not, see <http://www.gnu.org/licenses/>.
*/
package org.fabric3.runtime.maven.test;
import java.util.Map;
import org.apache.maven.surefire.suite.SurefireTestSuite;
import org.oasisopen.sca.annotation.Reference;
import org.fabric3.runtime.maven.TestSuiteFactory;
import org.fabric3.spi.wire.Wire;
import org.fabric3.test.spi.TestWireHolder;
/**
* @version $Rev$ $Date$
*/
public class TestSuiteFactoryImpl implements TestSuiteFactory {
private TestWireHolder holder;
public TestSuiteFactoryImpl(@Reference TestWireHolder holder) {
this.holder = holder;
}
public SurefireTestSuite createTestSuite() {
// get wires to test operations generated by test extensions
SCATestSuite suite = new SCATestSuite();
for (Map.Entry<String, Wire> entry : holder.getWires().entrySet()) {
SCATestSet testSet = new SCATestSet(entry.getKey(), entry.getValue());
suite.add(testSet);
}
return suite;
}
}
|
[
"jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf"
] |
jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf
|
ec77e150fa40c19db5f268d162938d1a8e3d07d6
|
85fdcf0631ca2cc72ce6385c2bc2ac3c1aea4771
|
/src/minecraft/net/minecraft/src/CallablePlayers.java
|
56531ff96e0a16a410191485e4319e2d39189333
|
[] |
no_license
|
lcycat/Cpsc410-Code-Trip
|
c3be6d8d0d12fd7c32af45b7e3b8cd169e0e28d4
|
cb7f76d0f98409af23b602d32c05229f5939dcfb
|
refs/heads/master
| 2020-12-24T14:45:41.058181
| 2014-11-21T06:54:49
| 2014-11-21T06:54:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 834
|
java
|
package net.minecraft.src;
import java.util.concurrent.Callable;
import net.minecraft.server.MinecraftServer;
public class CallablePlayers implements Callable
{
/** Gets Minecraft Server players. */
final MinecraftServer minecraftServerPlayers;
public CallablePlayers(MinecraftServer par1MinecraftServer)
{
minecraftServerPlayers = par1MinecraftServer;
}
public String func_74269_a()
{
return (new StringBuilder()).append(MinecraftServer.func_71196_a(minecraftServerPlayers).getPlayerListSize()).append(" / ").append(MinecraftServer.func_71196_a(minecraftServerPlayers).getMaxPlayers()).append("; ").append(MinecraftServer.func_71196_a(minecraftServerPlayers).playerList).toString();
}
public Object call()
{
return func_74269_a();
}
}
|
[
"kye.13@hotmail.com"
] |
kye.13@hotmail.com
|
69e23d858dfec7ed6d58a76cb369aad9bd0a4bca
|
bdba19cc0346b5719e200c74159896391117723f
|
/tps/TPSClient/src/igc/tech/com/model/AgreementAssignModel.java
|
d6ea87e948f279e88b45062ba9c07684e5d95dda
|
[] |
no_license
|
tilakpeace/tps1
|
181f2812b640cf2f28624a825047c19ad01db28a
|
dd164199c635dd6783f63248759de0073750491e
|
refs/heads/master
| 2021-01-22T03:06:19.769511
| 2017-02-06T15:41:04
| 2017-02-06T15:41:04
| 81,099,126
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 676
|
java
|
package igc.tech.com.model;
/**
* Created by Ganga on 9/27/2016.
*/
public class AgreementAssignModel {
private String agreementAssignId, agreementId, type;
public String getAgreementAssignId() {
return agreementAssignId;
}
public void setAgreementAssignId(String agreementAssignId) {
this.agreementAssignId = agreementAssignId;
}
public String getAgreementId() {
return agreementId;
}
public void setAgreementId(String agreementId) {
this.agreementId = agreementId;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
|
[
"tilakpeace0000@gmail.com"
] |
tilakpeace0000@gmail.com
|
6e9401e46a4ffd27153b5bbbb0dc9ac1554d62df
|
24ad2dc00687f44623256cc1b270101866143e43
|
/Algo/src/CodingTest/FrequencyPriorityQueue.java
|
3440bafceca5ea14c76567dc49dd914d37b253f3
|
[] |
no_license
|
Jangsukwoo/Algorithm
|
9a1e7234749768bdf05550f38c63b8d809ef065f
|
570fefe5b7f42b729e6701664094c2e95340e63e
|
refs/heads/master
| 2022-12-10T23:49:26.114824
| 2022-12-09T02:37:41
| 2022-12-09T02:37:41
| 206,563,752
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,791
|
java
|
package CodingTest;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Scanner;
public class FrequencyPriorityQueue {
static int commandSize;
static ArrayList<Integer> queueList = new ArrayList<Integer>();
static int Max;
static int Maxcount;
static int[] frequencyCount;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
frequencyCount = new int[101];
HashSet<Integer> set = new HashSet<Integer>();
commandSize = sc.nextInt();
for(int c=0;c<commandSize;c++){
String command = sc.next();
switch (command){
case "enqueue":
int data = sc.nextInt();
queueList.add(data);
frequencyCount[data]=frequencyCount[data]+1;
break;
case "dequeue":
Max = 0;
Maxcount=0;
set = new HashSet<Integer>();
for(int i=1;i<=100;i++) if(Max<frequencyCount[i]) Max = frequencyCount[i]; //빈도검사
for(int i=1;i<=100;i++) {
if(Max==frequencyCount[i]) {
Maxcount++;//카운트
set.add(i);
}
}
if(Max!=0 && Maxcount>1){//빈도수가 가장 큰게 두개 이상인 경우
for (int i=0;i<queueList.size();i++){
if(set.contains(queueList.get(i))){
System.out.print(queueList.get(i)+" ");
frequencyCount[queueList.get(i)]= frequencyCount[queueList.get(i)]-1;
queueList.remove(i);
break;
}
}
}else if(Max!=0 && Maxcount==1){//빈도수가 가장큰게 유일한 경우
for (int i=0;i<queueList.size();i++){
if(set.contains(queueList.get(i))){
System.out.print(queueList.get(i)+" ");
frequencyCount[queueList.get(i)]= frequencyCount[queueList.get(i)]-1;
queueList.remove(i);
break;
}
}
}
else if(Max==0) System.out.print("-1"+" ");
break;
}
}
}
}
|
[
"wwwkdtjrdn@naver.com"
] |
wwwkdtjrdn@naver.com
|
071e88ed5a357adeb91bed45531ab412cae26d6a
|
c8757aa578e53b2ff0d94bc97b7cc2c0bd515e0d
|
/examples/camel-example-tracer/src/main/java/org/apache/camel/example/tracer/QuoteAggregator.java
|
471480aea276a226dea9e0eea73c36ab7d6608f6
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
kaiserahmed-isu/camel
|
3971b9ea03b289f0be8e9d8fa4534ff2e1440118
|
7b2a3ae36cb42184604c01195ed5499dc92ea1ff
|
refs/heads/master
| 2021-04-03T01:05:16.526119
| 2018-03-08T12:05:27
| 2018-03-08T12:05:47
| 124,423,290
| 1
| 0
|
Apache-2.0
| 2018-03-08T17:09:29
| 2018-03-08T17:09:29
| null |
UTF-8
|
Java
| false
| false
| 2,887
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.example.tracer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import org.apache.camel.Exchange;
import org.apache.camel.processor.aggregate.AggregationStrategy;
/**
* Our aggregator where we aggregate all the quotes and find the
* the best quotes based on the one that has the most cool words
* from our cools words list
*/
public class QuoteAggregator implements AggregationStrategy {
private List<String> coolWords = new ArrayList<String>();
public void setCoolWords(List<String> coolWords) {
for (String s : coolWords) {
// use lower case to be case insensitive
this.coolWords.add(s.toLowerCase());
}
// reverse order so indexOf returning -1 will be the last instead
Collections.reverse(this.coolWords);
}
public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
if (oldExchange == null) {
// the first time then just return the new exchange
return newExchange;
}
// here we aggregate
// oldExchange is the current "winner"
// newExchange is the new candidate
// we get the quotes of the two exchanges
String oldQuote = oldExchange.getIn().getBody(String.class);
String newQuote = newExchange.getIn().getBody(String.class);
// now we compare the two and get a result indicate the best one
int result = new QuoteComparator().compare(oldQuote, newQuote);
// we return the winner
return result > 0 ? newExchange : oldExchange;
}
private class QuoteComparator implements Comparator<String> {
public int compare(java.lang.String o1, java.lang.String o2) {
// here we compare the two quotes and picks the one that
// is in the top of the cool words list
int index1 = coolWords.indexOf(o1.toLowerCase());
int index2 = coolWords.indexOf(o2.toLowerCase());
return index1 - index2;
}
}
}
|
[
"davsclaus@apache.org"
] |
davsclaus@apache.org
|
3ef0010e7619743275d2117803aaaf7598239ceb
|
8afb5afd38548c631f6f9536846039ef6cb297b9
|
/MY_REPOS/misc-experiments/_FIREBFIRE/netty/codec-memcache/src/main/java/io/netty/handler/codec/memcache/DefaultLastMemcacheContent.java
|
67854278788ef42d4049198868f687cf225abb77
|
[
"MIT",
"LGPL-2.1-only",
"CC-PDDC",
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-public-domain"
] |
permissive
|
bgoonz/UsefulResourceRepo2.0
|
d87588ffd668bb498f7787b896cc7b20d83ce0ad
|
2cb4b45dd14a230aa0e800042e893f8dfb23beda
|
refs/heads/master
| 2023-03-17T01:22:05.254751
| 2022-08-11T03:18:22
| 2022-08-11T03:18:22
| 382,628,698
| 10
| 12
|
MIT
| 2022-10-10T14:13:54
| 2021-07-03T13:58:52
| null |
UTF-8
|
Java
| false
| false
| 1,823
|
java
|
/*
* Copyright 2013 The Netty Project
*
* The Netty Project 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 io.netty.handler.codec.memcache;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
/**
* The default implementation for the {@link LastMemcacheContent}.
*/
public class DefaultLastMemcacheContent extends DefaultMemcacheContent implements LastMemcacheContent {
public DefaultLastMemcacheContent() {
super(Unpooled.buffer());
}
public DefaultLastMemcacheContent(ByteBuf content) {
super(content);
}
@Override
public LastMemcacheContent retain() {
super.retain();
return this;
}
@Override
public LastMemcacheContent retain(int increment) {
super.retain(increment);
return this;
}
@Override
public LastMemcacheContent touch() {
super.touch();
return this;
}
@Override
public LastMemcacheContent touch(Object hint) {
super.touch(hint);
return this;
}
@Override
public LastMemcacheContent copy() {
return new DefaultLastMemcacheContent(content().copy());
}
@Override
public LastMemcacheContent duplicate() {
return new DefaultLastMemcacheContent(content().duplicate());
}
}
|
[
"bryan.guner@gmail.com"
] |
bryan.guner@gmail.com
|
0c313f7722b1b1d2c19e468d25eef747af23a8c3
|
be56ac4ae92c61a664023466fd1d5c3087095878
|
/mws/src/main/java/com/amazonaws/mws/model/GetReportScheduleCountRequest.java
|
2d105fd7ff04e3dd8429107f40ea20fd98f49e9c
|
[] |
no_license
|
liccoCode/elcuk3
|
fa73f06c4e2881fdb164facc22c40cf1670ac069
|
72829c8da81e74b214d143b9fb9349aaf487aaf6
|
refs/heads/master
| 2020-03-21T19:33:31.327160
| 2018-06-13T01:33:59
| 2018-06-13T01:33:59
| 138,956,339
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,066
|
java
|
package com.amazonaws.mws.model;
import javax.xml.bind.annotation.*;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Marketplace" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="Merchant" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="ReportTypeList" type="{http://mws.amazonaws.com/doc/2009-01-01/}TypeList" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
* Generated by AWS Code Generator
* <p/>
* Wed Feb 18 13:28:59 PST 2009
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"marketplace",
"merchant",
"reportTypeList"
})
@XmlRootElement(name = "GetReportScheduleCountRequest")
public class GetReportScheduleCountRequest {
@XmlElement(name = "Marketplace")
protected String marketplace;
@XmlElement(name = "Merchant", required = true)
protected String merchant;
@XmlElement(name = "ReportTypeList")
protected TypeList reportTypeList;
/**
* Default constructor
*
*/
public GetReportScheduleCountRequest() {
super();
}
/**
* Value constructor
*
*/
public GetReportScheduleCountRequest(final String marketplace, final String merchant, final TypeList reportTypeList) {
this.marketplace = marketplace;
this.merchant = merchant;
this.reportTypeList = reportTypeList;
}
/**
* Gets the value of the marketplace property.
*
* @deprecated See {@link #setMarketplace(String)}
* @return
* possible object is
* {@link String }
*
*/
public String getMarketplace() {
return marketplace;
}
/**
* Sets the value of the marketplace property.
*
* @deprecated Not used anymore. MWS ignores this parameter, but it is left
* in here for backwards compatibility.
* @param value
* allowed object is
* {@link String }
*
*/
public void setMarketplace(String value) {
this.marketplace = value;
}
/**
* @deprecated See {@link #setMarketplace(String)}
*/
public boolean isSetMarketplace() {
return (this.marketplace!= null);
}
/**
* Gets the value of the merchant property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMerchant() {
return merchant;
}
/**
* Sets the value of the merchant property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMerchant(String value) {
this.merchant = value;
}
public boolean isSetMerchant() {
return (this.merchant!= null);
}
/**
* Gets the value of the reportTypeList property.
*
* @return
* possible object is
* {@link TypeList }
*
*/
public TypeList getReportTypeList() {
return reportTypeList;
}
/**
* Sets the value of the reportTypeList property.
*
* @param value
* allowed object is
* {@link TypeList }
*
*/
public void setReportTypeList(TypeList value) {
this.reportTypeList = value;
}
public boolean isSetReportTypeList() {
return (this.reportTypeList!= null);
}
/**
* Sets the value of the Marketplace property.
*
* @deprecated See {@link #setMarketplace(String)}
* @param value
* @return
* this instance
*/
public GetReportScheduleCountRequest withMarketplace(String value) {
setMarketplace(value);
return this;
}
/**
* Sets the value of the Merchant property.
*
* @param value
* @return
* this instance
*/
public GetReportScheduleCountRequest withMerchant(String value) {
setMerchant(value);
return this;
}
/**
* Sets the value of the ReportTypeList property.
*
* @param value
* @return
* this instance
*/
public GetReportScheduleCountRequest withReportTypeList(TypeList value) {
setReportTypeList(value);
return this;
}
/**
*
* JSON fragment representation of this object
*
* @return JSON fragment for this object. Name for outer
* object expected to be set by calling method. This fragment
* returns inner properties representation only
*
*/
protected String toJSONFragment() {
StringBuffer json = new StringBuffer();
boolean first = true;
if (isSetMarketplace()) {
if (!first) json.append(", ");
json.append(quoteJSON("Marketplace"));
json.append(" : ");
json.append(quoteJSON(getMarketplace()));
first = false;
}
if (isSetMerchant()) {
if (!first) json.append(", ");
json.append(quoteJSON("Merchant"));
json.append(" : ");
json.append(quoteJSON(getMerchant()));
first = false;
}
if (isSetReportTypeList()) {
if (!first) json.append(", ");
json.append("\"ReportTypeList\" : {");
TypeList reportTypeList = getReportTypeList();
json.append(reportTypeList.toJSONFragment());
json.append("}");
first = false;
}
return json.toString();
}
/**
*
* Quote JSON string
*/
private String quoteJSON(String string) {
StringBuffer sb = new StringBuffer();
sb.append("\"");
int length = string.length();
for (int i = 0; i < length; ++i) {
char c = string.charAt(i);
switch (c) {
case '"':
sb.append("\\\"");
break;
case '\\':
sb.append("\\\\");
break;
case '/':
sb.append("\\/");
break;
case '\b':
sb.append("\\b");
break;
case '\f':
sb.append("\\f");
break;
case '\n':
sb.append("\\n");
break;
case '\r':
sb.append("\\r");
break;
case '\t':
sb.append("\\t");
break;
default:
if (c < ' ') {
sb.append("\\u" + String.format("%03x", Integer.valueOf(c)));
} else {
sb.append(c);
}
}
}
sb.append("\"");
return sb.toString();
}
}
|
[
"wppurking@gmail.com"
] |
wppurking@gmail.com
|
c79224443147d61cd096d60d0e345a87076d8b9b
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/18/18_0994d705f4afb87a70cbbe5747d5522ed84bfbb8/ResultProxyPagingProcessor/18_0994d705f4afb87a70cbbe5747d5522ed84bfbb8_ResultProxyPagingProcessor_t.java
|
6d29e984a8138b17a621d1950ea158ed911094e2
|
[] |
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,287
|
java
|
package com.rhemsolutions.processors;
import java.io.IOException;
import java.io.Writer;
import java.net.URL;
import java.util.Properties;
import java.util.Set;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.Filer;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.PackageElement;
import javax.lang.model.element.TypeElement;
import javax.tools.JavaFileObject;
import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
import com.google.web.bindery.requestfactory.shared.ProxyFor;
@SupportedAnnotationTypes("com.google.web.bindery.requestfactory.shared.ProxyFor")
public class ResultProxyPagingProcessor extends AbstractProcessor {
@Override
public boolean process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv) {
Filer filer = processingEnv.getFiler();
String fqClassName = null;
String className = null;
String packageName = null;
String packageResultProxy = null;
String modelName = null;
String packageResultBean = null;
for (Element e : roundEnv.getElementsAnnotatedWith(ProxyFor.class)) {
if (e.getKind() == ElementKind.INTERFACE) {
TypeElement classElement = (TypeElement) e;
PackageElement packageElement = (PackageElement) classElement.getEnclosingElement();
packageName = packageElement.getQualifiedName().toString();
if(!packageName.matches(".*shared.proxy")){
continue;
}
fqClassName = classElement.getQualifiedName().toString();
className = classElement.getSimpleName().toString();
modelName = className.replaceFirst("Proxy", "");
packageResultProxy = packageName.replaceFirst("proxy", "resultproxy");
packageResultBean = packageResultProxy.replaceFirst("shared.resultproxy", "server.resultbean");
if (fqClassName != null) {
Properties props = new Properties();
URL url = this.getClass().getClassLoader().getResource("velocity.properties");
try {
props.load(url.openStream());
} catch (IOException e1) {
e1.printStackTrace();
}
VelocityEngine ve = new VelocityEngine(props);
ve.init();
VelocityContext vc = new VelocityContext();
vc.put("className", className);
vc.put("packageResultProxy", packageResultProxy);
vc.put("fqClassName", fqClassName);
vc.put("modelName", modelName);
vc.put("packageResultBean", packageResultBean);
Template vt = ve.getTemplate("resultproxypaging.vm");
JavaFileObject jfo = null;
try {
jfo = filer.createSourceFile(packageResultProxy+"." + modelName+"PagingLoadResultProxy");
} catch (IOException e1) {
e1.printStackTrace();
}
Writer writer = null;
try {
writer = jfo.openWriter();
} catch (IOException e1) {
e1.printStackTrace();
}
vt.merge(vc, writer);
try {
writer.close();
} catch (IOException e1) {
e1.printStackTrace();
}
}
}
}
return false;
}
@Override
public SourceVersion getSupportedSourceVersion() {
return SourceVersion.latest();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
e02b28f908f1cba03ae08f4c5fcb54c7f1b8fcdf
|
2a80c8f3004960d07f3461ab7f32072095fd3a67
|
/src/main/java/com/tencentcloudapi/vod/v20180717/models/HighlightSegmentItem.java
|
25635a0127f6a69e88f981197a06c8bdc234c016
|
[
"Apache-2.0"
] |
permissive
|
kennyshittu/tencentcloud-sdk-java-intl-en
|
495a6e9cf3936406a0d95974aee666ded6632118
|
2ed6e287c3f451e3709791a3c7ac4b5316205670
|
refs/heads/master
| 2022-04-15T06:59:48.967043
| 2020-04-02T14:13:10
| 2020-04-02T14:13:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,892
|
java
|
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.tencentcloudapi.vod.v20180717.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class HighlightSegmentItem extends AbstractModel{
/**
* Confidence.
*/
@SerializedName("Confidence")
@Expose
private Float Confidence;
/**
* Start time offset of a segment.
*/
@SerializedName("StartTimeOffset")
@Expose
private Float StartTimeOffset;
/**
* End time offset of a segment.
*/
@SerializedName("EndTimeOffset")
@Expose
private Float EndTimeOffset;
/**
* Get Confidence.
* @return Confidence Confidence.
*/
public Float getConfidence() {
return this.Confidence;
}
/**
* Set Confidence.
* @param Confidence Confidence.
*/
public void setConfidence(Float Confidence) {
this.Confidence = Confidence;
}
/**
* Get Start time offset of a segment.
* @return StartTimeOffset Start time offset of a segment.
*/
public Float getStartTimeOffset() {
return this.StartTimeOffset;
}
/**
* Set Start time offset of a segment.
* @param StartTimeOffset Start time offset of a segment.
*/
public void setStartTimeOffset(Float StartTimeOffset) {
this.StartTimeOffset = StartTimeOffset;
}
/**
* Get End time offset of a segment.
* @return EndTimeOffset End time offset of a segment.
*/
public Float getEndTimeOffset() {
return this.EndTimeOffset;
}
/**
* Set End time offset of a segment.
* @param EndTimeOffset End time offset of a segment.
*/
public void setEndTimeOffset(Float EndTimeOffset) {
this.EndTimeOffset = EndTimeOffset;
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "Confidence", this.Confidence);
this.setParamSimple(map, prefix + "StartTimeOffset", this.StartTimeOffset);
this.setParamSimple(map, prefix + "EndTimeOffset", this.EndTimeOffset);
}
}
|
[
"hapsyou@foxmail.com"
] |
hapsyou@foxmail.com
|
cbaaa895ca5b74ca93ecdadf8fdd398f2cfe8fe7
|
6b3040734f41809e284655a7dd8746f95050df40
|
/src/main/java/redo/Util/Integers.java
|
81ce1cf10e9da390746b05294d594d6e53ce25cd
|
[] |
no_license
|
yu132/leetcode-solution
|
a451e30f6e34eab93de39f7bb6d1fd135ffd154d
|
6a659a4d773f58c2efd585a0b7140ace5f5ea10a
|
refs/heads/master
| 2023-01-28T08:14:03.817652
| 2023-01-14T16:26:59
| 2023-01-14T16:26:59
| 185,592,914
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,772
|
java
|
package redo.Util;
import org.junit.Assert;
import org.junit.Test;
import redo.Util.listAndArr.IntLists;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* @author 余定邦
* @ClassName: Integers
* @Description: TODO(这里用一句话描述这个类的作用)
* @date 2020年12月29日
* @see IntLists
*/
public class Integers {
int intCompare(String a, String b) {
if (a.length() != b.length()) {
return Integer.compare(a.length(), b.length());
}
for (int i = 0; i < a.length(); ++i) {
if (a.charAt(i) != b.charAt(i)) {
return Integer.compare(a.charAt(i), b.charAt(i));
}
}
return 0;
}
/**
* 查找一个数组中最小的数和最大的数, 数组中需要至少有一个数,否则报错
*/
public int[] findMinAndMax(int... nums) {
int max = nums[0], min = nums[0];
for (int num : nums) {
if (num < min) {
min = num;
} else if (num > max) {
max = num;
}
}
return new int[]{min, max};
}
public int min(int... nums) {
int min = nums[0];
for (int i = 1; i < nums.length; ++i) {
min = Math.min(min, nums[i]);
}
return min;
}
public int max(int... nums) {
int max = nums[0];
for (int i = 1; i < nums.length; ++i) {
max = Math.max(max, nums[i]);
}
return max;
}
Integer[] toDigits(int num) {
List<Integer> list = new ArrayList<>();
while (num != 0) {
list.add(num % 10);
num /= 10;
}
Collections.reverse(list);
if (list.isEmpty()) {
list.add(0);
}
return list.toArray(new Integer[0]);
}
int fromDigits(int[] digits) {
int num = 0;
for (int i = 0; i < digits.length; ++i) {
num = num * 10 + digits[i];
}
return num;
}
// 数字的位数
public static int len(int num) {
if (num == 0) {
return 1;
}
int digits = 0;
while (num != 0) {
++digits;
num /= 10;
}
return digits;
}
public static boolean isPalindrome(int num) {
return reverse(num) == num;
}
public static int reverse(int num) {
int rev = 0;
while (num != 0) {
rev = rev * 10 + num % 10;
num /= 10;
}
return rev;
}
// 计算每位上0-9的总个数
public static int[] digitsCount(int num) {
int[] count = new int[10];
if (num == 0) {
++count[0];
return count;
}
while (num != 0) {
++count[num % 10];
num /= 10;
}
return count;
}
// 按位求和
public static int digitsSum(int num) {
int sum = 0;
while (num != 0) {
sum += num % 10;
num /= 10;
}
return sum;
}
final static int[] UTILS = {1, 10, 100, 1000, 10000, 100000, 1000000,
10000000, 100000000, 1000000000};
// 交换十进制int值的两位,0从低位开始计算,即从右往左数
static int swap(int num, int x, int y) {
return num + (num / UTILS[x]) % 10 * (UTILS[y] - UTILS[x])
+ (num / UTILS[y]) % 10 * (UTILS[x] - UTILS[y]);
}
public boolean isInteger(double num, double bias) {
return Math.abs(num - (int) num) < bias;
}
@Test
public void testSwap() {
Assert.assertEquals(123, swap(321, 0, 2));
Assert.assertEquals(645643563, swap(665643543, 1, 7));
}
}
|
[
"876633022@qq.com"
] |
876633022@qq.com
|
1111349000325c9ba4d14f9a9332aa5871c3f48e
|
013056e44ecf131f5ff76f5280e05c95d443303a
|
/IDE Files/Phase2/src/main/controllers/SHPController/org/org/encog/neural/freeform/FreeformConnection.java
|
f766f9ff091bb170466f56a704b0b7d3f2d752fe
|
[] |
no_license
|
neguskay/CS5099-Dissertation
|
f1921b15d370e056a7d6d8e6aee26ef8224ed390
|
561d48318c720e3963775953bd67c75cb9ccd002
|
refs/heads/master
| 2020-04-10T09:46:32.247792
| 2018-12-08T15:20:47
| 2018-12-08T15:20:47
| 160,946,902
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,907
|
java
|
/*
* Encog(tm) Core v3.4 - Java Version
* http://www.heatonresearch.com/encog/
* https://github.com/encog/encog-java-core
* Copyright 2008-2016 Heaton Research, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* For more information on Heaton Research copyrights, licenses
* and trademarks visit:
* http://www.heatonresearch.com/copyright
*/
package org.encog.neural.freeform;
/**
* Defines a freeform connection between neurons.
*
*/
public interface FreeformConnection extends TempTrainingData {
/**
* Add to the connection weight.
* @param delta THe value to add.
*/
void addWeight(double delta);
/**
* @return The source neuron.
*/
FreeformNeuron getSource();
/**
* @return The target neuron.
*/
FreeformNeuron getTarget();
/**
* @return The weight.
*/
double getWeight();
/**
* @return Is this a recurrent connection?
*/
boolean isRecurrent();
/**
* Determine if this is a recurrent connecton.
* @param recurrent True, if this is a recurrent connection.
*/
void setRecurrent(boolean recurrent);
/**
* Set the source neuron.
* @param source The source neuron.
*/
void setSource(FreeformNeuron source);
/**
* Set the target neuron.
* @param target The target neuron.
*/
void setTarget(FreeformNeuron target);
/**
* Set the weight.
* @param weight The weight.
*/
void setWeight(double weight);
}
|
[
"neguskay93@gmail.com"
] |
neguskay93@gmail.com
|
aea6fcab7d0cd7a14b57c9f3bac9ac710c41c03d
|
afeac07183756e495615c9c412c3a535d47d211c
|
/norconex-collector-http/src/main/java/com/norconex/collector/http/handler/impl/DefaultRobotsTxtProvider.java
|
90bf79c783728b2e387403fe088c750929c58172
|
[] |
no_license
|
martinfou/collector-http
|
a1ebfa9bb4008ea69296b3dbc928fa5222731852
|
46cf51b86408ae9732d33ee4726f87fd684d6a2e
|
refs/heads/master
| 2021-01-18T03:08:24.778640
| 2014-01-11T08:19:45
| 2014-01-11T08:19:45
| 16,699,207
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,945
|
java
|
/* Copyright 2010-2013 Norconex Inc.
*
* This file is part of Norconex HTTP Collector.
*
* Norconex HTTP Collector 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.
*
* Norconex HTTP Collector 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 Norconex HTTP Collector. If not,
* see <http://www.gnu.org/licenses/>.
*/
package com.norconex.collector.http.handler.impl;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import com.norconex.collector.http.robot.RobotsTxt;
/**
* @deprecated use
* {@link com.norconex.collector.http.robot.impl.DefaultRobotsTxtProvider}
*/
@Deprecated
public class DefaultRobotsTxtProvider extends
com.norconex.collector.http.robot.impl.DefaultRobotsTxtProvider {
private static final long serialVersionUID = 3442108651289646704L;
private static final Logger LOG = LogManager.getLogger(
DefaultRobotsTxtProvider.class);
@Override
public synchronized RobotsTxt getRobotsTxt(
DefaultHttpClient httpClient, String url) {
LOG.warn("DEPRECATED: use "
+ "com.norconex.collector.http.robot.impl."
+ "DefaultRobotsTxtProvider "
+ "instead of "
+ "com.norconex.collector.http.handler.impl."
+ "DefaultRobotsTxtProvider");
return super.getRobotsTxt(httpClient, url);
}
}
|
[
"pascal.essiembre@norconex.com"
] |
pascal.essiembre@norconex.com
|
2d634aa3a9fa2ea4a8282c8859e2150b857cc2a5
|
1930d97ebfc352f45b8c25ef715af406783aabe2
|
/src/main/java/com/alipay/api/domain/InteligentUseTime.java
|
e7e3f3168f3fdb1f73cad6ba916fcf87d9afb6d0
|
[
"Apache-2.0"
] |
permissive
|
WQmmm/alipay-sdk-java-all
|
57974d199ee83518523e8d354dcdec0a9ce40a0c
|
66af9219e5ca802cff963ab86b99aadc59cc09dd
|
refs/heads/master
| 2023-06-28T03:54:17.577332
| 2021-08-02T10:05:10
| 2021-08-02T10:05:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,373
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 智能营销券可用时间
*
* @author auto create
* @since 1.0, 2018-01-22 16:28:47
*/
public class InteligentUseTime extends AlipayObject {
private static final long serialVersionUID = 1692791442426591922L;
/**
* 券可用时段时间维度,目前支持周(W)
*/
@ApiField("dimension")
private String dimension;
/**
* 券可用时间段
可用时间段起止时间用逗号分隔,多个时间段之间用^分隔
如, "16:00:00,20:00:00^21:00:00,22:00:00"表示16点至20点,21点至22点可用
时间段不可重叠
*/
@ApiField("times")
private String times;
/**
* 券可用时间维度值
周维度的取值范围1-7(周一至周日),多个可用时段用逗号分隔
如"1,3,5",对应周一,周三,周五可用
*/
@ApiField("values")
private String values;
public String getDimension() {
return this.dimension;
}
public void setDimension(String dimension) {
this.dimension = dimension;
}
public String getTimes() {
return this.times;
}
public void setTimes(String times) {
this.times = times;
}
public String getValues() {
return this.values;
}
public void setValues(String values) {
this.values = values;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
5c77712ada4480879cbe09cff3cd2fcd523810ec
|
55cd9819273b2a0677c3660b2943951b61c9e52e
|
/gtl/src/main/java/com/basics/sys/entity/SysTurntable.java
|
c5e3b94942d5ab1bf278148415ee3a76f27d39d4
|
[] |
no_license
|
h879426654/mnc
|
0fb61dff189404f47e7ee1fb6cb89f0c1e2f006f
|
9e1c33efc90b9f23c47069606ee2b0b0073cc7e3
|
refs/heads/master
| 2022-12-27T05:26:22.276805
| 2019-10-21T05:16:14
| 2019-10-21T05:16:14
| 210,249,616
| 0
| 0
| null | 2022-12-16T10:37:07
| 2019-09-23T02:36:55
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,527
|
java
|
package com.basics.sys.entity;
import java.math.BigDecimal;
import java.util.Date;
public class SysTurntable extends SysTurntableBase{
/**
* ID
*/
public SysTurntable id(String id){
this.setId(id);
return this;
}
/**
* 奖励类型(1余额 2积分 3链)
*/
public SysTurntable rewardType(Integer rewardType){
this.setRewardType(rewardType);
return this;
}
/**
* 奖励数目
*/
public SysTurntable rewardNum(Integer rewardNum){
this.setRewardNum(rewardNum);
return this;
}
/**
* 中奖比例
*/
public SysTurntable rewardRate(BigDecimal rewardRate){
this.setRewardRate(rewardRate);
return this;
}
/**
* 排序
*/
public SysTurntable rewardSort(Integer rewardSort){
this.setRewardSort(rewardSort);
return this;
}
/**
* 版本号
*/
public SysTurntable versionNum(Integer versionNum){
this.setVersionNum(versionNum);
return this;
}
/**
* 是否删除(1是 0否)
*/
public SysTurntable flagDel(Integer flagDel){
this.setFlagDel(flagDel);
return this;
}
/**
* 创建时间
*/
public SysTurntable createTime(Date createTime){
this.setCreateTime(createTime);
return this;
}
/**
* 创建人
*/
public SysTurntable createUser(String createUser){
this.setCreateUser(createUser);
return this;
}
/**
* 修改人
*/
public SysTurntable modifyUser(String modifyUser){
this.setModifyUser(modifyUser);
return this;
}
/**
* 修改时间
*/
public SysTurntable modifyTime(Date modifyTime){
this.setModifyTime(modifyTime);
return this;
}
}
|
[
"879426654@qq.com"
] |
879426654@qq.com
|
b61458d89d068975d594dfa4c17ae9be9c1833b2
|
b1ce8d55e564ba85fd6830b28ce5efd2d88bef2e
|
/FitnessTracker/src/main/java/com/skilldistillery/fitness/services/MyTrackerServiceImpl.java
|
0ad16d1b7ea163859c926eec516b510ab095cbb4
|
[] |
no_license
|
stoprefresh/EventTrackerProject
|
dfcd34526bdb73cbadd2bd20a65e27dc080be001
|
69226149e8954cebebbe34b4dae5658e1c597d24
|
refs/heads/master
| 2020-06-28T17:50:42.624658
| 2019-08-06T22:55:08
| 2019-08-06T22:55:08
| 200,301,289
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,761
|
java
|
package com.skilldistillery.fitness.services;
import java.util.List;
import java.util.Optional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.skilldistillery.fitness.entities.MyTracker;
import com.skilldistillery.fitness.repositories.MyTrackerRepository;
@Service
public class MyTrackerServiceImpl implements MyTrackerService {
@Autowired
private MyTrackerRepository repo;
@Override
public List<MyTracker> allEntries() {
return repo.findAll();
}
@Override
public MyTracker entryById(int eid) {
Optional<MyTracker> entry = repo.findById(eid);
if (entry.isPresent()) {
return entry.get();
}
return null;
}
@Override
public List<MyTracker> entriesByKeyword(String keyword) {
keyword = "%" + keyword + "%";
return repo.findByCommentLikeOrWorkoutTypesLike(keyword, keyword);
}
@Override
public MyTracker create(MyTracker newEntry) {
return repo.saveAndFlush(newEntry);
}
@Override
public MyTracker update(int eid, MyTracker updatedEntry) {
Optional<MyTracker> opt = repo.findById(eid);
MyTracker managedEntry = null;
if(opt.isPresent()) {
managedEntry = opt.get();
managedEntry.setDateStart(updatedEntry.getDateStart());
managedEntry.setDateEnd(updatedEntry.getDateEnd());
managedEntry.setComment(updatedEntry.getComment());
managedEntry.setLocation(updatedEntry.getLocation());
managedEntry.setWorkoutTypes(updatedEntry.getWorkoutTypes());
repo.saveAndFlush(managedEntry);
}
return managedEntry;
}
@Override
public Boolean delete(int eid) {
Boolean deleted = false;
try {
repo.deleteById(eid);
deleted = true;
}
catch(Exception e) {
e.printStackTrace();
}
return deleted;
}
}
|
[
"marsigliamiguel@protonmail.com"
] |
marsigliamiguel@protonmail.com
|
c15462687b2f6ba0b6f92008a5ad31f34a6650ce
|
ecfb858bfb8d5577f86e684cadbee00ec21a06dc
|
/Backend/grpc/src/main/java/com/poppo/grpc/client/sum/SumClient.java
|
25ed96d62c957b7bca54eb9dc65076579d8b61b1
|
[] |
no_license
|
ccf05017/til
|
ce3c5ae97bfda11482db78883f0002c3fd0c96f8
|
09bb2868f20b3942ce2a7148679f999bbf11dc8d
|
refs/heads/master
| 2023-01-12T03:57:51.787747
| 2021-05-31T23:04:25
| 2021-05-31T23:04:25
| 222,437,687
| 0
| 1
| null | 2023-01-07T19:57:46
| 2019-11-18T11:53:39
|
Java
|
UTF-8
|
Java
| false
| false
| 890
|
java
|
package com.poppo.grpc.client.sum;
import com.proto.sum.Params;
import com.proto.sum.SumRequest;
import com.proto.sum.SumResponse;
import com.proto.sum.SumServiceGrpc;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
public class SumClient {
public static void main(String[] args) {
ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", 50080)
.usePlaintext()
.build();
SumServiceGrpc.SumServiceBlockingStub sumBlockingClient = SumServiceGrpc.newBlockingStub(channel);
Params sumParams = Params.newBuilder().setFirstParam(1).setSecondParam(1).build();
SumRequest sumRequest = SumRequest.newBuilder().setParams(sumParams).build();
SumResponse sumResponse = sumBlockingClient.sum(sumRequest);
System.out.println(sumResponse);
channel.shutdown();
}
}
|
[
"saul@BcTech-Saului-MacBookPro.local"
] |
saul@BcTech-Saului-MacBookPro.local
|
e0b7c28d14a596450a91adf859e92af74d580b2d
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2008-10-29/seasar2-2.4.31/seasar2/s2-framework/src/main/java/org/seasar/framework/aop/interceptors/ThrowsInterceptor.java
|
825050f6009319730c83cc1a99262a4a0fe65cf4
|
[
"Apache-2.0"
] |
permissive
|
svn2github/s2container
|
54ca27cf0c1200a93e1cb88884eb8226a9be677d
|
625adc6c4e1396654a7297d00ec206c077a78696
|
refs/heads/master
| 2020-06-04T17:15:02.140847
| 2013-08-09T09:38:15
| 2013-08-09T09:38:15
| 10,850,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,647
|
java
|
/*
* Copyright 2004-2008 the Seasar Foundation and the Others.
*
* 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.seasar.framework.aop.interceptors;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.seasar.framework.beans.MethodNotFoundRuntimeException;
import org.seasar.framework.util.MethodUtil;
/**
* 例外処理用の{@link MethodInterceptor}です。
*
* @author higa
*
*/
public abstract class ThrowsInterceptor extends AbstractInterceptor {
private static final long serialVersionUID = 1L;
/**
* {@link ThrowsInterceptor}の実装クラスが実装しなければいけないメソッド名です。
*/
public static final String METHOD_NAME = "handleThrowable";
private Map methodMap = new HashMap();
/**
* {@link ThrowsInterceptor}を作成します。
*/
public ThrowsInterceptor() {
Method[] methods = getClass().getMethods();
for (int i = 0; i < methods.length; ++i) {
Method m = methods[i];
if (MethodUtil.isBridgeMethod(m) || MethodUtil.isSyntheticMethod(m)) {
continue;
}
if (isHandleThrowable(m)) {
methodMap.put(m.getParameterTypes()[0], m);
}
}
if (methodMap.size() == 0) {
throw new MethodNotFoundRuntimeException(getClass(), METHOD_NAME,
new Class[] { Throwable.class, MethodInvocation.class });
}
}
private boolean isHandleThrowable(Method method) {
return METHOD_NAME.equals(method.getName())
&& method.getParameterTypes().length == 2
&& Throwable.class
.isAssignableFrom(method.getParameterTypes()[0])
&& MethodInvocation.class.isAssignableFrom(method
.getParameterTypes()[1]);
}
/**
* @see org.aopalliance.intercept.MethodInterceptor#invoke(org.aopalliance.intercept.MethodInvocation)
*/
public Object invoke(MethodInvocation invocation) throws Throwable {
try {
return invocation.proceed();
} catch (Throwable t) {
Method method = getMethod(t);
if (method != null) {
try {
return method.invoke(this, new Object[] { t, invocation });
} catch (InvocationTargetException ite) {
throw ite.getTargetException();
}
}
throw t;
}
}
private Method getMethod(Throwable t) {
Class clazz = t.getClass();
Method method = (Method) methodMap.get(clazz);
while (method == null && !clazz.equals(Throwable.class)) {
clazz = clazz.getSuperclass();
method = (Method) methodMap.get(clazz);
}
return method;
}
}
|
[
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] |
koichik@319488c0-e101-0410-93bc-b5e51f62721a
|
0f537d95160ad812488e653860d2df3cab6d2905
|
369270a14e669687b5b506b35895ef385dad11ab
|
/java.corba/com/sun/tools/corba/se/idl/ConstEntry.java
|
dccc150686c7cc21815539b426968fcb624f0a86
|
[] |
no_license
|
zcc888/Java9Source
|
39254262bd6751203c2002d9fc020da533f78731
|
7776908d8053678b0b987101a50d68995c65b431
|
refs/heads/master
| 2021-09-10T05:49:56.469417
| 2018-03-20T06:26:03
| 2018-03-20T06:26:03
| 125,970,208
| 3
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,245
|
java
|
/*
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
/*
* COMPONENT_NAME: idl.parser
*
* ORIGINS: 27
*
* Licensed Materials - Property of IBM
* 5639-D57 (C) COPYRIGHT International Business Machines Corp. 1997, 1999
* RMI-IIOP v1.0
*
*/
package com.sun.tools.corba.se.idl;
// NOTES:
import java.io.PrintWriter;
import java.util.Hashtable;
import com.sun.tools.corba.se.idl.constExpr.Expression;
/**
* This is the symbol table entry for constants.
**/
public class ConstEntry extends SymtabEntry
{
protected ConstEntry ()
{
super ();
} // ctor
protected ConstEntry (ConstEntry that)
{
super (that);
if (module ().equals (""))
module (name ());
else if (!name ().equals (""))
module (module () + "/" + name ());
_value = that._value;
} // ctor
/** This is a shallow copy constructor. */
protected ConstEntry (SymtabEntry that, IDLID clone)
{
super (that, clone);
if (module ().equals (""))
module (name ());
else if (!name ().equals (""))
module (module () + "/" + name ());
} // ctor
/** This is a shallow copy clone. */
public Object clone ()
{
return new ConstEntry (this);
} // clone
/** Invoke the constant generator.
@param symbolTable the symbol table is a hash table whose key is
a fully qualified type name and whose value is a SymtabEntry or
a subclass of SymtabEntry.
@param stream the stream to which the generator should sent its output.
@see SymtabEntry */
public void generate (Hashtable symbolTable, PrintWriter stream)
{
constGen.generate (symbolTable, this, stream);
} // generate
/** Access the constant generator.
@return an object which implements the ConstGen interface.
@see ConstGen */
public Generator generator ()
{
return constGen;
} // generator
public Expression value ()
{
return _value;
} // value
public void value (Expression newValue)
{
_value = newValue;
} // value
static ConstGen constGen;
private Expression _value = null;
} // class ConstEntry
|
[
"841617433@qq.com"
] |
841617433@qq.com
|
1b2797013fabad99696dc39aecb020319071f494
|
fdf0ae1822e66fe01b2ef791e04f7ca0b9a01303
|
/src/main/java/ms/html/IHTMLWindow3.java
|
6edeaf862ae8fdd369a3879ef0bba8b1c11ee2fb
|
[] |
no_license
|
wangguofeng1923/java-ie-webdriver
|
7da41509aa858fcd046630f6833d50b7c6cde756
|
d0f3cb8acf9be10220c4b85c526486aeb67b9b4f
|
refs/heads/master
| 2021-12-04T18:19:08.251841
| 2013-02-10T16:26:54
| 2013-02-10T16:26:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,429
|
java
|
package ms.html ;
import com4j.*;
@IID("{3050F4AE-98B5-11CF-BB82-00AA00BDCE0B}")
public interface IHTMLWindow3 extends Com4jObject {
// Methods:
/**
* <p>
* Getter method for the COM property "screenLeft"
* </p>
* @return Returns a value of type int
*/
@DISPID(1170) //= 0x492. The runtime will prefer the VTID if present
@VTID(7)
int screenLeft();
/**
* <p>
* Getter method for the COM property "screenTop"
* </p>
* @return Returns a value of type int
*/
@DISPID(1171) //= 0x493. The runtime will prefer the VTID if present
@VTID(8)
int screenTop();
/**
* @param event Mandatory java.lang.String parameter.
* @param pdisp Mandatory com4j.Com4jObject parameter.
* @return Returns a value of type boolean
*/
@DISPID(-2147417605) //= 0x800101fb. The runtime will prefer the VTID if present
@VTID(9)
boolean attachEvent(
java.lang.String event,
@MarshalAs(NativeType.Dispatch) com4j.Com4jObject pdisp);
/**
* @param event Mandatory java.lang.String parameter.
* @param pdisp Mandatory com4j.Com4jObject parameter.
*/
@DISPID(-2147417604) //= 0x800101fc. The runtime will prefer the VTID if present
@VTID(10)
void detachEvent(
java.lang.String event,
@MarshalAs(NativeType.Dispatch) com4j.Com4jObject pdisp);
/**
* @param expression Mandatory java.lang.Object parameter.
* @param msec Mandatory int parameter.
* @param language Optional parameter. Default value is com4j.Variant.getMissing()
* @return Returns a value of type int
*/
@DISPID(1103) //= 0x44f. The runtime will prefer the VTID if present
@VTID(11)
int setTimeout(
java.lang.Object expression,
int msec,
@Optional java.lang.Object language);
/**
* @param expression Mandatory java.lang.Object parameter.
* @param msec Mandatory int parameter.
* @param language Optional parameter. Default value is com4j.Variant.getMissing()
* @return Returns a value of type int
*/
@DISPID(1162) //= 0x48a. The runtime will prefer the VTID if present
@VTID(12)
int setInterval(
java.lang.Object expression,
int msec,
@Optional java.lang.Object language);
/**
*/
@DISPID(1174) //= 0x496. The runtime will prefer the VTID if present
@VTID(13)
void print();
/**
* <p>
* Setter method for the COM property "onbeforeprint"
* </p>
* @param p Mandatory java.lang.Object parameter.
*/
@DISPID(-2147412046) //= 0x800117b2. The runtime will prefer the VTID if present
@VTID(14)
void onbeforeprint(
@MarshalAs(NativeType.VARIANT) java.lang.Object p);
/**
* <p>
* Getter method for the COM property "onbeforeprint"
* </p>
* @return Returns a value of type java.lang.Object
*/
@DISPID(-2147412046) //= 0x800117b2. The runtime will prefer the VTID if present
@VTID(15)
@ReturnValue(type=NativeType.VARIANT)
java.lang.Object onbeforeprint();
/**
* <p>
* Setter method for the COM property "onafterprint"
* </p>
* @param p Mandatory java.lang.Object parameter.
*/
@DISPID(-2147412045) //= 0x800117b3. The runtime will prefer the VTID if present
@VTID(16)
void onafterprint(
@MarshalAs(NativeType.VARIANT) java.lang.Object p);
/**
* <p>
* Getter method for the COM property "onafterprint"
* </p>
* @return Returns a value of type java.lang.Object
*/
@DISPID(-2147412045) //= 0x800117b3. The runtime will prefer the VTID if present
@VTID(17)
@ReturnValue(type=NativeType.VARIANT)
java.lang.Object onafterprint();
/**
* <p>
* Getter method for the COM property "clipboardData"
* </p>
* @return Returns a value of type ms.html.IHTMLDataTransfer
*/
@DISPID(1175) //= 0x497. The runtime will prefer the VTID if present
@VTID(18)
ms.html.IHTMLDataTransfer clipboardData();
/**
* @param url Optional parameter. Default value is ""
* @param varArgIn Optional parameter. Default value is com4j.Variant.getMissing()
* @param options Optional parameter. Default value is com4j.Variant.getMissing()
* @return Returns a value of type ms.html.IHTMLWindow2
*/
@DISPID(1176) //= 0x498. The runtime will prefer the VTID if present
@VTID(19)
ms.html.IHTMLWindow2 showModelessDialog(
@Optional @DefaultValue("") java.lang.String url,
@Optional java.lang.Object varArgIn,
@Optional java.lang.Object options);
// Properties:
}
|
[
"schneidh@gmail.com"
] |
schneidh@gmail.com
|
6c7ae360fcbf1abc0641f591a938bab589600228
|
fecc94abb0bc1d1cdfcdeb48a031c24483969b80
|
/src/_559N叉树的最大深度/Node.java
|
b4075bee8418d452e2167b94eafcc2c2c21b4114
|
[] |
no_license
|
Iron-xin/Leetcode
|
86670c9bba8f3efa7125da0af607e9e01df9d189
|
64e359c90a90965ed131a0ab96d0063ffb2652b9
|
refs/heads/master
| 2022-12-09T04:08:53.443331
| 2020-09-02T08:48:32
| 2020-09-02T08:48:32
| 292,228,669
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 318
|
java
|
package _559N叉树的最大深度;
import java.util.List;
public class Node {
public int val;
public List<Node> children;
public Node() {}
public Node(int _val) {
val = _val;
}
public Node(int _val, List<Node> _children) {
val = _val;
children = _children;
}
}
|
[
"497731829@qq.com"
] |
497731829@qq.com
|
188154a38a9423d81409196004470adf2f81f7fd
|
947fc9eef832e937f09f04f1abd82819cd4f97d3
|
/src/apk/io/intercom/android/sdk/models/SocialAccount.java
|
4881039ba8114d9869475a4008f2208578944d51
|
[] |
no_license
|
thistehneisen/cifra
|
04f4ac1b230289f8262a0b9cf7448a1172d8f979
|
d46c6f4764c9d4f64e45c56fa42fddee9b44ff5a
|
refs/heads/master
| 2020-09-22T09:35:57.739040
| 2019-12-01T19:39:59
| 2019-12-01T19:39:59
| 225,136,583
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,428
|
java
|
package io.intercom.android.sdk.models;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import io.intercom.android.sdk.utilities.NullSafety;
public abstract class SocialAccount implements Parcelable {
public static final Creator<SocialAccount> CREATOR = new Creator<SocialAccount>() {
public SocialAccount createFromParcel(Parcel parcel) {
return SocialAccount.create(parcel.readString(), parcel.readString());
}
public SocialAccount[] newArray(int i2) {
return new SocialAccount[i2];
}
};
public static final SocialAccount NULL;
public static final class Builder {
String profile_url;
String provider;
public SocialAccount build() {
return SocialAccount.create(NullSafety.valueOrEmpty(this.provider), NullSafety.valueOrEmpty(this.profile_url));
}
}
static {
String str = "";
NULL = create(str, str);
}
public static SocialAccount create(String str, String str2) {
return new AutoValue_SocialAccount(str, str2);
}
public int describeContents() {
return 0;
}
public abstract String getProfileUrl();
public abstract String getProvider();
public void writeToParcel(Parcel parcel, int i2) {
parcel.writeString(getProvider());
parcel.writeString(getProfileUrl());
}
}
|
[
"putnins@nils.digital"
] |
putnins@nils.digital
|
2acd6c4276becd5d7c1d03bc13bc6b8fd261f32f
|
663c475938404a0058212d0df5e4edc7804229b2
|
/wechat/src/main/java/com/ford/wechat/web/vo/HandleReq.java
|
82345f8cba37699135c0281d8cc3dcc7c501b1cc
|
[] |
no_license
|
cnywb/ford-wechat
|
40373261b65d73c1cf342f79ce8320442fdecb5c
|
1f97ee21fbaa5c3c20214f3ac573f3ac0ac304e7
|
refs/heads/master
| 2020-04-08T02:26:22.047572
| 2018-11-24T13:20:31
| 2018-11-24T13:20:31
| 158,935,809
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 255
|
java
|
package com.ford.wechat.web.vo;
/**
* Created by wanglijun on 16/7/9.
*/
public class HandleReq {
/**ID*/
protected Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}
|
[
"cn_ywb@163.com"
] |
cn_ywb@163.com
|
91f1c9b691376a028f8ca8a7fdbd7472c54d5cec
|
7178e494e707ae152d4519b60c95f71b544d96eb
|
/refactoring/src/main/java/com/liujun/code/refactoring/refactoring/eight/order114/replacetypecodewithsubclasses/refactor/SalesMan.java
|
9f96b80e2a0f48439c21c60b90ffbad406a34e03
|
[] |
no_license
|
kkzfl22/learing
|
e24fce455bc8fec027c6009e9cd1becca0ca331b
|
1a1270bfc9469d23218c88bcd6af0e7aedbe41b6
|
refs/heads/master
| 2023-02-07T16:23:27.012579
| 2020-12-26T04:35:52
| 2020-12-26T04:35:52
| 297,195,805
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 263
|
java
|
package com.liujun.code.refactoring.refactoring.eight.order114.replacetypecodewithsubclasses.refactor;
/**
* @author liujun
* @version 0.0.1
*/
public class SalesMan extends Employee {
@Override
public int getType() {
return Employee.SALESMAN;
}
}
|
[
"liujun@paraview.cn"
] |
liujun@paraview.cn
|
03c830bd07680e0797ec32f88f38a7451944b81e
|
e7e933af97d9e38ef6f349f4d7bd62239b2dbece
|
/src/main/java/org/ditto/emoji/data/EmojiDataImportRunner.java
|
9034bddc183679ebb618bf3711950a3f5448c32f
|
[
"Apache-2.0"
] |
permissive
|
conanchen/hiask-cloud-emoji
|
028eb12c6c9917bb431804c7a3b7b2056f5eda7a
|
9c5e85ca4624d8a43954111e3ce5175268b427be
|
refs/heads/master
| 2021-06-27T05:32:34.479124
| 2017-09-14T09:11:36
| 2017-09-14T09:11:36
| 103,510,812
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,584
|
java
|
package org.ditto.emoji.data;
import lombok.extern.slf4j.Slf4j;
import org.apache.ignite.Ignite;
import org.ditto.emoji.model.Emoji;
import org.ditto.emoji.model.Emojigroup;
import org.ditto.emoji.repository.BreedRepository;
import org.ditto.emoji.repository.EmojiRepository;
import org.ditto.emoji.repository.EmojigroupRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 服务启动执行
*/
@Component
@Slf4j
public class EmojiDataImportRunner implements CommandLineRunner {
@Autowired
private Ignite ignite;
@Autowired
private EmojigroupRepository emojigroupRepository;
@Autowired
private EmojiRepository emojiRepository;
@Override
public void run(String... args) throws Exception {
log.info("Start EmojiDataImportRunner服务启动执行,执行Emoji数据导入");
List<Object> emojiDatas = EmojiTextConverter.processEmojiText(EmojiText.emojiLines);
for (Object emojiData : emojiDatas) {
if (emojiData instanceof Emojigroup) {
Emojigroup emojigroup = (Emojigroup) emojiData;
emojigroupRepository.save(emojigroup.id, emojigroup);
} else if (emojiData instanceof Emoji) {
Emoji emoji = (Emoji) emojiData;
emojiRepository.save(emoji.codepoint, emoji);
}
}
log.info("End EmojiDataImportRunner服务启动执行,执行Emoji数据导入");
}
}
|
[
"chenchunhai@changhongit.com"
] |
chenchunhai@changhongit.com
|
a5b4f723481aa4c016b9c3f8cdb8539b5c5d4820
|
02930533e2e0d9778f2eef401e074c166d874f19
|
/src/main/java/ru/netology/domain/Product.java
|
1f49c744bede514cad9c2b176a24e008b3e73d94
|
[] |
no_license
|
kseniiaQA/products
|
1c0a94bec30263e9dc38d1ae997315f136004869
|
c676b2251e78825bb0512bb34828e02d5308dd36
|
refs/heads/master
| 2023-06-08T17:50:50.695333
| 2021-06-30T15:05:50
| 2021-06-30T15:05:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,401
|
java
|
package ru.netology.domain;
import ru.netology.repository.ProductRepository;
import java.util.Objects;
public class Product extends ProductRepository {
private int id;
private String name;
private int price;
public Product() {
}
public Product(int id, String name, int price) {
this.id = id;
this.name = name;
this.price = price;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getPrice() {
return price;
}
public void setPrice(int price) {
this.price = price;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Product product = (Product) o;
return id == product.id &&
price == product.price &&
Objects.equals(name, product.name);
}
@Override
public int hashCode() {
return Objects.hash(id, name, price);
}
@Override
public String toString() {
return "Product{" +
"id=" + id +
", name='" + name + '\'' +
", price=" + price +
'}';
}
}
|
[
"you@example.com"
] |
you@example.com
|
dec226a937ee35f69b849d2980e7625d83a54832
|
afd5877fddda9d29c5cb5c356c8b30548cf41eff
|
/conuniframework-cloud/conuniframework-cloud-center/conuniframework-cloud-auth/src/main/java/com/github/zengfr/conuniframework/cloud/auth/config/OAuth2ServerConfiguration.java
|
abbc4d1021743a7ca79275c227453c35f90c6ca7
|
[
"Apache-2.0"
] |
permissive
|
zengfr/conuniframework-cloud
|
88cf021f4d647a3fd8e24ee39b7f1f55618d7e4e
|
72c2944644585418b0d73d0be24cc7eb497dfde1
|
refs/heads/master
| 2021-07-09T17:27:29.490619
| 2019-07-13T05:25:58
| 2020-09-23T07:20:14
| 196,300,675
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,928
|
java
|
package com.github.zengfr.conuniframework.cloud.auth.config;
import com.github.zengfr.conuniframework.cloud.auth.config.detailservice.UsernameUserDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpMethod;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.authentication.configuration.GlobalAuthenticationConfigurerAdapter;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.oauth2.config.annotation.builders.ClientDetailsServiceBuilder;
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer;
import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer;
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer;
import org.springframework.security.oauth2.provider.ClientDetailsService;
import org.springframework.security.oauth2.provider.approval.ApprovalStore;
import org.springframework.security.oauth2.provider.approval.JdbcApprovalStore;
import org.springframework.security.oauth2.provider.client.JdbcClientDetailsService;
import org.springframework.security.oauth2.provider.code.AuthorizationCodeServices;
import org.springframework.security.oauth2.provider.code.JdbcAuthorizationCodeServices;
import org.springframework.security.oauth2.provider.token.*;
import org.springframework.security.oauth2.provider.token.store.JdbcTokenStore;
import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
import org.springframework.security.oauth2.provider.token.store.JwtTokenStore;
import javax.sql.DataSource;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
@Configuration
@EnableAuthorizationServer
public class OAuth2ServerConfiguration extends AuthorizationServerConfigurerAdapter {
@Autowired private DataSource dataSource;
@Autowired private PasswordEncoder passwordEncoder;
@Autowired private AuthenticationManager authenticationManager;
@Autowired private UsernameUserDetailService usernameUserDetailService;
@Bean
public JwtTokenStore tokenStore() {
return new JwtTokenStore(jwtAccessTokenConverter());
}
@Bean
public ApprovalStore approvalStore() {
return new JdbcApprovalStore(dataSource);
}
@Bean
protected AuthorizationCodeServices authorizationCodeServices() {
return new JdbcAuthorizationCodeServices(dataSource);
}
/* @Bean
public UserAuthenticationConverter userAuthenticationConverter() {
DefaultUserAuthenticationConverter defaultUserAuthenticationConverter = new DefaultUserAuthenticationConverter();
defaultUserAuthenticationConverter.setUserDetailsService(usernameUserDetailService);
return defaultUserAuthenticationConverter;
}*/
@Bean
public JwtAccessTokenConverter jwtAccessTokenConverter() {
JwtAccessTokenConverter accessTokenConverter = new JwtAccessTokenConverter();
accessTokenConverter.setSigningKey("dev1");
accessTokenConverter.setVerifierKey("dev1");
return accessTokenConverter;
}
@Bean
public TokenEnhancer tokenEnhancer() {
return new CustomTokenEnhancer();
}
@Bean
public ClientDetailsService clientDetails() {
JdbcClientDetailsService s = new JdbcClientDetailsService(dataSource);
s.setPasswordEncoder(passwordEncoder);
return s;
}
@Override
public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
endpoints.approvalStore(approvalStore());
endpoints.authorizationCodeServices(authorizationCodeServices());
endpoints.setClientDetailsService(clientDetails());
TokenEnhancerChain enhancerChain = new TokenEnhancerChain();
List<TokenEnhancer> enhancerList = new ArrayList<>();
enhancerList.add(tokenEnhancer());
enhancerList.add(jwtAccessTokenConverter());
enhancerChain.setTokenEnhancers(enhancerList);
endpoints
.tokenStore(tokenStore())
.allowedTokenEndpointRequestMethods(HttpMethod.GET, HttpMethod.POST)
.authenticationManager(authenticationManager)
.userDetailsService(usernameUserDetailService)
.tokenEnhancer(enhancerChain);
DefaultTokenServices tokenServices = new DefaultTokenServices();
tokenServices.setTokenStore(endpoints.getTokenStore());
tokenServices.setSupportRefreshToken(true);
tokenServices.setClientDetailsService(endpoints.getClientDetailsService());
tokenServices.setTokenEnhancer(endpoints.getTokenEnhancer());
tokenServices.setAccessTokenValiditySeconds((int) TimeUnit.DAYS.toSeconds(30)); // 30天
endpoints.tokenServices(tokenServices);
}
@Override
public void configure(AuthorizationServerSecurityConfigurer security) throws Exception {
security
.passwordEncoder(passwordEncoder)
.tokenKeyAccess("permitAll()")
.checkTokenAccess("isAuthenticated()")
.allowFormAuthenticationForClients();
}
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
String finalSecret = passwordEncoder.encode("12345678");
ClientDetailsServiceBuilder builder = clients.inMemory();
boolean add = true;
build(builder, passwordEncoder, "authServer", add);
build(builder, passwordEncoder, "client1", add);
build(builder, passwordEncoder, "client2", add);
build(builder, passwordEncoder, "client3", add);
build(builder, passwordEncoder, "client4", add);
build(builder, passwordEncoder, "client5", add);
clients.jdbc(dataSource).passwordEncoder(passwordEncoder);
}
private static ClientDetailsServiceBuilder build(
ClientDetailsServiceBuilder builder,
PasswordEncoder passwordEncoder,
String clientId,
boolean add) {
if (add) {
String finalSecret = passwordEncoder.encode("12345678");
return builder
.withClient(clientId)
.authorizedGrantTypes(
"authorization_code", "client_credentials", "password", "refresh_token")
.scopes("r", "d", "c", "u", "all")
.secret(finalSecret)
.accessTokenValiditySeconds(36000)
.autoApprove("all")
.redirectUris("http://localhost:8080/login")
.and();
}
return builder;
}
}
|
[
"zengfrcomputer2@git.com"
] |
zengfrcomputer2@git.com
|
443801dcee9d69313d22a1e01b27f11d78d61c8f
|
7bc365d7f3b8a3f8dc15bdfae1e4cca6669c1760
|
/src/exams/_2017_04_19_RecyclingStation/app/waste_disposal/DefaultGarbageProcessor.java
|
0246ce5e82f02a3b743846c5af2482f67deb73cc
|
[] |
no_license
|
nataliya-stoichevska/JavaFundamentals_JavaOOPAdvanced
|
72536ea5de7ea950c0fe3e027bf18c3a75f1d40c
|
6de00af47e666d4d49933d7499073519e15155f5
|
refs/heads/master
| 2022-01-28T03:59:06.988945
| 2018-09-04T08:14:25
| 2018-09-04T08:14:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,961
|
java
|
package exams._2017_04_19_RecyclingStation.app.waste_disposal;
import exams._2017_04_19_RecyclingStation.app.waste_disposal.annotations.Disposable;
import exams._2017_04_19_RecyclingStation.app.waste_disposal.contracts.*;
import java.lang.annotation.Annotation;
public class DefaultGarbageProcessor implements GarbageProcessor {
private StrategyHolder strategyHolder;
public DefaultGarbageProcessor(StrategyHolder strategyHolder) {
this.setStrategyHolder(strategyHolder);
}
public DefaultGarbageProcessor() {
this(new DefaultStrategyHolder());
}
private void setStrategyHolder(StrategyHolder strategyHolder) {
if(strategyHolder == null){
throw new IllegalArgumentException();
}
this.strategyHolder = strategyHolder;
}
@Override
public StrategyHolder getStrategyHolder() {
return this.strategyHolder;
}
@Override
public ProcessingData processWaste(Waste garbage) {
Class type = garbage.getClass();
Annotation[] garbageAnnotations = type.getAnnotations();
Class disposableAnnotation = null;
for (Annotation annotation : garbageAnnotations) {
if (annotation.annotationType().isAnnotationPresent(Disposable.class)) {
disposableAnnotation = annotation.annotationType();
break;
}
}
GarbageDisposalStrategy currentStrategy;
if (disposableAnnotation == null || !this.getStrategyHolder().getDisposalStrategies().containsKey(disposableAnnotation)) {
throw new IllegalArgumentException(
"The passed in garbage does not implement an annotation implementing the Disposable meta-annotation or is not supported by the StrategyHolder.");
}
currentStrategy = this.getStrategyHolder().getDisposalStrategies().get(disposableAnnotation);
return currentStrategy.processGarbage(garbage);
}
}
|
[
"stojcevskanatalija8@gmail.com"
] |
stojcevskanatalija8@gmail.com
|
7896052285b15d4fc53d647d5cfb1e8d88b24817
|
984777738469dfa2ce3e1b9dfb2872b594aba444
|
/GridBuilderLib/build/generated/source/r/debug/android/support/v7/gridlayout/R.java
|
9b5014bf06eb0f6bfe0069340e70a0b3a83d2da5
|
[
"Apache-2.0"
] |
permissive
|
Royalone94/GridBuilder
|
20ba533f91f8d45dd5a3f09d295b0fd6761cc6de
|
9b32cf08393d592e6307b5dd22e9f1cc5948a443
|
refs/heads/master
| 2021-08-17T10:08:16.265501
| 2017-11-21T03:26:30
| 2017-11-21T03:26:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,872
|
java
|
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* gradle plugin from the resource data it found. It
* should not be modified by hand.
*/
package android.support.v7.gridlayout;
public final class R {
public static final class attr {
public static int alignmentMode = 0x7f010004;
public static int columnCount = 0x7f010002;
public static int columnOrderPreserved = 0x7f010006;
public static int layout_column = 0x7f01000a;
public static int layout_columnSpan = 0x7f01000b;
public static int layout_columnWeight = 0x7f01000c;
public static int layout_gravity = 0x7f01000d;
public static int layout_row = 0x7f010007;
public static int layout_rowSpan = 0x7f010008;
public static int layout_rowWeight = 0x7f010009;
public static int orientation = 0x7f010000;
public static int rowCount = 0x7f010001;
public static int rowOrderPreserved = 0x7f010005;
public static int useDefaultMargins = 0x7f010003;
}
public static final class dimen {
public static int default_gap = 0x7f020000;
}
public static final class id {
public static int alignBounds = 0x7f030002;
public static int alignMargins = 0x7f030003;
public static int bottom = 0x7f030004;
public static int center = 0x7f030005;
public static int center_horizontal = 0x7f030006;
public static int center_vertical = 0x7f030007;
public static int clip_horizontal = 0x7f030008;
public static int clip_vertical = 0x7f030009;
public static int end = 0x7f03000a;
public static int fill = 0x7f03000b;
public static int fill_horizontal = 0x7f03000c;
public static int fill_vertical = 0x7f03000d;
public static int horizontal = 0x7f030000;
public static int left = 0x7f03000e;
public static int right = 0x7f03000f;
public static int start = 0x7f030010;
public static int top = 0x7f030011;
public static int vertical = 0x7f030001;
}
public static final class styleable {
public static int[] GridLayout = { 0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006 };
public static int[] GridLayout_Layout = { 0x010100f4, 0x010100f5, 0x010100f6, 0x010100f7, 0x010100f8, 0x010100f9, 0x010100fa, 0x7f010007, 0x7f010008, 0x7f010009, 0x7f01000a, 0x7f01000b, 0x7f01000c, 0x7f01000d };
public static int GridLayout_Layout_android_layout_height = 1;
public static int GridLayout_Layout_android_layout_margin = 2;
public static int GridLayout_Layout_android_layout_marginBottom = 6;
public static int GridLayout_Layout_android_layout_marginLeft = 3;
public static int GridLayout_Layout_android_layout_marginRight = 5;
public static int GridLayout_Layout_android_layout_marginTop = 4;
public static int GridLayout_Layout_android_layout_width = 0;
public static int GridLayout_Layout_layout_column = 10;
public static int GridLayout_Layout_layout_columnSpan = 11;
public static int GridLayout_Layout_layout_columnWeight = 12;
public static int GridLayout_Layout_layout_gravity = 13;
public static int GridLayout_Layout_layout_row = 7;
public static int GridLayout_Layout_layout_rowSpan = 8;
public static int GridLayout_Layout_layout_rowWeight = 9;
public static int GridLayout_alignmentMode = 4;
public static int GridLayout_columnCount = 2;
public static int GridLayout_columnOrderPreserved = 6;
public static int GridLayout_orientation = 0;
public static int GridLayout_rowCount = 1;
public static int GridLayout_rowOrderPreserved = 5;
public static int GridLayout_useDefaultMargins = 3;
}
}
|
[
"greatroyalone@outlook.com"
] |
greatroyalone@outlook.com
|
3d83f87c0aed97d7d10005ff27fd6132d1f79ee6
|
0cf378b7320592a952d5343a81b8a67275ab5fab
|
/webprotege-server-core/src/main/java/edu/stanford/bmir/protege/web/server/inject/project/RevisionNumberProvider.java
|
aeaf45cb768acc24e7237ef04b7b21be19a2cd67
|
[
"BSD-2-Clause"
] |
permissive
|
curtys/webprotege-attestation
|
945de9f6c96ca84b7022a60f4bec4886c81ab4f3
|
3aa909b4a8733966e81f236c47d6b2e25220d638
|
refs/heads/master
| 2023-04-11T04:41:16.601854
| 2023-03-20T12:18:44
| 2023-03-20T12:18:44
| 297,962,627
| 0
| 0
|
MIT
| 2021-08-24T08:43:21
| 2020-09-23T12:28:24
|
Java
|
UTF-8
|
Java
| false
| false
| 728
|
java
|
package edu.stanford.bmir.protege.web.server.inject.project;
import edu.stanford.bmir.protege.web.server.revision.RevisionManager;
import edu.stanford.bmir.protege.web.shared.revision.RevisionNumber;
import javax.inject.Inject;
import javax.inject.Provider;
/**
* Matthew Horridge
* Stanford Center for Biomedical Informatics Research
* 02/06/15
*/
public class RevisionNumberProvider implements Provider<RevisionNumber> {
private final RevisionManager revisionManager;
@Inject
public RevisionNumberProvider(RevisionManager revisionManager) {
this.revisionManager = revisionManager;
}
@Override
public RevisionNumber get() {
return revisionManager.getCurrentRevision();
}
}
|
[
"matthew.horridge@stanford.edu"
] |
matthew.horridge@stanford.edu
|
889f12fa7b3de39e7b658269a2709d38fecfd2ac
|
9412cd1fc2ae3151f8516b7c141787a45da1cde6
|
/unit-tests/testJetty/src/main/java/com/james/jetty/controller/InsureController.java
|
af54bb6c14400782673dffcb9f752545c344fa35
|
[] |
no_license
|
imjamespond/java-recipe
|
2322d98d8db657fcd7e4784f706b66c10bee8d8b
|
6b8b0a6b46326dde0006d7544ffa8cc1ae647a0b
|
refs/heads/master
| 2021-08-28T18:22:43.811299
| 2016-09-27T06:41:00
| 2016-09-27T06:41:00
| 68,710,592
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,434
|
java
|
package com.james.jetty.controller;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.james.jetty.model.Insure;
import com.james.jetty.utils.MyUserDetailsService;
import com.james.jetty.vo.MyResult;
@Controller
@RequestMapping("/insure")
public class InsureController {
@RequestMapping(value="/",method={RequestMethod.GET,RequestMethod.POST})
public String index(HttpServletRequest request,HttpServletResponse response){
return "insure";
}
@RequestMapping(value = "/list", method = RequestMethod.GET)
public @ResponseBody Object
list(HttpServletRequest request) {
UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
Long uid = MyUserDetailsService.userMap.get(userDetails.getUsername());
if(uid == null){
return MyResult.error();
}
List<Insure> list = Insure.getByUid(uid,0,100);
MyResult<List<Insure>> result = new MyResult<List<Insure>>();
result.setResult(list);
return result;
//return list;
}
@RequestMapping(value = "/post", method = RequestMethod.POST)
public @ResponseBody Object
post(HttpServletRequest request) {
UserDetails userDetails = (UserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
String express = request.getParameter("express");
String expressid = request.getParameter("expressid");
String item = request.getParameter("item");
String ivalue = request.getParameter("ivalue");
String cost = request.getParameter("cost");
Long uid = MyUserDetailsService.userMap.get(userDetails.getUsername());
if(uid == null){
return MyResult.error();
}
Insure insure = new Insure();
insure.setExpress(express);
insure.setExpressid(expressid);
insure.setItem(item);
insure.setIvalue(Double.valueOf(ivalue));
insure.setCost(Double.valueOf(cost));
insure.setUid(uid);
insure.save();
MyResult<Insure> result = new MyResult<Insure>();
result.setResult(insure);
return result;
}
}
|
[
"imjamespond@gmai.com"
] |
imjamespond@gmai.com
|
0cc8e676854831372d1f2dd4845b4226d1bbccfa
|
734352ba5e541239824c214abf28121f44343b96
|
/trips-ejb-module/src/com/technobrain/trips/reference/model/RefManifestSource.java
|
d2e0cd40d7dfc85204635d24213873858720ad66
|
[] |
no_license
|
vsankara/Kyron
|
cb2b9877aa12d06604602932e3cc812a71c298c4
|
4a0c0babd8ebbb707087abdd7fccff93e1412abc
|
refs/heads/master
| 2021-01-10T01:32:25.599954
| 2015-12-04T17:51:35
| 2015-12-04T17:51:35
| 47,420,279
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,474
|
java
|
package com.technobrain.trips.reference.model;
import com.technobrain.trips.core.model.BaseRefModelObject;
import java.io.Serializable;
import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
@Entity
@NamedQuery(name = "RefManifestSource.findAll", query = "select o from RefManifestSource o")
@Table(name = "REF_MANIFEST_SOURCE")
public class RefManifestSource extends BaseRefModelObject {
@Id
@Column(nullable = false)
private String code;
private String description;
@Column(name="EFFECTIVE_DATE")
private Timestamp effectiveDate;
@Column(name="EXPIRY_DATE")
private Timestamp expiryDate;
public RefManifestSource() {
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Timestamp getEffectiveDate() {
return effectiveDate;
}
public void setEffectiveDate(Timestamp effectiveDate) {
this.effectiveDate = effectiveDate;
}
public Timestamp getExpiryDate() {
return expiryDate;
}
public void setExpiryDate(Timestamp expiryDate) {
this.expiryDate = expiryDate;
}
}
|
[
"vinai.sankara@technobraingroup.com"
] |
vinai.sankara@technobraingroup.com
|
fba4b57eb6cd2fb5793af9bf5f2e07e6adf7338c
|
0774b7be48a72398f44d831e9f92243c1d3230db
|
/icare-home-web/src/main/java/com/wisdom/controller/basic/ZoneController.java
|
f928a3957211fe60ac3e03807d2ba7d3531d1fbe
|
[] |
no_license
|
water-fu/icare
|
cc3eb8b53be7ee378eb7953abb614248151d194d
|
3a2245f6f4c01d9d169d78d77fe096982a29dfc8
|
refs/heads/master
| 2021-01-19T11:32:12.586464
| 2016-05-09T08:25:21
| 2016-05-09T08:25:21
| 82,251,258
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,080
|
java
|
package com.wisdom.controller.basic;
import com.wisdom.controller.common.BaseController;
import com.wisdom.constants.CommonConstant;
import com.wisdom.dao.entity.Zone;
import com.wisdom.entity.PageInfo;
import com.wisdom.entity.ResultBean;
import com.wisdom.entity.ZoneTree;
import com.wisdom.service.basic.IZoneService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import java.util.List;
/**
* 行政区域
* Created by fusj on 16/3/13.
*/
@Controller
@RequestMapping("zone")
public class ZoneController extends BaseController {
private static final Logger logger = LoggerFactory.getLogger(ZoneController.class);
private static final String VM_ROOT_PATH = String.format(MANAGER_VM_ROOT, "basic/zone/%s");
@Autowired
private IZoneService zoneService;
/**
* 首页
* @return
*/
@RequestMapping(value = {"", "/", "index"}, method = RequestMethod.GET)
public String index() {
return String.format(VM_ROOT_PATH, "index");
}
/**
* 数据列表页
* @param model
* @param pageInfo
* @param zone
*/
@RequestMapping(value = "list", method = RequestMethod.POST)
public ModelAndView list(Model model, PageInfo pageInfo, Zone zone) {
pageInfo = zoneService.list(zone, pageInfo);
model.addAttribute(CommonConstant.PAGE_INFO, pageInfo);
return new ModelAndView(String.format(VM_ROOT_PATH, "list"));
}
/**
* 初始化行政区域树
* @return
*/
@RequestMapping(value = "initData", method = RequestMethod.GET)
@ResponseBody
public ResultBean initData() {
try {
List<ZoneTree> list = zoneService.initData();
ResultBean resultBean = new ResultBean(true);
resultBean.setData(list);
return resultBean;
} catch (Exception ex) {
return ajaxException(ex);
}
}
/**
* 新增
* @param zone
* @return
*/
@RequestMapping(value = "add", method = RequestMethod.POST)
@ResponseBody
public ResultBean add(Zone zone) {
try {
zoneService.add(zone);
ResultBean resultBean = new ResultBean(true);
return resultBean;
} catch (Exception ex) {
return ajaxException(ex);
}
}
/**
* 根据主键获取
* @param zone
* @return
*/
@RequestMapping(value = "get", method = RequestMethod.GET)
@ResponseBody
public ResultBean get(Zone zone) {
try {
zone = zoneService.get(zone);
ResultBean resultBean = new ResultBean(true);
resultBean.setData(zone);
return resultBean;
} catch (Exception ex) {
return ajaxException(ex);
}
}
/**
* 修改保存
* @param zone
* @return
*/
@RequestMapping(value = "modify", method = RequestMethod.POST)
@ResponseBody
public ResultBean modify(Zone zone) {
try {
zoneService.modify(zone);
ResultBean resultBean = new ResultBean(true);
return resultBean;
} catch (Exception ex) {
return ajaxException(ex);
}
}
/**
* 删除
* @param zone
* @return
*/
@RequestMapping(value = "delete", method = RequestMethod.POST)
@ResponseBody
public ResultBean delete(Zone zone) {
try {
zone = zoneService.get(zone);
zoneService.delete(zone);
ResultBean resultBean = new ResultBean(true);
return resultBean;
} catch (Exception ex) {
return ajaxException(ex);
}
}
}
|
[
"fusj@ce2a1918-1c78-4d5b-8570-6b617fc693f1"
] |
fusj@ce2a1918-1c78-4d5b-8570-6b617fc693f1
|
cbab80a7ada88258c393a0f5ba2dcd448fba527b
|
f1807eaa59584353294af73e8a34abbda63c080d
|
/dbsaving/enfra/src/com/encocns/enfra/transaction/TransactionVO.java
|
37ac9b92262be936eee81fd50cb12c03d1729a0f
|
[] |
no_license
|
jkkim444/flow-demo
|
b9756f1b24fb917e60be9e489d45296263e777b2
|
7113f02e0f9e4623553263270825b2e275b2833f
|
refs/heads/main
| 2023-04-01T23:12:24.474064
| 2021-04-14T06:38:30
| 2021-04-14T06:38:30
| 357,788,546
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,376
|
java
|
package com.encocns.enfra.transaction;
import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.Map;
import com.encocns.enfra.core.util.JsonUtil;
import com.google.gson.JsonObject;
public class TransactionVO implements Serializable {
private static final long serialVersionUID = 6219893045700639635L;
private String service;
private String method;
// private String param;
private Map<String,Object> param;
private JsonObject paramJson;
private Object serviceObj;
private Class<?> isvoCls;
private Class<?> osvoCls;
private Object isvoObj;
private Object osvoObj;
private String menuId;
private String screenId;
private String txStrtTime;
private JsonObject headerJson;
//setter getter
public String getService() {
return service;
}
public void setService(String service) {
this.service = service;
}
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
public Map<String,Object> getParam() {
return param;
}
// public void setParam(Map<String,Object> param) {
//// this.setParamJson( JSONObject.fromObject(param) );
// this.setParamJson( JsonUtil.toJsonObject(param) );
// this.param = param;
// }
public void setParam(Map<String, Object> param) {
this.setParamJson( JsonUtil.toJsonObject(param) );
this.param = param;
}
public Object getServiceObj() {
return serviceObj;
}
public void setServiceObj(Object serviceObj) {
this.serviceObj = serviceObj;
getServiceSVO();
}
public Class<?> getIsvoCls() {
return isvoCls;
}
public void setIsvoCls(Class<?> isvoCls) {
this.isvoCls = isvoCls;
}
public Class<?> getOsvoCls() {
return osvoCls;
}
public void setOsvoCls(Class<?> osvoCls) {
this.osvoCls = osvoCls;
}
public Object getIsvoObj() {
return isvoObj;
}
public void setIsvoObj(Object isvoObj) {
this.isvoObj = isvoObj;
}
public Object getOsvoObj() {
return osvoObj;
}
public void setOsvoObj(Object osvoObj) {
this.osvoObj = osvoObj;
}
public String getTxStrtTime() {
return txStrtTime;
}
public void setTxStrtTime(String txStrtTime) {
this.txStrtTime = txStrtTime;
}
private void getServiceSVO()
{
Method[] methodArr = serviceObj.getClass().getDeclaredMethods();
for( Method mth : methodArr )
{
if(mth.getName().equals(this.method))
{
this.setIsvoCls(mth.getParameterTypes()[0]);
this.setOsvoCls(mth.getReturnType());
try
{
this.setIsvoObj(mth.getParameterTypes()[0].newInstance());
this.setOsvoObj(mth.getReturnType().newInstance());
}
catch(Exception e){ e.printStackTrace(); }
break;
}
}
}
public JsonObject getParamJson() {
return paramJson;
}
public void setParamJson(JsonObject paramJson) {
this.paramJson = paramJson;
}
public String getMenuId() {
return menuId;
}
public void setMenuId(String menuId) {
this.menuId = menuId;
}
/**
* @return the screenId
*/
public String getScreenId() {
return screenId;
}
/**
* @param screenId the screenId to set
*/
public void setScreenId(String screenId) {
this.screenId = screenId;
}
public JsonObject getHeaderJson() {
return headerJson;
}
public void setHeaderJson(JsonObject headerJson) {
this.headerJson = headerJson;
}
}
|
[
"jk.kim@daeunextier.com"
] |
jk.kim@daeunextier.com
|
690322024c2a56a66ab35a97288be84bd8ead3e4
|
13d611b767c05261f6400a42b2a9ff461e2ec907
|
/src/main/java/com/raoulvdberge/refinedstorage/render/BakedModelPattern.java
|
fabb0d1236436feb7ea4025321b215ec6b98b2b1
|
[
"MIT"
] |
permissive
|
uwx/refinedstorage
|
656830f69f8ccc61737b5fa52cf495588939b6a2
|
c38a4206d7388e28b51436ce90f1037ca54e8c8a
|
refs/heads/mc1.12
| 2023-04-01T01:34:44.041814
| 2018-08-31T08:27:59
| 2018-08-31T08:27:59
| 132,574,657
| 0
| 0
|
MIT
| 2019-05-16T05:54:39
| 2018-05-08T07:58:07
|
Java
|
UTF-8
|
Java
| false
| false
| 4,267
|
java
|
package com.raoulvdberge.refinedstorage.render;
import com.raoulvdberge.refinedstorage.apiimpl.autocrafting.CraftingPattern;
import com.raoulvdberge.refinedstorage.container.ContainerCrafter;
import com.raoulvdberge.refinedstorage.container.ContainerCrafterManager;
import com.raoulvdberge.refinedstorage.container.slot.SlotCrafterManager;
import com.raoulvdberge.refinedstorage.gui.GuiBase;
import com.raoulvdberge.refinedstorage.item.ItemPattern;
import com.raoulvdberge.refinedstorage.util.RenderUtils;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
import net.minecraft.client.renderer.block.model.ItemOverrideList;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.common.model.TRSRTransformation;
import org.apache.commons.lang3.tuple.Pair;
import javax.annotation.Nullable;
import javax.vecmath.Matrix4f;
import java.util.List;
public class BakedModelPattern implements IBakedModel {
private IBakedModel base;
public BakedModelPattern(IBakedModel base) {
this.base = base;
}
@Override
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(ItemCameraTransforms.TransformType cameraTransformType) {
TRSRTransformation transform = RenderUtils.getDefaultItemTransforms().get(cameraTransformType);
return Pair.of(this, transform == null ? RenderUtils.EMPTY_MATRIX_TRANSFORM : transform.getMatrix());
}
@Override
public List<BakedQuad> getQuads(@Nullable IBlockState state, @Nullable EnumFacing side, long rand) {
return base.getQuads(state, side, rand);
}
@Override
public boolean isAmbientOcclusion() {
return base.isAmbientOcclusion();
}
@Override
public boolean isGui3d() {
return base.isGui3d();
}
@Override
public boolean isBuiltInRenderer() {
return base.isBuiltInRenderer();
}
@Override
public TextureAtlasSprite getParticleTexture() {
return base.getParticleTexture();
}
@Override
@SuppressWarnings("deprecation")
public ItemCameraTransforms getItemCameraTransforms() {
return base.getItemCameraTransforms();
}
@Override
public ItemOverrideList getOverrides() {
return new ItemOverrideList(base.getOverrides().getOverrides()) {
@Override
public IBakedModel handleItemState(IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity) {
CraftingPattern pattern = ItemPattern.getPatternFromCache(world, stack);
if (canDisplayPatternOutput(stack, pattern)) {
return Minecraft.getMinecraft().getRenderItem().getItemModelWithOverrides(pattern.getOutputs().get(0), world, entity);
}
return super.handleItemState(originalModel, stack, world, entity);
}
};
}
public static boolean canDisplayPatternOutput(ItemStack patternStack, CraftingPattern pattern) {
return (GuiBase.isShiftKeyDown() || isPatternInDisplaySlot(patternStack)) && pattern.isValid() && pattern.getOutputs().size() == 1;
}
public static boolean isPatternInDisplaySlot(ItemStack stack) {
Container container = Minecraft.getMinecraft().player.openContainer;
if (container instanceof ContainerCrafterManager) {
for (Slot slot : container.inventorySlots) {
if (slot instanceof SlotCrafterManager && slot.getStack() == stack) {
return true;
}
}
} else if (container instanceof ContainerCrafter) {
for (int i = 0; i < 9; ++i) {
if (container.getSlot(i).getStack() == stack) {
return true;
}
}
}
return false;
}
}
|
[
"raoulvdberge@gmail.com"
] |
raoulvdberge@gmail.com
|
92dc4768595b19bb2745f3c32e02b913303fda0d
|
a7679b91fe4e6683dbbbef573ce14dd4be046e12
|
/src/main/java/br/com/dio/picpayclone/enums/BandeiraCartao.java
|
f2d3c1605be33f817d20d7f38f3763c70364a4da
|
[] |
no_license
|
mdssjc/dio-picpay
|
043e814ed67971d31acc769e3d860c7719c951de
|
c877fe7550f848faab93bc9dc411a5b90131c1b9
|
refs/heads/master
| 2023-04-11T23:50:52.023166
| 2021-05-09T14:36:14
| 2021-05-09T14:36:14
| 365,774,972
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 268
|
java
|
package br.com.dio.picpayclone.enums;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@Getter
@RequiredArgsConstructor
public enum BandeiraCartao {
VISA("Visa"),
MASTERCARD("Master Card"),
ELO("Elo");
private final String descricao;
}
|
[
"mdssjc@gmail.com"
] |
mdssjc@gmail.com
|
0d31a0866ceb2ab9d684357a10eda665c21c5c86
|
29b15664f2198f1cabe464f47617e2c9169fff18
|
/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/sort/SortUtil.java
|
e199efe20b6a4ace02129256b0bbfaa6dcce4764
|
[
"GPL-2.0-only",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-jdom",
"LicenseRef-scancode-proprietary-license",
"CDDL-1.0",
"CC-BY-2.5",
"MIT",
"BSD-3-Clause",
"CC0-1.0",
"LicenseRef-scancode-free-unknown",
"EPL-1.0",
"LGPL-2.1-only",
"Classpath-exception-2.0",
"LicenseRef-scancode-other-permissive",
"MIT-0",
"Python-2.0",
"CDDL-1.1",
"BSD-2-Clause-Views",
"GCC-exception-3.1",
"MPL-2.0",
"CC-PDDC",
"MPL-2.0-no-copyleft-exception",
"CC-BY-3.0",
"LicenseRef-scancode-unknown-license-reference",
"OFL-1.1",
"AGPL-3.0-only",
"ISC"
] |
permissive
|
moyujiantanshizhidenage/flink
|
2fc5b144ff56c266bcbb3078f0090e2f8602726e
|
b47b5910c16a423504171a2a29230ff1d8966214
|
refs/heads/master
| 2020-05-22T12:27:29.857616
| 2019-05-13T01:24:30
| 2019-05-13T01:24:30
| 186,338,885
| 1
| 0
|
Apache-2.0
| 2019-05-13T03:26:25
| 2019-05-13T03:26:25
| null |
UTF-8
|
Java
| false
| false
| 6,803
|
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.flink.table.runtime.sort;
import org.apache.flink.api.common.typeutils.base.NormalizedKeyUtil;
import org.apache.flink.core.memory.MemorySegment;
import org.apache.flink.table.dataformat.BinaryString;
import org.apache.flink.table.dataformat.Decimal;
import java.nio.ByteOrder;
import static org.apache.flink.core.memory.MemoryUtils.UNSAFE;
/**
* Util for sort.
*/
public class SortUtil {
private static final int BYTE_ARRAY_BASE_OFFSET = UNSAFE.arrayBaseOffset(byte[].class);
private static final boolean LITTLE_ENDIAN = ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN;
private static final int LONG_BYTES = 8;
public static void minNormalizedKey(MemorySegment target, int offset, int numBytes) {
//write min value.
for (int i = 0; i < numBytes; i++) {
target.put(offset + i, (byte) 0);
}
}
/**
* Max unsigned byte is -1.
*/
public static void maxNormalizedKey(MemorySegment target, int offset, int numBytes) {
//write max value.
for (int i = 0; i < numBytes; i++) {
target.put(offset + i, (byte) -1);
}
}
public static void putShortNormalizedKey(short value, MemorySegment target, int offset,
int numBytes) {
NormalizedKeyUtil.putShortNormalizedKey(value, target, offset, numBytes);
}
public static void putByteNormalizedKey(byte value, MemorySegment target, int offset,
int numBytes) {
NormalizedKeyUtil.putByteNormalizedKey(value, target, offset, numBytes);
}
public static void putBooleanNormalizedKey(boolean value, MemorySegment target, int offset,
int numBytes) {
NormalizedKeyUtil.putBooleanNormalizedKey(value, target, offset, numBytes);
}
/**
* UTF-8 supports bytes comparison.
*/
public static void putStringNormalizedKey(
BinaryString value, MemorySegment target, int offset, int numBytes) {
final int limit = offset + numBytes;
final int end = value.getSizeInBytes();
for (int i = 0; i < end && offset < limit; i++) {
target.put(offset++, value.getByte(i));
}
for (int i = offset; i < limit; i++) {
target.put(i, (byte) 0);
}
}
/**
* Just support the compact precision decimal.
*/
public static void putDecimalNormalizedKey(
Decimal record, MemorySegment target, int offset, int len) {
assert record.getPrecision() <= Decimal.MAX_COMPACT_PRECISION;
putLongNormalizedKey(record.toUnscaledLong(), target, offset, len);
}
public static void putIntNormalizedKey(int value, MemorySegment target, int offset, int numBytes) {
NormalizedKeyUtil.putIntNormalizedKey(value, target, offset, numBytes);
}
public static void putLongNormalizedKey(long value, MemorySegment target, int offset,
int numBytes) {
NormalizedKeyUtil.putLongNormalizedKey(value, target, offset, numBytes);
}
/**
* See http://stereopsis.com/radix.html for more details.
*/
public static void putFloatNormalizedKey(float value, MemorySegment target, int offset,
int numBytes) {
int iValue = Float.floatToIntBits(value);
iValue ^= ((iValue >> (Integer.SIZE - 1)) | Integer.MIN_VALUE);
NormalizedKeyUtil.putUnsignedIntegerNormalizedKey(iValue, target, offset, numBytes);
}
/**
* See http://stereopsis.com/radix.html for more details.
*/
public static void putDoubleNormalizedKey(double value, MemorySegment target, int offset,
int numBytes) {
long lValue = Double.doubleToLongBits(value);
lValue ^= ((lValue >> (Long.SIZE - 1)) | Long.MIN_VALUE);
NormalizedKeyUtil.putUnsignedLongNormalizedKey(lValue, target, offset, numBytes);
}
public static void putCharNormalizedKey(char value, MemorySegment target, int offset, int numBytes) {
NormalizedKeyUtil.putCharNormalizedKey(value, target, offset, numBytes);
}
public static void putBinaryNormalizedKey(
byte[] value, MemorySegment target, int offset, int numBytes) {
final int limit = offset + numBytes;
final int end = value.length;
for (int i = 0; i < end && offset < limit; i++) {
target.put(offset++, value[i]);
}
for (int i = offset; i < limit; i++) {
target.put(i, (byte) 0);
}
}
public static int compareBinary(byte[] a, byte[] b) {
return compareBinary(a, 0, a.length, b, 0, b.length);
}
public static int compareBinary(
byte[] buffer1, int offset1, int length1,
byte[] buffer2, int offset2, int length2) {
// Short circuit equal case
if (buffer1 == buffer2 &&
offset1 == offset2 &&
length1 == length2) {
return 0;
}
int minLength = Math.min(length1, length2);
int minWords = minLength / LONG_BYTES;
int offset1Adj = offset1 + BYTE_ARRAY_BASE_OFFSET;
int offset2Adj = offset2 + BYTE_ARRAY_BASE_OFFSET;
/*
* Compare 8 bytes at a time. Benchmarking shows comparing 8 bytes at a
* time is no slower than comparing 4 bytes at a time even on 32-bit.
* On the other hand, it is substantially faster on 64-bit.
*/
for (int i = 0; i < minWords * LONG_BYTES; i += LONG_BYTES) {
long lw = UNSAFE.getLong(buffer1, offset1Adj + (long) i);
long rw = UNSAFE.getLong(buffer2, offset2Adj + (long) i);
long diff = lw ^ rw;
if (diff != 0) {
if (!LITTLE_ENDIAN) {
return lessThanUnsigned(lw, rw) ? -1 : 1;
}
// Use binary search
int n = 0;
int y;
int x = (int) diff;
if (x == 0) {
x = (int) (diff >>> 32);
n = 32;
}
y = x << 16;
if (y == 0) {
n += 16;
} else {
x = y;
}
y = x << 8;
if (y == 0) {
n += 8;
}
return (int) (((lw >>> n) & 0xFFL) - ((rw >>> n) & 0xFFL));
}
}
// The epilogue to cover the last (minLength % 8) elements.
for (int i = minWords * LONG_BYTES; i < minLength; i++) {
int result = unsignedByteToInt(buffer1[offset1 + i]) -
unsignedByteToInt(buffer2[offset2 + i]);
if (result != 0) {
return result;
}
}
return length1 - length2;
}
private static int unsignedByteToInt(byte value) {
return value & 0xff;
}
private static boolean lessThanUnsigned(long x1, long x2) {
return (x1 + Long.MIN_VALUE) < (x2 + Long.MIN_VALUE);
}
}
|
[
"ykt836@gmail.com"
] |
ykt836@gmail.com
|
13ad9734ac7a573af76dd56706a349e4eb44e177
|
f7f2ac2c165335b4ee182be61c35dac9e47c16e5
|
/src/data/dao/pojo/Nscd.java
|
b28244efc9f947b6eae3f33db05475db554d5a83
|
[] |
no_license
|
tyjorange/MedrecScoreWeb
|
e229cdd131fcafdb51b78002a162e2b55a20f67e
|
c0bf15f9a53a2ec23f7381cc52077325cd763088
|
refs/heads/master
| 2020-04-24T08:19:39.875894
| 2019-02-21T08:03:24
| 2019-02-21T08:03:24
| 171,827,258
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 414
|
java
|
package data.dao.pojo;
public class Nscd {
private String code;
private String name;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code == null ? null : code.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
}
|
[
"420785022@qq.com"
] |
420785022@qq.com
|
32b396a7eceaf7150e454ca25f47fc0e16cdb59b
|
516fb367430d4c1393f4cd726242618eca862bda
|
/sources/com/google/ads/interactivemedia/v3/internal/ek.java
|
a5cad9c8162d3729b64044cc94ffffc6cfbd023c
|
[] |
no_license
|
cmFodWx5YWRhdjEyMTA5/Gaana2
|
75d6d6788e2dac9302cff206a093870e1602921d
|
8531673a5615bd9183c9a0466325d0270b8a8895
|
refs/heads/master
| 2020-07-22T15:46:54.149313
| 2019-06-19T16:11:11
| 2019-06-19T16:11:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 421
|
java
|
package com.google.ads.interactivemedia.v3.internal;
import java.io.IOException;
interface ek {
int a(int i);
void a(int i, double d) throws bl;
void a(int i, int i2, cd cdVar) throws bl, IOException, InterruptedException;
void a(int i, long j) throws bl;
void a(int i, long j, long j2) throws bl;
void a(int i, String str) throws bl;
boolean b(int i);
void c(int i) throws bl;
}
|
[
"master@master.com"
] |
master@master.com
|
c1e1c4563ee552593401fd06548388e924f85716
|
a52b1d91a5a2984591df9b2f03b1014c263ee8ab
|
/net/minecraft/realms/RealmsAnvilLevelStorageSource.java
|
4a57a2e1dfce755f8dc0c8b5941ab55b3ee473d8
|
[] |
no_license
|
MelonsYum/leap-client
|
5c200d0b39e0ca1f2071f9264f913f9e6977d4b4
|
c6611d4b9600311e1eb10f87a949419e34749373
|
refs/heads/main
| 2023-08-04T17:40:13.797831
| 2021-09-17T00:18:38
| 2021-09-17T00:18:38
| 411,085,054
| 3
| 3
| null | 2021-09-28T00:33:06
| 2021-09-28T00:33:05
| null |
UTF-8
|
Java
| false
| false
| 3,162
|
java
|
/* */ package net.minecraft.realms;
/* */
/* */ import com.google.common.collect.Lists;
/* */ import java.util.ArrayList;
/* */ import java.util.Iterator;
/* */ import java.util.List;
/* */ import net.minecraft.client.AnvilConverterException;
/* */ import net.minecraft.util.IProgressUpdate;
/* */ import net.minecraft.world.storage.ISaveFormat;
/* */ import net.minecraft.world.storage.SaveFormatComparator;
/* */
/* */
/* */ public class RealmsAnvilLevelStorageSource
/* */ {
/* */ private ISaveFormat levelStorageSource;
/* */ private static final String __OBFID = "CL_00001856";
/* */
/* */ public RealmsAnvilLevelStorageSource(ISaveFormat p_i1106_1_) {
/* 19 */ this.levelStorageSource = p_i1106_1_;
/* */ }
/* */
/* */
/* */ public String getName() {
/* 24 */ return this.levelStorageSource.func_154333_a();
/* */ }
/* */
/* */
/* */ public boolean levelExists(String p_levelExists_1_) {
/* 29 */ return this.levelStorageSource.canLoadWorld(p_levelExists_1_);
/* */ }
/* */
/* */
/* */ public boolean convertLevel(String p_convertLevel_1_, IProgressUpdate p_convertLevel_2_) {
/* 34 */ return this.levelStorageSource.convertMapFormat(p_convertLevel_1_, p_convertLevel_2_);
/* */ }
/* */
/* */
/* */ public boolean requiresConversion(String p_requiresConversion_1_) {
/* 39 */ return this.levelStorageSource.isOldMapFormat(p_requiresConversion_1_);
/* */ }
/* */
/* */
/* */ public boolean isNewLevelIdAcceptable(String p_isNewLevelIdAcceptable_1_) {
/* 44 */ return this.levelStorageSource.func_154335_d(p_isNewLevelIdAcceptable_1_);
/* */ }
/* */
/* */
/* */ public boolean deleteLevel(String p_deleteLevel_1_) {
/* 49 */ return this.levelStorageSource.deleteWorldDirectory(p_deleteLevel_1_);
/* */ }
/* */
/* */
/* */ public boolean isConvertible(String p_isConvertible_1_) {
/* 54 */ return this.levelStorageSource.func_154334_a(p_isConvertible_1_);
/* */ }
/* */
/* */
/* */ public void renameLevel(String p_renameLevel_1_, String p_renameLevel_2_) {
/* 59 */ this.levelStorageSource.renameWorld(p_renameLevel_1_, p_renameLevel_2_);
/* */ }
/* */
/* */
/* */ public void clearAll() {
/* 64 */ this.levelStorageSource.flushCache();
/* */ }
/* */
/* */
/* */ public List getLevelList() throws AnvilConverterException {
/* 69 */ ArrayList<RealmsLevelSummary> var1 = Lists.newArrayList();
/* 70 */ Iterator<SaveFormatComparator> var2 = this.levelStorageSource.getSaveList().iterator();
/* */
/* 72 */ while (var2.hasNext()) {
/* */
/* 74 */ SaveFormatComparator var3 = var2.next();
/* 75 */ var1.add(new RealmsLevelSummary(var3));
/* */ }
/* */
/* 78 */ return var1;
/* */ }
/* */ }
/* Location: C:\Users\wyatt\Downloads\Leap-Client.jar!\net\minecraft\realms\RealmsAnvilLevelStorageSource.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/
|
[
"90357372+danny-125@users.noreply.github.com"
] |
90357372+danny-125@users.noreply.github.com
|
55c1765d4438911bfa380a7c083167c5ea4e7d03
|
586b1aa5b42262884f3b738d9607c05a1689cb04
|
/src/main/java/cn/lucasma/design/pattern/behavioral/iterator/Course.java
|
9570b6793998837ad041454f662cb1a51550021a
|
[] |
no_license
|
chuckma/design_pattern
|
604e22df3e5104b6d91868f1e177c1dd8175a120
|
bdadc05fd2169c50e3b6a9043518075ea399ee3b
|
refs/heads/master
| 2022-12-21T15:42:22.472500
| 2021-04-11T08:47:55
| 2021-04-11T08:47:55
| 144,852,066
| 1
| 0
| null | 2022-12-16T03:37:48
| 2018-08-15T12:46:39
|
Java
|
UTF-8
|
Java
| false
| false
| 259
|
java
|
package cn.lucasma.design.pattern.behavioral.iterator;
/**
* Created by lucas.
*/
public class Course {
private String name;
public Course(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
|
[
"robbincen@163.com"
] |
robbincen@163.com
|
8eba7379b7e94eb5ed4144430804a23ae221799f
|
26cae485443d8adff8abc7ebac7c2324691a6574
|
/cooper/crs/LanguageProcessors/spring06/src/minijava/errorprograms/TestExtends.java
|
bd88a9603077dbe1b6c8c866a9af6b7be2da2e6d
|
[] |
no_license
|
igococha/proglang
|
f06d36493f67ff167f421cbe58612efdbb18c334
|
2c2711947322b1582dbbaa58005d2999e202db97
|
refs/heads/master
| 2021-01-15T22:56:54.886042
| 2017-08-10T12:29:43
| 2017-08-10T12:29:43
| 99,920,188
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 915
|
java
|
class TestExtends{
public static void main(String[] a){
System.out.println(new DoSomething().Do());
}
}
class DoSomething {
EC b;
public int Do() {
int i; boolean bval;
b = new EC();
i = b.setParField(10);
i = b.setOwnField(true);
bval = b.setAnotherParField();
System.out.println(b.pfv());
System.out.println(b.myfv());
System.out.println(b.apfv());
return 0;
}
}
class OneClass {
int pf;
int apf;
public int setParField(int i) { pf = i; return 1; }
public int pfv() { return pf; }
public int apfv() { return apf; }
}
class EC extends OneClass {
boolean myf;
public int setOwnField(boolean b) { myf = b; return 2; }
public boolean setAnotherParField() {
if (myf) { apf = 5; }
else { apf = 15; }
return true;
}
public boolean myfv() { return myf; }
}
|
[
"igor@siveroni.com"
] |
igor@siveroni.com
|
11aee8323464760c78fdd2e820212851d0625d07
|
0319afb5c64ed401fc4bcadc20fe39fe2634cb8e
|
/tags/icepdf-6.3.1/icepdf/viewer/viewer-awt/src/main/java/org/icepdf/ri/common/tools/ZoomOutPageHandler.java
|
3b7299008357105f13a3f9c17edd52cddbababee
|
[] |
no_license
|
svn2github/icepdf-6_3_0_all
|
e3334b1d98c8fb3b400a57b05a32a7bcc2c86d99
|
e73b943f4449c8967472a1f5a477c8c136afb803
|
refs/heads/master
| 2023-09-03T10:39:31.313071
| 2018-09-06T03:00:25
| 2018-09-06T03:00:25
| 133,867,237
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,101
|
java
|
/*
* Copyright 2006-2018 ICEsoft Technologies Canada Corp.
*
* 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.icepdf.ri.common.tools;
import org.icepdf.ri.common.views.AbstractPageViewComponent;
import org.icepdf.ri.common.views.DocumentViewController;
import org.icepdf.ri.common.views.DocumentViewModel;
import java.awt.*;
import java.awt.event.InputEvent;
import java.awt.event.MouseEvent;
import java.util.logging.Logger;
/**
* Handles mouse click zoom out functionality. The zoom is handled at the
* AbstractDocumentView level as we accept mouse clicks from anywhere in the
* view.
*
* @since 4.0
*/
public class ZoomOutPageHandler implements ToolHandler {
private static final Logger logger =
Logger.getLogger(ZoomOutPageHandler.class.toString());
private AbstractPageViewComponent pageViewComponent;
private DocumentViewController documentViewController;
private DocumentViewModel documentViewModel;
public ZoomOutPageHandler(DocumentViewController documentViewController,
AbstractPageViewComponent pageViewComponent,
DocumentViewModel documentViewModel) {
this.documentViewController = documentViewController;
this.pageViewComponent = pageViewComponent;
this.documentViewModel = documentViewModel;
}
public void mouseClicked(MouseEvent e) {
if ((e.getModifiers() & MouseEvent.MOUSE_PRESSED) != 0) {
if ((e.getModifiers() & InputEvent.BUTTON1_MASK) != 0) {
// zoom in
Point pageOffset = documentViewModel.getPageBounds(
pageViewComponent.getPageIndex()).getLocation();
Point mouse = e.getPoint();
mouse.setLocation(pageOffset.x + mouse.x,
pageOffset.y + mouse.y);
documentViewController.setZoomOut(mouse);
}
}
if (pageViewComponent != null) {
pageViewComponent.requestFocus();
}
}
public void mouseDragged(MouseEvent e) {
}
public void mouseMoved(MouseEvent e) {
}
public void mousePressed(MouseEvent e) {
}
public void mouseReleased(MouseEvent e) {
}
public void mouseEntered(MouseEvent e) {
}
public void mouseExited(MouseEvent e) {
}
public void paintTool(Graphics g) {
}
public void installTool() {
}
public void uninstallTool() {
}
}
|
[
"patrick.corless@8668f098-c06c-11db-ba21-f49e70c34f74"
] |
patrick.corless@8668f098-c06c-11db-ba21-f49e70c34f74
|
b5160b443daa1815fa9e2d5201a418a79f898be5
|
2c16007de25b78fa7f010cf8d471606b1bb31b2e
|
/aop/docs/examples/injboss/src/main/org/jboss/injbossaop/lib/ExampleValue.java
|
d3953b33488bfb1f6e03823f05ea878ee639aca3
|
[] |
no_license
|
stalep/jboss-aop
|
24e1c64acb48540dca858fa3b093861b91f724eb
|
f9d6e15fc724f9e1c07a98aa301a52b4273a882f
|
refs/heads/master
| 2022-07-08T04:31:18.718343
| 2009-01-28T03:01:01
| 2009-01-28T03:01:01
| 116,122
| 3
| 2
| null | 2022-07-01T22:17:50
| 2009-01-27T22:31:04
|
Java
|
UTF-8
|
Java
| false
| false
| 1,584
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt 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
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.injbossaop.lib;
import java.io.Serializable;
/**
*
* @author <a href="mailto:kabirkhan@bigfoot.com">Kabir Khan</a>
*
*/
public class ExampleValue implements Serializable{
String message = "";
public ExampleValue()
{
System.out.println("**** ExampleValue empty Constructor");
}
public ExampleValue(String msg)
{
System.out.println("**** ExampleValue String Constructor");
message = msg;
}
public String getMessage()
{
System.out.println("**** ExampleValue.getMessage()");
return message;
}
}
|
[
"kabir.khan@jboss.com@84be2c1e-ba19-0410-b317-a758671a6fc1"
] |
kabir.khan@jboss.com@84be2c1e-ba19-0410-b317-a758671a6fc1
|
ec7e380c6ada597f1976c730d913a74d66a86807
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-13546-11-18-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/mail/internal/thread/SendMailRunnable_ESTest.java
|
8d252fb15042bd028b51e7c05da334ab4bb51af6
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 569
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sun Apr 05 15:48:46 UTC 2020
*/
package org.xwiki.mail.internal.thread;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class SendMailRunnable_ESTest extends SendMailRunnable_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
e627fcad1183d7596b7aa9dfc975e07499a1f5fa
|
021b523e44ff754510d3442bc9d1bcb3aaa1c011
|
/renren-api/src/main/java/io/renren/service/GoodsService.java
|
afca995390d400d194e051167c6020ac84f036fc
|
[
"Apache-2.0"
] |
permissive
|
iweisi/vue-taobao
|
6bf39f150db10ce7422e529161d32a551950f45f
|
985b16d3133668a02e6a2a5b968ed607be9b9700
|
refs/heads/master
| 2020-05-01T11:09:41.185286
| 2019-03-23T14:38:17
| 2019-03-23T14:38:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 829
|
java
|
package io.renren.service;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import io.renren.entity.Goods;
import io.renren.form.GoodsListSearchForm;
import io.renren.vo.GoodsVo;
import java.util.Map;
/**
* 商品
* @author admin
*/
public interface GoodsService extends IService<Goods> {
/**
* 条件查询商品列表
* @return
*/
public Page<Goods> listGoodsVo(GoodsListSearchForm form);
/**
* 商品详情
* @param goodsId 商品id
* @return
*/
public GoodsVo getGoodsVoByGoodsId(long goodsId);
/**
* 减少秒杀商品的库存
* @param id 商品id
* @return
*/
public int decCount(Long id);
/**
* 是否是秒杀商品
* @param goodsVo 商品
* @param map
*/
void isSecKillGoods(GoodsVo goodsVo, Map<String, Object> map);
}
|
[
"838088516@qq.com"
] |
838088516@qq.com
|
6ee5f49e5138635b91fa9116d70447af48ac45d6
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/10/10_6e804726c9056d970bd9719d5c31251faeaf23a4/ParserException/10_6e804726c9056d970bd9719d5c31251faeaf23a4_ParserException_s.java
|
174325ed0c14599dd0b294463f46a1070c02ecc7
|
[] |
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,272
|
java
|
/*
* Copyright (c) 2006, 2008 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are 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:
* Artem Tikhomirov (Borland) - initial API and implementation
*/
package org.eclipse.gmf.internal.xpand.util;
import java.util.Collection;
public class ParserException extends Exception {
private static final long serialVersionUID = 1L;
private final ErrorLocationInfo[] errors;
private final String qualifiedResourceName;
private static String getMessage(ErrorLocationInfo[] errors) {
assert errors != null && errors.length > 0;
StringBuilder result = new StringBuilder();
for (ErrorLocationInfo errorLocationInfo : errors) {
result.append(errorLocationInfo.toString());
result.append("\n");
}
return result.toString();
}
public ParserException(String qualifiedName, Collection<? extends ErrorLocationInfo> errors) {
this(qualifiedName, errors.toArray(new ErrorLocationInfo[errors.size()]));
}
public ParserException(String qualifiedName, ErrorLocationInfo... errors) {
super(getMessage(errors));
assert errors != null && errors.length > 0;
this.errors = errors;
this.qualifiedResourceName = qualifiedName;
}
public ErrorLocationInfo[] getParsingErrors() {
return errors;
}
public String getResourceName() {
return qualifiedResourceName;
}
public static class ErrorLocationInfo {
public final int startLine;
public final int startColumn;
public final int endLine;
public final int endColumn;
public final String message;
public ErrorLocationInfo(String message) {
this(message, -1, -1, -1, -1);
}
public ErrorLocationInfo(String message, int startLine, int startColumn, int endLine, int endColumn) {
this.message = message;
this.startLine = startLine;
this.startColumn = startColumn;
this.endLine = endLine;
this.endColumn = endColumn;
}
public String toString() {
return startLine + ":" + startColumn + "-" + endLine + ":" + endColumn + " - " + message;
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
0314acc8dad4df09b1adfaf516e99e2e46aa10fe
|
1fa7200a80bea0f0355dae4c3b463f4da3eda7f3
|
/src/main/java/com/ryan/gateway/web/rest/vm/RouteVM.java
|
55dc407a5f32744f663537e8bfaf33d0075ea736
|
[] |
no_license
|
Ryanvaziri/gateway
|
e7f3b95ac1532968ee19199b6dc8fa6c944a00b8
|
de9c0ef180b0eadbe4687c69d2847e5347fb679f
|
refs/heads/master
| 2022-12-22T02:40:38.224284
| 2019-12-17T18:02:35
| 2019-12-17T18:02:35
| 228,411,540
| 0
| 0
| null | 2019-12-16T15:05:54
| 2019-12-16T14:59:27
|
Java
|
UTF-8
|
Java
| false
| false
| 844
|
java
|
package com.ryan.gateway.web.rest.vm;
import java.util.List;
import org.springframework.cloud.client.ServiceInstance;
/**
* View Model that stores a route managed by the Gateway.
*/
public class RouteVM {
private String path;
private String serviceId;
private List<ServiceInstance> serviceInstances;
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public String getServiceId() {
return serviceId;
}
public void setServiceId(String serviceId) {
this.serviceId = serviceId;
}
public List<ServiceInstance> getServiceInstances() {
return serviceInstances;
}
public void setServiceInstances(List<ServiceInstance> serviceInstances) {
this.serviceInstances = serviceInstances;
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.