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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9192891541843352094f4bac0f5e414b342fe8ee
|
63f751519e64ac067e11189edaf6a34aeb3e5dba
|
/3.JavaMultithreading/src/com/javarush/task/task26/task2608/Solution.java
|
e6f1290c8983feda744567d6c2af279b52d58d0b
|
[] |
no_license
|
sharygin-vic/JavaRushTasks
|
8507b96c2103828be4c8c3de29f6ad446b33b9df
|
88e383a10a64286a2750bd67ec7f27d1a10a21dd
|
refs/heads/master
| 2021-01-21T18:25:20.400669
| 2017-08-01T22:50:45
| 2017-08-01T22:50:45
| 92,046,759
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 731
|
java
|
package com.javarush.task.task26.task2608;
/*
Мудрый человек думает раз, прежде чем два раза сказать
*/
public class Solution {
int var1;
int var2;
int var3;
int var4;
public Solution(int var1, int var2, int var3, int var4) {
this.var1 = var1;
this.var2 = var2;
this.var3 = var3;
this.var4 = var4;
}
public int getSumOfVar1AndVar2() {
synchronized ("getSumOfVar1AndVar2") {
return var1 + var2;
}
}
public int getSumOfVar3AndVar4() {
synchronized ("getSumOfVar3AndVar4") {
return var3 + var4;
}
}
public static void main(String[] args) {
}
}
|
[
"lasprog@mail.ru"
] |
lasprog@mail.ru
|
9c8b590c35f63e7d0e6c6efa0748cadf4ef89d70
|
c3cf33e7b9fe20ff3124edcfc39f08fa982b2713
|
/pocs/Apache-Camel/src/main/java/com/ilegra/training/apache/camel/dataformats/SimpleHandler.java
|
a1032ecad5126fb1ccef1986598861ee4531f351
|
[
"Unlicense"
] |
permissive
|
diegopacheco/java-pocs
|
d9daa5674921d8b0d6607a30714c705c9cd4c065
|
2d6cc1de9ff26e4c0358659b7911d2279d4008e1
|
refs/heads/master
| 2023-08-30T18:36:34.626502
| 2023-08-29T07:34:36
| 2023-08-29T07:34:36
| 107,281,823
| 47
| 57
|
Unlicense
| 2022-03-23T07:24:08
| 2017-10-17T14:42:26
|
Java
|
UTF-8
|
Java
| false
| false
| 180
|
java
|
package com.ilegra.training.apache.camel.dataformats;
public class SimpleHandler {
public void handlePojo(DrugPojo dp){
System.out.println("Pojo Received: " + dp);
}
}
|
[
"diego.pacheco.it@gmail.com"
] |
diego.pacheco.it@gmail.com
|
5f7ea5b573061aea682bbd1a43f8fbe2888b1985
|
2da93316dc981555271295315d072bd8d61c3daf
|
/src/com/cyb/annotation/value/Hidden.java
|
618a85dfe291aa81980d371d2c10ce997f791906
|
[] |
no_license
|
iechenyb/sina0.9
|
17ac6a71e5bb5ffc5b44d87be9e2d7d4d9708131
|
14f5fa5237e3e580e770a62f652640bbb37ff447
|
refs/heads/master
| 2021-06-10T03:03:12.272792
| 2017-01-06T01:04:39
| 2017-01-06T01:04:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 213
|
java
|
package com.cyb.annotation.value;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
public @interface Hidden {
boolean value();
}
|
[
"zzuchenyb@sina.com"
] |
zzuchenyb@sina.com
|
1da1eee0fb117b6c1fc60e052434631c60e9246a
|
1f2266c5596dac284452a7c6a10da4f9f3b994b7
|
/src/com/pharmaplus/model/User.java
|
1230db471b5444ae971eb8a354bdbd162cdbae0b
|
[] |
no_license
|
codewnw/pharma-plus
|
465db90073a04df9cf99485848dd4ff88cc21313
|
bcab34658a7d78a735cd8e5a993760f0954dcc8f
|
refs/heads/master
| 2022-02-03T21:04:37.273024
| 2019-07-26T17:03:53
| 2019-07-26T17:03:53
| 195,516,791
| 0
| 0
| null | 2022-01-21T23:26:36
| 2019-07-06T08:32:42
|
Java
|
UTF-8
|
Java
| false
| false
| 951
|
java
|
package com.pharmaplus.model;
public class User {
private String email;
private String name;
private int age;
private String gender;
private String mobile;
@Override
public String toString() {
return "User [userName=" + email + ", name=" + name + ", age=" + age + ", gender=" + gender + ", mobile="
+ mobile + "]";
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
[
"code.wnw@gmail.com"
] |
code.wnw@gmail.com
|
fa928aabe7a7939fe0e712015df5b2ea8764d799
|
32f38cd53372ba374c6dab6cc27af78f0a1b0190
|
/app/src/main/java/defpackage/eqz.java
|
16c39b8e0f23bc5e78c840e32ffeb187af0cf8b3
|
[
"BSD-3-Clause"
] |
permissive
|
shuixi2013/AmapCode
|
9ea7aefb42e0413f348f238f0721c93245f4eac6
|
1a3a8d4dddfcc5439df8df570000cca12b15186a
|
refs/heads/master
| 2023-06-06T23:08:57.391040
| 2019-08-29T04:36:02
| 2019-08-29T04:36:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,025
|
java
|
package defpackage;
import android.annotation.TargetApi;
import android.content.Context;
import android.widget.OverScroller;
@TargetApi(9)
/* renamed from: eqz reason: default package */
/* compiled from: GingerScroller */
public class eqz extends erc {
protected final OverScroller a;
private boolean b = false;
public eqz(Context context) {
this.a = new OverScroller(context);
}
public boolean a() {
if (this.b) {
this.a.computeScrollOffset();
this.b = false;
}
return this.a.computeScrollOffset();
}
public final void a(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
this.a.fling(i, i2, i3, i4, i5, i6, i7, i8, 0, 0);
}
public final void b() {
this.a.forceFinished(true);
}
public final boolean c() {
return this.a.isFinished();
}
public final int d() {
return this.a.getCurrX();
}
public final int e() {
return this.a.getCurrY();
}
}
|
[
"hubert.yang@nf-3.com"
] |
hubert.yang@nf-3.com
|
31c6cdb898de8ca2c748e953ee93d2d9e976b45e
|
8cdd38dfd700c17d688ac78a05129eb3a34e68c7
|
/JVXML_HOME/org.jvoicexml.client/src/org/jvoicexml/client/ConnectionInformationController.java
|
dc973e021d02533fd0ef0832c97939a1f27fbad3
|
[] |
no_license
|
tymiles003/JvoiceXML-Halef
|
b7d975dbbd7ca998dc1a4127f0bffa0552ee892e
|
540ff1ef50530af24be32851c2962a1e6a7c9dbb
|
refs/heads/master
| 2021-01-18T18:13:56.781237
| 2014-05-13T15:56:07
| 2014-05-13T15:56:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 604
|
java
|
package org.jvoicexml.client;
import org.jvoicexml.ConnectionInformation;
/**
* Provides extended functionality to a {@link ConnectionInformation} object,
* such as lifecycle management through the {@link #cleanup()} method.
*
* @author Dirk Schnelle-Walka
* @version $Revision: $
* @since 0.7.6
*/
public interface ConnectionInformationController {
/**
* Retrieves the encapsulated connection info.
* @return the connection info object
*/
ConnectionInformation getConnectionInformation();
/**
* Performs some additional cleanup.
*/
void cleanup();
}
|
[
"malatawy15@gmail.com"
] |
malatawy15@gmail.com
|
4d520139b749766565d125661791fc434db7fa98
|
47f1e5838fdd4ed0100133221f9eace02fb0de82
|
/src/main/java/com/jumore/zhxf/web/rest/dto/UserDTO.java
|
fa57eaca0f04ce2021dffb274e7e7d8bf0deea67
|
[] |
no_license
|
rabbit-butterfly/jhipster-demo
|
2b2f16fbdf0be930b418d489e8d6348bf5f1e4bf
|
ba20e82b0649f7d9df5e48db094178b0269d0e8a
|
refs/heads/master
| 2020-12-02T06:30:30.885429
| 2017-08-30T08:11:22
| 2017-08-30T08:11:22
| 96,846,288
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,730
|
java
|
package com.jumore.zhxf.web.rest.dto;
import com.jumore.zhxf.domain.Authority;
import com.jumore.zhxf.domain.User;
import org.hibernate.validator.constraints.Email;
import javax.validation.constraints.*;
import java.util.Set;
import java.util.stream.Collectors;
/**
* A DTO representing a user, with his authorities.
*/
public class UserDTO {
public static final int PASSWORD_MIN_LENGTH = 5;
public static final int PASSWORD_MAX_LENGTH = 100;
@Pattern(regexp = "^[a-z0-9]*$")
@NotNull
@Size(min = 1, max = 50)
private String login;
@NotNull
@Size(min = PASSWORD_MIN_LENGTH, max = PASSWORD_MAX_LENGTH)
private String password;
@Size(max = 50)
private String firstName;
@Size(max = 50)
private String lastName;
@Email
@Size(min = 5, max = 100)
private String email;
private boolean activated = false;
@Size(min = 2, max = 5)
private String langKey;
private Set<String> authorities;
public UserDTO() {
}
public UserDTO(User user) {
this(user.getLogin(), null, user.getFirstName(), user.getLastName(),
user.getEmail(), user.getActivated(), user.getLangKey(),
user.getAuthorities().stream().map(Authority::getName)
.collect(Collectors.toSet()));
}
public UserDTO(String login, String password, String firstName, String lastName,
String email, boolean activated, String langKey, Set<String> authorities) {
this.login = login;
this.password = password;
this.firstName = firstName;
this.lastName = lastName;
this.email = email;
this.activated = activated;
this.langKey = langKey;
this.authorities = authorities;
}
public String getPassword() {
return password;
}
public String getLogin() {
return login;
}
public String getFirstName() {
return firstName;
}
public String getLastName() {
return lastName;
}
public String getEmail() {
return email;
}
public boolean isActivated() {
return activated;
}
public String getLangKey() {
return langKey;
}
public Set<String> getAuthorities() {
return authorities;
}
@Override
public String toString() {
return "UserDTO{" +
"login='" + login + '\'' +
", password='" + password + '\'' +
", firstName='" + firstName + '\'' +
", lastName='" + lastName + '\'' +
", email='" + email + '\'' +
", activated=" + activated +
", langKey='" + langKey + '\'' +
", authorities=" + authorities +
"}";
}
}
|
[
"fans_2046@126.com"
] |
fans_2046@126.com
|
98fe8442e743093574870b0bb30c1c90f52b4bc2
|
d7b17b75edb6087072fd6255412951003e599bc6
|
/src/main/java/mpicbg/spim/data/sequence/MissingViews.java
|
5620968211099e8f16e2761c39a9483fb44d65a2
|
[
"BSD-2-Clause"
] |
permissive
|
maarzt/spimdata
|
c1dfdca869e67cf564486f0e0bee3a55ebbd5c4b
|
7624eea43a66106a3248914bbf7e9fb827cf7731
|
refs/heads/master
| 2022-11-26T02:38:55.179987
| 2020-05-24T18:17:26
| 2020-05-24T18:17:26
| 285,536,057
| 0
| 0
|
BSD-2-Clause
| 2020-08-06T09:59:58
| 2020-08-06T09:59:57
| null |
UTF-8
|
Java
| false
| false
| 2,235
|
java
|
/*
* #%L
* SPIM Data: representation of registered, multi-angle, multi-channel (etc.) image sequences
* %%
* Copyright (C) 2013 - 2015 BigDataViewer authors
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* #L%
*/
package mpicbg.spim.data.sequence;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
public class MissingViews
{
/**
* Set of missing {@link ViewId}s.
*/
private Set< ViewId > missingViews;
public MissingViews( final Collection< ? extends ViewId > missingViews )
{
this.missingViews = Collections.unmodifiableSet( new HashSet< ViewId >( missingViews ) );
}
public Set< ViewId > getMissingViews()
{
return missingViews;
}
/**
* @param missingViews
* ordered list of missing views
*/
protected void setMissingViews( final Set< ViewId > missingViews )
{
this.missingViews = Collections.unmodifiableSet( missingViews );
}
protected MissingViews()
{}
}
|
[
"tobias.pietzsch@gmail.com"
] |
tobias.pietzsch@gmail.com
|
36e93d27c6b19863c636465ba2144ecf0bab2545
|
0ec15a0b6ace84332a6a2a65d28bc061418df7c7
|
/src/main/java/org/activityinfo/shared/dto/DTO.java
|
71a32af0b5f34142350f82249897d8895532116b
|
[] |
no_license
|
anujak30/activityinfo
|
cab81065da7562c3f957dc2605da67c16007d863
|
437bddf6cd7c20bf2ae724f9648fe3b2ab13e717
|
refs/heads/master
| 2022-07-05T18:54:28.976740
| 2020-05-14T09:53:40
| 2020-05-14T09:54:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 937
|
java
|
package org.activityinfo.shared.dto;
/*
* #%L
* ActivityInfo Server
* %%
* Copyright (C) 2009 - 2013 UNICEF
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
import org.activityinfo.shared.command.result.CommandResult;
/**
* Marker class for DTOs
*/
public interface DTO extends CommandResult {
}
|
[
"alex@bedatadriven.com"
] |
alex@bedatadriven.com
|
61aaf30593fdd1a700d4a893332cf794695bea7a
|
5108ee647d63e2d1a308020b51ca42f96fe8f3ec
|
/src/main/com/hbliti/example3/ReflactTest.java
|
268b28440415b1f7d937b959d1b404e7a30592c6
|
[] |
no_license
|
lancer82/JavaAdvance
|
ce9ba56d780ba8d1143860aadb060b5f15190b27
|
b345aa8ba39b3e311ea33836c5f321d420565244
|
refs/heads/master
| 2022-11-18T04:42:54.918793
| 2022-08-29T07:25:02
| 2022-08-29T07:25:02
| 249,732,731
| 0
| 0
| null | 2022-11-16T00:56:14
| 2020-03-24T14:38:39
|
Java
|
UTF-8
|
Java
| false
| false
| 4,030
|
java
|
package com.hbliti.example3;
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
public class ReflactTest {
public static void getClassName() {
// 第一种方式 通过对象getClass方法
Person person = new Person("张", "男", "2010-09-10");
Class<?> class1 = person.getClass();
// 第二种方式 通过类的class属性
class1 = Person.class;
try {
// 第三种方式 通过Class类的静态方法——forName()来实现
class1 = Class.forName("com.hbliti.example3.Person");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
static void getClassInfo() {
Person person = new Person("张", "男", "2010-09-10");
Class<?> class1 = person.getClass();
try {
// 第三种方式 通过Class类的静态方法——forName()来实现
class1 = Class.forName("com.hbliti.example3.Person");
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
boolean isPrimitive = class1.isPrimitive();// 判断是否是基础类型
boolean isArray = class1.isArray();// 判断是否是集合类
boolean isAnnotation = class1.isAnnotation();// 判断是否是注解类
boolean isInterface = class1.isInterface();// 判断是否是接口类
boolean isEnum = class1.isEnum();// 判断是否是枚举类
boolean isAnonymousClass = class1.isAnonymousClass();// 判断是否是匿名内部类
boolean isAnnotationPresent = class1
.isAnnotationPresent(Deprecated.class);// 判断是否被某个注解类修饰
String className = class1.getName();// 获取class名字 包含包名路径
Package aPackage = class1.getPackage();// 获取class的包信息
String simpleName = class1.getSimpleName();// 获取class类名
int modifiers = class1.getModifiers();// 获取class访问权限
Class<?>[] declaredClasses = class1.getDeclaredClasses();// 内部类
Class<?> declaringClass = class1.getDeclaringClass(); // 外部类
System.out.print(aPackage + "\t" + simpleName + "\t" + modifiers);
}
static void getFields() {
Class<?> class1 = null;
try {
class1 = Class.forName("com.hbliti.example3.Person");
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Field[] allFields = class1.getDeclaredFields();// 获取class对象的所有属性
Field[] publicFields = class1.getFields();// 获取class对象的public属性
try {
Field nameField = class1.getDeclaredField("name");// 获取class指定属性
Field sexField = class1.getField("sex");// 获取class指定的public属性
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
for (int i = 0; i < allFields.length; i++) {
System.out.println(allFields[i]);
}
}
static void getMethods() {
Class<?> class1 = null;
try {
class1 = Class.forName("com.hbliti.example3.Person");
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Method[] methods = class1.getDeclaredMethods();// 获取class对象的所有声明方法
Method[] allMethods = class1.getMethods();// 获取class对象的所有方法 包括父类的方法
for (int i = 0; i < allMethods.length; i++) {
System.out.println(allMethods[i]);
}
}
static void getConstructors(){
Class<?> class1 = null;
try {
class1 = Class.forName("com.hbliti.example3.Person");
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Constructor<?>[] allConstructors = class1.getDeclaredConstructors();//获取class对象的所有声明构造函数
Constructor<?>[] publicConstructors = class1.getConstructors();//获取class对象public构造函数
for (int i = 0; i < allConstructors.length; i++) {
System.out.println(allConstructors[i]);
}
}
public static void main(String[] args) {
getClassName();
getConstructors();
getClassInfo();
getFields();
getMethods();
}
}
|
[
"lp_job@163.com"
] |
lp_job@163.com
|
8d6a7102786ba7d48dd879abdff155cbd5793072
|
330d41a4ce8fe37676d08ed3acaea757f037a0f5
|
/Lab_10-12/JSTL(table)/src/Tags/LoginTag.java
|
42d10b6844c78649d8e897cbeb8bb083b3b3e323
|
[] |
no_license
|
DenisStolyarov/Java
|
99dd170a67b21b4d7a8a1c3ac438634c03c1990b
|
dc3d86818cade2bfb8307d063742354a533e6c8d
|
refs/heads/master
| 2021-01-04T09:50:38.672044
| 2020-06-08T16:07:17
| 2020-06-08T16:07:17
| 240,495,836
| 0
| 0
| null | 2020-10-13T22:39:13
| 2020-02-14T11:43:28
|
Java
|
UTF-8
|
Java
| false
| false
| 508
|
java
|
package Tags;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.SimpleTagSupport;
import java.io.IOException;
public class LoginTag extends SimpleTagSupport {
String value;
public void setValue(String value){
this.value = value;
}
@Override
public void doTag() throws JspException, IOException {
JspWriter out = getJspContext().getOut();
out.print("<input type=\"submit\" value=\""+value+"\">");
}
}
|
[
"you@example.com"
] |
you@example.com
|
356acf55f8133100349103f1fa31235728d3f95d
|
b2b4a6bab187aaa35f5bfc324f0ef07d37c8914a
|
/tree/L297.java
|
609609bab5fd6801a0eb9a57bea9fde516dcbf22
|
[] |
no_license
|
fyiyu091/Leetcode
|
7dd908a39bde4c019bda98038538ddcbfaf2e9c7
|
54c0a823cbf742f4693bb8c7824d9d67221fc5bb
|
refs/heads/master
| 2023-07-19T05:37:41.645801
| 2021-08-31T03:25:25
| 2021-08-31T03:25:25
| 275,048,455
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,714
|
java
|
package tree;
import java.util.LinkedList;
import java.util.Queue;
public class L297 {
// Encodes a tree to a single string.
public String serialize(TreeNode root) {
if (root == null) return "";
Queue<TreeNode> queue = new LinkedList<>();
StringBuilder sb = new StringBuilder();
queue.offer(root);
while (!queue.isEmpty()) {
TreeNode curr = queue.poll();
if (curr != null) {
sb.append(curr.val + ",");
queue.offer(curr.left);
queue.offer(curr.right);
}
else {
sb.append("#,");
}
}
sb.setLength(sb.length() - 1);
return sb.toString();
}
// Decodes your encoded data to tree.
public TreeNode deserialize(String data) {
if (data == null || data.length() == 0) return null;
String[] arr = data.split(",");
Queue<TreeNode> queue = new LinkedList<>();
TreeNode res = generateNode(arr, 0);
TreeNode root = res;
int i = 0;
queue.offer(root);
while (!queue.isEmpty()) {
TreeNode curr = queue.poll();
curr.left = generateNode(arr, ++i);
curr.right = generateNode(arr, ++i);
if (curr.left != null) {
queue.offer(curr.left);
}
if (curr.right != null) {
queue.offer(curr.right);
}
}
return res;
}
private TreeNode generateNode(String[] arr, int i) {
if (!arr[i].equals("#")) {
return new TreeNode(Integer.valueOf(arr[i]));
}
else {
return null;
}
}
}
|
[
"yiyu091@gmail.com"
] |
yiyu091@gmail.com
|
b855ac4ad5edbfa635d89a63a00f6bb9752956ff
|
86c7010256aab13d6bcdedd6f12889f77965e905
|
/site/service/src/main/java/com/emc/ocopea/site/DeployedApplicationMessageBroker.java
|
0bd4db1457db3d7196c10f1328395702ad95e378
|
[
"MIT"
] |
permissive
|
ocopea/orcs
|
6c45f677f978c7ed2fa3b10c6cb45c4d76e9936e
|
3a21a172c4712e6c24d558911017551132bac5fa
|
refs/heads/master
| 2021-01-23T09:45:40.131201
| 2017-11-14T13:45:27
| 2017-11-14T15:24:38
| 102,596,286
| 6
| 3
|
NOASSERTION
| 2019-03-25T21:01:45
| 2017-09-06T10:37:53
|
Java
|
UTF-8
|
Java
| false
| false
| 3,898
|
java
|
// Copyright (c) [2017] Dell Inc. or its subsidiaries. All Rights Reserved.
package com.emc.ocopea.site;
import com.emc.microservice.Context;
import com.emc.microservice.dependency.ManagedDependency;
import com.emc.microservice.messaging.Message;
import com.emc.microservice.messaging.MessageListener;
import com.emc.microservice.schedule.ManagedScheduler;
import com.emc.microservice.singleton.ServiceLifecycle;
import com.emc.ocopea.protection.ProtectionWebAPI;
import com.emc.ocopea.site.app.DeployedApplicationEvent;
import com.emc.ocopea.site.app.DeployedApplicationEventConsumer;
import com.emc.ocopea.site.app.DeployedApplicationEventRepository;
import com.emc.ocopea.site.app.DeployedApplicationLoader;
import com.emc.ocopea.site.app.DeployedApplicationPersisterService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class DeployedApplicationMessageBroker implements MessageListener, ServiceLifecycle {
private static final Logger log = LoggerFactory.getLogger(DeployedApplicationMessageBroker.class);
private DeployedApplicationEventConsumer consumer;
private LoggingWebSocketsManager loggingWebSocketsManager;
private DeployedApplicationEventLogMessageTranslator deployedApplicationEventLogMessageTranslator;
@Override
public void init(Context context) {
final ManagedScheduler scheduler =
context.getSchedulerManager().getManagedResourceByName("default");
deployedApplicationEventLogMessageTranslator = new DeployedApplicationEventLogMessageTranslator();
this.loggingWebSocketsManager = context.getSingletonManager()
.getManagedResourceByName(LoggingWebSocketsManager.class.getSimpleName()).getInstance();
DeployedApplicationEventRepository deployedApplicationEventRepository = context.getDynamicJavaServicesManager()
.getManagedResourceByName(DeployedApplicationEventRepository.class.getSimpleName()).getInstance();
ManagedDependency protectionPolicyDependency =
context.getDependencyManager().getManagedResourceByName("protection");
consumer = new DeployedApplicationEventConsumer(
new DeployedApplicationLoader(deployedApplicationEventRepository),
policyType -> protectionPolicyDependency.getWebAPI(ProtectionWebAPI.class),
context.getWebAPIResolver(),
scheduler,
context.getServiceDiscoveryManager(),
context.getSingletonManager().getManagedResourceByName("site-singleton").getInstance(),
new DeployedApplicationPersisterService(
context.getDestinationManager()
.getManagedResourceByName(
"pending-deployed-application-events").getMessageSender()));
}
@Override
public void shutDown() {
}
@Override
public void onMessage(Message message, Context context) {
final DeployedApplicationEvent deployedApplicationEvent = message.readObject(DeployedApplicationEvent.class);
log.debug("Received event {}", deployedApplicationEvent);
consumer.accept(deployedApplicationEvent);
logMessage(deployedApplicationEvent);
}
private void logMessage(DeployedApplicationEvent deployedApplicationEvent) {
try {
final SiteLogMessageDTO logMessage =
deployedApplicationEventLogMessageTranslator.apply(deployedApplicationEvent);
if (logMessage != null) {
loggingWebSocketsManager.publish(deployedApplicationEvent.getAppInstanceId(), logMessage);
}
} catch (Exception ex) {
log.warn("Failed publishing log message for " + deployedApplicationEvent.toString(), ex);
}
}
@Override
public void onErrorMessage(Message message, Context context) {
}
}
|
[
"amit.lieberman@emc.com"
] |
amit.lieberman@emc.com
|
ffa0f46c931b0cc4765fe3556817a4e530d39b37
|
279bffecb84102ab7a91726607a5e4c1d18e961f
|
/seckill/seckill-web/src/main/java/com/qcloud/component/seckill/web/handler/impl/ScreeningsSlideHandlerImpl.java
|
43e1c7aa56a697ea561cdac048cd4e246f356219
|
[] |
no_license
|
ChiRains/forest
|
8b71de51c477f66a134d9b515b58039a8c94c2ee
|
cf0b41ff83e4cee281078afe338bba792de05052
|
refs/heads/master
| 2021-01-19T07:13:19.597344
| 2016-08-18T01:35:54
| 2016-08-18T01:35:54
| 65,869,894
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,557
|
java
|
package com.qcloud.component.seckill.web.handler.impl;
import java.util.ArrayList;
import java.util.List;
import org.springframework.stereotype.Component;
import com.qcloud.pirates.core.json.Json;
import com.qcloud.component.seckill.web.handler.ScreeningsSlideHandler;
import com.qcloud.component.seckill.model.ScreeningsSlide;
import com.qcloud.component.seckill.web.vo.ScreeningsSlideVO;
import com.qcloud.component.seckill.web.vo.admin.AdminScreeningsSlideVO;
@Component
public class ScreeningsSlideHandlerImpl implements ScreeningsSlideHandler {
@Override
public List<ScreeningsSlideVO> toVOList(List<ScreeningsSlide> list){
List<ScreeningsSlideVO> voList = new ArrayList<ScreeningsSlideVO>();
for (ScreeningsSlide screeningsSlide : list) {
voList.add(toVO(screeningsSlide));
}
return voList;
}
@Override
public ScreeningsSlideVO toVO(ScreeningsSlide screeningsSlide){
String json = Json.toJson(screeningsSlide);
return Json.toObject(json, ScreeningsSlideVO.class, true);
}
@Override
public List<AdminScreeningsSlideVO> toVOList4Admin(List<ScreeningsSlide> list){
List<AdminScreeningsSlideVO> voList = new ArrayList<AdminScreeningsSlideVO>();
for (ScreeningsSlide adminScreeningsSlide : list) {
voList.add(toVO4Admin(adminScreeningsSlide));
}
return voList;
}
@Override
public AdminScreeningsSlideVO toVO4Admin(ScreeningsSlide screeningsSlide){
String json = Json.toJson(screeningsSlide);
return Json.toObject(json, AdminScreeningsSlideVO.class, true);
}
}
|
[
"dengfei@ed19df75-bd51-b445-9863-9e54940520a8"
] |
dengfei@ed19df75-bd51-b445-9863-9e54940520a8
|
5629a184a57faee72a4d31090a742e63e8c47351
|
f9fcde801577e7b9d66b0df1334f718364fd7b45
|
/icepdf-4.0.0-Beta/icepdf/core/src/org/icepdf/core/pobjects/graphics/Separation.java
|
a1c4060a449facfe9ed7f4465a12a55d429905ad
|
[] |
no_license
|
numbnet/icepdf_FULL-versii
|
86d74147dc107e4f2239cd4ac312f15ebbeec473
|
b67e1ecb60aca88cacdca995d24263651cf8296b
|
refs/heads/master
| 2021-01-12T11:13:57.107091
| 2016-11-04T16:43:45
| 2016-11-04T16:43:45
| 72,880,329
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,754
|
java
|
/*
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* "The contents of this file are subject to the Mozilla Public License
* Version 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations under
* the License.
*
* The Original Code is ICEpdf 3.0 open source software code, released
* May 1st, 2009. The Initial Developer of the Original Code is ICEsoft
* Technologies Canada, Corp. Portions created by ICEsoft are Copyright (C)
* 2004-2009 ICEsoft Technologies Canada, Corp. All Rights Reserved.
*
* Contributor(s): _____________________.
*
* Alternatively, the contents of this file may be used under the terms of
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"
* License), in which case the provisions of the LGPL License are
* applicable instead of those above. If you wish to allow use of your
* version of this file only under the terms of the LGPL License and not to
* allow others to use your version of this file under the MPL, indicate
* your decision by deleting the provisions above and replace them with
* the notice and other provisions required by the LGPL License. If you do
* not delete the provisions above, a recipient may use your version of
* this file under either the MPL or the LGPL License."
*
*/
package org.icepdf.core.pobjects.graphics;
import org.icepdf.core.pobjects.Name;
import org.icepdf.core.pobjects.functions.Function;
import org.icepdf.core.util.ColorUtil;
import org.icepdf.core.util.Library;
import java.awt.*;
import java.util.Hashtable;
/**
* <p>Separation Color Space background:</p>
* <ul>
* <p>Color output devices produce full color by combining primary or process
* colorants in varying amounts. On an additive color device such as a display,
* the primary colorants consist of red, green, and blue phosphors; on a
* subtractive device such as a printer, they typically consist of cyan, magenta,
* yellow, and sometimes black inks. In addition, some devices can apply special
* colorants, often called spot colorants, to produce effects that cannot be
* achieved with the standard process colorants alone. Examples include metallic
* and fluorescent colors and special textures.</p>
* </ul>
* <p>A Separation color space (PDF 1.2) provides a means for specifying the use
* of additional colorants or for isolating the control of individual color
* components of a device color space for a subtractive device. When such a space
* is the current color space, the current color is a single-component value,
* called a tint, that controls the application of the given colorant or color
* components only.</p>
* <p>A Separation color space is defined as follows:<br />
* [/Separation name alternateSpace tintTransform]
* </p>
* <ul>
* <li>The <i>alternateSpace</i> parameter must be an array or name object that
* identifies the alternate color space, which can be any device or
* CIE-based color space but not another special color space (Pattern,
* Indexed, Separation, or DeviceN).</li>
* <li>The <i>tintTransform</i> parameter must be a function (currently only suppports
* type 0 and type2 ). During subsequent painting operations, an application
* calls this function to transform a tint value into color component values
* in the alternate color space. The function is called with the tint value
* and must return the corresponding color component values. That is, the
* number of components and the interpretation of their values depend on the
* alternate color space.</li>
* </ul>
*
* @since 1.0
*/
public class Separation extends PColorSpace {
// named colour reference if valid conversion took place
protected Color namedColor;
// alternative colour space, named colour can not be resolved.
protected PColorSpace alternate;
// transform for colour tint, named function type
protected Function tintTransform;
/**
* Create a new Seperation colour space. Separation is specified using
* [/Seperation name alternateSpace tintTransform]
*
* @param l library
* @param h dictionary entries
* @param name name of colourspace, always seperation
* @param alternateSpace name of alternative colour space
* @param tintTransform function which defines the tint transform
*/
protected Separation(Library l, Hashtable h, Object name, Object alternateSpace, Object tintTransform) {
super(l, h);
alternate = getColorSpace(l, alternateSpace);
this.tintTransform = Function.getFunction(l, l.getObject(tintTransform));
// see if name can be converted to a known colour.
if (name instanceof Name) {
String colorName = ((Name) name).getName();
// get colour value if any
int colorVaue = ColorUtil.convertNamedColor(colorName.toLowerCase());
if (colorVaue != -1) {
namedColor = new Color(colorVaue);
}
}
}
/**
* Returns the number of components in this colour space.
*
* @return number of components
*/
public int getNumComponents() {
return 1;
}
/**
* Gets the colour in RGB represened by the array of colour components
*
* @param components array of component colour data
* @return new RGB colour composed from the components array.
*/
public Color getColor(float[] components) {
// return the named colour if it was resolved, otherwise assemble the
// alternative colour.
if (namedColor != null) {
return namedColor;
}
// the function couldn't be initiated then use the alternative colour
// space. The alternate colour space can be any device or CIE-based
// colour space. However Separation is usually specified using only one
// component so we must generate
if (tintTransform == null) {
float colour = components[0];
// copy the colour values into the needed length of the alternate colour
float[] alternateColour = new float[alternate.getNumComponents()];
for (int i = 0, max = alternate.getNumComponents(); i < max; i++) {
alternateColour[i] = colour;
}
return alternate.getColor(alternateColour);
}
float y[] = tintTransform.calculate(components);
return alternate.getColor(reverse(y));
}
}
|
[
"patrick.corless@8668f098-c06c-11db-ba21-f49e70c34f74"
] |
patrick.corless@8668f098-c06c-11db-ba21-f49e70c34f74
|
a978f727f29dd32a279bf8cef7d708b29bccadde
|
62fc9eff46f60ea5f6f3d317dee3cbfea59847ed
|
/smack-core/src/test/java/org/jivesoftware/smack/util/InternetAddressTest.java
|
b9cde1c2b7dd0cb5326f7d49e37acec7894e37f9
|
[
"Apache-2.0"
] |
permissive
|
igniterealtime/Smack
|
6308e11041bbbc23fef2cc3109425ea77f4816b8
|
19b20fefeca69cccc3637e01ec2f151a054a3351
|
refs/heads/master
| 2023-09-05T21:24:00.219050
| 2023-04-26T11:35:04
| 2023-04-26T11:35:04
| 16,477,702
| 2,483
| 1,026
|
Apache-2.0
| 2023-06-24T10:38:10
| 2014-02-03T11:36:51
|
Java
|
UTF-8
|
Java
| false
| false
| 1,259
|
java
|
/**
*
* Copyright 2023 Florian Schmaus.
*
* 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.jivesoftware.smack.util;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
public class InternetAddressTest {
@Test
public void testFromIgnoringZoneId() {
assertInternetAddressEqualsIgnoringZoneId("fe80::641a:cdff:febd:d665", "fe80::641a:cdff:febd:d665%dummy0");
}
private static void assertInternetAddressEqualsIgnoringZoneId(String expected, String input) {
InternetAddress internetAddress = InternetAddress.fromIgnoringZoneId(input);
assertEquals(expected, internetAddress.toString());
assertEquals(input, internetAddress.getRaw());
}
}
|
[
"flo@geekplace.eu"
] |
flo@geekplace.eu
|
d6a1bf21b7215ac9fb82ca3e6dec5a31df363dce
|
1896b305a64899d8a89c260c8624519062cfe515
|
/src/main/java/ru/betterend/effects/EndPotions.java
|
521ff92a9a9fc6d369b71c5143a0115265577790
|
[
"MIT"
] |
permissive
|
zorc/BetterEnd
|
66c2e67c86b82bcabbe32e00741cfddbad6058df
|
bea2bef853f3ef56b79d1d763f94ffb1f8b9cf05
|
refs/heads/master
| 2023-02-25T00:38:11.328300
| 2021-02-01T03:20:24
| 2021-02-01T03:20:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,409
|
java
|
package ru.betterend.effects;
import net.minecraft.entity.effect.StatusEffect;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.item.Items;
import net.minecraft.potion.Potion;
import net.minecraft.potion.Potions;
import net.minecraft.util.registry.Registry;
import ru.betterend.BetterEnd;
import ru.betterend.mixin.common.BrewingAccessor;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndItems;
public class EndPotions {
public final static Potion END_VEIL = registerPotion("end_veil", EndStatusEffects.END_VEIL, 3600);
public final static Potion LONG_END_VEIL = registerPotion("long_end_veil", EndStatusEffects.END_VEIL, 9600);
public static Potion registerPotion(String name, StatusEffect effect, int duration) {
return registerPotion(name, new Potion(name, new StatusEffectInstance[]{ new StatusEffectInstance(effect, duration) }));
}
public static Potion registerPotion(String name, Potion potion) {
return Registry.register(Registry.POTION, BetterEnd.makeID(name), potion);
}
public static void register() {
BrewingAccessor.callRegisterPotionRecipe(Potions.AWKWARD, EndItems.ENDER_DUST, END_VEIL);
BrewingAccessor.callRegisterPotionRecipe(END_VEIL, Items.REDSTONE, LONG_END_VEIL);
BrewingAccessor.callRegisterPotionRecipe(Potions.AWKWARD, EndBlocks.MURKWEED.asItem(), Potions.NIGHT_VISION);
}
}
|
[
"paulevs@yandex.ru"
] |
paulevs@yandex.ru
|
34a699776d738ecb6306164732409a656a364f8c
|
57b27041ab97f9ac1e995479254ab59f00100c74
|
/src/com/patterns/creational/abstractfactory/transport/impl/aircraft/TU134.java
|
02dff358a39741ba05b909938fbce93225edcbf9
|
[] |
no_license
|
Home-Java8/Java8
|
44725aed0d579f89b689c9c1231ef72246cac1ab
|
f184af2a150f25f8a57c31a2ec826649fc731270
|
refs/heads/master
| 2016-09-05T10:27:03.752381
| 2015-06-11T22:51:32
| 2015-06-11T22:51:32
| 35,859,077
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 300
|
java
|
package com.patterns.creational.abstractfactory.transport.impl.aircraft;
import com.patterns.creational.abstractfactory.transport.interfaces.Aircraft;
public class TU134 implements Aircraft{
@Override
public void flight() {
System.out.println("TU-134 flight!");
}
}
|
[
"dn200978lak@gmail.com"
] |
dn200978lak@gmail.com
|
5ba16afd71c7969a8543243a6715289784e8832d
|
8b9afd6d8ef17fae81f0ea47f8c6b47e457bf931
|
/testapps/GHIssues/src/main/java/ghissues/Gh797.java
|
50b00d95a92913c783855459829d8ed0f4e63f0b
|
[
"ISC",
"Apache-2.0",
"MIT"
] |
permissive
|
oshatrk/actframework
|
89749ca455bd9e8d33b7eb58bb216e36b034a5d9
|
3e055bba95ffc33eb4ec856712f99849847c5522
|
refs/heads/master
| 2020-06-22T04:25:07.677686
| 2019-07-02T22:38:08
| 2019-07-02T22:38:08
| 197,632,120
| 0
| 0
|
Apache-2.0
| 2019-07-18T17:45:11
| 2019-07-18T17:45:10
| null |
UTF-8
|
Java
| false
| false
| 380
|
java
|
package ghissues;
import act.controller.annotation.UrlContext;
import act.util.JsonView;
import org.osgl.mvc.annotation.GetAction;
import java.util.Date;
@UrlContext("797")
@JsonView
public class Gh797 extends BaseController {
public static class Foo {
public Date date = new Date();
}
@GetAction
public Foo foo() {
return new Foo();
}
}
|
[
"greenlaw110@gmail.com"
] |
greenlaw110@gmail.com
|
ae87438fe227a723cce3f8f22295cbcccd97ae5b
|
c65fb0fe3971335a22f21e096aee62e98110f3e1
|
/config-center-server/src/main/java/com/bbytes/ccenter/domain/CCProject.java
|
13086f5406b0776be3b5af6e311ef68ac7d42689
|
[] |
no_license
|
dongbin86/config-center
|
c5a898cfbc31323c69a3c62498ba8623336cd028
|
f132d117e5d8d58a438e7257919b1e6ed68975e8
|
refs/heads/master
| 2021-05-28T02:39:44.842724
| 2014-11-09T13:24:23
| 2014-11-09T13:24:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,107
|
java
|
package com.bbytes.ccenter.domain;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.NotNull;
import org.joda.time.LocalDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
import com.bbytes.ccenter.domain.custom.CustomLocalDateSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.joda.deser.LocalDateDeserializer;
/**
* A CCProject.
*/
@Document(collection = "T_CCPROJECT")
public class CCProject implements Serializable {
private static final long serialVersionUID = -7647962788378221105L;
@Id
private String id;
@Field("project_name")
private String projectName;
@NotNull
@JsonDeserialize(using = LocalDateDeserializer.class)
@JsonSerialize(using = CustomLocalDateSerializer.class)
@Field("creation_date")
private LocalDate creationDate;
@NotNull
@JsonDeserialize(using = LocalDateDeserializer.class)
@JsonSerialize(using = CustomLocalDateSerializer.class)
@Field("update_date")
private LocalDate updateDate;
@Field("owner")
private String owner;
@Field("environment")
private Environment environment;
@DBRef
private List<CCProperty> properties;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public LocalDate getCreationDate() {
return creationDate;
}
public void setCreationDate(LocalDate creationDate) {
this.creationDate = creationDate;
}
public LocalDate getUpdateDate() {
return updateDate;
}
public void setUpdateDate(LocalDate updateDate) {
this.updateDate = updateDate;
}
public List<CCProperty> getProperties() {
return properties;
}
public void setProperties(List<CCProperty> properties) {
this.properties = properties;
}
public void addProperty(CCProperty property) {
if (this.properties == null) {
this.properties = new ArrayList<>();
}
this.properties.add(property);
}
public Environment getEnvironment() {
return environment;
}
public void setEnvironment(Environment environment) {
this.environment = environment;
}
public String getOwner() {
return owner;
}
public void setOwner(String owner) {
this.owner = owner;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CCProject ccproject = (CCProject) o;
if (!projectName.equals(ccproject.projectName)) {
return false;
}
return true;
}
@Override
public int hashCode() {
return projectName != null ? projectName.hashCode() : 0;
}
@Override
public String toString() {
return "CCProject{" + "id=" + projectName + "}'";
}
}
|
[
"tm@beyondbytes.co.in"
] |
tm@beyondbytes.co.in
|
a0ca359f21811a88280090dd9242bfd14428b7ee
|
cd82a3f9d1b9e3f43215227d52bad72ec11ff6cd
|
/samples/IntentOperationWithActionDial/entry/src/main/java/com/waylau/hmos/intentoperationwithactiondial/slice/MainAbilitySlice.java
|
2ed762572990a7a8dee0d120d6cd7a0a0281187a
|
[] |
no_license
|
riomarksafk/harmonyos-tutorial
|
f7387c9c3ad174fb51df90158951b404fdbcea50
|
82ee94e57532c827b3fa033bef95dcb787173496
|
refs/heads/master
| 2023-09-03T14:01:33.720992
| 2021-11-22T13:51:52
| 2021-11-22T13:51:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,100
|
java
|
package com.waylau.hmos.intentoperationwithactiondial.slice;
import com.waylau.hmos.intentoperationwithactiondial.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.aafwk.content.Operation;
import ohos.agp.components.Text;
import ohos.hiviewdfx.HiLog;
import ohos.hiviewdfx.HiLogLabel;
import ohos.utils.IntentConstants;
import ohos.utils.net.Uri;
public class MainAbilitySlice extends AbilitySlice {
private static final String TAG = MainAbilitySlice.class.getSimpleName();
private static final HiLogLabel LABEL_LOG =
new HiLogLabel(HiLog.LOG_APP, 0x00001, TAG);
@Override
public void onStart(Intent intent) {
super.onStart(intent);
super.setUIContent(ResourceTable.Layout_ability_main);
// 添加点击事件来触发请求
Text text = (Text) findComponentById(ResourceTable.Id_text_helloworld);
// text.setClickedListener(listener -> this.doCall());
text.setClickedListener(listener -> this.doCall("18088888888"));
}
private void doCall() {
this.doCall(null);
}
private void doCall(String destinationNum) {
HiLog.info(LABEL_LOG, "before doCall");
Operation operation;
if (destinationNum == null) {
operation = new Intent.OperationBuilder()
.withAction(IntentConstants.ACTION_DIAL) // 系统应用拨号盘
.build();
} else {
operation = new Intent.OperationBuilder()
.withAction(IntentConstants.ACTION_DIAL) // 系统应用拨号盘
.withUri(Uri.parse("tel:" + destinationNum)) // 设置号码
.build();
}
Intent intent = new Intent();
intent.setOperation(operation);
// 启动Ability
startAbility(intent);
HiLog.info(LABEL_LOG, "after doCall");
}
@Override
public void onActive() {
super.onActive();
}
@Override
public void onForeground(Intent intent) {
super.onForeground(intent);
}
}
|
[
"waylau521@gmail.com"
] |
waylau521@gmail.com
|
b572468e02813163d9d9c3edf0adcd51629cf3ed
|
064d8c2d0dfd9c56465c783e62d22daa023f4791
|
/src/textprocessing/src/main/java/eu/modernmt/processing/detokenizer/Detokenizer.java
|
8d4759d4fce7b6f522843719bb6e5d00564bbf3f
|
[
"Apache-2.0"
] |
permissive
|
loretoparisi/MMT
|
e743a3933aad0166593ce407b6c1053bfe4850b9
|
7438210d2942e6d838381398093f7d2f395e143e
|
refs/heads/master
| 2020-04-29T23:34:58.937297
| 2019-03-11T15:44:11
| 2019-03-11T15:44:11
| 176,480,732
| 1
| 0
| null | 2019-03-19T09:58:06
| 2019-03-19T09:58:05
| null |
UTF-8
|
Java
| false
| false
| 511
|
java
|
package eu.modernmt.processing.detokenizer;
import eu.modernmt.lang.Language;
import eu.modernmt.lang.UnsupportedLanguageException;
import eu.modernmt.model.Translation;
import eu.modernmt.processing.TextProcessor;
/**
* Created by davide on 26/01/16.
*/
public abstract class Detokenizer extends TextProcessor<Translation, Translation> {
public Detokenizer(Language sourceLanguage, Language targetLanguage) throws UnsupportedLanguageException {
super(sourceLanguage, targetLanguage);
}
}
|
[
"davide.caroselli@translated.net"
] |
davide.caroselli@translated.net
|
d998077942c13315fc56c17d0c8f511920769ae9
|
a901abdca092650e0eb277f04c988200796b1d7d
|
/aart-main/aart-web/src/main/java/edu/ku/cete/model/TestTypeDao.java
|
f935a651b83a303c90837d27dbdc93cd6f57562c
|
[] |
no_license
|
krishnamohankaruturi/secret
|
5acafbde49b9fa9e24f89534d14e7b01f863f775
|
4da83d113d3620d4c2c84002fecbe4bdd759c1a2
|
refs/heads/master
| 2022-03-24T22:09:41.325033
| 2019-11-15T12:14:07
| 2019-11-15T12:14:07
| 219,771,956
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,327
|
java
|
package edu.ku.cete.model;
import edu.ku.cete.domain.TestType;
import edu.ku.cete.domain.TestTypeExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TestTypeDao {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table testtype
*
* @mbggenerated Fri Sep 27 18:08:59 CDT 2013
*/
int countByExample(TestTypeExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table testtype
*
* @mbggenerated Fri Sep 27 18:08:59 CDT 2013
*/
int deleteByExample(TestTypeExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table testtype
*
* @mbggenerated Fri Sep 27 18:08:59 CDT 2013
*/
int deleteByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table testtype
*
* @mbggenerated Fri Sep 27 18:08:59 CDT 2013
*/
int insert(TestType record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table testtype
*
* @mbggenerated Fri Sep 27 18:08:59 CDT 2013
*/
int insertSelective(TestType record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table testtype
*
* @mbggenerated Fri Sep 27 18:08:59 CDT 2013
*/
List<TestType> selectByExample(TestTypeExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table testtype
*
* @mbggenerated Fri Sep 27 18:08:59 CDT 2013
*/
TestType selectByPrimaryKey(Long id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table testtype
*
* @mbggenerated Fri Sep 27 18:08:59 CDT 2013
*/
int updateByExampleSelective(@Param("record") TestType record, @Param("example") TestTypeExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table testtype
*
* @mbggenerated Fri Sep 27 18:08:59 CDT 2013
*/
int updateByExample(@Param("record") TestType record, @Param("example") TestTypeExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table testtype
*
* @mbggenerated Fri Sep 27 18:08:59 CDT 2013
*/
int updateByPrimaryKeySelective(TestType record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table testtype
*
* @mbggenerated Fri Sep 27 18:08:59 CDT 2013
*/
int updateByPrimaryKey(TestType record);
TestType selectByCode(@Param("code")String code);
List<TestType> selectByAssessmentId(@Param("assessmentId") Long assessmentId);
List<TestType> getByAssessmentProgram(@Param("assessmentProgramId") Long assessmentProgramId);
List<TestType> getCPASSTestTypesForReportsByTestTypeCode(@Param("testingProgramId") Long testingProgramId,
@Param("testType") String testType);
}
|
[
"Venkatakrishna.k@CTL.local"
] |
Venkatakrishna.k@CTL.local
|
58f1922c58149e10e2af78c97727d66aaffd4594
|
1f5c68f68b12b314d062c8c94b4824a533b4a7a3
|
/com/planet_ink/coffee_mud/Abilities/Languages/Orcish.java
|
1850401fbca0553a350bc63eb4773d6b8af963d6
|
[
"Apache-2.0"
] |
permissive
|
leonlee/CoffeeMud
|
ff29abc60a77d03675375a9097572780a14b86c3
|
c35383fc53bd3947b6b8579a581e9eb792e15ef9
|
refs/heads/master
| 2020-06-09T15:47:32.771688
| 2016-12-08T07:12:47
| 2016-12-08T07:12:47
| 76,030,486
| 1
| 0
| null | 2016-12-09T11:38:35
| 2016-12-09T11:38:34
| null |
UTF-8
|
Java
| false
| false
| 2,594
|
java
|
package com.planet_ink.coffee_mud.Abilities.Languages;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2002-2016 Bo Zimmerman
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.
*/
public class Orcish extends StdLanguage
{
@Override
public String ID()
{
return "Orcish";
}
private final static String localizedName = CMLib.lang().L("Orcish");
@Override
public String name()
{
return localizedName;
}
public static List<String[]> wordLists=null;
public Orcish()
{
super();
}
@Override
public List<String[]> translationVector(String language)
{
if(wordLists==null)
{
final String[] one={"a"};
final String[] two={"uk","ik","og","eg","ak","ag"};
final String[] three={"uko","ugg","ick","ehk","akh","oog"};
final String[] four={"blec","mugo","guck","gook","kill","dead","twak","kwat","klug"};
final String[] five={"bleko","thwak","klarg","gluck","kulgo","mucka","splat","kwath","garth","blark"};
final String[] six={"kalarg","murder","bleeke","kwargh","guttle","thungo"};
wordLists=new Vector<String[]>();
wordLists.add(one);
wordLists.add(two);
wordLists.add(three);
wordLists.add(four);
wordLists.add(five);
wordLists.add(six);
}
return wordLists;
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
94856b35f3ab0b6804970631d967751d22441de5
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.horizon-Horizon/sources/com/oculus/horizon/service/Boolean_com_google_inject_name_Named_ULUNDERSCORE_oculus_ULUNDERSCORE_link_ULUNDERSCORE_no_ULUNDERSCORE_modalMethodAutoPro.java
|
af665333f292832859cba358c8fdee07644f6822
|
[] |
no_license
|
phwd/quest-tracker
|
286e605644fc05f00f4904e51f73d77444a78003
|
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
|
refs/heads/main
| 2023-03-29T20:33:10.959529
| 2021-04-10T22:14:11
| 2021-04-10T22:14:11
| 357,185,040
| 4
| 2
| null | 2021-04-12T12:28:09
| 2021-04-12T12:28:08
| null |
UTF-8
|
Java
| false
| false
| 544
|
java
|
package com.oculus.horizon.service;
import X.AnonymousClass0J3;
import com.facebook.annotations.Generated;
import com.oculus.config.ConfigController;
@Generated({"By: InjectorProcessor"})
public class Boolean_com_google_inject_name_Named_ULUNDERSCORE_oculus_ULUNDERSCORE_link_ULUNDERSCORE_no_ULUNDERSCORE_modalMethodAutoProvider extends AnonymousClass0J3<Boolean> {
public Boolean get() {
return OVRModule.provideEnableLinkNoModal(ConfigController._UL__ULSEP_com_oculus_config_ConfigController_ULSEP_ACCESS_METHOD(this));
}
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
6276bdeb2a5481e934045722a24cc418597e73ed
|
b163dcbd452f507fdd6c07095c6e24d050cc99fd
|
/src/main/java/com/strings/BackspaceStringCompare.java
|
1fca1aeb46ec23f228d8e304ec1b54ff7015b617
|
[] |
no_license
|
Shawn0630/Leetcode-Java
|
4d98170aceeffcf8a162f0b9d7c91c45b12ea992
|
652acdf08f8818236748992c18eebb6eac135c5c
|
refs/heads/master
| 2022-07-09T17:48:30.084413
| 2022-07-03T23:10:45
| 2022-07-03T23:10:45
| 152,835,428
| 0
| 0
| null | 2022-05-20T22:15:15
| 2018-10-13T04:35:57
|
Java
|
UTF-8
|
Java
| false
| false
| 1,256
|
java
|
package com.strings;
public class BackspaceStringCompare {
public boolean backspaceCompare(String s, String t) {
char[] sc = s.toCharArray();
char[] tc = t.toCharArray();
int i = 0;
int idx = 0;
while (i < s.length()) {
if (sc[i] == '#') {
if (idx > 0) {
idx--;
}
} else {
sc[idx++] = sc[i];
}
i++;
}
int j = 0;
int jdx = 0;
while (j < t.length()) {
if (tc[j] == '#') {
if (jdx > 0) {
jdx--;
}
} else {
tc[jdx++] = tc[j];
}
j++;
}
if (idx != jdx) {
return false;
}
return isSame(sc, tc, idx);
}
private boolean isSame(char[] sc, char[] tc, int size) {
for(int i = 0; i < size; i++) {
if (sc[i] != tc[i]) return false;
}
return true;
}
public static void main(String[] args) {
BackspaceStringCompare backspaceStringCompare = new BackspaceStringCompare();
backspaceStringCompare.backspaceCompare("y#fo##f", "y#f#o##f");
}
}
|
[
"sf.jiang.ca@gmail.com"
] |
sf.jiang.ca@gmail.com
|
d72a1697cbe9ed243c426b3ecf88895468382022
|
b81a04911345130ee444b9f4cf8ed0d575debd0d
|
/webapp/src/main/java/com/iuni/data/webapp/controller/distribution/PositiveController.java
|
a20626490c42dbfffb62ef5689e911d9507140e6
|
[] |
no_license
|
hedgehog-zowie/DA
|
7b505deaca858867650736e8a18bef0fbf492a83
|
2150618b378963eb15a5d359a0e7a4e3ca07ff83
|
refs/heads/master
| 2021-01-20T09:01:24.392395
| 2016-04-06T23:16:34
| 2016-04-06T23:16:34
| 37,307,131
| 4
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,810
|
java
|
package com.iuni.data.webapp.controller.distribution;
import com.iuni.data.persist.model.distribution.FreightQueryDto;
import com.iuni.data.persist.model.distribution.FreightTableDto;
import com.iuni.data.persist.model.distribution.PositiveQueryDto;
import com.iuni.data.persist.model.distribution.PositiveTableDto;
import com.iuni.data.utils.ExcelUtils;
import com.iuni.data.utils.JsonUtils;
import com.iuni.data.utils.StringUtils;
import com.iuni.data.webapp.common.PageName;
import com.iuni.data.webapp.service.distribution.PositiveService;
import com.iuni.data.webapp.service.distribution.ShippingService;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* @author Nicholas
* Email: nicholas.chen@iuni.com
*/
@Controller("positiveControllerOfDistribution")
@RequestMapping("/distribution/positive")
public class PositiveController {
private static final Logger logger = LoggerFactory.getLogger(PositiveController.class);
@Autowired
private PositiveService positiveService;
@RequestMapping
public ModelAndView queryTable() {
PositiveQueryDto queryParam= new PositiveQueryDto();
queryParam.setDateRangeString(StringUtils.getLastSevenDaysRangeString());
return queryTable(queryParam);
}
@RequestMapping("query")
public ModelAndView queryTable(@ModelAttribute("queryParam") PositiveQueryDto queryParam) {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName(PageName.distribution_positive.getPath());
queryParam.parseDateRangeString();
List<PositiveTableDto> resultList = positiveService.selectPositive(queryParam);
modelAndView.addObject("resultList", resultList);
modelAndView.addObject("queryParam", queryParam);
return modelAndView;
}
@RequestMapping("exportExcel")
public String exportExcel(String queryParamStr, HttpServletResponse response) {
PositiveQueryDto queryParam = JsonUtils.fromJson(queryParamStr, PositiveQueryDto.class);
response.setContentType("application/vnd.ms-excel;charset=UTF-8");
try {
String fileName = new String(("正向订单时效统计表(" + queryParam.getDateRangeString() + ")").getBytes(), "ISO8859-1");
response.setHeader("Content-disposition", "attachment; filename=\"" + fileName + ".xlsx\"");
queryParam.parseDateRangeString();
List<PositiveTableDto> resultList = positiveService.selectPositive(queryParam);
List<ExcelUtils.SheetData> sheetDataList = new ArrayList<>();
sheetDataList.add(new ExcelUtils.SheetData("正向订单时效统计", PositiveTableDto.generateTableHeader(), PositiveTableDto.generateTableData(resultList)));
SXSSFWorkbook wb = ExcelUtils.generateExcelWorkBook(sheetDataList);
wb.write(response.getOutputStream());
response.getOutputStream().flush();
response.getOutputStream().close();
} catch (IOException e) {
logger.error("export to excel error. {}", e.getMessage(), e);
} finally {
try {
response.getOutputStream().close();
} catch (IOException e) {
logger.error("export to excel error. {}", e.getMessage(), e);
}
}
return null;
}
}
|
[
"hedgehog.zowie@gmail.com"
] |
hedgehog.zowie@gmail.com
|
47ffbcff5c0ba33ec38648d8db2afe089026a484
|
967502523508f5bb48fdaac93b33e4c4aca20a4b
|
/aws-java-sdk-core/src/test/java/com/amazonaws/http/response/NullResponseHandler.java
|
ed71932fe8f49b7b409c23cf93330630b4c426a7
|
[
"Apache-2.0",
"JSON"
] |
permissive
|
hanjk1234/aws-sdk-java
|
3ac0d8a9bf6f7d9bf1bc5db8e73a441375df10c0
|
07da997c6b05ae068230401921860f5e81086c58
|
refs/heads/master
| 2021-01-17T18:25:34.913778
| 2015-10-23T03:20:07
| 2015-10-23T03:20:07
| 44,951,249
| 1
| 0
| null | 2015-10-26T06:53:25
| 2015-10-26T06:53:24
| null |
UTF-8
|
Java
| false
| false
| 1,140
|
java
|
/*
* Copyright 2010-2015 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.amazonaws.http.response;
import com.amazonaws.AmazonWebServiceResponse;
import com.amazonaws.http.HttpResponse;
import com.amazonaws.http.HttpResponseHandler;
public class NullResponseHandler implements HttpResponseHandler<AmazonWebServiceResponse<Object>> {
@Override
public AmazonWebServiceResponse<Object> handle(HttpResponse response) throws Exception {
return null;
}
@Override
public boolean needsConnectionLeftOpen() {
return false;
}
}
|
[
"aws@amazon.com"
] |
aws@amazon.com
|
61d882536f83a7095c13546db2089828c3f84e2e
|
3ab35f8af2058e822e060172c1213567a48f1fa4
|
/asis_sharel_files/shareL/sources/android/support/v4/media/session/MediaSessionCompatApi23.java
|
e050312a7b0272ad3c2857a7d3072ef0b950708b
|
[] |
no_license
|
Voorivex/ctf
|
9aaf4e799e0ae47bb7959ffd830bd82f4a7e7b78
|
a0adad53cbdec169c72cf08c86fa481cd00918b6
|
refs/heads/master
| 2021-06-06T03:46:43.844696
| 2019-11-17T16:25:25
| 2019-11-17T16:25:25
| 222,276,972
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 802
|
java
|
package android.support.v4.media.session;
import android.net.Uri;
import android.os.Bundle;
import androidx.annotation.RequiresApi;
@RequiresApi(23)
class MediaSessionCompatApi23 {
public interface Callback extends Callback {
void onPlayFromUri(Uri uri, Bundle bundle);
}
static class CallbackProxy<T extends Callback> extends CallbackProxy<T> {
public CallbackProxy(T t) {
super(t);
}
public void onPlayFromUri(Uri uri, Bundle bundle) {
MediaSessionCompat.ensureClassLoader(bundle);
((Callback) this.mCallback).onPlayFromUri(uri, bundle);
}
}
public static Object createCallback(Callback callback) {
return new CallbackProxy(callback);
}
private MediaSessionCompatApi23() {
}
}
|
[
"voorivex@tutanota.com"
] |
voorivex@tutanota.com
|
b195abcc42c590e53fadbfddec76ace4aa79db9c
|
83593598f21cba234f08eca4dec44d2f73a6052d
|
/prj/otcol/web-mgr-platform/src/main/java/gnnt/MEBS/delivery/workflow/outWare/handle/behaviour/UpdateFrozenAmountBehaviour.java
|
8047d7f1f5135ee9c2e29e9eed3aeb96b860ba75
|
[
"Apache-2.0"
] |
permissive
|
bigstar18/prjs
|
23a04309a51b0372ddf6c391ee42270e640ec13c
|
c29da4d0892ce43e074d9e9831f1eedf828cd9d8
|
refs/heads/master
| 2021-05-31T19:55:16.217893
| 2016-06-24T02:35:31
| 2016-06-24T02:35:31
| 42,025,473
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,863
|
java
|
package gnnt.MEBS.delivery.workflow.outWare.handle.behaviour;
import gnnt.MEBS.delivery.model.workflow.EnterWare;
import gnnt.MEBS.delivery.model.workflow.OutWare;
import gnnt.MEBS.delivery.model.workflow.WorkFlowClone;
import gnnt.MEBS.delivery.services.EnterWareService;
import gnnt.MEBS.delivery.services.OutWareService;
import gnnt.MEBS.delivery.workflow.Behaviour;
import java.math.BigDecimal;
import java.util.Date;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
public class UpdateFrozenAmountBehaviour
implements Behaviour
{
private final transient Log logger = LogFactory.getLog(UpdateFrozenAmountBehaviour.class);
@Autowired
@Qualifier("w_enterWareService")
private EnterWareService enterWareService;
@Autowired
@Qualifier("w_outWareService")
private OutWareService outWareService;
public void deal(WorkFlowClone paramWorkFlowClone)
{
OutWare localOutWare = (OutWare)paramWorkFlowClone;
EnterWare localEnterWare = this.enterWareService.getEnterWareById(localOutWare.getEnterWareId());
BigDecimal localBigDecimal1 = new BigDecimal(localEnterWare.getFrozenAmount()).subtract(new BigDecimal(localOutWare.getWeight()));
BigDecimal localBigDecimal2 = new BigDecimal(localEnterWare.getExistAmount()).subtract(new BigDecimal(localOutWare.getWeight()));
localEnterWare.setFrozenAmount(localBigDecimal1.doubleValue());
localEnterWare.setExistAmount(localBigDecimal2.doubleValue());
localOutWare.setOutDate(new Date());
this.enterWareService.updateEnterWare(localEnterWare);
this.outWareService.updateOutEnter(localOutWare);
this.logger.debug("添加仓库申请表addOutWareBehaviour");
}
}
|
[
"hxx@hxx-PC"
] |
hxx@hxx-PC
|
0c56894dde161037ff7c1c133ffd968a3fef417d
|
022980735384919a0e9084f57ea2f495b10c0d12
|
/src/ext-lltnxp/ext-impl/src/com/sgs/portlet/document/delegate/pmldelegate/service/base/PmlDelegateLocalServiceBaseImpl.java
|
5b330c227773d6f983bc46e7e5a77fcee352bcbc
|
[] |
no_license
|
thaond/nsscttdt
|
474d8e359f899d4ea6f48dd46ccd19bbcf34b73a
|
ae7dacc924efe578ce655ddfc455d10c953abbac
|
refs/heads/master
| 2021-01-10T03:00:24.086974
| 2011-02-19T09:18:34
| 2011-02-19T09:18:34
| 50,081,202
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,242
|
java
|
package com.sgs.portlet.document.delegate.pmldelegate.service.base;
import com.liferay.portal.PortalException;
import com.liferay.portal.SystemException;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.sgs.portlet.document.delegate.pmldelegate.model.PmlDelegate;
import com.sgs.portlet.document.delegate.pmldelegate.service.PmlDelegateLocalService;
import com.sgs.portlet.document.delegate.pmldelegate.service.PmlDelegateService;
import com.sgs.portlet.document.delegate.pmldelegate.service.persistence.PmlDelegateFinder;
import com.sgs.portlet.document.delegate.pmldelegate.service.persistence.PmlDelegatePersistence;
import java.util.List;
public abstract class PmlDelegateLocalServiceBaseImpl
implements PmlDelegateLocalService {
@javax.annotation.Resource(name = "com.sgs.portlet.document.delegate.pmldelegate.service.PmlDelegateLocalService.impl")
protected PmlDelegateLocalService pmlDelegateLocalService;
@javax.annotation.Resource(name = "com.sgs.portlet.document.delegate.pmldelegate.service.PmlDelegateService.impl")
protected PmlDelegateService pmlDelegateService;
@javax.annotation.Resource(name = "com.sgs.portlet.document.delegate.pmldelegate.service.persistence.PmlDelegatePersistence.impl")
protected PmlDelegatePersistence pmlDelegatePersistence;
@javax.annotation.Resource(name = "com.sgs.portlet.document.delegate.pmldelegate.service.persistence.PmlDelegateFinder.impl")
protected PmlDelegateFinder pmlDelegateFinder;
public PmlDelegate addPmlDelegate(PmlDelegate pmlDelegate)
throws SystemException {
pmlDelegate.setNew(true);
return pmlDelegatePersistence.update(pmlDelegate, false);
}
public PmlDelegate createPmlDelegate(long delegateId) {
return pmlDelegatePersistence.create(delegateId);
}
public void deletePmlDelegate(long delegateId)
throws PortalException, SystemException {
pmlDelegatePersistence.remove(delegateId);
}
public void deletePmlDelegate(PmlDelegate pmlDelegate)
throws SystemException {
pmlDelegatePersistence.remove(pmlDelegate);
}
public List<Object> dynamicQuery(DynamicQuery dynamicQuery)
throws SystemException {
return pmlDelegatePersistence.findWithDynamicQuery(dynamicQuery);
}
public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start,
int end) throws SystemException {
return pmlDelegatePersistence.findWithDynamicQuery(dynamicQuery, start,
end);
}
public PmlDelegate getPmlDelegate(long delegateId)
throws PortalException, SystemException {
return pmlDelegatePersistence.findByPrimaryKey(delegateId);
}
public List<PmlDelegate> getPmlDelegates(int start, int end)
throws SystemException {
return pmlDelegatePersistence.findAll(start, end);
}
public int getPmlDelegatesCount() throws SystemException {
return pmlDelegatePersistence.countAll();
}
public PmlDelegate updatePmlDelegate(PmlDelegate pmlDelegate)
throws SystemException {
pmlDelegate.setNew(false);
return pmlDelegatePersistence.update(pmlDelegate, true);
}
public PmlDelegateLocalService getPmlDelegateLocalService() {
return pmlDelegateLocalService;
}
public void setPmlDelegateLocalService(
PmlDelegateLocalService pmlDelegateLocalService) {
this.pmlDelegateLocalService = pmlDelegateLocalService;
}
public PmlDelegateService getPmlDelegateService() {
return pmlDelegateService;
}
public void setPmlDelegateService(PmlDelegateService pmlDelegateService) {
this.pmlDelegateService = pmlDelegateService;
}
public PmlDelegatePersistence getPmlDelegatePersistence() {
return pmlDelegatePersistence;
}
public void setPmlDelegatePersistence(
PmlDelegatePersistence pmlDelegatePersistence) {
this.pmlDelegatePersistence = pmlDelegatePersistence;
}
public PmlDelegateFinder getPmlDelegateFinder() {
return pmlDelegateFinder;
}
public void setPmlDelegateFinder(PmlDelegateFinder pmlDelegateFinder) {
this.pmlDelegateFinder = pmlDelegateFinder;
}
}
|
[
"nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e"
] |
nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e
|
211c93c35406f3b7c4fdae0aa1002e35a516098e
|
ee7e3a88c571e6a59d500035a357645c5ce69593
|
/SwingTutorial/src/org/cyrano/swing/java2D/gifanimation/Demo4.java
|
fd353740cb4030a938ed7331a9de61e66a35c4a8
|
[] |
no_license
|
DiegOliveros/foo-org-ve
|
6c91638d31570971f543968ccfbe92bc7cdef707
|
fef2c796d8c22cbf236500f94055c4006a61ddd2
|
refs/heads/master
| 2021-01-10T18:00:54.701851
| 2013-11-06T21:06:54
| 2013-11-06T21:06:54
| 55,300,195
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,803
|
java
|
package org.cyrano.swing.java2D.gifanimation;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.awt.image.ImageObserver;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
public class Demo4 extends JFrame implements ImageObserver {
private BufferedImage doubleBuffer;
private ImageIcon ximg0;
private ImageIcon ximg1;
private ImageIcon ximg2;
public Demo4() {
ximg0 = new ImageIcon(getClass().getResource("animated0.gif"));
ximg1 = new ImageIcon(getClass().getResource("animated1.gif"));
ximg2 = new ImageIcon(getClass().getResource("animated2.gif"));
setDefaultCloseOperation(EXIT_ON_CLOSE);
setSize(640, 480);
setVisible(true);
}
@Override
public void paint(Graphics g) {
update(g);
}
@Override
public void update(Graphics g) {
if (doubleBuffer == null) {
doubleBuffer = (BufferedImage) createImage(getWidth(), getHeight());
}
Graphics2D g2d = (Graphics2D) doubleBuffer.getGraphics();
g2d.setBackground(Color.WHITE);
g2d.clearRect(0, 0, getWidth(), getHeight());
g2d.drawImage(ximg0.getImage(), 20, 20, 200, 200, this);
g2d.drawImage(ximg1.getImage(), 300, 100, this);
g2d.drawImage(ximg2.getImage(), 250, 200, this);
g2d.dispose();
g.drawImage(doubleBuffer, 0, 0, null);
}
@Override
public boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h) {
System.out.println("Image update: infoflags=" + infoflags + " x=" + x + " y=" + y + " w=" + w + " h=" + h);
// No need to, super class does this for JFrame
// repaint();
return super.imageUpdate(img, infoflags, x, y, w, h);
}
public static void main(String[] args) {
new Demo4();
}
}
|
[
"piojosnos@gmail.com"
] |
piojosnos@gmail.com
|
979d84ae97be76d2741c7b6481f974cc2fc24416
|
d899f0677f3805f071a62b24634fe78f16881189
|
/osa01-Osa01_11.Calculator/src/main/java/calculator/CalculatorController.java
|
2cc8c99c30a08a324fe8d422124f84feeb1d6e15
|
[] |
no_license
|
remixtures/web-server-programming-java-2021
|
a0de095cf2499830784ad8286671b0d198848e88
|
f297c51c2c34ce52629494c499c90460afc2af3c
|
refs/heads/master
| 2023-05-27T09:18:55.313181
| 2021-06-04T12:03:06
| 2021-06-04T12:03:06
| 373,673,320
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 659
|
java
|
package calculator;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class CalculatorController {
@GetMapping("/add")
@ResponseBody
public int addition(@RequestParam Integer first, @RequestParam Integer second) {
return first + second;
}
@GetMapping("/multiply")
@ResponseBody
public int multiplication(@RequestParam Integer first, @RequestParam Integer second) {
return first * second;
}
}
|
[
"miguel.a.caetano@gmail.com"
] |
miguel.a.caetano@gmail.com
|
8c8dafd6d9ec93cee13dfca0f6269ce638fb3183
|
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
|
/src/testcases/CWE89_SQL_Injection/s04/CWE89_SQL_Injection__URLConnection_execute_51b.java
|
449f31902d539767059d044b4c27812affd1740e
|
[] |
no_license
|
bqcuong/Juliet-Test-Case
|
31e9c89c27bf54a07b7ba547eddd029287b2e191
|
e770f1c3969be76fdba5d7760e036f9ba060957d
|
refs/heads/master
| 2020-07-17T14:51:49.610703
| 2019-09-03T16:22:58
| 2019-09-03T16:22:58
| 206,039,578
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,027
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE89_SQL_Injection__URLConnection_execute_51b.java
Label Definition File: CWE89_SQL_Injection.label.xml
Template File: sources-sinks-51b.tmpl.java
*/
/*
* @description
* CWE: 89 SQL Injection
* BadSource: URLConnection Read data from a web server with URLConnection
* GoodSource: A hardcoded string
* Sinks: execute
* GoodSink: Use prepared statement and execute (properly)
* BadSink : data concatenated into SQL statement used in execute(), which could result in SQL Injection
* Flow Variant: 51 Data flow: data passed as an argument from one function to another in different classes in the same package
*
* */
package testcases.CWE89_SQL_Injection.s04;
import testcasesupport.*;
import javax.servlet.http.*;
import java.sql.*;
import java.util.logging.Level;
public class CWE89_SQL_Injection__URLConnection_execute_51b
{
public void badSink(String data ) throws Throwable
{
Connection dbConnection = null;
Statement sqlStatement = null;
try
{
dbConnection = IO.getDBConnection();
sqlStatement = dbConnection.createStatement();
/* POTENTIAL FLAW: data concatenated into SQL statement used in execute(), which could result in SQL Injection */
Boolean result = sqlStatement.execute("insert into users (status) values ('updated') where name='"+data+"'");
if(result)
{
IO.writeLine("Name, " + data + ", updated successfully");
}
else
{
IO.writeLine("Unable to update records for user: " + data);
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error getting database connection", exceptSql);
}
finally
{
try
{
if (sqlStatement != null)
{
sqlStatement.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing Statement", exceptSql);
}
try
{
if (dbConnection != null)
{
dbConnection.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing Connection", exceptSql);
}
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(String data ) throws Throwable
{
Connection dbConnection = null;
Statement sqlStatement = null;
try
{
dbConnection = IO.getDBConnection();
sqlStatement = dbConnection.createStatement();
/* POTENTIAL FLAW: data concatenated into SQL statement used in execute(), which could result in SQL Injection */
Boolean result = sqlStatement.execute("insert into users (status) values ('updated') where name='"+data+"'");
if(result)
{
IO.writeLine("Name, " + data + ", updated successfully");
}
else
{
IO.writeLine("Unable to update records for user: " + data);
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error getting database connection", exceptSql);
}
finally
{
try
{
if (sqlStatement != null)
{
sqlStatement.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing Statement", exceptSql);
}
try
{
if (dbConnection != null)
{
dbConnection.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing Connection", exceptSql);
}
}
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink(String data ) throws Throwable
{
Connection dbConnection = null;
PreparedStatement sqlStatement = null;
try
{
/* FIX: Use prepared statement and execute (properly) */
dbConnection = IO.getDBConnection();
sqlStatement = dbConnection.prepareStatement("insert into users (status) values ('updated') where name=?");
sqlStatement.setString(1, data);
Boolean result = sqlStatement.execute();
if (result)
{
IO.writeLine("Name, " + data + ", updated successfully");
}
else
{
IO.writeLine("Unable to update records for user: " + data);
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error getting database connection", exceptSql);
}
finally
{
try
{
if (sqlStatement != null)
{
sqlStatement.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing PreparedStatement", exceptSql);
}
try
{
if (dbConnection != null)
{
dbConnection.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing Connection", exceptSql);
}
}
}
}
|
[
"bqcuong2212@gmail.com"
] |
bqcuong2212@gmail.com
|
2f486de0761658537357de804e70ecacaa6f7d67
|
5cf9749de043e7af019fc246b63977aae89d039f
|
/libs/ClanBase/src/com/youzu/taobao/base/json/CheckPostJson.java
|
94164b876a15f62a8c18db6b94c674c033353134
|
[
"Apache-2.0"
] |
permissive
|
raycraft/MyBigApp_Discuz_Android
|
def12d04bf3318e2a6d711c75a70042f551dcdfc
|
6f80f5a260f3cfa1694cab0a39f6034dd49ce7f8
|
refs/heads/master
| 2021-01-12T04:19:05.602028
| 2016-12-29T05:34:24
| 2016-12-29T05:34:24
| 77,585,600
| 2
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 531
|
java
|
package com.youzu.taobao.base.json;
import com.youzu.android.framework.json.annotation.JSONField;
import com.youzu.taobao.base.json.checkpost.CheckPostVariables;
/**
*
* 主题详情
* Created by Zhao on 15/5/5.
*/
public class CheckPostJson extends BaseJson {
private CheckPostVariables variables;
public CheckPostVariables getVariables() {
return variables;
}
@JSONField(name = "Variables")
public void setVariables(CheckPostVariables variables) {
this.variables = variables;
}
}
|
[
"raycraft@qq.com"
] |
raycraft@qq.com
|
87fdff4b8d1f1baebe318c665ce7e1d62b397b97
|
ead5a617b23c541865a6b57cf8cffcc1137352f2
|
/decompiled/sources/p140me/bridgefy/backend/p143v3/bgfyKeyApi/model/CollectionResponseBgfyKey.java
|
3f062feae35e7c2ab6bbe6b0c73111e09f10f807
|
[] |
no_license
|
erred/uva-ssn
|
73a6392a096b38c092482113e322fdbf9c3c4c0e
|
4fb8ea447766a735289b96e2510f5a8d93345a8c
|
refs/heads/master
| 2022-02-26T20:52:50.515540
| 2019-10-14T12:30:33
| 2019-10-14T12:30:33
| 210,376,140
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,160
|
java
|
package p140me.bridgefy.backend.p143v3.bgfyKeyApi.model;
import com.google.api.client.json.GenericJson;
import com.google.api.client.util.Data;
import com.google.api.client.util.Key;
import java.util.List;
/* renamed from: me.bridgefy.backend.v3.bgfyKeyApi.model.CollectionResponseBgfyKey */
public final class CollectionResponseBgfyKey extends GenericJson {
@Key
private List<BgfyKey> items;
@Key
private String nextPageToken;
static {
Data.nullOf(BgfyKey.class);
}
public List<BgfyKey> getItems() {
return this.items;
}
public CollectionResponseBgfyKey setItems(List<BgfyKey> list) {
this.items = list;
return this;
}
public String getNextPageToken() {
return this.nextPageToken;
}
public CollectionResponseBgfyKey setNextPageToken(String str) {
this.nextPageToken = str;
return this;
}
public CollectionResponseBgfyKey set(String str, Object obj) {
return (CollectionResponseBgfyKey) super.set(str, obj);
}
public CollectionResponseBgfyKey clone() {
return (CollectionResponseBgfyKey) super.clone();
}
}
|
[
"seankhliao@gmail.com"
] |
seankhliao@gmail.com
|
166e574be59df4820b4acc0dc36d8796cdd2da30
|
6eed04056792f6ae63cf88cc96c69e1dc91c8214
|
/src/main/java/algorithms/other/array/MyCircularQueue.java
|
e5c82f03e5197cf5639baa44e59462ff02e1a99a
|
[] |
no_license
|
Hulk904/hulk_design
|
1093ad816f25a76a153c1e8df929de94f6ffebcc
|
98b4d5c0705cd2454110d26846d3610ee8d8d28e
|
refs/heads/master
| 2022-06-23T20:51:52.172259
| 2022-05-06T14:14:26
| 2022-05-06T14:14:26
| 126,194,449
| 0
| 0
| null | 2022-06-17T02:50:05
| 2018-03-21T14:49:18
|
Java
|
UTF-8
|
Java
| false
| false
| 2,228
|
java
|
package algorithms.other.array;
/**
* Created by yangyuan on 2020/12/19.
* 622. 设计循环队列
*
* 设计你的循环队列实现。 循环队列是一种线性数据结构,其操作表现基于 FIFO(先进先出)原则并且队尾被连接在队首之后以形成一个循环。它也被称为“环形缓冲器”。
循环队列的一个好处是我们可以利用这个队列之前用过的空间。在一个普通队列里,一旦一个队列满了,我们就不能插入下一个元素,即使在队列前面仍有空间。但是使用循环队列,我们能使用这些空间去存储新的值。
你的实现应该支持如下操作:
MyCircularQueue(k): 构造器,设置队列长度为 k 。
Front: 从队首获取元素。如果队列为空,返回 -1 。
Rear: 获取队尾元素。如果队列为空,返回 -1 。
enQueue(value): 向循环队列插入一个元素。如果成功插入则返回真。
deQueue(): 从循环队列中删除一个元素。如果成功删除则返回真。
isEmpty(): 检查循环队列是否为空。
isFull(): 检查循环队列是否已满。
*/
public class MyCircularQueue {
int h = 0, t = 0;
int[] q;
/**
* 对于非循环队列 直接申请k的空间就行。
* @param k
*/
public MyCircularQueue(int k) {
q = new int[k + 1];// 开为 k + 1 的空间,但是有一个空着。为了区分 h == t时是对满还是对空
//这里 h== t 定义为对空, (t + 1)%q.length == h 对满
}
public boolean enQueue(int value) {
if (isFull()) return false;
q[t++] = value;
if (t == q.length) t = 0;
return true;
}
public boolean deQueue() {
if (isEmpty()) return false;
h++;
if (h == q.length) h = 0;
return true;
}
public int Front() {
if (isEmpty()) return -1;
return q[h];
}
public int Rear() {
if (isEmpty()) return -1;
int temp = t - 1;
if (temp < 0) temp+= q.length;
return q[temp];
}
public boolean isEmpty() {
return h == t;
}
public boolean isFull() {
return (t + 1)%q.length == h;
}
}
|
[
"yangyuan@yangyuandeMacBook-Pro.local"
] |
yangyuan@yangyuandeMacBook-Pro.local
|
38b3640dadeaf69c85da7d6221a05c6600dbdb06
|
d60e287543a95a20350c2caeabafbec517cabe75
|
/LACCPlus/Camel/1804_1.java
|
bc214130f73cb607c09e847ca7a763d239f420e7
|
[
"MIT"
] |
permissive
|
sgholamian/log-aware-clone-detection
|
242067df2db6fd056f8d917cfbc143615c558b2c
|
9993cb081c420413c231d1807bfff342c39aa69a
|
refs/heads/main
| 2023-07-20T09:32:19.757643
| 2021-08-27T15:02:50
| 2021-08-27T15:02:50
| 337,837,827
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,664
|
java
|
//,temp,EKS2Producer.java,97,127,temp,EventbridgeProducer.java,319,350
//,3
public class xxx {
private void listClusters(EksClient eksClient, Exchange exchange) throws InvalidPayloadException {
if (getConfiguration().isPojoRequest()) {
Object payload = exchange.getIn().getMandatoryBody();
if (payload instanceof ListClustersRequest) {
ListClustersResponse result;
try {
result = eksClient.listClusters((ListClustersRequest) payload);
} catch (AwsServiceException ase) {
LOG.trace("List Clusters command returned the error code {}", ase.awsErrorDetails().errorCode());
throw ase;
}
Message message = getMessageForResponse(exchange);
message.setBody(result);
}
} else {
ListClustersRequest.Builder builder = ListClustersRequest.builder();
if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(EKS2Constants.MAX_RESULTS))) {
int maxRes = exchange.getIn().getHeader(EKS2Constants.MAX_RESULTS, Integer.class);
builder.maxResults(maxRes);
}
ListClustersResponse result;
try {
result = eksClient.listClusters(builder.build());
} catch (AwsServiceException ase) {
LOG.trace("List Clusters command returned the error code {}", ase.awsErrorDetails().errorCode());
throw ase;
}
Message message = getMessageForResponse(exchange);
message.setBody(result);
}
}
};
|
[
"SHOSHIN\\sgholamian@shoshin.uwaterloo.ca"
] |
SHOSHIN\sgholamian@shoshin.uwaterloo.ca
|
7cd3feef28d56191a3255cb795feae218e985606
|
f9c637ab9501b0a68fa0d18a061cbd555abf1f79
|
/test/import-data/ImportData/src/main/java/com/adr/bigdata/indexing/db/sql/daos/WarehouseDAO.java
|
dab533b494d081d0773425bae136195b1dcb1de9
|
[] |
no_license
|
minha361/leanHTMl
|
c05000a6447b31f7869b75c532695ca2b0cd6968
|
dc760e7d149480c0b36f3c7064b97d0f3d4b3872
|
refs/heads/master
| 2022-06-01T02:54:46.048064
| 2020-08-11T03:20:34
| 2020-08-11T03:20:34
| 48,735,593
| 0
| 0
| null | 2022-05-20T20:49:57
| 2015-12-29T07:55:48
|
Java
|
UTF-8
|
Java
| false
| false
| 869
|
java
|
package com.adr.bigdata.indexing.db.sql.daos;
import java.util.List;
import org.skife.jdbi.v2.sqlobject.Bind;
import org.skife.jdbi.v2.sqlobject.SqlQuery;
import org.skife.jdbi.v2.sqlobject.customizers.Mapper;
import com.adr.bigdata.indexing.db.sql.beans.WarehouseBean;
import com.adr.bigdata.indexing.db.sql.mappers.WarehouseMapper;
import com.nhb.common.db.sql.daos.AbstractDAO;
public abstract class WarehouseDAO extends AbstractDAO {
@SqlQuery("select Id as WarehouseId, WarehouseName, WarehouseStatus, ProvinceId from Warehouse")
@Mapper(WarehouseMapper.class)
public abstract List<WarehouseBean> getAllWarehouse();
@SqlQuery("select Id as WarehouseId, WarehouseName, WarehouseStatus, ProvinceId from Warehouse where Id=:warehouseId")
@Mapper(WarehouseMapper.class)
public abstract WarehouseBean getWarehouse(@Bind("warehouseId") int warehouseId);
}
|
[
"v.minhlq2@adayroi.com"
] |
v.minhlq2@adayroi.com
|
54282325853dfc2d5660b7612fe35da307d6572e
|
1f29f7842e30d6265fb9dbb302fe9414755e7403
|
/src/main/java/com/eurodyn/okstra/MDSpatialRepresentationTypeCodePropertyType.java
|
c83d23ec426dec8be02180bb9f81c4010523ba3c
|
[] |
no_license
|
dpapageo/okstra-2018-classes
|
b4165aea3c84ffafaa434a3a1f8cf0fff58de599
|
fb908eabc183725be01c9f93d39268bb8e630f59
|
refs/heads/master
| 2021-03-26T00:22:28.205974
| 2020-03-16T09:16:31
| 2020-03-16T09:16:31
| 247,657,881
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,447
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// 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.03.09 at 04:49:50 PM EET
//
package com.eurodyn.okstra;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for MD_SpatialRepresentationTypeCode_PropertyType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="MD_SpatialRepresentationTypeCode_PropertyType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence minOccurs="0">
* <element ref="{http://www.isotc211.org/2005/gmd}MD_SpatialRepresentationTypeCode"/>
* </sequence>
* <attribute ref="{http://www.isotc211.org/2005/gco}nilReason"/>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MD_SpatialRepresentationTypeCode_PropertyType", namespace = "http://www.isotc211.org/2005/gmd", propOrder = {
"mdSpatialRepresentationTypeCode"
})
public class MDSpatialRepresentationTypeCodePropertyType {
@XmlElement(name = "MD_SpatialRepresentationTypeCode")
protected CodeListValueType mdSpatialRepresentationTypeCode;
@XmlAttribute(name = "nilReason", namespace = "http://www.isotc211.org/2005/gco")
protected List<String> nilReason;
/**
* Gets the value of the mdSpatialRepresentationTypeCode property.
*
* @return
* possible object is
* {@link CodeListValueType }
*
*/
public CodeListValueType getMDSpatialRepresentationTypeCode() {
return mdSpatialRepresentationTypeCode;
}
/**
* Sets the value of the mdSpatialRepresentationTypeCode property.
*
* @param value
* allowed object is
* {@link CodeListValueType }
*
*/
public void setMDSpatialRepresentationTypeCode(CodeListValueType value) {
this.mdSpatialRepresentationTypeCode = value;
}
/**
* Gets the value of the nilReason property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the nilReason property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getNilReason().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getNilReason() {
if (nilReason == null) {
nilReason = new ArrayList<String>();
}
return this.nilReason;
}
}
|
[
"Dimitrios.Papageorgiou@eurodyn.com"
] |
Dimitrios.Papageorgiou@eurodyn.com
|
7a46765541d0fcf71114abf7f6b69bd0b2c0c789
|
6215ee21f30ff00e5661048e75541a1c7cba5908
|
/src/objectCreation/ThisAndSuper.java
|
74321a7df8259f552c160720fd5ea823b009784f
|
[] |
no_license
|
techyosemite/Java_Learning
|
0fbc1ed96f80011ba212b0d77af462dba90407db
|
f85e3ed246f7c3eebba9d688271d3dd56b665ded
|
refs/heads/master
| 2020-04-18T06:16:17.263140
| 2019-01-24T06:12:23
| 2019-01-24T06:12:23
| 167,312,941
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 559
|
java
|
package objectCreation;
interface TestInterface {
static int k =100;
public void testMethod();
}
class ThisClass{
int i = 10;
}
public class ThisAndSuper extends ThisClass {
final int j; // blank final variable
static int q; //static final variable
static {
q = 100;
}
int k ;
ThisAndSuper(){
super();
this.k = 20;
j = 100;
System.out.println("Inside constructor!!");
}
//Main method is set to final
public static final void main(String[] args) {
ThisAndSuper obj = new ThisAndSuper();
String s = null;
s = s;
}
}
|
[
"email@example.com"
] |
email@example.com
|
19e0811eb101e0552d2ca919fc1e4a8f137af6c4
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/malware/app64/source/android/support/v4/app/NotificationCompat.java
|
29a0142d07946c58128af81532244e5ffefd4d38
|
[
"Apache-2.0"
] |
permissive
|
iantal/AndroidPermissions
|
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
|
d623b732734243590b5f004d167e542e2e2ae249
|
refs/heads/master
| 2023-07-19T01:29:26.689186
| 2019-09-30T19:01:42
| 2019-09-30T19:01:42
| 107,239,248
| 0
| 0
|
Apache-2.0
| 2023-07-16T07:41:38
| 2017-10-17T08:22:57
| null |
UTF-8
|
Java
| false
| false
| 972
|
java
|
package android.support.v4.app;
import android.os.Build.VERSION;
public class NotificationCompat
{
public static final int FLAG_HIGH_PRIORITY = 128;
private static final NotificationCompat.NotificationCompatImpl IMPL = new NotificationCompat.NotificationCompatImplBase();
public static final int PRIORITY_DEFAULT = 0;
public static final int PRIORITY_HIGH = 1;
public static final int PRIORITY_LOW = -1;
public static final int PRIORITY_MAX = 2;
public static final int PRIORITY_MIN = -2;
static
{
if (Build.VERSION.SDK_INT >= 16)
{
IMPL = new NotificationCompat.NotificationCompatImplJellybean();
return;
}
if (Build.VERSION.SDK_INT >= 14)
{
IMPL = new NotificationCompat.NotificationCompatImplIceCreamSandwich();
return;
}
if (Build.VERSION.SDK_INT >= 11)
{
IMPL = new NotificationCompat.NotificationCompatImplHoneycomb();
return;
}
}
public NotificationCompat() {}
}
|
[
"antal.micky@yahoo.com"
] |
antal.micky@yahoo.com
|
9873a194a36a23c63d61193ce743af276fd95fc5
|
9810488568a8b75c2d16edf50b4b57e8e5c7bebb
|
/EncogAdvanced/src/drosa/indicators/OpenPrice.java
|
57facb1a9416db07b8c334034b1594786ab627a7
|
[] |
no_license
|
davidautentico/FxPredictor
|
392693e32724e9196d6ab33135b916515b4bc64d
|
36c1d413d472d4c1478668614df5d476fcb6c82e
|
refs/heads/master
| 2021-06-24T08:40:47.395190
| 2021-03-21T11:05:55
| 2021-03-21T11:05:55
| 195,585,127
| 0
| 0
| null | 2020-10-13T14:24:38
| 2019-07-06T21:37:34
|
Java
|
UTF-8
|
Java
| false
| false
| 486
|
java
|
package drosa.indicators;
import java.util.ArrayList;
import java.util.List;
import drosa.finances.Quote;
public class OpenPrice extends Indicator {
int delay= 0;
public int getDelay() {
return delay;
}
public void setDelay(int delay) {
this.delay = delay;
}
@Override
public double getValue(List<Quote> data,int pos) {
// TODO Auto-generated method stub
if ((pos -delay)<0) return -9999.9;
return data.get(pos-delay).getOpen();
}
}
|
[
"davidautentico@gmail.com"
] |
davidautentico@gmail.com
|
66675cedc473bb8f2a77723db778b031834e1606
|
6811fd178ae01659b5d207b59edbe32acfed45cc
|
/jira-project/jira-components/jira-core/src/main/java/com/atlassian/jira/issue/fields/renderer/DefaultHackyFieldRendererRegistry.java
|
263912c886fbbe4e7b80dfeec4eae6d60c36628d
|
[] |
no_license
|
xiezhifeng/mysource
|
540b09a1e3c62614fca819610841ddb73b12326e
|
44f29e397a6a2da9340a79b8a3f61b3d51e331d1
|
refs/heads/master
| 2023-04-14T00:55:23.536578
| 2018-04-19T11:08:38
| 2018-04-19T11:08:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,006
|
java
|
package com.atlassian.jira.issue.fields.renderer;
import com.atlassian.jira.issue.fields.AffectedVersionsSystemField;
import com.atlassian.jira.issue.fields.ComponentsSystemField;
import com.atlassian.jira.issue.fields.CustomField;
import com.atlassian.jira.issue.fields.FixVersionsSystemField;
import com.atlassian.jira.issue.fields.OrderableField;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import static com.atlassian.jira.issue.fields.renderer.HackyRendererType.FROTHER_CONTROL;
import static com.atlassian.jira.issue.fields.renderer.HackyRendererType.SELECT_LIST;
import static com.atlassian.jira.util.dbc.Assertions.notNull;
public class DefaultHackyFieldRendererRegistry implements HackyFieldRendererRegistry
{
private static final String CUSTOM_FIELD_KEY_PREFIX = "com.atlassian.jira.plugin.system.customfieldtypes:";
//hardcoding the frother control renderer to system version & components fields as well as the multiversion custom field.
private static final Set<HackyRendererType> RENDERERS = ImmutableSet.of(SELECT_LIST, FROTHER_CONTROL);
private static final Map<Class<? extends OrderableField>, Set<HackyRendererType>> SYSTEM_FIELD_OVERRIDES =
ImmutableMap.<Class<? extends OrderableField>, Set<HackyRendererType>>builder()
.put(FixVersionsSystemField.class, RENDERERS)
.put(AffectedVersionsSystemField.class, RENDERERS)
.put(ComponentsSystemField.class, RENDERERS)
.build();
private static final Map<String, Set<HackyRendererType>> CUSTOM_FIELD_TYPE_OVERRIDES =
ImmutableMap.<String, Set<HackyRendererType>>builder()
.put(CUSTOM_FIELD_KEY_PREFIX + "multiversion", RENDERERS)
.build();
public boolean shouldOverrideDefaultRenderers(final OrderableField field)
{
return getRendererTypesOverride(field) != null;
}
public Set<HackyRendererType> getRendererTypes(final OrderableField field)
{
final Set<HackyRendererType> override = getRendererTypesOverride(field);
if (override == null)
{
return Collections.emptySet();
}
return override;
}
@Nullable
public HackyRendererType getDefaultRendererType(final OrderableField field)
{
return shouldOverrideDefaultRenderers(field) ? FROTHER_CONTROL : null;
}
private static Set<HackyRendererType> getRendererTypesOverride(final OrderableField field)
{
notNull("field", field);
if (field instanceof CustomField)
{
final String type = ((CustomField)field).getCustomFieldType().getKey();
return CUSTOM_FIELD_TYPE_OVERRIDES.get(type);
}
else
{
return SYSTEM_FIELD_OVERRIDES.get(field.getClass());
}
}
}
|
[
"moink635@gmail.com"
] |
moink635@gmail.com
|
ec8d6df95d55c172118e99a577bcd4449145c253
|
5f42d999715deeccb6e6af533247b891f461d871
|
/idea_test/code_homework/src/com/fxq/day04/ArrayRandom.java
|
ba3263a7a5fd5cc85ff122f43f8da906da599f09
|
[] |
no_license
|
flexibleq/JavaRepository
|
6c5ee21f2cebeae1449bec84f8dc419e4a8b8bc6
|
e44378a4f3cce87c522caf4f5f20feaa570f0ffa
|
refs/heads/master
| 2021-08-06T22:21:39.319653
| 2019-12-08T00:39:19
| 2019-12-08T00:39:19
| 226,594,549
| 0
| 0
| null | 2020-10-13T18:03:12
| 2019-12-08T00:35:11
|
Java
|
UTF-8
|
Java
| false
| false
| 1,847
|
java
|
package com.fxq.day04;
import java.util.Random;
import java.util.Scanner;
/*分析以下需求并实现
1.键盘录入一个数据作为数组的长度
2.请使用随机数给数组赋值
3.再次键盘录入一个数据,统计这个数在该数组中出现的次数
例如:
数组的元素为: {1,2,5,1}
要找的数为:1
最终控制台打印的结果为: 1 在数组里出现的次数为 2 次*/
public class ArrayRandom {
public static void main(String[] args) {
//键盘录入数组长度
Scanner sc = new Scanner(System.in);
System.out.println("请输入数组的长度:");
int n = sc.nextInt();
//定义数组
int [] arr = new int[n];
//创建随机数对象
Random r = new Random();
//遍历数组为元素赋随机值
for(int i=0;i<arr.length;i++){
arr[i] = r.nextInt(100);
}
//再次录入一个数字
System.out.println("请输入要查找的数字:");
int number = sc.nextInt();
//定义一个计数器
int count = 0;
//遍历数组获取该数在数组中出现的次数
for(int i=0;i<arr.length;i++){
if(arr[i] == number){
count++;
}
}
//遍历数组输出元素
System.out.println("数组的元素为:");
System.out.print("{");
for(int i=0;i<arr.length;i++){
if(i == arr.length-1){
System.out.print(arr[i]+"}");
}else{
System.out.print(arr[i]+",");
}
}
System.out.println();
//输出要找的数
System.out.println("要找的数为:"+number);
System.out.println(number+"在数组里出现"+count+"次");
}
}
|
[
"freeantwalk@163.com"
] |
freeantwalk@163.com
|
085f02304f2be1a2c3a2a24993514bcc4341f96f
|
633ded005f8fefd5592f0bb8cb7ac2186362b715
|
/.svn/pristine/11/113f9741abca9e8c00e9e5e68e8216e06effa96e.svn-base
|
a8ce5d18d44fa0aa0424619a3d423f9bd9f3ffc6
|
[] |
no_license
|
hesheng1992/daocheng
|
beb4ed22df5c0422706e8876f152c9aaf60c6be5
|
e95198236e236dcd6bfbc3ce9d9c116a4c417fa2
|
refs/heads/master
| 2020-04-26T09:06:39.485104
| 2019-03-02T11:39:42
| 2019-03-02T11:39:42
| 173,444,316
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 487
|
package com.a1magway.bgg.data.repository;
import com.a1magway.bgg.data.net.APIManager;
import io.reactivex.Observable;
/**
* Created by lyx on 2017/8/9.
*/
public class NetSetPwdData implements ISetPwdData{
APIManager mAPIManager;
public NetSetPwdData(APIManager apiManager){
mAPIManager = apiManager;
}
@Override
public Observable<String> setPwd(String phone, String pwd, int type) {
return mAPIManager.setPassWord(phone, pwd, type);
}
}
|
[
"you@example.com"
] |
you@example.com
|
|
f227b057737c7089d228d3c9d150610281f31d21
|
edabe14a477b9b801064d9779e664f5bbbc0cbb3
|
/src/main/java/com/escalab/SwaggerConfig.java
|
4bf0efa13638b710650ea09f97790cf05df536c3
|
[] |
no_license
|
dev-miguel-resources/proyecto-curso-springboot
|
c3709698d348380d476a50804591b2b0e3b9aaf4
|
1088d16064e1ead24633980d21580855945379b0
|
refs/heads/master
| 2022-09-21T15:04:43.086100
| 2020-06-04T15:57:26
| 2020-06-04T15:57:26
| 261,623,906
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,061
|
java
|
package com.escalab;
import java.util.ArrayList;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.service.VendorExtension;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@EnableSwagger2
public class SwaggerConfig {
public static final Contact DEFAULT_CONTACT = new Contact("Escalab Network", "https://www.laescala.cl",
"mchamorro@laescala.cl");
public static final ApiInfo DEFAULT_API_INFO = new ApiInfo("Mediapp Api Documentation", "Mediapp Api Documentation", "1.0",
"PREMIUM", DEFAULT_CONTACT, "Apache 2.0", "http://www.apache.org/licenses/LICENSE-2.0",
new ArrayList<VendorExtension>());
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2).apiInfo(DEFAULT_API_INFO);
}
}
|
[
"ingenieromiguelch@gmail.com"
] |
ingenieromiguelch@gmail.com
|
4b7380c34270257683d79f58d484f56d3dc346fa
|
ed9138bc0d1291163a386124fa467d52e0fb7f3f
|
/Pos2Books/src/se/budohoor/economics/pos2books/plugins/books/economic/types/ScannedDocumentGetPdf.java
|
5ebed3d6f7f1ff79efe2e2db176ea42f55667793
|
[] |
no_license
|
odie37/pos-2-books
|
56a06439e9e072d8bea2e747d65ef3dad3349709
|
cbec64fef1d7abb48d948b3adc2f8be36e09cf19
|
refs/heads/master
| 2016-09-10T10:37:04.105489
| 2015-01-04T19:11:32
| 2015-01-04T19:11:32
| 28,779,078
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,657
|
java
|
package se.budohoor.economics.pos2books.plugins.books.economic.types;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="scannedDocumentHandle" type="{http://e-conomic.com}ScannedDocumentHandle" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"scannedDocumentHandle"
})
@XmlRootElement(name = "ScannedDocument_GetPdf")
public class ScannedDocumentGetPdf {
protected ScannedDocumentHandle scannedDocumentHandle;
/**
* Gets the value of the scannedDocumentHandle property.
*
* @return
* possible object is
* {@link ScannedDocumentHandle }
*
*/
public ScannedDocumentHandle getScannedDocumentHandle() {
return scannedDocumentHandle;
}
/**
* Sets the value of the scannedDocumentHandle property.
*
* @param value
* allowed object is
* {@link ScannedDocumentHandle }
*
*/
public void setScannedDocumentHandle(ScannedDocumentHandle value) {
this.scannedDocumentHandle = value;
}
}
|
[
"mattias.fritzson@gmail.com"
] |
mattias.fritzson@gmail.com
|
07fe2767d4b31f762c25d5627b51e30485b809b9
|
ecc3d474cded76a8aaa30ce5da4495df358386fe
|
/app/src/main/java/com/bing/lan/inke/yingke/bean/SocketDate.java
|
5bcdc1e66f017f37bcad466d53376ecce2787e3d
|
[] |
no_license
|
cc8848/FM-1
|
1942b1e40bb1525a71ff55607b3d7837101dfac7
|
85c7aa45a6e4aaa71c64825a97db4a1fa66674fd
|
refs/heads/master
| 2020-12-30T14:34:20.873902
| 2017-05-10T14:38:20
| 2017-05-10T14:38:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,120
|
java
|
package com.bing.lan.inke.yingke.bean;
import java.util.List;
public class SocketDate {
private int state;//后端返回的状态100 表示成功
private int type;// 1.代表返回的是首次登录 2.代表是聊天信息 3.代表的是礼物
private String groud;// 哪一个直播间
private String userName;//自己用户
private String sendToUserName; //发送给目标用户
private String msg;//
private String msgType;// xxx@xxx
private List<Gift> gifts;
public List<Gift> getGifts() {
return gifts;
}
public void setGifts(List<Gift> gifts) {
this.gifts = gifts;
}
public String getMsgType() {
return msgType;
}
public void setMsgType(String msgType) {
this.msgType = msgType;
}
public String getSendToUserName() {
return sendToUserName;
}
public void setSendToUserName(String sendToUserName) {
this.sendToUserName = sendToUserName;
}
public int getState() {
return state;
}
public void setState(int state) {
this.state = state;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getGroud() {
return groud;
}
public void setGroud(String groud) {
this.groud = groud;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
@Override
public String toString() {
return "SocketDate{" +
"state=" + state +
", type=" + type +
", groud='" + groud + '\'' +
", userName='" + userName + '\'' +
", sendToUserName='" + sendToUserName + '\'' +
", msg='" + msg + '\'' +
", msgType='" + msgType + '\'' +
", gifts=" + gifts +
'}';
}
}
|
[
"lan_bing2013@163.com"
] |
lan_bing2013@163.com
|
b01fa34659c334840c617de37df630367d4b4453
|
6d2d4a837ce338ed43a22c1a9bcf2973bb0ae4fd
|
/app/src/main/java/com/xqx/aopmaster/aop/permission/PermissionAspect.java
|
b106b0d73ad88df918c415d741322a2242ee9803
|
[] |
no_license
|
iblue007/AopMaster
|
b5c0e31f6a0cc8dff19f042e3e8ffeb4c443d434
|
e5e99612c52a70a346a1524ff39def805d77fb20
|
refs/heads/master
| 2021-02-06T17:30:46.894457
| 2020-03-20T07:36:37
| 2020-03-20T07:36:37
| 243,935,082
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,032
|
java
|
package com.xqx.aopmaster.aop.permission;
import android.app.Fragment;
import android.content.Context;
import com.xqx.aopmaster.callback.RequestPermissionCallBack;
import com.xqx.aopmaster.util.LogUtils;
import com.xqx.aopmaster.util.RequestPermissionUtil;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
/**
* Create by xuqunxing on 2020/3/2
*/
@Aspect
public class PermissionAspect {
private static final String PERMISSION_REQUEST_POINTCUT =
"execution(@com.xqx.aopmaster.aop.permission.NeedPermission * *(..))";
@Pointcut(PERMISSION_REQUEST_POINTCUT + " && @annotation(needPermission)")
public void requestPermissionMethod(NeedPermission needPermission) {
}
@Around("requestPermissionMethod(needPermission)")
public void AroundJoinPoint(final ProceedingJoinPoint joinPoint, NeedPermission needPermission) {
Context context = null;
final Object object = joinPoint.getThis();
// LogUtils.e("======", "======" + object.toString());
if (object instanceof Context) {
context = (Context) object;
} else if (object instanceof Fragment) {
context = ((Fragment) object).getActivity();
}
if (context == null || needPermission == null) return;
// LogUtils.e("======", "======" + needPermission.toString());
RequestPermissionUtil.requestPermissions(context,true, needPermission.value(), new RequestPermissionCallBack() {
@Override
public void granted() {
try {
joinPoint.proceed();
} catch (Throwable throwable) {
throwable.printStackTrace();
}
}
@Override
public void denied() {
}
});
}
}
|
[
"744639775@qq.com"
] |
744639775@qq.com
|
0a2de5fb0610a4fc7e6230da5fa92dba9580fb36
|
12b17568e3b89820018ac1d2366c55d662355ccf
|
/original/sort/src/main/java/org/unix4j/sort/processor/AbstractLineProcessor.java
|
6a3ef05bf56e14ff0db4ae4b2b4ca43b74552e0e
|
[] |
no_license
|
miguelvelezmj25/performance-mapper-evaluation
|
0b086d60767250b9df7d89dfa70336b2e884af49
|
e8f42e1f9006826a79e65edae30d9aa906eb8a30
|
refs/heads/master
| 2023-08-18T04:36:38.878803
| 2021-10-20T13:47:54
| 2021-10-20T13:47:54
| 91,713,239
| 0
| 0
| null | 2021-01-15T15:33:51
| 2017-05-18T16:05:51
|
Java
|
UTF-8
|
Java
| false
| false
| 1,468
|
java
|
package org.unix4j.sort.processor;
import org.unix4j.sort.context.ExecutionContext;
/**
* Abstract base implementation for {@link LineProcessor} returned by the
* execute method of commands constructed with a reference to the command plus
* context and output passed to
*/
abstract public class AbstractLineProcessor implements LineProcessor {
private final ExecutionContext context;
private final LineProcessor output;
/**
* Constructor with command creating this processor, execution context and
* output to write to.
*
* @param context the execution context passed to the command's execute method
* @param output the output object to write to when executing the command
* through this processor
*/
public AbstractLineProcessor(ExecutionContext context, LineProcessor output) {
this.context = context;
this.output = output;
}
/**
* Returns the execution context that was passed to the constructor
*
* @return the execution context
*/
protected ExecutionContext getContext() {
return context;
}
/**
* Returns the output that was passed to the constructor of this line
* processor, the object to write to when executing the command through the
* this processor
*
* @return the output to write to when using this processor
*/
protected LineProcessor getOutput() {
return output;
}
}
|
[
"miguelvelez@mijecu25.com"
] |
miguelvelez@mijecu25.com
|
2665296f22573c96616f5e47843231dc9cd8e83e
|
350f50831472558c1412e5e45162c85fccd1c2e6
|
/src/main/java/com/eviware/soapui/actions/OpenClosedProjectsAction.java
|
5a105a7e0cb6b9507e2857fdfcba0cc74ad8315f
|
[
"MIT"
] |
permissive
|
ZihengSun/suis4j
|
759b387adbc4daa0300a360ce78112ffcf606fbc
|
6b6a233e45f14f8482fa5599fb50f5f0055a6b07
|
refs/heads/master
| 2021-07-12T17:26:23.651375
| 2019-03-08T00:18:06
| 2019-03-08T00:18:06
| 119,863,920
| 5
| 3
|
MIT
| 2019-03-07T14:56:21
| 2018-02-01T16:42:40
|
Java
|
UTF-8
|
Java
| false
| false
| 2,214
|
java
|
/*
* SoapUI, Copyright (C) 2004-2016 SmartBear Software
*
* Licensed under the EUPL, Version 1.1 or - as soon as they will be approved by the European Commission - subsequent
* versions of the EUPL (the "Licence");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://ec.europa.eu/idabc/eupl
*
* Unless required by applicable law or agreed to in writing, software distributed under the Licence is
* distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the Licence for the specific language governing permissions and limitations
* under the Licence.
*/
package com.eviware.soapui.actions;
import com.eviware.soapui.SoapUI;
import com.eviware.soapui.impl.WorkspaceImpl;
import com.eviware.soapui.model.project.Project;
import com.eviware.soapui.support.SoapUIException;
import com.eviware.soapui.support.UISupport;
import com.eviware.soapui.support.action.support.AbstractSoapUIAction;
import java.util.ArrayList;
import java.util.List;
/**
* Action to save all projects
*
* @author ole.matzura
*/
public class OpenClosedProjectsAction extends AbstractSoapUIAction<WorkspaceImpl> {
public static final String SOAPUI_ACTION_ID = "OpenClosedProjectsAction";
public OpenClosedProjectsAction() {
super("Open All Closed Projects", "Opens all closed projects in the current Workspace");
}
public void perform(WorkspaceImpl workspace, Object param) {
List<Project> openProjects = new ArrayList<Project>();
for (Project project : workspace.getProjectList()) {
if (!project.isOpen() && !project.isDisabled()) {
openProjects.add(project);
}
}
if (openProjects.isEmpty()) {
UISupport.showErrorMessage("No closed projects in workspace");
return;
}
for (Project project : openProjects) {
try {
workspace.openProject(project);
} catch (SoapUIException e) {
SoapUI.logError(e);
}
}
}
}
|
[
"zsun@gmu.edu"
] |
zsun@gmu.edu
|
de12bcfbdfb3101390d0be6a882b89dd066b15cf
|
a770e95028afb71f3b161d43648c347642819740
|
/sources/org/telegram/ui/Components/UsersAlertBase$SearchField$$ExternalSyntheticLambda0.java
|
2f107b652734f9ac2f0a862498d356e35f890985
|
[] |
no_license
|
Edicksonjga/TGDecompiledBeta
|
d7aa48a2b39bbaefd4752299620ff7b72b515c83
|
d1db6a445d5bed43c1dc8213fb8dbefd96f6c51b
|
refs/heads/master
| 2023-08-25T04:12:15.592281
| 2021-10-28T20:24:07
| 2021-10-28T20:24:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 551
|
java
|
package org.telegram.ui.Components;
import android.view.View;
import org.telegram.ui.Components.UsersAlertBase;
public final /* synthetic */ class UsersAlertBase$SearchField$$ExternalSyntheticLambda0 implements View.OnClickListener {
public final /* synthetic */ UsersAlertBase.SearchField f$0;
public /* synthetic */ UsersAlertBase$SearchField$$ExternalSyntheticLambda0(UsersAlertBase.SearchField searchField) {
this.f$0 = searchField;
}
public final void onClick(View view) {
this.f$0.lambda$new$0(view);
}
}
|
[
"fabian_pastor@msn.com"
] |
fabian_pastor@msn.com
|
92a779068cd80de761b842b298310e934ae6f93f
|
4aa7ec77452c9668a187c9980805c020c454c090
|
/app/src/main/java/org/seamcat/presentation/valuepreview/ValuePreviewable.java
|
af93606bfbd50b911b22671fc76b64789cb49f1b
|
[] |
no_license
|
freqgis/source
|
869a3dff56b430f90f20026c9001b4d8371547c7
|
5dacd5f530751218beb4dfedde4b612053581453
|
refs/heads/master
| 2023-07-02T16:32:26.323308
| 2017-01-03T16:52:48
| 2017-01-03T16:52:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 648
|
java
|
package org.seamcat.presentation.valuepreview;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.Rectangle;
/** An object which can have its value previewed, either as text or graphics.
* If the object can be displayed as graphics, it should return true from isDrawable(), and
* drawValuePreview() will then be called upon to do the actual drawing. Otherwise,
* getValuePreviewText() will be used.
*/
public interface ValuePreviewable {
public boolean isDrawable();
public Dimension getDrawablePreviewPreferredSize();
public void drawValuePreview(Graphics2D g, Rectangle r);
public String getValuePreviewText();
}
|
[
"MXS390@student.bham.ac.uk"
] |
MXS390@student.bham.ac.uk
|
ae4974215af576e94e88dab8ef1f0a54be69933d
|
fea4c2fb250ba1c90bc9e17ebbe089a6de318771
|
/sources/com/lody/virtual/remote/vloc/VCell.java
|
305611c916fdbd2d32a8d2c5beaefe6638edd99e
|
[] |
no_license
|
revanthstrakz/vx
|
d7234ea9c8ff36d9e62dfd23218181a830db810f
|
7e8cef0f0da9830246d3362341725b8e3c25e0fa
|
refs/heads/master
| 2022-11-13T11:16:21.849058
| 2020-06-27T20:39:20
| 2020-06-27T20:39:20
| 275,443,477
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,531
|
java
|
package com.lody.virtual.remote.vloc;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
public class VCell implements Parcelable {
public static final Creator<VCell> CREATOR = new Creator<VCell>() {
public VCell createFromParcel(Parcel parcel) {
return new VCell(parcel);
}
public VCell[] newArray(int i) {
return new VCell[i];
}
};
public int baseStationId;
public int cid;
public int lac;
public int mcc;
public int mnc;
public int networkId;
public int psc;
public int systemId;
public int type;
public int describeContents() {
return 0;
}
public void writeToParcel(Parcel parcel, int i) {
parcel.writeInt(this.type);
parcel.writeInt(this.mcc);
parcel.writeInt(this.mnc);
parcel.writeInt(this.psc);
parcel.writeInt(this.lac);
parcel.writeInt(this.cid);
parcel.writeInt(this.baseStationId);
parcel.writeInt(this.systemId);
parcel.writeInt(this.networkId);
}
public VCell() {
}
public VCell(Parcel parcel) {
this.type = parcel.readInt();
this.mcc = parcel.readInt();
this.mnc = parcel.readInt();
this.psc = parcel.readInt();
this.lac = parcel.readInt();
this.cid = parcel.readInt();
this.baseStationId = parcel.readInt();
this.systemId = parcel.readInt();
this.networkId = parcel.readInt();
}
}
|
[
"dr.revanthstrakz@gmail.com"
] |
dr.revanthstrakz@gmail.com
|
b7d843a759cffe451bcf84ee728aab2c3cf9a284
|
4480db5f737c02ab52f72a8c1acd9180afd624ee
|
/net/minecraft/server/EnumMobType.java
|
a7dd19e6f5fa3fbeb53c9f1e27e1a0dd4b779c6f
|
[] |
no_license
|
CollinJ/mc-dev
|
61850bb8ae68e57b5bef35f847ba5979ce2b66df
|
3dcb2867b9995dba1f06ec51ffaa31c2f61ee5c1
|
refs/heads/master
| 2020-12-25T07:16:56.461543
| 2011-01-27T03:20:05
| 2011-01-27T03:20:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 801
|
java
|
package net.minecraft.server;
public final class EnumMobType extends Enum {
public static final EnumMobType a;
public static final EnumMobType b;
public static final EnumMobType c;
private static final EnumMobType d[]; /* synthetic field */
public static EnumMobType[] values() {
return (EnumMobType[]) ((EnumMobType[]) (d)).clone();
}
public static EnumMobType valueOf(String s) {
return (EnumMobType) Enum.valueOf(net.minecraft.server.EnumMobType.class, s);
}
private EnumMobType(String s, int i) {
super(s, i);
}
static {
a = new EnumMobType("everything", 0);
b = new EnumMobType("mobs", 1);
c = new EnumMobType("players", 2);
d = (new EnumMobType[] {
a, b, c
});
}
}
|
[
"erikbroes@grum.nl"
] |
erikbroes@grum.nl
|
35d843b4aa88b9cbdf2785d7e488978f45a8d4d6
|
08b281c9ba79888915948386e9d4f7dd7cd2e3f2
|
/src/chapter01/Tiriangle.java
|
ed47e6e4be514d3774ff8eadfd362f32d63f8a92
|
[] |
no_license
|
solwaguu/chapter01-1
|
660f9c284f4c1dad1f77785bcbdd0b411f30b676
|
b29b946af14fcb0cfbfb16e9fadb6483e7bc13e8
|
refs/heads/master
| 2020-09-12T23:15:51.746544
| 2019-11-13T12:48:04
| 2019-11-13T12:48:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 225
|
java
|
package chapter01;
public class Tiriangle {
public static void main(String[] args) {
for(int i = 0; i < 6; i++) {
for(int j = 0; j < i + 1; j++) {
System.out.print("*");
}
System.out.print("\n");
}
}
}
|
[
"kickscar@gmail.com"
] |
kickscar@gmail.com
|
357eb28dcff68851c13e9fa67d83c5208d0e70f8
|
ec967fe37e3a47b7a65d18f0e3a304426df52239
|
/case/src/main/java/com/ituyty/limit/cpu/LimitCpuSleep.java
|
a465b286ed4e36a1b683dd929a5f08aeaa1b99da
|
[] |
no_license
|
china-university-mooc/Java-Concurrency-Heima
|
aa6fed6a0f8bfd71c88b3dd9750b892605763aa6
|
c423a15167088527b6a16e802cfa9fd9648a45f5
|
refs/heads/master
| 2022-11-15T21:35:00.513149
| 2020-07-17T16:46:55
| 2020-07-17T16:46:55
| 258,561,379
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 534
|
java
|
package com.ituyty.limit.cpu;
/**
* @author itutry
* @create 2020-04-24_14:53
*/
public class LimitCpuSleep {
public static void main(String[] args) {
notLimit();
// limit();
}
private static void notLimit() {
new Thread(() -> {
while (true) {
}
}).start();
}
private static void limit() {
new Thread(() -> {
while (true) {
try {
Thread.sleep(1);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}).start();
}
}
|
[
"zhaozhang@thoughtworks.com"
] |
zhaozhang@thoughtworks.com
|
49a2963c4ea978edfab6583e707869ca2a396636
|
60540fe91897fe1334729805601f7d07770f7922
|
/src/main/java/com/udineisilva/workshopmongo/resources/util/URL.java
|
f481aab729e6f63b74ced996a480cbb5395f73f8
|
[] |
no_license
|
Udinei/workshop-spring-boot-mongodb
|
cf1f963d649d7e0da1a274bfef4dad425f2c13a4
|
e9179b6056e9da64512abc6b4761e041fe0b2b65
|
refs/heads/master
| 2020-07-22T09:28:02.900757
| 2019-09-10T16:03:55
| 2019-09-10T16:03:55
| 207,150,574
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 322
|
java
|
package com.udineisilva.workshopmongo.resources.util;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
public class URL {
public static String decodeParam(String text){
try {
return URLDecoder.decode(text, "UTF-8");
} catch (UnsupportedEncodingException e) {
return "";
}
}
}
|
[
"ukaliko@gmail.com"
] |
ukaliko@gmail.com
|
2797ca1105c003003c8b2e319823b4ba8ae24dcb
|
cd9a37686f8a6dd2fdb1ab39e3603519fb6e6483
|
/src/Server/upload/DBUpload.java
|
f1f6b5e357dd9de559337e2339d8bda0a7a584a3
|
[] |
no_license
|
FzKaiFa/LogServer
|
c1431efb978cbf0d7cd7b4fc9e395e83ff5a515c
|
9be1c091fa9aba6152a9197db5ecc0ff6799ac6d
|
refs/heads/master
| 2020-05-03T02:28:02.212441
| 2019-11-03T19:31:10
| 2019-11-03T19:31:10
| 178,370,225
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,195
|
java
|
package Server.upload;
import Bean.PurchaseInStoreUploadBean;
import Utils.CommonJson;
import Utils.JDBCUtil;
import Utils.getDataBaseUrl;
import com.google.gson.Gson;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
/**
*/
@WebServlet("/DBUpload")
public class DBUpload extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public DBUpload() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
response.setCharacterEncoding("UTF-8");
request.setCharacterEncoding("GBK");
String parameter = request.getParameter("json");
Gson gson = new Gson();
Connection conn = null;
PreparedStatement sta = null;
boolean execute = true;
if(parameter!=null&&!parameter.equals("")){
try {
System.out.println(parameter);
conn = JDBCUtil.getConn(getDataBaseUrl.getUrl(request.getParameter("sqlip"), request.getParameter("sqlport"), request.getParameter("sqlname")), request.getParameter("sqlpass"), request.getParameter("sqluser"));
System.out.println(request.getParameter("sqlip")+" "+request.getParameter("sqlport")+" "+request.getParameter("sqlname")+" "+request.getParameter("sqlpass")+" "+request.getParameter("sqluser"));
PurchaseInStoreUploadBean pBean = gson.fromJson(parameter, PurchaseInStoreUploadBean.class);
for(int i =0;i<pBean.list.size();i++){
sta = conn.prepareStatement("exec proc_Allot ?,?,?,?,?,?");
String main = pBean.list.get(i).main;
sta.setString(1, main);
sta.setString(2, "");
sta.setString(3, "");
sta.setString(4, "");
sta.setString(5, "");
sta.setString(6, "");
for(int j = 0;j<pBean.list.get(i).detail.size();j++){
sta.setString(j+2, pBean.list.get(i).detail.get(j));
}
execute = sta.execute();
System.out.println(execute+"");
}
if(!execute){
response.getWriter().write(CommonJson.getCommonJson(true, ""));
}else{
response.getWriter().write(CommonJson.getCommonJson(false, "上传失败"));
}
} catch (ClassNotFoundException | SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
response.getWriter().write(CommonJson.getCommonJson(false,"数据库错误\r\n----------------\r\n错误原因:\r\n"+e.toString()));
}finally {
JDBCUtil.close(null,sta,conn);
}
}
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
}
}
|
[
"753392431@qq.com"
] |
753392431@qq.com
|
1f30b00b797672523d924e595896b33fa448a812
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/serge-rider--dbeaver/367b3a6295a50f34e66cecab82a8ab087dc01101/after/DBCResultSet.java
|
118669e3dc1a61d32e1e874625ef2312e0abf15c
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,502
|
java
|
/*
* Copyright (C) 2010-2013 Serge Rieder
* serge@jkiss.org
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.jkiss.dbeaver.model.exec;
import org.jkiss.dbeaver.model.DBPObject;
import org.jkiss.dbeaver.model.data.DBDValueMeta;
/**
* DBCResultSet
*/
public interface DBCResultSet extends DBPObject
{
DBCSession getSession();
DBCStatement getSource();
Object getColumnValue(int index) throws DBCException;
Object getColumnValue(String name) throws DBCException;
DBDValueMeta getColumnValueMeta(int index) throws DBCException;
DBDValueMeta getRowMeta() throws DBCException;
boolean nextRow() throws DBCException;
boolean moveTo(int position) throws DBCException;
DBCResultSetMetaData getResultSetMetaData() throws DBCException;
void close();
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
6ee8768db0e7167904bb39f28fcb5d6dac1e16d3
|
0eba031e55126f5aebd38c3056531357f2d71e42
|
/launchstarter/src/main/java/com/cx/launchstarter/TaskDispatcher.java
|
28edbb46b439c9fc3492f74c30a1630af6dee2ba
|
[] |
no_license
|
282615612/LaunchStarter
|
4cc48e5a452dcdd956703aa577257a0ccbce464a
|
a112017d4072d21cf693d69f278a1bed7e52a77e
|
refs/heads/master
| 2022-11-16T18:08:48.597229
| 2020-07-11T14:55:59
| 2020-07-11T14:55:59
| 278,881,542
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,313
|
java
|
package com.cx.launchstarter;
import android.content.Context;
import android.os.Looper;
import android.util.Log;
import androidx.annotation.UiThread;
import com.cx.launchstarter.sort.TaskSortUtil;
import com.cx.launchstarter.stat.TaskStat;
import com.cx.launchstarter.utils.DispatcherLog;
import com.cx.launchstarter.utils.Utils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
/**
* 启动器调用类
*/
public class TaskDispatcher {
private long mStartTime;
private static final int WAITTIME = 10000;
private static Context sContext;
private static boolean sIsMainProcess;
private List<Future> mFutures = new ArrayList<>();
private static volatile boolean sHasInit;
private List<Task> mAllTasks = new ArrayList<>();
private List<Class<? extends Task>> mClsAllTasks = new ArrayList<>();
private volatile List<Task> mMainThreadTasks = new ArrayList<>();
private CountDownLatch mCountDownLatch;
/**
* 需要等待的任务数
*/
private AtomicInteger mNeedWaitCount = new AtomicInteger();//
/**
* 调用了 await 还没结束且需要等待的任务列表
*/
private List<Task> mNeedWaitTasks = new ArrayList<>();
/**
* 已经结束的Task
*/
private volatile List<Class<? extends Task>> mFinishedTasks = new ArrayList<>(100);//
private HashMap<Class<? extends Task>, ArrayList<Task>> mDependedHashMap = new HashMap<>();
/**
* 启动器分析的次数,统计下分析的耗时;
*/
private AtomicInteger mAnalyseCount = new AtomicInteger();
private TaskDispatcher() {
}
public static void init(Context context) {
if (context != null) {
sContext = context;
sHasInit = true;
sIsMainProcess = Utils.isMainProcess(sContext);
}
}
/**
* 注意:每次获取的都是新对象
*
* @return
*/
public static TaskDispatcher createInstance() {
if (!sHasInit) {
throw new RuntimeException("must call TaskDispatcher.init first");
}
return new TaskDispatcher();
}
public TaskDispatcher addTask(Task task) {
if (task != null) {
collectDepends(task);
mAllTasks.add(task);
mClsAllTasks.add(task.getClass());
// 非主线程且需要wait的,主线程不需要CountDownLatch也是同步的
if (ifNeedWait(task)) {
mNeedWaitTasks.add(task);
mNeedWaitCount.getAndIncrement();
}
}
return this;
}
private void collectDepends(Task task) {
if (task.dependsOn() != null && task.dependsOn().size() > 0) {
for (Class<? extends Task> cls : task.dependsOn()) {
if (mDependedHashMap.get(cls) == null) {
mDependedHashMap.put(cls, new ArrayList<Task>());
}
mDependedHashMap.get(cls).add(task);
if (mFinishedTasks.contains(cls)) {
task.satisfy();
}
}
}
}
private boolean ifNeedWait(Task task) {
return !task.runOnMainThread() && task.needWait();
}
@UiThread
public void start() {
mStartTime = System.currentTimeMillis();
if (Looper.getMainLooper() != Looper.myLooper()) {
throw new RuntimeException("must be called from UiThread");
}
if (mAllTasks.size() > 0) {
mAnalyseCount.getAndIncrement();
printDependedMsg();
mAllTasks = TaskSortUtil.getSortResult(mAllTasks, mClsAllTasks);
mCountDownLatch = new CountDownLatch(mNeedWaitCount.get());
sendAndExecuteAsyncTasks();
DispatcherLog.i("task analyse cost " + (System.currentTimeMillis() - mStartTime) + " begin main ");
executeTaskMain();
}
DispatcherLog.i("task analyse cost startTime cost " + (System.currentTimeMillis() - mStartTime));
}
public void cancel() {
for (Future future : mFutures) {
future.cancel(true);
}
}
private void executeTaskMain() {
mStartTime = System.currentTimeMillis();
for (Task task : mMainThreadTasks) {
long time = System.currentTimeMillis();
new DispatchRunnable(task,this).run();
DispatcherLog.i("real main " + task.getClass().getSimpleName() + " cost " +
(System.currentTimeMillis() - time));
}
DispatcherLog.i("maintask cost " + (System.currentTimeMillis() - mStartTime));
}
/**
* 发送去并且执行异步任务
*/
private void sendAndExecuteAsyncTasks() {
for (Task task : mAllTasks) {
if (task.onlyInMainProcess() && !sIsMainProcess) {
markTaskDone(task);
} else {
sendTaskReal(task);
}
task.setSend(true);
}
}
/**
* 查看被依赖的信息
*/
private void printDependedMsg() {
DispatcherLog.i("needWait size : " + (mNeedWaitCount.get()));
if (false) {
for (Class<? extends Task> cls : mDependedHashMap.keySet()) {
DispatcherLog.i("cls " + cls.getSimpleName() + " " + mDependedHashMap.get(cls).size());
for (Task task : mDependedHashMap.get(cls)) {
DispatcherLog.i("cls " + task.getClass().getSimpleName());
}
}
}
}
/**
* 通知Children一个前置任务已完成
*/
public void satisfyChildren(Task launchTask) {
ArrayList<Task> arrayList = mDependedHashMap.get(launchTask.getClass());
if (arrayList != null && arrayList.size() > 0) {
for (Task task : arrayList) {
task.satisfy();
}
}
}
public void markTaskDone(Task task) {
if (ifNeedWait(task)) {
mFinishedTasks.add(task.getClass());
mNeedWaitTasks.remove(task);
mCountDownLatch.countDown();
mNeedWaitCount.getAndDecrement();
}
}
/**
* 发送任务
*/
private void sendTaskReal(final Task task) {
if (task.runOnMainThread()) {
mMainThreadTasks.add(task);
if (task.needCall()) {
task.setTaskCallBack(new TaskCallBack() {
@Override
public void call() {
TaskStat.markTaskDone();
task.setFinished(true);
satisfyChildren(task);
markTaskDone(task);
DispatcherLog.i(task.getClass().getSimpleName() + " finish");
Log.i("testLog", "call");
}
});
}
} else {
// 直接发,是否执行取决于具体线程池
Future future = task.runOn().submit(new DispatchRunnable(task,this));
mFutures.add(future);
}
}
public void executeTask(Task task) {
if (ifNeedWait(task)) {
mNeedWaitCount.getAndIncrement();
}
task.runOn().execute(new DispatchRunnable(task,this));
}
@UiThread
public void await() {
try {
if (DispatcherLog.isDebug()) {
DispatcherLog.i("still has " + mNeedWaitCount.get());
for (Task task : mNeedWaitTasks) {
DispatcherLog.i("needWait: " + task.getClass().getSimpleName());
}
}
if (mNeedWaitCount.get() > 0) {
if (mCountDownLatch == null) {
throw new RuntimeException("You have to call start() before call await()");
}
mCountDownLatch.await(WAITTIME, TimeUnit.MILLISECONDS);
}
} catch (InterruptedException e) {
}
}
public static Context getContext() {
return sContext;
}
public static boolean isMainProcess() {
return sIsMainProcess;
}
}
|
[
"cxjamess@yeah.net"
] |
cxjamess@yeah.net
|
150e02162d5a61df92f8e77efef05ec6f96b0151
|
868bf400c0143e6a13c9dc2804726449816e4b68
|
/LintCode-master/Java/921. Minimum Add to Make Parentheses Valid.java
|
95d10e95d9e8253335aa74593f3403579f294b36
|
[] |
no_license
|
EngrDevDom/Java-Codes
|
7d39efd8fc7f5d9589c34f98adaa71fc923308b9
|
ab6934cbe5a3e0330b64cca53738180675a1f74a
|
refs/heads/master
| 2022-12-02T08:14:58.380076
| 2020-08-11T16:02:18
| 2020-08-11T16:02:18
| 286,783,520
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,839
|
java
|
M
tags:
time: O(n)
space: O(1)
#### Method1: Stack
- use stack to verify the input/output of '(' and ')'
- time, space: O(n)
#### Method1: Simpilfy stack with open parentheses count
- time:(n), space: O(1)
```
/*
Given a string S of '(' and ')' parentheses, we add the minimum number of parentheses ( '(' or ')', and in any positions ) so that the resulting parentheses string is valid.
Formally, a parentheses string is valid if and only if:
It is the empty string, or
It can be written as AB (A concatenated with B), where A and B are valid strings, or
It can be written as (A), where A is a valid string.
Given a parentheses string, return the minimum number of parentheses we must add to make the resulting string valid.
Example 1:
Input: "())"
Output: 1
Example 2:
Input: "((("
Output: 3
Example 3:
Input: "()"
Output: 0
Example 4:
Input: "()))(("
Output: 4
Note:
S.length <= 1000
S only consists of '(' and ')' characters.
*/
// Method1: stack
class Solution {
public int minAddToMakeValid(String s) {
if (s == null || s.length() == 0) {
return 0;
}
Stack<Character> stack = new Stack<>();
int count = 0;
for (char c : s.toCharArray()) {
if (c == '(') stack.push(c);
else if (stack.isEmpty()) count++;
else stack.pop();
}
return count + stack.size();
}
}
// Method: simplify with openCount: open parentheses count
class Solution {
public int minAddToMakeValid(String s) {
if (s == null || s.length() == 0) {
return 0;
}
int count = 0, openCount = 0;
for (char c : s.toCharArray()) {
if (c == '(') openCount++;
else if (openCount == 0) count++;
else openCount--;
}
return count + openCount;
}
}
```
|
[
"60880034+EngrDevDom@users.noreply.github.com"
] |
60880034+EngrDevDom@users.noreply.github.com
|
be558f0c990d67a858808cf74358215af392a162
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a109/A109785Test.java
|
6746e3263b9a990005fb397005da29d48767a82a
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package irvine.oeis.a109;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A109785Test extends AbstractSequenceTest {
}
|
[
"sean.irvine@realtimegenomics.com"
] |
sean.irvine@realtimegenomics.com
|
973e476d5c2dd6f0f7d667d419604cbfd16fc182
|
1cce29cd23674b1e7f3d523c779231032720add4
|
/src/main/java/com/suixingpay/profit/jikeshijian/shejimoshi/celuemoshi/OrderServiceTwo.java
|
5b642c69c80cd259f3db1d94e6e0168b0f4f6413
|
[] |
no_license
|
histjxg/hxg-all
|
b87a30f2c18c8c075067c406fb1aac8b56dbff4d
|
01a1aabb12f3a56bb74698ac986fd16268421698
|
refs/heads/master
| 2023-07-11T22:10:39.808894
| 2021-08-18T16:07:35
| 2021-08-18T16:07:36
| 397,638,703
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,043
|
java
|
package com.suixingpay.profit.jikeshijian.shejimoshi.celuemoshi;
/**
* Created with IntelliJ IDEA.
*
* @Auther: huangxiaogen
* @Date: 2020/07/19/下午2:21
* @Description:
*/
/**
* 分析:
* 1。重构之后的代码就没有了 if-else 分支判断语句了。实际上,这得益于策略工厂类
* 2。在工厂 类中,我们用 Map 来缓存策略,根据 type 直接从 Map 中获取对应的策略,从而避免 if- else 分支判断逻辑。
* 3。等后面讲到使用状态模式来避免分支判断逻辑的时候,你会发现,它们使用的是同样的套路
* 4。本质上都是借助“查表法”,根据 type 查表(代码中的 strategies 就是表)替代根据 type 分支判断。
* 5。
*
*
*
*
*
*/
public class OrderServiceTwo {
public double discount(Order order) {
OrderType type = order.getType();
DiscountStrategy discountStrategy = DiscountStrategyFactoryShare.getDiscountStrategy(type
);
return discountStrategy.calDiscount(order);
}
}
|
[
"huangxiaogen@baijiahulian.com"
] |
huangxiaogen@baijiahulian.com
|
72a482d1a8b3bee29b1df47cbc24412e7a3cca58
|
8e5ad89b0a599032eaca4a2137d5102f7b2a187b
|
/src/test/java/ru/job4j/prof/ProgrammerTest.java
|
1e15ff1b30920f42deb8e1547b07b1bb1660b4a9
|
[] |
no_license
|
george129/job4j_tracker
|
4a74a3401f204cdf64ce7393a5210fca00c78994
|
84e376d00916c53185e524fd75fccd2d8f338ec3
|
refs/heads/master
| 2023-03-01T01:30:01.273111
| 2021-02-01T09:15:59
| 2021-02-01T09:15:59
| 265,304,054
| 0
| 0
| null | 2020-05-19T16:41:20
| 2020-05-19T16:41:19
| null |
UTF-8
|
Java
| false
| false
| 482
|
java
|
package ru.job4j.prof;
import org.junit.Assert;
import org.junit.Test;
import static org.junit.Assert.*;
public class ProgrammerTest {
@Test
public void getAll() {
Builder bld = new Builder("Test", "Tutti", "PSU", "1980-10-20");
Assert.assertEquals("Test", bld.getName());
Assert.assertEquals("Tutti", bld.getSurname());
Assert.assertEquals("PSU", bld.getEducation());
Assert.assertEquals("1980-10-20", bld.getBirthday());
}
}
|
[
"none"
] |
none
|
860be3ae750329e7b945b0d802904174c2483474
|
5c3c4fde730a650b698446291b039241ab8c1651
|
/common/src/main/java/com/learn/Try/google/protobuf/RpcChannel.java
|
91f3cab1ebee1b765548c6e6ba2bbf9485f3ac23
|
[] |
no_license
|
mvphjx/learn
|
f7462a3abe77e8306d9b5fbe90df052a9caac17a
|
1795e6360e353cb4820afa66715d53b3dcc26b73
|
refs/heads/master
| 2022-12-05T19:30:20.043567
| 2021-07-01T03:16:18
| 2021-07-01T03:16:18
| 92,476,292
| 2
| 0
| null | 2022-11-16T07:41:33
| 2017-05-26T05:42:04
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 3,512
|
java
|
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// http://code.google.com/p/protobuf/
//
// 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 Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package com.learn.Try.google.protobuf;
/**
* <p>Abstract interface for an RPC channel. An {@code RpcChannel} represents a
* communication line to a {@link Service} which can be used to call that
* {@link Service}'s methods. The {@link Service} may be running on another
* machine. Normally, you should not call an {@code RpcChannel} directly, but
* instead construct a stub {@link Service} wrapping it. Example:
*
* <pre>
* RpcChannel channel = rpcImpl.newChannel("remotehost.example.com:1234");
* RpcController controller = rpcImpl.newController();
* MyService service = MyService.newStub(channel);
* service.myMethod(controller, request, callback);
* </pre>
*
* <p>Starting with version 2.3.0, RPC implementations should not try to build
* on this, but should instead provide code generator plugins which generate
* code specific to the particular RPC implementation. This way the generated
* code can be more appropriate for the implementation in use and can avoid
* unnecessary layers of indirection.
*
* @author kenton@google.com Kenton Varda
*/
public interface RpcChannel {
/**
* Call the given method of the remote service. This method is similar to
* {@code Service.callMethod()} with one important difference: the caller
* decides the types of the {@code Message} objects, not the callee. The
* request may be of any type as long as
* {@code request.getDescriptor() == method.getInputType()}.
* The response passed to the callback will be of the same type as
* {@code responsePrototype} (which must have
* {@code getDescriptor() == method.getOutputType()}).
*/
void callMethod(Descriptors.MethodDescriptor method,
RpcController controller,
Message request,
Message responsePrototype,
RpcCallback<Message> done);
}
|
[
"511572653@qq.com"
] |
511572653@qq.com
|
0753c305212db42c937efe4ac7c1eda413ac6106
|
03e11116eed9b3abaf8593b85ed382e86524e60d
|
/lc-system/src/main/java/com/ylkget/system/mapper/SysUserRoleMapper.java
|
899a9203f9549743df1b3569dd2f023f2a129a8c
|
[] |
no_license
|
ylksty/lc-vue
|
38ae95c20a4d496fcf87895e883ff7343eaa95c1
|
2d729ce1505fb295434320de0d4330786f38bc3a
|
refs/heads/master
| 2023-05-14T04:38:26.022464
| 2021-06-06T13:56:39
| 2021-06-06T13:56:39
| 370,209,922
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,436
|
java
|
package com.ylkget.system.mapper;
import com.ylkget.system.domain.SysUserRole;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 用户与角色关联表 数据层
*
* @author ylkget
*/
public interface SysUserRoleMapper
{
/**
* 通过用户ID删除用户和角色关联
*
* @param userId 用户ID
* @return 结果
*/
public int deleteUserRoleByUserId(Long userId);
/**
* 批量删除用户和角色关联
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteUserRole(Long[] ids);
/**
* 通过角色ID查询角色使用数量
*
* @param roleId 角色ID
* @return 结果
*/
public int countUserRoleByRoleId(Long roleId);
/**
* 批量新增用户角色信息
*
* @param userRoleList 用户角色列表
* @return 结果
*/
public int batchUserRole(List<SysUserRole> userRoleList);
/**
* 删除用户和角色关联信息
*
* @param userRole 用户和角色关联信息
* @return 结果
*/
public int deleteUserRoleInfo(SysUserRole userRole);
/**
* 批量取消授权用户角色
*
* @param roleId 角色ID
* @param userIds 需要删除的用户数据ID
* @return 结果
*/
public int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds);
}
|
[
"ylksty@163.com"
] |
ylksty@163.com
|
6f726efd3af741478376658ffb11c3642207c8c6
|
153fdfea5ebf6db00d9c82ea733135872a5dea50
|
/utils/xml/NameSpace.java
|
a56a44e71bb0371505d5085b2edbdbe47f76ed88
|
[
"Apache-2.0"
] |
permissive
|
zycgit/configuration
|
fbc04bea1b33b61d51d8dd5b31018d31d016e2c5
|
c1c0b4fe17b5fa832c4a2271a6328ba8c85c8b2d
|
refs/heads/master
| 2021-08-22T20:22:24.588389
| 2017-05-06T10:20:34
| 2017-05-06T10:20:34
| 73,467,721
| 0
| 0
|
Apache-2.0
| 2021-08-02T16:56:12
| 2016-11-11T10:17:21
|
Java
|
UTF-8
|
Java
| false
| false
| 1,840
|
java
|
/*
* Copyright 2008-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.more.xml;
/**
* 该类在{@link XmlParserKitManager}类,用于标记命名空间和xpath的对应关系。
* @version 2010-9-12
* @author 赵永春 (zyc@hasor.net)
*/
public class NameSpace {
private String uri = null; //命名空间
private StringBuffer xpath = null; //xpath
/***/
public NameSpace(final String uri, final String xpath) {
this.uri = uri;
this.xpath = new StringBuffer(xpath);
}
/**获取命名空间。*/
public String getUri() {
return this.uri;
}
/**获取xpath。*/
public String getXpath() {
return this.xpath.toString();
}
/**追加xpath一个节点。*/
void appendXPath(final String name, final boolean isAttribute) {
if (this.xpath.indexOf("/") != this.xpath.length() - 1) {
this.xpath.append("/");
}
if (isAttribute == true) {
this.xpath.append("@");
}
this.xpath.append(name);
}
/**删除xpath的最后一个节点。*/
void removeXPath() {
int index = this.xpath.lastIndexOf("/");
index = index == 0 ? 1 : index;
this.xpath = this.xpath.delete(index, this.xpath.length());
}
}
|
[
"zyc@hasor.net"
] |
zyc@hasor.net
|
69df5a8f68d47b0b836ddd4020967443c854514b
|
92dd6bc0a9435c359593a1f9b309bb58d3e3f103
|
/src/May2021Leetcode/_0934ShortestBridge.java
|
9c962ad9f5193944d825d6dc2a7b1c30e4b299ee
|
[
"MIT"
] |
permissive
|
darshanhs90/Java-Coding
|
bfb2eb84153a8a8a9429efc2833c47f6680f03f4
|
da76ccd7851f102712f7d8dfa4659901c5de7a76
|
refs/heads/master
| 2023-05-27T03:17:45.055811
| 2021-06-16T06:18:08
| 2021-06-16T06:18:08
| 36,981,580
| 3
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,017
|
java
|
package May2021Leetcode;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Queue;
public class _0934ShortestBridge {
public static void main(String[] args) {
System.out.println(shortestBridge(new int[][] { new int[] { 0, 1 }, new int[] { 1, 0 } }));
System.out.println(
shortestBridge(new int[][] { new int[] { 0, 1, 0 }, new int[] { 0, 0, 0 }, new int[] { 0, 0, 1 } }));
System.out.println(shortestBridge(new int[][] { new int[] { 1, 1, 1, 1, 1 }, new int[] { 1, 0, 0, 0, 1 },
new int[] { 1, 0, 1, 0, 1 }, new int[] { 1, 0, 0, 0, 1 }, new int[] { 1, 1, 1, 1, 1 } }));
}
public static int shortestBridge(int[][] A) {
Queue<int[]> q = new LinkedList<int[]>();
for (int i = 0; i < A.length; i++) {
for (int j = 0; j < A[0].length; j++) {
if (A[i][j] == 1) {
dfs(i, j, A, q);
return bfs(q, A);
}
}
}
return 0;
}
public static int bfs(Queue<int[]> q, int[][] A) {
int count = 0;
int[][] dirs = new int[][] { new int[] { -1, 0 }, new int[] { 1, 0 }, new int[] { 0, -1 }, new int[] { 0, 1 } };
HashSet<String> vis = new HashSet<String>();
while (!q.isEmpty()) {
int size = q.size();
for (int i = 0; i < size; i++) {
int[] arr = q.poll();
int x = arr[0];
int y = arr[1];
if (A[x][y] == 1) {
return count - 1;
}
for (int j = 0; j < dirs.length; j++) {
int newX = x + dirs[j][0];
int newY = y + dirs[j][1];
if (newX < 0 || newY < 0 || newX >= A.length || newY >= A[0].length)
continue;
if (A[newX][newY] == 2 || vis.contains(newX + "/" + newY))
continue;
q.offer(new int[] { newX, newY });
vis.add(newX + "/" + newY);
}
}
count++;
}
return 0;
}
public static void dfs(int x, int y, int[][] A, Queue<int[]> q) {
if (x < 0 || y < 0 || x >= A.length || y >= A[0].length || A[x][y] != 1)
return;
A[x][y] = 2;
q.offer(new int[] { x, y });
dfs(x - 1, y, A, q);
dfs(x + 1, y, A, q);
dfs(x, y - 1, A, q);
dfs(x, y + 1, A, q);
}
}
|
[
"hsdars@gmail.com"
] |
hsdars@gmail.com
|
4e4a5fecf4212968286d5adf7fe607a9249bc803
|
f0568343ecd32379a6a2d598bda93fa419847584
|
/modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201211/GeoTargetingError.java
|
14888c0413f28dbb97c9b771bcd8d2dfeec949da
|
[
"Apache-2.0"
] |
permissive
|
frankzwang/googleads-java-lib
|
bd098b7b61622bd50352ccca815c4de15c45a545
|
0cf942d2558754589a12b4d9daa5902d7499e43f
|
refs/heads/master
| 2021-01-20T23:20:53.380875
| 2014-07-02T19:14:30
| 2014-07-02T19:14:30
| 21,526,492
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,655
|
java
|
package com.google.api.ads.dfp.jaxws.v201211;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
*
* Lists all errors associated with geographical targeting for a
* {@link LineItem}.
*
*
* <p>Java class for GeoTargetingError complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="GeoTargetingError">
* <complexContent>
* <extension base="{https://www.google.com/apis/ads/publisher/v201211}ApiError">
* <sequence>
* <element name="reason" type="{https://www.google.com/apis/ads/publisher/v201211}GeoTargetingError.Reason" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "GeoTargetingError", propOrder = {
"reason"
})
public class GeoTargetingError
extends ApiError
{
protected GeoTargetingErrorReason reason;
/**
* Gets the value of the reason property.
*
* @return
* possible object is
* {@link GeoTargetingErrorReason }
*
*/
public GeoTargetingErrorReason getReason() {
return reason;
}
/**
* Sets the value of the reason property.
*
* @param value
* allowed object is
* {@link GeoTargetingErrorReason }
*
*/
public void setReason(GeoTargetingErrorReason value) {
this.reason = value;
}
}
|
[
"jradcliff@google.com"
] |
jradcliff@google.com
|
fd41fcf9708c90a119b2297c7000b22b7a3dd1ac
|
c547b82dde6124ab3ac0a57c2fe12177c2bda0ec
|
/plugins/org.fusesource.ide.jvmmonitor.agent/src/org/fusesource/ide/jvmmonitor/internal/agent/FrameNode.java
|
70a6d9e31e85a9a52105097fcbb233564bf12fb3
|
[] |
no_license
|
paulorcf/fuseide
|
34fbe73845426b08d3812a57bc700054b65966f6
|
fe1d2f274658e0cbd956362a4dc0783b13901c71
|
refs/heads/master
| 2020-04-05T18:55:49.841156
| 2013-11-13T10:15:04
| 2013-11-13T10:15:04
| 14,440,023
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,380
|
java
|
/*******************************************************************************
* Copyright (c) 2010 JVM Monitor project. All rights reserved.
*
* This code is distributed under the terms of the Eclipse Public License v1.0
* which is available at http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.fusesource.ide.jvmmonitor.internal.agent;
import java.io.PrintWriter;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.fusesource.ide.jvmmonitor.internal.agent.asm.Type;
/**
* The frame node of runtime model.
*/
@SuppressWarnings("nls")
public class FrameNode {
/** The class name. */
private String className;
/** The method name. */
private String methodName;
/** The child frame nodes. */
private Map<String, FrameNode> childFrames;
/** The parent frame node. */
private FrameNode parentFrame;
/** The time stepped into this frame. */
private long stepIntoTime;
/** The total invocation time. */
private long totalTime;
/** The overhead time. */
private long overheadTime;
/** The invocation count. */
private int count;
/**
* The constructor.
*
* @param parent
* The parent frame node
* @param clazz
* The class name
* @param method
* The method name
*/
protected FrameNode(FrameNode parent, String clazz, String method) {
parentFrame = parent;
className = clazz;
methodName = method;
childFrames = new ConcurrentHashMap<String, FrameNode>();
stepIntoTime = 0;
totalTime = 0;
overheadTime = 0;
count = 0;
}
/**
* Gets the child frame for the given class name and method name.
*
* @param clazz
* The class name
* @param method
* The method name
* @return The child frame
*/
protected FrameNode getChild(String clazz, String method) {
FrameNode frame = childFrames.get(clazz + '.' + method);
if (frame == null) {
frame = new FrameNode(this, clazz, method);
childFrames.put(clazz + '.' + method, frame);
}
return frame;
}
/**
* Sets the step into time.
*
* @param time
* The time stepping into this frame
* @param overhead
* The overhead time
*/
protected void setStepIntoTime(long time, long overhead) {
stepIntoTime = time;
overheadTime += overhead;
count++;
}
/**
* Sets the step return time.
*
* @param time
* The time stepping return from this frame
* @param overhead
* The overhead time
*/
protected void setStepReturnTime(long time, long overhead) {
totalTime += time - stepIntoTime;
overheadTime += overhead;
stepIntoTime = 0;
}
/**
* Increments the overhead.
*
* @param overhead
* The overhead time
*/
protected void incrementOverhead(long overhead) {
overheadTime += overhead;
}
/**
* Gets the parent frame.
*
* @return The parent frame, or <tt>null</tt> if this is root frame node
*/
protected FrameNode getParent() {
return parentFrame;
}
/**
* Searches the frame.
*
* @param clazz
* The class name
* @param method
* The method name
* @return The frame
*/
protected FrameNode searchFrame(String clazz, String method) {
if (className.equals(clazz) && methodName.equals(method)) {
return this;
}
if (parentFrame == null) {
return this;
}
return parentFrame.searchFrame(clazz, method);
}
/**
* Dumps into a file.
*
* @param writer
* The writer
* @param time
* The time
* @param nest
* The nest
*/
protected void dump(PrintWriter writer, long time, int nest) {
String name = getFrameName();
long actualTotalTime = totalTime - overheadTime;
if (stepIntoTime != 0) {
actualTotalTime += time - stepIntoTime;
}
for (int i = 0; i < nest; i++) {
writer.print("\t");
}
writer.printf("<frame name=\"%s\" cnt=\"%d\" time=\"%d\"", name, count,
Math.max(actualTotalTime, 0));
if (childFrames.size() > 0) {
writer.println(">");
for (FrameNode frameNode : childFrames.values()) {
frameNode.dump(writer, time, nest + 1);
}
for (int i = 0; i < nest; i++) {
writer.print("\t");
}
writer.println("</frame>");
} else {
writer.println("/>");
}
}
/**
* Dumps the profile data.
*
* @param buffer
* The string buffer
* @param time
* The time
* @param nest
* The nest count
*/
protected void dump(StringBuffer buffer, long time, int nest) {
String name = getFrameName();
long actualTotalTime = totalTime - overheadTime;
if (stepIntoTime != 0) {
actualTotalTime += time - stepIntoTime;
}
for (int i = 0; i < nest; i++) {
buffer.append('\t');
}
buffer.append("<frame name=\"").append(name).append("\" cnt=\"")
.append(count).append("\" time=\"")
.append(Math.max(actualTotalTime, 0)).append("\"");
if (childFrames.size() > 0) {
buffer.append(">\n");
for (FrameNode frameNode : childFrames.values()) {
frameNode.dump(buffer, time, nest + 1);
}
for (int i = 0; i < nest; i++) {
buffer.append('\t');
}
buffer.append("</frame>\n");
} else {
buffer.append("/>\n");
}
}
/**
* Gets the frame name.
*
* @return The frame name
*/
private String getFrameName() {
// replace '/' with '.'
String clazz = className.replace('/', '.');
// convert the parameter descriptor into java type
StringBuilder builder = new StringBuilder();
builder.append(methodName.substring(0, methodName.indexOf('(') + 1));
Type[] types = Type.getArgumentTypes(methodName.substring(methodName
.indexOf('(')));
for (int i = 0; i < types.length; i++) {
if (i > 0) {
builder.append(", ");
}
builder.append(Type.getType(types[i].getDescriptor())
.getClassName());
}
builder.append(')');
String method = builder.toString();
// convert into escaped characters
method = method.replaceAll("<", "<").replaceAll(">", ">");
return clazz + '.' + method;
}
}
|
[
"james.strachan@gmail.com"
] |
james.strachan@gmail.com
|
340ffcbb5c8efae395f694f79c9f7fe43a8d23cf
|
1ac1226c8eaa15667bc8f5305443b66a98c9be7d
|
/basetool/src/main/java/com/zhuyongdi/basetool/widget/max_height/XXMaxHeightScrollView.java
|
78f186d1d40fc0b2ee6d0c0464b2c6b800cb7b79
|
[] |
no_license
|
zhuyongdi/Project_BaseTool
|
266384cea25681d65570be37899d4993c92e1d68
|
835fd41583619a25117600237bf0126f4e02e472
|
refs/heads/master
| 2020-05-21T07:22:26.381619
| 2019-09-02T02:34:08
| 2019-09-02T02:34:08
| 185,958,808
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,416
|
java
|
package com.zhuyongdi.basetool.widget.max_height;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ScrollView;
/**
* 可设置最大高度的ScrollView
* Created by Administrator on 2018/12/18.
*/
public class XXMaxHeightScrollView extends ScrollView {
private int maxHeight;
public XXMaxHeightScrollView(Context context) {
super(context);
}
public XXMaxHeightScrollView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public XXMaxHeightScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
if (getParent() != null) {
getParent().requestDisallowInterceptTouchEvent(true);
}
return super.onInterceptTouchEvent(ev);
}
public void setMaxHeight(int maxHeight) {
this.maxHeight = maxHeight;
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
try {
if (maxHeight > 0) {
heightMeasureSpec = MeasureSpec.makeMeasureSpec(maxHeight, MeasureSpec.AT_MOST);
}
} catch (Exception e) {
e.printStackTrace();
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
}
|
[
"904507761@qq.com"
] |
904507761@qq.com
|
4d03827390cc40980e46c8c577bdfe344232478b
|
2c052a89603d741c0d9fca49a3e657eb78f5b28a
|
/app/src/main/java/com/spot/actmvp/main/MainContract.java
|
208961c13441f0c112f14eef4dd40eeefd286929
|
[] |
no_license
|
abdultanveer/ActMvp
|
db46dcdc6ac3970d166c341e7e674ea2b1f8a58f
|
8612505aea8c2babb587301be5b6323b60c84d9b
|
refs/heads/master
| 2020-12-28T18:28:12.608833
| 2020-02-05T12:03:44
| 2020-02-05T12:03:44
| 238,440,440
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 298
|
java
|
package com.spot.actmvp.main;
import com.spot.actmvp.data.Note;
public interface MainContract {
interface View{
void showToast(String msg);//presenter -view to show a toast
}
interface Presenter{
void somebodyClickedButton();
void saveNote(Note note);
}
}
|
[
"abdul.tanveer@gmail.com"
] |
abdul.tanveer@gmail.com
|
aa10321d358fb5f0223c403ed582d4dc24b702c2
|
b6cc26e4338559055b45057eefd2162c67bf1cb8
|
/component/viewer/restfulobjects/applib/src/test/java/uk/co/objectconnexions/expressiveobjects/viewer/restfulobjects/applib/JsonRepresentationTest_mapHas.java
|
9bb099df140adfb3aab2e37565ee6cc5f15b0618
|
[
"Apache-2.0"
] |
permissive
|
objectconnexions/expressive-objects
|
6aa36611138ee33e4dbf855531c85c4b8b7db0e8
|
a5ced6694cfb2daf24ba09c94cc4e1864384224c
|
refs/heads/master
| 2023-08-07T18:29:15.670839
| 2019-11-14T07:20:19
| 2019-11-14T07:20:19
| 215,518,136
| 0
| 0
|
Apache-2.0
| 2023-07-22T18:56:10
| 2019-10-16T10:12:57
|
Java
|
UTF-8
|
Java
| false
| false
| 2,118
|
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 uk.co.objectconnexions.expressiveobjects.viewer.restfulobjects.applib;
import static uk.co.objectconnexions.expressiveobjects.viewer.restfulobjects.applib.JsonFixture.readJson;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import java.io.IOException;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
import org.junit.Test;
import uk.co.objectconnexions.expressiveobjects.viewer.restfulobjects.applib.JsonRepresentation;
public class JsonRepresentationTest_mapHas {
private JsonRepresentation jsonRepresentation;
@Test
public void forMap() throws JsonParseException, JsonMappingException, IOException {
jsonRepresentation = new JsonRepresentation(readJson("map.json"));
assertThat(jsonRepresentation.mapHas("aString"), is(true));
assertThat(jsonRepresentation.mapHas("aSubMap.anInt"), is(true));
assertThat(jsonRepresentation.mapHas("nonExistent"), is(false));
}
@Test(expected = IllegalStateException.class)
public void forList() throws JsonParseException, JsonMappingException, IOException {
jsonRepresentation = new JsonRepresentation(readJson("list.json"));
jsonRepresentation.mapHas("aString");
}
}
|
[
"rmatthews@objectconnexions.co.uk"
] |
rmatthews@objectconnexions.co.uk
|
60bd001fd355cfbd6b1de0fe4ca248a42d3dd3ab
|
737253197104a69ec973836c2b5b5d6dd811270f
|
/app/src/main/java/com/zys/jym/lanhu/httpcallback/StreamCallback.java
|
eaaa5457b12e608d8aacd6e40bee6006ad63f244
|
[] |
no_license
|
bailyzheng/lanhu1
|
12484164dd81535ee6b8656e3cbf692b9133fd5b
|
af35117804956ae7517abeb97238a61794f74381
|
refs/heads/master
| 2020-12-03T00:00:14.649537
| 2017-06-30T10:13:35
| 2017-06-30T10:13:35
| 95,970,978
| 0
| 0
| null | 2017-07-01T15:04:16
| 2017-07-01T15:04:16
| null |
UTF-8
|
Java
| false
| false
| 883
|
java
|
package com.zys.jym.lanhu.httpcallback;
import com.google.gson.GsonBuilder;
import com.zhy.http.okhttp.callback.Callback;
import com.zys.jym.lanhu.bean.StreamData;
import com.zys.jym.lanhu.utils.MyUtils;
import java.io.IOException;
import okhttp3.Response;
/**
* Created by Administrator on 2016/6/2.
*/
public abstract class StreamCallback extends Callback<StreamData> {
@Override
public StreamData parseNetworkResponse(Response response) throws IOException {
//response.body().string()只能调用一次 否则报错 !切记!!!!!
String jsonStr = response.body().string();
MyUtils.Loge("TAG--JSON","JSON="+jsonStr);
StreamData mData = new GsonBuilder()
.setPrettyPrinting()
.disableHtmlEscaping()
.create().fromJson(jsonStr, StreamData.class);
return mData;
}
}
|
[
"867814102@qq.com"
] |
867814102@qq.com
|
2979207df517aeb4c405eabd614f4e9f0905af3f
|
2f4a058ab684068be5af77fea0bf07665b675ac0
|
/utils/com/facebook/uberbar/api/FetchUberbarResultMethod.java
|
4a6b86dde56e3e98c16f734578c0b2c329d06391
|
[] |
no_license
|
cengizgoren/facebook_apk_crack
|
ee812a57c746df3c28fb1f9263ae77190f08d8d2
|
a112d30542b9f0bfcf17de0b3a09c6e6cfe1273b
|
refs/heads/master
| 2021-05-26T14:44:04.092474
| 2013-01-16T08:39:00
| 2013-01-16T08:39:00
| 8,321,708
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,494
|
java
|
package com.facebook.uberbar.api;
import com.facebook.ipc.data.uberbar.UberbarResult;
import com.facebook.ipc.data.uberbar.UberbarResult.Type;
import com.facebook.orca.debug.Tracer;
import com.facebook.orca.protocol.base.ApiMethod;
import com.facebook.orca.protocol.base.ApiRequest;
import com.facebook.orca.protocol.base.ApiResponse;
import com.facebook.orca.protocol.base.ApiResponseType;
import com.facebook.uberbar.UberbarResults;
import com.google.common.base.Joiner;
import com.google.common.collect.Lists;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.apache.http.message.BasicNameValuePair;
public class FetchUberbarResultMethod
implements ApiMethod<FetchUberbarResultParams, List<UberbarResult>>
{
public ApiRequest a(FetchUberbarResultParams paramFetchUberbarResultParams)
{
String str1 = paramFetchUberbarResultParams.a;
int i = paramFetchUberbarResultParams.b;
ArrayList localArrayList1 = Lists.a();
Iterator localIterator = paramFetchUberbarResultParams.c.iterator();
while (localIterator.hasNext())
{
UberbarResult.Type localType = (UberbarResult.Type)localIterator.next();
localArrayList1.add("'" + localType.name().toLowerCase() + "'");
}
String str2 = "[" + Joiner.on(", ").join(localArrayList1) + "]";
ArrayList localArrayList2 = Lists.a();
localArrayList2.add(new BasicNameValuePair("query", str1));
localArrayList2.add(new BasicNameValuePair("context", "mobile_search_android"));
localArrayList2.add(new BasicNameValuePair("photo_size", Integer.toString(i)));
localArrayList2.add(new BasicNameValuePair("filter", str2));
localArrayList2.add(new BasicNameValuePair("include_native_android_url", "true"));
localArrayList2.add(new BasicNameValuePair("format", "json"));
return new ApiRequest("fetch_uberbar_result", "GET", "method/ubersearch.get", localArrayList2, ApiResponseType.STRING);
}
public List<UberbarResult> a(FetchUberbarResultParams paramFetchUberbarResultParams, ApiResponse paramApiResponse)
{
Tracer localTracer = Tracer.a("FetchUberbarResultMethod.getResponse");
try
{
List localList = UberbarResults.a(paramApiResponse.b());
return localList;
}
finally
{
localTracer.a();
}
}
}
/* Location: /data1/software/apk2java/dex2jar-0.0.9.12/secondary-1.dex_dex2jar.jar
* Qualified Name: com.facebook.uberbar.api.FetchUberbarResultMethod
* JD-Core Version: 0.6.2
*/
|
[
"macluz@msn.com"
] |
macluz@msn.com
|
7c1ad7e8e278b60137887cd5c6b1631891bb19f5
|
09b9ef9f4d622d8c4aedb82be4d520f92a683d0f
|
/net.sf.anathema.basics.eclipse/test/net/sf/anathema/basics/eclipse/extension/ExtensionFacadeTest.java
|
7a00b7815612ffd7931de0fad69e80dfbce93029
|
[] |
no_license
|
anathema/anathema-rcp
|
a10491b7b3eae5d6cce2c7eb480110f741a86dd4
|
558a47659a96a7065ab703d43740a353b43e96de
|
refs/heads/master
| 2020-02-26T14:50:50.304707
| 2009-10-20T11:12:27
| 2009-10-20T11:12:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,106
|
java
|
package net.sf.anathema.basics.eclipse.extension;
import static org.junit.Assert.assertEquals;
import net.sf.anathema.basics.eclipse.extension.internal.ExtensionFacade;
import org.easymock.EasyMock;
import org.eclipse.core.runtime.IContributor;
import org.eclipse.core.runtime.IExtension;
import org.junit.Before;
import org.junit.Test;
public class ExtensionFacadeTest {
private ExtensionFacade extensionFacade;
private IExtension extension;
@Before
public void createFacade() throws Exception {
extension = EasyMock.createMock(IExtension.class);
extensionFacade = new ExtensionFacade(extension);
}
@Test
public void returnsExtensionNameAsContributorId() throws Exception {
IContributor contributor = EasyMock.createMock(IContributor.class);
String expectedId = "id"; //$NON-NLS-1$
EasyMock.expect(contributor.getName()).andReturn(expectedId);
EasyMock.expect(extension.getContributor()).andReturn(contributor);
EasyMock.replay(contributor, extension);
assertEquals(expectedId, extensionFacade.getContributorId());
}
}
|
[
"ursreupke@gmail.com"
] |
ursreupke@gmail.com
|
c52fd52785e1a5ef53c99f1eb755027220312724
|
f22016e5670e437bd7c1338f28aedfe7871580f9
|
/axl/src/main/java/ru/cg/cda/axl/generated/UpdateCCAProfilesReq.java
|
db414c72b261cb9e2fd82d152f6779cb8b5c95d8
|
[] |
no_license
|
ilgiz-badamshin/cda
|
4e3c75407a0b2edbb7321b83b66e4cf455157eae
|
0a16d90fc9be74932ef3df682013b444d425741e
|
refs/heads/master
| 2020-05-17T05:34:17.707445
| 2015-12-18T13:38:49
| 2015-12-18T13:38:49
| 39,076,024
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,645
|
java
|
package ru.cg.cda.axl.generated;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for UpdateCCAProfilesReq complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="UpdateCCAProfilesReq">
* <complexContent>
* <extension base="{http://www.cisco.com/AXL/API/10.0}APIRequest">
* <sequence>
* <choice>
* <element name="uuid" type="{http://www.cisco.com/AXL/API/10.0}XUUID"/>
* <element name="ccaId" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </choice>
* <element name="newCcaId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="primarySoftSwitchId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="secondarySoftSwitchId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="objectClass" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="subscriberType" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="sipAliasSuffix" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="sipUserNameSuffix" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "UpdateCCAProfilesReq", propOrder = {
"uuid",
"ccaId",
"newCcaId",
"primarySoftSwitchId",
"secondarySoftSwitchId",
"objectClass",
"subscriberType",
"sipAliasSuffix",
"sipUserNameSuffix"
})
public class UpdateCCAProfilesReq
extends APIRequest
{
protected String uuid;
protected String ccaId;
protected String newCcaId;
protected String primarySoftSwitchId;
@XmlElementRef(name = "secondarySoftSwitchId", type = JAXBElement.class)
protected JAXBElement<String> secondarySoftSwitchId;
protected String objectClass;
@XmlElementRef(name = "subscriberType", type = JAXBElement.class)
protected JAXBElement<String> subscriberType;
@XmlElementRef(name = "sipAliasSuffix", type = JAXBElement.class)
protected JAXBElement<String> sipAliasSuffix;
@XmlElementRef(name = "sipUserNameSuffix", type = JAXBElement.class)
protected JAXBElement<String> sipUserNameSuffix;
/**
* Gets the value of the uuid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUuid() {
return uuid;
}
/**
* Sets the value of the uuid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUuid(String value) {
this.uuid = value;
}
/**
* Gets the value of the ccaId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCcaId() {
return ccaId;
}
/**
* Sets the value of the ccaId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCcaId(String value) {
this.ccaId = value;
}
/**
* Gets the value of the newCcaId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNewCcaId() {
return newCcaId;
}
/**
* Sets the value of the newCcaId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNewCcaId(String value) {
this.newCcaId = value;
}
/**
* Gets the value of the primarySoftSwitchId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPrimarySoftSwitchId() {
return primarySoftSwitchId;
}
/**
* Sets the value of the primarySoftSwitchId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPrimarySoftSwitchId(String value) {
this.primarySoftSwitchId = value;
}
/**
* Gets the value of the secondarySoftSwitchId property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getSecondarySoftSwitchId() {
return secondarySoftSwitchId;
}
/**
* Sets the value of the secondarySoftSwitchId property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setSecondarySoftSwitchId(JAXBElement<String> value) {
this.secondarySoftSwitchId = ((JAXBElement<String> ) value);
}
/**
* Gets the value of the objectClass property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getObjectClass() {
return objectClass;
}
/**
* Sets the value of the objectClass property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setObjectClass(String value) {
this.objectClass = value;
}
/**
* Gets the value of the subscriberType property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getSubscriberType() {
return subscriberType;
}
/**
* Sets the value of the subscriberType property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setSubscriberType(JAXBElement<String> value) {
this.subscriberType = ((JAXBElement<String> ) value);
}
/**
* Gets the value of the sipAliasSuffix property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getSipAliasSuffix() {
return sipAliasSuffix;
}
/**
* Sets the value of the sipAliasSuffix property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setSipAliasSuffix(JAXBElement<String> value) {
this.sipAliasSuffix = ((JAXBElement<String> ) value);
}
/**
* Gets the value of the sipUserNameSuffix property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getSipUserNameSuffix() {
return sipUserNameSuffix;
}
/**
* Sets the value of the sipUserNameSuffix property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setSipUserNameSuffix(JAXBElement<String> value) {
this.sipUserNameSuffix = ((JAXBElement<String> ) value);
}
}
|
[
"badamshin.ilgiz@cg.ru"
] |
badamshin.ilgiz@cg.ru
|
41631e1b3c805e608172e3428dd258f15103b1e9
|
9f46aca3cd7b36debf0ccd09f90bb54c56095113
|
/src/main/java/com/qjd/rry/response/AllIncomeGetResponse.java
|
867454f9c3f16eb263ed86d14ea76104025a7f92
|
[] |
no_license
|
xiaoyu19950911/maoyao
|
ce2b2041791d1145b0e1a9a2187e23a5f5c1f716
|
bde11422f1747aacbd2694b2d2574894e4e1e5c5
|
refs/heads/master
| 2020-03-29T21:12:00.046221
| 2018-09-26T02:19:09
| 2018-09-26T02:19:09
| 150,355,037
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,380
|
java
|
package com.qjd.rry.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import java.math.BigDecimal;
/**
* @program: rry
* @description:
* @author: XiaoYu
* @create: 2018-05-22 11:22
**/
@Data
@Builder
@ApiModel
public class AllIncomeGetResponse {
@ApiModelProperty("订单子项id")
private Integer orderItemId;
@ApiModelProperty("时间")
private Long time;
@ApiModelProperty("买方姓名")
private String consumerName;
@ApiModelProperty("卖方姓名")
private String resourceOwnName;
@ApiModelProperty("资源名称")
private String resourceName;
@ApiModelProperty("资源类型(1、购买课程;2、购买专栏;3、购买课程推广;4、VIP)")
private Integer resourceType;
@ApiModelProperty("总价格")
private BigDecimal amount;
@ApiModelProperty("卖方收益")
private BigDecimal resourceOwnUserIncome;
@ApiModelProperty("分享者id")
private Integer shareUserId;
@ApiModelProperty("分享者昵称")
private String shareUserName;
@ApiModelProperty("分享者收入")
private BigDecimal shareUserIncome;
@ApiModelProperty("代理商收入")
private BigDecimal proUserIncome;
@ApiModelProperty("平台收益")
private BigDecimal platformIncome;
}
|
[
"1015407731@qq.com"
] |
1015407731@qq.com
|
76cf8c6285e0c5898aaa10919941326d47f00a25
|
2ee73c10aae5f38ada1b7164b60b228655ba879e
|
/src/main/java/com/tseong/learning/basic/thread/lock/AQS/readme.java
|
8c114990d21f40a54d7d0fd305c9d5c4c2cb47b7
|
[] |
no_license
|
shawn-zhong/JavaLearning
|
f5f43da9d0b83036f29a0d650726976a40d96f83
|
7e124d294c736c4f2010043211aee389c71ad96f
|
refs/heads/master
| 2021-04-27T06:29:45.940324
| 2020-10-30T07:55:25
| 2020-10-30T07:55:25
| 122,615,400
| 1
| 0
| null | 2021-03-12T21:56:32
| 2018-02-23T11:55:41
|
Java
|
UTF-8
|
Java
| false
| false
| 180
|
java
|
package com.tseong.learning.basic.thread.lock.AQS;
public class readme {
/**
* https://www.cnblogs.com/waterystone/p/4920797.html
* JAVA并发之AQS详解
*/
}
|
[
"tseong@foxmail.com"
] |
tseong@foxmail.com
|
30425d8edd6cffe4832b7c40ce0a8e702da21117
|
2edb73de13355415bab3985aca930659fb0dae67
|
/DataStructureAlgorithm/src/com/vm/progassign2/Deque.java
|
ef786adb8a08aa432a3aac3e64610f6ac0b32ea2
|
[] |
no_license
|
VenkateshManohar27/DataStructureAlgorithm
|
088bb3d25391070acbd70972b47d92aabf272e40
|
309ccc39f9789d824980dda71e7afc62d093f8c0
|
refs/heads/master
| 2020-12-24T05:45:47.511245
| 2020-11-15T12:56:32
| 2020-11-15T12:56:32
| 75,051,006
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,910
|
java
|
package com.vm.progassign2;
import java.util.Iterator;
import java.util.NoSuchElementException;
public class Deque<Item> implements Iterable<Item> {
private Node first = null;
private Node last = null;
private int size = 0;
private class Node {
Item item = null;
Node next = null;
Node prev = null;
}
public Deque() {
// construct an empty deque
}
public boolean isEmpty() {
return first == null;
}
public int size() {
return size;
}
public void addFirst(Item item) {
if (item == null) {
throw new NullPointerException("Item is empty");
}
Node newNode = new Node();
newNode.item = item;
if (isEmpty()) {
first = newNode;
last = first;
} else {
newNode.next = first;
first.prev = newNode;
first = newNode;
}
size++;
}
public void addLast(Item item) {
if (item == null) {
throw new NullPointerException("Item is empty");
}
Node newNode = new Node();
newNode.item = item;
if (isEmpty()) {
last = newNode;
first = last;
} else {
last.next = newNode;
newNode.prev = last;
last = newNode;
}
size++;
}
public Item removeFirst() {
// remove and return the item from the front
if (isEmpty()) {
throw new NoSuchElementException("queue is empty");
}
Item item = first.item;
first = first.next;
if (first == null) {
last = null;
} else {
first.prev = null;
}
size--;
return item;
}
public Item removeLast() {
if (isEmpty()) {
throw new NoSuchElementException("queue is empty");
}
Item item = last.item;
last = last.prev;
if (last == null) {
first = null;
} else {
last.next = null;
}
size--;
return item;
}
public Iterator<Item> iterator() {
return new QIterator();
}
private class QIterator implements Iterator<Item> {
private Node current = first;
@Override
public boolean hasNext() {
// TODO Auto-generated method stub
return current != null;
}
@Override
public Item next() {
if (current == null) {
throw new NoSuchElementException();
}
Item item = current.item;
current = current.next;
return item;
}
@Override
public void remove() {
throw new UnsupportedOperationException();
}
}
public static void main(String[] args) {
// unit testing
Deque<String> s = new Deque<String>();
s.addFirst("1");
s.addFirst("2");
s.addLast("3");
s.addLast("4");
for (String str : s) {
System.out.println(str);
}
System.out.println("SIZE: " + s.size);
s.removeFirst();
s.removeLast();
for (String str : s) {
System.out.println(str);
}
System.out.println("SIZE: " + s.size);
System.out.println("#############################################################");
s.removeFirst();
s.removeFirst();
}
}
|
[
"venkatesh.manohar@gmail.com"
] |
venkatesh.manohar@gmail.com
|
584cef3567e48290bd487f3e8fea702aadd8cf5b
|
3b33d6e3c2067446ecb2475f68de74328a6ea66a
|
/CrowdFundingWorkspace/crowd-funding-project-workspace/modules/crowd-funding-database/crowd-funding-database-service/src/main/java/com/crowd/funding/database/model/impl/UserFollowRegistrationImpl.java
|
b692017cecac1d1612d913cda45531f57fd6accf
|
[] |
no_license
|
Sumit9727/QuickDaan_LifeRay1
|
bbeced3e386f732be861073106848b4237e967ba
|
96320146033f182ab32f13a54bdc7a2306986b53
|
refs/heads/master
| 2020-09-18T11:21:16.519127
| 2019-11-26T09:04:17
| 2019-11-26T09:04:17
| 224,142,985
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,563
|
java
|
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.crowd.funding.database.model.impl;
import aQute.bnd.annotation.ProviderType;
/**
* The extended model implementation for the UserFollowRegistration service. Represents a row in the "cf_user_follow_details" database table, with each column mapped to a property of this class.
*
* <p>
* Helper methods and all application logic should be put in this class. Whenever methods are added, rerun ServiceBuilder to copy their definitions into the {@link com.crowd.funding.database.model.UserFollowRegistration} interface.
* </p>
*
* @author Brian Wing Shun Chan
*/
@ProviderType
public class UserFollowRegistrationImpl extends UserFollowRegistrationBaseImpl {
/*
* NOTE FOR DEVELOPERS:
*
* Never reference this class directly. All methods that expect a user follow registration model instance should use the {@link com.crowd.funding.database.model.UserFollowRegistration} interface instead.
*/
public UserFollowRegistrationImpl() {
}
}
|
[
"rohit@prakat.in"
] |
rohit@prakat.in
|
be8f2ed4f40d9288d700a3ef9e2e41c8fd0ca2ad
|
5351a18ec516e87711bc6d39936fa34a21f28407
|
/app/src/main/java/uk/co/caprica/vlcj/player/events/MediaPlayerForwardEvent.java
|
c0795ddae0c6096d00e322fda8ca94d4c483f716
|
[] |
no_license
|
cloverc1022/wanviewplusPc
|
1ef9a0e5b0b4d0c269699c9d0609195210bfc1d5
|
257a4b93dc0659f76d7f356e9f74026cbe215e94
|
refs/heads/master
| 2022-01-05T14:15:36.751469
| 2019-06-03T02:05:43
| 2019-06-03T02:05:43
| 166,205,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,271
|
java
|
/*
* This file is part of VLCJ.
*
* VLCJ 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.
*
* VLCJ 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 VLCJ. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright 2009-2019 Caprica Software Limited.
*/
package uk.co.caprica.vlcj.player.events;
import uk.co.caprica.vlcj.player.MediaPlayer;
import uk.co.caprica.vlcj.player.MediaPlayerEventListener;
/**
*
*/
class MediaPlayerForwardEvent extends AbstractMediaPlayerEvent {
/**
* Create a media player event.
*
* @param mediaPlayer media player the event relates to
*/
MediaPlayerForwardEvent(MediaPlayer mediaPlayer) {
super(mediaPlayer);
}
@Override
public void notify(MediaPlayerEventListener listener) {
listener.forward(mediaPlayer);
}
}
|
[
"mmc5634@outlook.com"
] |
mmc5634@outlook.com
|
2ac24cafb9ae8b622550308d05e37dafffea4bda
|
cdbdddac426bce27ad97401b779392327a6a77eb
|
/MAVEN/RestEasyDemo/src/main/java/com/java/rest/easy/Customers.java
|
ce451b7e5083968a5ff9da2cff94268d3e4e9277
|
[] |
no_license
|
dhirajn72/allmylocalstuff
|
87dc68dfe014f31f6c96e996d6b251ff4bda4de8
|
2f50ab2f3f6b37f71cd02cc253639c540006b933
|
refs/heads/master
| 2022-12-23T09:42:59.221342
| 2021-07-28T19:11:40
| 2021-07-28T19:11:40
| 97,965,789
| 1
| 1
| null | 2022-12-16T09:55:29
| 2017-07-21T16:08:29
|
Roff
|
UTF-8
|
Java
| false
| false
| 541
|
java
|
package com.java.rest.easy;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class Customers {
private List<Customer> customers = new ArrayList<Customer>();
public Customers() {
// TODO Auto-generated constructor stub
}
public List<Customer> getCustomers() {
return customers;
}
public void setCustomers(List<Customer> customers) {
this.customers = customers;
}
public void addCustomer(Customer customer) {
this.customers.add(customer);
}
}
|
[
"dhirajn72@gmail.com"
] |
dhirajn72@gmail.com
|
41f0fc330a0fda529b1d2561c6fc37fee3879f3f
|
aa3cde82a7b1cab0182c8ce5a5d09796d6772f1e
|
/AppsterAndroid/Appster/app/src/main/java/com/appster/features/maintenance/CheckMaintenanceJobCreator.java
|
a9556ca3a2cf9e3f73d7d1367cc6642207973850
|
[] |
no_license
|
zaizaixinhtrai/belive
|
fc474fc588bb3065f04e2e30239ca2790eb6c957
|
db38db29f040e40865d1f5bfa3e35e36fd797ccf
|
refs/heads/master
| 2020-09-10T00:39:40.313547
| 2019-11-14T03:54:06
| 2019-11-14T03:54:06
| 221,606,172
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 474
|
java
|
package com.appster.features.maintenance;
import com.evernote.android.job.Job;
import com.evernote.android.job.JobCreator;
/**
* Created by Ngoc on 5/23/2017.
*/
public class CheckMaintenanceJobCreator implements JobCreator {
@Override
public Job create(String tag) {
switch (tag) {
case CheckMaintenanceSyncJob.TAG:
return new CheckMaintenanceSyncJob();
default:
return null;
}
}
}
|
[
"doithengoc@appsters.net"
] |
doithengoc@appsters.net
|
34d424b72943c047e23ccc67f112b2f4a523f13b
|
0dfbe8f98be8f04e9aad102bef22479f37b6ebe7
|
/3.JavaMultithreading/src/com/javarush/task/task21/task2102/Solution.java
|
7f6a74d73350494bcb37517dd34b51b4011ec80f
|
[] |
no_license
|
evgeniykarpenko/MyJavaRushTasks
|
4a6134bad734bac5cadd7d7591b82a89ea9dc4db
|
07aeab9e89c89f0ddf38ea3c1b3ccb78a0d4f5ce
|
refs/heads/master
| 2020-04-18T04:17:58.702797
| 2019-02-20T19:56:12
| 2019-02-20T19:56:12
| 167,233,011
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,226
|
java
|
package com.javarush.task.task21.task2102;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
/*
Сравниваем модификаторы
*/
public class Solution {
public static void main(String[] args) {
int modifiersOfThisClass = Solution.class.getModifiers();
System.out.println(isAllModifiersContainSpecificModifier(modifiersOfThisClass, Modifier.PUBLIC)); //true
System.out.println(isAllModifiersContainSpecificModifier(modifiersOfThisClass, Modifier.STATIC)); //false
int modifiersOfMethod = getMainMethod().getModifiers();
System.out.println(isAllModifiersContainSpecificModifier(modifiersOfMethod, Modifier.STATIC)); //true
}
public static boolean isAllModifiersContainSpecificModifier(int allModifiers, int specificModifier) {
if ((allModifiers & specificModifier) == specificModifier ) {
return true;
}
return false;
}
private static Method getMainMethod() {
Method[] methods = Solution.class.getDeclaredMethods();
for (Method method : methods) {
if (method.getName().equalsIgnoreCase("main")) return method;
}
return null;
}
}
|
[
"izifrag@yandex.ru"
] |
izifrag@yandex.ru
|
708eed2a4fd4b695ca7fdef50df8f91de25fbdec
|
b111b77f2729c030ce78096ea2273691b9b63749
|
/db-example-large-multi-project/project91/src/test/java/org/gradle/test/performance/mediumjavamultiproject/project91/p457/Test9148.java
|
d853166bb926c1f8d989d7093d93c73b400b1965
|
[] |
no_license
|
WeilerWebServices/Gradle
|
a1a55bdb0dd39240787adf9241289e52f593ccc1
|
6ab6192439f891256a10d9b60f3073cab110b2be
|
refs/heads/master
| 2023-01-19T16:48:09.415529
| 2020-11-28T13:28:40
| 2020-11-28T13:28:40
| 256,249,773
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,556
|
java
|
package org.gradle.test.performance.mediumjavamultiproject.project91.p457;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test9148 {
Production9148 objectUnderTest = new Production9148();
@Test
public void testProperty0() throws Exception {
String value = "value";
objectUnderTest.setProperty0(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() throws Exception {
String value = "value";
objectUnderTest.setProperty1(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() throws Exception {
String value = "value";
objectUnderTest.setProperty2(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() throws Exception {
String value = "value";
objectUnderTest.setProperty3(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() throws Exception {
String value = "value";
objectUnderTest.setProperty4(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() throws Exception {
String value = "value";
objectUnderTest.setProperty5(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() throws Exception {
String value = "value";
objectUnderTest.setProperty6(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() throws Exception {
String value = "value";
objectUnderTest.setProperty7(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() throws Exception {
String value = "value";
objectUnderTest.setProperty8(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() throws Exception {
String value = "value";
objectUnderTest.setProperty9(value);
Thread.sleep(250);
assertEquals(value, objectUnderTest.getProperty9());
}
}
|
[
"nateweiler84@gmail.com"
] |
nateweiler84@gmail.com
|
0c427dfc052fb93ce777e415cc81530ab9537567
|
fb80fdc722d8ad415a66634f9060043c70191589
|
/src/main/java/hyperskill/collection/lists/ConcatPositiveNumbersProblem.java
|
6d777416edcfdcb45bcdd4eddc86da179826191d
|
[] |
no_license
|
arturdziocha/learn
|
ee795b09fd8d0ae0022762400b53edb65c6643c3
|
f4396844a733de2c959c64b9251bc766f211b32a
|
refs/heads/master
| 2020-12-22T06:14:55.818022
| 2020-07-31T14:40:11
| 2020-07-31T14:40:11
| 236,692,415
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,852
|
java
|
package hyperskill.collection.lists;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
import java.util.stream.Collectors;
/*
* Implement a method to concatenate all positive numbers of two input ArrayLists to a single resulting list.
At first, elements from the first ArrayList shoud go, and then the elements from the second ArrayList.
Sample Input 1:
8 11 -2 -3 14 15
-1 33 12 -3 -5
Sample Output 1:
8 11 14 15 33 12
*/
public class ConcatPositiveNumbersProblem {
public static ArrayList<Integer> concatPositiveNumbers(ArrayList<Integer> firstList,
ArrayList<Integer> secondList) {
ArrayList<Integer> toReturn = firstList
.stream()
.filter(i -> i.intValue() > 0)
.collect(Collectors.toCollection(ArrayList::new));
toReturn
.addAll(
secondList.stream().filter(l -> l.intValue() > 0).collect(Collectors.toCollection(ArrayList::new)));
return toReturn;
}
/* Do not modify this method */
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("add");
ArrayList<Integer> list1 = readArrayList(scanner);
ArrayList<Integer> list2 = readArrayList(scanner);
ArrayList<Integer> result = concatPositiveNumbers(list1, list2);
result.forEach((n) -> System.out.print(n + " "));
}
/* Do not modify this method */
private static ArrayList<Integer> readArrayList(Scanner scanner) {
return Arrays
.stream(scanner.nextLine().split("\\s+"))
.map(Integer::parseInt)
.collect(Collectors.toCollection(ArrayList::new));
}
}
|
[
"artur.dziocha@gmail.com"
] |
artur.dziocha@gmail.com
|
6efbeeeab28fb84ceaea32904e859ce0c43f959d
|
f617d7ed61f4d0632827ea792fdf773e9e87d6d9
|
/ch11/ex11-32.ItemService.java
|
14417fa66d92b3ef84d92759f39264593672fe63
|
[] |
no_license
|
freebz/JPA-Programming
|
e796f3d3868913775068f31d86020ded8ddd737e
|
a52637cba47fa46dfdab9330361d1f8f4bfe5866
|
refs/heads/master
| 2020-09-15T09:24:35.035143
| 2019-11-22T12:09:56
| 2019-11-22T12:09:56
| 223,409,858
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 705
|
java
|
// 예제 11.32 상품 서비스 코드
package jpabook.jpashop.service;
import jpabook.jpashop.domain.item.Item;
import japbook.jpashop.repository.ItemRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
@Transactional
public class ItemService {
@Autowired
ItemRepository itemRepository;
public void saveItem(Item item) {
itemRepository.save(item);
}
public List<Item> findItems() {
return itemRepository.findAll();
}
public Item fineOne(Long itemId) {
return itemRepository.findOne(itemId);
}
}
|
[
"freebz@hananet.net"
] |
freebz@hananet.net
|
e3eda7c624384cbc4fc2b97c295df14d1c935ca0
|
8ce96d3f4a29e7af5fae1e50fb65ab6bdb1779ec
|
/src/main/java/com/yeqifu/sys/mapper/RoleMapper.java
|
79df333a7dd21c358030b895991b4a3979485f7d
|
[] |
no_license
|
yeqifu/carRental
|
1ccabdf54821241278341343cbaf2c4670d7eccb
|
3fabb7eae93d209426638863980301d6f99866b3
|
refs/heads/master
| 2023-04-27T20:04:12.334684
| 2023-04-15T05:03:57
| 2023-04-15T05:03:57
| 211,744,835
| 255
| 103
| null | 2023-02-22T07:34:10
| 2019-09-30T00:30:10
|
Java
|
UTF-8
|
Java
| false
| false
| 1,342
|
java
|
package com.yeqifu.sys.mapper;
import com.yeqifu.sys.domain.Role;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface RoleMapper {
int deleteByPrimaryKey(Integer roleid);
int insert(Role record);
int insertSelective(Role record);
Role selectByPrimaryKey(Integer roleid);
int updateByPrimaryKeySelective(Role record);
int updateByPrimaryKey(Role record);
/**
* 查询角色
* @param role
* @return
*/
List<Role> queryAllRole(Role role);
/**
* 根据角色id删除sys_role_menu里面的数据
* @param roleid
*/
void deleteRoleMenuByRid(Integer roleid);
/**
* 根据角色id删除sys_role_user里面的数据
* @param roleid
*/
void deleteRoleUserByRid(Integer roleid);
/**
* 保存角色和菜单的关系sys_role_menu
* @param rid
* @param mid
*/
void insertRoleMenu(@Param("rid") Integer rid,@Param("mid") Integer mid);
/**
* 根据用户id删除sys_role_user里面的数据
* @param userid
*/
void deleteRoleUserByUid(Integer userid);
/**
* 根据用户id查询角色
* @param available
* @param userid
* @return
*/
List<Role> queryRoleByUid(@Param("available") Integer available,@Param("uid") Integer userid);
}
|
[
"1784525940@qq.com"
] |
1784525940@qq.com
|
565de97c163c6a9b44861f5603e6706f51df5a9a
|
8506e04cb400640d03fa2d10aac86b5b65c53fbb
|
/app/src/main/java/com/example/yuanping/weconnected/login/com/sina/weibo/sdk/openapi/legacy/ShortUrlAPI.java
|
4b6a7c033fec0d09bbb47fe07e3f8d04caee9722
|
[] |
no_license
|
HusterYP/VCon
|
2f97db6674c2d882d01a9baac3bc68de6de55eaa
|
6179c07108d09d9c3928b97b635c67b892339f8d
|
refs/heads/master
| 2021-05-07T04:05:50.430254
| 2017-11-17T11:14:44
| 2017-11-17T11:14:44
| 111,094,732
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,480
|
java
|
/*
* Copyright (C) 2010-2013 The SINA WEIBO Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.example.yuanping.weconnected.login.com.sina.weibo.sdk.openapi.legacy;
import android.content.Context;
import com.example.yuanping.weconnected.login.com.sina.weibo.sdk.openapi.AbsOpenAPI;
import com.sina.weibo.sdk.auth.Oauth2AccessToken;
import com.sina.weibo.sdk.net.RequestListener;
import com.sina.weibo.sdk.net.WeiboParameters;
/**
* 该类封装了微博的短链接接口。
* 详情请参考<a href="http://t.cn/8F3g1mY">短链接接口</a>
*
* @author SINA
* @date 2014-03-03
*/
public class ShortUrlAPI extends AbsOpenAPI {
public ShortUrlAPI(Context context, String appKey, Oauth2AccessToken accessToken) {
super(context, appKey, accessToken);
}
private static final String SERVER_URL_PRIX = API_SERVER + "/short_url";
/**
* 将一个或多个长链接转换成短链接
*
* @param url_long 需要转换的长链接,最多不超过20个
* @param listener 异步请求回调接口
*/
public void shorten(String[] url_long, RequestListener listener) {
WeiboParameters params = buildURLRequest(url_long, "url_long");
requestAsync(SERVER_URL_PRIX + "/shorten.json", params, HTTPMETHOD_GET, listener);
}
/**
* 将一个或多个短链接还原成原始的长链接。
*
* @param url_short 需要还原的短链接,最多不超过20个
* @param listener 异步请求回调接口
*/
public void expand(String[] url_short, RequestListener listener) {
WeiboParameters params = buildURLRequest(url_short, "url_short");
requestAsync(SERVER_URL_PRIX + "/expand.json", params, HTTPMETHOD_GET, listener);
}
public String expandSync(String[] url_short) {
WeiboParameters params = buildURLRequest(url_short, "url_short");
return requestSync(SERVER_URL_PRIX + "/expand.json", params, HTTPMETHOD_GET);
}
/**
* 获取短链接的总点击数。
*
* @param url_short 需要取得点击数的短链接,最多不超过20个
* @param listener 异步请求回调接口
*/
public void clicks(String[] url_short, RequestListener listener) {
WeiboParameters params = buildURLRequest(url_short, "url_short");
requestAsync(SERVER_URL_PRIX + "/clicks.json", params, HTTPMETHOD_GET, listener);
}
/**
* 获取一个短链接点击的referer来源和数量。
*
* @param url_short 需要取得点击来源的短链接
* @param listener 异步请求回调接口
*/
public void referers(String url_short, RequestListener listener) {
WeiboParameters params = new WeiboParameters(mAppKey);
params.put("url_short", url_short);
requestAsync(SERVER_URL_PRIX + "/referers.json", params, HTTPMETHOD_GET, listener);
}
/**
* 获取一个短链接点击的地区来源和数量。
*
* @param url_short 需要取得点击来源的短链接
* @param listener 异步请求回调接口
*/
public void locations(String url_short, RequestListener listener) {
WeiboParameters params = new WeiboParameters(mAppKey);
params.put("url_short", url_short);
requestAsync(SERVER_URL_PRIX + "/locations.json", params, HTTPMETHOD_GET, listener);
}
/**
* 获取短链接在微博上的微博分享数。
*
* @param url_short 需要取得分享数的短链接,最多不超过20个
* @param listener 异步请求回调接口
*/
public void shareCounts(String[] url_short, RequestListener listener) {
WeiboParameters params = buildURLRequest(url_short, "url_short");
requestAsync(SERVER_URL_PRIX + "/share/counts.json", params, HTTPMETHOD_GET, listener);
}
/**
* 获取包含指定单个短链接的最新微博内容。
*
* @param url_short 需要取得关联微博内容的短链接
* @param since_id 若指定此参数,则返回ID比since_id大的微博(即比since_id时间晚的微博),默认为0
* @param max_id 若指定此参数,则返回ID小于或等于max_id的微博,默认为0
* @param count 单页返回的记录条数,默认为50,最多不超过200
* @param page 返回结果的页码,默认为1
* @param listener 异步请求回调接口
*/
public void shareStatuses(String url_short, long since_id, long max_id, int count, int page,
RequestListener listener) {
WeiboParameters params = buildRequestParams(url_short, since_id, max_id, count, page);
requestAsync(SERVER_URL_PRIX + "/share/statuses.json", params, HTTPMETHOD_GET, listener);
}
/**
* 获取短链接在微博上的微博评论数
*
* @param url_short 需要取得分享数的短链接,最多不超过20个
* @param listener 异步请求回调接口
*/
public void commentCounts(String[] url_short, RequestListener listener) {
WeiboParameters params = buildURLRequest(url_short, "url_short");
requestAsync(SERVER_URL_PRIX + "/comment/counts.json", params, HTTPMETHOD_GET, listener);
}
/**
* 获取包含指定单个短链接的最新微博评论。
*
* @param url_short 需要取得关联微博评论内容的短链接
* @param since_id 若指定此参数,则返回ID比since_id大的评论(即比since_id时间晚的评论),默认为0
* @param max_id 若指定此参数,则返回ID小于或等于max_id的评论,默认为0
* @param count 单页返回的记录条数,默认为50,最多不超过200
* @param page 返回结果的页码,默认为1
* @param listener 异步请求回调接口
*/
public void comments(String url_short, long since_id, long max_id, int count, int page, RequestListener listener) {
WeiboParameters params = buildRequestParams(url_short, since_id, max_id, count, page);
requestAsync(SERVER_URL_PRIX + "/comment/comments.json", params, HTTPMETHOD_GET, listener);
}
// 组装URL参数
private WeiboParameters buildRequestParams(String url_short, long since_id, long max_id, int count, int page) {
WeiboParameters params = new WeiboParameters(mAppKey);
params.put("url_short", url_short);
params.put("since_id", since_id);
params.put("max_id", max_id);
params.put("count", count);
params.put("page", page);
return params;
}
// 组装URL参数
private WeiboParameters buildURLRequest(String[] url, String type) {
WeiboParameters params = new WeiboParameters(mAppKey);
if (url != null) {
int length = url.length;
for (int i = 0; i < length; i++) {
params.put(type, url[i]);
}
}
return params;
}
}
|
[
"3209605462@qq.com"
] |
3209605462@qq.com
|
97bc05f779686d45df7299fba91703a5fc680f09
|
f4b7924a03289706c769aff23abf4cce028de6bc
|
/smart_logic/src/main/java/plan_pro/modell/basistypen/_1_9_0/TCBezeichnungLageplanLang.java
|
3849a766d567ed6913855de3c141019eb806178a
|
[] |
no_license
|
jimbok8/ebd
|
aa18a2066b4a873bad1551e1578a7a1215de9b8b
|
9b0d5197bede5def2972cc44e63ac3711010eed4
|
refs/heads/main
| 2023-06-17T21:16:08.003689
| 2021-07-05T14:53:38
| 2021-07-05T14:53:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,934
|
java
|
//
// Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 generiert
// Siehe <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// �nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren.
// Generiert: 2020.01.16 um 04:27:51 PM CET
//
package plan_pro.modell.basistypen._1_9_0;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java-Klasse f�r TCBezeichnung_Lageplan_Lang complex type.
*
* <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist.
*
* <pre>
* <complexType name="TCBezeichnung_Lageplan_Lang">
* <complexContent>
* <extension base="{http://www.plan-pro.org/modell/BasisTypen/1.9.0.2}CBasisAttribut">
* <sequence>
* <element name="Wert" type="{http://www.plan-pro.org/modell/BasisTypen/1.9.0.2}TBezeichnung_Lageplan_Lang"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TCBezeichnung_Lageplan_Lang", propOrder = {
"wert"
})
public class TCBezeichnungLageplanLang
extends CBasisAttribut
{
@XmlElement(name = "Wert", required = true, nillable = true)
protected String wert;
/**
* Ruft den Wert der wert-Eigenschaft ab.
*
* @return
* possible object is
* {@link String }
*
*/
public String getWert() {
return wert;
}
/**
* Legt den Wert der wert-Eigenschaft fest.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setWert(String value) {
this.wert = value;
}
}
|
[
"iberl@verkehr.tu-darmstadt.de"
] |
iberl@verkehr.tu-darmstadt.de
|
48384fc3d44a65722c73a2b6e8002c05859f4a58
|
2f7b585bc87c88e46747c969f49b86706e05cfa6
|
/iefas-domain/iefas-dto/src/main/java/hk/oro/iefas/domain/system/dto/ErrorMessageParamDTO.java
|
870d3833f47fb773a59f6fef15863db6bd86f814
|
[] |
no_license
|
peterso05168/oro
|
3fd5ee3e86838215b02b73e8c5a536ba2bb7c525
|
6ca20e6dc77d4716df29873c110eb68abbacbdbd
|
refs/heads/master
| 2020-03-21T17:10:58.381531
| 2018-06-27T02:19:08
| 2018-06-27T02:19:08
| 138,818,244
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 459
|
java
|
/**
*
*/
package hk.oro.iefas.domain.system.dto;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @version $Revision: 1974 $ $Date: 2018-04-09 18:41:28 +0800 (週一, 09 四月 2018) $
* @author $Author: marvel.ma $
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ErrorMessageParamDTO {
private Integer errorMessageParamId;
private String paramCode;
private String paramContent;
}
|
[
"peterso05168@gmail.com"
] |
peterso05168@gmail.com
|
10520091906fb8cb15edac454c66deb288db79f8
|
14076d999bb51bafb73222c22b190d2edb1b1f86
|
/merchant-credit/mc-common/src/main/java/com/sdp/mc/common/enums/withdraw/PosMerchantStatusEnums.java
|
d788e1266aa65412556e6a6d77753dad3a714904
|
[] |
no_license
|
kevinkerry/merchant-credit
|
d3a9b397ddcd79d28925fa42121264da46eb91d4
|
14d3ad60795dcf251bd3066de14f0a731f89b73f
|
refs/heads/master
| 2021-04-03T09:09:43.601015
| 2017-07-28T06:07:14
| 2017-07-28T06:07:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,104
|
java
|
package com.sdp.mc.common.enums.withdraw;
import java.util.ArrayList;
import java.util.List;
public enum PosMerchantStatusEnums {
MC_STATUS_UNACTIVE("0", "待审核"),
MC_STATUS_CONFIRM("1", "已审核"),
MC_STATUS_SIGNOFF("2", "预约终止"),
MC_STATUS_ACTIVE("3", "已激活"),
MC_STATUS_DELETE("4", "已删除"), ;
public final String code;
public final String desc;
PosMerchantStatusEnums(String code, String desc) {
this.code = code;
this.desc = desc;
}
public static PosMerchantStatusEnums getMerchantTypeByCode(String code) {
PosMerchantStatusEnums merchantTypeEnums[] = PosMerchantStatusEnums.values();
for (PosMerchantStatusEnums enums : merchantTypeEnums) {
if (enums.code.equalsIgnoreCase(code)) return enums;
}
return null;
}
public static List<String> getUnusableStatus() {
PosMerchantStatusEnums enums[] = PosMerchantStatusEnums.values();
List<String> list=new ArrayList<String>();
for (PosMerchantStatusEnums en : enums) {
if (!en.code.equals(PosMerchantStatusEnums.MC_STATUS_ACTIVE.code)){
list.add(en.code);
}
}
return list;
}
}
|
[
"bishuai@shengpay.com"
] |
bishuai@shengpay.com
|
3a2f1a347c7c3917911471058afd36f2159da3a8
|
d8772960b3b2b07dddc8a77595397cb2618ec7b0
|
/rhServer/src/main/java/com/rhlinkcon/payload/requisicaoPessoalFuncao/RequisicaoPessoalFuncaoReponse.java
|
6db77bbc29599a23855fe39b8f3a76c4d5621d60
|
[] |
no_license
|
vctrmarques/interno-rh-sistema
|
c0f49a17923b5cdfaeb148c6f6da48236055cf29
|
7a7a5d9c36c50ec967cb40a347ec0ad3744d896e
|
refs/heads/main
| 2023-03-17T02:07:10.089496
| 2021-03-12T19:06:05
| 2021-03-12T19:06:05
| 347,168,924
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,625
|
java
|
package com.rhlinkcon.payload.requisicaoPessoalFuncao;
import com.rhlinkcon.model.RequisicaoPessoalFuncao;
import com.rhlinkcon.payload.funcao.FuncaoResponse;
import com.rhlinkcon.payload.turno.TurnoResponse;
public class RequisicaoPessoalFuncaoReponse {
private Long id;
private FuncaoResponse funcao;
private String tipoContratacao;
private Integer qtdVagas;
private Double custoPorVaga;
private TurnoResponse turno;
public RequisicaoPessoalFuncaoReponse(RequisicaoPessoalFuncao response) {
this.id = response.getId();
this.funcao = new FuncaoResponse(response.getFuncao());
this.tipoContratacao = response.getTipoContratacao().getLabel();
this.qtdVagas = response.getQtdVagas();
this.custoPorVaga = response.getCustoPorVaga();
this.turno = new TurnoResponse(response.getTurno());
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public FuncaoResponse getFuncao() {
return funcao;
}
public void setFuncao(FuncaoResponse funcao) {
this.funcao = funcao;
}
public String getTipoContratacao() {
return tipoContratacao;
}
public void setTipoContratacao(String tipoContratacao) {
this.tipoContratacao = tipoContratacao;
}
public Integer getQtdVagas() {
return qtdVagas;
}
public void setQtdVagas(Integer qtdVagas) {
this.qtdVagas = qtdVagas;
}
public Double getCustoPorVaga() {
return custoPorVaga;
}
public void setCustoPorVaga(Double custoPorVaga) {
this.custoPorVaga = custoPorVaga;
}
public TurnoResponse getTurno() {
return turno;
}
public void setTurno(TurnoResponse turno) {
this.turno = turno;
}
}
|
[
"vctmarques@gmail.com"
] |
vctmarques@gmail.com
|
5fb1235ea02a0d56875b23efadbd8a84724736ba
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/results/Cli-32/org.apache.commons.cli.HelpFormatter/BBC-F0-opt-20/tests/13/org/apache/commons/cli/HelpFormatter_ESTest_scaffolding.java
|
ee3974580efdf305598756e9ab36a2f8f5b614ad
|
[
"CC-BY-4.0",
"MIT"
] |
permissive
|
pderakhshanfar/EMSE-BBC-experiment
|
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
|
fea1a92c2e7ba7080b8529e2052259c9b697bbda
|
refs/heads/main
| 2022-11-25T00:39:58.983828
| 2022-04-12T16:04:26
| 2022-04-12T16:04:26
| 309,335,889
| 0
| 1
| null | 2021-11-05T11:18:43
| 2020-11-02T10:30:38
| null |
UTF-8
|
Java
| false
| false
| 4,751
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Thu Oct 21 04:46:37 GMT 2021
*/
package org.apache.commons.cli;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
import static org.evosuite.shaded.org.mockito.Mockito.*;
@EvoSuiteClassExclude
public class HelpFormatter_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.cli.HelpFormatter";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {}
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("user.dir", "/experiment");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(HelpFormatter_ESTest_scaffolding.class.getClassLoader() ,
"org.apache.commons.cli.HelpFormatter$OptionComparator",
"org.apache.commons.cli.AlreadySelectedException",
"org.apache.commons.cli.ParseException",
"org.apache.commons.cli.OptionValidator",
"org.apache.commons.cli.Options",
"org.apache.commons.cli.OptionGroup",
"org.apache.commons.cli.HelpFormatter",
"org.apache.commons.cli.Option",
"org.apache.commons.cli.Util"
);
}
private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException {
mock(Class.forName("java.util.Comparator", false, HelpFormatter_ESTest_scaffolding.class.getClassLoader()));
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(HelpFormatter_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.apache.commons.cli.HelpFormatter",
"org.apache.commons.cli.HelpFormatter$OptionComparator",
"org.apache.commons.cli.Options",
"org.apache.commons.cli.Option",
"org.apache.commons.cli.OptionValidator",
"org.apache.commons.cli.Util",
"org.apache.commons.cli.OptionGroup"
);
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
02362010b41496fd950079d710e294d667ce4b47
|
41ae950b46036a9ebe6a221fcc0a23601bfbf190
|
/LeetCode/src/problem901_1000/Problem921_1.java
|
4e22a4e5aefa8d841698cda680331f9504ea2cfd
|
[] |
no_license
|
yuruiyin/AlgorithmLearn
|
f7a88a499d050fa9c5d666514a74de0f0a56d001
|
4224b664e6d05f233512f77088f6d1437a87cd97
|
refs/heads/master
| 2023-07-08T09:19:41.101604
| 2023-07-03T01:48:08
| 2023-07-03T01:48:08
| 143,147,502
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 478
|
java
|
package problem901_1000;
public class Problem921_1 {
public int minAddToMakeValid(String str) {
int ans = 0;
int stackSize = 0;
for (char c: str.toCharArray()) {
if (c == '(') {
stackSize++;
} else {
if (stackSize == 0) {
ans++;
} else {
stackSize--;
}
}
}
return ans + stackSize;
}
}
|
[
"yuruiyin@cyou-inc.com"
] |
yuruiyin@cyou-inc.com
|
85646c8edb81e9caee5529864eda347f27607775
|
91945432326100e7b6f069f7a234e21c8d6b18f6
|
/engsoft1globalcode/excecao/src/excecao/Manifestacao.java
|
e8b8c637760c3217159793de2c293d06b386a2ce
|
[
"MIT"
] |
permissive
|
andersonsilvade/workspacejava
|
15bd27392f68649fe92df31483f09c441d457e0e
|
dd85abad734b7d484175c2580fbaad3110653ef4
|
refs/heads/master
| 2016-09-05T13:03:02.963321
| 2014-09-16T12:49:41
| 2014-09-16T12:49:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 625
|
java
|
package excecao;
public class Manifestacao extends Exception{
public Manifestacao() {
super();
// TODO Auto-generated constructor stub
}
public Manifestacao(String arg0, Throwable arg1, boolean arg2, boolean arg3) {
super(arg0, arg1, arg2, arg3);
// TODO Auto-generated constructor stub
}
public Manifestacao(String arg0, Throwable arg1) {
super(arg0, arg1);
// TODO Auto-generated constructor stub
}
public Manifestacao(String arg0) {
super(arg0);
// TODO Auto-generated constructor stub
}
public Manifestacao(Throwable arg0) {
super(arg0);
// TODO Auto-generated constructor stub
}
}
|
[
"andersonsilvade@gmail.com"
] |
andersonsilvade@gmail.com
|
b587dc5efb65ca5889defed61ec2e31f9b1ca945
|
b5a4790330d45512e481060d0e930223defbbb35
|
/src/main/java/com/igomall/exception/IncorrectLicenseException.java
|
07af106f48f3d7f52ee58cb0e73d12900b30ee5a
|
[] |
no_license
|
heyewei/cms_shop
|
451081a46b03e85938d8dd256a9b97662241ac63
|
29047908c40202ddaa3487369a4429ab15634b9d
|
refs/heads/master
| 2023-02-13T15:43:17.118001
| 2020-12-29T09:58:52
| 2020-12-29T09:58:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 476
|
java
|
/*
* Copyright 2008-2018 shopxx.net. All rights reserved.
* Support: localhost
* License: localhost/license
* FileId: gozuKbjLS1WZb7KyEA50vhHdsurB4NgJ
*/
package com.igomall.exception;
import org.apache.shiro.authc.AuthenticationException;
/**
* Exception - 错误商业许可
*
* @author 爱购 Team
* @version 6.1
*/
public class IncorrectLicenseException extends AuthenticationException {
private static final long serialVersionUID = 7892631925373485139L;
}
|
[
"1169794338@qq.com"
] |
1169794338@qq.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.