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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5c2724f201ebbbb184dc6eb864688ab1cd685bc1
|
84e156edb40800866b625d3541119e970acad1e1
|
/bitcamp-java-basic/src/main/java/ch19/c/Test01.java
|
945d7f679a02fc6941f0cdb7c52da35be7eedece
|
[] |
no_license
|
Hecklebot/bitcamp-java-20190527
|
c063803b02015ca0a45ef590b3d5ca1c25201285
|
c22f695c788ab8da21f7148aa09ec477c57b2a50
|
refs/heads/master
| 2020-06-13T20:15:46.420583
| 2019-10-21T08:12:55
| 2019-10-21T08:12:55
| 194,775,337
| 2
| 0
| null | 2020-04-30T11:58:11
| 2019-07-02T02:41:01
|
Java
|
UTF-8
|
Java
| false
| false
| 808
|
java
|
// static nested class 사용 전 : 상수를 다른 클래스로 분류하기
package ch19.c;
public class Test01 {
public static void main(String[] args) {
Product p = new Product();
p.maker = "비트컴퓨터";
p.title = "비트마우스";
p.price = 98000;
// 상수를 Category 클래스로 옮긴 후에 사용하기
p.category = Category.COMPUTER_MOUSE_BLUETOOTH;
// 개선점:
// => 카테고리의 이름이 긴 이름으로 되어 있다.
// => 만약 한 계층에 하위 분류를 추가한다면 underscore(_)를 사용하여 분류명을 길게 써야 한다.
// => 분류명 관리가 불편하다.
//
// 해결책:
// => static nested 클래스를 사용하여 각 계층별로 분류를 관리하게 한다.
}
}
|
[
"iuehakdrk@gmail.com"
] |
iuehakdrk@gmail.com
|
638c9df60c2d16bbe1a4e33524d7354163346d21
|
c303e2c0435ca2cd942871f1567aff367d5a78fe
|
/LikeUtils/src/com/like/likeutils/util/DeviceUtil.java
|
b602143129579fb23d578a66840dc1c865be3c9e
|
[] |
no_license
|
lk5103613/LikeUtils
|
4544bcda44d101845939d50df3581edb553e05c7
|
b3e810d0f9a36bf5fcfbe3b1ee93fbd71901646d
|
refs/heads/master
| 2016-09-06T09:46:41.315352
| 2015-10-07T15:49:13
| 2015-10-07T15:49:13
| 42,913,298
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,108
|
java
|
package com.like.likeutils.util;
import android.content.Context;
import android.util.DisplayMetrics;
import android.view.WindowManager;
public class DeviceUtil {
public static int getScreenWidht(Context context) {
WindowManager wmManager = (WindowManager) context
.getSystemService(Context.WINDOW_SERVICE);
DisplayMetrics dm = new DisplayMetrics();
wmManager.getDefaultDisplay().getMetrics(dm);
return dm.widthPixels;
}
public static int getScreenHeight(Context context) {
WindowManager wmManager = (WindowManager) context
.getSystemService(Context.WINDOW_SERVICE);
DisplayMetrics dm = new DisplayMetrics();
wmManager.getDefaultDisplay().getMetrics(dm);
return dm.heightPixels;
}
public static int dip2px(Context context, float dpValue) {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (dpValue * scale + 0.5f);
}
public static int px2dip(Context context, float pxValue) {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (pxValue / scale + 0.5f);
}
}
|
[
"524148211@qq.com"
] |
524148211@qq.com
|
eb945c866a3e9d582a337fcfa80cbb02976a744d
|
f22016e5670e437bd7c1338f28aedfe7871580f9
|
/security/src/main/java/ru/cg/cda/security/domain/Session.java
|
6af16605149ac11da6d3e89f0a122bc032807e55
|
[] |
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
| 867
|
java
|
package ru.cg.cda.security.domain;
import java.util.List;
/**
* @author Ildar
*/
public class Session {
private String token;
private List<String> roles;
private String fullName;
public Session() {
}
public Session(String token, List<String> roles) {
this.token = token;
this.roles = roles;
}
public Session(String token, List<String> roles, String fullName) {
this.token = token;
this.roles = roles;
this.fullName = fullName;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public List<String> getRoles() {
return roles;
}
public void setRoles(List<String> roles) {
this.roles = roles;
}
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName;
}
}
|
[
"badamshin.ilgiz@cg.ru"
] |
badamshin.ilgiz@cg.ru
|
d2a6c22ac32f3e25a256135fe1f7ad375d4b9c2c
|
a915d83d3088d355d90ba03e5b4df4987bf20a2a
|
/src/Applications/jetty/util/thread/TimerScheduler.java
|
af3294c5b8b129543e92803b77f9bf48caaaad83
|
[] |
no_license
|
worldeditor/Aegean
|
164c74d961185231d8b40dbbb6f8b88dcd978d79
|
33a2c651e826561e685fb84c1e3848c44d2ac79f
|
refs/heads/master
| 2022-02-15T15:34:02.074428
| 2019-08-21T03:52:48
| 2019-08-21T15:37:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,563
|
java
|
//
// ========================================================================
// Copyright (c) 1995-2013 Mort Bay Consulting Pty. Ltd.
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
//
package Applications.jetty.util.thread;
import Applications.jetty.util.component.AbstractLifeCycle;
import Applications.jetty.util.log.Log;
import Applications.jetty.util.log.Logger;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.TimeUnit;
/* ------------------------------------------------------------ */
/**
* A scheduler based on the the JVM Timer class
*/
public class TimerScheduler extends AbstractLifeCycle implements Scheduler, Runnable {
private static final Logger LOG = Log.getLogger(TimerScheduler.class);
/*
* This class uses the Timer class rather than an ScheduledExecutionService because
* it uses the same algorithm internally and the signature is cheaper to use as there are no
* Futures involved (which we do not need).
* However, Timer is still locking and a concurrent queue would be better.
*/
private final String _name;
private final boolean _daemon;
private Timer _timer;
public TimerScheduler() {
this(null, false);
}
public TimerScheduler(String name, boolean daemon) {
_name = name;
_daemon = daemon;
}
@Override
protected void doStart() throws Exception {
_timer = _name == null ? new Timer() : new Timer(_name, _daemon);
run();
super.doStart();
}
@Override
protected void doStop() throws Exception {
_timer.cancel();
super.doStop();
_timer = null;
}
@Override
public Task schedule(final Runnable task, final long delay, final TimeUnit units) {
Timer timer = _timer;
if (timer == null)
throw new RejectedExecutionException("STOPPED: " + this);
SimpleTask t = new SimpleTask(task);
timer.schedule(t, units.toMillis(delay));
return t;
}
@Override
public void run() {
Timer timer = _timer;
if (timer != null) {
timer.purge();
schedule(this, 1, TimeUnit.SECONDS);
}
}
private static class SimpleTask extends TimerTask implements Task {
private final Runnable _task;
private SimpleTask(Runnable runnable) {
_task = runnable;
}
@Override
public void run() {
try {
_task.run();
} catch (Throwable x) {
LOG.debug("Exception while executing task " + _task, x);
}
}
@Override
public String toString() {
return String.format("%s.%s@%x",
TimerScheduler.class.getSimpleName(),
SimpleTask.class.getSimpleName(),
hashCode());
}
}
}
|
[
"remzican_aksoy@apple.com"
] |
remzican_aksoy@apple.com
|
595cd85543236694845d5dd1c0f56a553354f5ec
|
407798dfe1e66ab7b2e6318692ea4dad909b8c5f
|
/JavaEurope3/java-europe3-may/src/day36_StaticClassMember/CountableTest.java
|
38cd2ae3e06803f36c6b051939ea35fccfc389ca
|
[] |
no_license
|
Doolatkan/Java_Codes_Doolatkan
|
361c7d9710a9889239e04a74e0777d583850e826
|
c11f69839da92629ec964a9b385298bc1cca4323
|
refs/heads/main
| 2023-03-16T23:25:27.334408
| 2021-03-09T22:52:35
| 2021-03-09T22:52:35
| 346,166,618
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 472
|
java
|
package day36_StaticClassMember;
public class CountableTest {
public static void main(String[] args) {
int objectCount;
Countible o1 = new Countible();
Countible o2 = new Countible();
Countible o3 = new Countible();
/*
objectCount = o1.getInstanceCount();
objectCount = o2.getInstanceCount();
objectCount = o3.getInstanceCount();
*/
System.out.println(o2.getInstanceCount());
//System.out.println(Countible.instanceCount);
}
}
|
[
"zdoolatkan@seznam.cz"
] |
zdoolatkan@seznam.cz
|
a206139094af52cd5abafa062dc06e096f5382ed
|
9254e7279570ac8ef687c416a79bb472146e9b35
|
/pai-dlc-20201203/src/main/java/com/aliyun/pai_dlc20201203/models/DeleteJobResponse.java
|
19d43867460ef5039e4b29f93e1be5f58ffc653a
|
[
"Apache-2.0"
] |
permissive
|
lquterqtd/alibabacloud-java-sdk
|
3eaa17276dd28004dae6f87e763e13eb90c30032
|
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
|
refs/heads/master
| 2023-08-12T13:56:26.379027
| 2021-10-19T07:22:15
| 2021-10-19T07:22:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,011
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.pai_dlc20201203.models;
import com.aliyun.tea.*;
public class DeleteJobResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("body")
@Validation(required = true)
public DeleteJobResponseBody body;
public static DeleteJobResponse build(java.util.Map<String, ?> map) throws Exception {
DeleteJobResponse self = new DeleteJobResponse();
return TeaModel.build(map, self);
}
public DeleteJobResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public DeleteJobResponse setBody(DeleteJobResponseBody body) {
this.body = body;
return this;
}
public DeleteJobResponseBody getBody() {
return this.body;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
bdc69418a640f713f44889ce69d544be75f15cc0
|
12c9568acf79bf1de01bb7655fa5f16b8712f788
|
/src/rr/tool/ToolLoader.java
|
a74bbfe9f99ad2a6920a3319928807da84ef3d8e
|
[
"BSD-3-Clause",
"SMLNJ"
] |
permissive
|
roadrunner-analysis/RoadRunner
|
26d91c29398b6e4d9fa6499b175fb8c76a045078
|
5734d21849a903f37de7d33e8ea56515c5d34fbe
|
refs/heads/master
| 2021-01-18T18:09:48.405809
| 2010-12-29T21:24:11
| 2010-12-29T21:24:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,960
|
java
|
/******************************************************************************
Copyright (c) 2010, Cormac Flanagan (University of California, Santa Cruz)
and Stephen Freund (Williams College)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the names of the University of California, Santa Cruz
and Williams College nor the names of its contributors may be
used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************************************************************/
package rr.tool;
import java.io.InputStream;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Properties;
import java.util.Set;
import java.util.TreeMap;
import rr.state.agent.ThreadStateExtensionAgent;
import acme.util.Assert;
import acme.util.Util;
import acme.util.time.TimedStmt;
public class ToolLoader extends URLClassLoader {
private static class Entry {
final String toolName;
final URL loc;
public Entry(String toolName, URL loc) {
super();
this.toolName = toolName;
this.loc = loc;
}
}
protected final TreeMap<String, Entry> abbrevs = new TreeMap<String, Entry>();
public ToolLoader(URL[] urls) {
super(urls);
buildToolMap(urls);
}
protected void buildToolMap(URL[] urls) {
final Set<URL> loaded = new HashSet<URL>();
try {
Enumeration<URL> e = getResources("rrtools.properties");
while (e.hasMoreElements()) {
final URL prop = e.nextElement();
if (loaded.contains(prop)) {
continue; // may see same file twice.
}
Util.log(new TimedStmt("" + prop) {
@Override
public void run() throws Exception {
Properties p = new Properties();
p.load(prop.openStream());
Util.log(p.keySet());
for (Object s : p.keySet()) {
if (abbrevs.containsKey(s)) {
final Entry entry = abbrevs.get(s);
Util.log("Tool " + s + " is already mapped to "
+ entry.toolName + " from " + entry.loc);
} else {
abbrevs.put((String) s,
new Entry(p.getProperty((String) s),
prop));
}
}
loaded.add(prop);
}
});
}
} catch (Exception e) {
Assert.panic(e);
}
}
public InputStream getToolAsStream(String x) {
String expanded = expandAbbrev(x);
if (expanded == null) {
expanded = x;
}
expanded = expanded.replace(".", "/");
return getResourceAsStream(expanded + ".class");
}
public Class<? extends Tool> loadToolClass(String x) {
String expanded = expandAbbrev(x);
if (expanded == null) {
expanded = x;
}
try {
return (Class<? extends Tool>) this.loadClass(expanded);
} catch (ClassNotFoundException e) {
Assert.fail("Cannot find Tool class '" + expanded + "'");
return null;
}
}
private String expandAbbrev(String x) {
Entry xa = abbrevs.get(x);
if (xa != null) {
return xa.toolName;
} else {
return null;
}
}
public void prepToolClass(String x) {
final String expandAbbrev = expandAbbrev(x);
if (expandAbbrev != null) {
String expanded = expandAbbrev.replace(".", "/");
InputStream in = getToolAsStream(x);
ThreadStateExtensionAgent.registerTool(expanded, in);
}
}
@Override
public String toString() {
String result = "\n\nKnown Tools:\n\n";
for (String key : abbrevs.keySet()) {
Entry v = abbrevs.get(key);
String tool = v.toolName;
String pkg = tool.substring(0, tool.lastIndexOf('.'));
tool = tool.substring(tool.lastIndexOf('.') + 1);
result += String.format("%6s : %-30s (package: %s, prop: %s)\n",
key, tool, pkg, v.loc);
}
return result + "\n";
}
}
|
[
"freund@cs.williams.edu"
] |
freund@cs.williams.edu
|
8140156e3b6c3f644c76607e6e4aaaa51a096e97
|
d950704f993a38c5f7c632d0322eb6df5877ff49
|
/framework/src/main/java/com/wch/jdbc/Session.java
|
ac27609409f5af3a676658ac6e597b2ab4a981da
|
[] |
no_license
|
gdnwxf/framework
|
025fef9c1e60d6673c16aed88fc969da810c44ba
|
dee9604c004a28c7fc40a1d16b96dec8a4852cd1
|
refs/heads/master
| 2020-04-15T12:44:02.039374
| 2017-05-12T02:52:12
| 2017-05-12T02:52:12
| 61,381,968
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,626
|
java
|
package com.wch.jdbc;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
/**
* @author GDNWXF
* @email gdnwxf@qq.com
* @2014年5月25日 下午6:39:43
*/
public interface Session {
public static final String ALIAS_TO_ENTITY_MAP = "map";
public static final String ALIAS_TO_LIST = "list";
/**
* 获取链接
*/
public Connection getConnection() throws SQLException;
/**
* 开启事务
*
* @throws SQLException
*/
public Transaction beginTransaction() throws SQLException;
/**
* 获取事务
*/
public Transaction getTransaction() throws SQLException;
/**
* 关闭session
*
* @throws SQLException
*/
public void close() throws SQLException;
/**
* 更新数据库
*
* @param sql
* @param params 以Object可变参数的形式传值
* @throws SQLException
*/
public void executeUpdate(String sql, Object... params) throws SQLException;
/**
* 更新数据库
*
* @param sql
* @param map 以map的形式传值
* @throws SQLException
*/
public void executeUpdate(String sql, Map<String, Object> params) throws SQLException;
/**
* 将结果集转换成实体
*
* @param clazz
*/
public Session addEntity(Class<?> clazz);
/**
* 获取结果集
*
* @return
* @throws SQLException
*/
public ResultSet getResultSet() throws SQLException;
/**
* 获取结果集中的字段的大写
*
* @return
* @throws SQLException
*/
public String[] getAliasUpper() throws SQLException;
/**
* 获取结果集中的字段的小写
*
* @return
* @throws SQLException
*/
public String[] getAlias() throws SQLException;
/**
* 以Object数组的形式查询的结果集的集合
*
* @return
* @throws SQLException
*/
public List<Object[]> getValues() throws SQLException;
/**
* 以Object数组的形式返回单行的记录
*
* @return
* @throws SQLException
*/
public Object[] getUniqueRow() throws SQLException;
/**
* 以Map的形式返回查询的结果集
*
* @return
* @throws SQLException
*/
@SuppressWarnings("rawtypes")
public List list() throws SQLException;
/**
* 以Map的形式返回查询的单行结果集
*
* @return
* @throws SQLException
*/
public Map<String, Object> getUniqueMapRow() throws SQLException;
/**
* 返回唯一的结果集
*
* @return
* @throws SQLException
*/
public <T> T getUniqueObject() throws SQLException;
/**
* 获取查询的结果集以List<?>形式返回
*
* @param <T>
*
* @param clazz 要映射的实体类的Class类
* @param sql
* @param params
* @return List<?> 查询结果集
* @throws SQLException
*/
public <T> List<T> queryList(Class<T> t, String sql, Object... params) throws SQLException;
/**
* 获取查询的结果集以List<?>形式返回
*
* @param clazz 要映射的实体类的Class类
* @param sql
* @param paramMap 以map的形式传值
* @return List<?> 查询结果集
* @throws SQLException
*/
public List<?> queryList(Class<?> clazz, String sql, Map<String, Object> params) throws SQLException;
/**
* 获取查询的结果集以List<?>形式返回
*
* @param sql
* @param translate 通过自定义的赋值方式
* @param params
* @return List<?> 查询结果集
* @throws SQLException
*/
public List<?> queryList(String sql, ResultTranslate translate, Object... params) throws SQLException;
/**
* 获取查询的结果集以List<?>形式返回
*
* @param sql
* @param translate 通过自定义的赋值方式
* @param paramMap 以map的形式传值
* @return List<?> 查询结果集
* @throws SQLException
*/
public List<?> queryList(String sql, ResultTranslate translate, Map<String, Object> params) throws SQLException;
/**
* 获取查询的结果集以List<Map<String,Object>>形式返回
*
* @param sql
* @param params
* @return List<Map<String,Object>> 查询结果集
* @throws SQLException
*/
public List<Map<String, Object>> queryList(String sql, Object... params) throws SQLException;
/**
* 获取查询的结果集以List<Map<String,Object>>形式返回
*
* @param sql
* @param paramMap 以map的形式传值
* @return List<Map<String,Object>> 查询结果集
* @throws SQLException
*/
public List<Map<String, Object>> queryList(String sql, Map<String, Object> params) throws SQLException;
/**
* 通过反射技术获取单个对象的数据记录以对象的形式返回
*
* @param clazz
* @param sql
* @param params
* @return 单个对象
* @throws SQLException
*/
public Object querySingal(Class<?> clazz, String sql, Object... params) throws SQLException;
/**
* 通过反射技术获取单个对象的数据记录以对象的形式返回
*
* @param clazz
* @param sql
* @param paramMap 以map的形式传值
* @return 单个对象
* @throws SQLException
*/
public Object querySingal(Class<?> clazz, String sql, Map<String, Object> params) throws SQLException;
/**
* 获取单个对象的数据记录以对象的形式返回
*
* @param sql
* @param translate 自定义赋值
* @param params
* @return 单个对象
* @throws SQLException
*/
public Object querySingal(String sql, ResultTranslate translate, Object... params) throws SQLException;
/**
* 获取单个对象的数据记录以对象的形式返回
*
* @param sql
* @param translate 自定义赋值
* @param paramMap 以map的形式传值
* @return 单个对象
* @throws SQLException
*/
public Object querySingal(String sql, ResultTranslate translate, Map<String, Object> params) throws SQLException;
/**
* 获取单条数据记录一Map的形式返回
*
* @param sql
* @param params
* @return 单条数据记录
* @throws SQLException
*/
public Map<String, Object> querySingal(String sql, Object... params) throws SQLException;
/**
* 获取单条数据记录一Map的形式返回
*
* @param sql
* @param params
* @return 单条数据记录
* @throws SQLException
*/
public Map<String, Object> querySingal(String sql, Map<String, Object> params) throws SQLException;
/**
* 创建预编译的环境
*
* @param sql
* @param params
* @return
* @throws SQLException
*/
public Session createSessionQuery(String sql, Object... params) throws SQLException;
public Query createQuery(String sql, Object... params) throws SQLException;
/**
* 结果集转换接口
*
* @author GDNWXF
*
*/
public interface ResultTranslate {
public Object getObject(ResultSet rs);
}
}
|
[
"qinghao@2dfire.com"
] |
qinghao@2dfire.com
|
ed6520aad5461aed5195c98212684ad1612bd114
|
5372fdb9ba25e7218950efa9b0d97f66d34e8763
|
/byte-buddy-dep/src/test/java/net/bytebuddy/implementation/MethodDelegationExceptionTest.java
|
d0e154076cff4142795dfae0f2536e67982caf9a
|
[
"Apache-2.0"
] |
permissive
|
CloudNinja42/byte-buddy
|
fe6e2d2c8424f5ed11f54a81d02ccf8df73936a5
|
84ef6cbc99eb04639d643b7c8f5f9f0eef2573ff
|
refs/heads/master
| 2021-05-29T12:29:10.755927
| 2015-08-13T16:16:42
| 2015-08-13T16:16:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,491
|
java
|
package net.bytebuddy.implementation;
import net.bytebuddy.test.packaging.PackagePrivateMethod;
import org.junit.Test;
public class MethodDelegationExceptionTest extends AbstractImplementationTest {
@Test(expected = IllegalArgumentException.class)
public void testNoMethod() throws Exception {
implement(Foo.class, MethodDelegation.to(Bar.class));
}
@Test(expected = IllegalArgumentException.class)
public void testNoVisibleMethod() throws Exception {
implement(Foo.class, MethodDelegation.to(new PackagePrivateMethod()));
}
@Test(expected = IllegalArgumentException.class)
public void testNoCompatibleMethod() throws Exception {
implement(Foo.class, MethodDelegation.to(Qux.class));
}
@Test(expected = IllegalArgumentException.class)
public void testInterface() throws Exception {
MethodDelegation.to(Runnable.class);
}
@Test(expected = IllegalArgumentException.class)
public void testArray() throws Exception {
MethodDelegation.to(int[].class);
}
@Test(expected = IllegalArgumentException.class)
public void testPrimitive() throws Exception {
MethodDelegation.to(int.class);
}
public static class Foo {
public void bar() {
/* do nothing */
}
}
public static class Bar {
/* empty */
}
public static class Qux {
public static void foo(Object o) {
/* do nothing */
}
}
}
|
[
"rafael.wth@web.de"
] |
rafael.wth@web.de
|
d5175f60926001801da364515302658208be3773
|
80d712626379f720246a7eece1f18843a095b746
|
/src/cloud/components/GL/GL_ITC/DefiningAVariableToUseAsARuntimePromptITC.java
|
a4fbace9c8675378c9f0cfeb95b9d05393478c5f
|
[] |
no_license
|
vpamuriitc/SeleniumFramework_2021B
|
b602eb35eb32c3a30f33bf157e13e38efea07690
|
9d289689a3220da7a535baeea83036e039930c6b
|
refs/heads/main
| 2023-06-09T04:20:58.524691
| 2021-07-02T15:05:07
| 2021-07-02T15:05:07
| 374,629,781
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,556
|
java
|
package cloud.components.GL.GL_ITC;
import org.openqa.selenium.By;
import itc.framework.BaseTest;
public class DefiningAVariableToUseAsARuntimePromptITC extends BaseTest{
public static String RuleName;
public static String RuleID;
public static String RTPText;
private static void run() throws InterruptedException{
// clickElement(By.id("pt1:_UISmmLink::icon"));
// clickElement(By.id("pt1:nv_itemNode_general_accounting_journals"));
clickElement(By.id("_FOpt1:_FOr1:0:_FONSr2:0:_FOTsdi_JournalEntryPage_itemNode_FndTasksList::ti"));
clickElement(By.id("_FOpt1:_FOr1:0:_FONSr2:0:_FOTRaT:0:RAtl10"));
Thread.sleep(2000);
// clickElement(By.id("_FOpt1:_FOr1:0:_FOSritemNode_general_accounting_journals:0:_FOTsdi_JournalEntryPage_itemNode_FndTasksList::icon"));
//
// clickElement(By.id("_FOpt1:_FOr1:0:_FOSritemNode_general_accounting_journals:0:_FOTRaT:0:RAtl10"));
//
// Thread.sleep(2000);
// ERROR: Caught exception [ERROR: Unsupported command [selectWindow | name=Oracle_Enterprise_Performance_Management_System_Workspace__Fusion_Edition_adc_fap0846_fa_ext_oracledemos_com_0 | ]]
//browser.get("https://adc-fap0846-fa-ext.oracledemos.com/workspace/WorkspaceLaunch.jsp");
System.out.println("====="+browser.getTitle());
System.out.println(browser.getWindowHandle());
Iterable<String> no = browser.getWindowHandles();
for (String s : no) {
browser.switchTo().window(s);
System.out.println(browser.getTitle());
if (browser.getTitle().equalsIgnoreCase("Oracle Enterprise Performance Management System Workspace, Fusion Edition")){
//browser.switchTo().frame(browser.findElement(By.xpath("//frame[starts-with(@src,\"cache/BeGIli-O1bWcNr\")]")));
clickElement(By.id("bpm.mnbt_Tools"));
//clickElement(By.xpath("//div[@id='bpm.mnbt_Tools']"));
clickElement(By.xpath("//td[text()=\"Varia\"]"));
Thread.sleep(5000);
clickElement(By.xpath("//img[starts-with(@class,\"bi-tree-view-expand-\")]"));
Thread.sleep(10000);
clickElement(By.xpath("//nobr[starts-with(text(),\"AK_STRUCTURE_INSTANCE\")]/img[@title=\"Expand\"]"));
//new Actions(browser).contextClick(browser.findElement(By.xpath("//nobr[text()=\"db\"]"))).perform();
clickElement(By.xpath("//nobr[text()=\"db\"]"));
Thread.sleep(5000);
clickElement(By.id("bpm.mnbt_File"));
clickElement(By.xpath("//td[text()=\"ew\"]"));
clickElement(By.xpath("//td[text()=\"ariable\"]"));
Thread.sleep(5000);
setElementText(By.id("BiTextField-539"),RuleName);
clickElement(By.id("BiLabel-550"));
Thread.sleep(2000);
clickElement(By.id("BiComboBoxItem-725"));
clickElement(By.id("BiLabel-779"));
Thread.sleep(2000);
clickElement(By.id("BiComboBoxItem-845"));
clickElement(By.xpath("(//tbody[starts-with(@class,\"bi-show-grid-lines f\")]/tr/td)[3]"));
Thread.sleep(2000);
setElementText(By.id("BiTextField-864"),RuleID);
clickElement(By.xpath("(//tbody[starts-with(@class,\"bi-show-grid-lines f\")]/tr/td)[5]"));
Thread.sleep(2000);
setElementText(By.id("BiTextField-868"),RTPText);
Thread.sleep(2000);
clickElement(By.xpath("//img[@alt=\"Save\"]"));
clickElement(By.id("com.hyperion.bpm.web.common.DialogButton-875"));
}
};
}
public static void run(int iterations) throws Exception{
initComponent();
for(int i=0;i<iterations;i++)
{
iteration=i;
popluateParams(DefiningAVariableToUseAsARuntimePromptITC.class);
run();
}
}
}
|
[
"vpamuri@itconvergence.com"
] |
vpamuri@itconvergence.com
|
039cf8894b655bc90cbc1396a7583e8fa3be0493
|
b61caea3b8b55474553b5d509bf17bae66bc6989
|
/spring-data-rest-core/src/main/java/org/springframework/data/rest/core/util/FluentBeanSerializer.java
|
463aba1dde4ddd9991e84019db63a3e3f3caa603
|
[
"Apache-2.0"
] |
permissive
|
ericbottard/spring-data-rest
|
fd7488cc9c62baa768ce73628386f488251513ee
|
4abd842a865c7f5f07687f72dfe5047e21cba9db
|
refs/heads/master
| 2021-01-16T22:51:05.662887
| 2012-08-07T22:05:43
| 2012-08-07T22:05:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,531
|
java
|
package org.springframework.data.rest.core.util;
import java.io.IOException;
import java.util.Collection;
import java.util.Map;
import org.codehaus.jackson.JsonGenerationException;
import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.map.SerializerProvider;
import org.codehaus.jackson.map.ser.std.SerializerBase;
import org.springframework.util.ClassUtils;
/**
* A "fluent" bean is one that does not use the JavaBean conventions of "setProperty" and "getProperty" but instead
* uses just "property" with 0 or 1 arguments to distinguish between getter (0 arg) and setter (1 arg).
*
* @author Jon Brisbin <jbrisbin@vmware.com>
*/
public class FluentBeanSerializer
extends SerializerBase<Object> {
@SuppressWarnings({"unchecked", "rawtypes"})
public FluentBeanSerializer(final Class t) {
super(t);
if(!FluentBeanUtils.isFluentBean(t)) {
throw new IllegalArgumentException("Class of type " + t + " is not a FluentBean");
}
}
@SuppressWarnings({"unchecked"})
@Override
public void serialize(final Object value,
final JsonGenerator jgen,
final SerializerProvider provider)
throws IOException,
JsonGenerationException {
if(null == value) {
provider.defaultSerializeNull(jgen);
} else {
Class<?> type = value.getClass();
if(ClassUtils.isAssignable(type, Collection.class)) {
jgen.writeStartArray();
for(Object o : (Collection)value) {
write(o, jgen, provider);
}
jgen.writeEndArray();
} else if(ClassUtils.isAssignable(type, Map.class)) {
jgen.writeStartObject();
for(Map.Entry<String, Object> entry : ((Map<String, Object>)value).entrySet()) {
jgen.writeFieldName(entry.getKey());
write(entry.getValue(), jgen, provider);
}
jgen.writeEndObject();
} else {
write(value, jgen, provider);
}
}
}
private void write(final Object value,
final JsonGenerator jgen,
final SerializerProvider provider)
throws IOException {
Class<?> type = value.getClass();
if(ClassUtils.isAssignable(type, _handledType)) {
jgen.writeStartObject();
for(String fname : FluentBeanUtils.metadata(type).fieldNames()) {
jgen.writeFieldName(fname);
write(FluentBeanUtils.get(fname, value), jgen, provider);
}
jgen.writeEndObject();
} else {
jgen.writeObject(value);
}
}
}
|
[
"jon@jbrisbin.com"
] |
jon@jbrisbin.com
|
2641d709c93fea1de976ad12c76cde8a0a604f68
|
6c35446feb5baaadf1901a083442e14dc423fc0b
|
/TestWork/src/main/java/com/cqx/bean/CmdBean.java
|
414dfbcebd98371c36897732b85f7c0d69b7b0bb
|
[
"Apache-2.0"
] |
permissive
|
chenqixu/TestSelf
|
8e533d2f653828f9f92564c3918041d733505a30
|
7488d83ffd20734ab5ca431d13fa3c5946493c11
|
refs/heads/master
| 2023-09-01T06:18:59.417999
| 2023-08-21T06:16:55
| 2023-08-21T06:16:55
| 75,791,787
| 3
| 1
|
Apache-2.0
| 2022-03-02T06:47:48
| 2016-12-07T02:36:58
|
Java
|
UTF-8
|
Java
| false
| false
| 1,326
|
java
|
package com.cqx.bean;
/**
* 命令工具bean
*
* @author chenqixu
*/
public class CmdBean {
private String type;
private String username;
private String password;
private String dns;
private String loglevel = "info";
public static CmdBean newbuilder() {
return new CmdBean();
}
public String toString() {
return "[type=" + type + ",[username=" + username + ",[password=" + password + ",[dns=" + dns + ",[loglevel=" + loglevel;
}
public String getType() {
return type;
}
public CmdBean setType(String type) {
this.type = type;
return this;
}
public String getUsername() {
return username;
}
public CmdBean setUsername(String username) {
this.username = username;
return this;
}
public String getPassword() {
return password;
}
public CmdBean setPassword(String password) {
this.password = password;
return this;
}
public String getDns() {
return dns;
}
public CmdBean setDns(String dns) {
this.dns = dns;
return this;
}
public String getLoglevel() {
return loglevel;
}
public CmdBean setLoglevel(String loglevel) {
this.loglevel = loglevel;
return this;
}
}
|
[
"13509323824@139.com"
] |
13509323824@139.com
|
b58a4d13965f199a1d079e9292d33db01aef5bf2
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/14/14_33a960a515562755a9fa75d13b9993b1edfd81ab/MainWindow/14_33a960a515562755a9fa75d13b9993b1edfd81ab_MainWindow_s.java
|
e6bebcb9f2dd984dd21960e510a277ef680b62cc
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,843
|
java
|
package presentation;
import java.awt.BorderLayout;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import java.awt.*;
import java.awt.event.*;
/**
* Presentation class for the main window. Contains the tabs that contains the panels.
* @author Kristoffer Karlsson
*
*/
public class MainWindow extends JFrame {
private JPanel contentPane;
/**
* Method "createInnerPanel" creates the panel that is inside the tab
* @param text is a placeholder, will be replaced by the other panels
*/
public JPanel createInnerPanel(String text) {
JPanel thePanel = new JPanel();
JLabel theLabel = new JLabel(text);
theLabel.setHorizontalAlignment(JLabel.CENTER);
thePanel.setLayout(new GridLayout(1,1));
thePanel.add(theLabel);
return thePanel;
}
public static void main(String[] args) {
MainWindow mw = new MainWindow();
mw.setVisible(true);
}
public MainWindow() {
setTitle("Bokhandeln");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 520);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JTabbedPane thePanes = new JTabbedPane();
ImageIcon bookIcon = new ImageIcon("dasbook.gif");
JPanel start = createInnerPanel("Detta r startsidan");
thePanes.addTab("Startsida", bookIcon, start, "Tab1");
thePanes.setSelectedIndex(0);
JPanel addStuff = createInnerPanel("Hr lgger man till/tar bort bcker");
thePanes.addTab("Lgg till", bookIcon, addStuff);
JPanel statistic = createInnerPanel("Hr ser man statistik");
thePanes.addTab("Statistik", bookIcon, statistic);
setLayout(new GridLayout(1,1));
add(thePanes);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
036f45119a37a8be4ed1368f30a051fb6ac6768c
|
f0ef082568f43e3dbc820e2a5c9bb27fe74faa34
|
/com/google/android/gms/internal/zziz.java
|
cd750d7b15af7e3688299096d2e428de543c20cc
|
[] |
no_license
|
mzkh/Taxify
|
f929ea67b6ad12a9d69e84cad027b8dd6bdba587
|
5c6d0854396b46995ddd4d8b2215592c64fbaecb
|
refs/heads/master
| 2020-12-03T05:13:40.604450
| 2017-05-20T05:19:49
| 2017-05-20T05:19:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,741
|
java
|
package com.google.android.gms.internal;
import android.os.Parcel;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.List;
public class zziz implements SafeParcelable {
public static final zzja CREATOR;
public final String name;
public final int weight;
final int zzFG;
public final String zzGh;
public final boolean zzGi;
public final boolean zzGj;
public final String zzGk;
public final zzit[] zzGl;
final int[] zzGm;
public final String zzGn;
public static final class zza {
private final String mName;
private String zzGo;
private boolean zzGp;
private int zzGq;
private boolean zzGr;
private String zzGs;
private final List<zzit> zzGt;
private BitSet zzGu;
private String zzGv;
public zza(String str) {
this.mName = str;
this.zzGq = 1;
this.zzGt = new ArrayList();
}
public zza zzI(boolean z) {
this.zzGp = z;
return this;
}
public zza zzJ(boolean z) {
this.zzGr = z;
return this;
}
public zza zzW(int i) {
if (this.zzGu == null) {
this.zzGu = new BitSet();
}
this.zzGu.set(i);
return this;
}
public zza zzaA(String str) {
this.zzGv = str;
return this;
}
public zza zzaz(String str) {
this.zzGo = str;
return this;
}
public zziz zzgX() {
int i = 0;
int[] iArr = null;
if (this.zzGu != null) {
iArr = new int[this.zzGu.cardinality()];
int nextSetBit = this.zzGu.nextSetBit(0);
while (nextSetBit >= 0) {
int i2 = i + 1;
iArr[i] = nextSetBit;
nextSetBit = this.zzGu.nextSetBit(nextSetBit + 1);
i = i2;
}
}
return new zziz(this.mName, this.zzGo, this.zzGp, this.zzGq, this.zzGr, this.zzGs, (zzit[]) this.zzGt.toArray(new zzit[this.zzGt.size()]), iArr, this.zzGv);
}
}
static {
CREATOR = new zzja();
}
zziz(int i, String str, String str2, boolean z, int i2, boolean z2, String str3, zzit[] com_google_android_gms_internal_zzitArr, int[] iArr, String str4) {
this.zzFG = i;
this.name = str;
this.zzGh = str2;
this.zzGi = z;
this.weight = i2;
this.zzGj = z2;
this.zzGk = str3;
this.zzGl = com_google_android_gms_internal_zzitArr;
this.zzGm = iArr;
this.zzGn = str4;
}
zziz(String str, String str2, boolean z, int i, boolean z2, String str3, zzit[] com_google_android_gms_internal_zzitArr, int[] iArr, String str4) {
this(2, str, str2, z, i, z2, str3, com_google_android_gms_internal_zzitArr, iArr, str4);
}
public int describeContents() {
zzja com_google_android_gms_internal_zzja = CREATOR;
return 0;
}
public boolean equals(Object object) {
if (!(object instanceof zziz)) {
return false;
}
zziz com_google_android_gms_internal_zziz = (zziz) object;
return this.name.equals(com_google_android_gms_internal_zziz.name) && this.zzGh.equals(com_google_android_gms_internal_zziz.zzGh) && this.zzGi == com_google_android_gms_internal_zziz.zzGi;
}
public void writeToParcel(Parcel out, int flags) {
zzja com_google_android_gms_internal_zzja = CREATOR;
zzja.zza(this, out, flags);
}
}
|
[
"mozammil.khan@webyog.com"
] |
mozammil.khan@webyog.com
|
35d50ca5d7a476d57edd099fde3129b1703a5a9b
|
8191bea395f0e97835735d1ab6e859db3a7f8a99
|
/com.antutu.ABenchMark_source_from_JADX/p000a/C0125p.java
|
ced7dd2025ae3f38afa84ceea3c5e62cca36a9df
|
[] |
no_license
|
msmtmsmt123/jadx-1
|
5e5aea319e094b5d09c66e0fdb31f10a3238346c
|
b9458bb1a49a8a7fba8b9f9a6fb6f54438ce03a2
|
refs/heads/master
| 2021-05-08T19:21:27.870459
| 2017-01-28T04:19:54
| 2017-01-28T04:19:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,282
|
java
|
package p000a;
import java.security.cert.Certificate;
import java.util.Collections;
import java.util.List;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSession;
import p000a.p001a.C0037c;
/* renamed from: a.p */
public final class C0125p {
private final ac f520a;
private final C0114h f521b;
private final List<Certificate> f522c;
private final List<Certificate> f523d;
private C0125p(ac acVar, C0114h c0114h, List<Certificate> list, List<Certificate> list2) {
this.f520a = acVar;
this.f521b = c0114h;
this.f522c = list;
this.f523d = list2;
}
public static C0125p m537a(SSLSession sSLSession) {
String cipherSuite = sSLSession.getCipherSuite();
if (cipherSuite == null) {
throw new IllegalStateException("cipherSuite == null");
}
C0114h a = C0114h.m491a(cipherSuite);
cipherSuite = sSLSession.getProtocol();
if (cipherSuite == null) {
throw new IllegalStateException("tlsVersion == null");
}
Object[] peerCertificates;
ac a2 = ac.m462a(cipherSuite);
try {
peerCertificates = sSLSession.getPeerCertificates();
} catch (SSLPeerUnverifiedException e) {
peerCertificates = null;
}
List a3 = peerCertificates != null ? C0037c.m156a(peerCertificates) : Collections.emptyList();
Object[] localCertificates = sSLSession.getLocalCertificates();
return new C0125p(a2, a, a3, localCertificates != null ? C0037c.m156a(localCertificates) : Collections.emptyList());
}
public C0114h m538a() {
return this.f521b;
}
public List<Certificate> m539b() {
return this.f522c;
}
public boolean equals(Object obj) {
if (!(obj instanceof C0125p)) {
return false;
}
C0125p c0125p = (C0125p) obj;
return C0037c.m163a(this.f521b, c0125p.f521b) && this.f521b.equals(c0125p.f521b) && this.f522c.equals(c0125p.f522c) && this.f523d.equals(c0125p.f523d);
}
public int hashCode() {
return (((((((this.f520a != null ? this.f520a.hashCode() : 0) + 527) * 31) + this.f521b.hashCode()) * 31) + this.f522c.hashCode()) * 31) + this.f523d.hashCode();
}
}
|
[
"eggfly@qq.com"
] |
eggfly@qq.com
|
ad44398bfe3bb7e37a69a347bc305529be36bb89
|
bb6929a3365adeaf22dbc0c6590206a8ce608e7c
|
/Code/src/com/accela/cers/cap/model/StatementOfDesignatedOperatorUnderstandingOfComplianceDocumentsType.java
|
39d183829872ebd9274a4c8dc17e8c1a251f0346
|
[] |
no_license
|
accela-robinson/CERS
|
a33c7a58ae90d82f430fcb9188a7a32951c47d81
|
58624383e0cb9db8d2d70bc6134edca585610eba
|
refs/heads/master
| 2020-04-02T12:23:34.108097
| 2015-04-10T05:34:02
| 2015-04-10T05:34:02
| 30,371,654
| 2
| 1
| null | 2015-04-08T07:01:04
| 2015-02-05T18:39:49
|
Java
|
UTF-8
|
Java
| false
| false
| 2,651
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
// 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: 2013.01.21 at 02:38:20 PM GMT+08:00
//
package com.accela.cers.cap.model;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for StatementOfDesignatedOperatorUnderstandingOfComplianceDocumentsType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="StatementOfDesignatedOperatorUnderstandingOfComplianceDocumentsType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="USTStatementOfDesignatedOperatorUnderstandingOfComplianceDocument" type="{http://cersservices.calepa.ca.gov/Schemas/RegulatorFacilitySubmittalQuery/1/05/}DocumentType"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "StatementOfDesignatedOperatorUnderstandingOfComplianceDocumentsType", propOrder = {
"ustStatementOfDesignatedOperatorUnderstandingOfComplianceDocument"
})
public class StatementOfDesignatedOperatorUnderstandingOfComplianceDocumentsType {
@XmlElement(name = "USTStatementOfDesignatedOperatorUnderstandingOfComplianceDocument", required = true)
protected DocumentType ustStatementOfDesignatedOperatorUnderstandingOfComplianceDocument;
/**
* Gets the value of the ustStatementOfDesignatedOperatorUnderstandingOfComplianceDocument property.
*
* @return
* possible object is
* {@link DocumentType }
*
*/
public DocumentType getUSTStatementOfDesignatedOperatorUnderstandingOfComplianceDocument() {
return ustStatementOfDesignatedOperatorUnderstandingOfComplianceDocument;
}
/**
* Sets the value of the ustStatementOfDesignatedOperatorUnderstandingOfComplianceDocument property.
*
* @param value
* allowed object is
* {@link DocumentType }
*
*/
public void setUSTStatementOfDesignatedOperatorUnderstandingOfComplianceDocument(DocumentType value) {
this.ustStatementOfDesignatedOperatorUnderstandingOfComplianceDocument = value;
}
}
|
[
"rleung@accela.com"
] |
rleung@accela.com
|
5bc4da5e036216989687adb821eedd1d0bba02f5
|
fe711416301bdc8fcd798a5c20d7a02f37f61362
|
/WEB16/src/com/itheima/session/SessionServlet1_001.java
|
dcee51a9c18aa16b567f27099287cf09682e8e7f
|
[] |
no_license
|
chaiguolong/javaweb_step1
|
e9175521485813c40e763a95629c1ef929405010
|
e9e8d3e70fd5d9495b6675c60e35d8ca12eefdc2
|
refs/heads/master
| 2022-07-07T18:10:59.431906
| 2020-04-28T05:41:51
| 2020-04-28T05:41:51
| 143,223,415
| 1
| 0
| null | 2022-06-21T00:55:31
| 2018-08-02T00:53:40
|
Java
|
UTF-8
|
Java
| false
| false
| 1,448
|
java
|
package com.itheima.session;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
public class SessionServlet1_001 extends HttpServlet{
private static final long serialVersionUID = -23324535345L;
protected void doGet(HttpServletRequest request ,HttpServletResponse response) throws ServletException ,IOException{
//创建属于该客户端(会话)的私有的session区域
/*
* request.getSession()方法内部会判断 该客户端是否在服务器端已经存在
* session
* 如果该客户端子啊此服务器不存在session 那么就会创建一个新的session对象
* 如果该客户端在此服务器已经存在session获得已经存在的该session返回
*/
HttpSession session = request.getSession();
session.setAttribute("name","jerry");
String id = session.getId();
//手动创建一个存储JSESSIONID的cookie为该cookie设置持久化时间
Cookie cookie = new Cookie("JSESSIONID",id);
cookie.setPath("/WEB16/");
cookie.setMaxAge(60*10);
response.addCookie(cookie);
response.getWriter().write("JSESSIONID:"+id);
}
protected void doPost(HttpServletRequest request,HttpServletResponse response)throws ServletException ,IOException{
doGet(request,response);
}
}
|
[
"584238433@qq.com"
] |
584238433@qq.com
|
839405c013da15ff9ba3ae3f2fab1b3dc9227ba1
|
b4c3c34ef1c97e718c30dbda9388b00719b2e772
|
/src/test/java/com/zonekey/disrec/common/test/SpringTxTestCase.java
|
3bc7d91ada8387e862e952217e7322d41ca306d9
|
[] |
no_license
|
github188/disrec
|
1c7524c50b5bbcaa42ac905f77a75be23f5496fa
|
90f9f5e1e323510988ecd70e3f752a23f513d3c9
|
refs/heads/master
| 2021-01-15T12:54:06.667298
| 2015-10-21T08:18:13
| 2015-10-21T08:18:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 804
|
java
|
package com.zonekey.disrec.common.test;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
/**
* Spring的支持数据库访问, 事务控制和依赖注入的JUnit4 集成测试基类, 相比Spring原基类名字更短.
*
* 子类需要定义applicationContext文件的位置, 如:
* @ContextConfiguration(locations = { "/applicationContext-test.xml" })
*
* @author calvin
*/
public abstract class SpringTxTestCase extends AbstractTransactionalJUnit4SpringContextTests {
protected DataSource dataSource;
@Override
@Autowired
public void setDataSource(DataSource dataSource) {
super.setDataSource(dataSource);
this.dataSource = dataSource;
}
}
|
[
"jeanwinhuang@live.com"
] |
jeanwinhuang@live.com
|
9771520773f9f2067d1c368fe4f1a7699a350298
|
d9d7bf3d0dca265c853cb58c251ecae8390135e0
|
/gcld/src/com/reign/gcld/rank/dao/ITaskInitDao.java
|
7204e4ae703db8bf45cdb99c65bd782b33d92edd
|
[] |
no_license
|
Crasader/workspace
|
4da6bd746a3ae991a5f2457afbc44586689aa9d0
|
28e26c065a66b480e5e3b966be4871b44981b3d8
|
refs/heads/master
| 2020-05-04T21:08:49.911571
| 2018-11-19T08:14:27
| 2018-11-19T08:14:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 549
|
java
|
package com.reign.gcld.rank.dao;
import com.reign.framework.mybatis.*;
import com.reign.gcld.rank.domain.*;
import java.util.*;
public interface ITaskInitDao extends IBaseDao<TaskInit>
{
TaskInit read(final int p0);
TaskInit readForUpdate(final int p0);
List<TaskInit> getModels();
int getModelSize();
int create(final TaskInit p0);
int deleteById(final int p0);
void batchCreate(final List<TaskInit> p0);
void deleteAlls();
int updateType(final int p0, final int p1);
}
|
[
"359569198@qq.com"
] |
359569198@qq.com
|
76772b86db40e440e75b2251e0861f6360fe03d4
|
d1057dd7f1c0a72821e511f7587e511368f41f94
|
/Project/Mavendemo/src/main/java/com/example/demo/bean/User.java
|
1064d576575bf2580331615093f1f38267b9fc6a
|
[] |
no_license
|
hyb1234hi/Atom-Github
|
1c7b1800c2dcf8a12af90bf54de2a5964c6d625e
|
46bcb8cc204ef71f0d310d4bb9a3ae7cdf7b04a1
|
refs/heads/master
| 2020-08-27T16:23:50.568306
| 2018-07-06T01:26:17
| 2018-07-06T01:26:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,039
|
java
|
package com.example.demo.bean;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
@Entity
public class User {
@Id
@GeneratedValue
private Integer id;
private String userName;
public User(String userName, String pwd, String tel) {
super();
this.userName = userName;
this.pwd = pwd;
this.tel = tel;
}
private String pwd;
private String tel;
public String getTel() {
return tel;
}
public void setTel(String tel) {
this.tel = tel;
}
public User() {
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
}
|
[
"wufengfeilong@163.com"
] |
wufengfeilong@163.com
|
c5e3fa7e3209ee44eed5f9d480d015457efbf99e
|
f6762aa7f7145f402b35c78eef44e47df77c5496
|
/src/main/java/com/crud/tasks/domain/CreatedTrelloCardDto.java
|
5d4c24f05d62cba97e6bbd70e7c75c7f8b0a4a5d
|
[] |
no_license
|
binkul/Tasks
|
df0f59cdf07dd3c539040e5523970bb84e47e207
|
c1a21ca21a4550318b3327db3673fb631a93823b
|
refs/heads/master
| 2020-12-29T07:55:39.800490
| 2020-05-18T16:48:27
| 2020-05-18T16:48:27
| 238,515,530
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 636
|
java
|
package com.crud.tasks.domain;
import com.crud.tasks.domain.trello.BadgesField;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
@Getter
@AllArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class CreatedTrelloCardDto {
@JsonProperty("id")
private String id;
@JsonProperty("name")
private String name;
@JsonProperty("shortUrl")
private String shortUrl;
@JsonProperty("badges")
private BadgesField badges;
}
|
[
"jacekbinkul@gmail.com"
] |
jacekbinkul@gmail.com
|
621d9ec991e1989f4420f9d4262de37fb1fb639e
|
982c10afbc579cf2310c8bc4ddf6542c2421c54a
|
/chap01/src/chap08/car/CarExample.java
|
67e10cd54bfdf928e3d9c4023cd994c54f1d4b5e
|
[] |
no_license
|
euigiljung/Java_train_one
|
6a1f3eb9593ad094bb2aab600a90b592d2d1f761
|
c76c81d64d62fe9b33a820bb96c2474ed9d7bcb1
|
refs/heads/master
| 2023-07-06T08:58:45.932949
| 2021-08-04T02:19:30
| 2021-08-04T02:19:30
| 384,331,428
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 297
|
java
|
package chap08.car;
public class CarExample {
public static void main(String[] args) {
// TODO Auto-generated method stub
Car myCar = new Car();
myCar.run();
myCar.frontLeftTire = new KumhoTire();
myCar.frontRightTire = new KumhoTire();
myCar.run();
}
}
|
[
"504@DESKTOP-B0KVD9C"
] |
504@DESKTOP-B0KVD9C
|
493b124599f37d23d333da67a7f090c4fd1592ca
|
87873856a23cd5ebdcd227ef39386fb33f5d6b13
|
/webapp-project-spring/src/main/java/io/jsd/training/webapp/petclinic/spring/controller/VaccinController.java
|
c68d17990cf0fc485d0ab2c84a36b3e10866c8a1
|
[] |
no_license
|
jsdumas/java-training
|
da204384223c3e7871ccbb8f4a73996ae55536f3
|
8df1da57ea7a5dd596fea9b70c6cd663534d9d18
|
refs/heads/master
| 2022-06-28T16:08:47.529631
| 2019-06-06T07:49:30
| 2019-06-06T07:49:30
| 113,677,424
| 0
| 0
| null | 2022-06-20T23:48:24
| 2017-12-09T14:55:56
|
Java
|
UTF-8
|
Java
| false
| false
| 3,192
|
java
|
package io.jsd.training.webapp.petclinic.spring.controller;
import static org.springframework.web.bind.annotation.RequestMethod.GET;
import static org.springframework.web.bind.annotation.RequestMethod.POST;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import io.jsd.training.webapp.petclinic.dao.entity.Vaccin;
import io.jsd.training.webapp.petclinic.dto.VaccinDTO;
import io.jsd.training.webapp.petclinic.spring.service.AnimalService;
import io.jsd.training.webapp.petclinic.spring.service.ServiceException;
import io.jsd.training.webapp.petclinic.spring.service.VaccinService;
@Controller
@RequestMapping("/vaccin")
public class VaccinController {
@Autowired
private VaccinService vaccinService;
@Autowired
private AnimalService animalService;
Logger logger = LoggerFactory.getLogger(VaccinController.class);
@RequestMapping("list.do")
public ModelAndView listVaccin() {
try {
return new ModelAndView("list-vaccin", "vaccins", vaccinService.findAll());
} catch (ServiceException e) {
e.printStackTrace();
}
return null;
}
@RequestMapping(value="edit.do", method=GET)
public ModelAndView initSaveVaccin() {
VaccinDTO vaccinDTO = new VaccinDTO();
try {
vaccinDTO.setAnimals(animalService.findAll());
} catch (ServiceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return new ModelAndView("edit-vaccin", "vaccinDTO", vaccinDTO);
}
@RequestMapping(value="edit.do", method=POST)
public ModelAndView saveVaccin(VaccinDTO vaccinDTO, BindingResult result) {
if(!result.hasErrors())
{
Vaccin vaccin = vaccinDTO.newVaccin();
try {
vaccin.setAnimal(animalService.find(vaccinDTO.getAnimalId()));
vaccinService.save(vaccin);
} catch (ServiceException e) {
e.printStackTrace();
}
return listVaccin();
}
else {
return new ModelAndView("edit-vaccin", "vaccinDTO", vaccinDTO);
}
}
@RequestMapping(value="remove.do", method=GET)
public ModelAndView removePersonne(Integer id) {
try {
vaccinService.remove(vaccinService.find(id));
} catch (ServiceException e) {
e.printStackTrace();
}
return listVaccin();
}
@RequestMapping(value="update.do", method=GET)
public ModelAndView initUpdateVaccin(Integer id) {
try {
VaccinDTO vaccinDTO = new VaccinDTO(vaccinService.find(id));
vaccinDTO.setAnimals(animalService.findAll());
return new ModelAndView("edit-vaccin", "vaccinDTO", vaccinDTO);
} catch (ServiceException e) {
e.printStackTrace();
}
return null;
}
@RequestMapping(value="update.do", method=POST)
public ModelAndView updateVaccin(VaccinDTO vaccinDTO, BindingResult result) {
if(!result.hasErrors())
{
try {
vaccinService.save(vaccinDTO.newVaccin());
} catch (ServiceException e) {
e.printStackTrace();
}
return listVaccin();
}
else
return new ModelAndView("edit-vaccin", "vaccinDTO", vaccinDTO);
}
}
|
[
"jsdumas@free.fr"
] |
jsdumas@free.fr
|
c068866118431f3189a2937d399ebbfb87ad5b2c
|
6853baa915a04feb55a8eff3786ff78c1764fd36
|
/shoebox/app/src/main/java/com/hb/hkm/hypebeaststore/datamodel/autogson/AutoGson.java
|
39874716ab52ec862a317f08363a1604fef0cd70
|
[
"MIT"
] |
permissive
|
HKMOpen/SogoShoesBoxes
|
cb097cf425527f4eb311f5ee191b6b19663994b1
|
67a38ae913d340f4613315f7bff73228d37d2c2f
|
refs/heads/master
| 2020-05-15T02:20:37.114378
| 2015-04-09T03:46:24
| 2015-04-09T03:46:24
| 33,644,871
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 843
|
java
|
package com.hb.hkm.hypebeaststore.datamodel.autogson;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Marks an {@link AutoValue @AutoValue}-annotated type for proper Gson serialization.
* <p/>
* This annotation is needed because the {@linkplain Retention retention} of {@code @AutoValue}
* does not allow reflection at runtime.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface AutoGson {
// A reference to the AutoValue-generated class (e.g. AutoValue_MyClass). This is
// necessary to handle obfuscation of the class names.
public Class autoValueClass();
}
|
[
"jobhesk@gmail.com"
] |
jobhesk@gmail.com
|
d111646c24107daf4b4c5834f522fe6ac42a0daa
|
f009dc33f9624aac592cb66c71a461270f932ffa
|
/src/main/java/com/alipay/api/domain/AlipayUserNewbenefitModifyModel.java
|
c4ff63359fef9bf8ba75b38349d1f11c64eb0f16
|
[
"Apache-2.0"
] |
permissive
|
1093445609/alipay-sdk-java-all
|
d685f635af9ac587bb8288def54d94e399412542
|
6bb77665389ba27f47d71cb7fa747109fe713f04
|
refs/heads/master
| 2021-04-02T16:49:18.593902
| 2020-03-06T03:04:53
| 2020-03-06T03:04:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,308
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 蚂蚁会员V3权益修改接口
*
* @author auto create
* @since 1.0, 2017-06-15 15:43:39
*/
public class AlipayUserNewbenefitModifyModel extends AlipayObject {
private static final long serialVersionUID = 8832549714837172672L;
/**
* 权益关联的专区码 ,需要联系蚂蚁会员平台的业务负责人进行专区码分配
*/
@ApiField("area_code")
private String areaCode;
/**
* 权益Id,用于定位需要编辑的权益,通过权益创建接口获取得到,调用创建接口后,将权益Id妥善存储,编辑时传入
*/
@ApiField("benefit_id")
private Long benefitId;
/**
* 权益的名称,由商户自行定义
*/
@ApiField("benefit_name")
private String benefitName;
/**
* 权益的副标题,用于补充描述权益
*/
@ApiField("benefit_sub_title")
private String benefitSubTitle;
/**
* 权益详情描述
*/
@ApiField("description")
private String description;
/**
* 当权益为非差异化时,该字段生效,用于控制允许兑换权益的等级
*/
@ApiField("eligible_grade_desc")
private String eligibleGradeDesc;
/**
* 权益展示结束时间,使用Date.getTime()。结束时间必须大于起始时间。
*/
@ApiField("end_dt")
private Long endDt;
/**
* 兑换规则以及不满足该规则后给用户的提示文案,规则id和文案用:分隔;可配置多个,多个之间用,分隔。(分隔符皆是英文半角字符)规则id联系蚂蚁会员pd或运营提供
*/
@ApiField("exchange_rule_ids")
private String exchangeRuleIds;
/**
* 权益等级配置
*/
@ApiListField("grade_config")
@ApiField("benefit_grade_config")
private List<BenefitGradeConfig> gradeConfig;
/**
* 权益展示时的图标地址,由商户上传图片到合适的存储平台,然后将图片的地址传入
*/
@ApiField("icon_url")
private String iconUrl;
/**
* 需要被移除的等级配置
*/
@ApiField("remove_grades")
private String removeGrades;
/**
* 权益展示的起始时间戳,使用Date.getTime()获得
*/
@ApiField("start_dt")
private Long startDt;
public String getAreaCode() {
return this.areaCode;
}
public void setAreaCode(String areaCode) {
this.areaCode = areaCode;
}
public Long getBenefitId() {
return this.benefitId;
}
public void setBenefitId(Long benefitId) {
this.benefitId = benefitId;
}
public String getBenefitName() {
return this.benefitName;
}
public void setBenefitName(String benefitName) {
this.benefitName = benefitName;
}
public String getBenefitSubTitle() {
return this.benefitSubTitle;
}
public void setBenefitSubTitle(String benefitSubTitle) {
this.benefitSubTitle = benefitSubTitle;
}
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
public String getEligibleGradeDesc() {
return this.eligibleGradeDesc;
}
public void setEligibleGradeDesc(String eligibleGradeDesc) {
this.eligibleGradeDesc = eligibleGradeDesc;
}
public Long getEndDt() {
return this.endDt;
}
public void setEndDt(Long endDt) {
this.endDt = endDt;
}
public String getExchangeRuleIds() {
return this.exchangeRuleIds;
}
public void setExchangeRuleIds(String exchangeRuleIds) {
this.exchangeRuleIds = exchangeRuleIds;
}
public List<BenefitGradeConfig> getGradeConfig() {
return this.gradeConfig;
}
public void setGradeConfig(List<BenefitGradeConfig> gradeConfig) {
this.gradeConfig = gradeConfig;
}
public String getIconUrl() {
return this.iconUrl;
}
public void setIconUrl(String iconUrl) {
this.iconUrl = iconUrl;
}
public String getRemoveGrades() {
return this.removeGrades;
}
public void setRemoveGrades(String removeGrades) {
this.removeGrades = removeGrades;
}
public Long getStartDt() {
return this.startDt;
}
public void setStartDt(Long startDt) {
this.startDt = startDt;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
d391a5a37a5a093694ff004251dbedc02df77133
|
f2b3f0970d1b8c52a9cec82be4107ffe1f33a8a2
|
/lei20_21_s4_2dk_03/base.core/src/main/java/eapli/base/pedido/domain/RespostaFormularioPreenchido.java
|
577faa22de66ff8ff3684bcb9b7b037899209739
|
[
"MIT"
] |
permissive
|
antoniodanielbf-isep/LAPR4-2021
|
b98ed96809e4726957ede0904b4265825a1083c6
|
f665064e65cc4f917514c10950af833f053c9b3b
|
refs/heads/main
| 2023-05-31T14:29:45.364395
| 2021-06-20T17:55:26
| 2021-06-20T17:55:26
| 378,706,704
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,911
|
java
|
package eapli.base.pedido.domain;
import eapli.framework.domain.model.ValueObject;
import eapli.framework.strings.util.StringPredicates;
import javax.persistence.Embeddable;
/**
* The type Resposta formulario preenchido.
*/
@Embeddable
public class RespostaFormularioPreenchido implements ValueObject, Comparable<RespostaFormularioPreenchido> {
private static final long serialVersionUID = 1L;
private String respostaFormularioPreenchido;
/**
* Instantiates a new Resposta formulario preenchido.
*/
protected RespostaFormularioPreenchido() {
// for ORM
}
/**
* Instantiates a new Resposta formulario preenchido.
*
* @param respostaFormularioPreenchido the resposta formulario preenchido
*/
public RespostaFormularioPreenchido(final String respostaFormularioPreenchido) {
if (StringPredicates.isNullOrEmpty(respostaFormularioPreenchido)) {
throw new IllegalArgumentException("A resposta não pode ter valor null e deve ser preenchido.");
}
this.respostaFormularioPreenchido = respostaFormularioPreenchido;
}
@Override
public boolean equals(final Object o) {
if (this == o) {
return true;
}
if (!(o instanceof RespostaFormularioPreenchido)) {
return false;
}
final RespostaFormularioPreenchido that = (RespostaFormularioPreenchido) o;
return this.respostaFormularioPreenchido.equals(that.respostaFormularioPreenchido);
}
@Override
public int hashCode() {
return this.respostaFormularioPreenchido.hashCode();
}
@Override
public int compareTo(final RespostaFormularioPreenchido arg0) {
return respostaFormularioPreenchido.compareTo(arg0.respostaFormularioPreenchido);
}
@Override
public String toString() {
return this.respostaFormularioPreenchido;
}
}
|
[
"1190402@isep.ipp.pt"
] |
1190402@isep.ipp.pt
|
80f8d948ee10817aa873097083114c6437abb366
|
dbf5adca095d04d7d069ecaa916e883bc1e5c73d
|
/x_crm_core_entity/src/main/java/com/x/crm/core/entity/CrmRegion_.java
|
bb592a976b78c467e73f609d295f52c9f03e0c18
|
[
"BSD-3-Clause"
] |
permissive
|
fancylou/o2oa
|
713529a9d383de5d322d1b99073453dac79a9353
|
e7ec39fc586fab3d38b62415ed06448e6a9d6e26
|
refs/heads/master
| 2020-03-25T00:07:41.775230
| 2018-08-02T01:40:40
| 2018-08-02T01:40:40
| 143,169,936
| 0
| 0
|
BSD-3-Clause
| 2018-08-01T14:49:45
| 2018-08-01T14:49:44
| null |
UTF-8
|
Java
| false
| false
| 1,600
|
java
|
/**
* Generated by OpenJPA MetaModel Generator Tool.
**/
package com.x.crm.core.entity;
import com.x.base.core.entity.SliceJpaObject_;
import java.lang.String;
import java.util.Date;
import javax.persistence.metamodel.SingularAttribute;
@javax.persistence.metamodel.StaticMetamodel
(value=com.x.crm.core.entity.CrmRegion.class)
@javax.annotation.Generated
(value="org.apache.openjpa.persistence.meta.AnnotationProcessor6",date="Tue May 09 17:17:31 CST 2017")
public class CrmRegion_ extends SliceJpaObject_ {
public static volatile SingularAttribute<CrmRegion,String> citycode;
public static volatile SingularAttribute<CrmRegion,String> cityid;
public static volatile SingularAttribute<CrmRegion,String> cityname;
public static volatile SingularAttribute<CrmRegion,String> citypinyin;
public static volatile SingularAttribute<CrmRegion,Date> createTime;
public static volatile SingularAttribute<CrmRegion,String> id;
public static volatile SingularAttribute<CrmRegion,String> lat;
public static volatile SingularAttribute<CrmRegion,String> leveltype;
public static volatile SingularAttribute<CrmRegion,String> lng;
public static volatile SingularAttribute<CrmRegion,String> mergername;
public static volatile SingularAttribute<CrmRegion,String> parentid;
public static volatile SingularAttribute<CrmRegion,String> sequence;
public static volatile SingularAttribute<CrmRegion,String> shortname;
public static volatile SingularAttribute<CrmRegion,Date> updateTime;
public static volatile SingularAttribute<CrmRegion,String> zipcode;
}
|
[
"caixiangyi2004@126.com"
] |
caixiangyi2004@126.com
|
083027318b250406ed9c6c2f130b4c99342a17e4
|
350ca0471d643d7b4af3d576506cfa66db4ae138
|
/app/src/main/java/com/autoever/apay_user_app/ui/payment/confirm/PriceConfirmFragment.java
|
f97806e416a9fe982aba81b6f2675ef712042667
|
[] |
no_license
|
myhency/apay-user-app-mvvm
|
4b057e5a4a6c218e045f70dd3bff13fd056f1b0d
|
ac92b388ef2196658e7aa60e53f082ae633e31c3
|
refs/heads/master
| 2022-12-11T17:00:00.098757
| 2020-09-20T02:02:47
| 2020-09-20T02:02:47
| 278,596,429
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,886
|
java
|
package com.autoever.apay_user_app.ui.payment.confirm;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.lifecycle.ViewModelProviders;
import com.autoever.apay_user_app.BR;
import com.autoever.apay_user_app.R;
import com.autoever.apay_user_app.ViewModelProviderFactory;
import com.autoever.apay_user_app.databinding.FragmentPriceConfirmBinding;
import com.autoever.apay_user_app.ui.base.BaseFragment;
import com.autoever.apay_user_app.ui.payment.PaymentNavigator;
import com.autoever.apay_user_app.ui.payment.PaymentViewModel;
import com.autoever.apay_user_app.utils.CommonUtils;
import java.util.Date;
import javax.inject.Inject;
public class PriceConfirmFragment extends BaseFragment<FragmentPriceConfirmBinding, PaymentViewModel> implements PaymentNavigator {
public static final String TAG = PriceConfirmFragment.class.getSimpleName();
private FragmentPriceConfirmBinding mFragmentPriceConfirmBinding;
@Inject
ViewModelProviderFactory factory;
private PaymentViewModel mPriceConfirmViewModel;
public static PriceConfirmFragment newInstance(String shopName, int price) {
Bundle args = new Bundle();
args.putString("shopName", shopName);
args.putInt("price", price);
PriceConfirmFragment fragment = new PriceConfirmFragment();
fragment.setArguments(args);
return fragment;
}
@Override
public int getBindingVariable() {
return BR.viewModel;
}
@Override
public int getLayoutId() {
return R.layout.fragment_price_confirm;
}
@Override
public PaymentViewModel getViewModel() {
mPriceConfirmViewModel = ViewModelProviders.of(this, factory).get(PaymentViewModel.class);
return mPriceConfirmViewModel;
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mFragmentPriceConfirmBinding = getViewDataBinding();
setup();
}
private void setup() {
//사용자가 입력한 가격을 출력.
mFragmentPriceConfirmBinding.purchaseAmount.setText(
CommonUtils.formatToKRW(String.valueOf(getArguments().getInt("price"))) + " P"
);
//확인버튼 명 변경
mFragmentPriceConfirmBinding.finishTextview.setText(CommonUtils.formatToKRW(String.valueOf(getArguments().getInt("price"))) + "P 결제");
//가맹점 명을 출력.
mFragmentPriceConfirmBinding.shopName.setText(
getArguments().getString("shopName")
);
mFragmentPriceConfirmBinding.finishTextview.setOnClickListener(v -> goNext());
}
@Override
public void handleError(Throwable throwable) {
}
@Override
public void openCustomScannerActivity() {
}
@Override
public void showPriceFragment(String shopCode) {
}
@Override
public void showPriceConfirmFragment(String shopCode, int price) {
}
@Override
public void openAuthFragment() {
}
@Override
public void showReceiptFragment(String storeName, Date createdDate, int amount, int userBalance) {
}
@Override
public void doPaymentReady() {
}
@Override
public void doPaymentDo(String userId, String storeId, String tokenSystemId, int amount, String paymentId, String identifier) {
}
@Override
public void goNext() {
Log.d("debug", "Price confirmed, 현금영수증 신청 confirmed");
getBaseActivity().onFragmentDetached(TAG);
}
@Override
public void getQrUserDynamicData(String parsedQrString) {
}
}
|
[
"hency.yeo@gmail.com"
] |
hency.yeo@gmail.com
|
aaa135fc29855323b3ab8cd9a1607d0c63b5a7fb
|
f0721cfa623b8a2a4cf47e922545e509aadf0f83
|
/src/com/bernard/beaconportal/activities/mail/Store.java
|
26b8634b67f98a4e107e6744e7450d8fe821af51
|
[
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
theduffster/beacon_portal_android
|
592e83a9f0a4f7a059dee3fc8a690867c1136d4f
|
18ddded76b78e619a5cb2fbe5bd47f20ba9d241c
|
refs/heads/master
| 2022-12-29T15:21:34.864417
| 2020-10-21T07:35:12
| 2020-10-21T07:35:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,484
|
java
|
package com.bernard.beaconportal.activities.mail;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import android.app.Application;
import android.content.Context;
import android.util.Log;
import com.bernard.beaconportal.activities.Account;
import com.bernard.beaconportal.activities.MAIL;
import com.bernard.beaconportal.activities.mail.store.ImapStore;
import com.bernard.beaconportal.activities.mail.store.LocalStore;
import com.bernard.beaconportal.activities.mail.store.Pop3Store;
import com.bernard.beaconportal.activities.mail.store.StorageManager.StorageProvider;
import com.bernard.beaconportal.activities.mail.store.UnavailableStorageException;
import com.bernard.beaconportal.activities.mail.store.WebDavStore;
/**
* Store is the access point for an email message store. It's location can be
* local or remote and no specific protocol is defined. Store is intended to
* loosely model in combination the JavaMail classes javax.mail.Store and
* javax.mail.Folder along with some additional functionality to improve
* performance on mobile devices. Implementations of this class should focus on
* making as few network connections as possible.
*/
public abstract class Store {
protected static final int SOCKET_CONNECT_TIMEOUT = 30000;
protected static final int SOCKET_READ_TIMEOUT = 60000;
/**
* Remote stores indexed by Uri.
*/
private static HashMap<String, Store> sStores = new HashMap<String, Store>();
/**
* Local stores indexed by UUID because the Uri may change due to migration
* to/from SD-card.
*/
private static ConcurrentHashMap<String, Store> sLocalStores = new ConcurrentHashMap<String, Store>();
/**
* Lock objects indexed by account UUID.
*
* @see #getLocalInstance(Account, Application)
*/
private static ConcurrentHashMap<String, Object> sAccountLocks = new ConcurrentHashMap<String, Object>();
/**
* Get an instance of a remote mail store.
*/
public synchronized static Store getRemoteInstance(Account account)
throws MessagingException {
String uri = account.getStoreUri();
if (uri.startsWith("local")) {
throw new RuntimeException(
"Asked to get non-local Store object but given LocalStore URI");
}
Store store = sStores.get(uri);
if (store == null) {
if (uri.startsWith("imap")) {
store = new ImapStore(account);
} else if (uri.startsWith("pop3")) {
store = new Pop3Store(account);
} else if (uri.startsWith("webdav")) {
store = new WebDavStore(account);
}
if (store != null) {
sStores.put(uri, store);
}
}
if (store == null) {
throw new MessagingException(
"Unable to locate an applicable Store for " + uri);
}
return store;
}
/**
* Get an instance of a local mail store.
*
* @throws UnavailableStorageException
* if not {@link StorageProvider#isReady(Context)}
*/
public static LocalStore getLocalInstance(Account account,
Application application) throws MessagingException {
String accountUuid = account.getUuid();
// Create new per-account lock object if necessary
sAccountLocks.putIfAbsent(accountUuid, new Object());
// Get the account's lock object
Object lock = sAccountLocks.get(accountUuid);
// Use per-account locks so DatabaseUpgradeService always knows which
// account database is
// currently upgraded.
synchronized (lock) {
Store store = sLocalStores.get(accountUuid);
if (store == null) {
// Creating a LocalStore instance will create or upgrade the
// database if
// necessary. This could take some time.
store = new LocalStore(account, application);
sLocalStores.put(accountUuid, store);
}
return (LocalStore) store;
}
}
public static void removeAccount(Account account) {
try {
removeRemoteInstance(account);
} catch (Exception e) {
Log.e(MAIL.LOG_TAG, "Failed to reset remote store for account "
+ account.getUuid(), e);
}
try {
removeLocalInstance(account);
} catch (Exception e) {
Log.e(MAIL.LOG_TAG, "Failed to reset local store for account "
+ account.getUuid(), e);
}
}
/**
* Release reference to a local mail store instance.
*
* @param account
* {@link Account} instance that is used to get the local mail
* store instance.
*/
private static void removeLocalInstance(Account account) {
String accountUuid = account.getUuid();
sLocalStores.remove(accountUuid);
}
/**
* Release reference to a remote mail store instance.
*
* @param account
* {@link Account} instance that is used to get the remote mail
* store instance.
*/
private synchronized static void removeRemoteInstance(Account account) {
String uri = account.getStoreUri();
if (uri.startsWith("local")) {
throw new RuntimeException(
"Asked to get non-local Store object but given "
+ "LocalStore URI");
}
sStores.remove(uri);
}
/**
* Decodes the contents of store-specific URIs and puts them into a
* {@link ServerSettings} object.
*
* @param uri
* the store-specific URI to decode
*
* @return A {@link ServerSettings} object holding the settings contained in
* the URI.
*
* @see ImapStore#decodeUri(String)
* @see Pop3Store#decodeUri(String)
* @see WebDavStore#decodeUri(String)
*/
public static ServerSettings decodeStoreUri(String uri) {
if (uri.startsWith("imap")) {
return ImapStore.decodeUri(uri);
} else if (uri.startsWith("pop3")) {
return Pop3Store.decodeUri(uri);
} else if (uri.startsWith("webdav")) {
return WebDavStore.decodeUri(uri);
} else {
throw new IllegalArgumentException("Not a valid store URI");
}
}
/**
* Creates a store URI from the information supplied in the
* {@link ServerSettings} object.
*
* @param server
* The {@link ServerSettings} object that holds the server
* settings.
*
* @return A store URI that holds the same information as the {@code server}
* parameter.
*
* @see ImapStore#createUri(ServerSettings)
* @see Pop3Store#createUri(ServerSettings)
* @see WebDavStore#createUri(ServerSettings)
*/
public static String createStoreUri(ServerSettings server) {
if (ImapStore.STORE_TYPE.equals(server.type)) {
return ImapStore.createUri(server);
} else if (Pop3Store.STORE_TYPE.equals(server.type)) {
return Pop3Store.createUri(server);
} else if (WebDavStore.STORE_TYPE.equals(server.type)) {
return WebDavStore.createUri(server);
} else {
throw new IllegalArgumentException("Not a valid store URI");
}
}
protected final Account mAccount;
protected Store(Account account) {
mAccount = account;
}
public abstract Folder getFolder(String name);
public abstract List<? extends Folder> getPersonalNamespaces(
boolean forceListAll) throws MessagingException;
public abstract void checkSettings() throws MessagingException;
public boolean isCopyCapable() {
return false;
}
public boolean isMoveCapable() {
return false;
}
public boolean isPushCapable() {
return false;
}
public boolean isSendCapable() {
return false;
}
public boolean isExpungeCapable() {
return false;
}
public boolean isSeenFlagSupported() {
return true;
}
public void sendMessages(Message[] messages) throws MessagingException {
}
public Pusher getPusher(PushReceiver receiver) {
return null;
}
public Account getAccount() {
return mAccount;
}
}
|
[
"lincolnbernard7@gmail.com"
] |
lincolnbernard7@gmail.com
|
50284ec51b648dbd6767e1544fc803c6f3beed9f
|
0efd81befd1445937adf7ad76ea9b0f32b5f625d
|
/.history/Random/DijkstraAlgorithm_20210317161827.java
|
f1510d376cea8eb1e4691dc37a4f83aa1605f349
|
[] |
no_license
|
Aman-kulshreshtha/100DaysOfCode
|
1a080eb36a65c50b7e18db7c4eac508c3f51e2c4
|
be4cb2fd80cfe5b7e2996eed0a35ad7f390813c1
|
refs/heads/main
| 2023-03-23T07:11:26.924928
| 2021-03-21T16:16:46
| 2021-03-21T16:16:46
| 346,999,930
| 0
| 0
| null | 2021-03-12T09:41:46
| 2021-03-12T08:49:46
| null |
UTF-8
|
Java
| false
| false
| 690
|
java
|
import java.util.*;
import java.io.*;
import java.lang.*;
public class DijkstraAlgorithm {
public static void main(String[] args) {
}
public static void dijkstra(int[][] graph) {
boolean[] visited = new boolean[graph.length];
var distance = new HashMap<Integer, Integer>();
for(int i = 0 ; i < graph.length ; i++) {
distance.put(i, Integer.MAX_VALUE);
}
int vertex = minimum(visited,graph,distance);
var notVi
while()
}
private static int minimum(boolean[] visited, int[][] graph, HashMap<Integer, Integer> distance) {
return 0;
}
}
|
[
"aman21102000@gmail.com"
] |
aman21102000@gmail.com
|
406939b186958e28bb329410c390818dddd4b647
|
0c98cf3f64a72ceb4987f23936979d587183e269
|
/services/waf/src/main/java/com/huaweicloud/sdk/waf/v1/model/CreateValueListRequestBody.java
|
6d1e296e8474b4578d9480536311632cdf153ea2
|
[
"Apache-2.0"
] |
permissive
|
cwray01/huaweicloud-sdk-java-v3
|
765d08e4b6dfcd88c2654bdbf5eb2dd9db19f2ef
|
01b5a3b4ea96f8770a2eaa882b244930e5fd03e7
|
refs/heads/master
| 2023-07-17T10:31:20.119625
| 2021-08-31T11:38:37
| 2021-08-31T11:38:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,827
|
java
|
package com.huaweicloud.sdk.waf.v1.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Consumer;
/** 创建或更新引用表 */
public class CreateValueListRequestBody {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "name")
private String name;
/** 引用表类型,参见枚举列表 */
public static final class TypeEnum {
/** Enum URL for value: "url" */
public static final TypeEnum URL = new TypeEnum("url");
/** Enum PARAMS for value: "params" */
public static final TypeEnum PARAMS = new TypeEnum("params");
/** Enum IP for value: "ip" */
public static final TypeEnum IP = new TypeEnum("ip");
/** Enum COOKIE for value: "cookie" */
public static final TypeEnum COOKIE = new TypeEnum("cookie");
/** Enum REFERER for value: "referer" */
public static final TypeEnum REFERER = new TypeEnum("referer");
/** Enum USER_AGENT for value: "user-agent" */
public static final TypeEnum USER_AGENT = new TypeEnum("user-agent");
/** Enum HEADER for value: "header" */
public static final TypeEnum HEADER = new TypeEnum("header");
/** Enum RESPONSE_CODE for value: "response_code" */
public static final TypeEnum RESPONSE_CODE = new TypeEnum("response_code");
/** Enum RESPONSE_HEADER for value: "response_header" */
public static final TypeEnum RESPONSE_HEADER = new TypeEnum("response_header");
/** Enum RESOPNSE_BODY for value: "resopnse_body" */
public static final TypeEnum RESOPNSE_BODY = new TypeEnum("resopnse_body");
private static final Map<String, TypeEnum> STATIC_FIELDS = createStaticFields();
private static Map<String, TypeEnum> createStaticFields() {
Map<String, TypeEnum> map = new HashMap<>();
map.put("url", URL);
map.put("params", PARAMS);
map.put("ip", IP);
map.put("cookie", COOKIE);
map.put("referer", REFERER);
map.put("user-agent", USER_AGENT);
map.put("header", HEADER);
map.put("response_code", RESPONSE_CODE);
map.put("response_header", RESPONSE_HEADER);
map.put("resopnse_body", RESOPNSE_BODY);
return Collections.unmodifiableMap(map);
}
private String value;
TypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TypeEnum fromValue(String value) {
if (value == null) {
return null;
}
TypeEnum result = STATIC_FIELDS.get(value);
if (result == null) {
result = new TypeEnum(value);
}
return result;
}
public static TypeEnum valueOf(String value) {
if (value == null) {
return null;
}
TypeEnum result = STATIC_FIELDS.get(value);
if (result != null) {
return result;
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
@Override
public boolean equals(Object obj) {
if (obj instanceof TypeEnum) {
return this.value.equals(((TypeEnum) obj).value);
}
return false;
}
@Override
public int hashCode() {
return this.value.hashCode();
}
}
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "type")
private TypeEnum type;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "values")
private List<String> values = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "description")
private String description;
public CreateValueListRequestBody withName(String name) {
this.name = name;
return this;
}
/** 引用表名称,2-32位字符串组成
*
* @return name */
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public CreateValueListRequestBody withType(TypeEnum type) {
this.type = type;
return this;
}
/** 引用表类型,参见枚举列表
*
* @return type */
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
public CreateValueListRequestBody withValues(List<String> values) {
this.values = values;
return this;
}
public CreateValueListRequestBody addValuesItem(String valuesItem) {
if (this.values == null) {
this.values = new ArrayList<>();
}
this.values.add(valuesItem);
return this;
}
public CreateValueListRequestBody withValues(Consumer<List<String>> valuesSetter) {
if (this.values == null) {
this.values = new ArrayList<>();
}
valuesSetter.accept(this.values);
return this;
}
/** 引用表的值
*
* @return values */
public List<String> getValues() {
return values;
}
public void setValues(List<String> values) {
this.values = values;
}
public CreateValueListRequestBody withDescription(String description) {
this.description = description;
return this;
}
/** 引用表描述,最长128字符
*
* @return description */
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CreateValueListRequestBody createValueListRequestBody = (CreateValueListRequestBody) o;
return Objects.equals(this.name, createValueListRequestBody.name)
&& Objects.equals(this.type, createValueListRequestBody.type)
&& Objects.equals(this.values, createValueListRequestBody.values)
&& Objects.equals(this.description, createValueListRequestBody.description);
}
@Override
public int hashCode() {
return Objects.hash(name, type, values, description);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateValueListRequestBody {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" values: ").append(toIndentedString(values)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append("}");
return sb.toString();
}
/** Convert the given object to string with each line indented by 4 spaces (except the first line). */
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
9f25a713987391cb040475f85f3308b66caa562f
|
a9021e8de28ed08b31ac70a44e2c7e28917ed85e
|
/app/src/main/java/com/example/root/weatherforcasting/settings/SettingsPresenter.java
|
9a648089376fc30ad61b19ee104ffa977a8671b5
|
[] |
no_license
|
Alnour/Simple-Weather-Forecasting-App
|
df96e38eb4f8259556c39f96351be2d3f7a2c328
|
97e4b16d61dc2ac8143d0d20a97e5abb9b49c16d
|
refs/heads/master
| 2021-06-29T12:36:20.105011
| 2017-09-11T12:13:08
| 2017-09-11T12:13:08
| 103,131,158
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,290
|
java
|
package com.example.root.weatherforcasting.settings;
import com.example.root.weatherforcasting.data.Preferences;
import com.example.root.weatherforcasting.data.db.CountriesDataBase;
import com.example.root.weatherforcasting.models.api_models.City;
import com.example.root.weatherforcasting.models.api_models.Country;
/**
* Created by root on 24/06/17.
*/
public class SettingsPresenter implements SettingsContractor.Presenter {
private final SettingsContractor.View view;
public SettingsPresenter(SettingsContractor.View view) {
this.view = view;
}
@Override
public void getCountries() {
CountriesDataBase countriesDataBase = new CountriesDataBase(view.getContext());
view.showCountries(countriesDataBase.getCountries());
}
@Override
public void getCountriesCities(Country country) {
CountriesDataBase countriesDataBase = new CountriesDataBase(view.getContext());
view.showCities(countriesDataBase.getCities(country.getId()));
}
@Override
public void saveChosenCity(City chosenCity) {
Preferences.getInstance(view.getContext()).clearCach();
Preferences.getInstance(view.getContext()).saveItem(chosenCity, City.class, Preferences.CHOSEN_CITY);
view.goToMainPage();
}
}
|
[
"you@example.com"
] |
you@example.com
|
b661fdf9780f0bac6bdcb6353c90a8a58cfeaa10
|
58afe8815f26dd6d9703d1cd9131fc7a4bdba09a
|
/predavanja/primeri-java/src/rs/math/oop1/z070402/pozivMetoda/z05/geometrijaPreopterecenje/Tacka.java
|
d5041cbcbd559216eb66079fa5c0d407c38bafbd
|
[
"MIT"
] |
permissive
|
MatfOOP/OOP
|
098213709417006ccb13519eea7208d9e6f32900
|
98eea2bb90c23973ad80c56dfcba42eaf1757b71
|
refs/heads/master
| 2023-07-07T01:34:49.955311
| 2023-06-30T17:13:48
| 2023-06-30T17:13:48
| 138,500,698
| 7
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 525
|
java
|
package rs.math.oop1.z070402.pozivMetoda.z05.geometrijaPreopterecenje;
class Tacka {
double x;
double y;
String oznaka;
void init(String o, double xKoord, double yKoord) {
oznaka = o;
x = xKoord;
y = yKoord;
}
void prikaziSe() {
System.out.print(oznaka + "(" + x + "," + y + ")");
}
void prikaziSe(boolean bezOznake) {
if (!bezOznake)
System.out.print(oznaka + "(" + x + "," + y + ")");
else
System.out.print("(" + x + "," + y + ")");
}
}
|
[
"vladofilipovic@hotmail.com"
] |
vladofilipovic@hotmail.com
|
d419438536b1766d60cd4f4344d691aa93c85e83
|
e0d7047ad28fe622c5f3606aaaaf08ec5444e1f6
|
/spring-bussiness/spring-aop/spring-aop-accesslimit/src/main/java/com/hz/learnspring/limit/handle/ExceptionHandle.java
|
9c43f0e872d02014a20a0989b65967ec595fb3b7
|
[
"MIT"
] |
permissive
|
horacn/spring-examples
|
2bb6fc48cd9c3851bf49096954cb1794d7ba9a0b
|
3be5c00485b16727894fe15b59d613bbce3036a1
|
refs/heads/master
| 2021-10-10T20:02:01.749126
| 2019-01-16T13:40:36
| 2019-01-16T13:40:36
| 158,637,596
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,242
|
java
|
package com.hz.learnspring.limit.handle;
import com.hz.learnspring.limit.exception.RequestLimitException;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.servlet.ModelAndView;
/**
* 统一异常处理类<br>
* 捕获程序所有异常,针对不同异常,采取不同的处理方式
*
* @author hezhao
* @date 2018年6月7日 下午4:55:59
*/
@ControllerAdvice
@ResponseBody
public class ExceptionHandle {
/**
* <strong>@ExceptionHandler</strong>指定需要捕获的异常类型<br>
* <strong>@ResponseStatus</strong>指定Http响应状态码:500<br>
* 捕获抛出的所有RequestLimitException异常
*/
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
@ExceptionHandler(RequestLimitException.class)
public ModelAndView handleBadRequestException(RequestLimitException ex) {
// 返回自定义错误页面
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("request_limit");
return modelAndView;
}
}
|
[
"1439293823@qq.com"
] |
1439293823@qq.com
|
f3ff91908337f4c912ce96c4dc37e945ef82a724
|
d383d855e48ee2f5da65791f4052533eca339369
|
/src/test/java/com/alibaba/druid/benckmark/proxy/sqlcase/SelectNow.java
|
22f04b422fbea7de3ea77709ee6d819513bbb63b
|
[
"Apache-2.0"
] |
permissive
|
liuxing7954/druid-source
|
0e2dc0b1a2f498045b8689d6431764f4f4525070
|
fc27b5ac4695dc42e1daa62db012adda7c217d36
|
refs/heads/master
| 2022-12-21T14:53:26.923986
| 2020-02-29T07:15:15
| 2020-02-29T07:15:15
| 243,908,145
| 1
| 1
|
NOASSERTION
| 2022-12-16T09:54:44
| 2020-02-29T05:07:04
|
Java
|
UTF-8
|
Java
| false
| false
| 1,812
|
java
|
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* 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.alibaba.druid.benckmark.proxy.sqlcase;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.Date;
import org.junit.Assert;
import com.alibaba.druid.benckmark.proxy.BenchmarkCase;
import com.alibaba.druid.benckmark.proxy.SQLExecutor;
public class SelectNow extends BenchmarkCase {
private String sql;
private Connection conn;
public SelectNow(){
super("SelectNow");
sql = "SELECT NOW()";
}
@Override
public void setUp(SQLExecutor sqlExec) throws Exception {
conn = sqlExec.getConnection();
}
@Override
public void execute(SQLExecutor sqlExec) throws Exception {
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(sql);
int rowCount = 0;
Date now = null;
while (rs.next()) {
now = rs.getTimestamp(1);
rowCount++;
}
Assert.assertNotNull(now);
Assert.assertEquals(1, rowCount);
rs.close();
stmt.close();
}
@Override
public void tearDown(SQLExecutor sqlExec) throws Exception {
conn.close();
conn = null;
}
}
|
[
"jixiaoyi@apexsoft.com.cn"
] |
jixiaoyi@apexsoft.com.cn
|
615ddc1d68ab9b550fedee6502802491ddbcbbab
|
028cbe18b4e5c347f664c592cbc7f56729b74060
|
/v2/tools/src/java/com/sun/enterprise/tools/common/validation/util/ObjectFactory.java
|
3836bb3a5df39d29e93f32c00586635b6d4b1967
|
[] |
no_license
|
dmatej/Glassfish-SVN-Patched
|
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
|
269e29ba90db6d9c38271f7acd2affcacf2416f1
|
refs/heads/master
| 2021-05-28T12:55:06.267463
| 2014-11-11T04:21:44
| 2014-11-11T04:21:44
| 23,610,469
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,734
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can obtain
* a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
* or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
* Sun designates this particular file as subject to the "Classpath" exception
* as provided by Sun in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the License
* Header, with the fields enclosed by brackets [] replaced by your own
* identifying information: "Portions Copyrighted [year]
* [name of copyright owner]"
*
* Contributor(s):
*
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
/*
* ObjectFactory.java August 19, 2003, 6:29 AM
*/
package com.sun.enterprise.tools.common.validation.util;
import java.lang.reflect.Constructor;
/**
* This class is a generic Factory that employes Java reflection to
* create Objects.
* @author Rajeshwar Patil
* @version %I%, %G%
*/
public class ObjectFactory {
/* A class implementation comment can go here. */
/** Create an instance of the class with the specified name by calling the
* no-argument constructor.
*/
public static Object newInstance(String className){
Utils utils = new Utils();
return utils.createObject(className);
}
/** Create an instance of the class with the specified name by calling the
* a constructor that takes an String.
*/
public static Object newInstance(String className, String argument){
Class classObject = null;
Utils utils = new Utils();
Class[] argumentTypes = new Class[] {String.class};
Constructor constructor =
utils.getConstructor(className, argumentTypes);
Object[] argumentValues = new Object[] {argument};
return utils.createObject(constructor, argumentValues);
}
/** Create an instance of the class with the specified name by calling the
* a constructor that takes an String.
*/
public static Object newInstance(String className, Object argument){
Class classObject = null;
Utils utils = new Utils();
Class[] argumentTypes = new Class[] {Object.class};
Constructor constructor =
utils.getConstructor(className, argumentTypes);
Object[] argumentValues = new Object[] {argument};
return utils.createObject(constructor, argumentValues);
}
}
|
[
"kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5"
] |
kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
|
6e0e2549d99ca917c55568a2dff71f3a4ed27c06
|
cc70f0eac152553f0744954a1c4da8af67faa5ab
|
/PPA/src/examples/AllCodeSnippets/class_880.java
|
fcfd5cfbf6aeb94498a06fdf3ed55988d96da4d4
|
[] |
no_license
|
islamazhar/Detecting-Insecure-Implementation-code-snippets
|
b49b418e637a2098027e6ce70c0ddf93bc31643b
|
af62bef28783c922a8627c62c700ef54028b3253
|
refs/heads/master
| 2023-02-01T10:48:31.815921
| 2020-12-11T00:21:40
| 2020-12-11T00:21:40
| 307,543,127
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,293
|
java
|
package examples.AllCodeSnippets;
// package com.trustit.trustme;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.Date;
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509TrustManager;
public class class_880 implements X509TrustManager
{
private X509TrustManager standardTrustManager = null;
/**
* Constructor for EasyX509TrustManager.
*/
public EasyX509TrustManager(KeyStore keystore) throws NoSuchAlgorithmException, KeyStoreException
{
super();
TrustManagerFactory factory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
factory.init(keystore);
TrustManager[] trustmanagers = factory.getTrustManagers();
if (trustmanagers.length == 0)
{
throw new NoSuchAlgorithmException("no trust manager found");
}
this.standardTrustManager = (X509TrustManager) trustmanagers[0];
}
/**
* @see javax.net.ssl.X509TrustManager#checkClientTrusted(X509Certificate[],String authType)
*/
public void checkClientTrusted(X509Certificate[] certificates, String authType) throws CertificateException
{
standardTrustManager.checkClientTrusted(certificates, authType);
}
/**
* @see javax.net.ssl.X509TrustManager#checkServerTrusted(X509Certificate[],String authType)
*/
public void checkServerTrusted(X509Certificate[] certificates, String authType) throws CertificateException
{
// Clean up the certificates chain and build a new one.
// Theoretically, we shouldn't have to do this, but various web servers
// in practice are mis-configured to have out-of-order certificates or
// expired self-issued root certificate.
int chainLength = certificates.length;
if (certificates.length > 1)
{
// 1. we clean the received certificates chain.
// We start from the end-entity certificate, tracing down by matching
// the "issuer" field and "subject" field until we can't continue.
// This helps when the certificates are out of order or
// some certificates are not related to the site.
int currIndex;
for (currIndex = 0; currIndex < certificates.length; ++currIndex)
{
boolean foundNext = false;
for (int nextIndex = currIndex + 1;
nextIndex < certificates.length;
++nextIndex)
{
if (certificates[currIndex].getIssuerDN().equals(
certificates[nextIndex].getSubjectDN()))
{
foundNext = true;
// Exchange certificates so that 0 through currIndex + 1 are in proper order
if (nextIndex != currIndex + 1)
{
X509Certificate tempCertificate = certificates[nextIndex];
certificates[nextIndex] = certificates[currIndex + 1];
certificates[currIndex + 1] = tempCertificate;
}
break;
}
}
if (!foundNext) break;
}
// 2. we exam if the last traced certificate is self issued and it is expired.
// If so, we drop it and pass the rest to checkServerTrusted(), hoping we might
// have a similar but unexpired trusted root.
chainLength = currIndex + 1;
X509Certificate lastCertificate = certificates[chainLength - 1];
Date now = new Date();
if (lastCertificate.getSubjectDN().equals(lastCertificate.getIssuerDN())
&& now.after(lastCertificate.getNotAfter()))
{
--chainLength;
}
}
standardTrustManager.checkServerTrusted(certificates, authType);
}
/**
* @see javax.net.ssl.X509TrustManager#getAcceptedIssuers()
*/
public X509Certificate[] getAcceptedIssuers()
{
return this.standardTrustManager.getAcceptedIssuers();
}
}
|
[
"mislam9@wisc.edu"
] |
mislam9@wisc.edu
|
611d31d9ec767a88c453f752c8559a0ae2bb2472
|
725252036d9ea34b58cd340623441065057314c9
|
/sharding/db2es-core/src/main/java/org/wyyt/sharding/db2es/core/entity/view/TopicVo.java
|
72ad0213461ba903b50b3083af9faecf13ec6cc5
|
[] |
no_license
|
ZhangNingPegasus/middleware
|
7fd7565cd2aac0fee026b5696c9b5021ab753119
|
46428f43c31523786c03f10ee00949f6bc13ce19
|
refs/heads/master
| 2023-06-26T17:55:57.485006
| 2021-08-01T03:10:29
| 2021-08-01T03:10:29
| 303,567,345
| 4
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 711
|
java
|
package org.wyyt.sharding.db2es.core.entity.view;
import lombok.Data;
import org.wyyt.sharding.db2es.core.entity.domain.TopicOffset;
/**
* the view entity of kafka's topic
* <p>
*
* @author Ning.Zhang(Pegasus)
* *****************************************************************
* Name Action Time Description *
* Ning.Zhang Initialize 02/14/2021 Initialize *
* *****************************************************************
*/
@Data
public final class TopicVo {
private String topicName;
private Boolean isActive;
private String errorMsg;
private Integer tps;
private TopicOffset topicOffset;
private String version;
}
|
[
"349409664@qq.com"
] |
349409664@qq.com
|
f43e20e948f9f9aef73c5f3ec4940b0d9a8fc13c
|
02ae91abffd7b902cb2de9deec92d8a05b94071c
|
/plugins/org.jkiss.dbeaver.ui.editors.data/src/org/jkiss/dbeaver/ui/data/IValueController.java
|
e95c09e6bc9715084071224afe38a79f62dac93c
|
[
"Apache-2.0",
"EPL-2.0"
] |
permissive
|
ass-a2s/dbeaver
|
c43367ad15c7230b235d0e38c4535631a1a6098b
|
1a22fe48c8955b16feb7fdd14e74c4bfbb8d9c2d
|
refs/heads/devel
| 2020-05-01T16:17:35.236759
| 2019-04-17T08:02:23
| 2019-04-17T08:02:23
| 177,568,601
| 1
| 0
|
Apache-2.0
| 2019-04-17T08:02:29
| 2019-03-25T10:57:13
|
Java
|
UTF-8
|
Java
| false
| false
| 3,400
|
java
|
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2019 Serge Rider (serge@jkiss.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.ui.data;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbenchPartSite;
import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.model.DBPMessageType;
import org.jkiss.dbeaver.model.data.DBDValueHandler;
import org.jkiss.dbeaver.model.exec.DBCExecutionContext;
import org.jkiss.dbeaver.model.struct.DBSTypedObject;
/**
* DBD Value Controller
*/
public interface IValueController
{
/**
* Value editor type
*/
enum EditType {
NONE, // Void editor, should be ignored by users
INLINE, // Inline editor, appears right in grid's cell
PANEL, // "Preview" editor, appears on a special grid panel.
// May be reused to edit different cells of the same type.
EDITOR // Separate editor, dialog or standalone editor window
}
/**
* Active execution context. Context lifetime is longer than value handler lifetime.
* @return execution context
*/
@NotNull
DBCExecutionContext getExecutionContext();
/**
* Value name (name of attribute or other metadata object)
* @return value name
*/
String getValueName();
/**
* Value type
* @return meta data
*/
DBSTypedObject getValueType();
/**
* Column value
* @return value
*/
@Nullable
Object getValue();
/**
* Updates value
* @param value value
* @param updatePresentation refresh UI
*/
void updateValue(@Nullable Object value, boolean updatePresentation);
/**
* Updates value in all selected cells
* @param value value
*/
void updateSelectionValue(@Nullable Object value);
/**
* Associated value handler
* @return value handler
*/
DBDValueHandler getValueHandler();
/**
* Associated value manager
* @return value manager
*/
IValueManager getValueManager();
EditType getEditType();
/**
* True if current cell is read-only.
* @return read only flag
*/
boolean isReadOnly();
/**
* Controller's host site
* @return site
*/
IWorkbenchPartSite getValueSite();
/**
* Inline or panel placeholder. Editor controls should be created inside of this placeholder.
* In case of separated editor it is null.
* @return placeholder control or null
*/
Composite getEditPlaceholder();
/**
* Refreshes (recreates) editor.
*/
void refreshEditor();
/**
* Show error/warning message in grid control.
* @param messageType status message type
* @param message error message
*/
void showMessage(String message, DBPMessageType messageType);
}
|
[
"serge@jkiss.org"
] |
serge@jkiss.org
|
37ac20cca592413ae97640e05d15e462fda4a41a
|
274a3f814e12712ad56d463b31e18fcf9d7a6955
|
/src/main/de/hsmainz/cs/semgis/arqextension/envelope/transform/Expand.java
|
97d65574f4ff891d742338fd1acef142850988ae
|
[] |
no_license
|
lisha992610/my_jena_geo
|
a5c80c8345ef7a32dd487ca57400b7947d80d336
|
fff8e26992a02b5a1c1de731b2e6f9ab09249776
|
refs/heads/master
| 2023-04-23T03:11:39.128121
| 2021-05-12T05:05:29
| 2021-05-12T05:05:29
| 366,588,259
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 316
|
java
|
package de.hsmainz.cs.semgis.arqextension.envelope.transform;
import org.apache.jena.sparql.expr.NodeValue;
import org.apache.jena.sparql.function.FunctionBase1;
public class Expand extends FunctionBase1 {
@Override
public NodeValue exec(NodeValue v) {
// TODO Auto-generated method stub
return null;
}
}
|
[
"shiying.li@sec.ethz.ch"
] |
shiying.li@sec.ethz.ch
|
434e8e5fb6107b470a08e5b10a76aaee624ca1a9
|
d813a46d8e7d94cb23379498561cb79f5ef68b1e
|
/http-service/src/main/java/net/runelite/http/service/ws/WSService.java
|
9a2068a61fc824c325fe942aecc2c851dd3213db
|
[
"BSD-2-Clause"
] |
permissive
|
Joklost/runelite
|
97ceb1c92268f5242e23a5c2559763346dd4e668
|
1b7bdc616b5268bfc6a0de5cfabdab4bed2d3f49
|
refs/heads/master
| 2020-03-09T01:19:38.960297
| 2018-04-27T02:51:34
| 2018-04-27T19:35:16
| 128,511,320
| 0
| 0
|
BSD-2-Clause
| 2018-04-07T08:47:04
| 2018-04-07T08:47:04
| null |
UTF-8
|
Java
| false
| false
| 3,240
|
java
|
/*
* Copyright (c) 2017, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY 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 net.runelite.http.service.ws;
import com.google.gson.Gson;
import java.util.UUID;
import javax.websocket.CloseReason;
import javax.websocket.EndpointConfig;
import javax.websocket.OnClose;
import javax.websocket.OnError;
import javax.websocket.OnMessage;
import javax.websocket.OnOpen;
import javax.websocket.Session;
import javax.websocket.server.ServerEndpoint;
import net.runelite.http.api.ws.messages.Handshake;
import net.runelite.http.api.ws.WebsocketGsonFactory;
import net.runelite.http.api.ws.WebsocketMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ServerEndpoint("/ws")
public class WSService
{
private static final Logger logger = LoggerFactory.getLogger(WSService.class);
private static final Gson gson = WebsocketGsonFactory.build();
private Session session;
private UUID uuid;
public UUID getUuid()
{
return uuid;
}
public void send(WebsocketMessage message)
{
String json = gson.toJson(message, WebsocketMessage.class);
logger.debug("Sending {}", json);
session.getAsyncRemote().sendText(json);
}
@OnOpen
public void onOpen(Session session, EndpointConfig config)
{
this.session = session;
SessionManager.add(this, session);
logger.debug("New session {}", session);
}
@OnClose
public void onClose(Session session, CloseReason resaon)
{
SessionManager.remove(session);
logger.debug("Close session {}", session);
}
@OnError
public void onError(Session session, Throwable ex)
{
SessionManager.remove(session);
logger.debug("Error in session {}", session, ex);
}
@OnMessage
public void onMessage(Session session, String text)
{
WebsocketMessage message = gson.fromJson(text, WebsocketMessage.class);
logger.debug("Got message: {}", message);
if (message instanceof Handshake)
{
Handshake hs = (Handshake) message;
uuid = hs.getSession();
}
}
}
|
[
"Adam@anope.org"
] |
Adam@anope.org
|
f52d053e575375b801f0799765375607062fdfa2
|
8507584330cf27f0c4358b2116cfd3180559980c
|
/src/main/java/com/mobilechip/erp/service/impl/SupplierServiceImpl.java
|
20839e7c17803882101e25137de3252975038de1
|
[] |
no_license
|
BulkSecurityGeneratorProject/mcERP
|
1c5c6f88effa8904c03ed7a5521374e79357ad41
|
dde153caf69b007c545f586356086bed0de4d1fb
|
refs/heads/master
| 2022-12-13T03:13:11.798475
| 2018-08-07T14:30:23
| 2018-08-07T14:30:23
| 296,535,972
| 0
| 0
| null | 2020-09-18T06:41:23
| 2020-09-18T06:41:21
| null |
UTF-8
|
Java
| false
| false
| 2,564
|
java
|
package com.mobilechip.erp.service.impl;
import com.mobilechip.erp.service.SupplierService;
import com.mobilechip.erp.domain.Supplier;
import com.mobilechip.erp.repository.SupplierRepository;
import com.mobilechip.erp.service.dto.SupplierDTO;
import com.mobilechip.erp.service.mapper.SupplierMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;
/**
* Service Implementation for managing Supplier.
*/
@Service
@Transactional
public class SupplierServiceImpl implements SupplierService {
private final Logger log = LoggerFactory.getLogger(SupplierServiceImpl.class);
private final SupplierRepository supplierRepository;
private final SupplierMapper supplierMapper;
public SupplierServiceImpl(SupplierRepository supplierRepository, SupplierMapper supplierMapper) {
this.supplierRepository = supplierRepository;
this.supplierMapper = supplierMapper;
}
/**
* Save a supplier.
*
* @param supplierDTO the entity to save
* @return the persisted entity
*/
@Override
public SupplierDTO save(SupplierDTO supplierDTO) {
log.debug("Request to save Supplier : {}", supplierDTO);
Supplier supplier = supplierMapper.toEntity(supplierDTO);
supplier = supplierRepository.save(supplier);
return supplierMapper.toDto(supplier);
}
/**
* Get all the suppliers.
*
* @return the list of entities
*/
@Override
@Transactional(readOnly = true)
public List<SupplierDTO> findAll() {
log.debug("Request to get all Suppliers");
return supplierRepository.findAll().stream()
.map(supplierMapper::toDto)
.collect(Collectors.toCollection(LinkedList::new));
}
/**
* Get one supplier by id.
*
* @param id the id of the entity
* @return the entity
*/
@Override
@Transactional(readOnly = true)
public SupplierDTO findOne(Long id) {
log.debug("Request to get Supplier : {}", id);
Supplier supplier = supplierRepository.findOne(id);
return supplierMapper.toDto(supplier);
}
/**
* Delete the supplier by id.
*
* @param id the id of the entity
*/
@Override
public void delete(Long id) {
log.debug("Request to delete Supplier : {}", id);
supplierRepository.delete(id);
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
759beaa6cc92f0e916e772c7994988726a78de08
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/retailcloud-20180313/src/main/java/com/aliyun/retailcloud20180313/models/DescribeAppEnvironmentDetailResponse.java
|
d3e7727df956d1a5e2e93fa1e947bf45c789bd92
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,505
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.retailcloud20180313.models;
import com.aliyun.tea.*;
public class DescribeAppEnvironmentDetailResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("statusCode")
@Validation(required = true)
public Integer statusCode;
@NameInMap("body")
@Validation(required = true)
public DescribeAppEnvironmentDetailResponseBody body;
public static DescribeAppEnvironmentDetailResponse build(java.util.Map<String, ?> map) throws Exception {
DescribeAppEnvironmentDetailResponse self = new DescribeAppEnvironmentDetailResponse();
return TeaModel.build(map, self);
}
public DescribeAppEnvironmentDetailResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public DescribeAppEnvironmentDetailResponse setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
public Integer getStatusCode() {
return this.statusCode;
}
public DescribeAppEnvironmentDetailResponse setBody(DescribeAppEnvironmentDetailResponseBody body) {
this.body = body;
return this;
}
public DescribeAppEnvironmentDetailResponseBody getBody() {
return this.body;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
b7c875f87441e49ded28208bd136cd334f075fcd
|
d60e287543a95a20350c2caeabafbec517cabe75
|
/NLPCCd/Hadoop/4410_2.java
|
ca4e7dfdba1a1fab486474a950ed900c5ae03845
|
[
"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
| 283
|
java
|
//,temp,sample_8342.java,2,8,temp,sample_8260.java,2,12
//,3
public class xxx {
protected void removeStoredMasterKey(DelegationKey key) {
if (LOG.isDebugEnabled()) {
}
try {
store.removeTokenMasterKey(key);
} catch (IOException e) {
log.info("unable to remove master key");
}
}
};
|
[
"sgholami@uwaterloo.ca"
] |
sgholami@uwaterloo.ca
|
8325a72c8e35942e1c37cf650c70e0e5966da0be
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/neo4j/2019/12/LogProvider.java
|
dbc807c5caffdc890bf7e551f12c50fbba379a58
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 1,351
|
java
|
/*
* Copyright (c) 2002-2019 "Neo4j,"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.logging;
import org.neo4j.annotations.api.PublicApi;
/**
* Used to obtain a {@link Log} for a specified context
*/
@PublicApi
public interface LogProvider
{
/**
* @param loggingClass the context for the returned {@link Log}
* @return a {@link Log} that logs messages with the {@code loggingClass} as the context
*/
Log getLog( Class<?> loggingClass );
/**
* @param name the context for the returned {@link Log}
* @return a {@link Log} that logs messages with the specified name as the context
*/
Log getLog( String name );
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
b8d44c734125b413c35ca0ac619a3bb848d651bd
|
abfaa4171c600fc68def1a4001d35944d0a5d71b
|
/src/main/java/lt/bit/java2/App.java
|
4c4a996321a64eadf3ef3a509ec948cc900e77f8
|
[] |
no_license
|
valdaszi/java0821-spring-jpa
|
6a05cd63d58da24d91e27f4ad48d4faab260e898
|
dd4b4d37a245577ef6ea007b2669b887105ebaa2
|
refs/heads/master
| 2020-08-10T18:41:05.077501
| 2019-10-15T08:47:53
| 2019-10-15T08:47:53
| 214,397,995
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 277
|
java
|
package lt.bit.java2;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class App {
public static void main(String[] args) {
SpringApplication.run(App.class, args);
}
}
|
[
"valdas@e-servisas.lt"
] |
valdas@e-servisas.lt
|
baced756e79f5870062919c3628212a367052246
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_225/Testnull_22482.java
|
1e1db6e8c07ebab6ff7264241dcc838982822178
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 308
|
java
|
package org.gradle.test.performancenull_225;
import static org.junit.Assert.*;
public class Testnull_22482 {
private final Productionnull_22482 production = new Productionnull_22482("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
b6486857b74ed55f506f43b300f539004bd47d22
|
5aa4d6e75dff32e54ccaa4b10709e7846721af05
|
/samples/j2ee/snippets/com.ibm.sbt.automation.test/src/main/java/com/ibm/sbt/test/js/connections/forums/api/DeleteForumReply.java
|
070f53c37ff77c96f3de69c563176ac6ea51cd0b
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
gnuhub/SocialSDK
|
6bc49880e34c7c02110b7511114deb8abfdee924
|
02cc3ac4d131b7a094f6983202c1b5e0043b97eb
|
refs/heads/master
| 2021-01-16T20:08:07.509051
| 2014-07-09T08:53:03
| 2014-07-09T08:53:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,957
|
java
|
/*
* � Copyright IBM Corp. 2013
*
* 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.ibm.sbt.test.js.connections.forums.api;
import org.junit.Assert;
import org.junit.Test;
import com.ibm.commons.util.io.json.JsonJavaObject;
import com.ibm.sbt.automation.core.test.BaseTest.AuthType;
import com.ibm.sbt.automation.core.test.connections.BaseForumsTest;
import com.ibm.sbt.automation.core.test.pageobjects.JavaScriptPreviewPage;
import com.ibm.sbt.services.client.connections.forums.ForumReply;
import com.ibm.sbt.services.client.connections.forums.ForumTopic;
/**
* @author mwallace
*
* @date 19 Mar 2013
*/
public class DeleteForumReply extends BaseForumsTest {
static final String SNIPPET_ID = "Social_Forums_API_DeleteForumReply";
@Test
public void testDeleteForumReply() {
String title = createForumTopicName();
ForumTopic forumTopic = createForumTopic(forum, title, title);
ForumReply forumReply = createForumReply(forumTopic, title, title);
addSnippetParam("ForumService.replyUuid", forumReply.getReplyUuid());
JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
JsonJavaObject json = previewPage.getJson();
Assert.assertNull("Unexpected error detected on page", json.getString("code"));
Assert.assertEquals(forumReply.getReplyUuid(), json.getString("replyUuid"));
forumReply = getForumReply(forumReply.getTopicUuid(), false);
Assert.assertNull("Deleted forum topic is still available", forumReply);
}
@Test
public void testDeleteForumReplyError() {
addSnippetParam("ForumService.replyUuid", "Foo");
JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
JsonJavaObject json = previewPage.getJson();
Assert.assertEquals(404, json.getInt("code"));
Assert.assertEquals("No existing forum found. Please contact your system administrator.", json.getString("message"));
}
@Test
public void testDeleteForumReplyInvalidArg() {
setAuthType(AuthType.NONE);
addSnippetParam("ForumService.replyUuid", "");
JavaScriptPreviewPage previewPage = executeSnippet(SNIPPET_ID);
JsonJavaObject json = previewPage.getJson();
Assert.assertEquals(400, json.getInt("code"));
Assert.assertEquals("Invalid argument, expected replyUuid.", json.getString("message"));
}
}
|
[
"LORENZOB@ie.ibm.com"
] |
LORENZOB@ie.ibm.com
|
77d8becfe613aaad506c306d5161ba36aef7c31f
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/20/org/apache/commons/math3/util/ResizableDoubleArray_addElementRolling_342.java
|
59276ed42ae714fea7fc5c2043b1f0ca2c29585a
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 3,405
|
java
|
org apach common math3 util
variabl length link doubl arrai doublearrai implement automat
handl expand contract intern storag arrai element
ad remov
intern storag arrai start capac determin
code initi capac initialcapac code properti set constructor
initi capac ad element
link add element addel append element end arrai
open entri end intern storag arrai
arrai expand size expand arrai depend
code expans mode expansionmod code code expans factor expansionfactor code properti
code expans mode expansionmod code determin size arrai
multipli code expans factor expansionfactor code multipl mode
expans addit addit mode code expans factor expansionfactor code
storag locat ad code expans mode expansionmod code
multipl mode code expans factor expansionfactor code
link add element roll addelementrol method add element end
intern storag arrai adjust usabl window
intern arrai forward posit effect make
element repeat activ method
activ link discard front element discardfrontel effect orphan
storag locat begin intern storag arrai
reclaim storag time method activ size
intern storag arrai compar number address
element code num element numel code properti differ
larg intern arrai contract size
code num element numel code determin intern
storag arrai larg depend code expans mode expansionmod code
code contract factor contractionfactor code properti code expans mode expansionmod code
code multipl mode code contract trigger
ratio storag arrai length code num element numel code exce
code contract factor contractionfactor code code expans mode expansionmod code
code addit mode code number excess storag locat
compar code contract factor contractionfactor code
avoid cycl expans contract
code expans factor expansionfactor code exce
code contract factor contractionfactor code constructor mutat
properti enforc requir throw illeg argument except illegalargumentexcept
violat
version
resiz doubl arrai resizabledoublearrai doubl arrai doublearrai serializ
add element end arrai remov
element arrai return discard element
effect similar push oper fifo queue
arrai element order
add element roll addelementrol invok result arrai
entri return
param ad arrai
discard push arrai
roll insert
add element roll addelementrol
discard intern arrai internalarrai start index startindex
start index startindex num element numel intern arrai internalarrai length
expand
increment start index
start index startindex
add
intern arrai internalarrai start index startindex num element numel
check contract criteria
contract shouldcontract
contract
discard
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
d82b95fdd29481c2c8761c9c0b82963259037edb
|
8b2ab8bb664ba3b9846dadaf7b8cef7e16ab28bd
|
/cgiser-moka-parent/cgiser-moka-biz/src/main/java/com/cgiser/moka/manager/impl/FragmentManagerImpl.java
|
c01c3d958fad29e18d7ecbc22a9435a02ce24a53
|
[] |
no_license
|
cgiser/moka
|
384557f4c33de570a64ed3540484ab8ac2fa5fe2
|
fedb29249b831ac987bdaf0b57855bc03196aab6
|
refs/heads/master
| 2021-03-12T22:36:34.188511
| 2015-10-02T14:37:40
| 2015-10-02T14:37:40
| 27,769,763
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,635
|
java
|
package com.cgiser.moka.manager.impl;
import java.util.Map;
import org.springframework.util.CollectionUtils;
import com.cgiser.moka.dao.FragmentDao;
import com.cgiser.moka.manager.FragmentManager;
import com.cgiser.moka.model.Fragment;
public class FragmentManagerImpl implements FragmentManager {
private FragmentDao fragmentDao;
@Override
public Long addFragment(Long roleId, int fragment1, int fragment2,
int fragment3) {
// TODO Auto-generated method stub
return fragmentDao.addFragment(roleId, fragment1, fragment2, fragment3);
}
@Override
public int delFragment(Long roleId, int fragment1, int fragment2,
int fragment3) {
if(this.getFragment(roleId)!=null){
return fragmentDao.delFragment(roleId, fragment1, fragment2, fragment3);
}else{
return 0;
}
}
@Override
public Fragment getFragment(Long roleId) {
// TODO Auto-generated method stub
return MapToFragment(fragmentDao.getFragmentByRoleId(roleId));
}
private Fragment MapToFragment(Map<String,Object> map){
if(CollectionUtils.isEmpty(map)){
return null;
}
Fragment fragment = new Fragment();
fragment.setFragment1(Integer.parseInt(map.get("FRAGMENT1").toString()));
fragment.setFragment2(Integer.parseInt(map.get("FRAGMENT2").toString()));
fragment.setFragment3(Integer.parseInt(map.get("FRAGMENT3").toString()));
fragment.setId(new Long(map.get("ID").toString()));
fragment.setRoleId(new Long(map.get("ROLEID").toString()));
return fragment;
}
public FragmentDao getFragmentDao() {
return fragmentDao;
}
public void setFragmentDao(FragmentDao fragmentDao) {
this.fragmentDao = fragmentDao;
}
}
|
[
"282848081@qq.com"
] |
282848081@qq.com
|
f4ff77cd44ab30bb2d24b8e62473e92644e74162
|
24605743dbd29461804c94bccde1c28fe7b57703
|
/fr/unedic/cali/autresdoms/d90/outilsfonctionnels/OutilComparaison.java
|
0ebcc1afe28fc5a4a1af8d450ed2006741c12931
|
[] |
no_license
|
foretjerome/ARE
|
aa00cee993ed3e61c47f246616dc2c6cc3ab8f45
|
d8e2b5c67ae0370e254742cd5f6fcf50c0257994
|
refs/heads/master
| 2020-05-02T15:21:27.784344
| 2019-03-27T16:58:56
| 2019-03-27T16:58:56
| 178,038,731
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,852
|
java
|
package fr.unedic.cali.autresdoms.d90.outilsfonctionnels;
import fr.unedic.cali.autresdoms.d90.dom.EcartBasePivotEchange;
import fr.unedic.cali.autresdoms.d90.dom.spec.ElementBasePivotEchangeComparableSpec;
import fr.unedic.cali.outilsfonctionnels.GestionnaireErreur;
import fr.unedic.util.services.CoucheLogiqueException;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
public class OutilComparaison
{
public static Collection comparer(ElementBasePivotEchangeComparableSpec p_premierElement, ElementBasePivotEchangeComparableSpec p_deuxiemeElement)
throws CoucheLogiqueException
{
Class classePremierElement = p_premierElement.getClass();
Collection listeEcartsBases = new ArrayList();
Collection listeMethodesAExclure = p_premierElement.getListeMethodesAExclurePourComparaison();
listeMethodesAExclure.addAll(ElementBasePivotEchangeComparableSpec.METHODES_COMMUNES_A_EXCLURE);
Object resultatPremierElement = null;
Object resultatDeuxiemeElement = null;
Method[] listeMethodesDeClasse = classePremierElement.getMethods();
for (int i = 0; i < listeMethodesDeClasse.length; i++)
{
Method methode = listeMethodesDeClasse[i];
if (!listeMethodesAExclure.contains(methode.getName()))
{
boolean invocationMethodeReussie = false;
boolean resultatMethodeComparable = estUneMethodeAComparer(methode);
if (resultatMethodeComparable)
{
Class typeMethode = null;
try
{
resultatPremierElement = methode.invoke(p_premierElement, null);
resultatDeuxiemeElement = methode.invoke(p_deuxiemeElement, null);
typeMethode = methode.getReturnType();
invocationMethodeReussie = true;
}
catch (Exception e)
{
GestionnaireErreur.getInstance().genererCoucheLogiqueException("HG_PR_CALI_INVOCATION_METHODE", new Object[] { methode.getName() });
}
boolean resultatsIdentiques = false;
if (invocationMethodeReussie) {
resultatsIdentiques = comparerAttribut(resultatPremierElement, resultatDeuxiemeElement, typeMethode);
}
if (!resultatsIdentiques)
{
Map parametresEcartBase = p_premierElement.recupererParametresEcartsBases();
parametresEcartBase.put("attributNomCompare", methode.getName());
parametresEcartBase.put("attributValeurAvant", resultatPremierElement);
parametresEcartBase.put("attributValeurApres", resultatDeuxiemeElement);
EcartBasePivotEchange ecartBase = new EcartBasePivotEchange(parametresEcartBase, "MAJ");
listeEcartsBases.add(ecartBase);
}
}
}
}
return listeEcartsBases;
}
private static boolean estUneMethodeAComparer(Method p_methode)
{
boolean typeDeRetourAccepte = false;
String nomMethode = p_methode.getName();
boolean nomMethodeAccepte = (nomMethode.startsWith("get")) || (nomMethode.startsWith("is")) || (nomMethode.startsWith("est"));
String typeDeRetour = p_methode.getReturnType().getName();
typeDeRetourAccepte = (typeDeRetour != Collection.class.getName()) && (typeDeRetour != List.class.getName());
return (nomMethodeAccepte) && (typeDeRetourAccepte);
}
private static boolean comparerAttribut(Object p_resultatPremierElement, Object p_resultatDeuxiemeElement, Class p_typeDeRetour)
{
if ((p_resultatPremierElement != null) && (p_resultatDeuxiemeElement != null))
{
if (p_typeDeRetour.getName().equals(BigDecimal.class.getName()))
{
BigDecimal valeurAvant = (BigDecimal)p_resultatPremierElement;
BigDecimal valeurApres = ((BigDecimal)p_resultatDeuxiemeElement).setScale(valeurAvant.scale(), 1);
return ((BigDecimal)p_resultatPremierElement).compareTo(valeurApres) == 0;
}
if (p_typeDeRetour.getName().equals(String.class.getName())) {
return rTrim((String)p_resultatPremierElement).equals(rTrim((String)p_resultatDeuxiemeElement));
}
return p_resultatPremierElement.equals(p_resultatDeuxiemeElement);
}
return (p_resultatPremierElement == null) && (p_resultatDeuxiemeElement == null);
}
private static String rTrim(String p_string)
{
if (p_string == null) {
return null;
}
if ((p_string.length() < 1) || ((p_string.length() == 1) && (p_string.equals(" ")))) {
return "";
}
int i = p_string.length() - 1;
while ((i >= 0) && (p_string.charAt(i) == ' ')) {
i--;
}
return p_string.substring(0, i + 1);
}
}
/* Location:
* Qualified Name: OutilComparaison
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"jerome.foret@codecasesoftware.com"
] |
jerome.foret@codecasesoftware.com
|
fc93cd41da08211c77ae2551b7f9da20ac80aad9
|
5cb5d1fc80c1f68ade44f0a26a02d1aeb118c64d
|
/ink-msgcenter/ink-msgcenter-service/src/main/java/com/ink/msgcenter/external/sms/zw/job/SmsStatusReportJob.java
|
c8ae8bafec3211745daa4a9a17814861de9c3840
|
[] |
no_license
|
gspandy/zx-parent
|
4350d1ef851d05eabdcf8c6c7049a46593e3c22e
|
5cdc52e645537887e86e5cbc117139ca1a56f55d
|
refs/heads/master
| 2023-08-31T15:29:50.763388
| 2016-08-11T09:17:29
| 2016-08-11T09:20:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,574
|
java
|
package com.ink.msgcenter.external.sms.zw.job;
import com.ink.base.log.job.JobLoggerable;
import com.ink.base.utils.context.SpringApplicationContext;
import com.ink.msgcenter.core.po.SmsChannel;
import com.ink.msgcenter.core.query.SmsChannelQuery;
import com.ink.msgcenter.core.service.ISmsChannelManager;
import com.ink.msgcenter.external.sms.zw.job.service.SmsChannelReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* 短信状态报告接口
* Created by aiyungui on 2016/5/20.
*/
@Component("smsStatusReportJob")
public class SmsStatusReportJob extends JobLoggerable {
@Autowired
private ISmsChannelManager smsChannelManager;
/**
* 执行任务业务逻辑信息
*/
@Override
protected void executeService() {
//根据通道获取
SmsChannelQuery smsChannelQuery = new SmsChannelQuery();
smsChannelQuery.setStatus("0");
List<SmsChannel> smsChannelList = smsChannelManager.find(smsChannelQuery);
for (SmsChannel smsChannel : smsChannelList){
try{
SmsChannelReportService smsChannelReportService = (SmsChannelReportService) SpringApplicationContext.getBean("smsChannelReportService" + smsChannel.getChnType());
if (smsChannelReportService != null){
smsChannelReportService.operateSmsReport(smsChannel);
}
}catch (Exception e){
e.printStackTrace();
}
}
}
}
|
[
"zxzhouxiang123@163.com"
] |
zxzhouxiang123@163.com
|
f4929d452742850e063a45af9cf9dfd8fe958618
|
eba77a11fd0e41fef7f63c12df1119b8d4518928
|
/app/src/main/java/com/geekhive/foodey/Food/eatout/SelectOfferActivity.java
|
d81661647c4f8b76684013fbc65229bc72ffacfa
|
[] |
no_license
|
dprasad554/FoodeyResurant
|
0a64f014c504c945aadf7c1fa8cfc465a6b836de
|
40fa1753567ec15f4d47f71f45b917b18b314fcb
|
refs/heads/master
| 2023-04-03T15:41:55.851709
| 2021-05-03T08:39:01
| 2021-05-03T08:39:01
| 363,862,272
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,275
|
java
|
package com.geekhive.foodey.Food.eatout;
import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.geekhive.foodey.R;
import butterknife.BindView;
import butterknife.ButterKnife;
public class SelectOfferActivity extends AppCompatActivity implements View.OnClickListener {
public Typeface NIRMALA;
public Typeface NIRMALAB;
public Typeface NIRMALAS;
@BindView(R.id.vI_tl_back)
ImageView vITlBack;
@BindView(R.id.vT_tl_header)
TextView vTTlHeader;
@BindView(R.id.vT_tl_location)
TextView vTTlLocation;
@BindView(R.id.vL_tl_location)
LinearLayout vLTlLocation;
@BindView(R.id.vI_tl_notification)
ImageView vITlNotification;
@BindView(R.id.vL_tl_count)
TextView vLTlCount;
@BindView(R.id.vL_tl_notification)
LinearLayout vLTlNotification;
@BindView(R.id.vR_tl_notification)
RelativeLayout vRTlNotification;
@BindView(R.id.vI_tl_cart)
ImageView vITlSearch;
@BindView(R.id.vR_tl_search)
RelativeLayout vRTlSearch;
@BindView(R.id.vL_toolbarLayout)
LinearLayout vLToolbarLayout;
@BindView(R.id.vT_aso_name)
TextView vTAsoName;
@BindView(R.id.vT_aso_place)
TextView vTAsoPlace;
@BindView(R.id.vT_aso_timing)
TextView vTAsoTiming;
@BindView(R.id.vT_aso_offer)
TextView vTAsoOffer;
@BindView(R.id.vT_aso_table)
TextView vTAsoTable;
@BindView(R.id.vR_aso_list)
RecyclerView vRAsoList;
OfferAdapter offerAdapter;
@BindView(R.id.vL_tl_skip)
TextView vLTlSkip;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_select_offer);
ButterKnife.bind(this);
initializeFonts();
setTypeFace();
setvalues();
}
private void initializeFonts() {
this.NIRMALA = Typeface.createFromAsset(getAssets(), "NIRMALA.TTF");
this.NIRMALAB = Typeface.createFromAsset(getAssets(), "NIRMALAB.TTF");
this.NIRMALAS = Typeface.createFromAsset(getAssets(), "NIRMALAS.TTF");
}
private void setTypeFace() {
Runnable r = new Runnable() {
@Override
public void run() {
vTTlHeader.setTypeface(NIRMALAB);
vTTlLocation.setTypeface(NIRMALA);
vLTlCount.setTypeface(NIRMALAB);
vTAsoName.setTypeface(NIRMALAB);
vTAsoOffer.setTypeface(NIRMALA);
vTAsoPlace.setTypeface(NIRMALA);
vTAsoTable.setTypeface(NIRMALA);
vTAsoTiming.setTypeface(NIRMALA);
vLTlSkip.setTypeface(NIRMALA);
}
};
r.run();
}
private void setvalues() {
vITlBack.setVisibility(View.VISIBLE);
vTTlHeader.setVisibility(View.VISIBLE);
vLTlLocation.setVisibility(View.GONE);
vRTlNotification.setVisibility(View.GONE);
vITlSearch.setVisibility(View.GONE);
vITlSearch.setVisibility(View.GONE);
vTTlHeader.setText(getResources().getString(R.string.select_day_time));
vLTlSkip.setVisibility(View.VISIBLE);
vLTlSkip.setOnClickListener(this);
vITlBack.setOnClickListener(this);
offerAdapter = new OfferAdapter();
vRAsoList.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
vRAsoList.setAdapter(offerAdapter);
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.vI_tl_back:
finish();
break;
case R.id.vL_tl_skip:
Intent intent=new Intent(SelectOfferActivity.this,BookingSummaryActivity.class);
startActivity(intent);
overridePendingTransition(0,0);
break;
}
}
public class OfferAdapter extends RecyclerView.Adapter<OfferAdapter.MyViewHolder> {
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
return new MyViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.adapter_offer, parent, false));
}
public void onBindViewHolder(final MyViewHolder holder, final int position) {
holder.vT_ado_select.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent=new Intent(SelectOfferActivity.this,BookingSummaryActivity.class);
startActivity(intent);
overridePendingTransition(0,0);
}
});
}
public int getItemCount() {
return 5;
}
public class MyViewHolder extends RecyclerView.ViewHolder {
LinearLayout vL_ado_main;
TextView vT_ado_name, vT_ado_day, vT_ado_timing, vT_ado_vaild, vT_ado_select;
public MyViewHolder(View view) {
super(view);
this.vL_ado_main = (LinearLayout) view.findViewById(R.id.vL_ado_main);
this.vT_ado_name = (TextView) view.findViewById(R.id.vT_ado_name);
this.vT_ado_day = (TextView) view.findViewById(R.id.vT_ado_day);
this.vT_ado_timing = (TextView) view.findViewById(R.id.vT_ado_timing);
this.vT_ado_vaild = (TextView) view.findViewById(R.id.vT_ado_vaild);
this.vT_ado_select = (TextView) view.findViewById(R.id.vT_ado_select);
new Runnable() {
public void run() {
vT_ado_name.setTypeface(NIRMALA);
vT_ado_day.setTypeface(NIRMALA);
vT_ado_vaild.setTypeface(NIRMALA);
vT_ado_select.setTypeface(NIRMALA);
}
}.run();
}
}
}
}
|
[
"rohitkumar.kr92@gmail.com"
] |
rohitkumar.kr92@gmail.com
|
618db95bc4b14c275fc97d018f87248de3199dfb
|
13f8cb6d51a66776385ff516516c1a98c28702f8
|
/src/main/java/de/knightsoftnet/validators/shared/impl/BankCountryValidator.java
|
2d95efc25632364f42a5c4055b15e7fac9864f1f
|
[
"Apache-2.0"
] |
permissive
|
slugmandrew/mt-bean-validators
|
da639ef3173287da79190a98342a5cf9e3b66f69
|
7f4cf991f412e7855251eab81a358c8e97bdf721
|
refs/heads/master
| 2021-05-16T08:29:32.594617
| 2017-08-03T20:27:55
| 2017-08-03T20:27:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,569
|
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 de.knightsoftnet.validators.shared.impl;
import de.knightsoftnet.validators.shared.BankCountry;
import de.knightsoftnet.validators.shared.util.BeanPropertyReaderUtil;
import org.apache.commons.lang3.StringUtils;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
/**
* Check if a country field and the country in iban and bic match, implementation.
*
* @author Manfred Tremmel
*
*/
public class BankCountryValidator implements ConstraintValidator<BankCountry, Object> {
private static final String NOT_EMPTY_MESSAGE =
"{org.hibernate.validator.constraints.NotEmpty.message}";
/**
* error message key.
*/
private String message;
/**
* field name of the country code field.
*/
private String fieldCountryCode;
/**
* are lower case country codes allowed (true/false).
*/
private boolean allowLowerCaseCountryCode;
/**
* field name of the iban field.
*/
private String fieldIban;
/**
* field name of the bic field.
*/
private String fieldBic;
/**
* {@inheritDoc} initialize the validator.
*
* @see javax.validation.ConstraintValidator#initialize(java.lang.annotation.Annotation)
*/
@Override
public final void initialize(final BankCountry pconstraintAnnotation) {
this.fieldCountryCode = pconstraintAnnotation.fieldCountryCode();
this.allowLowerCaseCountryCode = pconstraintAnnotation.allowLowerCaseCountryCode();
this.fieldIban = pconstraintAnnotation.fieldIban();
this.fieldBic = pconstraintAnnotation.fieldBic();
this.message = pconstraintAnnotation.message();
}
/**
* {@inheritDoc} check if given object is valid.
*
* @see javax.validation.ConstraintValidator#isValid(Object,
* javax.validation.ConstraintValidatorContext)
*/
@Override
public final boolean isValid(final Object pvalue, final ConstraintValidatorContext pcontext) {
if (pvalue == null) {
return true;
}
try {
String valueCountry =
BeanPropertyReaderUtil.getNullSaveStringProperty(pvalue, this.fieldCountryCode);
final String valueIban =
BeanPropertyReaderUtil.getNullSaveStringProperty(pvalue, this.fieldIban);
final String valueBic =
BeanPropertyReaderUtil.getNullSaveStringProperty(pvalue, this.fieldBic);
if (StringUtils.isEmpty(valueIban) && StringUtils.isEmpty(valueBic)) {
return true;
} else if (StringUtils.isEmpty(valueIban)) {
pcontext.disableDefaultConstraintViolation();
pcontext.buildConstraintViolationWithTemplate(NOT_EMPTY_MESSAGE)
.addPropertyNode(this.fieldIban).addConstraintViolation();
return false;
} else if (StringUtils.isEmpty(valueBic)) {
pcontext.disableDefaultConstraintViolation();
pcontext.buildConstraintViolationWithTemplate(NOT_EMPTY_MESSAGE)
.addPropertyNode(this.fieldBic).addConstraintViolation();
return false;
} else if (StringUtils.length(valueIban) >= IbanValidator.IBAN_LENGTH_MIN
&& StringUtils.length(valueBic) >= BicValidator.BIC_LENGTH_MIN) {
String countryIban = valueIban.replaceAll("\\s+", StringUtils.EMPTY).substring(0, 2);
String countryBic = valueBic.replaceAll("\\s+", StringUtils.EMPTY).substring(4, 6);
if (StringUtils.length(valueCountry) != 2) {
// missing country selection, us country of iban
valueCountry = countryIban;
}
if (this.allowLowerCaseCountryCode) {
valueCountry = StringUtils.upperCase(valueCountry);
countryIban = StringUtils.upperCase(countryIban);
countryBic = StringUtils.upperCase(countryIban);
}
boolean ibanCodeMatches = false;
boolean bicCodeMatches = false;
switch (valueCountry) {
case "GF": // French Guyana
case "GP": // Guadeloupe
case "MQ": // Martinique
case "RE": // Reunion
case "PF": // French Polynesia
case "TF": // French Southern Territories
case "YT": // Mayotte
case "NC": // New Caledonia
case "BL": // Saint Barthelemy
case "MF": // Saint Martin
case "PM": // Saint Pierre et Miquelon
case "WF": // Wallis and Futuna Islands
// special solution for French oversea teritorials with french registry
ibanCodeMatches = "FR".equals(countryIban);
bicCodeMatches = "FR".equals(countryBic);
break;
case "JE": // Jersey
case "GG": // Guernsey
// they can use GB or FR registry, but iban and bic code must match
ibanCodeMatches = ("GB".equals(countryIban) || "FR".equals(countryIban))
&& countryBic.equals(countryIban);
bicCodeMatches = "GB".equals(countryBic) || "FR".equals(countryBic);
break;
default:
ibanCodeMatches = valueCountry.equals(countryIban);
bicCodeMatches = valueCountry.equals(countryBic);
break;
}
if (ibanCodeMatches && bicCodeMatches) {
return true;
}
pcontext.disableDefaultConstraintViolation();
if (!ibanCodeMatches) {
pcontext.buildConstraintViolationWithTemplate(this.message)
.addPropertyNode(this.fieldIban).addConstraintViolation();
}
if (!bicCodeMatches) {
pcontext.buildConstraintViolationWithTemplate(this.message).addPropertyNode(this.fieldBic)
.addConstraintViolation();
}
return false;
} else {
// wrong format, should be handled by other validators
return true;
}
} catch (final Exception ignore) {
return false;
}
}
}
|
[
"Manfred.Tremmel@iiv.de"
] |
Manfred.Tremmel@iiv.de
|
d24c2bf88f7a8b6c908021ace39de5b69e82aaf4
|
fd533c9d0fd4beb88630036075b1a7b85110a7e3
|
/domain/src/main/java/com/github/ankurpathak/api/domain/repository/mongo/custom/CustomizedNotificationRepository.java
|
158d18282fa487dc3bc79a526a083bc9bb5852fa
|
[] |
no_license
|
yassinemoumenn/spring-session-test
|
82a58a0810d743eb789855bb11001a4723520583
|
fddb263a840916bbb9a92338c12d231fbd747e43
|
refs/heads/master
| 2023-04-14T19:02:38.934009
| 2019-10-31T19:31:48
| 2019-10-31T19:31:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 329
|
java
|
package com.github.ankurpathak.api.domain.repository.mongo.custom;
import com.github.ankurpathak.api.domain.model.Notification;
import com.github.ankurpathak.api.domain.repository.mongo.ICustomizedDomainRepository;
public interface CustomizedNotificationRepository extends ICustomizedDomainRepository<Notification, String> {
}
|
[
"ankurpathak@live.in"
] |
ankurpathak@live.in
|
6b129110f57ffc5c0359b2aa41938eca11d45127
|
c348a4c092a65af94484a1a2d7d1fb58411d3acc
|
/src/main/java/net/minecraft/network/play/server/S14PacketEntity.java
|
9ded05f4f71397769bd0155286e672430bf1b6fe
|
[] |
no_license
|
BeYkeRYkt/TU-Server
|
4f2df3ba42e330689bb0aa8d529e5ce1e278e169
|
590e88941742637bdb0e988df645e803b0a1681d
|
refs/heads/master
| 2021-01-20T05:57:20.399416
| 2014-10-04T02:55:45
| 2014-10-04T02:55:45
| 24,750,799
| 2
| 1
| null | 2014-10-04T02:55:45
| 2014-10-03T07:55:36
|
Java
|
UTF-8
|
Java
| false
| false
| 6,169
|
java
|
package net.minecraft.network.play.server;
import java.io.IOException;
import net.minecraft.network.INetHandler;
import net.minecraft.network.Packet;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.play.INetHandlerPlayClient;
public class S14PacketEntity implements Packet
{
protected int field_149074_a;
protected byte field_149072_b;
protected byte field_149073_c;
protected byte field_149070_d;
protected byte field_149071_e;
protected byte field_149068_f;
protected boolean field_179743_g;
protected boolean field_149069_g;
private static final String __OBFID = "CL_00001312";
public S14PacketEntity() {}
public S14PacketEntity(int p_i45206_1_)
{
this.field_149074_a = p_i45206_1_;
}
/**
* Reads the raw packet data from the data stream.
*/
public void readPacketData(PacketBuffer data) throws IOException
{
this.field_149074_a = data.readVarIntFromBuffer();
}
/**
* Writes the raw packet data to the data stream.
*/
public void writePacketData(PacketBuffer data) throws IOException
{
data.writeVarIntToBuffer(this.field_149074_a);
}
/**
* Passes this Packet on to the NetHandler for processing.
*/
public void processPacket(INetHandlerPlayClient handler)
{
handler.handleEntityMovement(this);
}
public String toString()
{
return "Entity_" + super.toString();
}
/**
* Passes this Packet on to the NetHandler for processing.
*/
public void processPacket(INetHandler handler)
{
this.processPacket((INetHandlerPlayClient)handler);
}
public static class S15PacketEntityRelMove extends S14PacketEntity
{
private static final String __OBFID = "CL_00001313";
public S15PacketEntityRelMove() {}
public S15PacketEntityRelMove(int p_i45974_1_, byte p_i45974_2_, byte p_i45974_3_, byte p_i45974_4_, boolean p_i45974_5_)
{
super(p_i45974_1_);
this.field_149072_b = p_i45974_2_;
this.field_149073_c = p_i45974_3_;
this.field_149070_d = p_i45974_4_;
this.field_179743_g = p_i45974_5_;
}
public void readPacketData(PacketBuffer data) throws IOException
{
super.readPacketData(data);
this.field_149072_b = data.readByte();
this.field_149073_c = data.readByte();
this.field_149070_d = data.readByte();
this.field_179743_g = data.readBoolean();
}
public void writePacketData(PacketBuffer data) throws IOException
{
super.writePacketData(data);
data.writeByte(this.field_149072_b);
data.writeByte(this.field_149073_c);
data.writeByte(this.field_149070_d);
data.writeBoolean(this.field_179743_g);
}
public void processPacket(INetHandler handler)
{
super.processPacket((INetHandlerPlayClient)handler);
}
}
public static class S16PacketEntityLook extends S14PacketEntity
{
private static final String __OBFID = "CL_00001315";
public S16PacketEntityLook()
{
this.field_149069_g = true;
}
public S16PacketEntityLook(int p_i45972_1_, byte p_i45972_2_, byte p_i45972_3_, boolean p_i45972_4_)
{
super(p_i45972_1_);
this.field_149071_e = p_i45972_2_;
this.field_149068_f = p_i45972_3_;
this.field_149069_g = true;
this.field_179743_g = p_i45972_4_;
}
public void readPacketData(PacketBuffer data) throws IOException
{
super.readPacketData(data);
this.field_149071_e = data.readByte();
this.field_149068_f = data.readByte();
this.field_179743_g = data.readBoolean();
}
public void writePacketData(PacketBuffer data) throws IOException
{
super.writePacketData(data);
data.writeByte(this.field_149071_e);
data.writeByte(this.field_149068_f);
data.writeBoolean(this.field_179743_g);
}
public void processPacket(INetHandler handler)
{
super.processPacket((INetHandlerPlayClient)handler);
}
}
public static class S17PacketEntityLookMove extends S14PacketEntity
{
private static final String __OBFID = "CL_00001314";
public S17PacketEntityLookMove()
{
this.field_149069_g = true;
}
public S17PacketEntityLookMove(int p_i45973_1_, byte p_i45973_2_, byte p_i45973_3_, byte p_i45973_4_, byte p_i45973_5_, byte p_i45973_6_, boolean p_i45973_7_)
{
super(p_i45973_1_);
this.field_149072_b = p_i45973_2_;
this.field_149073_c = p_i45973_3_;
this.field_149070_d = p_i45973_4_;
this.field_149071_e = p_i45973_5_;
this.field_149068_f = p_i45973_6_;
this.field_179743_g = p_i45973_7_;
this.field_149069_g = true;
}
public void readPacketData(PacketBuffer data) throws IOException
{
super.readPacketData(data);
this.field_149072_b = data.readByte();
this.field_149073_c = data.readByte();
this.field_149070_d = data.readByte();
this.field_149071_e = data.readByte();
this.field_149068_f = data.readByte();
this.field_179743_g = data.readBoolean();
}
public void writePacketData(PacketBuffer data) throws IOException
{
super.writePacketData(data);
data.writeByte(this.field_149072_b);
data.writeByte(this.field_149073_c);
data.writeByte(this.field_149070_d);
data.writeByte(this.field_149071_e);
data.writeByte(this.field_149068_f);
data.writeBoolean(this.field_179743_g);
}
public void processPacket(INetHandler handler)
{
super.processPacket((INetHandlerPlayClient)handler);
}
}
}
|
[
"custard13@mail.ru"
] |
custard13@mail.ru
|
8a6f5b534c5b604e5057151d26b048ea8fbdde96
|
275780ad4191897aa28efecc5a6fb6d50fbd028d
|
/src/main/java/jdraw/framework/DrawModel.java
|
dd212aa399f316cbb705af79cd93350654ce65b6
|
[] |
no_license
|
fhnw-depa/jdraw-assignment-hs21-jscFHNW
|
191608fd8e7dba8bd6687e46268cca92a369cc6c
|
71420814a5f3e0d9e31d29597a811704464f0cd6
|
refs/heads/master
| 2023-08-07T00:15:21.659257
| 2021-10-05T10:53:25
| 2021-10-05T10:53:25
| 413,778,042
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,171
|
java
|
/*
* Copyright (c) 2021 Fachhochschule Nordwestschweiz (FHNW)
* All Rights Reserved.
*/
package jdraw.framework;
import java.util.stream.Stream;
/**
* The class DrawModel represents the model of a drawing, i.e. all figures
* stored in a graphic. Every draw view refers to a model.
*
* @see DrawView
*
* @author Dominik Gruntz & Christoph Denzler
* @version 2.5
*/
public interface DrawModel {
/**
* Adds a new figure to the draw model.
*
* @param f figure to be added to draw model.
*/
void addFigure(Figure f);
/**
* Removes a given figure from the draw model.
*
* @param f figure to be removed from draw model.
*/
void removeFigure(Figure f);
/**
* Remove all figures from the draw model. This method is used when loading a
* drawing from a file in order to clear the old drawing before loading the new
* one.
*/
void removeAllFigures();
/**
* Returns a sequential {@code Stream} of figures with this draw model as its
* source. This stream can be used to iterate over all figures contained in this
* model. The order of the figures is the order in which the figures were added
* to the model (insertion-order). The order is interpreted by the view as
* "back-to-front".
*
* @return a sequential {@code Stream} over the figures in this draw model
*/
Stream<? extends Figure> getFigures();
/**
* Adds the specified model listener to receive model events from this draw
* model.
*
* @param listener the draw model listener.
* @see DrawModelListener
*/
void addModelChangeListener(DrawModelListener listener);
/**
* Removes the specified model listener so that it no longer receives model
* events from this draw model. This method performs no function, nor does it
* throw an exception, if the listener specified by the argument was not
* previously added to this figure.
*
* @param listener the draw model listener.
* @see DrawModelListener
*/
void removeModelChangeListener(DrawModelListener listener);
/**
* Returns the draw command handler provided by this model.
*
* @see DrawCommandHandler
* @return the draw command handler used.
*/
DrawCommandHandler getDrawCommandHandler();
/**
* Sets the index of a given figure. The order of the other figures in the model
* remains unchanged.
*
* If the figure is moved to a new place, then the model sends a
* <code>DRAWING_CHANGED</code> event to all registered model listeners.
*
* @param f the figure whose index has to be set
* @param index the position at which the new figure should appear. The other
* figures are moved away.
*
* @throws IllegalArgumentException if the figure is not contained in the
* model.
* @throws IndexOutOfBoundsException if the index is out of range (
* <code>index < 0 || index ≥ size()</code>)
* where size() is the number of figures
* contained in the model.
*/
void setFigureIndex(Figure f, int index) throws IllegalArgumentException, IndexOutOfBoundsException;
}
|
[
"66690702+github-classroom[bot]@users.noreply.github.com"
] |
66690702+github-classroom[bot]@users.noreply.github.com
|
29724c01c5b31f00c5210465cca395f2f7be4d39
|
19f7e40c448029530d191a262e5215571382bf9f
|
/decompiled/instagram/sources/p000X/AQV.java
|
f8b7b6bb37002cb0838ab514ebbd1abf88c819e4
|
[] |
no_license
|
stanvanrooy/decompiled-instagram
|
c1fb553c52e98fd82784a3a8a17abab43b0f52eb
|
3091a40af7accf6c0a80b9dda608471d503c4d78
|
refs/heads/master
| 2022-12-07T22:31:43.155086
| 2020-08-26T03:42:04
| 2020-08-26T03:42:04
| 283,347,288
| 18
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 665
|
java
|
package p000X;
import android.os.Bundle;
import java.util.Map;
/* renamed from: X.AQV */
public final class AQV extends ASM {
public final /* synthetic */ ATL A00;
public final /* synthetic */ Bundle A01;
public final /* synthetic */ String A02;
public final /* synthetic */ String A03;
public final /* synthetic */ Map A04;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AQV(ATL atl, String str, String str2, Map map, Bundle bundle) {
super(atl);
this.A00 = atl;
this.A03 = str;
this.A02 = str2;
this.A04 = map;
this.A01 = bundle;
}
}
|
[
"stan@rooy.works"
] |
stan@rooy.works
|
8467ea8c0a68611659597fad0aed17b9f194a419
|
1930d97ebfc352f45b8c25ef715af406783aabe2
|
/src/main/java/com/alipay/api/response/AlipaySecurityProdDeviceinfoQueryResponse.java
|
e9bc53461520aa45eca87b60ba69885f1cba2681
|
[
"Apache-2.0"
] |
permissive
|
WQmmm/alipay-sdk-java-all
|
57974d199ee83518523e8d354dcdec0a9ce40a0c
|
66af9219e5ca802cff963ab86b99aadc59cc09dd
|
refs/heads/master
| 2023-06-28T03:54:17.577332
| 2021-08-02T10:05:10
| 2021-08-02T10:05:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 989
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.security.prod.deviceinfo.query response.
*
* @author auto create
* @since 1.0, 2019-12-17 17:01:25
*/
public class AlipaySecurityProdDeviceinfoQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 8687417254967313156L;
/**
* device_info,查询返回的设备数据字段JSON字符串
*/
@ApiField("device_info")
private String deviceInfo;
/**
* risk_info,查询返回的设备风险字段JSON字符串
*/
@ApiField("risk_info")
private String riskInfo;
public void setDeviceInfo(String deviceInfo) {
this.deviceInfo = deviceInfo;
}
public String getDeviceInfo( ) {
return this.deviceInfo;
}
public void setRiskInfo(String riskInfo) {
this.riskInfo = riskInfo;
}
public String getRiskInfo( ) {
return this.riskInfo;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
b5c5d94dc7a485f433c558d1cb8a38afca047c06
|
df48dc6e07cdf202518b41924444635f30d60893
|
/jinx-com4j/src/main/java/com/exceljava/com4j/vbide/vbextFileTypes.java
|
22780a2102474aebe8a6b691afd04296cfa0b386
|
[
"MIT"
] |
permissive
|
ashwanikaggarwal/jinx-com4j
|
efc38cc2dc576eec214dc847cd97d52234ec96b3
|
41a3eaf71c073f1282c2ab57a1c91986ed92e140
|
refs/heads/master
| 2022-03-29T12:04:48.926303
| 2020-01-10T14:11:17
| 2020-01-10T14:11:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,360
|
java
|
package com.exceljava.com4j.vbide ;
import com4j.*;
/**
*/
public enum vbextFileTypes {
/**
* <p>
* The value of this constant is 0
* </p>
*/
vbextFileTypeForm, // 0
/**
* <p>
* The value of this constant is 1
* </p>
*/
vbextFileTypeModule, // 1
/**
* <p>
* The value of this constant is 2
* </p>
*/
vbextFileTypeClass, // 2
/**
* <p>
* The value of this constant is 3
* </p>
*/
vbextFileTypeProject, // 3
/**
* <p>
* The value of this constant is 4
* </p>
*/
vbextFileTypeExe, // 4
/**
* <p>
* The value of this constant is 5
* </p>
*/
vbextFileTypeFrx, // 5
/**
* <p>
* The value of this constant is 6
* </p>
*/
vbextFileTypeRes, // 6
/**
* <p>
* The value of this constant is 7
* </p>
*/
vbextFileTypeUserControl, // 7
/**
* <p>
* The value of this constant is 8
* </p>
*/
vbextFileTypePropertyPage, // 8
/**
* <p>
* The value of this constant is 9
* </p>
*/
vbextFileTypeDocObject, // 9
/**
* <p>
* The value of this constant is 10
* </p>
*/
vbextFileTypeBinary, // 10
/**
* <p>
* The value of this constant is 11
* </p>
*/
vbextFileTypeGroupProject, // 11
/**
* <p>
* The value of this constant is 12
* </p>
*/
vbextFileTypeDesigners, // 12
}
|
[
"tony@pyxll.com"
] |
tony@pyxll.com
|
97ce87444a2f9981461ff6760d639264b83ac2bc
|
efbb2fa0b32cb58c3338257906d666c81cd3eff7
|
/01springboot老版本资料/springboot_day2/src/main/java/com/baizhi/Application.java
|
2f1f7838b416dd1d0a21657cea93671fec6adfdb
|
[] |
no_license
|
wjphappy90/buliangren
|
7ff98ba343044a2c27f7026db4f1065014d12a64
|
b825cd2cb4f12edbf514588d3f607d665e7ae897
|
refs/heads/main
| 2023-01-12T20:19:13.377815
| 2020-11-15T19:34:53
| 2020-11-15T19:34:53
| 313,107,822
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 658
|
java
|
package com.baizhi;
import com.baizhi.entity.User;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;
/**
* Created by HIAPAD on 2019/10/31.
*/
@SpringBootApplication
@Import(User.class)
public class Application {
/*@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
//指定入口类类对象即可
return builder.sources(Application.class);
}*/
public static void main(String[] args) {
SpringApplication.run(Application.class,args);
}
}
|
[
"981146457@qq.com"
] |
981146457@qq.com
|
37eba57c6876ababe5219be53209b1997516fb87
|
1f4df083c5804483ae2dc049109e1f494f73acf5
|
/src/br/com/sisloja/main/GeraTabela.java
|
aab458d49392012b8b406a50fa1947d362b992fc
|
[] |
no_license
|
DiasGustavo/sys_store
|
05d1ce515b8a49b834d556f586c05d30daf15ff5
|
c903811130f1da4c37d3b35c967ff65559797465
|
refs/heads/master
| 2020-05-25T17:29:01.212598
| 2017-05-30T19:35:03
| 2017-05-30T19:35:03
| 84,950,435
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 231
|
java
|
package br.com.sisloja.main;
import br.com.sisloja.util.HibernateUtil;
public class GeraTabela {
public static void main(String[] args) {
HibernateUtil.getSessionFactory();
HibernateUtil.getSessionFactory().close();
}
}
|
[
"gustavouepb@gmail.com"
] |
gustavouepb@gmail.com
|
34ece3bb59cec69f290976b23d96fbc2839907ae
|
702f75a662c394d408d3f851ef9b3161855781d0
|
/jaxrs/jaxrs-api/src/main/java/javax/ws/rs/client/Client.java
|
de22c0dc95953f76dbda6f21c9b1e1fab8f874d8
|
[
"Apache-2.0"
] |
permissive
|
krzysztofmaslak/Resteasy
|
125467c094186b025e9f21c967bd277eb9798fe0
|
6590d5a4773728909821cddf9e23c021a282509b
|
refs/heads/master
| 2020-12-30T17:45:12.210581
| 2013-01-24T22:10:19
| 2013-01-24T22:10:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,764
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2011-2012 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* http://glassfish.java.net/public/CDDL+GPL_1_1.html
* or packager/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
package javax.ws.rs.client;
import java.net.URI;
import javax.ws.rs.core.Link;
import javax.ws.rs.core.UriBuilder;
/**
* Client is the main entry point to the fluent API used to build and execute client
* requests in order to consume responses returned.
* <p/>
* Clients are heavy-weight objects that manage the client-side communication
* infrastructure. Initialization as well as disposal of a {@code Client} instance
* may be a rather expensive operation. It is therefore advised to construct only
* a small number of {@code Client} instances in the application. Client instances
* must be {@link #close() properly closed} before being disposed to avoid leaking
* resources.
*
* @author Marek Potociar
* @see Configuration
* @since 2.0
*/
public interface Client {
/**
* Close client instance and all it's associated resources. Subsequent calls
* have no effect and are ignored. Once the client is closed, invoking any
* other method on the client instance would result in an {@link IllegalStateException}
* being thrown.
* <p/>
* Calling this method effectively invalidates all {@link WebTarget resource targets}
* produced by the client instance. Invoking any method on such targets once the client
* is closed would result in an {@link IllegalStateException} being thrown.
*/
void close();
/**
* Get access to the underlying {@link Configuration configuration} of the
* client instance.
*
* @return a mutable client configuration.
*/
public Configuration configuration();
/**
* Build a new web resource target.
*
* @param uri web resource URI. May contain template parameters. Must not be {@code null}.
* @return web resource target bound to the provided URI.
* @throws IllegalArgumentException in case the supplied string is not a valid URI template.
* @throws NullPointerException in case the supplied argument is {@code null}.
*/
WebTarget target(String uri) throws IllegalArgumentException, NullPointerException;
/**
* Build a new web resource target.
*
* @param uri web resource URI. Must not be {@code null}.
* @return web resource target bound to the provided URI.
* @throws NullPointerException in case the supplied argument is {@code null}.
*/
WebTarget target(URI uri) throws NullPointerException;
/**
* Build a new web resource target.
*
* @param uriBuilder web resource URI represented as URI builder. Must not be {@code null}.
* @return web resource target bound to the provided URI.
* @throws NullPointerException in case the supplied argument is {@code null}.
*/
WebTarget target(UriBuilder uriBuilder) throws NullPointerException;
/**
* Build a new web resource target.
*
* @param link link to a web resource. Must not be {@code null}.
* @return web resource target bound to the linked web resource.
* @throws NullPointerException in case the supplied argument is {@code null}.
*/
WebTarget target(Link link) throws NullPointerException;
/**
* <p>Build an invocation builder from a link. It uses the URI and the type
* of the link to initialize the invocation builder. The type is used as the
* initial value for the HTTP Accept header, if present.</p>
*
* @param link link to build invocation from. Must not be {@code null}.
* @return newly created invocation builder.
* @throws NullPointerException in case link is {@code null}.
*/
Invocation.Builder invocation(Link link) throws NullPointerException;
}
|
[
"bburke@redhat.com"
] |
bburke@redhat.com
|
d51a0077a1a7494e999decace873d914fcb43943
|
c59f24c507d30bbb80f39e9a4f120fec26a43439
|
/hbase-src-1.2.1/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftMetrics.java
|
883bbdccffcca8e61a25693d20b0445bb5cebdc1
|
[
"Apache-2.0",
"CC-BY-3.0",
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-protobuf"
] |
permissive
|
fengchen8086/ditb
|
d1b3b9c8cf3118fb53e7f2720135ead8c8c0829b
|
d663ecf4a7c422edc4c5ba293191bf24db4170f0
|
refs/heads/master
| 2021-01-20T01:13:34.456019
| 2017-04-24T13:17:23
| 2017-04-24T13:17:23
| 89,239,936
| 13
| 3
|
Apache-2.0
| 2023-03-20T11:57:01
| 2017-04-24T12:54:26
|
Java
|
UTF-8
|
Java
| false
| false
| 2,820
|
java
|
/*
* Copyright The Apache Software Foundation
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with this
* work for additional information regarding copyright ownership. The ASF
* licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package org.apache.hadoop.hbase.thrift;
import org.apache.hadoop.hbase.classification.InterfaceAudience;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
/**
* This class is for maintaining the various statistics of thrift server
* and publishing them through the metrics interfaces.
*/
@InterfaceAudience.Private
public class ThriftMetrics {
public enum ThriftServerType {
ONE,
TWO
}
public MetricsThriftServerSource getSource() {
return source;
}
public void setSource(MetricsThriftServerSource source) {
this.source = source;
}
private MetricsThriftServerSource source;
private final long slowResponseTime;
public static final String SLOW_RESPONSE_NANO_SEC =
"hbase.thrift.slow.response.nano.second";
public static final long DEFAULT_SLOW_RESPONSE_NANO_SEC = 10 * 1000 * 1000;
public ThriftMetrics(Configuration conf, ThriftServerType t) {
slowResponseTime = conf.getLong( SLOW_RESPONSE_NANO_SEC, DEFAULT_SLOW_RESPONSE_NANO_SEC);
if (t == ThriftServerType.ONE) {
source = CompatibilitySingletonFactory.getInstance(MetricsThriftServerSourceFactory.class).createThriftOneSource();
} else if (t == ThriftServerType.TWO) {
source = CompatibilitySingletonFactory.getInstance(MetricsThriftServerSourceFactory.class).createThriftTwoSource();
}
}
public void incTimeInQueue(long time) {
source.incTimeInQueue(time);
}
public void setCallQueueLen(int len) {
source.setCallQueueLen(len);
}
public void incNumRowKeysInBatchGet(int diff) {
source.incNumRowKeysInBatchGet(diff);
}
public void incNumRowKeysInBatchMutate(int diff) {
source.incNumRowKeysInBatchMutate(diff);
}
public void incMethodTime(String name, long time) {
source.incMethodTime(name, time);
// inc general processTime
source.incCall(time);
if (time > slowResponseTime) {
source.incSlowCall(time);
}
}
}
|
[
"fengchen8086@gmail.com"
] |
fengchen8086@gmail.com
|
15c1ce5337cc8b15220f2e0bcd9a6ebee10650f6
|
47746ff8ee08218013b48a97b582d59c662daa17
|
/Project_B/src/tp/kits3/livedinner/servlet/AddServlet.java
|
4bf4ec21152119c70a52e89c740222a39b8c4f25
|
[] |
no_license
|
shanks195/javaweb
|
e6baf33c32c7ec94e2923366d64a356c44cf8af3
|
8e99c199cd53ac135e2854bc32a0ee04b48695b6
|
refs/heads/master
| 2022-11-29T10:42:42.300039
| 2020-08-14T13:10:34
| 2020-08-14T13:10:34
| 287,535,299
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,237
|
java
|
package tp.kits3.livedinner.servlet;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class AddServlet
*/
@WebServlet("/AddServlet")
public class AddServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public AddServlet() {
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.getWriter().append("Served at: ").append(request.getContextPath());
}
/**
* @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);
}
}
|
[
"robocon87@gmail.com"
] |
robocon87@gmail.com
|
7dcb0c7505962532352df1bdec7deb4c01e977cc
|
5714e7075baaa2ed98fe9cc10dfa0e5110a98d5e
|
/support/cas-server-support-openid/src/main/java/org/apereo/cas/support/openid/authentication/principal/OpenIdServiceFactory.java
|
7f4ca909c2b4a3cd90694f4d263fcdae095ebf79
|
[
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
hunybei/cas
|
5646d3a2e7496b400c2d89f6a970a8e841e3067a
|
6553eace018407336b14c6c016783525d1a7e5eb
|
refs/heads/master
| 2020-03-27T20:21:27.270060
| 2018-09-01T09:41:58
| 2018-09-01T09:41:58
| 147,062,720
| 2
| 0
|
Apache-2.0
| 2018-09-02T07:03:25
| 2018-09-02T07:03:25
| null |
UTF-8
|
Java
| false
| false
| 1,546
|
java
|
package org.apereo.cas.support.openid.authentication.principal;
import org.apereo.cas.authentication.principal.AbstractServiceFactory;
import org.apereo.cas.support.openid.OpenIdProtocolConstants;
import lombok.NoArgsConstructor;
import lombok.RequiredArgsConstructor;
import lombok.val;
import org.springframework.util.StringUtils;
import javax.servlet.http.HttpServletRequest;
/**
* The {@link OpenIdServiceFactory} creates {@link OpenIdService} objects.
*
* @author Misagh Moayyed
* @since 4.2
*/
@RequiredArgsConstructor
@NoArgsConstructor(force = true)
public class OpenIdServiceFactory extends AbstractServiceFactory<OpenIdService> {
private final String openIdPrefixUrl;
@Override
public OpenIdService createService(final HttpServletRequest request) {
val service = request.getParameter(OpenIdProtocolConstants.OPENID_RETURNTO);
val openIdIdentity = request.getParameter(OpenIdProtocolConstants.OPENID_IDENTITY);
if (openIdIdentity == null || !StringUtils.hasText(service)) {
return null;
}
val id = cleanupUrl(service);
val artifactId = request.getParameter(OpenIdProtocolConstants.OPENID_ASSOCHANDLE);
val s = new OpenIdService(id, service, artifactId, openIdIdentity);
s.setLoggedOutAlready(true);
s.setSource(OpenIdProtocolConstants.OPENID_RETURNTO);
return s;
}
@Override
public OpenIdService createService(final String id) {
return new OpenIdService(id, id, null, this.openIdPrefixUrl);
}
}
|
[
"mmoayyed@unicon.net"
] |
mmoayyed@unicon.net
|
a4d94d295959f0f070790816ae8cfe18b35cc083
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/org/apache/beam/runners/dataflow/worker/DoFnInstanceManagersTest.java
|
f197da4d9ea835fdab6a7e4dba3b0888e404d323
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 6,565
|
java
|
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.beam.runners.dataflow.worker;
import org.apache.beam.runners.dataflow.util.PropertyNames;
import org.apache.beam.sdk.transforms.DoFn;
import org.apache.beam.sdk.transforms.DoFnSchemaInformation;
import org.apache.beam.sdk.util.DoFnInfo;
import org.apache.beam.sdk.values.WindowingStrategy;
import org.hamcrest.Matchers;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
/**
* Tests for {@link DoFnInstanceManagers}.
*/
@RunWith(JUnit4.class)
public class DoFnInstanceManagersTest {
@Rule
public ExpectedException thrown = ExpectedException.none();
private static class TestFn extends DoFn<Object, Object> {
boolean tornDown = false;
@ProcessElement
public void processElement(ProcessContext processContext) throws Exception {
}
@Teardown
public void teardown() throws Exception {
if (tornDown) {
Assert.fail("Should not be torn down twice");
}
tornDown = true;
}
}
private DoFn<?, ?> initialFn = new DoFnInstanceManagersTest.TestFn();
@Test
public void testInstanceReturnsInstance() throws Exception {
DoFnInfo<?, ?> info = /* side input views */
/* input coder */
/* main output id */
DoFnInfo.forFn(initialFn, WindowingStrategy.globalDefault(), null, null, new org.apache.beam.sdk.values.TupleTag(PropertyNames.OUTPUT), DoFnSchemaInformation.create());
DoFnInstanceManager mgr = DoFnInstanceManagers.singleInstance(info);
Assert.assertThat(mgr.peek(), Matchers.<DoFnInfo<?, ?>>theInstance(info));
Assert.assertThat(mgr.get(), Matchers.<DoFnInfo<?, ?>>theInstance(info));
// This call should be identical to the above, and return the same object
Assert.assertThat(mgr.get(), Matchers.<DoFnInfo<?, ?>>theInstance(info));
// Peek should always return the same object
Assert.assertThat(mgr.peek(), Matchers.<DoFnInfo<?, ?>>theInstance(info));
}
@Test
public void testInstanceIgnoresAbort() throws Exception {
DoFnInfo<?, ?> info = /* side input views */
/* input coder */
/* main output id */
DoFnInfo.forFn(initialFn, WindowingStrategy.globalDefault(), null, null, new org.apache.beam.sdk.values.TupleTag(PropertyNames.OUTPUT), DoFnSchemaInformation.create());
DoFnInstanceManager mgr = DoFnInstanceManagers.singleInstance(info);
mgr.abort(mgr.get());
// TestFn#teardown would fail the test after multiple calls
mgr.abort(mgr.get());
// The returned info is still the initial info
Assert.assertThat(mgr.get(), Matchers.<DoFnInfo<?, ?>>theInstance(info));
Assert.assertThat(mgr.get().getDoFn(), Matchers.theInstance(initialFn));
}
@Test
public void testCloningPoolReusesAfterComplete() throws Exception {
DoFnInfo<?, ?> info = /* side input views */
/* input coder */
/* main output id */
DoFnInfo.forFn(initialFn, WindowingStrategy.globalDefault(), null, null, new org.apache.beam.sdk.values.TupleTag(PropertyNames.OUTPUT), DoFnSchemaInformation.create());
DoFnInstanceManager mgr = DoFnInstanceManagers.cloningPool(info);
DoFnInfo<?, ?> retrievedInfo = mgr.get();
Assert.assertThat(retrievedInfo, Matchers.not(Matchers.<DoFnInfo<?, ?>>theInstance(info)));
Assert.assertThat(retrievedInfo.getDoFn(), Matchers.not(Matchers.theInstance(info.getDoFn())));
mgr.complete(retrievedInfo);
DoFnInfo<?, ?> afterCompleteInfo = mgr.get();
Assert.assertThat(afterCompleteInfo, Matchers.<DoFnInfo<?, ?>>theInstance(retrievedInfo));
Assert.assertThat(afterCompleteInfo.getDoFn(), Matchers.theInstance(retrievedInfo.getDoFn()));
}
@Test
public void testCloningPoolTearsDownAfterAbort() throws Exception {
DoFnInfo<?, ?> info = /* side input views */
/* input coder */
/* main output id */
DoFnInfo.forFn(initialFn, WindowingStrategy.globalDefault(), null, null, new org.apache.beam.sdk.values.TupleTag(PropertyNames.OUTPUT), DoFnSchemaInformation.create());
DoFnInstanceManager mgr = DoFnInstanceManagers.cloningPool(info);
DoFnInfo<?, ?> retrievedInfo = mgr.get();
mgr.abort(retrievedInfo);
DoFnInstanceManagersTest.TestFn fn = ((DoFnInstanceManagersTest.TestFn) (retrievedInfo.getDoFn()));
Assert.assertThat(fn.tornDown, Matchers.is(true));
DoFnInfo<?, ?> afterAbortInfo = mgr.get();
Assert.assertThat(afterAbortInfo, Matchers.not(Matchers.<DoFnInfo<?, ?>>theInstance(retrievedInfo)));
Assert.assertThat(afterAbortInfo.getDoFn(), Matchers.not(Matchers.theInstance(retrievedInfo.getDoFn())));
Assert.assertThat(((DoFnInstanceManagersTest.TestFn) (afterAbortInfo.getDoFn())).tornDown, Matchers.is(false));
}
@Test
public void testCloningPoolMultipleOutstanding() throws Exception {
DoFnInfo<?, ?> info = /* side input views */
/* input coder */
/* main output id */
DoFnInfo.forFn(initialFn, WindowingStrategy.globalDefault(), null, null, new org.apache.beam.sdk.values.TupleTag(PropertyNames.OUTPUT), DoFnSchemaInformation.create());
DoFnInstanceManager mgr = DoFnInstanceManagers.cloningPool(info);
DoFnInfo<?, ?> firstInfo = mgr.get();
DoFnInfo<?, ?> secondInfo = mgr.get();
Assert.assertThat(firstInfo, Matchers.not(Matchers.<DoFnInfo<?, ?>>theInstance(secondInfo)));
Assert.assertThat(firstInfo.getDoFn(), Matchers.not(Matchers.theInstance(secondInfo.getDoFn())));
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
ee4bc846730cf2999a42a7312451c2567395c2dd
|
fd2e9b314e33fb84e802a35347f335504118b372
|
/common/src/main/java/de/escidoc/core/common/util/stax/handler/RelsExtReadHandler.java
|
3a7ec52eed4fe199706c1a2b4ea15bfba39b24ae
|
[] |
no_license
|
crh/escidoc-core-1.3
|
5f0f06f5ba66be07c6633c8c33f285894dc96687
|
f4689e608f464832a41fcf6e451a6c597c5076bc
|
refs/heads/master
| 2020-05-17T18:42:30.813395
| 2012-02-22T10:50:05
| 2012-02-22T10:50:05
| 3,514,360
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,298
|
java
|
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the Common Development and Distribution License, Version 1.0
* only (the "License"). You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at license/ESCIDOC.LICENSE or http://www.escidoc.de/license. See the License for
* the specific language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each file and include the License file at
* license/ESCIDOC.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by
* brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
* Copyright 2006-2011 Fachinformationszentrum Karlsruhe Gesellschaft fuer wissenschaftlich-technische Information mbH
* and Max-Planck-Gesellschaft zur Foerderung der Wissenschaft e.V. All rights reserved. Use is subject to license
* terms.
*/
package de.escidoc.core.common.util.stax.handler;
import de.escidoc.core.common.business.Constants;
import de.escidoc.core.common.business.fedora.Triple;
import de.escidoc.core.common.business.fedora.Triples;
import de.escidoc.core.common.exceptions.system.IntegritySystemException;
import de.escidoc.core.common.exceptions.system.WebserverSystemException;
import de.escidoc.core.common.util.stax.StaxParser;
import de.escidoc.core.common.util.xml.stax.events.EndElement;
import de.escidoc.core.common.util.xml.stax.events.StartElement;
import de.escidoc.core.common.util.xml.stax.handler.DefaultHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.naming.directory.NoSuchAttributeException;
/**
* Read RelsExt and stores predicate and values within a Map.
*
* @author Steffen Wagner
*/
public class RelsExtReadHandler extends DefaultHandler {
private static final Logger LOGGER = LoggerFactory.getLogger(RelsExtReadHandler.class);
private final StaxParser parser;
private static final String RDF_DESCRIPTION_PATH = "/RDF/Description";
private static final String RDF_ABOUT = "about";
private static final String RDF_RESOURCE = "resource";
private boolean inTripleSection;
private boolean readCharacter = true;
private boolean cleanIdentifier;
private final Triples triples = new Triples();
private String subject;
private String predicate;
private String object;
/**
* RelsExtReadHandler.
*
* @param parser The Parser.
*/
public RelsExtReadHandler(final StaxParser parser) {
this.parser = parser;
}
/*
* (non-Javadoc)
*
* @see
* de.escidoc.core.common.util.xml.stax.handler.DefaultHandler#startElement
* (de.escidoc.core.common.util.xml.stax.events.StartElement)
*/
@Override
public StartElement startElement(final StartElement element) throws WebserverSystemException {
if (this.inTripleSection) {
this.predicate = element.getNamespace() + element.getLocalName();
getObjectValue(element);
}
else if (parser.getCurPath().startsWith(RDF_DESCRIPTION_PATH)) {
if (parser.getCurPath().equals(RDF_DESCRIPTION_PATH)) {
try {
// select subject
this.subject = element.getAttributeValue(Constants.RDF_NAMESPACE_URI, RDF_ABOUT);
if (this.cleanIdentifier) {
this.subject = cleanIdentifier(this.subject);
}
getObjectValue(element);
}
catch (final NoSuchAttributeException e) {
throw new WebserverSystemException(e);
}
}
else {
this.inTripleSection = true;
// handle the first element
this.predicate = element.getNamespace() + element.getLocalName();
}
}
return element;
}
/*
* (non-Javadoc)
*
* @see
* de.escidoc.core.common.util.xml.stax.handler.DefaultHandler#characters
* (java.lang.String,
* de.escidoc.core.common.util.xml.stax.events.StartElement)
*/
@Override
public String characters(final String data, final StartElement element) throws IntegritySystemException {
if (this.inTripleSection && this.readCharacter) {
this.object += data;
}
return data;
}
/*
* (non-Javadoc)
*
* @see
* de.escidoc.core.common.util.xml.stax.handler.DefaultHandler#endElement
* (de.escidoc.core.common.util.xml.stax.events.EndElement)
*/
@Override
public EndElement endElement(final EndElement element) {
if (this.inTripleSection) {
if (RDF_DESCRIPTION_PATH.equals(parser.getCurPath())) {
this.inTripleSection = false;
}
else {
this.triples.add(new Triple(this.subject, this.predicate, this.object));
}
}
return element;
}
/**
* Switch if info:fedora/ should be removed from resource object or not.
*
* @param clean Set true to remove info:fedora/ from object. False (default) keeps object value untouched.
*/
public void cleanIdentifier(final boolean clean) {
this.cleanIdentifier = clean;
}
/**
* Get all from RELS-EXT obtained Triples.
*
* @return Triples
*/
public Triples getElementValues() {
return this.triples;
}
/**
* Get the value of attribute resource.
*
* @param element The start element.
*/
private void getObjectValue(final StartElement element) {
final int index = element.indexOfAttribute(Constants.RDF_NAMESPACE_URI, RDF_RESOURCE);
if (index != -1) {
try {
this.object = element.getAttribute(index).getValue();
if (this.cleanIdentifier) {
this.object = cleanIdentifier(this.object);
}
}
catch (final IndexOutOfBoundsException e) {
if (LOGGER.isWarnEnabled()) {
LOGGER.warn("Error on getting attribute.");
}
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Error on getting attribute.", e);
}
}
}
else {
this.readCharacter = true;
this.object = "";
}
}
/**
* Removes the first 12 character from String, which should remove info:fedora/.
*
* @param identifier The String where info:fedora/ is to remove
* @return the cleaned resource identifier.
*/
private static String cleanIdentifier(final String identifier) {
if (identifier.startsWith(Constants.IDENTIFIER_PREFIX)) {
return identifier.substring(Constants.IDENTIFIER_PREFIX.length());
}
return identifier;
}
}
|
[
"Steffen.Wagner@fiz-karlsruhe.de"
] |
Steffen.Wagner@fiz-karlsruhe.de
|
3800895bb2ad8972bf2e22df60332ea7ec9a9574
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Time/16/org/joda/time/DateMidnight_DateMidnight_273.java
|
a1201823b1f48f4b93b83781d8941c2a687268a5
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 2,989
|
java
|
org joda time
date midnight datemidnight defin date time compon fix midnight
time zone midnight local utc time zone
import emphasis repres time midnight
dai
note midnight defin start dai
repres dai millisecond instant midnight
repres dai link interv
link local date locald suitabl
chronolog intern chronolog determin
millisecond instant convert date time field
chronolog code iso chronolog isochronolog code agre
intern standard compat modern gregorian calendar
individu field queri wai
code dai month getdayofmonth code
code dai month dayofmonth code
techniqu access method
field
numer
text
text
maximum minimum valu
add subtract
set
round
date midnight datemidnight thread safe immut provid chronolog
standard chronolog class suppli thread safe immut
author stephen colebourn
date midnight datemidnight
construct instanc object repres datetim
forc time zone
construct object local time midnight
object impli chronolog gregorian calendar gregoriancalendar
chronolog time zone adjust
iso time zone
time zone zone
gregorian calendar gregoriancalendar pass chronolog
date pass chronolog iso
recognis object type defin
link org joda time convert convert manag convertermanag convert manag convertermanag
includ readabl instant readableinst string calendar date
string format link iso date time format isodatetimeformat date time parser datetimepars
param instant datetim object mean
param zone time zone mean time zone
illeg argument except illegalargumentexcept instant invalid
date midnight datemidnight object instant date time zone datetimezon zone
instant zone
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
fb2eb631c6d97a56d7cbd20f1f5be1eeef89a4a0
|
16a1eab3ec2a1de10e344192a2c1027a475a9673
|
/jbm-framework/jbm-framework-devops/jbm-framework-devops-actuator/src/main/java/com/jbm/framework/devops/actuator/web/SecutityController.java
|
fb06d77263f72fbe4d76e1639127eeb8c2631907
|
[
"Apache-2.0"
] |
permissive
|
liuy2004/JBM
|
6494ec9a322f4e5ac05136e9fdbadb38f2b7a228
|
8489becfc56a258ea3a3e9f778221f587d4aa2f8
|
refs/heads/master
| 2020-05-01T14:26:38.048797
| 2019-03-10T07:54:14
| 2019-03-10T07:54:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 479
|
java
|
package com.jbm.framework.devops.actuator.web;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@RequestMapping(value = "/")
@Controller
public class SecutityController {
@RequestMapping(value = "/login", headers = "Accept=text/html")
public String login() {
return "/login";
}
// @RequestMapping(value = "/login", method = RequestMethod.POST)
// public String loginRequest() {
// return "/login";
// }
}
|
[
"numen06@sina.com"
] |
numen06@sina.com
|
1fb9e7eac3ebeb11e4cdccfd934ab657b82782d0
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/kylin/testing/983/UserService.java
|
cac661f31e86e0ad1ac1c997e9c09ac8d362f675
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,613
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kylin.rest.service;
import java.io. IOException;
import java.util.List;
import org.apache.kylin.rest.security.ManagedUser;
import org.springframework.security.provisioning.UserDetailsManager;
public interface UserService extends UserDetailsManager {
boolean isEvictCacheFlag();
void setEvictCacheFlag(boolean evictCacheFlag);
List<ManagedUser> listUsers() throws IOException;
List<String> listAdminUsers() throws IOException;
//For performance consideration, list all users may be incomplete(eg. not load user's authorities until authorities has benn used).
//So it's an extension point that can complete user's information latter.
//loadUserByUsername() has guarantee that the return user is complete.
void completeUserInfo(ManagedUser user);
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
68c74c9f2061a76c506f02d7af299ca81abb1d27
|
35e8a12f96c6f46aa77907c3a3ee2af30c8c8d3f
|
/hub.sam.sdl.model/src/hub/sam/sdl/impl/CoreAbstractionsBehavioralFeaturesParameterImpl.java
|
22612ad4cb8559d5460958aae9ab1a9e645580a9
|
[] |
no_license
|
markus1978/tef
|
36049dee71a99d24401d4a01fe33a3018e7bb776
|
38bfc24dc64822b7b3ed74e41f85b3a8c10c1955
|
refs/heads/master
| 2020-04-06T04:30:58.699975
| 2015-08-13T07:51:37
| 2015-08-13T07:51:37
| 25,520,279
| 1
| 2
| null | 2015-08-13T07:51:37
| 2014-10-21T12:13:17
|
Java
|
UTF-8
|
Java
| false
| false
| 5,957
|
java
|
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package hub.sam.sdl.impl;
import hub.sam.sdl.CoreAbstractionsBehavioralFeaturesParameter;
import hub.sam.sdl.CoreAbstractionsTypedElementsType;
import hub.sam.sdl.CoreAbstractionsTypedElementsTypedElement;
import hub.sam.sdl.EmfSdlPackage;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Core Abstractions Behavioral Features Parameter</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link hub.sam.sdl.impl.CoreAbstractionsBehavioralFeaturesParameterImpl#getTypedElement_type <em>Typed Element type</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public abstract class CoreAbstractionsBehavioralFeaturesParameterImpl extends CoreAbstractionsNamespacesNamedElementImpl implements CoreAbstractionsBehavioralFeaturesParameter {
/**
* The cached value of the '{@link #getTypedElement_type() <em>Typed Element type</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getTypedElement_type()
* @generated
* @ordered
*/
protected CoreAbstractionsTypedElementsType typedElement_type;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CoreAbstractionsBehavioralFeaturesParameterImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return EmfSdlPackage.eINSTANCE.getCoreAbstractionsBehavioralFeaturesParameter();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CoreAbstractionsTypedElementsType getTypedElement_type() {
if (typedElement_type != null && typedElement_type.eIsProxy()) {
InternalEObject oldTypedElement_type = (InternalEObject)typedElement_type;
typedElement_type = (CoreAbstractionsTypedElementsType)eResolveProxy(oldTypedElement_type);
if (typedElement_type != oldTypedElement_type) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, EmfSdlPackage.CORE_ABSTRACTIONS_BEHAVIORAL_FEATURES_PARAMETER__TYPED_ELEMENT_TYPE, oldTypedElement_type, typedElement_type));
}
}
return typedElement_type;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CoreAbstractionsTypedElementsType basicGetTypedElement_type() {
return typedElement_type;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setTypedElement_type(CoreAbstractionsTypedElementsType newTypedElement_type) {
CoreAbstractionsTypedElementsType oldTypedElement_type = typedElement_type;
typedElement_type = newTypedElement_type;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, EmfSdlPackage.CORE_ABSTRACTIONS_BEHAVIORAL_FEATURES_PARAMETER__TYPED_ELEMENT_TYPE, oldTypedElement_type, typedElement_type));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case EmfSdlPackage.CORE_ABSTRACTIONS_BEHAVIORAL_FEATURES_PARAMETER__TYPED_ELEMENT_TYPE:
if (resolve) return getTypedElement_type();
return basicGetTypedElement_type();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case EmfSdlPackage.CORE_ABSTRACTIONS_BEHAVIORAL_FEATURES_PARAMETER__TYPED_ELEMENT_TYPE:
setTypedElement_type((CoreAbstractionsTypedElementsType)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case EmfSdlPackage.CORE_ABSTRACTIONS_BEHAVIORAL_FEATURES_PARAMETER__TYPED_ELEMENT_TYPE:
setTypedElement_type((CoreAbstractionsTypedElementsType)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case EmfSdlPackage.CORE_ABSTRACTIONS_BEHAVIORAL_FEATURES_PARAMETER__TYPED_ELEMENT_TYPE:
return typedElement_type != null;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
if (baseClass == CoreAbstractionsTypedElementsTypedElement.class) {
switch (derivedFeatureID) {
case EmfSdlPackage.CORE_ABSTRACTIONS_BEHAVIORAL_FEATURES_PARAMETER__TYPED_ELEMENT_TYPE: return EmfSdlPackage.CORE_ABSTRACTIONS_TYPED_ELEMENTS_TYPED_ELEMENT__TYPED_ELEMENT_TYPE;
default: return -1;
}
}
return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
if (baseClass == CoreAbstractionsTypedElementsTypedElement.class) {
switch (baseFeatureID) {
case EmfSdlPackage.CORE_ABSTRACTIONS_TYPED_ELEMENTS_TYPED_ELEMENT__TYPED_ELEMENT_TYPE: return EmfSdlPackage.CORE_ABSTRACTIONS_BEHAVIORAL_FEATURES_PARAMETER__TYPED_ELEMENT_TYPE;
default: return -1;
}
}
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
}
} //CoreAbstractionsBehavioralFeaturesParameterImpl
|
[
"do@not.use"
] |
do@not.use
|
8653f97ddeebb8a6a372430f40f4a050e3aff6ff
|
3e18f2f1f8f319cbfb08e968446cf9b3eaa9b41f
|
/src/main/java/com/covens/common/core/statics/ModConfig.java
|
6d5102b8febbe8a9f63ea7a7a22303d06ac7c679
|
[
"MIT"
] |
permissive
|
zabi94/Covens-reborn
|
f35dbb85f78d1b297956907c3b05f0a9cc045be6
|
6fe956025ad47051e14e2e7c45893ddebc5c330a
|
refs/heads/master
| 2020-04-10T16:17:30.713563
| 2020-03-07T13:23:22
| 2020-03-07T13:23:22
| 161,140,468
| 11
| 2
|
NOASSERTION
| 2019-05-08T19:31:40
| 2018-12-10T08:15:04
|
Java
|
UTF-8
|
Java
| false
| false
| 5,240
|
java
|
/**
* This class was created by <ArekkuusuJerii>. It's distributed as
* part of the Grimoire Of Alice Mod. Get the Source Code in github:
* https://github.com/ArekkuusuJerii/Grimore-Of-Alice
* <p>
* Grimoire Of Alice is Open Source and distributed under the
* Grimoire Of Alice license: https://github.com/ArekkuusuJerii/Grimoire-Of-Alice/blob/master/LICENSE.md
*/
package com.covens.common.core.statics;
import com.covens.common.lib.LibMod;
import net.minecraftforge.common.config.Config;
import net.minecraftforge.common.config.Config.Comment;
import net.minecraftforge.common.config.Config.Type;
import net.minecraftforge.common.config.ConfigManager;
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@Config(modid = LibMod.MOD_ID)
@Mod.EventBusSubscriber
public final class ModConfig {
@Comment("Change vein sizes, generation height and generation chance")
@Config.RequiresMcRestart
@Config.LangKey("covens.config.world_gen")
public static WorldGen WORLD_GEN = new WorldGen();
@Comment("Customize the client-side only settings")
@Config.LangKey("covens.config.client")
public static ClientConfig CLIENT = new ClientConfig();
@Comment("The amount of ticks between two altar scans. Lower values cause lag!")
public static int altar_scan_delay = 1200;
@SubscribeEvent
public static void onConfigChanged(ConfigChangedEvent evt) {
if (evt.getModID().equals(LibMod.MOD_ID)) {
ConfigManager.sync(LibMod.MOD_ID, Type.INSTANCE);
}
}
public static class WorldGen {
@Comment("Silver Ore gen, this determines how much can spawn in a chunk, and how far up")
public SilverOre silver = new SilverOre();
@Comment("Tourmaline Ore gen, this determines how much can spawn in a chunk, and how far up")
public Tourmaline tourmaline = new Tourmaline();
@Comment("Malachite Ore gen, this determines how much can spawn in a chunk, and how far up")
public Malachite malachite = new Malachite();
@Comment("Tigers Eye Ore gen, this determines how much can spawn in a chunk, and how far up")
public TigersEye tigers_eye = new TigersEye();
@Comment("Garnet Ore gen, this determines how much can spawn in a chunk, and how far up")
public Garnet garnet = new Garnet();
@Comment("Salt Ore gen, this determines how much can spawn in a chunk, and how far up")
public Salt salt = new Salt();
@Comment("Beehive gen, this determines how many can spawn in a chunk, and how far up")
public Beehive beehive = new Beehive();
public static class SilverOre {
public int silver_min_vein = 1;
public int silver_max_vein = 8;
public int silver_min_height = 10;
public int silver_max_height = 128;
public int silver_gen_chance = 8;
}
public static class Tourmaline {
public int tourmaline_min_vein = 1;
public int tourmaline_max_vein = 2;
public int tourmaline_min_height = 10;
public int tourmaline_max_height = 80;
public int tourmaline_gen_chance = 6;
}
public static class Malachite {
public int malachite_min_vein = 1;
public int malachite_max_vein = 2;
public int malachite_min_height = 10;
public int malachite_max_height = 80;
public int malachite_gen_chance = 6;
}
public static class TigersEye {
public int tigersEye_min_vein = 1;
public int tigersEye_max_vein = 2;
public int tigersEye_min_height = 10;
public int tigersEye_max_height = 60;
public int tigersEye_gen_chance = 6;
}
public static class Garnet {
public int garnet_min_vein = 1;
public int garnet_max_vein = 2;
public int garnet_min_height = 10;
public int garnet_max_height = 65;
public int garnet_gen_chance = 6;
}
public static class Salt {
public int salt_min_vein = 1;
public int salt_max_vein = 4;
public int salt_min_height = 10;
public int salt_max_height = 128;
public int salt_gen_chance = 6;
}
public static class Beehive {
public int beehive_gen_chance = 12;
}
}
public static class ClientConfig {
@Comment("The amount of visual imprecision to give to chalk runes. Use 0 to have them perfectly aligned to the block")
@Config.RangeDouble(min = 0d, max = 1d)
public double glyphImprecision = 0.3d;
@Comment("Set this to false to disable ritual circles from emitting particles on non-golden circles. Might increase client performance")
public boolean allGlyphParticles = true;
@Comment("Set this to false to disable the \"When on altar:\" tooltips")
public boolean showAltarModifiersTooltips = true;
@Comment("Set this to false to keep the MP HUD on screen instead of fading out when not used")
public boolean autoHideMPHud = true;
@Comment("When this is true, the player hands in first person will be hidden when an ability is selected")
public boolean hideHandWithAbility = true;
@Comment("Set this to true to extend the item hotbar and scroll automatically to the actions instead of looping back to the first item")
public boolean autoJumpToBar = false;
@Comment("When this is true, an arrow symbol will appear, and it will highlight when scrolling will automatically go to the action menu")
public boolean showArrowsInBar = true;
}
}
|
[
"zabi94@gmail.com"
] |
zabi94@gmail.com
|
ffc5e2a604f52a987778efffbfb5e6b216927e93
|
4aa90348abcb2119011728dc067afd501f275374
|
/app/src/main/java/com/tencent/mm/plugin/webview/ui/tools/fts/WebSearchVoiceUI$1.java
|
9da4ba1707e2208a8632a687eb6031ca4ac9f825
|
[] |
no_license
|
jambestwick/HackWechat
|
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
|
6a34899c8bfd50d19e5a5ec36a58218598172a6b
|
refs/heads/master
| 2022-01-27T12:48:43.446804
| 2021-12-29T10:36:30
| 2021-12-29T10:36:30
| 249,366,791
| 0
| 0
| null | 2020-03-23T07:48:32
| 2020-03-23T07:48:32
| null |
UTF-8
|
Java
| false
| false
| 1,340
|
java
|
package com.tencent.mm.plugin.webview.ui.tools.fts;
import android.content.Intent;
import android.text.TextUtils;
import com.tencent.mm.plugin.report.service.g;
import com.tencent.mm.pluginsdk.ui.websearch.a.a;
class WebSearchVoiceUI$1 implements a {
final /* synthetic */ WebSearchVoiceUI tEP;
WebSearchVoiceUI$1(WebSearchVoiceUI webSearchVoiceUI) {
this.tEP = webSearchVoiceUI;
}
public final void bTZ() {
this.tEP.setResult(0);
g.pQN.h(15178, Integer.valueOf(4), Long.valueOf(System.currentTimeMillis()), "", WebSearchVoiceUI.a(this.tEP), WebSearchVoiceUI.b(this.tEP));
this.tEP.finish();
}
public final void Px(String str) {
if (!TextUtils.isEmpty(str) && str.length() > 2) {
str = str.substring(0, str.length() - 1);
}
Intent intent = new Intent();
intent.putExtra("text", str);
this.tEP.setResult(0, intent);
g.pQN.h(15178, Integer.valueOf(3), Long.valueOf(System.currentTimeMillis()), str, WebSearchVoiceUI.a(this.tEP), WebSearchVoiceUI.b(this.tEP));
this.tEP.finish();
}
public final void ky(boolean z) {
if (z) {
g.pQN.h(15178, Integer.valueOf(2), Long.valueOf(System.currentTimeMillis()), "", WebSearchVoiceUI.a(this.tEP), WebSearchVoiceUI.b(this.tEP));
}
}
}
|
[
"malin.myemail@163.com"
] |
malin.myemail@163.com
|
c9801ede1c17b1430f0099e28d3fdd0894be606b
|
b34404ddb2c04765eb099c58ad8ac614ab84adca
|
/src/com/cicro/wcm/dao/zwgk/index/IndexRoleDAO.java
|
114aac144b048dfc40ac2feb2d1dfa0cb69dec1b
|
[] |
no_license
|
373974360/cicroCms
|
a69f46d0148f948a55c22f4a9b60792b958e5744
|
7cd9b157253811046ab9db6a3c2aa91be5eadc48
|
refs/heads/master
| 2020-12-30T07:42:35.825771
| 2020-02-07T09:52:20
| 2020-02-07T09:52:20
| 238,906,940
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,051
|
java
|
/* */ package com.cicro.wcm.dao.zwgk.index;
/* */
/* */ import com.cicro.wcm.bean.logs.SettingLogsBean;
/* */ import com.cicro.wcm.bean.zwgk.index.IndexRoleBean;
/* */ import com.cicro.wcm.dao.PublicTableDAO;
/* */ import com.cicro.wcm.db.DBManager;
/* */ import java.util.List;
/* */
/* */ public class IndexRoleDAO
/* */ {
/* */ public static List<IndexRoleBean> getAllIndexRole()
/* */ {
/* 25 */ return DBManager.queryFList("getIndexRole", "");
/* */ }
/* */
/* */ public static boolean updateIndexRole(IndexRoleBean irb, SettingLogsBean stl)
/* */ {
/* 35 */ if (DBManager.update("updateIndexRole", irb)) {
/* 36 */ PublicTableDAO.insertSettingLogs("修改", "索引规则", irb.getId(), stl);
/* 37 */ return true;
/* */ }
/* 39 */ return false;
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\wcm\shared\classes.zip
* Qualified Name: classes.com.cicro.wcm.dao.zwgk.index.IndexRoleDAO
* JD-Core Version: 0.6.2
*/
|
[
"373974360@qq.com"
] |
373974360@qq.com
|
abf2d2e0ca2d5c5459b2defa516019cf6055e2c5
|
19248005123dcded92ea0df36e5320ae6648af06
|
/src/chrriis/dj/nativeswing/swtimpl/components/core/NativeTrayMenu.java
|
760ec5cd81854acc267058dadbd100d386ed4d4e
|
[] |
no_license
|
fzoli/RemoteControlCar
|
6b3bbaf750962b5aedf7350bd55eaced9c394572
|
25712016bc9e3d445f87d9099d7781aeb51d7308
|
refs/heads/master
| 2016-09-06T16:11:02.795537
| 2014-02-28T17:08:23
| 2014-02-28T17:08:23
| 5,379,111
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,818
|
java
|
/*
* Christopher Deckers (chrriis@nextencia.net)
* http://www.nextencia.net
*
* See the file "readme.txt" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
package chrriis.dj.nativeswing.swtimpl.components.core;
import org.eclipse.swt.widgets.Menu;
/**
* Class that contains the additional methods of the tray menu.
* @author Zoltán Farkas
*/
class NativeTrayMenu extends NativeTrayBaseMenu {
private Integer trayItemKey;
public NativeTrayMenu(Menu menu, int key, boolean active) {
super(menu, key, active);
}
/**
* Returns the tray item's key.
* @return key of the menu's parent or null if it has no parent yet
*/
@Override
public Integer getParentKey() {
return trayItemKey;
}
/**
* Sets the specified tray item.
* @param nativeItem the tray item or null
*/
public void setTrayItem(NativeTrayItem nativeItem) {
if (nativeItem != null) {
NativeTrayMenu replaced = nativeItem.getNativeTrayMenu();
if (replaced != null) replaced.setParentKey(null);
nativeItem.setNativeTrayMenu(this);
setParentKey(nativeItem.getKey());
}
else {
setParentKey(null);
}
}
/**
* Sets the specified tray item's key.
* If the previous menu of the tray item is visible,
* it will be hidden and the new one will be showed.
* @param trayItemKey the key of the tray item or null
*/
private void setParentKey(Integer trayItemKey) {
this.trayItemKey = trayItemKey;
boolean visible = getMenu().isVisible();
getMenu().setVisible(false);
if (visible && trayItemKey != null) getMenu().setVisible(true);
}
}
|
[
"zoli@NB-FZoli"
] |
zoli@NB-FZoli
|
43f1bee21865a2748c04c8bf41b3bdba294d0637
|
f9c8d995f6958abe8f491ee56973a0893e367bea
|
/java/basics/src/com/revature/design_patterns/factory/RunescapeGold.java
|
ceb33e6759fc18fadcee9caa9df3498dd362798d
|
[] |
no_license
|
210726-java-react-serverless/demos
|
0555d9c525a3dae66995f7bcad3925ccb46fc5e6
|
240534d854fb01a4539f469c780197eaadc443f4
|
refs/heads/main
| 2023-08-16T11:07:50.983085
| 2021-09-21T02:35:58
| 2021-09-21T02:35:58
| 382,428,200
| 3
| 1
| null | 2021-09-29T22:01:29
| 2021-07-02T18:12:41
|
Java
|
UTF-8
|
Java
| false
| false
| 171
|
java
|
package com.revature.design_patterns.factory;
public class RunescapeGold implements Currency {
@Override
public String getSymbol() {
return "GP";
}
}
|
[
"wezley.singleton@gmail.com"
] |
wezley.singleton@gmail.com
|
e96be1958877ac06f41f7a161380a817b023ef2f
|
1b5987a7e72a58e12ac36a36a60aa6add2661095
|
/code/org/processmining/framework/util/GUIPropertySetEnumeration.java
|
c7e4a95be7fe5b7fcec01905b6168a77502d07ee
|
[] |
no_license
|
qianc62/BePT
|
f4b1da467ee52e714c9a9cc2fb33cd2c75bdb5db
|
38fb5cc5521223ba07402c7bb5909b17967cfad8
|
refs/heads/master
| 2021-07-11T16:25:25.879525
| 2020-09-22T10:50:51
| 2020-09-22T10:50:51
| 201,562,390
| 36
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,134
|
java
|
package org.processmining.framework.util;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Iterator;
import java.util.Set;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
/**
* An enumeration property that can be readily displayed as it maintains its own
* GUI panel. The property will be graphically represented as a combo box. If a
* description has been provided, it will be displayed as a tool tip. <br>
* Changes performed via the GUI will be immedeately propagated to the
* internally held property value. Furthermore, a {@link GuiNotificationTarget
* notification target} may be specified in order to be informed as soon as the
* value has been changed. <br>
* <br>
* A typical usage scenario looks as follows: <br>
* <br>
* <code>
* JPanel testPanel = new Panel(); // create parent panel <br>
* testPanel.setLayout(new BoxLayout(testPanel, BoxLayout.PAGE_AXIS)); <br>
* HashSet<String> values = new HashSet<String>();
* values.add("Male");
* values.add("Female");
* GUIPropertySetEnumeration gender = new GUIPropertySetEnumeration("Gender", values); <br>
* testPanel.add(gender.getPropertyPanel()); // add one property <br>
* return testPanel; <br>
* </code> <br>
* Note that this property expects a list of possible values rather than a
* simple java enumeration in order also manage the choice between arbitrary
* objects. Any set of self-defined objects may be passed to the
* GUIPropertyListEnumeration as long as these self-defined objects provide a
* toString() method in a meaningful way.
*
* @see getValue
* @see getPropertyPanel
*/
public class GUIPropertySetEnumeration implements ActionListener {
// property attributes
private String myName;
private String myDescription;
private Set myPossibleValues;
private Object myValue;
private GuiNotificationTarget myTarget;
// GUI attributes
private JComboBox myComboBox;
/**
* Creates an enumeration property without a discription and notification.
*
* @param name
* the name of this property
* @param values
* the possible values of this property. The objects in this list
* should either be simple strings or override the toString()
* method, which is then displayed as the name of this value in
* the ComboBox. The first value in the list is considered as the
* default value
*/
public GUIPropertySetEnumeration(String name, Set values) {
this(name, null, values);
}
/**
* Creates an enumeration property without notification.
*
* @param name
* the name of this property
* @param description
* of this property (to be displayed as a tool tip)
* @param values
* the possible values of this property. The objects in this list
* should either be simple strings or override the toString()
* method, which is then displayed as the name of this value in
* the ComboBox. The first value in the list is considered as the
* default value
*/
public GUIPropertySetEnumeration(String name, String description, Set values) {
this(name, description, values, null, 100);
}
/**
* Creates an enumeration property without a discription.
*
* @param name
* the name of this property
* @param values
* the possible values of this property. The objects in this list
* should either be simple strings or override the toString()
* method, which is then displayed as the name of this value in
* the ComboBox. The first value in the list is considered as the
* default value
* @param target
* the object to be notified as soon the state of this property
* changes
*/
public GUIPropertySetEnumeration(String name, Set values,
GuiNotificationTarget target) {
this(name, null, values, target, 100);
}
/**
* Creates an enumeration property.
*
* @param name
* the name of this property
* @param description
* of this property (to be displayed as a tool tip)
* @param values
* the possible values of this property. The objects in this list
* should either be simple strings or override the toString()
* method, which is then displayed as the name of this value in
* the ComboBox. The first value in the list is considered as the
* default value
* @param target
* the object to be notified as soon the state of this property
* changes
*/
public GUIPropertySetEnumeration(String name, String description,
Set values, GuiNotificationTarget target) {
this(name, description, values, target, 100);
}
/**
* Creates an enumeration property.
*
* @param name
* the name of this property
* @param description
* of this property (to be displayed as a tool tip)
* @param values
* the possible values of this property. The objects in this list
* should either be simple strings or override the toString()
* method, which is then displayed as the name of this value in
* the ComboBox. The first value in the list is considered as the
* default value
* @param target
* the object to be notified as soon the state of this property
* changes
* @param width
* a custom width may be specified (default value is 100
* otherwise)
*/
public GUIPropertySetEnumeration(String name, String description,
Set values, GuiNotificationTarget target, int width) {
myName = name;
myDescription = description;
myPossibleValues = values;
myTarget = target;
// GUI attributes
myComboBox = new JComboBox();
// rmans, check whether myPossibleValues is Null
if (myPossibleValues != null) {
Iterator it = myPossibleValues.iterator();
while (it.hasNext()) {
Object val = it.next();
// assign first value (ie, default value) as the current value
if (myValue == null) {
myValue = val;
}
myComboBox.addItem(val);
}
}
myComboBox.setSize(new Dimension(width, (int) myComboBox
.getPreferredSize().getHeight()));
myComboBox.setPreferredSize(new Dimension(width, (int) myComboBox
.getPreferredSize().getHeight()));
myComboBox.setMaximumSize(new Dimension(width, (int) myComboBox
.getPreferredSize().getHeight()));
myComboBox.setMinimumSize(new Dimension(width, (int) myComboBox
.getPreferredSize().getHeight()));
myComboBox.addActionListener(this);
}
/**
* The method automatically invoked when changing the combobox status.
*
* @param e
* the passed action event (not used)
*/
public void actionPerformed(ActionEvent e) {
myValue = myComboBox.getSelectedItem();
if (myTarget != null) {
// notify owner of this property if specified
myTarget.updateGUI();
}
}
/**
* The method to be invoked when the value of this property is to be used.
*
* @return the current value of this property
*/
public Object getValue() {
return myValue;
}
/**
* Retrieves all the possible values specified for this property.
*
* @return all possible values (including the current value)
*/
public Set getAllValues() {
return myPossibleValues;
}
/**
* Creates GUI panel containg this property, ready to display in some
* settings dialog.
*
* @return the graphical panel representing this property
*/
public JPanel getPropertyPanel() {
JPanel resultPanel = new JPanel();
resultPanel.setLayout(new BoxLayout(resultPanel, BoxLayout.LINE_AXIS));
JLabel myNameLabel = new JLabel(" " + myName);
if (myDescription != null) {
myNameLabel.setToolTipText(myDescription);
}
resultPanel.add(myNameLabel);
resultPanel.add(Box.createRigidArea(new Dimension(5, 0)));
resultPanel.add(Box.createHorizontalGlue());
resultPanel.add(myComboBox);
return resultPanel;
}
}
|
[
"qianc62@gmail.com"
] |
qianc62@gmail.com
|
25e582477479865dad8c2c7730df5d492fa7d207
|
06888f55502c4cdb2caab2532361980681108bbf
|
/src/binding/facebook/java/org/moe/binding/facebook/fbsdkloginkit/FBSDKLoginManager.java
|
ec1dc037e200e4fb395626e829710bfba9a60593
|
[] |
no_license
|
eddabjork/moe-bindings
|
234b924e77e3661f82437f1c7f7bc0fda71bf229
|
424d2f9123f2b03cea754a3537178fe4ae54c728
|
refs/heads/master
| 2021-01-23T08:15:02.666400
| 2017-02-03T00:12:55
| 2017-02-03T00:12:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,464
|
java
|
package org.moe.binding.facebook.fbsdkloginkit;
import apple.NSObject;
import apple.foundation.NSArray;
import apple.foundation.NSError;
import apple.foundation.NSMethodSignature;
import apple.foundation.NSSet;
import apple.uikit.UIViewController;
import org.moe.natj.c.ann.FunctionPtr;
import org.moe.natj.general.NatJ;
import org.moe.natj.general.Pointer;
import org.moe.natj.general.ann.Generated;
import org.moe.natj.general.ann.Library;
import org.moe.natj.general.ann.Mapped;
import org.moe.natj.general.ann.MappedReturn;
import org.moe.natj.general.ann.NInt;
import org.moe.natj.general.ann.NUInt;
import org.moe.natj.general.ann.Owned;
import org.moe.natj.general.ann.Runtime;
import org.moe.natj.general.ptr.VoidPtr;
import org.moe.natj.objc.Class;
import org.moe.natj.objc.ObjCRuntime;
import org.moe.natj.objc.SEL;
import org.moe.natj.objc.ann.ObjCBlock;
import org.moe.natj.objc.ann.ObjCClassBinding;
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.map.ObjCObjectMapper;
@Generated
@Library("FBSDKLoginKit")
@Runtime(ObjCRuntime.class)
@ObjCClassBinding
public class FBSDKLoginManager extends NSObject {
static {
NatJ.register();
}
@Generated
protected FBSDKLoginManager(Pointer peer) {
super(peer);
}
@Generated
@Selector("accessInstanceVariablesDirectly")
public static native boolean accessInstanceVariablesDirectly();
@Generated
@Owned
@Selector("alloc")
public static native FBSDKLoginManager alloc();
@Generated
@Selector("allocWithZone:")
@MappedReturn(ObjCObjectMapper.class)
public static native Object allocWithZone(VoidPtr zone);
@Generated
@Selector("automaticallyNotifiesObserversForKey:")
public static native boolean automaticallyNotifiesObserversForKey(String key);
@Generated
@Selector("cancelPreviousPerformRequestsWithTarget:")
public static native void cancelPreviousPerformRequestsWithTarget(
@Mapped(ObjCObjectMapper.class) Object aTarget);
@Generated
@Selector("cancelPreviousPerformRequestsWithTarget:selector:object:")
public static native void cancelPreviousPerformRequestsWithTargetSelectorObject(
@Mapped(ObjCObjectMapper.class) Object aTarget, SEL aSelector,
@Mapped(ObjCObjectMapper.class) Object anArgument);
@Generated
@Selector("class")
public static native Class class_objc_static();
@Generated
@Selector("classFallbacksForKeyedArchiver")
public static native NSArray<String> classFallbacksForKeyedArchiver();
@Generated
@Selector("classForKeyedUnarchiver")
public static native Class classForKeyedUnarchiver();
@Generated
@Selector("debugDescription")
public static native String debugDescription_static();
@Generated
@Selector("defaultAudience")
@NUInt
public native long defaultAudience();
@Generated
@Selector("description")
public static native String description_static();
@Generated
@Selector("hash")
@NUInt
public static native long hash_static();
@Generated
@Selector("init")
public native FBSDKLoginManager init();
@Generated
@Selector("initialize")
public static native void initialize();
@Generated
@Selector("instanceMethodForSelector:")
@FunctionPtr(name = "call_instanceMethodForSelector_ret")
public static native NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(
SEL aSelector);
@Generated
@Selector("instanceMethodSignatureForSelector:")
public static native NSMethodSignature instanceMethodSignatureForSelector(
SEL aSelector);
@Generated
@Selector("instancesRespondToSelector:")
public static native boolean instancesRespondToSelector(SEL aSelector);
@Generated
@Selector("isSubclassOfClass:")
public static native boolean isSubclassOfClass(Class aClass);
@Generated
@Selector("keyPathsForValuesAffectingValueForKey:")
public static native NSSet<String> keyPathsForValuesAffectingValueForKey(
String key);
@Generated
@Selector("load")
public static native void load_objc_static();
@Generated
@Selector("logInWithPublishPermissions:fromViewController:handler:")
public native void logInWithPublishPermissionsFromViewControllerHandler(
NSArray<?> permissions,
UIViewController fromViewController,
@ObjCBlock(name = "call_logInWithPublishPermissionsFromViewControllerHandler") Block_logInWithPublishPermissionsFromViewControllerHandler handler);
@Runtime(ObjCRuntime.class)
@Generated
public interface Block_logInWithPublishPermissionsFromViewControllerHandler {
@Generated
void call_logInWithPublishPermissionsFromViewControllerHandler(
FBSDKLoginManagerLoginResult arg0, NSError arg1);
}
@Generated
@Deprecated
@Selector("logInWithPublishPermissions:handler:")
public native void logInWithPublishPermissionsHandler(
NSArray<?> permissions,
@ObjCBlock(name = "call_logInWithPublishPermissionsHandler") Block_logInWithPublishPermissionsHandler handler);
@Runtime(ObjCRuntime.class)
@Generated
public interface Block_logInWithPublishPermissionsHandler {
@Generated
void call_logInWithPublishPermissionsHandler(
FBSDKLoginManagerLoginResult arg0, NSError arg1);
}
@Generated
@Selector("logInWithReadPermissions:fromViewController:handler:")
public native void logInWithReadPermissionsFromViewControllerHandler(
NSArray<?> permissions,
UIViewController fromViewController,
@ObjCBlock(name = "call_logInWithReadPermissionsFromViewControllerHandler") Block_logInWithReadPermissionsFromViewControllerHandler handler);
@Runtime(ObjCRuntime.class)
@Generated
public interface Block_logInWithReadPermissionsFromViewControllerHandler {
@Generated
void call_logInWithReadPermissionsFromViewControllerHandler(
FBSDKLoginManagerLoginResult arg0, NSError arg1);
}
@Generated
@Deprecated
@Selector("logInWithReadPermissions:handler:")
public native void logInWithReadPermissionsHandler(
NSArray<?> permissions,
@ObjCBlock(name = "call_logInWithReadPermissionsHandler") Block_logInWithReadPermissionsHandler handler);
@Runtime(ObjCRuntime.class)
@Generated
public interface Block_logInWithReadPermissionsHandler {
@Generated
void call_logInWithReadPermissionsHandler(
FBSDKLoginManagerLoginResult arg0, NSError arg1);
}
@Generated
@Selector("logOut")
public native void logOut();
@Generated
@Selector("loginBehavior")
@NUInt
public native long loginBehavior();
@Generated
@Owned
@Selector("new")
@MappedReturn(ObjCObjectMapper.class)
public static native Object new_objc();
@Generated
@Selector("renewSystemCredentials:")
public static native void renewSystemCredentials(
@ObjCBlock(name = "call_renewSystemCredentials") Block_renewSystemCredentials handler);
@Runtime(ObjCRuntime.class)
@Generated
public interface Block_renewSystemCredentials {
@Generated
void call_renewSystemCredentials(@NInt long arg0, NSError arg1);
}
@Generated
@Selector("resolveClassMethod:")
public static native boolean resolveClassMethod(SEL sel);
@Generated
@Selector("resolveInstanceMethod:")
public static native boolean resolveInstanceMethod(SEL sel);
@Generated
@Selector("setDefaultAudience:")
public native void setDefaultAudience(@NUInt long value);
@Generated
@Selector("setLoginBehavior:")
public native void setLoginBehavior(@NUInt long value);
@Generated
@Selector("setVersion:")
public static native void setVersion(@NInt long aVersion);
@Generated
@Selector("superclass")
public static native Class superclass_static();
@Generated
@Selector("version")
@NInt
public static native long version_static();
}
|
[
"kristof.liliom@migeran.com"
] |
kristof.liliom@migeran.com
|
7480eafef3dcfca6fde842547abd442f38795449
|
caf76991b058e77da493c3d4f66f34add461ec91
|
/book-crazy-java-5-codes/11/11.4/CommonComponent.java
|
ab1cbeb49764cc39b69b942134957fbeeb9018d2
|
[
"Apache-2.0"
] |
permissive
|
zou-zhicheng/awesome-java
|
44122083582e85ecc40ddcd1a422c2e70e327efe
|
99eaaf93525ffe48598b28c9eb342ddde8de4492
|
refs/heads/main
| 2023-09-03T22:20:55.729979
| 2021-10-29T06:44:20
| 2021-10-29T06:44:20
| 366,591,784
| 1
| 1
| null | null | null | null |
GB18030
|
Java
| false
| false
| 2,202
|
java
|
import java.awt.*;
import javax.swing.*;
/**
* Description:
* 网站: <a href="http://www.crazyit.org">疯狂Java联盟</a><br>
* Copyright (C), 2001-2020, Yeeku.H.Lee<br>
* This program is protected by copyright laws.<br>
* Program Name:<br>
* Date:<br>
* @author Yeeku.H.Lee kongyeeku@163.com
* @version 5.0
*/
public class CommonComponent
{
Frame f = new Frame("测试");
// 定义一个按钮
Button ok = new Button("确认");
CheckboxGroup cbg = new CheckboxGroup();
// 定义一个单选框(处于cbg组),初始处于被选中状态
Checkbox male = new Checkbox("男", cbg, true);
// 定义一个单选框(处于cbg组),初始处于没有选中状态
Checkbox female = new Checkbox("女", cbg, false);
// 定义一个复选框,初始处于没有选中状态
Checkbox married = new Checkbox("是否已婚?", false);
// 定义一个下拉选择框
Choice colorChooser = new Choice();
// 定义一个列表选择框
List colorList = new List(6, true);
// 定义一个5行、20列的多行文本域
TextArea ta = new TextArea(5, 20);
// 定义一个50列的单行文本域
TextField name = new TextField(50);
public void init()
{
colorChooser.add("红色");
colorChooser.add("绿色");
colorChooser.add("蓝色");
colorList.add("红色");
colorList.add("绿色");
colorList.add("蓝色");
// 创建一个装载了文本框、按钮的Panel
var bottom = new Panel();
bottom.add(name);
bottom.add(ok);
f.add(bottom, BorderLayout.SOUTH);
// 创建一个装载了下拉选择框、三个Checkbox的Panel
var checkPanel = new Panel();
checkPanel.add(colorChooser);
checkPanel.add(male);
checkPanel.add(female);
checkPanel.add(married);
// 创建一个垂直排列组件的Box,盛装多行文本域、Panel
var topLeft = Box.createVerticalBox();
topLeft.add(ta);
topLeft.add(checkPanel);
// 创建一个水平排列组件的Box,盛装topLeft、colorList
var top = Box.createHorizontalBox();
top.add(topLeft);
top.add(colorList);
// 将top Box容器添加到窗口的中间
f.add(top);
f.pack();
f.setVisible(true);
}
public static void main(String[] args)
{
new CommonComponent().init();
}
}
|
[
"zhichengzou@creditease.cn"
] |
zhichengzou@creditease.cn
|
4901b2f752164356fbd22544f883ded92ca94689
|
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
|
/aliyun-java-sdk-resellertrade/src/main/java/com/aliyuncs/resellertrade/model/v20191227/GetCustomerListResponse.java
|
a3c5d04e5ae6a65727184f2806d864fcfc9850ad
|
[
"Apache-2.0"
] |
permissive
|
aliyun/aliyun-openapi-java-sdk
|
a263fa08e261f12d45586d1b3ad8a6609bba0e91
|
e19239808ad2298d32dda77db29a6d809e4f7add
|
refs/heads/master
| 2023-09-03T12:28:09.765286
| 2023-09-01T09:03:00
| 2023-09-01T09:03:00
| 39,555,898
| 1,542
| 1,317
|
NOASSERTION
| 2023-09-14T07:27:05
| 2015-07-23T08:41:13
|
Java
|
UTF-8
|
Java
| false
| false
| 2,371
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.resellertrade.model.v20191227;
import java.util.List;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.resellertrade.transform.v20191227.GetCustomerListResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class GetCustomerListResponse extends AcsResponse {
private String code;
private String message;
private String requestId;
private Boolean success;
private Data data;
public String getCode() {
return this.code;
}
public void setCode(String code) {
this.code = code;
}
public String getMessage() {
return this.message;
}
public void setMessage(String message) {
this.message = message;
}
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public Boolean getSuccess() {
return this.success;
}
public void setSuccess(Boolean success) {
this.success = success;
}
public Data getData() {
return this.data;
}
public void setData(Data data) {
this.data = data;
}
public static class Data {
private Integer totalSize;
private List<String> uidList;
public Integer getTotalSize() {
return this.totalSize;
}
public void setTotalSize(Integer totalSize) {
this.totalSize = totalSize;
}
public List<String> getUidList() {
return this.uidList;
}
public void setUidList(List<String> uidList) {
this.uidList = uidList;
}
}
@Override
public GetCustomerListResponse getInstance(UnmarshallerContext context) {
return GetCustomerListResponseUnmarshaller.unmarshall(this, context);
}
@Override
public boolean checkShowJsonItemName() {
return false;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
18ed8f6008b938ec3bbe3aef562b31e640c959a2
|
071c1f29eca575bf6b65a2df3a4e10af67cb3152
|
/src/com/hncboy/ScoreAfterFlippingMatrix.java
|
97b4b96b7e1579c7221f3070bd988bcf74bad9a6
|
[
"Apache-2.0"
] |
permissive
|
hncboy/LeetCode
|
3b44744e589585c2c5b528136619beaf77f84759
|
ab66f67d0a7a6667f1b21e8f0be503eb351863bd
|
refs/heads/master
| 2022-12-14T20:45:19.210935
| 2022-12-08T04:58:37
| 2022-12-08T04:58:37
| 205,283,145
| 10
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,439
|
java
|
package com.hncboy;
/**
* @author hncboy
* @date 2019/11/26 11:16
* @description 861.翻转矩阵后的得分
*
* 有一个二维矩阵 A 其中每个元素的值为 0 或 1 。
* 移动是指选择任一行或列,并转换该行或列中的每一个值:将所有 0 都更改为 1,将所有 1 都更改为 0。
* 在做出任意次数的移动后,将该矩阵的每一行都按照二进制数来解释,矩阵的得分就是这些数字的总和。
* 返回尽可能高的分数。
*
*
* 示例:
* 输入:[[0,0,1,1],[1,0,1,0],[1,1,0,0]]
* 输出:39
* 解释:
* 转换为 [[1,1,1,1],[1,0,0,1],[1,1,1,1]]
* 0b1111 + 0b1001 + 0b1111 = 15 + 9 + 15 = 39
*
* 提示:
* 1 <= A.length <= 20
* 1 <= A[0].length <= 20
* A[i][j] 是 0 或 1
*/
public class ScoreAfterFlippingMatrix {
public static void main(String[] args) {
ScoreAfterFlippingMatrix s = new ScoreAfterFlippingMatrix();
int[][] A = {{0, 0, 1, 1}, {1, 0, 1, 0}, {1, 1, 0, 0}};
System.out.println(s.matrixScore(A));
}
/**
* 空间复杂度:O(1)
* 时间复杂度:O(row*column)
*
* @param A
* @return
*/
private int matrixScore(int[][] A) {
int row = A.length;
int column = A[0].length;
int result = 0;
// 取最大时,必须将最高位翻转为 1,也就是第一列翻转为 1,因为 1000>0111
for (int c = 0; c < column; c++) {
int count = 0;
// 遍历列中的每一行,统计每一列中 0 的数量
for (int r = 0; r < row; r++) {
// 每行第一列中,A[r][c] ^ A[r][0] = 0,0 的数量为 0,第二列开始统计 0 的数量。
// 该行第一列为0的话:需要翻转
// 因为0^1=1,所以结果为1的数量就是翻转后0的数量
// 因为0^0=0,所以结果为0的数量就是翻转后1的数量
// 该行第一列为1的话:不需要翻转
// 因为1^1=0,所以结果为1的数量就是未翻转时0的数量
// 因为1^0=1,所以结果为0的数量就是未翻转时0的数量
count += A[r][c] ^ A[r][0];
}
// 按列计算结果,取每列中0或1最多的数量统计
result += Math.max(count, row - count) * (1 << (column - c - 1));
}
return result;
}
}
|
[
"619452863@qq.com"
] |
619452863@qq.com
|
d4ed81323e0cfd647c49de71906be65d1b5b0745
|
bacde5bb0effd64aa061a729d73e07642d876368
|
/vnp/MBook/src/minh/app/mbook/utils/MbookManager.java
|
a25a5fd3a0e14a005d90b95a1e769cae227445a4
|
[] |
no_license
|
fordream/store-vnp
|
fe10d74acd1a780fb88f90e4854d15ce44ecb68c
|
6ca37dd4a69a63ea65d601aad695150e70f8d603
|
refs/heads/master
| 2020-12-02T15:05:14.994903
| 2015-10-23T13:52:51
| 2015-10-23T13:52:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 657
|
java
|
package minh.app.mbook.utils;
public class MbookManager {
// ACTION
public static final String ACTION_MAIN_LIST = "MAINLIST";
public static final String ACTIONG_SERVICE = "ACTIONG_SERVICE";
// server, get to update
public static final String SERVER_MAIN = "https://app-server.googlecode.com/svn/trunk/app-mbook";
public static final String SERVER = String.format("%s/update.txt",
SERVER_MAIN);
// get to file main
public static final String SERVER_ZIP = String.format("%s/mBook.zip",
SERVER_MAIN);
public static final String SERVER_CONTENT = "SERVER_CONTENT";
public static final String BROASTCAST_UPDATE_UI = "BROASTCAST_UPDATE_UI";
}
|
[
"truongvv@atmarkcafe.org"
] |
truongvv@atmarkcafe.org
|
c2ba3d1e6677ef3cc9197f2eb41568a58bb84260
|
18e838e3d4b9cf8c1b0a26d7c227c7d3270639ca
|
/EJBBook/src/ex05_3/com/titan/travelagent/TravelAgentBean.java
|
2021f2d70299307a0c1fba892f541b63e1e554ab
|
[
"LicenseRef-scancode-oreilly-notice"
] |
permissive
|
golddusty/javabean2
|
d786a9eee35369ce001339d65eca6b8a3d5f2978
|
ea193ded0878965f1ea0b447739a25555f1e20cf
|
refs/heads/master
| 2020-06-04T06:33:45.139154
| 2017-06-27T15:20:07
| 2017-06-27T15:20:07
| 191,906,431
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,310
|
java
|
package com.titan.travelagent;
import com.titan.cabin.CabinLocal;
import com.titan.cabin.CabinHomeLocal;
import java.rmi.RemoteException;
import javax.naming.InitialContext;
import javax.naming.Context;
import javax.ejb.EJBException;
import java.util.Properties;
import java.util.Vector;
import javax.ejb.CreateException;
public class TravelAgentBean implements javax.ejb.SessionBean {
public void ejbCreate()throws CreateException {
// Do nothing.
}
public String [] listCabins(int shipID, int bedCount) {
try {
Properties p = new Properties();
javax.naming.Context jndiContext = new InitialContext();
Object obj =
jndiContext.lookup("java:comp/env/ejb/CabinHome");
CabinHomeLocal home = (CabinHomeLocal)
javax.rmi.PortableRemoteObject.narrow(obj,CabinHomeLocal.class);
Vector vect = new Vector();
for (int i = 1; ; i++) {
Integer pk = new Integer(i);
CabinLocal cabin = null;
try {
cabin = home.findByPrimaryKey(pk);
} catch(javax.ejb.FinderException fe) {
System.out.println("Caught exception: "+fe.getMessage()+" for pk="+i);
break;
}
// Check to see if the bed count and ship ID match.
if (cabin != null &&
cabin.getShipId() == shipID &&
cabin.getBedCount() == bedCount) {
String details =
i+","+cabin.getName()+","+cabin.getDeckLevel();
vect.addElement(details);
}
}
String [] list = new String[vect.size()];
vect.copyInto(list);
return list;
} catch(Exception e) {throw new EJBException(e);}
}
private javax.naming.Context getInitialContext()
throws javax.naming.NamingException {
//Properties p = new Properties();
// ... Specify the JNDI properties specific to the vendor.
return new javax.naming.InitialContext();
}
public void ejbRemove(){}
public void ejbActivate(){}
public void ejbPassivate(){}
public void setSessionContext(javax.ejb.SessionContext cntx){}
}
|
[
"booktech@oreilly.com"
] |
booktech@oreilly.com
|
5a3d0db11828a2c0dbc3dbdab9179fa8cf935f38
|
b4c6a1d927219e92ca1ab891cd73a11003525439
|
/app/src/main/java/com/sk/weichat/view/FullScreenVideoView.java
|
ba46cd8f3bb56c148072d36062b480d9c863be07
|
[] |
no_license
|
gyymz1993/ZiChat1.0
|
be0ce74204ac92399f9d78de50d5431f0cadabc4
|
8196ba6ba3bea28793b1b19bec30bc02b322735d
|
refs/heads/master
| 2021-07-12T03:36:42.884776
| 2017-10-13T01:43:23
| 2017-10-13T01:43:23
| 104,311,662
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 700
|
java
|
package com.sk.weichat.view;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.VideoView;
public class FullScreenVideoView extends VideoView {
public FullScreenVideoView(Context context) {
super(context);
}
public FullScreenVideoView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public FullScreenVideoView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int width = getDefaultSize(0, widthMeasureSpec);
int height = getDefaultSize(0, heightMeasureSpec);
setMeasuredDimension(width, height);
}
}
|
[
"gyymz1993@126.com"
] |
gyymz1993@126.com
|
e021c269bc3a46d400e6c0b5ae1162b09daac57e
|
967502523508f5bb48fdaac93b33e4c4aca20a4b
|
/aws-java-sdk-waf/src/main/java/com/amazonaws/services/waf/model/transform/SqlInjectionMatchSetSummaryJsonUnmarshaller.java
|
f0646bf2c521e257b53fadbb17837e1f23ddd620
|
[
"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
| 3,268
|
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.services.waf.model.transform;
import java.util.Map;
import java.util.Map.Entry;
import com.amazonaws.services.waf.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;
import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;
/**
* SqlInjectionMatchSetSummary JSON Unmarshaller
*/
public class SqlInjectionMatchSetSummaryJsonUnmarshaller implements
Unmarshaller<SqlInjectionMatchSetSummary, JsonUnmarshallerContext> {
public SqlInjectionMatchSetSummary unmarshall(
JsonUnmarshallerContext context) throws Exception {
SqlInjectionMatchSetSummary sqlInjectionMatchSetSummary = new SqlInjectionMatchSetSummary();
int originalDepth = context.getCurrentDepth();
String currentParentElement = context.getCurrentParentElement();
int targetDepth = originalDepth + 1;
JsonToken token = context.getCurrentToken();
if (token == null)
token = context.nextToken();
if (token == VALUE_NULL)
return null;
while (true) {
if (token == null)
break;
if (token == FIELD_NAME || token == START_OBJECT) {
if (context.testExpression("SqlInjectionMatchSetId",
targetDepth)) {
context.nextToken();
sqlInjectionMatchSetSummary
.setSqlInjectionMatchSetId(StringJsonUnmarshaller
.getInstance().unmarshall(context));
}
if (context.testExpression("Name", targetDepth)) {
context.nextToken();
sqlInjectionMatchSetSummary.setName(StringJsonUnmarshaller
.getInstance().unmarshall(context));
}
} else if (token == END_ARRAY || token == END_OBJECT) {
if (context.getLastParsedParentElement() == null
|| context.getLastParsedParentElement().equals(
currentParentElement)) {
if (context.getCurrentDepth() <= originalDepth)
break;
}
}
token = context.nextToken();
}
return sqlInjectionMatchSetSummary;
}
private static SqlInjectionMatchSetSummaryJsonUnmarshaller instance;
public static SqlInjectionMatchSetSummaryJsonUnmarshaller getInstance() {
if (instance == null)
instance = new SqlInjectionMatchSetSummaryJsonUnmarshaller();
return instance;
}
}
|
[
"aws@amazon.com"
] |
aws@amazon.com
|
8a82765ca5eef1b7e652bc5e52ab83eb1ee932cf
|
203d79e0231c7d6f40a32dde4619c00c50011ef8
|
/Language_Fundamentals/app8/src/H.java
|
7d0ac4aa65f81fe15591e85051ee9063e8ecd84b
|
[] |
no_license
|
Vijay-Ky/Aptech_LHP1_Java_
|
1f06ddef01b5b6cba9617b54015946306b1c0406
|
a80263d1caa8d204b5bada0b93de0232d87bb9ec
|
refs/heads/main
| 2023-05-05T15:12:32.739017
| 2021-05-27T10:22:33
| 2021-05-27T10:22:33
| 357,113,303
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 367
|
java
|
class H
{
public static void main(String[] args)
{
int i = 2;
switch(i)
{
case 2:
System.out.println("from case 2");
//break;
case 3:
System.out.println("from case 3");
//break;
case 5:
System.out.println("from case 5");
//break;
default:
System.out.println("from default");
}
System.out.println("main end");
}
}
|
[
"vijayky007@gmail.com"
] |
vijayky007@gmail.com
|
6c29cfec03fd00ca000b2132c382fadf9f6ec4c1
|
8592ba0914fdbd076048d9ee1481c9d263ef1e8a
|
/framework/java/implementations/java/org.hl7.fhir.dstu2016may/src/org/hl7/fhir/dstu2016may/model/codesystems/AssertDirectionCodes.java
|
cabdab57a62d1a275e72a30b4b49f844845910e6
|
[] |
no_license
|
HL7/UTG
|
a6f35d038b76f4bf172c453c95fe0ed67cb88889
|
cc0ed03ee9b576e6d22bfd3e3ea34d694abc9d5b
|
refs/heads/master
| 2023-08-04T12:13:53.870641
| 2023-07-25T15:45:21
| 2023-07-25T15:45:21
| 133,315,209
| 9
| 9
| null | 2023-09-07T17:39:11
| 2018-05-14T06:33:02
|
Java
|
UTF-8
|
Java
| false
| false
| 3,295
|
java
|
package org.hl7.fhir.dstu2016may.model.codesystems;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0
import org.hl7.fhir.exceptions.FHIRException;
public enum AssertDirectionCodes {
/**
* The assertion is evaluated on the response. This is the default value.
*/
RESPONSE,
/**
* The assertion is evaluated on the request.
*/
REQUEST,
/**
* added to help the parsers
*/
NULL;
public static AssertDirectionCodes fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("response".equals(codeString))
return RESPONSE;
if ("request".equals(codeString))
return REQUEST;
throw new FHIRException("Unknown AssertDirectionCodes code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case RESPONSE: return "response";
case REQUEST: return "request";
default: return "?";
}
}
public String getSystem() {
return "http://hl7.org/fhir/assert-direction-codes";
}
public String getDefinition() {
switch (this) {
case RESPONSE: return "The assertion is evaluated on the response. This is the default value.";
case REQUEST: return "The assertion is evaluated on the request.";
default: return "?";
}
}
public String getDisplay() {
switch (this) {
case RESPONSE: return "response";
case REQUEST: return "request";
default: return "?";
}
}
}
|
[
"ywang@imo-online.com"
] |
ywang@imo-online.com
|
8196808bc5bd2227873c71278c816ab707c28396
|
d2a1f4715a40d840907d7e292954b7a728793743
|
/app/src/main/java/com/bawei/dell/myshoppingapp/show/home/adpter/HomeGoodsMoreAdpter.java
|
30a3aa5c66db79dc7d1dba58f19f235b35bb9c4d
|
[] |
no_license
|
Swallow-Lgy/MyShoppingApp1
|
e902e10ef2fd189dc3319ff6a107846fbc40ee43
|
86d8ab26e4debbe6c85eff2ab3fe7d1934b08544
|
refs/heads/master
| 2020-04-15T12:18:17.833105
| 2019-01-20T05:14:34
| 2019-01-20T05:14:34
| 164,668,548
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,914
|
java
|
package com.bawei.dell.myshoppingapp.show.home.adpter;
import android.content.Context;
import android.content.Intent;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.bawei.dell.myshoppingapp.R;
import com.bawei.dell.myshoppingapp.show.home.activity.GoodsDetailedActivity;
import com.bawei.dell.myshoppingapp.show.home.bean.HomeGoodsMoreBean;
import com.bumptech.glide.Glide;
import java.util.ArrayList;
import java.util.List;
public class HomeGoodsMoreAdpter extends RecyclerView.Adapter<HomeGoodsMoreAdpter.ViewHolder> {
private List<HomeGoodsMoreBean.ResultBean> mList;
private Context mContext;
public HomeGoodsMoreAdpter(Context mContext) {
this.mContext = mContext;
mList = new ArrayList<>();
}
public void setmList(List<HomeGoodsMoreBean.ResultBean> list) {
mList.clear();
if (list!=null){
mList.addAll(list);
}
notifyDataSetChanged();
}
public void addmList(List<HomeGoodsMoreBean.ResultBean> list) {
if (list!=null){
mList.addAll(list);
}
notifyDataSetChanged();
}
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
View view = View.inflate(mContext,R.layout.home_more_item,null);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull ViewHolder viewHolder, final int i) {
viewHolder.moresales.setText("已售"+mList.get(i).getSaleNum()+"件");
viewHolder.moreprice.setText("¥"+mList.get(i).getPrice());
viewHolder.moretitle.setText(mList.get(i).getCommodityName());
Glide.with(mContext).load(mList.get(i).getMasterPic()).into(viewHolder.moreaImage);
viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(mContext,GoodsDetailedActivity.class);
intent.putExtra("id",mList.get(i).getCommodityId());
mContext.startActivity(intent);
}
});
}
@Override
public int getItemCount() {
return mList.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
private ImageView moreaImage;
private TextView moreprice,moretitle,moresales;
public ViewHolder(@NonNull View itemView) {
super(itemView);
moreaImage = itemView.findViewById(R.id.home_moregs_icon);
moreprice = itemView.findViewById(R.id.home_moregs_price);
moretitle = itemView.findViewById(R.id.home_moregs_title);
moresales = itemView.findViewById(R.id.home_moregs_sales);
}
}
}
|
[
"2451528553@qq.com"
] |
2451528553@qq.com
|
0fe573955f42e6f808d09de210527dc1378d4c81
|
f63be396d0e0a81fc7e14318cf91bf7b40eebe92
|
/util/src/main/java/com/epam/deltix/util/concurrent/IntermittentlyAvailableResource.java
|
589d74ceea8d6d41ca2ab6fd8975f7b230e6618a
|
[
"Apache-2.0"
] |
permissive
|
joshuaulrich/TimeBaseCommons
|
448c1c7ae3ada5b2cc9b703a9d1a757c7d4d4ead
|
36bc25216222939aaa3d19852a81983a7bf8062f
|
refs/heads/main
| 2023-06-08T09:45:23.456968
| 2021-06-29T09:21:18
| 2021-06-29T09:21:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,096
|
java
|
/*
* Copyright 2021 EPAM Systems, Inc
*
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. 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.epam.deltix.util.concurrent;
/**
* A resource that changes its state between available and unavailable.
* Usage (assuming "resource" implements IntermittentlyAvailableResource):
*<pre>
*resource.setAvailabilityListener (
* new Runnable () {
* public void run () {
* synchronized (myLock) {
* myLock.notify ();
* }
* }
* }
*);
*...
*synchronized (myLock) {
* try {
* resource.criticalOperation ();
* } catch (UnavailableResourceException x) {
* // do something like myLock.wait ()...
* }
*}
*</pre>
*
* Note that it is absolutely critical to synchronize the <tt>maybeAvailable</tt> runnable
* callback on the same monitor as the critical operation call. This ensures
* that, while UnavailableResourceException is being handled and the resource is
* removed from the available pool, an opposite call to maybeAvailable cannot be
* made.
*/
public interface IntermittentlyAvailableResource {
/**
* Installs the (only) availability listener.
*
* @param maybeAvailable The listener to be notified when the
* resource may have become available after the critical operation
* threw an UnavailableResourceException.
*/
public void setAvailabilityListener (Runnable maybeAvailable);
}
|
[
"akarpovich@deltixlab.com"
] |
akarpovich@deltixlab.com
|
d2229765c5b250118bc152d649d57014f468003c
|
359e776dfb4eb57b7acfdb738bdfb9a4a485e514
|
/jse/src/api01/lang/object/HashcodeDemo.java
|
f8379fce9193a42f99fc1f7b72863851025a0acb
|
[] |
no_license
|
skatjrdyd/jse
|
2021f516f53731e0bd88ca0fba5d0c0fe5333e45
|
ccf00ceedef79ba832c855556c80230ca41848ff
|
refs/heads/master
| 2021-01-01T19:30:27.598131
| 2015-06-03T02:45:07
| 2015-06-03T02:45:07
| 35,396,815
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 711
|
java
|
package api01.lang.object;
/*
해싱(Hashing) 기법에 사용되는 해시함수(hash function)을 구현한 것
해싱은 다량의 데이터를 저장하고 검색하는데 사용되는 데이터 관리기법.
예) 트위터의 해시태그 #관심사항 이렇게 태그를 달아놓으면
"관심사항" 이라는 키워드로 검색하면 일치하는 해시태그를
맵핑한 항목들이 리턴됨.
* */
public class HashcodeDemo {
public static void main(String[] args) {
String abc = new String("abc");
String abc2 = "abc";
System.out.println("abc의 해시코드 : " + abc.hashCode());
System.out.println("abc2의 해시코드 : " + abc2.hashCode());
}
}
|
[
"Administrator@MSDN-SPECIAL"
] |
Administrator@MSDN-SPECIAL
|
7d325a971224083541f780f0bece4065434bd62b
|
00a5b76165d01f44c7154c0f781220a82a0bf722
|
/water-link/src/main/java/com/haocang/waterlink/home/widgets/CustomViewPager.java
|
6872fe94494fd13e9650c763904d9f572dbc6511
|
[] |
no_license
|
dylan2021/QD
|
821db48c55b065a48e648d919b5f7817e2096dd6
|
8d57e14ccf0021fc1e370e69884730bd6557263a
|
refs/heads/main
| 2023-02-08T21:13:55.915516
| 2020-12-30T06:17:59
| 2020-12-30T06:17:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,387
|
java
|
package com.haocang.waterlink.home.widgets;
import android.content.Context;
import androidx.viewpager.widget.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.widget.LinearLayout;
import java.util.HashMap;
import java.util.LinkedHashMap;
/**
* Created by ding on 2018/4/3.
*/
public class CustomViewPager extends ViewPager {
private int current;
private int height = 0;
/**
* 保存position与对于的View
*/
private HashMap<Integer, View> mChildrenViews = new LinkedHashMap<>();
private boolean scrollble = true;
public CustomViewPager(Context context) {
super(context);
}
public CustomViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
if (mChildrenViews.size() > current) {
View child = mChildrenViews.get(current);
if (child != null) {
child.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
height = child.getMeasuredHeight();
}
}
heightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY);
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
public void resetHeight(int current) {
this.current = current;
if (mChildrenViews.size() > current) {
LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) getLayoutParams();
if (layoutParams == null) {
layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, height);
} else {
layoutParams.height = height;
}
setLayoutParams(layoutParams);
}
}
/**
* 保存position与对于的View
*/
public void setObjectForPosition(View view, int position) {
mChildrenViews.put(position, view);
}
@Override
public boolean onTouchEvent(MotionEvent ev) {
if (!scrollble) {
return true;
}
return super.onTouchEvent(ev);
}
public boolean isScrollble() {
return scrollble;
}
public void setScrollble(boolean scrollble) {
this.scrollble = scrollble;
}
}
|
[
"157308001@qq.com"
] |
157308001@qq.com
|
4c7537146b310a75d4aeff16fefdca8df8d0da43
|
45ae550416c4891e59c99b9372185ebd78ff1998
|
/src/jAwt/No11_9/SerialSelection.java
|
9a5f81c5d03ffbc188114ae9f41def26ddc37e26
|
[] |
no_license
|
HenryXi/javaCrazy
|
5cf79da2aa990bfe940f6245ac8b957a09a00f6c
|
007712f9c912e0ef9078a9c442140aff7a3184bb
|
refs/heads/master
| 2016-09-06T08:10:26.941483
| 2016-01-07T10:37:10
| 2016-01-07T10:37:10
| 39,567,352
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,452
|
java
|
package jAwt.No11_9;
import java.io.*;
import java.awt.datatransfer.*;
/**
* Description:
* <br/>Copyright (C), 2005-2008, Yeeku.H.Lee
* <br/>This program is protected by copyright laws.
* <br/>Program Name:
* <br/>Date:
* @author Yeeku.H.Lee kongyeeku@163.com
* @version 1.0
*/
public class SerialSelection implements Transferable
{
private Serializable obj;
public SerialSelection(Serializable obj)
{
this.obj = obj;
}
public DataFlavor[] getTransferDataFlavors()
{
DataFlavor[] flavors = new DataFlavor[2];
//获取被封装对象的类型
Class clazz = obj.getClass();
String mimeType = "application/x-java-serialized-object;class=" + clazz.getName();
try
{
flavors[0] = new DataFlavor(mimeType);
flavors[1] = DataFlavor.stringFlavor;
return flavors;
}
catch (ClassNotFoundException e)
{
return null;
}
}
public Object getTransferData(DataFlavor flavor)
throws UnsupportedFlavorException
{
if(!isDataFlavorSupported(flavor))
{
throw new UnsupportedFlavorException(flavor);
}
if (flavor.equals(DataFlavor.stringFlavor))
{
return obj.toString();
}
return obj;
}
public boolean isDataFlavorSupported(DataFlavor flavor)
{
return flavor.equals(DataFlavor.stringFlavor) ||
flavor.getPrimaryType().equals("application")
&& flavor.getSubType().equals("x-java-serialized-object")
&& flavor.getRepresentationClass().isAssignableFrom(obj.getClass());
}
}
|
[
"xxy668@foxmail.com"
] |
xxy668@foxmail.com
|
6aff30f72377aa06dee4973def9aca13d8603889
|
95fd603f550049e0f5c24c71038e1c1b4eccfbdc
|
/FirstAid/app/src/main/java/com/shadiih/firstaid1/FirstAidIconsItems.java
|
231a73dcef994eb4d257420d59385ea133313634
|
[] |
no_license
|
walteranyika/personal
|
765e8166941aec592c1e6906f52caaa46cbd0811
|
95e33895071ba886c8d881959ca7d1606ee97159
|
refs/heads/master
| 2021-01-10T01:35:09.131696
| 2015-11-13T07:58:15
| 2015-11-13T07:58:15
| 45,545,830
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 317
|
java
|
package com.shadiih.firstaid1;
public class FirstAidIconsItems {
private String title;
private int poster;
public FirstAidIconsItems(String title, int poster){
this.title=title;
this.poster=poster;
}
public String getTitle(){
return title;
}
public int getPoster(){
return poster;
}
}
|
[
"walteranyika@gmail.com"
] |
walteranyika@gmail.com
|
019862bd607f5b711c3df3fbc85851b416234839
|
5a1ef36056876177acf2db21c9e8f70e1c5a0cae
|
/app/src/main/java/com/yxld/yxchuangxin/ui/activity/rim/module/RimXinZhouBianModule.java
|
a1284c305ec5a4ff75eebdd9a2c43fbdf277c7ce
|
[] |
no_license
|
afjzwed/xinshequ
|
c9473bb01722ccae42e5cebe1c4002fdea2f5202
|
7b5e2cdf942c00c1ad941fc6e3aa59a12508e96b
|
refs/heads/master
| 2021-06-29T14:07:49.765564
| 2019-04-15T05:51:53
| 2019-04-15T05:51:53
| 132,833,339
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,227
|
java
|
package com.yxld.yxchuangxin.ui.activity.rim.module;
import com.yxld.yxchuangxin.data.api.HttpAPIWrapper;
import com.yxld.yxchuangxin.ui.activity.base.ActivityScope;
import com.yxld.yxchuangxin.ui.activity.rim.RimXinZhouBianFragment;
import com.yxld.yxchuangxin.ui.activity.rim.contract.RimXinZhouBianContract;
import com.yxld.yxchuangxin.ui.activity.rim.presenter.RimXinZhouBianPresenter;
import dagger.Module;
import dagger.Provides;
/**
* @author wwx
* @Package com.yxld.yxchuangxin.ui.activity.rim
* @Description: The moduele of RimXinZhouBianFragment, provide field for RimXinZhouBianFragment
* @date 2017/06/16
*/
@Module
public class RimXinZhouBianModule {
private final RimXinZhouBianContract.View mView;
public RimXinZhouBianModule(RimXinZhouBianContract.View view) {
this.mView = view;
}
@Provides
@ActivityScope
public RimXinZhouBianPresenter provideRimXinZhouBianPresenter(HttpAPIWrapper httpAPIWrapper) {
return new RimXinZhouBianPresenter(httpAPIWrapper, mView);
}
@Provides
@ActivityScope
public RimXinZhouBianFragment provideRimXinZhouBianFragment() {
return (RimXinZhouBianFragment) mView;
}
}
|
[
"afjzwed@163.com"
] |
afjzwed@163.com
|
d2e7d0f42ae962d940aac9862f7c25ce920648d3
|
d171ac583cabfc6eb2b8d5e65448c42b6a50fa32
|
/src/server/maps/MapleMist.java
|
0da2006444b93b5ff3065eba3212072ed67710a5
|
[
"MIT"
] |
permissive
|
marcosppastor/MSV83
|
0d1d5b979f1591d12181ab4de160361881878145
|
f7df1ad6878b4b03f660beabd4b82575b143ba3a
|
refs/heads/main
| 2023-07-18T12:16:21.304766
| 2023-06-25T13:28:23
| 2023-06-25T13:28:23
| 385,090,216
| 5
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,425
|
java
|
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3 as published by
the Free Software Foundation. You may not use, modify or distribute
this program under any other version of the GNU Affero General Public
License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package server.maps;
import client.MapleCharacter;
import client.MapleClient;
import client.Skill;
import client.SkillFactory;
import java.awt.Point;
import java.awt.Rectangle;
import server.MapleStatEffect;
import server.life.MapleMonster;
import server.life.MobSkill;
import tools.MaplePacketCreator;
/**
*
* @author LaiLaiNoob
*/
public class MapleMist extends AbstractMapleMapObject {
private Rectangle mistPosition;
private MapleCharacter owner = null;
private MapleMonster mob = null;
private MapleStatEffect source;
private MobSkill skill;
private boolean isMobMist, isPoisonMist;
private int skillDelay;
public MapleMist(Rectangle mistPosition, MapleMonster mob, MobSkill skill) {
this.mistPosition = mistPosition;
this.mob = mob;
this.skill = skill;
isMobMist = true;
isPoisonMist = true;
skillDelay = 0;
}
public MapleMist(Rectangle mistPosition, MapleCharacter owner, MapleStatEffect source) {
this.mistPosition = mistPosition;
this.owner = owner;
this.source = source;
this.skillDelay = 8;
this.isMobMist = false;
switch (source.getSourceId()) {
case 4221006: // Smoke Screen
isPoisonMist = false;
break;
case 2111003: // FP mist
case 12111005: // Flame Gear
case 14111006: // Poison Bomb
isPoisonMist = true;
break;
}
}
@Override
public MapleMapObjectType getType() {
return MapleMapObjectType.MIST;
}
@Override
public Point getPosition() {
return mistPosition.getLocation();
}
public Skill getSourceSkill() {
return SkillFactory.getSkill(source.getSourceId());
}
public boolean isMobMist() {
return isMobMist;
}
public boolean isPoisonMist() {
return isPoisonMist;
}
public int getSkillDelay() {
return skillDelay;
}
public MapleMonster getMobOwner() {
return mob;
}
public MapleCharacter getOwner() {
return owner;
}
public Rectangle getBox() {
return mistPosition;
}
@Override
public void setPosition(Point position) {
throw new UnsupportedOperationException();
}
public final byte[] makeDestroyData() {
return MaplePacketCreator.removeMist(getObjectId());
}
public final byte[] makeSpawnData() {
if (owner != null) {
return MaplePacketCreator.spawnMist(getObjectId(), owner.getId(), getSourceSkill().getId(), owner.getSkillLevel(SkillFactory.getSkill(source.getSourceId())), this);
}
return MaplePacketCreator.spawnMist(getObjectId(), mob.getId(), skill.getSkillId(), skill.getSkillLevel(), this);
}
public final byte[] makeFakeSpawnData(int level) {
if (owner != null) {
return MaplePacketCreator.spawnMist(getObjectId(), owner.getId(), getSourceSkill().getId(), level, this);
}
return MaplePacketCreator.spawnMist(getObjectId(), mob.getId(), skill.getSkillId(), skill.getSkillLevel(), this);
}
@Override
public void sendSpawnData(MapleClient client) {
client.announce(makeSpawnData());
}
@Override
public void sendDestroyData(MapleClient client) {
client.announce(makeDestroyData());
}
public boolean makeChanceResult() {
return source.makeChanceResult();
}
}
|
[
"marcosppastor@gmail.com"
] |
marcosppastor@gmail.com
|
1701ae0e616ea7d9c53269a019729bcec0a93d4e
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-12855-29-17-PESA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/store/hibernate/query/HqlQueryExecutor_ESTest.java
|
ada24d2f287da11aac8d425767e50797019653e3
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 574
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sat Apr 04 08:52:34 UTC 2020
*/
package com.xpn.xwiki.store.hibernate.query;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class HqlQueryExecutor_ESTest extends HqlQueryExecutor_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
0c5cea32123b260863f96cc445ac9e8d0c8ec87f
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/dts-20200101/src/main/java/com/aliyun/dts20200101/models/DescribeSubscriptionInstanceStatusRequest.java
|
94db4026f116ea33739f76471466c1843a98e511
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,996
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.dts20200101.models;
import com.aliyun.tea.*;
public class DescribeSubscriptionInstanceStatusRequest extends TeaModel {
/**
* <p>The ID of the Alibaba Cloud account. You do not need to specify this parameter because this parameter will be removed in the future.</p>
*/
@NameInMap("AccountId")
public String accountId;
@NameInMap("OwnerId")
public String ownerId;
@NameInMap("RegionId")
public String regionId;
/**
* <p>The ID of the change tracking instance. You can call the [DescribeSubscriptionInstances](~~49442~~) operation to query the instance ID.</p>
*/
@NameInMap("SubscriptionInstanceId")
public String subscriptionInstanceId;
public static DescribeSubscriptionInstanceStatusRequest build(java.util.Map<String, ?> map) throws Exception {
DescribeSubscriptionInstanceStatusRequest self = new DescribeSubscriptionInstanceStatusRequest();
return TeaModel.build(map, self);
}
public DescribeSubscriptionInstanceStatusRequest setAccountId(String accountId) {
this.accountId = accountId;
return this;
}
public String getAccountId() {
return this.accountId;
}
public DescribeSubscriptionInstanceStatusRequest setOwnerId(String ownerId) {
this.ownerId = ownerId;
return this;
}
public String getOwnerId() {
return this.ownerId;
}
public DescribeSubscriptionInstanceStatusRequest setRegionId(String regionId) {
this.regionId = regionId;
return this;
}
public String getRegionId() {
return this.regionId;
}
public DescribeSubscriptionInstanceStatusRequest setSubscriptionInstanceId(String subscriptionInstanceId) {
this.subscriptionInstanceId = subscriptionInstanceId;
return this;
}
public String getSubscriptionInstanceId() {
return this.subscriptionInstanceId;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
99dfccbb2a283676cb915397c71d0a3d64133363
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-ws/results/XWIKI-13196-7-14-Single_Objective_GGA-WeightedSum/org/xwiki/search/solr/internal/reference/DefaultSolrReferenceResolver_ESTest_scaffolding.java
|
d75b2772b2c6d21c2daa5377ecdc703c11c82ee9
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 473
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Mar 31 09:18:35 UTC 2020
*/
package org.xwiki.search.solr.internal.reference;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class DefaultSolrReferenceResolver_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
b3d9bbf8390b545ca253f01628d90f6bc91c0a19
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Maven/Maven819.java
|
a7120af283a33ba2eab8df0168e53988ec7a84f2
|
[] |
no_license
|
saber13812002/DeepCRM
|
3336a244d4852a364800af3181e03e868cf6f9f5
|
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
|
refs/heads/master
| 2023-03-16T00:08:06.473699
| 2018-04-18T05:29:50
| 2018-04-18T05:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 934
|
java
|
public void checkRequiredMavenVersion( PluginDescriptor pluginDescriptor )
throws PluginIncompatibleException
{
String requiredMavenVersion = pluginDescriptor.getRequiredMavenVersion();
if ( StringUtils.isNotBlank( requiredMavenVersion ) )
{
try
{
if ( !runtimeInformation.isMavenVersion( requiredMavenVersion ) )
{
throw new PluginIncompatibleException( pluginDescriptor.getPlugin(),
"The plugin " + pluginDescriptor.getId()
+ " requires Maven version " + requiredMavenVersion );
}
}
catch ( RuntimeException e )
{
logger.warn( "Could not verify plugin's Maven prerequisite: " + e.getMessage() );
}
}
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.