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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c181cd75b6fc07aff8620292c55294b21d6ca75d
|
400211f8ba8ee352ce4a63a8c0a768ecf46aca65
|
/src/dao/cn/com/atnc/ioms/dao/faultmng/impl/FaultHandleDaoImpl.java
|
af530cf42acca4c138e01b5b22f5a7cbfa713187
|
[] |
no_license
|
jyf666/IOMS
|
76003040489dc8f594c88ff35c07bd77d1447da4
|
6d3c8428c06298bee8d1f056aab7b21d81fd4ce2
|
refs/heads/master
| 2021-05-10T18:38:37.276724
| 2018-01-19T14:50:34
| 2018-01-19T14:50:34
| 118,130,382
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,669
|
java
|
package cn.com.atnc.ioms.dao.faultmng.impl;
import cn.com.atnc.ioms.dao.MyBaseDao;
import cn.com.atnc.ioms.dao.faultmng.IFaultHandleDao;
import cn.com.atnc.ioms.entity.faultmng.FaultHandle;
import cn.com.atnc.ioms.model.faultmng.FaultHandleQueryModel;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository;
/**
* 故障处置管理实现类
*
* @author duanyanlin
* 2016年6月17日 下午2:54:31
*/
@Repository("faultHandleDao")
public class FaultHandleDaoImpl extends MyBaseDao<FaultHandle> implements
IFaultHandleDao {
/**
* 查询故障处理记录
* @author duanyanlin
* @date 2016年6月17日下午2:59:27
* @return List 处置记录
* @param qm 事件处置查询model
*/
@Override
@SuppressWarnings("unchecked")
public List<FaultHandle> queryList(FaultHandleQueryModel qm) {
StringBuilder hql = new StringBuilder(" from FaultHandle where 1=1 ");
List<Object> params = new ArrayList<>();
//故障单编号
if (!StringUtils.isEmpty(qm.getFaultId())) {
hql.append(" and faultId = ? ");
params.add(qm.getFaultId());
}
//操作人
if (!ObjectUtils.equals(qm.getCurrentUser(),null)) {
hql.append(" and operator = ? ");
params.add(qm.getCurrentUser());
}
//操作类型
if (!ObjectUtils.equals(qm.getFaultHandelType(),null)) {
hql.append(" and handleType = ? ");
params.add(qm.getFaultHandelType());
}
//操作时间倒序排列
hql.append(" order by operatTime desc ");
return (List<FaultHandle>) super.queryList(hql.toString(),
params.toArray());
}
}
|
[
"1206146862@qq.com"
] |
1206146862@qq.com
|
d2500f9d6932778305ac335230c545b65ed3046c
|
66ec5b17060e750c800f3b9a4f6b33b2a933d702
|
/AndroidAsync/src/com/koushikdutta/async/http/body/ByteBufferListRequestBody.java
|
07c3edc1dac05972d163e20e4010ff0aa9af7c86
|
[
"Apache-2.0"
] |
permissive
|
RocChing/AndroidAsync
|
7c5f2c0b2dd00b7968c8029334121b3a669cfaca
|
f547cdec920e2fba23b0b5afb6c79f676d3eff2a
|
refs/heads/master
| 2020-09-14T11:39:27.136555
| 2020-02-05T02:14:18
| 2020-02-05T02:14:18
| 223,118,496
| 0
| 0
|
NOASSERTION
| 2020-02-05T02:14:19
| 2019-11-21T07:53:37
| null |
UTF-8
|
Java
| false
| false
| 1,420
|
java
|
package com.koushikdutta.async.http.body;
import com.koushikdutta.async.ByteBufferList;
import com.koushikdutta.async.DataEmitter;
import com.koushikdutta.async.DataSink;
import com.koushikdutta.async.Util;
import com.koushikdutta.async.callback.CompletedCallback;
import com.koushikdutta.async.http.AsyncHttpRequest;
import com.koushikdutta.async.parser.ByteBufferListParser;
public class ByteBufferListRequestBody implements AsyncHttpRequestBody<ByteBufferList> {
public ByteBufferListRequestBody() {
}
ByteBufferList bb;
public ByteBufferListRequestBody(ByteBufferList bb) {
this.bb = bb;
}
@Override
public void write(AsyncHttpRequest request, DataSink sink, CompletedCallback completed) {
Util.writeAll(sink, bb, completed);
}
@Override
public void parse(DataEmitter emitter, CompletedCallback completed) {
new ByteBufferListParser().parse(emitter).setCallback((e, result) -> {
bb = result;
completed.onCompleted(e);
});
}
public static String CONTENT_TYPE = "application/binary";
@Override
public String getContentType() {
return CONTENT_TYPE;
}
@Override
public boolean readFullyOnRequest() {
return true;
}
@Override
public int length() {
return bb.remaining();
}
@Override
public ByteBufferList get() {
return bb;
}
}
|
[
"koushd@gmail.com"
] |
koushd@gmail.com
|
4f420302ffe1ae40c5cd58fe5c497034efc6ca7f
|
87bc4ed16f191e382bc64798d5ad28ff72d7742a
|
/src/main/java/com/fanwe/g419/model/RoomModel.java
|
94a420d03f85932543089badc06bd9f0e9e59810
|
[] |
no_license
|
qq674684107/fanweHybridLive
|
cf847515123e33438ef4808c884ad0df5fb6c8a6
|
f043be1fba7aa96e50f2add8dbe1500cf6c6e4c0
|
refs/heads/master
| 2020-06-10T06:49:28.554572
| 2019-04-01T10:53:54
| 2019-04-01T10:54:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 711
|
java
|
package com.fanwe.g419.model;
public class RoomModel
{
private int room_id;
private String group_id;
private String user_id; // 主播id
private String head_image; // 主播头像
public int getRoom_id()
{
return room_id;
}
public void setRoom_id(int room_id)
{
this.room_id = room_id;
}
public String getGroup_id()
{
return group_id;
}
public void setGroup_id(String group_id)
{
this.group_id = group_id;
}
public String getUser_id()
{
return user_id;
}
public void setUser_id(String user_id)
{
this.user_id = user_id;
}
public String getHead_image()
{
return head_image;
}
public void setHead_image(String head_image)
{
this.head_image = head_image;
}
}
|
[
"liujun@yimidida.com"
] |
liujun@yimidida.com
|
eb3b54818af90a410ee2bf3818513be707af2458
|
acd9b11687fd0b5d536823daf4183a596d4502b2
|
/java-client/src/main/java/co/elastic/clients/json/UnexpectedJsonEventException.java
|
0f3c68685254530db99174168ac4842d5db17bd1
|
[
"Apache-2.0"
] |
permissive
|
szabosteve/elasticsearch-java
|
75be71df80a4e010abe334a5288b53fa4a2d6d5e
|
79a1249ae77be2ce9ebd5075c1719f3c8be49013
|
refs/heads/main
| 2023-08-24T15:36:51.047105
| 2021-10-01T14:23:34
| 2021-10-01T14:23:34
| 399,091,850
| 0
| 0
|
Apache-2.0
| 2021-08-23T12:15:19
| 2021-08-23T12:15:19
| null |
UTF-8
|
Java
| false
| false
| 1,407
|
java
|
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package co.elastic.clients.json;
import jakarta.json.stream.JsonParser;
import jakarta.json.stream.JsonParser.Event;
import jakarta.json.stream.JsonParsingException;
public class UnexpectedJsonEventException extends JsonParsingException {
public UnexpectedJsonEventException(JsonParser parser, Event event) {
super("Unexpected JSON event [" + event + "]", parser.getLocation());
}
public UnexpectedJsonEventException(JsonParser parser, Event event, Event expected) {
super("Unexpected JSON event [" + event + "] instead of [" + expected + "]", parser.getLocation());
}
}
|
[
"sylvain@elastic.co"
] |
sylvain@elastic.co
|
64879800cec9d97df9b4507464aac7632e04ae2d
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/65/org/apache/commons/math/optimization/fitting/GaussianParametersGuesser_getInterpolationPointsForY_189.java
|
4c3282b6b7f4e068cd1faf42043e06b09efc8a09
|
[] |
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,578
|
java
|
org apach common math optim fit
guess paramet
link parametr gaussian function parametricgaussianfunct base observ
point
version revis date
gaussian paramet guesser gaussianparametersguess
bound interpol point point
suitabl determin
param point point interpol
param start idx startidx index point start search
interpol bound point
param idx step idxstep index step search interpol bound point
param determin
arrai point suitabl determin
illeg argument except illegalargumentexcept idx step idxstep
rang except outofrangeexcept code code
rang code point code
weight observ point weightedobservedpoint interpol point getinterpolationpointsfori weight observ point weightedobservedpoint point
start idx startidx idx step idxstep
rang except outofrangeexcept
idx step idxstep
allow except zeronotallowedexcept
start idx startidx
idx step idxstep idx step idxstep idx step idxstep point length
idx step idxstep
isbetween point geti point idx step idxstep geti
idx step idxstep
weight observ point weightedobservedpoint point idx step idxstep point
weight observ point weightedobservedpoint point point idx step idxstep
min mini doubl posit infin
max maxi doubl neg infin
weight observ point weightedobservedpoint point point
min mini math min min mini point geti
max maxi math max max maxi point geti
rang except outofrangeexcept min mini max maxi
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
d396ca09250f5ec5905c16935b63a1fa5712cfd5
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/4/4_73632020a90c10b50a7fe04d7447f311297d6353/Sender/4_73632020a90c10b50a7fe04d7447f311297d6353_Sender_t.java
|
de8271477bf19a995ed36f26b37434aa311d389d
|
[] |
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,103
|
java
|
package bck;
import bck.Backup;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.InetAddress;
import java.net.MulticastSocket;
import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
/* thread que vai enviar chunks para fazer backup no receiver*/
public class Sender extends Thread {
MulticastSocket socket = null;
InetAddress address = null;
int MC;
int MD;
String sha = "";
int replication_degree;
public Sender(InetAddress ad, int m_c, int m_d, String sh, int rd) throws IOException {
address = ad;
MC = m_c;
MD = m_d;
sha = sh;
replication_degree = rd;
socket = new MulticastSocket(MD);
socket.joinGroup(address);
}
public void run() {
System.out.println("Sending: " + Backup.getMapShaFiles().get(this.sha).getName());
int n = 0;
HashMap<Integer, byte[]> file_to_send_chunks = Backup.getMapChunkFiles().get(sha);
while (file_to_send_chunks.get(n) != null) {
//PUTCHUNK <Version> <FileId> <ChunkNo> <ReplicationDeg><CRLF><CRLF><Body>
System.out.println("tamanho dos chunks em falta "+Backup.getMissingChunks());
String msg = "PUTCHUNK " + Backup.getVersion() + " " + this.sha + " " + n +
" " + replication_degree + "\n\n" + file_to_send_chunks.get(n);
DatagramPacket chunk = new DatagramPacket(msg.getBytes(), msg.length(), this.address, this.MD);
try {
Thread.sleep(10);
socket.send(chunk);
Backup.getMissingChunks(sha).put(n, replication_degree);
} catch (Exception ex) {
Logger.getLogger(Sender.class.getName()).log(Level.SEVERE, null, ex);
}
n++;
}
System.out.print("Tentanto enviar chunks em falta... ");
System.out.println(Backup.getMissingChunks(sha).size());
Utils.flag_sending = 0;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
8512a222623a273527d9562bb898a1b0c8178685
|
376e849705ea05d6f271a919f32c93e72690f0ad
|
/leasing-identity-parent/leasing-identity-service/src/main/java/com/cloudkeeper/leasing/identity/repository/HiddenIssueRepository.java
|
5f6c27a0de5a6cf9b33a581d134bc61e805ed2c7
|
[] |
no_license
|
HENDDJ/EngineeringApi
|
314198ce8b91212b1626decde2df1134cb1863c8
|
3bcc2051d2877472eda4ac0fce42bee81e81b0be
|
refs/heads/master
| 2020-05-16T03:41:05.335371
| 2019-07-31T08:21:57
| 2019-07-31T08:21:57
| 182,734,226
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 369
|
java
|
package com.cloudkeeper.leasing.identity.repository;
import com.cloudkeeper.leasing.identity.domain.HiddenIssue;
import com.cloudkeeper.leasing.base.repository.BaseRepository;
import org.springframework.stereotype.Repository;
/**
* 隐患信息 repository
* @author lxw
*/
@Repository
public interface HiddenIssueRepository extends BaseRepository<HiddenIssue> {
}
|
[
"243485908@qq.com"
] |
243485908@qq.com
|
eab189d24de44154944aeda3ed57860907b8a148
|
f166d3ab1d31b33669ec48ea0144853646336dce
|
/app/src/main/java/com/cicinnus/cateye/tools/LocationUtil.java
|
d4e6928ae5134a44fcc5244233afa41b5c44b944
|
[
"MIT"
] |
permissive
|
Canglangweiwei/CatEye
|
4ebf86366876422e42aa4f73cbb5837c33523492
|
94a2fe5c1a74b42db11b54e3ceda0a0044feb13c
|
refs/heads/master
| 2020-04-23T14:32:58.549871
| 2019-06-03T06:57:02
| 2019-06-03T06:57:02
| 171,235,517
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,371
|
java
|
package com.cicinnus.cateye.tools;
import android.app.Activity;
import android.util.Log;
import com.amap.api.location.AMapLocation;
import com.amap.api.location.AMapLocationClient;
import com.amap.api.location.AMapLocationClientOption;
import com.amap.api.location.AMapLocationListener;
import java.lang.ref.WeakReference;
/**
* 高德定位工具类
*/
public class LocationUtil {
// 声明AMapLocationClient类对象
private AMapLocationClient mLocationClient;
// 声明AMapLocationClientOption对象
private AMapLocationClientOption mLocationOption = null;
// 定位信息
private AMapLocation mLocationInfo;
public LocationUtil setOnLocationChangeListener(OnLocationChangeListener onLocationChangeListener) {
this.onLocationChangeListener = onLocationChangeListener;
return this;
}
// 回调
private OnLocationChangeListener onLocationChangeListener;
public LocationUtil(final WeakReference<Activity> mContext) {
mLocationClient = new AMapLocationClient(mContext.get());
initOption();
mLocationClient.setLocationOption(mLocationOption);
mLocationClient.setLocationListener(new AMapLocationListener() {
@Override
public void onLocationChanged(AMapLocation amapLocation) {
if (amapLocation != null) {
if (amapLocation.getErrorCode() == 0) {
//可在其中解析amapLocation获取相应内容。
mLocationInfo = amapLocation;
if (onLocationChangeListener != null) {
onLocationChangeListener.onChange(amapLocation);
}
} else {
//定位失败时,可通过ErrCode(错误码)信息来确定失败的原因,errInfo是错误信息,详见错误码表。
Log.e("AmapError", "location Error, ErrCode:"
+ amapLocation.getErrorCode() + ", errInfo:"
+ amapLocation.getErrorInfo());
if (onLocationChangeListener != null) {
onLocationChangeListener.onLocateFail(amapLocation);
}
}
}
}
});
}
private void initOption() {
// 初始化AMapLocationClientOption对象
mLocationOption = new AMapLocationClientOption();
// 设置定位模式为AMapLocationMode.Hight_Accuracy,高精度模式。
// 获取最近3s内精度最高的一次定位结果:
// 设置setOnceLocationLatest(boolean b)接口为true,启动定位时SDK会返回最近3s内精度最高的一次定位结果。
// 如果设置其为true,setOnceLocation(boolean b)接口也会被设置为true,反之不会,默认为false。
mLocationOption.setOnceLocationLatest(true);
}
/**
* 开始定位
*/
public void startLocation() {
mLocationClient.setLocationOption(mLocationOption);
mLocationClient.startLocation();
}
/**
* 设置是否进行单次定位,默认true
*/
public LocationUtil setOnceLocation(boolean once) {
mLocationOption.setOnceLocation(once);
return this;
}
/**
* 设置定位精度模式
*/
public LocationUtil setLocationType(AMapLocationClientOption.AMapLocationMode mode) {
// 定位模式,默认为省电模式
AMapLocationClientOption.AMapLocationMode aMapLocationMode = mode;
mLocationOption.setLocationMode(aMapLocationMode);
return this;
}
/**
* 获取经度
*/
public double getLongitude() {
return mLocationInfo.getLongitude();
}
/**
* 获取维度
*/
public double getLatitude() {
return mLocationInfo.getLatitude();
}
/**
* 获取地址
*/
public String getAddress() {
return mLocationInfo.getAddress();
}
/**
* 停止定位,本地定位服务并不会被销毁
*/
public void stopLocation() {
mLocationClient.stopLocation();
}
/**
* 销毁定位客户端,同时销毁本地定位服务。
*/
public void destroyLocation() {
if (mLocationClient != null) {
mLocationClient.onDestroy();
mLocationClient = null;
}
}
public interface OnLocationChangeListener {
void onChange(AMapLocation amapLocation);
void onLocateFail(AMapLocation amapLocation);
}
}
|
[
"weiweistar@163.com"
] |
weiweistar@163.com
|
e0059fa9f2e7df635734231a4b939927a1bd718b
|
5b2c309c903625b14991568c442eb3a889762c71
|
/classes/com/e/a/a/a/c.java
|
1efd292d4ea70f6e026a9d7801e37c678b4326dd
|
[] |
no_license
|
iidioter/xueqiu
|
c71eb4bcc53480770b9abe20c180da693b2d7946
|
a7d8d7dfbaf9e603f72890cf861ed494099f5a80
|
refs/heads/master
| 2020-12-14T23:55:07.246659
| 2016-10-08T08:56:27
| 2016-10-08T08:56:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 341
|
java
|
package com.e.a.a.a;
import java.io.OutputStream;
public abstract interface c
extends d
{
public abstract void a(OutputStream paramOutputStream);
public abstract String c();
}
/* Location: E:\apk\xueqiu2\classes-dex2jar.jar!\com\e\a\a\a\c.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
8ffedb8d9d8d91175e15210292343dc3204ccfa0
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XRENDERING-418-13-14-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/listener/chaining/AbstractChainingListener_ESTest_scaffolding.java
|
292c11b86e6587931884318c105a0688c07304fe
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 466
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Apr 03 01:55:24 UTC 2020
*/
package org.xwiki.rendering.listener.chaining;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class AbstractChainingListener_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
5ba523b1cb4987ed3b93387d0587bff79c848a32
|
8dc0aa75638d619bc202952a7330af0f063079da
|
/src/com/cartmatic/estoresf/cmbehome/action/UcsNoticeRequest1005.java
|
7c3e81f2b052a64fa3ad35f73c099f4b698ce18b
|
[] |
no_license
|
1649865412/eStore
|
77c7eac2253ae2b3b9983b5b88d03a2f7860c95d
|
53dff738d3d87283bed95811a7ef31dadef5e563
|
refs/heads/master
| 2021-01-18T06:38:50.327396
| 2015-11-27T06:29:16
| 2015-11-27T06:29:16
| 38,037,604
| 1
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,132
|
java
|
package com.cartmatic.estoresf.cmbehome.action;
import com.cartmatic.estoresf.cmbehome.action.help.GsonUtils;
import com.google.gson.annotations.Expose;
public class UcsNoticeRequest1005 {
@Expose
private String Source;
@Expose
private String OptType;
@Expose
private String OrderNo;
@Expose
private String RefundNo;
@Expose
private String Amount;
@Expose
private String CState;
@Expose
private String CMsg;
@Expose
private String RefundTime;
public UcsNoticeRequest1005(String plainText) {
UcsNoticeRequest1005 noticeRequest= GsonUtils.fromJson(plainText,this.getClass());
if(noticeRequest!=null)
{
this.Source = noticeRequest.getSource();
this.OptType = noticeRequest.getOptType();
this.OrderNo = noticeRequest.getOrderNo();
this.RefundNo = noticeRequest.getRefundNo();
this.Amount = noticeRequest.getAmount();
this.CState = noticeRequest.getCState();
this.CMsg = noticeRequest.getCMsg();
this.RefundTime = noticeRequest.getRefundTime();
}
}
public String getSource() {
return Source;
}
public void setSource(String source) {
Source = source;
}
public String getOptType() {
return OptType;
}
public void setOptType(String optType) {
OptType = optType;
}
public String getOrderNo() {
return OrderNo;
}
public void setOrderNo(String orderNo) {
OrderNo = orderNo;
}
public String getRefundNo() {
return RefundNo;
}
public void setRefundNo(String refundNo) {
RefundNo = refundNo;
}
public String getAmount() {
return Amount;
}
public void setAmount(String amount) {
Amount = amount;
}
public String getCState() {
return CState;
}
public void setCState(String cState) {
CState = cState;
}
public String getCMsg() {
return CMsg;
}
public void setCMsg(String cMsg) {
CMsg = cMsg;
}
public String getRefundTime() {
return RefundTime;
}
public void setRefundTime(String refundTime) {
RefundTime = refundTime;
}
}
|
[
"1649865412@qq.com"
] |
1649865412@qq.com
|
8fd3fe95417f77d600c7cefc34873a70068cf846
|
3173887caf5893ea89639117a11de35d7a91ec9d
|
/org.jrebirth/core/src/main/java/org/jrebirth/core/concurrent/ConcurrentMessages.java
|
c2742d09c446213fa17b12eff84e4ad1f53bc964
|
[
"Apache-2.0"
] |
permissive
|
amischler/JRebirth
|
875116eba814fcad772ef9b5c1840ed706b29093
|
cf22e3eb042015cace84cb5ada35e40361aefef6
|
refs/heads/master
| 2020-12-25T04:19:50.250090
| 2013-09-26T14:04:36
| 2013-09-26T14:04:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,878
|
java
|
/**
* Get more info at : www.jrebirth.org .
* Copyright JRebirth.org © 2011-2013
* Contact : sebastien.bordes@jrebirth.org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jrebirth.core.concurrent;
import static org.jrebirth.core.resource.Resources.create;
import org.jrebirth.core.log.JRebirthMarkers;
import org.jrebirth.core.resource.i18n.LogMessage;
import org.jrebirth.core.resource.i18n.MessageContainer;
import org.jrebirth.core.resource.i18n.MessageItem;
/**
* The class <strong>ConcurrentMessages</strong>.
*
* Messages used by the Concurrent package.
*
* @author Sébastien Bordes
*/
public interface ConcurrentMessages extends MessageContainer {
/** JRebirthThread. */
/** "Run> {0}". */
MessageItem RUN_IT = create(new LogMessage("jrebirth.concurrent.runIt", JRebirthMarkers.CONCURRENT));
/** "Thread error : {0} ". */
MessageItem THREAD_ERROR = create(new LogMessage("jrebirth.concurrent.threadError", JRebirthMarkers.CONCURRENT));
/** "Runnable submitted with hashCode={}" . */
MessageItem JTP_QUEUED = create(new LogMessage("jrebirth.concurrent.jtpQueued", JRebirthMarkers.CONCURRENT));
/** "An exception occured during JRebirth BootUp" . */
MessageItem BOOT_UP_ERROR = create(new LogMessage("jrebirth.concurrent.bootUpError", JRebirthMarkers.CONCURRENT));
/** AbstractJrbRunnable. */
/** "An exception occured into the JRebirth Thread". */
MessageItem JIT_ERROR = create(new LogMessage("jrebirth.concurrent.jitError", JRebirthMarkers.CONCURRENT));
/** "An error occurred while shuting down the application ". */
MessageItem SHUTDOWN_ERROR = create(new LogMessage("jrebirth.concurrent.shutdownError", JRebirthMarkers.CONCURRENT));
/** JrebirthThreadPoolExecutor. */
/** "JTP returned an error" . */
MessageItem JTP_ERROR = create(new LogMessage("jrebirth.concurrent.jtpError", JRebirthMarkers.CONCURRENT));
/** "JTP returned an error with rootCause =>". */
MessageItem JTP_ERROR_EXPLANATION = create(new LogMessage("jrebirth.concurrent.jtpErrorExplanation", JRebirthMarkers.CONCURRENT));
/** "Future (hashcode={}) returned object : {}". */
MessageItem FUTURE_DONE = create(new LogMessage("jrebirth.concurrent.futureDone", JRebirthMarkers.CONCURRENT));
}
|
[
"sebastien.bordes@jrebirth.org"
] |
sebastien.bordes@jrebirth.org
|
c7562e45a91690e2f10bc0a5fa0944c94d182cc0
|
238d18fdd9d141ff4ca425ff7daa41c402a5fc44
|
/app/src/main/java/com/sankalpchauhan/flipkartgridchallenge/util/DarkModeHandler.java
|
a532e88b64b61d2a662286204156552c8feb2018
|
[] |
no_license
|
sankalpchauhan-me/Flipkart-Grid-2-Android-App
|
ec93181c55511248b2f51149746cb12db6ace3a0
|
d7f1c27c3d5c77232d3f95cfa7a01a9032d5f783
|
refs/heads/master
| 2022-12-05T18:30:28.125962
| 2020-08-09T14:06:22
| 2020-08-09T14:06:22
| 286,243,455
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,126
|
java
|
package com.sankalpchauhan.flipkartgridchallenge.util;
import androidx.appcompat.app.AppCompatDelegate;
public class DarkModeHandler {
private static final String lightMode = "light";
private static final String darkMode = "dark";
private static final String batterySaver= "battery";
public static void themeHelper(Boolean isDarkMode){
if(!isDarkMode){
applyTheme(lightMode);
} else {
applyTheme(darkMode);
}
}
private static void applyTheme(String theme){
switch (theme){
case lightMode:
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
break;
case darkMode:
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
break;
case batterySaver:
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY);
break;
default:
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
}
}
}
|
[
"sankalpchauhan.me@gmail.com"
] |
sankalpchauhan.me@gmail.com
|
995b934209fdccb5638778fc987d95ed29620f3d
|
e2744631f7ae5477157c4d1b969c7623c8833f35
|
/core/src/main/java/r/base/package-info.java
|
2ea9e66e1d95f8ebc3a8b735b58767a6df773888
|
[] |
no_license
|
jkingsbery/renjin
|
147928df812bf92877d3f1076580e6ab0ca0a044
|
d76df923ed7b77aef7f83a6bb9ee179ed57df3b8
|
refs/heads/master
| 2016-08-04T16:06:20.432322
| 2012-02-04T04:52:19
| 2012-02-04T04:52:19
| 3,235,152
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 269
|
java
|
/**
* Implementation of the "native" portions of the R base package.
* Note that the base package also includes what in other languages
* would be part of the language itself, such as the 'if', 'for',
* '<-' (assignment) functions etc.
*
*/
package r.base;
|
[
"alex@bedatadriven.com@b722d886-ae41-2056-5ac6-6db9963f4c99"
] |
alex@bedatadriven.com@b722d886-ae41-2056-5ac6-6db9963f4c99
|
6480f3df427646b3b7906ccadc96d13e3b8e6b04
|
217fb1a510a2a19f4de8157ff78cd7a495547f69
|
/goodscenter/goodscenter-service/src/main/java/com/camelot/goodscenter/service/impl/TradeInventoryServiceImpl.java
|
474deba0ae57a6377b793bdeebb53b6f2f671a64
|
[] |
no_license
|
icai/shushimall
|
9dc4f7cdb88327d9c5b177158322e8e4b6f7b1cd
|
86d1a5afc06d1b0565cbafa64e9dd3a534be58b6
|
refs/heads/master
| 2022-12-03T14:24:32.631217
| 2020-08-25T16:00:39
| 2020-08-25T16:00:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,447
|
java
|
package com.camelot.goodscenter.service.impl;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.camelot.goodscenter.dao.ItemMybatisDAO;
import com.camelot.goodscenter.dao.ItemPriceDAO;
import com.camelot.goodscenter.dao.ItemSkuDAO;
import com.camelot.goodscenter.dao.TradeInventoryDAO;
import com.camelot.goodscenter.domain.ItemSku;
import com.camelot.goodscenter.dto.InventoryModifyDTO;
import com.camelot.goodscenter.dto.ItemAttr;
import com.camelot.goodscenter.dto.ItemCatCascadeDTO;
import com.camelot.goodscenter.dto.ItemDTO;
import com.camelot.goodscenter.dto.SellPrice;
import com.camelot.goodscenter.dto.SkuPictureDTO;
import com.camelot.goodscenter.dto.TradeInventoryDTO;
import com.camelot.goodscenter.dto.TradeInventoryInDTO;
import com.camelot.goodscenter.dto.TradeInventoryOutDTO;
import com.camelot.goodscenter.service.ItemCategoryService;
import com.camelot.goodscenter.service.TradeInventoryExportService;
import com.camelot.openplatform.common.DataGrid;
import com.camelot.openplatform.common.ExecuteResult;
import com.camelot.openplatform.common.Pager;
/**
* <p>Description: [库存]</p>
* Created on 2015年3月13日
* @author <a href="mailto: xxx@camelotchina.com">杨芳</a>
* @version 1.0
* Copyright (c) 2015 北京柯莱特科技有限公司 交付部
*/
@Service("tradeInventoryExportService")
public class TradeInventoryServiceImpl implements TradeInventoryExportService {
@Resource
private TradeInventoryDAO tradeInventoryDAO;
@Resource
private ItemPriceDAO itemPriceDAO;
@Resource
private ItemMybatisDAO itemMybatisDAO;
@Resource
private ItemCategoryService itemCategoryService;
@Resource
private ItemSkuDAO itemSkuDAO;
/**
* <p>Discription:[根据skuId查询库存]</p>
* Created on 2015年3月18日
* @param skuId
* @return
* @author:[杨芳]
*/
@Override
public ExecuteResult<TradeInventoryDTO> queryTradeInventoryBySkuId(Long skuId) {
ExecuteResult<TradeInventoryDTO> er=new ExecuteResult<TradeInventoryDTO>();
try{
er.setResult(tradeInventoryDAO.queryBySkuId(skuId));
er.setResultMessage("success");
}catch(Exception e){
er.setResultMessage(e.getMessage());
throw new RuntimeException(e);
}
return er;
}
/**
* <p>Discription:[根据条件查询库存列表]</p>
* Created on 2015年3月14日
* @param dto
* @param page
* @return
* @author:[杨芳]
*/
@Override
public ExecuteResult<DataGrid<TradeInventoryOutDTO>> queryTradeInventoryList(TradeInventoryInDTO dto,Pager page) {
ExecuteResult<DataGrid<TradeInventoryOutDTO>> result=new ExecuteResult<DataGrid<TradeInventoryOutDTO>>();
DataGrid<TradeInventoryOutDTO> dg=new DataGrid<TradeInventoryOutDTO>();
try{
List<TradeInventoryOutDTO> list=tradeInventoryDAO.queryTradeInventoryList(dto, page);
Long count=tradeInventoryDAO.queryCount(dto);
for(TradeInventoryOutDTO out:list){
//根据skuId查询商品sku的图片
List<SkuPictureDTO> pics=itemMybatisDAO.querySkuPics(out.getSkuId());
out.setSkuPicture(pics);
//根据skuId查询sku的销售价
List<SellPrice> sp=itemPriceDAO.querySkuSellPrices(out.getSkuId());
out.setAreaPrices(sp);
//根据skuId查询商品的名称、编码、状态、类目id、市场价以及sku的销售属性集合:keyId:valueId
TradeInventoryOutDTO td=tradeInventoryDAO.queryItemBySkuId(out.getSkuId());
out.setItemName(td.getItemName());
out.setItemId(td.getItemId());
out.setItemStatus(td.getItemStatus());
out.setMarketPrice(td.getMarketPrice());
out.setSkuStatus(td.getSkuStatus());
out.setCid(td.getCid());
out.setGuidePrice(td.getGuidePrice());
//根据cid查询类目属性
ExecuteResult<List<ItemCatCascadeDTO>> er=itemCategoryService.queryParentCategoryList(td.getCid());
out.setItemCatCascadeDTO(er.getResult());
//根据sku的销售属性keyId:valueId查询商品属性
// System.out.println(td.getAttributes()+"//////");
ExecuteResult<List<ItemAttr>> itemAttr=itemCategoryService.queryCatAttrByKeyVals(td.getAttributes());
out.setItemAttr(itemAttr.getResult());
}
dg.setRows(list);
dg.setTotal(count);
result.setResult(dg);
}catch(Exception e){
result.setResultMessage("error");
throw new RuntimeException(e);
}
return result;
}
/**
*
* <p>Discription:[批量修改库存]</p>
* Created on 2015年3月14日
* @param dto
* @return
* @author:[杨芳]
*/
@Override
public ExecuteResult<String> modifyInventoryByIds(List<InventoryModifyDTO> dtos){
ExecuteResult<String> er = new ExecuteResult<String>();
if (dtos == null || dtos.isEmpty()) {
er.addErrorMessage("参数不能为空!");
return er;
}
ItemDTO item = null;
ItemDTO dbItem = null;
for (InventoryModifyDTO im : dtos) {
TradeInventoryDTO dbSkuInv = tradeInventoryDAO.queryBySkuId(im.getSkuId());//数据库原库存
tradeInventoryDAO.modifyInventoryBySkuIds(im.getSkuId(), im.getTotalInventory());
ItemSku sku = this.itemSkuDAO.queryById(im.getSkuId());
dbItem = this.itemMybatisDAO.getItemDTOById(sku.getItemId());
item = new ItemDTO();
item.setItemId(sku.getItemId());
//计算商品总库存
item.setInventory(dbItem.getInventory()-(dbSkuInv.getTotalInventory()-im.getTotalInventory()));
this.itemMybatisDAO.updateItem(item);
}
return er;
}
}
|
[
"331563342@qq.com"
] |
331563342@qq.com
|
4975a1eab7bc8723d8449d89722f677aa55bff17
|
ad6d94814b5f138c682767249091ddfffe344ae9
|
/JavaSE_Practice/src/com/lv/javase/practice/IO/bio/BIOServer.java
|
7c8af4d565db81033ced9df7557329bd5d7e605f
|
[] |
no_license
|
angiely1115/java8
|
6162bbc720b19d4a47f65855c55db8b3e293c1f7
|
b43ffdfc38241414bdf8b0cfcee943a833cfbe32
|
refs/heads/master
| 2021-10-14T06:57:06.482126
| 2019-02-02T05:58:36
| 2019-02-02T05:58:36
| 109,111,938
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,244
|
java
|
package com.lv.javase.practice.IO.bio;
import java.io.IOException;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;
public class BIOServer {
ServerSocket server;
//服务器
public BIOServer(int port){
try {
//把Socket服务端启动
server = new ServerSocket(port);
System.out.println("BIO服务已启动,监听端口是:" + port);
} catch (IOException e) {
e.printStackTrace();
}
}
/**
* 开始监听,并处理逻辑
* @throws IOException
*/
public void listener() throws IOException{
//死循环监听
while(true){
//虽然写了一个死循环,如果一直没有客户端连接的话,这里一直不会往下执行
Socket client = server.accept();//等待客户端连接,阻塞方法
//拿到输入流,也就是乡村公路
InputStream is = client.getInputStream();
//缓冲区,数组而已
byte [] buff = new byte[1024];
int len = is.read(buff);
//只要一直有数据写入,len就会一直大于0
if(len > 0){
String msg = new String(buff,0,len);
System.out.println("收到" + msg);
}
}
}
public static void main(String[] args) throws IOException {
new BIOServer(8080).listener();
}
}
|
[
"lvrongzhuan@cnhnkj.com"
] |
lvrongzhuan@cnhnkj.com
|
219c492427f2925bd6e4a60eea20eb8eb6ddfc1c
|
b7075f3398399b955ef00940a1e268612afb404a
|
/.svn/pristine/54/547609e121bb829b81908aea9738928a96d62b62.svn-base
|
6ecf63c2bff6a934a4b9ef64b8d7b38f1b94c26b
|
[] |
no_license
|
iuvei/GoldenApple
|
5fffcea0b67a05c9ee36358d00ca6d11a889504c
|
6faec199308e68d1f817bbec68987ff334067023
|
refs/heads/master
| 2020-05-20T12:22:21.932932
| 2019-01-14T05:33:31
| 2019-01-14T05:33:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 224
|
package com.goldenapple.lottery.data;
import com.goldenapple.lottery.base.net.RequestConfig;
@RequestConfig(api = "service?packet=Game&action=GetThirdPlatList")
public class GetThirdPlatCommand extends CommonAttribute{
}
|
[
"429533813@qq.com"
] |
429533813@qq.com
|
|
ff7cf758e066b5f632c2d240f99d2232bd16317f
|
8388d3009c0be9cb4e3ea25abbce7a0ad6f9b299
|
/business/agriprpall/agriprpall-core/src/main/java/com/sinosoft/agriprpall/core/endorsemanage/specialendorse/service/PlantingEndorChgDetailService.java
|
1c1ea2ac65eb145c0db91bd6c0af923e0c9c55f7
|
[] |
no_license
|
foxhack/NewAgri2018
|
a182bd34d0c583a53c30d825d5e2fa569f605515
|
be8ab05e0784c6e7e7f46fea743debb846407e4f
|
refs/heads/master
| 2021-09-24T21:58:18.577979
| 2018-10-15T11:24:21
| 2018-10-15T11:24:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 506
|
java
|
package com.sinosoft.agriprpall.core.endorsemanage.specialendorse.service;
import com.sinosoft.txnlist.api.plantinginsurancelist.dto.PlantingEndorChgDetailDto;
import com.sinosoft.txnlist.api.plantinginsurancelist.dto.PlantingPolicyListDto;
public interface PlantingEndorChgDetailService {
public void setPlantingEndorChgDetail(PlantingEndorChgDetailDto plantingEndorChgDetail, PlantingPolicyListDto plantingPolicyListOldSchema, PlantingPolicyListDto plantingPolicyListNewSchema) throws Exception;
}
|
[
"vicentdk77@users.noreply.github.com"
] |
vicentdk77@users.noreply.github.com
|
d97b9655f9f38d953829e8674efc0c3b4cf57ad3
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/29/29_d715962e2a58789b8fb8100e8f80b9770417c3b2/RoundhouseAction/29_d715962e2a58789b8fb8100e8f80b9770417c3b2_RoundhouseAction_s.java
|
3d54407a170a91cbb645b8952ffb63ecd53faedd
|
[] |
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,774
|
java
|
/**
* Copyright (c) 2009 Cliffano Subagio
*
* 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 hudson.plugins.chucknorris;
import hudson.model.Action;
/**
* {@link RoundhouseAction} keeps the style and fact associated with the action.
* For more info, please watch <a
* href="http://www.youtube.com/watch?v=Vb7lnpk3tRY"
* >http://www.youtube.com/watch?v=Vb7lnpk3tRY</a>
* @author cliffano
*/
public final class RoundhouseAction implements Action {
/**
* The style.
*/
private Style mStyle;
/**
* The fact.
*/
private String mFact;
/**
* Constructs a RoundhouseAction with specified style and fact.
* @param style
* the style
* @param fact
* the fact
*/
public RoundhouseAction(final Style style, final String fact) {
super();
this.mStyle = style;
this.mFact = fact;
}
/**
* Gets the action display name.
* @return the display name
*/
public String getDisplayName() {
return "Chuck Norris";
}
/**
* This action doesn't provide any icon file.
* @return null
*/
public String getIconFileName() {
return null;
}
/**
* Gets the URL name for this action.
* @return the URL name
*/
public String getUrlName() {
return "chucknorris";
}
/**
* Gets the Chuck Norris style.
* @return the style
*/
public Style getStyle() {
return mStyle;
}
/**
* Gets the Chuck Norris fact.
* @return the fact
*/
public String getFact() {
return mFact;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
b743786b36b8d56a6cd7ce3f30b0d3acb63eb947
|
74bf1f99b72e4c12a2003fb56b8cef73897a649f
|
/sdi3-12.Cli-SOAP/src/com/sdi/ui/admin/MainMenu.java
|
6ee7fa2874a751bf9a4e0e887bc883ba58807a1b
|
[] |
no_license
|
pabloblancoo/ShareMyTrip-V2
|
c98d6be26423ce456544e5c64a46ceb7cbff4b37
|
821010e8a7b99b4ada0a05a05d0ed05ee2fbb486
|
refs/heads/master
| 2021-04-30T22:43:48.339006
| 2019-03-27T15:14:12
| 2019-03-27T15:14:12
| 53,318,305
| 0
| 0
| null | 2019-03-27T15:14:13
| 2016-03-07T10:53:21
|
Java
|
UTF-8
|
Java
| false
| false
| 781
|
java
|
package com.sdi.ui.admin;
import alb.util.menu.BaseMenu;
import com.sdi.ui.admin.action.DeshabilitarUsuarioAction;
import com.sdi.ui.admin.action.EliminarComentariosAction;
import com.sdi.ui.admin.action.ListarComentariosAction;
import com.sdi.ui.admin.action.ListarUsuariosAction;
public class MainMenu extends BaseMenu {
public MainMenu() {
menuOptions = new Object[][] { { "Administrador", null },
{ "Listado de usuarios", ListarUsuariosAction.class },
{ "Deshabilitar un usuario", DeshabilitarUsuarioAction.class },
{ "Listar comentarios y puntuaciones", ListarComentariosAction.class },
{ "Eliminar comentarios y puntuaciones", EliminarComentariosAction.class },
};
}
public static void main(String[] args) {
new MainMenu().execute();
}
}
|
[
"santiagomartinagra@gmail.com"
] |
santiagomartinagra@gmail.com
|
52154daa73837b00e42aea84d9809b74ced6d0c9
|
134fca5b62ca6bac59ba1af5a5ebd271d9b53281
|
/build/stx/libjava/tests/mauve/java/src/gnu/testlet/java/lang/Double/parseDouble.java
|
2771bd3abd24ae20a8e8fb6f0c371edc02f8e164
|
[
"MIT"
] |
permissive
|
GunterMueller/ST_STX_Fork
|
3ba5fb5482d9827f32526e3c32a8791c7434bb6b
|
d891b139f3c016b81feeb5bf749e60585575bff7
|
refs/heads/master
| 2020-03-28T03:03:46.770962
| 2018-09-06T04:19:31
| 2018-09-06T04:19:31
| 147,616,821
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,781
|
java
|
// Tags: JDK1.2
// Copyright (C) 2004 David Gilbert <david.gilbert@object-refinery.com>
// Mauve 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 2, or (at your option)
// any later version.
// Mauve 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 Mauve; see the file COPYING. If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA. */
package gnu.testlet.java.lang.Double;
import gnu.testlet.TestHarness;
import gnu.testlet.Testlet;
/**
* Some checks for the parseDouble() method in the {@link Double} class.
*/
public class parseDouble implements Testlet {
/**
* Runs the test using the specified harness.
*
* @param harness the test harness (<code>null</code> not permitted).
*/
public void test(TestHarness harness) {
testRegular(harness);
testInfinities(harness);
testNaN(harness);
}
/**
* Tests some regular values.
*
* @param harness the test harness.
*/
public void testRegular(TestHarness harness) {
harness.check(Double.parseDouble("1.0"), 1.0);
harness.check(Double.parseDouble("+1.0"), 1.0);
harness.check(Double.parseDouble("-1.0"), -1.0);
harness.check(Double.parseDouble(" 1.0 "), 1.0);
harness.check(Double.parseDouble(" -1.0 "), -1.0);
harness.check(Double.parseDouble("2."), 2.0);
harness.check(Double.parseDouble(".3"), 0.3);
harness.check(Double.parseDouble("1e-9"), 1e-9);
harness.check(Double.parseDouble("1e137"), 1e137);
// test some bad formats
try {
/* double d = */ Double.parseDouble("");
harness.check(false);
} catch (NumberFormatException e) {
harness.check(true);
}
try {
/* double d = */ Double.parseDouble("X");
harness.check(false);
} catch (NumberFormatException e) {
harness.check(true);
}
try {
/* double d = */ Double.parseDouble("e");
harness.check(false);
} catch (NumberFormatException e) {
harness.check(true);
}
try {
/* double d = */ Double.parseDouble("+ 1.0");
harness.check(false);
} catch (NumberFormatException e) {
harness.check(true);
}
try {
/* double d = */ Double.parseDouble("- 1.0");
harness.check(false);
} catch (NumberFormatException e) {
harness.check(true);
}
// null argument should throw NullPointerException
try {
/* double d = */ Double.parseDouble(null);
harness.check(false);
} catch (NullPointerException e) {
harness.check(true);
}
}
/**
* Some checks for values that should parse to Double.POSITIVE_INFINITY
* or Double.NEGATIVE_INFINITY.
*
* @param harness the test harness.
*/
public void testInfinities(TestHarness harness) {
try {
harness.check(Double.parseDouble("Infinity"), Double.POSITIVE_INFINITY);
harness.check(Double.parseDouble("+Infinity"), Double.POSITIVE_INFINITY);
harness.check(Double.parseDouble("-Infinity"), Double.NEGATIVE_INFINITY);
harness.check(Double.parseDouble(" +Infinity "), Double.POSITIVE_INFINITY);
harness.check(Double.parseDouble(" -Infinity "), Double.NEGATIVE_INFINITY);
} catch (Exception e) {
harness.check(false);
harness.debug(e);
}
harness.check(Double.parseDouble("1e1000"), Double.POSITIVE_INFINITY);
harness.check(Double.parseDouble("-1e1000"), Double.NEGATIVE_INFINITY);
}
/**
* Some checks for 'NaN' values.
*
* @param harness the test harness.
*/
public void testNaN(TestHarness harness) {
try {
harness.check(Double.isNaN(Double.parseDouble("NaN")));
harness.check(Double.isNaN(Double.parseDouble("+NaN")));
harness.check(Double.isNaN(Double.parseDouble("-NaN")));
harness.check(Double.isNaN(Double.parseDouble(" +NaN ")));
harness.check(Double.isNaN(Double.parseDouble(" -NaN ")));
} catch (Exception e) {
harness.check(false);
harness.debug(e);
}
}
}
|
[
"gunter.mueller@gmail.com"
] |
gunter.mueller@gmail.com
|
7dc345bafca7ab2e26c101917ca878c6e4a40373
|
7942d0e4f262244c23894f78f44fc1bb5d0c8d3a
|
/app/src/main/java/com/pccw/nowplayer/link/handler/NowIDLinkHandler.java
|
10dfeeaddcea2bdad12e9c5472923f009d303c87
|
[] |
no_license
|
zhoumcu/nowtv
|
45d5d1dd34d6f2f4719f5f0a69111351a14be05e
|
78877fddf9e4af3555c0c20c287814576bf62893
|
refs/heads/tablet
| 2021-01-09T20:30:19.370392
| 2016-08-17T03:15:06
| 2016-08-17T03:15:06
| 65,776,296
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 812
|
java
|
package com.pccw.nowplayer.link.handler;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.pccw.nowplayer.activity.mynow.NowIDActivity;
import com.pccw.nowplayer.activity.settings.YourBoxActivity;
import com.pccw.nowplayer.constant.Constants;
/**
* Created by Swifty on 2016/3/15.
*/
public class NowIDLinkHandler extends LinkHandler {
public static String[] getHooks() {
return new String[]{Constants.ACTION_NOW_ID};
}
@Override
public boolean handlerLink(Context context, String link, String link_prefix, String link_suffix, Bundle bundle) {
if (bundle == null) bundle = new Bundle();
Intent intent = new Intent(context, YourBoxActivity.class);
context.startActivity(intent);
return true;
}
}
|
[
"1032324589@qq.com"
] |
1032324589@qq.com
|
d8453cc61ca372cf38e2c4f8302e60394559f50e
|
417b0e3d2628a417047a7a70f28277471d90299f
|
/src/test/java/com/microsoft/bingads/v11/api/test/entities/account/read/BulkAccountReadFromRowValuesIdTest.java
|
d3b80aeff4950dfd14e76b65dee242c811bd9fd0
|
[
"MIT"
] |
permissive
|
jpatton14/BingAds-Java-SDK
|
30e330a5d950bf9def0c211ebc5ec677d8e5fb57
|
b928a53db1396b7e9c302d3eba3f3cc5ff7aa9de
|
refs/heads/master
| 2021-07-07T08:28:17.011387
| 2017-10-03T14:44:43
| 2017-10-03T14:44:43
| 105,914,216
| 0
| 0
| null | 2017-10-05T16:33:39
| 2017-10-05T16:33:39
| null |
UTF-8
|
Java
| false
| false
| 1,189
|
java
|
package com.microsoft.bingads.v11.api.test.entities.account.read;
import com.microsoft.bingads.v11.api.test.entities.account.BulkAccountTest;
import com.microsoft.bingads.v11.bulk.entities.BulkAccount;
import com.microsoft.bingads.internal.functionalinterfaces.Function;
import java.util.Arrays;
import java.util.Collection;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;
import org.junit.runners.Parameterized.Parameters;
@RunWith(Parameterized.class)
public class BulkAccountReadFromRowValuesIdTest extends BulkAccountTest {
@Parameter(value = 1)
public Long expectedResult;
@Parameters
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][]{
{"123", 123L},
{"9223372036854775807", 9223372036854775807L},
});
}
@Test
public void testRead() {
this.<Long>testReadProperty("Id", this.datum, this.expectedResult, new Function<BulkAccount, Long>() {
@Override
public Long apply(BulkAccount c) {
return c.getId();
}
});
}
}
|
[
"baliu@microsoft.com"
] |
baliu@microsoft.com
|
17677620296a9828bc3567d6e5a618b393f8122a
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2006-09-21/seasar2-2.4.0-rc-2/s2-framework/src/main/java/org/seasar/framework/container/IllegalInitMethodAnnotationRuntimeException.java
|
a3e4fe51ca83182d7459e0ed31a884b3359b88bb
|
[
"Apache-2.0"
] |
permissive
|
svn2github/s2container
|
54ca27cf0c1200a93e1cb88884eb8226a9be677d
|
625adc6c4e1396654a7297d00ec206c077a78696
|
refs/heads/master
| 2020-06-04T17:15:02.140847
| 2013-08-09T09:38:15
| 2013-08-09T09:38:15
| 10,850,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,632
|
java
|
/*
* Copyright 2004-2006 the Seasar Foundation and the Others.
*
* 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.seasar.framework.container;
import org.seasar.framework.exception.SRuntimeException;
/**
* アノテーションで指定された{@link InitMethodDef initメソッド・インジェクション定義}が不正だった場合にスローされます。
* <p>
* アノテーションで指定されたメソッドが存在しない場合、 複数定義されている場合、 および引数が必要な場合に不正とみなされます。
* </p>
*
* @author higa
* @author belltree (Javadoc)
*
* @see org.seasar.framework.container.factory.ConstantAnnotationHandler
*/
public class IllegalInitMethodAnnotationRuntimeException extends
SRuntimeException {
private static final long serialVersionUID = 0L;
private Class componentClass_;
private String methodName_;
/**
* <code>IllegalInitMethodAnnotationRuntimeException</code>を構築します。
*
* @param componentClass
* アノテーションが指定されたクラス
* @param methodName
* アノテーションで指定されたメソッド名
*/
public IllegalInitMethodAnnotationRuntimeException(Class componentClass,
String methodName) {
super("ESSR0081", new Object[] { componentClass.getName(), methodName });
componentClass_ = componentClass;
methodName_ = methodName;
}
/**
* 例外の原因となったアノテーションが指定されたクラスを返します。
*
* @return アノテーションが指定されたクラス
*/
public Class getComponentClass() {
return componentClass_;
}
/**
* 例外の原因となったアノテーションで指定されたメソッド名を返します。
*
* @return アノテーションで指定されたメソッド名
*/
public String getMethodName() {
return methodName_;
}
}
|
[
"higa@319488c0-e101-0410-93bc-b5e51f62721a"
] |
higa@319488c0-e101-0410-93bc-b5e51f62721a
|
7ffa56acd0a8c2c18bb728e6f21fd917342b51c6
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/naver--pinpoint/a858604a9dd990466996725f480ad2286eef3a11/before/RootStackFrame.java
|
246f54d62e89cfd9dd775d5c950d1d2cf1cf933c
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,025
|
java
|
/*
* Copyright 2014 NAVER Corp.
*
* 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.navercorp.pinpoint.profiler.context;
/**
* @author emeroad
*/
public class RootStackFrame implements StackFrame {
private final Span span;
private int stackId;
private Object frameObject;
public RootStackFrame(Span span) {
if (span == null) {
throw new NullPointerException("span must not be null");
}
this.span = span;
}
@Override
public int getStackFrameId() {
return stackId;
}
@Override
public void setStackFrameId(int stackId) {
this.stackId = stackId;
}
@Override
public void markBeforeTime() {
this.span.markBeforeTime();
}
@Override
public long getBeforeTime() {
return this.span.getStartTime();
}
@Override
public void markAfterTime() {
this.span.markAfterTime();
}
@Override
public long getAfterTime() {
return span.getAfterTime();
}
@Override
public int getElapsedTime() {
return span.getElapsed();
}
public Span getSpan() {
return span;
}
@Override
public void setEndPoint(String endPoint) {
this.span.setEndPoint(endPoint);
}
@Override
public void setRpc(String rpc) {
this.span.setRpc(rpc);
}
@Override
public void setApiId(int apiId) {
this.span.setApiId(apiId);
}
@Override
public void setExceptionInfo(int exceptionId, String exceptionMessage) {
this.span.setExceptionInfo(exceptionId, exceptionMessage);
}
@Override
public void setServiceType(short serviceType) {
this.span.setServiceType(serviceType);
}
@Override
public void addAnnotation(Annotation annotation) {
this.span.addAnnotation(annotation);
}
public void setRemoteAddress(String remoteAddress) {
this.span.setRemoteAddr(remoteAddress);
}
@Override
public Object attachFrameObject(Object frameObject) {
Object copy = this.frameObject;
this.frameObject = frameObject;
return copy;
}
@Override
public Object getFrameObject() {
return this.frameObject;
}
@Override
public Object detachFrameObject() {
Object copy = this.frameObject;
this.frameObject = null;
return copy;
}
@Override
public short getServiceType() {
return this.span.getServiceType();
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
339751e5244d6e360a1b5eeb242366d42cd1c102
|
bd3296a9ed115058bd18086878a2db1e6630b6f0
|
/src/main/java/bf/onea/web/rest/GeuPSAResource.java
|
d6793ca40a941a2bd62fc388d7b0fd97a326c8e4
|
[] |
no_license
|
Kadsuke/sidotapp
|
7e5df866ed917607759c4427fe4f153ea6024e8e
|
ded26aaad10085c50efcd97c34ba6c1a0e2ab7c3
|
refs/heads/main
| 2023-01-31T20:49:16.371591
| 2020-12-14T09:02:39
| 2020-12-14T09:02:39
| 316,159,926
| 0
| 0
| null | 2020-12-14T09:02:41
| 2020-11-26T07:56:10
|
TypeScript
|
UTF-8
|
Java
| false
| false
| 5,407
|
java
|
package bf.onea.web.rest;
import bf.onea.service.GeuPSAService;
import bf.onea.web.rest.errors.BadRequestAlertException;
import bf.onea.service.dto.GeuPSADTO;
import io.github.jhipster.web.util.HeaderUtil;
import io.github.jhipster.web.util.PaginationUtil;
import io.github.jhipster.web.util.ResponseUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.Optional;
/**
* REST controller for managing {@link bf.onea.domain.GeuPSA}.
*/
@RestController
@RequestMapping("/api")
public class GeuPSAResource {
private final Logger log = LoggerFactory.getLogger(GeuPSAResource.class);
private static final String ENTITY_NAME = "geuPSA";
@Value("${jhipster.clientApp.name}")
private String applicationName;
private final GeuPSAService geuPSAService;
public GeuPSAResource(GeuPSAService geuPSAService) {
this.geuPSAService = geuPSAService;
}
/**
* {@code POST /geu-psas} : Create a new geuPSA.
*
* @param geuPSADTO the geuPSADTO to create.
* @return the {@link ResponseEntity} with status {@code 201 (Created)} and with body the new geuPSADTO, or with status {@code 400 (Bad Request)} if the geuPSA has already an ID.
* @throws URISyntaxException if the Location URI syntax is incorrect.
*/
@PostMapping("/geu-psas")
public ResponseEntity<GeuPSADTO> createGeuPSA(@Valid @RequestBody GeuPSADTO geuPSADTO) throws URISyntaxException {
log.debug("REST request to save GeuPSA : {}", geuPSADTO);
if (geuPSADTO.getId() != null) {
throw new BadRequestAlertException("A new geuPSA cannot already have an ID", ENTITY_NAME, "idexists");
}
GeuPSADTO result = geuPSAService.save(geuPSADTO);
return ResponseEntity.created(new URI("/api/geu-psas/" + result.getId()))
.headers(HeaderUtil.createEntityCreationAlert(applicationName, true, ENTITY_NAME, result.getId().toString()))
.body(result);
}
/**
* {@code PUT /geu-psas} : Updates an existing geuPSA.
*
* @param geuPSADTO the geuPSADTO to update.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the updated geuPSADTO,
* or with status {@code 400 (Bad Request)} if the geuPSADTO is not valid,
* or with status {@code 500 (Internal Server Error)} if the geuPSADTO couldn't be updated.
* @throws URISyntaxException if the Location URI syntax is incorrect.
*/
@PutMapping("/geu-psas")
public ResponseEntity<GeuPSADTO> updateGeuPSA(@Valid @RequestBody GeuPSADTO geuPSADTO) throws URISyntaxException {
log.debug("REST request to update GeuPSA : {}", geuPSADTO);
if (geuPSADTO.getId() == null) {
throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
}
GeuPSADTO result = geuPSAService.save(geuPSADTO);
return ResponseEntity.ok()
.headers(HeaderUtil.createEntityUpdateAlert(applicationName, true, ENTITY_NAME, geuPSADTO.getId().toString()))
.body(result);
}
/**
* {@code GET /geu-psas} : get all the geuPSAS.
*
* @param pageable the pagination information.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and the list of geuPSAS in body.
*/
@GetMapping("/geu-psas")
public ResponseEntity<List<GeuPSADTO>> getAllGeuPSAS(Pageable pageable) {
log.debug("REST request to get a page of GeuPSAS");
Page<GeuPSADTO> page = geuPSAService.findAll(pageable);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(ServletUriComponentsBuilder.fromCurrentRequest(), page);
return ResponseEntity.ok().headers(headers).body(page.getContent());
}
/**
* {@code GET /geu-psas/:id} : get the "id" geuPSA.
*
* @param id the id of the geuPSADTO to retrieve.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the geuPSADTO, or with status {@code 404 (Not Found)}.
*/
@GetMapping("/geu-psas/{id}")
public ResponseEntity<GeuPSADTO> getGeuPSA(@PathVariable Long id) {
log.debug("REST request to get GeuPSA : {}", id);
Optional<GeuPSADTO> geuPSADTO = geuPSAService.findOne(id);
return ResponseUtil.wrapOrNotFound(geuPSADTO);
}
/**
* {@code DELETE /geu-psas/:id} : delete the "id" geuPSA.
*
* @param id the id of the geuPSADTO to delete.
* @return the {@link ResponseEntity} with status {@code 204 (NO_CONTENT)}.
*/
@DeleteMapping("/geu-psas/{id}")
public ResponseEntity<Void> deleteGeuPSA(@PathVariable Long id) {
log.debug("REST request to delete GeuPSA : {}", id);
geuPSAService.delete(id);
return ResponseEntity.noContent().headers(HeaderUtil.createEntityDeletionAlert(applicationName, true, ENTITY_NAME, id.toString())).build();
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
ebb52ca7e8186e102d50daa66fff216f22533aee
|
8b840cf52876eb2d5cd76b2d34845f0c2e8e5b23
|
/app/src/main/java/com/haolin/component/sample/application/MainApplication.java
|
a67137d5b3ddea779299744d6db36fb5c3a968e4
|
[] |
no_license
|
hunimeizi/HaoLin_Component_Sample
|
ca82f5e47985723d559a0723d3470f400d60d619
|
46d6b00b7f519f1664c44690fe6a053abcb86c69
|
refs/heads/master
| 2020-05-16T12:09:46.993550
| 2019-04-23T15:07:26
| 2019-04-23T15:07:26
| 183,038,503
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,153
|
java
|
package com.haolin.component.sample.application;
import android.app.Application;
import com.haolin.conentlibrary.APPConfig;
import com.haolin.conentlibrary.listenter.IPPComponent;
/**
* 作者:haoLin_Lee on 2019/04/23 22:18
* 邮箱:Lhaolin0304@sina.com
* class:
*/
public class MainApplication extends Application implements IPPComponent {
private static MainApplication application;
private static MainApplication getApplication() {
return application;
}
@Override
public void onCreate() {
super.onCreate();
initializa(this);
}
@Override
public void initializa(Application application) {
//将主App的上下文传到Login以及mine application中
for (String component : APPConfig.COMPONENT) {
try {
Class<?> clazz = Class.forName(component);
Object object = clazz.newInstance();
if (object instanceof IPPComponent) {
((IPPComponent) object).initializa(this);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
|
[
"342161360@qq.com"
] |
342161360@qq.com
|
705c1cd3efcc59649e489095101f824f9886a34b
|
6b2a8dd202fdce77c971c412717e305e1caaac51
|
/solutions_2464487_1/java/Alexander86/A.java
|
9d0dcf5e9ea7a33589ea1c469827c65d018fc1ca
|
[] |
no_license
|
alexandraback/datacollection
|
0bc67a9ace00abbc843f4912562f3a064992e0e9
|
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
|
refs/heads/master
| 2021-01-24T18:27:24.417992
| 2017-05-23T09:23:38
| 2017-05-23T09:23:38
| 84,313,442
| 2
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,510
|
java
|
import java.io.*;
import java.util.*;
import java.math.*;
public class A{
static BigInteger two = BigInteger.valueOf(2);
public static BigInteger getRings(BigInteger rings, BigInteger a, BigInteger b){
BigInteger res = b.multiply(rings).add(rings.multiply(rings.subtract(BigInteger.ONE)).divide(two).multiply(a));
//System.out.println("gr " + rings + " " + a + " " + b + ": " + res);
return res;
}
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int tc = scanner.nextInt();
for(int tcc = 1; tcc <= tc; tcc++){
System.out.print("Case #" + tcc + ": ");
BigInteger r, t;
r = scanner.nextBigInteger();
t = scanner.nextBigInteger();
BigInteger first = r.multiply(r);
r = r.add(BigInteger.ONE);
first = r.multiply(r).subtract(first);
r = r.add(BigInteger.ONE);
BigInteger second = r.multiply(r);
r = r.add(BigInteger.ONE);
second = r.multiply(r).subtract(second);
BigInteger a = second.subtract(first);
BigInteger b = first;
// System.out.println(first);
// System.out.println(second);
BigInteger maxR = BigInteger.ONE;
while(getRings(maxR, a, b).compareTo(t)<=0)maxR = maxR.multiply(two);
BigInteger minR = BigInteger.ZERO;
while(minR.compareTo(maxR) < 0){
BigInteger mid = minR.add(maxR.subtract(minR).add(BigInteger.ONE).divide(two));
if(getRings(mid, a, b).compareTo(t)<=0){
minR = mid;
} else {
maxR = mid.subtract(BigInteger.ONE);
}
}
System.out.println(minR);
}
}
}
|
[
"eewestman@gmail.com"
] |
eewestman@gmail.com
|
25fa14993dad84c691cfb7483acf95f15a6c9767
|
1a947f34f1b602b90e72e24877219e1e7fa07a6e
|
/src/main/java/system/network/StringConnection.java
|
e16572f86286276d411fce347587c1537b2d5514
|
[] |
no_license
|
ethanp/three-phase-commit
|
d4b50d00709b766409aab6dfd5c6ea3617c4c159
|
5308f780df0e3f0d6476f1a28e3cf9f2fdab8055
|
refs/heads/master
| 2021-01-20T10:32:20.580862
| 2015-03-09T20:36:07
| 2015-03-09T20:36:07
| 31,352,338
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 798
|
java
|
package system.network;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;
/**
* Ethan Petuchowski 2/17/15
*/
public class StringConnection {
PrintWriter writer;
BufferedReader reader;
public StringConnection(Process process) {
writer = new PrintWriter(process.getOutputStream());
reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
}
public StringConnection(Socket socket) {
try {
writer = new PrintWriter(socket.getOutputStream());
reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
}
catch (IOException e) {
e.printStackTrace();
}
}
}
|
[
"ethanp@utexas.edu"
] |
ethanp@utexas.edu
|
7ee2cd9a898288c6db8e73f3d0153646e3a1ac2d
|
2834f98b53d78bafc9f765344ded24cf41ffebb0
|
/chrome/android/java/src/org/chromium/chrome/browser/sharing/shared_clipboard/SharedClipboardShareActivity.java
|
95015ec9af5a56cf65739aa90db6a2a114602a05
|
[
"BSD-3-Clause"
] |
permissive
|
cea56/chromium
|
81bffdf706df8b356c2e821c1a299f9d4bd4c620
|
013d244f2a747275da76758d2e6240f88c0165dd
|
refs/heads/master
| 2023-01-11T05:44:41.185820
| 2019-12-09T04:14:16
| 2019-12-09T04:14:16
| 226,785,888
| 1
| 0
|
BSD-3-Clause
| 2019-12-09T04:40:07
| 2019-12-09T04:40:07
| null |
UTF-8
|
Java
| false
| false
| 5,423
|
java
|
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.sharing.shared_clipboard;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.view.View;
import android.view.animation.AnimationUtils;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import org.chromium.base.ContextUtils;
import org.chromium.base.ThreadUtils;
import org.chromium.base.task.PostTask;
import org.chromium.base.task.TaskTraits;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeFeatureList;
import org.chromium.chrome.browser.init.AsyncInitializationActivity;
import org.chromium.chrome.browser.settings.SettingsLauncher;
import org.chromium.chrome.browser.sharing.SharingAdapter;
import org.chromium.chrome.browser.sharing.SharingServiceProxy;
import org.chromium.chrome.browser.sharing.SharingServiceProxy.DeviceInfo;
import org.chromium.components.sync.AndroidSyncSettings;
import org.chromium.components.sync.protocol.SharingSpecificFields;
import org.chromium.ui.widget.ButtonCompat;
/**
* Activity to display device targets to share text.
*/
public class SharedClipboardShareActivity
extends AsyncInitializationActivity implements OnItemClickListener {
private SharingAdapter mAdapter;
/**
* Checks whether sending shared clipboard message is enabled for the user and enables/disables
* the SharedClipboardShareActivity appropriately. This call requires native to be loaded.
*/
public static void updateComponentEnabledState() {
boolean enabled = ChromeFeatureList.isEnabled(ChromeFeatureList.SHARED_CLIPBOARD_UI);
PostTask.postTask(TaskTraits.USER_VISIBLE, () -> setComponentEnabled(enabled));
}
/**
* Sets whether or not the SharedClipboardShareActivity should be enabled. This may trigger a
* StrictMode violation so shouldn't be called on the UI thread.
*/
private static void setComponentEnabled(boolean enabled) {
ThreadUtils.assertOnBackgroundThread();
Context context = ContextUtils.getApplicationContext();
PackageManager packageManager = context.getPackageManager();
ComponentName componentName =
new ComponentName(context, SharedClipboardShareActivity.class);
int newState = enabled ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
: PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
// This indicates that we don't want to kill Chrome when changing component enabled state.
int flags = PackageManager.DONT_KILL_APP;
if (packageManager.getComponentEnabledSetting(componentName) != newState) {
packageManager.setComponentEnabledSetting(componentName, newState, flags);
}
}
@Override
protected void triggerLayoutInflation() {
setContentView(R.layout.sharing_device_picker);
View mask = findViewById(R.id.mask);
mask.setOnClickListener(v -> finish());
ButtonCompat chromeSettingsButton = findViewById(R.id.chrome_settings);
if (!AndroidSyncSettings.get().isChromeSyncEnabled()) {
chromeSettingsButton.setVisibility(View.VISIBLE);
chromeSettingsButton.setOnClickListener(view -> {
SettingsLauncher.launchSettingsPage(ContextUtils.getApplicationContext(), null);
});
}
onInitialLayoutInflationComplete();
}
@Override
public void startNativeInitialization() {
SharingServiceProxy.getInstance().addDeviceCandidatesInitializedObserver(
this::finishNativeInitialization);
}
@Override
public void finishNativeInitialization() {
super.finishNativeInitialization();
mAdapter = new SharingAdapter(SharingSpecificFields.EnabledFeatures.SHARED_CLIPBOARD);
if (!mAdapter.isEmpty()) {
findViewById(R.id.device_picker_toolbar).setVisibility(View.VISIBLE);
SharedClipboardMetrics.recordShowDeviceList();
} else {
SharedClipboardMetrics.recordShowEducationalDialog();
}
SharedClipboardMetrics.recordDeviceCount(mAdapter.getCount());
ListView listView = findViewById(R.id.device_picker_list);
listView.setAdapter(mAdapter);
listView.setOnItemClickListener(this);
listView.setEmptyView(findViewById(R.id.empty_state));
View content = findViewById(R.id.device_picker_content);
content.startAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_in_up));
}
@Override
public boolean shouldStartGpuProcess() {
return false;
}
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
DeviceInfo device = mAdapter.getItem(position);
String text = getIntent().getStringExtra(Intent.EXTRA_TEXT);
// Log metrics for device click and text size.
SharedClipboardMetrics.recordDeviceClick(position);
SharedClipboardMetrics.recordTextSize(text.length());
SharedClipboardMessageHandler.showSendingNotification(device.guid, device.clientName, text);
finish();
}
}
|
[
"commit-bot@chromium.org"
] |
commit-bot@chromium.org
|
610ffc4683dcf8b5a95888e658cf09ede6dcc951
|
446a56b68c88df8057e85f424dbac90896f05602
|
/api/cas-server-core-api-protocol/src/main/java/org/apereo/cas/validation/ValidationResponseType.java
|
e2d58954879213fa6ab9d2a3feffdc27f2746a76
|
[
"Apache-2.0",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
apereo/cas
|
c29deb0224c52997cbfcae0073a4eb65ebf41205
|
5dc06b010aa7fd1b854aa1ae683d1ab284c09367
|
refs/heads/master
| 2023-09-01T06:46:11.062065
| 2023-09-01T01:17:22
| 2023-09-01T01:17:22
| 2,352,744
| 9,879
| 3,935
|
Apache-2.0
| 2023-09-14T14:06:17
| 2011-09-09T01:36:42
|
Java
|
UTF-8
|
Java
| false
| false
| 504
|
java
|
package org.apereo.cas.validation;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
* Enumerates the list of response types
* that CAS may produce as a result of
* service being validated.
*
* @author Misagh Moayyed
* @since 4.2
*/
@RequiredArgsConstructor
@Getter
public enum ValidationResponseType {
/**
* Default CAS XML response.
*/
XML(true),
/**
* Render response in JSON.
*/
JSON(false);
private final boolean encodingNecessary;
}
|
[
"mm1844@gmail.com"
] |
mm1844@gmail.com
|
7599e198ae1d036be0514926db8d6d273a07e16f
|
f2e744082c66f270d606bfc19d25ecb2510e337c
|
/sources/com/android/settings/applications/ConfirmConvertToFbe.java
|
ef37274590467aabff5bad352fa78b5d3fbe9bf6
|
[] |
no_license
|
AshutoshSundresh/OnePlusSettings-Java
|
365c49e178612048451d78ec11474065d44280fa
|
8015f4badc24494c3931ea99fb834bc2b264919f
|
refs/heads/master
| 2023-01-22T12:57:16.272894
| 2020-11-21T16:30:18
| 2020-11-21T16:30:18
| 314,854,903
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,628
|
java
|
package com.android.settings.applications;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import com.android.settings.C0010R$id;
import com.android.settings.C0012R$layout;
import com.android.settings.SettingsPreferenceFragment;
public class ConfirmConvertToFbe extends SettingsPreferenceFragment {
@Override // com.android.settingslib.core.instrumentation.Instrumentable
public int getMetricsCategory() {
return 403;
}
@Override // com.android.settings.SettingsPreferenceFragment, androidx.preference.PreferenceFragmentCompat, com.android.settings.core.InstrumentedPreferenceFragment, androidx.fragment.app.Fragment
public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
View inflate = layoutInflater.inflate(C0012R$layout.confirm_convert_fbe, (ViewGroup) null);
((Button) inflate.findViewById(C0010R$id.button_confirm_convert_fbe)).setOnClickListener(new View.OnClickListener() {
/* class com.android.settings.applications.ConfirmConvertToFbe.AnonymousClass1 */
public void onClick(View view) {
Intent intent = new Intent("android.intent.action.FACTORY_RESET");
intent.addFlags(268435456);
intent.setPackage("android");
intent.putExtra("android.intent.extra.REASON", "convert_fbe");
ConfirmConvertToFbe.this.getActivity().sendBroadcast(intent);
}
});
return inflate;
}
}
|
[
"ashutoshsundresh@gmail.com"
] |
ashutoshsundresh@gmail.com
|
41b8ca5774f8e7b02b722c315d694efa7dc6446b
|
0bff2461c2aad72050b4a356778c558db5c3ac3b
|
/PullToRefresh/PullRefreshLayout/src/main/java/com/sinya/demo_pullrefreshlayout/widget/WaterDropDrawable.java
|
c05bc45a445bf5df45c02209bec9c259045d22da
|
[
"Apache-2.0"
] |
permissive
|
KoizumiSinya/DemoProject
|
e189de2a80b2fde7702c51fa715d072053fe3169
|
01aae447bdc02b38b73b2af085e3e28e662764be
|
refs/heads/master
| 2021-06-08T05:03:22.975363
| 2021-06-01T09:39:08
| 2021-06-01T09:39:08
| 168,299,197
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,007
|
java
|
package com.sinya.demo_pullrefreshlayout.widget;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.Handler;
import java.security.InvalidParameterException;
class WaterDropDrawable extends RefreshDrawable implements Runnable {
private static final float MAX_LEVEL = 10000;
private static final float CIRCLE_COUNT = ProgressStates.values().length;
private static final float MAX_LEVEL_PER_CIRCLE = MAX_LEVEL / CIRCLE_COUNT;
private int mLevel;
private Point p1, p2, p3, p4;
private Paint mPaint;
private Path mPath;
private int mHeight;
private int mWidth;
private int mTop;
private int[] mColorSchemeColors;
private ProgressStates mCurrentState;
private Handler mHandler = new Handler();
private boolean isRunning;
private enum ProgressStates {
ONE,
TWO,
TREE,
FOUR
}
public WaterDropDrawable(Context context, PullRefreshLayout layout) {
super(context, layout);
mPaint = new Paint();
mPaint.setColor(Color.BLUE);
mPaint.setStyle(Paint.Style.FILL);
mPaint.setAntiAlias(true);
mPath = new Path();
p1 = new Point();
p2 = new Point();
p3 = new Point();
p4 = new Point();
}
@Override
public void draw(Canvas canvas) {
canvas.save();
canvas.translate(0, mTop > 0 ? mTop : 0);
mPath.reset();
mPath.moveTo(p1.x, p1.y);
mPath.cubicTo(p3.x, p3.y, p4.x, p4.y, p2.x, p2.y);
canvas.drawPath(mPath, mPaint);
canvas.restore();
}
@Override
protected void onBoundsChange(Rect bounds) {
mWidth = bounds.width();
updateBounds();
super.onBoundsChange(bounds);
}
private void updateBounds() {
int height = mHeight;
int width = mWidth;
if (height > getRefreshLayout().getFinalOffset()) {
height = getRefreshLayout().getFinalOffset();
}
final float percent = height / (float) getRefreshLayout().getFinalOffset();
int offsetX = (int) (width / 2 * percent);
int offsetY = 0;
p1.set(offsetX, offsetY);
p2.set(width - offsetX, offsetY);
p3.set(width / 2 - height, height);
p4.set(width / 2 + height, height);
}
@Override
public void setColorSchemeColors(int[] colorSchemeColors) {
if (colorSchemeColors == null || colorSchemeColors.length < 4) throw new InvalidParameterException("The color scheme length must be 4");
mPaint.setColor(colorSchemeColors[0]);
mColorSchemeColors = colorSchemeColors;
}
@Override
public void setPercent(float percent) {
mPaint.setColor(evaluate(percent, mColorSchemeColors[0], mColorSchemeColors[1]));
}
private void updateLevel(int level) {
int animationLevel = level == MAX_LEVEL ? 0 : level;
int stateForLevel = (int) (animationLevel / MAX_LEVEL_PER_CIRCLE);
mCurrentState = ProgressStates.values()[stateForLevel];
float percent = level % 2500 / 2500f;
int startColor = mColorSchemeColors[stateForLevel];
int endColor = mColorSchemeColors[(stateForLevel + 1) % ProgressStates.values().length];
mPaint.setColor(evaluate(percent, startColor, endColor));
}
@Override
public void offsetTopAndBottom(int offset) {
mHeight += offset;
mTop = mHeight - getRefreshLayout().getFinalOffset();
updateBounds();
invalidateSelf();
}
@Override
public void start() {
mLevel = 2500;
isRunning = true;
mHandler.postDelayed(this, 20);
}
@Override
public void stop() {
mHandler.removeCallbacks(this);
}
@Override
public boolean isRunning() {
return isRunning;
}
@Override
public void run() {
mLevel += 60;
if (mLevel > MAX_LEVEL) mLevel = 0;
if (isRunning) {
mHandler.postDelayed(this, 20);
updateLevel(mLevel);
invalidateSelf();
}
}
private int evaluate(float fraction, int startValue, int endValue) {
int startInt = startValue;
int startA = (startInt >> 24) & 0xff;
int startR = (startInt >> 16) & 0xff;
int startG = (startInt >> 8) & 0xff;
int startB = startInt & 0xff;
int endInt = endValue;
int endA = (endInt >> 24) & 0xff;
int endR = (endInt >> 16) & 0xff;
int endG = (endInt >> 8) & 0xff;
int endB = endInt & 0xff;
return ((startA + (int) (fraction * (endA - startA))) << 24) |
((startR + (int) (fraction * (endR - startR))) << 16) |
((startG + (int) (fraction * (endG - startG))) << 8) |
((startB + (int) (fraction * (endB - startB))));
}
}
|
[
"haoqqjy@163.com"
] |
haoqqjy@163.com
|
1628c66d4e9cde0610f3bf39b553973aa9d7f3c0
|
eb916fd9e872e6bd13c39e0d79c5f79866797080
|
/cougar-test/cougar-normal-code-tests/src/test/java/com/betfair/cougar/tests/updatedcomponenttests/acceptprotocols/rest/RestGetJSONRequestUnsupportedAcceptProtocolTest.java
|
d0735bc2783d0d602a786466d6c477bafbe421ef
|
[
"Apache-2.0"
] |
permissive
|
betfair/cougar
|
c4cb227024402a19da217150b99f7d73d75d7cce
|
08d1fe338fbd0e8572a9c2305bb5796402d5b1f5
|
refs/heads/master
| 2023-08-26T16:44:20.538347
| 2016-03-21T15:10:27
| 2016-03-21T15:10:27
| 13,865,967
| 21
| 12
|
Apache-2.0
| 2022-10-03T22:39:04
| 2013-10-25T16:30:18
|
Java
|
UTF-8
|
Java
| false
| false
| 4,961
|
java
|
/*
* Copyright 2013, The Sporting Exchange Limited
*
* 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.
*/
// Originally from UpdatedComponentTests/AcceptProtocols/Rest/Rest_Get_JSONRequest_UnsupportedAcceptProtocol.xls;
package com.betfair.cougar.tests.updatedcomponenttests.acceptprotocols.rest;
import com.betfair.testing.utils.cougar.misc.XMLHelpers;
import com.betfair.testing.utils.cougar.assertions.AssertionUtils;
import com.betfair.testing.utils.cougar.beans.HttpCallBean;
import com.betfair.testing.utils.cougar.beans.HttpResponseBean;
import com.betfair.testing.utils.cougar.enums.CougarMessageProtocolRequestTypeEnum;
import com.betfair.testing.utils.cougar.manager.AccessLogRequirement;
import com.betfair.testing.utils.cougar.manager.CougarManager;
import org.testng.annotations.Test;
import org.w3c.dom.Document;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;
/**
* Ensure that when a Rest JSON Get is performed on Cougar, specifying an unsupported response protocol, the correct error response is generated
*/
public class RestGetJSONRequestUnsupportedAcceptProtocolTest {
@Test
public void doTest() throws Exception {
// Create the HttpCallBean
CougarManager cougarManager1 = CougarManager.getInstance();
HttpCallBean httpCallBeanBaseline = cougarManager1.getNewHttpCallBean();
CougarManager cougarManagerBaseline = cougarManager1;
// Get the cougar logging attribute for getting log entries later
// Point the created HttpCallBean at the correct service
httpCallBeanBaseline.setServiceName("baseline", "cougarBaseline");
httpCallBeanBaseline.setVersion("v2");
// Set up the Http Call Bean to make the request
CougarManager cougarManager2 = CougarManager.getInstance();
HttpCallBean getNewHttpCallBean2 = cougarManager2.getNewHttpCallBean("87.248.113.14");
cougarManager2 = cougarManager2;
cougarManager2.setCougarFaultControllerJMXMBeanAttrbiute("DetailedFaults", "false");
getNewHttpCallBean2.setOperationName("testSimpleGet", "simple");
getNewHttpCallBean2.setServiceName("baseline", "cougarBaseline");
getNewHttpCallBean2.setVersion("v2");
Map map3 = new HashMap();
map3.put("message","foo");
getNewHttpCallBean2.setQueryParams(map3);
// Set the response protocols (with an unsupported protocol ranked highest)
Map map4 = new HashMap();
map4.put("application/pdf","q=70");
getNewHttpCallBean2.setAcceptProtocols(map4);
// Get current time for getting log entries later
Timestamp getTimeAsTimeStamp10 = new Timestamp(System.currentTimeMillis());
// Make the JSON call to the operation
cougarManager2.makeRestCougarHTTPCall(getNewHttpCallBean2, com.betfair.testing.utils.cougar.enums.CougarMessageProtocolRequestTypeEnum.RESTJSON);
// Create the expected response as an XML document
XMLHelpers xMLHelpers6 = new XMLHelpers();
Document createAsDocument12 = xMLHelpers6.getXMLObjectFromString("<fault><faultcode>Client</faultcode><faultstring>DSC-0013</faultstring><detail/></fault>");
// Convert the expected response to JSON
Map<CougarMessageProtocolRequestTypeEnum, Object> convertResponseToRestTypes13 = cougarManager2.convertResponseToRestTypes(createAsDocument12, getNewHttpCallBean2);
// Check the response is as expected (fault)
HttpResponseBean getResponseObjectsByEnum14 = getNewHttpCallBean2.getResponseObjectsByEnum(com.betfair.testing.utils.cougar.enums.CougarMessageProtocolResponseTypeEnum.REST);
AssertionUtils.multiAssertEquals(convertResponseToRestTypes13.get(CougarMessageProtocolRequestTypeEnum.RESTXML), getResponseObjectsByEnum14.getResponseObject());
AssertionUtils.multiAssertEquals((int) 406, getResponseObjectsByEnum14.getHttpStatusCode());
AssertionUtils.multiAssertEquals("Not Acceptable", getResponseObjectsByEnum14.getHttpStatusText());
Map<String, String> map8 = getResponseObjectsByEnum14.getFlattenedResponseHeaders();
AssertionUtils.multiAssertEquals("application/xml", map8.get("Content-Type"));
// Check the log entries are as expected
cougarManagerBaseline.verifyAccessLogEntriesAfterDate(getTimeAsTimeStamp10, new AccessLogRequirement("87.248.113.14", "/cougarBaseline/v2/simple", "MediaTypeNotAcceptable") );
}
}
|
[
"simon@exemel.co.uk"
] |
simon@exemel.co.uk
|
d6ab03218b5699f8b84646a82a8ce43541b591de
|
60fe78bb64c3d6038972acd0652ea4fe02791bb5
|
/app/src/main/java/com/hc/hcppjoke/ui/find/FindFragment.java
|
fb05cca3978af308f5a4ab4a45ff247092be3a7e
|
[] |
no_license
|
hcgrady2/hcjoke
|
95c9c3d0f39c88905ddbf08bff6e7f4fcb6b9f1e
|
a65f9dfde789782ec44862dcafb1db468da06160
|
refs/heads/master
| 2023-07-03T03:06:35.289488
| 2021-08-06T06:31:44
| 2021-08-06T06:31:44
| 267,067,312
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,290
|
java
|
package com.hc.hcppjoke.ui.find;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProviders;
import com.hc.hcppjoke.model.SofaTab;
import com.hc.hcppjoke.ui.sofa.SofaFragment;
import com.hc.hcppjoke.utils.AppConfig;
import com.hc.libnavannotation.FragmentDestination;
@FragmentDestination(pageUrl = "main/tabs/find")
public class FindFragment extends SofaFragment {
@Override
public Fragment getTabFragment(int position) {
SofaTab.Tabs tab = getTabConfig().tabs.get(position);
TagListFragment fragment = TagListFragment.newInstance(tab.tag);
return fragment;
}
@Override
public void onAttachFragment(@NonNull Fragment childFragment) {
super.onAttachFragment(childFragment);
String tagType = childFragment.getArguments().getString(TagListFragment.KEY_TAG_TYPE);
if (TextUtils.equals(tagType, "onlyFollow")) {
ViewModelProviders.of(childFragment).get(TagListViewModel.class)
.getSwitchTabLiveData().observe(this,
object -> viewPager2.setCurrentItem(1));
}
}
@Override
public SofaTab getTabConfig() {
return AppConfig.getFindTabConfig();
}
}
|
[
"hcwang1024@163.com"
] |
hcwang1024@163.com
|
8690f296106220fda76ecd53461583296839584e
|
da0437ec50f5b58759118e02ae8e66e1e820a7a2
|
/src/org/darion/yaphet/lintcode/HashFunction.java
|
2aecd21d202f2b5aee1bcd5f7c8c279874555587
|
[] |
no_license
|
darionyaphet/algorithms
|
e37f71d62f0d63001be885d3bed6d425f3a0b421
|
3171efc02b6a987acc2e82389ecb5b80793a52db
|
refs/heads/master
| 2020-05-21T03:24:11.097619
| 2018-10-08T15:32:42
| 2018-10-08T15:32:42
| 25,767,225
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 874
|
java
|
package org.darion.yaphet.lintcode;
/**
* http://www.lintcode.com/zh-cn/problem/hash-function/
*/
public class HashFunction {
public static int hashCode(char[] key, int HASH_SIZE) {
if (key == null || key.length == 0) {
return -1;
}
int size = key.length;
long code = 0;
long base = 1;
for (int i = size - 1; i >= 0; i--) {
code += (key[i] * base) % HASH_SIZE;
code %= HASH_SIZE;
base = base * 33 % HASH_SIZE;
}
return (int) code;
}
public static void main(String[] args) {
System.out.println(hashCode("abcd".toCharArray(), 100));
System.out.println(hashCode("ubuntu".toCharArray(), 1007));
System.out.println(hashCode("abcdefghijklmnopqrstuvwxyz".toCharArray(), 2607)); // 1673
}
}
|
[
"darion.yaphet@gmail.com"
] |
darion.yaphet@gmail.com
|
d69f8f8f37208578f188c156e44ab90aa64bf181
|
d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb
|
/PROMISE/archives/xerces/1.2/org/apache/xerces/validators/datatype/NOTATIONDatatypeValidator.java
|
3b469ae422ed429b77dd3edf668b8535922a688a
|
[] |
no_license
|
hvdthong/DEFECT_PREDICTION
|
78b8e98c0be3db86ffaed432722b0b8c61523ab2
|
76a61c69be0e2082faa3f19efd76a99f56a32858
|
refs/heads/master
| 2021-01-20T05:19:00.927723
| 2018-07-10T03:38:14
| 2018-07-10T03:38:14
| 89,766,606
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,618
|
java
|
package org.apache.xerces.validators.datatype;
import java.util.Hashtable;
import java.util.Locale;
/**
* NOTATIONValidator defines the interface that data type validators must obey.
* These validators can be supplied by the application writer and may be useful as
* standalone code as well as plugins to the validator architecture.
*
* @author Jeffrey Rodriguez-
* @version $Id: NOTATIONDatatypeValidator.java 315856 2000-06-23 01:26:30Z jeffreyr $
*/
public class NOTATIONDatatypeValidator extends AbstractDatatypeValidator {
private DatatypeValidator fBaseValidator = null;
public NOTATIONDatatypeValidator () throws InvalidDatatypeFacetException {
}
public NOTATIONDatatypeValidator ( DatatypeValidator base, Hashtable facets,
boolean derivedByList ) throws InvalidDatatypeFacetException {
fDerivedByList = derivedByList;
}
/**
* Checks that "content" string is valid
* datatype.
* If invalid a Datatype validation exception is thrown.
*
* @param content A string containing the content to be validated
* @param derivedBylist
* Flag which is true when type
* is derived by list otherwise it
* it is derived by extension.
*
* @exception throws InvalidDatatypeException if the content is
* invalid according to the rules for the validators
* @exception InvalidDatatypeValueException
* @see org.apache.xerces.validators.datatype.InvalidDatatypeValueException
*/
public Object validate(String content, Object state ) throws InvalidDatatypeValueException{
return null;
}
public Hashtable getFacets(){
return null;
}
/**
* set the locate to be used for error messages
*/
public void setLocale(Locale locale){
}
/**
* REVISIT
* Compares two Datatype for order
*
* @param o1
* @param o2
* @return
*/
public int compare( String content1, String content2){
return -1;
}
/**
* Returns a copy of this object.
*/
public Object clone() throws CloneNotSupportedException {
throw new CloneNotSupportedException("clone() is not supported in "+this.getClass().getName());
}
/**
* Name of base type as a string.
* A Native datatype has the string "native" as its
* base type.
*
* @param base the validator for this type's base type
*/
private void setBasetype(DatatypeValidator base){
fBaseValidator = base;
}
}
|
[
"hvdthong@github.com"
] |
hvdthong@github.com
|
7ccfae554f2797cacc65fd688cf200432e5a3e36
|
64fa951d13f33be9c7a248ba140d519290611a0e
|
/code-examples/com.google.common.base.Preconditions.checkNotNull5.java
|
f3ce2f23b0c2b1501ae14254bad4269ee8d7b95e
|
[] |
no_license
|
andrehora/jss-code-examples
|
1ee99d7be0a998284f44ecc7c033fdf12c9c01a8
|
ae98f124e1f15411f8a97d410920c05d6f1b1cea
|
refs/heads/main
| 2023-03-25T12:45:42.691780
| 2021-03-25T13:25:51
| 2021-03-25T13:25:51
| 312,898,657
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 169
|
java
|
public void testCheckNotNull_simple_failure() {
try {
Preconditions.checkNotNull(null);
fail("no exception thrown");
} catch (NullPointerException expected) {
}
}
|
[
"andrehoraa@gmail.com"
] |
andrehoraa@gmail.com
|
f1774cf50e7219876861ba0914487d9c01c3c3dd
|
29f508e730f2794341593ad18cf352990888c067
|
/src/org/omg/CORBA/LongSeqHelper.java
|
11bffe62bd3ff45c2feabb971b4f13b087095a7c
|
[] |
no_license
|
nhchanh/jdk1.6.0_21
|
daf40144acd19d92d15561235038e6e0343f8dec
|
cdcaafc11122944545c51efc49bb9f884b1ad0d1
|
refs/heads/master
| 2021-01-10T19:05:13.011208
| 2014-01-07T23:10:19
| 2014-01-07T23:10:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,380
|
java
|
/*
* @(#)LongSeqHelper.java 1.15 10/03/23
*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package org.omg.CORBA;
/**
* The Helper for <tt>LongSeqHelper</tt>. For more information on
* Helper files, see <a href="doc-files/generatedfiles.html#helper">
* "Generated Files: Helper Files"</a>.<P>
* org/omg/CORBA/LongSeqHelper.java
* Generated by the IDL-to-Java compiler (portable), version "3.0"
* from streams.idl
* 13 May 1999 22:41:36 o'clock GMT+00:00
*
* The class definition has been modified to conform to the following
* OMG specifications :
* <ul>
* <li> ORB core as defined by CORBA 2.3.1
* (<a href="http://cgi.omg.org/cgi-bin/doc?formal/99-10-07">formal/99-10-07</a>)
* </li>
*
* <li> IDL/Java Language Mapping as defined in
* <a href="http://cgi.omg.org/cgi-bin/doc?ptc/00-01-08">ptc/00-01-08</a>
* </li>
* </ul>
*/
public abstract class LongSeqHelper
{
private static String _id = "IDL:omg.org/CORBA/LongSeq:1.0";
public static void insert (org.omg.CORBA.Any a, int[] that)
{
org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
a.type (type ());
write (out, that);
a.read_value (out.create_input_stream (), type ());
}
public static int[] extract (org.omg.CORBA.Any a)
{
return read (a.create_input_stream ());
}
private static org.omg.CORBA.TypeCode __typeCode = null;
synchronized public static org.omg.CORBA.TypeCode type ()
{
if (__typeCode == null)
{
__typeCode = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_long);
__typeCode = org.omg.CORBA.ORB.init ().create_sequence_tc (0, __typeCode);
__typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.CORBA.LongSeqHelper.id (), "LongSeq", __typeCode);
}
return __typeCode;
}
public static String id ()
{
return _id;
}
public static int[] read (org.omg.CORBA.portable.InputStream istream)
{
int value[] = null;
int _len0 = istream.read_long ();
value = new int[_len0];
istream.read_long_array (value, 0, _len0);
return value;
}
public static void write (org.omg.CORBA.portable.OutputStream ostream, int[] value)
{
ostream.write_long (value.length);
ostream.write_long_array (value, 0, value.length);
}
}
|
[
"chanh.nguyen@verint.com"
] |
chanh.nguyen@verint.com
|
c46001e14d2629e36641b8a06721de8ddb9b2a77
|
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
|
/sources/com/avito/android/profile/password_setting/PasswordSettingInteractor.java
|
8bfc161528d85b52295f6f7d97c4089772a1b1c0
|
[] |
no_license
|
Auch-Auch/avito_source
|
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
|
76fdcc5b7e036c57ecc193e790b0582481768cdc
|
refs/heads/master
| 2023-05-06T01:32:43.014668
| 2021-05-25T10:19:22
| 2021-05-25T10:19:22
| 370,650,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,204
|
java
|
package com.avito.android.profile.password_setting;
import com.avito.android.remote.model.password.PasswordChangeResult;
import com.avito.android.util.LoadingState;
import com.avito.android.util.preferences.Preference;
import io.reactivex.Observable;
import kotlin.Metadata;
import org.jetbrains.annotations.NotNull;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\bf\u0018\u00002\u00020\u0001J#\u0010\u0007\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00060\u00050\u00042\u0006\u0010\u0003\u001a\u00020\u0002H&¢\u0006\u0004\b\u0007\u0010\b¨\u0006\t"}, d2 = {"Lcom/avito/android/profile/password_setting/PasswordSettingInteractor;", "", "", Preference.PASSWORD, "Lio/reactivex/Observable;", "Lcom/avito/android/util/LoadingState;", "Lcom/avito/android/remote/model/password/PasswordChangeResult;", "setPassword", "(Ljava/lang/String;)Lio/reactivex/Observable;", "profile_release"}, k = 1, mv = {1, 4, 2})
public interface PasswordSettingInteractor {
@NotNull
Observable<LoadingState<PasswordChangeResult>> setPassword(@NotNull String str);
}
|
[
"auchhunter@gmail.com"
] |
auchhunter@gmail.com
|
35ccf09e918d4476cfe8c8fff7983aeeb6aa81a0
|
20b520bffb806114f88bea3517e76fbb9946fad2
|
/src/main/java/com/vtt/apps/util/ModelToPojoConverter.java
|
b3c6507750cf8578f4dd9f5d7d271f77b4a7cd66
|
[] |
no_license
|
sunillakkakula/tagline-traders-api
|
490ed74fd68144251a3c68c4543dbe45a79b4b32
|
39b4f93663d823c22021ece183cd327cc2e2f530
|
refs/heads/master
| 2023-04-14T17:06:57.101773
| 2021-04-25T14:09:54
| 2021-04-25T14:09:54
| 338,733,602
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,545
|
java
|
/*
* package com.vtt.apps.util;
*
* import java.util.ArrayList; import java.util.Iterator; import java.util.List;
*
* import com.vtt.apps.model.Administrator; import com.vtt.apps.model.Category;
* import com.vtt.apps.model.Farmer; import com.vtt.apps.model.Supplier; import
* com.vtt.apps.pojo.AdministratorPojo; import com.vtt.apps.pojo.FarmerPojo;
* import com.vtt.apps.pojo.SupplierPojo;
*
* public class ModelToPojoConverter {
*
* public static List<com.vtt.apps.pojo.Category>
* convertModelToPojo(List<Category> categoryList){
* List<com.vtt.apps.pojo.Category> categoryPojoList =new ArrayList<>();
* com.vtt.apps.pojo.Category categoryPojo = null; for (Iterator iterator =
* categoryList.iterator(); iterator.hasNext();) { Category category =
* (Category) iterator.next(); categoryPojo = new
* com.vtt.apps.pojo.Category(category.getId() , category.getName(),
* category.getImage(), category.getItems().size());
* categoryPojoList.add(categoryPojo); } return categoryPojoList; }
*
* public static AdministratorPojo convertAdminModelToPojo(Administrator admin){
* AdministratorPojo pojo = null; if(admin!=null){ pojo= new
* AdministratorPojo(admin); } return pojo; } public static SupplierPojo
* convertSupplierModelToPojo(Supplier supplier){ SupplierPojo pojo = null;
* if(supplier!=null){ pojo= new SupplierPojo(supplier); } return pojo; } public
* static FarmerPojo convertFarmerModelToPojo(Farmer farmer){ FarmerPojo pojo =
* null; if(farmer!=null){ pojo= new FarmerPojo(farmer); } return pojo; } }
*/
|
[
"="
] |
=
|
ebbf1e0e13fc7335085de4f4cbc42b3d5c17ed74
|
f86938ea6307bf6d1d89a07b5b5f9e360673d9b8
|
/CodeComment_Data/Code_Jam/train/Counting_Sheep/S/CSheep(4).java
|
7f0487d52ffc59cef82a2b3cf00650c9f36235b5
|
[] |
no_license
|
yxh-y/code_comment_generation
|
8367b355195a8828a27aac92b3c738564587d36f
|
2c7bec36dd0c397eb51ee5bd77c94fa9689575fa
|
refs/heads/master
| 2021-09-28T18:52:40.660282
| 2018-11-19T14:54:56
| 2018-11-19T14:54:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,742
|
java
|
package methodEmbedding.Counting_Sheep.S.LYD1652;
import java.io.*;
import java.util.HashSet;
/**
* Created by asthiwanka on 9/4/16.
*/
public class CSheep {
public static void main(String[] args) {
BufferedReader br = null;
File file = new File("/Users/asthiwanka/Desktop/out.txt");
try {
// if file doesnt exists, then create it
if (!file.exists()) {
file.createNewFile();
}
FileWriter fw = new FileWriter(file.getAbsoluteFile());
BufferedWriter bw = new BufferedWriter(fw);
br = new BufferedReader(new FileReader("/Users/asthiwanka/Desktop/test.txt"));
int T = Integer.parseInt(br.readLine());
for (int i = 1 ; i <= T ; i++) {
int v = Integer.parseInt(br.readLine());
HashSet<String> set = new HashSet<>();
for (int x = 1 ; x < 1001 ; x++) {
String xV = String.valueOf(v*x);
for (int y = 0 ; y < xV.length() ; y++) {
set.add(xV.charAt(y) + "");
}
if (set.size() == 10) {
bw.write("Case #"+ i +": " + xV + "\n");
break;
}
if (x == 1000) {
bw.write("Case #"+ i +": " + "INSOMNIA\n");
}
}
}
bw.close();
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (br != null)br.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
}
}
|
[
"liangyuding@sjtu.edu.cn"
] |
liangyuding@sjtu.edu.cn
|
16ed3814935eded0dabf56be7e27d586ed8db90f
|
47da275d6b10915cc60d6fc3238b5bc243d6c5c1
|
/de.rcenvironment.core.utils.cluster/src/main/java/de/rcenvironment/core/utils/cluster/ClusterQueuingSystemConstants.java
|
ffa61229f4cdf3d299db424231af1d17350f2195
|
[] |
no_license
|
rcenvironment/rce-test
|
aa325877be8508ee0f08181304a50bd97fa9f96c
|
392406e8ca968b5d8168a9dd3155d620b5631ab6
|
HEAD
| 2016-09-06T03:35:58.165632
| 2015-01-16T10:45:50
| 2015-01-16T10:45:50
| 29,299,206
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 713
|
java
|
/*
* Copyright (C) 2006-2014 DLR, Germany
*
* All rights reserved
*
* http://www.rcenvironment.de/
*/
package de.rcenvironment.core.utils.cluster;
/**
* Constants related to cluster queuing systems.
*
* @author Doreen Seider
*/
public final class ClusterQueuingSystemConstants {
/** Command string. */
public static final String COMMAND_QSUB = "qsub";
/** Command string. */
public static final String COMMAND_QSTAT = "qstat";
/** Command string. */
public static final String COMMAND_QDEL = "qdel";
/** Command string. */
public static final String COMMAND_SHOWQ = "showq";
private ClusterQueuingSystemConstants() { }
}
|
[
"robert.mischke@dlr.de"
] |
robert.mischke@dlr.de
|
21cd9ef2dc4f6787c240432163335d82a5c57fa6
|
4ad17f7216a2838f6cfecf77e216a8a882ad7093
|
/clbs/src/main/java/com/zw/platform/util/common/JsonResultBean.java
|
f7ca9ffb39226b22f3281d526d208d4f9b8d500b
|
[
"MIT"
] |
permissive
|
djingwu/hybrid-development
|
b3c5eed36331fe1f404042b1e1900a3c6a6948e5
|
784c5227a73d1e6609b701a42ef4cdfd6400d2b7
|
refs/heads/main
| 2023-08-06T22:34:07.359495
| 2021-09-29T02:10:11
| 2021-09-29T02:10:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,055
|
java
|
package com.zw.platform.util.common;
import com.zw.platform.util.JsonUtil;
import java.io.PrintWriter;
import java.io.Serializable;
import java.io.StringWriter;
public class JsonResultBean implements Serializable {
private static final long serialVersionUID = 1L;
public static final boolean SUCCESS = true;
public static final boolean FAULT = false;
private boolean success;
private String msg;
private String exceptionDetailMsg;
private Object obj;
public JsonResultBean() {
this.success = true;
}
public JsonResultBean(String message) {
this.success = true;
this.msg = message;
}
public JsonResultBean(Object object) {
this.success = true;
this.obj = object;
}
public JsonResultBean(String message, Object object) {
this.success = true;
this.msg = message;
this.obj = object;
}
public JsonResultBean(boolean suc) {
this.success = suc;
}
public JsonResultBean(boolean suc, String message) {
this.success = suc;
this.msg = message;
}
public JsonResultBean(Throwable exceptionMessage) {
exceptionMessage.printStackTrace(new PrintWriter(new StringWriter()));
this.success = false;
this.msg = exceptionMessage.getMessage();
}
public JsonResultBean(Throwable exceptionMessage, boolean detailMsg) {
exceptionMessage.printStackTrace(new PrintWriter(new StringWriter()));
this.success = false;
this.msg = exceptionMessage.getMessage();
if (detailMsg) {
this.exceptionDetailMsg = exceptionMessage.toString();
}
}
public boolean isSuccess() {
return this.success;
}
public String getMsg() {
return this.msg;
}
public Object getObj() {
return this.obj;
}
public String getExceptionDetailMsg() {
return this.exceptionDetailMsg;
}
@Override
public String toString() {
return JsonUtil.object2Json(this);
}
}
|
[
"wuxuetao@zwlbs.com"
] |
wuxuetao@zwlbs.com
|
4b0be393a95c0a400a4899c4e9e0824280ed8f74
|
d1970587e1b1889388c288202c835e96e8c25e90
|
/9.Validation_Data_Binding_and_Type_Conversion/9.2.Validation_using_Spring_s_Validator_interface/src/main/java/com/qiaogh/domain/Person.java
|
3a4b5833d12d45dacf82176e9af8d46452487af2
|
[] |
no_license
|
Qiaogh/Spring
|
fb3225e050e96dba50b7998809c2ed9204d08926
|
b894dd3c47af489ba88f29bdd959bd4607de697f
|
refs/heads/master
| 2021-08-07T07:08:34.880225
| 2018-02-22T13:48:59
| 2018-02-22T13:48:59
| 95,947,202
| 0
| 1
| null | 2017-07-05T08:31:18
| 2017-07-01T06:44:01
|
Java
|
UTF-8
|
Java
| false
| false
| 645
|
java
|
package com.qiaogh.domain;
public class Person {
private String id;
private String name;
private Integer age;
public Person( String id, String name, Integer age ) {
this.id = id;
this.name = name;
this.age = age;
}
public String getId() {
return id;
}
public void setId( String id ) {
this.id = id;
}
public String getName() {
return name;
}
public void setName( String name ) {
this.name = name;
}
public Integer getAge() {
return age;
}
public void setAge( Integer age ) {
this.age = age;
}
}
|
[
"qq892525597qq@163.com"
] |
qq892525597qq@163.com
|
61ce94dd3e017e9f189ef397970eee9e53022efe
|
f4fc6069155b1e8c765c0cb9ef19195cbee3c18e
|
/Week_02/day04/78.subsets1.java
|
cb02a244fe938b1e9c9f4c1024d57c4b1dd114c6
|
[] |
no_license
|
jiayouxujin/AlgorithmQIUZHAO
|
18962b0299d7b113fc20b749a31dcee66aec8b15
|
5b92e3c1dffda21147a9611f82479e2ae2f98b08
|
refs/heads/master
| 2022-12-17T00:12:07.935694
| 2020-09-18T11:22:44
| 2020-09-18T11:22:44
| 279,088,950
| 0
| 0
| null | 2020-07-12T15:07:21
| 2020-07-12T15:07:20
| null |
UTF-8
|
Java
| false
| false
| 629
|
java
|
/*
* @lc app=leetcode id=78 lang=java
*
* [78] Subsets
*/
// @lc code=start
class Solution {
public List<List<Integer>> subsets(int[] nums) {
List<List<Integer>> res=new ArrayList<>();
Arrays.sort(nums);
backtrack(res,new ArrayList<>(),nums,0);
return res;
}
public void backtrack(List<List<Integer>> res,List<Integer> temp,int[] nums,int start){
res.add(new ArrayList<>(temp));
for(int i=start;i<nums.length;i++){
temp.add(nums[i]);
backtrack(res,temp,nums,i+1);
temp.remove(temp.size()-1);
}
}
}
// @lc code=end
|
[
"1319039722@qq.com"
] |
1319039722@qq.com
|
62e79d0bafd45728ee62e0609184d8c010ab8219
|
90f17cd659cc96c8fff1d5cfd893cbbe18b1240f
|
/src/main/java/com/facebook/imagepipeline/platform/KitKatPurgeableDecoder.java
|
3389af4a31310a500cd3e40680d922ac7da50f9c
|
[] |
no_license
|
redpicasso/fluffy-octo-robot
|
c9b98d2e8745805edc8ddb92e8afc1788ceadd08
|
b2b62d7344da65af7e35068f40d6aae0cd0835a6
|
refs/heads/master
| 2022-11-15T14:43:37.515136
| 2020-07-01T22:19:16
| 2020-07-01T22:19:16
| 276,492,708
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,761
|
java
|
package com.facebook.imagepipeline.platform;
import android.annotation.TargetApi;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapFactory.Options;
import com.facebook.common.internal.Preconditions;
import com.facebook.common.memory.PooledByteBuffer;
import com.facebook.common.references.CloseableReference;
import com.facebook.imagepipeline.memory.FlexByteArrayPool;
import com.facebook.imagepipeline.nativecode.DalvikPurgeableDecoder;
import javax.annotation.concurrent.ThreadSafe;
@TargetApi(19)
@ThreadSafe
public class KitKatPurgeableDecoder extends DalvikPurgeableDecoder {
private final FlexByteArrayPool mFlexByteArrayPool;
public KitKatPurgeableDecoder(FlexByteArrayPool flexByteArrayPool) {
this.mFlexByteArrayPool = flexByteArrayPool;
}
protected Bitmap decodeByteArrayAsPurgeable(CloseableReference<PooledByteBuffer> closeableReference, Options options) {
PooledByteBuffer pooledByteBuffer = (PooledByteBuffer) closeableReference.get();
int size = pooledByteBuffer.size();
CloseableReference closeableReference2 = this.mFlexByteArrayPool.get(size);
try {
byte[] bArr = (byte[]) closeableReference2.get();
pooledByteBuffer.read(0, bArr, 0, size);
Bitmap bitmap = (Bitmap) Preconditions.checkNotNull(BitmapFactory.decodeByteArray(bArr, 0, size, options), "BitmapFactory returned null");
return bitmap;
} finally {
CloseableReference.closeSafely(closeableReference2);
}
}
protected Bitmap decodeJPEGByteArrayAsPurgeable(CloseableReference<PooledByteBuffer> closeableReference, int i, Options options) {
byte[] bArr = DalvikPurgeableDecoder.endsWithEOI(closeableReference, i) ? null : EOI;
PooledByteBuffer pooledByteBuffer = (PooledByteBuffer) closeableReference.get();
Preconditions.checkArgument(i <= pooledByteBuffer.size());
int i2 = i + 2;
CloseableReference closeableReference2 = this.mFlexByteArrayPool.get(i2);
try {
byte[] bArr2 = (byte[]) closeableReference2.get();
pooledByteBuffer.read(0, bArr2, 0, i);
if (bArr != null) {
putEOI(bArr2, i);
i = i2;
}
Bitmap bitmap = (Bitmap) Preconditions.checkNotNull(BitmapFactory.decodeByteArray(bArr2, 0, i, options), "BitmapFactory returned null");
return bitmap;
} finally {
CloseableReference.closeSafely(closeableReference2);
}
}
private static void putEOI(byte[] bArr, int i) {
bArr[i] = (byte) -1;
bArr[i + 1] = (byte) -39;
}
}
|
[
"aaron@goodreturn.org"
] |
aaron@goodreturn.org
|
8bf46d79d9359080d0ba647a924bb36d010b4867
|
51d05106ddd3494f0b6098cc97653ffac4896b70
|
/motorMain/src/main/java/util/ComPortutils.java
|
9bf0400aeaf46b06d4b0c1bd3021e4ba5df2468d
|
[] |
no_license
|
cyf120209/motor
|
f6ed18d334abba370f5794d20a0328f0f56188de
|
c3f2a0c83439e5447c77bb0966744654d849d899
|
refs/heads/master
| 2021-09-22T14:33:26.528610
| 2018-08-30T08:26:46
| 2018-08-30T08:26:46
| 103,228,108
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 704
|
java
|
package util;
import gnu.io.CommPortIdentifier;
import java.util.Enumeration;
import java.util.LinkedList;
/**
* Created by Administrator on 2016/9/23 0023.
*/
public class ComPortutils {
public static LinkedList<String> listPort() {
LinkedList<String> listName=new LinkedList<String>();
Enumeration enumeration= CommPortIdentifier.getPortIdentifiers();
CommPortIdentifier portId;
while(enumeration.hasMoreElements()){
portId=(CommPortIdentifier)enumeration.nextElement();
if(portId.getPortType()==CommPortIdentifier.PORT_SERIAL) {
listName.add( portId.getName());
}
}
return listName;
}
}
|
[
"2445940439@qq.com"
] |
2445940439@qq.com
|
8f3f521be393276e5c1d3ff01769621c36a3662a
|
e26a014955d059247eb1900d0b6d672676d41143
|
/spring-app/src/main/java/com/valtech/spring/beans/creation/AuthService.java
|
904e462f205211c074e862869dc1bf5afe87a965
|
[] |
no_license
|
GreenwaysTechnology/ValTech-Spring-Boot-Aug-21
|
ec70e873315e95c2cc103a71b2a402143a2c4d22
|
d47e2abc87c8001abd1e4a04b001eab32a37146e
|
refs/heads/main
| 2023-07-11T07:18:54.644156
| 2021-08-21T10:23:04
| 2021-08-21T10:23:04
| 395,925,891
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 831
|
java
|
package com.valtech.spring.beans.creation;
public class AuthService {
private String userName = "admin";
private String password = "admin";
private AuthService() {
}
// Factory Api
public static AuthService getInstance() {
return new AuthService();
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
// Biz Api
public boolean login(String userName, String password) {
if (this.getUserName().equals(userName) && this.getPassword().equals(password)) {
return true;
}
return false;
}
}
|
[
"sasubramanian_md@hotmail.com"
] |
sasubramanian_md@hotmail.com
|
b84340af71e400cb0bba3623f04ea3296217deef
|
b863479f00471986561c57291edb483fc5f4532c
|
/src/main/java/nom/bdezonia/zorbage/algebra/GetAsShortArrayExact.java
|
3cfaa31e92c52c6be970e7e86eaea4763f043e0e
|
[] |
permissive
|
bdezonia/zorbage
|
6da6cbdc8f9fcb6cde89d39aca9687e2eee08c9b
|
651625e60b7d6ca9273ffc1a282b6a8af5c2d925
|
refs/heads/master
| 2023-09-01T08:32:59.157936
| 2023-08-08T00:57:18
| 2023-08-08T00:57:18
| 74,696,586
| 11
| 0
|
BSD-2-Clause
| 2020-11-09T03:01:42
| 2016-11-24T18:24:55
|
Java
|
UTF-8
|
Java
| false
| false
| 1,777
|
java
|
/*
* Zorbage: an algebraic data hierarchy for use in numeric processing.
*
* Copyright (c) 2016-2022 Barry DeZonia All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* Neither the name of the <copyright holder> nor the names of its contributors may
* be used to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
package nom.bdezonia.zorbage.algebra;
/**
*
* @author Barry DeZonia
*
*/
public interface GetAsShortArrayExact {
short[] getAsShortArrayExact();
}
|
[
"bdezonia@gmail.com"
] |
bdezonia@gmail.com
|
e58ecd5d30491a7b7bf2c702172414372a362424
|
53d677a55e4ece8883526738f1c9d00fa6560ff7
|
/com/tencent/mm/protocal/protobuf/cwo.java
|
80fc017b8c7b0af3ccd35b650754a4b7bf1d61fb
|
[] |
no_license
|
0jinxing/wechat-apk-source
|
544c2d79bfc10261eb36389c1edfdf553d8f312a
|
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
|
refs/heads/master
| 2020-06-07T20:06:03.580028
| 2019-06-21T09:17:26
| 2019-06-21T09:17:26
| 193,069,132
| 9
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,895
|
java
|
package com.tencent.mm.protocal.protobuf;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.util.LinkedList;
public final class cwo extends bsr
{
public LinkedList<cwt> xsk;
public brr xsl;
public cwo()
{
AppMethodBeat.i(96326);
this.xsk = new LinkedList();
AppMethodBeat.o(96326);
}
public final int op(int paramInt, Object[] paramArrayOfObject)
{
int i = 0;
AppMethodBeat.i(96327);
if (paramInt == 0)
{
paramArrayOfObject = (e.a.a.c.a)paramArrayOfObject[0];
if (this.BaseRequest != null)
{
paramArrayOfObject.iy(1, this.BaseRequest.computeSize());
this.BaseRequest.writeFields(paramArrayOfObject);
}
paramArrayOfObject.e(2, 8, this.xsk);
if (this.xsl != null)
{
paramArrayOfObject.iy(3, this.xsl.computeSize());
this.xsl.writeFields(paramArrayOfObject);
}
AppMethodBeat.o(96327);
paramInt = i;
return paramInt;
}
if (paramInt == 1)
if (this.BaseRequest == null)
break label627;
label627: for (paramInt = e.a.a.a.ix(1, this.BaseRequest.computeSize()) + 0; ; paramInt = 0)
{
i = paramInt + e.a.a.a.c(2, 8, this.xsk);
paramInt = i;
if (this.xsl != null)
paramInt = i + e.a.a.a.ix(3, this.xsl.computeSize());
AppMethodBeat.o(96327);
break;
if (paramInt == 2)
{
paramArrayOfObject = (byte[])paramArrayOfObject[0];
this.xsk.clear();
paramArrayOfObject = new e.a.a.a.a(paramArrayOfObject, unknownTagHandler);
for (paramInt = bsr.getNextFieldNumber(paramArrayOfObject); paramInt > 0; paramInt = bsr.getNextFieldNumber(paramArrayOfObject))
if (!super.populateBuilderWithField(paramArrayOfObject, this, paramInt))
paramArrayOfObject.ems();
AppMethodBeat.o(96327);
paramInt = i;
break;
}
if (paramInt == 3)
{
Object localObject1 = (e.a.a.a.a)paramArrayOfObject[0];
cwo localcwo = (cwo)paramArrayOfObject[1];
paramInt = ((Integer)paramArrayOfObject[2]).intValue();
int j;
Object localObject2;
boolean bool;
switch (paramInt)
{
default:
paramInt = -1;
AppMethodBeat.o(96327);
break;
case 1:
paramArrayOfObject = ((e.a.a.a.a)localObject1).Vh(paramInt);
j = paramArrayOfObject.size();
for (paramInt = 0; paramInt < j; paramInt++)
{
localObject2 = (byte[])paramArrayOfObject.get(paramInt);
localObject1 = new hl();
localObject2 = new e.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (bool = true; bool; bool = ((hl)localObject1).populateBuilderWithField((e.a.a.a.a)localObject2, (com.tencent.mm.bt.a)localObject1, bsr.getNextFieldNumber((e.a.a.a.a)localObject2)));
localcwo.BaseRequest = ((hl)localObject1);
}
AppMethodBeat.o(96327);
paramInt = i;
break;
case 2:
paramArrayOfObject = ((e.a.a.a.a)localObject1).Vh(paramInt);
j = paramArrayOfObject.size();
for (paramInt = 0; paramInt < j; paramInt++)
{
localObject2 = (byte[])paramArrayOfObject.get(paramInt);
localObject1 = new cwt();
localObject2 = new e.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (bool = true; bool; bool = ((cwt)localObject1).populateBuilderWithField((e.a.a.a.a)localObject2, (com.tencent.mm.bt.a)localObject1, bsr.getNextFieldNumber((e.a.a.a.a)localObject2)));
localcwo.xsk.add(localObject1);
}
AppMethodBeat.o(96327);
paramInt = i;
break;
case 3:
localObject1 = ((e.a.a.a.a)localObject1).Vh(paramInt);
j = ((LinkedList)localObject1).size();
for (paramInt = 0; paramInt < j; paramInt++)
{
localObject2 = (byte[])((LinkedList)localObject1).get(paramInt);
paramArrayOfObject = new brr();
localObject2 = new e.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (bool = true; bool; bool = paramArrayOfObject.populateBuilderWithField((e.a.a.a.a)localObject2, paramArrayOfObject, bsr.getNextFieldNumber((e.a.a.a.a)localObject2)));
localcwo.xsl = paramArrayOfObject;
}
AppMethodBeat.o(96327);
paramInt = i;
break;
}
}
paramInt = -1;
AppMethodBeat.o(96327);
break;
}
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes4-dex2jar.jar
* Qualified Name: com.tencent.mm.protocal.protobuf.cwo
* JD-Core Version: 0.6.2
*/
|
[
"172601673@qq.com"
] |
172601673@qq.com
|
06361bede6e418be5b4a1845af36ea6338c5f078
|
4bb83687710716d91b5da55054c04f430474ee52
|
/dsrc/sku.0/sys.server/compiled/game/script/systems/missions/dynamic/bounty_probot.java
|
bd9b7c856be42a35863c4d3bc929890c0649adb5
|
[] |
no_license
|
geralex/SWG-NGE
|
0846566a44f4460c32d38078e0a1eb115a9b08b0
|
fa8ae0017f996e400fccc5ba3763e5bb1c8cdd1c
|
refs/heads/master
| 2020-04-06T11:18:36.110302
| 2018-03-19T15:42:32
| 2018-03-19T15:42:32
| 157,411,938
| 1
| 0
| null | 2018-11-13T16:35:01
| 2018-11-13T16:35:01
| null |
UTF-8
|
Java
| false
| false
| 2,949
|
java
|
package script.systems.missions.dynamic;
import script.*;
import script.base_class.*;
import script.combat_engine.*;
import java.util.Arrays;
import java.util.Hashtable;
import java.util.Vector;
import script.base_script;
import script.library.utils;
public class bounty_probot extends script.systems.missions.base.mission_dynamic_base
{
public bounty_probot()
{
}
public int OnAttach(obj_id self) throws InterruptedException
{
setInvulnerable(self, true);
messageTo(self, "destroySelf", null, 180, true);
if (!hasScript(self, "conversation.bounty_probot"))
{
attachScript(self, "conversation.bounty_probot");
}
return SCRIPT_CONTINUE;
}
public int setup_Droid(obj_id self, dictionary params) throws InterruptedException
{
obj_id objWaypoint = params.getObjId("objWaypoint");
obj_id objPlayer = params.getObjId("objPlayer");
obj_id objMission = params.getObjId("objMission");
int intTrackType = params.getInt("intTrackType");
int intDroidType = params.getInt("intDroidType");
setObjVar(self, "objPlayer", objPlayer);
setObjVar(self, "objMission", objMission);
setObjVar(self, "intTrackType", intTrackType);
setObjVar(self, "intDroidType", intDroidType);
setObjVar(self, "objWaypoint", objWaypoint);
return SCRIPT_CONTINUE;
}
public int destroySelf(obj_id self, dictionary params) throws InterruptedException
{
obj_id[] objPlayers = getAllPlayers(getLocation(self), 64);
if (objPlayers != null && objPlayers.length > 0)
{
playClientEffectLoc(objPlayers[0], "clienteffect/combat_explosion_lair_large.cef", getLocation(self), 0);
}
obj_id objMission = getObjIdObjVar(self, "objMission");
messageTo(objMission, "stopTracking", null, 0, true);
messageTo(self, "delete_Self", null, 0, true);
return SCRIPT_CONTINUE;
}
public int delete_Self(obj_id self, dictionary params) throws InterruptedException
{
obj_id objWaypoint = getObjIdObjVar(self, "objWaypoint");
destroyObject(objWaypoint);
destroyObject(self);
return SCRIPT_CONTINUE;
}
public int take_Off(obj_id self, dictionary params) throws InterruptedException
{
doAnimationAction(self, "sp_13");
dictionary dctParams = new dictionary();
obj_id objMission = getObjIdObjVar(self, "objMission");
int intTrackType = getIntObjVar(self, "intTrackType");
int intDroidType = getIntObjVar(self, "intDroidType");
dctParams.put("intDroidType", intDroidType);
dctParams.put("intTrackType", DROID_FIND_TARGET);
messageTo(objMission, "findTarget", dctParams, 10, true);
utils.sendPostureChange(self, POSTURE_SITTING);
messageTo(self, "delete_Self", null, 10, true);
return SCRIPT_CONTINUE;
}
}
|
[
"tmoflash@gmail.com"
] |
tmoflash@gmail.com
|
33700c5fc6476a5203f98fd2a46cf1feb7911f39
|
6b2e1f5fdd3668b32c471ff872f03f043b18d5f7
|
/mutants/dataset/lcs_length/3367/LCS_LENGTH.java
|
e77550a515139dc93ed2d8c9bbfd315c288b7d89
|
[] |
no_license
|
mou23/Impact-of-Similarity-on-Repairing-Small-Programs
|
87e58676348f1b55666171128ecced3571979d44
|
6704d78b2bc9c103d97bcf55ecd5c12810ba2851
|
refs/heads/master
| 2023-03-25T10:42:17.464870
| 2021-03-20T04:55:17
| 2021-03-20T04:55:17
| 233,513,246
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,965
|
java
|
package buggy_java_programs;
import java.util.*;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author derricklin
*/
public class LCS_LENGTH {
public static Integer lcs_length(String s, String t) {
// make a Counter
// pair? no! just hashtable to a hashtable.. woo.. currying
Map<Integer, Map<Integer,Integer>> dp = new HashMap<Integer,Map<Integer,Integer>>();
// just set all the internal maps to 0
for (int i=0; i < s.length(); i++) {
Map<Integer,Integer> initialize = new HashMap<Integer,Integer>();
dp.put(i, initialize);
for (int j=0; j < t.length(); j++) {
Map<Integer,Integer> internal_map = dp.java.util(i);
internal_map.put(j,0);
dp.put(i, internal_map);
}
}
// now the actual code
for (int i=0; i < s.length(); i++) {
for (int j=0; j < t.length(); j++) {
if (s.charAt(i) == t.charAt(j)) {
if (dp.containsKey(i-1)) {
Map<Integer, Integer> internal_map = dp.get(i);
int insert_value = dp.get(i-1).get(j) + 1;
internal_map.put(j, insert_value);
dp.put(i,internal_map);
} else {
Map<Integer, Integer> internal_map = dp.get(i);
internal_map.put(j,1);
dp.put(i,internal_map);
}
}
}
}
if (!dp.isEmpty()) {
List<Integer> ret_list = new ArrayList<Integer>();
for (int i=0; i<s.length(); i++) {
ret_list.add(!dp.get(i).isEmpty() ? Collections.max(dp.get(i).values()) : 0);
}
return Collections.max(ret_list);
} else {
return 0;
}
}
}
|
[
"bsse0731@iit.du.ac.bd"
] |
bsse0731@iit.du.ac.bd
|
769043d6d1734c34df3e1c8d4f934427c296ddff
|
6f53535d466f3d082f597808d21f33de7f547ead
|
/src/main/java/io/rocketbase/toggl/ui/MainUI.java
|
2f65c44c96b8179cf7a01c752e1f29165f9c08de
|
[] |
no_license
|
rocketbase-io/toggl-reporter
|
8e60d2d6e86a0ca76942dafe81ac2cf4099f09b8
|
3f85cd798e6dcb7512ed593ef2ba09811ca28946
|
refs/heads/master
| 2020-05-20T17:10:43.542783
| 2018-01-25T12:03:52
| 2018-01-25T12:03:52
| 84,492,150
| 13
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,409
|
java
|
package io.rocketbase.toggl.ui;
import com.vaadin.annotations.StyleSheet;
import com.vaadin.server.FontAwesome;
import com.vaadin.server.Responsive;
import com.vaadin.server.VaadinRequest;
import com.vaadin.spring.annotation.SpringUI;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Notification;
import com.vaadin.ui.UI;
import com.vaadin.ui.themes.ValoTheme;
import io.rocketbase.toggl.backend.config.TogglService;
import io.rocketbase.toggl.ui.component.MainScreen;
import org.vaadin.viritin.button.MButton;
import org.vaadin.viritin.fields.MTextField;
import org.vaadin.viritin.layouts.MVerticalLayout;
import org.vaadin.viritin.layouts.MWindow;
import javax.annotation.Resource;
/**
* Created by marten on 20.02.17.
*/
@SpringUI(path = "/app")
@StyleSheet("design.css")
public class MainUI extends UI {
@Resource
private MainScreen mainScreen;
@Resource
private TogglService togglService;
@Override
protected void init(VaadinRequest vaadinRequest) {
Responsive.makeResponsive(this);
setLocale(vaadinRequest.getLocale());
addStyleName(ValoTheme.UI_WITH_MENU);
if (!togglService.isApiTokenAvailable()) {
initTokenWizard();
} else {
setContent(mainScreen.initWithUi(this));
}
}
private void initTokenWizard() {
MTextField apiToken = new MTextField("Api-Token").withFullWidth();
MWindow configWindow = new MWindow("Configure API-Token")
.withWidth("50%")
.withModal(true)
.withResizable(false)
.withDraggable(false)
.withClosable(false)
.withCenter();
configWindow.setContent(new MVerticalLayout()
.add(apiToken, Alignment.MIDDLE_CENTER, 1)
.add(new MButton(FontAwesome.SAVE, "Save", e -> {
try {
togglService.updateToken(apiToken.getValue());
configWindow.close();
setContent(mainScreen.initWithUi(this));
} catch (Exception exp) {
Notification.show("invalid api-token", Notification.Type.ERROR_MESSAGE);
}
}), Alignment.MIDDLE_CENTER));
UI.getCurrent()
.addWindow(configWindow);
setContent(new MVerticalLayout());
}
}
|
[
"marten@rocketbase.io"
] |
marten@rocketbase.io
|
db1163d6d547bb0478967b121c14e88366253ebf
|
b04471b102b2285f0b8a94ce6e3dc88fc9c750af
|
/rest-assert-unit/src/test/java/com/github/mjeanroy/restassert/unit/api/cookie/core/AssertHasDomainTest.java
|
8fb2a93b8d495d59a096b01f4365f9f9174ef971
|
[] |
no_license
|
mjeanroy/rest-assert
|
795f59cbb2e1b6fac59408439a1fae5ee97d88d1
|
b9ea9318c1907cc45a6afd42ac200b1ead97f000
|
refs/heads/master
| 2022-12-25T06:02:07.555504
| 2022-05-21T14:25:43
| 2022-05-21T14:25:43
| 128,626,910
| 0
| 0
| null | 2022-11-16T03:00:14
| 2018-04-08T09:58:49
|
Java
|
UTF-8
|
Java
| false
| false
| 2,396
|
java
|
/**
* The MIT License (MIT)
*
* Copyright (c) 2014-2021 Mickael Jeanroy
*
* 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 com.github.mjeanroy.restassert.unit.api.cookie.core;
import com.github.mjeanroy.restassert.core.internal.data.Cookie;
import com.github.mjeanroy.restassert.tests.builders.CookieBuilder;
import static com.github.mjeanroy.restassert.unit.api.cookie.CookieAssert.assertHasDomain;
public class AssertHasDomainTest extends AbstractCoreCookieTest {
@Override
protected void run(Cookie actual) {
assertHasDomain(actual, success().getDomain());
}
@Override
protected void run(String message, Cookie actual) {
assertHasDomain(message, actual, success().getDomain());
}
@Override
protected Cookie success() {
return cookie("foo");
}
@Override
protected Cookie failure() {
String expectedDomain = success().getDomain();
String actualDomain = expectedDomain + "foo";
return cookie(actualDomain);
}
@Override
protected String pattern() {
return "Expecting cookie to have domain %s but was %s";
}
@Override
protected Object[] placeholders() {
String expectedDomain = success().getDomain();
String actualDomain = failure().getDomain();
return new Object[]{
expectedDomain,
actualDomain
};
}
private Cookie cookie(String domain) {
return new CookieBuilder().setDomain(domain).build();
}
}
|
[
"mickael.jeanroy@gmail.com"
] |
mickael.jeanroy@gmail.com
|
b6bce275a30863ec45b71fe52bc8b7320e07874d
|
fecc94abb0bc1d1cdfcdeb48a031c24483969b80
|
/src/_945使数组唯一的最小增量/Solution2.java
|
a041787a101a3e26c53cbd94132aa2e0dcb76374
|
[] |
no_license
|
Iron-xin/Leetcode
|
86670c9bba8f3efa7125da0af607e9e01df9d189
|
64e359c90a90965ed131a0ab96d0063ffb2652b9
|
refs/heads/master
| 2022-12-09T04:08:53.443331
| 2020-09-02T08:48:32
| 2020-09-02T08:48:32
| 292,228,669
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,255
|
java
|
package _945使数组唯一的最小增量;
public class Solution2 {
public int minIncrementForUnique(int[] A) {
// counter数组统计每个数字的个数。
if (A.length <= 1){
return 0;
}
int[] counter = new int[40001];
int max = -1;
for (int i=0;i<A.length;i++) {
counter[A[i]]++;
max = Math.max(max, A[i]);
}
// 遍历counter数组,若当前数字的个数cnt大于1个,则只留下1个,其他的cnt-1个后移
int count = 0;
for (int num = 0; num < max; num++) {
if (counter[num] > 1) {
//没位置只能留一个数,其他的数都要往下一个大一点的索引移动
int d = counter[num] - 1;
count += d;
counter[num + 1] += d;
}
}
// 最后, counter[max+1]里可能会有从counter[max]后移过来的,counter[max+1]里只留下1个,其它的d个后移。
// 设 max+1 = x,那么后面的d个数就是[x+1,x+2,x+3,...,x+d],
// 因此操作次数是[1,2,3,...,d],用求和公式求和。
int d = counter[max] - 1;
count += (1 + d) * d / 2;
return count;
}
}
|
[
"497731829@qq.com"
] |
497731829@qq.com
|
b6647cbaf882f3d405b94561cb67687fdd079212
|
d829740ea8cd9b536e19f74e92119a8275fe1a94
|
/jOOQ/src/main/java/org/jooq/impl/CombinedCondition.java
|
55c59bc966c71dc7f1dc8354190d05ecffb8cef3
|
[
"Apache-2.0"
] |
permissive
|
djstjr14/jOOQ
|
6938ed75759e90a2af7fb4c3aa1fc4fe20345539
|
7e0f06f31c3131ea6190129a09b311e682205acd
|
refs/heads/master
| 2021-04-15T18:09:17.552253
| 2018-06-10T12:26:12
| 2018-06-10T12:26:12
| 126,758,643
| 2
| 8
| null | 2018-06-11T00:00:02
| 2018-03-26T01:46:12
|
Java
|
UTF-8
|
Java
| false
| false
| 5,372
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Other licenses:
* -----------------------------------------------------------------------------
* Commercial licenses for this work are available. These replace the above
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
* database integrations.
*
* For more information, please visit: http://www.jooq.org/licenses
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.jooq.impl;
import static org.jooq.Clause.CONDITION;
import static org.jooq.Clause.CONDITION_AND;
import static org.jooq.Clause.CONDITION_OR;
import static org.jooq.Operator.AND;
import static org.jooq.impl.DSL.falseCondition;
import static org.jooq.impl.DSL.noCondition;
import static org.jooq.impl.DSL.trueCondition;
import static org.jooq.impl.Keywords.K_AND;
import static org.jooq.impl.Keywords.K_OR;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.jooq.Clause;
import org.jooq.Condition;
import org.jooq.Context;
import org.jooq.Keyword;
import org.jooq.Operator;
/**
* @author Lukas Eder
*/
final class CombinedCondition extends AbstractCondition {
private static final long serialVersionUID = -7373293246207052549L;
private static final Clause[] CLAUSES_AND = { CONDITION, CONDITION_AND };
private static final Clause[] CLAUSES_OR = { CONDITION, CONDITION_OR };
private final Operator operator;
private final List<Condition> conditions;
static Condition of(Operator operator, Condition left, Condition right) {
if (left instanceof NoCondition)
return right;
else if (right instanceof NoCondition)
return left;
else
return new CombinedCondition(operator, left, right);
}
static Condition of(Operator operator, Collection<? extends Condition> conditions) {
if (conditions.isEmpty())
return noCondition();
CombinedCondition result = null;
Condition first = null;
for (Condition condition : conditions)
if (!(condition instanceof NoCondition))
if (first == null)
first = condition;
else if (result == null)
(result = new CombinedCondition(operator, conditions.size()))
.add(operator, first)
.add(operator, condition);
else
result.add(operator, condition);
if (result != null)
return result;
else if (first != null)
return first;
else
return noCondition();
}
private CombinedCondition(Operator operator, int size) {
if (operator == null)
throw new IllegalArgumentException("The argument 'operator' must not be null");
this.operator = operator;
this.conditions = new ArrayList<Condition>(size);
}
private CombinedCondition(Operator operator, Condition left, Condition right) {
this(operator, 2);
add(operator, left);
add(operator, right);
}
private final CombinedCondition add(Operator op, Condition condition) {
if (condition instanceof CombinedCondition) {
CombinedCondition combinedCondition = (CombinedCondition) condition;
if (combinedCondition.operator == op)
this.conditions.addAll(combinedCondition.conditions);
else
this.conditions.add(condition);
}
else if (condition == null)
throw new IllegalArgumentException("The argument 'conditions' must not contain null");
else
this.conditions.add(condition);
return this;
}
@Override
public final Clause[] clauses(Context<?> ctx) {
return operator == AND ? CLAUSES_AND : CLAUSES_OR;
}
@Override
public final void accept(Context<?> ctx) {
if (conditions.isEmpty()) {
if (operator == AND)
ctx.visit(trueCondition());
else
ctx.visit(falseCondition());
}
else if (conditions.size() == 1) {
ctx.visit(conditions.get(0));
}
else {
ctx.sql('(')
.formatIndentStart()
.formatNewLine();
Keyword op = operator == AND ? K_AND : K_OR;
Keyword separator = null;
for (int i = 0; i < conditions.size(); i++) {
if (i > 0)
ctx.formatSeparator();
if (separator != null)
ctx.visit(separator).sql(' ');
ctx.visit(conditions.get(i));
separator = op;
}
ctx.formatIndentEnd()
.formatNewLine()
.sql(')');
}
}
}
|
[
"lukas.eder@gmail.com"
] |
lukas.eder@gmail.com
|
371b8e546cc200c685c77da1326f56b01ca65548
|
1f9efc022bfddc4b7f5b67b825ae7af481d2c444
|
/app/src/main/java/com/lovelilu/model/Photo.java
|
b979db9ee6e439c04af3df9875a20069dede62c8
|
[] |
no_license
|
CKXY-525/LoveLilu
|
f8e0a16175c8d0d7946dd5c78458a7b800668b20
|
5872348b14806c231bdf1061b654b895bef46642
|
refs/heads/master
| 2021-07-13T23:23:44.774135
| 2017-10-20T02:43:19
| 2017-10-20T02:43:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,027
|
java
|
package com.lovelilu.model;
import com.lovelilu.model.base.BaseModel;
/**
* Created by huannan on 2016/8/24.
*/
public class Photo extends BaseModel {
private String desc;
private String imageUrl;
private String smallImageUrl;
private Integer like;
private String date;
public String getSmallImageUrl() {
return smallImageUrl;
}
public void setSmallImageUrl(String smallImageUrl) {
this.smallImageUrl = smallImageUrl;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl;
}
public Integer getLike() {
return like;
}
public void setLike(Integer like) {
this.like = like;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
}
|
[
"wuhuannan@meizu.com"
] |
wuhuannan@meizu.com
|
b57064a3cc1ab46e7130fc3bb34926cdf391a02d
|
a27a7e9a50849529a75a869e84fd01f2e9bbd4e4
|
/src/test/java/guru/springframework/recipeproject/converters/UnitOfMeasureToUnitOfMeasureCommandTest.java
|
ad8d3e1bc59d8723b13ffa838c82d634ad327a18
|
[] |
no_license
|
lucascalsilva/spring-boot-recipe-project
|
2960e3fd9f113a6fd3ebcbffde1bf53eb8710b9a
|
086c9e3ee6aa2546f56f48d10ada06198f3bc541
|
refs/heads/master
| 2021-05-18T20:08:15.928341
| 2020-08-29T20:00:25
| 2020-08-29T20:00:25
| 251,396,296
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,384
|
java
|
package guru.springframework.recipeproject.converters;
import guru.springframework.recipeproject.commands.UnitOfMeasureCommand;
import guru.springframework.recipeproject.model.UnitOfMeasure;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
/**
* Created by jt on 6/21/17.
*/
public class UnitOfMeasureToUnitOfMeasureCommandTest {
public static final String DESCRIPTION = "name";
public static final Long LONG_VALUE = 1L;
UnitOfMeasureToUnitOfMeasureCommand converter;
@BeforeEach
public void setUp() throws Exception {
converter = new UnitOfMeasureToUnitOfMeasureCommand();
}
@Test
public void testNullObjectConvert() throws Exception {
assertNull(converter.convert(null));
}
@Test
public void testEmptyObj() throws Exception {
assertNotNull(converter.convert(new UnitOfMeasure()));
}
@Test
public void convert() throws Exception {
//given
UnitOfMeasure uom = new UnitOfMeasure();
uom.setId(LONG_VALUE);
uom.setDescription(DESCRIPTION);
//when
UnitOfMeasureCommand uomc = converter.convert(uom);
//then
assertEquals(LONG_VALUE, uomc.getId());
assertEquals(DESCRIPTION, uomc.getDescription());
}
}
|
[
"lucasc.alm.silva@gmail.com"
] |
lucasc.alm.silva@gmail.com
|
85549dada64593a49f5e9942938dbc67fae53cae
|
c81dd37adb032fb057d194b5383af7aa99f79c6a
|
/java/com/google/firebase/messaging/SendException.java
|
46a853fa992edf661bcd3884f218251c5b9d3694
|
[] |
no_license
|
hongnam207/pi-network-source
|
1415a955e37fe58ca42098967f0b3307ab0dc785
|
17dc583f08f461d4dfbbc74beb98331bf7f9e5e3
|
refs/heads/main
| 2023-03-30T07:49:35.920796
| 2021-03-28T06:56:24
| 2021-03-28T06:56:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,028
|
java
|
package com.google.firebase.messaging;
import java.util.Locale;
/* compiled from: com.google.firebase:firebase-messaging@@21.0.0 */
public final class SendException extends Exception {
public static final int ERROR_INVALID_PARAMETERS = 1;
public static final int ERROR_SIZE = 2;
public static final int ERROR_TOO_MANY_MESSAGES = 4;
public static final int ERROR_TTL_EXCEEDED = 3;
public static final int ERROR_UNKNOWN = 0;
private final int errorCode;
SendException(String str) {
super(str);
this.errorCode = parseErrorCode(str);
}
public final int getErrorCode() {
return this.errorCode;
}
private final int parseErrorCode(String str) {
if (str == null) {
return 0;
}
String lowerCase = str.toLowerCase(Locale.US);
char c = 65535;
switch (lowerCase.hashCode()) {
case -1743242157:
if (lowerCase.equals("service_not_available")) {
c = 3;
break;
}
break;
case -1290953729:
if (lowerCase.equals("toomanymessages")) {
c = 4;
break;
}
break;
case -920906446:
if (lowerCase.equals("invalid_parameters")) {
c = 0;
break;
}
break;
case -617027085:
if (lowerCase.equals("messagetoobig")) {
c = 2;
break;
}
break;
case -95047692:
if (lowerCase.equals("missing_to")) {
c = 1;
break;
}
break;
}
if (c == 0 || c == 1) {
return 1;
}
if (c == 2) {
return 2;
}
if (c != 3) {
return c != 4 ? 0 : 4;
}
return 3;
}
}
|
[
"nganht2@vng.com.vn"
] |
nganht2@vng.com.vn
|
b3864bc44a436e9fa999664e6033f4f51931759e
|
74ef6dd6d640b5550a7b7235b12e90da3f9c085b
|
/app/src/main/obsolete/test/org/test/zlibrary/model/TestTextParagraph.java
|
663f10993c18a3f42f346e0752b4b7802730afd1
|
[] |
no_license
|
jaychou2012/FBReaderJ-aar-Android-Studio
|
dfa8dd8a684ba5c3d79e0fc700a69923ab09bb1e
|
42eb6d94c762403a17ac47c5ff718008a4abad10
|
refs/heads/master
| 2021-05-04T11:40:14.349403
| 2020-08-25T13:23:38
| 2020-08-25T13:23:38
| 54,856,694
| 6
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 642
|
java
|
package org.test.zlibrary.model;
import org.geometerplus.zlibrary.text.model.ZLTextParagraph;
import org.geometerplus.zlibrary.text.model.impl.ZLModelFactory;
import junit.framework.TestCase;
public class TestTextParagraph extends TestCase {
private ZLModelFactory factory = new ZLModelFactory();
public void test() {
/*
ZLTextParagraph paragraph = factory.createParagraph();
paragraph.addEntry(factory.createTextEntry("marina1"));
paragraph.addEntry(factory.createTextEntry("marina2"));
assertEquals(paragraph.getEntryNumber(), 2);
assertEquals(paragraph.getTextLength(),14);
*/
}
}
|
[
"852041173@qq.com"
] |
852041173@qq.com
|
4daea0e81f5ac6fa894bb5c0a248e89976021cce
|
e88215712898c8faad7aa4b7b7278cbb3a47e162
|
/src/com/eoulu/service/ApplicationGalleryService.java
|
3858cb8b12e1747436f5b9f957d7e778f6c758ae
|
[] |
no_license
|
LGDHuaOPER/HuaFEEng_Goose
|
f482fff96aaf8d1910b3ee11a181d8423c276b9b
|
318ca4377a0d37c9dcebb925456591ddf264e23d
|
refs/heads/master
| 2020-03-27T23:12:46.256068
| 2018-09-29T10:13:27
| 2018-09-29T10:13:27
| 147,301,655
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 970
|
java
|
package com.eoulu.service;
import java.util.List;
import java.util.Map;
import com.eoulu.commonality.Page;
import com.eoulu.entity.ProductDrawings;
import com.eoulu.entity.Scheme;
public interface ApplicationGalleryService {
public boolean addScheme(Scheme scheme);
public boolean updateScheme(Scheme scheme);
public List<Map<String, Object>> getSchemeByPage(Page page,String type,String column1,String content1,String column2,String content2);
public int getSchemeCount(String type,String column1,String content1,String column2,String content2);
public boolean addProduct(ProductDrawings drawings);
public boolean updateProduct(ProductDrawings drawings);
public List<Map<String, Object>> getDrawingsByPage(Page page,String category,String type,String column1,String content1,String column2,String content2);
public int getDrawingsCount(String category,String type,String column1,String content1,String column2,String content2);
}
|
[
"LGD_HuaOPER@gmail.com"
] |
LGD_HuaOPER@gmail.com
|
c8fcb16d87c74b0785b74e8fe180aa5a8267a00a
|
545f84c61ef403588da0cfd6ddfe25c0415dbdb4
|
/JavaRushTasks/1.JavaSyntax/src/com/javarush/task/task09/task0911/Solution.java
|
3e91bece6fc4a10900be9cf61058d57be99efb67
|
[
"Apache-2.0"
] |
permissive
|
Rodriguez111/JavaRush
|
562751e68237f36f32ea6b9d37c3c95e01f6b5e5
|
8d70f5353087301e674acef1316b9a523202ad3f
|
refs/heads/master
| 2020-04-12T00:04:57.960891
| 2019-01-06T01:46:25
| 2019-01-06T01:46:25
| 140,509,243
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 570
|
java
|
package com.javarush.task.task09.task0911;
import java.util.HashMap;
/*
Исключение при работе с коллекциями Map
*/
public class Solution {
public static void main(String[] args) throws Exception {
try {
HashMap<String, String> map = new HashMap<String, String>(null);
map.put(null, null);
map.remove(null);
}
catch(NullPointerException i)
{
System.out.println("NullPointerException");
}
//напишите тут ваш код
}
}
|
[
"dreamhunter1@ukr.net"
] |
dreamhunter1@ukr.net
|
3439402cb9a56a8b92b699dc716b3bc56123f852
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_38207.java
|
ae28a2e38ab5a31c4bd45a57b6bdd5a15c6778e3
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 214
|
java
|
/**
* Sets ID value for given entity.
*/
public void setIdValue(final E object,final Object value){
final String propertyName=getIdPropertyName();
BeanUtil.declared.setProperty(object,propertyName,value);
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
827698d91163a3c36cecccd1a14f6a7e01699c1c
|
cec628def1aad94ccbefa814d2a0dbd51588e9bd
|
/mercurial.remote/src/org/netbeans/modules/mercurial/remote/ui/branch/CreateBranchAction.java
|
600247343a94511568ff55e5f7f1873bd6cf1b35
|
[] |
no_license
|
emilianbold/netbeans-releases
|
ad6e6e52a896212cb628d4522a4f8ae685d84d90
|
2fd6dc84c187e3c79a959b3ddb4da1a9703659c7
|
refs/heads/master
| 2021-01-12T04:58:24.877580
| 2017-10-17T14:38:27
| 2017-10-17T14:38:27
| 78,269,363
| 30
| 15
| null | 2020-10-13T08:36:08
| 2017-01-07T09:07:28
| null |
UTF-8
|
Java
| false
| false
| 6,247
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved.
*
* Oracle and Java are registered trademarks of Oracle and/or its affiliates.
* Other names may be trademarks of their respective owners.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common
* Development and Distribution License("CDDL") (collectively, the
* "License"). You may not use this file except in compliance with the
* License. You can obtain a copy of the License at
* http://www.netbeans.org/cddl-gplv2.html
* or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
* specific language governing permissions and limitations under the
* License. When distributing the software, include this License Header
* Notice in each file and include the License file at
* nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the
* License Header, with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* Contributor(s):
*
* The Original Software is NetBeans. The Initial Developer of the Original
* Software is Sun Microsystems, Inc. Portions Copyright 1997-2009 Sun
* Microsystems, Inc. All Rights Reserved.
*
* If you wish your version of this file to be governed by only the CDDL
* or only the GPL Version 2, indicate your decision by adding
* "[Contributor] elects to include this software in this distribution
* under the [CDDL or GPL Version 2] license." If you do not indicate a
* single choice of license, a recipient has the option to distribute
* your version of this file under either the CDDL, the GPL Version 2 or
* to extend the choice of license to its licensees as provided above.
* However, if you add GPL Version 2 code and therefore, elected the GPL
* Version 2 license, then the option applies only if the new code is
* made subject to such option by the copyright holder.
*/
package org.netbeans.modules.mercurial.remote.ui.branch;
import org.netbeans.modules.mercurial.remote.HgException;
import org.netbeans.modules.mercurial.remote.HgProgressSupport;
import org.netbeans.modules.mercurial.remote.Mercurial;
import org.netbeans.modules.mercurial.remote.OutputLogger;
import org.netbeans.modules.mercurial.remote.WorkingCopyInfo;
import org.netbeans.modules.mercurial.remote.ui.actions.ContextAction;
import org.netbeans.modules.mercurial.remote.util.HgCommand;
import org.netbeans.modules.mercurial.remote.util.HgUtils;
import org.netbeans.modules.versioning.core.api.VCSFileProxy;
import org.netbeans.modules.versioning.core.spi.VCSContext;
import org.openide.DialogDisplayer;
import org.openide.NotifyDescriptor;
import org.openide.awt.ActionID;
import org.openide.awt.ActionRegistration;
import org.openide.nodes.Node;
import org.openide.util.NbBundle;
import org.openide.util.NbBundle.Messages;
import org.openide.util.RequestProcessor;
@ActionID(id = "org.netbeans.modules.mercurial.remote.ui.branch.CreateBranchAction", category = "MercurialRemote")
@ActionRegistration(displayName = "#CTL_MenuItem_CreateBranch")
@Messages({
"CTL_MenuItem_CreateBranch=Create &Branch...",
"CTL_PopupMenuItem_CreateBranch=Create Branch..."
})
public class CreateBranchAction extends ContextAction {
@Override
protected boolean enable(Node[] nodes) {
return HgUtils.isFromHgRepository(HgUtils.getCurrentContext(nodes));
}
@Override
protected String getBaseName(Node[] nodes) {
return "CTL_MenuItem_CreateBranch"; // NOI18N
}
@Override
@Messages({
"# {0} - branch name", "MSG_CREATE_WC_MARKED=Working copy marked as branch {0}.\nDo not forget to commit to make the branch permanent."
})
protected void performContextAction(Node[] nodes) {
VCSContext ctx = HgUtils.getCurrentContext(nodes);
final VCSFileProxy roots[] = HgUtils.getActionRoots(ctx);
if (roots == null || roots.length == 0) {
return;
}
final VCSFileProxy root = Mercurial.getInstance().getRepositoryRoot(roots[0]);
CreateBranch createBranch = new CreateBranch();
if (!createBranch.showDialog()) {
return;
}
final String branchName = createBranch.getBranchName();
RequestProcessor rp = Mercurial.getInstance().getRequestProcessor(root);
HgProgressSupport support = new HgProgressSupport() {
@Override
public void perform() {
OutputLogger logger = getLogger();
try {
logger.outputInRed(NbBundle.getMessage(CreateBranchAction.class, "MSG_CREATE_TITLE")); //NOI18N
logger.outputInRed(NbBundle.getMessage(CreateBranchAction.class, "MSG_CREATE_TITLE_SEP")); //NOI18N
logger.output(NbBundle.getMessage(CreateBranchAction.class, "MSG_CREATE_INFO_SEP", branchName, root.getPath())); //NOI18N
HgCommand.markBranch(root, branchName, logger);
WorkingCopyInfo.refreshAsync(root);
DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(
Bundle.MSG_CREATE_WC_MARKED(branchName),
NotifyDescriptor.INFORMATION_MESSAGE));
logger.output(Bundle.MSG_CREATE_WC_MARKED(branchName));
} catch (HgException.HgCommandCanceledException ex) {
// canceled by user, do nothing
} catch (HgException ex) {
HgUtils.notifyException(ex);
}
logger.outputInRed(NbBundle.getMessage(CreateBranchAction.class, "MSG_CREATE_DONE")); // NOI18N
logger.output(""); // NOI18N
}
};
support.start(rp, root, org.openide.util.NbBundle.getMessage(CreateBranchAction.class, "MSG_CreateBranch_Progress", branchName)); //NOI18N
}
}
|
[
"alexvsimon@netbeans.org"
] |
alexvsimon@netbeans.org
|
283f4c277f08095fac96669b18a673d74ebfbc6b
|
b78d96a8660f90649035c7a6d6698cabb2946d62
|
/solutions/ModelJoin/src/main/java/CIM/IEC61970/Informative/MarketOperations/StartUpCostCurve.java
|
e859124576151451d7c163051627f9998b95952f
|
[
"MIT"
] |
permissive
|
suchaoxiao/ttc2017smartGrids
|
d7b677ddb20a0adc74daed9e3ae815997cc86e1a
|
2997f1c202f5af628e50f5645c900f4d35f44bb7
|
refs/heads/master
| 2021-06-19T10:21:22.740676
| 2017-07-14T12:13:22
| 2017-07-14T12:13:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,651
|
java
|
/**
*/
package CIM.IEC61970.Informative.MarketOperations;
import CIM.IEC61970.Core.Curve;
import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Start Up Cost Curve</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link CIM.IEC61970.Informative.MarketOperations.StartUpCostCurve#getGeneratingBids <em>Generating Bids</em>}</li>
* <li>{@link CIM.IEC61970.Informative.MarketOperations.StartUpCostCurve#getRegisteredGenerators <em>Registered Generators</em>}</li>
* </ul>
*
* @see CIM.IEC61970.Informative.MarketOperations.MarketOperationsPackage#getStartUpCostCurve()
* @model annotation="http://iec.ch/TC57/2009/CIM-schema-cim14 Documentation='Startup costs and time as a function of down time. Relationship between unit startup cost (Y1-axis) and unit startup time (Y2-axis) vs. unit elapsed down time (X-axis).'"
* annotation="http://langdale.com.au/2005/UML Profile\040documentation='Startup costs and time as a function of down time. Relationship between unit startup cost (Y1-axis) and unit startup time (Y2-axis) vs. unit elapsed down time (X-axis).'"
* annotation="http://www.eclipse.org/emf/2002/GenModel Documentation='Startup costs and time as a function of down time. Relationship between unit startup cost (Y1-axis) and unit startup time (Y2-axis) vs. unit elapsed down time (X-axis).' Profile\040documentation='Startup costs and time as a function of down time. Relationship between unit startup cost (Y1-axis) and unit startup time (Y2-axis) vs. unit elapsed down time (X-axis).'"
* @generated
*/
public interface StartUpCostCurve extends Curve {
/**
* Returns the value of the '<em><b>Generating Bids</b></em>' reference list.
* The list contents are of type {@link CIM.IEC61970.Informative.MarketOperations.GeneratingBid}.
* It is bidirectional and its opposite is '{@link CIM.IEC61970.Informative.MarketOperations.GeneratingBid#getStartUpCostCurve <em>Start Up Cost Curve</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Generating Bids</em>' reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Generating Bids</em>' reference list.
* @see CIM.IEC61970.Informative.MarketOperations.MarketOperationsPackage#getStartUpCostCurve_GeneratingBids()
* @see CIM.IEC61970.Informative.MarketOperations.GeneratingBid#getStartUpCostCurve
* @model opposite="StartUpCostCurve"
* @generated
*/
EList<GeneratingBid> getGeneratingBids();
/**
* Returns the value of the '<em><b>Registered Generators</b></em>' reference list.
* The list contents are of type {@link CIM.IEC61970.Informative.MarketOperations.RegisteredGenerator}.
* It is bidirectional and its opposite is '{@link CIM.IEC61970.Informative.MarketOperations.RegisteredGenerator#getStartUpCostCurves <em>Start Up Cost Curves</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Registered Generators</em>' reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Registered Generators</em>' reference list.
* @see CIM.IEC61970.Informative.MarketOperations.MarketOperationsPackage#getStartUpCostCurve_RegisteredGenerators()
* @see CIM.IEC61970.Informative.MarketOperations.RegisteredGenerator#getStartUpCostCurves
* @model opposite="StartUpCostCurves"
* @generated
*/
EList<RegisteredGenerator> getRegisteredGenerators();
} // StartUpCostCurve
|
[
"hinkel@fzi.de"
] |
hinkel@fzi.de
|
89e2af5197c31bf454e54614310553beb3b9e874
|
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
|
/sources/com/avito/android/feedback_adverts/FeedbackAdvertsInteractor.java
|
92576064c4abb150990004087b242c7dbbd02545
|
[] |
no_license
|
Auch-Auch/avito_source
|
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
|
76fdcc5b7e036c57ecc193e790b0582481768cdc
|
refs/heads/master
| 2023-05-06T01:32:43.014668
| 2021-05-25T10:19:22
| 2021-05-25T10:19:22
| 370,650,685
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,158
|
java
|
package com.avito.android.feedback_adverts;
import com.avito.android.remote.feedback.FeedbackAdvertItem;
import io.reactivex.Single;
import java.util.List;
import kotlin.Metadata;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0003\bf\u0018\u00002\u00020\u0001J-\u0010\t\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\b0\u00070\u00062\b\u0010\u0003\u001a\u0004\u0018\u00010\u00022\u0006\u0010\u0005\u001a\u00020\u0004H&¢\u0006\u0004\b\t\u0010\n¨\u0006\u000b"}, d2 = {"Lcom/avito/android/feedback_adverts/FeedbackAdvertsInteractor;", "", "", "itemId", "", "page", "Lio/reactivex/Single;", "", "Lcom/avito/android/remote/feedback/FeedbackAdvertItem;", "getFeedbackItems", "(Ljava/lang/String;I)Lio/reactivex/Single;", "feedback-adverts_release"}, k = 1, mv = {1, 4, 2})
public interface FeedbackAdvertsInteractor {
@NotNull
Single<List<FeedbackAdvertItem>> getFeedbackItems(@Nullable String str, int i);
}
|
[
"auchhunter@gmail.com"
] |
auchhunter@gmail.com
|
6640c4fe1fc4aed7d1b03b7d2ba167a797d8be0b
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes5.dex_source_from_JADX/com/facebook/graphql/deserializers/GraphQLStorySaveInfoDeserializer.java
|
6b758807392847fc684dab25565fb6ebdfa8d898
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,376
|
java
|
package com.facebook.graphql.deserializers;
import com.facebook.flatbuffers.FlatBufferBuilder;
import com.facebook.flatbuffers.MutableFlatBuffer;
import com.facebook.graphql.enums.GraphQLSavedState;
import com.facebook.graphql.enums.GraphQLStorySaveNuxType;
import com.facebook.graphql.enums.GraphQLStorySaveType;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
import java.nio.ByteBuffer;
/* compiled from: mobile_platform_native_like_button */
public class GraphQLStorySaveInfoDeserializer {
public static int m5976a(JsonParser jsonParser, FlatBufferBuilder flatBufferBuilder) {
boolean[] zArr = new boolean[5];
int[] iArr = new int[2];
Enum[] enumArr = new Enum[3];
while (jsonParser.c() != JsonToken.END_OBJECT) {
String i = jsonParser.i();
jsonParser.c();
if (!(jsonParser.g() == JsonToken.VALUE_NULL || i == null)) {
if (i.equals("story_save_nux_max_consume_duration")) {
zArr[0] = true;
iArr[0] = jsonParser.E();
} else if (i.equals("story_save_nux_min_consume_duration")) {
zArr[1] = true;
iArr[1] = jsonParser.E();
} else if (i.equals("story_save_nux_type")) {
zArr[2] = true;
enumArr[0] = GraphQLStorySaveNuxType.fromString(jsonParser.o());
} else if (i.equals("story_save_type")) {
zArr[3] = true;
enumArr[1] = GraphQLStorySaveType.fromString(jsonParser.o());
} else if (i.equals("viewer_save_state")) {
zArr[4] = true;
enumArr[2] = GraphQLSavedState.fromString(jsonParser.o());
} else {
jsonParser.f();
}
}
}
flatBufferBuilder.c(5);
if (zArr[0]) {
flatBufferBuilder.a(0, iArr[0], 0);
}
if (zArr[1]) {
flatBufferBuilder.a(1, iArr[1], 0);
}
if (zArr[2]) {
flatBufferBuilder.a(2, enumArr[0]);
}
if (zArr[3]) {
flatBufferBuilder.a(3, enumArr[1]);
}
if (zArr[4]) {
flatBufferBuilder.a(4, enumArr[2]);
}
return flatBufferBuilder.d();
}
public static MutableFlatBuffer m5977a(JsonParser jsonParser, short s) {
FlatBufferBuilder flatBufferBuilder = new FlatBufferBuilder(128);
int a = m5976a(jsonParser, flatBufferBuilder);
if (1 != 0) {
flatBufferBuilder.c(2);
flatBufferBuilder.a(0, s, 0);
flatBufferBuilder.b(1, a);
a = flatBufferBuilder.d();
}
flatBufferBuilder.d(a);
ByteBuffer wrap = ByteBuffer.wrap(flatBufferBuilder.e());
wrap.position(0);
MutableFlatBuffer mutableFlatBuffer = new MutableFlatBuffer(wrap, null, null, true, null);
mutableFlatBuffer.a(4, Boolean.valueOf(true));
return mutableFlatBuffer;
}
public static void m5978a(MutableFlatBuffer mutableFlatBuffer, int i, JsonGenerator jsonGenerator) {
jsonGenerator.f();
int a = mutableFlatBuffer.a(i, 0, 0);
if (a != 0) {
jsonGenerator.a("story_save_nux_max_consume_duration");
jsonGenerator.b(a);
}
a = mutableFlatBuffer.a(i, 1, 0);
if (a != 0) {
jsonGenerator.a("story_save_nux_min_consume_duration");
jsonGenerator.b(a);
}
if (mutableFlatBuffer.a(i, 2, (short) 0) != (short) 0) {
jsonGenerator.a("story_save_nux_type");
jsonGenerator.b(((GraphQLStorySaveNuxType) mutableFlatBuffer.a(i, 2, GraphQLStorySaveNuxType.class)).name());
}
if (mutableFlatBuffer.a(i, 3, (short) 0) != (short) 0) {
jsonGenerator.a("story_save_type");
jsonGenerator.b(((GraphQLStorySaveType) mutableFlatBuffer.a(i, 3, GraphQLStorySaveType.class)).name());
}
if (mutableFlatBuffer.a(i, 4, (short) 0) != (short) 0) {
jsonGenerator.a("viewer_save_state");
jsonGenerator.b(((GraphQLSavedState) mutableFlatBuffer.a(i, 4, GraphQLSavedState.class)).name());
}
jsonGenerator.g();
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
3fc0b59432298bb90d9f33fc9e879533904654d9
|
61a622eab52cbea805e9ccd5ffe92278cab04877
|
/Javanewfeature/src/main/java/luozix/start/action/concurrent/CyclicBarrierTest2.java
|
c14f6a7f8c70a871ee5bcf0318a4f691145d1726
|
[
"Apache-2.0"
] |
permissive
|
renyiwei-xinyi/jmh-and-javanew
|
edbbd611c5365211fe2718cdddf3de5e3ffd6487
|
c70d5043420a2f7f8e500de076ad82f5df801756
|
refs/heads/master
| 2023-03-09T06:15:56.504278
| 2021-02-28T12:40:55
| 2021-02-28T12:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,040
|
java
|
/**
* @Title: CyclicBarrierTest2.java
* @Package luozix.start.action.concurrent
* @Description: TODO(用一句话描述该文件做什么)
* @author xiaoyu xiaoyulong07@outlook.com
* @date 2021年2月6日 上午10:54:43
* @version V1.0
*/
package luozix.start.action.concurrent;
import java.util.concurrent.CyclicBarrier;
/**
* @ClassName: CyclicBarrierTest2
* @Description: TODO(这里用一句话描述这个类的作用)
* @author xiaoyu xiaoyulong07@outlook.com
* @date 2021年2月6日 上午10:54:43
*
*/
public class CyclicBarrierTest2 {
static CyclicBarrier c = new CyclicBarrier(2, new A());
public static void main(String[] args) {
new Thread(new Runnable() {
@Override
public void run() {
try {
c.await();
} catch (Exception e) {
}
System.out.println(1);
}
}).start();
try {
c.await();
} catch (Exception e) {
}
System.out.println(2);
}
static class A implements Runnable {
@Override
public void run() {
System.out.println(3);
}
}
}
|
[
"xiaoyulong1988@gmail.com"
] |
xiaoyulong1988@gmail.com
|
0182b09e1b1e666f3d8144858dae4208dee58bd0
|
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
|
/ast_results/ccrama_Slide/app/src/main/java/me/ccrama/redditslide/SwipeLayout/app/SwipeBackActivityHelper.java
|
9f92cb9721351011edcb97130399a4744a60adb7
|
[] |
no_license
|
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
|
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
|
0564143d92f8024ff5fa6b659c2baebf827582b1
|
refs/heads/master
| 2020-07-13T13:53:40.297493
| 2019-01-11T11:51:18
| 2019-01-11T11:51:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,669
|
java
|
// isComment
package me.ccrama.redditslide.SwipeLayout.app;
import android.app.Activity;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.view.LayoutInflater;
import android.view.View;
import me.ccrama.redditslide.R;
import me.ccrama.redditslide.SwipeLayout.SwipeBackLayout;
import me.ccrama.redditslide.SwipeLayout.Utils;
/**
* isComment
*/
public class isClassOrIsInterface {
private Activity isVariable;
private SwipeBackLayout isVariable;
public isConstructor(Activity isParameter) {
isNameExpr = isNameExpr;
}
@SuppressWarnings("isStringConstant")
public void isMethod() {
isNameExpr.isMethod().isMethod(new ColorDrawable(isNameExpr.isFieldAccessExpr));
isNameExpr.isMethod().isMethod().isMethod(null);
isNameExpr = (SwipeBackLayout) isNameExpr.isMethod(isNameExpr).isMethod(isNameExpr.isFieldAccessExpr.isFieldAccessExpr, null);
isNameExpr.isMethod(new SwipeBackLayout.SwipeListener() {
@Override
public void isMethod(int isParameter, float isParameter) {
}
@Override
public void isMethod(int isParameter) {
isNameExpr.isMethod(isNameExpr);
}
@Override
public void isMethod() {
}
});
}
public void isMethod() {
isNameExpr.isMethod(isNameExpr);
}
public View isMethod(int isParameter) {
if (isNameExpr != null) {
return isNameExpr.isMethod(isNameExpr);
}
return null;
}
public SwipeBackLayout isMethod() {
return isNameExpr;
}
}
|
[
"matheus@melsolucoes.net"
] |
matheus@melsolucoes.net
|
c5ccd8e09d0789c3100b82b15b7472de58b8a9d2
|
419d8ddce5a33e2025a906638fb1ab4918464cd2
|
/concurrent_study/jdk7-source/src/org/omg/CosNaming/NamingContextPackage/NotEmpty.java
|
d333b8cd182eca3a028ed1180a6f14f755f72ebb
|
[] |
no_license
|
ynan1213/Java-Study
|
43ac8ba546fc5a6188ee8872767fa316dfea4a32
|
1d933138e79ef2cb8ea4de57abc84ac12d883a0a
|
refs/heads/master
| 2022-06-30T11:54:23.245439
| 2021-12-05T01:43:03
| 2021-12-05T01:43:03
| 152,955,095
| 1
| 0
| null | 2022-06-21T04:21:49
| 2018-10-14T08:44:55
|
Java
|
UTF-8
|
Java
| false
| false
| 577
|
java
|
package org.omg.CosNaming.NamingContextPackage;
/**
* org/omg/CosNaming/NamingContextPackage/NotEmpty.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from ../../../../src/share/classes/org/omg/CosNaming/nameservice.idl
* Thursday, April 4, 2013 4:34:37 AM PDT
*/
public final class NotEmpty extends org.omg.CORBA.UserException
{
public NotEmpty ()
{
super(NotEmptyHelper.id());
} // ctor
public NotEmpty (String $reason)
{
super(NotEmptyHelper.id() + " " + $reason);
} // ctor
} // class NotEmpty
|
[
"452245790@qq.com"
] |
452245790@qq.com
|
b708ade18833feff7de50effdd07209758e4c06d
|
ea82e4c9858dbbd2fc8f4639106b7a7b679cb125
|
/Security-web/src/main/java/com/duheng/security/config/SecurityConfig.java
|
9b7fb99629cb738fe2d8f04b5b7333193107e786
|
[] |
no_license
|
UserJustins/Security
|
f65552f37dfe026716131f6955026e068fc79c72
|
87cddfffbfc7dbedb487b7ff66dbac44f03ed347
|
refs/heads/master
| 2022-10-28T23:15:50.716851
| 2020-03-08T12:01:14
| 2020-03-08T12:01:14
| 244,904,951
| 0
| 0
| null | 2022-10-12T20:37:15
| 2020-03-04T13:17:09
|
Java
|
UTF-8
|
Java
| false
| false
| 3,912
|
java
|
package com.duheng.security.config;
import com.duheng.security.properties.SecurityProperties;
import com.duheng.security.validCodeImage.ValidCodeImageFilter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
/*************************
Author: 杜衡
Date: 2020/3/5
Describe:
资源是否需要认证由SpringSecurity决定,如果需要进行认证就会根据loginPage进行跳转;
跳转之前SpringSecurity将当前请求封装到HttpSessionRequestCache。
*************************/
@Configuration
public class SecurityConfig extends WebSecurityConfigurerAdapter{
@Autowired
private SecurityProperties securityProperties;
//自定义登录成功处理器
@Autowired
private AuthenticationSuccessHandler iduAuthenticationSuccessHandler; //自定义登录成功处理器
//自定义登录失败处理器
@Autowired
private AuthenticationFailureHandler iduAuthenticationFailureHandler;
/**
* 密码的加密算法
* @return
*/
@Bean
public PasswordEncoder passwordEncoder(){
return new BCryptPasswordEncoder();
}
/**
* 1、指定登录认证方式 eg: formLogin()
* 2、对所有的资源进行权限检查
* http.formLogin()
* .and()
* .authorizeRequests()
* .anyRequest()
* .authenticated();
* 3、自定义登录页面 ,可以是Handler也可以是pageName;记得要要对资源放行
* 否则login.html被拦截重新去到login.html,死循环;导致页面重定向次数
* 过多而报错
* eg: loginPage("/login.html")
* .antMatchers("/login.html").permitAll()
* 4、登录请求处理
* UsernamePasswordAuthenticationFilter中默认处理的是"/login"
* 和"post"的请求,自定义action怎么办?
* eg: .loginProcessingUrl("/authentication/form")
* 5、暂时关闭CSRF
* eg:http.csrf().disable();
*
*
*
* @param http
* @throws Exception
*/
@Override
protected void configure(HttpSecurity http) throws Exception {
ValidCodeImageFilter validCodeImageFilter = new ValidCodeImageFilter();
validCodeImageFilter.setAuthenticationFailureHandler(iduAuthenticationFailureHandler);
http.addFilterBefore(validCodeImageFilter,UsernamePasswordAuthenticationFilter.class)
.formLogin()//指定使用表单的认证方式 UsernamePasswordAuthenticationFilter
.loginPage("/authentication/require")//认证去Handler进行处理
.loginProcessingUrl("/authentication/form")
.successHandler(iduAuthenticationSuccessHandler)
.failureHandler(iduAuthenticationFailureHandler)
.and()
.authorizeRequests()
.antMatchers("/authentication/require",
securityProperties.getBrowser().getLoginPage(),
"/image/code").permitAll()//指定放行的资源
.anyRequest()
.authenticated()
.and()
.csrf().disable();
}
}
|
[
"DuHeng@sina.com"
] |
DuHeng@sina.com
|
834cfd5efc15a51ff0c81d258b6984d2ba345122
|
2398ca42ef4d11e82b56c9fa1aae7c4d1b51effd
|
/junit/Ex4.java
|
9d3fcaea07f15270230781601ff04ca4de02c18e
|
[] |
no_license
|
KimiyukiYamauchi/java.2020
|
99383deb6dfb1887f168e36cc2a3202d44fb9247
|
d2c7270532fd932a5774dfb3cc347a23ff7db76e
|
refs/heads/master
| 2023-01-19T18:16:40.501284
| 2020-11-25T08:38:30
| 2020-11-25T08:38:30
| 305,962,972
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,539
|
java
|
package junit;
class Ex4{
public int [] ex4_1(){
int [] ret = new int[1];
return ret;
}
public double [] ex4_2(){
double [] ret = new double[1];
return ret;
}
public int [] ex4_3(int a, int b){
int [] ret = new int[1];
return ret;
}
public int [] ex4_4(int [] a){
int [] ret = new int[1];
return ret;
}
public int ex4_5(int [] a, int key){
int ret = 9999;
return ret;
}
public int ex4_6(int [] a, int key){
int ret = 9999;
return ret;
}
public int [] ex4_7(int [] a, int idx){
int [] ret = new int[1];
return ret;
}
public int [] ex4_8(int [] a, int idx, int n){
int [] ret = new int[1];
return ret;
}
public int [] ex4_9(int [] a, int idx, int x){
int [] ret = new int[1];
return ret;
}
public void ex4_10(int [] a, int [] b){
return;
}
public int [] ex4_11(int [] a){
int [] ret = new int[0];
return ret;
}
public int [] ex4_12(int [] a, int x){
int [] ret = new int[0];
return ret;
}
public int [] ex4_13(int [] a, int idx){
int [] ret = new int[0];
return ret;
}
public int [] ex4_14(int [] a, int idx, int n){
int [] ret = new int[0];
return ret;
}
public int [] ex4_15(int [] a, int idx, int x){
int [] ret = new int[0];
return ret;
}
}
|
[
"yamauchi@std.it-college.ac.jp"
] |
yamauchi@std.it-college.ac.jp
|
ec7b189d7c2d9473fdead07c2f526f6495865d42
|
b7a1bade5bf347f2601ebdb7eda3e954895e6455
|
/project02t/step02/src/main/java/java76/pms/servlet/ProjectListServlet.java
|
ddf0166e5efde163b4aaf84a7c479e0376833a24
|
[] |
no_license
|
Jeongjiho/Java76
|
a1429f12ffc2a5c557289760eb3164adba39c6eb
|
5c98d47a341776bc7b54b28907356b3007b46592
|
refs/heads/master
| 2016-08-12T20:29:57.698964
| 2016-02-22T14:59:27
| 2016-02-22T14:59:27
| 56,924,651
| 1
| 0
| null | 2016-04-23T14:54:31
| 2016-04-23T14:54:31
| null |
UTF-8
|
Java
| false
| false
| 915
|
java
|
package java76.pms.servlet;
import java.io.PrintStream;
import java.util.HashMap;
import java76.pms.annotation.Component;
import java76.pms.dao.ProjectDao;
import java76.pms.domain.Project;
@Component("/project/list")
public class ProjectListServlet implements Servlet {
ProjectDao projectDao;
public void setProjectDao(ProjectDao projectDao) {
this.projectDao = projectDao;
}
@Override
public void service(HashMap<String, Object> params) {
PrintStream out = (PrintStream)params.get("out");
out.printf("%-3s %-20s %-10s %-10s %-40s\n",
"No", "Title", "Start", "End", "Members");
for (Project project : projectDao.selectList()) {
out.printf("% 3d %-20s %3$tY-%3$tm-%3$td %4$s %5$-40s\n",
project.getNo(),
project.getTitle(),
project.getStartDate(),
project.getEndDate(),
project.getMember());
}
}
}
|
[
"jinyoung.eom@gmail.com"
] |
jinyoung.eom@gmail.com
|
934dc0f6656ccb9e3d09fd1d063b646cb9ef4680
|
b2a635e7cc27d2df8b1c4197e5675655add98994
|
/e/d/c/o/a0/n.java
|
e7b6bf47bd8b3ffd15427d74d81094d9dca14fcc
|
[] |
no_license
|
history-purge/LeaveHomeSafe-source-code
|
5f2d87f513d20c0fe49efc3198ef1643641a0313
|
0475816709d20295134c1b55d77528d74a1795cd
|
refs/heads/master
| 2023-06-23T21:38:37.633657
| 2021-07-28T13:27:30
| 2021-07-28T13:27:30
| 390,328,492
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 663
|
java
|
package e.d.c.o.a0;
import e.d.c.b;
import java.util.HashMap;
public class n extends b {
protected static final HashMap<Integer, String> e = new HashMap<Integer, String>();
static {
e.put(Integer.valueOf(1), "Proprietary Thumbnail Format Data");
e.put(Integer.valueOf(3584), "Print Image Matching (PIM) Info");
}
public n() {
a(new m(this));
}
public String a() {
return "Kyocera/Contax Makernote";
}
protected HashMap<Integer, String> b() {
return e;
}
}
/* Location: /home/yc/Downloads/LeaveHomeSafe.jar!/e/d/c/o/a0/n.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/
|
[
"game0427game@gmail.com"
] |
game0427game@gmail.com
|
a5a0b7ed4de93b9b4f3fcb2d88a6930898a45cc0
|
c02bdf9a2fe406d2ad85ca52406ccde8d9d49d59
|
/src/main/java/org/example/microprofile/api/beans/plans/PlanBean.java
|
90751ec70d22b6943b16254a4799405384c1b962
|
[
"Apache-2.0"
] |
permissive
|
EricWittmann/microprofile-openapi-jaxrs-example
|
f47704c12c0dda6e8a2730befdeec53e59c08e2b
|
09942ec89e630683a87e79fdd38f7dbd8535c671
|
refs/heads/master
| 2021-04-12T07:52:44.518305
| 2018-03-21T16:14:36
| 2018-03-21T16:14:36
| 126,022,609
| 0
| 2
|
Apache-2.0
| 2018-03-21T16:14:37
| 2018-03-20T13:34:22
|
Java
|
UTF-8
|
Java
| false
| false
| 3,094
|
java
|
/*
* Copyright 2014 JBoss Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.example.microprofile.api.beans.plans;
import java.io.Serializable;
import java.util.Date;
import java.util.LinkedHashSet;
import java.util.Set;
import org.example.microprofile.api.beans.orgs.OrganizationBean;
/**
* Models a plan.
*
* @author eric.wittmann@redhat.com
*/
public class PlanBean implements Serializable {
private static final long serialVersionUID = -7961331943587584049L;
private OrganizationBean organization;
private String id;
private String name;
private String description;
private String createdBy;
private Date createdOn;
private Set<PlanVersionBean> versions = new LinkedHashSet<>();
/**
* @return the id
*/
public String getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(String id) {
this.id = id;
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the createdOn
*/
public Date getCreatedOn() {
return createdOn;
}
/**
* @param createdOn the createdOn to set
*/
public void setCreatedOn(Date createdOn) {
this.createdOn = createdOn;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description the description to set
*/
public void setDescription(String description) {
this.description = description;
}
/**
* @return the createdBy
*/
public String getCreatedBy() {
return createdBy;
}
/**
* @param createdBy the createdBy to set
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
* @return the organization
*/
public OrganizationBean getOrganization() {
return organization;
}
/**
* @param organization the organization to set
*/
public void setOrganization(OrganizationBean organization) {
this.organization = organization;
}
/**
* @return the versions
*/
public Set<PlanVersionBean> getVersions() {
return versions;
}
/**
* @param versions the versions to set
*/
public void setVersions(Set<PlanVersionBean> versions) {
this.versions = versions;
}
}
|
[
"eric.wittmann@gmail.com"
] |
eric.wittmann@gmail.com
|
ec4a3b11884b5a5b325fd1247dd698ba619158ad
|
c53a1a5f557437797d30f68b30e08a7de109c805
|
/android/app/src/main/java/com/bai3react/MainActivity.java
|
18f02908d95fdaefe9d28b40c5cec9d36e6e2c32
|
[] |
no_license
|
NgocNamFNT/LayOut
|
6f80e6a31d567848f8a85c4a06b2f46939513f1e
|
24f5e9c4eb471c9412a4ecf8c09b727ef8065b8b
|
refs/heads/master
| 2020-03-19T01:25:44.137213
| 2018-05-31T07:10:58
| 2018-05-31T07:10:58
| 135,544,564
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 363
|
java
|
package com.bai3react;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "Bai3React";
}
}
|
[
"="
] |
=
|
5577d990f25df2de62dbe8e28a39efdfbcb25884
|
df1bd8592db706162c19e494e6b8dd49a39e558f
|
/Lecture2-CodeExamples/src/ContinueExample.java
|
f058e441954191d7edee9b523571bc11e80ac4c4
|
[] |
no_license
|
georgepetrof/CourseAutomationPragmatic18
|
5f0c0b56aff3133b8a3de9a60646a18ff3241f57
|
a0078d60db733f49437ebc06da63bcf89f197bd7
|
refs/heads/master
| 2020-04-01T17:49:14.663601
| 2018-11-09T14:26:26
| 2018-11-09T14:26:26
| 153,452,785
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 210
|
java
|
public class ContinueExample {
public static void main(String[] args) {
int i = 0;
while (i <= 50) {
i = i + 1;
if(i % 7 != 0) {
continue;
}
System.out.print(i + " ");
}
}
}
|
[
"you@example.com"
] |
you@example.com
|
8673bf4580d3cb14777c8d9adf27a318a683e8b4
|
39b6bc2d1b59c419c2f26154f95c1994d9fa8c78
|
/xpath-lang/src/main/java/org/intellij/lang/xpath/XPath2QuoteHandler.java
|
01864edb3c3d3934ff98331e9a032db50f1d7d95
|
[
"Apache-2.0"
] |
permissive
|
consulo/consulo-xpath
|
6ab5b854eedfc6cb6952661e65144bc59f1eabeb
|
a6bfc5b013fde798b20d7ba273962b8b6a833fcf
|
refs/heads/master
| 2023-08-16T12:50:11.186300
| 2023-05-16T18:24:04
| 2023-05-16T18:24:04
| 13,907,956
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 343
|
java
|
package org.intellij.lang.xpath;
import consulo.annotation.component.ExtensionImpl;
import consulo.virtualFileSystem.fileType.FileType;
import javax.annotation.Nonnull;
@ExtensionImpl
public class XPath2QuoteHandler extends XPathQuoteHandler {
@Nonnull
@Override
public FileType getFileType() {
return XPathFileType.XPATH2;
}
}
|
[
"vistall.valeriy@gmail.com"
] |
vistall.valeriy@gmail.com
|
2a1d17edb7ecaee6219810bbda9e2a9e52db2c0d
|
05e13c408bede78bb40cbaba237669064eddee10
|
/src/main/java/com/fedex/ws/openship/v18/ConsolidationTransborderDistributionDetail.java
|
40a0d2136bc6d14fff2132ed970aad1c5b5e6594
|
[] |
no_license
|
noboomu/shipping-carriers
|
f60ae167bd645368012df0817f0c0d54e8fff616
|
74b2a7b37ac36fe2ea16b4f79f2fb0f69113e0f6
|
refs/heads/master
| 2023-05-07T08:54:31.217066
| 2021-06-02T23:48:11
| 2021-06-02T23:48:11
| 373,320,009
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,054
|
java
|
package com.fedex.ws.openship.v18;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlSchemaType;
import jakarta.xml.bind.annotation.XmlType;
/**
* Specifies consolidation data for a tranborder distribution shipment. This is data that can be provided by the customer at the consolidation creation time.
*
* <p>Java class for ConsolidationTransborderDistributionDetail complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ConsolidationTransborderDistributionDetail">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="SpecialServicesRequested" type="{http://fedex.com/ws/openship/v18}TransborderDistributionSpecialServicesRequested" minOccurs="0"/>
* <element name="Routing" type="{http://fedex.com/ws/openship/v18}TransborderDistributionRoutingType" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ConsolidationTransborderDistributionDetail", propOrder = {
"specialServicesRequested",
"routing"
})
public class ConsolidationTransborderDistributionDetail {
@XmlElement(name = "SpecialServicesRequested")
protected TransborderDistributionSpecialServicesRequested specialServicesRequested;
@XmlElement(name = "Routing")
@XmlSchemaType(name = "string")
protected TransborderDistributionRoutingType routing;
/**
* Gets the value of the specialServicesRequested property.
*
* @return
* possible object is
* {@link TransborderDistributionSpecialServicesRequested }
*
*/
public TransborderDistributionSpecialServicesRequested getSpecialServicesRequested() {
return specialServicesRequested;
}
/**
* Sets the value of the specialServicesRequested property.
*
* @param value
* allowed object is
* {@link TransborderDistributionSpecialServicesRequested }
*
*/
public void setSpecialServicesRequested(TransborderDistributionSpecialServicesRequested value) {
this.specialServicesRequested = value;
}
/**
* Gets the value of the routing property.
*
* @return
* possible object is
* {@link TransborderDistributionRoutingType }
*
*/
public TransborderDistributionRoutingType getRouting() {
return routing;
}
/**
* Sets the value of the routing property.
*
* @param value
* allowed object is
* {@link TransborderDistributionRoutingType }
*
*/
public void setRouting(TransborderDistributionRoutingType value) {
this.routing = value;
}
}
|
[
"bauer.j@gmail.com"
] |
bauer.j@gmail.com
|
a66b432f6a6c7e2f8a232bc54a43c2bb744c5f11
|
b0a1fcad9c40398841a02ebf1e7579409bee858f
|
/oxService/src/main/java/org/gluu/service/BaseCacheService.java
|
4e100e5fd216815fa32f3b045b6c1ca1e549895e
|
[
"MIT"
] |
permissive
|
Heikkips/oxCore
|
8654ead666ada3d04a2513ae9b41cc4f28162dfd
|
2c18f81ee719560cf9d87af4ba605d4f08bd77d0
|
refs/heads/master
| 2020-09-21T16:26:54.478594
| 2019-11-27T08:07:08
| 2019-11-27T08:07:08
| 224,848,210
| 0
| 0
|
MIT
| 2019-11-29T12:15:17
| 2019-11-29T12:15:17
| null |
UTF-8
|
Java
| false
| false
| 3,590
|
java
|
/*
* oxCore is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
*
* Copyright (c) 2014, Gluu
*/
package org.gluu.service;
import java.util.Date;
import java.util.function.Supplier;
import javax.inject.Inject;
import org.gluu.service.cache.CacheInterface;
import org.gluu.service.cache.CacheProvider;
import org.gluu.service.cache.CacheProviderType;
import org.slf4j.Logger;
/**
* Provides operations with cache
*
* @author Yuriy Movchan Date: 01.24.2012
* @author Yuriy Zabrovarnyy Date: 02.02.2017
*/
public abstract class BaseCacheService implements CacheInterface {
private static int DEFAULT_EXPIRATION = 60;
@Inject
private Logger log;
public Object get(String key) {
CacheProvider cacheProvider = getCacheProvider();
if (cacheProvider == null) {
return null;
}
return cacheProvider.get(key);
}
public <T> T getWithPut(String key, Supplier<T> loadFunction, int expirationInSeconds) {
if (loadFunction == null) {
return (T) get(key);
}
CacheProvider cacheProvider = getCacheProvider();
if (CacheProviderType.NATIVE_PERSISTENCE == cacheProvider.getProviderType()) {
return loadFunction.get();
}
final Object value = get(key);
if (value != null) {
log.trace("Loaded from cache, key: " + key);
return (T) value;
} else {
final T loaded = loadFunction.get();
if (loaded == null) {
return null;
}
try {
put(expirationInSeconds, key, loaded);
} catch (Exception e) {
log.error("Failed to put object into cache, key: " + key, e); // we don't want prevent returning loaded value due to failure with put
}
return loaded;
}
}
public void put(int expirationInSeconds, String key, Object object) {
CacheProvider cacheProvider = getCacheProvider();
if (cacheProvider != null) {
cacheProvider.put(expirationInSeconds, key, object);
}
}
public void remove(String key) {
CacheProvider cacheProvider = getCacheProvider();
if (cacheProvider == null) {
return;
}
cacheProvider.remove(key);
}
public void clear() {
CacheProvider cacheProvider = getCacheProvider();
if (cacheProvider != null) {
cacheProvider.clear();
}
}
@Override
public void cleanup(Date now) {
CacheProvider cacheProvider = getCacheProvider();
if (cacheProvider != null) {
cacheProvider.cleanup(now);
}
}
public void put(String key, Object object) {
put(DEFAULT_EXPIRATION, key, object);
}
@Deprecated // we keep it only for back-compatibility of scripts code
public Object get(String region, String key) {
return get(key);
}
@Deprecated // we keep it only for back-compatibility of scripts code
public void put(String expirationInSeconds, String key, Object object) {
int expiration = DEFAULT_EXPIRATION;
try {
expiration = Integer.parseInt(expirationInSeconds);
} catch (NumberFormatException ex) {
// Use default expiration
log.trace("Using default expiration instead of expirationInSeconds: {}", expirationInSeconds);
}
put(expiration, key, object);
}
@Deprecated // we keep it only for back-compatibility of scripts code
public void remove(String region, String key) {
remove(key);
}
protected abstract CacheProvider getCacheProvider();
}
|
[
"Yuriy.Movchan@gmail.com"
] |
Yuriy.Movchan@gmail.com
|
8b7ad0a689133e2867a975f0211a6211c36e7c7a
|
eb9f655206c43c12b497c667ba56a0d358b6bc3a
|
/plugins/javaFX/testData/intentions/fieldToProperty/TwoFilesFieldToPropertySecondFile_after.java
|
b7310043afa44545c07174941ce5d6b0f3a7d03f
|
[
"Apache-2.0"
] |
permissive
|
JetBrains/intellij-community
|
2ed226e200ecc17c037dcddd4a006de56cd43941
|
05dbd4575d01a213f3f4d69aa4968473f2536142
|
refs/heads/master
| 2023-09-03T17:06:37.560889
| 2023-09-03T11:51:00
| 2023-09-03T12:12:27
| 2,489,216
| 16,288
| 6,635
|
Apache-2.0
| 2023-09-12T07:41:58
| 2011-09-30T13:33:05
| null |
UTF-8
|
Java
| false
| false
| 153
|
java
|
import javafx.scene.Node;
class DoubleDemo2 {
static void foo(DoubleDemo dd) {
double d = dd.data.get();
dd.data.set(d + 2);
}
}
|
[
"pavel.dolgov@jetbrains.com"
] |
pavel.dolgov@jetbrains.com
|
13530c119131cc3ebb36cc117b982e3439d067e7
|
e7e2377031dfee7ad6a52c5c821efe759edfd10a
|
/patterndesign/src/main/java/com/imooc/resChain/client.java
|
16278a1250be2408b44d690f49b3bc514176b657
|
[] |
no_license
|
johnYin2015/AndroidBasics
|
a29ef978e41f171c8a5c0a0225c6c7903cfcd158
|
3371acd869a444041850a442705bd313534dbcee
|
refs/heads/master
| 2020-06-16T23:04:19.030874
| 2019-07-08T06:26:19
| 2019-07-08T06:26:19
| 195,727,883
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 444
|
java
|
package com.imooc.resChain;
public class client {
public static void main(String[] strings) {
Handler projectManager = new ProjectManager(3);
Handler departmentManager = new DepartmentManager(5);
Handler generalManager = new GeneralManager(15);
//创建职责链
projectManager.setNextHandler(departmentManager);
departmentManager.setNextHandler(generalManager);
//发起一次请求
projectManager.handleRequest(14);
}
}
|
[
"wit.zhaoguo@gmail.com"
] |
wit.zhaoguo@gmail.com
|
dcba0e84bb395034c2b9cdc5ecf0d3542ffa6bd0
|
327d615dbf9e4dd902193b5cd7684dfd789a76b1
|
/base_source_from_JADX/sources/com/google/android/gms/internal/ads/zzdye.java
|
22cd41a81e3f8c2e16ead156716969931a442106
|
[] |
no_license
|
dnosauro/singcie
|
e53ce4c124cfb311e0ffafd55b58c840d462e96f
|
34d09c2e2b3497dd452246b76646b3571a18a100
|
refs/heads/main
| 2023-01-13T23:17:49.094499
| 2020-11-20T10:46:19
| 2020-11-20T10:46:19
| 314,513,307
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 923
|
java
|
package com.google.android.gms.internal.ads;
import java.util.concurrent.Callable;
import java.util.concurrent.Executor;
final class zzdye extends zzdyh<V> {
private final Callable<V> zzhxf;
private final /* synthetic */ zzdyf zzhxg;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
zzdye(zzdyf zzdyf, Callable<V> callable, Executor executor) {
super(zzdyf, executor);
this.zzhxg = zzdyf;
this.zzhxf = (Callable) zzdvv.checkNotNull(callable);
}
/* access modifiers changed from: package-private */
public final void setValue(V v) {
this.zzhxg.set(v);
}
/* access modifiers changed from: package-private */
public final V zzazk() {
return this.zzhxf.call();
}
/* access modifiers changed from: package-private */
public final String zzazl() {
return this.zzhxf.toString();
}
}
|
[
"dno_sauro@yahoo.it"
] |
dno_sauro@yahoo.it
|
b0f5ca8bc14a30c8fa230c81b304ce1501fc108b
|
4feac515c4d97718d285ef012208f0cdcce6387c
|
/src/main/java/delight/async/flow/CallbackMap.java
|
7307d42b3adea3001dab060f2ec0fd3a83e85272
|
[] |
no_license
|
javadelight/delight-async
|
a89ba70614799f35099a1b174035f2334aac7890
|
d8e5b02715032414fd750427f22070ecd668c3f3
|
refs/heads/master
| 2023-09-04T04:01:04.017915
| 2023-08-31T20:48:35
| 2023-08-31T20:48:35
| 38,526,021
| 1
| 0
| null | 2023-08-31T20:48:36
| 2015-07-04T07:36:38
|
Java
|
UTF-8
|
Java
| false
| false
| 2,576
|
java
|
/*******************************************************************************
* Copyright 2011 Max Erik Rohde http://www.mxro.de
*
* All rights reserved.
******************************************************************************/
package delight.async.flow;
import delight.async.Value;
import delight.async.callbacks.ListCallback;
import delight.async.callbacks.ValueCallback;
import delight.functional.collections.CollectionsUtils;
import delight.functional.collections.IdentityArrayList;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* This utility class supports in writing Java in a more asynchronous style.
* This class allows to <i>collect</i> the results from various callbacks, which
* result from calling a method on all elements of a list. The callback provided
* by this class will only be called if all the callbacks for the individual
* list elements have been executed.
*
* @author Max Rohde
*
* @param <GInput>
* @param <GOutput>
*/
public class CallbackMap<GInput, GOutput> {
final Map<Integer, GOutput> responseMap;
final List<GInput> messages;
final int expectedSize;
final ListCallback<GOutput> callback;
public ValueCallback<GOutput> createCallback(final GInput message) {
return new ValueCallback<GOutput>() {
@Override
public void onSuccess(final GOutput response) {
synchronized (responseMap) {
responseMap.put(messages.indexOf(message), response);
if (CollectionsUtils.isMapComplete(responseMap, expectedSize)) {
final List<GOutput> localResponses = CollectionsUtils
.toOrderedList(responseMap);
callback.onSuccess(localResponses);
}
}
}
Value<Boolean> failureReported = new Value<Boolean>(false);
@Override
public void onFailure(final Throwable t) {
// failure should be reported only once.
synchronized (failureReported) {
if (!failureReported.get()) {
callback.onFailure(t);
} else {
throw new RuntimeException(t); // TODO maybe disable ...
}
failureReported.set(true);
}
}
};
}
public CallbackMap(final List<GInput> messages,
final ListCallback<GOutput> callback) {
super();
this.messages = new IdentityArrayList<GInput>(messages);
this.responseMap = new HashMap<Integer, GOutput>();
expectedSize = messages.size();
this.callback = callback;
if (expectedSize == 0) {
this.callback.onSuccess(new ArrayList<GOutput>(0));
}
}
}
|
[
"mxro@nowhere.com"
] |
mxro@nowhere.com
|
b68f7076124f9b9fa8e751d8f9ead9b9a83d5236
|
82bdbb61fbbaa8e267f7ed13cc098f56a55c7cf8
|
/AppInfoSystem/src/cn/appsys/pojo/AppVersion.java
|
61f40a9b96962a59f7a7258501122a553d1a5536
|
[] |
no_license
|
yyq310277898/999
|
641e1c7bd7640caa43b804d4961640f5f14730f2
|
c8f8398f21a161e80e3c467c8e0f2f6341060236
|
refs/heads/master
| 2020-03-18T03:11:03.667362
| 2018-05-21T06:15:10
| 2018-05-21T06:15:10
| 134,226,782
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,983
|
java
|
package cn.appsys.pojo;
import java.math.BigDecimal;
import java.util.Date;
public class AppVersion {
private Integer id;//主键id
private Integer appId;//appId
private String versionNo;//版本号
private String versionInfo;//版本描述
private Integer publishStatus;//发布状态id
private String downloadLink;//apk文件下载链接
private BigDecimal versionSize;//版本大小
private Integer createdBy;//创建者
private Date creationDate;//创建时间
private Integer modifyBy;//更新者
private Date modifyDate;//更新时间
private String apkLocPath;//apk文件的服务器存储路径
private String appName;//APP软件名称
private String publishStatusName;//发布状态名称
private String apkFileName;//上传的apk文件名称
public String getApkFileName() {
return apkFileName;
}
public void setApkFileName(String apkFileName) {
this.apkFileName = apkFileName;
}
public String getPublishStatusName() {
return publishStatusName;
}
public void setPublishStatusName(String publishStatusName) {
this.publishStatusName = publishStatusName;
}
public String getAppName() {
return appName;
}
public void setAppName(String appName) {
this.appName = appName;
}
public String getApkLocPath() {
return apkLocPath;
}
public void setApkLocPath(String apkLocPath) {
this.apkLocPath = apkLocPath;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getAppId() {
return appId;
}
public void setAppId(Integer appId) {
this.appId = appId;
}
public String getVersionNo() {
return versionNo;
}
public void setVersionNo(String versionNo) {
this.versionNo = versionNo;
}
public String getVersionInfo() {
return versionInfo;
}
public void setVersionInfo(String versionInfo) {
this.versionInfo = versionInfo;
}
public Integer getPublishStatus() {
return publishStatus;
}
public void setPublishStatus(Integer publishStatus) {
this.publishStatus = publishStatus;
}
public String getDownloadLink() {
return downloadLink;
}
public void setDownloadLink(String downloadLink) {
this.downloadLink = downloadLink;
}
public BigDecimal getVersionSize() {
return versionSize;
}
public void setVersionSize(BigDecimal versionSize) {
this.versionSize = versionSize;
}
public Integer getCreatedBy() {
return createdBy;
}
public void setCreatedBy(Integer createdBy) {
this.createdBy = createdBy;
}
public Date getCreationDate() {
return creationDate;
}
public void setCreationDate(Date creationDate) {
this.creationDate = creationDate;
}
public Integer getModifyBy() {
return modifyBy;
}
public void setModifyBy(Integer modifyBy) {
this.modifyBy = modifyBy;
}
public Date getModifyDate() {
return modifyDate;
}
public void setModifyDate(Date modifyDate) {
this.modifyDate = modifyDate;
}
}
|
[
"you@example.com"
] |
you@example.com
|
1459d2eb8badbc90144656ab3de79c0099e8c9f8
|
ffd01501bb53bfaaf180da7719e94a5459a996ee
|
/Module4/case_study_module4/src/main/java/com/example/entity/service/RentType.java
|
c21be6f4a39b83889ddaffa90e231e8e1c181be0
|
[] |
no_license
|
huuhan2507/C1020G1-Tranhuuhan
|
6b01b85e8c7d1bd585fc66365a965c3df5ee80a4
|
e42f7089c1b5318439c311115ed8d94afe8ae146
|
refs/heads/main
| 2023-04-19T15:46:38.638524
| 2021-05-11T12:14:08
| 2021-05-11T12:14:08
| 331,478,784
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 473
|
java
|
package com.example.entity.service;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import javax.persistence.*;
import java.util.Set;
@NoArgsConstructor
@Getter
@Setter
@Entity
public class RentType {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer rentTypeId;
private String rentTypeName;
private Double rentTypeCost;
@OneToMany(mappedBy = "rentType")
private Set<Service> services;
}
|
[
"you@example.com"
] |
you@example.com
|
af8840f97a61eb543d48ff0944826fceae374245
|
00b3c5d54d7d686561b1db81f9b515befbb4be22
|
/src/encapsulation/Test3.java
|
84317feab357e119083b2559ec9129e87091564f
|
[] |
no_license
|
javaandselenium/Javaqsp_Weekend
|
6715819256aa155736875887c8588df3b5f4125d
|
55826dae5e85aaf667ee24efce5727c285bc7053
|
refs/heads/master
| 2023-01-24T12:28:30.160630
| 2020-12-05T08:37:08
| 2020-12-05T08:37:08
| 307,049,741
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 214
|
java
|
package encapsulation;
public class Test3 {
public static void main(String[] args) {
Test2 t=new Test2();
System.out.println(t.getBankName());
System.out.println(t.getAccountBalance());
}
}
|
[
"QSP@DESKTOP-EVK9GMC"
] |
QSP@DESKTOP-EVK9GMC
|
4128f203cece2b2f6b0a6ff1bceb2c96fbbc639f
|
e42c98daf48cb6b70e3dbd5f5af3517d901a06ab
|
/modules/uctool-manager/src/main/java/com/cisco/axl/api/_10/AddTimePeriodReq.java
|
38831f490006a8cc1a33f9fc428b9a72337f3fa7
|
[] |
no_license
|
mgnext/UCTOOL
|
c238d8f295e689a8babcc1156eb0b487cba31da0
|
5e7aeb422a33b3cf33fca0231616ac0416d02f1a
|
refs/heads/master
| 2020-06-03T04:07:57.650216
| 2015-08-07T10:44:04
| 2015-08-07T10:44:04
| 39,693,900
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,503
|
java
|
package com.cisco.axl.api._10;
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 AddTimePeriodReq complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="AddTimePeriodReq">
* <complexContent>
* <extension base="{http://www.cisco.com/AXL/API/10.5}APIRequest">
* <sequence>
* <element name="timePeriod" type="{http://www.cisco.com/AXL/API/10.5}XTimePeriod"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AddTimePeriodReq", propOrder = {
"timePeriod"
})
public class AddTimePeriodReq
extends APIRequest
{
@XmlElement(required = true)
protected XTimePeriod timePeriod;
/**
* Gets the value of the timePeriod property.
*
* @return
* possible object is
* {@link XTimePeriod }
*
*/
public XTimePeriod getTimePeriod() {
return timePeriod;
}
/**
* Sets the value of the timePeriod property.
*
* @param value
* allowed object is
* {@link XTimePeriod }
*
*/
public void setTimePeriod(XTimePeriod value) {
this.timePeriod = value;
}
}
|
[
"agentmilindu@gmail.com"
] |
agentmilindu@gmail.com
|
5a3612951337c2e46991a405dbf4a8c89fe0f4f8
|
90f17cd659cc96c8fff1d5cfd893cbbe18b1240f
|
/src/main/java/com/facebook/react/uimanager/layoutanimation/LayoutUpdateAnimation.java
|
202b9c616aff7d472064b720c7c03be254be653c
|
[] |
no_license
|
redpicasso/fluffy-octo-robot
|
c9b98d2e8745805edc8ddb92e8afc1788ceadd08
|
b2b62d7344da65af7e35068f40d6aae0cd0835a6
|
refs/heads/master
| 2022-11-15T14:43:37.515136
| 2020-07-01T22:19:16
| 2020-07-01T22:19:16
| 276,492,708
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 882
|
java
|
package com.facebook.react.uimanager.layoutanimation;
import android.view.View;
import android.view.animation.Animation;
import javax.annotation.Nullable;
class LayoutUpdateAnimation extends AbstractLayoutAnimation {
private static final boolean USE_TRANSLATE_ANIMATION = false;
LayoutUpdateAnimation() {
}
boolean isValid() {
return this.mDurationMs > 0;
}
@Nullable
Animation createAnimationImpl(View view, int i, int i2, int i3, int i4) {
Object obj = null;
Object obj2 = (view.getX() == ((float) i) && view.getY() == ((float) i2)) ? null : 1;
if (!(view.getWidth() == i3 && view.getHeight() == i4)) {
obj = 1;
}
if (obj2 == null && obj == null) {
return null;
}
return new PositionAndSizeAnimation(view, i, i2, i3, i4);
}
}
|
[
"aaron@goodreturn.org"
] |
aaron@goodreturn.org
|
2f9ac80fd865fb5d8c72f205e3feaac22f588dee
|
f86938ea6307bf6d1d89a07b5b5f9e360673d9b8
|
/CodeComment_Data/Code_Jam/train/Magic_Trick/S/Main(57).java
|
f015d6b8b6090054b55f680be8b706d7157e1f9a
|
[] |
no_license
|
yxh-y/code_comment_generation
|
8367b355195a8828a27aac92b3c738564587d36f
|
2c7bec36dd0c397eb51ee5bd77c94fa9689575fa
|
refs/heads/master
| 2021-09-28T18:52:40.660282
| 2018-11-19T14:54:56
| 2018-11-19T14:54:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,672
|
java
|
package methodEmbedding.Magic_Trick.S.LYD708;
import java.io.*;
/**
* Created by danim_000 on 4/13/14.
*/
public class Main {
public static void main(String [ ] args){
//read from file line by line
String file_name = "input.txt";
try {
BufferedReader br = new BufferedReader(new FileReader(file_name));
File file = new File("outfinal.txt");
BufferedWriter output = new BufferedWriter(new FileWriter(file));
String line = br.readLine();
int nr_tests = Integer.parseInt(line);
for(int i=1; i<= nr_tests; i++) {
int nr_found = 0;
// 0 - nu am gasit
// -1 - duplicate
// >0 found
//citimi row
line = br.readLine();
int nr_row = Integer.parseInt(line);
//citim 4x4
String[] numbers_one = new String[5];
for(int r=1; r<=4;r++){
line = br.readLine();
if(r == nr_row){
numbers_one = line.split(" ");
}
}
//citim row 2
line = br.readLine();
nr_row = Integer.parseInt(line);
//citim 4x4
for(int r=1; r<=4;r++){
line = br.readLine();
if(r == nr_row){
String[] numbers_two = line.split(" ");
for(String number_two:numbers_two){
for(String number_one:numbers_one){
if(number_one.equals(number_two)){
if(nr_found == 0){
nr_found = Integer.parseInt(number_one);
} else {
nr_found = -1;
}
}
}
}
}
}
String out = "Case #" + i + ": ";
if(nr_found == 0){
out += "Volunteer cheated!";
} else if(nr_found == -1){
out += "Bad magician!";
} else {
out += nr_found + "";
}
out += "\n";
output.write(out);
System.out.println(out);
}
br.close();
output.close();
} catch (IOException e) {
e.printStackTrace();
}
/**/
}
}
|
[
"liangyuding@sjtu.edu.cn"
] |
liangyuding@sjtu.edu.cn
|
591a0260fd81726c32dd17b0a7afb4a4b2a1d21c
|
ebb880c4d4495599495387d7e629efea5cbde127
|
/src/main/java/com/shangshufang/apiservice/mapper/CompanyAccountMapper.java
|
553e6c9a826476004809f0c4d120b8ecc3771a27
|
[] |
no_license
|
ShangShuFang/shangshufang.apiservice
|
18463052a2097cf1403b0da97e761ccba93dba43
|
3d86910238511e674b799623ff5d6e29fb437ddd
|
refs/heads/master
| 2021-06-27T19:52:49.113326
| 2021-03-05T08:13:01
| 2021-03-05T08:13:01
| 219,971,237
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 697
|
java
|
package com.shangshufang.apiservice.mapper;
import com.shangshufang.apiservice.entity.CompanyAccountEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface CompanyAccountMapper extends BaseMapper<CompanyAccountEntity> {
int searchTotalCount(@Param("companyID") int companyID);
List<CompanyAccountEntity> searchList(int startIndex, int pageSize, int companyID);
CompanyAccountEntity login(@Param("cellphone") String cellphone,
@Param("password") String password);
int checkCellphoneExist(String cellphone);
int delete(int companyID, int accountID);
}
|
[
"johnny.q.zhang@outlook.com"
] |
johnny.q.zhang@outlook.com
|
247a6f6611c47e1b5fb14b4cd7394b6d328c2b03
|
c82f89b0e6d1547c2829422e7de7664b378c1039
|
/src/com/hongyu/dao/ReceiptDepositStoreDao.java
|
2d90cc14f7f6d946874cf883b7dbf75b79a6d37a
|
[] |
no_license
|
chenxiaoyin3/shetuan_backend
|
1bab5327cafd42c8086c25ade7e8ce08fda6a1ac
|
e21a0b14a2427c9ad52ed00f68d5cce2689fdaeb
|
refs/heads/master
| 2022-05-15T14:52:07.137000
| 2022-04-07T03:30:57
| 2022-04-07T03:30:57
| 250,762,749
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 188
|
java
|
package com.hongyu.dao;
import com.grain.dao.BaseDao;
import com.hongyu.entity.ReceiptDepositStore;
public interface ReceiptDepositStoreDao extends BaseDao<ReceiptDepositStore, Long> {
}
|
[
"925544714@qq.com"
] |
925544714@qq.com
|
7e5cbb70f029a9335bbed44c7b38c8d3186ea756
|
9ba823ec29cf59aadf49a1464c81d48202e81e63
|
/server/src/main/java/com/messagebus/server/daemon/RunPolicy.java
|
0c7dde21a78e3b799f76291cec4e0b20b2d1d9de
|
[
"Apache-2.0"
] |
permissive
|
yuechuanbingzhi163/banyan
|
eb081210f1496b2c4e47a1ad94cc2dd77707cce7
|
b2b74803445558cc8a2300b27692e2a1377286fe
|
refs/heads/master
| 2021-01-22T14:46:07.578137
| 2015-03-31T09:04:38
| 2015-03-31T09:04:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 164
|
java
|
package com.messagebus.server.daemon;
public enum RunPolicy {
ONCE, //执行一次
CYCLE_SCHEDULED //周期性得循环执行
}
|
[
"yanghua1127@gmail.com"
] |
yanghua1127@gmail.com
|
cb3608ccfc44f0aca9eaf8e5a7e62cb32a528db3
|
6be39fc2c882d0b9269f1530e0650fd3717df493
|
/weixin反编译/sources/com/tencent/mm/pluginsdk/ui/preference/HeadImgNewPreference.java
|
2a8450024ed259d94bc94d2071ea2938c8c203d6
|
[] |
no_license
|
sir-deng/res
|
f1819af90b366e8326bf23d1b2f1074dfe33848f
|
3cf9b044e1f4744350e5e89648d27247c9dc9877
|
refs/heads/master
| 2022-06-11T21:54:36.725180
| 2020-05-07T06:03:23
| 2020-05-07T06:03:23
| 155,177,067
| 5
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,696
|
java
|
package com.tencent.mm.pluginsdk.ui.preference;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.tencent.mm.R;
import com.tencent.mm.pluginsdk.ui.a.b;
import com.tencent.mm.ui.base.preference.Preference;
public final class HeadImgNewPreference extends Preference {
private int height;
public ImageView jSg;
public OnClickListener ugx;
public boolean vAa;
private boolean vAb;
private View vvy;
private TextView vzY;
public String vzZ;
public HeadImgNewPreference(Context context, AttributeSet attributeSet) {
this(context, attributeSet, 0);
}
public HeadImgNewPreference(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
this.height = -1;
this.vAa = false;
this.vAb = false;
setLayoutResource(R.i.dnz);
}
protected final View onCreateView(ViewGroup viewGroup) {
View onCreateView = super.onCreateView(viewGroup);
ViewGroup viewGroup2 = (ViewGroup) onCreateView.findViewById(R.h.content);
viewGroup2.removeAllViews();
if (this.vAb) {
View.inflate(this.mContext, R.i.doA, viewGroup2);
} else {
View.inflate(this.mContext, R.i.dnH, viewGroup2);
}
this.jSg = (ImageView) onCreateView.findViewById(R.h.cpj);
this.vzY = (TextView) onCreateView.findViewById(R.h.cAz);
this.vvy = onCreateView.findViewById(R.h.cvc);
return onCreateView;
}
protected final void onBindView(View view) {
super.onBindView(view);
if (this.jSg == null) {
this.jSg = (ImageView) view.findViewById(R.h.cpj);
}
if (this.vzY == null) {
this.vzY = (TextView) view.findViewById(R.h.cAz);
}
if (this.vvy == null) {
this.vvy = view.findViewById(R.h.cvc);
}
if (this.ugx != null) {
this.vvy.setOnClickListener(this.ugx);
}
if (this.vzZ != null) {
b.a(this.jSg, this.vzZ);
this.vzZ = null;
}
if (this.vAa) {
this.vzY.setVisibility(8);
this.vvy.setVisibility(0);
} else {
this.vvy.setVisibility(8);
this.vzY.setVisibility(0);
}
RelativeLayout relativeLayout = (RelativeLayout) view.findViewById(R.h.cwt);
if (this.height != -1) {
relativeLayout.setMinimumHeight(this.height);
}
}
}
|
[
"denghailong@vargo.com.cn"
] |
denghailong@vargo.com.cn
|
b4a94df4509b5946ae5e6337967706fb6fcf9bbb
|
94ccab478b3cd5bafe58d32f8c69fb2396053249
|
/ch02/src/ch02/Ch02Ex02_05.java
|
962682f332427b10d43de766b0dbc1bd65162493
|
[] |
no_license
|
dudgks/work_java
|
9c52e546b7d20e79b8ec1cc48c688d58891f49e0
|
b699447031e4db1462a5a520939243d2a21c2de6
|
refs/heads/master
| 2021-08-07T23:11:06.200802
| 2018-08-03T10:57:56
| 2018-08-03T10:57:56
| 134,249,201
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,045
|
java
|
package ch02;
import java.util.Scanner;
public class Ch02Ex02_05 {
public static void main(String[] args) {
// 1. Scanner 객체 생성 , system.in은 키보드
Scanner scanner = new Scanner(System.in);
// 2. 하나의 정수와 하나의 실수를 문자열로 입력받기
String strNum1 = scanner.nextLine();
String strNum2 = scanner.nextLine();
// 3. 입력받은 두 문자열을 각각 정수(int)와 실수(float)로 변경하기
int num1 = Integer.parseInt(strNum1);
float num2 = Float.parseFloat(strNum2);
// 4. num1, num2 변수를 이용하여 계산하기*
float result = num1 * num2;
// 5. num1, num2, result 변수를 이용하여 출력하기 ( %와 f 사이에 '.' 을 붙이면 소수점 n자리까지 출력가능)
System.out.printf("%d * %.6f = %.6f", num1, num2, result);
// 1. num과 B를 곱한 값을 저장한 변수 생성
// 2. num과 B, 1번에서 생성한 변수를 이용해서 출력
}
}
|
[
"KOITT@KOITT-PC"
] |
KOITT@KOITT-PC
|
9afa8f6991567ec48a30d45f36a1991667552513
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/aiccs-20191015/src/main/java/com/aliyun/aiccs20191015/models/GetSkillGroupServiceStatusResponse.java
|
f073af37252d428b96f9549002d75a1d9d18caf1
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,479
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.aiccs20191015.models;
import com.aliyun.tea.*;
public class GetSkillGroupServiceStatusResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("statusCode")
@Validation(required = true)
public Integer statusCode;
@NameInMap("body")
@Validation(required = true)
public GetSkillGroupServiceStatusResponseBody body;
public static GetSkillGroupServiceStatusResponse build(java.util.Map<String, ?> map) throws Exception {
GetSkillGroupServiceStatusResponse self = new GetSkillGroupServiceStatusResponse();
return TeaModel.build(map, self);
}
public GetSkillGroupServiceStatusResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public GetSkillGroupServiceStatusResponse setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
public Integer getStatusCode() {
return this.statusCode;
}
public GetSkillGroupServiceStatusResponse setBody(GetSkillGroupServiceStatusResponseBody body) {
this.body = body;
return this;
}
public GetSkillGroupServiceStatusResponseBody getBody() {
return this.body;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
896a6640606ec2a732554398184d91d48293769a
|
c7bdefcaa4b2c7d1a857bfd5253c556df0159cbc
|
/SLOTGAMES/src/test/java/stepDefinition_SeaPearl/SeaPearl_Balance_Check_MaxBet_WinAmount_AddedTo_Balance.java
|
26dff79994eb139a18f558821ce52bb8cb77b016
|
[] |
no_license
|
pavanysecit/SLOTGAMES_MOBILES
|
62a97bded1f4d0df0f50fc2176e473ce3dac267b
|
80bb25d81feda93b3f9137080bd2f0922e882da6
|
refs/heads/master
| 2021-02-15T04:56:59.388043
| 2021-01-07T09:36:44
| 2021-01-07T09:36:44
| 244,863,982
| 0
| 0
| null | 2020-10-13T20:03:05
| 2020-03-04T09:52:42
|
Java
|
UTF-8
|
Java
| false
| false
| 5,287
|
java
|
package stepDefinition_SeaPearl;
import org.junit.Assert;
import org.openqa.selenium.By;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileElement;
public class SeaPearl_Balance_Check_MaxBet_WinAmount_AddedTo_Balance {
AppiumDriver<MobileElement> driver;
public SeaPearl_Balance_Check_MaxBet_WinAmount_AddedTo_Balance() throws InterruptedException {
this.driver = SeaPearl_URL_Login.getDriver();
//this.driver = SeaPearl_URL_TryNow.getDriver();
}
@Given("^Chrome browser, valid URL, valid login details, Sea Pearl slot game, balance, spin button, gamble collect, max credit and bet value, win amount added to balance$")
public void chrome_browser_valid_URL_valid_login_details_Sea_Pearl_slot_game_balance_spin_button_gamble_collect_max_credit_and_bet_value_win_amount_added_to_balance() throws Throwable {
}
@When("^Open the Sea Pearl slot game by entering the valid URL in browser, enter the valid login details, spin till player wins, gamble screen, gamble collect, win amount added to main balance$")
public void open_the_Sea_Pearl_slot_game_by_entering_the_valid_URL_in_browser_enter_the_valid_login_details_spin_till_player_wins_gamble_screen_gamble_collect_win_amount_added_to_main_balance() throws Throwable {
WebDriverWait wait = new WebDriverWait(driver, 60);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("hud_Hud_txtBalance1")));
//Storing the value before spin or win
String preWin = driver.findElement(By.id("hud_Hud_txtBalance1")).getText();
System.out.println("Current balance of the account: " +preWin);
//Getting the bet value and Bet amount
MobileElement creditValue = driver.findElement(By.id("hud_txtCredit"));
Thread.sleep(1000);
creditValue.click();
Thread.sleep(1000);
MobileElement credit4 = driver.findElement(By.id("hud_CreditPopup40.5"));
credit4.click();
Thread.sleep(2000);
MobileElement creditValue4 = driver.findElement(By.id("hud_txtCredit"));
String crdt4 =creditValue4.getText();
System.out.println("Selected credit value is: " +crdt4);
//Selecting bet amount as 100
driver.findElement(By.id("hud_txtBetAmount")).click();
Thread.sleep(2000);
MobileElement bet4_5 = driver.findElement(By.id("hud_BetPopup5100"));
bet4_5.click();
Thread.sleep(2000);
MobileElement maxbet = driver.findElement(By.id("hud_txtBetAmount"));
String maxbetval =maxbet.getText();
System.out.println("Selected max betvalue is: " +maxbetval);
// Start reel spin
MobileElement start = driver.findElement(By.id("hud_btnSpin"));
start.click();
Thread.sleep(8000);
MobileElement winE = driver.findElement(By.id("hud_Hud_txtWin1"));
String prewin = winE.getText();
String winTex= winE.getText();
while(prewin.isEmpty()){
start.click();
Thread.sleep(8000);
winTex = winE.getText();
prewin= prewin+winTex;
System.out.println(winTex.isEmpty());
}
System.out.println("Win amount:"+winTex);
Thread.sleep(1000);
MobileElement winAmt = driver.findElement(By.id("hud_Hud_txtWin1"));
String Winamt =winAmt.getText();
String winTex1 = Winamt.replaceAll(",", "");
System.out.println("Win amount after replacing ',' from win amount: "+ winTex1);
Thread.sleep(1000);
String postWin = driver.findElement(By.id("hud_Hud_txtBalance1")).getText();
System.out.println("Balance before adding win amount is: "+" "+postWin);
String postWin1 = postWin.replaceAll(",", "");
System.out.println("Balance before win amount :"+postWin1);
Thread.sleep(2000);
//Clicking on Collect button
driver.findElement(By.id("hud_btnGamble")).click();
Thread.sleep(3000);
//Clicking on Collect button
driver.findElement(By.id("gamble_btnCollect")).click();
Thread.sleep(3000);
String Balance = driver.findElement(By.id("hud_Hud_txtBalance1")).getText();
String bal1 = Balance.replaceAll(",", "");
System.out.println("Balance after win amount :"+bal1);
Thread.sleep(2000);
// add the balance with win amount
double conValue = Double.parseDouble(postWin1) + Double.parseDouble(winTex1);
String dbi = String.format("%.2f", conValue);
System.out.println("Balance after adding win amount: "+dbi);
Thread.sleep(2000);
//Validate the balance after win amount added to balance
Assert.assertEquals(dbi, bal1);
Thread.sleep(2000);
//Spin the reels after win amount is added to balance
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("hud_btnSpin")));
System.out.println("Spin button is present on the screen");
start.click();
Thread.sleep(4000);
System.out.println("User is able to spin after the winamount added to balance");
System.out.println("Test case pass");
}
@Then("^MaxBet Win amount should get added to the main balance after win and balance should get increased with win amount in Sea Pearl slot game$")
public void maxbet_Win_amount_should_get_added_to_the_main_balance_after_win_and_balance_should_get_increased_with_win_amount_in_Sea_Pearl_slot_game() throws Throwable {
Thread.sleep(2000);
driver.quit();
}
}
|
[
"pavan.kumar@ysecit.com"
] |
pavan.kumar@ysecit.com
|
cf076829ea541bd5811224b2b373644b6c0d9058
|
0c2e2e06c56ec0e05ddb74679fdfe6c4404274b1
|
/java-advanced/src/main/java/com/sda/advanced/oop/polymorphism/static1/Human.java
|
64a220dd276e6d545ef951519925b0a142faccd9
|
[] |
no_license
|
cosminbucur/sda-upskill
|
d9ef46237c3cc93a25219b9ecbca60d0b7d5d14b
|
71fcab3705a8fb8c72bfa7dfa33d17fbde6a31fd
|
refs/heads/master
| 2023-08-11T20:19:51.710710
| 2021-09-11T20:16:18
| 2021-09-11T20:16:18
| 333,095,665
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 305
|
java
|
package com.sda.advanced.oop.polymorphism.static1;
public class Human {
public void walk() {
System.out.println("human walks");
}
public final void run() {
System.out.println("human runs");
}
private void sing() {
System.out.println("human sings");
}
}
|
[
"cosmin.bucur@kambi.com"
] |
cosmin.bucur@kambi.com
|
3845a15577c4fae534d04945e643287f03f4e3ca
|
7e6c65c2a27fa25f85c0a6a78c5de2c7cbd92d36
|
/JAICore/jaicore-search/src/jaicore/search/algorithms/standard/core/SolutionAnnotationEvent.java
|
b852432e65814d1a0e9d7f90aafca331bad4cc9c
|
[] |
no_license
|
mirkojuergens/AILibs
|
1481592b4c2568b162f4c646b55aa48d4c078e52
|
82fb70c75c68f92a562f8b7a3674e836d175abd6
|
refs/heads/master
| 2020-03-19T03:37:11.275050
| 2018-10-23T06:50:42
| 2018-10-23T06:50:42
| 135,744,730
| 0
| 0
| null | 2018-06-04T13:15:38
| 2018-06-01T17:16:21
|
Java
|
UTF-8
|
Java
| false
| false
| 667
|
java
|
package jaicore.search.algorithms.standard.core;
import java.util.List;
public class SolutionAnnotationEvent<T, V extends Comparable<V>> {
private final List<T> solution;
private final String annotationName;
private final Object annotationValue;
public SolutionAnnotationEvent(List<T> solution, String annotationName, Object annotationValue) {
super();
this.solution = solution;
this.annotationName = annotationName;
this.annotationValue = annotationValue;
}
public List<T> getSolution() {
return solution;
}
public String getAnnotationName() {
return annotationName;
}
public Object getAnnotationValue() {
return annotationValue;
}
}
|
[
"fmohr@mail.upb.de"
] |
fmohr@mail.upb.de
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.