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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b72c251c615e0d8c6d31fcaf34c761f8d1941504
|
4ae1d943b4218423cb082fe77869ad7870d187c4
|
/cafe_WORKSPACE_v1.0.0/vendor-service-hallimane/src/main/java/com/comp/cafe/vendor/hallimane/vendorservicehallimane/ItemsController.java
|
f1ebbf5cd73f0c310623d17645b2945a0aa80598
|
[] |
no_license
|
umeshkilkile/microservices
|
82f59fb624ef836290d107f4548563f2a1aa4d09
|
3e5a6bd3780040132da0588411d3a1c376a8ddbe
|
refs/heads/master
| 2020-04-10T05:11:51.987808
| 2019-01-04T11:09:00
| 2019-01-04T11:09:00
| 160,630,579
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 995
|
java
|
package com.comp.cafe.vendor.hallimane.vendorservicehallimane;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
/**
* @author ukilkil
*
*/
@CrossOrigin(origins = "*", allowedHeaders = "*")
@RestController
@RequestMapping("/api/rest/hallimane/items")
public class ItemsController {
@Autowired
ItemJpaRepository itemJpaRepository;
@GetMapping
public @ResponseBody ResponseEntity<Data> getAllItems() {
Data data = new Data();
data.setData(itemJpaRepository.findAll());
data.setCount(itemJpaRepository.count());
return new ResponseEntity<>(data, HttpStatus.OK);
}
}
|
[
"umeshsubhash.kilkile@lowes.com"
] |
umeshsubhash.kilkile@lowes.com
|
0c0364edeaaa40014cdf08f2780ea1b0e7e367b3
|
1e9c9f2a9639db7cdb032aae69cb4d99aef1d3a5
|
/tutsPlus/introToCSProgrammingJava/introToCs/inheritanceandpoly/MoneyCardTester.java
|
e0546e302bc657d5aeaaecf7e21e9975e13df876
|
[
"MIT"
] |
permissive
|
sagarnikam123/learnNPractice
|
f0da3f8acf653e56c591353ab342765a6831698c
|
1b3b0cb2cff2f478006626a4c37a99102acbb628
|
refs/heads/master
| 2023-02-04T11:21:18.211654
| 2023-01-24T14:47:52
| 2023-01-24T14:47:52
| 61,184,927
| 2
| 1
|
MIT
| 2022-03-06T11:07:18
| 2016-06-15T06:57:19
|
Python
|
UTF-8
|
Java
| false
| false
| 943
|
java
|
package introToCs.inheritanceandpoly;
public class MoneyCardTester {
public static void main(String[] args) {
System.out.println("The GiftCard Class:");
GiftCard gc =new GiftCard(150);
gc.makePurchase(50);
System.out.println("Balance: "+ gc.getBalance());
System.out.println("Acceptablity: "+ gc.getAcceptability());
System.out.println();
System.out.println("The DebitCard Class:");
DebitCard dc = new DebitCard(500);
dc.makePurchase(100);
dc.deposit(25);
System.out.println("Balance: "+dc.getBalance());
System.out.println("Acceptablity: "+ dc.getAcceptability());
System.out.println();
System.out.println("The CreditCard Class:");
CreditCard cc = new CreditCard(1500);
cc.makePurchase(300);
cc.makePayment(75);
System.out.println("Balance: "+cc.getBalance());
System.out.println("Available Credit: "+ cc.getAvailableCredit());
System.out.println("Acceptablity: "+ cc.getAcceptability());
}
}
|
[
"sagarnikam123@gmail.com"
] |
sagarnikam123@gmail.com
|
440ee85a7f60447acd7244fe66fa721d60dd4cdb
|
e66dfd2f3250e0e271dcdac4883227873e914429
|
/zml-jce/src/main/java/com/jce/framework/web/system/controller/core/MutiLangController.java
|
5d683db9e5363cd47dd7d214dcd455ff04f26dac
|
[] |
no_license
|
tianshency/zhuminle
|
d13b45a8a528f0da2142aab0fd999775fe476e0c
|
c864d0ab074dadf447504f54a82b2fc5b149b97e
|
refs/heads/master
| 2020-03-18T00:54:16.153820
| 2018-05-20T05:20:08
| 2018-05-20T05:20:08
| 134,118,245
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,417
|
java
|
package com.jce.framework.web.system.controller.core;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import com.jce.framework.core.common.controller.BaseController;
import com.jce.framework.core.common.hibernate.qbc.CriteriaQuery;
import com.jce.framework.core.common.model.json.AjaxJson;
import com.jce.framework.core.common.model.json.DataGrid;
import com.jce.framework.core.constant.Globals;
import com.jce.framework.core.util.MutiLangUtil;
import com.jce.framework.core.util.MyBeanUtils;
import com.jce.framework.core.util.StringUtil;
import com.jce.framework.tag.easyui.TagUtil;
import com.jce.framework.web.system.pojo.base.MutiLangEntity;
import com.jce.framework.web.system.service.MutiLangServiceI;
import com.jce.framework.web.system.service.SystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
/**
* @Title: Controller
* @Description: 多语言
* @author Rocky
* @date 2014-06-28 00:09:31
* @version V1.0
*
*/
//@Scope("prototype")
@Controller
@RequestMapping("/mutiLangController")
public class MutiLangController extends BaseController {
/**
* Logger for this class
*/
private static final Logger logger = Logger.getLogger(MutiLangController.class);
@Autowired
private MutiLangServiceI mutiLangService;
@Autowired
private SystemService systemService;
/**
* 多语言列表 页面跳转
*
* @return
*/
@RequestMapping(params = "mutiLang")
public ModelAndView mutiLang(HttpServletRequest request) {
return new ModelAndView("system/mutilang/mutiLangList");
}
/**
* easyui AJAX请求数据
*
* @param request
* @param response
* @param dataGrid
*/
@RequestMapping(params = "datagrid")
public void datagrid(MutiLangEntity mutiLang, HttpServletRequest request,
HttpServletResponse response, DataGrid dataGrid) {
CriteriaQuery cq = new CriteriaQuery(MutiLangEntity.class, dataGrid);
// 查询条件组装器
com.jce.framework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, mutiLang, request.getParameterMap());
this.mutiLangService.getDataGridReturn(cq, true);
TagUtil.datagrid(response, dataGrid);
}
/**
* 删除多语言
*
* @return
*/
@RequestMapping(params = "del")
@ResponseBody
public AjaxJson del(MutiLangEntity mutiLang, HttpServletRequest request) {
String message = null;
AjaxJson j = new AjaxJson();
mutiLang = systemService.getEntity(MutiLangEntity.class, mutiLang.getId());
message = MutiLangUtil.paramDelSuccess("common.language");
mutiLangService.delete(mutiLang);
mutiLangService.initAllMutiLang();
systemService.addLog("", "", message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
j.setMsg(message);
return j;
}
/**
* 添加多语言
*
* @param mutiLang
* @return
*/
@RequestMapping(params = "save")
@ResponseBody
public AjaxJson save(MutiLangEntity mutiLang, HttpServletRequest request) {
String message = null;
AjaxJson j = new AjaxJson();
if (StringUtil.isNotEmpty(mutiLang.getId())) {
message = MutiLangUtil.paramUpdSuccess("common.language");
MutiLangEntity t = mutiLangService.get(MutiLangEntity.class, mutiLang.getId());
try {
MyBeanUtils.copyBeanNotNull2Bean(mutiLang, t);
mutiLangService.saveOrUpdate(t);
mutiLangService.initAllMutiLang();
systemService.addLog("", "", message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
} catch (Exception e) {
e.printStackTrace();
message = MutiLangUtil.paramUpdFail("common.language");
}
} else {
if(MutiLangUtil.existLangKey( mutiLang.getLangKey(),mutiLang.getLangCode()))
{
message = mutiLangService.getLang("common.langkey.exist");
}
if(StringUtil.isEmpty(message))
{
mutiLangService.save(mutiLang);
message = MutiLangUtil.paramAddSuccess("common.language");
systemService.addLog("", "", message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
}
}
mutiLangService.putMutiLang(mutiLang);
j.setMsg(message);
return j;
}
/**
* 多语言列表页面跳转
*
* @return
*/
@RequestMapping(params = "addorupdate")
public ModelAndView addorupdate(MutiLangEntity mutiLang,
HttpServletRequest req) {
if (StringUtil.isNotEmpty(mutiLang.getId())) {
mutiLang = mutiLangService.getEntity(MutiLangEntity.class, mutiLang.getId());
req.setAttribute("mutiLangPage", mutiLang);
mutiLangService.putMutiLang(mutiLang);
}
return new ModelAndView("system/mutilang/mutiLang");
}
/**
* 刷新前端缓存
* @param request
*/
@RequestMapping(params = "refreshCach")
@ResponseBody
public AjaxJson refreshCach(HttpServletRequest request) {
String message = null;
AjaxJson j = new AjaxJson();
try {
mutiLangService.refleshMutiLangCach();
message = mutiLangService.getLang("common.refresh.success");
} catch (Exception e) {
message = mutiLangService.getLang("common.refresh.fail");
}
j.setMsg(message);
return j;
}
}
|
[
"tianshencaoyin@163.com"
] |
tianshencaoyin@163.com
|
f8a064be5a01ea0b864a0856a8b857b5bac5bdff
|
e871b9112a3dd9e6557e03be045c2e0d500e428b
|
/quarks/src/main/java/com/ctrip/ferriswheel/quarks/syntax/lr/DefaultLRParser.java
|
0afb21341060d2f909d77917e190a640e5fc1c2d
|
[
"MIT"
] |
permissive
|
littleorca/ferris-wheel
|
6ca377e31276f46cf947a98470301d0751b76109
|
aede3ba7e40518856b47e9df59ea221c00c6d871
|
refs/heads/master
| 2022-10-12T08:50:13.393513
| 2020-07-31T07:54:43
| 2020-07-31T07:54:43
| 159,432,398
| 17
| 3
|
MIT
| 2022-10-04T23:48:12
| 2018-11-28T02:38:11
|
Java
|
UTF-8
|
Java
| false
| false
| 2,609
|
java
|
package com.ctrip.ferriswheel.quarks.syntax.lr;
import com.ctrip.ferriswheel.quarks.Symbol;
import com.ctrip.ferriswheel.quarks.SyntaxContext;
import com.ctrip.ferriswheel.quarks.Token;
import com.ctrip.ferriswheel.quarks.Tokenizer;
import com.ctrip.ferriswheel.quarks.exception.QuarksLexicalException;
import com.ctrip.ferriswheel.quarks.exception.QuarksSyntaxException;
import com.ctrip.ferriswheel.quarks.syntax.ASTNode;
import com.ctrip.ferriswheel.quarks.syntax.DefaultSyntaxContext;
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.List;
public class DefaultLRParser extends DefaultLRProcessor implements LRParser {
public DefaultLRParser() {
this(null, null, DefaultSyntaxContext.getDefaultInstance());
}
public DefaultLRParser(ParsingTable table, Tokenizer tokenizer) {
super(table, tokenizer);
}
public DefaultLRParser(ParsingTable table, Tokenizer tokenizer,
SyntaxContext syntaxContext) {
super(table, tokenizer, syntaxContext);
}
@Override
public void setParsingTable(ParsingTable table) {
super.setParsingTable(table);
}
@Override
public void setSyntaxContext(SyntaxContext syntaxContext) {
super.setSyntaxContext(syntaxContext);
}
@Override
public void setTokenizer(Tokenizer tokenizer) {
super.setTokenizer(tokenizer);
}
@Override
public <V> ASTNode<V> next() throws QuarksSyntaxException, QuarksLexicalException {
Listener<V> listener = new Listener<V>();
if (!process(listener)) {
return null;
}
return listener.getAST();
}
class Listener<V> implements LREventListener {
Deque<ASTNode<V>> nodes = new ArrayDeque<>();
@Override
public void onBegin() {
}
@Override
public void onShift(Symbol handle, Token token) {
nodes.push(new ASTNode<V>(handle, token));
}
@Override
public void onReduce(Symbol handle, List<Symbol> sequence) throws QuarksSyntaxException {
ASTNode<V> node = new ASTNode<>(handle);
for (int i = 0; i < sequence.size(); i++) {
node.addChild(0, nodes.pop());
}
nodes.push(node);
}
@Override
public void onFinish() throws QuarksSyntaxException {
if (nodes.size() != 1) {
throw new QuarksSyntaxException("ERRRRRRORRRRRRR!!", getTokenizer());
}
}
ASTNode<V> getAST() {
return nodes.peek();
}
}
}
|
[
"liuhaifeng@live.com"
] |
liuhaifeng@live.com
|
d815483de734044e3b7e4a98cb65bcca2a8fcbf9
|
42e3cafb2bfe663b6d4024201e2a94161f7daa3d
|
/app/src/main/java/com/mdground/guest/api/server/clinic/GetAppointmentInfoListByDoctor.java
|
fa005c8f300c6ca45cc34e18632a2f1706673baa
|
[] |
no_license
|
Bread-Yang/BaoGuest
|
b14865bf483f118a14a830243219bd3d3196a4d7
|
7e745aa44432ca5ad1cb34e71686c903faee1045
|
refs/heads/master
| 2021-01-21T14:08:11.304066
| 2016-06-29T09:25:15
| 2016-06-29T09:25:15
| 56,758,257
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,184
|
java
|
package com.mdground.guest.api.server.clinic;
import org.json.JSONException;
import org.json.JSONObject;
import android.content.Context;
import com.mdground.guest.api.base.ClinicRequest;
import com.mdground.guest.api.base.RequestCallBack;
import com.mdground.guest.api.base.RequestData;
public class GetAppointmentInfoListByDoctor extends ClinicRequest {
private static final String FUNCTION_NAME = "GetAppointmentInfoListByDoctor";
public GetAppointmentInfoListByDoctor(Context context) {
super(context);
}
@Override
protected String getFunctionName() {
return FUNCTION_NAME;
}
public void getAppointmentInfoListByDoctor(int status, int doctorId, RequestCallBack listener) {
if (listener == null) {
throw new RuntimeException("please input listener");
}
setRequestCallBack(listener);
JSONObject obj = new JSONObject();
try {
obj.put("Status", String.valueOf(status));
obj.put("DoctorID", String.valueOf(doctorId));
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
RequestData data = getData();
data.setQueryData(obj.toString());
pocess();
}
}
|
[
"449088680@qq.com"
] |
449088680@qq.com
|
51ff9b7b1d26434a7e8860441c5d3241d7f04364
|
79595075622ded0bf43023f716389f61d8e96e94
|
/app/src/main/java/android/hardware/radio/V1_0/LceStatusInfo.java
|
2d8a018a8ea4e93e1bd06ebb2344ff5e293cfce5
|
[] |
no_license
|
dstmath/OppoR15
|
96f1f7bb4d9cfad47609316debc55095edcd6b56
|
b9a4da845af251213d7b4c1b35db3e2415290c96
|
refs/heads/master
| 2020-03-24T16:52:14.198588
| 2019-05-27T02:24:53
| 2019-05-27T02:24:53
| 142,840,716
| 7
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,480
|
java
|
package android.hardware.radio.V1_0;
import android.os.HidlSupport;
import android.os.HwBlob;
import android.os.HwParcel;
import java.util.ArrayList;
import java.util.Objects;
public final class LceStatusInfo {
public byte actualIntervalMs;
public int lceStatus;
public final boolean equals(Object otherObject) {
if (this == otherObject) {
return true;
}
if (otherObject == null || otherObject.getClass() != LceStatusInfo.class) {
return false;
}
LceStatusInfo other = (LceStatusInfo) otherObject;
return this.lceStatus == other.lceStatus && this.actualIntervalMs == other.actualIntervalMs;
}
public final int hashCode() {
return Objects.hash(new Object[]{Integer.valueOf(HidlSupport.deepHashCode(Integer.valueOf(this.lceStatus))), Integer.valueOf(HidlSupport.deepHashCode(Byte.valueOf(this.actualIntervalMs)))});
}
public final String toString() {
StringBuilder builder = new StringBuilder();
builder.append("{");
builder.append(".lceStatus = ");
builder.append(LceStatus.toString(this.lceStatus));
builder.append(", .actualIntervalMs = ");
builder.append(this.actualIntervalMs);
builder.append("}");
return builder.toString();
}
public final void readFromParcel(HwParcel parcel) {
readEmbeddedFromParcel(parcel, parcel.readBuffer(8), 0);
}
public static final ArrayList<LceStatusInfo> readVectorFromParcel(HwParcel parcel) {
ArrayList<LceStatusInfo> _hidl_vec = new ArrayList();
HwBlob _hidl_blob = parcel.readBuffer(16);
int _hidl_vec_size = _hidl_blob.getInt32(8);
HwBlob childBlob = parcel.readEmbeddedBuffer((long) (_hidl_vec_size * 8), _hidl_blob.handle(), 0, true);
_hidl_vec.clear();
for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) {
LceStatusInfo _hidl_vec_element = new LceStatusInfo();
_hidl_vec_element.readEmbeddedFromParcel(parcel, childBlob, (long) (_hidl_index_0 * 8));
_hidl_vec.add(_hidl_vec_element);
}
return _hidl_vec;
}
public final void readEmbeddedFromParcel(HwParcel parcel, HwBlob _hidl_blob, long _hidl_offset) {
this.lceStatus = _hidl_blob.getInt32(0 + _hidl_offset);
this.actualIntervalMs = _hidl_blob.getInt8(4 + _hidl_offset);
}
public final void writeToParcel(HwParcel parcel) {
HwBlob _hidl_blob = new HwBlob(8);
writeEmbeddedToBlob(_hidl_blob, 0);
parcel.writeBuffer(_hidl_blob);
}
public static final void writeVectorToParcel(HwParcel parcel, ArrayList<LceStatusInfo> _hidl_vec) {
HwBlob _hidl_blob = new HwBlob(16);
int _hidl_vec_size = _hidl_vec.size();
_hidl_blob.putInt32(8, _hidl_vec_size);
_hidl_blob.putBool(12, false);
HwBlob childBlob = new HwBlob(_hidl_vec_size * 8);
for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) {
((LceStatusInfo) _hidl_vec.get(_hidl_index_0)).writeEmbeddedToBlob(childBlob, (long) (_hidl_index_0 * 8));
}
_hidl_blob.putBlob(0, childBlob);
parcel.writeBuffer(_hidl_blob);
}
public final void writeEmbeddedToBlob(HwBlob _hidl_blob, long _hidl_offset) {
_hidl_blob.putInt32(0 + _hidl_offset, this.lceStatus);
_hidl_blob.putInt8(4 + _hidl_offset, this.actualIntervalMs);
}
}
|
[
"toor@debian.toor"
] |
toor@debian.toor
|
6ea49f2613bc84c53ed689e392821c717b64718f
|
3170e5dc66f5ae562db9c075f931ce00fc5564e9
|
/tc-dao/src/main/java/com/yz/tc/dao/TcRetryingMapper.java
|
7ad94bde10a5182588f4f1023798733cc1fb45a2
|
[
"Apache-2.0"
] |
permissive
|
leopard5/yz-tc
|
b7f8440f66c50f7acad194dad68a830bff24232c
|
a5ad1561eb7ffe73f0fbb018b7ecc9f3d46dbc3c
|
refs/heads/master
| 2022-11-20T09:26:43.536364
| 2020-01-19T08:45:00
| 2020-01-19T08:45:00
| 147,606,734
| 1
| 1
|
Apache-2.0
| 2022-11-04T00:34:12
| 2018-09-06T02:32:32
|
Java
|
UTF-8
|
Java
| false
| false
| 172
|
java
|
package com.yz.tc.dao;
import com.yz.tc.model.TcRetrying;
import tk.mybatis.mapper.common.BaseMapper;
public interface TcRetryingMapper extends BaseMapper<TcRetrying> {
}
|
[
"qiyazhong@163.com"
] |
qiyazhong@163.com
|
bdb4a11d39130fd3686fcf2f561b5c643dcf0354
|
436bb2684d3db367b4e94be19f0bc56d83404e6c
|
/src/main/java/com/brainmatics/data/repos/CategoryRepo.java
|
9ad3f60e218dccef72c3fccf22b55c604c0eca8c
|
[] |
no_license
|
hendrosteven/brainmatic-spring-mvc
|
3021d1ce6693abdd00bc54073c8be3a69d6f60a5
|
c76e0d56474a56ba9bba5848beba350394b44281
|
refs/heads/master
| 2023-06-26T14:38:35.089698
| 2021-07-28T04:15:05
| 2021-07-28T04:15:05
| 389,844,877
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 221
|
java
|
package com.brainmatics.data.repos;
import com.brainmatics.data.entity.Category;
import org.springframework.data.repository.CrudRepository;
public interface CategoryRepo extends CrudRepository<Category, Long> {
}
|
[
"hendro.steven@gmail.com"
] |
hendro.steven@gmail.com
|
3d90553965c61ad068d1ce762d6105f1f1298a9c
|
dc599e9ff38515bc4505450fa6b2a07f2bc83a3c
|
/algorithms/java/src/BinaryTree/ExpressionAddOperators.java
|
23e716eeaf827a8a55a0f7b9e6d735fa0849d48e
|
[] |
no_license
|
Jack47/leetcode
|
dd53da8b884074f23bc04eb14429fe7a6bdf3aca
|
aed4f6a90b6a69ffcd737b919eb5ba0113a47d40
|
refs/heads/master
| 2021-01-10T16:27:41.855762
| 2018-07-20T08:53:36
| 2018-07-20T08:53:36
| 44,210,364
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,247
|
java
|
package BinaryTree;
import java.util.ArrayList;
import java.util.List;
public class ExpressionAddOperators {
List<String> results;
int target;
String num;
void dfs(int pos, String curResult, long curValue, long pre, long mul) {
if (curValue == target && pos == num.length()) {
results.add(curResult);
}
for (int i = pos; i <= num.length() - 1; i++) {
if(num.charAt(pos) == '0' && i > pos) break; // avoid leading zero
String l = num.substring(pos, i + 1);
long left = Long.parseLong(l);
if(pos == 0) { // it's the beginning, so can not add operator
dfs(i+1, curResult+l, curValue+left, left, left);
continue;
}
dfs(i + 1, curResult + '+' + l, curValue + left, left, left); // +
dfs(i + 1, curResult + '-' + l, curValue - left, -left, -left); // -
dfs(i + 1, curResult + '*' + l, curValue - pre + mul * left, mul*left, mul * left);
}
}
public List<String> addOperators(String num, int target) {
results = new ArrayList<>();
this.target = target;
this.num = num;
dfs(0, "", 0, 0, 0);
return results;
}
}
|
[
"scsvip@gmail.com"
] |
scsvip@gmail.com
|
07a6de98b4fc3fcab11c816e975e2fbf42f0a1c8
|
17abe434c2bc8995fbc73f7f81217e49a0283c2e
|
/src/main/java/com/google/gwt/i18n/client/impl/plurals/DefaultRule_ms.java
|
65dd19581011c042be6ceadae91c2deb76f4d93a
|
[
"Apache-2.0"
] |
permissive
|
aliz-ai/gwt-mock-2.5.1
|
6d7d41c9f29d3110eef5c74b23a3d63b3af5e71b
|
af5495454005f2bba630b8d869fde75930d4ec2e
|
refs/heads/master
| 2022-12-31T06:00:31.983924
| 2020-07-13T12:06:47
| 2020-07-13T12:06:47
| 55,702,877
| 1
| 1
|
NOASSERTION
| 2020-10-13T09:09:21
| 2016-04-07T14:48:45
|
Java
|
UTF-8
|
Java
| false
| false
| 764
|
java
|
/*
* Copyright 2008 Google 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.google.gwt.i18n.client.impl.plurals;
/**
* There are no plurals in Malay, so just use the default.
*/
public class DefaultRule_ms extends DefaultRule {
}
|
[
"gabor.farkas@doctusoft.com"
] |
gabor.farkas@doctusoft.com
|
75b090caea7955c49db66b729a3425038bf37d33
|
1949400e8eca6099d8f9378e6813312a1d936fe0
|
/core/src/main/java/org/hudsonci/update/maven/SimplePOMBuilder.java
|
c7b5fa8282db7e19edf49d77486bda9357d3cc70
|
[] |
no_license
|
hudson/hudson-updatecenter-generator
|
c0c60cb50d23728230aaffc12d3860367ed4c6e8
|
4ffbda875a3b773c0f2b522e82a007259a3448e4
|
refs/heads/master
| 2021-01-25T04:57:56.660736
| 2011-12-06T02:32:33
| 2011-12-06T02:32:33
| 2,158,691
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,187
|
java
|
package org.hudsonci.update.maven;
import java.io.File;
import java.io.IOException;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Singleton;
import org.apache.maven.model.Model;
import org.apache.maven.model.building.DefaultModelBuilderFactory;
import org.apache.maven.model.building.DefaultModelBuildingRequest;
import org.apache.maven.model.building.FileModelSource;
import org.apache.maven.model.building.ModelBuilder;
import org.apache.maven.model.building.ModelBuildingException;
import org.apache.maven.model.building.ModelBuildingRequest;
import org.apache.maven.model.building.ModelBuildingResult;
import org.apache.maven.model.io.DefaultModelReader;
import org.apache.maven.model.io.ModelParseException;
import org.apache.maven.model.io.ModelReader;
import org.apache.maven.model.resolution.ModelResolver;
import org.slf4j.Logger;
@Singleton
@Named( "simple" )
public class SimplePOMBuilder
implements POMBuilder
{
@Inject
private Logger logger;
private ModelReader modelReader = new DefaultModelReader();
public Model build( File file )
throws Exception
{
return modelReader.read( file, null );
}
}
|
[
"winston.prakash@gmail.com"
] |
winston.prakash@gmail.com
|
2f0a85dbdfea32c7ede4cd7cb5208707ef852bc5
|
77d7bf4cd3b21c96b13893fa077e51b7557776f6
|
/apppro/src/main/java/com/duy/text_converter/pro/notification/EncodeReceiver.java
|
2dc5c3bdac22f3a14b99c7f748fa9414b67952eb
|
[
"Apache-2.0"
] |
permissive
|
XiangliJiaxing/text_converter
|
502698f4d47d8f297744f15d8886692578069688
|
4e85b2e79dbed48e02718b751ef7689f0b5f281a
|
refs/heads/master
| 2021-06-21T13:50:58.001532
| 2017-08-23T14:35:03
| 2017-08-23T14:35:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,524
|
java
|
/*
* Copyright (c) 2017 by Tran Le Duy
*
* 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.duy.text_converter.pro.notification;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
//import android.util.Log;
import android.widget.Toast;
import com.duy.sharedcode.ClipboardUtil;
import com.duy.text_converter.pro.util.CodecUtil;
import com.google.firebase.analytics.FirebaseAnalytics;
/**
* Created by Duy on 26-Jul-17.
*/
public class EncodeReceiver extends BroadcastReceiver {
private static final String TAG = "StyleReceiver";
@Override
public void onReceive(Context context, Intent intent) {
FirebaseAnalytics.getInstance(context).logEvent("encode_notification", new Bundle());
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
if (preferences.getBoolean("pirate", false)) {
Toast.makeText(context, "Pirate version", Toast.LENGTH_SHORT).show();
return;
}
if (intent != null) {
String name = "";
if (intent.getAction().equals(StyleNotification.ACTION_ENCODE_STYLE_1)) {
name = preferences.getString("pref_encode_style_1", "");
} else if (intent.getAction().equals(StyleNotification.ACTION_ENCODE_STYLE_2)) {
name = preferences.getString("pref_encode_style_2", "");
} else if (intent.getAction().equals(StyleNotification.ACTION_ENCODE_STYLE_3)) {
name = preferences.getString("pref_encode_style_3", "");
} else if (intent.getAction().equals(StyleNotification.ACTION_ENCODE_STYLE_4)) {
name = preferences.getString("pref_encode_style_4", "");
} else if (intent.getAction().equals(StyleNotification.ACTION_ENCODE_STYLE_5)) {
name = preferences.getString("pref_encode_style_5", "");
}
if (name.isEmpty()) {
complainNotSet(context);
closeStatusBar(context);
return;
}
String inp = ClipboardUtil.getClipboard(context);
if (inp == null) {
Toast.makeText(context, "Clipboard is empty", Toast.LENGTH_SHORT).show();
return;
} else {
String encode = CodecUtil.encode(name, context, inp);
setText(context, encode);
}
}
closeStatusBar(context);
}
private void closeStatusBar(Context context) {
Intent it = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
context.sendBroadcast(it);
}
private void setText(Context context, String encode) {
ClipboardUtil.setClipboard(context, encode);
}
private void complainNotSet(Context context) {
Toast.makeText(context, "Unset", Toast.LENGTH_SHORT).show();
}
}
|
[
"tranleduy1233@gmail.com"
] |
tranleduy1233@gmail.com
|
5373e674a56a8a49ee2c09ad94699f340451d2dc
|
139960e2d7d55e71c15e6a63acb6609e142a2ace
|
/mobile_app1/module445/src/main/java/module445packageJava0/Foo92.java
|
7ea62f6cb00cc2a94411631af0abdf521073ed77
|
[
"Apache-2.0"
] |
permissive
|
uber-common/android-build-eval
|
448bfe141b6911ad8a99268378c75217d431766f
|
7723bfd0b9b1056892cef1fef02314b435b086f2
|
refs/heads/master
| 2023-02-18T22:25:15.121902
| 2023-02-06T19:35:34
| 2023-02-06T19:35:34
| 294,831,672
| 83
| 7
|
Apache-2.0
| 2021-09-24T08:55:30
| 2020-09-11T23:27:37
|
Java
|
UTF-8
|
Java
| false
| false
| 389
|
java
|
package module445packageJava0;
import java.lang.Integer;
public class Foo92 {
Integer int0;
Integer int1;
public void foo0() {
new module445packageJava0.Foo91().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
|
[
"oliviern@uber.com"
] |
oliviern@uber.com
|
1a16608d7371c4eb3441ef865804f4994bc890c3
|
a422de59c29d077c512d66b538ff17d179cc077a
|
/hsxt/hsxt-gpf/hsxt-gpf-gcs/hsxt-gpf-gcs-service/src/main/java/com/gy/hsxt/gpf/gcs/mapper/CityMapper.java
|
3d3460637a0c48c3bc9b910f12e512ffd88eb8c5
|
[] |
no_license
|
liveqmock/hsxt
|
c554e4ebfd891e4cc3d57e920d8a79ecc020b4dd
|
40bb7a1fe5c22cb5b4f1d700e5d16371a3a74c04
|
refs/heads/master
| 2020-03-28T14:09:31.939168
| 2018-09-12T10:20:46
| 2018-09-12T10:20:46
| 148,461,898
| 0
| 0
| null | 2018-09-12T10:19:11
| 2018-09-12T10:19:10
| null |
UTF-8
|
Java
| false
| false
| 2,568
|
java
|
package com.gy.hsxt.gpf.gcs.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.gy.hsxt.gpf.gcs.bean.City;
/***************************************************************************
* <PRE>
* Project Name : hsxt-gpf-gcs-service
*
* Package Name : com.gy.hsxt.gpf.gcs.mapperl
*
* File Name : CityMapper.java
*
* Creation Date : 2015-7-10
*
* Author : liuhq
*
* Purpose : 城市代码Mapper接口
*
*
* History : TODO
*
* </PRE>
***************************************************************************/
@Repository("cityMapper")
public interface CityMapper {
/**
* 插入记录
*
* @param City
* 实体类 必须,非null
* @return 返int类型 1成功,其他失败
*/
public int insert(City city);
/**
* 读取某条记录
*
* @param cityNo
* 城市代码 必须,非null
* @return 返回实体类City
*/
public City getCity(String cityNo);
/**
* 读取某个省份的所以城市记录
*
* @param provinceNo
* 省份代码 必须,非null
*
* @return 返回List<City>,数据为空,返回空List<City>
*/
public List<City> queryCityByParent(String provinceNo);
/**
* 获取数据分页列表
*
* @param City实体类
* 必须,非null
* @return 返回List<City>,数据为空,返回空List<City>
*/
public List<City> getCityListPage(City city);
/**
* 更新某一条记录
*
* @param City实体类
* 必须,非null
* @return 返回int类型 1成功,其他失败
*/
public int update(City city);
/**
* 删除某条记录
*
* @param City
* 实体类 必须,非null
* @return 返回int类型 1成功,其他失败
*/
public int delete(City city);
/**
* 判断是否已存在相同
*
* @param cityNo
* 城市代码 必须,非null
* @param countryNo
* 国家代码 必须,非null
* @param provinceNo
* 省份代码 必须,非null
* @return 返回String 大于等于1存在,0不存在
*/
public String existCity(@Param("cityNo") String cityNo,
@Param("countryNo") String countryNo,
@Param("provinceNo") String provinceNo);
/**
* 读取大于某个版本号的数据
*
* @param version
* 版本号 必须,非null
* @return 返回List<City>,数据为空,返回空List<City>
*/
public List<City> queryCitySyncData(Long version);
}
|
[
"864201042@qq.com"
] |
864201042@qq.com
|
2bfd3d8ea2180f5b0ec2c1dc4e1be8ceec5e5c3f
|
5eae683a6df0c4b97ab1ebcd4724a4bf062c1889
|
/bin/ext-accelerator/acceleratorservices/gensrc/de/hybris/platform/acceleratorservices/jalo/process/GeneratedSavedCartFileUploadProcess.java
|
c27cfbc9ea0a71d0894c95cb403e3a1b8a4883fa
|
[] |
no_license
|
sujanrimal/GiftCardProject
|
1c5e8fe494e5c59cca58bbc76a755b1b0c0333bb
|
e0398eec9f4ec436d20764898a0255f32aac3d0c
|
refs/heads/master
| 2020-12-11T18:05:17.413472
| 2020-01-17T18:23:44
| 2020-01-17T18:23:44
| 233,911,127
| 0
| 0
| null | 2020-06-18T15:26:11
| 2020-01-14T18:44:18
| null |
UTF-8
|
Java
| false
| false
| 4,599
|
java
|
/*
* ----------------------------------------------------------------
* --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! ---
* --- Generated at Jan 17, 2020 10:18:03 AM ---
* ----------------------------------------------------------------
*
* [y] hybris Platform
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.acceleratorservices.jalo.process;
import de.hybris.platform.acceleratorservices.constants.AcceleratorServicesConstants;
import de.hybris.platform.commerceservices.jalo.process.StoreFrontCustomerProcess;
import de.hybris.platform.jalo.Item.AttributeMode;
import de.hybris.platform.jalo.SessionContext;
import de.hybris.platform.jalo.media.Media;
import de.hybris.platform.jalo.order.Cart;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* Generated class for type {@link de.hybris.platform.acceleratorservices.jalo.process.SavedCartFileUploadProcess SavedCartFileUploadProcess}.
*/
@SuppressWarnings({"deprecation","unused","cast","PMD"})
public abstract class GeneratedSavedCartFileUploadProcess extends StoreFrontCustomerProcess
{
/** Qualifier of the <code>SavedCartFileUploadProcess.uploadedFile</code> attribute **/
public static final String UPLOADEDFILE = "uploadedFile";
/** Qualifier of the <code>SavedCartFileUploadProcess.savedCart</code> attribute **/
public static final String SAVEDCART = "savedCart";
protected static final Map<String, AttributeMode> DEFAULT_INITIAL_ATTRIBUTES;
static
{
final Map<String, AttributeMode> tmp = new HashMap<String, AttributeMode>(StoreFrontCustomerProcess.DEFAULT_INITIAL_ATTRIBUTES);
tmp.put(UPLOADEDFILE, AttributeMode.INITIAL);
tmp.put(SAVEDCART, AttributeMode.INITIAL);
DEFAULT_INITIAL_ATTRIBUTES = Collections.unmodifiableMap(tmp);
}
@Override
protected Map<String, AttributeMode> getDefaultAttributeModes()
{
return DEFAULT_INITIAL_ATTRIBUTES;
}
/**
* <i>Generated method</i> - Getter of the <code>SavedCartFileUploadProcess.savedCart</code> attribute.
* @return the savedCart - The saved cart which business process creates.
*/
public Cart getSavedCart(final SessionContext ctx)
{
return (Cart)getProperty( ctx, SAVEDCART);
}
/**
* <i>Generated method</i> - Getter of the <code>SavedCartFileUploadProcess.savedCart</code> attribute.
* @return the savedCart - The saved cart which business process creates.
*/
public Cart getSavedCart()
{
return getSavedCart( getSession().getSessionContext() );
}
/**
* <i>Generated method</i> - Setter of the <code>SavedCartFileUploadProcess.savedCart</code> attribute.
* @param value the savedCart - The saved cart which business process creates.
*/
public void setSavedCart(final SessionContext ctx, final Cart value)
{
setProperty(ctx, SAVEDCART,value);
}
/**
* <i>Generated method</i> - Setter of the <code>SavedCartFileUploadProcess.savedCart</code> attribute.
* @param value the savedCart - The saved cart which business process creates.
*/
public void setSavedCart(final Cart value)
{
setSavedCart( getSession().getSessionContext(), value );
}
/**
* <i>Generated method</i> - Getter of the <code>SavedCartFileUploadProcess.uploadedFile</code> attribute.
* @return the uploadedFile - The CSV file for upload
*/
public Media getUploadedFile(final SessionContext ctx)
{
return (Media)getProperty( ctx, UPLOADEDFILE);
}
/**
* <i>Generated method</i> - Getter of the <code>SavedCartFileUploadProcess.uploadedFile</code> attribute.
* @return the uploadedFile - The CSV file for upload
*/
public Media getUploadedFile()
{
return getUploadedFile( getSession().getSessionContext() );
}
/**
* <i>Generated method</i> - Setter of the <code>SavedCartFileUploadProcess.uploadedFile</code> attribute.
* @param value the uploadedFile - The CSV file for upload
*/
public void setUploadedFile(final SessionContext ctx, final Media value)
{
setProperty(ctx, UPLOADEDFILE,value);
}
/**
* <i>Generated method</i> - Setter of the <code>SavedCartFileUploadProcess.uploadedFile</code> attribute.
* @param value the uploadedFile - The CSV file for upload
*/
public void setUploadedFile(final Media value)
{
setUploadedFile( getSession().getSessionContext(), value );
}
}
|
[
"travis.d.crawford@accenture.com"
] |
travis.d.crawford@accenture.com
|
cf2f0f61aee74cf97be4e67a166e9c6bf4fcdbed
|
f7e34255f8382d9b7bf92e896a16bbe371cc234a
|
/src/main/java/io/hermes/util/concurrent/highscalelib/AbstractEntry.java
|
8f39b53d699af4b6113a8a4608c59a9461df32fb
|
[
"Apache-2.0"
] |
permissive
|
iQiuyu-0821/zeus
|
4e04351f100c57fc17a19e56ff1fe19579b78465
|
3bb34cb69821027e349e8486376ccef5b0ef23fd
|
refs/heads/main
| 2023-08-30T00:46:19.773209
| 2021-11-02T01:14:03
| 2021-11-02T01:14:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,523
|
java
|
/*******************************************************************************
* Copyright 2021 spancer
*
* 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.
******************************************************************************/
/*
* Written by Cliff Click and released to the public domain, as explained at
* http://creativecommons.org/licenses/publicdomain
*/
package io.hermes.util.concurrent.highscalelib;
import java.util.Map;
/**
* A simple implementation of {@link java.util.Map.Entry}. Does not implement {@link
* java.util.Map.Entry}, that is done by users of the class.
*
* @param <TypeK> the type of keys maintained by this map
* @param <TypeV> the type of mapped values
* @author Cliff Click
* @since 1.5
*/
abstract class AbstractEntry<TypeK, TypeV> implements Map.Entry<TypeK, TypeV> {
/**
* Strongly typed key
*/
protected final TypeK _key;
/**
* Strongly typed value
*/
protected TypeV _val;
public AbstractEntry(final TypeK key, final TypeV val) {
_key = key;
_val = val;
}
public AbstractEntry(final Map.Entry<TypeK, TypeV> e) {
_key = e.getKey();
_val = e.getValue();
}
private static boolean eq(final Object o1, final Object o2) {
return (o1 == null ? o2 == null : o1.equals(o2));
}
/**
* Return "key=val" string
*/
public String toString() {
return _key + "=" + _val;
}
/**
* Return key
*/
public TypeK getKey() {
return _key;
}
/**
* Return val
*/
public TypeV getValue() {
return _val;
}
/**
* Equal if the underlying key & value are equal
*/
public boolean equals(final Object o) {
if (!(o instanceof Map.Entry)) {
return false;
}
final Map.Entry e = (Map.Entry) o;
return eq(_key, e.getKey()) && eq(_val, e.getValue());
}
/**
* Compute <code>"key.hashCode() ^ val.hashCode()"</code>
*/
public int hashCode() {
return ((_key == null) ? 0 : _key.hashCode()) ^ ((_val == null) ? 0 : _val.hashCode());
}
}
|
[
"373416233@qq.com"
] |
373416233@qq.com
|
8aa41b1b6ee50f74f9cb7519229a9679da4d6588
|
7826588e64bb04dfb79c8262bad01235eb409b3d
|
/proxies/com/microsoft/bingads/v13/bulk/PositiveInteger.java
|
7eb0afac649336b3f18cab143efec3c771a0d067
|
[
"MIT"
] |
permissive
|
BingAds/BingAds-Java-SDK
|
dcd43e5a1beeab0b59c1679da1151d7dd1658d50
|
a3d904bbf93a0a93d9c117bfff40f6911ad71d2f
|
refs/heads/main
| 2023-08-28T13:48:34.535773
| 2023-08-18T06:41:51
| 2023-08-18T06:41:51
| 29,510,248
| 33
| 44
|
NOASSERTION
| 2023-08-23T01:29:18
| 2015-01-20T03:40:03
|
Java
|
UTF-8
|
Java
| false
| false
| 1,447
|
java
|
package com.microsoft.bingads.v13.bulk;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlSchemaType;
import jakarta.xml.bind.annotation.XmlType;
import jakarta.xml.bind.annotation.XmlValue;
/**
* <p>Java class for positiveInteger simple type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>{@code
* <simpleType name="positiveInteger">
* <restriction base="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger">
* <minInclusive value="1"/>
* </restriction>
* </simpleType>
* }</pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "positiveInteger", namespace = "http://www.w3.org/2001/XMLSchema", propOrder = {
"value"
})
public class PositiveInteger {
@XmlValue
@XmlSchemaType(name = "positiveInteger")
protected NonNegativeInteger value;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link NonNegativeInteger }
*
*/
public NonNegativeInteger getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link NonNegativeInteger }
*
*/
public void setValue(NonNegativeInteger value) {
this.value = value;
}
}
|
[
"qitia@microsoft.com"
] |
qitia@microsoft.com
|
c9264f323bb3558b56ed3d7ae91c90c32485ccb1
|
5813065dcfc6e4f01f12acde311689421732e749
|
/web/com/cx/web/models/extension/AccountAuthorizeModelExtension.java
|
9865665e600d74e5038b53d8910cacb545a4cf90
|
[] |
no_license
|
iibeeing/OnlineMark
|
d54656c7963288de8d1ff83db44ef8a3254e5e8c
|
f2bfcd072655d0099650d07bf56e912b3687758e
|
refs/heads/master
| 2021-01-17T13:18:59.745320
| 2016-07-07T02:55:35
| 2016-07-07T02:55:35
| 58,171,859
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 576
|
java
|
package com.cx.web.models.extension;
import com.cx.model.models.Account;
import com.cx.web.models.AccountAuthorizeModel;
public class AccountAuthorizeModelExtension {
public static AccountAuthorizeModel toAccountBindModel(Account account){
AccountAuthorizeModel ret=new AccountAuthorizeModel();
ret.setName(account.getName());
ret.setUsername(account.getUsername());
if(account.getRole()!=null)
ret.setRoleId(account.getRole().getId());
if(account.getOrganization()!=null)
ret.setOrganizationId(account.getOrganization().getId());
return ret;
}
}
|
[
"316553858@qq.com"
] |
316553858@qq.com
|
76eec2825c223987ea2cc25b3f42c985b528f90b
|
d80da216f667825040ce19ae54e0db7ab4ac24a5
|
/content/src/chapter-serialization/global-serializer/src/main/java/Member.java
|
197d1622e7b9489dc0931a4649fc56fa344a63aa
|
[] |
no_license
|
serafett/stuff
|
03ed80e79f6ab0f0869deb19d6177249f191c3fe
|
674650f0d7b7651a3f54dcdbc6290bff0036a3fc
|
refs/heads/master
| 2020-05-17T04:19:40.405184
| 2013-06-08T05:48:32
| 2013-06-08T05:48:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 482
|
java
|
import com.hazelcast.core.Hazelcast;
import com.hazelcast.core.HazelcastInstance;
import java.util.Map;
public class Member {
public static void main(String[] args) {
HazelcastInstance hz = Hazelcast.newHazelcastInstance();
Map<String, Person> map = hz.getMap("map");
map.put("foo", new Person("foo"));
System.out.println("finished writing");
System.out.println(map.get("foo"));
System.out.println("finished reading");
}
}
|
[
"alarmnummer@gmail.com"
] |
alarmnummer@gmail.com
|
24bfb9465a8f3256fc50fb5b499ba98fea91050a
|
3144eaac0e5d800282232af00d80337c6dfb0098
|
/zebone/empi/src/main/java/com/zebone/empi/check/ValidateResult.java
|
cc1a3b72a945b18ef8a84b01d60fab3a490d64a9
|
[] |
no_license
|
HeeroLL/store
|
a2bf17a9edc1594fb2d8c71bf30cc8298d322b91
|
02177879d1bad1d919cc14498122fe3f98bc3453
|
refs/heads/master
| 2022-12-11T12:23:11.029000
| 2022-12-02T09:13:59
| 2022-12-02T09:13:59
| 25,424,633
| 8
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,207
|
java
|
package com.zebone.empi.check;
public class ValidateResult {
private boolean isSuccess;
private String errorCode;
private String errorMessage;
public ValidateResult(boolean isSuccess) {
super();
this.isSuccess = isSuccess;
}
public ValidateResult(boolean isSuccess, String errorMessage) {
super();
this.isSuccess = isSuccess;
this.errorMessage = errorMessage;
}
public ValidateResult(boolean isSuccess, String errorCode, String errorMessage) {
super();
this.isSuccess = isSuccess;
this.errorCode = errorCode;
this.errorMessage = errorMessage;
}
public boolean isSuccess() {
return isSuccess;
}
public void setSuccess(boolean isSuccess) {
this.isSuccess = isSuccess;
}
public String getErrorCode() {
return errorCode;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
public String getErrorMessage() {
return errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
}
|
[
"114046323@qq.com"
] |
114046323@qq.com
|
41ae967d155a5d1e9214dced23e45e680de61b09
|
af0048b7c1fddba3059ae44cd2f21c22ce185b27
|
/sofa/src/main/java/com/alipay/remoting/rpc/protocol/SyncMutiInterestUserProcessor.java
|
2678df8f781aa8a1a3013a9a30f52f626a1b4d90
|
[] |
no_license
|
P79N6A/whatever
|
4b51658fc536887c870d21b0c198738ed0d1b980
|
6a5356148e5252bdeb940b45d5bbeb003af2f572
|
refs/heads/master
| 2020-07-02T19:58:14.366752
| 2019-08-10T14:45:17
| 2019-08-10T14:45:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 651
|
java
|
package com.alipay.remoting.rpc.protocol;
import com.alipay.remoting.AsyncContext;
import com.alipay.remoting.BizContext;
import java.util.List;
public abstract class SyncMutiInterestUserProcessor<T> extends AbstractMultiInterestUserProcessor<T> {
@Override
public abstract Object handleRequest(BizContext bizCtx, T request) throws Exception;
@Override
public void handleRequest(BizContext bizCtx, AsyncContext asyncCtx, T request) {
throw new UnsupportedOperationException("ASYNC handle request is unsupported in SyncMutiInterestUserProcessor!");
}
@Override
public abstract List<String> multiInterest();
}
|
[
"heavenlystate@163.com"
] |
heavenlystate@163.com
|
2e674661f807aa592b1ea5a428e1aa10abe6c958
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Lang/11/org/apache/commons/lang3/ObjectUtils_median_450.java
|
6a0c9612ed0009bad15ea934178404771eef867c
|
[] |
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
| 1,335
|
java
|
org apach common lang3
oper code object
handl code input gracefulli
except gener thrown code input
method document behaviour detail
thread safe threadsaf
version
object util objectutil
find guess middl compar
number total valu lower middl valu return
param type valu process method
param compar comparison
param item compar
middl posit
null pointer except nullpointerexcept item compar code
illeg argument except illegalargumentexcept item empti code valu
median compar compar item
valid empti notempti item empti item
valid null element nonullel item
valid null notnul compar compar
tree set treeset sort tree set treeset compar
collect add addal sort item
suppress warn suppresswarn uncheck item ad instanc
result sort arrai toarrai sort size
result
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
cc11d7790924f137bc5eedb870bc85fd48b01191
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_d6004decd0f5b00794ed26185640ee0011fa4102/EmergencyCheckinTest/2_d6004decd0f5b00794ed26185640ee0011fa4102_EmergencyCheckinTest_t.java
|
9c812b20307e07fb8325968be80347cc03e7f3b7
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,307
|
java
|
package org.openmrs.module.mirebalais.smoke;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.assertThat;
import java.util.Arrays;
import org.hamcrest.Matchers;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openmrs.module.mirebalais.smoke.dataModel.BasicReportData;
import org.openmrs.module.mirebalais.smoke.pageobjects.AppDashboard;
import org.openmrs.module.mirebalais.smoke.pageobjects.BasicReportPage;
import org.openmrs.module.mirebalais.smoke.pageobjects.EmergencyCheckin;
import org.openmrs.module.mirebalais.smoke.pageobjects.LoginPage;
import org.openmrs.module.mirebalais.smoke.pageobjects.PatientRegistrationDashboard;
public class EmergencyCheckinTest extends BasicMirebalaisSmokeTest {
private EmergencyCheckin emergencyCheckinPO;
private static LoginPage loginPage;
private PatientRegistrationDashboard patientDashboard;
private BasicReportPage basicReport;
private AppDashboard appDashboard;
@Before
public void setUp() {
emergencyCheckinPO = new EmergencyCheckin(driver);
patientDashboard = new PatientRegistrationDashboard(driver);
appDashboard = new AppDashboard(driver);
basicReport = new BasicReportPage(driver);
}
@BeforeClass
public static void setUpEnvironment() {
loginPage = new LoginPage(driver);
loginPage.logInAsAdmin();
}
@Test
public void checkinOnEmergencyShouldCountOnReports() {
appDashboard.openReportApp();
BasicReportData brd1 = basicReport.getData();
appDashboard.openStartHospitalVisitApp();
emergencyCheckinPO.checkinMaleUnindentifiedPatient();
assertThat(patientDashboard.getIdentifier(), is(notNullValue()));
assertThat(patientDashboard.getGender(), is("M"));
assertThat(patientDashboard.getName(), Matchers.stringContainsInOrder(Arrays.asList("UNKNOWN", "UNKNOWN")));
appDashboard.openReportApp();
BasicReportData brd2 = basicReport.getData();
assertThat(brd2.getOpenVisits(), Matchers.greaterThan(brd1.getOpenVisits()));
assertThat(brd2.getRegistrationToday(), Matchers.greaterThan(brd1.getRegistrationToday()));
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
73f2652139a8a3e8a197fb42c91dff71b0b7eca9
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Chart/3/org/jfree/chart/plot/Plot_datasetChanged_1235.java
|
4375eafb74fe375ee196e4d940194d491b897f6f
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 2,078
|
java
|
org jfree chart plot
base plot free chart jfreechart link free chart jfreechart
deleg draw ax data plot base
facil common plot type
plot axi chang listen axischangelisten
receiv notif chang plot' dataset
plot react pass plot chang event regist
listen
param event inform event
dataset chang datasetchang dataset chang event datasetchangeev event
plot chang event plotchangeev event newev plot chang event plotchangeev
event newev set type settyp chart chang event type chartchangeeventtyp dataset updat
notifi listen notifylisten event newev
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
64a108a9d9b53dc06afbc468f202d15c3bec3a6a
|
409287d0a58f58ca85185a94e564624c9dd87233
|
/gulimall-product/src/main/java/com/atguigu/gulimall/product/service/SpuInfoDescService.java
|
eca28a81338060f0bd23a4d1544b0e38ebf9017a
|
[
"Apache-2.0"
] |
permissive
|
xuan25575/guliMall
|
8f5c9ed90a4450234180fabcf0a0920b8a350517
|
6b295c0ad446d811062f5ba32f75cb156139fbaa
|
refs/heads/master
| 2022-12-22T05:32:13.382713
| 2020-09-24T08:14:37
| 2020-09-24T08:14:37
| 294,621,518
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 468
|
java
|
package com.atguigu.gulimall.product.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.product.entity.SpuInfoDescEntity;
import java.util.Map;
/**
* spu??Ϣ???
*
* @author huang_2
* @email huang_2@gmail.com
* @date 2020-09-11 22:28:09
*/
public interface SpuInfoDescService extends IService<SpuInfoDescEntity> {
PageUtils queryPage(Map<String, Object> params);
}
|
[
"xuanyu.huang@hand-china.com"
] |
xuanyu.huang@hand-china.com
|
81879bfec96ad4eee55816d1624883eb8da939e2
|
2dafa1bc8436d282c552cb1cb55df69ef70d9dbc
|
/jsure-analysis/src/edu/cmu/cs/fluid/unparse/IndepBP.java
|
8f310c9764690b3cde40365bd8195b3a9f8f3f6a
|
[] |
no_license
|
surelogic/jsure
|
99c47d195674234b688d08a4b03e506b3a235620
|
184d698991d0fbb8f73735b5aab2c5051d2518fd
|
refs/heads/master
| 2021-05-01T00:15:53.632353
| 2016-05-27T02:35:14
| 2016-05-27T02:35:14
| 50,687,249
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 588
|
java
|
package edu.cmu.cs.fluid.unparse;
public class IndepBP extends Breakpoint {
IndepBP(int prio, Glue horz, Glue indent) {
this.prio = prio; horzGlue = horz; indentGlue = indent;
}
IndepBP(int prio) {
this(prio, Glue.UNIT, Glue.INDENT);
}
static public final IndepBP DONTBP =
new IndepBP(MAXPRIO, Glue.JUXT, Glue.JUXT);
static public final IndepBP JUXTBP = DONTBP;
static public final IndepBP SIMPLEBP =
new IndepBP(9);
static public final IndepBP DEFAULTBP = SIMPLEBP;
@Override
public String toString() {
return ("{I:" + prio + "}");
}
}
|
[
"edwin.chan@surelogic.com"
] |
edwin.chan@surelogic.com
|
535d233a55d0fc94bbb23f07eaf3b4dea2dd84fc
|
78faa42e3abc9e9ef28e51e90c16469fa97ad99d
|
/zhaohg-design/src/main/java/com/zhaohg/memento/Memento.java
|
b017570f7e91e6dd72187fd49fad790b84ae1f16
|
[] |
no_license
|
lifan149/dev
|
38d932b0305fa9ec4d771c07f282cd8ea600862f
|
5c2e19ecc1fec77c3acfb1693a9fa28c59e33aff
|
refs/heads/master
| 2020-05-30T04:56:41.304909
| 2019-05-31T07:32:04
| 2019-05-31T07:32:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 287
|
java
|
package com.zhaohg.memento;
public class Memento {
private String value;
public Memento(String value) {
this.value = value;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
|
[
"zhaohg@chinaoly.com"
] |
zhaohg@chinaoly.com
|
f39180681ea47d2483fdbfeac62ffdbd3e4a7944
|
e80bb29cab516b83e66b3a3c4724944cdbd87e70
|
/producer/src/main/java/org/gatein/wsrp/producer/RegistrationInterface.java
|
387fd1f18c3804388446622b816c8c25b8e1a8b3
|
[] |
no_license
|
theute/gatein-wsrp
|
22b3bf771f23104713f1db2fb9584c6698f3ea8b
|
67c81b953f6647cd28dbc4ef750058668e3214eb
|
refs/heads/master
| 2021-01-15T18:15:10.287182
| 2012-10-08T19:46:17
| 2012-10-08T19:46:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,904
|
java
|
/*
* JBoss, a division of Red Hat
* Copyright 2010, Red Hat Middleware, LLC, and individual
* contributors as indicated by the @authors tag. See the
* copyright.txt in the distribution for a full listing of
* individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.gatein.wsrp.producer;
import org.oasis.wsrp.v2.AccessDenied;
import org.oasis.wsrp.v2.Extension;
import org.oasis.wsrp.v2.GetRegistrationLifetime;
import org.oasis.wsrp.v2.InvalidHandle;
import org.oasis.wsrp.v2.InvalidRegistration;
import org.oasis.wsrp.v2.Lifetime;
import org.oasis.wsrp.v2.MissingParameters;
import org.oasis.wsrp.v2.ModifyRegistration;
import org.oasis.wsrp.v2.ModifyRegistrationRequired;
import org.oasis.wsrp.v2.OperationFailed;
import org.oasis.wsrp.v2.OperationNotSupported;
import org.oasis.wsrp.v2.RegistrationContext;
import org.oasis.wsrp.v2.RegistrationData;
import org.oasis.wsrp.v2.RegistrationState;
import org.oasis.wsrp.v2.ResourceSuspended;
import org.oasis.wsrp.v2.SetRegistrationLifetime;
import java.util.List;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision$
*/
public interface RegistrationInterface
{
RegistrationContext register(RegistrationData register)
throws MissingParameters, OperationFailed, OperationNotSupported;
List<Extension> deregister(RegistrationContext deregister)
throws InvalidRegistration, OperationFailed, OperationNotSupported, ResourceSuspended;
RegistrationState modifyRegistration(ModifyRegistration modifyRegistration)
throws InvalidRegistration, MissingParameters, OperationFailed, OperationNotSupported, ResourceSuspended;
public Lifetime getRegistrationLifetime(GetRegistrationLifetime getRegistrationLifetime)
throws AccessDenied, InvalidHandle, InvalidRegistration, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended;
public Lifetime setRegistrationLifetime(SetRegistrationLifetime setRegistrationLifetime)
throws AccessDenied, InvalidHandle, InvalidRegistration, ModifyRegistrationRequired, OperationFailed,
OperationNotSupported, ResourceSuspended;
}
|
[
"metacosm@gmail.com"
] |
metacosm@gmail.com
|
3eb9a688c5bb52d2e77864822a50b14b0b8196a1
|
a1d7232da9b90c9ca5d1e52a6efaa46810bb0c1f
|
/src/com/Stranded/commands/Map.java
|
a66172da46d7141991ae9cd4027c91099bc7cdac
|
[] |
no_license
|
JasperBouwman/Stranded
|
c042801ca3cec3f055ef5f1ccf69beaeba5c3c5c
|
bb225a6727ba86393e62899a4fac2c6be1ddd48c
|
refs/heads/master
| 2021-04-29T18:09:04.998997
| 2018-02-15T21:49:38
| 2018-02-15T21:49:38
| 121,687,305
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,065
|
java
|
package com.Stranded.commands;
import com.Stranded.Main;
import com.Stranded.commands.map.*;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
public class Map implements CommandExecutor {
private Main p;
public ArrayList<CmdManager> actions = new ArrayList<>();
public Map(Main main) {
p = main;
actions.add(new Dimensions());
actions.add(new Get());
actions.add(new Remove());
actions.add(new Set());
actions.add(new Update());
actions.add(new com.Stranded.commands.map.Edit());
}
@Override
public boolean onCommand(CommandSender commandSender, Command command, String s, String[] args) {
//map set <mapTool name> <image name> <width> <height> set maps
//map set <mapTool name> <image name> <width> <height> <center:false> set maps
//map set <mapTool name> <image name> <width> <height> <center:false> <ratio:false> set maps
//map set <maoTool name> set existing maps
//map get <mapTool name> <image name> <width> <height> gives maps
//map get <mapTool name> <image name> <width> <height> <center:false> gives maps
//map get <mapTool name> <image name> <width> <height> <center:false> <ratio:false> gives maps
//map get <mapTool name> gives existing maps
//map dimensions <mapTool name> gives dimension of mapTool
//map remove <mapTool name> removes the CustomMapRenderer for all the maps in that mapTool
//map update <mapTool name> reload the image in the maps
//map edit <mapTool name> ratio <true:false> edits the keepRatio
//map edit <mapTool name> center <true:false> edits the keepCentered
if (!(commandSender instanceof Player)) {
commandSender.sendMessage("you must be a player to use this");
return false;
}
Player player = (Player) commandSender;
if (args.length == 0) {
//todo send /map help
return false;
}
if (args.length > 1) {
for (CmdManager action : this.actions) {
if (args[0].toLowerCase().equals(action.getName()) || args[0].toLowerCase().equals(action.getAlias())) {
action.setMain(p);
action.run(args, player);
return false;
}
}
player.sendMessage("this is not a sub-command");
}
return false;
}
}
|
[
"jphbouwman@gmail.com"
] |
jphbouwman@gmail.com
|
ad9bbd460456a5af4f99dddd0042045c098087e9
|
0b2a63566e2e6090a3b0726a77409351bb48eb64
|
/GYproject-biz-base/src/main/java/cc/dfsoft/project/biz/base/subpackage/enums/PayTypeEnum.java
|
5fc3dedfa54e127172e4490bae9e61d5f8e8d691
|
[] |
no_license
|
zhangnengxian/GYPROJECT
|
5f7eda062430beb8046943d4fa73da1b1f55a172
|
673471b661a88370137028056b0a5191de6fcec2
|
refs/heads/master
| 2021-08-17T05:48:20.815738
| 2020-12-08T10:01:06
| 2020-12-08T10:01:06
| 231,201,977
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 680
|
java
|
package cc.dfsoft.project.biz.base.subpackage.enums;
public enum PayTypeEnum {
CONSTRUCTION("1","施工款"),
SUPERVISOR("2","监理费"),
DETECTION("3","检测费");
private final String value;
private final String message;
PayTypeEnum(String value, String message){
this.value = value;
this.message = message;
}
public String getValue() {
return value;
}
public String getMessage(){
return message;
}
public static PayTypeEnum valueof(String value) {
for(PayTypeEnum e: PayTypeEnum.values()) {
if(e.getValue().equals(value)) {
return e;
}
}
return null;
}
}
|
[
"1655658911@qq.com"
] |
1655658911@qq.com
|
57d34be08d3d97b5426bcc625f08063aad437b16
|
c6753cc5aef65533ec15624d5676529a6a9f7717
|
/board_security/src/main/java/com/spring/except/CommonException.java
|
000c22798ed6dd197365c21a26b94c60ece73aa8
|
[] |
no_license
|
kaily22/springsource
|
4f428387115173eba0e50ef8beb2b62d4064813a
|
c07a40fbd7a21c44737791e1fa1b026012091a3d
|
refs/heads/master
| 2023-09-05T13:15:20.949512
| 2021-11-17T06:20:53
| 2021-11-17T06:20:53
| 374,392,647
| 0
| 0
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 401
|
java
|
package com.spring.except;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import lombok.extern.log4j.Log4j2;
@ControllerAdvice
@Log4j2
public class CommonException {
// @ExceptionHandler(Exception.class)
// public String except() {
// log.info("Exception ¹ß»ý... ");
//
// return "except/error";
// }
}
|
[
"kailyyy02@gmail.com"
] |
kailyyy02@gmail.com
|
0e08949a3327fa1ac8ae0f5815bd9718d1e3ab76
|
0ca9a0873d99f0d69b78ed20292180f513a20d22
|
/src/main/java/com/google/android/exoplayer2/offline/DownloadManager$$Lambda$0.java
|
7c8bd76c8cccbfa5c75a44452de07bbb3ad78aa4
|
[] |
no_license
|
Eliminater74/com.google.android.tvlauncher
|
44361fbbba097777b99d7eddd6e03d4bbe5f4d60
|
e8284f9970d77a05042a57e9c2173856af7c4246
|
refs/heads/master
| 2021-01-14T23:34:04.338366
| 2020-02-24T16:39:53
| 2020-02-24T16:39:53
| 242,788,539
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 542
|
java
|
package com.google.android.exoplayer2.offline;
import com.google.android.exoplayer2.scheduler.RequirementsWatcher;
final /* synthetic */ class DownloadManager$$Lambda$0 implements RequirementsWatcher.Listener {
private final DownloadManager arg$1;
DownloadManager$$Lambda$0(DownloadManager downloadManager) {
this.arg$1 = downloadManager;
}
public void onRequirementsStateChanged(RequirementsWatcher requirementsWatcher, int i) {
this.arg$1.bridge$lambda$0$DownloadManager(requirementsWatcher, i);
}
}
|
[
"eliminater74@gmail.com"
] |
eliminater74@gmail.com
|
c08c80346a3458379a848565b59ced112836b488
|
4be72dee04ebb3f70d6e342aeb01467e7e8b3129
|
/bin/ext-addon/financialacceleratorstorefront/testsrc/de/hybris/platform/financialacceleratorstorefront/jalo/InsuranceacceleratorstorefrontTest.java
|
81c244a5b5dd7988791392a598ab15ca0b365bff
|
[] |
no_license
|
lun130220/hybris
|
da00774767ba6246d04cdcbc49d87f0f4b0b1b26
|
03c074ea76779f96f2db7efcdaa0b0538d1ce917
|
refs/heads/master
| 2021-05-14T01:48:42.351698
| 2018-01-07T07:21:53
| 2018-01-07T07:21:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,415
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2015 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.financialacceleratorstorefront.jalo;
import static org.junit.Assert.assertTrue;
import de.hybris.platform.testframework.HybrisJUnit4TransactionalTest;
import org.apache.log4j.Logger;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
/**
* JUnit Tests for the Insuranceacceleratorstorefront extension
*/
public class InsuranceacceleratorstorefrontTest extends HybrisJUnit4TransactionalTest
{
/** Edit the local|project.properties to change logging behaviour (properties log4j.*). */
@SuppressWarnings("unused")
private static final Logger LOG = Logger.getLogger(InsuranceacceleratorstorefrontTest.class.getName());
@Before
public void setUp()
{
// implement here code executed before each test
}
@After
public void tearDown()
{
// implement here code executed after each test
}
/**
* This is a sample test method.
*/
@Test
public void testInsuranceacceleratorstorefront()
{
final boolean testTrue = true;
assertTrue("true is not true", testTrue);
}
}
|
[
"lun130220@gamil.com"
] |
lun130220@gamil.com
|
14e10661cfdee3c9ffdb21b2b8d9fed1b76c8d81
|
9d8d9e394bec2ec8486b692fe85214e9adfc5f06
|
/server/src/main/java/com/cezarykluczynski/stapi/server/series/endpoint/SeriesRestEndpoint.java
|
f5026b4285dcac11fc302429a6c09aa36880d5e0
|
[
"MIT"
] |
permissive
|
cezarykluczynski/stapi
|
a343e688c7e8ce86601c9c0a71e2445cfbd9b0b9
|
1729aae76ae161b0dff50d9124e337b67c934da0
|
refs/heads/master
| 2023-06-09T16:18:03.000465
| 2023-06-08T19:11:30
| 2023-06-08T19:11:30
| 70,270,193
| 128
| 17
|
MIT
| 2023-02-04T21:35:35
| 2016-10-07T17:55:21
|
Groovy
|
UTF-8
|
Java
| false
| false
| 2,014
|
java
|
package com.cezarykluczynski.stapi.server.series.endpoint;
import com.cezarykluczynski.stapi.client.rest.model.SeriesBaseResponse;
import com.cezarykluczynski.stapi.client.rest.model.SeriesFullResponse;
import com.cezarykluczynski.stapi.server.common.dto.PageSortBeanParams;
import com.cezarykluczynski.stapi.server.configuration.CxfConfiguration;
import com.cezarykluczynski.stapi.server.series.dto.SeriesRestBeanParams;
import com.cezarykluczynski.stapi.server.series.reader.SeriesRestReader;
import com.cezarykluczynski.stapi.util.constant.ContentType;
import jakarta.ws.rs.BeanParam;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.MediaType;
import org.apache.cxf.rs.security.cors.CrossOriginResourceSharing;
import org.springframework.stereotype.Service;
@Service
@Produces(ContentType.APPLICATION_JSON_CHARSET_UTF8)
@CrossOriginResourceSharing(allowAllOrigins = CxfConfiguration.CORS_ALLOW_ALL_ORIGINS, maxAge = CxfConfiguration.CORS_MAX_AGE)
public class SeriesRestEndpoint {
public static final String ADDRESS = "/v1/rest/series";
private final SeriesRestReader seriesRestReader;
public SeriesRestEndpoint(SeriesRestReader seriesRestReader) {
this.seriesRestReader = seriesRestReader;
}
@GET
@Consumes(MediaType.APPLICATION_JSON)
public SeriesFullResponse getSeries(@QueryParam("uid") String uid) {
return seriesRestReader.readFull(uid);
}
@GET
@Path("search")
@Consumes(MediaType.APPLICATION_JSON)
public SeriesBaseResponse searchSeries(@BeanParam PageSortBeanParams pageSortBeanParams) {
return seriesRestReader.readBase(SeriesRestBeanParams.fromPageSortBeanParams(pageSortBeanParams));
}
@POST
@Path("search")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
public SeriesBaseResponse searchSeries(@BeanParam SeriesRestBeanParams seriesRestBeanParams) {
return seriesRestReader.readBase(seriesRestBeanParams);
}
}
|
[
"cezary.kluczynski@gmail.com"
] |
cezary.kluczynski@gmail.com
|
9246a5daafb0cde0d00cb98ef0cd73f1bbf21bec
|
f8a17b745354b0deb4d4e2b055a90cfacf30d284
|
/src/main/java/LeetCode/Easy/Map/TwoSum/TwoSum_BestPractice.java
|
68c887ce50184676fb6950cabb8cffea7d9be0a4
|
[] |
no_license
|
yechanpark/Algorithm
|
3ff79f2ed3e2ac19ae48c7d78a64acf93508e37a
|
9f3d3e5b690754b1a63bfaba5936e0ed5fd42bc4
|
refs/heads/master
| 2022-09-15T20:59:59.561485
| 2022-09-12T17:30:07
| 2022-09-12T17:30:07
| 174,776,645
| 0
| 2
| null | 2020-02-27T05:55:24
| 2019-03-10T04:14:38
|
Java
|
UTF-8
|
Java
| false
| false
| 538
|
java
|
package LeetCode.Easy.Map.TwoSum;
import java.util.HashMap;
import java.util.Map;
/**
* 공식키워드 - 공식키워드 - Array, HashTable
*/
public class TwoSum_BestPractice {
public int[] solution(int[] nums, int target) {
Map<Integer, Integer> map = new HashMap<>();
for (int i = 0; i < nums.length; map.put(nums[i], ++i)) {
if (map.containsKey(target - nums[i])) {
return new int[]{map.get(target - nums[i]), i + 1};
}
}
return new int[]{0, 0};
}
}
|
[
"qkrdpcks0419@naver.com"
] |
qkrdpcks0419@naver.com
|
62b88878abd6afefc66a9de6535163b73ee99d3f
|
80c66c984ce60bc7d17e02d04507b87b2cc684ff
|
/net/minecraft/client/mco/ExceptionRetryCall.java
|
50b8fa95499f63a12ab124fbb18ffbff7b8f0939
|
[
"WTFPL"
] |
permissive
|
MinecraftModdedClients/Resilience-Client-Source
|
26d9ed318a41797660e05ed89df24d37fd48482e
|
4a3b2bd906f17b99be9e5eceaf9d6fcfc1470c01
|
refs/heads/master
| 2022-12-31T23:28:15.559468
| 2020-10-02T12:01:18
| 2020-10-02T12:01:18
| 39,420,083
| 111
| 45
|
WTFPL
| 2020-10-02T12:01:19
| 2015-07-21T02:41:38
|
Java
|
UTF-8
|
Java
| false
| false
| 325
|
java
|
package net.minecraft.client.mco;
public class ExceptionRetryCall extends ExceptionMcoService
{
public final int field_148832_d;
private static final String __OBFID = "CL_00001178";
public ExceptionRetryCall(int par1)
{
super(503, "Retry operation", -1);
this.field_148832_d = par1;
}
}
|
[
"admin@timo.de.vc"
] |
admin@timo.de.vc
|
00233b7b8c87f47fadc1c97429134d9e0c8a1b02
|
341729ec9efd2c908d16799563d1fb13c7042112
|
/src/main/java/de/gedoplan/beantrial/ejbremoteexception/service/ThrowExceptionServiceBean.java
|
9c366023ab494e722f41a4ac3ba4c4915c5e0f82
|
[] |
no_license
|
GEDOPLAN/ejb-remote-exception-demo
|
cfcbd472bfabe8edd59c23c2fbc92db18adfe025
|
91d187cf097951ce8c2739ab3c1cdcdc162f96b2
|
refs/heads/master
| 2021-01-10T17:30:44.518332
| 2016-04-10T17:43:08
| 2016-04-10T17:43:08
| 55,905,298
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 911
|
java
|
package de.gedoplan.beantrial.ejbremoteexception.service;
import de.gedoplan.beantrial.ejbremoteexception.entity.Dummy;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
@Stateless
@LocalBean
public class ThrowExceptionServiceBean implements ThrowExceptionService
{
@PersistenceContext
EntityManager entityManager;
@Override
public void throwNoException()
{
}
@Override
public void throwMyException() throws MyException
{
throw new MyException();
}
@Override
public void throwNullPointerException()
{
throw new NullPointerException();
}
@Override
public void throwSqlException()
{
this.entityManager.persist(new Dummy(4711, "SiebenundvierzigElf"));
this.entityManager.persist(new Dummy(4712, "SiebenundvierzigElf"));
}
}
|
[
"dirk.weil@gedoplan.de"
] |
dirk.weil@gedoplan.de
|
cad52574444414d2e7fbc304d2a0707755deac4f
|
d320db6e9e0fcd023ad702136242c2a542ec2018
|
/swak-jdbc-async/src/main/java/com/swak/async/persistence/ModelRegister.java
|
4fa6f9b68cb4cd7ddcf5a316b99b61deaa05ce41
|
[
"Apache-2.0"
] |
permissive
|
youbooks/swak
|
f7e249932c7dc3d3154ed40313c392645c2ee64d
|
d8d6ca32d80783667d9c27e0d2d56c9fd05ea918
|
refs/heads/master
| 2023-02-13T03:10:14.061240
| 2021-01-11T03:51:58
| 2021-01-11T03:51:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,089
|
java
|
package com.swak.async.persistence;
import javax.annotation.PostConstruct;
import com.swak.asm.BisGenericIdentify;
import com.swak.async.persistence.define.SqlMap;
import com.swak.async.persistence.define.TableDefine;
import com.swak.async.persistence.metrics.MetricsCollector;
/**
* 模型注册
*
* @author lifeng
* @date 2020年10月7日 下午9:44:18
*/
public class ModelRegister<T, PK> implements BisGenericIdentify<T, PK> {
/**
* 表定义
*/
protected TableDefine<T> table;
/**
* Sql 映射
*/
protected SqlMap<T> sqlMap;
/**
* 启动初始化执行模型注册
*/
@PostConstruct
public void registerModel() {
// 获得实际的类型
Class<T> entity = this.getEntityClass();
// 定义表
this.table = new TableDefine<T>(entity);
// 定义映射
this.sqlMap = new SqlMap<T>(this.table, MetricsCollector.getMetricsFactory());
}
/**
* 获得脚本
*
* @param <E>
* @param namespace
* @return
*/
@SuppressWarnings("unchecked")
protected <E> E getSql(String namespace) {
return (E) this.sqlMap.sqls.get(namespace);
}
}
|
[
"618lf@163.com"
] |
618lf@163.com
|
0060f5dc9d63613d92295eb73a4062054c842357
|
72fac5a44e33f017a08771bc649d907c982e5e82
|
/messaging/src/main/java/ignite/data2day/showcase/queue/MessageConsumerApp.java
|
6db36fa1f9e0841483f2f6ee3bf8a6fde2e493f5
|
[
"MIT"
] |
permissive
|
huangwind205/ignite-data2day
|
8c071f2fd08a7ed7ab5dfc2e7a547653b0303335
|
f1e5241722e5957872fc46b850caa1712c325ceb
|
refs/heads/master
| 2023-03-18T23:21:01.005676
| 2017-09-25T23:41:27
| 2017-09-25T23:41:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,448
|
java
|
/*
* MIT License
*
* Copyright (c) 2017 M.-Leander Reimer
*
* 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 ignite.data2day.showcase.queue;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteQueue;
import org.apache.ignite.Ignition;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.configuration.CollectionConfiguration;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
public class MessageConsumerApp {
public static void main(String[] args) throws Exception {
System.setProperty("IGNITE_PERFORMANCE_SUGGESTIONS_DISABLED", "true");
Ignition.setClientMode(true);
Optional<String> configUri = Optional.ofNullable(System.getenv("CONFIG_URI"));
Ignite ignite = Ignition.start(configUri.orElse("ignite-messaging.xml"));
CollectionConfiguration colCfg = new CollectionConfiguration();
colCfg.setCollocated(false);
colCfg.setCacheMode(CacheMode.PARTITIONED);
colCfg.setBackups(1);
IgniteQueue<String> queue = ignite.queue("randomUuidQueue", 0, colCfg);
while (true) {
String uuid = queue.poll(5, TimeUnit.SECONDS);
if (uuid == null) break;
System.out.println("Took random UUID " + uuid + " from the queue.");
System.out.println("Queue size: " + queue.size());
TimeUnit.MILLISECONDS.sleep(2000);
}
}
}
|
[
"mario-leander.reimer@qaware.de"
] |
mario-leander.reimer@qaware.de
|
dff1efdac3b09a29606ca1154a1d05bc58f30cea
|
50023378bef26739a7037fc04759663fcc66e4a8
|
/Leetcode/src/main/java/hou/forwz/Leetcode/easy/PascalsTriangle.java
|
161edb6b90e07562f846592f834bba562d6ed482
|
[] |
no_license
|
houweitao/Leetcode
|
dde59bfff97daa14f4634c2e158b318ae9b47944
|
78035bf2b2d9dff4fb9c8f0d2a6d4db6114186ef
|
refs/heads/master
| 2020-05-21T17:54:35.721046
| 2016-12-20T09:11:10
| 2016-12-20T09:11:10
| 62,659,590
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 804
|
java
|
package hou.forwz.Leetcode.easy;
import java.util.ArrayList;
import java.util.List;
/**
* @author houweitao
* @date 2016年7月14日下午10:24:11
*/
public class PascalsTriangle {
public static void main(String[] args) {
PascalsTriangle pt=new PascalsTriangle();
System.out.println(pt.generate(20));
}
public List<List<Integer>> generate(int numRows) {
List<List<Integer>> ret = new ArrayList<>();
if(numRows==0)
return ret;
List<Integer> seed = new ArrayList<>();
seed.add(1);
ret.add(seed);
for (int i = 1; i < numRows; i++) {
List<Integer> tmp = ret.get(ret.size() - 1);
List<Integer> cur = new ArrayList<>();
cur.add(1);
for (int j = 1; j < i; j++) {
cur.add(tmp.get(j - 1) + tmp.get(j));
}
cur.add(1);
ret.add(cur);
}
return ret;
}
}
|
[
"hou103880@163.com"
] |
hou103880@163.com
|
d95ffe41633522aac5a543f3b4f879cf4035ce95
|
164dd2f34109deb0b2ef322a6de9fe3ab0670aed
|
/cocoatouch/src/main/java/org/robovm/apple/accounts/ACFacebookAudience.java
|
14441e219b602f017c1b45bce64623743935c76f
|
[
"Apache-2.0"
] |
permissive
|
glenndmello/robovm
|
9e0863559854d0ed30f51e9f405a76c9ad97ca9e
|
c73408eafff49f780d00f3e4f9fb0ee10732ffa3
|
refs/heads/master
| 2020-12-24T08:32:05.788722
| 2015-03-10T21:30:20
| 2015-03-10T21:30:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,386
|
java
|
/*
* Copyright (C) 2013-2015 Trillian Mobile AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.robovm.apple.accounts;
/*<imports>*/
import java.io.*;
import java.nio.*;
import java.util.*;
import org.robovm.objc.*;
import org.robovm.objc.annotation.*;
import org.robovm.objc.block.*;
import org.robovm.rt.*;
import org.robovm.rt.bro.*;
import org.robovm.rt.bro.annotation.*;
import org.robovm.rt.bro.ptr.*;
import org.robovm.apple.foundation.*;
/*</imports>*/
/*<javadoc>*/
/*</javadoc>*/
/*<annotations>*/@Library("Accounts")/*</annotations>*/
/*<visibility>*/public/*</visibility>*/ class /*<name>*/ACFacebookAudience/*</name>*/
extends /*<extends>*/CocoaUtility/*</extends>*/
/*<implements>*//*</implements>*/ {
/*<ptr>*/
/*</ptr>*/
/*<bind>*/static { Bro.bind(ACFacebookAudience.class); }/*</bind>*/
/*<constants>*//*</constants>*/
/**
* @since Available in iOS 6.0 and later.
*/
public static final ACFacebookAudience Everyone = new ACFacebookAudience("EveryoneValue");
/**
* @since Available in iOS 6.0 and later.
*/
public static final ACFacebookAudience Friends = new ACFacebookAudience("FriendsValue");
/**
* @since Available in iOS 6.0 and later.
*/
public static final ACFacebookAudience OnlyMe = new ACFacebookAudience("OnlyMeValue");
private static ACFacebookAudience[] values = new ACFacebookAudience[] {Everyone, Friends, OnlyMe};
private final LazyGlobalValue<NSString> lazyGlobalValue;
private ACFacebookAudience(String getterName) {
lazyGlobalValue = new LazyGlobalValue<>(getClass(), getterName);
}
/*<constructors>*//*</constructors>*/
/*<properties>*//*</properties>*/
/*<members>*//*</members>*/
public NSString value() {
return lazyGlobalValue.value();
}
public static ACFacebookAudience valueOf(NSString value) {
if (value == null) throw new NullPointerException("value");
for (ACFacebookAudience v : values) {
if (v.value().equals(value)) {
return v;
}
}
throw new IllegalArgumentException("No constant with value " + value + " found in "
+ /*<name>*/ACFacebookAudience/*</name>*/.class.getName());
}
/*<methods>*/
/**
* @since Available in iOS 6.0 and later.
*/
@GlobalValue(symbol="ACFacebookAudienceEveryone", optional=true)
protected static native NSString EveryoneValue();
/**
* @since Available in iOS 6.0 and later.
*/
@GlobalValue(symbol="ACFacebookAudienceFriends", optional=true)
protected static native NSString FriendsValue();
/**
* @since Available in iOS 6.0 and later.
*/
@GlobalValue(symbol="ACFacebookAudienceOnlyMe", optional=true)
protected static native NSString OnlyMeValue();
/*</methods>*/
}
|
[
"blueriverteam@gmail.com"
] |
blueriverteam@gmail.com
|
18b150320d4e211d37e74258f443fbffe0e3ce7d
|
cf82cdcc5e9582be2c2c3ec72e0a29596c79c8e4
|
/src/main/java/ru/geekbrains/spring/ishop/entity/Event.java
|
46eec7480f2f1a289807cea94d478ca2a6d56c1f
|
[] |
no_license
|
A-Zvezda/gb-spring-amin-ishop-heroku
|
10448785d560571fd94332014cdccbefe43853e3
|
64848975f6ea0c894a93b49fda11691ebe78e55c
|
refs/heads/master
| 2022-12-20T16:42:34.334980
| 2020-09-20T14:12:37
| 2020-09-20T14:12:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,985
|
java
|
package ru.geekbrains.spring.ishop.entity;
import lombok.*;
import lombok.experimental.Tolerate;
import lombok.extern.slf4j.Slf4j;
import org.hibernate.annotations.CreationTimestamp;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
@Builder
@Entity
@Table(name = "events")
@Getter
@Setter
@Slf4j
public class Event extends AbstractEntity {
public static Event nullObject = initNullObject();
public enum Fields {id, actionType, entityType, entityId, createdAt, serverAcceptedAt}
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private Long id;
@ManyToOne
@JoinColumn(name = "action_type_id")
@NotNull(message = "не может быть пустым")
private ActionType actionType;
@Column(name = "entity_type")
@NotNull(message = "не может быть пустым")
private String entityType;
@Column(name = "entity_id")
private Long entityId;
@Column(name = "created_at")
@CreationTimestamp
private LocalDateTime createdAt;
@Column(name = "server_accepted_at")
private LocalDateTime serverAcceptedAt;
@Tolerate
public Event() {
}
private static Event initNullObject() {
nullObject = Event.builder()
.id(0L)
.actionType(ActionType.nullObject)
.entityType("")
.entityId(0L)
.createdAt(LocalDateTime.now())
.serverAcceptedAt(LocalDateTime.now())
.build();
return nullObject;
}
@Override
public String toString() {
return "Event{" +
"id=" + id +
", actionType=" + actionType +
", entityType='" + entityType + '\'' +
", entityId=" + entityId +
", createdAt=" + createdAt +
", serverAcceptedAt=" + serverAcceptedAt +
'}';
}
}
|
[
"iourilitv1965@gmail.com"
] |
iourilitv1965@gmail.com
|
00a5f4d24834f208465318d9bae92abf3cda080e
|
d0fe3c7388497d25d20daddabfa902d9f9511ca0
|
/org/telegram/api/functions/TLRequestInvokeAfterMsg.java
|
35108adb23f7cf4745983b89ec6e985a6bc0a93b
|
[] |
no_license
|
nimix3/tgva
|
9fc168e368411a0a0322ee1ea9b7963806e46a8f
|
e5165eb68bb393d1388fbf4eefb9449a603c13d0
|
refs/heads/master
| 2020-03-30T19:16:23.156945
| 2018-10-04T08:57:44
| 2018-10-04T08:57:44
| 151,535,738
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,513
|
java
|
package org.telegram.api.functions;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.telegram.tl.StreamingUtils;
import org.telegram.tl.TLContext;
import org.telegram.tl.TLMethod;
import org.telegram.tl.TLObject;
public class TLRequestInvokeAfterMsg
extends TLMethod<TLObject> {
public static final int CLASS_ID = -878758099;
private long msgId;
private TLMethod query;
@Override
public int getClassId() {
return -878758099;
}
@Override
public TLObject deserializeResponse(InputStream stream, TLContext context) throws IOException {
return this.query.deserializeResponse(stream, context);
}
public long getMsgId() {
return this.msgId;
}
public void setMsgId(long value) {
this.msgId = value;
}
public TLMethod getQuery() {
return this.query;
}
public void setQuery(TLMethod value) {
this.query = value;
}
@Override
public void serializeBody(OutputStream stream) throws IOException {
StreamingUtils.writeLong(this.msgId, stream);
StreamingUtils.writeTLMethod(this.query, stream);
}
@Override
public void deserializeBody(InputStream stream, TLContext context) throws IOException {
this.msgId = StreamingUtils.readLong(stream);
this.query = StreamingUtils.readTLMethod(stream, context);
}
@Override
public String toString() {
return "invokeAfterMsg#cb9f372d";
}
}
|
[
"nimix3@yahoo.com"
] |
nimix3@yahoo.com
|
080168e44c54daccf99ed3ea1c51b55b979e8bc6
|
b647fa78fd6c4e46bcaf11ab21d9b880e0c83f24
|
/src/testPatterns/testCommand/classic/InvokerTest.java
|
13e36c0af74a9058c1c93bf0e9c15cacbb9fa556
|
[] |
no_license
|
Garazd/DesignPatterns
|
88b8f15816dec1346122fe267ba28ceddadda9f8
|
0df55b69e5791e4a4b45f7b8cec7c0702b40da75
|
refs/heads/master
| 2021-01-17T13:43:07.664499
| 2016-06-24T19:36:34
| 2016-06-24T19:36:34
| 36,253,867
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,521
|
java
|
package testPatterns.testCommand.classic;
import designPatterns.command.classic.Command;
import designPatterns.command.classic.Invoker;
import org.junit.Test;
import testPatterns.testCommand.ConsoleMock;
import static org.junit.Assert.assertEquals;
import static org.mockito.Matchers.anyObject;
import static org.mockito.Mockito.*;
public class InvokerTest {
private ConsoleMock console = new ConsoleMock();
private Object processed;
private Object returned;
@Test
public void shouldCallCommand() {
// given
// наш подопытный invoker
Invoker invoker = new Invoker();
// создаем фейковую команду-зонд, который сохраняет в поля то,
// что ему передали и возвращает то, что мы захотим.
Command command = new Command() {
@Override
public Object execute(Object input) {
processed = input;
return returned;
}
};
// вот что веррнет команда
returned = "returned";
// устанавливаем команду в invoker
invoker.setCommand(command);
// when
// вызов тестового метода
invoker.doit();
// then
// проверили что invoker напечатал то, что вернула команда
assertEquals("returned\r\n", console.getOut());
// + до команды дошел сигнал из invoker
assertEquals("data", processed);
}
@Test
public void shouldCallCommand_mockitoCase() {
// given
// наш подопытный invoker
Invoker invoker = new Invoker();
// создаем мок команды
Command command = mock(Command.class);
// вот что веррнет команда
when(command.execute(anyObject())).thenReturn("returned");
// устанавливаем команду в invoker
invoker.setCommand(command);
// when
// вызов тестового метода
invoker.doit();
// then
// проверили что invoker напечатал то, что вернула команда
assertEquals("returned\r\n", console.getOut());
// + до команды дошел сигнал из invoker
verify(command).execute("data");
}
}
|
[
"GarazdVZ@gmail.com"
] |
GarazdVZ@gmail.com
|
d4421a1b894a0e32e130c3161c9aebf6af4b36f1
|
fe0b6d0d4c14965808a4b38aa91d0c5cef1f69f6
|
/languages/activitydiagram/org.gemoc.activitydiagram.sequential.model/src/activitydiagram/Action.java
|
8f21cbcaaad6046b68e46e923b4019e4e9b8e005
|
[] |
no_license
|
tetrabox/examples-behavioral-interface
|
f05b9bf1d3a8414ffc5eef3560f72f3719e09f28
|
3a5df4b8ec4ed13a39712269487f07d09479ec99
|
refs/heads/master
| 2020-12-02T16:23:03.869890
| 2019-10-22T08:59:20
| 2019-10-22T08:59:20
| 96,529,344
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,194
|
java
|
/**
*/
package activitydiagram;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Action</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link activitydiagram.Action#getIncoming <em>Incoming</em>}</li>
* <li>{@link activitydiagram.Action#getOutgoing <em>Outgoing</em>}</li>
* </ul>
*
* @see activitydiagram.ActivitydiagramPackage#getAction()
* @model abstract="true"
* @generated
*/
public interface Action extends ActivityNode {
/**
* Returns the value of the '<em><b>Incoming</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Incoming</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Incoming</em>' reference.
* @see #setIncoming(ActivityEdge)
* @see activitydiagram.ActivitydiagramPackage#getAction_Incoming()
* @model required="true"
* @generated
*/
ActivityEdge getIncoming();
/**
* Sets the value of the '{@link activitydiagram.Action#getIncoming <em>Incoming</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Incoming</em>' reference.
* @see #getIncoming()
* @generated
*/
void setIncoming(ActivityEdge value);
/**
* Returns the value of the '<em><b>Outgoing</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Outgoing</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Outgoing</em>' reference.
* @see #setOutgoing(ActivityEdge)
* @see activitydiagram.ActivitydiagramPackage#getAction_Outgoing()
* @model required="true"
* @generated
*/
ActivityEdge getOutgoing();
/**
* Sets the value of the '{@link activitydiagram.Action#getOutgoing <em>Outgoing</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Outgoing</em>' reference.
* @see #getOutgoing()
* @generated
*/
void setOutgoing(ActivityEdge value);
} // Action
|
[
"dorian.leroy@irisa.fr"
] |
dorian.leroy@irisa.fr
|
e53be254181900104c33840c307747db9f251cda
|
28ce6f31fa72b9d42eb93d24b8832fa9b7c94616
|
/test-case-src/src/main/java/java/lambdas/Issue20.java
|
242cd22e09ee9c933155a297a4949f421d0eeedd
|
[] |
no_license
|
HarveyLuo91/KillBugTestCases
|
754ac1163b11add7261fc4cbe84e5d6269b392ac
|
e1da3c69d6ce1f9238fbe41c68d6ebffd5080be4
|
refs/heads/master
| 2021-08-28T04:26:44.356531
| 2017-12-11T07:23:38
| 2017-12-11T07:23:38
| 113,673,769
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 582
|
java
|
package java.lambdas;
import javax.annotation.CheckForNull;
public class Issue20 {
/**
* @return may be null
*/
@CheckForNull
public static String methodThatMightReturnNull() {
if (Boolean.getBoolean("test")) {
return null;
}
return "test";
}
public void testNPLambda() {
Runnable lambda = () -> {
String maybeNull = methodThatMightReturnNull();
// would expect findbugs warning about possible null dereferencing here
boolean empty = maybeNull.isEmpty();
System.out.println(empty);
};
lambda.run();
}
}
|
[
"93994822@qq.com"
] |
93994822@qq.com
|
5919f7ba0fda23e10b0f4482d1966625f669f842
|
183154b0421c1a5a0c820c42f2b94aa69f81fdd2
|
/src/main/java/com/aol/cyclops2/types/mixins/TupleWrapper.java
|
1d2f0ff9512f4d90f533e67740a5b91f6312e2d0
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
jbgi/cyclops-react
|
b8996fc741a7c9483f58e2ef67793d460b44ea98
|
bf1a4fe159d6e5600012ae9c3a76a30f2df78606
|
refs/heads/master
| 2021-03-16T05:07:14.062630
| 2017-05-17T06:23:46
| 2017-05-17T06:23:46
| 91,538,054
| 1
| 0
| null | 2017-05-17T05:45:05
| 2017-05-17T05:45:05
| null |
UTF-8
|
Java
| false
| false
| 1,113
|
java
|
package com.aol.cyclops2.types.mixins;
import java.util.List;
import java.util.stream.Collectors;
import com.aol.cyclops2.internal.invokedynamic.ReflectionCache;
import com.aol.cyclops2.util.ExceptionSoftener;
@Deprecated //internal interface - move in 2.0.0
public interface TupleWrapper {
public Object getInstance();
@SuppressWarnings("unchecked")
default List<Object> values() {
try {
return ReflectionCache.getFields(getInstance().getClass())
.stream()
.map(f -> {
try {
return f.get(getInstance());
} catch (final Exception e) {
throw ExceptionSoftener.throwSoftenedException(e);
}
})
.collect(Collectors.toList());
} catch (final Exception e) {
throw ExceptionSoftener.throwSoftenedException(e);
}
}
}
|
[
"john.mcclean@teamaol.com"
] |
john.mcclean@teamaol.com
|
d4553ddb6dbcab4b4491aaadc6763441a16bfc1b
|
c90297ad68c36c5560fed61261e96363cdc12341
|
/LmsApi/src/main/java/com/softech/vu360/lms/webservice/message/lmsapi/types/customer/RegisterCustomers.java
|
a9f3c2c53fda01ec07db736598f87f44a98fc2ec
|
[] |
no_license
|
quickstart75/gateway-final
|
c2bddf90ba469544e6a239ca14f5a8c555fee2db
|
e9ce8280f1358de8d4d16cae40826517e4f948af
|
refs/heads/master
| 2022-12-21T22:03:44.418660
| 2020-01-28T14:41:44
| 2020-01-28T14:41:44
| 234,112,794
| 0
| 1
| null | 2022-12-16T10:32:16
| 2020-01-15T15:37:34
|
Java
|
UTF-8
|
Java
| false
| false
| 2,570
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2016.04.25 at 07:11:10 PM PKT
//
package com.softech.vu360.lms.webservice.message.lmsapi.types.customer;
import java.io.Serializable;
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.XmlType;
/**
* <p>Java class for RegisterCustomers complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="RegisterCustomers">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="RegisterCustomer" type="{http://customer.types.lmsapi.message.webservice.lms.vu360.softech.com}RegisterCustomer" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RegisterCustomers", propOrder = {
"registerCustomer"
})
public class RegisterCustomers
implements Serializable
{
private final static long serialVersionUID = 1L;
@XmlElement(name = "RegisterCustomer", required = true, nillable = true)
protected List<RegisterCustomer> registerCustomer;
/**
* Gets the value of the registerCustomer 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 registerCustomer property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getRegisterCustomer().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link RegisterCustomer }
*
*
*/
public List<RegisterCustomer> getRegisterCustomer() {
if (registerCustomer == null) {
registerCustomer = new ArrayList<RegisterCustomer>();
}
return this.registerCustomer;
}
}
|
[
"syed.zeeshan@360training.com"
] |
syed.zeeshan@360training.com
|
c3dc4fb4fa38e7f84a1308ee94088b71c12d5fbf
|
8ccd1c071b19388f1f2e92c5e5dbedc78fead327
|
/src/main/java/ohos/aafwk/ability/AbilityLifecycleCallbacks.java
|
5ec2e6931d1ed88b3811805d246c2782178dfb4b
|
[] |
no_license
|
yearsyan/Harmony-OS-Java-class-library
|
d6c135b6a672c4c9eebf9d3857016995edeb38c9
|
902adac4d7dca6fd82bb133c75c64f331b58b390
|
refs/heads/main
| 2023-06-11T21:41:32.097483
| 2021-06-24T05:35:32
| 2021-06-24T05:35:32
| 379,816,304
| 6
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 437
|
java
|
package ohos.aafwk.ability;
import ohos.utils.PacMap;
public interface AbilityLifecycleCallbacks {
void onAbilityActive(Ability ability);
void onAbilityBackground(Ability ability);
void onAbilityForeground(Ability ability);
void onAbilityInactive(Ability ability);
void onAbilitySaveState(PacMap pacMap);
void onAbilityStart(Ability ability);
void onAbilityStop(Ability ability);
}
|
[
"yearsyan@gmail.com"
] |
yearsyan@gmail.com
|
25c142df76974d5cfe95c548ec77fbf08728a747
|
ac59fc1c266333322745039c8d3e4a3db4fc8a78
|
/java/com/hmdzl/spspd/actors/mobs/npcs/Lery.java
|
a40f1cf345d66a60b86e86d6a514a37bbd1882e4
|
[] |
no_license
|
user00100-bug/SPS-PD
|
3186d3f31ec44089af498fac60c59425878d29b8
|
8b47d7c7d45e22833ee5f32ad64745c5ad8ede20
|
refs/heads/master
| 2023-01-07T06:20:16.019858
| 2020-10-25T12:28:50
| 2020-10-25T12:28:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,751
|
java
|
/*
* Pixel Dungeon
* Copyright (C) 2012-2014 Oleg Dolya
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.hmdzl.spspd.actors.mobs.npcs;
import com.hmdzl.spspd.Dungeon;
import com.hmdzl.spspd.actors.Char;
import com.hmdzl.spspd.actors.buffs.Buff;
import com.hmdzl.spspd.sprites.LerySprite;
import com.hmdzl.spspd.messages.Messages;
import com.watabou.utils.Random;
public class Lery extends NPC {
{
//name = "Lery";
spriteClass = LerySprite.class;
properties.add(Property.ELEMENT);
}
@Override
protected boolean act() {
throwItem();
return super.act();
}
@Override
public int evadeSkill(Char enemy) {
return 1000;
}
@Override
protected Char chooseEnemy() {
return null;
}
@Override
public void damage(int dmg, Object src) {
}
@Override
public void add(Buff buff) {
}
@Override
public boolean reset() {
return true;
}
@Override
public boolean interact() {
sprite.turnTo(pos, Dungeon.hero.pos);
switch (Random.Int (2)) {
case 0:
yell(Messages.get(this, "yell1"));
break;
case 1:
yell(Messages.get(this, "yell2"));
break;
}
return true;
}
}
|
[
"295754791@qq.com"
] |
295754791@qq.com
|
ec012044d222a5abd9035435cf8a19b512ac8845
|
f1b05f11b87ce416c48c603d24fc19c58cfb1371
|
/src/main/java/com/howei/service/impl/UserServiceImpl.java
|
e24ec8bb19596ed9859168c7cddca86f85ee5703
|
[] |
no_license
|
songtx0571/AI
|
763107bace5ccfe5cf6149bb094082b985a3a3ae
|
628a23107eb28cf9799cb02f7171da9d4ee81ffc
|
refs/heads/main
| 2023-06-09T06:23:33.365793
| 2021-06-24T07:00:49
| 2021-06-24T07:00:49
| 281,571,235
| 0
| 0
| null | 2021-01-14T20:46:00
| 2020-07-22T04:07:55
|
CSS
|
UTF-8
|
Java
| false
| false
| 983
|
java
|
package com.howei.service.impl;
import com.howei.mapper.UsersMapper;
import com.howei.pojo.Users;
import com.howei.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class UserServiceImpl implements UserService {
@Autowired
UsersMapper usersMapper;
@Override
public Users findUser(String userName, String password) {
return usersMapper.findUser(userName,password);
}
@Override
public String getPermission(int roleId) {
return usersMapper.getPermission(roleId);
}
@Override
public Users findById(String id) {
return usersMapper.findById(id);
}
@Override
public Users getUserRolesByName(String userNumber) {
return usersMapper.getUserRolesByName(userNumber);
}
@Override
public Users loginUserNumber(String userNumber) {
return usersMapper.loginUserNumber(userNumber);
}
}
|
[
"1121382295@qq.com"
] |
1121382295@qq.com
|
3259fd09c68882e7634b2b945c2497d9657bf823
|
da760d786629ae1b49be3615664c16fb3a29dc56
|
/projeto-spring-contas/src/br/ufpi/es/contas/controller/ContaController.java
|
31d7de1092031bd4e54a0217caf26369aa62ad2d
|
[] |
no_license
|
armandossrecife/exemplo-spring-contas
|
f0d0b38bc1e102f6fef6ff43f0c09a2391e52e56
|
653fa766599be74a6be188bae3f93aff88fc364d
|
refs/heads/master
| 2021-01-01T06:42:07.705841
| 2017-07-18T13:37:50
| 2017-07-18T13:37:50
| 97,489,094
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,295
|
java
|
package br.ufpi.es.contas.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.validation.ObjectError;
import org.springframework.web.bind.annotation.RequestMapping;
import br.ufpi.es.contas.dao.ContaDAO;
import br.ufpi.es.contas.modelo.Conta;
@Controller
public class ContaController {
private ContaDAO dao;
@Autowired //resolve a dependência via injeção de dependência
public ContaController(ContaDAO dao){
this.dao = dao;
}
/**
* Carrega o formulário de cadastro de nova Conta
* @return página formulario.jsp
*/
@RequestMapping("/formularioConta")
public String carregaFormulario(){
return "conta/formulario";
}
/**
* Adiciona uma nova conta e faz a validação dos dados da Conta
* @param conta Conta
* @param resultadoValidacao checa se os dados da Conta são válidos
* @return página formulario.jsp
*/
@RequestMapping("/adicionaConta")
public String adiciona(@Valid Conta conta, BindingResult resultadoValidacao){
if (resultadoValidacao.hasErrors()){
List<ObjectError> listaErros = resultadoValidacao.getAllErrors();
for (ObjectError item : listaErros){
System.out.println("Erro: " + item.toString());
}
return("conta/formulario");
}
dao.adiciona(conta);
System.out.println("Conta " + conta.getDescricao() + " adiconada com sucesso!");
return "conta/conta-adicionada";
}
/**
* Lista de Contas cadastradas
* @param mv Model para passar informações para a view
* @return página lista.jsp
*/
@RequestMapping("/listaContas")
public String lista(Model mv) {
List<Conta> contas = dao.lista();
mv.addAttribute("contas", contas);
return "conta/lista";
}
/**
* Remove uma Conta dada
* @param conta Conta
* @return redireciona para a action listaContas para listar as Contas cadastradas e atualizadas
*/
@RequestMapping("/removeConta")
public String remove(Conta conta) {
dao.remove(conta);
//rediceriona para o recurso "listaContas" do ContaController
return "redirect:listaContas";
}
/**
* Dada uma Conta mostra os detalhes da Conta
* @param id Id da Conta
* @param model Model para passar informações para a view
* @return página mostra.jsp
*/
@RequestMapping("/mostraConta")
public String mostra(Long id, Model model) {
model.addAttribute("conta", dao.buscaPorId(id));
return "conta/mostra";
}
/**
* Dada uma Conta altera os dados
* @param conta Conta com os novos dados
* @return redireciona para a action listaContas para listar as Contas cadastradas e atualizadas
*/
@RequestMapping("/alteraConta")
public String altera(Conta conta) {
dao.altera(conta);
return "redirect:listaContas";
}
/**
* Dada uma conta muda o status de pagamento para paga
* @param id Id da Conta
* @param response faz a mudança de status da conta para paga e retorna 200 para a requisição AJAX
*/
@RequestMapping("/pagaConta")
public void paga(Long id, HttpServletResponse response) {
dao.paga(id);
response.setStatus(200);
}
}
|
[
"armando.sousa@gmail.com"
] |
armando.sousa@gmail.com
|
fbb07fa6f877ae425bb618dddb9b57b274cc44e4
|
0d4f05c9909695a166e97b8958680945ea5c1266
|
/src/minecraft/com/google/common/collect/ImmutableBiMap.java
|
6b7312927576d9d9a93cb95158f4c60eafa9eb4e
|
[] |
no_license
|
MertDundar1/ETB-0.6
|
31f3f42f51064ffd7facaa95cf9b50d0c2d71995
|
145d008fed353545157cd0e73daae8bc8d7f50b9
|
refs/heads/master
| 2022-01-15T08:42:12.762634
| 2019-05-15T23:37:33
| 2019-05-15T23:37:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,718
|
java
|
package com.google.common.collect;
import com.google.common.annotations.GwtCompatible;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
@GwtCompatible(serializable=true, emulated=true)
public abstract class ImmutableBiMap<K, V>
extends ImmutableMap<K, V>
implements BiMap<K, V>
{
public static <K, V> ImmutableBiMap<K, V> of()
{
return EmptyImmutableBiMap.INSTANCE;
}
public static <K, V> ImmutableBiMap<K, V> of(K k1, V v1)
{
return new SingletonImmutableBiMap(k1, v1);
}
public static <K, V> ImmutableBiMap<K, V> of(K k1, V v1, K k2, V v2)
{
return new RegularImmutableBiMap(new ImmutableMapEntry.TerminalEntry[] { entryOf(k1, v1), entryOf(k2, v2) });
}
public static <K, V> ImmutableBiMap<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3)
{
return new RegularImmutableBiMap(new ImmutableMapEntry.TerminalEntry[] { entryOf(k1, v1), entryOf(k2, v2), entryOf(k3, v3) });
}
public static <K, V> ImmutableBiMap<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
{
return new RegularImmutableBiMap(new ImmutableMapEntry.TerminalEntry[] { entryOf(k1, v1), entryOf(k2, v2), entryOf(k3, v3), entryOf(k4, v4) });
}
public static <K, V> ImmutableBiMap<K, V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5)
{
return new RegularImmutableBiMap(new ImmutableMapEntry.TerminalEntry[] { entryOf(k1, v1), entryOf(k2, v2), entryOf(k3, v3), entryOf(k4, v4), entryOf(k5, v5) });
}
public static <K, V> Builder<K, V> builder()
{
return new Builder();
}
public static final class Builder<K, V>
extends ImmutableMap.Builder<K, V>
{
public Builder() {}
public Builder<K, V> put(K key, V value)
{
super.put(key, value);
return this;
}
public Builder<K, V> putAll(Map<? extends K, ? extends V> map)
{
super.putAll(map);
return this;
}
public ImmutableBiMap<K, V> build()
{
switch (size) {
case 0:
return ImmutableBiMap.of();
case 1:
return ImmutableBiMap.of(entries[0].getKey(), entries[0].getValue());
}
return new RegularImmutableBiMap(size, entries);
}
}
public static <K, V> ImmutableBiMap<K, V> copyOf(Map<? extends K, ? extends V> map)
{
if ((map instanceof ImmutableBiMap))
{
ImmutableBiMap<K, V> bimap = (ImmutableBiMap)map;
if (!bimap.isPartialView()) {
return bimap;
}
}
Map.Entry<?, ?>[] entries = (Map.Entry[])map.entrySet().toArray(EMPTY_ENTRY_ARRAY);
switch (entries.length) {
case 0:
return of();
case 1:
Map.Entry<K, V> entry = entries[0];
return of(entry.getKey(), entry.getValue());
}
return new RegularImmutableBiMap(entries);
}
private static final Map.Entry<?, ?>[] EMPTY_ENTRY_ARRAY = new Map.Entry[0];
ImmutableBiMap() {}
public abstract ImmutableBiMap<V, K> inverse();
public ImmutableSet<V> values()
{
return inverse().keySet();
}
@Deprecated
public V forcePut(K key, V value)
{
throw new UnsupportedOperationException();
}
private static class SerializedForm
extends ImmutableMap.SerializedForm
{
private static final long serialVersionUID = 0L;
SerializedForm(ImmutableBiMap<?, ?> bimap) { super(); }
Object readResolve() {
ImmutableBiMap.Builder<Object, Object> builder = new ImmutableBiMap.Builder();
return createMap(builder);
}
}
Object writeReplace()
{
return new SerializedForm(this);
}
}
|
[
"realhcfus@gmail.com"
] |
realhcfus@gmail.com
|
3324c552a93b8475c495597e5eebbb8f077af521
|
afb78b6d9d2a3cb1f8d9714231a44d4423b7184b
|
/Java-OCP2-master/Lesson_7_Generics_and_Collections/Generics/CacheString.java
|
71468e0af3642e75ca483f7f0b6136453f3c10a2
|
[] |
no_license
|
Shaigift/Java2HerbertSchildt
|
056afb53a536ce2936fcae25f8888be0681a0180
|
b55046273bfd53b6088366c1c9895652da260025
|
refs/heads/main
| 2023-05-09T03:14:09.633196
| 2021-06-08T09:03:20
| 2021-06-08T09:03:20
| 374,947,888
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 261
|
java
|
package Lesson_7_Generics_and_Collections.Generics;
public class CacheString {
private String message;
public void add(String message){
this.message = message;
}
public String get(){
return this.message;
}
}
|
[
"mphogivenshai@gmail.com"
] |
mphogivenshai@gmail.com
|
74f5c7c5d29f2618a287a9658c781429e72221f1
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/comparison_qark/de.number26.android/classes_dex2jar/de/idnow/sdk/IDnowOkHttpFactory.java
|
cd3b30cc7fafeabd22b6a12c68b32857929fe3a9
|
[
"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
| 5,533
|
java
|
/*
* Decompiled with CFR 0_115.
*
* Could not load the following classes:
* android.os.Build
* android.os.Build$VERSION
* de.idnow.sdk.Util_Log
* okhttp3.ConnectionSpec
* okhttp3.ConnectionSpec$Builder
* okhttp3.OkHttpClient
* okhttp3.OkHttpClient$Builder
* okhttp3.TlsVersion
*/
package de.idnow.sdk;
import android.os.Build;
import de.idnow.sdk.IDnowSDK;
import de.idnow.sdk.IDnowSocketFactory;
import de.idnow.sdk.Util_Log;
import java.security.GeneralSecurityException;
import java.security.KeyStore;
import java.security.SecureRandom;
import java.security.cert.X509Certificate;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.KeyManager;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocketFactory;
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509TrustManager;
import okhttp3.ConnectionSpec;
import okhttp3.OkHttpClient;
import okhttp3.TlsVersion;
public class IDnowOkHttpFactory {
private static String LOGTAG = "IDNOW_OKHTTP_FACTORY";
/*
* Enabled force condition propagation
* Lifted jumps to return sites
*/
static OkHttpClient createOkHttpClient(IDnowSocketFactory.SOCKET_TYPE sOCKET_TYPE, int n2, int n3, int n4) {
String[] arrstring = new String[]{"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256", "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256", "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"};
int n5 = Build.VERSION.SDK_INT;
String string2 = LOGTAG;
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("API LEVEL");
stringBuilder.append(Build.VERSION.SDK_INT);
Util_Log.i((String)string2, (String)stringBuilder.toString());
if (n5 < 21) {
try {
ConnectionSpec.Builder builder = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS);
TlsVersion[] arrtlsVersion = new TlsVersion[]{TlsVersion.TLS_1_2};
ConnectionSpec connectionSpec = builder.tlsVersions(arrtlsVersion).cipherSuites(arrstring).build();
return new OkHttpClient.Builder().sslSocketFactory((SSLSocketFactory)new IDnowSocketFactory(IDnowSocketFactory.SOCKET_TYPE.REST), IDnowOkHttpFactory.defaultTrustManager()).connectionSpecs(Collections.singletonList(connectionSpec)).connectTimeout((long)n3, TimeUnit.SECONDS).readTimeout((long)n2, TimeUnit.SECONDS).writeTimeout((long)n4, TimeUnit.SECONDS).build();
}
catch (Exception v0) {
Util_Log.d((String)LOGTAG, (String)"could not create okhttp client");
return null;
}
}
try {
ConnectionSpec.Builder builder = new ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS);
TlsVersion[] arrtlsVersion = new TlsVersion[]{TlsVersion.TLS_1_2};
ConnectionSpec connectionSpec = builder.tlsVersions(arrtlsVersion).cipherSuites(arrstring).build();
if (!IDnowSDK.getAllowInvalidCertificates()) return new OkHttpClient.Builder().connectionSpecs(Collections.singletonList(connectionSpec)).readTimeout((long)n2, TimeUnit.SECONDS).connectTimeout((long)n3, TimeUnit.SECONDS).writeTimeout((long)n4, TimeUnit.SECONDS).build();
SSLContext sSLContext = SSLContext.getInstance("SSL");
sSLContext.init(null, IDnowOkHttpFactory.customTrustManager(), new SecureRandom());
return new OkHttpClient.Builder().sslSocketFactory(sSLContext.getSocketFactory(), (X509TrustManager)IDnowOkHttpFactory.customTrustManager()[0]).hostnameVerifier(IDnowOkHttpFactory.customHostnameVerifier()).connectionSpecs(Collections.singletonList(connectionSpec)).readTimeout((long)n2, TimeUnit.SECONDS).connectTimeout((long)n3, TimeUnit.SECONDS).writeTimeout((long)n4, TimeUnit.SECONDS).build();
}
catch (Exception v1) {
Util_Log.d((String)LOGTAG, (String)"could not create okhttp client");
return null;
}
}
private static HostnameVerifier customHostnameVerifier() {
return new HostnameVerifier(){
@Override
public boolean verify(String string2, SSLSession sSLSession) {
return true;
}
};
}
private static TrustManager[] customTrustManager() throws GeneralSecurityException {
TrustManager[] arrtrustManager = new TrustManager[]{new X509TrustManager(){
@Override
public void checkClientTrusted(X509Certificate[] arrx509Certificate, String string2) {
}
@Override
public void checkServerTrusted(X509Certificate[] arrx509Certificate, String string2) {
}
@Override
public X509Certificate[] getAcceptedIssuers() {
return new X509Certificate[0];
}
}};
return arrtrustManager;
}
private static X509TrustManager defaultTrustManager() throws GeneralSecurityException {
TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
trustManagerFactory.init((KeyStore)null);
return (X509TrustManager)trustManagerFactory.getTrustManagers()[0];
}
}
|
[
"antal.micky@yahoo.com"
] |
antal.micky@yahoo.com
|
a3af12cce4cbabf9da9998014fbeaa87669d2262
|
6ccf193ec74bff2f359099be9eae94d7276cef41
|
/extensions/kubernetes-service-binding/deployment/src/main/java/io/quarkus/kubernetes/service/binding/buildtime/AddServiceBindingResourceDecorator.java
|
bbef76a275cee2109b8f0dd77e8b80864dbe7d51
|
[
"Apache-2.0"
] |
permissive
|
r00ta/quarkus
|
722b2336c45d9c87cc4727804be5fa42b5545c52
|
a43f46e60adf656c67a3ea274094c21b857e9fbb
|
refs/heads/master
| 2023-01-18T17:12:47.188085
| 2021-12-23T12:14:59
| 2021-12-23T12:14:59
| 254,137,552
| 0
| 0
|
Apache-2.0
| 2023-01-17T20:01:09
| 2020-04-08T16:10:31
|
Java
|
UTF-8
|
Java
| false
| false
| 2,672
|
java
|
package io.quarkus.kubernetes.service.binding.buildtime;
import java.util.List;
import java.util.Optional;
import io.dekorate.kubernetes.decorator.ResourceProvidingDecorator;
import io.dekorate.servicebinding.model.ServiceBindingBuilder;
import io.dekorate.servicebinding.model.ServiceBindingSpecBuilder;
import io.fabric8.kubernetes.api.model.KubernetesListFluent;
public class AddServiceBindingResourceDecorator extends ResourceProvidingDecorator<KubernetesListFluent<?>> {
private final String group;
private final String version;
private final String kind;
private final String name;
private final KubernetesServiceBindingConfig config;
private final List<KubernetesServiceBindingBuildItem> services;
public AddServiceBindingResourceDecorator(String group, String version, String kind, String name,
KubernetesServiceBindingConfig config,
List<KubernetesServiceBindingBuildItem> services) {
this.group = group;
this.version = version;
this.kind = kind;
this.name = name;
this.config = config;
this.services = services;
}
@Override
public void visit(KubernetesListFluent<?> list) {
if (services.isEmpty()) {
return;
}
ServiceBindingSpecBuilder spec = new ServiceBindingSpecBuilder();
spec.withNewApplication()
.withGroup(group)
.withVersion(version)
.withKind(kind)
.withName(name)
.endApplication()
.withBindAsFiles(config.bindAsFiles)
.withMountPath(config.mountPath.orElse(null));
for (KubernetesServiceBindingBuildItem service : services) {
String group = service.getApiVersion().contains("/")
? Optional.ofNullable(service.getApiVersion()).map(a -> a.split("/")[0]).orElse(null)
: "";
String version = service.getApiVersion().contains("/")
? Optional.ofNullable(service.getApiVersion()).map(a -> a.split("/")[1]).orElse(null)
: service.getApiVersion();
spec = spec.addNewService()
.withGroup(group)
.withVersion(version)
.withKind(service.getKind())
.withName(service.getName())
.endService();
}
ServiceBindingBuilder binding = new ServiceBindingBuilder()
.withNewMetadata()
.withName(name)
.endMetadata()
.withSpec(spec.build());
list.addToItems(binding.build());
}
}
|
[
"iocanel@gmail.com"
] |
iocanel@gmail.com
|
fd28cb324005ae11865d0761757d6acd1075595a
|
4277f4cf6dbace9c7743d1cd280e61789f6f96a1
|
/java/com/polis/gameserver/model/entity/AbstractResidence.java
|
32f50173ddf56e38888a5465ec21815338c47f26
|
[] |
no_license
|
polis77/polis_server_h5
|
cad220828de29e5b5a2267e2870095145d56179d
|
7e8789baa7255065962b5fdaa1aa7f379d74ff84
|
refs/heads/master
| 2021-01-23T21:53:34.935991
| 2017-02-25T07:35:03
| 2017-02-25T07:35:03
| 83,112,850
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,269
|
java
|
/*
* Copyright (C) 2004-2014 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server 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.
*
* L2J Server is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.polis.gameserver.model.entity;
import java.util.ArrayList;
import java.util.List;
import com.polis.gameserver.datatables.SkillTreesData;
import com.polis.gameserver.model.L2SkillLearn;
import com.polis.gameserver.model.actor.instance.L2PcInstance;
import com.polis.gameserver.model.events.ListenersContainer;
import com.polis.gameserver.model.holders.SkillHolder;
import com.polis.gameserver.model.interfaces.INamable;
import com.polis.gameserver.model.zone.type.L2ResidenceZone;
/**
* @author xban1x
*/
public abstract class AbstractResidence extends ListenersContainer implements INamable
{
private final int _residenceId;
private String _name;
private L2ResidenceZone _zone = null;
private final List<SkillHolder> _residentialSkills = new ArrayList<>();
public AbstractResidence(int residenceId)
{
_residenceId = residenceId;
initResidentialSkills();
}
protected abstract void load();
protected abstract void initResidenceZone();
protected void initResidentialSkills()
{
final List<L2SkillLearn> residentialSkills = SkillTreesData.getInstance().getAvailableResidentialSkills(getResidenceId());
for (L2SkillLearn s : residentialSkills)
{
_residentialSkills.add(new SkillHolder(s.getSkillId(), s.getSkillLevel()));
}
}
public final int getResidenceId()
{
return _residenceId;
}
@Override
public final String getName()
{
return _name;
}
// TODO: Remove it later when both castles and forts are loaded from same table.
public final void setName(String name)
{
_name = name;
}
public L2ResidenceZone getResidenceZone()
{
return _zone;
}
protected void setResidenceZone(L2ResidenceZone zone)
{
_zone = zone;
}
public final List<SkillHolder> getResidentialSkills()
{
return _residentialSkills;
}
public void giveResidentialSkills(L2PcInstance player)
{
if ((_residentialSkills != null) && !_residentialSkills.isEmpty())
{
for (SkillHolder sh : _residentialSkills)
{
player.addSkill(sh.getSkill(), false);
}
}
}
public void removeResidentialSkills(L2PcInstance player)
{
if ((_residentialSkills != null) && !_residentialSkills.isEmpty())
{
for (SkillHolder sh : _residentialSkills)
{
player.removeSkill(sh.getSkill(), false);
}
}
}
@Override
public boolean equals(Object obj)
{
return (obj instanceof AbstractResidence) && (((AbstractResidence) obj).getResidenceId() == getResidenceId());
}
@Override
public String toString()
{
return getName() + "(" + getResidenceId() + ")";
}
}
|
[
"policelazo@gmail.com"
] |
policelazo@gmail.com
|
6ff7ab2a221f414eaab30fc647a30962198fdd89
|
4aa90348abcb2119011728dc067afd501f275374
|
/app/src/main/java/com/tencent/mm/plugin/radar/b/c$c.java
|
d7f4a48940953845b6bd86188836a0a5dc6b022a
|
[] |
no_license
|
jambestwick/HackWechat
|
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
|
6a34899c8bfd50d19e5a5ec36a58218598172a6b
|
refs/heads/master
| 2022-01-27T12:48:43.446804
| 2021-12-29T10:36:30
| 2021-12-29T10:36:30
| 249,366,791
| 0
| 0
| null | 2020-03-23T07:48:32
| 2020-03-23T07:48:32
| null |
UTF-8
|
Java
| false
| false
| 266
|
java
|
package com.tencent.mm.plugin.radar.b;
import com.tencent.mm.storage.x;
public interface c$c {
void I(x xVar);
void J(x xVar);
void a(boolean z, String str, String str2, long j);
void a(boolean z, boolean z2, String str, String str2, long j);
}
|
[
"malin.myemail@163.com"
] |
malin.myemail@163.com
|
db032218ff536d170263dfebf5eb6d93d8b4a766
|
f4bb30d1ba864dfcc2a6b2e646f740693760a973
|
/javaenhance/src/cn/itcast/day3/thread/CyclicBarrierTest.java
|
6f0650755b3e925548b0cc2313137ca2ce2b2b9e
|
[] |
no_license
|
zhaoccx/JavaBase
|
762e3a075aec5e369774fb4937692614fcca8c66
|
152d71eec8b7af444a2c5fc410a6bdbb3b576d4f
|
refs/heads/master
| 2020-12-13T07:45:35.219768
| 2017-10-25T13:04:37
| 2017-10-25T13:04:37
| 26,492,779
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,341
|
java
|
package cn.itcast.day3.thread;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class CyclicBarrierTest {
public static void main(String[] args) {
ExecutorService service = Executors.newCachedThreadPool();
final CyclicBarrier cb = new CyclicBarrier(3);
for (int i = 0; i < 3; i++) {
Runnable runnable = new Runnable() {
@Override
public void run() {
try {
Thread.sleep((long) (Math.random() * 10000));
System.out.println("线程" + Thread.currentThread().getName() + "即将到达集合地点1,当前已有" + cb.getNumberWaiting() + "个已经到达,正在等候");
cb.await();
Thread.sleep((long) (Math.random() * 10000));
System.out.println("线程" + Thread.currentThread().getName() + "即将到达集合地点2,当前已有" + cb.getNumberWaiting() + "个已经到达,正在等候");
cb.await();
Thread.sleep((long) (Math.random() * 10000));
System.out.println("线程" + Thread.currentThread().getName() + "即将到达集合地点3,当前已有" + cb.getNumberWaiting() + "个已经到达,正在等候");
cb.await();
} catch (Exception e) {
e.printStackTrace();
}
}
};
service.execute(runnable);
}
service.shutdown();
}
}
|
[
"zhaoccx@hotmail.com"
] |
zhaoccx@hotmail.com
|
2e1843572ca8e7801191db58506161474c3ac486
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/76/org/apache/commons/math/optimization/linear/SimplexTableau_getSolution_368.java
|
19f42f609bcc44d214aacbb68aa69fe4fd83fd27
|
[] |
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
| 1,914
|
java
|
org apach common math optim linear
tableau simplex method
pre
rh
phase object
phase object
constraint
constraint
constraint
pre
phase object function
phase object function
amp decis variabl
extra decis variabl neg valu
amp slack surplu variabl
artifici variabl
rh hand side
version revis date
simplex tableau simplextableau serializ
current solut
current solut
real point pair realpointvaluepair solut getsolut
neg var column negativevarcolumn column label columnlabel index indexof neg var column label
integ neg var basic row negativevarbasicrow neg var column negativevarcolumn basic row getbasicrow neg var column negativevarcolumn
neg mostneg neg var basic row negativevarbasicrow entri getentri neg var basic row negativevarbasicrow rh offset getrhsoffset
set integ basic row basicrow hash set hashset integ
coeffici origin num decis variabl getoriginalnumdecisionvari
coeffici length
col index colindex column label columnlabel index indexof
col index colindex
coeffici
integ basic row basicrow basic row getbasicrow col index colindex
basic row basicrow basic row basicrow
multipl variabl
choos set rest equal
coeffici
basic row basicrow add basic row basicrow
coeffici
basic row basicrow entri getentri basic row basicrow rh offset getrhsoffset
restrict neg restricttononneg neg mostneg
real point pair realpointvaluepair coeffici getvalu coeffici
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
752ea3695053390f8d070505a2a4afdc51629817
|
1c6fe1c9ad917dc9dacaf03eade82d773ccf3c8a
|
/acm-module-sys/src/test/java/com/wisdom/acm/sys/controller/EncryptControllerTest.java
|
c22a59cdc692b808d9bb1d54db5451c424ed8ba4
|
[
"Apache-2.0"
] |
permissive
|
daiqingsong2021/ord_project
|
332056532ee0d3f7232a79a22e051744e777dc47
|
a8167cee2fbdc79ea8457d706ec1ccd008f2ceca
|
refs/heads/master
| 2023-09-04T12:11:51.519578
| 2021-10-28T01:58:43
| 2021-10-28T01:58:43
| 406,659,566
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,919
|
java
|
package com.wisdom.acm.sys.controller;
import static org.junit.Assert.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.*;
import org.junit.runners.MethodSorters;
import org.springframework.http.*;
import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import java.util.*;
/**
* EncryptController Tester.
*
* @author hejian
* @version 1.0
* @since <pre>2019-03-25</pre>
*/
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class EncryptControllerTest {
private String url = "http://127.0.0.1:8762/encrypt";
private Integer id = 9999;
private RestTemplate restTemplate = null;
@Before
public void before() throws Exception {
//Can test all controllers
restTemplate = new RestTemplate();
}
@After
public void after() throws Exception {
}
/**
*
*/
@Test
public void test3Save() {
String api = "/ssl/save";
Map map = new HashMap<String, Object>();
map.put("id", 9999);
map.put("userName", "userName100");
map.put("actuName", "actuName100");
map.put("sex", 9999);
map.put("phone", "phone100");
map.put("cardType", "cardType100");
map.put("cardNum", "cardNum100");
map.put("birth", "2019-12-12");
map.put("entryDate", "2019-12-12");
map.put("quitDate", "2019-12-12");
map.put("level", "level100");
map.put("sort", 9999);
map.put("staffStatus", 9999);
// 参数 SysUserUpdateFrom
map.put("roles", "roles100");
map.put("orgId", 9999);
//
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
HttpEntity formEntity = new HttpEntity(map, headers);
String contentAsString = restTemplate.getForObject(url + api, String.class, formEntity);
JSONObject jsonObject = JSON.parseObject(contentAsString);
System.out.println("==>contentAsString: " + contentAsString);
Assert.assertNotNull(contentAsString);
}
/**
*
*/
@Test
public void test3EncryptStr() {
//String api = "/{name}";
String api = "/name";
String p0 = "String100";
//
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
HttpEntity formEntity = new HttpEntity(headers);
String contentAsString = restTemplate.getForObject(url + api, String.class, formEntity);
JSONObject jsonObject = JSON.parseObject(contentAsString);
System.out.println("==>contentAsString: " + contentAsString);
Assert.assertNotNull(contentAsString);
}
/**
*
*/
@Test
public void test3AesEncrypt() {
//String api = "/aes/{content}";
String api = "/aes/content";
String p0 = "String100";
//
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
HttpEntity formEntity = new HttpEntity(headers);
String contentAsString = restTemplate.getForObject(url + api, String.class, formEntity);
JSONObject jsonObject = JSON.parseObject(contentAsString);
System.out.println("==>contentAsString: " + contentAsString);
Assert.assertNotNull(contentAsString);
}
}
|
[
"homeli@126.com"
] |
homeli@126.com
|
5deac7d8c5bdd21e0266c5d5a80812bd112c1c78
|
ca0e9689023cc9998c7f24b9e0532261fd976e0e
|
/src/com/tencent/mm/ui/account/t.java
|
e849829dc1b7daf3e2ebad18aa9e98e6c925926e
|
[] |
no_license
|
honeyflyfish/com.tencent.mm
|
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
|
ce6e605ff98164359a7073ab9a62a3f3101b8c34
|
refs/heads/master
| 2020-03-28T15:42:52.284117
| 2016-07-19T16:33:30
| 2016-07-19T16:33:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 594
|
java
|
package com.tencent.mm.ui.account;
import android.content.DialogInterface;
import android.content.DialogInterface.OnCancelListener;
import com.tencent.mm.model.ax;
import com.tencent.mm.q.l;
final class t
implements DialogInterface.OnCancelListener
{
t(FacebookAuthUI paramFacebookAuthUI) {}
public final void onCancel(DialogInterface paramDialogInterface)
{
if (FacebookAuthUI.a(itd) != null) {
ax.tm().c(FacebookAuthUI.a(itd));
}
}
}
/* Location:
* Qualified Name: com.tencent.mm.ui.account.t
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
7a933ea6525ad539ee9fcdfad50cb7b3e990d941
|
e58a8e0fb0cfc7b9a05f43e38f1d01a4d8d8cf1f
|
/MazeRunner/src/net/worldwizard/mazerunner/MazeFinish.java
|
5d90cdf21450c14706197c47fa4fdc8ccdde53d5
|
[
"Unlicense"
] |
permissive
|
retropipes/older-java-games
|
777574e222f30a1dffe7936ed08c8bfeb23a21ba
|
786b0c165d800c49ab9977a34ec17286797c4589
|
refs/heads/master
| 2023-04-12T14:28:25.525259
| 2021-05-15T13:03:54
| 2021-05-15T13:03:54
| 235,693,016
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,483
|
java
|
package net.worldwizard.mazerunner;
public class MazeFinish extends MazeGenericTeleporter {
// Serialization
private static final long serialVersionUID = 6L;
// Constructors
public MazeFinish() {
super("Finish", "Finish", 0, 0, 0, 0);
}
public MazeFinish(final String gameAppearance,
final String editorAppearance, final int destLevel) {
super(gameAppearance, editorAppearance, 0, 0, 0, destLevel);
}
// Scriptability
@Override
public void postMoveAction(final Inventory inv) {
final MazeRunner app = MazeRunner.getApplication();
if (app.isLevelAbove()) {
Messager.showDialog("Level Solved!");
app.solvedLevel();
} else {
Messager.showDialog("Maze Solved!");
app.solvedMaze();
}
}
@Override
public void postMoveAction(final boolean ie, final int dirX, final int dirY,
final Inventory inv) {
final MazeRunner app = MazeRunner.getApplication();
if (app.isLevelAbove()) {
Messager.showDialog("Level Solved!");
app.solvedLevel();
} else {
Messager.showDialog("Maze Solved!");
app.solvedMaze();
}
}
@Override
public String toString() {
return "F";
}
@Override
public String getName() {
return "Finish";
}
@Override
public MazeObject editorHook() {
return this;
}
}
|
[
"eric.ahnell@puttysoftware.com"
] |
eric.ahnell@puttysoftware.com
|
e87a02e7aa4d3079599dde4845cfb1191fb50f02
|
40df4983d86a3f691fc3f5ec6a8a54e813f7fe72
|
/app/src/main/java/okhttp3/C1925u.java
|
e8da1bea81d93ab497792cc5ce15f0e9cb4142e5
|
[] |
no_license
|
hlwhsunshine/RootGeniusTrunAK
|
5c63599a939b24a94c6f083a0ee69694fac5a0da
|
1f94603a9165e8b02e4bc9651c3528b66c19be68
|
refs/heads/master
| 2020-04-11T12:25:21.389753
| 2018-12-24T10:09:15
| 2018-12-24T10:09:15
| 161,779,612
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,794
|
java
|
package okhttp3;
import java.nio.charset.Charset;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/* renamed from: okhttp3.u */
public final class C1925u {
/* renamed from: a */
private static final Pattern f5720a = Pattern.compile("([a-zA-Z0-9-!#$%&'*+.^_`{|}~]+)/([a-zA-Z0-9-!#$%&'*+.^_`{|}~]+)");
/* renamed from: b */
private static final Pattern f5721b = Pattern.compile(";\\s*(?:([a-zA-Z0-9-!#$%&'*+.^_`{|}~]+)=(?:([a-zA-Z0-9-!#$%&'*+.^_`{|}~]+)|\"([^\"]*)\"))?");
/* renamed from: c */
private final String f5722c;
/* renamed from: d */
private final String f5723d;
/* renamed from: e */
private final String f5724e;
/* renamed from: f */
private final String f5725f;
private C1925u(String str, String str2, String str3, String str4) {
this.f5722c = str;
this.f5723d = str2;
this.f5724e = str3;
this.f5725f = str4;
}
/* renamed from: a */
public static C1925u m5518a(String str) {
Matcher matcher = f5720a.matcher(str);
if (!matcher.lookingAt()) {
return null;
}
String toLowerCase = matcher.group(1).toLowerCase(Locale.US);
String toLowerCase2 = matcher.group(2).toLowerCase(Locale.US);
Matcher matcher2 = f5721b.matcher(str);
int end = matcher.end();
String str2 = null;
while (end < str.length()) {
matcher2.region(end, str.length());
if (!matcher2.lookingAt()) {
return null;
}
String group = matcher2.group(1);
if (group == null || !group.equalsIgnoreCase("charset")) {
group = str2;
} else {
group = matcher2.group(2) != null ? matcher2.group(2) : matcher2.group(3);
if (!(str2 == null || group.equalsIgnoreCase(str2))) {
throw new IllegalArgumentException("Multiple different charsets: " + str);
}
}
String str3 = group;
end = matcher2.end();
str2 = str3;
}
return new C1925u(str, toLowerCase, toLowerCase2, str2);
}
/* renamed from: a */
public final Charset mo8924a() {
return this.f5725f != null ? Charset.forName(this.f5725f) : null;
}
/* renamed from: a */
public final Charset mo8925a(Charset charset) {
return this.f5725f != null ? Charset.forName(this.f5725f) : charset;
}
public final boolean equals(Object obj) {
return (obj instanceof C1925u) && ((C1925u) obj).f5722c.equals(this.f5722c);
}
public final int hashCode() {
return this.f5722c.hashCode();
}
public final String toString() {
return this.f5722c;
}
}
|
[
"603820467@qq.com"
] |
603820467@qq.com
|
59a8f1374cc1eaf98624954cf20794a346cabf46
|
4c1b59312ecf261c30e933ea751e3f25d7ece627
|
/src/main/java/com/thinkgem/jeesite/modules/wlpt/web/statistics/StatisticsBusinessController.java
|
d2779678eaf3e4a494661d2cca724504731ee269
|
[
"Apache-2.0"
] |
permissive
|
nowimwrok/zd_ztpor
|
e18d58545ac0f02c64cff81e38bfb0510352047d
|
1e53899726f0a5e89ce8dab647504be7b4e68a03
|
refs/heads/master
| 2021-04-05T23:43:06.065526
| 2018-03-09T06:17:07
| 2018-03-09T06:17:07
| 124,496,758
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,692
|
java
|
/**
*
*/
package com.thinkgem.jeesite.modules.wlpt.web.statistics;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.common.utils.DateUtils;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.common.utils.excel.ExportExcel;
import com.thinkgem.jeesite.modules.wlpt.entity.statistics.StatisticsBusiness;
import com.thinkgem.jeesite.modules.wlpt.service.statistics.StatisticsBusinessService;
/**
* 业务数据统计Controller
* @author 曾煜佳
* @version 2016-09-12
*/
@Controller
@RequestMapping(value = "${adminPath}/wlpt/statistics/statisticsBusiness")
public class StatisticsBusinessController extends BaseController {
@Autowired
private StatisticsBusinessService statisticsBusinessService;
@ModelAttribute
public StatisticsBusiness get(@RequestParam(required=false) String id) {
StatisticsBusiness entity = null;
if (StringUtils.isNotBlank(id)){
entity = statisticsBusinessService.get(id);
}
if (entity == null){
entity = new StatisticsBusiness();
}
return entity;
}
@RequiresPermissions("wlpt:statistics:statisticsBusiness:view")
@RequestMapping(value = {"list", ""})
public String list(StatisticsBusiness statisticsBusiness, HttpServletRequest request, HttpServletResponse response, Model model) {
Page<StatisticsBusiness> page = statisticsBusinessService.findPage(new Page<StatisticsBusiness>(request, response), statisticsBusiness);
model.addAttribute("page", page);
return "modules/wlpt/statistics/statisticsBusinessList";
}
@RequiresPermissions("wlpt:statistics:statisticsBusiness:view")
@RequestMapping(value = "form")
public String form(StatisticsBusiness statisticsBusiness, Model model) {
model.addAttribute("statisticsBusiness", statisticsBusiness);
return "modules/wlpt/statistics/statisticsBusinessForm";
}
@RequiresPermissions("wlpt:statistics:statisticsBusiness:edit")
@RequestMapping(value = "save")
public String save(StatisticsBusiness statisticsBusiness, Model model, RedirectAttributes redirectAttributes) {
if (!beanValidator(model, statisticsBusiness)){
return form(statisticsBusiness, model);
}
statisticsBusinessService.save(statisticsBusiness);
addMessage(redirectAttributes, "保存业务数据统计成功");
return "redirect:"+Global.getAdminPath()+"/wlpt/statistics/statisticsBusiness/?repage";
}
@RequiresPermissions("wlpt:statistics:statisticsBusiness:edit")
@RequestMapping(value = "delete")
public String delete(StatisticsBusiness statisticsBusiness, RedirectAttributes redirectAttributes) {
statisticsBusinessService.delete(statisticsBusiness);
addMessage(redirectAttributes, "删除业务数据统计成功");
return "redirect:"+Global.getAdminPath()+"/wlpt/statistics/statisticsBusiness/?repage";
}
///==============================================导出=================================================
/**
* 业务数据统计导出
* @param userStatistics
* @param request
* @param response
* @param redirectAttributes
* @return
*/
@RequestMapping(value = "statisticsExport", method = RequestMethod.POST)
public String statisticsExportFile(StatisticsBusiness statisticsBusiness,HttpServletRequest request,
HttpServletResponse response, RedirectAttributes redirectAttributes) {
String title = "业务数据统计";
try {
String fileName = title + "信息数据" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
Page<StatisticsBusiness> page = statisticsBusinessService.findPage(new Page<StatisticsBusiness>(request, response), statisticsBusiness);
new ExportExcel(title + "信息数据", StatisticsBusiness.class).setDataList(page.getList()).write(response, fileName).dispose();
return null;
} catch (Exception e) {
addMessage(redirectAttributes, "导出"+title+"信息数据失败!失败信息:" + e.getMessage());
}
return "redirect:"+Global.getAdminPath()+"/wlpt/statistics/statisticsBusiness/?repage";
}
}
|
[
"nowimwork@foxmail.com"
] |
nowimwork@foxmail.com
|
893010e6a488fc50af3c6231baf8f60f2c0bd82d
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdasApi21/applicationModule/src/main/java/applicationModulepackageJava17/Foo467.java
|
c5c95d73d6e50126434a74b51da0f9ffb776e748
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 348
|
java
|
package applicationModulepackageJava17;
public class Foo467 {
public void foo0() {
new applicationModulepackageJava17.Foo466().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
9bcd45df22ac52c2bea2a85336cd6719a033070d
|
516fb367430d4c1393f4cd726242618eca862bda
|
/sources/com/google/android/gms/internal/ads/zzss.java
|
9719c2eea6f8d7b38c4d5c241558c189287128ea
|
[] |
no_license
|
cmFodWx5YWRhdjEyMTA5/Gaana2
|
75d6d6788e2dac9302cff206a093870e1602921d
|
8531673a5615bd9183c9a0466325d0270b8a8895
|
refs/heads/master
| 2020-07-22T15:46:54.149313
| 2019-06-19T16:11:11
| 2019-06-19T16:11:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,771
|
java
|
package com.google.android.gms.internal.ads;
import android.support.annotation.Nullable;
import com.google.android.gms.ads.internal.zzbv;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@zzark
public final class zzss {
private final Object mLock = new Object();
private int zzbxn;
private List<zzsr> zzbxo = new LinkedList();
@Nullable
public final zzsr zznr() {
synchronized (this.mLock) {
zzsr zzsr = null;
if (this.zzbxo.size() == 0) {
zzbbd.zzdn("Queue empty");
return null;
}
int i = 0;
if (this.zzbxo.size() >= 2) {
int i2 = Integer.MIN_VALUE;
int i3 = 0;
for (zzsr zzsr2 : this.zzbxo) {
int score = zzsr2.getScore();
if (score > i2) {
i = i3;
zzsr = zzsr2;
i2 = score;
}
i3++;
}
this.zzbxo.remove(i);
return zzsr;
}
zzsr zzsr3 = (zzsr) this.zzbxo.get(0);
zzsr3.zznm();
return zzsr3;
}
}
public final boolean zza(zzsr zzsr) {
synchronized (this.mLock) {
if (this.zzbxo.contains(zzsr)) {
return true;
}
return false;
}
}
public final boolean zzb(zzsr zzsr) {
synchronized (this.mLock) {
Iterator it = this.zzbxo.iterator();
while (it.hasNext()) {
zzsr zzsr2 = (zzsr) it.next();
if (zzbv.zzlj().zzyq().zzzc()) {
if (!(zzbv.zzlj().zzyq().zzze() || zzsr == zzsr2 || !zzsr2.zznl().equals(zzsr.zznl()))) {
it.remove();
return true;
}
} else if (zzsr != zzsr2 && zzsr2.zznj().equals(zzsr.zznj())) {
it.remove();
return true;
}
}
return false;
}
}
public final void zzc(zzsr zzsr) {
synchronized (this.mLock) {
int size;
if (this.zzbxo.size() >= 10) {
size = this.zzbxo.size();
StringBuilder stringBuilder = new StringBuilder(41);
stringBuilder.append("Queue is full, current size = ");
stringBuilder.append(size);
zzbbd.zzdn(stringBuilder.toString());
this.zzbxo.remove(0);
}
size = this.zzbxn;
this.zzbxn = size + 1;
zzsr.zzbx(size);
this.zzbxo.add(zzsr);
}
}
}
|
[
"master@master.com"
] |
master@master.com
|
88d241e314244de3b6b5cd06a578636aef4eab98
|
01340816f7165798fd857f33b4b4414fa9bf192c
|
/src/main/java/leetcode/Zero/countAndSay/Solution.java
|
ea772285165a3b776ae5e3955662bd9fb2c91477
|
[] |
no_license
|
EarWheat/LeetCode
|
250f181c2c697af29ce6f76b1fdf7c7b0d7fb02c
|
f440e6c76efb4554e0404cacf137dc1f6677e2e1
|
refs/heads/master
| 2023-08-31T06:25:35.460107
| 2023-08-30T06:41:10
| 2023-08-30T06:41:10
| 145,558,499
| 2
| 1
| null | 2023-06-14T22:51:49
| 2018-08-21T12:05:56
|
Java
|
UTF-8
|
Java
| false
| false
| 1,230
|
java
|
package leetcode.Zero.countAndSay;
/**
* @author liuzhaoluliuzhaolu
* @date 2021/10/15 11:29 上午
* @desc
* @prd
* @Modification History:
* Date Author Description
* ------------------------------------------ *
*/
public class Solution {
public String countAndSay(int n) {
if(n == 1){
return "1";
}
String pre = countAndSay(n - 1);
int i = 0;
StringBuilder stringBuilder = new StringBuilder();
while (i < pre.length()){
char temp = pre.charAt(i);
int numOfTemp = 0;
while (i < pre.length()){
if(pre.charAt(i) == temp){
numOfTemp++;
i++;
} else {
break;
}
}
stringBuilder.append(numOfTemp).append(temp);
}
return stringBuilder.toString();
}
public static void main(String[] args) {
Solution solution = new Solution();
System.out.println(solution.countAndSay(3));
System.out.println(solution.countAndSay(4));
System.out.println(solution.countAndSay(5));
System.out.println(solution.countAndSay(6));
}
}
|
[
"2636965138@qq.com"
] |
2636965138@qq.com
|
8ce8ea8399a1fa0302580d622f7962e06e620d2b
|
cf7c928d6066da1ce15d2793dcf04315dda9b9ed
|
/SW_Expert_Academy/D3/Solution_D3_1217_거듭제곱.java
|
862f07c4c42f6a707875df0a733bc0848f8210e3
|
[] |
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,197
|
java
|
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.StringTokenizer;
public class Solution_D3_1217_거듭제곱 { // 제출일 2020-06-04 23:57 18,360 kb 113 ms
static StringBuilder sb = new StringBuilder();
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
StringTokenizer st = null;
for (int tc = 1; tc <= 10; tc++) {
br.readLine(); // 10개의 테케가 주어진다고 문제에 명시
sb.append('#').append(tc).append(' ');
// 조건 : 재귀를 이용하여 풀기
st = new StringTokenizer(br.readLine());
int base = Integer.parseInt(st.nextToken());
int exponents = Integer.parseInt(st.nextToken());
recursion(base, exponents, 1);
}
bw.write(sb.toString());
bw.flush();
}
private static void recursion(int base, int exponents, int num) {
if (exponents == 0) {
sb.append(num).append('\n');
return;
}
recursion(base, exponents - 1, num * base);
}
}
|
[
"refresh6724@gmail.com"
] |
refresh6724@gmail.com
|
7f949823abd3ea8185fd544e05d03ed55faaf69c
|
9358108f386b8c718f10c0150043f3af60e64712
|
/integrella-microservices-producer-fpml/src/main/java/com/integrella/fpML/schema/LcIssuanceFeePayment.java
|
906adde9a75bf68b9654124a33e3f2f344981ef2
|
[] |
no_license
|
kashim-git/integrella-microservices
|
6148b7b1683ff6b787ff5d9dba7ef0b15557caa4
|
f92d6a2ea818267364f90f2f1b2d373fbab37cfc
|
refs/heads/master
| 2021-01-20T02:53:03.118896
| 2017-04-28T13:31:55
| 2017-04-28T13:31:55
| 89,459,083
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,289
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2017.04.26 at 04:37:38 PM BST
//
package com.integrella.fpML.schema;
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.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
/**
* An event representing a letter of credit issuance fee payment.
*
* <p>Java class for LcIssuanceFeePayment complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="LcIssuanceFeePayment">
* <complexContent>
* <extension base="{http://www.fpml.org/FpML-5/master}LcEvent">
* <sequence>
* <element name="id" type="{http://www.fpml.org/FpML-5/master}AccrualTypeId" minOccurs="0"/>
* <group ref="{http://www.fpml.org/FpML-5/master}Period.model"/>
* <sequence>
* <element name="amount" type="{http://www.fpml.org/FpML-5/master}MoneyWithParticipantShare" minOccurs="0"/>
* <element name="accrualSchedule" type="{http://www.fpml.org/FpML-5/master}AccrualPeriod" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "LcIssuanceFeePayment", propOrder = {
"id",
"startDate",
"endDate",
"amount",
"accrualSchedule"
})
public class LcIssuanceFeePayment
extends LcEvent
{
protected AccrualTypeId id;
@XmlSchemaType(name = "date")
protected XMLGregorianCalendar startDate;
@XmlSchemaType(name = "date")
protected XMLGregorianCalendar endDate;
protected MoneyWithParticipantShare amount;
protected List<AccrualPeriod> accrualSchedule;
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link AccrualTypeId }
*
*/
public AccrualTypeId getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link AccrualTypeId }
*
*/
public void setId(AccrualTypeId value) {
this.id = value;
}
/**
* Gets the value of the startDate property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getStartDate() {
return startDate;
}
/**
* Sets the value of the startDate property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setStartDate(XMLGregorianCalendar value) {
this.startDate = value;
}
/**
* Gets the value of the endDate property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getEndDate() {
return endDate;
}
/**
* Sets the value of the endDate property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setEndDate(XMLGregorianCalendar value) {
this.endDate = value;
}
/**
* Gets the value of the amount property.
*
* @return
* possible object is
* {@link MoneyWithParticipantShare }
*
*/
public MoneyWithParticipantShare getAmount() {
return amount;
}
/**
* Sets the value of the amount property.
*
* @param value
* allowed object is
* {@link MoneyWithParticipantShare }
*
*/
public void setAmount(MoneyWithParticipantShare value) {
this.amount = value;
}
/**
* Gets the value of the accrualSchedule 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 accrualSchedule property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAccrualSchedule().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link AccrualPeriod }
*
*
*/
public List<AccrualPeriod> getAccrualSchedule() {
if (accrualSchedule == null) {
accrualSchedule = new ArrayList<AccrualPeriod>();
}
return this.accrualSchedule;
}
}
|
[
"Kashim@192.168.47.69"
] |
Kashim@192.168.47.69
|
582278d4a1fb5536d3985c85a86c4368c781599d
|
23c81d709cb6c76d7571f692cf26dc3396854426
|
/NettyTest/src/proto/SubReqClient.java
|
e3af13ef9faf5820ad17b7d6329701a8d96e89fc
|
[] |
no_license
|
ocean-wave/test
|
6e0460f940ad749f969e6a95f725c2af64358243
|
e0ba42c4701cdfe2c88d3bae04de447e4a65dbac
|
refs/heads/master
| 2020-06-22T18:34:48.307767
| 2018-07-10T07:47:22
| 2018-07-10T07:47:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,071
|
java
|
package proto;
import java.nio.ByteBuffer;
import io.netty.bootstrap.Bootstrap;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.buffer.ByteBuf;
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.channel.socket.nio.NioSocketChannel;
import io.netty.handler.codec.protobuf.ProtobufDecoder;
import io.netty.handler.codec.protobuf.ProtobufEncoder;
import io.netty.handler.codec.protobuf.ProtobufVarint32FrameDecoder;
import io.netty.handler.codec.protobuf.ProtobufVarint32LengthFieldPrepender;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler;
public class SubReqClient {
public void connect(int port,String ipAddress){
EventLoopGroup parent = new NioEventLoopGroup();
ByteBuffer buffer = ByteBuffer.allocate(20);
try {
Bootstrap client = new Bootstrap();
client.group(parent).channel(NioSocketChannel.class)
.option(ChannelOption.SO_BACKLOG, 100).handler(new LoggingHandler(LogLevel.INFO))
.handler(new ChannelInitializer<SocketChannel>() {
@Override
protected void initChannel(SocketChannel ch) throws Exception {
ch.pipeline().addLast(new ProtobufVarint32FrameDecoder());
ch.pipeline().addLast(new ProtobufDecoder(SubScribeResp.SubScribeReq.getDefaultInstance()));
ch.pipeline().addLast(new ProtobufVarint32LengthFieldPrepender());
ch.pipeline().addLast(new ProtobufEncoder());
ch.pipeline().addLast(new SubReqClientHandler());
}
});
ChannelFuture future = client.connect(ipAddress, port).sync();
future.channel().closeFuture().sync();
} catch (Exception e) {
// TODO: handle exception
}finally{
parent.shutdownGracefully();
}
}
public static void main(String[] args) {
SubReqClient client = new SubReqClient();
client.connect(8888, "127.0.0.1");
}
}
|
[
"307621564@qq.com"
] |
307621564@qq.com
|
cf35fdae55ff1e9a2689e61c8037b23d380bf0df
|
b4540ae6bfbe693c914c89377ee569d8479c87aa
|
/src/me/dablakbandit/dabcore/sql/Database.java
|
de5dd28404c8f014086846320922fe092384a82d
|
[
"MIT"
] |
permissive
|
Dablakbandit/DabCore
|
73b8bcab72ffca69127e04c55e324a18c6d35762
|
dc4a0d120b64b7191f00b4cdc3247a29a7d4dbfa
|
refs/heads/master
| 2021-05-04T09:46:16.970328
| 2018-04-30T09:55:21
| 2018-04-30T09:55:21
| 46,847,649
| 1
| 1
|
MIT
| 2018-03-15T17:47:47
| 2015-11-25T08:25:52
|
Java
|
UTF-8
|
Java
| false
| false
| 282
|
java
|
package me.dablakbandit.dabcore.sql;
import java.sql.Connection;
public abstract class Database
{
public abstract Connection openConnection();
public abstract boolean checkConnection();
public abstract Connection getConnection();
public abstract void closeConnection();
}
|
[
"ashle.thew@gmail.com"
] |
ashle.thew@gmail.com
|
45bae13ae36fd8a4140016cc650cdd5e1b79819e
|
54555ce8351e37b06aae657c45c27d03a6015621
|
/src/com/javarush/test/level08/lesson11/home02/Solution.java
|
8ea144eab50bc3548938a49ac70098a2e262b7b7
|
[] |
no_license
|
gorobec/JavaRush
|
ba8692fd6055816246a10148403b4187774d2e6b
|
447b2c5fd1e66f9933f0c5d83def263d77604295
|
refs/heads/master
| 2021-01-10T10:55:05.760224
| 2016-12-30T08:28:24
| 2016-12-30T08:28:24
| 54,196,552
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,437
|
java
|
package com.javarush.test.level08.lesson11.home02;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
/* Множество всех животных
1. Внутри класса Solution создать public static классы Cat, Dog.
2. Реализовать метод createCats, котороый должен возвращать множество с 4 котами.
3. Реализовать метод createDogs, котороый должен возвращать множество с 3 собаками.
4. Реализовать метод join, котороый должен возвращать объединенное множество всех животных - всех котов и собак.
5. Реализовать метод removeCats, котороый должен удалять из множества pets всех котов, которые есть в множестве cats.
6. Реализовать метод printPets, котороый должен выводить на экран всех животных, которые в нем есть. Каждое животное с новой строки
*/
public class Solution
{
public static void main(String[] args)
{
Set<Cat> cats = createCats();
Set<Dog> dogs = createDogs();
Set<Object> pets = join(cats, dogs);
printPets(pets);
removeCats(pets, cats);
printPets(pets);
}
public static Set<Cat> createCats()
{
HashSet<Cat> cats = new HashSet<Cat>();
for (int i = 0; i < 4; i++)
cats.add(new Cat());
return cats;
}
public static Set<Dog> createDogs() {
HashSet<Dog> dogs = new HashSet<Dog>();
for (int i = 0; i < 3; i++)
dogs.add(new Dog());
return dogs;
}
public static Set<Object> join (Set<Cat> cats, Set<Dog> dogs)
{
Set<Object> pets = new HashSet<Object>();
pets.addAll(cats);
pets.addAll(dogs);
return pets;
}
public static void removeCats(Set<Object> pets, Set<Cat> cats)
{
pets.removeAll(cats);
}
public static void printPets(Set<Object> pets)
{
for (Object e : pets)
System.out.println(e);
}
public static class Cat {
}
public static class Dog {
}
}
|
[
"yevhenijvorobiei@gmail.com"
] |
yevhenijvorobiei@gmail.com
|
fbaa792bbbdb3d414582790fefc681d11a239ad6
|
4edf60515c4a5bfca7a3d83c111266ad7f9505da
|
/Clase 29 de abril/src/cl/curso/java/guia7/ejercicio1/Programa.java
|
b6d041bffdf28d1ee13b7674a853a339f214f3fb
|
[] |
no_license
|
gazagal/workspace
|
ae5f10efee58e64464a69c20b0cf3951f13698ac
|
e861c8803b5fdeb3e83932f5207bf6fe80d7b81b
|
refs/heads/master
| 2021-01-09T20:43:08.061403
| 2016-06-22T17:34:52
| 2016-06-22T17:34:52
| 60,852,551
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 152
|
java
|
package cl.curso.java.guia7.ejercicio1;
public class Programa {
public static void main(String[] args) {
// TODO Auto-generated method stub
}
}
|
[
"Usuario"
] |
Usuario
|
4f741e75a93f349565de54e9702d31eb43d3f699
|
7094b816ca6eb0d4752de8a75f155311ed56e52b
|
/three_bears/quotor-upms/quotor-upms-biz/src/main/java/com/quotorcloud/quotor/admin/service/impl/SysLogServiceImpl.java
|
a78335ef0592865a79d5bdc28b1e7b147ce450d4
|
[] |
no_license
|
a97659096/quotor
|
ebce8bb5a61d082abf882aabff4d7a5e167c4da7
|
7ebe9a3ef906110fb155114a199351dd033a3b17
|
refs/heads/master
| 2023-08-10T05:33:02.055405
| 2019-12-25T01:23:07
| 2019-12-25T01:23:07
| 229,431,115
| 0
| 0
| null | 2023-07-23T00:58:58
| 2019-12-21T13:27:33
|
Java
|
UTF-8
|
Java
| false
| false
| 1,190
|
java
|
/*
* Copyright (c) 2019-2020, 冷冷 (wangiegie@gmail.com).
* <p>
* Licensed under the GNU Lesser General Public License 3.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* https://www.gnu.org/licenses/lgpl.html
* <p>
* 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.quotorcloud.quotor.admin.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.quotorcloud.quotor.admin.api.entity.SysLog;
import com.quotorcloud.quotor.admin.mapper.SysLogMapper;
import com.quotorcloud.quotor.admin.service.SysLogService;
import org.springframework.stereotype.Service;
/**
* <p>
* 日志表 服务实现类
* </p>
*
* @author lengleng
* @since 2019/2/1
*/
@Service
public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> implements SysLogService {
}
|
[
"97659096@qq.com"
] |
97659096@qq.com
|
77a80d2aa4047e517ba5b42a86df02cf98234905
|
b1a0db25643e24685afe9d7ecbdea350de6a30ab
|
/app/src/main/java/kz/kaznitu/lessons/rest/RequestInterface.java
|
4ad9527a352fceeed6cfe28fa9d56575e6a9f87b
|
[] |
no_license
|
daucloudlab/RecyclerViewCardViewByRetrofit-1
|
02e421d1c2505c4be87093319a9e116905317e40
|
1fde97b5d4f09f3cb2ccafdac7942bc4bb027f77
|
refs/heads/master
| 2021-01-18T20:49:59.120697
| 2017-04-02T14:32:29
| 2017-04-02T14:32:29
| 86,991,912
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 189
|
java
|
package kz.kaznitu.lessons.rest;
import retrofit2.Call;
import retrofit2.http.GET;
public interface RequestInterface {
@GET("android/jsonandroid")
Call<JSONResponse> getJSON();
}
|
[
"daucloudlab@gmail.com"
] |
daucloudlab@gmail.com
|
c969e9dbeaa8203e1731f25e8c120b463ca45b46
|
058dc2df69bf4bb7424796b64114bc9325dbcec6
|
/Cliente_Servlet/build/generated/jax-wsCache/TestWS/itver/ws/Hello.java
|
f8c13be26592b0227af3b43861102cd2dfa5caa5
|
[] |
no_license
|
LuisEnriqueSosaHernandez/Sistemas-distribuidos
|
33b8966de59ba118cf34dd05082f9bec8fda02cb
|
277fbfed6d05f51e8af46a04f5724a11ef907ad0
|
refs/heads/master
| 2020-04-23T16:44:57.622696
| 2019-06-12T22:14:10
| 2019-06-12T22:14:10
| 171,308,401
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,284
|
java
|
package itver.ws;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Clase Java para hello complex type.
*
* <p>El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase.
*
* <pre>
* <complexType name="hello">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "hello", propOrder = {
"name"
})
public class Hello {
protected String name;
/**
* Obtiene el valor de la propiedad name.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Define el valor de la propiedad name.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
}
|
[
"kiquesasuke@gmail.com"
] |
kiquesasuke@gmail.com
|
22474150711dad0f87ec8ee816dc9162ab77c37c
|
e06dece88776c9140d38f6c0a46282efd210b259
|
/src/main/java/leetcode/T2316.java
|
7443a8ea9f00fe184f1c8a796595aeac636c1480
|
[] |
no_license
|
liwangadd/leetcode
|
a1e4fa1d5977d6249824cbab95ec1f9e11cb29ff
|
2cf21a62c674489dd769ada160a1084d536aad36
|
refs/heads/master
| 2023-07-09T13:10:19.537211
| 2023-07-01T12:46:46
| 2023-07-01T12:48:05
| 147,921,733
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,053
|
java
|
package leetcode;
import java.util.Arrays;
public class T2316 {
public long countPairs(int n, int[][] edges) {
int[] parent = new int[n];
int[] count = new int[n];
for (int i = 0; i < n; i++) {
parent[i] = i;
}
Arrays.fill(count, 1);
for (int[] edge : edges) {
int p1 = findParent(edge[0], parent);
int p2 = findParent(edge[1], parent);
if (p1 != p2) {
if (count[p1] > count[p2]) {
parent[p2] = p1;
count[p1] += count[p2];
} else {
parent[p1] = p2;
count[p2] += count[p1];
}
}
}
long res = 0;
for (int i = 0; i < n; i++) {
res += n - count[findParent(i, parent)];
}
return res / 2L;
}
private int findParent(int vertex, int[] parent) {
if (parent[vertex] == vertex) return vertex;
return findParent(parent[vertex], parent);
}
}
|
[
"liwangadd@gmail.com"
] |
liwangadd@gmail.com
|
97e57b45dac0b1d90a155e0f39cfff824039b3d9
|
b1927c5916d45dbc683219107d4e94408a0e5fb2
|
/lecshop_base_modules/lecshop_service/src/main/java/com/lecshop/total/template/service/TemplateService.java
|
7d05e0d6b50fbefda0e52c05820d1177bd5e183b
|
[] |
no_license
|
76782875/LawyerAffairs
|
4718d3fcb6fb8c3f3b8a3145979a3617b72237a1
|
7d9f96f0ee362002ed4278eda952ccacc9119620
|
refs/heads/master
| 2021-07-23T09:56:11.730322
| 2017-11-01T03:39:04
| 2017-11-01T03:39:04
| 120,174,566
| 1
| 2
| null | 2018-02-04T10:21:44
| 2018-02-04T10:21:44
| null |
UTF-8
|
Java
| false
| false
| 1,781
|
java
|
package com.lecshop.total.template.service;
import com.lecshop.total.template.bean.Template;
import com.lecshop.utils.PageHelper;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
/**
* 合同模板service
* <p>
* Created by LecShop on 2017/7/11.
*/
public interface TemplateService {
/**
* 分页查询合同模板
*
* @param pageHelper 分页帮助类
* @param name 合同模板名称
* @return 合同模板
*/
PageHelper<Template> queryTemplateList(PageHelper<Template> pageHelper, String name);
/**
* 删除合同模板
*
* @param id 合同模板id
* @return 成功返回1,失败赶回0
*/
int deleteTemplate(long id);
/**
* 根据id查询合同模板
*
* @param id 合同模板id
* @return 合同模板
*/
Template queryTemplateById(long id);
/**
* 修改合同模板
*
* @param template 合同模板
* @return 成功返回1,失败赶回0
*/
int updateTemplate(Template template);
/**
* 添加合同模板
*
* @param name 模板名称
* @param typeId 模板类型id
* @param file 合同模版文件
* @return 添加返回码 -1 文件上传失败 1 成功 2 模板名称重复
*/
int addTemplate(CommonsMultipartFile file, String name, long typeId);
/**
* 查询合同模板下载列表
*
* @param pageHelper 分页帮助类
* @param name 合同模板名称
* @param typeIds 合同模板类型id数组
* @param typeId 合同模板类型id
* @return 合同模板下载列表
*/
PageHelper<Template> queryTemplateForDownload(PageHelper<Template> pageHelper, String name, Long[] typeIds, long typeId);
}
|
[
"Sun_Masily@163.com"
] |
Sun_Masily@163.com
|
6e425a5009a63db821c23df477bbc779570efb5b
|
82b5aabb02d9ee6f5e2a8c7a44ac4e5be7ba5ff8
|
/src/main/java/rocks/zipcodewilmington/casinoapplication/services/CasinoProfileService.java
|
5252c53895eb56eabec04458a3c65f9adc7ee6ea
|
[] |
no_license
|
ZipCodeCore/Maven.Spring-Casino-Server
|
fec346238dfd22d050422bc1dfa88e64c8c65270
|
f2a0d88f1407050feb49c034d64df2dedf721deb
|
refs/heads/master
| 2022-02-23T22:20:45.824203
| 2018-09-27T15:00:54
| 2018-09-27T15:00:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,239
|
java
|
package rocks.zipcodewilmington.casinoapplication.services;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import rocks.zipcodewilmington.casinoapplication.model.CasinoProfile;
import rocks.zipcodewilmington.casinoapplication.repository.CasinoProfileRepository;
/**
* @author leon on 9/8/18.
*/
@Service
public class CasinoProfileService {
private CasinoProfileRepository repository;
@Autowired
public CasinoProfileService(CasinoProfileRepository repository) {
this.repository = repository;
}
public CasinoProfile createProfile(CasinoProfile casinoProfile) {
return repository.save(casinoProfile);
}
public CasinoProfile updateProfile(CasinoProfile casinoProfile) {
return repository.save(casinoProfile);
}
public CasinoProfile getProfile(Long id) {
return repository.findOne(id);
}
public CasinoProfile deleteProfile(Long id) {
CasinoProfile profile = repository.findOne(id);
repository.delete(profile);
return profile;
}
public Iterable<CasinoProfile> getAll() {
return repository.findAll();
}
}
|
[
"leon@Leons-MacBook-Pro.local"
] |
leon@Leons-MacBook-Pro.local
|
24f19042b2e3986ac1d830453c0decddc99ef3c3
|
be7d7c6523fb0790f1cafc5f2285921e455d266a
|
/teacherInfoAnnuaFillingSystem/src/main/java/com/chengw/teacherInfoAnnualFillingSystem/model/Prize.java
|
d020db30a06c71d2cca9ccfcebd23baf2a62d4d3
|
[] |
no_license
|
veaxcw/project
|
b88e7fb85ecf8b8a58c44bd3af0143c4105779c1
|
0d1d754126a74bdae5321ac2ef8a54909cc76162
|
refs/heads/master
| 2022-12-27T10:41:31.589285
| 2019-10-05T08:40:02
| 2019-10-05T08:40:02
| 163,578,056
| 0
| 0
| null | 2022-12-16T00:01:33
| 2018-12-30T10:09:45
|
CSS
|
UTF-8
|
Java
| false
| false
| 1,614
|
java
|
package com.chengw.teacherInfoAnnualFillingSystem.model;
public class Prize {
private int pid;
private String pname;
private String pdate;
private String ppath;
private String diploma;
private String pdepart;
private String uploaddate;
private String summary;
private String usercode;
public int getPid() {
return pid;
}
public void setPid(int pid) {
this.pid = pid;
}
public String getPname() {
return pname;
}
public void setPname(String pname) {
this.pname = pname;
}
public String getPdate() {
return pdate;
}
public void setPdate(String pdate) {
this.pdate = pdate;
}
public String getPpath() {
return ppath;
}
public void setPpath(String ppath) {
this.ppath = ppath;
}
public String getDiploma() {
return diploma;
}
public void setDiploma(String diploma) {
this.diploma = diploma;
}
public String getPdepart() {
return pdepart;
}
public void setPdepart(String pdepart) {
this.pdepart = pdepart;
}
public String getUploaddate() {
return uploaddate;
}
public void setUploaddate(String uploaddate) {
this.uploaddate = uploaddate;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public String getUsercode() {
return usercode;
}
public void setUsercode(String usercode) {
this.usercode = usercode;
}
}
|
[
"878899580@qq.com"
] |
878899580@qq.com
|
c5d5333b2cabbed981601a97e2d93067258b512c
|
f792b8a879ac92ff004d6d9553d71f24d222788f
|
/blog/src/main/java/com/ariv/demo/gateway/responserewriting/SwaggerBasePathRewritingFilter.java
|
cf5d3de928c7d39665e493303586c35ee943b3bc
|
[] |
no_license
|
Aariv/jhipster-microservices-gcp-kubernetes
|
42485b084350221d76f1561518a090216e0b5a2a
|
ed5d360db3d1a09fe217954050b7cceea48836a0
|
refs/heads/master
| 2022-12-21T23:23:34.667841
| 2019-06-30T06:13:53
| 2019-06-30T06:13:53
| 194,481,546
| 0
| 0
| null | 2022-12-16T04:59:51
| 2019-06-30T06:07:52
|
Java
|
UTF-8
|
Java
| false
| false
| 3,462
|
java
|
package com.ariv.demo.gateway.responserewriting;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.netflix.zuul.context.RequestContext;
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.netflix.zuul.filters.ZuulProperties;
import org.springframework.cloud.netflix.zuul.filters.post.SendResponseFilter;
import springfox.documentation.swagger2.web.Swagger2Controller;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.LinkedHashMap;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
/**
* Zuul filter to rewrite micro-services Swagger URL Base Path.
*/
public class SwaggerBasePathRewritingFilter extends SendResponseFilter {
private final Logger log = LoggerFactory.getLogger(SwaggerBasePathRewritingFilter.class);
private ObjectMapper mapper = new ObjectMapper();
public SwaggerBasePathRewritingFilter() {
super(new ZuulProperties());
}
@Override
public String filterType() {
return "post";
}
@Override
public int filterOrder() {
return 100;
}
/**
* Filter requests to micro-services Swagger docs.
*/
@Override
public boolean shouldFilter() {
return RequestContext.getCurrentContext().getRequest().getRequestURI().endsWith(Swagger2Controller.DEFAULT_URL);
}
@Override
public Object run() {
RequestContext context = RequestContext.getCurrentContext();
context.getResponse().setCharacterEncoding("UTF-8");
String rewrittenResponse = rewriteBasePath(context);
if (context.getResponseGZipped()) {
try {
context.setResponseDataStream(new ByteArrayInputStream(gzipData(rewrittenResponse)));
} catch (IOException e) {
log.error("Swagger-docs filter error", e);
}
} else {
context.setResponseBody(rewrittenResponse);
}
return null;
}
@SuppressWarnings("unchecked")
private String rewriteBasePath(RequestContext context) {
InputStream responseDataStream = context.getResponseDataStream();
String requestUri = RequestContext.getCurrentContext().getRequest().getRequestURI();
try {
if (context.getResponseGZipped()) {
responseDataStream = new GZIPInputStream(context.getResponseDataStream());
}
String response = IOUtils.toString(responseDataStream, StandardCharsets.UTF_8);
if (response != null) {
LinkedHashMap<String, Object> map = this.mapper.readValue(response, LinkedHashMap.class);
String basePath = requestUri.replace(Swagger2Controller.DEFAULT_URL, "");
map.put("basePath", basePath);
log.debug("Swagger-docs: rewritten Base URL with correct micro-service route: {}", basePath);
return mapper.writeValueAsString(map);
}
} catch (IOException e) {
log.error("Swagger-docs filter error", e);
}
return null;
}
public static byte[] gzipData(String content) throws IOException {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
PrintWriter gzip = new PrintWriter(new GZIPOutputStream(bos));
gzip.print(content);
gzip.flush();
gzip.close();
return bos.toByteArray();
}
}
|
[
"arivazhagan@kloudone.com"
] |
arivazhagan@kloudone.com
|
29599a6a44dc69bfe3ff7b7128290208cdce35de
|
ad8e0c0cd9a574c3c5966000da54e28871d03f1a
|
/src/com/company/view/Start.java
|
de6ae2d41a630cf05be273eea7c3c2ed14df8fb0
|
[] |
no_license
|
colining/MyELStest
|
9546be67914aeaccde4fb31228640303a6b1c701
|
1c20ba468be403886f93de79cc68989a085dd49c
|
refs/heads/master
| 2021-01-19T20:31:10.334154
| 2017-04-30T11:35:05
| 2017-04-30T11:35:05
| 88,515,176
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 723
|
java
|
package com.company.view;
import javax.swing.*;
import java.awt.*;
/**
* Created by asus on 2017/4/22.
*/
public class Start extends JFrame{
/**
* 主要Jframe
*/
public static final int WIDTH = 1000;
public static final int HEIGHT = 1032;
public Start() {
this.setSize(WIDTH, HEIGHT);
Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize(); //获取计算机屏幕大小
this.setLocation((dimension.width-WIDTH)/2,(dimension.height-HEIGHT)/2); //居中
this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
//this.setVisible(true);
}
public static void main(String[] args) {
Start start = new Start();
}
}
|
[
"18810782954@163.com"
] |
18810782954@163.com
|
e30ab817ef3718d933ee5aea9713293901626135
|
243a31a30a60dbf7521e2e0d780177b5851d3b71
|
/persistence-modules/spring-jpa/src/main/java/com/tom/manytomany/model/Course.java
|
2f6bad595f4d96323bad1337587a234214fadf09
|
[] |
no_license
|
tomlxq/tutorials
|
db6c5524d0324631c4b5d9338ed9e20b9efa87f7
|
3bd7739e89b6d5dff3e4518c0b8fe98425600809
|
refs/heads/master
| 2020-12-19T07:13:42.578910
| 2020-07-19T16:23:10
| 2020-07-19T16:23:10
| 235,655,480
| 0
| 0
| null | 2020-06-13T02:00:22
| 2020-01-22T20:00:48
|
Java
|
UTF-8
|
Java
| false
| false
| 1,530
|
java
|
package com.tom.manytomany.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import java.util.Set;
@Entity
@Table(name = "course")
public class Course {
@Id
@Column(name = "id")
private Long id;
@ManyToMany(mappedBy = "likedCourses")
private Set<Student> likes;
@OneToMany(mappedBy = "course")
private Set<CourseRating> ratings;
@OneToMany(mappedBy = "course")
private Set<CourseRegistration> registrations;
// additional properties
public Course() {
}
public Long getId() {
return id;
}
public Set<CourseRating> getRatings() {
return ratings;
}
public Set<CourseRegistration> getRegistrations() {
return registrations;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Course other = (Course) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
}
}
|
[
"21429503@qq.com"
] |
21429503@qq.com
|
a5f640e7139819fa268c6bfa7f2bb396426be0bc
|
d97527c4ba38df7e3b8f13b619b13526ba1a4ba1
|
/spring_http/src/main/java/com/learn/spring_http/controller/HttpDemoController.java
|
8cca44f7416e06b6200ba88f36a2c4187ffdda18
|
[] |
no_license
|
liman657/learn2019
|
472d2713b53e0fd73fb9617279c73b7a06ca4732
|
8e65320752b742463f2a43a41df75b15c0452477
|
refs/heads/master
| 2023-06-10T05:26:05.929419
| 2023-06-04T08:10:18
| 2023-06-04T08:10:18
| 174,538,097
| 2
| 0
| null | 2022-06-21T04:20:15
| 2019-03-08T12:58:17
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 3,021
|
java
|
package com.learn.spring_http.controller;
import com.sun.deploy.net.HttpResponse;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/**
* author:liman
* createtime:2019/5/30
* comment:http请求实例
*/
@RequestMapping("/HttpDemo")
@RestController
public class HttpDemoController {
/**
* headers 可以规定只处理有指定属性的请求。这里是只处理Header中有Referer=http://www.baidu.com的报文
* @param ownerId
* @param petId
*/
@RequestMapping(value="/test/{ownerId}/{petId}",headers="Referer=http://www.baidu.com")
public void testHeader(@PathVariable String ownerId,@PathVariable String petId){
System.out.println(ownerId+":"+petId);
System.out.println("test");
}
/**
* headers 只是在请求头中增加报文键值对而已
* @param response
* @throws IOException
*/
@RequestMapping(value = "/test/contentType",headers = "Accept=application/json")
public void testContentType(HttpServletResponse response) throws IOException {
response.setContentType("application/json;charset=utf-8");
String jsonData = "{\"username\":\"zhang\", \"password\":\"123\"}";
response.getWriter().write(jsonData);
}
@RequestMapping(value="/test/param",headers = "params=test")
public void testParams(HttpServletRequest request){
String testValue = request.getHeader("params");
System.out.println(testValue);
}
@RequestMapping(value="test/consumes",consumes = "application/json",produces = "application/json")
@ResponseBody
public String testConsumes(@RequestBody UserEntity userEntity){
System.out.println(userEntity.toString());
String jsonData = "{\"username\":\"zhang\", \"password\":\"123\"}";
return jsonData;
}
@RequestMapping(value="test/httpClient")
public String testHttpClient(){
String jsonData = "{\"username\":\"zhang\", \"password\":\"123\"}";
return jsonData;
}
@RequestMapping("/test/param")
public String testHttpClientParam(String name,String age){
return "获取到的参数:"+name+":"+age;
}
@RequestMapping("/test/post")
public String testPostwithOutParam(){
return "test";
}
@RequestMapping(value="/test/postParam",method=RequestMethod.POST)
public String testPostParam(String name,Integer age){
return "普通参数的post请求操作:"+name+":"+age;
}
@RequestMapping(value="/test/userEntity",method = RequestMethod.POST)
public String testModelParam(@RequestBody UserEntity userEntity){
return userEntity.toString();
}
@RequestMapping(value="/test/userAndParam",method=RequestMethod.POST)
public String testPostUserAndParam(@RequestBody UserEntity userEntity,Integer flag,String meaning){
return userEntity.toString()+":"+flag+":"+meaning;
}
}
|
[
"657271181@qq.com"
] |
657271181@qq.com
|
82fcd6905f3c556ce4d3ca735caf859c9025cbd6
|
1ca86d5d065372093c5f2eae3b1a146dc0ba4725
|
/core-java-modules/core-java-9-new-features/src/test/java/com/surya/java9/language/PrivateInterfaceUnitTest.java
|
b99bf464296f9d5e30af9277d06c98ab6f033867
|
[] |
no_license
|
Suryakanta97/DemoExample
|
1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e
|
5c6b831948e612bdc2d9d578a581df964ef89bfb
|
refs/heads/main
| 2023-08-10T17:30:32.397265
| 2021-09-22T16:18:42
| 2021-09-22T16:18:42
| 391,087,435
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 290
|
java
|
package com.surya.java9.language;
import com.surya.java9.language.PrivateInterface;
import org.junit.Test;
public class PrivateInterfaceUnitTest {
@Test
public void test() {
PrivateInterface piClass = new PrivateInterface() {
};
piClass.check();
}
}
|
[
"suryakanta97@github.com"
] |
suryakanta97@github.com
|
1558a6ec9338519379b69703e90027bc722f63a7
|
a89c95173ba2d099e37803f618033a824d5387e1
|
/3.19/Week5/GettingDeviceLocation/app/src/main/java/com/example/user/gettingdevicelocation/PermissionManager.java
|
557264a2bdc426fda3c2091d812bec40af37247a
|
[] |
no_license
|
DroidSingh89/MAC_Training
|
69715c2b1476857d924034391449b70400d80b15
|
096293a249f220cb7366747d45a727c05a9050e7
|
refs/heads/master
| 2021-07-12T23:01:46.912045
| 2018-12-13T15:26:12
| 2018-12-13T15:26:12
| 133,825,375
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,746
|
java
|
package com.example.user.gettingdevicelocation;
import android.Manifest;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.PackageManager;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.util.Log;
import android.widget.Toast;
public class PermissionManager {
private static final int MY_PERMISSIONS_REQUEST_LOCATION = 10;
public static final String TAG = PermissionManager.class.getSimpleName() + "_TAG";
Context context;
IPermissionManager listener;
public PermissionManager(Context context) {
this.context = context;
this.listener = (IPermissionManager) context;
}
public void checkPermission() {
//check permission for using contacts
// Here, thisActivity is the current activity
if (ContextCompat.checkSelfPermission(context,
Manifest.permission.ACCESS_FINE_LOCATION)
!= PackageManager.PERMISSION_GRANTED) {
Log.d(TAG, "onCreate: Permission is not granted");
// Permission is not granted
// Should we show an explanation?
if (ActivityCompat.shouldShowRequestPermissionRationale((Activity) context,
Manifest.permission.ACCESS_FINE_LOCATION)) {
Log.d(TAG, "onCreate: Show an explanation to the user");
getExplanationDialog().show();
// Show an explanation to the user *asynchronously* -- don't block
// this thread waiting for the user's response! After the user
// sees the explanation, try again to request the permission.
} else {
requestPermission();
}
} else {
listener.onPermissionResult(true);
Log.d(TAG, "onCreate: Permission has already been granted");
// Permission has already been granted
}
}
private void requestPermission() {
// No explanation needed; request the permission
Log.d(TAG, "onCreate: No explanation needed; request the permission");
ActivityCompat.requestPermissions((Activity) context,
new String[]{Manifest.permission.ACCESS_FINE_LOCATION},
MY_PERMISSIONS_REQUEST_LOCATION);
// MY_PERMISSIONS_REQUEST_LOCATION is an
// app-defined int constant. The callback method gets the
// result of the request.
}
private AlertDialog getExplanationDialog() {
return new AlertDialog.Builder(context)
.setTitle("Need the permission")
.setMessage("Can you please allow this permission? I need it.")
.setNegativeButton("No", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Toast.makeText(context,
"Features disabled",
Toast.LENGTH_SHORT)
.show();
}
})
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
requestPermission();
}
}).create();
}
public void checkResult(int requestCode,
String permissions[], int[] grantResults) {
switch (requestCode) {
case MY_PERMISSIONS_REQUEST_LOCATION: {
// If request is cancelled, the result arrays are empty.
if (grantResults.length > 0
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
Log.d(TAG, "onRequestPermissionsResult: permission was granted");
// permission was granted, yay! Do the
// contacts-related task you need to do.
listener.onPermissionResult(true);
} else {
listener.onPermissionResult(false);
Log.d(TAG, "onRequestPermissionsResult: permission denied");
// permission denied, boo! Disable the
// functionality that depends on this permission.
}
return;
}
// other 'case' lines to check for other
// permissions this app might request.
}
}
public interface IPermissionManager{
void onPermissionResult(boolean isGranted);
}
}
|
[
"singh@manroop.com"
] |
singh@manroop.com
|
39a0e4d8b1382c4dcd666ee4696f1932ad0cf6df
|
17537c091572a94c58975214094fdfeedb57fde1
|
/core/common/data/shineData/src/main/java/com/home/shineData/message/SocketConnectSuccessMO.java
|
7ba3f61e52aed5ab7b098f035d25d3c584c9851f
|
[
"Apache-2.0"
] |
permissive
|
mengtest/home3
|
dc2e5f910bbca6e536ded94d3f749671f0ca76d5
|
a15a63694918483b2e4853edab197b5cdddca560
|
refs/heads/master
| 2023-01-29T13:49:23.822515
| 2020-12-11T10:17:39
| 2020-12-11T10:17:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 162
|
java
|
package com.home.shineData.message;
/** 连接成功消息 */
public class SocketConnectSuccessMO
{
/** 连接id */
int id;
/** 重连令牌 */
int token;
}
|
[
"359944951@qq.com"
] |
359944951@qq.com
|
a681106996d6c3c85bba04a251ff6507236bcff9
|
74bc3a1fd6ded5fee51de40fb0822be155555c2c
|
/gasoline/src/java/com/stepup/gasoline/qt/bean/IncomeBean.java
|
29d69aaf7224eda6970a3e4d822d1ddbce6b478e
|
[] |
no_license
|
phuongtu1983/quangtrung
|
0863f7a6125918faaaffb6e27fad366369885cb6
|
ece90b4876c8680ee6d386e950db2fbb0208a56a
|
refs/heads/master
| 2021-06-05T07:21:30.227630
| 2020-10-07T02:12:19
| 2020-10-07T02:12:19
| 130,137,918
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,996
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.stepup.gasoline.qt.bean;
/**
*
* @author phuongtu
*/
public class IncomeBean {
private int id;
private String code;
private String createdDate;
private int accountId;
private double amount;
private String note;
private String content;
private int type;
private int createdEmployeeId;
private int canEdit;
public void setId(int id) {
this.id = id;
}
public int getId() {
return id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getCreatedDate() {
return createdDate;
}
public void setCreatedDate(String createdDate) {
this.createdDate = createdDate;
}
public int getAccountId() {
return accountId;
}
public void setAccountId(int accountId) {
this.accountId = accountId;
}
public double getAmount() {
return amount;
}
public void setAmount(double amount) {
this.amount = amount;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public int getCreatedEmployeeId() {
return createdEmployeeId;
}
public void setCreatedEmployeeId(int createdEmployeeId) {
this.createdEmployeeId = createdEmployeeId;
}
public int getCanEdit() {
return canEdit;
}
public void setCanEdit(int canEdit) {
this.canEdit = canEdit;
}
public static int TYPE_OTHER = 1;
public static int TYPE_BANK = 2;
}
|
[
"phuongtu1983@gmail.com"
] |
phuongtu1983@gmail.com
|
2b681f06e16ed5d89467c947fdddf6ba29c062a8
|
3cbb0a861c0474236c8240740382226ba02189cf
|
/src/com/vaani/algo/array/FindKthSmallest.java
|
3de2734efa52a9b3b837b5165c71409f2e5f11ec
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
harshanarayana/AlgorithmUtil
|
a7b3a397fc2475fea2ed8d7007127ed497b46736
|
c9f4a006c8adcc56d0aa33c23ce9292f66a543f2
|
refs/heads/master
| 2020-03-20T00:10:52.227754
| 2017-09-20T21:26:48
| 2017-09-20T21:26:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,139
|
java
|
package com.vaani.algo.array;
import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Random;
/**
* Given an array and a number k where k is smaller than size of array, we need to find the k’th smallest element in the given array.
* It is given that ll array elements are distinct.
* <p>
* Examples:
* <p>
* Input: arr[] = {7, 10, 4, 3, 20, 15}
* k = 3
* Output: 7
* <p>
* Input: arr[] = {7, 10, 4, 3, 20, 15}
* k = 4
* Output: 10
* <p>
* Reference:
* http://www.geeksforgeeks.org/kth-smallestlargest-element-unsorted-array/
* http://www.geeksforgeeks.org/kth-smallestlargest-element-unsorted-array-set-2-expected-linear-time/
* http://www.geeksforgeeks.org/k-largestor-smallest-elements-in-an-array/
*/
public class FindKthSmallest {
/**
* Randomized quick select
* Average/Best case: O(n)
* Worst case: O(n^2)
*/
public static int findKthSmallest(int[] arr, int k) {
if (k < 1 || k > arr.length) return -1;
return findKthSmallest(arr, k - 1, 0, arr.length - 1);
}
public static int findKthSmallest(int[] arr, int k, int start, int end) {
int partitionIndex = partition(arr, start, end);
if (partitionIndex > k) {
return findKthSmallest(arr, k, start, partitionIndex - 1);
} else if (partitionIndex < k) {
return findKthSmallest(arr, k, partitionIndex + 1, end);
} else {
return arr[partitionIndex];
}
}
public static int partition(int[] arr, int start, int end) {
Random random = new Random();
int pivotIndex = start + random.nextInt(end - start + 1);
swap(arr, pivotIndex, end);
int pivot = arr[end];
int i = start, j = start;
while (j < end) {
if (arr[j] < pivot) {
swap(arr, j, i);
i++;
}
j++;
}
swap(arr, i, end);
return i;
}
public static void swap(int[] arr, int x, int y) {
int tmp = arr[x];
arr[x] = arr[y];
arr[y] = tmp;
}
/**
* Min heap
* Time: O(n + klogn)
*/
public static int findKthSmallest2(int[] arr, int k) {
if (k < 1 || k > arr.length) return -1;
Queue<Integer> queue = new PriorityQueue<Integer>(arr.length);
for (int num : arr) {
queue.add(num);
}
for (int i = 0; i < k - 1; i++) {
queue.poll();
}
return queue.poll();
}
/**
* Max heap
* Time: O(k + (n - k)logk)
*/
public static int findKthSmallest3(int[] arr, int k) {
if (k < 1 || k > arr.length) return -1;
Comparator<Integer> comparator = new Comparator<Integer>() {
@Override
public int compare(Integer o1, Integer o2) {
return o2 - o1;
}
};
Queue<Integer> queue = new PriorityQueue<Integer>(k, comparator);
for (int i = 0; i < k; i++) {
queue.add(arr[i]);
}
for (int i = k; i < arr.length; i++) {
if (arr[i] < queue.peek()) {
queue.poll();
queue.add(arr[i]);
}
}
return queue.poll();
}
/**
* Find kth largest
* Min Heap
* Time: O(k + (n - k)logk)
*/
public static int findKthLargest(int[] arr, int k) {
if (k < 1 || k > arr.length) return -1;
Queue<Integer> queue = new PriorityQueue<Integer>(k);
for (int i = 0; i < k; i++) {
queue.add(arr[i]);
}
for (int i = k; i < arr.length; i++) {
if (arr[i] > queue.peek()) {
queue.poll();
queue.add(arr[i]);
}
}
return queue.poll();
}
public static void main(String[] args) {
int arr[] = {7, 10, 4, 3, 20, 15};
System.out.println(findKthSmallest(arr, 5));
System.out.println(findKthSmallest2(arr, 5));
System.out.println(findKthSmallest3(arr, 5));
System.out.println(findKthLargest(arr, 5));
}
}
|
[
"kinshuk.ram@gmail.com"
] |
kinshuk.ram@gmail.com
|
58db3cf3e9e9fc06e1de06ebd5b296c5ee407f86
|
6811fd178ae01659b5d207b59edbe32acfed45cc
|
/jira-project/jira-components/jira-tests-parent/jira-tests-unit/src/test/java/com/atlassian/jira/action/admin/MockAttributesBuilder.java
|
3212ec950876ba143b4938c3eecd5a46431ad47d
|
[] |
no_license
|
xiezhifeng/mysource
|
540b09a1e3c62614fca819610841ddb73b12326e
|
44f29e397a6a2da9340a79b8a3f61b3d51e331d1
|
refs/heads/master
| 2023-04-14T00:55:23.536578
| 2018-04-19T11:08:38
| 2018-04-19T11:08:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,174
|
java
|
package com.atlassian.jira.action.admin;
import java.util.Map;
import java.util.TreeMap;
import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.xml.sax.Attributes;
/**
* Builder for attributes
*
* @since v6.1
*/
class MockAttributesBuilder
{
private static final String ID = "id";
private final Map<String, String> map = new TreeMap<String, String>();
MockAttributesBuilder id(String id)
{
map.put(ID, id);
return this;
}
MockAttributesBuilder attr(String key, String value)
{
map.put(key, value);
return this;
}
Attributes build()
{
final Attributes mock = Mockito.mock(Attributes.class);
Mockito.when(mock.getValue(Mockito.anyString())).thenAnswer(new Answer<Object>()
{
@Override
public Object answer(InvocationOnMock invocation) throws Throwable
{
final Object[] args = invocation.getArguments();
final String key = (String) args[0];
return map.get(key);
}
});
return mock;
}
}
|
[
"moink635@gmail.com"
] |
moink635@gmail.com
|
2d2c7d5aa548d8cf3ac78dbe0f419d80ff8a8877
|
6811fd178ae01659b5d207b59edbe32acfed45cc
|
/jira-project/jira-components/jira-tests-parent/jira-tests-unit/src/test/java/com/atlassian/jira/entity/TestNamesInEntityModelXml.java
|
3bba85cd38664926e6f6c484b11cebc67cc989b8
|
[] |
no_license
|
xiezhifeng/mysource
|
540b09a1e3c62614fca819610841ddb73b12326e
|
44f29e397a6a2da9340a79b8a3f61b3d51e331d1
|
refs/heads/master
| 2023-04-14T00:55:23.536578
| 2018-04-19T11:08:38
| 2018-04-19T11:08:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,034
|
java
|
package com.atlassian.jira.entity;
import java.io.InputStream;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import org.dom4j.DocumentException;
import org.hamcrest.Matchers;
import org.junit.Test;
import static org.junit.Assert.assertThat;
/**
* This test is to validate that object names in entitymodel.xml files does not exceeded 30 characters as this is limit
* in oracle db. see ORA-00972 for reference
*
* @since v6.2
*/
public class TestNamesInEntityModelXml
{
@Test
public void testThatObjectNamesAreShorterThan30Characters() throws DocumentException, XMLStreamException
{
final InputStream entities = getClass().getResourceAsStream("/entitydefs/entitymodel.xml");
final XMLInputFactory xmlInputFactory = XMLInputFactory.newInstance();
xmlInputFactory.setProperty(XMLInputFactory.SUPPORT_DTD, false);
final XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(entities);
while (xmlStreamReader.hasNext())
{
final int next = xmlStreamReader.next();
if (next == XMLStreamReader.START_ELEMENT)
{
if (xmlStreamReader.getAttributeCount() > 0)
{
for (int i = 0; i < xmlStreamReader.getAttributeCount(); i++)
{
final String attributeName = xmlStreamReader.getAttributeName(i).getLocalPart();
if(attributeName.equals("name") || attributeName.equals("table-name"))
{
final String attributeValue = xmlStreamReader.getAttributeValue(i);
assertThat("All object names should be no more than 30 characters see ORA-00972 for reference "+attributeName+"=\""+attributeValue+"\"", attributeValue.length(), Matchers.lessThanOrEqualTo(30));
}
}
}
}
}
}
}
|
[
"moink635@gmail.com"
] |
moink635@gmail.com
|
199dee50f92b3a909020d1a1e342715f2c28bfea
|
e47d2faa2d5ee992ba5d2da965dcba19deb092e6
|
/processor/src/test/fixtures/expected/com/example/prop/React4j_BoolJavaBeanPropModel.java
|
b5a3061d09600689cd916b8da434b3a6c10f1f5f
|
[
"Apache-2.0"
] |
permissive
|
react4j/react4j
|
95e13c276126973f67b0e4888c2eb4b7775d9efc
|
dadbc3283943cd2c5bc78420e38f8ac4e6888dfe
|
refs/heads/master
| 2023-02-07T19:26:30.934517
| 2023-01-31T02:16:47
| 2023-01-31T02:16:47
| 104,152,070
| 35
| 0
|
Apache-2.0
| 2023-01-23T05:07:51
| 2017-09-20T01:55:55
|
Java
|
UTF-8
|
Java
| false
| false
| 3,327
|
java
|
package com.example.prop;
import arez.Disposable;
import arez.annotations.ArezComponent;
import arez.annotations.Feature;
import arez.annotations.SuppressArezWarnings;
import java.util.Objects;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.annotation.processing.Generated;
import jsinterop.annotations.JsConstructor;
import jsinterop.base.Js;
import jsinterop.base.JsPropertyMap;
import react4j.React;
import react4j.ReactNode;
import react4j.internal.OnComponentWillUnmount;
import react4j.internal.OnShouldComponentUpdate;
import react4j.internal.ViewConstructorFunction;
@SuppressArezWarnings("Arez:UnnecessaryAllowEmpty")
@ArezComponent(
name = "com_example_prop_BoolJavaBeanPropModel",
disposeNotifier = Feature.DISABLE,
sting = Feature.DISABLE,
allowEmpty = true
)
@Generated("react4j.processor.React4jProcessor")
abstract class React4j_BoolJavaBeanPropModel extends BoolJavaBeanPropModel {
@Nonnull
private final react4j.internal.NativeView $$react4j$$_nativeView;
React4j_BoolJavaBeanPropModel(@Nonnull final react4j.internal.NativeView $$react4j$$_nativeView) {
this.$$react4j$$_nativeView = Objects.requireNonNull( $$react4j$$_nativeView );
}
@Nonnull
private static ViewConstructorFunction getConstructorFunction() {
final ViewConstructorFunction viewConstructor = NativeView::new;
if ( React.enableViewNames() ) {
Js.asPropertyMap( viewConstructor ).set( "displayName", "BoolJavaBeanPropModel" );
}
return viewConstructor;
}
@Override
boolean isFoo() {
return $$react4j$$_nativeView.inputs().getAsAny( Inputs.foo ).asBoolean();
}
private boolean $$react4j$$_shouldComponentUpdate(
@Nullable final JsPropertyMap<Object> nextInputs) {
assert null != nextInputs;
final JsPropertyMap<Object> inputs = $$react4j$$_nativeView.inputs();
if ( !Js.isTripleEqual( inputs.get( Inputs.foo ), nextInputs.get( Inputs.foo ) ) ) {
return true;
}
return false;
}
private void $$react4j$$_componentWillUnmount() {
((Arez_React4j_BoolJavaBeanPropModel) this).dispose();
}
@Nullable
ReactNode $$react4j$$_render() {
assert Disposable.isNotDisposed( this );
return render();
}
static final class Factory {
@Nonnull
static final ViewConstructorFunction TYPE = getConstructorFunction();
}
static final class Inputs {
static final String foo = React.shouldMinimizeInputKeys() ? "a" : "foo";
}
private static final class NativeView extends react4j.internal.NativeView implements OnShouldComponentUpdate, OnComponentWillUnmount {
@Nonnull
private final React4j_BoolJavaBeanPropModel $$react4j$$_view;
@JsConstructor
NativeView(@Nullable final JsPropertyMap<Object> inputs) {
super( inputs );
$$react4j$$_view = new Arez_React4j_BoolJavaBeanPropModel( this );
}
@Override
public final boolean shouldComponentUpdate(@Nonnull final JsPropertyMap<Object> nextInputs) {
return $$react4j$$_view.$$react4j$$_shouldComponentUpdate( nextInputs );
}
@Override
public final void componentWillUnmount() {
$$react4j$$_view.$$react4j$$_componentWillUnmount();
}
@Override
@Nullable
public final ReactNode render() {
return $$react4j$$_view.$$react4j$$_render();
}
}
}
|
[
"peter@realityforge.org"
] |
peter@realityforge.org
|
fab795140419060f8245bc4c136b51f7d5ff2c45
|
00b85668294e2b729d4649b11309ab785e6adef6
|
/eclipse/1110f_TP3_TP4/src/uml/Stereotype.java
|
14c50e98419776ce908888e345e11f1593367203
|
[] |
no_license
|
Doelia/M2-modeles
|
d61eb955ba4a48ef473f17164847db90c091261f
|
1030fff0775e60cc2a002d624bc07a8825d355ff
|
refs/heads/master
| 2021-01-25T05:34:08.814437
| 2015-12-02T09:34:39
| 2015-12-02T09:34:39
| 42,939,571
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,083
|
java
|
/**
*/
package uml;
import java.util.Map;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Stereotype</b></em>'.
* <!-- end-user-doc -->
*
* <!-- begin-model-doc -->
* A stereotype defines how an existing metaclass may be extended, and enables the use of platform or domain specific terminology or notation in place of, or in addition to, the ones used for the extended metaclass.
* <!-- end-model-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link uml.Stereotype#getIcon <em>Icon</em>}</li>
* </ul>
*
* @see uml.UmlPackage#getStereotype()
* @model
* @generated
*/
public interface Stereotype extends uml.Class {
/**
* Returns the value of the '<em><b>Icon</b></em>' containment reference list.
* The list contents are of type {@link uml.Image}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Stereotype can change the graphical appearance of the extended model element by using attached icons. When this association is not null, it references the location of the icon content to be displayed within diagrams presenting the extended model elements.
* <!-- end-model-doc -->
* @return the value of the '<em>Icon</em>' containment reference list.
* @see uml.UmlPackage#getStereotype_Icon()
* @model containment="true" ordered="false"
* @generated
*/
EList<Image> getIcon();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Stereotype names should not clash with keyword names for the extended model element. true
* @param diagnostics The chain of diagnostics to which problems are to be appended.
* @param context The cache of context-specific information.
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean name_not_clash(DiagnosticChain diagnostics, Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* A Stereotype may only generalize or specialize another Stereotype. generalization.general->forAll(e |e.oclIsKindOf(Stereotype)) and generalization.specific->forAll(e | e.oclIsKindOf(Stereotype))
* @param diagnostics The chain of diagnostics to which problems are to be appended.
* @param context The cache of context-specific information.
* <!-- end-model-doc -->
* @model
* @generated
*/
boolean generalize(DiagnosticChain diagnostics, Map<Object, Object> context);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Creates a(n) (required) extension of the specified metaclass with this stereotype.
* @param metaclass The metaclass for the new extension.
* @param isRequired Whether the new extension should be required.
* <!-- end-model-doc -->
* @model required="true" ordered="false" metaclassRequired="true" metaclassOrdered="false" isRequiredDataType="uml.Boolean" isRequiredRequired="true" isRequiredOrdered="false"
* @generated
*/
Extension createExtension(uml.Class metaclass, boolean isRequired);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Retrieves the profile that owns this stereotype.
* <!-- end-model-doc -->
* @model kind="operation" ordered="false"
* @generated
*/
Profile getProfile();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Retrieves the localized keyword for this stereotype.
* <!-- end-model-doc -->
* @model kind="operation" dataType="uml.String" required="true" ordered="false"
* @generated
*/
String getKeyword();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Retrieves the keyword for this stereotype, localized if indicated.
* @param localize Whether to localize the keyword.
* <!-- end-model-doc -->
* @model dataType="uml.String" required="true" ordered="false" localizeDataType="uml.Boolean" localizeRequired="true" localizeOrdered="false"
* @generated
*/
String getKeyword(boolean localize);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Retrieves the metaclasses extended by this stereotype.
* <!-- end-model-doc -->
* @model kind="operation" ordered="false"
* @generated
*/
EList<uml.Class> getExtendedMetaclasses();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Retrieves all the metaclasses extended by this stereotype, including the metaclasses extended by its superstereotypes.
* <!-- end-model-doc -->
* @model kind="operation" ordered="false"
* @generated
*/
EList<uml.Class> getAllExtendedMetaclasses();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Retrieves the current definition (Ecore representation) of this stereotype.
* <!-- end-model-doc -->
* @model kind="operation" ordered="false"
* @generated
*/
EClass getDefinition();
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Creates an icon with the specified location for this stereotype.
* @param location The location for the new icon.
* <!-- end-model-doc -->
* @model required="true" ordered="false" locationDataType="uml.String" locationRequired="true" locationOrdered="false"
* @generated
*/
Image createIcon(String location);
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Creates an icon with the specified format and content for this stereotype.
* @param format The format for the new icon.
* @param content The content for the new icon.
* <!-- end-model-doc -->
* @model required="true" ordered="false" formatDataType="uml.String" formatRequired="true" formatOrdered="false" contentDataType="uml.String" contentRequired="true" contentOrdered="false"
* @generated
*/
Image createIcon(String format, String content);
} // Stereotype
|
[
"kyxalia@gmail.com"
] |
kyxalia@gmail.com
|
10d2c6690d595d2a1e4182d0efbf8eed796f01be
|
cfe621e8c36e6ac5053a2c4f7129a13ea9f9f66b
|
/AndroidApplications/org.wopnersoft.unitconverter-69/src/com/wopnersoft/unitconverter/plus/util/ap.java
|
8d16376922b813fb4b44fe7473764ed2f2d28e79
|
[] |
no_license
|
linux86/AndoirdSecurity
|
3165de73b37f53070cd6b435e180a2cb58d6f672
|
1e72a3c1f7a72ea9cd12048d9874a8651e0aede7
|
refs/heads/master
| 2021-01-11T01:20:58.986651
| 2016-04-05T17:14:26
| 2016-04-05T17:14:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 589
|
java
|
package com.wopnersoft.unitconverter.plus.util;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.net.Uri;
// compiled from: ProGuard
class ap implements OnClickListener {
private final /* synthetic */ Context a;
ap(Context context) {
this.a = context;
}
public void onClick(DialogInterface dialogInterface, int i) {
this.a.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(this.a.getString(2131361817))));
}
}
|
[
"jack.luo@mail.utoronto.ca"
] |
jack.luo@mail.utoronto.ca
|
eef4c140865d241c5e3d73cd0471e9aa4be06c87
|
46168d2aac88ea25fc1737e2d4a92aaac266d571
|
/core/src/main/java/com/nfsdb/net/ha/krb/KrbAuthenticator.java
|
778ac259c3a0b3ece6c3bb16ba81c0c0b1d30fde
|
[] |
no_license
|
wang-shun/nfsdb
|
6845a6da12fe4a918943395c7eeb40b6817404f0
|
02a5aaa4b043f49c0614880e34fd523843ad1981
|
refs/heads/master
| 2020-04-10T15:22:41.452217
| 2016-03-02T00:07:32
| 2016-03-02T00:07:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,043
|
java
|
/*******************************************************************************
* _ _ ___ ___ _ _
* | \| | __/ __| __| | |__
* | .` | _|\__ \/ _` | '_ \
* |_|\_|_| |___/\__,_|_.__/
*
* Copyright (c) 2014-2016. The NFSdb project and its contributors.
*
* 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.nfsdb.net.ha.krb;
import com.nfsdb.JournalKey;
import com.nfsdb.net.ha.auth.AuthorizationHandler;
import com.nfsdb.std.ObjList;
public class KrbAuthenticator implements AuthorizationHandler {
private final String krb5Conf;
private final String principal;
private final String keyTab;
private final String serviceName;
private final KrbAuthorizer authorizer;
public KrbAuthenticator(String krb5Conf, String principal, String keyTab, String serviceName, KrbAuthorizer authorizer) {
this.krb5Conf = krb5Conf;
this.principal = principal;
this.keyTab = keyTab;
this.serviceName = serviceName;
this.authorizer = authorizer;
}
@Override
public boolean isAuthorized(byte[] token, ObjList<JournalKey> requestedKeys) throws Exception {
try (ActiveDirectoryConnection connection = new ActiveDirectoryConnection(krb5Conf, principal, keyTab)) {
String principal = connection.decodeServiceToken(serviceName, token);
return authorizer != null ? authorizer.isAuthorized(principal, requestedKeys) : principal != null;
}
}
}
|
[
"bluestreak@gmail.com"
] |
bluestreak@gmail.com
|
103833aeb61f2f62fcc8890eb47681ff68cb2d95
|
be28a7b64a4030f74233a79ebeba310e23fe2c3a
|
/generated-tests/rmosa/tests/s1024/107_weka/evosuite-tests/weka/core/Optimization_ESTest_scaffolding.java
|
4cc68c74743e2ed0e7ee15497eaa60dd003bc06c
|
[
"MIT"
] |
permissive
|
blindsubmissions/icse19replication
|
664e670f9cfcf9273d4b5eb332562a083e179a5f
|
42a7c172efa86d7d01f7e74b58612cc255c6eb0f
|
refs/heads/master
| 2020-03-27T06:12:34.631952
| 2018-08-25T11:19:56
| 2018-08-25T11:19:56
| 146,074,648
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,603
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Thu Aug 23 16:33:53 GMT 2018
*/
package weka.core;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
import static org.evosuite.shaded.org.mockito.Mockito.*;
@EvoSuiteClassExclude
public class Optimization_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "weka.core.Optimization";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {}
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("file.encoding", "UTF-8");
java.lang.System.setProperty("java.awt.headless", "true");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
java.lang.System.setProperty("user.country", "US");
java.lang.System.setProperty("user.dir", "/home/ubuntu/evosuite_readability_gen/projects/107_weka");
java.lang.System.setProperty("user.home", "/home/ubuntu");
java.lang.System.setProperty("user.language", "en");
java.lang.System.setProperty("user.name", "ubuntu");
java.lang.System.setProperty("user.timezone", "Etc/UTC");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(Optimization_ESTest_scaffolding.class.getClassLoader() ,
"weka.core.Optimization$DynamicIntArray",
"weka.core.matrix.LinearRegression",
"weka.core.matrix.QRDecomposition",
"weka.core.matrix.CholeskyDecomposition",
"weka.core.matrix.EigenvalueDecomposition",
"weka.core.TechnicalInformationHandler",
"weka.core.matrix.LUDecomposition",
"weka.core.RevisionUtils",
"weka.core.Optimization",
"weka.core.matrix.Matrix",
"weka.core.TechnicalInformation",
"weka.core.RevisionHandler",
"weka.core.matrix.Maths",
"weka.core.matrix.SingularValueDecomposition"
);
}
private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException {
mock(Class.forName("weka.core.Optimization", false, Optimization_ESTest_scaffolding.class.getClassLoader()));
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(Optimization_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"weka.core.Optimization",
"weka.core.Optimization$DynamicIntArray",
"weka.core.TechnicalInformation$Type",
"weka.core.TechnicalInformation$Field",
"weka.core.RevisionUtils",
"weka.core.matrix.Matrix",
"weka.core.matrix.LUDecomposition",
"weka.core.matrix.CholeskyDecomposition",
"weka.core.matrix.SingularValueDecomposition",
"weka.core.Utils",
"weka.core.matrix.EigenvalueDecomposition",
"weka.core.matrix.Maths",
"weka.core.matrix.LinearRegression",
"weka.core.matrix.QRDecomposition"
);
}
}
|
[
"my.submission.blind@gmail.com"
] |
my.submission.blind@gmail.com
|
1f512aa09de866735aeaffb6b261ca409df16bdb
|
c1ce48329a3fa58ada09df239dc464dc681a2ce6
|
/src/main/java/com/zjldemo/demo/Common/Page.java
|
30cc20b2e57f663c9257550b8b17faa4fca7baa2
|
[] |
no_license
|
ysyl/wechat_demo
|
c631c99a8d94eb7d8560efac511b077f66b19fa7
|
c6a562eec25a37730bea7c9889c0f15a38fe6bc9
|
refs/heads/master
| 2020-07-03T01:58:23.390955
| 2019-08-11T10:26:18
| 2019-08-11T10:26:18
| 201,749,953
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,010
|
java
|
package com.zjldemo.demo.Common;
import java.io.Serializable;
import java.util.List;
public class Page<T> implements Serializable {
private int pageNum;
private int pageSize;
private List<T> data;
public Page(int pageNum, int pageSize, List<T> data) {
this.pageNum = pageNum;
this.pageSize = pageSize;
this.data = data;
}
public int getPageNum() {
return pageNum;
}
public void setPageNum(int pageNum) {
this.pageNum = pageNum;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public List<T> getData() {
return data;
}
@Override
public String toString() {
return "Page{" +
"pageNum=" + pageNum +
", pageSize=" + pageSize +
", data=" + data +
'}';
}
public void setData(List<T> data) {
this.data = data;
}
}
|
[
"zhoujian1237@gmail.com"
] |
zhoujian1237@gmail.com
|
8d23659b4576ae802f4a3a5dc59480c9ef255e1a
|
81b3984cce8eab7e04a5b0b6bcef593bc0181e5a
|
/android/CarLife/app/src/main/java/com/baidu/ufosdk/p247a/C5166b.java
|
fd79208f48836b3fe9ebb74f10f544bf507d7ba7
|
[] |
no_license
|
ausdruck/Demo
|
20ee124734d3a56b99b8a8e38466f2adc28024d6
|
e11f8844f4852cec901ba784ce93fcbb4200edc6
|
refs/heads/master
| 2020-04-10T03:49:24.198527
| 2018-07-27T10:14:56
| 2018-07-27T10:14:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,740
|
java
|
package com.baidu.ufosdk.p247a;
import android.content.Context;
import com.baidu.ufosdk.C5167a;
import com.baidu.ufosdk.UfoSDK;
import com.baidu.ufosdk.p251e.C5180a;
import com.baidu.ufosdk.util.C5210c;
/* compiled from: GetHistoryListThread */
/* renamed from: com.baidu.ufosdk.a.b */
public final class C5166b extends Thread {
/* renamed from: a */
private Context f21323a;
/* renamed from: b */
private boolean f21324b = false;
/* renamed from: c */
private boolean f21325c = false;
/* renamed from: d */
private boolean f21326d = false;
/* renamed from: e */
private final long f21327e = 300;
/* renamed from: f */
private String f21328f = "";
public C5166b(Context context) {
this.f21323a = context;
}
/* renamed from: a */
public final void m17553a() {
this.f21324b = true;
}
/* renamed from: b */
public final void m17554b() {
this.f21324b = false;
}
public final void run() {
this.f21328f = UfoSDK.clientid;
if (this.f21328f.length() != 0) {
while (!this.f21324b) {
try {
Thread.sleep(300);
} catch (Throwable e) {
C5210c.m17733a("Interrupted!", e);
}
if (!this.f21325c) {
C5180a.m17574c(this.f21323a);
}
try {
if (!this.f21326d) {
Thread.sleep((long) (C5167a.ao * 1000));
}
} catch (InterruptedException e2) {
C5210c.m17736d("GetChatThread Interrupted! Maybe it's time to wakeup.");
}
}
}
}
}
|
[
"objectyan@gmail.com"
] |
objectyan@gmail.com
|
664d5c3ed4820dfdb2713c0f2ea768f76cab180a
|
c54062a41a990c192c3eadbb9807e9132530de23
|
/solutions/collectionsautoboxing/src/main/java/collectionsautoboxing/IntegerOperations.java
|
bd6d0b47fd53f024d2de898a870e6be8da25809b
|
[] |
no_license
|
Training360/strukturavalto-java-public
|
0d76a9dedd7f0a0a435961229a64023931ec43c7
|
82d9b3c54437dd7c74284f06f9a6647ec62796e3
|
refs/heads/master
| 2022-07-27T15:07:57.915484
| 2021-12-01T08:57:06
| 2021-12-01T08:57:06
| 306,286,820
| 13
| 115
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 679
|
java
|
package collectionsautoboxing;
import java.util.ArrayList;
import java.util.List;
public class IntegerOperations {
public List<Integer> createList(int... numbers){
List<Integer> integerList = new ArrayList<>();
for (int i : numbers){
integerList.add(i);
}
return integerList;
}
public int sumIntegerList(List<Integer> integerList){
int sum = 0;
for (int i : integerList){
sum += i;
}
return sum;
}
public int sumIntegerObjects(Integer... integers){
int sum = 0;
for (Integer i : integers){
sum += i;
}
return sum;
}
}
|
[
"viczian.istvan@gmail.com"
] |
viczian.istvan@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.