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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e7eeb1282de4374e85aacb7eceec8da1a3925651
|
3ebc16af2ccb7a10855ec1008669ebce3c6f7af3
|
/jfinal_maven/src/main/java/com/demo/service/MenuService.java
|
257c27f5a489a57dc3b752a27cea5551ff2eda0c
|
[] |
no_license
|
abook23/maven
|
4c5e5333f3ece1ba0104643cd7218e20a71f0dfb
|
1d84375e6db9fe8a2a96fccbd1b43ed2ae2e86c9
|
refs/heads/master
| 2021-01-12T05:48:22.383169
| 2016-12-23T09:12:37
| 2016-12-23T09:12:39
| 77,202,475
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 409
|
java
|
package com.demo.service;
import java.util.List;
import javax.management.relation.Role;
import com.demo.common.model.Menu;
import com.demo.common.model.UserMenu;
public class MenuService {
public static List<Menu> list(String userId) {
String sql = "select m.menuId,m.pId,m.name,m.url from menu m,user_menu um where um.userId = '"+userId+"' and m.menuId = um.menuId";
return Menu.dao.find(sql);
}
}
|
[
"abook23@163.com"
] |
abook23@163.com
|
58401c2b691e551ff3d60a13dbf450c212fbf644
|
94228df04c8d71ef72d0278ed049e9eac43566bc
|
/modules/regionalprogress-collect/regionalprogress-collect-api/src/main/java/com/bjike/goddess/regionalprogresscollect/bo/MonthTargetBO.java
|
a5634b1d61237f39ba19adb89df491611e6ee80e
|
[] |
no_license
|
yang65700/goddess-java
|
b1c99ac4626c29651250969d58d346b7a13eb9ad
|
3f982a3688ee7c97d8916d9cb776151b5af8f04f
|
refs/heads/master
| 2021-04-12T11:10:39.345659
| 2017-09-12T02:32:51
| 2017-09-12T02:32:51
| 126,562,737
| 0
| 0
| null | 2018-03-24T03:33:53
| 2018-03-24T03:33:53
| null |
UTF-8
|
Java
| false
| false
| 6,324
|
java
|
package com.bjike.goddess.regionalprogresscollect.bo;
import com.bjike.goddess.common.api.bo.BaseBO;
/**
* 月指标业务传输对象
*
* @Author: [ dengjunren ]
* @Date: [ 2017-05-17 03:13 ]
* @Description: [ 月指标业务传输对象 ]
* @Version: [ v1.0.0 ]
* @Copy: [ com.bjike ]
*/
public class MonthTargetBO extends BaseBO {
/**
* 参考指标
*/
private String targetId;
/**
* 地区
*/
private String area;
/**
* 类别
*/
private String type;
/**
* 节点
*/
private String node;
/**
* 年份
*/
private Integer year;
/**
* 月份
*/
private Integer month;
/**
* 计划每月任务量
*/
private Double monthTask;
/**
* 计划每月人工
*/
private Double monthArtificial;
/**
* 节点标准
*/
private Double standard;
/**
* 计划任务数
*/
private Double taskPlan;
/**
* 实际完工数
*/
private Double taskActual;
/**
* 计划人工
*/
private Double artificialPlan;
/**
* 实际人工
*/
private Double artificialActual;
/**
* 计划任务量人工指标
*/
private Double taskPlanTarget;
/**
* 计划任务量人工指标预警
*/
private Double taskPlanWarn;
/**
* 计划人工完工任务量指标
*/
private Double artificialPlanTarget;
/**
* 计划人工完工任务量指标预警
*/
private Double artificialPlanWarn;
/**
* 实际完工任务量人工指标
*/
private Double taskActualTarget;
/**
* 实际完工任务量人工指标预警
*/
private Double taskActualWarn;
/**
* 实际人工完工任务量指标
*/
private Double artificialActualTarget;
/**
* 实际人工完工任务量指标预警
*/
private Double artificialActualWarn;
/**
* 未完成任务量
*/
private Double undone;
/**
* 实际人工效率
*/
private Double rate;
/**
* 效率差
*/
private Double difference;
public String getTargetId() {
return targetId;
}
public void setTargetId(String targetId) {
this.targetId = targetId;
}
public String getArea() {
return area;
}
public void setArea(String area) {
this.area = area;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getNode() {
return node;
}
public void setNode(String node) {
this.node = node;
}
public Integer getYear() {
return year;
}
public void setYear(Integer year) {
this.year = year;
}
public Integer getMonth() {
return month;
}
public void setMonth(Integer month) {
this.month = month;
}
public Double getMonthTask() {
return monthTask;
}
public void setMonthTask(Double monthTask) {
this.monthTask = monthTask;
}
public Double getMonthArtificial() {
return monthArtificial;
}
public void setMonthArtificial(Double monthArtificial) {
this.monthArtificial = monthArtificial;
}
public Double getStandard() {
return standard;
}
public void setStandard(Double standard) {
this.standard = standard;
}
public Double getTaskPlan() {
return taskPlan;
}
public void setTaskPlan(Double taskPlan) {
this.taskPlan = taskPlan;
}
public Double getTaskActual() {
return taskActual;
}
public void setTaskActual(Double taskActual) {
this.taskActual = taskActual;
}
public Double getArtificialPlan() {
return artificialPlan;
}
public void setArtificialPlan(Double artificialPlan) {
this.artificialPlan = artificialPlan;
}
public Double getArtificialActual() {
return artificialActual;
}
public void setArtificialActual(Double artificialActual) {
this.artificialActual = artificialActual;
}
public Double getTaskPlanTarget() {
return taskPlanTarget;
}
public void setTaskPlanTarget(Double taskPlanTarget) {
this.taskPlanTarget = taskPlanTarget;
}
public Double getTaskPlanWarn() {
return taskPlanWarn;
}
public void setTaskPlanWarn(Double taskPlanWarn) {
this.taskPlanWarn = taskPlanWarn;
}
public Double getArtificialPlanTarget() {
return artificialPlanTarget;
}
public void setArtificialPlanTarget(Double artificialPlanTarget) {
this.artificialPlanTarget = artificialPlanTarget;
}
public Double getArtificialPlanWarn() {
return artificialPlanWarn;
}
public void setArtificialPlanWarn(Double artificialPlanWarn) {
this.artificialPlanWarn = artificialPlanWarn;
}
public Double getTaskActualTarget() {
return taskActualTarget;
}
public void setTaskActualTarget(Double taskActualTarget) {
this.taskActualTarget = taskActualTarget;
}
public Double getTaskActualWarn() {
return taskActualWarn;
}
public void setTaskActualWarn(Double taskActualWarn) {
this.taskActualWarn = taskActualWarn;
}
public Double getArtificialActualTarget() {
return artificialActualTarget;
}
public void setArtificialActualTarget(Double artificialActualTarget) {
this.artificialActualTarget = artificialActualTarget;
}
public Double getArtificialActualWarn() {
return artificialActualWarn;
}
public void setArtificialActualWarn(Double artificialActualWarn) {
this.artificialActualWarn = artificialActualWarn;
}
public Double getUndone() {
return undone;
}
public void setUndone(Double undone) {
this.undone = undone;
}
public Double getRate() {
return rate;
}
public void setRate(Double rate) {
this.rate = rate;
}
public Double getDifference() {
return difference;
}
public void setDifference(Double difference) {
this.difference = difference;
}
}
|
[
"196329217@qq.com"
] |
196329217@qq.com
|
e7c0d490a1fd590717c1b462cffd5f256be16f31
|
17a0cdf44f94a631e0e39300ee04bfbb0f21b2fe
|
/src/main/java/com/hx/dmcp/store/App.java
|
b7b2550aff554dcefaa7054396338aaa592c797c
|
[] |
no_license
|
krisjin/dmcp-store
|
7857cbe3ff2e1b865965b3b045df8640ce042bcf
|
b320be8b4542a859412d52571bb7c267af4ae4f6
|
refs/heads/master
| 2021-01-20T11:20:00.232892
| 2014-11-03T11:34:10
| 2014-11-03T11:34:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 180
|
java
|
package com.hx.dmcp.store;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
System.out.println( "Hello World!" );
}
}
|
[
"krisibm@163.com"
] |
krisibm@163.com
|
bf5636fdcd348f3a42568c0d82e2f8ff0286b8e5
|
64bec7206da39a143226dbaa5fae86eb0d27911f
|
/src/com/javarush/test/level09/lesson02/task05/Solution.java
|
a61be0f2fd457f9f57c97ecc81702114e3333df9
|
[] |
no_license
|
SafonovMikhail/JavaRush-sashamartian-
|
56be153d22d184f475fb5db828122bdcd7909a30
|
448ef9d83aab7131dba55f8b72cd709f287b3f75
|
refs/heads/master
| 2021-06-12T14:00:33.405622
| 2017-02-10T01:12:10
| 2017-02-10T01:12:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 805
|
java
|
package com.javarush.test.level09.lesson02.task05;
/* Метод должен возвращать результат – глубину его стек-трейса
Написать метод, который возвращает результат – глубину его стек трейса – количество методов в нем (количество элементов в списке). Это же число метод должен выводить на экран.
*/
public class Solution
{
public static void main(String[] args) {
System.out.println(getStackTraceDeep());
}
public static int getStackTraceDeep() {
//напишите тут ваш код
int deep = Thread.currentThread().getStackTrace().length;
return deep;
}
}
|
[
"sasha.martian@yandex.ru"
] |
sasha.martian@yandex.ru
|
def9af7e81a05e878f4cf95123ccedc11f97a7a4
|
4e2ece72fa054a7c6c96e2c2a25b47a6e413dab1
|
/ace-gate/ace-gate-ratelimit/src/main/java/com/github/wxiaoqi/gate/ratelimit/config/IUserPrincipal.java
|
a93ce546beee0fd3e75a918949616da8d1b36e77
|
[
"Apache-2.0"
] |
permissive
|
noseparte/hero-kill-web
|
d6099f72eb101b8922a543bc26ac68d78a0cc541
|
b1fac9dbbdc44c87521fe0a24159476853dd9749
|
refs/heads/master
| 2022-06-30T05:55:14.235010
| 2020-03-09T09:08:45
| 2020-03-09T09:08:45
| 245,960,532
| 1
| 2
|
Apache-2.0
| 2022-06-21T02:57:00
| 2020-03-09T06:30:58
|
Java
|
UTF-8
|
Java
| false
| false
| 222
|
java
|
package com.github.wxiaoqi.gate.ratelimit.config;
import javax.servlet.http.HttpServletRequest;
/**
* Created by ace on 2017/9/23.
*/
public interface IUserPrincipal {
String getName(HttpServletRequest request);
}
|
[
"noseparte@aliyun.com"
] |
noseparte@aliyun.com
|
6ecdf93f4fb8ad87bf9334790c26dfecb4e3a0b4
|
4e8d52f594b89fa356e8278265b5c17f22db1210
|
/WebServiceArtifacts/DelayIndexV1SoapService/com/conducivetech/cache/delayindex/service/v1/RequestedInteger.java
|
7a48e207276c0c497e4fe9b132ac87d48ea24845
|
[] |
no_license
|
ouniali/WSantipatterns
|
dc2e5b653d943199872ea0e34bcc3be6ed74c82e
|
d406c67efd0baa95990d5ee6a6a9d48ef93c7d32
|
refs/heads/master
| 2021-01-10T05:22:19.631231
| 2015-05-26T06:27:52
| 2015-05-26T06:27:52
| 36,153,404
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,630
|
java
|
package com.conducivetech.cache.delayindex.service.v1;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for requestedInteger complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="requestedInteger">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="requested" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="interpreted" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
* <element name="error" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "requestedInteger", propOrder = {
"requested",
"interpreted",
"error"
})
public class RequestedInteger {
protected String requested;
protected Integer interpreted;
protected String error;
/**
* Gets the value of the requested property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getRequested() {
return requested;
}
/**
* Sets the value of the requested property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setRequested(String value) {
this.requested = value;
}
/**
* Gets the value of the interpreted property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getInterpreted() {
return interpreted;
}
/**
* Sets the value of the interpreted property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setInterpreted(Integer value) {
this.interpreted = value;
}
/**
* Gets the value of the error property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getError() {
return error;
}
/**
* Sets the value of the error property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setError(String value) {
this.error = value;
}
}
|
[
"ouni_ali@yahoo.fr"
] |
ouni_ali@yahoo.fr
|
d124646df70d986e72f77840a8661c8f9cee4fbb
|
7a1bb60ca85dd388ed50aac2eda2217b75bb23d6
|
/android/app/src/main/java/com/jizhi/jlongg/main/util/DotViewGroup.java
|
ea5ad0b606508bd56c9a78bc13e36ebd66cf2fcf
|
[] |
no_license
|
sqwu/jgj_RN
|
5b8c83891294cf926fe5165b3e0908f375293c94
|
7c8c41c88f10819eda4f8450be3fec3eb5c5edfc
|
refs/heads/master
| 2022-01-08T06:28:47.865575
| 2019-05-28T08:06:04
| 2019-05-28T08:06:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,114
|
java
|
package com.jizhi.jlongg.main.util;
import android.content.Context;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import com.hcs.uclient.utils.DensityUtils;
import com.hcs.uclient.utils.Utils;
import com.jizhi.jlongg.R;
/**
* 功能: ViewPager 小圆点滚动器
* 作者:Administrator
* 时间: 2016-8-18 18:32
*/
public class DotViewGroup extends LinearLayout {
/**
* view集合
*/
private View[] views;
/**
* 当前ViewPager选中的小圆点
*/
private int currentIndex;
public DotViewGroup(Context context) {
super(context);
setGravity(Gravity.CENTER);
}
public DotViewGroup(Context context, AttributeSet attrs) {
super(context, attrs);
setGravity(Gravity.CENTER);
}
/**
* 创建小圆点
*/
public void createDot(int size, Context context) {
views = new View[size];
int margin = DensityUtils.dp2px(context, 5);
for (int i = 0; i < size; i++) {
View dots = new View(context);
LayoutParams params = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
params.rightMargin = i == size - 1 ? 0 : margin;
dots.setLayoutParams(params);
if (i == 0) {
setSelectedViewAttribute(dots);
} else {
setUnSelectedViewAttribute(dots);
}
addView(dots);
views[i] = dots;
}
}
/**
* 设置选中View的属性
*
* @param selectedViewAttribute
*/
private void setSelectedViewAttribute(View selectedViewAttribute) {
int width = DensityUtils.dp2px(getContext(), 15);
int height = DensityUtils.dp2px(getContext(), 3);
ViewGroup.LayoutParams params = selectedViewAttribute.getLayoutParams();
params.width = width;
params.height = height;
selectedViewAttribute.setLayoutParams(params);
Utils.setBackGround(selectedViewAttribute, getResources().getDrawable(R.color.white));
selectedViewAttribute.setAlpha(1.0f);
}
/**
* 设置未选中View的属性
*
* @param unselectedViewAttribute
*/
private void setUnSelectedViewAttribute(View unselectedViewAttribute) {
int width = DensityUtils.dp2px(getContext(), 8);
int height = DensityUtils.dp2px(getContext(), 3);
ViewGroup.LayoutParams params = unselectedViewAttribute.getLayoutParams();
params.width = width;
params.height = height;
unselectedViewAttribute.setLayoutParams(params);
Utils.setBackGround(unselectedViewAttribute, getResources().getDrawable(R.color.white));
unselectedViewAttribute.setAlpha(0.5f);
}
public void setPager(int position) {
if (views != null) {
setUnSelectedViewAttribute(views[currentIndex]);
setSelectedViewAttribute(views[position]);
currentIndex = position;
}
}
}
|
[
"1261545300@qq.com"
] |
1261545300@qq.com
|
165f0c08d3ca69fc60ba560d1230b9b5f8e20ca6
|
fd0d65c7ee45896906e0f428df8ba24879333949
|
/microblog-gateway1/src/main/java/com/microblog/gate/auth/config/AccountAuthentication.java
|
7e244391bc96d3b84945f8b5142287bf753d4f6a
|
[] |
no_license
|
lgjlife/micro-blog
|
d1e04e2433781e81666f78c30f18247ffde1a13a
|
b405ae3913eded607d8b7d2579946fbb864147ed
|
refs/heads/master
| 2022-12-04T02:34:53.486588
| 2020-07-17T09:27:51
| 2020-07-17T09:27:51
| 170,787,235
| 29
| 17
| null | 2022-11-16T12:29:48
| 2019-02-15T02:07:09
|
Java
|
UTF-8
|
Java
| false
| false
| 838
|
java
|
package com.microblog.gate.auth.config;
import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;
import java.util.Collection;
public class AccountAuthentication extends AbstractAuthenticationToken {
/**
*
*/
private static final long serialVersionUID = 1L;
private Object credentials;
private String principal;
public AccountAuthentication(Object credentials, String principal, Collection<? extends GrantedAuthority> authorities) {
super(authorities);
this.credentials = credentials;
this.principal = principal;
}
@Override
public Object getCredentials() {
return this.credentials;
}
@Override
public String getPrincipal() {
return this.principal;
}
}
|
[
"liang_gj17@163.com"
] |
liang_gj17@163.com
|
cbd8613f2ada8890c332a99644f9561ae7e14770
|
54bafa3495c01a9530a662d441d45f35652e062f
|
/src/main/java/cn/promore/bf/unit/WebSocketUtil.java
|
f26243dae4c3efbd7bd68ea7aa38d237f65747f0
|
[] |
no_license
|
zskang/tsj
|
d20f397762d230c487c0c9ce2e7a2863dd83050f
|
0ff6bafec55e77f86097b164fd4f0b48db35eeff
|
refs/heads/master
| 2021-07-13T12:46:51.300209
| 2017-10-18T09:57:45
| 2017-10-18T09:57:52
| 107,389,919
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,583
|
java
|
package cn.promore.bf.unit;
import java.io.IOException;
import java.util.HashMap;
import org.springframework.web.context.ContextLoader;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession;
public class WebSocketUtil {
@SuppressWarnings("unchecked")
public static void sendMsgToUser(String username,String title,String message, String moduleId){
HashMap<String, WebSocketSession> onlineWebSockets = (HashMap<String, WebSocketSession>)ContextLoader.getCurrentWebApplicationContext().getServletContext().getAttribute("__ONLINE_WEBSOCKET__");
if(null!=onlineWebSockets&&onlineWebSockets.size()>0&&null!=onlineWebSockets.get(username)){
WebSocketSession session = onlineWebSockets.get(username);
try {
session.sendMessage(new TextMessage("{\"title\":\""+title+"\",\"moduleId\":\""+moduleId+"\",\"message\":\""+message+"\"}"));
} catch (IOException e) {
e.printStackTrace();
}
}
}
@SuppressWarnings("unchecked")
public static void sendMsgToAllUser(String message) {
HashMap<String, WebSocketSession> onlineWebSockets = (HashMap<String, WebSocketSession>)ContextLoader.getCurrentWebApplicationContext().getServletContext().getAttribute("__ONLINE_WEBSOCKET__");
if(null!=onlineWebSockets&&onlineWebSockets.size()>0){
for(String key:onlineWebSockets.keySet()){
WebSocketSession session = onlineWebSockets.get(key);
try {
if(null!=session&&session.isOpen())session.sendMessage(new TextMessage(message));
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
}
|
[
"253479240@qq.com"
] |
253479240@qq.com
|
8b7e6f43e94b33a1ef81d1c283b309f0b84337fd
|
2bbf204cd1608c6beac4cebb82cb97611699adc5
|
/server/src/main/java/com/shuishou/retailer/printertool/PrintJob.java
|
c3f0c86b6209da2b80e936c6bfc9867cc4951a99
|
[] |
no_license
|
lousongtao/retailerpos
|
a2d991b7925b0687fa020dcad8692ec6070e19ed
|
d25a0131e6a958b219c32d5e6f2e04a675a2d83a
|
refs/heads/master
| 2022-12-22T13:58:34.237026
| 2021-01-30T07:02:56
| 2021-01-30T07:02:56
| 158,353,458
| 0
| 1
| null | 2022-12-16T03:30:42
| 2018-11-20T08:11:37
|
Java
|
UTF-8
|
Java
| false
| false
| 1,068
|
java
|
package com.shuishou.retailer.printertool;
import java.util.Map;
/**
* 打印任务
* @author zhulinfeng
* @时间 2016年9月23日下午12:59:57
*
*/
public class PrintJob {
/**
* 任务类型:0=print together, 1=print separately
*/
private String templateFile;
/**
* 需要打印的参数--可扩展
*/
private Map<String, Object> param;
/**
* 打印机逻辑名称
*/
private String printerName;
public PrintJob(String templateFile, Map<String, Object> param, String printerName) {
this.templateFile = templateFile;
this.param = param;
this.printerName = printerName;
}
public String getTemplateFile() {
return templateFile;
}
public void setTemplateFile(String templateFile) {
this.templateFile = templateFile;
}
public Map<String, Object> getParam() {
return param;
}
public void setParam(Map<String, Object> param) {
this.param = param;
}
public String getPrinterName() {
return printerName;
}
public void setPrinterName(String printerName) {
this.printerName = printerName;
}
}
|
[
"lousongtao@gmail.com"
] |
lousongtao@gmail.com
|
114ccfb400b79cc0ef01b5b045fb75ab2083d1da
|
cc32a64afed91f7186c009d3d1247370a904be1c
|
/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ResourceTag.java
|
d54a10f9aebb099f080aae7f43e9bba1f05508a0
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
rmoult01/hapi_fhir_mir_1
|
5dc5966ce06738872d8e0ddb667d513df76bb3d1
|
93270786e2d30185c41987038f878943cd736e34
|
refs/heads/master
| 2021-07-20T15:58:24.384813
| 2017-10-30T14:36:18
| 2017-10-30T14:36:18
| 106,035,744
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,162
|
java
|
package ca.uhn.fhir.jpa.entity;
/*
* #%L
* HAPI FHIR JPA Server
* %%
* Copyright (C) 2014 - 2017 University Health Network
* %%
* 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.
* #L%
*/
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ForeignKey;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
@Entity
@Table(name = "HFJ_RES_TAG")
public class ResourceTag extends BaseTag {
private static final long serialVersionUID = 1L;
@SequenceGenerator(name = "SEQ_RESTAG_ID", sequenceName = "SEQ_RESTAG_ID")
@GeneratedValue(strategy = GenerationType.AUTO, generator = "SEQ_RESTAG_ID")
@Id
@Column(name = "PID")
private Long myId;
@ManyToOne(cascade = {})
@JoinColumn(name = "RES_ID", referencedColumnName = "RES_ID", foreignKey=@ForeignKey(name="FK_RESTAG_RESOURCE"))
private ResourceTable myResource;
@Column(name = "RES_TYPE", length = ResourceTable.RESTYPE_LEN, nullable = false)
private String myResourceType;
@Column(name = "RES_ID", insertable = false, updatable = false)
private Long myResourceId;
public Long getResourceId() {
return myResourceId;
}
public void setResourceId(Long theResourceId) {
myResourceId = theResourceId;
}
public ResourceTag() {
}
public ResourceTag(ResourceTable theResourceTable, TagDefinition theTag) {
setTag(theTag);
setResource(theResourceTable);
setResourceId(theResourceTable.getId());
setResourceType(theResourceTable.getResourceType());
}
public ResourceTable getResource() {
return myResource;
}
public String getResourceType() {
return myResourceType;
}
public void setResource(ResourceTable theResource) {
myResource = theResource;
}
public void setResourceType(String theResourceType) {
myResourceType = theResourceType;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof ResourceTag)) {
return false;
}
ResourceTag other = (ResourceTag) obj;
EqualsBuilder b = new EqualsBuilder();
b.append(getResourceId(), other.getResourceId());
b.append(getTag(), other.getTag());
return b.isEquals();
}
@Override
public int hashCode() {
HashCodeBuilder b = new HashCodeBuilder();
b.append(getResourceId());
b.append(getTag());
return b.toHashCode();
}
}
|
[
"moultonr@mir.wustl.edu"
] |
moultonr@mir.wustl.edu
|
2a5a4d76a33af03d4fec343a6168d038cd37c79c
|
c4dbc31d013e15c0660938288ab85073a5ba6e3c
|
/net/src/main/java/com/lingxi/net/basenet/execute/NetJobExecute.java
|
7838f98fb7094bf9f701c6674d293783e2f7257d
|
[] |
no_license
|
kenben520/gold
|
7da3fa690b4a25b6c5d80fb982dfc8ac1683b68c
|
b30e224994f03ef5b1f08b4d77f23d113068a287
|
refs/heads/master
| 2020-03-26T11:04:16.471778
| 2018-08-15T08:38:19
| 2018-08-15T08:38:19
| 144,826,699
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 639
|
java
|
package com.lingxi.net.basenet.execute;
import com.lingxi.net.basenet.NetBuilder;
import java.util.Map;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.QueryMap;
import retrofit2.http.Url;
/**
* Created by zhangwei on 2018/3/29.
*/
public interface NetJobExecute {
/**
* 异步网络调用
*
* @param proxy
* @param urlParams
* @return
*/
void asyncExecute(NetBuilder proxy, Map<String, String> urlParams);
void uploadImage(NetBuilder proxy, Map<String, String> urlParams);
}
|
[
"liliqian@lingxiinfo.onaliyun.com"
] |
liliqian@lingxiinfo.onaliyun.com
|
0fb5794afd145e9be44eb3f6613c5ea5e36c71a9
|
96726e8528eaf3d93d58fb3f0267de8dba7799f9
|
/src/argouml-app/src/org/argouml/uml/ui/ActionNewDiagram.java
|
2e5d3f3c8bf3a1bb6195c3f6ebab9db832444e3d
|
[
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive"
] |
permissive
|
marcusvnac/argouml-spl
|
c84d556a98e1a04f01fba3a921db6cb62e519085
|
bcae37308b13b7ee62da0867a77d21a0141a0f18
|
refs/heads/master
| 2021-01-12T20:55:55.500881
| 2015-06-11T19:41:28
| 2015-06-11T19:41:28
| 37,139,993
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,322
|
java
|
// $Id: ActionNewDiagram.java 132 2010-09-26 23:32:33Z marcusvnac $
// Copyright (c) 2006-2008 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
// and this paragraph appear in all copies. This software program and
// documentation are copyrighted by The Regents of the University of
// California. The software program and documentation are supplied "AS
// IS", without any accompanying services from The Regents. The Regents
// does not warrant that the operation of the program will be
// uninterrupted or error-free. The end-user understands that the program
// was developed for research purposes and is advised not to rely
// exclusively on the program for any reason. IN NO EVENT SHALL THE
// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
package org.argouml.uml.ui;
import java.awt.event.ActionEvent;
import javax.swing.Action;
//#if defined(LOGGING)
//@#$LPS-LOGGING:GranularityType:Import
import org.apache.log4j.Logger;
//#endif
import org.argouml.application.helpers.ResourceLoaderWrapper;
import org.argouml.i18n.Translator;
import org.argouml.kernel.Project;
import org.argouml.kernel.ProjectManager;
import org.argouml.model.Model;
import org.argouml.ui.explorer.ExplorerEventAdaptor;
import org.argouml.ui.targetmanager.TargetManager;
import org.argouml.uml.diagram.ArgoDiagram;
import org.tigris.gef.undo.UndoableAction;
/**
* Abstract action to trigger creation of a new diagram. <p>
*
* ArgoUML shall never create a diagram for a read-only modelelement.
* <p>
* TODO: Bobs says, can we merge ActionAddDiagram with this class?
*
* @author michiel
*/
public abstract class ActionNewDiagram extends UndoableAction {
//#if defined(LOGGING)
//@#$LPS-LOGGING:GranularityType:Field
/**
* Logger.
*/
private static final Logger LOG =
Logger.getLogger(ActionNewDiagram.class);
//#endif
/**
* The constructor.
* @param name the i18n key for this action name.
*/
protected ActionNewDiagram(String name) {
super(Translator.localize(name),
ResourceLoaderWrapper.lookupIcon(name));
// Set the tooltip string:
putValue(Action.SHORT_DESCRIPTION,
Translator.localize(name));
}
/*
* @see java.awt.event.ActionListener#actionPerformed(
* java.awt.event.ActionEvent)
*/
@Override
public void actionPerformed(ActionEvent e) {
super.actionPerformed(e);
// TODO: Since there may be multiple top level elements in
// a project, this should be using the default Namespace (currently
// undefined) or something similar
Project p = ProjectManager.getManager().getCurrentProject();
Object ns = findNamespace();
if (ns != null && isValidNamespace(ns)) {
ArgoDiagram diagram = createDiagram(ns);
assert (diagram != null)
: "No diagram was returned by the concrete class";
p.addMember(diagram);
//TODO: make the explorer listen to project member property
//changes... to eliminate coupling on gui.
ExplorerEventAdaptor.getInstance().modelElementAdded(
diagram.getNamespace());
TargetManager.getInstance().setTarget(diagram);
} else {
//#if defined(LOGGING)
//@#$LPS-LOGGING:Localization:NestedStatement
//@#$LPS-LOGGING:GranularityType:Statement
LOG.error("No valid namespace found");
//#endif
throw new IllegalStateException("No valid namespace found");
}
}
/**
* Find the right namespace for the diagram.
*
* @return the namespace or null
*/
protected Object findNamespace() {
Project p = ProjectManager.getManager().getCurrentProject();
return p.getRoot();
}
/**
* @param namespace the namespace in which to create the diagram
* @return the new diagram
*/
protected abstract ArgoDiagram createDiagram(Object namespace);
/**
* Test if the given namespace is a valid namespace to add the diagram to.
* TODO: This method was created to facilitate the merge
* of this class with ActionAddDiagram.
*
* @param ns the namespace to check
* @return Returns <code>true</code> if valid.
*/
public boolean isValidNamespace(Object ns) {
return true;
}
//#if defined(COLLABORATIONDIAGRAM) or defined(SEQUENCEDIAGRAM)
//@#$LPS-COLLABORATIONDIAGRAM:GranularityType:Method
//@#$LPS-SEQUENCEDIAGRAM:GranularityType:Method
/**
* Utility function to create a collaboration.
*
* @return a new collaboration
* @param namespace the back-up namespace to put the collaboration in
*/
protected static Object createCollaboration(Object namespace) {
Object target = TargetManager.getInstance().getModelTarget();
if (Model.getFacade().isAUMLElement(target)
&& Model.getModelManagementHelper().isReadOnly(target)) {
target = namespace;
}
Object collaboration = null;
if (Model.getFacade().isAOperation(target)) {
Object ns = Model.getFacade().getNamespace(
Model.getFacade().getOwner(target));
collaboration =
Model.getCollaborationsFactory().buildCollaboration(ns, target);
} else if (Model.getFacade().isAClassifier(target)) {
Object ns = Model.getFacade().getNamespace(target);
collaboration =
Model.getCollaborationsFactory().buildCollaboration(ns, target);
} else {
collaboration =
Model.getCollaborationsFactory().createCollaboration();
if (Model.getFacade().isANamespace(target)) {
/* TODO: Not all namespaces are useful here - any WFRs? */
namespace = target;
} else {
if (Model.getFacade().isAModelElement(target)) {
Object ns = Model.getFacade().getNamespace(target);
if (Model.getFacade().isANamespace(ns)) {
namespace = ns;
}
}
}
Model.getCoreHelper().setNamespace(collaboration, namespace);
Model.getCoreHelper().setName(collaboration,
"unattachedCollaboration");
}
return collaboration;
}
//#endif
}
|
[
"mtov@dcc.ufmg.br"
] |
mtov@dcc.ufmg.br
|
af0ebe68ac75b5be2144cdb3c774dcd618ac6bab
|
99993cee373542810763c6a037db527b86b0d4ac
|
/fluent/src/main/java/io/kubernetes/client/openapi/models/V1alpha1ResourcePolicyRuleBuilder.java
|
f862a1ef039bf07f6c5f8a0afb8548538084d52f
|
[
"Apache-2.0"
] |
permissive
|
saparaj/java
|
b54c355f2276ac7ac2cd09f2f0cf3212f7c41b2d
|
a7266c798f16ab01e9ceac441de199bd8a5a839a
|
refs/heads/master
| 2023-08-15T19:35:11.163843
| 2021-10-13T16:53:49
| 2021-10-13T16:53:49
| 269,235,029
| 0
| 0
|
Apache-2.0
| 2020-06-04T01:46:44
| 2020-06-04T01:46:43
| null |
UTF-8
|
Java
| false
| false
| 4,092
|
java
|
package io.kubernetes.client.openapi.models;
import io.kubernetes.client.fluent.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class V1alpha1ResourcePolicyRuleBuilder extends io.kubernetes.client.openapi.models.V1alpha1ResourcePolicyRuleFluentImpl<io.kubernetes.client.openapi.models.V1alpha1ResourcePolicyRuleBuilder> implements io.kubernetes.client.fluent.VisitableBuilder<io.kubernetes.client.openapi.models.V1alpha1ResourcePolicyRule,io.kubernetes.client.openapi.models.V1alpha1ResourcePolicyRuleBuilder> {
io.kubernetes.client.openapi.models.V1alpha1ResourcePolicyRuleFluent<?> fluent;
java.lang.Boolean validationEnabled;
public V1alpha1ResourcePolicyRuleBuilder() {
this(true);
}
public V1alpha1ResourcePolicyRuleBuilder(java.lang.Boolean validationEnabled) {
this(new V1alpha1ResourcePolicyRule(), validationEnabled);
}
public V1alpha1ResourcePolicyRuleBuilder(io.kubernetes.client.openapi.models.V1alpha1ResourcePolicyRuleFluent<?> fluent) {
this(fluent, true);
}
public V1alpha1ResourcePolicyRuleBuilder(io.kubernetes.client.openapi.models.V1alpha1ResourcePolicyRuleFluent<?> fluent,java.lang.Boolean validationEnabled) {
this(fluent, new V1alpha1ResourcePolicyRule(), validationEnabled);
}
public V1alpha1ResourcePolicyRuleBuilder(io.kubernetes.client.openapi.models.V1alpha1ResourcePolicyRuleFluent<?> fluent,io.kubernetes.client.openapi.models.V1alpha1ResourcePolicyRule instance) {
this(fluent, instance, true);
}
public V1alpha1ResourcePolicyRuleBuilder(io.kubernetes.client.openapi.models.V1alpha1ResourcePolicyRuleFluent<?> fluent,io.kubernetes.client.openapi.models.V1alpha1ResourcePolicyRule instance,java.lang.Boolean validationEnabled) {
this.fluent = fluent;
fluent.withApiGroups(instance.getApiGroups());
fluent.withClusterScope(instance.getClusterScope());
fluent.withNamespaces(instance.getNamespaces());
fluent.withResources(instance.getResources());
fluent.withVerbs(instance.getVerbs());
this.validationEnabled = validationEnabled;
}
public V1alpha1ResourcePolicyRuleBuilder(io.kubernetes.client.openapi.models.V1alpha1ResourcePolicyRule instance) {
this(instance,true);
}
public V1alpha1ResourcePolicyRuleBuilder(io.kubernetes.client.openapi.models.V1alpha1ResourcePolicyRule instance,java.lang.Boolean validationEnabled) {
this.fluent = this;
this.withApiGroups(instance.getApiGroups());
this.withClusterScope(instance.getClusterScope());
this.withNamespaces(instance.getNamespaces());
this.withResources(instance.getResources());
this.withVerbs(instance.getVerbs());
this.validationEnabled = validationEnabled;
}
public io.kubernetes.client.openapi.models.V1alpha1ResourcePolicyRule build() {
V1alpha1ResourcePolicyRule buildable = new V1alpha1ResourcePolicyRule();
buildable.setApiGroups(fluent.getApiGroups());
buildable.setClusterScope(fluent.getClusterScope());
buildable.setNamespaces(fluent.getNamespaces());
buildable.setResources(fluent.getResources());
buildable.setVerbs(fluent.getVerbs());
return buildable;
}
public boolean equals(java.lang.Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
V1alpha1ResourcePolicyRuleBuilder that = (V1alpha1ResourcePolicyRuleBuilder) o;
if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false;
if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(fluent, validationEnabled, super.hashCode());
}
}
|
[
"bburns@microsoft.com"
] |
bburns@microsoft.com
|
7bc094d92b9fbf19d47068c6341b88f871c2bdfe
|
6451c77ce976b7b927b6345e9dd4c586fd15b317
|
/src/main/java/com/learn/hibernate/model/sparetime/dao/Impl/UserDaoImpl.java
|
7f2ca711fa74bb6135fb1dde58fb0f900606fedb
|
[] |
no_license
|
dixit-anup/maventotalproject
|
eefae3fbc1de085b3057edd87dcb3605f7e8750b
|
2c0f5581d32dd1aa265e455a9447ab7d160cf5f1
|
refs/heads/master
| 2021-01-16T21:57:39.423961
| 2014-08-21T14:58:18
| 2014-08-21T14:58:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,054
|
java
|
package com.learn.hibernate.model.sparetime.dao.Impl;
import com.learn.hibernate.HibernateUtil;
import com.learn.hibernate.model.sparetime.Address;
import com.learn.hibernate.model.sparetime.User;
import com.learn.hibernate.model.sparetime.dao.Dao;
import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.*;
import org.springframework.transaction.annotation.Transactional;
import java.util.Iterator;
import java.util.List;
/**
* Created by IntelliJ IDEA.
* User: bilyk
* Date: 24.07.12
* Time: 18:48
* To change this template use File | Settings | File Templates.
*/
@Transactional
public class UserDaoImpl implements Dao {
SessionFactory sessionFactory = HibernateUtil.getSessionFactory();
Session session = null;
public void save() {
session = sessionFactory.openSession();
session.beginTransaction();
User user2 = new User("dimon77", "03564577");
Address address = new Address("Gorlovka", "Matrosova", 105, 20);
Address address2 = new Address("Harkov", "NovieDoma", 10, 12);
address.setUser(user2);
address2.setUser(user2);
session.save(address);
session.save(address2);
session.save(user2);
session.getTransaction().commit();
session.close();
}
public void addUser(String login, String password, int i) {
session = sessionFactory.openSession();
session.beginTransaction();
User user2 = new User(login, password, i);
session.save(user2);
session.getTransaction().commit();
session.close();
}
public List getEntityList() {
session = sessionFactory.openSession();
Criteria criteria = session.createCriteria(User.class);
List users = criteria.list();
return users;
}
public List getEntityLikeName(String pattern) {
session = sessionFactory.openSession();
Criteria criteria = session.createCriteria(User.class);
// .add(Restrictions.sqlRestriction("lower({alias}.login) like lower(?)", "%8", Hibernate.STRING));
Property age = Property.forName("age");
criteria.add(age.between(50, 60)).addOrder(age.desc()).setMaxResults(10);
criteria.createCriteria("address").add(Restrictions.like("street", "Mat%"));
// criteria.add(Restrictions.or(Restrictions.like("login", "lo%"), Restrictions.disjunction().add(Restrictions.eq("age", 50)).add(Restrictions.eq("age", 55))));
// criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
List users = criteria.list();
return users;
}
public void add200Entities() {
for (int i = 0; i < 200; i++) {
if(i==100){
addUser("name"+i, "password"+i, 30-77+i);
}else{
addUser("name"+i, "password"+i, 30+i);
}
}
}
@Override
public List getAddressOfUser(String s) {
session = sessionFactory.openSession();
Criteria addressCriteria = session.createCriteria(Address.class);
addressCriteria.createCriteria("user").add(Restrictions.eq("age", 0));
List addressList = addressCriteria.list();
return addressList;
}
@Override
public List getUsersByExample() {
session = sessionFactory.openSession();
Criteria criteria = session.createCriteria(User.class);
User user = new User("name18");
return criteria.add(Example.create(user)).list();
// return criteria.list();
}
@Override
public void getUsersByProjection() {
session = sessionFactory.openSession();
Criteria criteria = session.createCriteria(User.class);
List<User> results = session.createCriteria(User.class)
.setProjection(Projections.projectionList()
.add(Projections.avg("age"), "avage")
)
.addOrder( Order.desc("avage") )
.list();
Iterator iterator = results.iterator();
while (iterator.hasNext()) {
System.out.println("");
Object[] objects = (Object[]) iterator.next();
for (int i = 0; i < objects.length; i++) {
System.out.print("|\t" + objects[i] + "\t");
}
}
}
@Override
public int size() {
session = sessionFactory.openSession();
Criteria criteria = session.createCriteria(User.class);
criteria.setProjection(Projections.avg("age"));
return ((Integer) criteria.uniqueResult());
}
@Override
public Double averageAge() {
session = sessionFactory.openSession();
Criteria criteria = session.createCriteria(User.class);
criteria.setProjection(Projections.avg("age"));
return ((Double) criteria.uniqueResult());
}
@Override
public void groupByMethod() {
session = sessionFactory.openSession();
Criteria criteria = session.createCriteria(User.class);
criteria.setProjection(Projections.groupProperty("age"));
List results = criteria.list();
Iterator resultIterator = results.iterator();
Object[] obj = (Object[]) resultIterator.next();
for (int i = 0; i < obj.length; i++) {
System.out.print(obj[i] + "\t");
}
}
@Override
public List<User> testDetachedCriteria() {
DetachedCriteria detachedCriteria = DetachedCriteria.forClass(User.class);
detachedCriteria.add(Restrictions.eq("age", 100));
session = sessionFactory.openSession();
List<User> users = (List<User>) detachedCriteria.getExecutableCriteria(session).list();
return users;
}
@Override
public List<Address> selectAddressWithUser() {
session = sessionFactory.openSession();
Criteria criteria = session.createCriteria(Address.class);
criteria.createCriteria("user").add(Restrictions.eq("id", 3L));
return criteria.list();
}
}
|
[
"dmitry.bilyk@gmail.com"
] |
dmitry.bilyk@gmail.com
|
1487d91afb704a1dcc02b7dddba10d34bbf5b2cd
|
6ed973a3d7de6e384a6aaa11492923cb1ae23d19
|
/platform/com.netifera.platform.host/com.netifera.platform.host.processes.ui/src/com/netifera/platform/host/processes/ui/ProcessListContentProvider.java
|
43c656baa7d88ff72a5ca32a8de484d2045b8473
|
[] |
no_license
|
juli/netifera
|
e598445a11109e0d0dac48577befcef3835fa4c6
|
d70fcaa92bfbe299b924314a10991d4445d96cd0
|
refs/heads/master
| 2020-12-25T08:19:23.881797
| 2009-07-15T01:03:08
| 2009-07-15T01:03:08
| 180,060
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,260
|
java
|
package com.netifera.platform.host.processes.ui;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import com.netifera.platform.host.internal.processes.ui.Activator;
import com.netifera.platform.host.processes.IProcessManager;
import com.netifera.platform.host.processes.Process;
;public class ProcessListContentProvider implements ITreeContentProvider {
private TreeViewer viewer;
private IProcessManager processManager;
private Process[] roots;
private boolean treeMode = false;
public Object[] getChildren(Object o) {
if (!treeMode || !(o instanceof Process) || (roots == null))
return new Object[0];
Process parent = (Process) o;
List<Process> children = new ArrayList<Process>();
for (Process process: roots) {
if (process.getPPID() == parent.getPID())
children.add(process);
}
return children.toArray(new Process[children.size()]);
}
public Process getParent(Object o) {
if (!treeMode || !(o instanceof Process) || (roots == null))
return null;
for (Process process: roots)
if (process.getPID() == ((Process)o).getPPID())
return process;
return null;
}
public boolean hasChildren(Object o) {
if (!treeMode || !(o instanceof Process) || (roots == null))
return false;
for (Process process: roots)
if (process.getPPID() == ((Process)o).getPID())
return true;
return false;
}
public Object[] getElements(final Object input) {
if(input != processManager) {
throw new IllegalArgumentException();
}
if (roots == null) {
new Thread(new Runnable() {
public void run() {
try {
final Process[] children = processManager.getProcessList();
viewer.getControl().getDisplay().syncExec(new Runnable() {
public void run() {
if (processManager != input)
return;
roots = children;
viewer.refresh(true);
}
});
} catch (Exception e) {
showException(e);
}
}
}).start();
return new String[] {"Loading..."};
}
if (!treeMode)
return roots.clone();
List<Process> elements = new ArrayList<Process>();
for (Process process: roots) {
if (getParent(process) == null)
elements.add(process);
}
return elements.toArray(new Process[elements.size()]);
}
public void dispose() {
// TODO Auto-generated method stub
}
public void clear() {
roots = null;
}
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
this.viewer = (TreeViewer) viewer;
processManager = (IProcessManager) newInput;
clear();
}
public void setTreeMode(boolean enabled) {
treeMode = enabled;
}
public boolean isTreeMode() {
return treeMode;
}
private void showException(Exception e) {
final String message = e.getMessage() != null ? e.getMessage() : e.toString();
/* if (view != null)
viewer.getControl().getDisplay().syncExec(new Runnable() {
public void run() {
if (view != null)
view.showMessage("Error: "+message);
else
Activator.getInstance().getBalloonManager().error(message);
}
});
else
*/ Activator.getInstance().getBalloonManager().error(message);
}
}
|
[
"bruce@netifera.com"
] |
bruce@netifera.com
|
e1a3f02bd9e650a12787d088c4a2db4ab2948ec5
|
8bc8e94e7d9d2a6c6aaae2a03b1280a1baa5dd23
|
/src/apple/corefoundation/enums/__CFByteOrder.java
|
c5d846d623b4cc5d37ee3fffe6801a091be4a780
|
[] |
no_license
|
VadimZharkov/natj-mac-example
|
fd5eb814371bde26d7b77c54edbeebb3fa667851
|
94af6b2c1d01fb3f9ebd28550d5996fe49fe3ddc
|
refs/heads/master
| 2020-06-22T00:09:07.333774
| 2019-07-18T12:44:25
| 2019-07-18T12:44:25
| 197,585,255
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 960
|
java
|
/*
Copyright 2014-2016 Intel Corporation
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 apple.corefoundation.enums;
import org.moe.natj.general.ann.Generated;
@Generated
public final class __CFByteOrder {
@Generated
private __CFByteOrder() {
}
@Generated
public static final int CFByteOrderUnknown = 0x00000000;
@Generated
public static final int CFByteOrderLittleEndian = 0x00000001;
@Generated
public static final int CFByteOrderBigEndian = 0x00000002;
}
|
[
"vadim.zharkov@gmail.com"
] |
vadim.zharkov@gmail.com
|
280328daaac6d42753e44e61257dc415932f158c
|
c14c8f5b775b2958f8c87e4b451b7d724f290459
|
/app/src/main/java/com/atta/myshop/ui/dashboard/DashboardFragment.java
|
577ce16dba16020b2a7bef2e0fb0651e9a38214c
|
[] |
no_license
|
MostafaAtta/MyShop
|
a83793f7cb4b6ecbc9d22b27c97f8dd8a4f46665
|
3d11da974493ee8009959f7c87511f246dfb070c
|
refs/heads/master
| 2023-01-20T22:55:58.135567
| 2020-11-30T17:16:45
| 2020-11-30T17:16:45
| 317,294,275
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 720
|
java
|
package com.atta.myshop.ui.dashboard;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import com.atta.myshop.R;
public class DashboardFragment extends Fragment {
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
View root = inflater.inflate(R.layout.fragment_dashboard, container, false);
return root;
}
}
|
[
"mostafa.sa.atta@gmail.com"
] |
mostafa.sa.atta@gmail.com
|
295701e0cc072663f72f85c250849bde6a495aae
|
2c8b57f21b11c0b488c8c1e5e361c7aa0694608c
|
/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/async/queue/WatermarkQueueEntry.java
|
c9c6e7480c7b80b8163e75a005a55248e086623b
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"MIT",
"OFL-1.1",
"ISC"
] |
permissive
|
proteus-h2020/proteus-engine
|
69c84e94d0facbc6f1d287c2abf36cc3309042c1
|
8ab50f5c97b5da8492944a1784564342b41b4078
|
refs/heads/proteus-dev
| 2021-05-04T01:09:18.776847
| 2018-03-19T18:57:38
| 2018-04-11T17:41:52
| 71,119,502
| 12
| 7
|
Apache-2.0
| 2018-04-11T17:41:54
| 2016-10-17T09:04:09
|
Java
|
UTF-8
|
Java
| false
| false
| 1,598
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.flink.streaming.api.operators.async.queue;
import org.apache.flink.annotation.Internal;
import org.apache.flink.streaming.api.watermark.Watermark;
import java.util.concurrent.CompletableFuture;
/**
* {@link StreamElementQueueEntry} implementation for the {@link Watermark}.
*/
@Internal
public class WatermarkQueueEntry extends StreamElementQueueEntry<Watermark> implements AsyncWatermarkResult {
private final CompletableFuture<Watermark> future;
public WatermarkQueueEntry(Watermark watermark) {
super(watermark);
this.future = CompletableFuture.completedFuture(watermark);
}
@Override
public Watermark getWatermark() {
return (Watermark) getStreamElement();
}
@Override
protected CompletableFuture<Watermark> getFuture() {
return future;
}
}
|
[
"trohrmann@apache.org"
] |
trohrmann@apache.org
|
321dc41829a9967eeeeaf5f4dd2cd14426b27f9d
|
7ff3675b3433ae41a100846a8dd5eec45bcea233
|
/library/src/main/java/com/github/ksoichiro/android/observablescrollview/ObservableScrollViewCallbacks.java
|
1c3aa5167ad945a0ff1b3c6351cd99f158ba4401
|
[] |
no_license
|
Shankar1056/etodo
|
18cb7dd6a6100226af9d04c6616c7b51bcd55348
|
bb6413c76998be8fe5b98bf7c23193da624f0126
|
refs/heads/master
| 2021-10-10T15:31:21.352234
| 2019-01-13T06:39:31
| 2019-01-13T06:39:31
| 104,873,442
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,742
|
java
|
/*
* Copyright 2014 Soichiro Kashima
*
* 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.github.ksoichiro.android.observablescrollview;
/**
* Callbacks for Scrollable widgets.
*/
public interface ObservableScrollViewCallbacks {
/**
* Called when the scroll change events occurred.
* <p>This won't be called just after the view is laid out, so if you'd like to
* initialize the position of your views with this method, you should call this manually
* or invoke scroll as appropriate.</p>
*
* @param scrollY Scroll position in Y axis.
* @param firstScroll True when this is called for the first time in the consecutive motion events.
* @param dragging True when the view is dragged and false when the view is scrolled in the inertia.
*/
void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging);
/**
* Called when the down motion event occurred.
*/
void onDownMotionEvent();
/**
* Called when the dragging ended or canceled.
*
* @param scrollState State to indicate the scroll direction.
*/
void onUpOrCancelMotionEvent(ScrollState scrollState);
}
|
[
"shankar@spotsoon.com"
] |
shankar@spotsoon.com
|
584b7471aa7f5d04a3367bfcf7ed7d830be684ab
|
2845d612ec420ffed49191af3a8cd4e1e7258cfa
|
/02-java进阶/src/day08_File类_递归/demo01/File/Demo06File.java
|
56bed51ad9b2e78dc1631e4b89ac6b52ac87215c
|
[] |
no_license
|
shuyangxiaobao/Java
|
d618c6b727efcbd3a857a33817720a1c941d2933
|
6510e0d89cbd18e2f59b0cccfe1812807eb2a5af
|
refs/heads/master
| 2022-07-09T03:52:59.986247
| 2021-04-09T07:14:11
| 2021-04-09T07:14:11
| 234,865,674
| 1
| 1
| null | 2022-06-21T04:16:10
| 2020-01-19T08:28:25
|
HTML
|
UTF-8
|
Java
| false
| false
| 2,789
|
java
|
package day08_File类_递归.demo01.File;
import java.io.File;
/*
File类遍历(文件夹)目录功能
- public String[] list() :返回一个String数组,表示该File目录中的所有子文件或目录。
- public File[] listFiles() :返回一个File数组,表示该File目录中的所有的子文件或目录。
注意:
list方法和listFiles方法遍历的是构造方法中给出的目录
如果构造方法中给出的目录的路径不存在,会抛出空指针异常
如果构造方法中给出的路径不是一个目录,也会抛出空指针异常
*/
public class Demo06File {
public static void main(String[] args) {
// show02();
// xlp2 ();
}
/*
public File[] listFiles() :返回一个File数组,表示该File目录中的所有的子文件或目录。
遍历构造方法中给出的目录,会获取目录中所有的文件/文件夹,把文件/文件夹封装为File对象,多个File对象存储到File数组中
*/
private static void show02() {
File file = new File("C:\\Users\\itcast\\IdeaProjects\\shungyuan\\08_FileAndRecursion");
File[] files = file.listFiles();
for (File f : files) {
System.out.println(f);
}
}
/*
public String[] list() :返回一个String数组,表示该File目录中的所有子文件或目录。
遍历构造方法中给出的目录,会获取目录中所有文件/文件夹的名称,把获取到的多个名称存储到一个String类型的数组中
*/
private static void show01() {
//File file = new File("C:\\Users\\itcast\\IdeaProjects\\shungyuan\\08_FileAndRecursion\\1.txt");//NullPointerException
//File file = new File("C:\\Users\\itcast\\IdeaProjects\\shungyuan\\08_Fi");//NullPointerException
File file = new File("C:\\Users\\itcast\\IdeaProjects\\shungyuan\\08_FileAndRecursion");
String[] arr = file.list();
for (String fileName : arr) {
System.out.println(fileName);
}
}
private static void xlp() {
File file = new File ( "/Users/xiaobao/Desktop/test" );
String[] list = file.list ();
for (String filename:list
) {
System.out.println (filename);
File tempFile = new File ( filename );
boolean delete = tempFile.delete ();
System.out.println (delete);
}
}
// private static void xlp2() {
// File file = new File ( "/Users/xiaobao/Desktop/test" );
// File[] list = file.listFiles ();
// for (File tempFile:list
// ) {
// boolean delete = tempFile.delete ();
// System.out.println (delete);
// }
//
// }
}
|
[
"825065886@qq.com"
] |
825065886@qq.com
|
f7928b8fdd72f0f28a746bb23f8e369db03e0e02
|
1a821ede149274a5d2fba89620fdd383f288b676
|
/personal-web-project/src/main/java/base/upload/UploadUtils.java
|
0d7f97ad6209169721948a5286ad77fc63e5e4ab
|
[] |
no_license
|
liubao19860416/personal-web-project
|
ce58fe52c779fc742de367028951f1a8401b58ac
|
337de5a05551376051a5d751ba094e5ef4341022
|
refs/heads/master
| 2021-01-10T08:44:41.141554
| 2016-04-09T06:56:53
| 2016-04-09T06:56:53
| 44,898,562
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,582
|
java
|
package base.upload;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;
import org.apache.struts2.ServletActionContext;
/**
* struts2的上传文件使用的;在struts2中,利用拦截器fileUpload实现了文件上传
*
* @author Liubao
* @2014年11月25日
*
*/
public class UploadUtils {
/**
* struts2的文件上传过程中,首先是将文件生成一个临时文件.tmp文件,然后再对其进行上传操作的;
*/
public static String saveUploadFile(File upload, String fileName) {
// 把日期格式化成字符串的一个帮助类
SimpleDateFormat sdf = new SimpleDateFormat("/yyyy/MM/dd/");
/*
* 得到upload文件夹的绝对路径 ServletActionContext.getServletContext()= C:\Program
* Files\Apache Software Foundation\Tomcat
* 6.0\webapps\itcastoa823\WEB-INF/upload/2012\02\16\aaaaadfasdf
*/
// 这里是文件上传的路径
String basePath = ServletActionContext.getServletContext().getRealPath(
"/WEB-INF/upload");
// String basePath = "d:\\upload";
// 把日期类型格式化为"/yyyy/MM/dd/"这种形式的字符串
String subPath = sdf.format(new Date());// 上面设置的格式,包含了2个文件分隔符;
// UUID能够保证名字的唯一性
String uuidFileName = UUID.randomUUID().toString() + "_" + fileName;
// 这里可以利用hashcode算法,生成二级16*16的目录;方法见下面的代码;
String subDir = generateHashCodeDir(uuidFileName);
// System.out.println("HashCode生成目标文件路径:"+basePath+subDir+fileName);
String destPath = basePath + subPath;// 目标文件所在的绝对路径
String destFile = destPath + uuidFileName;// 包括文件名了;
// 如果文件夹不存在,就创建文件夹;因为文件的存储路径已经获取了,所以可以这样进行文件夹的提前创建文件夹操作!
File dir = new File(destPath);
if (!dir.exists()) {
dir.mkdirs();
}
// System.out.println("日期格式(/yyyy/MM/dd/)生成目标文件路径:"+destFile);
File dest = new File(destFile);
// 把文件移动到dest处;该操作在linux系统下不好用;所以需要进行改进;
upload.renameTo(dest);
// 方式二(文件上传)uploadFileMethod2
// uploadFileMethod2(upload,dest);
// return destPath; //路径不包括文件的名字
return destFile; // 路径包括文件的名字
}
// 生成二级子目录的方式二
public static String generateHashCodeDir(String uuidFileName) {
int hashCode = uuidFileName.hashCode();
// 一级目录
int d1 = hashCode & 0xf;
// 二级目录
int d2 = (hashCode >> 4) & 0xf;// 先右移,在进行与运算,应该效率较高;
return File.separator + d1 + File.separator + d2 + File.separator;
// return "/" + d1 + "/" + d2+"/";
}
/**
* 方式二:通过数据io流,读写上传文件;字符流不涉及编码的问题,而字节流就需要考虑传输过程指定编码码表;
*/
public static void uploadFileMethod2(File source, File dest) {
InputStream in = null;
OutputStream out = null;
try {
in = new BufferedInputStream(new FileInputStream(source));
out = new BufferedOutputStream(new FileOutputStream(dest));
byte[] buf = new byte[1024];
int len = -1;
while ((len = in.read(buf)) != -1) {
out.write(buf, 0, len);
}
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("上传文件路径不正确!或者其他异常!");
} finally {
try {
if (out != null) {
out.close();
}
if (in != null) {
in.close();
}
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException("IO流关闭异常!");
}
}
}
}
|
[
"18611478781@163.com"
] |
18611478781@163.com
|
76e9e9ed840942a239e9fd51e7d2735ae14ccf1c
|
b66bdee811ed0eaea0b221fea851f59dd41e66ec
|
/src/com/google/android/gms/tagmanager/r.java
|
b1b4e8ed3d425d54383c0a81183cd395ca320702
|
[] |
no_license
|
reverseengineeringer/com.grubhub.android
|
3006a82613df5f0183e28c5e599ae5119f99d8da
|
5f035a4c036c9793483d0f2350aec2997989f0bb
|
refs/heads/master
| 2021-01-10T05:08:31.437366
| 2016-03-19T20:41:23
| 2016-03-19T20:41:23
| 54,286,207
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 889
|
java
|
package com.google.android.gms.tagmanager;
import android.content.Context;
import android.provider.Settings.Secure;
import com.google.android.gms.d.a;
import com.google.android.gms.d.o;
import java.util.Map;
class r
extends ab
{
private static final String a = a.zzbH.toString();
private final Context b;
public r(Context paramContext)
{
super(a, new String[0]);
b = paramContext;
}
public o a(Map<String, o> paramMap)
{
paramMap = a(b);
if (paramMap == null) {
return dm.f();
}
return dm.e(paramMap);
}
protected String a(Context paramContext)
{
return Settings.Secure.getString(paramContext.getContentResolver(), "android_id");
}
public boolean a()
{
return true;
}
}
/* Location:
* Qualified Name: com.google.android.gms.tagmanager.r
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
33f0eaa71c499087a786a66afed6f250af2d7e07
|
164651bddfd5bf56a7494175468cb69448fc2bc1
|
/jrtech-framework/Server/publicsubsystem/src/main/java/com/wl/wlp2ploansystem/publicsubsystem/config/WLUEditorConfigurer.java
|
e473be675ca48f07f9a99cd0744741c47e84aeb2
|
[] |
no_license
|
liveqmock/tik-framework
|
6b9c10e93f962ff5844923bdba9b21dffa772347
|
08c38af8967d6c20231022b41312b96c6fb33c28
|
refs/heads/master
| 2020-07-10T12:47:13.585793
| 2019-08-06T02:57:35
| 2019-08-06T02:57:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 782
|
java
|
package com.wl.wlp2ploansystem.publicsubsystem.config;
import com.wl.wlp2ploansystem.infrastructures.common.ueditor.UEditorConfigurer;
import com.wl.wlp2ploansystem.publicsubsystem.services.Base_SettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/***
* UEditor 配置器
*/
@Component
public class WLUEditorConfigurer implements UEditorConfigurer {
@Autowired
private Base_SettingService settingService;
/***
* 覆盖配置文件中fileAllowFiles的设置
* @return
*/
@Override
public String[] getUploadFileAllowFiles() {
String allowFiles = settingService.getStringValue("Attachment_Accept_Extensions");
return allowFiles.split(",");
}
}
|
[
"752415416@qq.com"
] |
752415416@qq.com
|
845406b55167c9dfaf6b9ba1eb6bb3411931505f
|
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
|
/classes2/cooperation/comic/VipComicHelper.java
|
3d83d1a2408843d18f0304a4cf1f52671d458529
|
[] |
no_license
|
meeidol-luo/qooq
|
588a4ca6d8ad579b28dec66ec8084399fb0991ef
|
e723920ac555e99d5325b1d4024552383713c28d
|
refs/heads/master
| 2020-03-27T03:16:06.616300
| 2016-10-08T07:33:58
| 2016-10-08T07:33:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,852
|
java
|
package cooperation.comic;
import com.qq.jce.wup.BasicClassTypeUtil;
import com.tencent.common.app.BaseApplicationImpl;
import com.tencent.mobileqq.app.QQAppInterface;
import com.tencent.mobileqq.hotpatch.NotVerifyClass;
import com.tencent.mobileqq.pluginsdk.PluginStatic;
import com.tencent.qphone.base.util.QLog;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import mqq.app.AppRuntime;
public class VipComicHelper
{
public static final int a = 3001;
private static QQAppInterface a;
public static final String a = "begin_to_load_comic_plugin";
public static AtomicReference a;
public static final int b = 1000;
public static final String b = "pluginFinished";
public static final int c = 5000;
public static final String c = "tencent.qqcomic.push.msg";
public static final int d = 10000;
public static final String d = "tencent.qqcomic.show.dialog";
private static final int e = 4097;
public static final String e = "msg";
public static final String f = "qqcomic_preload_first_screen_data";
private static final String g = "ComicHelper";
private static final String h = "com.qqcomic.app.VipComicPluginRuntime";
private static final String i = "plugin_state";
private static final String j = "plugin_progress";
static
{
boolean bool = NotVerifyClass.DO_VERIFY_CLASS;
jdField_a_of_type_JavaUtilConcurrentAtomicAtomicReference = new AtomicReference("");
}
public static QQAppInterface a()
{
return jdField_a_of_type_ComTencentMobileqqAppQQAppInterface;
}
public static AppRuntime a(BaseApplicationImpl paramBaseApplicationImpl, String paramString)
{
if ((paramBaseApplicationImpl == null) || (paramString == null)) {
return null;
}
if ((paramBaseApplicationImpl.a().getRunningModuleSize() > 0) && (VipComicReportUtils.a.get() != 2)) {
VipComicReportUtils.a.set(3);
}
try
{
Class localClass1 = Class.forName("com.qqcomic.app.VipComicPluginRuntime");
if (localClass1 != null) {}
}
catch (ClassNotFoundException localClassNotFoundException)
{
for (;;)
{
try
{
if (!QLog.isColorLevel()) {
break;
}
QLog.d("ComicHelper", 2, "createCOMICRuntime: load class failed");
}
catch (ClassNotFoundException paramBaseApplicationImpl)
{
ClassLoader localClassLoader;
paramBaseApplicationImpl.printStackTrace();
}
localClassNotFoundException = localClassNotFoundException;
localClassLoader = PluginStatic.getOrCreateClassLoader(paramBaseApplicationImpl, "comic_plugin.apk");
Class localClass2 = localClassLoader.loadClass("com.qqcomic.app.VipComicPluginRuntime");
BasicClassTypeUtil.setClassLoader(true, localClassLoader);
continue;
do
{
return null;
paramBaseApplicationImpl = localClass2.getDeclaredConstructor(new Class[] { BaseApplicationImpl.class, String.class }).newInstance(new Object[] { paramBaseApplicationImpl, paramString });
} while ((paramBaseApplicationImpl == null) || (!(paramBaseApplicationImpl instanceof AppRuntime)));
paramBaseApplicationImpl = (AppRuntime)paramBaseApplicationImpl;
return paramBaseApplicationImpl;
}
}
catch (IllegalArgumentException paramBaseApplicationImpl)
{
for (;;)
{
paramBaseApplicationImpl.printStackTrace();
}
}
catch (IllegalAccessException paramBaseApplicationImpl)
{
for (;;)
{
paramBaseApplicationImpl.printStackTrace();
}
}
catch (InstantiationException paramBaseApplicationImpl)
{
for (;;)
{
paramBaseApplicationImpl.printStackTrace();
}
}
catch (InvocationTargetException paramBaseApplicationImpl)
{
for (;;)
{
paramBaseApplicationImpl.printStackTrace();
}
}
catch (NoSuchMethodException paramBaseApplicationImpl)
{
for (;;)
{
paramBaseApplicationImpl.printStackTrace();
}
}
catch (Exception paramBaseApplicationImpl)
{
for (;;)
{
paramBaseApplicationImpl.printStackTrace();
}
}
return null;
}
public static void a(QQAppInterface paramQQAppInterface)
{
if ((jdField_a_of_type_ComTencentMobileqqAppQQAppInterface != null) && (jdField_a_of_type_ComTencentMobileqqAppQQAppInterface == paramQQAppInterface)) {
jdField_a_of_type_ComTencentMobileqqAppQQAppInterface = null;
}
}
}
/* Location: E:\apk\QQ_91\classes2-dex2jar.jar!\cooperation\comic\VipComicHelper.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
5aa6a40fcc4221c26e801bad4a90037736a33728
|
21f553e7941c9e2154ff82aaef5e960942f89387
|
/lang_interface/java/com/intel/daal/algorithms/neural_networks/layers/convolution2d/Convolution2dBatch.java
|
925c2c51095dafb180179d10b4b247eeba88690b
|
[
"Apache-2.0",
"Intel"
] |
permissive
|
tonythomascn/daal
|
7e6fe4285c7bb640cc58deb3359d4758a9f5eaf5
|
3e5071f662b561f448e8b20e994b5cb53af8e914
|
refs/heads/daal_2017_update2
| 2021-01-19T23:05:41.968161
| 2017-04-19T16:18:44
| 2017-04-19T16:18:44
| 88,920,723
| 1
| 0
| null | 2017-04-20T23:54:18
| 2017-04-20T23:54:18
| null |
UTF-8
|
Java
| false
| false
| 4,149
|
java
|
/* file: Convolution2dBatch.java */
/*******************************************************************************
* Copyright 2014-2017 Intel Corporation
*
* 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.
*******************************************************************************/
/**
* @defgroup convolution2d Two-dimensional Convolution Layer
* @brief Contains classes for neural network 2D convolution layer
* @ingroup layers
* @{
*/
/**
* @brief Contains classes of the two-dimensional (2D) convolution layer
*/
package com.intel.daal.algorithms.neural_networks.layers.convolution2d;
import com.intel.daal.algorithms.neural_networks.layers.ForwardLayer;
import com.intel.daal.algorithms.neural_networks.layers.BackwardLayer;
import com.intel.daal.algorithms.Precision;
import com.intel.daal.algorithms.ComputeMode;
import com.intel.daal.services.DaalContext;
/**
* <a name="DAAL-CLASS-ALGORITHMS__NEURAL_NETWORKS__LAYERS__CONVOLUTION2D__CONVOLUTION2DBATCH"></a>
* @brief Provides methods for the 2D convolution layer in the batch processing mode
* \n<a href="DAAL-REF-CONVOLUTION2DFORWARD-ALGORITHM">Forward 2D convolution layer description and usage models</a>
* \n<a href="DAAL-REF-CONVOLUTION2DBACKWARD-ALGORITHM">Backward 2D convolution layer description and usage models</a>
*
* @par References
* - @ref Convolution2dForwardBatch class
* - @ref Convolution2dBackwardBatch class
*/
public class Convolution2dBatch extends com.intel.daal.algorithms.neural_networks.layers.LayerIface {
public Convolution2dMethod method; /*!< Computation method for the layer */
public Convolution2dParameter parameter; /*!< Convolution layer parameters */
protected Precision prec; /*!< Data type to use in intermediate computations for the layer */
/** @private */
static {
System.loadLibrary("JavaAPI");
}
/**
* Constructs the 2D convolution layer
* @param context Context to manage the 2D convolution layer
* @param cls Data type to use in intermediate computations for the layer, Double.class or Float.class
* @param method The layer computation method, @ref Convolution2dMethod
*/
public Convolution2dBatch(DaalContext context, Class<? extends Number> cls, Convolution2dMethod method) {
super(context);
this.method = method;
if (method != Convolution2dMethod.defaultDense) {
throw new IllegalArgumentException("method unsupported");
}
if (cls != Double.class && cls != Float.class) {
throw new IllegalArgumentException("type unsupported");
}
if (cls == Double.class) {
prec = Precision.doublePrecision;
}
else {
prec = Precision.singlePrecision;
}
this.cObject = cInit(prec.getValue(), method.getValue());
parameter = new Convolution2dParameter(context, cInitParameter(cObject, prec.getValue(), method.getValue()));
forwardLayer = (ForwardLayer)(new Convolution2dForwardBatch(context, cls, method, cGetForwardLayer(cObject, prec.getValue(), method.getValue())));
backwardLayer = (BackwardLayer)(new Convolution2dBackwardBatch(context, cls, method, cGetBackwardLayer(cObject, prec.getValue(), method.getValue())));
}
private native long cInit(int prec, int method);
private native long cInitParameter(long cAlgorithm, int prec, int method);
private native long cGetForwardLayer(long cAlgorithm, int prec, int method);
private native long cGetBackwardLayer(long cAlgorithm, int prec, int method);
}
/** @} */
|
[
"vasily.rubtsov@intel.com"
] |
vasily.rubtsov@intel.com
|
5eda373c2a5d6a0137c6178eaee7fca3bd71e00c
|
19d4c3df58c520ce4c913fdbe16e9f023e0fb36e
|
/hibernate-persistenceMethods/src/main/java/com/voytovych/data/entities/User.java
|
00c9a5841685606f41b62085b9db7e364c89c610
|
[] |
no_license
|
noctuaIv/hibernate-jpa
|
6c2862419783bdae88eb538e1877776a33245de2
|
52e9d2c8bc2e3bb7c47e5cc1f76a3e4b4a168f80
|
refs/heads/master
| 2020-04-28T22:52:13.789750
| 2019-03-14T14:00:45
| 2019-03-14T14:00:45
| 175,632,888
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,182
|
java
|
package com.voytovych.data.entities;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name="FINANCES_USER")
public class User {
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name="USER_ID")
private Long userId;
@Column(name="FIRST_NAME")
private String firstName;
@Column(name="LAST_NAME")
private String lastName;
@Column(name="BIRTH_DATE")
private Date birthDate;
@Column(name="EMAIL_ADDRESS")
private String emailAddress;
@Column(name="LAST_UPDATED_DATE")
private Date lastUpdatedDate;
@Column(name="LAST_UPDATED_BY")
private String lastUpdatedBy;
@Column(name="CREATED_DATE")
private Date createdDate;
@Column(name="CREATED_BY")
private String createdBy;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public Date getBirthDate() {
return birthDate;
}
public void setBirthDate(Date birthDate) {
this.birthDate = birthDate;
}
public String getEmailAddress() {
return emailAddress;
}
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
public Date getLastUpdatedDate() {
return lastUpdatedDate;
}
public void setLastUpdatedDate(Date lastUpdatedDate) {
this.lastUpdatedDate = lastUpdatedDate;
}
public String getLastUpdatedBy() {
return lastUpdatedBy;
}
public void setLastUpdatedBy(String lastUpdatedBy) {
this.lastUpdatedBy = lastUpdatedBy;
}
public Date getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
}
|
[
"noctua.vt@gmail.com"
] |
noctua.vt@gmail.com
|
7b727b1fbd55409083e4454ba53235886d844758
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_255/Testnull_25435.java
|
51ac3cd51062f55ffc27e89c1fcbe8f618d03048
|
[] |
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_255;
import static org.junit.Assert.*;
public class Testnull_25435 {
private final Productionnull_25435 production = new Productionnull_25435("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
3f67b1bf18e26687e6d75aefb36db3272b73c469
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/20/20_afb89e0ac8ef9b55873e7b95cddf7b8b2f9020dd/ResponseServlet/20_afb89e0ac8ef9b55873e7b95cddf7b8b2f9020dd_ResponseServlet_s.java
|
70135463e4bab148ac63c2f52b4e025b3222abd0
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,079
|
java
|
package 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;
import javax.servlet.http.HttpSession;
import crowdtrust.Bee;
import crowdtrust.BinaryR;
import crowdtrust.MultiValueR;
import crowdtrust.Response;
import crowdtrust.SubTask;
/**
* Servlet implementation class ResponseServlet
*/
@WebServlet("/ResponseServlet")
public class ResponseServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public ResponseServlet() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
int id = -1;
if(request.isRequestedSessionIdValid()){
HttpSession s = request.getSession();
try{
id = (Integer) s.getAttribute("account_id");
}catch(Exception e) {
}
}
if (id < 1){
response.sendRedirect("/");
} else {
Response r = null;
SubTask subtask = null;
int type = Integer.parseInt(request.getParameter("annotation_type"));
int subTaskId = Integer.parseInt(request.getParameter("sid"));
int rInt = Integer.parseInt(request.getParameter("response"));
//TODO
switch(type){
case 1:
if (rInt == 0)
r = new BinaryR(true);
else
r = new BinaryR(false);
subtask = db.SubTaskDb.getSubtask(subTaskId);
break;
case 2:
int s = Integer.parseInt(request.getParameter("selection"));
r = new MultiValueR(s);
subtask = db.SubTaskDb.getSubtask(subTaskId);
break;
case 3:
break;
}
subtask.addResponse(new Bee(id), r);
response.sendRedirect("/crowd/complete_task.jsp");
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
df974e065d853e85d62f79087df55617a83cbc64
|
e89285c055e2349e99f040eb5b420ebb792d27f9
|
/src/SwapNodesInPairs.java
|
ed099f765130f45a2f1b6e498ae9a99408d187d1
|
[] |
no_license
|
xjwhhh/LeetCode2019
|
afc3a34ee61cfefd464c57cb079d2e185f6b78ac
|
9ce005377f17faabd8adb16d8f3e093780b5b3e2
|
refs/heads/master
| 2022-04-25T06:13:23.356868
| 2020-04-23T07:47:38
| 2020-04-23T07:47:38
| 197,923,854
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 699
|
java
|
/**
* @Author JiaWei Xu
* @Date 2020-03-04 18:17
* @Email xjwhhh233@outlook.com
*/
public class SwapNodesInPairs {
public ListNode swapPairs(ListNode head) {
if(head==null||head.next==null){
return head;
}
ListNode curr=head;
ListNode dummy=new ListNode(0);
dummy.next=head;
ListNode pre=dummy;
while(curr!=null&&curr.next!=null){
ListNode first=curr;
ListNode second=curr.next;
ListNode next=second.next;
pre.next=second;
second.next=first;
first.next=next;
pre=first;
curr=next;
}
return dummy.next;
}
}
|
[
"xjwhhh233@outlook.com"
] |
xjwhhh233@outlook.com
|
0d014ae103540cf6a2d40f16c773c7491ad11822
|
e115659441f87c0d8480d22babe45bd425b9d89a
|
/functionalj-core/src/main/java/functionalj/list/doublelist/DoubleFuncListHelper.java
|
2d4cb052a37db2212c2786ef8702159d5f1df6e2
|
[
"MIT"
] |
permissive
|
cybernetics/FunctionalJ
|
403784b46414fcb2cacfcdf422a4097a9408ec4c
|
153d144e3dee61ae0282b342d2ee960f3b61f4d2
|
refs/heads/master
| 2023-08-15T11:17:02.558340
| 2021-07-23T14:39:55
| 2021-07-23T14:39:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,578
|
java
|
// ============================================================================
// Copyright (c) 2017-2021 Nawapunth Manusitthipol (NawaMan - http://nawaman.net).
// ----------------------------------------------------------------------------
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// ============================================================================
package functionalj.list.doublelist;
import java.util.ArrayList;
import functionalj.list.FuncList;
import functionalj.stream.doublestream.GrowOnlyDoubleArray;
import lombok.val;
public class DoubleFuncListHelper {
static <D> FuncList<DoubleFuncList> segmentByPercentiles(AsDoubleFuncList asList, DoubleFuncList percentiles) {
val list = asList.asDoubleFuncList();
val size = list.size();
DoubleFuncList indexes
= percentiles
.append(100.0)
.sorted()
.map (d -> (int)Math.round(d*size/100))
.toImmutableList();
val lists = new ArrayList<GrowOnlyDoubleArray>();
for (int i = 0; i < indexes.size(); i++) {
lists.add(new GrowOnlyDoubleArray());
}
int idx = 0;
for (int i = 0; i < size; i++) {
if (i >= indexes.get(idx)) {
idx++;
}
val l = lists.get(idx);
val element = list.get(i);
l.add(element);
}
return FuncList.from(lists.stream().map(each -> each.toFuncList()));
}
}
|
[
"nawa@nawaman.net"
] |
nawa@nawaman.net
|
88b6ed1b4e9921856d874ac5e211ba81754bfbb6
|
747594bb4df9314e0bcd0de2b63dd861500cfdb8
|
/SpringBootLearn/深入理解SpringBoot/WebFlux/client/router functions/UserHandler.java
|
41dfb7978bbddc07cca8f0e0cea6729cf535d787
|
[] |
no_license
|
lastFeng/SpringBootLearn
|
2b051ceccdeaf8b4df6c900f19903200cb33a0b7
|
440d486f91d74a49d601a2eaeda95fd59715606a
|
refs/heads/master
| 2020-05-29T21:11:39.236940
| 2019-08-31T05:26:43
| 2019-08-31T05:26:43
| 189,371,143
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 2,902
|
java
|
package com.springboot.webflux.routerfunctions.handler;
@Service
public class UserHandler{
@Autowired
private UserRespository userRepository;
private UserVo translate(User user){
UserVo userVo = new UserVo();
userVo.setId(user.getId());
userVo.setUserName(user.getUserName());
userVo.setSexCode(user.getSex().getCode());
userVo.setSexName(user.getSex().getName());
userVo.setNote(user.getNote());
return userVo;
}
public Mono<ServerResponse> getUser(ServerRequest request){
// 获取请求RUI参数
String idStr = request.pathVariable("id");
Long id = Long.valueOf(idStr);
Mono<USerVo> userVoMono = userRepository.findById(id).map(user -> translate(user));
return ServerResponse
// 响应成功
.ok()
.contentType(MediaType.APPLICATION_JSON_UTF8)
.body(userVoMono, UserVo.class);
}
public Mono<ServerResponse> insertUser(ServerRequest request){
Mono<User> userMonoParam = request.bodyToMono(User.class);
Mono<UserVo> userVoMono = userMonoParam
.cache()
.flatMap(user -> userRepository.save(user).map(u -> translate(u)));
return ServerRespones
.ok()
.contentType(MediaType.APPLICATION_JSON_UTF8)
.body(userVoMono, UserVo.class);
}
public Mono<ServerResponese> updateUser(ServerRequest request){
Mono<User> userMonoParam = request.bodyToMono(User.class);
Mono<UserVo> userVoMono = userMonoParam
.cache()
.flatMap(user -> userRepository.save(user).map(u->translate(u)));
return ServerResponse.ok().contentType(MediaType.APPLICATION_JSON_UTF8).body(userVoMomo, UserVo.class);
}
public Mono<ServerResponse> deleteUser(ServerRequest request){
String idStr = request.pathVariable("id");
Long id = Long.valueOf(idStr);
Mono<Void> monoVoid = userRepository.deleteById(id);
return ServerResponse.ok().contentType(MediaType.APPLICATION_JSON_UTF8).body(monoVoid, Void.class);
}
public Mono<ServerResponse> findUsers(ServerRequest request){
String userName = request.pathVariable("userName");
String note = request.pathVariable("note");
Flux<UserVo> userVoFlux = userRepository.findByUserNameLikeAndNoteLike(userName, note).map(u -> translate(u));
return ServerResponse.ok().contentType(MediaType.APPLICATION_JSON_UTF8).body(userVoFlux, UserVo.class);
}
public Mono<ServerResponse> updateUserName(ServerRequest request){
String idStr = request.pathVariable("id");
Long id = Long.valueOf(idStr);
String userName = request.headers().header("userName").get(0);
Mono<User> userMono = userRepository.findById(id);
User user = userMono.block();
user.setUserName(userName);
Mono<UserVo> result = userRepository.save(user).map(u -> translate(u));
return ServerRespose
.ok()
.contentType(MediaType.APPLICATION_JSON_UTF8)
.body(result, UserVo.class);
}
}
|
[
"563805728@qq.com"
] |
563805728@qq.com
|
ec84939762a59a2b086050a7140948abd187c04f
|
22b6eecadc8ee5bdf76fb4aa2a56c30d86f2251b
|
/cloud/target/m2e-wtp/web-resources/src/main/java/com/cgwas/common/dataaccess/impl/DefaultPageQueryFactory.java
|
94989bbf346a70bc5aaddddf40f065a0c091a1cd
|
[] |
no_license
|
chrgu000/WanHeng
|
2c3048788739a9813c5e4c88b0de881a2ae02333
|
b2ff8b73ed3c5726b7b86962b6617a1ab196da7e
|
refs/heads/master
| 2020-05-23T13:59:05.208556
| 2018-09-19T06:15:26
| 2018-09-19T06:15:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 767
|
java
|
package com.cgwas.common.dataaccess.impl;
import com.cgwas.common.dataaccess.api.IDaoSupport;
import com.cgwas.common.dataaccess.api.Page;
import com.cgwas.common.dataaccess.api.PageQueryFactory;
public class DefaultPageQueryFactory implements PageQueryFactory<PageQuery> {
private IDaoSupport daoSupport;
@Override
public PageQuery getPageQuery() {
return new PageQuery(daoSupport);
}
@Override
public PageQuery getPageQuery(Page page, String queryStr, String countStr) {
PageQuery pageQuery = new PageQuery(page, queryStr, countStr);
pageQuery.setDaoSupport(daoSupport);
return pageQuery;
}
public IDaoSupport getDaoSupport() {
return daoSupport;
}
public void setDaoSupport(IDaoSupport daoSupport) {
this.daoSupport = daoSupport;
}
}
|
[
"yangjunst@sina.com"
] |
yangjunst@sina.com
|
2061ea1935c226fcd761c764f1bf0ad9f867be9b
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_80756de123c50eacb9b09e3455492638b158bfa6/PrivilegeValue/2_80756de123c50eacb9b09e3455492638b158bfa6_PrivilegeValue_s.java
|
89af2c5cdeae7245c3a0fc94e919d602b2412ae7
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,181
|
java
|
/*
* This file is part of the Alitheia system, developed by the SQO-OSS
* consortium as part of the IST FP6 SQO-OSS project, number 033331.
*
* Copyright 2007 by the SQO-OSS consortium members <info@sqo-oss.eu>
* Copyright 2008 by Paul J. Adams <paul.adams@siriusit.co.uk>
*
* 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.
*
* 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 eu.sqooss.service.db;
import eu.sqooss.service.db.DAObject;
public class PrivilegeValue extends DAObject {
private Privilege privilege;
private int value;
public PrivilegeValue(){}
public void setPrivilege(Privilege privilege) {
this.privilege = privilege;
}
public void setValue(int value) {
this.value = value;
}
public Privilege getPrivilege() {
return priviliege;
}
public int getValue() {
return value;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
8ad7ad33bfb59ea719e6d43b06ebe0673429008f
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/fc-open-20210406/src/main/java/com/aliyun/fc_open20210406/models/ListOnDemandConfigsResponse.java
|
314b8bb6993a0ee79f339d01840cae54240c75ba
|
[
"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,411
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.fc_open20210406.models;
import com.aliyun.tea.*;
public class ListOnDemandConfigsResponse 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 ListOnDemandConfigsResponseBody body;
public static ListOnDemandConfigsResponse build(java.util.Map<String, ?> map) throws Exception {
ListOnDemandConfigsResponse self = new ListOnDemandConfigsResponse();
return TeaModel.build(map, self);
}
public ListOnDemandConfigsResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public ListOnDemandConfigsResponse setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
public Integer getStatusCode() {
return this.statusCode;
}
public ListOnDemandConfigsResponse setBody(ListOnDemandConfigsResponseBody body) {
this.body = body;
return this;
}
public ListOnDemandConfigsResponseBody getBody() {
return this.body;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
93d0512c453b7dd8284571e71558d59a0e32d389
|
92467e52e2374f337e87e502e57630b929722dc4
|
/src/test/java/com/example/demo/DemoApplicationTests.java
|
4e2b5f19038a1f35f660fb55cfd540549a7b39af
|
[] |
no_license
|
rwinch/webclient-retry
|
5015d4ecd1bb3c33f7d292a8124324fee784c310
|
61bf904ea876e6be4ae8c9f578fd0b878674f895
|
refs/heads/master
| 2020-03-25T16:13:37.338864
| 2018-08-07T19:59:31
| 2018-08-07T20:04:54
| 143,920,945
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,018
|
java
|
package com.example.demo;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.reactivestreams.Publisher;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.Exceptions;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import java.time.Duration;
import java.time.LocalTime;
import java.util.function.Function;
public class DemoApplicationTests {
WebClient rest;
MockWebServer server = new MockWebServer();
@Before
public void setup() {
this.rest = WebClient.builder()
.baseUrl(this.server.url("/").toString())
.build();
}
@Test
public void go() {
this.server.enqueue(new MockResponse().setHeader("Location", this.server.url("/").toString()));
this.server.enqueue(new MockResponse().setResponseCode(500));
this.server.enqueue(new MockResponse().setBody("{}"));
String result =
this.rest.get()
.exchange()
.map(r -> r.headers().asHttpHeaders().getLocation())
.flatMap(location -> {
System.out.println("here");
return this.rest.get().uri(location).retrieve().bodyToMono(String.class)
.retryWhen(retry(4));
})
.block();
System.out.println("here ================= " + result);
}
// http://projectreactor.io/docs/core/release/reference/#faq.exponentialBackoff
private Function<Flux<Throwable>, Publisher<?>> retry(int times) {
return companion -> companion
.doOnNext(s -> System.out.println(s + " at " + LocalTime.now()))
.zipWith(Flux.range(1, times), (error, index) -> {
if (index < times) return index;
else throw Exceptions.propagate(error);
})
.flatMap(index -> Mono.delay(Duration.ofMillis(index * 100)))
.doOnNext(s -> System.out.println("retried at " + LocalTime.now()));
}
}
|
[
"rwinch@users.noreply.github.com"
] |
rwinch@users.noreply.github.com
|
6cc282c394b05f4fcca50ae95b2bf46bb83824ba
|
a5d01febfd8d45a61f815b6f5ed447e25fad4959
|
/Source Code/5.5.1/sources/com/iqoption/d/ams.java
|
d318af613e73b67911067ae8765a5ea923652274
|
[] |
no_license
|
kkagill/Decompiler-IQ-Option
|
7fe5911f90ed2490687f5d216cb2940f07b57194
|
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
|
refs/heads/master
| 2020-09-14T20:44:49.115289
| 2019-11-04T06:58:55
| 2019-11-04T06:58:55
| 223,236,327
| 1
| 0
| null | 2019-11-21T18:17:17
| 2019-11-21T18:17:16
| null |
UTF-8
|
Java
| false
| false
| 2,129
|
java
|
package com.iqoption.d;
import android.databinding.DataBindingComponent;
import android.databinding.ViewDataBinding;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.SparseIntArray;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.iqoption.x.R;
/* compiled from: WithdrawInsufficientFoundsLayoutBindingImpl */
public class ams extends amr {
@Nullable
private static final IncludedLayouts awU = null;
@Nullable
private static final SparseIntArray awV = new SparseIntArray();
private long awW;
@NonNull
private final LinearLayout axx;
protected boolean onFieldChange(int i, Object obj, int i2) {
return false;
}
public boolean setVariable(int i, @Nullable Object obj) {
return true;
}
static {
awV.put(R.id.withdrawInsufficientFoundsIcon, 1);
awV.put(R.id.withdrawInsufficientFoundsTitle, 2);
awV.put(R.id.withdrawInsufficientFoundsDescription, 3);
}
public ams(@Nullable DataBindingComponent dataBindingComponent, @NonNull View view) {
this(dataBindingComponent, view, ViewDataBinding.mapBindings(dataBindingComponent, view, 4, awU, awV));
}
private ams(DataBindingComponent dataBindingComponent, View view, Object[] objArr) {
super(dataBindingComponent, view, 0, (TextView) objArr[3], (ImageView) objArr[1], (TextView) objArr[2]);
this.awW = -1;
this.axx = (LinearLayout) objArr[0];
this.axx.setTag(null);
setRootTag(view);
invalidateAll();
}
public void invalidateAll() {
synchronized (this) {
this.awW = 1;
}
requestRebind();
}
public boolean hasPendingBindings() {
synchronized (this) {
if (this.awW != 0) {
return true;
}
return false;
}
}
protected void executeBindings() {
synchronized (this) {
long j = this.awW;
this.awW = 0;
}
}
}
|
[
"yihsun1992@gmail.com"
] |
yihsun1992@gmail.com
|
7b4ede0473952f981284e61d310c539aa56dd607
|
01eaa96d69b4ff2d8ee72b4cf837904ef2a00ff4
|
/st25sdk/src/java/com/st/st25sdk/command/Iso14443SRCustomCommandInterface.java
|
2b30bad7919398c020b10e06cd600d2351192ff9
|
[
"MIT"
] |
permissive
|
tcrct/nfc_rfid
|
d528aedc95ed83b181fa482830cf3ce260ad227a
|
552a344669ae00b82826843bcc3465558c17658d
|
refs/heads/master
| 2020-09-02T04:35:45.199617
| 2019-11-02T09:54:55
| 2019-11-02T09:54:55
| 219,132,939
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,049
|
java
|
/*
* @author STMicroelectronics MMY Application team
*
******************************************************************************
* @attention
*
* <h2><center>© COPYRIGHT 2017 STMicroelectronics</center></h2>
*
* Licensed under ST MIX_MYLIBERTY SOFTWARE LICENSE AGREEMENT (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.st.com/Mix_MyLiberty
*
* 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,
* AND SPECIFICALLY DISCLAIMING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************
*/
package com.st.st25sdk.command;
import com.st.st25sdk.STException;
public interface Iso14443SRCustomCommandInterface {
/**
* initiate() is used to initiate the anticollision sequence of the ST Iso14443SR-type tag.
* On receiving the initiate() command, all devices in Ready state switch to the INVENTORY state,
* set a new 8-bit chipId random value, and return their Chip_ID value.
* This command is useful when only one tag in Ready state is present in the reader field range.
* It speeds up the Chip_ID search process.
*
* @return chipId 8-bit random number returned by the only tag in the RF field
* @throws STException {@link}STException
*/
byte initiate() throws STException;
/**
* After receiving the pCall16() command, the ST Iso14443SR-type tag generates a new random chip slot
* number value.
* A slotNumber is defined as the 4 least significant bites of the chipId - value between 0 and 15.
* If this slotNumber value = 0b000, the tag returns its chipID value.
* If slotNumber != 0b0000, the tag doesn't answer.
*
* When used with the slotMarker() command, pCall16() allows the reader to search for all the chipIDs
* of tags present in the RF field.
*
* @return chipID 8-bit random number returned by the tag that responds in slot 0
* @throws STException {@link}STException
*/
byte pCall16() throws STException;
/**
* After receiving the slotMarker({@link}slotNumber) command, the ST Iso14443SR-type tag compares the 4 least
* significant bits of its chipID to {@link}slotNumber.
* If they match, the tag returns its chipID.
* If not, the tag doesn't answer.
*
* The anti-collision sequence starts with the pCall16() command, then sends slotMarker({@link}slotNumber)
* commands, varying {@link}slotNumber from 1 to 15 and collecting tag chipIds in the process.
* This anticollision sequence is repeated until no collision is detected.
*
* @param slotNumber Only the 4 least significant bits are passed as parameter
* @return chipID 8-bit random number returned by the tag that responds in slot {@link}slotNumber
* @throws STException {@link}STException
*/
byte slotMarker(byte slotNumber) throws STException;
/**
* The select({@link}chipID) command moves the targeted ST Iso14443SR-type tag into the SELECTED state.
* Until the select() command is sent, the tag will only respond to initiate(), pCall16() and slotMarker()
* commands.
*
* When a ST Iso14443SR-type tag receives a select({@link}chipID) command with a {@link}chipID that does not match its
* own, it moves into the DESELECTED state.
*
* @param chipID 8-bit random number
* @return chipID 8-bit random number returned by the SELECTED tag
* @throws STException {@link}STException
*/
byte select(byte chipID) throws STException;
/**
* After receiving the completion() command, any ST Iso14443SR-type tag in the SELECTED state transitions
* to the DEACTIVATED state and stops decoding any new command.
* The tag moves out of the DEACTIVATED state only after it is removed from the RF field.
* Another ST Iso14443SR-type tag can then be accessed through a select() command without having to
* move the other tag from the RF field.
* Tags not in the SELECTED state ignore the completion() command.
*
* @throws STException {@link}STException
*/
void completion() throws STException;
/**
* After receiving the resetToInventory() command, all ST Iso14443SR-type tag in the SELECTED state revert
* to the INVENTORY state.
* This command is useful when two ST Iso14443SR-type tags with the same cipID happen to be SELECTED at
* the same time. Forcing a new anticollision sequence allows the tags to generate new random chipIds.
* Tags not in the SELECTED state ignore the resetToInventory() command.
*
* @throws STException {@link}STException
*/
void resetToInventory() throws STException;
/**
* Reads the desired memory blocks of the ST iso14443SR-type tag in the SELECTED state.
* Data bytes are transmitted with the least significant byte first.
*
* Tags that are not in the SELECTED state will not reply to the readBlock() command.
*
* @param blockAddress Memory location to read. If blockAddress is bigger than the tag's memory capacity,
* the tag will not respond.
* @return 4 data bytes contained in the desired memory block.
* @throws STException {@link}STException
*/
byte[] readBlock(byte blockAddress) throws STException;
/**
* Writes the four bytes of {@link}buffer at address {@link}blockAddress of the SELECTED ST Iso14443SR-type tag
* (provided that the block is available and not write-protected).
* Data bytes to write must be transmitted with the least significant byte first.
*
* There is no tag response after a writeBlock() command. The reader must check that data was correctly
* programmed by reading the memory location after programming time tW defined in the datasheet.
*
* Tags that are not in the SELECTED state will not reply to the writeBlock() command.
*
* @param blockAddress Memory location to write. If {@link}blockAddress is bigger than the tag's memory capacity,
* the tag will not respond. The system area is located at address 255.
* @param buffer 4-byte little endian data
* @throws STException {@link}STException
*/
void writeBlock(byte blockAddress, byte[] buffer) throws STException;
/**
* Asks the SELECTED ST Iso14443SR-type tag for its 8-byte UID (transmitted LSB first).
*
* Tags that are not in the SELECTED state will not reply to the getUid() command.
*
* @return 8-byte little-endian UID
* @throws STException {@link}STException
*/
byte[] getUid() throws STException;
}
|
[
"790731tcrct"
] |
790731tcrct
|
b3630ef6b583beb6aad1337a80f957f3eb1dbc95
|
a741d82fb5ee0203161455353587ffcc902ef351
|
/aylson-dao/src/main/java/com/aylson/dc/sys/search/IntegralConfigSearch.java
|
84574f248c385383f925d17138b9347960e8821e
|
[] |
no_license
|
xiaofeifei321/aylson-parent
|
b48121272d5e92a1acc4b671ab7af63aa6c06b0b
|
3749a0f1ef45851b4aa513b324ef23a04e4421d3
|
refs/heads/master
| 2022-12-23T20:15:51.598455
| 2019-08-29T11:30:13
| 2019-08-29T11:30:13
| 204,696,341
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,781
|
java
|
package com.aylson.dc.sys.search;
import com.aylson.core.frame.search.BaseSearch;
public class IntegralConfigSearch extends BaseSearch {
private static final long serialVersionUID = 8632083413806125191L;
private Integer id; //主键
/**
* 类型:
* 1:注册赠送[我的推荐人]积分:
* 2:注册赠送[我的推荐人的推荐人]积分:
* 3:提交方案赠送[提交人]积分:
* 4:提交方案赠送[推荐人]积分:
* 5:结算方案赠送[提交人]积分:
* 6:结算方案赠送[推荐人]积分
*/
private Integer type; //类型:
private Integer rangeBegin; //范围开始
private Integer rangeEnd; //范围结束
private Boolean isIntegralLevelConfig; //是否积分等级
private Integer bigType; //大类:0 产业工人 1设计师 2开拓者 3积分等级
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public Integer getRangeBegin() {
return rangeBegin;
}
public void setRangeBegin(Integer rangeBegin) {
this.rangeBegin = rangeBegin;
}
public Integer getRangeEnd() {
return rangeEnd;
}
public void setRangeEnd(Integer rangeEnd) {
this.rangeEnd = rangeEnd;
}
public Boolean getIsIntegralLevelConfig() {
return isIntegralLevelConfig;
}
public void setIsIntegralLevelConfig(Boolean isIntegralLevelConfig) {
this.isIntegralLevelConfig = isIntegralLevelConfig;
}
public Integer getBigType() {
return bigType;
}
public void setBigType(Integer bigType) {
this.bigType = bigType;
}
}
|
[
"874189630@qq.com"
] |
874189630@qq.com
|
6f507fc5b35ee18e871f42f68190d8be7d0a08d0
|
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
|
/src/chosun/ciis/se/boi/dm/SE_BOI_3010_LDM.java
|
bfc6e698cfaa497c95f363f873a0a2d3ef72a70c
|
[] |
no_license
|
nosmoon/misdevteam
|
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
|
1829d5bd489eb6dd307ca244f0e183a31a1de773
|
refs/heads/master
| 2020-04-15T15:57:05.480056
| 2019-01-10T01:12:01
| 2019-01-10T01:12:01
| 164,812,547
| 1
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 7,019
|
java
|
/***************************************************************************************************
* 파일명 :
* 기능 :
* 작성일자 : 2017-01-05
* 작성자 : 민 기 홍
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.se.boi.dm;
import java.sql.*;
import oracle.jdbc.driver.*;
import somo.framework.db.*;
import somo.framework.util.*;
import chosun.ciis.se.boi.ds.*;
import chosun.ciis.se.boi.rec.*;
/**
*
*/
public class SE_BOI_3010_LDM extends somo.framework.db.BaseDM implements java.io.Serializable{
public String deptcd;
public String partcd;
public String areacd;
public String bocd;
public String chkyn;
public String frdt;
public String todt;
public SE_BOI_3010_LDM(){}
public SE_BOI_3010_LDM(String deptcd, String partcd, String areacd, String bocd, String chkyn, String frdt, String todt){
this.deptcd = deptcd;
this.partcd = partcd;
this.areacd = areacd;
this.bocd = bocd;
this.chkyn = chkyn;
this.frdt = frdt;
this.todt = todt;
}
public void setDeptcd(String deptcd){
this.deptcd = deptcd;
}
public void setPartcd(String partcd){
this.partcd = partcd;
}
public void setAreacd(String areacd){
this.areacd = areacd;
}
public void setBocd(String bocd){
this.bocd = bocd;
}
public void setChkyn(String chkyn){
this.chkyn = chkyn;
}
public void setFrdt(String frdt){
this.frdt = frdt;
}
public void setTodt(String todt){
this.todt = todt;
}
public String getDeptcd(){
return this.deptcd;
}
public String getPartcd(){
return this.partcd;
}
public String getAreacd(){
return this.areacd;
}
public String getBocd(){
return this.bocd;
}
public String getChkyn(){
return this.chkyn;
}
public String getFrdt(){
return this.frdt;
}
public String getTodt(){
return this.todt;
}
public String getSQL(){
return "{ call SP_SE_BOI_3010_L( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) }";
}
public void setParams(CallableStatement cstmt, BaseDM bdm) throws SQLException{
SE_BOI_3010_LDM dm = (SE_BOI_3010_LDM)bdm;
cstmt.registerOutParameter(1, Types.VARCHAR);
cstmt.registerOutParameter(2, Types.VARCHAR);
cstmt.setString(3, dm.deptcd);
cstmt.setString(4, dm.partcd);
cstmt.setString(5, dm.areacd);
cstmt.setString(6, dm.bocd);
cstmt.setString(7, dm.chkyn);
cstmt.setString(8, dm.frdt);
cstmt.setString(9, dm.todt);
cstmt.registerOutParameter(10, OracleTypes.CURSOR);
}
public BaseDataSet createDataSetObject(){
return new chosun.ciis.se.boi.ds.SE_BOI_3010_LDataSet();
}
public void print(){
System.out.println("deptcd = " + getDeptcd());
System.out.println("partcd = " + getPartcd());
System.out.println("areacd = " + getAreacd());
System.out.println("bocd = " + getBocd());
System.out.println("chkyn = " + getChkyn());
System.out.println("frdt = " + getFrdt());
System.out.println("todt = " + getTodt());
}
}
/*----------------------------------------------------------------------------------------------------
Web Tier에서 req.getParameter() 처리 및 결과확인 검사시 사용하십시오.
String deptcd = req.getParameter("deptcd");
if( deptcd == null){
System.out.println(this.toString+" : deptcd is null" );
}else{
System.out.println(this.toString+" : deptcd is "+deptcd );
}
String partcd = req.getParameter("partcd");
if( partcd == null){
System.out.println(this.toString+" : partcd is null" );
}else{
System.out.println(this.toString+" : partcd is "+partcd );
}
String areacd = req.getParameter("areacd");
if( areacd == null){
System.out.println(this.toString+" : areacd is null" );
}else{
System.out.println(this.toString+" : areacd is "+areacd );
}
String bocd = req.getParameter("bocd");
if( bocd == null){
System.out.println(this.toString+" : bocd is null" );
}else{
System.out.println(this.toString+" : bocd is "+bocd );
}
String chkyn = req.getParameter("chkyn");
if( chkyn == null){
System.out.println(this.toString+" : chkyn is null" );
}else{
System.out.println(this.toString+" : chkyn is "+chkyn );
}
String frdt = req.getParameter("frdt");
if( frdt == null){
System.out.println(this.toString+" : frdt is null" );
}else{
System.out.println(this.toString+" : frdt is "+frdt );
}
String todt = req.getParameter("todt");
if( todt == null){
System.out.println(this.toString+" : todt is null" );
}else{
System.out.println(this.toString+" : todt is "+todt );
}
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier에서 req.getParameter() 처리시 사용하십시오.
String deptcd = Util.checkString(req.getParameter("deptcd"));
String partcd = Util.checkString(req.getParameter("partcd"));
String areacd = Util.checkString(req.getParameter("areacd"));
String bocd = Util.checkString(req.getParameter("bocd"));
String chkyn = Util.checkString(req.getParameter("chkyn"));
String frdt = Util.checkString(req.getParameter("frdt"));
String todt = Util.checkString(req.getParameter("todt"));
----------------------------------------------------------------------------------------------------*//*----------------------------------------------------------------------------------------------------
Web Tier에서 한글처리와 동시에 req.getParameter() 처리시 사용하십시오.
String deptcd = Util.Uni2Ksc(Util.checkString(req.getParameter("deptcd")));
String partcd = Util.Uni2Ksc(Util.checkString(req.getParameter("partcd")));
String areacd = Util.Uni2Ksc(Util.checkString(req.getParameter("areacd")));
String bocd = Util.Uni2Ksc(Util.checkString(req.getParameter("bocd")));
String chkyn = Util.Uni2Ksc(Util.checkString(req.getParameter("chkyn")));
String frdt = Util.Uni2Ksc(Util.checkString(req.getParameter("frdt")));
String todt = Util.Uni2Ksc(Util.checkString(req.getParameter("todt")));
----------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------
Web Tier에서 DM 파일의 변수를 설정시 사용하십시오.
dm.setDeptcd(deptcd);
dm.setPartcd(partcd);
dm.setAreacd(areacd);
dm.setBocd(bocd);
dm.setChkyn(chkyn);
dm.setFrdt(frdt);
dm.setTodt(todt);
----------------------------------------------------------------------------------------------------*/
/* 작성시간 : Fri Jun 30 16:19:20 KST 2017 */
|
[
"DLCOM000@172.16.30.11"
] |
DLCOM000@172.16.30.11
|
b528074ebd09f73acea50dcacec9f04acf778874
|
4a35eb46507eb8207f634e6dad23762d0aec94df
|
/project/MapExplore/jMetal-jmetal-5.1/jmetal-core/src/main/java/org/uma/jmetal/util/experiment/component/ExecuteAlgorithms.java
|
196f8c9beb94d1a525afe921752acdd9388a970b
|
[] |
no_license
|
fairanswers/fss16joe
|
8800ad81c60ab06f90b9643bf601c6c2c9a51107
|
f5dde87038ec5404a6bb2d9a538b2ceef571ac9d
|
refs/heads/master
| 2020-05-22T06:44:32.138162
| 2016-12-07T19:46:54
| 2016-12-07T19:46:54
| 65,820,114
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,720
|
java
|
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package org.uma.jmetal.util.experiment.component;
import org.uma.jmetal.solution.Solution;
import org.uma.jmetal.util.JMetalException;
import org.uma.jmetal.util.JMetalLogger;
import org.uma.jmetal.util.experiment.ExperimentComponent;
import org.uma.jmetal.util.experiment.Experiment;
import org.uma.jmetal.util.experiment.util.MultithreadedExperimentExecutor;
import org.uma.jmetal.util.experiment.util.TaggedAlgorithm;
import java.io.File;
/**
* This class executes the algorithms the have been configured with a instance of class
* {@link Experiment}. For each combination algorithm + problem + runId an instance
* of {@link TaggedAlgorithm} is created and inserted as a task of a {@link MultithreadedExperimentExecutor},
* which runs all the algorithms.
*
* The result of the execution is a pair of files FUNrunId.tsv and VARrunID.tsv per experiment, which are
* stored in the directory {@link Experiment #getExperimentBaseDirectory()}/algorithmName/problemName.
*
* @author Antonio J. Nebro <antonio@lcc.uma.es>
*/
public class ExecuteAlgorithms<S extends Solution<?>, Result> implements ExperimentComponent {
private Experiment<S, Result> experiment;
/** Constructor */
public ExecuteAlgorithms(Experiment<S, Result> configuration) {
this.experiment = configuration ;
}
@Override
public void run() {
JMetalLogger.logger.info("ExecuteAlgorithms: Preparing output directory");
prepareOutputDirectory() ;
MultithreadedExperimentExecutor<S, Result> parallelExecutor ;
parallelExecutor = new MultithreadedExperimentExecutor<S, Result>(experiment.getNumberOfCores()) ;
parallelExecutor.start(this);
for (TaggedAlgorithm<Result> algorithm : experiment.getAlgorithmList()) {
//for (int i = 0; i < experiment.getIndependentRuns(); i++) {
//TaggedAlgorithm<Result> clonedAlgorithm = SerializationUtils.clone(algorithm) ;
parallelExecutor.addTask(new Object[]{algorithm, algorithm.getRunId(), experiment});
//}
}
parallelExecutor.parallelExecution();
parallelExecutor.stop(); }
private void prepareOutputDirectory() {
if (experimentDirectoryDoesNotExist()) {
createExperimentDirectory() ;
}
}
private boolean experimentDirectoryDoesNotExist() {
boolean result;
File experimentDirectory;
experimentDirectory = new File(experiment.getExperimentBaseDirectory());
if (experimentDirectory.exists() && experimentDirectory.isDirectory()) {
result = false;
} else {
result = true;
}
return result;
}
private void createExperimentDirectory() {
File experimentDirectory;
experimentDirectory = new File(experiment.getExperimentBaseDirectory());
if (experimentDirectory.exists()) {
experimentDirectory.delete() ;
}
boolean result ;
result = new File(experiment.getExperimentBaseDirectory()).mkdirs() ;
if (!result) {
throw new JMetalException("Error creating experiment directory: " +
experiment.getExperimentBaseDirectory()) ;
}
}
}
|
[
"joe@bodkinconsulting.com"
] |
joe@bodkinconsulting.com
|
ef772540ed5b5d5f4646bb862ae5af2476fada27
|
5d92778cc862e1f1788e1dad9a64c7b6f9986602
|
/src/com/tocersoft/system/service/ISysUploadObjectService.java
|
81a698bba9adec18f307ce2224f09cef71763a9f
|
[] |
no_license
|
zhaozhihao59/waston
|
0492f72905ea74ddb221f5f0b12da4be644926e5
|
792e480d9db9e451b7cee0f10c62177c63f4a954
|
refs/heads/master
| 2020-12-02T22:15:20.101310
| 2017-08-19T13:55:36
| 2017-08-19T13:55:36
| 96,101,831
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,066
|
java
|
package com.tocersoft.system.service;
import java.util.List;
import com.tocersoft.system.entity.SysUploadObject;
import com.tocersoft.base.page.PageResult;
import com.tocersoft.system.dto.SysUploadObjectCondition;
public interface ISysUploadObjectService {
/**
* 分页查询
* @param pageResult 分页对象
* @param condition 查询条件类
*/
void listSysUploadObjectByPage(PageResult<SysUploadObject> pageResult,SysUploadObjectCondition condition);
/**
* 根据ID查询
* @param id 主键
* @return 文件对应的关联对象类型:比如与哪张表关联,用于关联表
*/
SysUploadObject getSysUploadObjectById(String id);
/**
* 新增
* @param item 文件对应的关联对象类型:比如与哪张表关联,用于关联表
*/
void add(SysUploadObject item);
/**
* 修改
* @param item 文件对应的关联对象类型:比如与哪张表关联,用于关联表
*/
void update(SysUploadObject item);
/**
* 根据ID集合批量删除
* @param ids ID集合
*/
void delByIds(String[] ids);
}
|
[
"win 10@DESKTOP-K8NV66R"
] |
win 10@DESKTOP-K8NV66R
|
60004cae8fd8548b006dfb2983cde88aae384166
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-12855-29-17-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/store/hibernate/query/HqlQueryExecutor_ESTest_scaffolding.java
|
a1ab512bae82203c433d85fe2035bf6ac02a00c4
|
[] |
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
| 456
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sun Apr 05 08:30:15 UTC 2020
*/
package com.xpn.xwiki.store.hibernate.query;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class HqlQueryExecutor_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
78013d100fd895a68017688b53fccf0efc561e8e
|
81104c146422de7d9b795e2c79fba6ac9bc38aea
|
/appserver/downstream/Server/config/java/action/sap/CATSAPSetOrgIDonChangeCommSupp.java
|
1a5fc415b38978d4e29ebee3b0335a4ac173eae9
|
[] |
no_license
|
skishukmr/Masterfiles
|
7b92c7d1fdc53abd3b8d48f9a1fe7f48e7d9d108
|
544b5c0e866489a45e266f19bf42715cc392e6cd
|
refs/heads/master
| 2020-04-26T18:40:31.792251
| 2014-03-11T19:26:24
| 2014-03-11T19:26:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,604
|
java
|
/*********************************************************************************************************************
Created by : James S Pagadala
Date : Oct 13 2008
********************************************************************************************************************/
package config.java.action.sap;
import ariba.base.core.BaseVector;
import ariba.base.fields.ValueSource;
import ariba.util.core.PropertyTable;
import ariba.base.fields.Action;
import ariba.util.log.Log;
import ariba.common.core.SupplierLocation;
import ariba.common.core.Supplier;
import ariba.common.core.CommonSupplier;
public class CATSAPSetOrgIDonChangeCommSupp extends Action {
public void fire(ValueSource object, PropertyTable params){
Log.customer.debug("CATSAPSetOrgIDonChangeCommSupp : fire : ****START****");
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (!(object instanceof Supplier)){
return;
}
Supplier supplier = (Supplier)object;
if(supplier == null){
Log.customer.debug("CATSAPSetOrgIDonChangeCommSupp : fire : Supplier is null");
return;
}
Log.customer.debug("CATSAPSetOrgIDonChangeCommSupp : fire : Supplier " + supplier);
CommonSupplier commSupp = supplier.getCommonSupplier();
if(commSupp == null){
Log.customer.debug("CATSAPSetOrgIDonChangeCommSupp : fire : Common Supplier is null");
return;
}
Log.customer.debug("CATSAPSetOrgIDonChangeCommSupp : fire : Common Supplier " + commSupp);
BaseVector supplocs = supplier.getLocations();
if(supplocs == null )
{
Log.customer.debug("CATSAPSetOrgIDonChangeCommSupp : fire : List of Supplier Location is null");
return;
}
else
{
Log.customer.debug("CATSAPSetOrgIDonChangeCommSupp : fire : Supplier Location Size " + supplocs.size());
for(int i=0;i<supplocs.size();i++)
{
SupplierLocation SL = (SupplierLocation)supplocs.get(i);
Log.customer.debug("CATSAPSetOrgIDonChangeCommSupp : fire : Supplier " + SL);
Log.customer.debug("CATSAPSetOrgIDonChangeCommSupp : fire : Supplier " + SL.getDottedFieldValue("UniqueName"));
Log.customer.debug("CATSAPSetOrgIDonChangeCommSupp : fire : Supplier " + SL.getDottedFieldValue("ContactID"));
}
}
Log.customer.debug("CATSAPSetOrgIDonChangeCommSupp : fire : ****END****");
}
}
|
[
"Dec11@test.com"
] |
Dec11@test.com
|
bb22eaf4eca9c3f33751b852eaa61f23875f8096
|
686328b1fe50bdbae38837ed798730c897b360d6
|
/src/main/java/org/dasein/cloud/aws/platform/CloudFrontException.java
|
b76d1e18e2f2ccb718669b73a15f417040917485
|
[
"Apache-2.0"
] |
permissive
|
ckelner/dasein-cloud-aws
|
c2b3f4005849b9fba3ea432f8ecc291a4a5d1a90
|
7b713e1334bff504fd823b668c6e15b47c5621bd
|
refs/heads/master
| 2021-01-15T16:05:38.567244
| 2013-07-22T20:40:04
| 2013-07-22T20:40:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,574
|
java
|
/**
* Copyright (C) 2009-2013 Enstratius, Inc.
*
* ====================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*/
package org.dasein.cloud.aws.platform;
public class CloudFrontException extends Exception {
private static final long serialVersionUID = -10048474762735043L;
private String code = null;
private String requestId = null;
private int status = 0;
private String type = null;
public CloudFrontException(int status, String requestId, String type, String code, String message) {
super(message);
this.requestId = requestId;
this.type = type;
this.code = code;
this.status = status;
}
public String getCode() {
return code;
}
public String getRequestId() {
return requestId;
}
public int getStatus() {
return status;
}
public String getSummary() {
return (status + "/" + requestId + "/" + code + ": " + getMessage());
}
public String getType() {
return type;
}
}
|
[
"george.reese@imaginary.com"
] |
george.reese@imaginary.com
|
7913e7feed944b9477ee4cd2042be0890af71f86
|
558667608651dfd5778e3cc1131e9eaf5f1be8d7
|
/smali/net/slidingmenu/tools/b/a/e/c/c/a.java
|
b5fb23f82d362a1960bc5e213c40ef206771472c
|
[] |
no_license
|
gambol/chunqingaikan
|
0cd6b0d3ca855f2d1a5ad22f7be3c46f8b1e6984
|
25fa70619ab484e61124465a0b4bdec1cdb5bf62
|
refs/heads/master
| 2021-01-10T11:13:41.624112
| 2015-03-04T14:08:40
| 2015-03-04T14:08:40
| 36,016,628
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,249
|
java
|
package net.slidingmenu.tools.b.a.e.c.c; class a { void a() { int a;
a=0;// .class public final Lnet/slidingmenu/tools/b/a/e/c/c/a;
a=0;// .super Lnet/slidingmenu/tools/b/a/e/a/b/l;
a=0;//
a=0;//
a=0;// # direct methods
a=0;// .method public constructor <init>()V
a=0;// .locals 0
a=0;//
a=0;// invoke-direct {p0}, Lnet/slidingmenu/tools/b/a/e/a/b/l;-><init>()V
a=0;//
a=0;// #p0=(Reference,Lnet/slidingmenu/tools/b/a/e/c/c/a;);
a=0;// return-void
a=0;// .end method
a=0;//
a=0;//
a=0;// # virtual methods
a=0;// .method protected a(Lnet/slidingmenu/tools/b/a/e/a/b/h;Lnet/slidingmenu/tools/b/a/e/a/b/f;Lorg/json/JSONObject;)Lorg/json/JSONObject;
a=0;// .locals 5
a=0;//
a=0;// const/4 v1, 0x0
a=0;//
a=0;// #v1=(Null);
a=0;// if-nez p1, :cond_0
a=0;//
a=0;// const/4 v0, 0x3
a=0;//
a=0;// :try_start_0
a=0;// #v0=(PosByte);
a=0;// invoke-static {v0}, Lnet/slidingmenu/tools/b/a/e/c/c/a;->a(I)Lorg/json/JSONObject;
a=0;//
a=0;// move-result-object v0
a=0;//
a=0;// :goto_0
a=0;// #v0=(Reference,Lorg/json/JSONObject;);v2=(Conflicted);v3=(Conflicted);v4=(Conflicted);
a=0;// return-object v0
a=0;//
a=0;// :cond_0
a=0;// #v0=(Uninit);v2=(Uninit);v3=(Uninit);v4=(Uninit);
a=0;// invoke-interface {p1}, Lnet/slidingmenu/tools/b/a/e/a/b/h;->h()Landroid/content/Context;
a=0;//
a=0;// move-result-object v2
a=0;//
a=0;// #v2=(Reference,Landroid/content/Context;);
a=0;// if-nez v2, :cond_1
a=0;//
a=0;// const/4 v0, 0x3
a=0;//
a=0;// #v0=(PosByte);
a=0;// invoke-static {v0}, Lnet/slidingmenu/tools/b/a/e/c/c/a;->a(I)Lorg/json/JSONObject;
a=0;//
a=0;// move-result-object v0
a=0;//
a=0;// #v0=(Reference,Lorg/json/JSONObject;);
a=0;// goto :goto_0
a=0;//
a=0;// :cond_1
a=0;// #v0=(Uninit);
a=0;// const-string v0, "a"
a=0;//
a=0;// #v0=(Reference,Ljava/lang/String;);
a=0;// const/4 v3, 0x0
a=0;//
a=0;// #v3=(Null);
a=0;// invoke-static {p3, v0, v3}, Lnet/slidingmenu/tools/b/b/b/b;->a(Lorg/json/JSONObject;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
a=0;//
a=0;// move-result-object v3
a=0;//
a=0;// #v3=(Reference,Ljava/lang/String;);
a=0;// if-nez v3, :cond_2
a=0;//
a=0;// const/4 v0, 0x2
a=0;//
a=0;// #v0=(PosByte);
a=0;// invoke-static {v0}, Lnet/slidingmenu/tools/b/a/e/c/c/a;->a(I)Lorg/json/JSONObject;
a=0;//
a=0;// move-result-object v0
a=0;//
a=0;// #v0=(Reference,Lorg/json/JSONObject;);
a=0;// goto :goto_0
a=0;//
a=0;// :cond_2
a=0;// const/4 v0, 0x0
a=0;//
a=0;// #v0=(Null);
a=0;// invoke-static {v0}, Lnet/slidingmenu/tools/b/a/e/c/c/a;->a(I)Lorg/json/JSONObject;
a=0;//
a=0;// move-result-object v0
a=0;//
a=0;// #v0=(Reference,Lorg/json/JSONObject;);
a=0;// new-instance v4, Lorg/json/JSONObject;
a=0;//
a=0;// #v4=(UninitRef,Lorg/json/JSONObject;);
a=0;// invoke-direct {v4}, Lorg/json/JSONObject;-><init>()V
a=0;//
a=0;// #v4=(Reference,Lorg/json/JSONObject;);
a=0;// invoke-static {v2}, Lnet/slidingmenu/tools/b/a/e/b/d;->a(Landroid/content/Context;)Lnet/slidingmenu/tools/b/a/e/b/d;
a=0;//
a=0;// move-result-object v2
a=0;//
a=0;// invoke-virtual {v2, v3}, Lnet/slidingmenu/tools/b/a/e/b/d;->a(Ljava/lang/String;)Lnet/slidingmenu/tools/b/a/e/b/a;
a=0;//
a=0;// move-result-object v2
a=0;//
a=0;// if-nez v2, :cond_3
a=0;//
a=0;// const-string v2, "a"
a=0;//
a=0;// const-string v3, ""
a=0;//
a=0;// invoke-virtual {v4, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
a=0;//
a=0;// const-string v2, "b"
a=0;//
a=0;// const/4 v3, 0x1
a=0;//
a=0;// #v3=(One);
a=0;// invoke-virtual {v4, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
a=0;//
a=0;// :goto_1
a=0;// #v3=(Boolean);
a=0;// const-string v2, "d"
a=0;//
a=0;// invoke-virtual {v0, v2, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
a=0;//
a=0;// goto :goto_0
a=0;//
a=0;// :catch_0
a=0;// #v0=(Conflicted);v2=(Conflicted);v3=(Conflicted);v4=(Conflicted);
a=0;// move-exception v0
a=0;//
a=0;// #v0=(Reference,Ljava/lang/Throwable;);
a=0;// move-object v0, v1
a=0;//
a=0;// #v0=(Null);
a=0;// goto :goto_0
a=0;//
a=0;// :cond_3
a=0;// #v0=(Reference,Lorg/json/JSONObject;);v2=(Reference,Lnet/slidingmenu/tools/b/a/e/b/a;);v3=(Reference,Ljava/lang/String;);v4=(Reference,Lorg/json/JSONObject;);
a=0;// const-string v3, "a"
a=0;//
a=0;// invoke-virtual {v2}, Lnet/slidingmenu/tools/b/a/e/b/a;->b()Ljava/lang/String;
a=0;//
a=0;// move-result-object v2
a=0;//
a=0;// invoke-virtual {v4, v3, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
a=0;//
a=0;// const-string v2, "b"
a=0;//
a=0;// const/4 v3, 0x0
a=0;//
a=0;// #v3=(Null);
a=0;// invoke-virtual {v4, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;
a=0;// :try_end_0
a=0;// .catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
a=0;//
a=0;// goto :goto_1
a=0;// .end method
}}
|
[
"zhenbao.zhou@qunar.com"
] |
zhenbao.zhou@qunar.com
|
3eff9e79a282b3e6977d0c966be9afa95d192e2f
|
377e5e05fb9c6c8ed90ad9980565c00605f2542b
|
/.gitignore/bin/ext-platform-optional/platformwebservices/web/src/de/hybris/platform/webservices/CrudActionNotifable.java
|
854b66293adfc55f61c326af45d6dd1e1807e3a0
|
[] |
no_license
|
automaticinfotech/HybrisProject
|
c22b13db7863e1e80ccc29774f43e5c32e41e519
|
fc12e2890c569e45b97974d2f20a8cbe92b6d97f
|
refs/heads/master
| 2021-07-20T18:41:04.727081
| 2017-10-30T13:24:11
| 2017-10-30T13:24:11
| 108,957,448
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 786
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2016 SAP SE
* All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* Hybris ("Confidential Information"). You shall not disclose such
* Confidential Information and shall use it only in accordance with the
* terms of the license agreement you entered into with SAP Hybris.
*/
package de.hybris.platform.webservices;
/**
*
*/
public interface CrudActionNotifable<RESOURCE>
{
void notifyBeforeGet();
void notifyAfterGet();
void notifyBeforePut();
void notifyAfterPut();
void notifyBeforeDelete();
void notifyAfterDelete();
void notifyBeforePost();
void notifyAfterPost();
//void notifyBeforePut(RESOURCE resource);
//void notifyAfterPut(RESOURCE resource);
}
|
[
"santosh.kshirsagar@automaticinfotech.com"
] |
santosh.kshirsagar@automaticinfotech.com
|
9b2a7fdf447b04e14702610ab3f24e647cd254f4
|
33e7e854745addbeeb53d5702793240d1927d583
|
/gulimall-common/src/main/java/com/honyelchak/common/utils/R.java
|
6add1de9f372b1a634f881f080cc1870ecfc5a01
|
[
"Apache-2.0"
] |
permissive
|
Honyelchak/gulimall
|
64f1acfd134ca49dbe3ec81a9cbb5d639374405e
|
a6c21aa832a76f6816908dcf316177d0d602703c
|
refs/heads/main
| 2023-03-03T18:45:35.318563
| 2021-02-19T12:11:31
| 2021-02-19T12:11:31
| 333,087,073
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,151
|
java
|
/**
* Copyright (c) 2016-2019 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有,侵权必究!
*/
package com.honyelchak.common.utils;
import org.apache.http.HttpStatus;
import java.util.HashMap;
import java.util.Map;
/**
* 返回数据
*
* @author Mark sunlightcs@gmail.com
*/
public class R extends HashMap<String, Object> {
private static final long serialVersionUID = 1L;
public R() {
put("code", 0);
put("msg", "success");
}
public static R error() {
return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "未知异常,请联系管理员");
}
public static R error(String msg) {
return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, msg);
}
public static R error(int code, String msg) {
R r = new R();
r.put("code", code);
r.put("msg", msg);
return r;
}
public static R ok(String msg) {
R r = new R();
r.put("msg", msg);
return r;
}
public static R ok(Map<String, Object> map) {
R r = new R();
r.putAll(map);
return r;
}
public static R ok() {
return new R();
}
public R put(String key, Object value) {
super.put(key, value);
return this;
}
}
|
[
"554417388@qq.com"
] |
554417388@qq.com
|
91b425c02095dcbd66a499bf985fc752d50d0274
|
88ed30ae68858ad6365357d4b0a95ad07594c430
|
/agent/arcus-zw-controller/src/main/java/com/iris/agent/zw/code/entity/CmdNetInclNodeRemoveStatus.java
|
57b4f8ef5121009035ab3965a9bee827829fc4c0
|
[
"Apache-2.0"
] |
permissive
|
Diffblue-benchmarks/arcusplatform
|
686f58654d2cdf3ca3c25bc475bf8f04db0c4eb3
|
b95cb4886b99548a6c67702e8ba770317df63fe2
|
refs/heads/master
| 2020-05-23T15:41:39.298441
| 2019-05-01T03:56:47
| 2019-05-01T03:56:47
| 186,830,996
| 0
| 0
|
Apache-2.0
| 2019-05-30T11:13:52
| 2019-05-15T13:22:26
|
Java
|
UTF-8
|
Java
| false
| false
| 2,791
|
java
|
/*
* Copyright 2019 Arcus Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.iris.agent.zw.code.entity;
import com.iris.agent.util.ByteUtils;
import com.iris.agent.zw.code.Decoded;
import com.iris.agent.zw.code.Decoder;
import com.iris.agent.zw.code.cmdclass.CmdClasses;
import com.iris.agent.zw.code.cmdclass.NetInclusionCmdClass;
/**
* NetworkInclusion NodeRemove Cmd
*
* 5 Bytes
*
* 0 : CmdClass(0x34)
* 1 : Cmd (0x04)
* 2 : Sequence No
* 3 : Status
* 0x06 - Remove Node Done
* 0x07 - Remove Node Status Failed
* 4 : NodeId - Id of the node being removed.
*
* @author Erik Larson
*/
public class CmdNetInclNodeRemoveStatus extends AbstractZCmd {
public final static int REMOVE_NODE_STATUS_DONE = 0x06;
public final static int REMOVE_NODE_STATUS_FAILED = 0x07;
private final static int BYTE_LENGTH = 5;
public final static CmdNetInclNodeRemoveStatusDecoder DECODER = new CmdNetInclNodeRemoveStatusDecoder();
private final int seqNo;
private final int status;
private final int nodeId;
public CmdNetInclNodeRemoveStatus(int seqNo, int status, int nodeId) {
super(CmdClasses.NETWORK_INCLUSION.intId(), NetInclusionCmdClass.CMD_NODE_REMOVE_STATUS, BYTE_LENGTH);
this.seqNo = seqNo;
this.status = status;
this.nodeId = nodeId;
}
public boolean isSuccess() {
return status == REMOVE_NODE_STATUS_DONE;
}
public int getSeqNo() {
return seqNo;
}
public int getStatus() {
return status;
}
public int getNodeId() {
return nodeId;
}
@Override
public byte[] bytes() {
return ByteUtils.ints2Bytes(
cmdClass,
cmd,
seqNo,
status,
nodeId
);
}
public static class CmdNetInclNodeRemoveStatusDecoder implements Decoder {
private CmdNetInclNodeRemoveStatusDecoder() {}
@Override
public Decoded decode(byte[] bytes, int offset) {
int seqNo = 0x00FF & bytes[offset + 2];
int status = 0x00FF & bytes[offset + 3];
int nodeId = 0x00FF & bytes[offset + 4];
return new Decoded(new CmdNetInclNodeRemoveStatus(seqNo, status, nodeId));
}
}
}
|
[
"b@yoyo.com"
] |
b@yoyo.com
|
ffb43dc60d98f14b7014dbce325da2e70a5402c9
|
55ff7df8f1b7c4c2b34d2b6d23ec9ae807b14d63
|
/app/src/main/java/company/android/documentmanager/office/fc/hslf/model/ShapeOutline.java
|
94e1ec765081dabc09609f58a622954e86fe6e3e
|
[] |
no_license
|
venbrinoDev/DocumentManager
|
42ba1c375f9dcdbbbd3bb41b3bae93593642e196
|
f80d2489c6c074ecbdc604e1573477c90f1c6c30
|
refs/heads/master
| 2023-06-18T11:57:22.454322
| 2021-07-18T15:57:14
| 2021-07-18T15:57:14
| 387,053,739
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,174
|
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 company.android.documentmanager.office.fc.hslf.model;
/**
* Date: Apr 17, 2008
*
* @author Yegor Kozlov
*/
public interface ShapeOutline
{
company.android.documentmanager.office.java.awt.Shape getOutline(Shape shape);
}
|
[
"teamdreamhub@gmail.com"
] |
teamdreamhub@gmail.com
|
6a7478fcc806fd23afbab9ad19f347126dd51d58
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/25/25_f10861175b06f0500a062eabda89b819cef7cc40/AnalysisDropdownHandler/25_f10861175b06f0500a062eabda89b819cef7cc40_AnalysisDropdownHandler_s.java
|
e472f74fa5fb5d5cb2d11af0f83f1c2cb12862b6
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 5,429
|
java
|
/**********************************************************************
* Copyright (c) 2007,2008 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.ptp.pldt.common.actions;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ptp.pldt.common.CommonPlugin;
import org.eclipse.ui.ISelectionListener;
import org.eclipse.ui.ISelectionService;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.handlers.HandlerUtil;
/**
* Default handler for the "Parallel Analysis" toolbar icon command -
* the work would be done by the menus that get registered (by other plugins)
* to appear beneath it, but this itself can do something useful
* by repeating the last-initiated submenu action. ("Do the last thing again")
*
* This class also acts as a single point to cache the current structured selection
* so that when a menu item is selected, the current selection can be accessed.
* It registers as a selection listener to actively listen for selection changes,
* instead of relying on HandlerUtil which won't get the first one (e.g. before
* the plugin is loaded).
*
* @author Beth Tibbitts
*
*/
public class AnalysisDropdownHandler extends AbstractHandler implements ISelectionListener {
static protected RunAnalyseHandler lastAnalysisHandler=null;
static protected IStructuredSelection lastAnalysisSelection=null;
protected IStructuredSelection lastSelection=null;
protected static AnalysisDropdownHandler instance=null;
private static final boolean traceOn=false;
/**
* Constructor: set singleton instance, and set up selection listener to
* listen for selections so we can report them more efficiently
* than relying on HandlerUtil.getCurrentSelection();
* if the current selection isn't a structured selection (e.g. editor selection or something
* we don't care about) then we want the last structured selection.
*/
public AnalysisDropdownHandler(){
if(traceOn)System.out.println("AnalysisDropdownHandler() ctor... should not be >1 of these");
assert(instance==null); // we presume this is a singleton
instance=this;
// register to be notified of future selections
ISelectionService ss=CommonPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getSelectionService();
ss.addSelectionListener(this);
// and cache the selection that was in effect now.
ISelection sel= ss.getSelection();
if(sel instanceof IStructuredSelection) {
lastSelection=(IStructuredSelection)sel;
if(traceOn)System.out.println(" ...got initial selection.");
}
}
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
if(traceOn)System.out.println("AnalysisDropdownHandler.execute()...");
ISelection selection = HandlerUtil.getCurrentSelection(event);
if(traceOn)System.out.println("selection: "+selection);
if(lastAnalysisHandler!=null){
if(traceOn)System.out.println("Last analysis was: "+lastAnalysisHandler);
lastAnalysisHandler.execute(event);
}
else {
final String msg = "No analysis has been done yet to repeat.";
MessageDialog.openInformation(null, "Repeat Analysis", msg);
}
return null;
}
/**
* Remember what was last executed, so that we can give a repeat performance
* @param handler
* @param selection - cache the selection too; this will be used as a last
* resort if another analysis doesn't see a recent selection it likes.
*/
public static void setLastHandledAnalysis(RunAnalyseHandler handler, IStructuredSelection selection){
lastAnalysisHandler = handler;
if(selection!=null){
lastAnalysisSelection=selection;
}
if(traceOn)System.out.println("lastAnalysisHandler set to: "+lastAnalysisHandler);
}
public static IStructuredSelection getLastAnalysisSelection(){
return lastAnalysisSelection;
}
/**
* Implemented for SelectionListener interface:
* Listen for selection changes and cache the ones that might be
* interesting to us.
*/
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
if(selection instanceof IStructuredSelection) {
lastSelection=(IStructuredSelection)selection;
if(traceOn)System.out.println("ADDH.selectionChanged, got structured selection");
}
}
/**
* The last structured selection seen
* @return
*/
public IStructuredSelection getLastSelection() {
return lastSelection;
}
/**
* Get the singleton instance of this class, probably for accessing its
* knowledge about the current/last selection of interest.
*
* @return
*/
public static AnalysisDropdownHandler getInstance() {
if(instance==null) {
instance=new AnalysisDropdownHandler();
}
return instance;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
e707f30606f4d3eef7274d7999345864fd7d2387
|
1a4773f85204e66b0cab9dc6039de0d006d87617
|
/src/main/java/net/minepos/pterobot/registerables/Registerable.java
|
ebc4eb8869df3772e20e9f76d6e013dd17c5b29e
|
[
"MIT"
] |
permissive
|
minepos-software/Pterodactyl-Discord
|
a6d378a616f29e6c85db5a89f011b0b768df9e86
|
d7246efbf3c68a346365c0f6148cbbfb3e5e47bc
|
refs/heads/master
| 2020-05-03T09:30:13.366772
| 2019-04-06T09:30:52
| 2019-04-06T09:30:52
| 178,164,711
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 574
|
java
|
package net.minepos.pterobot.registerables;
import lombok.Getter;
import java.util.HashMap;
import java.util.Map;
// ------------------------------
// Copyright (c) PiggyPiglet 2019
// https://www.piggypiglet.me
// ------------------------------
public abstract class Registerable {
@Getter private final Map<String, Object> values = new HashMap<>();
protected abstract void execute();
protected Registerable addValue(String key, Object value) {
values.put(key, value);
return this;
}
public void run() {
execute();
}
}
|
[
"noreply@piggypiglet.me"
] |
noreply@piggypiglet.me
|
e528a017b8e655bc12d6767ff33dee144b5ac68b
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a065/A065705Test.java
|
170ad234ed5d3fe3196875322e629d75765def7a
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package irvine.oeis.a065;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A065705Test extends AbstractSequenceTest {
}
|
[
"sairvin@gmail.com"
] |
sairvin@gmail.com
|
ba062f1073442fb6f3f69ee7d03cb621b52a5839
|
961016a614c6785e6fe8f6bfd7214676f0d91064
|
/Portlets/ProgateServiceBuilder-portlet/docroot/WEB-INF/service/larion/progate/service/persistence/ProGateJournalArticlePrioritiesPersistence.java
|
7c42a46fab0acf9af79513d6b6bb25f1b9b66bfa
|
[] |
no_license
|
thaond/progate-lmis
|
f58c447c58c11217e2247c7ca3349a44ad7f3bbd
|
d143b7e7d56a22cc9ce6256ca6fb77a11459e6d6
|
refs/heads/master
| 2021-01-10T03:00:26.888869
| 2011-07-28T14:12:54
| 2011-07-28T14:12:54
| 44,992,742
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,943
|
java
|
/**
* Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package larion.progate.service.persistence;
import com.liferay.portal.service.persistence.BasePersistence;
/**
* <a href="ProGateJournalArticlePrioritiesPersistence.java.html"><b><i>View Source</i></b></a>
*
* @author Brian Wing Shun Chan
*
*/
public interface ProGateJournalArticlePrioritiesPersistence
extends BasePersistence {
public void cacheResult(
larion.progate.model.ProGateJournalArticlePriorities proGateJournalArticlePriorities);
public void cacheResult(
java.util.List<larion.progate.model.ProGateJournalArticlePriorities> proGateJournalArticlePrioritieses);
public void clearCache();
public larion.progate.model.ProGateJournalArticlePriorities create(
java.lang.Integer journalArticlePrioritiesId);
public larion.progate.model.ProGateJournalArticlePriorities remove(
java.lang.Integer journalArticlePrioritiesId)
throws com.liferay.portal.SystemException,
larion.progate.NoSuchProGateJournalArticlePrioritiesException;
public larion.progate.model.ProGateJournalArticlePriorities remove(
larion.progate.model.ProGateJournalArticlePriorities proGateJournalArticlePriorities)
throws com.liferay.portal.SystemException;
public larion.progate.model.ProGateJournalArticlePriorities update(
larion.progate.model.ProGateJournalArticlePriorities proGateJournalArticlePriorities)
throws com.liferay.portal.SystemException;
public larion.progate.model.ProGateJournalArticlePriorities update(
larion.progate.model.ProGateJournalArticlePriorities proGateJournalArticlePriorities,
boolean merge) throws com.liferay.portal.SystemException;
public larion.progate.model.ProGateJournalArticlePriorities updateImpl(
larion.progate.model.ProGateJournalArticlePriorities proGateJournalArticlePriorities,
boolean merge) throws com.liferay.portal.SystemException;
public larion.progate.model.ProGateJournalArticlePriorities findByPrimaryKey(
java.lang.Integer journalArticlePrioritiesId)
throws com.liferay.portal.SystemException,
larion.progate.NoSuchProGateJournalArticlePrioritiesException;
public larion.progate.model.ProGateJournalArticlePriorities fetchByPrimaryKey(
java.lang.Integer journalArticlePrioritiesId)
throws com.liferay.portal.SystemException;
public java.util.List<larion.progate.model.ProGateJournalArticlePriorities> findByname(
java.lang.String name) throws com.liferay.portal.SystemException;
public java.util.List<larion.progate.model.ProGateJournalArticlePriorities> findByname(
java.lang.String name, int start, int end)
throws com.liferay.portal.SystemException;
public java.util.List<larion.progate.model.ProGateJournalArticlePriorities> findByname(
java.lang.String name, int start, int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
throws com.liferay.portal.SystemException;
public larion.progate.model.ProGateJournalArticlePriorities findByname_First(
java.lang.String name,
com.liferay.portal.kernel.util.OrderByComparator obc)
throws com.liferay.portal.SystemException,
larion.progate.NoSuchProGateJournalArticlePrioritiesException;
public larion.progate.model.ProGateJournalArticlePriorities findByname_Last(
java.lang.String name,
com.liferay.portal.kernel.util.OrderByComparator obc)
throws com.liferay.portal.SystemException,
larion.progate.NoSuchProGateJournalArticlePrioritiesException;
public larion.progate.model.ProGateJournalArticlePriorities[] findByname_PrevAndNext(
java.lang.Integer journalArticlePrioritiesId, java.lang.String name,
com.liferay.portal.kernel.util.OrderByComparator obc)
throws com.liferay.portal.SystemException,
larion.progate.NoSuchProGateJournalArticlePrioritiesException;
public java.util.List<Object> findWithDynamicQuery(
com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
throws com.liferay.portal.SystemException;
public java.util.List<Object> findWithDynamicQuery(
com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
int end) throws com.liferay.portal.SystemException;
public java.util.List<larion.progate.model.ProGateJournalArticlePriorities> findAll()
throws com.liferay.portal.SystemException;
public java.util.List<larion.progate.model.ProGateJournalArticlePriorities> findAll(
int start, int end) throws com.liferay.portal.SystemException;
public java.util.List<larion.progate.model.ProGateJournalArticlePriorities> findAll(
int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
throws com.liferay.portal.SystemException;
public void removeByname(java.lang.String name)
throws com.liferay.portal.SystemException;
public void removeAll() throws com.liferay.portal.SystemException;
public int countByname(java.lang.String name)
throws com.liferay.portal.SystemException;
public int countAll() throws com.liferay.portal.SystemException;
public java.util.List<larion.progate.model.ProGateJournalArticle> getProGateJournalArticles(
java.lang.Integer pk) throws com.liferay.portal.SystemException;
public java.util.List<larion.progate.model.ProGateJournalArticle> getProGateJournalArticles(
java.lang.Integer pk, int start, int end)
throws com.liferay.portal.SystemException;
public java.util.List<larion.progate.model.ProGateJournalArticle> getProGateJournalArticles(
java.lang.Integer pk, int start, int end,
com.liferay.portal.kernel.util.OrderByComparator obc)
throws com.liferay.portal.SystemException;
public int getProGateJournalArticlesSize(java.lang.Integer pk)
throws com.liferay.portal.SystemException;
public boolean containsProGateJournalArticle(java.lang.Integer pk,
java.lang.Integer proGateJournalArticlePK)
throws com.liferay.portal.SystemException;
public boolean containsProGateJournalArticles(java.lang.Integer pk)
throws com.liferay.portal.SystemException;
}
|
[
"tigerproand@gmail.com"
] |
tigerproand@gmail.com
|
231b63945784feca2e1e74b273d109e0da20de14
|
d7e5b69072b619e39ceb2d734360f585d8a9cf3a
|
/cbor/src/test/java/com/fasterxml/jackson/dataformat/cbor/mapper/JDKSerializabilityTest.java
|
f653c0be51a5ff731e93f12abbf741832d5aa4f5
|
[
"Apache-2.0"
] |
permissive
|
shashikanthkbagali5/jackson-dataformats-binary
|
157de491dfe0f3fd313619f1e5f687310d7186e9
|
4a2d8e579e619ada7d38efd6feb70f9de1e981aa
|
refs/heads/master
| 2020-08-21T22:50:16.730124
| 2019-10-14T04:51:26
| 2019-10-14T04:51:26
| 216,265,548
| 1
| 0
| null | 2019-10-19T20:21:03
| 2019-10-19T20:21:02
| null |
UTF-8
|
Java
| false
| false
| 2,170
|
java
|
package com.fasterxml.jackson.dataformat.cbor.mapper;
import java.io.*;
import java.util.Arrays;
import com.fasterxml.jackson.dataformat.cbor.CBORTestBase;
import com.fasterxml.jackson.dataformat.cbor.databind.CBORMapper;
public class JDKSerializabilityTest extends CBORTestBase
{
public void testApacheMapperWithModule() throws Exception {
// very simple validation: should still work wrt serialization
CBORMapper unfrozenMapper = serializeAndDeserialize(new CBORMapper());
// and then simple verification that write+read still works
Object input = _simpleData();
byte[] encoded = unfrozenMapper.writeValueAsBytes(input);
final Object result = unfrozenMapper.readerFor(Object.class)
.readValue(encoded);
assertEquals(result, input);
// and also verify `rebuild()` works:
CBORMapper copy = unfrozenMapper.rebuild().build();
assertNotSame(unfrozenMapper, copy);
// with 3.x, factories are immutable so they need not be unshared:
assertSame(unfrozenMapper.tokenStreamFactory(), copy.tokenStreamFactory());
final Object result2 = copy.readerFor(Object.class)
.readValue(encoded);
assertEquals(input, result2);
}
private CBORMapper serializeAndDeserialize(CBORMapper mapper) throws Exception {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
ObjectOutputStream outputStream = new ObjectOutputStream(byteArrayOutputStream);
outputStream.writeObject(mapper);
byte[] serializedBytes = byteArrayOutputStream.toByteArray();
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(serializedBytes);
ObjectInputStream inputStream = new ObjectInputStream(byteArrayInputStream);
Object deserializedObject = inputStream.readObject();
assertTrue("Deserialized object should be an instance of ObjectMapper",
deserializedObject instanceof CBORMapper);
return (CBORMapper) deserializedObject;
}
private Object _simpleData() {
return Arrays.asList("foobar", 378, true);
}
}
|
[
"tatu.saloranta@iki.fi"
] |
tatu.saloranta@iki.fi
|
51f0323b1a3c49cd5b2613885e321cc6e0d1aaaa
|
ee540924dff6d6a40e4187ac68127313a5dfe6b1
|
/design-01-uml-03-dependence_inversion/src/main/java/com/lquan/inter/impl/KingstonMemory.java
|
45f680d13b10a783b3281345e40af43638290dc0
|
[] |
no_license
|
1570599338/DesignPatterns
|
31b8acbb56b123b381dd1f480f75ef1ead17aa4a
|
675d3ca834e8b7a30f095fc0e72ac6451a8d7e75
|
refs/heads/master
| 2023-03-16T06:54:07.708003
| 2023-03-07T00:56:56
| 2023-03-07T00:56:56
| 145,522,591
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 351
|
java
|
package com.lquan.inter.impl;
import com.lquan.inter.IMemory;
/**
* @program: DesignPatterns
* @description: 金士顿内存条
* @author: lquan
* @create: 2023-02-02 11:01
**/
public class KingstonMemory implements IMemory {
@Override
public void save(){
System.out.println("使用金士顿内存条-KingstonMemory");
}
}
|
[
"1570599338@qq.com"
] |
1570599338@qq.com
|
e676b93a748c655ca44e83bc3bac5bea789a7f37
|
40d844c1c780cf3618979626282cf59be833907f
|
/src/testcases/CWE789_Uncontrolled_Mem_Alloc/s02/CWE789_Uncontrolled_Mem_Alloc__max_value_HashMap_45.java
|
bbcff75ac2e529e5dabc0811f744691a6f7d5a83
|
[] |
no_license
|
rubengomez97/juliet
|
f9566de7be198921113658f904b521b6bca4d262
|
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
|
refs/heads/master
| 2023-06-02T00:37:24.532638
| 2021-06-23T17:22:22
| 2021-06-23T17:22:22
| 379,676,259
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,564
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE789_Uncontrolled_Mem_Alloc__max_value_HashMap_45.java
Label Definition File: CWE789_Uncontrolled_Mem_Alloc.int.label.xml
Template File: sources-sink-45.tmpl.java
*/
/*
* @description
* CWE: 789 Uncontrolled Memory Allocation
* BadSource: max_value Set data to a hardcoded value of Integer.MAX_VALUE
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: HashMap
* BadSink : Create a HashMap using data as the initial size
* Flow Variant: 45 Data flow: data passed as a private class member variable from one function to another in the same class
*
* */
package testcases.CWE789_Uncontrolled_Mem_Alloc.s02;
import testcasesupport.*;
import javax.servlet.http.*;
import java.util.HashMap;
public class CWE789_Uncontrolled_Mem_Alloc__max_value_HashMap_45 extends AbstractTestCase
{
private int dataBad;
private int dataGoodG2B;
private void badSink() throws Throwable
{
int data = dataBad;
/* POTENTIAL FLAW: Create a HashMap using data as the initial size. data may be very large, creating memory issues */
HashMap intHashMap = new HashMap(data);
}
/* uses badsource and badsink */
public void bad() throws Throwable
{
int data;
/* FLAW: Set data to Integer.MAX_VALUE */
data = Integer.MAX_VALUE;
dataBad = data;
badSink();
}
public void good() throws Throwable
{
goodG2B();
}
private void goodG2BSink() throws Throwable
{
int data = dataGoodG2B;
/* POTENTIAL FLAW: Create a HashMap using data as the initial size. data may be very large, creating memory issues */
HashMap intHashMap = new HashMap(data);
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
int data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
dataGoodG2B = data;
goodG2BSink();
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"you@example.com"
] |
you@example.com
|
3bea503a6e64769ff154514730c7745177e27a34
|
29e3f451c901e3a698d3ddb05e3cf0e553de06ae
|
/src/this_is_coding_test_book/realize/UpDownLeftRight.java
|
2792e8a6463bc2cddeed79e4ed6834c661f9a661
|
[] |
no_license
|
camel-man-ims/coding-test-java
|
864bf06d9aa49cc9adbd69a5839faf5dfd07c5e3
|
9af9076574938798ec88753719c897e769aaf0a3
|
refs/heads/master
| 2023-06-24T04:06:38.556456
| 2021-07-23T08:46:57
| 2021-07-23T08:46:57
| 310,873,173
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,613
|
java
|
package this_is_coding_test_book.realize;
import java.util.Scanner;
public class UpDownLeftRight {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String sizeString = sc.nextLine();
Integer size = Integer.valueOf(sizeString);
String s = sc.nextLine();
System.out.println(size);
System.out.println(s);
String replace = s.replace(" ","");
System.out.println(replace);
int[] solution = solution(size, replace);
System.out.println("x = " + solution[0] + " y = " + solution[1]);
}
private static int[] solution(int size, String s) {
System.out.println(s);
int x = 0;
int y = 0;
for(int i=0;i<s.length();i++){
char c = s.charAt(i);
switch (c){
case 'U':
if(y==0){
break;
}else{
y--;
}
case 'D':
if(y==size-1){
break;
}else{
y++;
}
case 'L':
if(x==0){
break;
}else{
x--;
}
case 'R':
if(x==size-1){
break;
}else{
x++;
}
}
}
int[] result = new int[2];
result[0]=y+1;
result[1]=x+1;
return result;
}
}
|
[
"gudwnsrh@gmail.com"
] |
gudwnsrh@gmail.com
|
24b7f26a1989d015419a5e2715395e76e5f9bdb2
|
2d2ea594adee21154e0d5ce60302c2e2c6cc21ad
|
/ros-20190910/src/main/java/com/aliyun/ros20190910/models/GetStackDriftDetectionStatusResponseBody.java
|
5001e8664f834139bf01fc0e4d321b2281000803
|
[
"Apache-2.0"
] |
permissive
|
yndu13/alibabacloud-java-sdk
|
b67816695b8999b7e9be929929af43b9e289dbcc
|
39b0fd9d6f0ef4f924f92fb6cd4e50694079745b
|
refs/heads/master
| 2023-07-15T07:07:47.705726
| 2021-08-12T08:55:26
| 2021-08-12T08:55:26
| 395,252,858
| 0
| 0
| null | 2021-08-12T08:43:07
| 2021-08-12T08:43:06
| null |
UTF-8
|
Java
| false
| false
| 3,218
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.ros20190910.models;
import com.aliyun.tea.*;
public class GetStackDriftDetectionStatusResponseBody extends TeaModel {
@NameInMap("RequestId")
public String requestId;
@NameInMap("DriftDetectionTime")
public String driftDetectionTime;
@NameInMap("DriftDetectionStatusReason")
public String driftDetectionStatusReason;
@NameInMap("DriftedStackResourceCount")
public Integer driftedStackResourceCount;
@NameInMap("StackDriftStatus")
public String stackDriftStatus;
@NameInMap("DriftDetectionStatus")
public String driftDetectionStatus;
@NameInMap("StackId")
public String stackId;
@NameInMap("DriftDetectionId")
public String driftDetectionId;
public static GetStackDriftDetectionStatusResponseBody build(java.util.Map<String, ?> map) throws Exception {
GetStackDriftDetectionStatusResponseBody self = new GetStackDriftDetectionStatusResponseBody();
return TeaModel.build(map, self);
}
public GetStackDriftDetectionStatusResponseBody setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
public String getRequestId() {
return this.requestId;
}
public GetStackDriftDetectionStatusResponseBody setDriftDetectionTime(String driftDetectionTime) {
this.driftDetectionTime = driftDetectionTime;
return this;
}
public String getDriftDetectionTime() {
return this.driftDetectionTime;
}
public GetStackDriftDetectionStatusResponseBody setDriftDetectionStatusReason(String driftDetectionStatusReason) {
this.driftDetectionStatusReason = driftDetectionStatusReason;
return this;
}
public String getDriftDetectionStatusReason() {
return this.driftDetectionStatusReason;
}
public GetStackDriftDetectionStatusResponseBody setDriftedStackResourceCount(Integer driftedStackResourceCount) {
this.driftedStackResourceCount = driftedStackResourceCount;
return this;
}
public Integer getDriftedStackResourceCount() {
return this.driftedStackResourceCount;
}
public GetStackDriftDetectionStatusResponseBody setStackDriftStatus(String stackDriftStatus) {
this.stackDriftStatus = stackDriftStatus;
return this;
}
public String getStackDriftStatus() {
return this.stackDriftStatus;
}
public GetStackDriftDetectionStatusResponseBody setDriftDetectionStatus(String driftDetectionStatus) {
this.driftDetectionStatus = driftDetectionStatus;
return this;
}
public String getDriftDetectionStatus() {
return this.driftDetectionStatus;
}
public GetStackDriftDetectionStatusResponseBody setStackId(String stackId) {
this.stackId = stackId;
return this;
}
public String getStackId() {
return this.stackId;
}
public GetStackDriftDetectionStatusResponseBody setDriftDetectionId(String driftDetectionId) {
this.driftDetectionId = driftDetectionId;
return this;
}
public String getDriftDetectionId() {
return this.driftDetectionId;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
b78c8893616a9f8aca7a2b413aafab0e20b2266e
|
2fe1db06ec4785534803171e5c24ba2fb39e4e18
|
/Hibernate & Spring Data/11. Exam/Exam03April2020/Airline_Skeleton/src/main/java/softuni/exam/util/FileIOUtil.java
|
3a9535f0da2271d663c5157fc29136c38d39d05e
|
[
"MIT"
] |
permissive
|
galin-kostadinov/Software-Engineering
|
f83d561fa314d4137d5f4f68c10de03b97f7c8d7
|
55189648d787b35f1e9cd24cc4449c6beda51c90
|
refs/heads/master
| 2021-07-14T19:15:02.999720
| 2020-08-30T12:42:48
| 2020-08-30T12:42:48
| 197,240,774
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 153
|
java
|
package softuni.exam.util;
import java.io.IOException;
public interface FileIOUtil {
String readFileContent(String filePath) throws IOException;
}
|
[
"gk_1988@abv.bg"
] |
gk_1988@abv.bg
|
df5faf040906e025662d5730308316c098fc9acb
|
039fc6f1a39bc5eaeaec01dd4b54b730e37c29cc
|
/mynlp/src/main/java/com/mayabot/nlp/resources/URLNlpResource.java
|
c10b564e0e5920c2b3d35a3dfd4327828b209283
|
[
"Apache-2.0"
] |
permissive
|
abylee/mynlp
|
ce3041ce71da179b5f5a11ce40252f165afadaea
|
31e982638c7d9a18f108463bda7a78fcecc0436f
|
refs/heads/master
| 2021-04-16T11:27:40.170739
| 2020-03-23T08:34:29
| 2020-03-23T08:34:29
| 249,352,499
| 0
| 0
|
Apache-2.0
| 2020-03-23T06:27:18
| 2020-03-23T06:27:17
| null |
UTF-8
|
Java
| false
| false
| 1,585
|
java
|
/*
* Copyright 2018 mayabot.com authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mayabot.nlp.resources;
import com.google.common.io.ByteSource;
import com.google.common.io.Resources;
import com.mayabot.nlp.logging.InternalLogger;
import com.mayabot.nlp.logging.InternalLoggerFactory;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.nio.charset.Charset;
/**
* @author jimichan
*/
public class URLNlpResource implements NlpResource {
static InternalLogger logger = InternalLoggerFactory.getInstance(URLNlpResource.class);
private final URL url;
private final Charset charset;
public URLNlpResource(URL url, Charset charset) {
this.url = url;
this.charset = charset;
}
@Override
public InputStream inputStream() throws IOException {
ByteSource byteSource = Resources.asByteSource(url);
return byteSource.openBufferedStream();
}
@Override
public String toString() {
return url.toString();
}
}
|
[
"jimichan@mayabot.com"
] |
jimichan@mayabot.com
|
d5adc53e44d2f54a67a2f47eb4feeb6b2aa70591
|
4d66ae645bcb9159a4b6d0fdb2f24e029da00847
|
/frame-root/frame-core/src/main/java/com/huatek/frame/core/beancopy/converter/BigIntegerConverter.java
|
fe344cb07cfde9f8cabb0666b2596818f1f8ee25
|
[] |
no_license
|
GitWangH/JiFen
|
1e3722d49502e8ac7de2cfa4e97e99cf47e404df
|
0cec185c83c0f76a97b4d00fc8f1cfb230415a8e
|
refs/heads/master
| 2022-12-20T13:28:57.456912
| 2019-05-24T06:00:16
| 2019-05-24T06:00:16
| 131,266,103
| 0
| 2
| null | 2022-12-10T01:13:11
| 2018-04-27T08:07:02
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 2,496
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.huatek.frame.core.beancopy.converter;
import java.math.BigInteger;
/**
* {@link NumberConverter} implementation that handles conversion to
* and from <b>java.math.BigInteger</b> objects.
* <p>
* This implementation can be configured to handle conversion either
* by using BigInteger's default String conversion, or by using a Locale's pattern
* or by specifying a format pattern. See the {@link NumberConverter}
* documentation for further details.
* <p>
* Can be configured to either return a <i>default value</i> or throw a
* <code>ConversionException</code> if a conversion error occurs.
*
* @author Craig R. McClanahan
* @version $Revision: 690380 $ $Date: 2008-08-29 21:04:38 +0100 (Fri, 29 Aug 2008) $
* @since 1.3
*/
public final class BigIntegerConverter extends NumberConverter {
/**
* Construct a <b>java.math.BigInteger</b> <i>Converter</i> that throws
* a <code>ConversionException</code> if an error occurs.
*/
public BigIntegerConverter() {
super(false);
}
/**
* Construct a <b>java.math.BigInteger</b> <i>Converter</i> that returns
* a default value if an error occurs.
*
* @param defaultValue The default value to be returned
* if the value to be converted is missing or an error
* occurs converting the value.
*/
public BigIntegerConverter(Object defaultValue) {
super(false, defaultValue);
}
/**
* Return the default type this <code>Converter</code> handles.
*
* @return The default type this <code>Converter</code> handles.
* @since 1.8.0
*/
protected Class getDefaultType() {
return BigInteger.class;
}
}
|
[
"15771883191@163.com"
] |
15771883191@163.com
|
256ffe63dd8162302688950410357dc7ba184d31
|
f4e15ee34808877459d81fd601d6be03bdfb4a9d
|
/com/sun/tools/xjc/generator/marshaller/Side.java
|
5cab18e66d2505def6bb76137d27895d2d8e2368
|
[] |
no_license
|
Lianite/wurm-server-reference
|
369081debfa72f44eafc6a080002c4a3970f8385
|
e4dd8701e4af13901268cf9a9fa206fcb5196ff0
|
refs/heads/master
| 2023-07-22T16:06:23.426163
| 2020-04-07T23:15:35
| 2020-04-07T23:15:35
| 253,933,452
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 401
|
java
|
//
// Decompiled by Procyon v0.5.30
//
package com.sun.tools.xjc.generator.marshaller;
import com.sun.tools.xjc.grammar.FieldItem;
import com.sun.msv.grammar.Expression;
import com.sun.msv.grammar.ChoiceExp;
interface Side
{
void onChoice(final ChoiceExp p0);
void onZeroOrMore(final Expression p0);
void onMarshallableObject();
void onField(final FieldItem p0);
}
|
[
"jdraco6@gmail.com"
] |
jdraco6@gmail.com
|
1bb39432003e8d765ffe1277f7ec10ffbf768b0c
|
8ebcd9d06a6c53b8a041842964f61025dfb2ff7b
|
/dashboard-admin-api/src/main/java/com/aiflow/dashboard/admin/web/AdminProfileController.java
|
c19a7110bffb3f5157af142d7873b9ab46615a7f
|
[] |
no_license
|
athena-flow/aiflow-dashboard
|
6bb329bf99a57c735677bbe27d3f12bf8d99b9f6
|
e906fadfd6526ca755e79862ed01fef6c37fd5c3
|
refs/heads/master
| 2022-12-13T17:48:26.037454
| 2020-09-10T03:48:15
| 2020-09-10T03:48:15
| 294,051,359
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,035
|
java
|
package com.aiflow.dashboard.admin.web;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.apache.shiro.subject.Subject;
import com.aiflow.dashboard.core.util.JacksonUtil;
import com.aiflow.dashboard.core.util.ResponseUtil;
import com.aiflow.dashboard.core.util.bcrypt.BCryptPasswordEncoder;
import com.aiflow.dashboard.core.validator.Order;
import com.aiflow.dashboard.core.validator.Sort;
import com.aiflow.dashboard.db.domain.DashboardAdmin;
import com.aiflow.dashboard.db.domain.DashboardIssue;
import com.aiflow.dashboard.db.domain.DashboardNotice;
import com.aiflow.dashboard.db.domain.DashboardNoticeAdmin;
import com.aiflow.dashboard.db.service.DashboardAdminService;
import com.aiflow.dashboard.db.service.DashboardNoticeAdminService;
import com.aiflow.dashboard.db.service.DashboardNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.aiflow.dashboard.admin.util.AdminResponseCode.ADMIN_INVALID_ACCOUNT;
@RestController
@RequestMapping("/admin/profile")
@Validated
public class AdminProfileController {
private final Log logger = LogFactory.getLog(AdminProfileController.class);
@Autowired
private DashboardAdminService adminService;
@Autowired
private DashboardNoticeService noticeService;
@Autowired
private DashboardNoticeAdminService noticeAdminService;
@RequiresAuthentication
@PostMapping("/password")
public Object create(@RequestBody String body) {
String oldPassword = JacksonUtil.parseString(body, "oldPassword");
String newPassword = JacksonUtil.parseString(body, "newPassword");
if (StringUtils.isEmpty(oldPassword)) {
return ResponseUtil.badArgument();
}
if (StringUtils.isEmpty(newPassword)) {
return ResponseUtil.badArgument();
}
Subject currentUser = SecurityUtils.getSubject();
DashboardAdmin admin = (DashboardAdmin) currentUser.getPrincipal();
BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
if (!encoder.matches(oldPassword, admin.getPassword())) {
return ResponseUtil.fail(ADMIN_INVALID_ACCOUNT, "账号密码不对");
}
String encodedNewPassword = encoder.encode(newPassword);
admin.setPassword(encodedNewPassword);
adminService.updateById(admin);
return ResponseUtil.ok();
}
private Integer getAdminId(){
Subject currentUser = SecurityUtils.getSubject();
DashboardAdmin admin = (DashboardAdmin) currentUser.getPrincipal();
return admin.getId();
}
@RequiresAuthentication
@GetMapping("/nnotice")
public Object nNotice() {
int count = noticeAdminService.countUnread(getAdminId());
return ResponseUtil.ok(count);
}
@RequiresAuthentication
@GetMapping("/lsnotice")
public Object lsNotice(String title, String type,
@RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "10") Integer limit,
@Sort @RequestParam(defaultValue = "add_time") String sort,
@Order @RequestParam(defaultValue = "desc") String order) {
List<DashboardNoticeAdmin> noticeList = noticeAdminService.querySelective(title, type, getAdminId(), page, limit, sort, order);
return ResponseUtil.okList(noticeList);
}
@RequiresAuthentication
@PostMapping("/catnotice")
public Object catNotice(@RequestBody String body) {
Integer noticeId = JacksonUtil.parseInteger(body, "noticeId");
if(noticeId == null){
return ResponseUtil.badArgument();
}
DashboardNoticeAdmin noticeAdmin = noticeAdminService.find(noticeId, getAdminId());
if(noticeAdmin == null){
return ResponseUtil.badArgumentValue();
}
// 更新通知记录中的时间
noticeAdmin.setReadTime(LocalDateTime.now());
noticeAdminService.update(noticeAdmin);
// 返回通知的相关信息
Map<String, Object> data = new HashMap<>();
DashboardNotice notice = noticeService.findById(noticeId);
data.put("title", notice.getTitle());
data.put("content", notice.getContent());
data.put("time", notice.getUpdateTime());
Integer adminId = notice.getAdminId();
if(adminId.equals(0)){
data.put("admin", "系统");
}
else{
DashboardAdmin admin = adminService.findById(notice.getAdminId());
data.put("admin", admin.getUsername());
data.put("avatar", admin.getAvatar());
}
return ResponseUtil.ok(data);
}
@RequiresAuthentication
@PostMapping("/bcatnotice")
public Object bcatNotice(@RequestBody String body) {
List<Integer> ids = JacksonUtil.parseIntegerList(body, "ids");
noticeAdminService.markReadByIds(ids, getAdminId());
return ResponseUtil.ok();
}
@RequiresAuthentication
@PostMapping("/rmnotice")
public Object rmNotice(@RequestBody String body) {
Integer id = JacksonUtil.parseInteger(body, "id");
if(id == null){
return ResponseUtil.badArgument();
}
noticeAdminService.deleteById(id, getAdminId());
return ResponseUtil.ok();
}
@RequiresAuthentication
@PostMapping("/brmnotice")
public Object brmNotice(@RequestBody String body) {
List<Integer> ids = JacksonUtil.parseIntegerList(body, "ids");
noticeAdminService.deleteByIds(ids, getAdminId());
return ResponseUtil.ok();
}
}
|
[
"zhangchunsheng423@gmail.com"
] |
zhangchunsheng423@gmail.com
|
fedaa7ff9f6775820fdb048b415285466534076f
|
b01dd8c0df1bc95c5f2daa803d68fc92f26c3e7b
|
/src/java/org/apache/cassandra/db/partitions/PartitionIterator.java
|
36358fc69d69cbcd7e0546c4916b1ecc7d0cdccc
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] |
permissive
|
DICL/cassandra
|
9df84f2eef7f2b6bb4e0c29d715f757e21afc779
|
4215cac8921f5e0d9aa967e014291036c1ff7824
|
refs/heads/trunk
| 2021-01-10T17:57:42.530754
| 2015-11-25T07:19:22
| 2015-11-25T07:19:22
| 43,421,571
| 0
| 1
|
Apache-2.0
| 2023-03-20T11:53:07
| 2015-09-30T08:35:17
|
Java
|
UTF-8
|
Java
| false
| false
| 1,583
|
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.cassandra.db.partitions;
import java.util.Iterator;
import org.apache.cassandra.db.rows.*;
/**
* An iterator over a number of (filtered) partition.
*
* PartitionIterator is to RowIterator what UnfilteredPartitionIterator is to UnfilteredRowIterator
* though unlike UnfilteredPartitionIterator, it is not guaranteed that the RowIterator
* returned are in partitioner order.
*
* The object returned by a call to next() is only guaranteed to be
* valid until the next call to hasNext() or next(). If a consumer wants to keep a
* reference on the returned objects for longer than the iteration, it must
* make a copy of it explicitely.
*/
public interface PartitionIterator extends Iterator<RowIterator>, AutoCloseable
{
public void close();
}
|
[
"sylvain@datastax.com"
] |
sylvain@datastax.com
|
032fa5cd7fda14cd9e692840fd3b46122216dca7
|
5f826d3fea601d8616905934b0424e93592c06c4
|
/src/main/java/com/adel/jhipster/application/config/CloudDatabaseConfiguration.java
|
978c473f68657a7ae877ebfe324ffcf5b6a950e5
|
[] |
no_license
|
aelj/myFirstJHipsterApplication
|
58a390c2658bdf42e0cefab327d45351b69726bd
|
3815736ba6d58abff3a3bd0969da64846634583a
|
refs/heads/master
| 2020-03-13T05:49:05.931063
| 2018-04-25T10:42:18
| 2018-04-25T10:42:18
| 130,991,233
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 704
|
java
|
package com.adel.jhipster.application.config;
import io.github.jhipster.config.JHipsterConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.config.java.AbstractCloudConfig;
import org.springframework.context.annotation.*;
import javax.sql.DataSource;
@Configuration
@Profile(JHipsterConstants.SPRING_PROFILE_CLOUD)
public class CloudDatabaseConfiguration extends AbstractCloudConfig {
private final Logger log = LoggerFactory.getLogger(CloudDatabaseConfiguration.class);
@Bean
public DataSource dataSource() {
log.info("Configuring JDBC datasource from a cloud provider");
return connectionFactory().dataSource();
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
146e0b6999c6b65be22c7cf6b612884400d6fc63
|
f8a14fec331ec56dd7e070fc032604117f155085
|
/gameserver/src/main/java/ru/l2/gameserver/templates/npc/AbsorbInfo.java
|
a84f36d7441d6cbe85c9847145e1c71ee16fb5d4
|
[] |
no_license
|
OFRF/BladeRush
|
c2f06d050a1f2d79a9b50567b9f1152d6d755149
|
87329d131c0fcc8417ed15479298fdb90bc8f1d2
|
refs/heads/master
| 2023-03-25T13:51:04.404738
| 2020-05-04T14:37:23
| 2020-05-04T14:37:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,165
|
java
|
package ru.l2.gameserver.templates.npc;
import gnu.trove.set.hash.TIntHashSet;
public class AbsorbInfo {
private final boolean _skill;
private final AbsorbType _absorbType;
private final int _chance;
private final int _cursedChance;
private final TIntHashSet _levels;
public AbsorbInfo(final boolean skill, final AbsorbType absorbType, final int chance, final int cursedChance, final int min, final int max) {
_skill = skill;
_absorbType = absorbType;
_chance = chance;
_cursedChance = cursedChance;
_levels = new TIntHashSet(max - min);
for (int i = min; i <= max; ++i) {
_levels.add(i);
}
}
public boolean isSkill() {
return _skill;
}
public AbsorbType getAbsorbType() {
return _absorbType;
}
public int getChance() {
return _chance;
}
public int getCursedChance() {
return _cursedChance;
}
public boolean canAbsorb(final int le) {
return _levels.contains(le);
}
public enum AbsorbType {
LAST_HIT,
PARTY_ONE,
PARTY_ALL,
PARTY_RANDOM
}
}
|
[
"yadrov995@gmail.com"
] |
yadrov995@gmail.com
|
5d107defa8a10587cc5ce67ef610fa27312f699e
|
9254e7279570ac8ef687c416a79bb472146e9b35
|
/sas-20181203/src/main/java/com/aliyun/sas20181203/models/DescribePropertySoftwareDetailResponseBody.java
|
e4bd1e0c95ccbf38f6c2b4badd15e5360c004904
|
[
"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
| 7,545
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sas20181203.models;
import com.aliyun.tea.*;
public class DescribePropertySoftwareDetailResponseBody extends TeaModel {
@NameInMap("RequestId")
public String requestId;
@NameInMap("PageInfo")
public DescribePropertySoftwareDetailResponseBodyPageInfo pageInfo;
@NameInMap("Propertys")
public java.util.List<DescribePropertySoftwareDetailResponseBodyPropertys> propertys;
public static DescribePropertySoftwareDetailResponseBody build(java.util.Map<String, ?> map) throws Exception {
DescribePropertySoftwareDetailResponseBody self = new DescribePropertySoftwareDetailResponseBody();
return TeaModel.build(map, self);
}
public DescribePropertySoftwareDetailResponseBody setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
public String getRequestId() {
return this.requestId;
}
public DescribePropertySoftwareDetailResponseBody setPageInfo(DescribePropertySoftwareDetailResponseBodyPageInfo pageInfo) {
this.pageInfo = pageInfo;
return this;
}
public DescribePropertySoftwareDetailResponseBodyPageInfo getPageInfo() {
return this.pageInfo;
}
public DescribePropertySoftwareDetailResponseBody setPropertys(java.util.List<DescribePropertySoftwareDetailResponseBodyPropertys> propertys) {
this.propertys = propertys;
return this;
}
public java.util.List<DescribePropertySoftwareDetailResponseBodyPropertys> getPropertys() {
return this.propertys;
}
public static class DescribePropertySoftwareDetailResponseBodyPageInfo extends TeaModel {
@NameInMap("CurrentPage")
public Integer currentPage;
@NameInMap("PageSize")
public Integer pageSize;
@NameInMap("TotalCount")
public Integer totalCount;
@NameInMap("Count")
public Integer count;
public static DescribePropertySoftwareDetailResponseBodyPageInfo build(java.util.Map<String, ?> map) throws Exception {
DescribePropertySoftwareDetailResponseBodyPageInfo self = new DescribePropertySoftwareDetailResponseBodyPageInfo();
return TeaModel.build(map, self);
}
public DescribePropertySoftwareDetailResponseBodyPageInfo setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
return this;
}
public Integer getCurrentPage() {
return this.currentPage;
}
public DescribePropertySoftwareDetailResponseBodyPageInfo setPageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
public Integer getPageSize() {
return this.pageSize;
}
public DescribePropertySoftwareDetailResponseBodyPageInfo setTotalCount(Integer totalCount) {
this.totalCount = totalCount;
return this;
}
public Integer getTotalCount() {
return this.totalCount;
}
public DescribePropertySoftwareDetailResponseBodyPageInfo setCount(Integer count) {
this.count = count;
return this;
}
public Integer getCount() {
return this.count;
}
}
public static class DescribePropertySoftwareDetailResponseBodyPropertys extends TeaModel {
@NameInMap("Create")
public Long create;
@NameInMap("InternetIp")
public String internetIp;
@NameInMap("Ip")
public String ip;
@NameInMap("InstanceId")
public String instanceId;
@NameInMap("IntranetIp")
public String intranetIp;
@NameInMap("InstallTime")
public String installTime;
@NameInMap("Uuid")
public String uuid;
@NameInMap("Version")
public String version;
@NameInMap("InstanceName")
public String instanceName;
@NameInMap("Path")
public String path;
@NameInMap("Name")
public String name;
@NameInMap("CreateTimestamp")
public Long createTimestamp;
public static DescribePropertySoftwareDetailResponseBodyPropertys build(java.util.Map<String, ?> map) throws Exception {
DescribePropertySoftwareDetailResponseBodyPropertys self = new DescribePropertySoftwareDetailResponseBodyPropertys();
return TeaModel.build(map, self);
}
public DescribePropertySoftwareDetailResponseBodyPropertys setCreate(Long create) {
this.create = create;
return this;
}
public Long getCreate() {
return this.create;
}
public DescribePropertySoftwareDetailResponseBodyPropertys setInternetIp(String internetIp) {
this.internetIp = internetIp;
return this;
}
public String getInternetIp() {
return this.internetIp;
}
public DescribePropertySoftwareDetailResponseBodyPropertys setIp(String ip) {
this.ip = ip;
return this;
}
public String getIp() {
return this.ip;
}
public DescribePropertySoftwareDetailResponseBodyPropertys setInstanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
public String getInstanceId() {
return this.instanceId;
}
public DescribePropertySoftwareDetailResponseBodyPropertys setIntranetIp(String intranetIp) {
this.intranetIp = intranetIp;
return this;
}
public String getIntranetIp() {
return this.intranetIp;
}
public DescribePropertySoftwareDetailResponseBodyPropertys setInstallTime(String installTime) {
this.installTime = installTime;
return this;
}
public String getInstallTime() {
return this.installTime;
}
public DescribePropertySoftwareDetailResponseBodyPropertys setUuid(String uuid) {
this.uuid = uuid;
return this;
}
public String getUuid() {
return this.uuid;
}
public DescribePropertySoftwareDetailResponseBodyPropertys setVersion(String version) {
this.version = version;
return this;
}
public String getVersion() {
return this.version;
}
public DescribePropertySoftwareDetailResponseBodyPropertys setInstanceName(String instanceName) {
this.instanceName = instanceName;
return this;
}
public String getInstanceName() {
return this.instanceName;
}
public DescribePropertySoftwareDetailResponseBodyPropertys setPath(String path) {
this.path = path;
return this;
}
public String getPath() {
return this.path;
}
public DescribePropertySoftwareDetailResponseBodyPropertys setName(String name) {
this.name = name;
return this;
}
public String getName() {
return this.name;
}
public DescribePropertySoftwareDetailResponseBodyPropertys setCreateTimestamp(Long createTimestamp) {
this.createTimestamp = createTimestamp;
return this;
}
public Long getCreateTimestamp() {
return this.createTimestamp;
}
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
0a28c27f52051210f4f849ea21614a1d9260e150
|
a9bf2aa577dde670ae2432d96863e16aeff12ad2
|
/sample/HelloEBayTrading/src/ebay/apis/eblbasecomponents/SetStoreResponseType.java
|
71b39afffd0609990caa576f265b9a13b760a15c
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"MIT"
] |
permissive
|
bulldog2011/nano-rest
|
497e5b359fe912c1cd768a56fe3d818a568d4e74
|
79319357422302c379f7b6346484ec34d23579d9
|
refs/heads/master
| 2023-09-05T08:58:55.021673
| 2013-04-16T10:59:17
| 2013-04-16T10:59:17
| 8,212,245
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 575
|
java
|
// Generated by xsd compiler for android/java
// DO NOT CHANGE!
package ebay.apis.eblbasecomponents;
import java.io.Serializable;
import com.leansoft.nano.annotation.*;
/**
*
* Returned after calling SetStoreRequest. This serves as confirmation that
* the Store configuration was successfully submitted.
*
*/
@RootElement(name = "SetStoreResponse", namespace = "urn:ebay:apis:eBLBaseComponents")
public class SetStoreResponseType extends AbstractResponseType implements Serializable {
private static final long serialVersionUID = -1L;
}
|
[
"51startup@sina.com"
] |
51startup@sina.com
|
3e2de439cb603fbd7940d7e1ee272bd51bde0c66
|
73d0fee44327212c76c9acec84a072d8e756a1fb
|
/src/test/java/me/khmoon/studyolle/modules/account/WithAccountSecurityContextFactory.java
|
9d4fc84c355210eb8a18f4dd5f645825e23c755b
|
[] |
no_license
|
mgh3326/studyolle
|
07273ddc07ae28dee7b30426af02ddaf176a5219
|
bcb72c4b3da31350443f431934f20c5183b4473b
|
refs/heads/master
| 2023-09-01T00:47:33.273163
| 2020-09-25T15:14:00
| 2020-09-25T15:14:00
| 248,099,245
| 0
| 0
| null | 2023-05-28T10:32:59
| 2020-03-18T00:07:54
|
Java
|
UTF-8
|
Java
| false
| false
| 1,470
|
java
|
package me.khmoon.studyolle.modules.account;
import lombok.RequiredArgsConstructor;
import me.khmoon.studyolle.modules.account.form.SignUpForm;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.test.context.support.WithSecurityContextFactory;
@RequiredArgsConstructor
public class WithAccountSecurityContextFactory implements WithSecurityContextFactory<WithAccount> {
private final AccountService accountService;
@Override
public SecurityContext createSecurityContext(WithAccount withAccount) {
String nickname = withAccount.value();
SignUpForm signUpForm = new SignUpForm();
signUpForm.setNickname(nickname);
signUpForm.setEmail(nickname + "@email.com");
signUpForm.setPassword("12345678");
accountService.processNewAccount(signUpForm);
UserDetails principal = accountService.loadUserByUsername(nickname);
Authentication authentication = new UsernamePasswordAuthenticationToken(principal, principal.getPassword(), principal.getAuthorities());
SecurityContext context = SecurityContextHolder.createEmptyContext();
context.setAuthentication(authentication);
return context;
}
}
|
[
"mgh3326@naver.com"
] |
mgh3326@naver.com
|
de5b01bdf5e2a34f14104bc5dca45d1c061de7a7
|
5eae683a6df0c4b97ab1ebcd4724a4bf062c1889
|
/bin/ext-commerce/customercouponservices/testsrc/de/hybris/platform/customercouponservices/solrsearch/CustomerCouponCodeValueResolverTest.java
|
2fe4032c1b3574ce05324d26bd7d01767604fd23
|
[] |
no_license
|
sujanrimal/GiftCardProject
|
1c5e8fe494e5c59cca58bbc76a755b1b0c0333bb
|
e0398eec9f4ec436d20764898a0255f32aac3d0c
|
refs/heads/master
| 2020-12-11T18:05:17.413472
| 2020-01-17T18:23:44
| 2020-01-17T18:23:44
| 233,911,127
| 0
| 0
| null | 2020-06-18T15:26:11
| 2020-01-14T18:44:18
| null |
UTF-8
|
Java
| false
| false
| 7,838
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.customercouponservices.solrsearch;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import de.hybris.bootstrap.annotations.UnitTest;
import de.hybris.platform.core.model.product.ProductModel;
import de.hybris.platform.customercouponservices.CustomerCouponService;
import de.hybris.platform.product.daos.ProductDao;
import de.hybris.platform.promotionengineservices.model.PromotionSourceRuleModel;
import de.hybris.platform.solrfacetsearch.config.IndexedProperty;
import de.hybris.platform.solrfacetsearch.provider.FieldNameProvider;
import de.hybris.platform.solrfacetsearch.provider.impl.AbstractValueResolverTest;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
@UnitTest
public class CustomerCouponCodeValueResolverTest extends AbstractValueResolverTest
{
private final String FILE_NAME_1 = "Vendor_Field_Name1";
private final String FILE_NAME_2 = "Vendor_Field_Name2";
private final String COUPON_CODE_1 = "Coupon_Code_1";
private final String COUPON_CODE_2 = "Coupon_Code_2";
@Mock
private ProductModel product;
@Mock
private FieldNameProvider fieldNameProvider;
@Mock
private CustomerCouponService customerCouponService;
@Mock
private ProductDao productDao;
@Mock
private PromotionSourceRuleModel promotionSourceRule1;
@Mock
private PromotionSourceRuleModel promotionSourceRule2;
private CustomerCouponCodeValueResolver valueResolver;
private String PRODUCT_CODE = "Product_Code";
private String PROMOTION_CODE_1 = "Promotion_Source_Rule_Code_1";
private String PROMOTION_CODE_2 = "Promotion_Source_Rule_Code_2";
private Collection<String> fieldNames;
@Before
public void setUp()
{
valueResolver = new CustomerCouponCodeValueResolver();
valueResolver.setFieldNameProvider(fieldNameProvider);
valueResolver.setSessionService(getSessionService());
valueResolver.setQualifierProvider(getQualifierProvider());
valueResolver.setCustomerCouponService(customerCouponService);
valueResolver.setProductDao(productDao);
fieldNames = new ArrayList<>();
fieldNames.add(FILE_NAME_1);
fieldNames.add(FILE_NAME_2);
}
@Test
public void resolverNoPromotion() throws Exception
{
final IndexedProperty indexedProperty = getIndexedProperty();
final Collection<IndexedProperty> indexedProperties = Collections.singletonList(indexedProperty);
when(product.getCode()).thenReturn(PRODUCT_CODE);
when(customerCouponService.getPromotionSourceRulesForProduct(PRODUCT_CODE)).thenReturn(Collections.emptyList());
when(customerCouponService.getPromotionSourcesRuleForProductCategories(product)).thenReturn(Collections.emptyList());
when(customerCouponService.getExclPromotionSourceRulesForProduct(PRODUCT_CODE)).thenReturn(Collections.emptyList());
valueResolver.resolve(getInputDocument(), getBatchContext(), indexedProperties, product);
verify(getInputDocument(), Mockito.never()).addField(any(IndexedProperty.class), any());
}
@Test
public void resolverProductPromotion() throws Exception
{
final IndexedProperty indexedProperty = getIndexedProperty();
final Collection<IndexedProperty> indexedProperties = Collections.singletonList(indexedProperty);
when(product.getCode()).thenReturn(PRODUCT_CODE);
when(promotionSourceRule1.getCode()).thenReturn(PROMOTION_CODE_1);
when(customerCouponService.getPromotionSourceRulesForProduct(PRODUCT_CODE))
.thenReturn(Collections.singletonList(promotionSourceRule1));
when(customerCouponService.getPromotionSourcesRuleForProductCategories(product)).thenReturn(Collections.emptyList());
when(customerCouponService.getExclPromotionSourceRulesForProduct(PRODUCT_CODE)).thenReturn(Collections.emptyList());
when(fieldNameProvider.getFieldNames(indexedProperty, null)).thenReturn(fieldNames);
when(customerCouponService.getCouponCodeForPromotionSourceRule(promotionSourceRule1.getCode()))
.thenReturn(Collections.singletonList(COUPON_CODE_1));
valueResolver.resolve(getInputDocument(), getBatchContext(), indexedProperties, product);
verify(getInputDocument()).addField(FILE_NAME_1, Collections.singletonList(COUPON_CODE_1));
verify(getInputDocument()).addField(FILE_NAME_2, Collections.singletonList(COUPON_CODE_1));
}
@Test
public void resolverProductAndCategoryPromotion() throws Exception
{
final IndexedProperty indexedProperty = getIndexedProperty();
final Collection<IndexedProperty> indexedProperties = Collections.singletonList(indexedProperty);
when(product.getCode()).thenReturn(PRODUCT_CODE);
when(promotionSourceRule1.getCode()).thenReturn(PROMOTION_CODE_1);
when(promotionSourceRule2.getCode()).thenReturn(PROMOTION_CODE_2);
when(customerCouponService.getPromotionSourceRulesForProduct(PRODUCT_CODE))
.thenReturn(Collections.singletonList(promotionSourceRule1));
when(customerCouponService.getPromotionSourcesRuleForProductCategories(product))
.thenReturn(Collections.singletonList(promotionSourceRule2));
when(customerCouponService.getExclPromotionSourceRulesForProduct(PRODUCT_CODE)).thenReturn(Collections.emptyList());
when(fieldNameProvider.getFieldNames(indexedProperty, null)).thenReturn(fieldNames);
when(customerCouponService.getCouponCodeForPromotionSourceRule(promotionSourceRule1.getCode()))
.thenReturn(Collections.singletonList(COUPON_CODE_1));
when(customerCouponService.getCouponCodeForPromotionSourceRule(promotionSourceRule2.getCode()))
.thenReturn(Collections.singletonList(COUPON_CODE_2));
valueResolver.resolve(getInputDocument(), getBatchContext(), indexedProperties, product);
verify(getInputDocument()).addField(FILE_NAME_1, Collections.singletonList(COUPON_CODE_1));
verify(getInputDocument()).addField(FILE_NAME_2, Collections.singletonList(COUPON_CODE_1));
verify(getInputDocument()).addField(FILE_NAME_1, Collections.singletonList(COUPON_CODE_2));
verify(getInputDocument()).addField(FILE_NAME_2, Collections.singletonList(COUPON_CODE_2));
}
@Test
public void resolverProductCategoryExclPromotion() throws Exception
{
final IndexedProperty indexedProperty = getIndexedProperty();
final Collection<IndexedProperty> indexedProperties = Collections.singletonList(indexedProperty);
when(product.getCode()).thenReturn(PRODUCT_CODE);
when(promotionSourceRule2.getCode()).thenReturn(PROMOTION_CODE_1);
when(customerCouponService.getPromotionSourceRulesForProduct(PRODUCT_CODE))
.thenReturn(Collections.singletonList(promotionSourceRule1));
when(customerCouponService.getPromotionSourcesRuleForProductCategories(product))
.thenReturn(Collections.singletonList(promotionSourceRule2));
when(customerCouponService.getExclPromotionSourceRulesForProduct(PRODUCT_CODE))
.thenReturn(Collections.singletonList(promotionSourceRule1));
when(fieldNameProvider.getFieldNames(indexedProperty, null)).thenReturn(fieldNames);
when(customerCouponService.getCouponCodeForPromotionSourceRule(promotionSourceRule2.getCode()))
.thenReturn(Collections.singletonList(COUPON_CODE_2));
valueResolver.resolve(getInputDocument(), getBatchContext(), indexedProperties, product);
verify(getInputDocument()).addField(FILE_NAME_1, Collections.singletonList(COUPON_CODE_2));
verify(getInputDocument()).addField(FILE_NAME_2, Collections.singletonList(COUPON_CODE_2));
}
}
|
[
"travis.d.crawford@accenture.com"
] |
travis.d.crawford@accenture.com
|
7f77b1549f46d44536bf1278ffc4ddc2f3d549b0
|
72de5b55f68a904f4e43357bdbdbc1e00500d851
|
/tests/src/test/java/net/nature/api/test/AccountTest.java
|
12233604907c446318f8e681a8ad5dea06109878
|
[] |
no_license
|
naturenet/naturenet-api
|
e8c8eec51074db20a5b0095251d5ca32230c2543
|
24cccacd1f1a1d7ff62e60aa8062cdf1069ddb90
|
refs/heads/master
| 2016-09-06T06:46:35.361975
| 2016-02-04T04:13:04
| 2016-02-04T04:13:04
| 18,914,952
| 1
| 1
| null | 2016-02-05T04:48:13
| 2014-04-18T14:14:40
|
Python
|
UTF-8
|
Java
| false
| false
| 2,566
|
java
|
package net.nature.api.test;
import static com.jayway.restassured.RestAssured.*;
import static org.hamcrest.Matchers.*;
import java.util.HashSet;
import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import com.jayway.restassured.RestAssured;
public class AccountTest {
// class variable
final String lexicon = "ABCDEFGHIJKLMNOPQRSTUVWXYZ12345674890";
final java.util.Random rand = new java.util.Random();
// consider using a Map<String,Boolean> to say whether the identifier is being used or not
final Set<String> identifiers = new HashSet<String>();
public String randomIdentifier() {
StringBuilder builder = new StringBuilder();
while(builder.toString().length() == 0) {
int length = rand.nextInt(5)+5;
for(int i = 0; i < length; i++)
builder.append(lexicon.charAt(rand.nextInt(lexicon.length())));
if(identifiers.contains(builder.toString()))
builder = new StringBuilder();
}
return builder.toString();
}
@Before
public void setUp(){
RestAssured.baseURI = "http://localhost";
RestAssured.port = 5000;
RestAssured.basePath = "/api";
}
@Test
public void count() {
get("/accounts/count")
.then()
.body("data", greaterThan(5));
}
@Test
public void get_tomyeh() {
get("/account/tomyeh")
.then()
.body("data.username", equalTo("tomyeh"));
}
@Test
public void create_new() {
String newname = randomIdentifier();
String email = newname + "@email.com";
given().
param("name", "Real Name").
param("email", email).
param("consent", "new consent text").
param("password", "1234").
param("icon_url", "http://host/icon.png").
when().
post("/account/new/" + newname).
then().
body("data.username", equalTo(newname)).
body("data.email", equalTo(email)).
body("data.consent", equalTo("new consent text")).
body("data.icon_url", equalTo("http://host/icon.png"));
}
@Test
public void error_create_new_username_already_taken() {
post("/account/new/tomyeh").
then().
statusCode(400);
}
@Test
public void get_abby() {
get("/account/abby")
.then()
.body("data.username", equalTo("abby"));
}
@Test
public void get_all_accounts() {
get("/accounts")
.then()
.body("data.username", hasItems("tomyeh","abby"));
}
@Test
public void get_notes_for_tomyeh() {
get("/account/tomyeh/notes").
then().
body("data.content", hasItems("first note taken by tomyeh")).
body("data.account.username", everyItem(equalTo("tomyeh")));
}
}
|
[
"doubleshow@gmail.com"
] |
doubleshow@gmail.com
|
ca42f1c24f4f1355115711595672f136d2b33906
|
befde1e4446dec36af350e49bacac9cdb84e9d96
|
/ymir-core/src/test/java/org/seasar/ymir/converter/impl/BeanUtilsPropertyHandlerTest.java
|
3e9cadcdbe82063ecc762384abd03013f71f6082
|
[] |
no_license
|
seasarorg/test-ymir-component-1
|
c6c9ae715b090edae3f994e602047d4086363661
|
cb53d0e4c193b9a2211df16bfabdaf23665f24b7
|
refs/heads/master
| 2016-09-09T19:01:46.293634
| 2013-10-01T17:36:25
| 2013-10-01T17:36:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,574
|
java
|
package org.seasar.ymir.converter.impl;
import java.lang.reflect.Method;
import java.util.List;
import java.util.Map;
import junit.framework.TestCase;
import org.apache.commons.beanutils.PropertyUtilsBean;
import org.seasar.ymir.impl.Bean;
import org.seasar.ymir.impl.Bean.Aaa;
import org.seasar.ymir.impl.Bean.Bbb;
public class BeanUtilsPropertyHandlerTest extends TestCase {
private Bean target1Bean_ = new Bean();
private BeanUtilsPropertyHandler target1_;
private Bean target2Bean_ = new Bean();
private BeanUtilsPropertyHandler target2_;
private Bean target3Bean_ = new Bean();
private BeanUtilsPropertyHandler target3_;
@Override
protected void setUp() throws Exception {
PropertyUtilsBean pub = new PropertyUtilsBean();
target1_ = new BeanUtilsPropertyHandler(pub, pub.getPropertyDescriptor(
target1Bean_, "aaa[1].bbb(key).indexed[1]"), target1Bean_,
"aaa[1].bbb(key).indexed[1]");
target2_ = new BeanUtilsPropertyHandler(pub, pub.getPropertyDescriptor(
target2Bean_, "aaa[1].bbb(key).mapped(key)"), target2Bean_,
"aaa[1].bbb(key).mapped(key)");
target3_ = new BeanUtilsPropertyHandler(pub, pub.getPropertyDescriptor(
target3Bean_, "aaa[1].bbb(key).simple"), target3Bean_,
"aaa[1].bbb(key).simple");
}
public void testGetPropertyType() throws Exception {
assertEquals(String.class, target1_.getPropertyType());
assertEquals(String.class, target2_.getPropertyType());
assertEquals(String.class, target3_.getPropertyType());
}
public void testGetReadMethod() throws Exception {
assertEquals(Bbb.class.getMethod("getIndexed",
new Class[] { Integer.TYPE }), target1_.getReadMethod());
assertEquals(Bbb.class.getMethod("getMapped",
new Class[] { String.class }), target2_.getReadMethod());
assertEquals(Bbb.class.getMethod("getSimple", new Class[0]), target3_
.getReadMethod());
}
public void testGetWriteMethod() throws Exception {
assertEquals(Bbb.class.getMethod("setIndexed", new Class[] {
Integer.TYPE, String.class }), target1_.getWriteMethod());
assertEquals(Bbb.class.getMethod("setMapped", new Class[] {
String.class, String.class }), target2_.getWriteMethod());
assertEquals(Bbb.class.getMethod("setSimple",
new Class[] { String.class }), target3_.getWriteMethod());
}
public void testSetProperty() throws Exception {
target1_.setProperty("value1");
assertEquals("value1", target1Bean_.getAaa(1).getBbb("key").getIndexed(
1));
target2_.setProperty("value2");
assertEquals("value2", target2Bean_.getAaa(1).getBbb("key").getMapped(
"key"));
target3_.setProperty("value3");
assertEquals("value3", target3Bean_.getAaa(1).getBbb("key").getSimple());
}
public void testGetPropertyType2_プロパティキーが配列型のプロパティを指す場合は配列型を返すこと()
throws Exception {
PropertyUtilsBean pub = new PropertyUtilsBean();
Bean bean = new Bean();
BeanUtilsPropertyHandler target = new BeanUtilsPropertyHandler(pub, pub
.getPropertyDescriptor(bean, "aaas"), bean, "aaas");
assertEquals(Aaa[].class, target.getPropertyType());
}
public void testGetPropertyType3_プロパティキーが配列型のプロパティの要素を指す場合はコンポーネント型を返すこと()
throws Exception {
PropertyUtilsBean pub = new PropertyUtilsBean();
Bean bean = new Bean();
BeanUtilsPropertyHandler target = new BeanUtilsPropertyHandler(pub, pub
.getPropertyDescriptor(bean, "aaas[1]"), bean, "aaas[1]");
assertEquals(Aaa.class, target.getPropertyType());
}
public void testGetPropertyType4_プロパティキーがList型のプロパティを指す場合はList型を返すこと()
throws Exception {
PropertyUtilsBean pub = new PropertyUtilsBean();
Bean bean = new Bean();
BeanUtilsPropertyHandler target = new BeanUtilsPropertyHandler(pub, pub
.getPropertyDescriptor(bean, "aaaList"), bean, "aaaList");
assertEquals(List.class, target.getPropertyType());
}
public void testGetPropertyType5_プロパティキーがList型のプロパティの要素を指す場合はコンポーネント型を返すこと()
throws Exception {
PropertyUtilsBean pub = new PropertyUtilsBean();
Bean bean = new Bean();
BeanUtilsPropertyHandler target = new BeanUtilsPropertyHandler(pub, pub
.getPropertyDescriptor(bean, "aaaList[1]"), bean, "aaaList[1]");
assertEquals(Aaa.class, target.getPropertyType());
}
public void testToClass() throws Exception {
assertNull(target1_.toClass(null));
Method method = getClass().getMethod("method1", String.class,
List.class);
assertEquals(String.class, target1_.toClass(method
.getGenericParameterTypes()[0]));
assertEquals(List.class, target1_.toClass(method
.getGenericParameterTypes()[1]));
}
public void method1(String arg0, List<String> arg1) {
}
}
|
[
"skirnir@ce2cb714-bd0d-0410-8c66-e472ade7ad34"
] |
skirnir@ce2cb714-bd0d-0410-8c66-e472ade7ad34
|
44eda7757525acc69541b3f8af22503f3936c11f
|
ccd149e5d7a89eb665d235771d958994362ede85
|
/spring-websocket/src/main/java/org/springframework/web/socket/messaging/config/WebSocketMessageBrokerConfigurer.java
|
f7bba9c58fee8145c833386c34ee6a614ec968c2
|
[
"Apache-2.0"
] |
permissive
|
javahuang/spring-framework
|
9685bbe8b2d9f05888204ae7464ac45834af0df8
|
de890fd10021aa69850280e2469f1081e2500d61
|
refs/heads/master
| 2020-12-31T07:43:46.075152
| 2013-12-02T10:02:07
| 2013-12-02T10:02:07
| 14,859,664
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,114
|
java
|
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.socket.messaging.config;
import org.springframework.messaging.simp.config.ChannelRegistration;
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
/**
* Defines methods for configuring message handling with simple messaging
* protocols (e.g. STOMP) from WebSocket clients. Typically used to customize
* the configuration provided via
* {@link EnableWebSocketMessageBroker @EnableWebSocketMessageBroker}.
*
* @author Rossen Stoyanchev
* @since 4.0
*/
public interface WebSocketMessageBrokerConfigurer {
/**
* Configure STOMP over WebSocket endpoints.
*/
void registerStompEndpoints(StompEndpointRegistry registry);
/**
* Configure the {@link org.springframework.messaging.MessageChannel} used for
* incoming messages from WebSocket clients. By default the channel is backed
* by a thread pool of size 1. It is recommended to customize thread pool
* settings for production use.
*/
void configureClientInboundChannel(ChannelRegistration registration);
/**
* Configure the {@link org.springframework.messaging.MessageChannel} used for
* incoming messages from WebSocket clients. By default the channel is backed
* by a thread pool of size 1. It is recommended to customize thread pool
* settings for production use.
*/
void configureClientOutboundChannel(ChannelRegistration registration);
/**
* Configure message broker options.
*/
void configureMessageBroker(MessageBrokerRegistry registry);
}
|
[
"rstoyanchev@gopivotal.com"
] |
rstoyanchev@gopivotal.com
|
d7fed44e2ced44b5563fb1eec13c69414b5e39c0
|
401c228cf3672c8754330711af7a7e5128f1cf19
|
/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-client/src/test/java/org/kie/workbench/common/stunner/bpmn/client/forms/fields/comboBoxEditor/ComboBoxFieldRendererTest.java
|
23eeede8c9100d0e5dc9d7d0ea965ee025b4e514
|
[
"Apache-2.0"
] |
permissive
|
gitgabrio/kie-wb-common
|
f2fb145536a2c5bd60ddbaf1cb41dec5e93912ec
|
57ffa0afc6819d784e60bd675bbdee5d0660ad1b
|
refs/heads/master
| 2020-03-21T08:00:52.572728
| 2019-05-13T13:03:14
| 2019-05-13T13:03:14
| 138,314,007
| 0
| 0
|
Apache-2.0
| 2019-09-27T12:27:30
| 2018-06-22T14:46:16
|
Java
|
UTF-8
|
Java
| false
| false
| 1,953
|
java
|
/*
* Copyright 2017 Red Hat, Inc. and/or its affiliates.
*
* 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.kie.workbench.common.stunner.bpmn.client.forms.fields.comboBoxEditor;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.kie.workbench.common.stunner.bpmn.forms.model.ComboBoxFieldDefinition;
import org.kie.workbench.common.stunner.bpmn.forms.model.ComboBoxFieldType;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Spy;
import org.mockito.runners.MockitoJUnitRunner;
@RunWith(MockitoJUnitRunner.class)
public class ComboBoxFieldRendererTest {
@Mock
private ComboBoxWidgetView comboBoxWidgetView;
@Mock
private ComboBoxFieldDefinition comboBoxFieldDefinition;
@Spy
@InjectMocks
private ComboBoxFieldRenderer comboBoxFieldRenderer = new ComboBoxFieldRenderer(comboBoxWidgetView);
@Test
public void getName() throws Exception {
Assert.assertEquals(comboBoxFieldRenderer.getName(),
ComboBoxFieldType.NAME);
}
@Test
public void getSupportedCode() throws Exception {
Assert.assertEquals(comboBoxFieldRenderer.getSupportedCode(),
ComboBoxFieldType.NAME);
}
@Test
public void getSupportedFieldDefinition() throws Exception {
Assert.assertEquals(comboBoxFieldRenderer.getSupportedFieldDefinition(),
ComboBoxFieldDefinition.class);
}
}
|
[
"manstis@users.noreply.github.com"
] |
manstis@users.noreply.github.com
|
bebf0a54eed8c173cfc7294aa2f8a73725f16bfe
|
dd52fad49c285bf6d759b35f24ad466a6aaa67a7
|
/PTN_Server(2015)/src/com/nms/rmi/ui/SystemConfigPanel.java
|
bbc5c6d2a031400fc32ef3f9b98f16b312378c53
|
[] |
no_license
|
pengchong1989/sheb_serice
|
a5c46113f822342dfe98c5c232b5df21cb1ac6b6
|
3ce6550e8eb39f38871b4481af2987f238a368da
|
refs/heads/master
| 2021-08-30T05:52:24.235809
| 2017-12-16T08:47:06
| 2017-12-16T08:47:06
| 114,067,650
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,314
|
java
|
package com.nms.rmi.ui;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.swing.BorderFactory;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import com.champor.license.Features;
import com.nms.rmi.ui.util.LicenseClientUtil;
import com.nms.rmi.ui.util.ServerConstant;
import com.nms.ui.manager.ConstantUtil;
import com.nms.ui.manager.DialogBoxUtil;
import com.nms.ui.manager.ExceptionManage;
import com.nms.ui.manager.ResourceUtil;
import com.nms.ui.manager.UiUtil;
import com.nms.ui.manager.keys.StringKeysBtn;
import com.nms.ui.manager.keys.StringKeysLbl;
/**
* license导入panel
*
* @author kk
*
*/
public class SystemConfigPanel extends JPanel {
private static final long serialVersionUID = 1L;
public SystemConfigPanel() {
this.initComponent();
this.initIpData();
this.setLayout();
this.addListener();
}
/**
* 初始化IP地址
*/
public void initIpData() {
try {
this.initIpComboxData();
} catch (Exception e) {
ExceptionManage.dispose(e,this.getClass());
} finally {
}
}
/**
* 添加监听事件
*/
private void addListener() {
// 确定按钮
this.btnSelect.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
btnSelectAction();
}
});
}
/**
* 确定按钮事件
* @throws Exception
*/
private void btnSelectAction() {
String ip = null;
ip = (String) this.ipSelect.getSelectedItem();
if (null == ip){
DialogBoxUtil.errorDialog(null, ResourceUtil.srcStr(StringKeysLbl.LBL_RMI_IP_SELECT));
return;
}
ConstantUtil.serviceIp = (String) this.ipSelect.getSelectedItem();
DialogBoxUtil.succeedDialog(null, ResourceUtil.srcStr(StringKeysLbl.LBL_RMI_IP_SUCCESS));
}
/**
* 初始化ip下拉列表
* @throws Exception
*/
private void initIpComboxData() throws Exception {
Features features=null;
LicenseClientUtil licenseClientUtil=null;
List<Features> f= new ArrayList<Features>();
List<String> iplist=new ArrayList<String>();
try {
DefaultComboBoxModel defaultComboBoxModel = null;
try {
defaultComboBoxModel = (DefaultComboBoxModel) ipSelect.getModel();
licenseClientUtil=new LicenseClientUtil();
iplist = licenseClientUtil.getIp();
for(int i=0;i<iplist.size();i++){
features = licenseClientUtil.getFeatures(ServerConstant.LICENSEPATH+ServerConstant.LICENSEFILENAME,iplist.get(i));
f.add(features);
if(null != features){
defaultComboBoxModel.addElement(iplist.get(i).toString());
ipSelect.setModel(defaultComboBoxModel);
}
}
// 数据库是否已经启动
if(ServerConstant.registry!=null){
this.ipSelect.setSelectedItem(ConstantUtil.serviceIp);
this.ipSelect.setEnabled(false);
this.btnSelect.setEnabled(false);
}
} catch (Exception e) {
ExceptionManage.dispose(e, UiUtil.class);
} finally {
defaultComboBoxModel = null;
}
} catch (Exception e) {
ExceptionManage.dispose(e, this.getClass());
} finally {
licenseClientUtil = null;
}
}
/**
* 初始化控件
*/
private void initComponent() {
this.setBorder(BorderFactory.createTitledBorder(ResourceUtil.srcStr(StringKeysLbl.LBL_RMI_SYSTEM_CONFIG)));
this.lblIp = new JLabel(ResourceUtil.srcStr(StringKeysLbl.LBL_IP_ADDRESS));
this.ipSelect = new JComboBox();
this.btnSelect = new JButton(ResourceUtil.srcStr(StringKeysBtn.BTN_CONFIRM));
this.panel_select = new JPanel();
this.panel_select.setBorder(null);
this.txtSetIp = new JTextField();
this.txtSetIp.setEditable(false);
new JLabel(ResourceUtil.srcStr(StringKeysLbl.LBL_RMI_SET_IP));
}
/**
* 系统IP设置panel布局
*/
private void setLayoutSelect() {
GridBagLayout componentLayout = new GridBagLayout();
componentLayout.columnWidths = new int[] { 120, 200, 120 };
componentLayout.columnWeights = new double[] { 0, 0.1,0 };
componentLayout.rowHeights = new int[] { 20, 20 };
componentLayout.rowWeights = new double[] { 0.1, 0.1 };
this.panel_select.setLayout(componentLayout);
GridBagConstraints c = new GridBagConstraints();
c.anchor = GridBagConstraints.CENTER;
// 本机Ip的label
c.gridx = 0;
c.gridy = 0;
c.fill = GridBagConstraints.CENTER;
c.insets = new Insets(25, 5, 5, 5);
componentLayout.setConstraints(this.lblIp, c);
this.panel_select.add(this.lblIp);
// 本机Ip的选择
c.gridx = 1;
c.fill = GridBagConstraints.HORIZONTAL;
componentLayout.setConstraints(this.ipSelect, c);
this.panel_select.add(this.ipSelect);
// 确定按钮
c.fill = GridBagConstraints.NONE;
c.gridx = 2;
componentLayout.setConstraints(this.btnSelect, c);
this.panel_select.add(this.btnSelect);
}
/**
* 此页面总布局
*/
private void setLayout() {
this.setLayoutSelect();
GridBagLayout componentLayout = new GridBagLayout();
componentLayout.columnWeights = new double[] { 0.1 };
componentLayout.rowWeights = new double[] { 0.1, 0.1 };
this.setLayout(componentLayout);
GridBagConstraints c = new GridBagConstraints();
c.anchor = GridBagConstraints.NORTH;
c.gridx = 0;
c.gridy = 0;
c.insets = new Insets(30, 0, 15, 0);
componentLayout.setConstraints(this.panel_select, c);
this.add(this.panel_select);
}
private JLabel lblIp; // 本机IPlabel
private JComboBox ipSelect;
private JButton btnSelect; // 确定按钮
private JPanel panel_select; // 查询本机ID的panel
private JTextField txtSetIp; // 系统设置IP文本框
public static void main(String[] args) {
try {
FileOutputStream fs = new FileOutputStream( System.getProperty("user.dir") + "license.xml");
try {
fs.flush();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
}
|
[
"pengchong@jiupaicn.com"
] |
pengchong@jiupaicn.com
|
c908b430822c997b966bc8a769c197a1ce412f50
|
af2a554c211523465d64c43671d58820f009a291
|
/Java/src code for oracle java/com/sun/corba/se/spi/activation/LocatorPackage/ServerLocation.java
|
a45b4f4300a326d76aa5fbfc5253e62127a8f50a
|
[] |
no_license
|
mjachowdhury/ProgrammingBooks
|
e4abff9db2edea7518ac74fcde07e45359c76bf5
|
aff4a0321de87a7bfeef6d28ab076294a8b45ea9
|
refs/heads/master
| 2020-06-01T05:42:29.526386
| 2019-06-06T23:42:13
| 2019-06-06T23:42:13
| 190,661,188
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 798
|
java
|
package com.sun.corba.se.spi.activation.LocatorPackage;
/**
* com/sun/corba/se/spi/activation/LocatorPackage/ServerLocation.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u121/8372/corba/src/share/classes/com/sun/corba/se/spi/activation/activation.idl
* Monday, December 12, 2016 6:22:53 PM PST
*/
public final class ServerLocation implements org.omg.CORBA.portable.IDLEntity
{
public String hostname = null;
public com.sun.corba.se.spi.activation.ORBPortInfo ports[] = null;
public ServerLocation ()
{
} // ctor
public ServerLocation (String _hostname, com.sun.corba.se.spi.activation.ORBPortInfo[] _ports)
{
hostname = _hostname;
ports = _ports;
} // ctor
} // class ServerLocation
|
[
"study.computing2016@gmail.com"
] |
study.computing2016@gmail.com
|
6f4f30841989c2f941f609325a97190c8dd5d68e
|
e14e25c5b4c7c1ffcb4b8af588d811a1ca8791ec
|
/src/solution04/c04/LazyDijkstraSP.java
|
1c938d4e57c685ce504acabb34457d4fb1f34b32
|
[] |
no_license
|
BurningBright/algorithms-fourth-edition
|
6ecd434ebc42449f5f05da1e6d6a94ef64eaab57
|
46ad5a29154b8094a2cd169308b9922131a74587
|
refs/heads/master
| 2021-01-24T07:13:27.408150
| 2021-01-08T02:42:30
| 2021-01-08T02:42:30
| 55,818,397
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,396
|
java
|
package solution04.c04;
/******************************************************************************
* Compilation: javac LazyDijkstraSP.java
* Execution: java LazyDijkstraSP V E
* Dependencies: EdgeWeightedDigraph.java MinPQ.java Stack.java DirectedEdge.java
*
* Dijkstra's algorithm. Computes the shortest path tree.
* Assumes all weights are nonnegative.
*
* % java LazyDijkstraSP 10 30
*
* % java LazyDijkstraSP < digraph6.txt
*
* The disadvantage of this approach is that the number of items on the
* priority queue can grow to be proportional to E instead of V.
*
* The advantage is that it uses a MinPQ instead of an IndexMinPQ.
*
******************************************************************************/
import java.util.Comparator;
import rlgs4.MinPQ;
import rlgs4.Stack;
import stdlib.In;
import stdlib.StdOut;
public class LazyDijkstraSP {
private boolean[] marked; // has vertex v been relaxed?
private double[] distTo; // distTo[v] = length of shortest s->v path
private DirectedEdge[] edgeTo; // edgeTo[v] = last edge on shortest s->v path
private MinPQ<DirectedEdge> pq; // PQ of fringe edges
private class ByDistanceFromSource implements Comparator<DirectedEdge> {
public int compare(DirectedEdge e, DirectedEdge f) {
double dist1 = distTo[e.from()] + e.weight();
double dist2 = distTo[f.from()] + f.weight();
return Double.compare(dist1, dist2);
}
}
// single-source shortest path problem from s
public LazyDijkstraSP(EdgeWeightedDigraph G, int s) {
for (DirectedEdge e : G.edges()) {
if (e.weight() < 0)
throw new IllegalArgumentException("edge " + e + " has negative weight");
}
pq = new MinPQ<DirectedEdge>(new ByDistanceFromSource());
marked = new boolean[G.V()];
edgeTo = new DirectedEdge[G.V()];
distTo = new double[G.V()];
// initialize
for (int v = 0; v < G.V(); v++)
distTo[v] = Double.POSITIVE_INFINITY;
distTo[s] = 0.0;
relax(G, s);
// run Dijkstra's algorithm
while (!pq.isEmpty()) {
DirectedEdge e = pq.delMin();
int v = e.from(), w = e.to();
if (!marked[w]) relax(G, w); // lazy, so w might already have been relaxed
}
// check optimality conditions
assert check(G, s);
}
// relax vertex v
private void relax(EdgeWeightedDigraph G, int v) {
marked[v] = true;
for (DirectedEdge e : G.adj(v)) {
int w = e.to();
if (distTo[w] > distTo[v] + e.weight()) {
distTo[w] = distTo[v] + e.weight();
edgeTo[w] = e;
pq.insert(e);
}
}
}
// length of shortest path from s to v, infinity if unreachable
public double distTo(int v) {
return distTo[v];
}
// is there a path from s to v?
public boolean hasPathTo(int v) {
return marked[v];
}
// return view of shortest path from s to v, null if no such path
public Iterable<DirectedEdge> pathTo(int v) {
if (!hasPathTo(v)) return null;
Stack<DirectedEdge> path = new Stack<DirectedEdge>();
for (DirectedEdge e = edgeTo[v]; e != null; e = edgeTo[e.from()]) {
path.push(e);
}
return path;
}
// check optimality conditions: either
// (i) for all edges e: distTo[e.to()] <= distTo[e.from()] + e.weight()
// (ii) for all edge e on the SPT: distTo[e.to()] == distTo[e.from()] + e.weight()
private boolean check(EdgeWeightedDigraph G, int s) {
// all edge are nonnegative
for (DirectedEdge e : G.edges()) {
if (e.weight() < 0) {
System.err.println("negative edge weight detected");
return false;
}
}
// check that distTo[v] and edgeTo[v] are consistent
if (distTo[s] != 0.0 || edgeTo[s] != null) {
System.err.println("distTo[s] and edgeTo[s] inconsistent");
return false;
}
for (int v = 0; v < G.V(); v++) {
if (v == s) continue;
if (edgeTo[v] == null && distTo[v] != Double.POSITIVE_INFINITY) {
System.err.println("distTo[s] and edgeTo[s] inconsistent");
return false;
}
}
// check that all edges e = v->w satisfy dist[w] <= dist[v] + e.weight()
for (int v = 0; v < G.V(); v++) {
for (DirectedEdge e : G.adj(v)) {
int w = e.to();
if (distTo[v] + e.weight() < distTo[w]) {
System.err.println("edge " + e + " not relaxed");
return false;
}
}
}
// check that all edges e = v->w on SPT satisfy dist[w] == dist[v] + e.weight()
for (int w = 0; w < G.V(); w++) {
if (edgeTo[w] == null) continue;
DirectedEdge e = edgeTo[w];
int v = e.from();
if (w != e.to()) return false;
if (distTo[v] + e.weight() != distTo[w]) {
System.err.println("edge " + e + " on shortest path not tight");
return false;
}
}
StdOut.println("Satisfies optimality conditions");
StdOut.println();
return true;
}
public static void main(String[] args) {
EdgeWeightedDigraph G = new EdgeWeightedDigraph(new In());
// print graph
StdOut.println("Graph");
StdOut.println("--------------");
StdOut.println(G);
// run Dijksra's algorithm from vertex 0
int s = 0;
LazyDijkstraSP spt = new LazyDijkstraSP(G, s);
StdOut.println();
StdOut.println("Shortest paths from " + s);
StdOut.println("------------------------");
for (int v = 0; v < G.V(); v++) {
if (spt.hasPathTo(v)) {
StdOut.printf("%d to %d (%.2f) ", s, v, spt.distTo(v));
for (DirectedEdge e : spt.pathTo(v)) {
StdOut.print(e + " ");
}
StdOut.println();
}
else {
StdOut.printf("%d to %d no path\n", s, v);
}
}
}
}
|
[
"lcg51271@gmail.com"
] |
lcg51271@gmail.com
|
14459c19b032827f6781b01a0725c0f69ac1b3d4
|
9b5053db1b5a03c8f72d87a5054688a50287efe2
|
/com/google/android/gms/internal/zzra.java
|
4ff11841c413ca122ed12219f1f118c43dcccfc3
|
[] |
no_license
|
steamguard-totp/steam-mobile
|
f8d612b5c767248c3a29e29c0b9328e5d244c079
|
f94cd2ec0404bfab69b00a582f90457295cccabb
|
refs/heads/master
| 2021-09-04T07:04:22.229386
| 2018-01-16T23:39:37
| 2018-01-16T23:39:37
| 117,756,434
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,379
|
java
|
package com.google.android.gms.internal;
import android.text.TextUtils;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.google.android.gms.common.internal.zzaa;
import java.net.URI;
import java.net.URISyntaxException;
@zzmb
public class zzra extends WebViewClient {
private final zzqp zzGt;
private final zzlk zzPD;
private final String zzZL;
private boolean zzZM = false;
public zzra(zzlk com_google_android_gms_internal_zzlk, zzqp com_google_android_gms_internal_zzqp, String str) {
this.zzZL = zzbm(str);
this.zzGt = com_google_android_gms_internal_zzqp;
this.zzPD = com_google_android_gms_internal_zzlk;
}
private String zzbm(String str) {
if (!TextUtils.isEmpty(str)) {
try {
if (str.endsWith("/")) {
str = str.substring(0, str.length() - 1);
}
} catch (IndexOutOfBoundsException e) {
zzpy.e(e.getMessage());
}
}
return str;
}
public void onLoadResource(WebView webView, String str) {
String str2 = "JavascriptAdWebViewClient::onLoadResource: ";
String valueOf = String.valueOf(str);
zzpy.zzbc(valueOf.length() != 0 ? str2.concat(valueOf) : new String(str2));
if (!zzbl(str)) {
this.zzGt.zzkV().onLoadResource(this.zzGt.getWebView(), str);
}
}
public void onPageFinished(WebView webView, String str) {
String str2 = "JavascriptAdWebViewClient::onPageFinished: ";
String valueOf = String.valueOf(str);
zzpy.zzbc(valueOf.length() != 0 ? str2.concat(valueOf) : new String(str2));
if (!this.zzZM) {
this.zzPD.zzix();
this.zzZM = true;
}
}
public boolean shouldOverrideUrlLoading(WebView webView, String str) {
String str2 = "JavascriptAdWebViewClient::shouldOverrideUrlLoading: ";
String valueOf = String.valueOf(str);
zzpy.zzbc(valueOf.length() != 0 ? str2.concat(valueOf) : new String(str2));
if (!zzbl(str)) {
return this.zzGt.zzkV().shouldOverrideUrlLoading(this.zzGt.getWebView(), str);
}
zzpy.zzbc("shouldOverrideUrlLoading: received passback url");
return true;
}
protected boolean zzbl(String str) {
Object zzbm = zzbm(str);
if (TextUtils.isEmpty(zzbm)) {
return false;
}
try {
URI uri = new URI(zzbm);
if ("passback".equals(uri.getScheme())) {
zzpy.zzbc("Passback received");
this.zzPD.zziy();
return true;
} else if (TextUtils.isEmpty(this.zzZL)) {
return false;
} else {
URI uri2 = new URI(this.zzZL);
String host = uri2.getHost();
String host2 = uri.getHost();
String path = uri2.getPath();
String path2 = uri.getPath();
if (!zzaa.equal(host, host2) || !zzaa.equal(path, path2)) {
return false;
}
zzpy.zzbc("Passback received");
this.zzPD.zziy();
return true;
}
} catch (URISyntaxException e) {
zzpy.e(e.getMessage());
return false;
}
}
}
|
[
"jessejesse123@gmail.com"
] |
jessejesse123@gmail.com
|
f4ab524bd4c4443238e9c2d5d957bd93ced982c6
|
91feacfea6bbcadd634dde42681dbba317e31f75
|
/src/main/java/com/creditharmony/fortune/common/dao/RoleOrgDao.java
|
c1e2e398a3550204d977ba34399808e24bca4ae2
|
[] |
no_license
|
sengeiou/chp-fortune
|
0d5ccc9b40568a622fa162dc609bd4ccfc358a9f
|
ac676cb5d8502269d2d44bf395206034f26b4e49
|
refs/heads/master
| 2020-05-16T02:53:13.475287
| 2017-07-06T07:31:26
| 2017-07-06T07:31:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,107
|
java
|
package com.creditharmony.fortune.common.dao;
import java.util.List;
import java.util.Map;
import com.creditharmony.core.persistence.annotation.FortuneBatisDao;
import com.creditharmony.fortune.common.entity.Org;
import com.creditharmony.fortune.common.entity.UserRoleOrgEx;
/**
* 角色,权限管理-Dao
*
* @Class Name RoleOrgDao
* @author 朱杰
* @Create In 2016年1月6日
*/
@FortuneBatisDao
public interface RoleOrgDao {
/**
* 查找自身关联的指定的组织机构
* 例如:理财经理查找团队角色机构或者营业部角色机构等
*
* 2015年12月29日
* By 朱杰
* @param map
* @return
*/
public List<UserRoleOrgEx> findRoleOrg(Map<String, Object> map);
/**
* 查找自身关联的范围内的组织机构
*
* 2015年12月29日
* By 朱杰
* @param map
* @return
*/
public List<UserRoleOrgEx> findRoleOrgRange(Map<String, Object> map);
/**
* 根据用户id和用户角色查询机构类型
* 2016年1月25日
* By 朱杰
* @param map
* @return
*/
public Org getRoleTypeByUserAndRole(Map<String, Object> map);
}
|
[
"qiang.guo3@creditharmony.cn"
] |
qiang.guo3@creditharmony.cn
|
ced1a85cee64a0fb9c21c3c8ce0d1c9cf1245b58
|
1986aaa1311f81e3380edddd27bb413e13686b9a
|
/springboot2-demo/src/main/java/com/ymbj/helloworld/HelloController.java
|
658280da9a0c2954af00022ea9745983ca5d5ecf
|
[] |
no_license
|
Daniel556677/java-demo
|
94cff306a54ac6bb8186d75efba868fa3f0b0f27
|
674814e1926a27e3ec68900f29a2855a7fb7fbfc
|
refs/heads/master
| 2022-04-19T02:42:01.170998
| 2020-04-18T08:49:30
| 2020-04-18T08:49:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 359
|
java
|
package com.ymbj.helloworld;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class HelloController {
@ResponseBody
@GetMapping("/hello")
public String helloWorld() {
return "Hello World!";
}
}
|
[
"983656956@qq.com"
] |
983656956@qq.com
|
be23e36c0b52fcfa9b81eda676601c8ab5958c80
|
4177bf760e133c4fa68b074502bbf988cdd51dba
|
/src/单例模式/第3种_懒汉式之线程不安全/SingletonTest.java
|
b74d1f5e7ca6b6aacd36fc2ceace3a440b769947
|
[] |
no_license
|
lcl100/designpattern-learning
|
e476293578e08a3c6b9526c9fabd4f78ba70dbae
|
adc2f10d8d0909868eef8fff631fae79ea7c74f3
|
refs/heads/main
| 2023-06-23T04:06:05.074199
| 2021-07-25T02:56:51
| 2021-07-25T02:56:51
| 344,418,812
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 585
|
java
|
package 单例模式.第3种_懒汉式之线程不安全;
public class SingletonTest {
public static void main(String[] args) {
// 创建两个实例对象
Singleton singleton1 = Singleton.getInstance();
Singleton singleton2 = Singleton.getInstance();
// 判断是否其实只有一个实例
System.out.println(singleton1 == singleton2);// true
// 输出哈希值
System.out.println("singleton1.hashCode() = " + singleton1.hashCode());
System.out.println("singleton2.hashCode() = " + singleton2.hashCode());
}
}
|
[
"2961316542@qq.com"
] |
2961316542@qq.com
|
22e477754461878e6778749a6ed2fad9e534889a
|
85080a212dbaa6b83c9df820095bb2672fa78dae
|
/src/main/java/com/mcplissken/delegation/TravellingTask.java
|
323b4f8cbf6a96253ad6eb252dbb3937ca23eb37
|
[
"Apache-2.0"
] |
permissive
|
webnotgeek/delegationbyannotations
|
c8f8704c709280f26511f75f28f1c535a9e65fe1
|
e467dd44a4d4c6d7d980a563763673d0174474f6
|
refs/heads/master
| 2020-12-28T21:39:23.566247
| 2015-04-30T12:39:11
| 2015-04-30T12:39:11
| 34,855,604
| 2
| 0
| null | 2015-04-30T13:23:37
| 2015-04-30T13:23:37
| null |
UTF-8
|
Java
| false
| false
| 2,312
|
java
|
/**
*
*/
package com.mcplissken.delegation;
import java.lang.reflect.Method;
import java.util.HashMap;
/**
* @author Sherief Shawky
* @email mcrakens@gmail.com
* @date Apr 29, 2015
*/
public class TravellingTask {
private DelegationAgent<Transportation, TransportationVehicle> transportationAgent = new DelegationAgent<Transportation, TransportationVehicle>() {
public void register(TransportationVehicle annotation,
Transportation delegate) {
addVehicle(annotation.vehicle(), delegate);
}
};
private DelegationAgent<Locator, MapLocator> locatorAgent = new DelegationAgent<Locator, MapLocator>() {
public void register(MapLocator annotation, Locator delegate) {
addLocator(annotation.map(), delegate);
}
};
public enum Vehicle{
BICYCLE(), CAR(), TRAIN();
}
public enum MAP{
PAPER(), COMPUTERIZED();
}
private HashMap<Vehicle, Transportation> vehicles;
private HashMap<MAP, Locator> locators;
private LocatorPrincipal locatorPrincipal;
private TransportationPrincipal transportationPrincipal;
public TravellingTask() {
locators = new HashMap<TravellingTask.MAP, Locator>();
vehicles = new HashMap<TravellingTask.Vehicle, Transportation>();
locatorPrincipal = new LocatorPrincipal(Locator.class, MapLocator.class, locatorAgent);
transportationPrincipal = new TransportationPrincipal(Transportation.class, TransportationVehicle.class, transportationAgent);
}
public void registerDelegate(Object receiver){
for(Method method : receiver.getClass().getMethods()){
locatorPrincipal.apply(receiver, method);
transportationPrincipal.apply(receiver, method);
}
}
public Long travel(Point a, Point b, Vehicle vehicle, MAP map){
Locator locator = locators.get(map);
if(locator == null)
throw new RuntimeException("Unsupported locator");
Transportation transport = vehicles.get(vehicle);
if(transport == null)
throw new RuntimeException("Unsupported transport");
Double distance = locator.calculateDistance(a, b);
return transport.calculateTime(distance);
}
public void addVehicle(Vehicle vehicle, Transportation transport){
vehicles.put(vehicle, transport);
}
public void addLocator(MAP map, Locator locator){
locators.put(map, locator);
}
}
|
[
"mcrakens@gmail.com"
] |
mcrakens@gmail.com
|
a4d38df94e069f8538e11c1a7092561be34b7f82
|
2dabf7e1adaf353230604aed120599ee54f39a22
|
/diy/branches/0.5.0/core/src/main/java/org/imirsel/nema/service/MailEngine.java
|
fca8344c9d2532afbb7491e698888d168ab3dcb9
|
[] |
no_license
|
imirsel/nemadiy
|
befbc6503616787ab8bbb6c20d92e01476593c54
|
ce3787191871d52196e97e6e9eb8d37caf12c911
|
refs/heads/master
| 2021-01-25T07:07:49.963001
| 2013-09-13T07:51:56
| 2013-09-13T07:51:56
| 32,190,606
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,816
|
java
|
package org.imirsel.nema.service;
import java.util.Map;
import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.exception.VelocityException;
import org.springframework.core.io.ClassPathResource;
import org.springframework.mail.MailException;
import org.springframework.mail.MailSender;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSenderImpl;
import org.springframework.mail.javamail.MimeMessageHelper;
import org.springframework.ui.velocity.VelocityEngineUtils;
/**
* Class for sending e-mail messages based on Velocity templates
* or with attachments.
*
* @author Matt Raible
*/
public class MailEngine {
private final Log log = LogFactory.getLog(MailEngine.class);
private MailSender mailSender;
private VelocityEngine velocityEngine;
private String defaultFrom;
public void setMailSender(MailSender mailSender) {
this.mailSender = mailSender;
}
public void setVelocityEngine(VelocityEngine velocityEngine) {
this.velocityEngine = velocityEngine;
}
public void setFrom(String from) {
this.defaultFrom = from;
}
/**
* Send a simple message based on a Velocity template.
* @param msg the message to populate
* @param templateName the Velocity template to use (relative to classpath)
* @param model a map containing key/value pairs
*/
public void sendMessage(SimpleMailMessage msg, String templateName, Map model) {
String result = null;
try {
result =
VelocityEngineUtils.mergeTemplateIntoString(velocityEngine,
templateName, model);
} catch (VelocityException e) {
e.printStackTrace();
log.error(e.getMessage());
}
msg.setText(result);
send(msg);
}
/**
* Send a simple message with pre-populated values.
* @param msg the message to send
* @throws org.springframework.mail.MailException when SMTP server is down
*/
public void send(SimpleMailMessage msg) throws MailException {
try {
mailSender.send(msg);
} catch (MailException ex) {
log.error(ex.getMessage());
throw ex;
}
}
/**
* Convenience method for sending messages with attachments.
*
* @param recipients array of e-mail addresses
* @param sender e-mail address of sender
* @param resource attachment from classpath
* @param bodyText text in e-mail
* @param subject subject of e-mail
* @param attachmentName name for attachment
* @throws MessagingException thrown when can't communicate with SMTP server
*/
public void sendMessage(String[] recipients, String sender,
ClassPathResource resource, String bodyText,
String subject, String attachmentName)
throws MessagingException {
MimeMessage message = ((JavaMailSenderImpl) mailSender).createMimeMessage();
// use the true flag to indicate you need a multipart message
MimeMessageHelper helper = new MimeMessageHelper(message, true);
helper.setTo(recipients);
// use the default sending if no sender specified
if (sender == null) {
helper.setFrom(defaultFrom);
} else {
helper.setFrom(sender);
}
helper.setText(bodyText);
helper.setSubject(subject);
helper.addAttachment(attachmentName, resource);
((JavaMailSenderImpl) mailSender).send(message);
}
}
|
[
"kumaramit01@cc4868ba-f9d9-11de-9656-bb0dda18cfc1"
] |
kumaramit01@cc4868ba-f9d9-11de-9656-bb0dda18cfc1
|
ade0e7d63a61228285cb3080a310ff03f6cf8220
|
d7be0cf96dae35a98dc1643011e025a28e3c92bd
|
/QZComm/src/main/java/com/ks/db/cfg/HeroEvoMaterial.java
|
a9cbf80ccdc0175af3421680f355657806cf5bbd
|
[] |
no_license
|
liaohanjie/QZStore
|
8ab5827138266dc88179ee2cfb94c98d391c39be
|
698d1e7d8386bca3b15fd4b3ea3020e5b9cc3c43
|
refs/heads/master
| 2021-01-10T18:35:14.604327
| 2016-05-31T05:17:50
| 2016-05-31T05:17:50
| 59,005,984
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,064
|
java
|
package com.ks.db.cfg;
import java.io.Serializable;
import com.ks.access.DBBeanSet;
import com.ks.access.DBFieldSet;
/**
* 英雄进化材料
* @author ks
*/
@DBBeanSet(tablename="t_hero_evo_material", createDeleteSql=false, createInsertSql=false, createSelectSql=false, createUpdateSql=false)
public class HeroEvoMaterial implements Serializable {
private static final long serialVersionUID = 1L;
/**进化编号*/
@DBFieldSet(dbfname="evo_id")
private int evoId;
/**类型*/
@DBFieldSet(dbfname="type")
private int type;
/**关联编号*/
@DBFieldSet(dbfname="ass_id")
private int assId;
/**数量*/
@DBFieldSet(dbfname="num")
private int num;
public int getEvoId() {
return evoId;
}
public void setEvoId(int evoId) {
this.evoId = evoId;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public int getAssId() {
return assId;
}
public void setAssId(int assId) {
this.assId = assId;
}
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
}
|
[
"liaohanjie1314@126.com"
] |
liaohanjie1314@126.com
|
59d7bb327aafeceb5e39d5d169f2deb46853c2b3
|
3faf683930661f9cc924b344a41d9d6870ea6bca
|
/src/main/java/org/bian/dto/CRCorporateLeaseArrangementExecuteInputModelExecuteRecordType.java
|
ff9a1d57883e6a82e9a8b712b548dceeb648c1e2
|
[
"Apache-2.0"
] |
permissive
|
bianapis/sd-corporate-lease-v3
|
a674fbd1b0ddb1060cc36e255ab99a7cb1081eb0
|
d49c3aac2150f99101cbc01c45f1a27b457aa404
|
refs/heads/master
| 2022-12-24T10:26:27.727883
| 2020-09-29T11:03:36
| 2020-09-29T11:03:36
| 299,564,362
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 900
|
java
|
package org.bian.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
/**
* CRCorporateLeaseArrangementExecuteInputModelExecuteRecordType
*/
public class CRCorporateLeaseArrangementExecuteInputModelExecuteRecordType {
private Object executeInputRecord = null;
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Binary general-info: Execute transaction/record (e.g. deposit, withdrawal, fee/penalty, interest)
* @return executeInputRecord
**/
public Object getExecuteInputRecord() {
return executeInputRecord;
}
public void setExecuteInputRecord(Object executeInputRecord) {
this.executeInputRecord = executeInputRecord;
}
}
|
[
"spabandara@Virtusa.com"
] |
spabandara@Virtusa.com
|
cbc583f7181547822c9e5324c64f8fed5563ed2b
|
7364144e8fd7b0382a8dbc2a91dcefbee1b5ee10
|
/qiankun/pure-html/src/com/sinosoft/sinoep/modules/system/notice/dao/SysNoticeUserDao.java
|
36784629356fc0bba00b75552887766d50b439c6
|
[] |
no_license
|
libyasdf/frame-learn
|
2b9ba596d12cb014b7ef9f9689f19142f90b2374
|
322fbd21cf4389d5f453de2568d1f9b11888ec10
|
refs/heads/master
| 2023-01-12T16:36:10.205017
| 2020-10-11T12:48:00
| 2020-10-11T12:48:00
| 299,892,834
| 0
| 0
| null | 2020-10-01T14:10:32
| 2020-09-30T11:08:35
|
HTML
|
UTF-8
|
Java
| false
| false
| 477
|
java
|
package com.sinosoft.sinoep.modules.system.notice.dao;
import com.sinosoft.sinoep.common.jpa.repository.BaseRepository;
import com.sinosoft.sinoep.modules.system.notice.entity.SysNotice;
import com.sinosoft.sinoep.modules.system.notice.entity.SysNoticeUser;
/**
* TODO 通知通告通知人群子表DAO接口
* @author 李利广
* @Date 2018年8月17日 上午11:37:11
*/
public interface SysNoticeUserDao extends BaseRepository<SysNoticeUser, String> {
}
|
[
"liby1994@126.com"
] |
liby1994@126.com
|
d06d3cf316d6cd56d8e8c2460192adb146af58bf
|
e5fdec9df80b4958f49250f90fd05c13e3bda8b7
|
/org.servicifi.gelato.language.cobol/src-gen/org/servicifi/gelato/language/cobol/water/OpenStatementWater.java
|
6607c357d6c17d2ca29e897513b119521f7e0a31
|
[] |
no_license
|
amirms/gelato
|
9125e6ac3a56e5bcfd032db855a4c269bdfc5152
|
972d7309dc37c57d17d2b1486a49f00830983eb8
|
refs/heads/master
| 2021-06-03T22:07:12.010077
| 2019-03-10T11:54:27
| 2019-03-10T11:54:27
| 27,443,539
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 410
|
java
|
/**
*/
package org.servicifi.gelato.language.cobol.water;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Open Statement Water</b></em>'.
* <!-- end-user-doc -->
*
*
* @see org.servicifi.gelato.language.cobol.water.WaterPackage#getOpenStatementWater()
* @model abstract="true"
* @generated
*/
public interface OpenStatementWater extends Water {
} // OpenStatementWater
|
[
"amir.iust@gmail.com"
] |
amir.iust@gmail.com
|
9256405649cb9eb2f3411874a2bc8ee23420c3bd
|
96670d2b28a3fb75d2f8258f31fc23d370af8a03
|
/reverse_engineered/sources/com/alibaba/fastjson/serializer/CharArraySerializer.java
|
1bbe12dcf16debe5bc5c73d836705ac6ccc77dbc
|
[] |
no_license
|
P79N6A/speedx
|
81a25b63e4f98948e7de2e4254390cab5612dcbd
|
800b6158c7494b03f5c477a8cf2234139889578b
|
refs/heads/master
| 2020-05-30T18:43:52.613448
| 2019-06-02T07:57:10
| 2019-06-02T08:15:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 682
|
java
|
package com.alibaba.fastjson.serializer;
import java.io.IOException;
import java.lang.reflect.Type;
public class CharArraySerializer implements ObjectSerializer {
public static CharArraySerializer instance = new CharArraySerializer();
public final void write(JSONSerializer jSONSerializer, Object obj, Object obj2, Type type) throws IOException {
SerializeWriter writer = jSONSerializer.getWriter();
if (obj != null) {
writer.writeString(new String((char[]) obj));
} else if (writer.isEnabled(SerializerFeature.WriteNullListAsEmpty)) {
writer.write("[]");
} else {
writer.writeNull();
}
}
}
|
[
"Gith1974"
] |
Gith1974
|
459e4c4e2de1db8fa693ea7d10c65f4ffeec50d1
|
1a53fb2e0ff1ef029e58e65bc85724263a3a9f1a
|
/app/src/main/java/com/example/utiltool2/glide/CircleCrop.java
|
db848eba37da52dcb34595ec065ee22e5962c1b9
|
[] |
no_license
|
heliguo/utiltool2
|
557301263c713c7e7783f36244577d1d7d6b954c
|
447bca72ba05030c1518211d31214d4f48de0c2b
|
refs/heads/master
| 2021-07-09T07:26:11.864763
| 2020-12-04T08:10:39
| 2020-12-04T08:10:39
| 215,719,440
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,055
|
java
|
package com.example.utiltool2.glide;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import androidx.annotation.NonNull;
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
import java.security.MessageDigest;
/**
* author:lgh on 2019-11-08 10:54
*/
public class CircleCrop extends BitmapTransformation {
public CircleCrop(Context context) {
super();
}
public CircleCrop(BitmapPool bitmapPool) {
super();
}
@Override
protected Bitmap transform(@NonNull BitmapPool pool, @NonNull Bitmap toTransform, int outWidth, int outHeight) {
int diameter = Math.min(toTransform.getWidth(), toTransform.getHeight());
final Bitmap toReuse = pool.get(outWidth, outHeight, Bitmap.Config.ARGB_8888);
final Bitmap result;
if (toReuse != null) {
result = toReuse;
} else {
result = Bitmap.createBitmap(diameter, diameter, Bitmap.Config.ARGB_8888);
}
int dx = (toTransform.getWidth() - diameter) / 2;
int dy = (toTransform.getHeight() - diameter) / 2;
Canvas canvas = new Canvas(result);
Paint paint = new Paint();
BitmapShader shader = new BitmapShader(toTransform, BitmapShader.TileMode.CLAMP,
BitmapShader.TileMode.CLAMP);
if (dx != 0 || dy != 0) {
Matrix matrix = new Matrix();
matrix.setTranslate(-dx, -dy);
shader.setLocalMatrix(matrix);
}
paint.setShader(shader);
paint.setAntiAlias(true);
float radius = diameter / 2f;
canvas.drawCircle(radius, radius, radius, paint);
if (toReuse != null) {
toReuse.recycle();
}
return result;
}
@Override
public void updateDiskCacheKey(@NonNull MessageDigest messageDigest) {
}
}
|
[
"ysulgh@163.com"
] |
ysulgh@163.com
|
fbc6e0760738ad1464c254c3455fc8426ddc3fbe
|
2cb7187bcbef4ce4d8dac997e8b6838a5265bb7a
|
/BetaApplications/src/aplicacion/gestion/agenda/gestion/logic/JScrollPaneCellditor.java
|
90ed39532b69734f83c415de8b2d9740795e0807
|
[] |
no_license
|
pjpincheiragr/Catalogos
|
cc5185e7a22c4a2c4ed1c9ebfd6d42186f996c50
|
d462cc5bcd740215a01f7684a5ea6cb6086ef3db
|
refs/heads/master
| 2021-01-10T06:15:27.738122
| 2015-12-18T13:05:54
| 2015-12-18T13:05:54
| 48,194,633
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,229
|
java
|
package aplicacion.gestion.agenda.gestion.logic;
import java.awt.Color;
import java.awt.Component;
import javax.swing.AbstractCellEditor;
import javax.swing.JComponent;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.JScrollPane;
import javax.swing.table.TableCellEditor;
import aplicacion.herramientas.java.table.Column;
import aplicacion.herramientas.java.table.CustomTable;
public class JScrollPaneCellditor extends AbstractCellEditor implements TableCellEditor {
// This is the component that will handle the editing of the cell value
private _Logic logic=null;
JScrollPaneCellRenderer renderer=new JScrollPaneCellRenderer();
// This method is called when a cell value is edited by the user.
public Component getTableCellEditorComponent(JTable table, Object value,
boolean isSelected, int rowIndex, int vColIndex) {
// 'value' is value contained in the cell located at (rowIndex, vColIndex)
renderer.setLogic(this.logic);
Component c=this.renderer.getTableCellRendererComponent(table, value, isSelected, true, rowIndex, vColIndex);
return c;
}
// This method is called when editing is completed.
// It must return the new value to be stored in the cell.
public Object getCellEditorValue() {
if (renderer.getTableRenderer() instanceof JScrollPane){
JScrollPane scroll=renderer.getTableRenderer();
try {
JTable table=(JTable)scroll.getViewport().getView();
table.clearSelection();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
scroll.setBackground(Color.LIGHT_GRAY);
return scroll;
}else{
JScrollPane scroll=renderer.getTableRenderer();;
return scroll;
}
/*JTable tmp=this.renderer.getTableRenderer();
Object[][] value=new Object[tmp.getRowCount()][tmp.getColumnCount()];
for (int i=0;i<tmp.getRowCount();i++){
for (int j=0;j<tmp.getColumnCount();j++){
value[i][j]=tmp.getValueAt(i, j);
}
}
return value;*/
}
public _Logic getLogic() {
return logic;
}
public void setLogic(_Logic logic) {
this.logic = logic;
}
}
|
[
"juli.otero01@gmail.com"
] |
juli.otero01@gmail.com
|
253446e187e6de2183d7c52316304dc03754ed4b
|
0e0dae718251c31cbe9181ccabf01d2b791bc2c2
|
/SCT2/tags/M_SCT_17_RELEASE/test-plugins/org.yakindu.sct.model.sexec.interpreter.test/src-gen/org/yakindu/sct/model/sexec/interpreter/test/GuardedEntryTest.java
|
4cb7bfb5ca35d43e4c5b551df0e17577f73a0c3e
|
[] |
no_license
|
huybuidac20593/yakindu
|
377fb9100d7db6f4bb33a3caa78776c4a4b03773
|
304fb02b9c166f340f521f5e4c41d970268f28e9
|
refs/heads/master
| 2021-05-29T14:46:43.225721
| 2015-05-28T11:54:07
| 2015-05-28T11:54:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,542
|
java
|
/**
* Copyright (c) 2012 committers of YAKINDU and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* committers of YAKINDU - initial API and implementation
*/
package org.yakindu.sct.model.sexec.interpreter.test;
import org.eclipse.xtext.junit4.InjectWith;
import org.eclipse.xtext.junit4.XtextRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.yakindu.sct.model.sexec.interpreter.test.util.AbstractExecutionFlowTest;
import org.yakindu.sct.model.sexec.interpreter.test.util.SExecInjectionProvider;
import com.google.inject.Inject;
import org.junit.Before;
import org.yakindu.sct.model.sexec.interpreter.IExecutionFlowInterpreter;
import org.yakindu.sct.model.sexec.ExecutionFlow;
import util.TestModels;
import static junit.framework.Assert.*;
/**
* Unit TestCase for GuardedEntry
*/
@SuppressWarnings("all")
@RunWith(XtextRunner.class)
@InjectWith(SExecInjectionProvider.class)
public class GuardedEntryTest extends AbstractExecutionFlowTest {
@Inject
private TestModels models;
@Before
public void setup() throws Exception {
ExecutionFlow flow = models
.loadExecutionFlowFromResource("GuardedEntry.sct");
initInterpreter(flow);
}
@Test
public void EntryNotTakenOnStatechartEnter() throws Exception {
assertTrue(getBoolean("guard") == false);
interpreter.enter();
assertTrue(isActive("A"));
assertTrue(getBoolean("done") == false);
}
@Test
public void EntryTakenOnStatechartEnter() throws Exception {
setBoolean("guard", true);
interpreter.enter();
assertTrue(isActive("A"));
assertTrue(getBoolean("done") == true);
}
@Test
public void EntryTakenInTransition() throws Exception {
interpreter.enter();
assertTrue(isActive("A"));
raiseEvent("e");
interpreter.runCycle();
assertTrue(isActive("B"));
setBoolean("guard", true);
setBoolean("done", false);
raiseEvent("e");
interpreter.runCycle();
assertTrue(isActive("A"));
assertTrue(getBoolean("done"));
}
@Test
public void EntryNotTakenInTransition() throws Exception {
interpreter.enter();
assertTrue(isActive("A"));
raiseEvent("e");
interpreter.runCycle();
assertTrue(isActive("B"));
setBoolean("guard", false);
setBoolean("done", false);
raiseEvent("e");
interpreter.runCycle();
assertTrue(isActive("A"));
assertTrue(!getBoolean("done"));
}
}
|
[
"terfloth@itemis.de"
] |
terfloth@itemis.de
|
1c69e34eaa019c8f4ce6c0b39967de4be809205c
|
15e40f8ce43fcf999378da5047365cc84a3c6bb5
|
/src/main/java/com/zssi/framework/app/cwgl/model/YcwCbmx.java
|
d8f0d29ccdb583b6c11bce4d308ccf41adc963a6
|
[] |
no_license
|
itxiaojian/myfirstgit
|
e7a758c5df85238b95ac8432aa6eb79c170bd2bd
|
050b1ae8be8b6289ad6d49b62ebea09b54ee45f9
|
refs/heads/master
| 2021-01-19T16:08:55.757067
| 2017-04-14T15:05:04
| 2017-04-14T15:05:04
| 88,250,609
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,039
|
java
|
package com.zssi.framework.app.cwgl.model;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
/**
* 财务管理--成本明细
* @author wangyong
* @date 2015年10月12日
*/
@SuppressWarnings("serial")
@Entity
@Table(name="y_cw_cbmx")
public class YcwCbmx implements Serializable{
private Integer id; //主键ID
private String jybh; //检验编号
private String fylx; //费用类型
private String xmmc; //费用项目名称
private String fyxq; //费用详情
private BigDecimal je; //金额
private String ksbh; //科室编号
private Date lrrq; //录入日期
private Date fssj; //费用发生日期
private String pjbh; //票据编号
private String cbbh; //成本编号
@Id
@GenericGenerator(name = "idGenerator", strategy = "sequence",parameters = {@Parameter(name = "sequence",value="SEQ_CW_ID")})
@GeneratedValue(generator = "idGenerator")
@Column(name="id",nullable=false)
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Column(name="jybh", length=50, nullable=true)
public String getJybh() {
return jybh;
}
public void setJybh(String jybh) {
this.jybh = jybh;
}
@Column(name="fylx", length=50, nullable=true)
public String getFylx() {
return fylx;
}
public void setFylx(String fylx) {
this.fylx = fylx;
}
@Column(name="xmmc", length=50, nullable=true)
public String getXmmc() {
return xmmc;
}
public void setXmmc(String xmmc) {
this.xmmc = xmmc;
}
@Column(name="fyxq", length=500, nullable=true)
public String getFyxq() {
return fyxq;
}
public void setFyxq(String fyxq) {
this.fyxq = fyxq;
}
@Column(name="je", length=50, nullable=true)
public BigDecimal getJe() {
return je;
}
public void setJe(BigDecimal je) {
this.je = je;
}
@Column(name="ksbh", length=50, nullable=true)
public String getKsbh() {
return ksbh;
}
public void setKsbh(String ksbh) {
this.ksbh = ksbh;
}
@Column(name="lrrq", nullable=true)
public Date getLrrq() {
return lrrq;
}
public void setLrrq(Date lrrq) {
this.lrrq = lrrq;
}
@Column(name="pjbh", length=200, nullable=true)
public String getPjbh() {
return pjbh;
}
public void setPjbh(String pjbh) {
this.pjbh = pjbh;
}
@Column(name="fssj", nullable=true)
public Date getFssj() {
return fssj;
}
public void setFssj(Date fssj) {
this.fssj = fssj;
}
@Column(name="cbbh", length=50, nullable=true)
public String getCbbh() {
return cbbh;
}
public void setCbbh(String cbbh) {
this.cbbh = cbbh;
}
}
|
[
"2629690209@qq.com"
] |
2629690209@qq.com
|
0225439cb796fa1c7987510b4b0b20a13ef9d395
|
d1e27692c858fbd3a2433fd6e8ed15f86050a642
|
/Practise/src/com/javatpoint/OverRiding1.java
|
d3834ab6572c79871fb3983cfdb661a2695d4078
|
[] |
no_license
|
saikrishna89/IndeedProject
|
7d734aebd18713e48f2db7460503a7892d1b19a1
|
e68d284e5f0294af42c3247905e98909269018de
|
refs/heads/master
| 2021-01-23T03:34:35.490743
| 2017-12-21T06:07:07
| 2017-12-21T06:07:07
| 86,095,699
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 130
|
java
|
package com.javatpoint;
public class OverRiding1 extends OverRiding{
void example() {
System.out.println("example1");
}
}
|
[
"abhi.madhireddy@gmail.com"
] |
abhi.madhireddy@gmail.com
|
426c68401bfba6ae3aa4a039fd31c81f859250bf
|
f539a77d1deaeb23f8b4edff190af9e0130bbcc1
|
/111 DELETE Method/restws/src/main/java/com/bharaththippireddy/trainings/jaxrs/Prescription.java
|
8a9e70cce861a500f389af2e6cba83eec2810a59
|
[] |
no_license
|
noctuaIv/-udemy--java-web-services
|
a0306e96c7d2464069a5256d2cdb4dcb6b37ddbb
|
a8ca47a1c6f63b93904047efa04d14542c36e12e
|
refs/heads/master
| 2020-04-28T22:15:22.411836
| 2019-03-14T11:47:46
| 2019-03-14T11:47:46
| 175,611,088
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,131
|
java
|
package com.bharaththippireddy.trainings.jaxrs;
import java.util.HashMap;
import java.util.Map;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "Prescription")
public class Prescription {
private long id;
private String description;
private Map<Long, Medicine> prescriptions = new HashMap<Long, Medicine>();
public Prescription() {
init();
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@GET
@Path("/medicines/{id}")
public Medicine getMedicine(@PathParam("id")String medicineid) {
System.out.println("----invoking getMedicine with id: " + medicineid);
Medicine medicine = prescriptions.get(new Long(medicineid));
return medicine;
}
final void init() {
Medicine medicine = new Medicine();
medicine.setId(323);
medicine.setDescription("Medicine 323");
prescriptions.put(medicine.getId(), medicine);
}
}
|
[
"noctua.vt@gmail.com"
] |
noctua.vt@gmail.com
|
e38fff2bdd5eb9dcc953c8b02720e74f19510246
|
4d3c211bc491072ba9b815fd87f5b6fbcb08fb70
|
/JavaStudy/src/Hello.java
|
190235c9eac31d43b9b1733b1404668355d866f8
|
[] |
no_license
|
ShinDaeCheol/JavaStudy
|
00ee2a18941f8ab6b598870887c9b8f9b184eab5
|
0305e36bc250277345ec898511d79ed869a4d76f
|
refs/heads/master
| 2020-04-28T19:40:57.612687
| 2019-03-20T08:36:46
| 2019-03-20T08:36:46
| 175,518,961
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 335
|
java
|
public class Hello {
// main 입력후 컨트롤+스페이스
public static void main(String[] args) {
// syso 입력후 컨트롤+스페이스
System.out.println("hello??다되는구만");
// 코드정렬= 컨트롤+쉬프트+F
int 인원 = 10;
int 점수 = 100;
System.out.println(인원 * 점수);
}
}
|
[
"Student@DESKTOP-EF9PEQ2"
] |
Student@DESKTOP-EF9PEQ2
|
034e214e0963a661464e5ffcad659102087be5d3
|
75e1cc219201c302a551d1355b5a01f7ecb0b929
|
/src/main/java/com/github/houbb/compress/handler/archive/JarUnArchiveHandler.java
|
c614fe74fd7577faec17f34c5c22ac9fdffe625e
|
[
"Apache-2.0"
] |
permissive
|
caishuxueqian/compress
|
65921cccf36aed7db679d3d8acaf4921910d62e7
|
3cfb85c299d4da5f74cd5f09846d297596d61035
|
refs/heads/master
| 2022-04-07T19:46:17.836182
| 2020-03-04T04:12:59
| 2020-03-04T04:12:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 577
|
java
|
package com.github.houbb.compress.handler.archive;
import com.github.houbb.heaven.annotation.ThreadSafe;
import org.apache.commons.compress.archivers.ArchiveInputStream;
import org.apache.commons.compress.archivers.jar.JarArchiveInputStream;
import java.io.InputStream;
/**
* @author binbin.hou
* @since 0.0.1
*/
@ThreadSafe
public class JarUnArchiveHandler extends AbstractUnArchiveHandler {
@Override
protected ArchiveInputStream getArchiveInputStream(InputStream inputStream, String password) {
return new JarArchiveInputStream(inputStream);
}
}
|
[
"1060732496@qq.com"
] |
1060732496@qq.com
|
295c3e55c7f095659717752fe2bf2949cc2c557e
|
71b2f6a3632ac298684a41cf555081d1eaf5d66b
|
/kernel/main/src/main/java/org/atricore/idbus/kernel/main/mediation/camel/component/http/ui/HttpErrServlet.java
|
3e7207edda6f0dc69da81b6913ea357458bf3fd4
|
[] |
no_license
|
atricore/atricore-idbus
|
153dcafe9dfa1b2183f39b3d0c71b4eb73eb1dbf
|
44a3ed5bdf621be21045e1ff4d0468d84f02fe1f
|
refs/heads/master
| 2023-08-17T12:22:57.157299
| 2023-07-01T20:47:30
| 2023-07-01T20:47:30
| 15,801,589
| 6
| 11
| null | 2023-09-13T17:21:10
| 2014-01-10T15:31:23
|
Java
|
UTF-8
|
Java
| false
| false
| 5,296
|
java
|
package org.atricore.idbus.kernel.main.mediation.camel.component.http.ui;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
import org.atricore.idbus.kernel.main.mediation.camel.component.http.HttpUtils;
import org.mortbay.jetty.Request;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;
/**
* Serlvet to handle HTTP error status, like 404 or 500. It will render a page based on the status value.
*/
public class HttpErrServlet extends HttpServlet {
private static final Log logger = LogFactory.getLog(HttpErrServlet.class);
protected ServletContext servletContext;
protected VelocityEngine velocityEngine;
private Map<String, String> templates = new HashMap<String, String>();
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
try {
servletContext = config.getServletContext();
velocityEngine = HttpUtils.getVelocityEngine();
} catch (Exception e) {
throw new ServletException(e);
}
}
/**
* Path info MUST be "/{http-status-code}
* @param req
* @param resp
* @throws ServletException
* @throws IOException
*/
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
// default page
String pathInfo = req.getPathInfo();
String statusStr = pathInfo.substring(1);
String pageName = "404.html"; // Default
int status = 404; // Default
if (pathInfo != null) {
try {
status = Integer.parseInt(statusStr);
if (status < 100)
status = 500;
pageName = status + ".html";
} catch (NumberFormatException e) {
logger.trace("Illegal status " + statusStr + ", forcing 404");
} catch (NullPointerException e) {
logger.trace("Illegal status NULL, forcing 404");
}
String internalError = null;
// Lookup for branding
WebBranding branding = HttpUtils.resolveWebBranding(servletContext, req);
String templateLocation = "/WEB-INF/err/" + branding.getWebBrandingId() + "/" + pageName;
Reader in = resolveTemplate(templateLocation);
if (in == null) {
logger.warn("Unsupported HTTP Status code: " + statusStr);
in = resolveTemplate("/WEB-INF/err/" + branding.getWebBrandingId() + "/" + "404.html");
internalError = "Illegal status : " + statusStr;
}
// We need to get the Jetty request to get parameters (bug?)
Request r = (Request) req.getAttribute("org.ops4j.pax.web.service.internal.jettyRequest");
// Location
String location = r.getParameter("location");
String shortLocation = "";
if (location != null) {
// Prevent HTML injection
location = new String(Base64.decodeBase64(location.getBytes())).
replace("<", "<").
replace(">", ">");
int args = location.indexOf("?");
shortLocation = args > 0 ? location.substring(0, args) : location;
} else {
location = "";
}
// Error
String error = r.getParameter("error");
if (error != null) {
// Prevent HTML injection
error = new String(Base64.decodeBase64(error.getBytes())).
replace("<", "<").
replace(">", ">");
} else if (internalError != null) {
error = internalError;
} else {
error = "";
}
// Velocity
VelocityContext veCtx = new VelocityContext();
veCtx.put("location", shortLocation);
veCtx.put("error", error);
// Write to response
resp.setStatus(status);
velocityEngine.evaluate(veCtx, resp.getWriter(), status + ".html", in);
}
}
protected Reader resolveTemplate(String templateLocation) throws IOException {
String content = templates.get(templateLocation);
if (content == null) {
if (logger.isDebugEnabled())
logger.debug("Resolving pate template ["+templateLocation+"]");
InputStream pageIs = servletContext.getResourceAsStream(templateLocation);
if (pageIs == null)
return null;
content = IOUtils.toString(pageIs, "UTF-8");
templates.put(templateLocation, content);
}
return new StringReader(content);
}
}
|
[
"sgonzalez@atricore.com"
] |
sgonzalez@atricore.com
|
8a1f97f0f4046c925547f2931e776c3380eb4d9c
|
61b3d15efd919365372ba6c72af354406c36c3c8
|
/src/test/java/cpm/doe/app/web/rest/AuditResourceIntTest.java
|
b18fee960b965a38c8f1909f802e3f39ae6eed82
|
[] |
no_license
|
veerappanvs/react-springboot-mysql
|
0edb368e996dceda201c7d740c99f819ee579ae5
|
462adfd62192d7f4e474d48c23b9483f2c879c2c
|
refs/heads/master
| 2020-05-05T12:30:35.137942
| 2019-04-07T22:33:47
| 2019-04-07T22:33:47
| 180,031,548
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,595
|
java
|
package cpm.doe.app.web.rest;
import cpm.doe.app.AppinventorysqlApp;
import cpm.doe.app.config.audit.AuditEventConverter;
import cpm.doe.app.domain.PersistentAuditEvent;
import cpm.doe.app.repository.PersistenceAuditEventRepository;
import cpm.doe.app.service.AuditEventService;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.MockitoAnnotations;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.web.PageableHandlerMethodArgumentResolver;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.http.MediaType;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.transaction.annotation.Transactional;
import java.time.Instant;
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import static org.hamcrest.Matchers.hasItem;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
/**
* Test class for the AuditResource REST controller.
*
* @see AuditResource
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = AppinventorysqlApp.class)
@Transactional
public class AuditResourceIntTest {
private static final String SAMPLE_PRINCIPAL = "SAMPLE_PRINCIPAL";
private static final String SAMPLE_TYPE = "SAMPLE_TYPE";
private static final Instant SAMPLE_TIMESTAMP = Instant.parse("2015-08-04T10:11:30Z");
private static final long SECONDS_PER_DAY = 60 * 60 * 24;
@Autowired
private PersistenceAuditEventRepository auditEventRepository;
@Autowired
private AuditEventConverter auditEventConverter;
@Autowired
private MappingJackson2HttpMessageConverter jacksonMessageConverter;
@Autowired
private FormattingConversionService formattingConversionService;
@Autowired
private PageableHandlerMethodArgumentResolver pageableArgumentResolver;
private PersistentAuditEvent auditEvent;
private MockMvc restAuditMockMvc;
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
AuditEventService auditEventService =
new AuditEventService(auditEventRepository, auditEventConverter);
AuditResource auditResource = new AuditResource(auditEventService);
this.restAuditMockMvc = MockMvcBuilders.standaloneSetup(auditResource)
.setCustomArgumentResolvers(pageableArgumentResolver)
.setConversionService(formattingConversionService)
.setMessageConverters(jacksonMessageConverter).build();
}
@Before
public void initTest() {
auditEventRepository.deleteAll();
auditEvent = new PersistentAuditEvent();
auditEvent.setAuditEventType(SAMPLE_TYPE);
auditEvent.setPrincipal(SAMPLE_PRINCIPAL);
auditEvent.setAuditEventDate(SAMPLE_TIMESTAMP);
}
@Test
public void getAllAudits() throws Exception {
// Initialize the database
auditEventRepository.save(auditEvent);
// Get all the audits
restAuditMockMvc.perform(get("/management/audits"))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL)));
}
@Test
public void getAudit() throws Exception {
// Initialize the database
auditEventRepository.save(auditEvent);
// Get the audit
restAuditMockMvc.perform(get("/management/audits/{id}", auditEvent.getId()))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(jsonPath("$.principal").value(SAMPLE_PRINCIPAL));
}
@Test
public void getAuditsByDate() throws Exception {
// Initialize the database
auditEventRepository.save(auditEvent);
// Generate dates for selecting audits by date, making sure the period will contain the audit
String fromDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0, 10);
String toDate = SAMPLE_TIMESTAMP.plusSeconds(SECONDS_PER_DAY).toString().substring(0, 10);
// Get the audit
restAuditMockMvc.perform(get("/management/audits?fromDate="+fromDate+"&toDate="+toDate))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL)));
}
@Test
public void getNonExistingAuditsByDate() throws Exception {
// Initialize the database
auditEventRepository.save(auditEvent);
// Generate dates for selecting audits by date, making sure the period will not contain the sample audit
String fromDate = SAMPLE_TIMESTAMP.minusSeconds(2*SECONDS_PER_DAY).toString().substring(0, 10);
String toDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0, 10);
// Query audits but expect no results
restAuditMockMvc.perform(get("/management/audits?fromDate=" + fromDate + "&toDate=" + toDate))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(header().string("X-Total-Count", "0"));
}
@Test
public void getNonExistingAudit() throws Exception {
// Get the audit
restAuditMockMvc.perform(get("/management/audits/{id}", Long.MAX_VALUE))
.andExpect(status().isNotFound());
}
@Test
@Transactional
public void testPersistentAuditEventEquals() throws Exception {
TestUtil.equalsVerifier(PersistentAuditEvent.class);
PersistentAuditEvent auditEvent1 = new PersistentAuditEvent();
auditEvent1.setId(1L);
PersistentAuditEvent auditEvent2 = new PersistentAuditEvent();
auditEvent2.setId(auditEvent1.getId());
assertThat(auditEvent1).isEqualTo(auditEvent2);
auditEvent2.setId(2L);
assertThat(auditEvent1).isNotEqualTo(auditEvent2);
auditEvent1.setId(null);
assertThat(auditEvent1).isNotEqualTo(auditEvent2);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
f334b6c2f142f0efd73059573f3eaac3b055752d
|
4b43d431146823b54fe9a891d0d408c0058e627f
|
/src/main/java/sonar/calculator/mod/api/flux/package-info.java
|
9f2da487613e95f6243d6d490e032284697f7053
|
[
"MIT"
] |
permissive
|
budak7273/Calculator
|
dd519f8938d11370b58edad34f4315d4a78bba15
|
e0399a51c91dcd10bafcf0c5bca71e6388c484bf
|
refs/heads/master
| 2020-07-02T21:34:47.165242
| 2019-08-13T15:16:47
| 2019-08-13T15:16:47
| 201,672,422
| 0
| 0
| null | 2019-08-10T19:10:09
| 2019-08-10T19:10:08
| null |
UTF-8
|
Java
| false
| false
| 181
|
java
|
/**the Calculator API*/
@API(apiVersion = "1.7.10 - 1.1", owner = "Calculator", provides = "CalculatorAPI")
package sonar.calculator.mod.api.flux;
import cpw.mods.fml.common.API;
|
[
"ollielansdell@hotmail.co.uk"
] |
ollielansdell@hotmail.co.uk
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.