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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
393326394592e1c39b38db0747f0e5f55a9f2913
|
1c64ac5fb5addea8c9a3a73598d77f77931f6be0
|
/app/src/main/java/com/qf/util/MyJSONUtil.java
|
334d518c578ffa6384ed806ebf87717d71b2c85a
|
[] |
no_license
|
luckeystronglu/QRCoderZX
|
91f88293b826da95a4e4e9444bf8805f9e898476
|
41625e6e2d8ed23e02d44299e35bd6eb84dd9cbb
|
refs/heads/master
| 2020-04-11T03:00:02.053623
| 2016-09-14T02:16:35
| 2016-09-14T02:16:35
| 68,165,169
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 964
|
java
|
package com.qf.util;
import android.text.TextUtils;
import com.qf.entity.ContactEntity;
import java.util.List;
public class MyJSONUtil {
public static String getJSONByList(List<ContactEntity> datas){
StringBuilder stringBuilder = new StringBuilder();
if(datas != null && datas.size() > 0){
stringBuilder.append("[");
for(int i = 0; i < datas.size(); i++){
if(i != 0){
stringBuilder.append(",");
}
//{"name":"Lucy", "phone":"182316821"}
//
stringBuilder.append("{");
stringBuilder.append("\"name\":");
stringBuilder.append("\"" + datas.get(i).getName() + "\"");
//ƴ�ӵ绰
if(!TextUtils.isEmpty(datas.get(i).getPhone())){
stringBuilder.append(",");
stringBuilder.append("\"phone\":");
stringBuilder.append("\"" + datas.get(i).getPhone() + "\"");
}
stringBuilder.append("}");
}
stringBuilder.append("]");
return stringBuilder.toString();
}
return "[]";
}
}
|
[
"903804013@qq.com"
] |
903804013@qq.com
|
0a4970159117fc21eb391bd8b02343ac741a27a4
|
48146231c53d8f4dce256bd82839829fa5c68b2b
|
/src/main/java/com/fasterxml/jackson/databind/util/TokenBufferReadContext.java
|
208eb82a205522f9f594146fccf0bcd35b9a816c
|
[
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] |
permissive
|
kislay2004/jackson-databind
|
1f6f14d5c9a3f24c7a9b7b3ec60640578286e32f
|
5950f3f009ae23113b3878d41ebf4025029eb33b
|
refs/heads/master
| 2020-07-29T11:06:36.848996
| 2019-09-20T06:37:52
| 2019-09-20T06:37:52
| 209,773,431
| 1
| 0
|
Apache-2.0
| 2019-09-20T11:19:32
| 2019-09-20T11:19:32
| null |
UTF-8
|
Java
| false
| false
| 4,429
|
java
|
package com.fasterxml.jackson.databind.util;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.core.json.JsonReadContext;
/**
* Implementation of {@link TokenStreamContext} used by {@link TokenBuffer}
* to link back to the original context to try to keep location information
* consistent between source location and buffered content when it's re-read
* from the buffer.
*
* @since 2.9
*/
public class TokenBufferReadContext extends TokenStreamContext
{
protected final TokenStreamContext _parent;
protected final JsonLocation _startLocation;
// Benefit for reusing?
// protected JsonReadContext _child;
/*
/**********************************************************
/* Location/state information (minus source reference)
/**********************************************************
*/
protected String _currentName;
protected Object _currentValue;
protected TokenBufferReadContext(TokenStreamContext base, Object srcRef) {
super(base);
_parent = base.getParent();
_currentName = base.currentName();
_currentValue = base.getCurrentValue();
if (base instanceof JsonReadContext) {
JsonReadContext rc = (JsonReadContext) base;
_startLocation = rc.getStartLocation(srcRef);
} else {
_startLocation = JsonLocation.NA;
}
}
protected TokenBufferReadContext(TokenStreamContext base, JsonLocation startLoc) {
super(base);
_parent = base.getParent();
_currentName = base.currentName();
_currentValue = base.getCurrentValue();
_startLocation = startLoc;
}
/**
* Constructor for case where there is no real surrounding context: just create
* virtual ROOT
*/
protected TokenBufferReadContext() {
super(TYPE_ROOT, -1);
_parent = null;
_startLocation = JsonLocation.NA;
}
protected TokenBufferReadContext(TokenBufferReadContext parent, int type, int index) {
super(type, index);
_parent = parent;
_startLocation = parent._startLocation;
}
@Override
public Object getCurrentValue() {
return _currentValue;
}
@Override
public void setCurrentValue(Object v) {
_currentValue = v;
}
/*
/**********************************************************
/* Factory methods
/**********************************************************
*/
public static TokenBufferReadContext createRootContext(TokenStreamContext origContext) {
// First: possible to have no current context; if so, just create bogus ROOT context
if (origContext == null) {
return new TokenBufferReadContext();
}
return new TokenBufferReadContext(origContext, null);
}
public TokenBufferReadContext createChildArrayContext() {
return new TokenBufferReadContext(this, TYPE_ARRAY, -1);
}
public TokenBufferReadContext createChildObjectContext() {
return new TokenBufferReadContext(this, TYPE_OBJECT, -1);
}
/**
* Helper method we need to handle discontinuity between "real" contexts buffer
* creates, and ones from parent: problem being they are of different types.
*/
public TokenBufferReadContext parentOrCopy() {
// 30-Apr-2017, tatu: This is bit awkward since part on ancestor stack is of different
// type (usually `JsonReadContext`)... and so for unbalanced buffers (with extra
// END_OBJECT / END_ARRAY), we may need to create
if (_parent instanceof TokenBufferReadContext) {
return (TokenBufferReadContext) _parent;
}
if (_parent == null) { // unlikely, but just in case let's support
return new TokenBufferReadContext();
}
return new TokenBufferReadContext(_parent, _startLocation);
}
/*
/**********************************************************
/* Abstract method implementation
/**********************************************************
*/
@Override public String currentName() { return _currentName; }
@Override public boolean hasCurrentName() { return _currentName != null; }
@Override public TokenStreamContext getParent() { return _parent; }
public void setCurrentName(String name) throws JsonProcessingException {
_currentName = name;
}
}
|
[
"tatu.saloranta@iki.fi"
] |
tatu.saloranta@iki.fi
|
aafa06ea7ff0530ab579e4e885e1f52262e17bc8
|
4a1a0bdc67afe904b3e15a53e4a7d676326ef6e5
|
/src/abstraction/Outer.java
|
9b5a67d927e1a3a4c50a7e8187c90a8f7d1b9b1e
|
[] |
no_license
|
automationtrainingcenter/anil_java
|
3a7dcf3654b251ba24a0eab05d8a78c3359af0ba
|
230f52a79a839d452d0a19e889dfc640e1608291
|
refs/heads/master
| 2020-09-16T18:31:06.369306
| 2020-01-10T04:33:02
| 2020-01-10T04:33:02
| 223,853,648
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 128
|
java
|
package abstraction;
public interface Outer {
void omethod();
Inner method();
interface Inner {
void imethod();
}
}
|
[
"atcsurya@gmail.com"
] |
atcsurya@gmail.com
|
e9330efc0cb6e23cb4437825a1b732ab6edc3b17
|
5148293c98b0a27aa223ea157441ac7fa9b5e7a3
|
/Method_Scraping/xml_scraping/NicadOutputFile_t1_beam_new2/Nicad_t1_beam_new2402.java
|
a96f052f9a31576a86c686416bf414bcf5428f7d
|
[] |
no_license
|
ryosuke-ku/TestCodeSeacherPlus
|
cfd03a2858b67a05ecf17194213b7c02c5f2caff
|
d002a52251f5461598c7af73925b85a05cea85c6
|
refs/heads/master
| 2020-05-24T01:25:27.000821
| 2019-08-17T06:23:42
| 2019-08-17T06:23:42
| 187,005,399
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 531
|
java
|
// clone pairs:2784:80%
// 3034:beam/runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/state/FlinkStateInternals.java
public class Nicad_t1_beam_new2402
{
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FlinkMapState<?, ?> that = (FlinkMapState<?, ?>) o;
return namespace.equals(that.namespace) && stateId.equals(that.stateId);
}
}
|
[
"naist1020@gmail.com"
] |
naist1020@gmail.com
|
bb44eb0a9a1a4b773650499d346f7625125e2bef
|
8c944934fb578017a228107ea1a1baa01503d239
|
/src/Tutorial_0_2_EnemyAI/Simple_AI_Pathfinding.java
|
cbcf01ac1a486128a0a41aadba0fe7ed6c28d844
|
[] |
no_license
|
rojr/GameEngineTutorials
|
65d71e6db9187c060aa37e88d25c8f03efc72ce0
|
12b7b3ee5fd4e91c5a7fa0613b662968e5edb73c
|
refs/heads/master
| 2020-04-10T12:12:41.451708
| 2013-09-25T21:38:26
| 2013-09-25T21:38:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,362
|
java
|
package Tutorial_0_2_EnemyAI;
import com.gmail.robmadeyou.Engine;
import com.gmail.robmadeyou.Screen;
import com.gmail.robmadeyou.Screen.GameType;
import com.gmail.robmadeyou.Entity.Npc;
import com.gmail.robmadeyou.Entity.Player;
public class Simple_AI_Pathfinding {
/*
* Algorithm isn't perfected yet with the current Engine (as of v0.1.2)
* The path finding works a lot better in RPG mode as it was intended to be
* used on that game type
*/
public static void main(String[] args) {
Screen.create(640, 640, "AI_Demo", GameType.SIDE_SCROLLER, false);
Player player = new Player(40, 40, 32, 64);
Engine.addEntity(player);
Npc enemy = new Npc(40,40, 20, 40);
/*
* Here we tell the enemy that it's going to be following the Entity Player
*/
enemy.setLogic(true);
/*
* For the A star algorithm we tell the enemy who to target, in this case it's going
* to be player
*/
enemy.setTargetPlayer(player);
/*
* Here we actually enable the A star algorithm for enemy to make sure it follows player
*/
enemy.setAStar(true);
Engine.addEntity(enemy);
Screen.setUpWorld();
while(!Screen.isAskedToClose()){
Screen.update(60);
/*
* Nothing really needed in the loop as path finding is being run with the Engine
*/
Screen.refresh();
}
Screen.destroy();
}
}
|
[
"robmadeyou@gmail.com"
] |
robmadeyou@gmail.com
|
cb36b367958625270056fbd07ed38b8287d1ab2d
|
2f11f3da7bcdac54957d05b36a7a92f9bb84fd32
|
/app/src/main/java/com/indusfo/edzn/scangon/db/DbOpenHelper.java
|
fa96001793ef456dda8456711f7f0472ed78aa27
|
[] |
no_license
|
xuz10086/EDSF_scangon
|
31021aeda2af106cc29a613b0d0a4b4871020e74
|
bcf1725decdd29fa4973044559ffc644e1091b24
|
refs/heads/master
| 2020-05-20T02:13:39.259006
| 2019-05-07T05:30:36
| 2019-05-07T05:30:36
| 185,326,391
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,766
|
java
|
package com.indusfo.edzn.scangon.db;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.support.annotation.Nullable;
import com.indusfo.edzn.scangon.cons.AppParams;
/**
* 数据库帮助类
*
* @author xuz
* @date 2019/1/11 9:21 AM
*/
public class DbOpenHelper extends SQLiteOpenHelper {
public DbOpenHelper(@Nullable Context context) {
super(context, AppParams.DB_NAME, null, AppParams.DB_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
// 创建用户表
db.execSQL("CREATE TABLE "+AppParams.USER_TABLE_NAME+"("+AppParams.USER_TABLE_NAME+" integer PRIMARY KEY AUTOINCREMENT, "+
AppParams.USERNAME+" text, "+AppParams.PASSWORD+" text, "+AppParams.IFSAVE+" integer, "+AppParams.USERID+" text)");
// 创建扫描结果表
db.execSQL("CREATE TABLE "+AppParams.SCANNING_TABLE_NAME+"("+AppParams.SCANNING_ID+" integer PRIMARY KEY AUTOINCREMENT, "+
AppParams.QR+" text, "+AppParams.VC_MATERIALS_CODE+" text, "+AppParams.VC_SEAT_CODE+" text, "+AppParams.VC_MATERIALS_BATCH+" text, "+
AppParams.D_SCANNING_TIME+" text, "+AppParams.L_VALID+" integer, "+AppParams.IF_ROW+" Integer)");
// 创建设备设置表
db.execSQL("CREATE TABLE "+AppParams.DEVICE_TABLE_NAME+"("+AppParams._ID+" integer PRIMARY KEY AUTOINCREMENT, "+
AppParams.L_DEVICE_ID+" text, "+AppParams.VC_DEVICE_CODE+" text, "+AppParams.VC_DEVICE_NAME+" text, "+AppParams.VC_DEVICE_MODE+" text, "+
AppParams.IF_CHECKED+" text)");
}
@Override
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
}
}
|
[
"xuz10086@icloud.com"
] |
xuz10086@icloud.com
|
7306077b8e7be247ea6f32944b3f63212222d6de
|
083d72ab12898894f0efa87b73ad4b59d46fdda3
|
/trunk/source/Library-UltimateModel/src/de/uni_freiburg/informatik/ultimate/core/model/services/IResultService.java
|
7990ebe61fd3788c9c7e8a75859def6d5a00621f
|
[] |
no_license
|
utopia-group/SmartPulseTool
|
19db821090c3a2d19bad6de690b5153bd55e8a92
|
92c920429d6946ff754c3d307943bcaeceba9a40
|
refs/heads/master
| 2023-06-09T04:10:52.900609
| 2021-06-06T18:30:15
| 2021-06-06T18:30:15
| 276,487,368
| 8
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,902
|
java
|
/*
* Copyright (C) 2014-2015 Daniel Dietsch (dietsch@informatik.uni-freiburg.de)
* Copyright (C) 2015 University of Freiburg
*
* This file is part of the ULTIMATE Core.
*
* The ULTIMATE Core is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The ULTIMATE Core is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with the ULTIMATE Core. If not, see <http://www.gnu.org/licenses/>.
*
* Additional permission under GNU GPL version 3 section 7:
* If you modify the ULTIMATE Core, or any covered work, by linking
* or combining it with Eclipse RCP (or a modified version of Eclipse RCP),
* containing parts covered by the terms of the Eclipse Public License, the
* licensors of the ULTIMATE Core grant you additional permission
* to convey the resulting work.
*/
package de.uni_freiburg.informatik.ultimate.core.model.services;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import de.uni_freiburg.informatik.ultimate.core.model.results.IResult;
/**
* {@link IResultService} allows tools to report results.
*
* @author Daniel Dietsch (dietsch@informatik.uni-freiburg.de)
*/
public interface IResultService {
/**
* @return A map containing all results of a toolchain up to now.
*/
Map<String, List<IResult>> getResults();
/**
* Report a result to the Ultimate result service. The result must not be {@code null} and must not contain
* {@code null} values (i.e., at least {@link IResult#getShortDescription()} and
* {@link IResult#getLongDescription()} must not be {@code null}).
*
* @param pluginId
* The plugin ID of the tool which generated the result.
* @param result
* The result itself.
*/
void reportResult(String pluginId, IResult result);
/**
* Register a transformer function that is applied to <b>all</b> results during
* {@link #reportResult(String, IResult)}. If the transformer returns null for a result, this result is dropped.
*
* If multiple transformers are registered, they are executed in their registration order.
*
* Currently, you cannot unregister transformers.
*
* @param name
* the name of the transformer; useful for debugging
* @param resultTransformer
* the transformer function.
*/
void registerTransformer(final String name, final Function<IResult, IResult> resultTransformer);
}
|
[
"jon@users-MacBook-Pro.local"
] |
jon@users-MacBook-Pro.local
|
e73f73a4aca24ab20b950306673679ff3bfd40c6
|
16ea69af51869d4a4b8e8e4e3ab3eeba8f691f1b
|
/src/main/resources/code/M_307_RangeSumQueryMutable.java
|
25e09077ec2e262a3f1d1050d9651127e73ddf11
|
[] |
no_license
|
offerpie/LeetCodeSpider
|
e97f0b8b3278a27b0406e874ad93e14e367a92a2
|
3d6eb8244e2f03de49a168bcf94a57bd1c7bc7b9
|
refs/heads/master
| 2020-04-14T23:11:01.070872
| 2018-08-21T16:00:12
| 2018-08-21T16:00:12
| 164,192,792
| 1
| 0
| null | 2019-01-05T07:32:42
| 2019-01-05T07:32:42
| null |
UTF-8
|
Java
| false
| false
| 1,758
|
java
|
/**
* [307] Range Sum Query - Mutable
*
* difficulty: Medium
*
* TestCase Example: ["NumArray","sumRange","update","sumRange"] [[[1,3,5]],[0,2],[1,2],[0,2]]
*
* https://leetcode-cn.com/problems/range-sum-query-mutable/
*
*
* Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.
*
* The update(i, val) function modifies nums by updating the element at index i to val.
*
* Example:
*
*
* Given nums = [1, 3, 5]
*
* sumRange(0, 2) -> 9
* update(1, 2)
* sumRange(0, 2) -> 8
*
*
* Note:
*
*
* The array is only modifiable by the update function.
* You may assume the number of calls to update and sumRange function is distributed evenly.
*
*
*
*
* >>>>>>中文描述<<<<<<
*
*
* [307] 区域和检索 - 数组可修改
*
*
* 给定一个整数数组 nums,求出数组从索引 i 到 j (i ≤ j) 范围内元素的总和,包含 i, j 两点。
*
* update(i, val) 函数可以通过将下标为 i 的数值更新为 val,从而对数列进行修改。
*
* 示例:
*
* Given nums = [1, 3, 5]
*
* sumRange(0, 2) -> 9
* update(1, 2)
* sumRange(0, 2) -> 8
*
*
* 说明:
*
*
* 数组仅可以在 update 函数下进行修改。
* 你可以假设 update 函数与 sumRange 函数的调用次数是均匀分布的。
*
*/
class NumArray {
public NumArray(int[] nums) {
}
public void update(int i, int val) {
}
public int sumRange(int i, int j) {
}
}
/**
* Your NumArray object will be instantiated and called as such:
* NumArray obj = new NumArray(nums);
* obj.update(i,val);
* int param_2 = obj.sumRange(i,j);
*/
|
[
"techflowing@gmail.com"
] |
techflowing@gmail.com
|
b76d240d2abbdbcc4601868a117dd8c47366885f
|
dd2346f5994ab072aa61ebff9baafffe9b855b0c
|
/app/src/main/java/com/holike/crm/adapter/customer/CustomerRoundsAdapter.java
|
d7732511049e3f627e983eed07a41d67a9e08884
|
[] |
no_license
|
stozen/HolikeCRM_V2
|
210573d8d27406629a373da08424d50dbc7d6710
|
752d00ef33f866e562d056ec88fe3e12695856fa
|
refs/heads/master
| 2020-07-19T20:53:47.228264
| 2019-08-28T09:52:25
| 2019-08-28T09:52:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,076
|
java
|
package com.holike.crm.adapter.customer;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import com.holike.crm.R;
import com.holike.crm.adapter.CustomerStatusListAdapter;
import com.holike.crm.bean.CustomerStatusBean;
import com.holike.crm.bean.MultiItem;
import java.util.List;
/**
* Created by gallop on 2019/7/11.
* Copyright holike possess 2019.
* 待查房客户列表
*/
public class CustomerRoundsAdapter extends CustomerStatusListAdapter {
private String mTipsUploadDate, mTipsSource, mTipsDesigner,
mTipsReservation, mTipsCountdown;
public CustomerRoundsAdapter(Context context, List<MultiItem> mDatas) {
super(context, mDatas);
mTipsUploadDate = context.getString(R.string.followup_upload_scheme);
mTipsSource = context.getString(R.string.customer_source_tips);
mTipsDesigner = context.getString(R.string.followup_designer);
mTipsReservation = context.getString(R.string.followup_reservation);
mTipsCountdown = context.getString(R.string.customer_countdown_tips);
}
@Override
public void setup(RecyclerHolder holder, CustomerStatusBean.InnerBean bean, int position) {
holder.setText(R.id.tv_upload_date, obtain2(mTipsUploadDate, wrap(bean.uploadPlanDate))); //上传方案时间
holder.setText(R.id.tv_source, obtain(mTipsSource, bean.source, false)); //来源
holder.setText(R.id.tv_designer, obtain(mTipsDesigner, wrap(bean.designer), false)); //设计师
holder.setText(R.id.tv_reservation, obtain2(mTipsReservation, wrap(bean.measureAppConfirmTime))); //确图
if (TextUtils.isEmpty(bean.customerProtectTime)) {
holder.setVisibility(R.id.tv_countdown, View.GONE);
} else {
holder.setText(R.id.tv_countdown, obtain2(mTipsCountdown, bean.customerProtectTime));
holder.setVisibility(R.id.tv_countdown, View.VISIBLE);
}
}
@Override
public int bindLayoutResId() {
return R.layout.item_rv_customer_status_rounds_v2;
}
}
|
[
"i23xiaoyan@qq.com"
] |
i23xiaoyan@qq.com
|
7ede1d6faef8f2196f87227ba08d6ed3a3b18186
|
497fcb88c10c94fed1caa160ee110561c07b594c
|
/platform/standalone-server/src/main/java/com/yazino/model/document/SendGameMessageRequest.java
|
8d6ab7803767bdefdbabe90e2e01886fdeaefb91
|
[] |
no_license
|
ShahakBH/jazzino-master
|
3f116a609c5648c00dfbe6ab89c6c3ce1903fc1a
|
2401394022106d2321873d15996953f2bbc2a326
|
refs/heads/master
| 2016-09-02T01:26:44.514049
| 2015-08-10T13:06:54
| 2015-08-10T13:06:54
| 40,482,590
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,212
|
java
|
package com.yazino.model.document;
import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;
public class SendGameMessageRequest {
private String body;
private String type;
private String playerIds;
private boolean tableMessage;
public boolean isTableMessage() {
return tableMessage;
}
public void setTableMessage(final boolean tableMessage) {
this.tableMessage = tableMessage;
}
public String getType() {
return type;
}
public void setType(final String type) {
this.type = type;
}
public String getBody() {
return body;
}
public void setBody(final String body) {
this.body = body;
}
public String getPlayerIds() {
return playerIds;
}
public void setPlayerIds(final String playerIds) {
this.playerIds = playerIds;
}
public Set<BigDecimal> convertPlayerIds() {
final String[] idsAsString = playerIds.split(",");
final Set<BigDecimal> result = new HashSet<BigDecimal>();
for (String idAsString : idsAsString) {
result.add(new BigDecimal(idAsString.trim()));
}
return result;
}
}
|
[
"shahak.ben-hamo@rbpkrltd.com"
] |
shahak.ben-hamo@rbpkrltd.com
|
9877ab2ba8120cb89d4de9c7ab81746e3cd06f16
|
971f932fc8558216bf58ceeb89ef1c41101c2a09
|
/lesports-bole/branches/focus/lesports-crawler/lesports-crawler-core/src/main/java/com/lesports/crawler/utils/Constants.java
|
ef6b783d3e850dc340f9bf228de308f584e779a4
|
[] |
no_license
|
wang-shun/lesports
|
c80085652d6c5c7af9f7eeacde65cd3bdd066e56
|
40b3d588e400046b89803f8fbd8fb9176f7acaa6
|
refs/heads/master
| 2020-04-12T23:23:16.620900
| 2018-12-21T02:59:29
| 2018-12-21T02:59:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 856
|
java
|
package com.lesports.crawler.utils;
/**
* aa.
*
* @author pangchuanxiao
* @since 2015/11/20
*/
public abstract class Constants {
public static final String KEY_ATTACH_RESULT = "attach_result";
public static final String KEY_IS_DATA_NULL = "is_data_null";
public static final String KEY_IS_HANDLER_NULL = "is_handler_null";
public static final String KEY_URL = "url";
public static final String KEY_DATA = "data";
public static final int SCHEDULER_INIT_DELAY = 0 * 60;//TIME UNIT SECOND
public static final int SCHEDULER_DELAY = 30 * 60;//TIME UNIT SECOND
public static final int CONCURRENT_THREAD_PER_HOST = 5;//每台机器上worker并发数
public static final int SUSPEND_TASK_RETRY_COUNT = 3;//每台机器上worker并发数
public static final int SEED_LOAD_DELAY = 1800; // SECONDS
}
|
[
"ryan@ryandeMacBook-Air.local"
] |
ryan@ryandeMacBook-Air.local
|
344225add3e29025b2d715c2aa214f6ea4a38ae1
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_16546f6207be02d22a06450bf403ceb315bfd8ea/Lesson8_Granulation/2_16546f6207be02d22a06450bf403ceb315bfd8ea_Lesson8_Granulation_s.java
|
422cdcb6494885ee9a209779692898e1a53ab345
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,747
|
java
|
import net.beadsproject.beads.core.AudioContext;
import net.beadsproject.beads.data.SampleManager;
import net.beadsproject.beads.ugens.Envelope;
import net.beadsproject.beads.ugens.Gain;
import net.beadsproject.beads.ugens.GranularSamplePlayer;
import net.beadsproject.beads.ugens.SamplePlayer;
public class Lesson8_Granulation {
public static void main(String[] args) {
AudioContext ac;
ac = new AudioContext();
/*
* In lesson 4 we played back samples. This example is almost the same
* but uses GranularSamplePlayer instead of SamplePlayer. See some of
* the controls below.
*/
String audioFile = "audio/1234.aif";
GranularSamplePlayer player = new GranularSamplePlayer(ac,
SampleManager.sample(audioFile));
/*
* Have some fun with the controls.
*/
// loop the sample at its end points
player.setLoopType(SamplePlayer.LoopType.LOOP_ALTERNATING);
player.getLoopStartUGen().setValue(0);
player.getLoopEndUGen().setValue(
(float)SampleManager.sample(audioFile).getLength());
// control the rate of grain firing
Envelope grainIntervalEnvelope = new Envelope(ac, 100);
grainIntervalEnvelope.addSegment(20, 10000);
player.setGrainIntervalUgen(grainIntervalEnvelope);
// control the playback rate
Envelope rateEnvelope = new Envelope(ac, 1);
rateEnvelope.addSegment(1, 5000);
rateEnvelope.addSegment(0, 5000);
rateEnvelope.addSegment(0, 2000);
rateEnvelope.addSegment(-0.1f, 2000);
player.setRate(rateEnvelope);
// a bit of noise can be nice
player.getRandomnessUGen().setValue(0.01f);
/*
* And as before...
*/
Gain g = new Gain(ac, 2, 0.2f);
g.addInput(player);
ac.out.addInput(g);
ac.start();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
d3cf069260eb4c07d7242515c852e014033ff8ea
|
37565116bf677f94fd7abe20584f303d46aed68e
|
/Topup_18-06-2015_1/src/main/java/com/masary/controlers/ChangePoints/LoyaltyPointsConfirmation.java
|
93d23777a8d3e3525b70ecf6daa5e4a3d332b70f
|
[] |
no_license
|
Sobhy-M/test-jira
|
70b6390b95182b7c70fbca510b032ca853d2c508
|
f38554d674e4eaf6c38e4493278a63d41504f155
|
refs/heads/master
| 2022-12-20T12:22:32.110190
| 2019-07-07T16:39:34
| 2019-07-07T16:39:34
| 195,658,623
| 0
| 0
| null | 2022-12-16T08:16:01
| 2019-07-07T14:07:16
|
Java
|
UTF-8
|
Java
| false
| false
| 3,141
|
java
|
package com.masary.controlers.ChangePoints;
import java.io.IOException;
import java.util.List;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.masary.common.CONFIG;
import com.masary.controlers.CashatMasary.CashatMasaryProperties;
import com.masary.database.manager.MasaryManager;
import com.masary.integration.dto.ChangePointsDTO;
import com.masary.integration.dto.TedataDenominationRepresentation;
/**
* Servlet implementation class LoyaltyPointsConfirmation
*/
public class LoyaltyPointsConfirmation extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
String nextPage = "";
HttpSession session = request.getSession();
try {
if (!isLogin(session)) {
nextPage = CONFIG.PAGE_LOGIN;
session.setAttribute(CONFIG.LOGIN_IP, request.getRemoteAddr());
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/" + nextPage);
dispatcher.forward(request, response);
return;
}
ChangePointsDTO loyaltyPointsRepresentation = (ChangePointsDTO) request.getSession()
.getAttribute("loyaltyPointsRepresentation");
loyaltyPointsRepresentation.getWalletPoints();
loyaltyPointsRepresentation.getPoints();
long choosenAmount = Long.parseLong(request.getParameter("points"));
if (!(checkAmountInPointsList(choosenAmount, loyaltyPointsRepresentation.getPoints())
&& checkAmountValidation(choosenAmount, loyaltyPointsRepresentation))) {
session.setAttribute("ErrorMessage","يرجي العلم بانه بان هذا العدد من النقاط اكبر من النقاط المتاحة");
nextPage = CONFIG.PAGE_ERRPR;
} else {
String selectedPoints = request.getParameter("points");
request.setAttribute("selectedPoints", Integer.valueOf(selectedPoints));
nextPage = CONFIG.LoyaltyPoints_Confirmation_Page;
}
} catch (Exception ex) {
MasaryManager.logger.info("ErrorMessage " + ex.getMessage());
session.setAttribute("ErrorMessage", ex.getMessage());
nextPage = CONFIG.PAGE_ERRPR;
} finally {
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/" + nextPage);
dispatcher.forward(request, response);
}
}
private boolean checkAmountValidation(long choosenAmount, ChangePointsDTO changePointsDTO) {
if (!checkAmountInPointsList(choosenAmount, changePointsDTO.getPoints())) {
return false;
}
if (choosenAmount > changePointsDTO.getWalletPoints()) {
return false;
}
return true;
}
private boolean checkAmountInPointsList(long choosenAmount, List<Long> points) {
for (Long i : points) {
if (i == choosenAmount)
return true;
}
return false;
}
private boolean isLogin(HttpSession session) {
return session.getAttribute(CONFIG.PARAM_PIN) != null;
}
}
|
[
"Mostafa.Sobhy@MASARY.LOCAL"
] |
Mostafa.Sobhy@MASARY.LOCAL
|
fd85124ccdfb40332cbf3422c425a03324da06da
|
63a9c24defb4bffc7ce97f42222f5bfbb671a87a
|
/shop/src/net/shopxx/security/CurrentCartHandlerInterceptor.java
|
7cb6df17fa791e396cc25ddd7cd85ab9ac40c646
|
[] |
no_license
|
zhanglize-paomo/shop
|
438437b26c79b8137a9b22edf242a5df49fa5c2e
|
d5728b263fa3cabf917e7a37bc1ca6986c68b019
|
refs/heads/master
| 2022-12-20T22:40:57.549683
| 2019-12-18T09:04:11
| 2019-12-18T09:04:11
| 228,772,639
| 0
| 1
| null | 2022-12-16T11:10:26
| 2019-12-18T06:24:10
|
FreeMarker
|
UTF-8
|
Java
| false
| false
| 1,869
|
java
|
/*
* Copyright 2005-2017 shopxx.net. All rights reserved.
* Support: http://www.shopxx.net
* License: http://www.shopxx.net/license
*/
package net.shopxx.security;
import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import net.shopxx.service.CartService;
/**
* Security - 当前购物车拦截器
*
* @author SHOP++ Team
* @version 5.0
*/
public class CurrentCartHandlerInterceptor extends HandlerInterceptorAdapter {
/**
* 默认"当前购物车"属性名称
*/
public static final String DEFAULT_CURRENT_CART_ATTRIBUTE_NAME = "currentCart";
/**
* "当前购物车"属性名称
*/
private String currentCartAttributeName = DEFAULT_CURRENT_CART_ATTRIBUTE_NAME;
@Inject
private CartService cartService;
/**
* 请求后处理
*
* @param request
* HttpServletRequest
* @param response
* HttpServletResponse
* @param handler
* 处理器
* @param modelAndView
* 数据视图
*/
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
request.setAttribute(getCurrentCartAttributeName(), cartService.getCurrent());
}
/**
* 获取"当前购物车"属性名称
*
* @return "当前购物车"属性名称
*/
public String getCurrentCartAttributeName() {
return currentCartAttributeName;
}
/**
* 设置"当前购物车"属性名称
*
* @param currentCartAttributeName
* "当前购物车"属性名称
*/
public void setCurrentCartAttributeName(String currentCartAttributeName) {
this.currentCartAttributeName = currentCartAttributeName;
}
}
|
[
"Z18434395962@163.com"
] |
Z18434395962@163.com
|
dbd0bbeaa0d02c72cbb97adbfb69f9d8d7fe9d79
|
53f5a941261609775dc3eedf0cb487956b734ab0
|
/com.samsung.app.watchmanager/sources/androidx/core/widget/n.java
|
e89147deb54243fec2763322e0c10dbf4bb1fdf2
|
[] |
no_license
|
ThePBone/BudsProAnalysis
|
4a3ede6ba6611cc65598d346b5a81ea9c33265c0
|
5b04abcae98d1ec8d35335d587b628890383bb44
|
refs/heads/master
| 2023-02-18T14:24:57.731752
| 2021-01-17T12:44:58
| 2021-01-17T12:44:58
| 322,783,234
| 16
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 268
|
java
|
package androidx.core.widget;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
public interface n {
void setSupportButtonTintList(ColorStateList colorStateList);
void setSupportButtonTintMode(PorterDuff.Mode mode);
}
|
[
"thebone.main@gmail.com"
] |
thebone.main@gmail.com
|
20d88e5528cd17a847322906505da537d35e47d5
|
1aef4669e891333de303db570c7a690c122eb7dd
|
/src/main/java/com/alipay/api/domain/EntityPriorRiskVO.java
|
200900bce2b7ea9572bd01b9c32272e2de171b99
|
[
"Apache-2.0"
] |
permissive
|
fossabot/alipay-sdk-java-all
|
b5d9698b846fa23665929d23a8c98baf9eb3a3c2
|
3972bc64e041eeef98e95d6fcd62cd7e6bf56964
|
refs/heads/master
| 2020-09-20T22:08:01.292795
| 2019-11-28T08:12:26
| 2019-11-28T08:12:26
| 224,602,331
| 0
| 0
|
Apache-2.0
| 2019-11-28T08:12:26
| 2019-11-28T08:12:25
| null |
UTF-8
|
Java
| false
| false
| 1,583
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 风险信息明细
*
* @author auto create
* @since 1.0, 2018-09-28 13:52:45
*/
public class EntityPriorRiskVO extends AlipayObject {
private static final long serialVersionUID = 5842168645615311361L;
/**
* 风险处置源
*/
@ApiField("dispose_department")
private String disposeDepartment;
/**
* 风险详情
*/
@ApiField("risk_detail")
private String riskDetail;
/**
* 风险级别
*/
@ApiField("risk_level")
private String riskLevel;
/**
* 风险场景
*/
@ApiField("risk_scene")
private String riskScene;
/**
* 风险类型
*/
@ApiField("risk_type")
private String riskType;
public String getDisposeDepartment() {
return this.disposeDepartment;
}
public void setDisposeDepartment(String disposeDepartment) {
this.disposeDepartment = disposeDepartment;
}
public String getRiskDetail() {
return this.riskDetail;
}
public void setRiskDetail(String riskDetail) {
this.riskDetail = riskDetail;
}
public String getRiskLevel() {
return this.riskLevel;
}
public void setRiskLevel(String riskLevel) {
this.riskLevel = riskLevel;
}
public String getRiskScene() {
return this.riskScene;
}
public void setRiskScene(String riskScene) {
this.riskScene = riskScene;
}
public String getRiskType() {
return this.riskType;
}
public void setRiskType(String riskType) {
this.riskType = riskType;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
034605bbc232f4281b7d32bd87c4251c831d35db
|
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
|
/src_cfr/com/google/security/zynamics/bindiff/graph/helpers/BasicBlockMatchAdder$1.java
|
8ef150cce3cec40fc96d7810031d6befaee539a1
|
[] |
no_license
|
fjh658/bindiff
|
c98c9c24b0d904be852182ecbf4f81926ce67fb4
|
2a31859b4638404cdc915d7ed6be19937d762743
|
refs/heads/master
| 2021-01-20T06:43:12.134977
| 2016-06-29T17:09:03
| 2016-06-29T17:09:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 132
|
java
|
/*
* Decompiled with CFR 0_115.
*/
package com.google.security.zynamics.bindiff.graph.helpers;
class BasicBlockMatchAdder$1 {
}
|
[
"manouchehri@riseup.net"
] |
manouchehri@riseup.net
|
d207322cf1a1265c8828a8fc5c7c6807e1679714
|
2879d0e7f4b2ac1cd15cfbbcb3932beaad87f767
|
/jmetal-exec/src/main/java/org/uma/jmetal45/experiment/NSGAIIExperimentRunner.java
|
e35307975c4a44791c4caafc8082d8866d5f830d
|
[] |
no_license
|
jfrchicanog/jMetal
|
c0c457ad05bafaa52946c662f20362b72d50448b
|
fe3b0065be449a9ca00e970a6e4c50c0f6049fbe
|
refs/heads/master
| 2021-01-09T06:54:09.720671
| 2014-10-26T09:05:56
| 2014-10-26T09:05:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,247
|
java
|
// NSGAIIExperimentRunner.java
//
// Author:
// Antonio J. Nebro <antonio@lcc.uma.es>
//
// Copyright (c) 2014 Antonio J. Nebro
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package org.uma.jmetal45.experiment;
import org.uma.jmetal45.experiment.experimentoutput.*;
import org.uma.jmetal45.util.JMetalException;
import java.io.IOException;
/**
* The class defines a jMetal experiment with the following features
* - Algorithms: four variants of NSGA-II (each of them having a different crossover setProbability
* - The zdt suite is solved
* - The reference Pareto fronts are unknown and have to be computed
* - The algorithm variant settings are read from properties files by using this method in the
* AlgorithmExecution object:
* .setUseAlgorithmConfigurationFiles()
*/
public class NSGAIIExperimentRunner {
public static void main(String[] args) throws JMetalException, IOException {
ExperimentData experimentData = new ExperimentData.Builder("NSGAIIStudy")
.setAlgorithmNameList(new String[] {"NSGAII", "NSGAIIb", "NSGAIIc", "NSGAIId"})
.setProblemList(new String[] {"ZDT1", "ZDT2", "ZDT3", "ZDT4", "ZDT6"})
.setExperimentBaseDirectory("/Users/antelverde/Softw/jMetal/jMetalGitHub/pruebas")
.setOutputParetoFrontFileName("FUN")
.setOutputParetoSetFileName("VAR")
.setIndependentRuns(4)
.build() ;
AlgorithmExecution algorithmExecution = new AlgorithmExecution.Builder(experimentData)
.setNumberOfThreads(8)
.setParetoSetFileName("VAR")
.setParetoFrontFileName("FUN")
.setUseAlgorithmConfigurationFiles()
.build() ;
ParetoFrontsGeneration paretoFrontsGeneration = new ParetoFrontsGeneration.Builder(experimentData)
.build() ;
String[] indicatorList = new String[]{"HV", "IGD", "EPSILON", "SPREAD", "GD"} ;
QualityIndicatorGeneration qualityIndicatorGeneration = new QualityIndicatorGeneration.Builder(experimentData)
.setParetoFrontDirectory("/Users/antelverde/Softw/pruebas/data/paretoFronts")
.setParetoFrontFiles(new String[] {"ZDT1.pf", "ZDT2.pf", "ZDT3.pf", "ZDT4.pf", "ZDT6.pf"})
.setQualityIndicatorList(indicatorList)
.build() ;
SetCoverageTableGeneration setCoverageTables = new SetCoverageTableGeneration.Builder(experimentData)
.build() ;
BoxplotGeneration boxplotGeneration = new BoxplotGeneration.Builder(experimentData)
.setIndicatorList(indicatorList)
.setNumberOfRows(3)
.setNumberOfColumns(2)
.build() ;
WilcoxonTestTableGeneration wilcoxonTestTableGeneration =
new WilcoxonTestTableGeneration.Builder(experimentData)
.setIndicatorList(indicatorList)
.build() ;
QualityIndicatorLatexTableGeneration qualityIndicatorLatexTableGeneration =
new QualityIndicatorLatexTableGeneration.Builder(experimentData)
.setIndicatorList(indicatorList)
.build() ;
FriedmanTableGeneration friedmanTableGeneration = new FriedmanTableGeneration.Builder(experimentData)
.setIndicatorList(indicatorList)
.build() ;
Experiment experiment = new Experiment.Builder(experimentData)
.addExperimentOutput(algorithmExecution)
.addExperimentOutput(paretoFrontsGeneration)
.addExperimentOutput(qualityIndicatorGeneration)
.addExperimentOutput(setCoverageTables)
.addExperimentOutput(boxplotGeneration)
.addExperimentOutput(wilcoxonTestTableGeneration)
.addExperimentOutput(qualityIndicatorLatexTableGeneration)
.addExperimentOutput(friedmanTableGeneration)
.build() ;
experiment.run();
}
}
|
[
"ajnebro@outlook.com"
] |
ajnebro@outlook.com
|
e4c4da81114b813d9680bad32337ee8c5119bee2
|
a57d8bf94ca13ae05837412cf2ab2fe19dd7d3f6
|
/src/day14_Switch_Recap/SwitchStatemntPractice.java
|
19e1923aad08c36c700b1199e2e20c67f98bc7c5
|
[] |
no_license
|
SerdarAnnakurdov/myAllFilesCybertek
|
1bdeb3feba7664f6346bf3a4f62ae825a54ccbe9
|
61260280d14d841cf02e1df8981c0f602ea0dd73
|
refs/heads/master
| 2023-02-23T09:57:30.270111
| 2021-02-01T21:31:33
| 2021-02-01T21:31:33
| 333,541,067
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 300
|
java
|
package day14_Switch_Recap;
public class SwitchStatemntPractice {
public static void main(String[] args) {
int a = 12;
String b ="a";
switch (a){
case 12: b="asd";
default: b="aaa";
}
System.out.println(b);
}
}
|
[
"serjonchik@gmail.com"
] |
serjonchik@gmail.com
|
2f2e45448a0463e8f8001b8205c9ebfc9586c301
|
61e465932b5d7f53b653324a6323ce22a500e8c3
|
/src/test/java/org/objectweb/asm/test/ASMifierTest.java
|
e5e883c2d2cf83c8c1e80ef943bfc7333e98effe
|
[] |
no_license
|
txazo/asm
|
51b27037019ee9cc2bf0c3c80680de87314915c8
|
c3aaa9f46a80df156e033420394fe1558fe69d44
|
refs/heads/master
| 2021-01-20T12:24:18.152810
| 2017-05-09T07:34:11
| 2017-05-09T07:34:11
| 90,358,781
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 609
|
java
|
package org.objectweb.asm.test;
import org.junit.Test;
import org.objectweb.asm.util.ASMifier;
public class ASMifierTest {
private static final String DEBUG = "-debug";
private static final String CLASS_NAME = "org.objectweb.asm.test.Sample";
@Test
public void test1() throws Exception {
ASMifier.main(new String[]{DEBUG, CLASS_NAME});
}
@Test
public void test2() throws Exception {
String classFile = ASMifierTest.class.getResource("/").getPath() + CLASS_NAME.replaceAll("\\.", "/") + ".class";
ASMifier.main(new String[]{DEBUG, classFile});
}
}
|
[
"784990655@qq.com"
] |
784990655@qq.com
|
79a6490d59c4a661b8d42e3b49ca70640f5aa96c
|
7ad843a5b11df711f58fdb8d44ed50ae134deca3
|
/JDK/JDK1.8/src/javax/xml/stream/XMLStreamConstants.java
|
8386e87c7189839bc00766c973a49fbdf1acc465
|
[
"MIT"
] |
permissive
|
JavaScalaDeveloper/java-source
|
f014526ad7750ad76b46ff475869db6a12baeb4e
|
0e6be345eaf46cfb5c64870207b4afb1073c6cd0
|
refs/heads/main
| 2023-07-01T22:32:58.116092
| 2021-07-26T06:42:32
| 2021-07-26T06:42:32
| 362,427,367
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,675
|
java
|
/*
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package javax.xml.stream;
/**
* This interface declares the constants used in this API.
* Numbers in the range 0 to 256 are reserved for the specification,
* user defined events must use event codes outside that range.
*
* @since 1.6
*/
public interface XMLStreamConstants {
/**
* Indicates an event is a start element
* @see javax.xml.stream.events.StartElement
*/
public static final int START_ELEMENT=1;
/**
* Indicates an event is an end element
* @see javax.xml.stream.events.EndElement
*/
public static final int END_ELEMENT=2;
/**
* Indicates an event is a processing instruction
* @see javax.xml.stream.events.ProcessingInstruction
*/
public static final int PROCESSING_INSTRUCTION=3;
/**
* Indicates an event is characters
* @see javax.xml.stream.events.Characters
*/
public static final int CHARACTERS=4;
/**
* Indicates an event is a comment
* @see javax.xml.stream.events.Comment
*/
public static final int COMMENT=5;
/**
* The characters are white space
* (see [XML], 2.10 "White Space Handling").
* Events are only reported as SPACE if they are ignorable white
* space. Otherwise they are reported as CHARACTERS.
* @see javax.xml.stream.events.Characters
*/
public static final int SPACE=6;
/**
* Indicates an event is a start document
* @see javax.xml.stream.events.StartDocument
*/
public static final int START_DOCUMENT=7;
/**
* Indicates an event is an end document
* @see javax.xml.stream.events.EndDocument
*/
public static final int END_DOCUMENT=8;
/**
* Indicates an event is an entity reference
* @see javax.xml.stream.events.EntityReference
*/
public static final int ENTITY_REFERENCE=9;
/**
* Indicates an event is an attribute
* @see javax.xml.stream.events.Attribute
*/
public static final int ATTRIBUTE=10;
/**
* Indicates an event is a DTD
* @see javax.xml.stream.events.DTD
*/
public static final int DTD=11;
/**
* Indicates an event is a CDATA section
* @see javax.xml.stream.events.Characters
*/
public static final int CDATA=12;
/**
* Indicates the event is a namespace declaration
*
* @see javax.xml.stream.events.Namespace
*/
public static final int NAMESPACE=13;
/**
* Indicates a Notation
* @see javax.xml.stream.events.NotationDeclaration
*/
public static final int NOTATION_DECLARATION=14;
/**
* Indicates a Entity Declaration
* @see javax.xml.stream.events.NotationDeclaration
*/
public static final int ENTITY_DECLARATION=15;
}
|
[
"panzha@dian.so"
] |
panzha@dian.so
|
42850fee74189d96cba22145af439ba5c1836e04
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_8c7c0ed8562382787cb28cf9b028c31892106b5a/PokerCard/2_8c7c0ed8562382787cb28cf9b028c31892106b5a_PokerCard_t.java
|
ff1fde1d4a1670a01a98c41230b1c45814317e4e
|
[] |
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
| 409
|
java
|
package com.github.kpacha.jkata.pokerhand;
public class PokerCard {
private String card;
public PokerCard(String card) {
this.card = card;
}
public int getNumericValue() {
if (card.charAt(0) == 'K')
return 12;
if (card.charAt(0) == 'Q')
return 11;
if (card.charAt(0) == 'J')
return 10;
if (card.charAt(0) == '9')
return 9;
return 5;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
4559677495b843811d13cf198b2ce2066b78e4ce
|
6c9a1852426ce7b255a5a05433a66806a927c5d3
|
/ch05/src/ch05/Ch05Ex01_07.java
|
994dc3b381fbe492a0fed8def6e26aab2866a346
|
[] |
no_license
|
LEEWOODO/work_java
|
f26eee2b6b20508c0bd17500cdbf327cdd188a49
|
c66024bd09bb5daf4e17b163e41ea2432b92a6e7
|
refs/heads/master
| 2020-03-18T03:43:36.400627
| 2018-06-30T05:21:44
| 2018-06-30T05:21:44
| 134,252,624
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,031
|
java
|
package ch05;
import java.util.Arrays;
import java.util.Scanner;
public class Ch05Ex01_07 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scanner = new Scanner(System.in);
/* 내가 한 코드
*
* String[] input = scanner.nextLine().split(" ");
int[] num = new int[input.length];
int temp = 0;
int[] max = new int[num.length];
int[] min = new int[num.length];
int maxResult = 0;
int minResult = 0;
int j = 0, k = 0; // j는 max용, k는 min용 증감수
for (int i = 0; i < input.length; i++) {
num[i] = Integer.parseInt(input[i]);
}
// 100기준으로 나누끼
for (int i = 0; i < num.length; i++) {
if (num[i] - 100 > 0) {
// num의 요소가 100이상이면 배열에서 가장 작은 값(MIN)을 찾는다.
// min배열에 값들을 저장한다.
min[k] = num[i];
k++;
} else {
// num의 요소가 100미만이면 배열에서 가장 큰 값(MAX)을 찾는다.
// max배열에 값들을 저장한다.
max[j] = num[i];
j++;
}
}
System.out.println("100이상의 수 min배열 : " + Arrays.toString(min));
System.out.println("100미만의 수 max배열 : " + Arrays.toString(max));
minResult = min[0];
maxResult = max[0];
for (int i = 0; i < min.length; i++) {
if (min[i] != 0) {
if (minResult > min[i]) {
minResult=min[i];
}
}
}
System.out.printf("100이상의 수중 최솟값은: %d%n",minResult);
for (int i = 0; i < max.length; i++) {
if (max[i] != 0) {
if (maxResult < max[i]) {
maxResult=max[i];
}
}
}
System.out.printf("100이하의 수중 최대값은: %d%n",maxResult);
System.out.printf("%3d %3d",maxResult,minResult);*/
/**
* 강사님 코드
*/
// 1. 10개의 정수를 입력받기
String numbers[]=scanner.nextLine().split(" ");
// 1.1 전체 배열을 검사해서 1이하 10000이상일때 발견되면 프로그램 종료
for(int i=0;i<numbers.length;i++) {
int num=Integer.parseInt(numbers[i]);
// 만약 1000 이상의 정수가 발견되면
if(!(1<=num&&num<10000)) {
// main메소드를 return 시켜 프로그램 종료
System.out.println("1이상 10,000 미만의 정수만 가능");
return;
}
}
// 2. 100미만의 수 중 가장 큰 수를 저장하는 변수 max 선언
int max=100;
// 3. 100이상의 수 중 가장 작은 수를 저장하는 변수 min 선언
int min=100;
// 4. numbers 배열의 수를 하나씩 꺼내면서 비교하기
for(int i=0;i<numbers.length;i++) {
int num=Integer.parseInt(numbers[i]);
if(num<100) {
if(max==100) {
max=num;
}else {
max=max>num?max:num;
}
}else {
if(min==100) {
min=num;
}else {
min=min<num?min:num;
}
}
}
// 5. 출력하기
System.out.printf("MAX: %d, MIN: %d", max,min);
}
}
|
[
"KOITT@KOITT-PC"
] |
KOITT@KOITT-PC
|
18458f1a1e8dc4a553d823314f5a7ca4ced4b1e2
|
3657b6f5b30ac061e2ab1db7cd745e2ca8183af3
|
/homeProject/src/com/house/framework/commons/conf/DictConstant.java
|
23ae6ebe177e019e2b91660bf7d72d68ffcbd54c
|
[] |
no_license
|
Lxt000806/eclipse_workspace
|
b25f4f81bd0aa6f8d55fc834dd09cdb473af1f3f
|
04376681ec91c3f8dbde2908d35612c4842a868c
|
refs/heads/main
| 2023-05-23T12:05:26.989438
| 2021-06-13T05:49:26
| 2021-06-13T05:49:26
| 376,452,726
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,737
|
java
|
package com.house.framework.commons.conf;
/**
* 引用字典CODE常量
*/
public final class DictConstant {
private DictConstant(){};
//--------------------FTP 配置信息------------------------
/** 远程FTP 抽像字典CODE ISS 项目使用*/
public final static String ABSTRACT_DICT_FTP_ISS = "ABSTRACT_DICT_FTP_ISS";
/** 远程FTP 抽像字典CODE 测试 项目使用*/
public final static String ABSTRACT_DICT_FTP_TEST = "ABSTRACT_DICT_FTP_TEST";
/** 远程FTP 抽像字典CODE CMS 项目使用*/
public final static String ABSTRACT_DICT_FTP_CMS = "ABSTRACT_DICT_FTP_CMS";
/** 远程 FTP IP */
public final static String DICT_FTP_REMOTE_IP = "DICT_FTP_REMOTE_IP";
/** 远程FTP 端口 */
public final static String DICT_FTP_REMOTE_PORT = "DICT_FTP_REMOTE_PORT";
/** 远程FTP 账号*/
public final static String DICT_FTP_REMOTE_ACCOUNT = "DICT_FTP_REMOTE_ACCOUNT";
/** 远程FTP 密码*/
public final static String DICT_FTP_REMOTE_PASSWORD = "DICT_FTP_REMOTE_PASSWORD";
//-------------------- 菜单类型 [DICT_MENU_TYPE] ------------------------
/**菜单类型字典KEY */
public static final String ABSTRACT_DICT_MENU_TYPE = "ABSTRACT_DICT_MENU_TYPE";
/**tab类型菜单 */
public static final String DICT_MENU_TYPE_TAB = "DICT_MENU_TYPE_TAB";
/**文件夹类型菜单 */
public static final String DICT_MENU_TYPE_FOLDER = "DICT_MENU_TYPE_FOLDER";
/**url链接菜单 */
public static final String DICT_MENU_TYPE_URL = "DICT_MENU_TYPE_URL";
//-------------------- 菜单打开方式 [DICT_MENU_OPEN] ------------------------
/**菜单打开方式字典KEY */
public static final String ABSTRACT_DICT_MENU_OPEN = "ABSTRACT_DICT_MENU_OPEN";
/**全局窗口打开 */
public static final String DICT_MENU_OPEN_FULL = "DICT_MENU_OPEN_FULL";
/**内部窗口打开 */
public static final String DICT_MENU_OPEN_INNER = "DICT_MENU_OPEN_INNER";
//-------------------- 文件上传路径设置 ------------------------
/** 设置上传路径虚节点 */
public static final String ABSTRACT_DICT_UPLOAD_URL = "ABSTRACT_DICT_UPLOAD_URL";
/** 设置kindeditor 上传路径虚节点 */
public static final String DICT_KINDEDITOR_UPLOAD_URL = "DICT_KINDEDITOR_UPLOAD_URL";
/** 设置 swfupload 上传路径虚节点 */
public static final String DICT_SWFUPLOAD_UPLOAD_URL = "DICT_SWFUPLOAD_UPLOAD_URL";
public static final String ABSTRACT_COMPANY_UPLOAD = "ABSTRACT_COMPANY_UPLOAD";
public static final String LOGO_DIR = "LOGO_DIR";
public static final String ICON_DIR = "ICON_DIR";
public static final String BRCODE_DIR = "BRCODE_DIR";
public static final String PHOTO_DIR = "PHOTO_DIR";
public static final String AYH_ACTIVITY_PICTURE_DIR = "AYH_ACTIVITY_PICTURE_DIR";
/** 设置kindeditor 图片上传路径虚节点 */
public static final String UPLOAD_BOXIMAGE_URL = "UPLOAD_BOXIMAGE_URL";
public static final String UPLOAD_ROOT_DIR = "UPLOAD_ROOT_DIR";
public static final String UPLOAD_IP_DIR = "UPLOAD_IP_DIR";
public static final String UPLOAD_ROOT_URL = "UPLOAD_ROOT_DIR";
public static final String UPLOAD_IP_URL = "UPLOAD_IP_DIR";
public static final String UPLOAD_PROTOCOL_URL = "UPLOAD_PROTOCOL_URL";
public static final String UPLOAD_PORT_URL = "UPLOAD_PORT_URL";
public static final String UPLOAD_TEMP_DIR = "UPLOAD_TEMP_DIR";
public static final String AYH_IMAGE_DIR = "AYH_IMAGE_DIR";
public static final String AYH_USERINFO_IMAGE_DIR = "AYH_USERINFO_IMAGE_DIR";
public static final String AYH_OTHER_IMAGE_DIR = "AYH_OTHER_IMAGE_DIR";
public static final String AYH_USERINFO_PHOTO_DIR = "AYH_USERINFO_PHOTO_DIR";
public static final String AYH_MERCHANT_LOGO_DIR = "AYH_MERCHANT_LOGO_DIR";
}
|
[
"1728490992@qq.com"
] |
1728490992@qq.com
|
4e14ccdc507504c50bfffd153e08b3bc7ed3617c
|
f5049214ff99cdd7c37da74619b60ac4a26fc6ba
|
/orchestrator/server/server-security/eu.agno3.orchestrator.server.security/src/main/java/eu/agno3/orchestrator/server/security/internal/SetAdminPasswordJobBuilder.java
|
12553e6086c945068ed5d6019cba4d5fbd493543
|
[
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
AgNO3/code
|
d17313709ee5db1eac38e5811244cecfdfc23f93
|
b40a4559a10b3e84840994c3fd15d5f53b89168f
|
refs/heads/main
| 2023-07-28T17:27:53.045940
| 2021-09-17T14:25:01
| 2021-09-17T14:31:41
| 407,567,058
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,632
|
java
|
/**
* © 2014 AgNO3 Gmbh & Co. KG
* All right reserved.
*
* Created: 23.12.2014 by mbechler
*/
package eu.agno3.orchestrator.server.security.internal;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import eu.agno3.orchestrator.config.hostconfig.jobs.SetAdminPasswordJob;
import eu.agno3.orchestrator.jobs.JobType;
import eu.agno3.orchestrator.jobs.exceptions.JobRunnableException;
import eu.agno3.orchestrator.jobs.exec.JobRunnable;
import eu.agno3.orchestrator.jobs.exec.JobRunnableFactory;
import eu.agno3.orchestrator.server.security.LocalUserServerService;
import eu.agno3.runtime.crypto.scrypt.SCryptResult;
import eu.agno3.runtime.db.orm.EntityTransactionService;
import eu.agno3.runtime.security.SecurityManagementException;
/**
* @author mbechler
*
*/
@Component ( service = {
JobRunnableFactory.class
}, property = "jobType=eu.agno3.orchestrator.config.hostconfig.jobs.SetAdminPasswordJob" )
@JobType ( SetAdminPasswordJob.class )
public class SetAdminPasswordJobBuilder implements JobRunnableFactory<SetAdminPasswordJob> {
private LocalUserServerService userService;
private EntityTransactionService authEts;
@Reference
protected synchronized void setUserService ( LocalUserServerService init ) {
this.userService = init;
}
protected synchronized void unsetUserService ( LocalUserServerService init ) {
if ( this.userService == init ) {
this.userService = null;
}
}
@Reference ( target = "(persistenceUnit=auth)" )
protected synchronized void bindEntityTransactionService ( EntityTransactionService ets ) {
this.authEts = ets;
}
protected synchronized void unbindEntityTransactionService ( EntityTransactionService ets ) {
if ( this.authEts == ets ) {
this.authEts = null;
}
}
/**
* {@inheritDoc}
*
* @see eu.agno3.orchestrator.jobs.exec.JobRunnableFactory#getRunnableForJob(eu.agno3.orchestrator.jobs.Job)
*/
@Override
public JobRunnable getRunnableForJob ( SetAdminPasswordJob j ) throws JobRunnableException {
SCryptResult passwordHash;
try {
String adminPassword = j.getAdminPassword();
passwordHash = this.userService.generatePasswordHash(adminPassword, false);
}
catch ( SecurityManagementException e ) {
throw new JobRunnableException("Failed to generate password hash", e); //$NON-NLS-1$
}
return new SetAdminPasswordRunnable(this.userService, this.authEts, passwordHash);
}
}
|
[
"bechler@agno3.eu"
] |
bechler@agno3.eu
|
65093e4a73e92a20eb3ff4f2f3dc43c603e7435e
|
efe033adf3bc663f44ba3e5c786f603182422446
|
/src/main/java/com/jm3200104/spring/di/di08/SpringConfig.java
|
832cd9c407cd5a9fc66d4444120767d628856e69
|
[] |
no_license
|
codewnw/JF200120
|
cb35c23c33717ae268d93cdc8912f6aa6c900e96
|
1abc6ad367eb87a1596223f610cdee14d45dfbbe
|
refs/heads/master
| 2022-12-26T09:42:41.013885
| 2020-01-29T15:13:16
| 2020-01-29T15:13:16
| 235,117,318
| 0
| 0
| null | 2022-12-15T23:34:06
| 2020-01-20T14:14:51
|
Java
|
UTF-8
|
Java
| false
| false
| 284
|
java
|
package com.jm3200104.spring.di.di08;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan(basePackages = { "com.jm3200104.spring.di.di08" })
public class SpringConfig {
}
|
[
"code.wnw@gmail.com"
] |
code.wnw@gmail.com
|
cb884dacbc64ce507fc754ea17fa9f4a3665b9f1
|
5d77abfba31d2f0a5cb2f92f937904859785e7ff
|
/Java/java_examples Hyd/software/xml/javaxml/part1/app/xmlapp.java
|
e304b49a01e2fed2f2f699cf991bcf4917a36e35
|
[] |
no_license
|
thinkpavan/artefacts
|
d93a1c0be0b6158cb0976aae9af9c6a016ebfdae
|
04bcf95450243dfe2f4fa8f09d96274034428e4d
|
refs/heads/master
| 2020-04-01T20:24:34.142409
| 2016-07-07T16:27:47
| 2016-07-07T16:27:47
| 62,716,135
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,683
|
java
|
/* shows how to use new parser
Version: 1.0
Author : Team -J
*/
import java.io.*;
import org.xml.sax.*;
import org.xml.sax.helpers.DefaultHandler;
import javax.xml.parsers.*;
import java.util.Vector;
public class xmlapp extends DefaultHandler
{
StringBuffer curtext;
boolean ppoline=false;
boolean poid=false;
boolean pitemid=false;
boolean pqty=false;
String ordid;
poline p;
Vector polines = new Vector();
public static void main(String argv[])
{
DefaultHandler handler = new xmlapp();
SAXParserFactory factory = SAXParserFactory.newInstance();
try {
SAXParser saxParser = factory.newSAXParser();
saxParser.parse( new File("po1.xml"), handler);
} catch (Exception e) {
e.printStackTrace();
}
}
// DocumentHandler methods
public void startDocument()
throws SAXException { }
public void endDocument()
throws SAXException
{
System.out.println(" Now storing the following data in DataBase");
System.out.println("PO ID = "+ ordid.trim());
for( int i=0; i<polines.size();i++){
p = (poline)polines.get(i);
System.out.println(p.itemid + " "+ p.qty);
}
// here you can add code to store data in a database using jdbc instead of
// displaying the data.
}
public void startElement(String namespaceURI,
String sName, // simple name
String qName, // qualified name
Attributes attrs) throws SAXException
{
if(qName.equals("ordID"))
poid=true;
if(qName.equals("POLINE")){
p = new poline();// create a new poline object.
ppoline = true;
}
if(qName.equals("itemid"))
pitemid=true;
if(qName.equals("qty"))
pqty=true;
}
public void endElement(String namespaceURI,
String sName, // simple name
String qName // qualified name
)
throws SAXException
{
if(qName.equals("ordID")){
poid=false;
ordid=curtext.toString();
curtext=null;
}
if(qName.equals("POLINE")){
polines.addElement(p);
p = null;
ppoline = false;
}
if(qName.equals("itemid")){
pitemid=false;
p.itemid=curtext.toString();
curtext=null;
}
if(qName.equals("qty")){
pqty=false;
p.qty=curtext.toString();
curtext=null;
}
}
public void characters(char buf[], int offset, int len)
throws SAXException
{
String s = new String(buf, offset, len);
if (curtext == null) {
curtext = new StringBuffer(s);
} else {
curtext.append(s);
}
}
}
|
[
"lazygeeks.in@gmail.com"
] |
lazygeeks.in@gmail.com
|
a74916d7f5cf602a61db699c2f118f9745df91c0
|
aa6997aba1475b414c1688c9acb482ebf06511d9
|
/src/java/awt/print/PrinterIOException.java
|
94214c84da6f7dbe60af6d2d8d6c466ca8f3ad1f
|
[] |
no_license
|
yueny/JDKSource1.8
|
eefb5bc88b80ae065db4bc63ac4697bd83f1383e
|
b88b99265ecf7a98777dd23bccaaff8846baaa98
|
refs/heads/master
| 2021-06-28T00:47:52.426412
| 2020-12-17T13:34:40
| 2020-12-17T13:34:40
| 196,523,101
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,186
|
java
|
/*
* Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package java.awt.print;
import java.io.IOException;
/**
* The <code>PrinterIOException</code> class is a subclass of
* {@link PrinterException} and is used to indicate that an IO error
* of some sort has occurred while printing.
*
* <p>As of release 1.4, this exception has been retrofitted to conform to
* the general purpose exception-chaining mechanism. The
* "<code>IOException</code> that terminated the print job"
* that is provided at construction time and accessed via the
* {@link #getIOException()} method is now known as the <i>cause</i>,
* and may be accessed via the {@link Throwable#getCause()} method,
* as well as the aforementioned "legacy method."
*/
public class PrinterIOException extends PrinterException {
static final long serialVersionUID = 5850870712125932846L;
/**
* The IO error that terminated the print job.
*
* @serial
*/
private IOException mException;
/**
* Constructs a new <code>PrinterIOException</code>
* with the string representation of the specified
* {@link IOException}.
*
* @param exception the specified <code>IOException</code>
*/
public PrinterIOException(IOException exception) {
initCause(null); // Disallow subsequent initCause
mException = exception;
}
/**
* Returns the <code>IOException</code> that terminated
* the print job.
*
* <p>This method predates the general-purpose exception chaining facility.
* The {@link Throwable#getCause()} method is now the preferred means of
* obtaining this information.
*
* @return the <code>IOException</code> that terminated the print job.
* @see IOException
*/
public IOException getIOException() {
return mException;
}
/**
* Returns the the cause of this exception (the <code>IOException</code>
* that terminated the print job).
*
* @return the cause of this exception.
* @since 1.4
*/
public Throwable getCause() {
return mException;
}
}
|
[
"yueny09@163.com"
] |
yueny09@163.com
|
7572c6de443d9b6d8b66a0aeb77f7f0d47a1144a
|
938235c7f8a0e6ce57d9c053c129a05fa82dd60a
|
/SourceCode/ch8_2/src/main/java/com/wisely/support/CustomRepositoryFactoryBean.java
|
1f449c4071770c59db32fa04be79787a01a7f096
|
[] |
no_license
|
CoderDream/SpringBootInAction
|
53d23421b343862a35fd29f6d4ecee957880f7a2
|
ce4d8a21797d45305e38c7b671eab1368c149c87
|
refs/heads/master
| 2021-01-22T20:55:06.097187
| 2017-06-16T09:50:30
| 2017-06-16T09:50:30
| 85,377,103
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,562
|
java
|
package com.wisely.support;
import java.io.Serializable;
import javax.persistence.EntityManager;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.support.JpaRepositoryFactory;
import org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean;
import org.springframework.data.jpa.repository.support.SimpleJpaRepository;
import org.springframework.data.repository.core.RepositoryInformation;
import org.springframework.data.repository.core.RepositoryMetadata;
import org.springframework.data.repository.core.support.RepositoryFactorySupport;
public class CustomRepositoryFactoryBean<T extends JpaRepository<S, ID>, S, ID extends Serializable>
extends JpaRepositoryFactoryBean<T, S, ID> {// 1
@Override
protected RepositoryFactorySupport createRepositoryFactory(EntityManager entityManager) {// 2
return new CustomRepositoryFactory(entityManager);
}
private static class CustomRepositoryFactory extends JpaRepositoryFactory {// 3
public CustomRepositoryFactory(EntityManager entityManager) {
super(entityManager);
}
@Override
@SuppressWarnings({"unchecked"})
protected <T, ID extends Serializable> SimpleJpaRepository<?, ?> getTargetRepository(
RepositoryInformation information, EntityManager entityManager) {// 4
return new CustomRepositoryImpl<T, ID>((Class<T>) information.getDomainType(), entityManager);
}
@Override
protected Class<?> getRepositoryBaseClass(RepositoryMetadata metadata) {// 5
return CustomRepositoryImpl.class;
}
}
}
|
[
"coderdream@gmail.com"
] |
coderdream@gmail.com
|
825da8a599f275100eb48004961f6ff46f72d1c9
|
e75be673baeeddee986ece49ef6e1c718a8e7a5d
|
/submissions/blizzard/Corpus/eclipse.pde.ui/2030.java
|
a78327a60302fefef17f6876c0e790447f0d921f
|
[
"MIT"
] |
permissive
|
zhendong2050/fse18
|
edbea132be9122b57e272a20c20fae2bb949e63e
|
f0f016140489961c9e3c2e837577f698c2d4cf44
|
refs/heads/master
| 2020-12-21T11:31:53.800358
| 2018-07-23T10:10:57
| 2018-07-23T10:10:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,735
|
java
|
/*******************************************************************************
* Copyright (c) 2007, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.pde.api.tools.internal.provisional.descriptors;
/**
* Description of a package.
* <p>
* A package has no parent.
* </p>
*
* @since 1.0.0
*/
public interface IPackageDescriptor extends IElementDescriptor {
/**
* Returns this package's name. Package names are dot qualified.
*
* @return package name
*/
public String getName();
/**
* Returns a descriptor for a type in this package with the given name. The
* given name is not package qualified. Inner types are '$'-separated.
*
* @param typeQualifiedName type qualified name
* @return type descriptor
*/
public IReferenceTypeDescriptor getType(String typeQualifiedName);
/**
* Returns a descriptor for a type in this package with the given name. The
* given name is not package qualified. Inner types are '$'-separated.
* <p>
* Extra type signature information may be provided for generic types.
* </p>
*
* @param typeQualifiedName type qualified name
* @param signature type signature information or <code>null</code>
* @return type descriptor
*/
public IReferenceTypeDescriptor getType(String typeQualifiedName, String signature);
}
|
[
"tim.menzies@gmail.com"
] |
tim.menzies@gmail.com
|
10d372570a019b806cb9db2be8d2b9803196e3ec
|
beedb93c7b177d648ddc6d7ca0d7831bd6d7b51b
|
/src/main/java/com/trizzylab/oemsadmin/domain/PersistentAuditEvent.java
|
c5e87a28924ea7719c80e8b0488df6dada04c451
|
[] |
no_license
|
zakizainon/jhipster-oemsadmin
|
6c027e7ef401dd42894a6b28e8fdfd2bea63b8fe
|
41fd1ae50a4e4f466e8676009bfa6654f24ed240
|
refs/heads/main
| 2023-02-04T03:50:15.199255
| 2020-12-25T08:25:56
| 2020-12-25T08:25:56
| 324,321,367
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,539
|
java
|
package com.trizzylab.oemsadmin.domain;
import java.io.Serializable;
import java.time.Instant;
import java.util.HashMap;
import java.util.Map;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
/**
* Persist AuditEvent managed by the Spring Boot actuator.
*
* @see org.springframework.boot.actuate.audit.AuditEvent
*/
@Entity
@Table(name = "jhi_persistent_audit_event")
public class PersistentAuditEvent implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "event_id")
private Long id;
@NotNull
@Column(nullable = false)
private String principal;
@Column(name = "event_date")
private Instant auditEventDate;
@Column(name = "event_type")
private String auditEventType;
@ElementCollection
@MapKeyColumn(name = "name")
@Column(name = "value")
@CollectionTable(name = "jhi_persistent_audit_evt_data", joinColumns = @JoinColumn(name = "event_id"))
private Map<String, String> data = new HashMap<>();
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getPrincipal() {
return principal;
}
public void setPrincipal(String principal) {
this.principal = principal;
}
public Instant getAuditEventDate() {
return auditEventDate;
}
public void setAuditEventDate(Instant auditEventDate) {
this.auditEventDate = auditEventDate;
}
public String getAuditEventType() {
return auditEventType;
}
public void setAuditEventType(String auditEventType) {
this.auditEventType = auditEventType;
}
public Map<String, String> getData() {
return data;
}
public void setData(Map<String, String> data) {
this.data = data;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof PersistentAuditEvent)) {
return false;
}
return id != null && id.equals(((PersistentAuditEvent) o).id);
}
@Override
public int hashCode() {
return 31;
}
// prettier-ignore
@Override
public String toString() {
return "PersistentAuditEvent{" +
"principal='" + principal + '\'' +
", auditEventDate=" + auditEventDate +
", auditEventType='" + auditEventType + '\'' +
'}';
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
debd2bb8e75f699fab55a786ecfc71509018c94e
|
f05bde6d5bdee3e9a07e34af1ce18259919dd9bd
|
/lang_interface/java/com/intel/daal/algorithms/neural_networks/layers/maximum_pooling2d/ForwardInput.java
|
dfec08b0e77efc972d929ea42ea32fbc458616fb
|
[
"Intel",
"Apache-2.0"
] |
permissive
|
HFTrader/daal
|
f827c83b75cf5884ecfb6249a664ce6f091bfc57
|
b18624d2202a29548008711ec2abc93d017bd605
|
refs/heads/daal_2017_beta
| 2020-12-28T19:08:39.038346
| 2016-04-15T17:02:24
| 2016-04-15T17:02:24
| 56,404,044
| 0
| 1
| null | 2016-04-16T20:26:14
| 2016-04-16T20:26:14
| null |
UTF-8
|
Java
| false
| false
| 1,374
|
java
|
/* file: ForwardInput.java */
/*******************************************************************************
* Copyright 2014-2016 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
package com.intel.daal.algorithms.neural_networks.layers.maximum_pooling2d;
import com.intel.daal.services.DaalContext;
/**
* <a name="DAAL-CLASS-ALGORITHMS__NEURAL_NETWORKS__LAYERS__MAXIMUM_POOLING2D__FORWARDINPUT"></a>
* @brief %Input object for the forward two-dimensional maximum pooling layer
*/
public class ForwardInput extends com.intel.daal.algorithms.neural_networks.layers.pooling2d.ForwardInput {
/** @private */
static {
System.loadLibrary("JavaAPI");
}
public ForwardInput(DaalContext context, long cObject) {
super(context, cObject);
}
}
|
[
"vasily.rubtsov@intel.com"
] |
vasily.rubtsov@intel.com
|
e19c7fcc45b8f15685ca7e981413cd3803fd780f
|
f7196f6100bd88b22a1d6b3dc23f4e597e2db4f5
|
/eshop-cache-ha/src/test/java/com/chenshun/eshopcacheha/controller/CacheControllerTest.java
|
0e7545bd9c5bdb7d1a0511dff37ffa94d3ef74e7
|
[] |
no_license
|
chenshun131/eshop-ha
|
90d62fa50e471c236e3c90399b690cbd8bd95bb9
|
5aaf3ddefde1af9ecb9e24ab33610522992ce403
|
refs/heads/master
| 2020-03-18T02:55:12.580393
| 2018-05-24T09:48:07
| 2018-05-24T09:48:07
| 134,213,719
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 880
|
java
|
package com.chenshun.eshopcacheha.controller;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
/**
* User: mew <p />
* Time: 18/5/21 15:29 <p />
* Version: V1.0 <p />
* Description: <p />
*/
@RunWith(SpringRunner.class)
@SpringBootTest
public class CacheControllerTest {
private MockMvc mvc;
@Autowired
private CacheController cacheController;
@Before
public void init() {
this.mvc = MockMvcBuilders.standaloneSetup(cacheController).build();
}
@Test
public void changeProduct() {
}
}
|
[
"1539831174@qq.com"
] |
1539831174@qq.com
|
3780d85561a60bf75579ee3ba2a7bf88b16a05c9
|
14956dbed8ae4fba1d65b9829d9405fcf43ac698
|
/Cyber Security/Capture the Flag Competitions/2020/Houseplant CTF 2020/Reversing/RTCP Trivia/client_source_from_JADX/sources/p000/C0345fn.java
|
6dac80fcad5634cd814f3f87c3629f937bce209d
|
[] |
no_license
|
Hackin7/Programming-Crappy-Solutions
|
ae8bbddad92a48cf70976cec91bf66234c9b4d39
|
ffa3b3c26a6a06446cc49c8ac4f35b6d30b1ee0f
|
refs/heads/master
| 2023-03-21T01:21:00.764957
| 2022-12-28T14:22:33
| 2022-12-28T14:22:33
| 201,292,128
| 12
| 7
| null | 2023-03-05T16:05:34
| 2019-08-08T16:00:21
|
Roff
|
UTF-8
|
Java
| false
| false
| 5,895
|
java
|
package p000;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.content.res.Resources.Theme;
import android.graphics.PorterDuff.Mode;
import android.graphics.drawable.Drawable;
import android.os.Build.VERSION;
import android.util.AttributeSet;
import android.util.Log;
import java.lang.reflect.Method;
import org.xmlpull.v1.XmlPullParser;
/* renamed from: fn */
public final class C0345fn {
/* renamed from: a */
private static Method f1634a;
/* renamed from: b */
private static boolean f1635b;
/* renamed from: c */
private static Method f1636c;
/* renamed from: d */
private static boolean f1637d;
/* renamed from: a */
public static void m1144a(Drawable drawable, float f, float f2) {
if (VERSION.SDK_INT >= 21) {
drawable.setHotspot(f, f2);
}
}
/* renamed from: a */
public static void m1145a(Drawable drawable, int i) {
if (VERSION.SDK_INT >= 21) {
drawable.setTint(i);
return;
}
if (drawable instanceof C0346fo) {
((C0346fo) drawable).setTint(i);
}
}
/* renamed from: a */
public static void m1146a(Drawable drawable, int i, int i2, int i3, int i4) {
if (VERSION.SDK_INT >= 21) {
drawable.setHotspotBounds(i, i2, i3, i4);
}
}
/* renamed from: a */
public static void m1147a(Drawable drawable, ColorStateList colorStateList) {
if (VERSION.SDK_INT >= 21) {
drawable.setTintList(colorStateList);
return;
}
if (drawable instanceof C0346fo) {
((C0346fo) drawable).setTintList(colorStateList);
}
}
/* renamed from: a */
public static void m1148a(Drawable drawable, Theme theme) {
if (VERSION.SDK_INT >= 21) {
drawable.applyTheme(theme);
}
}
/* renamed from: a */
public static void m1149a(Drawable drawable, Resources resources, XmlPullParser xmlPullParser, AttributeSet attributeSet, Theme theme) {
if (VERSION.SDK_INT >= 21) {
drawable.inflate(resources, xmlPullParser, attributeSet, theme);
} else {
drawable.inflate(resources, xmlPullParser, attributeSet);
}
}
/* renamed from: a */
public static void m1150a(Drawable drawable, Mode mode) {
if (VERSION.SDK_INT >= 21) {
drawable.setTintMode(mode);
return;
}
if (drawable instanceof C0346fo) {
((C0346fo) drawable).setTintMode(mode);
}
}
/* renamed from: a */
public static void m1151a(Drawable drawable, boolean z) {
if (VERSION.SDK_INT >= 19) {
drawable.setAutoMirrored(z);
}
}
/* renamed from: a */
public static boolean m1152a(Drawable drawable) {
if (VERSION.SDK_INT >= 19) {
return drawable.isAutoMirrored();
}
return false;
}
/* renamed from: b */
public static int m1153b(Drawable drawable) {
if (VERSION.SDK_INT >= 19) {
return drawable.getAlpha();
}
return 0;
}
/* renamed from: b */
public static boolean m1154b(Drawable drawable, int i) {
if (VERSION.SDK_INT >= 23) {
return drawable.setLayoutDirection(i);
}
if (VERSION.SDK_INT >= 17) {
if (!f1635b) {
try {
Method declaredMethod = Drawable.class.getDeclaredMethod("setLayoutDirection", new Class[]{Integer.TYPE});
f1634a = declaredMethod;
declaredMethod.setAccessible(true);
} catch (NoSuchMethodException e) {
Log.i("DrawableCompat", "Failed to retrieve setLayoutDirection(int) method", e);
}
f1635b = true;
}
if (f1634a != null) {
try {
f1634a.invoke(drawable, new Object[]{Integer.valueOf(i)});
return true;
} catch (Exception e2) {
Log.i("DrawableCompat", "Failed to invoke setLayoutDirection(int) via reflection", e2);
f1634a = null;
}
}
}
return false;
}
/* renamed from: c */
public static boolean m1155c(Drawable drawable) {
if (VERSION.SDK_INT >= 21) {
return drawable.canApplyTheme();
}
return false;
}
/* renamed from: d */
public static Drawable m1156d(Drawable drawable) {
return VERSION.SDK_INT >= 23 ? drawable : VERSION.SDK_INT >= 21 ? !(drawable instanceof C0346fo) ? new C0351fr(drawable) : drawable : !(drawable instanceof C0346fo) ? new C0348fq(drawable) : drawable;
}
/* renamed from: e */
public static int m1157e(Drawable drawable) {
if (VERSION.SDK_INT >= 23) {
return drawable.getLayoutDirection();
}
if (VERSION.SDK_INT >= 17) {
if (!f1637d) {
try {
Method declaredMethod = Drawable.class.getDeclaredMethod("getLayoutDirection", new Class[0]);
f1636c = declaredMethod;
declaredMethod.setAccessible(true);
} catch (NoSuchMethodException e) {
Log.i("DrawableCompat", "Failed to retrieve getLayoutDirection() method", e);
}
f1637d = true;
}
if (f1636c != null) {
try {
return ((Integer) f1636c.invoke(drawable, new Object[0])).intValue();
} catch (Exception e2) {
Log.i("DrawableCompat", "Failed to invoke getLayoutDirection() via reflection", e2);
f1636c = null;
}
}
}
return 0;
}
}
|
[
"zunmun@gmail.com"
] |
zunmun@gmail.com
|
2cf10b2b4c87a29930490129d05867514f4f1def
|
9de053c703eec59eb3d2e786fec40a124dfc04fe
|
/app/src/main/java/com/zwstudio/logicpuzzlesandroid/puzzles/nurikabe/domain/NurikabeHintObject.java
|
cb0479abe0783e7bb5e6764525b33c773bff05f7
|
[] |
no_license
|
iamrahulyadav/LogicPuzzlesAndroid
|
a288fda6384b6527cc403619476aaff4fb6aed0b
|
ce88371561e1dd89b1360c6d98efbe7ec75baf10
|
refs/heads/master
| 2020-03-27T18:39:02.133516
| 2018-08-23T15:56:25
| 2018-08-23T15:56:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 300
|
java
|
package com.zwstudio.logicpuzzlesandroid.puzzles.nurikabe.domain;
import com.zwstudio.logicpuzzlesandroid.home.domain.HintState;
public class NurikabeHintObject extends NurikabeObject {
public HintState state = HintState.Normal;
public String objAsString() {
return "hint";
}
}
|
[
"zwvista@msn.com"
] |
zwvista@msn.com
|
f33c43d87855d701c225b22b48a023cb2d8032e7
|
718a8498e6da032fcdd976691ad07fb646bd9703
|
/test_5.29/src/Review5_20/ThreadDemo19.java
|
c77aec069bbcb6c05268ad6a2058bd1e9fc6ee97
|
[] |
no_license
|
Nineodes19/happy-end
|
716cb8026e5e9d1175ac068fdd866852a97f9494
|
07ec40c587f5247cd8e59e259c1c9dc14d1c488e
|
refs/heads/master
| 2022-07-13T05:53:10.808060
| 2020-10-24T15:18:36
| 2020-10-24T15:18:36
| 217,953,407
| 0
| 0
| null | 2022-06-21T04:03:12
| 2019-10-28T02:47:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,416
|
java
|
package Review5_20;
/**
* @program:test_5.29
* @author:Nine_odes
* @description:
* @create:2020-05-29 22:32
**/
import com.sun.jnlp.PersistenceServiceNSBImpl;
/**
* 单例模式要求:某个类的实例,。在一个程序中只能存在一个,不能存在多个
* 当代码中不小心针对这个不该实例化多次的类进行多次实例化时,编译器就会做出
* 一些对应的检查/限制
*/
public class ThreadDemo19 {
static class Singleton{
private static Singleton instance = new Singleton();
//把构造方法设为私有,此时这个类无法在类外被实例化
private Singleton(){
}
public static Singleton getInstance(){
return instance;
}
}
public static void main(String[] args) {
//具体用法
//要想获取到Singleton实力,必须通过getInstance获取,不能new
Singleton singleton = Singleton.getInstance();
Singleton singleton1 = Singleton.getInstance();
Singleton singleton2 = Singleton.getInstance();
//getInstance得到的类内部的静态成员
//静态成员是和类相关的(在类对象中),每个类只有一个类对象
//此时每次调用getInstance得到的实力其实是同一个
System.out.println(singleton == singleton2);
System.out.println(singleton == singleton1);
}
}
|
[
"3100863513@qq.com"
] |
3100863513@qq.com
|
6fd7a44631d3f85b437af0382d103c49654cd430
|
a5d01febfd8d45a61f815b6f5ed447e25fad4959
|
/Source Code/5.5.1/sources/com/iqoption/d/vr.java
|
af5a4480ec57362cb9f73d12d55c1005d7ec69aa
|
[] |
no_license
|
kkagill/Decompiler-IQ-Option
|
7fe5911f90ed2490687f5d216cb2940f07b57194
|
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
|
refs/heads/master
| 2020-09-14T20:44:49.115289
| 2019-11-04T06:58:55
| 2019-11-04T06:58:55
| 223,236,327
| 1
| 0
| null | 2019-11-21T18:17:17
| 2019-11-21T18:17:16
| null |
UTF-8
|
Java
| false
| false
| 1,014
|
java
|
package com.iqoption.d;
import android.databinding.DataBindingComponent;
import android.databinding.ViewDataBinding;
import android.support.annotation.NonNull;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
/* compiled from: IndicatorTitleItemBinding */
public abstract class vr extends ViewDataBinding {
@NonNull
public final TextView agA;
@NonNull
public final LinearLayout avm;
@NonNull
public final ImageView bIo;
@NonNull
public final ImageView bIp;
@NonNull
public final ImageView bmu;
protected vr(DataBindingComponent dataBindingComponent, View view, int i, ImageView imageView, ImageView imageView2, LinearLayout linearLayout, ImageView imageView3, TextView textView) {
super(dataBindingComponent, view, i);
this.bIo = imageView;
this.bIp = imageView2;
this.avm = linearLayout;
this.bmu = imageView3;
this.agA = textView;
}
}
|
[
"yihsun1992@gmail.com"
] |
yihsun1992@gmail.com
|
18832cc21afd6c061058cf670ab9d6430003a1ba
|
b9a58c607ff4344de822c98ad693581eef1e1db6
|
/src/Utils/JDBCUtil.java
|
f710ea00dc743bcc2a3214da3b197b4d48270108
|
[] |
no_license
|
huohehuo/LinServer
|
f6080619049ea81d1ca46f504eb7a18470915886
|
0a1b416d66bafa1150aba7417d1873a2d73683a6
|
refs/heads/master
| 2023-01-19T07:51:31.830278
| 2020-11-24T16:23:12
| 2020-11-24T16:23:12
| 267,913,675
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,520
|
java
|
package Utils;
import WebSide.Utils.FileControl;
import WebSide.Utils.Info;
import java.sql.*;
public class JDBCUtil {
public static Connection getConn(String url,String password,String user) throws SQLException, ClassNotFoundException{
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
return DriverManager.getConnection(url, user, password);
}
public static Connection getSQLiteConn() throws ClassNotFoundException, SQLException{
Class.forName("org.sqlite.JDBC");
Connection conn = DriverManager.getConnection("jdbc:sqlite://c:/properties/dbsetfile.db");
return conn;
}
public static Connection getSQLiteConn1() throws ClassNotFoundException, SQLException{
Class.forName("org.sqlite.JDBC");
Connection conn = DriverManager.getConnection("jdbc:sqlite://c:/properties/dbother.db");
return conn;
}
public static Connection getSQLite4Company() throws ClassNotFoundException, SQLException{
Class.forName("org.sqlite.JDBC");
Connection conn = DriverManager.getConnection("jdbc:sqlite://c:/properties/dbCompany.db");
return conn;
}
public static Connection getSQLite4Company4WC() throws ClassNotFoundException, SQLException{
Class.forName("org.sqlite.JDBC");
Connection conn = DriverManager.getConnection("jdbc:sqlite://c:/properties/dbWeChatTest.db");
return conn;
}
public static Connection getSQLite4Statistical() throws ClassNotFoundException, SQLException{
Class.forName("org.sqlite.JDBC");
Connection conn = DriverManager.getConnection("jdbc:sqlite://c:/properties/dbStatistical.db");
return conn;
}
public static Connection getSQLite4UserControl() throws ClassNotFoundException, SQLException{
Class.forName("org.sqlite.JDBC");
Connection conn = DriverManager.getConnection("jdbc:sqlite://c:/properties/dbUserControl.db");
return conn;
}
//获取时间表的时间
public static Connection getSQLiteForTime() throws ClassNotFoundException, SQLException{
Class.forName("org.sqlite.JDBC");
Connection conn = DriverManager.getConnection("jdbc:sqlite://c:/properties/dbManager.db");
return conn;
}
public static Connection getSQLiteForFeedBack() throws ClassNotFoundException, SQLException{
Class.forName("org.sqlite.JDBC");
Connection conn = DriverManager.getConnection("jdbc:sqlite://c:/properties/dbWebFeedBack.db");
return conn;
}
public static Connection getUserDbConn(String dbname) throws ClassNotFoundException, SQLException{
Class.forName("org.sqlite.JDBC");
Connection conn = DriverManager.getConnection("jdbc:sqlite://c:/properties/dbUser.db");
return conn;
}
public static Connection getMqttUserDbConn(String dbname) throws ClassNotFoundException, SQLException{
Class.forName("org.sqlite.JDBC");
Connection conn = DriverManager.getConnection("jdbc:sqlite://c:/properties/dbMqttUser.db");
return conn;
}
public static Connection getUserDataConn(String dbname) throws ClassNotFoundException, SQLException{
Class.forName("org.sqlite.JDBC");
try {
//当指定文件不存在时,定位到基础db文件,避免生成0kb的程序影响后续操作
if (!FileControl.hasFile(Info.copyUserDataFile(dbname))){
Connection conn = DriverManager.getConnection("jdbc:sqlite://c:/properties/app/dbUserData.db");
return conn;
}
} catch (Exception e) {
Lg.e("文件或数据处理出错....");
}
Connection conn = DriverManager.getConnection("jdbc:sqlite://c:/properties/app/dbUserData"+dbname+".db");
return conn;
}
public static Connection getTestDbConn() throws ClassNotFoundException, SQLException{
Class.forName("org.sqlite.JDBC");
Connection conn = DriverManager.getConnection("jdbc:sqlite://c:/properties/dbTest.db");
return conn;
}
// public static Connection getUserDbConn(String dbname) throws ClassNotFoundException, SQLException{
// Class.forName("org.sqlite.JDBC");
// Connection conn = DriverManager.getConnection("jdbc:sqlite://c:/properties/web/dbWebAppBase"+dbname+".db");
// return conn;
// }
public static void close(ResultSet rs,PreparedStatement sta,Connection connection){
if(rs!=null){
try {
rs.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
if(sta!=null){
try {
sta.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
if(connection!=null){
try {
connection.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
|
[
"753392431@qq.com"
] |
753392431@qq.com
|
9f8853c42953cea4dc89d5e452b9a254ff7f0157
|
ad64a14fac1f0d740ccf74a59aba8d2b4e85298c
|
/linkwee-supermarket/src/main/java/com/linkwee/api/response/cim/CimUnrecordInvestListResponse.java
|
0325415d6bf4af895e2893dcb16432ac95759c4f
|
[] |
no_license
|
zhangjiayin/supermarket
|
f7715aa3fdd2bf202a29c8683bc9322b06429b63
|
6c37c7041b5e1e32152e80564e7ea4aff7128097
|
refs/heads/master
| 2020-06-10T16:57:09.556486
| 2018-10-30T07:03:15
| 2018-10-30T07:03:15
| 193,682,975
| 0
| 1
| null | 2019-06-25T10:03:03
| 2019-06-25T10:03:03
| null |
UTF-8
|
Java
| false
| false
| 4,575
|
java
|
package com.linkwee.api.response.cim;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.linkwee.core.util.DateUtils;
import com.linkwee.web.model.cim.CimUnrecordInvestListResp;
import com.linkwee.xoss.util.WebUtil;
/**
*
* @描述: 实体Bean
*
* @创建人: chenjl
*
* @创建时间:2018年01月29日 17:10:52
*
* Copyright (c) 深圳领会科技有限公司-版权所有
*/
public class CimUnrecordInvestListResponse implements Serializable
{
private static final long serialVersionUID = 1L;
public CimUnrecordInvestListResponse() {
}
public CimUnrecordInvestListResponse(CimUnrecordInvestListResp obj) {
WebUtil.initObj(this, obj);
this.id = obj.getId();
this.platfromName = obj.getPlatfromName();
this.platfromIco = obj.getPlatfromIco();
this.investAmt = obj.getInvestAmt();
this.status = obj.getStatus();
this.productDeadLine = obj.getProductDeadLine();
this.feeAmt = obj.getFeeAmt();
this.investTime = obj.getInvestTime();
this.recordTime = obj.getRecordTime();
this.shareStatus = obj.getShareStatus();
this.updateTime = obj.getUpdateTime();
this.payStatus = obj.getPayStatus();
this.payTime = obj.getPayTime();
this.feeStrategy = obj.getFeeStrategy();
this.repaymentTime = obj.getRepaymentTime();
}
private String payStatus;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
private Date payTime;
private String platfromName;//平台名称
private String platfromIco;//平台logo
private String investAmt;//投资金额
private String status;//报单状态
private String productDeadLine;//产品期限
private String feeAmt;//返现金额
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
private Date investTime;//投资时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
private Date recordTime;//报单时间
private String shareStatus;//报单状态:0=未晒单|1=已晒单
private String id;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
private Date updateTime;
private String feeStrategy;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
private Date repaymentTime;
public String getFeeStrategy() {
return feeStrategy;
}
public void setFeeStrategy(String feeStrategy) {
this.feeStrategy = feeStrategy;
}
public String getPayStatus() {
return payStatus;
}
public void setPayStatus(String payStatus) {
this.payStatus = payStatus;
}
public Date getPayTime() {
return payTime;
}
public void setPayTime(Date payTime) {
this.payTime = payTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getShareStatus() {
return shareStatus;
}
public void setShareStatus(String shareStatus) {
this.shareStatus = shareStatus;
}
public String getPlatfromName() {
return platfromName;
}
public void setPlatfromName(String platfromName) {
this.platfromName = platfromName;
}
public String getPlatfromIco() {
return platfromIco;
}
public void setPlatfromIco(String platfromIco) {
this.platfromIco = platfromIco;
}
public String getInvestAmt() {
return investAmt;
}
public void setInvestAmt(String investAmt) {
this.investAmt = investAmt;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getProductDeadLine() {
return productDeadLine;
}
public void setProductDeadLine(String productDeadLine) {
this.productDeadLine = productDeadLine;
}
public String getFeeAmt() {
return feeAmt;
}
public void setFeeAmt(String feeAmt) {
this.feeAmt = feeAmt;
}
public Date getInvestTime() {
return investTime;
}
public void setInvestTime(Date investTime) {
this.investTime = investTime;
}
public Date getRecordTime() {
return recordTime;
}
public void setRecordTime(Date recordTime) {
this.recordTime = recordTime;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
public Date getRepaymentTime() {
return repaymentTime;
}
public void setRepaymentTime(Date repaymentTime) {
this.repaymentTime = repaymentTime;
}
}
|
[
"liqimoon@qq.com"
] |
liqimoon@qq.com
|
0ab65b98a7b77e1db3a168af2989376234d55ed3
|
af7b8bbe77461e59f32ba746f4bb055620a5c110
|
/zookeeper/src/test/java/com/hz/yk/zk/jute/JuteTests.java
|
9125a27225de0a2f9b7bdaf382430cd53f8b7eb4
|
[] |
no_license
|
ykdsg/MyJavaProject
|
3e51564a3fb57ab4ae043c9112e1936ccc179dd5
|
a7d88aee2f58698aed7d497c2cf6e23a605ebb59
|
refs/heads/master
| 2023-06-26T02:23:33.812330
| 2023-06-12T11:28:23
| 2023-06-12T11:28:23
| 1,435,034
| 4
| 6
| null | 2022-12-01T15:21:01
| 2011-03-03T13:30:03
|
Java
|
UTF-8
|
Java
| false
| false
| 3,510
|
java
|
package com.hz.yk.zk.jute;
import com.google.common.base.MoreObjects;
import org.apache.jute.BinaryInputArchive;
import org.apache.jute.BinaryOutputArchive;
import org.apache.jute.Index;
import org.apache.jute.InputArchive;
import org.apache.jute.OutputArchive;
import org.apache.jute.Record;
import org.junit.jupiter.api.Test;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.TreeMap;
/**
* @author wuzheng.yk
* @date 2021/5/24
*/
public class JuteTests {
private String pathname = "jute-data";
@Test
public void testSerDe() throws Exception {
Files.deleteIfExists(Paths.get(pathname));
serialize();
deserialize();
}
private void serialize() throws Exception {
try (OutputStream os = new FileOutputStream(new File(pathname));) {
BinaryOutputArchive oa = BinaryOutputArchive.getArchive(os);
// Primitive types
oa.writeBool(true, "boolean");
oa.writeInt(1024, "int");
oa.writeString("yao", "string");
// Records
Student xiaoMing = new Student(2, "xiaoMing");
oa.writeRecord(xiaoMing, "xiaoMing");
// TreeMap
TreeMap<String, Integer> map = new TreeMap<>();
map.put("one", 1);
map.put("two", 2);
oa.startMap(map, "map");
int i = 1;
for (String key : map.keySet()) {
String tag = i + "";
oa.writeString(key, tag);
oa.writeInt(map.get(key), tag);
i++;
}
oa.endMap(map, "map");
}
}
private void deserialize() throws Exception {
try (FileInputStream is = new FileInputStream(new File(pathname));) {
BinaryInputArchive ia = BinaryInputArchive.getArchive(is);
System.out.printf("boolean: %b\n", ia.readBool("boolean"));
System.out.printf("int: %d\n", ia.readInt("int"));
System.out.printf("string: %s\n", ia.readString("string"));
Student xiaoMing = new Student();
ia.readRecord(xiaoMing, "xiaoMing");
System.out.printf("xiaoMing: %s\n", xiaoMing);
Index index = ia.startMap("map");
int i = 1;
while (!index.done()) {
String tag = i + "";
System.out.printf("key: %s, value: %d\n", ia.readString(tag), ia.readInt(tag));
index.incr();
i++;
}
}
}
}
class Student implements Record {
private int grade;
private String name;
public Student() {}
public Student(int grade, String name) {
this.grade = grade;
this.name = name;
}
@Override
public void serialize(OutputArchive oa, String tag) throws IOException {
oa.startRecord(this, tag);
oa.writeInt(grade, "grade");
oa.writeString(name, "name");
oa.endRecord(this, tag);
}
@Override
public void deserialize(InputArchive ia, String tag) throws IOException {
ia.startRecord(tag);
grade = ia.readInt("grade");
name = ia.readString("name");
ia.endRecord(tag);
}
@Override
public String toString() {
return MoreObjects.toStringHelper(this).add("grade", grade).add("name", name).toString();
}
}
|
[
"17173as@163.com"
] |
17173as@163.com
|
f13ad7a3bfac37d5d8f19520904fe218f4064d82
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/15/15_c64a5c3fdbd37417a46f70291fd48c5ef550517e/RavenWeapon/15_c64a5c3fdbd37417a46f70291fd48c5ef550517e_RavenWeapon_s.java
|
226ec41a56ded697953befcc8dfd5962c3b7b202
|
[] |
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
| 3,284
|
java
|
/**
*
*/
package raven.game.armory;
import java.util.List;
import raven.game.RavenBot;
import raven.game.RavenObject;
import raven.goals.fuzzy.FuzzyModule;
import raven.math.Vector2D;
/**
* @author chester
*
*/
public abstract class RavenWeapon {
private RavenBot owner;
private RavenObject itemType;
private FuzzyModule fuzzyModule;
private int roundsLeft, maxRoundCapacity;
private double rateOfFire, timeNextAvailable, lastDesireabilityScore, idealRange, maxProjectileSpeed;
private List<Vector2D> WeaponVB, WeaponVBTrans;
public RavenWeapon(RavenObject weaponType, int defaultRoundsCount, int maxCapacity,
double RoF, double iRange, double projectileSpd, RavenBot holder)
{
itemType = weaponType;
owner = holder;
roundsLeft = defaultRoundsCount;
maxRoundCapacity = maxCapacity;
rateOfFire = RoF;
timeNextAvailable = System.nanoTime();
idealRange = iRange;
maxProjectileSpeed = projectileSpd;
lastDesireabilityScore = 0;
}
/* OVERRIDES */
/**
* Causes the weapon to shoot at the chosen position. Each weapons overrides this method.
* @param position
*/
public void ShootAt(Vector2D position) {}
/**
* Draws the weapon on the display via GameCanvas static calls. Overridden by each weapon.
*/
public void render() {}
/**
* This overridden method uses fuzzy logic to assign a desireability value to this weapon, based on the distance and the logic
* currently assigned to the weapon.
* @param distanceToTarget
* @return
*/
public double GetDesireability(double distanceToTarget) { return 0; }
/* ACCESSORS */
public final boolean AimAt(Vector2D target) { return owner.rotateFacingTowardPosition(target); }
public double getMaxProjectileSpeed() { return maxProjectileSpeed; }
public int getRoundsRemaining() { return roundsLeft; }
public void decrementRoundsLeft() { if(roundsLeft > 0) --roundsLeft; }
public List<Vector2D> getWeaponVectorBuffer() { return WeaponVB; }
public List<Vector2D> getWeaponVectorTransBuffer() { return WeaponVBTrans; }
public void setWeaponVectorTransBuffer(List<Vector2D> tempBuffer) { WeaponVBTrans = tempBuffer; }
public RavenBot getOwner() { return owner; }
public FuzzyModule getFuzzyModule() { return fuzzyModule; }
public void setLastDesireability(double newDesireability) { lastDesireabilityScore = newDesireability; }
/**
* Adds the specified number of rounds to this weapons' magazine, without exceeding the max capacity.
* @param numberToAdd
*/
public void incrementRounds(int numberToAdd){
roundsLeft += numberToAdd;
if(roundsLeft > maxRoundCapacity) roundsLeft = maxRoundCapacity;
}
public RavenObject getWeaponType() {return itemType; }
public double getIdealRange() { return idealRange; }
public boolean isReadyForNextShot() { return System.nanoTime() > timeNextAvailable; }
public void UpdateTimeWeaponIsNextAvailable() { timeNextAvailable = System.nanoTime() + 1.0/rateOfFire; }
private void InitializeFuzzyModule() {}
public double getLastDesirabilityScore() {
return lastDesireabilityScore;
}
public int getMaxRounds()
{
return maxRoundCapacity;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
8837de25ef6af6f29559947f770535d118d13f7f
|
b4e0e50e467ee914b514a4f612fde6acc9a82ba7
|
/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ResultScanner.java
|
aad84034e1b2b0a7eb90800348ff7ffd39eb01d2
|
[
"Apache-2.0",
"CPL-1.0",
"MPL-1.0"
] |
permissive
|
tenggyut/HIndex
|
5054b13118c3540d280d654cfa45ed6e3edcd4c6
|
e0706e1fe48352e65f9f22d1f80038f4362516bb
|
refs/heads/master
| 2021-01-10T02:58:08.439962
| 2016-03-10T01:15:18
| 2016-03-10T01:15:18
| 44,219,351
| 3
| 4
|
Apache-2.0
| 2023-03-20T11:47:22
| 2015-10-14T02:34:53
|
Java
|
UTF-8
|
Java
| false
| false
| 1,775
|
java
|
/**
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hbase.client;
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
import java.io.Closeable;
import java.io.IOException;
/**
* Interface for client-side scanning.
* Go to {@link HTable} to obtain instances.
*/
@InterfaceAudience.Public
@InterfaceStability.Stable
public interface ResultScanner extends Closeable, Iterable<Result> {
/**
* Grab the next row's worth of values. The scanner will return a Result.
* @return Result object if there is another row, null if the scanner is
* exhausted.
* @throws IOException e
*/
Result next() throws IOException;
/**
* @param nbRows number of rows to return
* @return Between zero and <param>nbRows</param> Results
* @throws IOException e
*/
Result [] next(int nbRows) throws IOException;
/**
* Closes the scanner and releases any resources it has allocated
*/
void close();
}
|
[
"tengyutong0213@gmail.com"
] |
tengyutong0213@gmail.com
|
6dcbba370f1794f63752dd373076653c80163438
|
9e7fc42bf4b38e653e87908c62bcefe61c99ab89
|
/src/test/java/com/brancheview/cpmv/config/WebConfigurerTest.java
|
1d99966bb3e7568693e299ef1c59c979cd6e2d03
|
[] |
no_license
|
BulkSecurityGeneratorProject/cpmv
|
2a5d7c937dbb06aa923201db8fa52e47c1d1b5f1
|
64632432eec7744c34038edcd4dd8e22b4186ccc
|
refs/heads/master
| 2022-12-15T19:24:07.522154
| 2019-08-26T11:11:32
| 2019-08-26T11:11:32
| 296,542,760
| 0
| 0
| null | 2020-09-18T07:11:36
| 2020-09-18T07:11:35
| null |
UTF-8
|
Java
| false
| false
| 7,178
|
java
|
package com.brancheview.cpmv.config;
import io.github.jhipster.config.JHipsterConstants;
import io.github.jhipster.config.JHipsterProperties;
import io.github.jhipster.web.filter.CachingHttpHeadersFilter;
import org.h2.server.web.WebServlet;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory;
import org.springframework.http.HttpHeaders;
import org.springframework.mock.env.MockEnvironment;
import org.springframework.mock.web.MockServletContext;
import org.springframework.test.util.ReflectionTestUtils;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import javax.servlet.*;
import java.io.File;
import java.util.*;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.*;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.options;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
/**
* Unit tests for the {@link WebConfigurer} class.
*/
public class WebConfigurerTest {
private WebConfigurer webConfigurer;
private MockServletContext servletContext;
private MockEnvironment env;
private JHipsterProperties props;
@BeforeEach
public void setup() {
servletContext = spy(new MockServletContext());
doReturn(mock(FilterRegistration.Dynamic.class))
.when(servletContext).addFilter(anyString(), any(Filter.class));
doReturn(mock(ServletRegistration.Dynamic.class))
.when(servletContext).addServlet(anyString(), any(Servlet.class));
env = new MockEnvironment();
props = new JHipsterProperties();
webConfigurer = new WebConfigurer(env, props);
}
@Test
public void testStartUpProdServletContext() throws ServletException {
env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION);
webConfigurer.onStartup(servletContext);
verify(servletContext).addFilter(eq("cachingHttpHeadersFilter"), any(CachingHttpHeadersFilter.class));
verify(servletContext, never()).addServlet(eq("H2Console"), any(WebServlet.class));
}
@Test
public void testStartUpDevServletContext() throws ServletException {
env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT);
webConfigurer.onStartup(servletContext);
verify(servletContext, never()).addFilter(eq("cachingHttpHeadersFilter"), any(CachingHttpHeadersFilter.class));
verify(servletContext).addServlet(eq("H2Console"), any(WebServlet.class));
}
@Test
public void testCustomizeServletContainer() {
env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION);
UndertowServletWebServerFactory container = new UndertowServletWebServerFactory();
webConfigurer.customize(container);
assertThat(container.getMimeMappings().get("abs")).isEqualTo("audio/x-mpeg");
assertThat(container.getMimeMappings().get("html")).isEqualTo("text/html;charset=utf-8");
assertThat(container.getMimeMappings().get("json")).isEqualTo("text/html;charset=utf-8");
if (container.getDocumentRoot() != null) {
assertThat(container.getDocumentRoot()).isEqualTo(new File("target/classes/static/"));
}
}
@Test
public void testCorsFilterOnApiPath() throws Exception {
props.getCors().setAllowedOrigins(Collections.singletonList("*"));
props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE"));
props.getCors().setAllowedHeaders(Collections.singletonList("*"));
props.getCors().setMaxAge(1800L);
props.getCors().setAllowCredentials(true);
MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController())
.addFilters(webConfigurer.corsFilter())
.build();
mockMvc.perform(
options("/api/test-cors")
.header(HttpHeaders.ORIGIN, "other.domain.com")
.header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "POST"))
.andExpect(status().isOk())
.andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com"))
.andExpect(header().string(HttpHeaders.VARY, "Origin"))
.andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS, "GET,POST,PUT,DELETE"))
.andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS, "true"))
.andExpect(header().string(HttpHeaders.ACCESS_CONTROL_MAX_AGE, "1800"));
mockMvc.perform(
get("/api/test-cors")
.header(HttpHeaders.ORIGIN, "other.domain.com"))
.andExpect(status().isOk())
.andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com"));
}
@Test
public void testCorsFilterOnOtherPath() throws Exception {
props.getCors().setAllowedOrigins(Collections.singletonList("*"));
props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE"));
props.getCors().setAllowedHeaders(Collections.singletonList("*"));
props.getCors().setMaxAge(1800L);
props.getCors().setAllowCredentials(true);
MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController())
.addFilters(webConfigurer.corsFilter())
.build();
mockMvc.perform(
get("/test/test-cors")
.header(HttpHeaders.ORIGIN, "other.domain.com"))
.andExpect(status().isOk())
.andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN));
}
@Test
public void testCorsFilterDeactivated() throws Exception {
props.getCors().setAllowedOrigins(null);
MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController())
.addFilters(webConfigurer.corsFilter())
.build();
mockMvc.perform(
get("/api/test-cors")
.header(HttpHeaders.ORIGIN, "other.domain.com"))
.andExpect(status().isOk())
.andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN));
}
@Test
public void testCorsFilterDeactivated2() throws Exception {
props.getCors().setAllowedOrigins(new ArrayList<>());
MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController())
.addFilters(webConfigurer.corsFilter())
.build();
mockMvc.perform(
get("/api/test-cors")
.header(HttpHeaders.ORIGIN, "other.domain.com"))
.andExpect(status().isOk())
.andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN));
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
829c24e99e50c774f7c9298637ec09455ee15977
|
8c53dc77a7c33ef56d2eb2323812d645c8c0b7db
|
/Exams/ExamPrep2/src/main/java/hell/engine/Engine.java
|
264d0e3730d5c07fea3b0f9758fb75aafdec413e
|
[] |
no_license
|
AleksandarBoev/Software-University-Java-OOP-Advanced
|
a68a1305db7fb3ba2d9a24bdad91e86ce298c7d8
|
2c92ab3beb5371ea8d8df78ea79cf493ad18cb19
|
refs/heads/master
| 2020-03-22T15:58:39.173553
| 2018-10-23T19:42:58
| 2018-10-23T19:42:58
| 140,293,524
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 160
|
java
|
package hell.engine;
import java.io.IOException;
public interface Engine {
void run() throws IOException, NoSuchFieldException, IllegalAccessException;
}
|
[
"aleksandarboev95@gmail.com"
] |
aleksandarboev95@gmail.com
|
7e4544dc89b1d2fe306ea78e8f00df50559073d3
|
d3cbb93c650410964e20ca855f723b540b95047e
|
/src/main/java/com/ems/config/CacheConfiguration.java
|
091f2f2dbdb8aaad64d4265199ed0581bb82475e
|
[] |
no_license
|
BulkSecurityGeneratorProject/ems-java
|
a87511b7d8da4bbb692bd604a8e765254b14ed5e
|
0b3f33c31f12250d2eb6431889114ed1f5d44485
|
refs/heads/master
| 2022-12-17T12:45:05.580845
| 2018-04-11T19:30:31
| 2018-04-11T19:30:31
| 296,588,486
| 0
| 0
| null | 2020-09-18T10:24:52
| 2020-09-18T10:24:51
| null |
UTF-8
|
Java
| false
| false
| 2,215
|
java
|
package com.ems.config;
import io.github.jhipster.config.JHipsterProperties;
import org.ehcache.config.builders.CacheConfigurationBuilder;
import org.ehcache.config.builders.ResourcePoolsBuilder;
import org.ehcache.expiry.Duration;
import org.ehcache.expiry.Expirations;
import org.ehcache.jsr107.Eh107Configuration;
import java.util.concurrent.TimeUnit;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.cache.JCacheManagerCustomizer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.*;
@Configuration
@EnableCaching
@AutoConfigureAfter(value = { MetricsConfiguration.class })
@AutoConfigureBefore(value = { WebConfigurer.class, DatabaseConfiguration.class })
public class CacheConfiguration {
private final javax.cache.configuration.Configuration<Object, Object> jcacheConfiguration;
public CacheConfiguration(JHipsterProperties jHipsterProperties) {
JHipsterProperties.Cache.Ehcache ehcache =
jHipsterProperties.getCache().getEhcache();
jcacheConfiguration = Eh107Configuration.fromEhcacheCacheConfiguration(
CacheConfigurationBuilder.newCacheConfigurationBuilder(Object.class, Object.class,
ResourcePoolsBuilder.heap(ehcache.getMaxEntries()))
.withExpiry(Expirations.timeToLiveExpiration(Duration.of(ehcache.getTimeToLiveSeconds(), TimeUnit.SECONDS)))
.build());
}
@Bean
public JCacheManagerCustomizer cacheManagerCustomizer() {
return cm -> {
cm.createCache(com.ems.repository.UserRepository.USERS_BY_LOGIN_CACHE, jcacheConfiguration);
cm.createCache(com.ems.repository.UserRepository.USERS_BY_EMAIL_CACHE, jcacheConfiguration);
cm.createCache(com.ems.domain.User.class.getName(), jcacheConfiguration);
cm.createCache(com.ems.domain.Authority.class.getName(), jcacheConfiguration);
cm.createCache(com.ems.domain.User.class.getName() + ".authorities", jcacheConfiguration);
// jhipster-needle-ehcache-add-entry
};
}
}
|
[
"test@test.com"
] |
test@test.com
|
89c72f650590d1108f572b3e2a027379fbae9333
|
3fd6b0a7d7cc1d1443758e33e59af876b6e5ce2d
|
/mybaits/src/main/java/com/springboot/dao/CityDao.java
|
b6a2d7a2a2f67bf00de06909476f221c21bd1f92
|
[] |
no_license
|
zhouyb126/springboot
|
c68e87b78b17f2aae62fb803d701678e9ff6661b
|
643189a553d4f59066c6731877873c7a22dbb046
|
refs/heads/master
| 2022-08-04T03:00:18.273317
| 2019-08-13T07:54:51
| 2019-08-13T07:54:51
| 202,055,479
| 0
| 0
| null | 2022-06-21T01:39:28
| 2019-08-13T03:19:17
|
Java
|
UTF-8
|
Java
| false
| false
| 374
|
java
|
package com.springboot.dao;
import com.springboot.domain.City;
import org.apache.ibatis.annotations.Param;
/**
* 城市 DAO 接口类
* Created by wanglu-jf on 17/6/27.
*/
public interface CityDao {
/**
* 根据城市名称,查询城市信息
*
* @param cityName 城市名
*/
public City queryByName(@Param("cityName") String cityName);
}
|
[
"password"
] |
password
|
9a0f355695d1a0977fd3516058146c1a93c73a9a
|
9f380a08d00b9713c9cf5f1aa66a9d27e01dab8a
|
/ssserver/src/main/java/com/hellozjf/shadowsocks/ssserver/encryption/CryptUtil.java
|
6eae6fdc8e15c364286212f3297b801b69151638
|
[] |
no_license
|
hellozjf/shadowsocks-java.del
|
9b272a2921bc7337aae4185db78fe3dde8fc7368
|
acb3f7570b7fbc93e01d2819084e61e2dfdc78e6
|
refs/heads/master
| 2021-10-08T08:45:01.577208
| 2018-11-05T05:20:53
| 2018-11-05T05:20:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,088
|
java
|
package com.hellozjf.shadowsocks.ssserver.encryption;
import io.netty.buffer.ByteBuf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
public class CryptUtil {
private static Logger logger = LoggerFactory.getLogger(CryptUtil.class);
public static byte[] encrypt(ICrypt crypt, Object msg) {
byte[] data = null;
ByteArrayOutputStream _remoteOutStream = null;
try {
_remoteOutStream = new ByteArrayOutputStream();
ByteBuf bytebuff = (ByteBuf) msg;
int len = bytebuff.readableBytes();
byte[] arr = new byte[len];
bytebuff.getBytes(0, arr);
crypt.encrypt(arr, arr.length, _remoteOutStream);
data = _remoteOutStream.toByteArray();
} catch (Exception e) {
logger.error("encrypt error", e);
} finally {
if (_remoteOutStream != null) {
try {
_remoteOutStream.close();
} catch (IOException e) {
}
}
}
return data;
}
public static byte[] decrypt(ICrypt crypt, Object msg) {
byte[] data = null;
ByteArrayOutputStream _localOutStream = null;
try {
_localOutStream = new ByteArrayOutputStream();
ByteBuf bytebuff = (ByteBuf) msg;
int len = bytebuff.readableBytes();
byte[] arr = new byte[len];
bytebuff.getBytes(0, arr);
// logger.debug("before:" + Arrays.toString(arr));
crypt.decrypt(arr, arr.length, _localOutStream);
data = _localOutStream.toByteArray();
// logger.debug("after:" + Arrays.toString(data));
} catch (Exception e) {
logger.error("decrypt error", e);
} finally {
if (_localOutStream != null) {
try {
_localOutStream.close();
} catch (IOException e) {
}
}
}
return data;
}
}
|
[
"908686171@qq.com"
] |
908686171@qq.com
|
cf4c71e990b86467b3029ecda8f10bf34c628cfd
|
d0a035af319f5ed43047defc1804980cdf3469aa
|
/azkarra-api/src/main/java/io/streamthoughts/azkarra/api/query/LocalPreparedQuery.java
|
3d7a6acf736cb8934454e6c792b3ff8d863d9316
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
streamthoughts/azkarra-streams
|
43f9d742081818a4349d0a54403255ac4db7ac11
|
a485a42f520f1d86919da4f1ba8d752dac037940
|
refs/heads/master
| 2023-01-05T21:27:15.555160
| 2022-01-04T16:33:45
| 2022-01-06T13:21:22
| 224,235,390
| 186
| 26
|
Apache-2.0
| 2023-01-05T01:50:51
| 2019-11-26T16:18:45
|
HTML
|
UTF-8
|
Java
| false
| false
| 2,942
|
java
|
/*
* Copyright 2019-2020 StreamThoughts.
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.streamthoughts.azkarra.api.query;
import io.streamthoughts.azkarra.api.errors.Error;
import io.streamthoughts.azkarra.api.monad.Validator;
import io.streamthoughts.azkarra.api.query.error.InvalidQueryException;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* A {@code LocalStoreQueryBuilder} is used to build new {@link LocalExecutableQuery}.
*
* @param <K> the expected type for key.
* @param <V> the expected type for value.
*/
public interface LocalPreparedQuery<K, V> {
/**
* Gets a new {@link Validator} for the given parameters.
*
* @param params the query parameters to validate.
* @return the {@link Validator}.
*/
default Validator<QueryParams> validator(final QueryParams params) {
return Validator.of(Objects.requireNonNull(params, "params cannot be null"));
}
/**
* Validates the given query parameters.
*
* @param params the query parameters to validate.
* @return the optional list of errors.
*/
default Optional<List<Error>> validate(final QueryParams params) {
Objects.requireNonNull(params, "parameters cannot be null");
return validator(params)
.toEither()
.right()
.toOptional();
}
/**
* Builds a new {@link LocalExecutableQuery} based on the given {@link Query}.
*
* @param params the parameters of the query.
* @return the new {@link LocalExecutableQuery}.
*/
LocalExecutableQuery<K, V> compile(final QueryParams params) throws InvalidQueryException;
final class MissingRequiredKeyError extends Error {
private final String key;
public static MissingRequiredKeyError of(final String key) {
return new MissingRequiredKeyError(key);
}
MissingRequiredKeyError(final String key) {
super("missing required parameter '" + key + "'.");
this.key = key;
}
public String invalidKey() {
return key;
}
}
}
|
[
"florian.hussonnois@gmail.com"
] |
florian.hussonnois@gmail.com
|
cdbf956c0c098df6bd40534f5e1ac8c5b83a0a1f
|
aca457909ef8c4eb989ba23919de508c490b074a
|
/DialerJADXDecompile/bt.java
|
d3267b168fe877066f87d6bd89407ecd51322978
|
[] |
no_license
|
KHikami/ProjectFiCallingDeciphered
|
bfccc1e1ba5680d32a4337746de4b525f1911969
|
cc92bf6d4cad16559a2ecbc592503d37a182dee3
|
refs/heads/master
| 2021-01-12T17:50:59.643861
| 2016-12-08T01:20:34
| 2016-12-08T01:23:04
| 71,650,754
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,514
|
java
|
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PorterDuff.Mode;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.Drawable.ConstantState;
/* compiled from: PG */
final class bt extends ConstantState {
int a;
bs b;
ColorStateList c;
Mode d;
boolean e;
Bitmap f;
ColorStateList g;
Mode h;
int i;
boolean j;
boolean k;
Paint l;
public bt(bt btVar) {
this.c = null;
this.d = bn.a;
if (btVar != null) {
this.a = btVar.a;
this.b = new bs(btVar.b);
if (btVar.b.b != null) {
this.b.b = new Paint(btVar.b.b);
}
if (btVar.b.a != null) {
this.b.a = new Paint(btVar.b.a);
}
this.c = btVar.c;
this.d = btVar.d;
this.e = btVar.e;
}
}
public final void a(int i, int i2) {
this.f.eraseColor(0);
this.b.a(new Canvas(this.f), i, i2, null);
}
public bt() {
this.c = null;
this.d = bn.a;
this.b = new bs();
}
public final Drawable newDrawable() {
return new bn(this);
}
public final Drawable newDrawable(Resources resources) {
return new bn(this);
}
public final int getChangingConfigurations() {
return this.a;
}
}
|
[
"chu.rachelh@gmail.com"
] |
chu.rachelh@gmail.com
|
75dd19b2a840400dc504e57cd54170827d47e238
|
8bed8c8d545323e1d455f1eb54123545fe089e3c
|
/providers/elasticsearch/shedlock-provider-elasticsearch/src/main/java/net/javacrumbs/shedlock/provider/elasticsearch/ElasticsearchLockProvider.java
|
81ac487c6a9e7d3e97079733931ec8d3052d8aed
|
[
"Apache-2.0"
] |
permissive
|
jesty/ShedLock
|
36edab7ea4bdc9850158cebed727c70b5bee9e2a
|
2e1deb3d71c59451c0e72af6ed6e83a4cbcad567
|
refs/heads/master
| 2020-06-13T02:31:19.803949
| 2019-10-21T09:28:45
| 2019-10-21T09:28:45
| 194,502,347
| 0
| 0
|
Apache-2.0
| 2019-06-30T10:17:48
| 2019-06-30T10:17:48
| null |
UTF-8
|
Java
| false
| false
| 7,087
|
java
|
/**
* Copyright 2009-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.javacrumbs.shedlock.provider.elasticsearch;
import net.javacrumbs.shedlock.core.AbstractSimpleLock;
import net.javacrumbs.shedlock.core.LockConfiguration;
import net.javacrumbs.shedlock.core.LockProvider;
import net.javacrumbs.shedlock.core.SimpleLock;
import net.javacrumbs.shedlock.support.LockException;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.action.DocWriteResponse;
import org.elasticsearch.action.support.WriteRequest;
import org.elasticsearch.action.update.UpdateRequest;
import org.elasticsearch.action.update.UpdateResponse;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.script.Script;
import org.elasticsearch.script.ScriptType;
import java.io.IOException;
import java.time.Instant;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import static net.javacrumbs.shedlock.support.Utils.getHostname;
/**
* Lock using ElasticSearch >= 6.4.0.
* Requires elasticsearch-rest-high-level-client > 6.4.0
* <p>
* It uses a collection that contains documents like this:
* <pre>
* {
* "name" : "lock name",
* "lockUntil" : {
* "type": "date",
* "format": "epoch_millis"
* },
* "lockedAt" : {
* "type": "date",
* "format": "epoch_millis"
* }:
* "lockedBy" : "hostname"
* }
* </pre>
* <p>
* lockedAt and lockedBy are just for troubleshooting and are not read by the code
*
* <ol>
* <li>
* Attempts to insert a new lock record. As an optimization, we keep in-memory track of created lock records. If the record
* has been inserted, returns lock.
* </li>
* <li>
* We will try to update lock record using filter _id == name AND lock_until <= now
* </li>
* <li>
* If the update succeeded (1 updated document), we have the lock. If the update failed (0 updated documents) somebody else holds the lock
* </li>
* <li>
* When unlocking, lock_until is set to now.
* </li>
* </ol>
*/
public class ElasticsearchLockProvider implements LockProvider {
static final String SCHEDLOCK_DEFAULT_INDEX = "shedlock";
static final String SCHEDLOCK_DEFAULT_TYPE = "lock";
static final String LOCK_UNTIL = "lockUntil";
static final String LOCKED_AT = "lockedAt";
static final String LOCKED_BY = "lockedBy";
static final String NAME = "name";
private static final String UPDATE_SCRIPT =
"if (ctx._source." + LOCK_UNTIL + " <= " + "params." + LOCKED_AT + ") { " +
"ctx._source." + LOCKED_BY + " = params." + LOCKED_BY + "; " +
"ctx._source." + LOCKED_AT + " = params." + LOCKED_AT + "; " +
"ctx._source." + LOCK_UNTIL + " = params." + LOCK_UNTIL + "; " +
"} else { " +
"ctx.op = 'none' " +
"}";
private final RestHighLevelClient highLevelClient;
private final String hostname;
private final String index;
private final String type;
private ElasticsearchLockProvider(RestHighLevelClient highLevelClient, String index, String type) {
this.highLevelClient = highLevelClient;
this.hostname = getHostname();
this.index = index;
this.type = type;
}
public ElasticsearchLockProvider(RestHighLevelClient highLevelClient, String documentType) {
this(highLevelClient, SCHEDLOCK_DEFAULT_INDEX, documentType);
}
public ElasticsearchLockProvider(RestHighLevelClient highLevelClient) {
this(highLevelClient, SCHEDLOCK_DEFAULT_INDEX, SCHEDLOCK_DEFAULT_TYPE);
}
@Override
public Optional<SimpleLock> lock(LockConfiguration lockConfiguration) {
try {
Map<String, Object> lockObject = lockObject(lockConfiguration.getName(),
lockConfiguration.getLockAtMostUntil(),
now());
UpdateRequest ur = new UpdateRequest()
.index(index)
.type(type)
.id(lockConfiguration.getName())
.script(new Script(ScriptType.INLINE,
"painless",
UPDATE_SCRIPT,
lockObject)
)
.upsert(lockObject)
.setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE);
UpdateResponse res = highLevelClient.update(ur, RequestOptions.DEFAULT);
if (res.getResult() != DocWriteResponse.Result.NOOP) {
return Optional.of(new ElasticsearchSimpleLock(lockConfiguration));
} else {
return Optional.empty();
}
} catch (IOException | ElasticsearchException e) {
if (e instanceof ElasticsearchException && ((ElasticsearchException) e).status() == RestStatus.CONFLICT) {
return Optional.empty();
} else {
throw new LockException("Unexpected exception occurred", e);
}
}
}
private Instant now() {
return Instant.now();
}
private Map<String, Object> lockObject(String name, Instant lockUntil, Instant lockedAt) {
Map<String, Object> lock = new HashMap<>();
lock.put(NAME, name);
lock.put(LOCKED_BY, hostname);
lock.put(LOCKED_AT, lockedAt.toEpochMilli());
lock.put(LOCK_UNTIL, lockUntil.toEpochMilli());
return lock;
}
private final class ElasticsearchSimpleLock extends AbstractSimpleLock {
private ElasticsearchSimpleLock(LockConfiguration lockConfiguration) {
super(lockConfiguration);
}
@Override
public void doUnlock() {
// Set lockUtil to now or lockAtLeastUntil whichever is later
try {
UpdateRequest ur = new UpdateRequest()
.index(index)
.type(type)
.id(lockConfiguration.getName())
.script(new Script(ScriptType.INLINE,
"painless",
"ctx._source.lockUntil = params.unlockTime",
Collections.singletonMap("unlockTime", lockConfiguration.getUnlockTime().toEpochMilli())));
highLevelClient.update(ur, RequestOptions.DEFAULT);
} catch (IOException | ElasticsearchException e) {
throw new LockException("Unexpected exception occurred", e);
}
}
}
}
|
[
"lukas@krecan.net"
] |
lukas@krecan.net
|
469d99d94efc0061237358b58eeab0490fa0da3b
|
ef03c8f258d69e39c71e1de5492511323a7cc3af
|
/security-demo/src/test/java/security/test/BaseTest.java
|
c8784e9264ae723c201e65263fbd427699336038
|
[] |
no_license
|
ysyl/security_module
|
f758a68d803000262769788544864987463fd2cf
|
01bd0b13294ef0e594f13b482fd1cdea52584c9f
|
refs/heads/master
| 2020-03-22T20:55:49.777749
| 2018-08-13T09:26:36
| 2018-08-13T09:26:36
| 140,643,252
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 860
|
java
|
package security.test;
import org.apache.log4j.Logger;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration( locations= {"classpath:applicationContext.xml"})
public class BaseTest {
private static final Logger logger = Logger.getLogger(BaseTest.class.getName());
@Autowired
UserDetailsService uds;
@Test
public void test() {
UserDetails ud = uds.loadUserByUsername("verrickt");
logger.info(ud.getPassword());
}
}
|
[
"zhoujian1237@gmail.com"
] |
zhoujian1237@gmail.com
|
accc20d9625a80d896525773fff9326f3f95a5eb
|
8d3dcf19deb7f9869c6c05976418add7b4af179c
|
/app-wanda-credit-ds/src/main/java/com/wanda/credit/ds/client/wangshu/BaseYinXingAuthenBankCardDataSourceRequestor.java
|
c92524cbdaec8ee3ebf48a61a091c5cc7d6f808a
|
[] |
no_license
|
jianyking/credit-core
|
87fb22f1146303fa2a64e3f9519ca6231a4a452d
|
c0ba2a95919828bb0a55cb5f76c81418e6d38951
|
refs/heads/master
| 2022-04-07T05:41:19.684089
| 2020-02-14T05:29:10
| 2020-02-14T05:29:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,667
|
java
|
package com.wanda.credit.ds.client.wangshu;
import com.alibaba.fastjson.JSONObject;
import com.wanda.credit.base.Conts;
import com.wanda.credit.common.template.PropertyEngine;
import com.wanda.credit.ds.dao.iface.IAllAuthCardService;
import com.wanda.credit.ds.iface.IDataSourceRequestor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.HashMap;
import java.util.Map;
/**
* @author shiwei
* @version $$Id: BaseYinXingAuthenBankCardDataSourceRequestor, V 0.1 2017/10/25 13:54 shiwei Exp $$
*/
public abstract class BaseYinXingAuthenBankCardDataSourceRequestor extends BaseWDWangShuDataSourceRequestor
implements IDataSourceRequestor {
private final Logger logger = LoggerFactory.getLogger(BaseYinXingAuthenBankCardDataSourceRequestor.class);
@Autowired
protected WDWangShuTokenService tokenService;
@Autowired
protected IAllAuthCardService allAuthCardService;
protected Map<String,Object> doRequest(String trade_id, String url,boolean forceRefresh) throws Exception {
Map<String,Object> header = new HashMap<String,Object>();
if(forceRefresh){
logger.info("{} 强制刷新token",trade_id);
tokenService.setToken(tokenService.getNewToken());
logger.info("{} 强制刷新token结束",trade_id);
}else if(tokenService.getToken() == null){
logger.info("{} 发起token请求",trade_id);
tokenService.setToken(tokenService.getNewToken());
logger.info("{} 发起token请求结束",trade_id);
}
// String token = PropertyEngine.get("tmp_tokenid");
String token = tokenService.getToken();
header.put("X-Access-Token",token);
logger.info("{} tokenid {}",trade_id,token);
logger.info("{} start request",trade_id);
Map<String,Object> rspMap = doGetForHttpAndHttps(url,trade_id,header,null);
logger.info("{} end request",trade_id);
return rspMap;
}
protected boolean needRetry(int httpstatus, JSONObject rsponse) {
if(httpstatus == 401){
return true;
}
return false;
}
protected boolean isSuccess(JSONObject rspData) {
if("2001".equals(rspData.getString("code"))){
return true;
}
return false;
}
protected String buildTag(String trade_id, JSONObject rspData) {
Object res = rspData.get("respCode");
String resstr = null;
if(res != null ){
resstr = res.toString();
if("00".equals(resstr) || "01".equals(resstr)){
return Conts.TAG_TST_SUCCESS;
}
}
return Conts.TAG_TST_FAIL;
}
protected Map<? extends String, ? extends Object> visitBusiData(
String trade_id, JSONObject data, boolean isOut) {
Map<String,Object> ret = new HashMap<String,Object>();
Object resObj = data.get("respCode");
if(resObj == null){
logger.error("{} respCode 字段值非法 ,",trade_id,data.toJSONString());
return ret;
}
String message = data.getString("respMsg");
String res = resObj.toString();
String respCode = res; String resMsg = message;
if("00".equals(res)){
respCode = "2000" ;
resMsg = "认证一致" ;
}else if("01".equals(res)){
respCode = "2001";
resMsg = "认证不一致";
}else if("02".equals(res)){
respCode = "2003";
resMsg = "不支持验证";
}else if("03".equals(res)){
respCode = "-9991";
resMsg = "验证要素格式有误";
}else if("04".equals(res)){
respCode = "-9999";
resMsg = "系统异常";
}
ret.put("respCode", respCode);
ret.put("respDesc", resMsg);
String detailRespCode = data.getString("detailRespCode");
String detailRespMsg = data.getString("detailRespMsg");
//转换detailRespCode 为万达标准
Map<String, String> respDetailMap = getRespDetailMap();
if(respDetailMap.containsKey(detailRespCode)) {
ret.put("detailRespCode", respDetailMap.get(detailRespCode));
}
if (!isOut){
ret.put("certType", data.getString("certType"));
ret.put("dcType", data.getString("dcType"));
ret.put("detailRespMsg", detailRespMsg);
}
return ret;
}
public Map<String, String> getRespDetailMap(){
Map<String, String> respDetailMap = new HashMap<>();
respDetailMap.put("0000", "");
respDetailMap.put("2310", "0101");
respDetailMap.put("2311", "0102");
respDetailMap.put("2314", "0103");
respDetailMap.put("2315", "0301");
respDetailMap.put("2316", "0104");
respDetailMap.put("2317", "");
respDetailMap.put("2318", "0105");
respDetailMap.put("2319", "0106");
respDetailMap.put("2320", "0107");
respDetailMap.put("2321", "0302");
respDetailMap.put("2325", "0303");
respDetailMap.put("2326", "0108");
respDetailMap.put("2330", "0109");
respDetailMap.put("2334", "0304");
respDetailMap.put("2343", "0305");
respDetailMap.put("2344", "0110");
respDetailMap.put("2345", "0306");
respDetailMap.put("2400", "0111");
respDetailMap.put("2401", "0112");
respDetailMap.put("2402", "0113");
respDetailMap.put("2403", "0114");
respDetailMap.put("2404", "0114");
respDetailMap.put("5000", "0308");
respDetailMap.put("4001", "");
respDetailMap.put("4002", "");
respDetailMap.put("4003", "");
respDetailMap.put("4004", "");
respDetailMap.put("4005", "");
respDetailMap.put("4006", "");
respDetailMap.put("1103", "0201");
respDetailMap.put("1201", "0202");
respDetailMap.put("1302", "0203");
respDetailMap.put("1305", "0204");
respDetailMap.put("1399", "0205");
respDetailMap.put("2208", "0206");
respDetailMap.put("2301", "0207");
respDetailMap.put("2302", "0208");
respDetailMap.put("2306", "0209");
respDetailMap.put("2308", "0210");
respDetailMap.put("2309", "0211");
respDetailMap.put("2324", "0212");
respDetailMap.put("2327", "0213");
respDetailMap.put("2329", "0214");
respDetailMap.put("2341", "0215");
respDetailMap.put("2342", "0216");
respDetailMap.put("2405", "0217");
return respDetailMap;
}
}
|
[
"liunan1944@163.com"
] |
liunan1944@163.com
|
6b5cce17bfd60995c15d8c4d6a0c7e9eae30d588
|
0cc3358e3e8f81b854f9409d703724f0f5ea2ff7
|
/src/za/co/mmagon/jwebswing/plugins/jqxwidgets/themes/WebTheme.java
|
f7a4c83f13106bf82d8ae39c8e7643a1e2d1d748
|
[] |
no_license
|
jsdelivrbot/JWebMP-CompleteFree
|
c229dd405fe44d6c29ab06eedaecb7a733cbb183
|
d5f020a19165418eb21507204743e596bee2c011
|
refs/heads/master
| 2020-04-10T15:12:35.635284
| 2018-12-10T01:03:58
| 2018-12-10T01:03:58
| 161,101,028
| 0
| 0
| null | 2018-12-10T01:45:25
| 2018-12-10T01:45:25
| null |
UTF-8
|
Java
| false
| false
| 1,289
|
java
|
/*
* Copyright (C) 2017 Marc Magon
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package za.co.mmagon.jwebswing.plugins.jqxwidgets.themes;
import za.co.mmagon.jwebswing.base.references.CSSReference;
import za.co.mmagon.jwebswing.htmlbuilder.css.themes.Theme;
/**
* Implements the UI Darkness Theme
*
* @since 2014/07/05
* @version 1.0
* @author MMagon
*
*
*/
public class WebTheme extends Theme
{
public WebTheme()
{
super("Web Theme", "jqxwebtheme");
getCssReferences().add(new CSSReference("JQXwebTheme", 3.91, "bower_components/jqwidgets/jqwidgets/styles/jqx.web.css", "https://jqwidgets.com/public/jqwidgets/styles/jqx.web.css"));
}
}
|
[
"ged_marc@hotmail.com"
] |
ged_marc@hotmail.com
|
32b6b5e5b28df8dee7b0fb9cd080ab3d9e0bc33d
|
f0462b44f8ccfeda26278e62b4e7a1198d185112
|
/AndroidProjects/RetrofitApplication/app/src/main/java/com/example/gersonsafj/retrofitapplication/model/Repo.java
|
33e0c4dc3348e6b5dc3982b2ef9e6395f1d95c96
|
[] |
no_license
|
GersonSales/Java
|
16e7c3e7c3038c74b70bb8c6e126da8b453ddda1
|
de444937e9afed7b32b623c105ce9d51722e58c6
|
refs/heads/master
| 2021-05-04T09:55:14.680117
| 2019-05-29T13:46:19
| 2019-05-29T13:46:19
| 47,032,434
| 0
| 2
| null | 2017-10-29T01:23:14
| 2015-11-28T17:16:23
|
Java
|
UTF-8
|
Java
| false
| false
| 621
|
java
|
package com.example.gersonsafj.retrofitapplication.model;
import com.google.gson.annotations.SerializedName;
/**
* Created by gersonsafj on 1/15/18.
*/
public class Repo {
@SerializedName("id")
int mId;
@SerializedName("name")
String mName;
public Repo(int mId, String mName) {
this.mId = mId;
this.mName = mName;
}
public int getmId() {
return mId;
}
public void setmId(int mId) {
this.mId = mId;
}
public String getmName() {
return mName;
}
public void setmName(String mName) {
this.mName = mName;
}
}
|
[
"gerson.junior@ccc.ufcg.edu.br"
] |
gerson.junior@ccc.ufcg.edu.br
|
41aa4dfe7c2546654ef965622af5fa50529e1981
|
a711d39bb5a362de95dc176e0da6db04eee9adc0
|
/xo-opportunity-trader/src/main/java/com/gtc/opportunity/trader/service/scheduled/trade/management/NnOrderSoftCanceller.java
|
09ecd6dd4828b376004e0330f28113d1755ebed3
|
[
"MIT"
] |
permissive
|
aspineon/GTC-all-repo
|
81e458415b0b95c4659263898f805056bc1226db
|
e4ca91147a9bffd7f5820da413507f532f179085
|
refs/heads/master
| 2022-04-07T09:52:40.367277
| 2020-01-19T09:47:23
| 2020-01-19T09:47:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,426
|
java
|
package com.gtc.opportunity.trader.service.scheduled.trade.management;
import com.gtc.model.gateway.command.manage.CancelOrderCommand;
import com.gtc.opportunity.trader.domain.*;
import com.gtc.opportunity.trader.repository.SoftCancelConfigRepository;
import com.gtc.opportunity.trader.service.CurrentTimestamp;
import com.gtc.opportunity.trader.service.TradeCreationService;
import com.gtc.opportunity.trader.service.command.gateway.WsGatewayCommander;
import com.gtc.opportunity.trader.service.dto.TradeDto;
import com.gtc.opportunity.trader.service.xoopportunity.creation.ConfigCache;
import com.gtc.opportunity.trader.service.xoopportunity.creation.fastexception.RejectionException;
import com.newrelic.api.agent.Trace;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.statemachine.StateMachine;
import org.springframework.statemachine.service.StateMachineService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
/**
* Created by Valentyn Berezin on 03.09.18.
*/
@Slf4j
@Service
@RequiredArgsConstructor
public class NnOrderSoftCanceller {
private final WsGatewayCommander commander;
private final CurrentTimestamp dbTime;
private final SoftCancelConfigRepository softCancelConfig;
private final StateMachineService<TradeStatus, TradeEvent> tradeMachines;
private final OldOrderFinder finder;
private final TradeCreationService tradesService;
private final ConfigCache cache;
private final NnOrderCancelPriceFinder cancelPriceFinder;
@Trace(dispatcher = true)
@Transactional(readOnly = true)
@Scheduled(fixedDelayString = "#{${app.schedule.order.cancellerS} * 1000}")
public void softCancel() {
LocalDateTime now = dbTime.dbNow();
Map<OldOrderFinder.Key, SoftCancelConfig> byClient = getActiveConfigs();
finder.expiredSlave(
now,
byClient.entrySet().stream().collect(
Collectors.toMap(Map.Entry::getKey, it -> it.getValue().getWaitM())
)
).forEach(it -> cancelAndReplaceOrderIfPossible(byClient, it));
}
private void cancelAndReplaceOrderIfPossible(Map<OldOrderFinder.Key, SoftCancelConfig> cancels, Trade trade) {
Optional<ClientConfig> config = cache.getClientCfg(
trade.getClient().getName(), trade.getCurrencyFrom(), trade.getCurrencyTo());
SoftCancelConfig cancelCfg = cancels.get(
new OldOrderFinder.Key(trade.getClient().getName(), trade.getCurrencyFrom(), trade.getCurrencyTo())
);
if (null == cancelCfg || !config.isPresent()) {
return;
}
log.info("Attempting to soft-cancel order {}", trade.getId());
BigDecimal lossPrice = cancelPriceFinder.findSuitableLossPrice(cancelCfg, trade);
if (null == lossPrice) {
return;
}
TradeDto softCancel = createSoftCancelTrade(config.get(), lossPrice, trade);
if (null == softCancel) {
return;
}
StateMachine<TradeStatus, TradeEvent> machine = tradeMachines.acquireStateMachine(trade.getId());
machine.sendEvent(TradeEvent.SOFT_CANCELLED);
tradeMachines.releaseStateMachine(machine.getId());
log.info("Cancelling order {} and replacing it", trade.getId());
commander.cancel(new CancelOrderCommand(
trade.getClient().getName(),
trade.getId(),
trade.getAssignedId()
));
log.info("Pushing soft-cancel order {}", softCancel.getCommand());
commander.createOrder(softCancel.getCommand());
// TODO: acknowledge top-order machine that it is done in soft-cancel mode, consider transaction nesting
}
private TradeDto createSoftCancelTrade(ClientConfig config, BigDecimal price, Trade trade) {
try {
TradeDto cancel = tradesService.createTradeNoSideValidation(
trade.getDependsOn(),
config,
price,
trade.getAmount().abs(), // caution here - we can't use opening amount
trade.isSell(),
true
);
StateMachine<TradeStatus, TradeEvent> machine = tradeMachines
.acquireStateMachine(cancel.getTrade().getId());
machine.sendEvent(TradeEvent.DEPENDENCY_DONE);
tradeMachines.releaseStateMachine(machine.getId());
return cancel;
} catch (RejectionException ex) {
log.warn("Soft-cancel trade could not be created, aborting", ex);
return null;
}
}
private Map<OldOrderFinder.Key, SoftCancelConfig> getActiveConfigs() {
return softCancelConfig.findAllActive().stream()
.collect(Collectors.toMap(
it -> new OldOrderFinder.Key(
it.getClientCfg().getClient().getName(),
it.getClientCfg().getCurrency(),
it.getClientCfg().getCurrencyTo()),
it -> it)
);
}
}
|
[
"valentyn.berezin@aurea.com"
] |
valentyn.berezin@aurea.com
|
0e58fb922daffab1192273e8b5b58e8313e7866f
|
b8b5ff83bf34169f3e7c75dab3573de2bfa06a12
|
/app/src/main/java/cn/zsmy/akm/service/NoticeBroadCastReceive.java
|
99848580e209bd655508289ae78a1aff606b1c86
|
[] |
no_license
|
wanjingyan001/akm
|
c889963f2c5772db8368039f095815ca7b954750
|
7d84ccc61c98ae804806fad7445a11558d96c240
|
refs/heads/master
| 2021-01-10T01:37:57.911792
| 2016-03-26T03:07:57
| 2016-03-26T03:07:57
| 54,759,913
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,617
|
java
|
package cn.zsmy.akm.service;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import cn.zsmy.akm.chat.receiver.MyPushMessageReceiver;
import cn.zsmy.akm.utils.Constants;
/**
* 广播接收者,用于用户消息接收控制
* Created by Administrator on 2016/2/22.
*/
public class NoticeBroadCastReceive extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// TODO: This method is called when the BroadcastReceiver is receiving
// an Intent broadcast.
String type = intent.getStringExtra("TYPE");
switch (type) {
case Constants.CLOSE_REPLY_NOTICE:
//不接受回复消息
MyPushMessageReceiver.isReceiveReplyMSG = false;
break;
case Constants.OPEN_REPLY_NOTICE:
MyPushMessageReceiver.isReceiveReplyMSG = true;
break;
case Constants.CLOSE_ADVISORY_NOTICE:
//不接受资讯消息
MyPushMessageReceiver.isReceiveAdvisoryMSG = false;
break;
case Constants.OPEN_ADVISORY_NOTICE:
MyPushMessageReceiver.isReceiveAdvisoryMSG = true;
break;
case Constants.CLOSE_SPREAD_NOTICE:
//不接受推广消息
MyPushMessageReceiver.isReceiveSpreadMSG = false;
break;
case Constants.OPEN_SPREAD_NOTICE:
MyPushMessageReceiver.isReceiveSpreadMSG = true;
break;
}
}
}
|
[
"670263921@qq.com"
] |
670263921@qq.com
|
4631ea6877675578dd7aacd0517f535d79df1929
|
4601f43a8afe07ae9fae70b85134b8f8609d13db
|
/src/test/java/io/github/jhipster/application/config/timezone/HibernateTimeZoneIT.java
|
110ffbc2ff5df28615afb0d00e4b045261b312e5
|
[] |
no_license
|
sixsigmapymes/A08
|
4e5cea4150f0eb497ee997bdb612bf4ebde0cfa6
|
8da53f82f5a2671cc76b427a273ce3a2c737fb6c
|
refs/heads/master
| 2022-12-23T14:34:52.515214
| 2019-07-10T23:10:17
| 2019-07-10T23:10:17
| 196,264,723
| 0
| 0
| null | 2022-12-16T05:01:54
| 2019-07-10T19:36:15
|
Java
|
UTF-8
|
Java
| false
| false
| 6,910
|
java
|
package io.github.jhipster.application.config.timezone;
import io.github.jhipster.application.A08PrototypeApp;
import io.github.jhipster.application.repository.timezone.DateTimeWrapper;
import io.github.jhipster.application.repository.timezone.DateTimeWrapperRepository;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.support.rowset.SqlRowSet;
import org.springframework.transaction.annotation.Transactional;
import java.time.*;
import java.time.format.DateTimeFormatter;
import static java.lang.String.format;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Integration tests for the UTC Hibernate configuration.
*/
@SpringBootTest(classes = A08PrototypeApp.class)
public class HibernateTimeZoneIT {
@Autowired
private DateTimeWrapperRepository dateTimeWrapperRepository;
@Autowired
private JdbcTemplate jdbcTemplate;
private DateTimeWrapper dateTimeWrapper;
private DateTimeFormatter dateTimeFormatter;
private DateTimeFormatter timeFormatter;
private DateTimeFormatter dateFormatter;
@BeforeEach
public void setup() {
dateTimeWrapper = new DateTimeWrapper();
dateTimeWrapper.setInstant(Instant.parse("2014-11-12T05:50:00.0Z"));
dateTimeWrapper.setLocalDateTime(LocalDateTime.parse("2014-11-12T07:50:00.0"));
dateTimeWrapper.setOffsetDateTime(OffsetDateTime.parse("2011-12-14T08:30:00.0Z"));
dateTimeWrapper.setZonedDateTime(ZonedDateTime.parse("2011-12-14T08:30:00.0Z"));
dateTimeWrapper.setLocalTime(LocalTime.parse("14:30:00"));
dateTimeWrapper.setOffsetTime(OffsetTime.parse("14:30:00+02:00"));
dateTimeWrapper.setLocalDate(LocalDate.parse("2016-09-10"));
dateTimeFormatter = DateTimeFormatter
.ofPattern("yyyy-MM-dd HH:mm:ss.S")
.withZone(ZoneId.of("UTC"));
timeFormatter = DateTimeFormatter
.ofPattern("HH:mm:ss")
.withZone(ZoneId.of("UTC"));
dateFormatter = DateTimeFormatter
.ofPattern("yyyy-MM-dd");
}
@Test
@Transactional
public void storeInstantWithUtcConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("instant", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeFormatter.format(dateTimeWrapper.getInstant());
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeLocalDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("local_date_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getLocalDateTime()
.atZone(ZoneId.systemDefault())
.format(dateTimeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeOffsetDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("offset_date_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getOffsetDateTime()
.format(dateTimeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeZoneDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("zoned_date_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getZonedDateTime()
.format(dateTimeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeLocalTimeWithUtcConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("local_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getLocalTime()
.atDate(LocalDate.of(1970, Month.JANUARY, 1))
.atZone(ZoneId.systemDefault())
.format(timeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeOffsetTimeWithUtcConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("offset_time", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getOffsetTime()
.toLocalTime()
.atDate(LocalDate.of(1970, Month.JANUARY, 1))
.atZone(ZoneId.systemDefault())
.format(timeFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
@Test
@Transactional
public void storeLocalDateWithUtcConfigShouldBeStoredWithoutTransformation() {
dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper);
String request = generateSqlRequest("local_date", dateTimeWrapper.getId());
SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request);
String expectedValue = dateTimeWrapper
.getLocalDate()
.format(dateFormatter);
assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue);
}
private String generateSqlRequest(String fieldName, long id) {
return format("SELECT %s FROM jhi_date_time_wrapper where id=%d", fieldName, id);
}
private void assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(SqlRowSet sqlRowSet, String expectedValue) {
while (sqlRowSet.next()) {
String dbValue = sqlRowSet.getString(1);
assertThat(dbValue).isNotNull();
assertThat(dbValue).isEqualTo(expectedValue);
}
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
d91f0fb3033e65297a6f5a72509f685081831bd2
|
7e29706676b084c041a78f22d98bf2f2916f8695
|
/IdCardReconition-master/app/src/main/java/com/hezd/example/camera/activity/MainActivity.java
|
b8df85dedd66b34a47aebc0524671264b1bbf4e6
|
[] |
no_license
|
2381447237/idCardDemo
|
9ae4c8fd9c96b8a8c725919e8c5f1a21cac931b5
|
0c33acdaef1b949b224e49c95d97a01087ef6375
|
refs/heads/master
| 2021-07-06T14:18:10.193124
| 2017-10-03T01:43:18
| 2017-10-03T01:43:18
| 105,604,186
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,609
|
java
|
package com.hezd.example.camera.activity;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapRegionDecoder;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.hardware.Camera;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.Toast;
import com.hezd.example.camera.R;
import com.hezd.example.camera.view.CameraSurfaceView;
import com.ym.idcard.reg.bean.IDCard;
import com.ym.idcard.reg.engine.OcrEngine;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
private static final String TAG = MainActivity.class.getSimpleName();
private RelativeLayout mScanRl;
private Button mTakePicBtn;
private Camera mCameraInstance;
private View mScanV;
// 扫描区域属性
private int mScaLeft;
private int mScanTop;
private int mScanRight;
private int mScanBottom;
private int mScanWidth;
private int mScanHeight;
private ImageView mPicIv;
private FrameLayout mSurfaceContainerFl;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
getViews();
setViews();
setListeners();
}
private void getViews() {
mSurfaceContainerFl = (FrameLayout) findViewById(R.id.fl_surfaceview_container);
mPicIv = (ImageView) findViewById(R.id.iv_pic);
mScanRl = (RelativeLayout) findViewById(R.id.rl_scan);
mScanV = findViewById(R.id.v_scan);
mTakePicBtn = (Button) findViewById(R.id.btn_take_pic);
mCameraInstance = getCameraInstance();
CameraSurfaceView mSurfaceView = new CameraSurfaceView(this, mCameraInstance);
mSurfaceContainerFl.addView(mSurfaceView);
}
private Camera getCameraInstance() {
if(!getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) {
showMessage("this device has no camera!");
return null;
}
Camera camera = null;
try {
camera = Camera.open();
} catch (Exception e) {
e.printStackTrace();
}
return camera;
}
private void showMessage(String s) {
Toast.makeText(this,s,Toast.LENGTH_SHORT).show();
}
private void setViews() {
mScanV.post(new Runnable() {
@Override
public void run() {
mScaLeft = mScanV.getLeft();
mScanTop = mScanV.getTop();
mScanRight = mScanV.getRight();
mScanBottom = mScanV.getBottom();
mScanWidth = mScanV.getWidth();
mScanHeight = mScanV.getHeight();
Log.d(TAG,"getleft value:"+mScaLeft);
Log.d(TAG,"gettop value:"+mScanTop);
Log.d(TAG,"getright value:"+mScanRight);
Log.d(TAG,"getbottom value:"+mScanBottom);
Log.d(TAG,"getwidth value:"+mScanWidth);
Log.d(TAG,"getheight value:"+ mScanHeight);
}
});
}
private void setListeners() {
mTakePicBtn.setOnClickListener(this);
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.btn_take_pic:
/**拍照并识别身份证,还有一种方式是previewcallback方式,周期性获取某一帧图片解析
* 判断是否解析成功的方法是判断身份证是否包含wrong number字符串,因为解析身份证错误时
* 会包含这个字符串
* */
takePic();
break;
}
}
private void takePic() {
mCameraInstance.takePicture(null, null, new Camera.PictureCallback() {
@Override
public void onPictureTaken(byte[] data, Camera camera) {
// Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length);
/**
* 图片截取的原理,我们预览surfaceview是全屏的,扫描区域是屏幕中的一部分.所以最终
* 需要截取图片,但是有一些需要注意的问题。
* 因为拍照图片尺寸跟扫描框父窗体尺寸是不一样的
* 要先缩放照片尺寸与扫描框父窗体一样在进行裁剪
* 另外还有一个问题,一定要设置预览分辨率否则拍摄照片是变形的。
* 预览的坐标是横屏的xy轴坐标,所以如果是竖屏对图片处理时需要先做旋转操作
* 分辨率设置方法是获取设备支持的预览分辨率利用最小差值法获取最优分辨率并设置
* 还有一种解决办法有人说是是设置拍照图片分辨率和预览分辨率,我没有尝试。
* */
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeByteArray(data,0,data.length,options);
options.inJustDecodeBounds = false;
try {
int outWidth = options.outWidth;
int outHeight = options.outHeight;
int count = outHeight+outWidth;
int bitmapW = outWidth<outHeight?outWidth:outHeight;
int bitmapH = count-bitmapW;
float difW = (float)mSurfaceContainerFl.getWidth()/bitmapW;
float difH = (float)mSurfaceContainerFl.getHeight()/bitmapH;
Matrix matrix = new Matrix();
matrix.postRotate(90);
matrix.postScale(difW,difH);
Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length);
Bitmap scaleBitmap = Bitmap.createBitmap(bitmap,0,0,bitmap.getWidth(),bitmap.getHeight(),matrix,true);
// 图片截取两种方式,createbitmap或者bitmapRegionDecoder
ByteArrayOutputStream bos = new ByteArrayOutputStream();
scaleBitmap.compress(Bitmap.CompressFormat.JPEG,100,bos);
Rect rect = new Rect(mScaLeft,mScanTop,mScanRight,mScanBottom);
byte[] bitmapBytes = bos.toByteArray();
BitmapRegionDecoder decoder = BitmapRegionDecoder.newInstance(bitmapBytes,0,bitmapBytes.length,false);
Bitmap cropBtimap = decoder.decodeRegion(rect, options);
ByteArrayOutputStream cropStream = new ByteArrayOutputStream();
cropBtimap.compress(Bitmap.CompressFormat.JPEG,100,cropStream);
/*身份证扫描核心代码*/
OcrEngine ocrEngine = new OcrEngine();
IDCard idCard = ocrEngine.recognize(MainActivity.this, 2, cropStream.toByteArray(), null);
Log.d("hezd","idcard info:"+idCard.toString());
mPicIv.setImageBitmap(cropBtimap);
} catch (IOException e) {
e.printStackTrace();
}
// mCameraInstance.startPreview();
}
});
}
}
|
[
"2381447237@qq.com"
] |
2381447237@qq.com
|
232e032f4b0aa79a8541ec7b4fbf8882f40011df
|
46a62c499faaa64fe3cce2356c8b229e9c4c9c49
|
/taobao-sdk-java-standard/taobao-sdk-java-online_standard-20120923-source/com/taobao/api/domain/WlbItemBatchInventory.java
|
6d01f728c855673f365ed128ffff73dd85afd2d4
|
[] |
no_license
|
xjwangliang/learning-python
|
4ed40ff741051b28774585ef476ed59963eee579
|
da74bd7e466cd67565416b28429ed4c42e6a298f
|
refs/heads/master
| 2021-01-01T15:41:22.572679
| 2015-04-27T14:09:50
| 2015-04-27T14:09:50
| 5,881,815
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,612
|
java
|
package com.taobao.api.domain;
import java.util.List;
import com.taobao.api.TaobaoObject;
import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.internal.mapping.ApiListField;
/**
* 商品的库存信息和批次信息
*
* @author auto create
* @since 1.0, null
*/
public class WlbItemBatchInventory extends TaobaoObject {
private static final long serialVersionUID = 5782918445156393371L;
/**
* 批次库存查询结果
*/
@ApiListField("item_batch")
@ApiField("wlb_item_batch")
private List<WlbItemBatch> itemBatch;
/**
* 商品ID
*/
@ApiField("item_id")
private Long itemId;
/**
* 商品库存查询结果
*/
@ApiListField("item_inventorys")
@ApiField("wlb_item_inventory")
private List<WlbItemInventory> itemInventorys;
/**
* 商品在所有仓库的可销库存总数
*/
@ApiField("total_quantity")
private Long totalQuantity;
public List<WlbItemBatch> getItemBatch() {
return this.itemBatch;
}
public void setItemBatch(List<WlbItemBatch> itemBatch) {
this.itemBatch = itemBatch;
}
public Long getItemId() {
return this.itemId;
}
public void setItemId(Long itemId) {
this.itemId = itemId;
}
public List<WlbItemInventory> getItemInventorys() {
return this.itemInventorys;
}
public void setItemInventorys(List<WlbItemInventory> itemInventorys) {
this.itemInventorys = itemInventorys;
}
public Long getTotalQuantity() {
return this.totalQuantity;
}
public void setTotalQuantity(Long totalQuantity) {
this.totalQuantity = totalQuantity;
}
}
|
[
"shigushuyuan@gmail.com"
] |
shigushuyuan@gmail.com
|
5b7128d675ca9f3ca163f46bc4806531eab4cf42
|
9ff1097bb215fdc122bb2b03fc1b554afb698bda
|
/src/main/java/com/dodo/lab/head_first_design_patterns/factory/pizzaaf/PizzaIngredientFactory.java
|
b020dbadaae5cc47fa159ea44165e58a595bde7c
|
[] |
no_license
|
nicetoseeyou/design-pattern
|
8c96e01d2cc32735add2cb41740e530ef1773aec
|
3a876c3390e36c25440b40e944ee5ac6e5e52f60
|
refs/heads/master
| 2021-12-27T05:34:27.657776
| 2019-12-13T14:37:51
| 2019-12-13T14:37:51
| 97,602,681
| 0
| 0
| null | 2021-12-14T21:06:47
| 2017-07-18T13:39:39
|
Java
|
UTF-8
|
Java
| false
| false
| 324
|
java
|
package com.dodo.lab.head_first_design_patterns.factory.pizzaaf;
public interface PizzaIngredientFactory {
public Dough createDough();
public Sauce createSauce();
public Cheese createCheese();
public Veggies[] createVeggies();
public Pepperoni createPepperoni();
public Clams createClam();
}
|
[
"hello4world@yeah.net"
] |
hello4world@yeah.net
|
57ec052af99f7ed4cb3695ff6bb36333514f28a8
|
d64121af62973e6d2f7fdc6d303bbd162dbcc827
|
/demo/ColorQuantPerfTest.java
|
e374d6ab9a2373b50f8d47d7a4d7980e7f1c3e1e
|
[
"Apache-2.0"
] |
permissive
|
kongzhidea/simpleimage
|
95bf30a6dc05c91174269d9e03259411ef704a94
|
9fcd01089665fbf4cdd0595c7e3c96e9be89ce77
|
refs/heads/master
| 2021-01-21T08:58:19.520226
| 2016-07-12T07:42:28
| 2016-07-12T07:42:28
| 58,982,670
| 0
| 0
| null | 2016-05-17T02:11:43
| 2016-05-17T02:11:43
| null |
UTF-8
|
Java
| false
| false
| 4,196
|
java
|
package com.kk.simpleimage;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import com.alibaba.simpleimage.ImageFormat;
import com.alibaba.simpleimage.ImageRender;
import com.alibaba.simpleimage.SimpleImageException;
import org.apache.commons.io.IOUtils;
import com.alibaba.simpleimage.io.ByteArrayOutputStream;
import com.alibaba.simpleimage.render.ReadRender;
import com.alibaba.simpleimage.render.WriteParameter;
import com.alibaba.simpleimage.render.WriteRender;
/**
* 类ColorQuantPerfTest.java的实现描述
*
* @author wendell 2011-8-18 下午07:06:28
*/
public class ColorQuantPerfTest {
public static void main(String[] args) throws Exception {
String appDir = "";
int threads = 0;
int times = 0;
String algName = "";
appDir = args[0];
threads = Integer.parseInt(args[1]);
times = Integer.parseInt(args[2]);
algName = args[3];
new ColorQuantPerfTest(appDir, threads, times, algName).start();
}
int threadsNum;
int times;
String appDir;
String algName;
public ColorQuantPerfTest(String appDir, int threads, int times, String algName) {
this.appDir = appDir;
this.threadsNum = threads;
this.times = times;
this.algName = algName;
}
public void start() throws InterruptedException {
CountDownLatch latch = new CountDownLatch(times);
File rootDir = new File(new File(appDir), "/src/test/resources/conf.test/simpleimage");
for (int s = 0; s < threadsNum; s++) {
Thread t = new Thread(new Worker(latch, rootDir, algName));
t.start();
}
latch.await();
}
class Worker implements Runnable {
CountDownLatch latch;
File imgDir;
WriteParameter.QuantAlgorithm quantAlg;
public Worker(CountDownLatch latch, File imgDir, String algName) {
this.latch = latch;
this.imgDir = imgDir;
if ("m".equalsIgnoreCase(algName)) {
quantAlg = WriteParameter.QuantAlgorithm.MedianCut;
} else if ("N".equalsIgnoreCase(algName)) {
quantAlg = WriteParameter.QuantAlgorithm.NeuQuant;
} else {
quantAlg = WriteParameter.QuantAlgorithm.OctTree;
}
}
/* (non-Javadoc)
* @see java.lang.Runnable#run()
*/
public void run() {
for (; ; ) {
if (latch.getCount() > 0) {
latch.countDown();
} else {
return;
}
List<File> imgs = new ArrayList<File>();
for (File f : new File(imgDir, "scale").listFiles()) {
if (f.isDirectory()) {
continue;
}
imgs.add(f);
}
for (File imgFile : imgs) {
ImageRender wr = null;
InputStream inStream = null;
OutputStream outStream = new ByteArrayOutputStream();
try {
inStream = new FileInputStream(imgFile);
ImageRender rr = new ReadRender(inStream);
wr = new WriteRender(rr, outStream, ImageFormat.GIF, new WriteParameter(quantAlg));
wr.render();
} catch (Exception e) {
e.printStackTrace();
} finally {
IOUtils.closeQuietly(inStream);
IOUtils.closeQuietly(outStream);
if (wr != null) {
try {
wr.dispose();
} catch (SimpleImageException e) {
e.printStackTrace();
}
}
}
}
System.out.println("-----");
}
}
}
}
|
[
"563150913@qq.com"
] |
563150913@qq.com
|
8b5bce346aa6c29e535fbf2fff3d6b63be7a1cce
|
11c47117452038c4958f03c2a2c4d04aa1354d82
|
/src/main/java/com/example/service/impl/MqttCheckServiceImpl.java
|
47c8ada79fb5f8a3254c7857276690f1f28f1d04
|
[] |
no_license
|
dmshan88/mongo-status
|
e8ef6c5ce697cf1e7454795120099ee6f6522e71
|
b4186773dcf7dadf32d4a02f407b3da96b08ac69
|
refs/heads/master
| 2020-08-22T17:31:35.690255
| 2019-10-31T12:35:39
| 2019-10-31T12:35:39
| 216,448,454
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,419
|
java
|
package com.example.service.impl;
import java.util.Date;
import org.eclipse.paho.client.mqttv3.IMqttActionListener;
import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken;
import org.eclipse.paho.client.mqttv3.IMqttToken;
import org.eclipse.paho.client.mqttv3.MqttAsyncClient;
import org.eclipse.paho.client.mqttv3.MqttCallbackExtended;
import org.eclipse.paho.client.mqttv3.MqttConnectOptions;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.eclipse.paho.client.mqttv3.MqttMessage;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.example.common.CustomException;
import com.example.common.ErrorCode;
import com.example.pojo.vo.MqttStatus;
import com.example.service.MqttCheckService;
import lombok.extern.log4j.Log4j;
@Log4j
@Service
public class MqttCheckServiceImpl implements MqttCheckService {
@Value("${app.mqtt_enable}")
Boolean mqttEnable;
@Value("${app.mqtt_broker}")
private String broker;
@Value("${app.mqtt_client_id}")
private String clientId;
@Value("${app.mqtt_username}")
private String username;
@Value("${app.mqtt_password}")
private String password;
private static boolean start = false;
private static Date connectDate = null;
private MqttAsyncClient mqttClient = null;
@Override
public void checkConnectStatus() throws CustomException {
if (!mqttEnable) {
return;
}
if (!start) {
start();
} else if (!mqttClient.isConnected()) {
throw new CustomException(ErrorCode.MQTT_CONNECT_ERROR, "mqtt 未连接");
}
}
@Override
public MqttStatus getStatus() throws CustomException {
MqttStatus status = new MqttStatus();
status.setEnableCheck(mqttEnable);
if (mqttEnable) {
if (!mqttClient.isConnected()) {
throw new CustomException(ErrorCode.MQTT_CONNECT_ERROR, "mqtt 未连接");
}
status.setConnected(mqttClient.isConnected());
status.setConnectTimestamp(connectDate.getTime()/1000);
}
return status;
}
private void start() throws CustomException {
log.info("Mqtt start");
MqttConnectOptions connectOptions = new MqttConnectOptions();
connectOptions.setAutomaticReconnect(true);
connectOptions.setUserName(username);
connectOptions.setPassword(password.toCharArray());
connectOptions.setCleanSession(false);
connectOptions.setKeepAliveInterval(30);
try {
mqttClient = new MqttAsyncClient(broker, clientId);
mqttClient.setCallback(new MqttCallbackExtended() {
@Override
public void messageArrived(String topic, MqttMessage message) throws Exception {
log.info("messageArrived! topic: " + topic
+ "; message: " + message.toString());
}
@Override
public void deliveryComplete(IMqttDeliveryToken token) {
log.info("deliveryComplete " + token.getMessageId());
}
@Override
public void connectionLost(Throwable cause) {
log.error("connectionLost " + cause.getMessage());
}
@Override
public void connectComplete(boolean reconnect, String serverURI) {
log.info("connectComplete: " + serverURI + ", is reconnect:" + reconnect);
connectDate = new Date();
}
});
mqttClient.connect(connectOptions, null, new IMqttActionListener() {
@Override
public void onSuccess(IMqttToken asyncActionToken) {
log.info("connect success");
}
@Override
public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
log.error("connect error" + exception.getMessage());
}
});
} catch (MqttException e) {
throw new CustomException(ErrorCode.MQTT_CONNECT_ERROR, e.getMessage());
}
start = true;
}
}
|
[
"dm_shan@163.com"
] |
dm_shan@163.com
|
2eefefb964071a3859639363eecc166445c8105a
|
8e67fdab6f3a030f38fa127a79050b8667259d01
|
/JavaStudyHalUk/src/TECHNOSTUDY_SAMILBY/gun29/tasks/task1/Task1.java
|
d8717af388d3ca42fc2861e4a65a0a8d491f9fa1
|
[] |
no_license
|
mosmant/JavaStudyHalUk
|
07e38ade6c7a31d923519a267a63318263c5910f
|
a41e16cb91ef307b50cfc497535126aa1e4035e5
|
refs/heads/master
| 2023-07-27T13:31:11.004490
| 2021-09-12T14:59:25
| 2021-09-12T14:59:25
| 405,671,965
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,093
|
java
|
package TECHNOSTUDY_SAMILBY.gun29.tasks.task1;
public class Task1 {
public static void main(String[] args) {
Lesson math = createLesson("Math", 4, 96);
Lesson physics = createLesson("Physics", 4, 95);
Lesson science = createLesson("Science", 3, 100);
Lesson computerScience = createLesson("Computer Science", 4, 100);
Lesson chemistry = createLesson("Chemistry", 3, 95);
Student student1 = new Student();
student1.name = "John";
student1.maxCredit = 5;
student1.takeLesson(math);
student1.takeLesson(physics);
student1.takeLesson(computerScience);
Student student2 = new Student();
student2.name = "Max";
student2.maxCredit = 7;
student2.takeLesson(science);
student2.takeLesson(chemistry);
}
public static Lesson createLesson(String name, int credit, double grade) {
Lesson newLesson = new Lesson();
newLesson.name = name;
newLesson.credit = credit;
newLesson.grade = grade;
return newLesson;
}
}
|
[
"mottnr@gmail.com"
] |
mottnr@gmail.com
|
82813088e58c151b61cdde9f68a0b355047813e7
|
87c3c335023681d1c906892f96f3a868b3a6ee8e
|
/HTML5/dev/simplivity-citrixplugin-service/src/main/java/com/vmware/vim25/HostIncompatibleForRecordReplay.java
|
577b867a0f6b5d3d48d8287d86515572dd2bd37c
|
[
"Apache-2.0"
] |
permissive
|
HewlettPackard/SimpliVity-Citrix-VCenter-Plugin
|
19d2b7655b570d9515bf7e7ca0cf1c823cbf5c61
|
504cbeec6fce27a4b6b23887b28d6a4e85393f4b
|
refs/heads/master
| 2023-08-09T08:37:27.937439
| 2020-04-30T06:15:26
| 2020-04-30T06:15:26
| 144,329,090
| 0
| 1
|
Apache-2.0
| 2020-04-07T07:27:53
| 2018-08-10T20:24:34
|
Java
|
UTF-8
|
Java
| false
| false
| 863
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.06.12 at 09:16:35 AM EDT
//
package com.vmware.vim25;
/**
*
*/
@SuppressWarnings("all")
public class HostIncompatibleForRecordReplay
extends VimFault
{
public String hostName;
public String reason;
public String getHostName() {
return hostName;
}
public void setHostName(String hostName) {
this.hostName = hostName;
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
}
|
[
"anuanusha471@gmail.com"
] |
anuanusha471@gmail.com
|
2c9c467a3f2ca2d7a4d0132db1e881d005554a2f
|
b733c258761e7d91a7ef0e15ca0e01427618dc33
|
/cards/src/main/java/org/rnd/jmagic/cards/CaravanHurda.java
|
0754580d4a1bac28d85c3d2c90acc01543702996
|
[] |
no_license
|
jmagicdev/jmagic
|
d43aa3d2288f46a5fa950152486235614c6783e6
|
40e573f8e6d1cf42603fd05928f42e7080ce0f0d
|
refs/heads/master
| 2021-01-20T06:57:51.007411
| 2014-10-22T03:03:34
| 2014-10-22T03:03:34
| 9,589,102
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 413
|
java
|
package org.rnd.jmagic.cards;
import org.rnd.jmagic.engine.*;
@Name("Caravan Hurda")
@Types({Type.CREATURE})
@SubTypes({SubType.GIANT})
@ManaCost("4W")
@ColorIdentity({Color.WHITE})
public final class CaravanHurda extends Card
{
public CaravanHurda(GameState state)
{
super(state);
this.setPower(1);
this.setToughness(5);
this.addAbility(new org.rnd.jmagic.abilities.keywords.Lifelink(state));
}
}
|
[
"robyter@gmail"
] |
robyter@gmail
|
1014387930f0d557ce18bad6d473f20b7c99ea13
|
8d4c1b10c6df5d54599a82228a98c5641f5658ec
|
/src/ch06/EnumMapExample.java
|
c898296774082a63f3d94b4086d56af1fa5c5218
|
[] |
no_license
|
whdms705/EffectiveJava3
|
0e3921856da46958f8e6b1f1701acea31b8bb08a
|
7dd105d174d6e0e44897387febe0e7e30e70f752
|
refs/heads/master
| 2020-04-16T06:22:15.733493
| 2019-06-23T03:12:57
| 2019-06-23T03:12:57
| 165,343,458
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 942
|
java
|
package ch06;
import java.util.EnumMap;
//참고 http://clearpal7.blogspot.com/2017/02/java-enummap-vs-hashmap.html
// EnumMap VS HashMap
//enumMap의 index 는 Enum의 내부 순서를 이용하므로 hashMap의 Hashing을 통한 index보다 효율적이다.
//HashMap의 경우 일정한 이상의 자료가 저장 되면, 자체적으로 resizing을 한다.
//그로 인해 성능저하가 발생한다. 그러나 EnumMap은 Enum의 갯수로 제한하므로 Resizing에 대한 성능저하가 없다.
public class EnumMapExample {
enum enumInstance{ A ,B , C}
public static void main(String[] args) {
EnumMap map = new EnumMap(enumInstance.class);
map.put(enumInstance.A,"A result");
map.put(enumInstance.B,"B result");
map.put(enumInstance.C,"C result");
System.out.println(map);
String aValue = (String) map.get(enumInstance.A);
System.out.println(aValue);
}
}
|
[
"whdms705@nate.com"
] |
whdms705@nate.com
|
f615b79d3860413d7dc4c6ee60b8cdaa437ea4f4
|
0874d515fb8c23ae10bf140ee5336853bceafe0b
|
/l2j-universe/dist/gameserver/data/scripts/quests/_146_TheZeroHour.java
|
cf29fe435372575df8c1e407e83557141183c593
|
[] |
no_license
|
NotorionN/l2j-universe
|
8dfe529c4c1ecf0010faead9e74a07d0bc7fa380
|
4d05cbd54f5586bf13e248e9c853068d941f8e57
|
refs/heads/master
| 2020-12-24T16:15:10.425510
| 2013-11-23T19:35:35
| 2013-11-23T19:35:35
| 37,354,291
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,010
|
java
|
/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests;
import lineage2.gameserver.model.instances.NpcInstance;
import lineage2.gameserver.model.quest.Quest;
import lineage2.gameserver.model.quest.QuestState;
import lineage2.gameserver.scripts.ScriptFile;
public class _146_TheZeroHour extends Quest implements ScriptFile
{
private static int KAHMAN = 31554;
private static int STAKATO_QUEENS_FANG = 14859;
private static int KAHMANS_SUPPLY_BOX = 14849;
private static int QUEEN_SHYEED_ID = 25671;
@Override
public void onLoad()
{
}
@Override
public void onReload()
{
}
@Override
public void onShutdown()
{
}
public _146_TheZeroHour()
{
super(true);
addStartNpc(KAHMAN);
addTalkId(KAHMAN);
addKillId(QUEEN_SHYEED_ID);
addQuestItem(STAKATO_QUEENS_FANG);
}
@Override
public String onEvent(String event, QuestState st, NpcInstance npc)
{
int cond = st.getCond();
String htmltext = event;
if (event.equals("merc_kahmun_q0146_0103.htm") && (cond == 0))
{
st.setCond(1);
st.setState(STARTED);
st.playSound(SOUND_ACCEPT);
}
if (event.equals("reward") && (cond == 2))
{
htmltext = "merc_kahmun_q0146_0107.htm";
st.takeItems(STAKATO_QUEENS_FANG, -1);
st.giveItems(KAHMANS_SUPPLY_BOX, 1);
st.addExpAndSp(2850000, 3315000);
st.exitCurrentQuest(false);
}
return htmltext;
}
@Override
public String onTalk(NpcInstance npc, QuestState st)
{
String htmltext = "noquest";
int npcId = npc.getNpcId();
int cond = st.getCond();
QuestState InSearchOfTheNest = st.getPlayer().getQuestState(_109_InSearchOfTheNest.class);
if (npcId == KAHMAN)
{
if (cond == 0)
{
if (st.getPlayer().getLevel() >= 81)
{
if ((InSearchOfTheNest != null) && InSearchOfTheNest.isCompleted())
{
htmltext = "merc_kahmun_q0146_0101.htm";
}
else
{
htmltext = "merc_kahmun_q0146_0104.htm";
}
}
else
{
htmltext = "merc_kahmun_q0146_0102.htm";
}
}
else if ((cond == 1) && (st.getQuestItemsCount(STAKATO_QUEENS_FANG) < 1))
{
htmltext = "merc_kahmun_q0146_0105.htm";
}
else if (cond == 2)
{
htmltext = "merc_kahmun_q0146_0106.htm";
}
}
return htmltext;
}
@Override
public String onKill(NpcInstance npc, QuestState st)
{
if (st.getState() == STARTED)
{
st.setCond(2);
st.giveItems(STAKATO_QUEENS_FANG, 1);
}
return null;
}
}
|
[
"jmendezsr@gmail.com"
] |
jmendezsr@gmail.com
|
6cce3158cb4848e7fc6bb8d68d08060c4952a0af
|
0529524c95045b3232f6553d18a7fef5a059545e
|
/app/src/androidTest/java/TestCase_com_fsecure_freedome_vpn_security_privacy_android__702091896.java
|
5da426f2d9023ece15abec7daf0ecb074dc47f83
|
[] |
no_license
|
sunxiaobiu/BasicUnitAndroidTest
|
432aa3e10f6a1ef5d674f269db50e2f1faad2096
|
fed24f163d21408ef88588b8eaf7ce60d1809931
|
refs/heads/main
| 2023-02-11T21:02:03.784493
| 2021-01-03T10:07:07
| 2021-01-03T10:07:07
| 322,577,379
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 526
|
java
|
import android.net.VpnService.Builder;
import androidx.test.runner.AndroidJUnit4;
import org.easymock.EasyMock;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
public class TestCase_com_fsecure_freedome_vpn_security_privacy_android__702091896 {
@Test
public void testCase() throws Exception {
Object var2 = EasyMock.createMock(Builder.class);
var2 = EasyMock.createMock(Builder.class);
String var1 = "android";
((Builder)var2).addSearchDomain(var1);
}
}
|
[
"sunxiaobiu@gmail.com"
] |
sunxiaobiu@gmail.com
|
d786e95b72aa9c9e009e9a562965d69e3a619f53
|
660adc8ca6bb09ce5f943c0e6a8e874b80edd864
|
/src/test/java/top/parak/examarrangementsystem/service/RecruitApproverServiceTest.java
|
17103eb02044533ec0437b55af523997b04e3035
|
[] |
no_license
|
Khighness/eas-server
|
0fa4f3e13f8f2eb0345739c0cd990f80f41b3b35
|
8eec058fa04bc2d88100431bbf440ab855f4f267
|
refs/heads/master
| 2023-05-03T16:54:42.952272
| 2021-05-19T06:27:35
| 2021-05-19T06:27:35
| 330,572,340
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,695
|
java
|
package top.parak.examarrangementsystem.service;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import top.parak.examarrangementsystem.entity.RecruitApprover;
import static org.junit.jupiter.api.Assertions.*;
@Slf4j
@SpringBootTest
class RecruitApproverServiceTest {
@Autowired
private RecruitApproverService recruitApproverService;
@Test
void saveRecruitApprover() {
int result = recruitApproverService.saveRecruitApprover(
RecruitApprover.builder()
.email("1823676372@qq.com")
.password("CZK666")
.build()
);
assertEquals(1, result);
}
@Test
void countOfRecruitApprover() {
log.info("招办审批员数量:{}", recruitApproverService.countOfRecruitApprover());
}
@Test
void getRecruitApproverById() {
log.info("ID为[1]的考点管理员信息:{}", recruitApproverService.getRecruitApproverById(1L));
}
@Test
void getRecruitApproverByEmail() {
log.info("邮箱为[2298148442@qq.com]的考点管理员信息:{}", recruitApproverService.getRecruitApproverByEmail("2298148442@qq.com"));
}
@Test
void getRecruitApproverByEmailAndPassword() {
log.info("邮箱为[1823676372@qq.com],密码为[CZK666]的考点管理员信息:{}", recruitApproverService.getRecruitApproverByEmailAndPassword("1823676372@qq.com", "CZK666"));
}
@Test
void getRecruitApproverList() {
recruitApproverService.getRecruitApproverList().stream().forEach( e -> { log.info(e.toString()); } );
}
@Test
void getRecruitApproverByPage() {
recruitApproverService.getRecruitApproverByPage(1, 1).stream().forEach( e -> { log.info(e.toString()); } );
}
@Test
void updateRecruitApproverPasswordById() {
int result = recruitApproverService.updateRecruitApproverPasswordById(1L, "KAG1823");
assertEquals(1, result);
}
@Test
void updateRecruitApproverInfoById() {
int result = recruitApproverService.updateRecruitApproverInfoById(
RecruitApprover.builder()
.id(1L)
.gender("男")
.build()
);
assertEquals(1, result);
}
@Test
void deleteRecruitApproverById() {
int result = recruitApproverService.deleteRecruitApproverById(1L);
assertEquals(1, result);
}
}
|
[
"1823676372@qq.com"
] |
1823676372@qq.com
|
f17380d2f56ec97fac0c9501e766dbd21346b73a
|
195fcd42d1718c81238b5216476e427f0486b656
|
/sponge/src/main/java/com/griefdefender/configuration/category/VisualCategory.java
|
96c55ec4350cab00364733f12b65b78413f5d871
|
[
"MIT"
] |
permissive
|
BrainStone/GriefDefender
|
5538c250f4f28596df4d310a1cf7bac760b71341
|
08108592a223c5102271cf5adabe5f03f54533b4
|
refs/heads/master
| 2023-02-03T10:53:35.591825
| 2020-12-25T22:31:44
| 2020-12-25T22:31:44
| 324,441,380
| 0
| 0
|
MIT
| 2020-12-25T22:16:34
| 2020-12-25T22:16:34
| null |
UTF-8
|
Java
| false
| false
| 7,336
|
java
|
/*
* This file is part of GriefDefender, licensed under the MIT License (MIT).
*
* Copyright (c) bloodmc
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.griefdefender.configuration.category;
import ninja.leaping.configurate.objectmapping.Setting;
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
import org.spongepowered.api.MinecraftVersion;
import org.spongepowered.api.Sponge;
@ConfigSerializable
public class VisualCategory extends ConfigCategory {
@Setting(value = "hide-borders-when-using-wecui", comment = "Whether to hide the glowstone/gold block borders when using WECUI.")
public boolean hideBorders = false;
@Setting(value = "hide-fillers-when-using-wecui", comment = "Whether to hide the block fillers when using WECUI.")
public boolean hideFillers = false;
@Setting(value = "hide-wecui-drag-visuals-2d", comment = "Whether drag visuals should be shown while creating a claim in 2D mode.")
public boolean hideDrag2d = true;
@Setting(value = "client-visuals-per-tick", comment = "The amount of block visuals a client can receive per tick when showing/hiding claims. Default: 12")
public int clientVisualsPerTick = 12;
@Setting(value = "claim-create-block", comment = "The visual block used during claim creation. (Default: minecraft:diamond_block)")
public String claimCreateStartBlock = "minecraft:diamond_block";
@Setting(value = "filler-spacing", comment = "The space between each filler visual block.")
public int fillerSpacing = 10;
@Setting(value = "active-claim-visual-time", comment = "The active time, in seconds, to keep a claim's visuals shown to a player. (Default: 60)"
+ "\nNote: If value is <= 0, GD will use the default value.")
public int claimVisualTime = 60;
@Setting(value = "active-create-block-visual-time", comment = "The active time, in seconds, to keep a claim's create block visual shown to a player. (Default: 180)"
+ "\nNote: This only applies during claim creation."
+ "\nNote: If value is <= 0, GD will use the default value.")
public int createBlockVisualTime = 180;
@Setting(value = "admin-accent-block", comment = "The visual accent block used for admin claims. (Default: minecraft:pumpkin)")
public String visualAdminAccentBlock = "minecraft:pumpkin";
@Setting(value = "admin-corner-block", comment = "The visual corner block used for admin claims. (Default: minecraft:glowstone)")
public String visualAdminCornerBlock = "minecraft:glowstone";
@Setting(value = "admin-filler-block", comment = "The visual filler block used for admin claims. (Default: minecraft:pumpkin)")
public String visualAdminFillerBlock = "minecraft:pumpkin";
@Setting(value = "basic-accent-block", comment = "The visual accent block used for basic claims. (Default: minecraft:gold_block)")
public String visualBasicAccentBlock = "minecraft:gold_block";
@Setting(value = "basic-corner-block", comment = "The visual corner block used for basic claims. (Default: minecraft:glowstone)")
public String visualBasicCornerBlock = "minecraft:glowstone";
@Setting(value = "basic-filler-block", comment = "The visual filler block used for basic claims. (Default: minecraft:gold_block)")
public String visualBasicFillerBlock = "minecraft:gold_block";
@Setting(value = "error-accent-block", comment = "The visual accent block used to visualize an error in a claim. (Default: minecraft:netherrack)")
public String visualErrorAccentBlock = "minecraft:netherrack";
@Setting(value = "error-corner-block", comment = "The visual corner block used to visualize an error in a claim. (Default: minecraft:redstone_ore)")
public String visualErrorCornerBlock = "minecraft:redstone_ore";
@Setting(value = "error-filler-block", comment = "The visual filler block used to visualize an error in a claim. (Default: minecraft:diamond_block)")
public String visualErrorFillerBlock = "minecraft:diamond_block";
@Setting(value = "subdivision-accent-block", comment = "The visual accent block used for subdivision claims. (Default: minecraft:white_wool or minecraft:wool for legacy versions)")
public String visualSubdivisionAccentBlock;
@Setting(value = "subdivision-corner-block", comment = "The visual corner block used for subdivision claims. (Default: minecraft:iron_block)")
public String visualSubdivisionCornerBlock = "minecraft:iron_block";
@Setting(value = "subdivision-filler-block", comment = "The visual filler block used for subdivision claims. (Default: minecraft:white_wool or minecraft:wool for legacy versions)")
public String visualSubdivisionFillerBlock;
@Setting(value = "town-accent-block", comment = "The visual accent block used for town claims. (Default: minecraft:emerald_block)")
public String visualTownAccentBlock = "minecraft:emerald_block";
@Setting(value = "town-corner-block", comment = "The visual corner block used for town claims. (Default: minecraft:glowstone)")
public String visualTownCornerBlock = "minecraft:glowstone";
@Setting(value = "town-filler-block", comment = "The visual filler block used for town claims. (Default: minecraft:emerald_block)")
public String visualTownFillerBlock = "minecraft:emerald_block";
@Setting(value = "nature-accent-block", comment = "The visual accent block used while in restore nature mode. (Default: minecraft:diamond_block)")
public String visualNatureAccentBlock = "minecraft:diamond_block";
@Setting(value = "nature-corner-block", comment = "The visual corner block used while in restore nature mode. (Default: minecraft:diamond_block)")
public String visualNatureCornerBlock = "minecraft:diamond_block";
public VisualCategory() {
final MinecraftVersion version = Sponge.getPlatform().getMinecraftVersion();
if (version.getName().contains("1.8.8") || version.getName().contains("1.12")) {
this.visualSubdivisionAccentBlock = "minecraft:wool";
this.visualSubdivisionFillerBlock = "minecraft:wool";
} else {
this.visualSubdivisionAccentBlock = "minecraft:white_wool";
this.visualSubdivisionFillerBlock = "minecraft:white_wool";
}
}
}
|
[
"jdroque@gmail.com"
] |
jdroque@gmail.com
|
0b1d8f3208ab37b16523505b2409647f14dc6299
|
a129386863ccf46cab82819db1dcffac78dd73a0
|
/target/generated-sources/jooq/org/jooq/sources/routines/StApproxsummarystats6.java
|
dd633a6db4d79b005a6c651a529fa3322494142a
|
[] |
no_license
|
alsamancov/jooqzkgis
|
5f01ef8cebfb9c3a9e6e535080987d94fad3290d
|
9082a66c349a1715e5ecdff41671e535eaa45ce4
|
refs/heads/master
| 2021-09-08T12:31:49.647475
| 2018-03-09T16:48:24
| 2018-03-09T16:48:24
| 124,567,389
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| true
| 3,946
|
java
|
/*
* This file is generated by jOOQ.
*/
package org.jooq.sources.routines;
import javax.annotation.Generated;
import org.jooq.Field;
import org.jooq.Parameter;
import org.jooq.impl.AbstractRoutine;
import org.jooq.sources.Public;
import org.jooq.sources.udt.records.SummarystatsRecord;
/**
* This class is generated by jOOQ.
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.10.3"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class StApproxsummarystats6 extends AbstractRoutine<SummarystatsRecord> {
private static final long serialVersionUID = -1302548542;
/**
* The parameter <code>public.st_approxsummarystats.RETURN_VALUE</code>.
*/
public static final Parameter<SummarystatsRecord> RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.sources.udt.Summarystats.SUMMARYSTATS.getDataType(), false, false);
/**
* The parameter <code>public.st_approxsummarystats.rastertable</code>.
*/
public static final Parameter<String> RASTERTABLE = createParameter("rastertable", org.jooq.impl.SQLDataType.CLOB, false, false);
/**
* The parameter <code>public.st_approxsummarystats.rastercolumn</code>.
*/
public static final Parameter<String> RASTERCOLUMN = createParameter("rastercolumn", org.jooq.impl.SQLDataType.CLOB, false, false);
/**
* The parameter <code>public.st_approxsummarystats.nband</code>.
*/
public static final Parameter<Integer> NBAND = createParameter("nband", org.jooq.impl.SQLDataType.INTEGER, false, false);
/**
* The parameter <code>public.st_approxsummarystats.sample_percent</code>.
*/
public static final Parameter<Double> SAMPLE_PERCENT = createParameter("sample_percent", org.jooq.impl.SQLDataType.DOUBLE, false, false);
/**
* Create a new routine call instance
*/
public StApproxsummarystats6() {
super("st_approxsummarystats", Public.PUBLIC, org.jooq.sources.udt.Summarystats.SUMMARYSTATS.getDataType());
setReturnParameter(RETURN_VALUE);
addInParameter(RASTERTABLE);
addInParameter(RASTERCOLUMN);
addInParameter(NBAND);
addInParameter(SAMPLE_PERCENT);
setOverloaded(true);
}
/**
* Set the <code>rastertable</code> parameter IN value to the routine
*/
public void setRastertable(String value) {
setValue(RASTERTABLE, value);
}
/**
* Set the <code>rastertable</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void setRastertable(Field<String> field) {
setField(RASTERTABLE, field);
}
/**
* Set the <code>rastercolumn</code> parameter IN value to the routine
*/
public void setRastercolumn(String value) {
setValue(RASTERCOLUMN, value);
}
/**
* Set the <code>rastercolumn</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void setRastercolumn(Field<String> field) {
setField(RASTERCOLUMN, field);
}
/**
* Set the <code>nband</code> parameter IN value to the routine
*/
public void setNband(Integer value) {
setValue(NBAND, value);
}
/**
* Set the <code>nband</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void setNband(Field<Integer> field) {
setField(NBAND, field);
}
/**
* Set the <code>sample_percent</code> parameter IN value to the routine
*/
public void setSamplePercent(Double value) {
setValue(SAMPLE_PERCENT, value);
}
/**
* Set the <code>sample_percent</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void setSamplePercent(Field<Double> field) {
setField(SAMPLE_PERCENT, field);
}
}
|
[
"alsamancov@gmail.com"
] |
alsamancov@gmail.com
|
088d921634f9396ed33f7829de5ee9ee4ee96c29
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/live/model/m$a$i$$ExternalSyntheticLambda4.java
|
fcc4b61458853a609ecef662229f83ada67f7936
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 428
|
java
|
package com.tencent.mm.live.model;
import com.tencent.mm.ui.widget.a.g.c;
public final class m$a$i$$ExternalSyntheticLambda4
implements g.c
{
public final void onDialogClick(boolean arg1, String arg2) {}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes2.jar
* Qualified Name: com.tencent.mm.live.model.m.a.i..ExternalSyntheticLambda4
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
a1be4bfb61160e9b717cd566585586b8f55cab2a
|
f214289d71523ec1b0934e528d9009531fc34e00
|
/core/src/main/generated-java/com/neofect/gts/core/services/sm/repository/SubSumRepository_.java
|
bf9641c08c6f1fb20930390c545ca82e616ac169
|
[] |
no_license
|
oilpal/gts_backend_apigen
|
5d16cfb267bdfbdef1f3792f8bb06f2805491e87
|
dac16b52dd661a5935cb73c4e7e656c49e8de693
|
refs/heads/master
| 2022-04-09T15:17:52.474514
| 2020-03-05T08:10:57
| 2020-03-05T08:10:57
| 244,796,425
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,456
|
java
|
/*
* Source code generated by UnvUS.
* Copyright(c) 2017 unvus.com All rights reserved.
* Template skrull-pack-mybatis:src/main/java/repository/RepositoryBase.e.vm.java
* Template is part of project: https://git.unvus.com/unvus/opensource/pack-unvus-mybatis
*/
package com.neofect.gts.core.services.sm.repository;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.neofect.gts.core.services.sm.domain.SubSum;
import com.unvus.config.mybatis.pagination.Pageable;
import com.unvus.config.mybatis.support.DefaultMapper;
/**
* Repository for {@link SubSum}
* @see com.neofect.gts.core.services.sm.repository.SubSumRepository
*/
@DefaultMapper
@Repository
public interface SubSumRepository_ {
SubSum simpleGetSubSum(Long id);
int simpleListSubSumCnt(Map<String, Object> params);
/**
* if yuou want to avoid result objects less than dataPerPage caused by "1:N mappings".. <br/>
* add function that return "distinct id list" and name it with : <br/>
* <code>List<Long> listSubSumIds(Map<String, Object> params)</code> <br/>
* and replace @Pageable with : <br/>
* <code>@Pageable(useMergeQuery = true)</code> <br/>
*/
@Pageable
List<SubSum> simpleListSubSum(Map<String, Object> params);
int insertSubSum(SubSum subSum);
int updateSubSum(SubSum subSum);
int updateSubSumDynamic(SubSum subSum);
int deleteSubSum(Long id);
}
|
[
"jd@relaybrand.com"
] |
jd@relaybrand.com
|
16458804933181a47700f3d5d7fe0e260d56da6e
|
097df92ce1bfc8a354680725c7d10f0d109b5b7d
|
/com/amazon/ws/emr/hadoop/fs/shaded/com/google/gson/internal/Streams$1.java
|
6fac25c6617cd6f70da3acd6db4715adf1478195
|
[] |
no_license
|
cozos/emrfs-hadoop
|
7a1a1221ffc3aa8c25b1067cf07d3b46e39ab47f
|
ba5dfa631029cb5baac2f2972d2fdaca18dac422
|
refs/heads/master
| 2022-10-14T15:03:51.500050
| 2022-10-06T05:38:49
| 2022-10-06T05:38:49
| 233,979,996
| 2
| 2
| null | 2022-10-06T05:41:46
| 2020-01-15T02:24:16
|
Java
|
UTF-8
|
Java
| false
| false
| 260
|
java
|
package com.amazon.ws.emr.hadoop.fs.shaded.com.google.gson.internal;
class Streams$1 {}
/* Location:
* Qualified Name: com.amazon.ws.emr.hadoop.fs.shaded.com.google.gson.internal.Streams.1
* Java Class Version: 5 (49.0)
* JD-Core Version: 0.7.1
*/
|
[
"Arwin.tio@adroll.com"
] |
Arwin.tio@adroll.com
|
357ee045182e69979424c8bcd8641cbe75eede5e
|
34434692778a37be3f4507340f123676882388b5
|
/Patterns_CollectOrganize/src/sa_CollectOrganize/SoftwareArchitecture.java
|
63471d19c8081c41559eb566f051236104fb6e90
|
[] |
no_license
|
sahayapurv/MasterThesis---Pattern-Sirius
|
f0e2ecdc7ee6abf356ae16a985da05333d32b939
|
a896ca971b5f44732ffae553d7bdf70eb1373b17
|
refs/heads/master
| 2020-03-23T16:38:16.733959
| 2018-07-21T15:04:17
| 2018-07-21T15:04:17
| 141,821,111
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,897
|
java
|
/**
*/
package sa_CollectOrganize;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Software Architecture</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link sa_CollectOrganize.SoftwareArchitecture#getSAElements <em>SA Elements</em>}</li>
* <li>{@link sa_CollectOrganize.SoftwareArchitecture#getLinks <em>Links</em>}</li>
* </ul>
*
* @see sa_CollectOrganize.SaPackage#getSoftwareArchitecture()
* @model
* @generated
*/
public interface SoftwareArchitecture extends EObject {
/**
* Returns the value of the '<em><b>SA Elements</b></em>' containment reference list.
* The list contents are of type {@link sa_CollectOrganize.SAElement}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>SA Elements</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>SA Elements</em>' containment reference list.
* @see sa_CollectOrganize.SaPackage#getSoftwareArchitecture_SAElements()
* @model containment="true"
* @generated
*/
EList<SAElement> getSAElements();
/**
* Returns the value of the '<em><b>Links</b></em>' containment reference list.
* The list contents are of type {@link sa_CollectOrganize.Link}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Links</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Links</em>' containment reference list.
* @see sa_CollectOrganize.SaPackage#getSoftwareArchitecture_Links()
* @model containment="true"
* @generated
*/
EList<Link> getLinks();
} // SoftwareArchitecture
|
[
"sahayapurv@gmail.com"
] |
sahayapurv@gmail.com
|
96873110da80d1ae63148076eb303b238ab8d7a4
|
93740012e907b568a0a8c842aeb27769ad2024ed
|
/classlib/java.base/src/main/resources/META-INF/modules/java.base/classes/java/lang/foreign/FunctionDescriptor.java
|
3b6627d7f92c5b3918850b44d5808d00edc2f03e
|
[
"Apache-2.0"
] |
permissive
|
mirkosertic/Bytecoder
|
2beb0dc07d3d00777c9ad6eeb177a978f9a6464b
|
7af3b3c8f26d2f9f922d6ba7dd5ba21ab2acc6db
|
refs/heads/master
| 2023-09-01T12:38:20.003639
| 2023-08-17T04:59:00
| 2023-08-25T09:06:25
| 88,152,958
| 831
| 75
|
Apache-2.0
| 2023-09-11T13:47:20
| 2017-04-13T10:21:59
|
Java
|
UTF-8
|
Java
| false
| false
| 5,814
|
java
|
/*
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package java.lang.foreign;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType;
import java.util.Objects;
import java.util.Optional;
import java.util.List;
import jdk.internal.foreign.FunctionDescriptorImpl;
import jdk.internal.javac.PreviewFeature;
/**
* A function descriptor models the signature of foreign functions. A function descriptor is made up of zero or more
* argument layouts and zero or one return layout. A function descriptor is typically used when creating
* {@linkplain Linker#downcallHandle(MemorySegment, FunctionDescriptor, Linker.Option...) downcall method handles} or
* {@linkplain Linker#upcallStub(MethodHandle, FunctionDescriptor, SegmentScope) upcall stubs}.
*
* @implSpec
* Implementing classes are immutable, thread-safe and <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>.
*
* @see MemoryLayout
* @since 19
*/
@PreviewFeature(feature=PreviewFeature.Feature.FOREIGN)
public sealed interface FunctionDescriptor permits FunctionDescriptorImpl {
/**
* {@return the return layout (if any) associated with this function descriptor}
*/
Optional<MemoryLayout> returnLayout();
/**
* {@return the argument layouts associated with this function descriptor (as an immutable list)}.
*/
List<MemoryLayout> argumentLayouts();
/**
* Returns a function descriptor with the given argument layouts appended to the argument layout array
* of this function descriptor.
* @param addedLayouts the argument layouts to append.
* @return the new function descriptor.
*/
FunctionDescriptor appendArgumentLayouts(MemoryLayout... addedLayouts);
/**
* Returns a function descriptor with the given argument layouts inserted at the given index, into the argument
* layout array of this function descriptor.
* @param index the index at which to insert the arguments
* @param addedLayouts the argument layouts to insert at given index.
* @return the new function descriptor.
* @throws IllegalArgumentException if {@code index < 0 || index > argumentLayouts().size()}.
*/
FunctionDescriptor insertArgumentLayouts(int index, MemoryLayout... addedLayouts);
/**
* Returns a function descriptor with the given memory layout as the new return layout.
* @param newReturn the new return layout.
* @return the new function descriptor.
*/
FunctionDescriptor changeReturnLayout(MemoryLayout newReturn);
/**
* Returns a function descriptor with the return layout dropped. This is useful to model functions
* which return no values.
* @return the new function descriptor.
*/
FunctionDescriptor dropReturnLayout();
/**
* Returns the method type consisting of the carrier types of the layouts in this function descriptor.
* <p>
* The carrier type of a layout is determined as follows:
* <ul>
* <li>If the layout is a {@link ValueLayout} the carrier type is determined through {@link ValueLayout#carrier()}.</li>
* <li>If the layout is a {@link GroupLayout} the carrier type is {@link MemorySegment}.</li>
* <li>If the layout is a {@link PaddingLayout}, or {@link SequenceLayout} an {@link IllegalArgumentException} is thrown.</li>
* </ul>
*
* @return the method type consisting of the carrier types of the layouts in this function descriptor
* @throws IllegalArgumentException if one or more layouts in the function descriptor can not be mapped to carrier
* types (e.g. if they are sequence layouts or padding layouts).
*/
MethodType toMethodType();
/**
* Creates a function descriptor with the given return and argument layouts.
* @param resLayout the return layout.
* @param argLayouts the argument layouts.
* @return the new function descriptor.
*/
static FunctionDescriptor of(MemoryLayout resLayout, MemoryLayout... argLayouts) {
Objects.requireNonNull(resLayout);
// Null checks are implicit in List.of(argLayouts)
return FunctionDescriptorImpl.of(resLayout, List.of(argLayouts));
}
/**
* Creates a function descriptor with the given argument layouts and no return layout.
* @param argLayouts the argument layouts.
* @return the new function descriptor.
*/
static FunctionDescriptor ofVoid(MemoryLayout... argLayouts) {
// Null checks are implicit in List.of(argLayouts)
return FunctionDescriptorImpl.ofVoid(List.of(argLayouts));
}
}
|
[
"mirko.sertic@web.de"
] |
mirko.sertic@web.de
|
28814550e1953b708f1e4286988a17134170efa2
|
b6e99b0346572b7def0e9cdd1b03990beb99e26f
|
/src/gcom/cadastro/localidade/ControladorLocalidadeLocalHome.java
|
1c66726825653d4720d93bf097bfdc40ae4e5e44
|
[] |
no_license
|
prodigasistemas/gsan
|
ad64782c7bc991329ce5f0bf5491c810e9487d6b
|
bfbf7ad298c3c9646bdf5d9c791e62d7366499c1
|
refs/heads/master
| 2023-08-31T10:47:21.784105
| 2023-08-23T17:53:24
| 2023-08-23T17:53:24
| 14,600,520
| 19
| 20
| null | 2015-07-29T19:39:10
| 2013-11-21T21:24:16
|
Java
|
ISO-8859-1
|
Java
| false
| false
| 723
|
java
|
package gcom.cadastro.localidade;
import javax.ejb.CreateException;
/**
* <p>
*
* Title: GCOM
* </p>
* <p>
*
* Description: Sistema de Gestão Comercial
* </p>
* <p>
*
* Copyright: Copyright (c) 2004
* </p>
* <p>
*
* Company: COMPESA - Companhia Pernambucana de Saneamento
* </p>
*
* @author not attributable
* @version 1.0
*/
public interface ControladorLocalidadeLocalHome extends javax.ejb.EJBLocalHome {
/**
* < <Descrição do método>>
*
* @return Descrição do retorno
* @exception CreateException
* Descrição da exceção
*/
public ControladorLocalidadeLocal create() throws CreateException;
}
|
[
"piagodinho@gmail.com"
] |
piagodinho@gmail.com
|
e13798a45caa3f746a1c275d3cfad24a3f39db75
|
bb7f944f4fe14358a1f84898f3a0b12cf1590c9a
|
/android/support/v4/view/MotionEventCompatHoneycombMr1.java
|
c9ed574b8df8a2de01db23d2c37463e2d6497485
|
[] |
no_license
|
snehithraj27/Pedometer-Android-Application
|
0c53fe02840920c0449baeb234eda4b43b6cf8b6
|
e0d93eda0b5943b6ab967d38f7aa3240d2501dfb
|
refs/heads/master
| 2020-03-07T01:28:11.432466
| 2018-03-28T18:54:59
| 2018-03-28T18:54:59
| 127,184,714
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 622
|
java
|
package android.support.v4.view;
import android.view.MotionEvent;
class MotionEventCompatHoneycombMr1
{
static float getAxisValue(MotionEvent paramMotionEvent, int paramInt)
{
return paramMotionEvent.getAxisValue(paramInt);
}
static float getAxisValue(MotionEvent paramMotionEvent, int paramInt1, int paramInt2)
{
return paramMotionEvent.getAxisValue(paramInt1, paramInt2);
}
}
/* Location: /Users/snehithraj/Desktop/a/dex2jar-2.0/classes-dex2jar.jar!/android/support/v4/view/MotionEventCompatHoneycombMr1.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"snehithraj27@users.noreply.github.com"
] |
snehithraj27@users.noreply.github.com
|
8c6a521e9d0f765e2eed51eb8ce607d4fd02461c
|
b451d80fa0f3d831a705ed58314b56dcd180ef4a
|
/kpluswebup_dao/src/main/java/com/kpluswebup/web/domain/CustomerGroupSetDTO.java
|
dca40ec1fd428d8ca5258633e39fa19d4d983474
|
[] |
no_license
|
beppezhang/sobe
|
8cbd9bbfcc81330964c2212c2a75f71fe98cc8df
|
5fafd84d96a3b082edbadced064a9c135115e719
|
refs/heads/master
| 2021-01-13T06:03:19.431407
| 2017-06-22T03:35:54
| 2017-06-22T03:35:54
| 95,071,332
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,058
|
java
|
package com.kpluswebup.web.domain;
import java.util.Date;
/**
* @author Administrator 会员分组条件
*/
public class CustomerGroupSetDTO extends BaseDTO {
private Long id;
private String groupID;
private Integer setType; // 条件类型 1:年龄 2:累计积分3:消费金额 4:注册日期5可用积分6性别
private String minimum;
private String maxmum;
private Integer isDeleted;
private String creator;
private Date createTime;
private String modifier;
private Date modifyTime;
public String getGroupID() {
return groupID;
}
public void setGroupID(String groupID) {
this.groupID = groupID;
}
public Integer getSetType() {
return setType;
}
public void setSetType(Integer setType) {
this.setType = setType;
}
public String getMinimum() {
return minimum;
}
public void setMinimum(String minimum) {
this.minimum = minimum;
}
public String getMaxmum() {
return maxmum;
}
public void setMaxmum(String maxmum) {
this.maxmum = maxmum;
}
public Integer getIsDeleted() {
return isDeleted;
}
public void setIsDeleted(Integer isDeleted) {
this.isDeleted = isDeleted;
}
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getModifier() {
return modifier;
}
public void setModifier(String modifier) {
this.modifier = modifier;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}
|
[
"zhangshangliang@sunlight.bz"
] |
zhangshangliang@sunlight.bz
|
a4c57085c5280a9869b9cd452c937b52205c3f1a
|
9f1b16f8724b1f2927e19da117dc9fb570dbf22c
|
/DNacosDemo/model/src/main/java/com/amd/bean/DemoBean.java
|
73722bc99fe2250529937d9fcdce078bbd18cb8a
|
[] |
no_license
|
jurson86/dubbo-nacos-demo
|
c7b24493f8cb73caba13ef0151eb8bf6bff0d8ff
|
6ddcfe4604d43e462349734c15c33a4ca61c8972
|
refs/heads/master
| 2022-07-02T15:32:41.759668
| 2019-08-10T07:15:13
| 2019-08-10T07:15:13
| 201,359,008
| 0
| 0
| null | 2022-06-10T19:58:53
| 2019-08-09T00:36:32
|
Java
|
UTF-8
|
Java
| false
| false
| 161
|
java
|
package com.amd.bean;
/**
* @ClassName DemoBean
* @Description: TODO
* @Author koumingming
* @Date 2019/8/5
* @Version V1.0
**/
public class DemoBean {
}
|
[
"user@example.com"
] |
user@example.com
|
71085c92869023ea106b7b9a025c42cdcbe1a8a8
|
db73c83b672acbbf16df102b59ca31427725bd7d
|
/l8/ll.java
|
8932bfe8b279d281d5db143a2fb7b816755a161f
|
[] |
no_license
|
Tarun1999chandila/java_codes
|
e9e136b332cb1843c1e733014a269106c6d04aef
|
d08afdb1bbf150dc1623281134911c8a61db2236
|
refs/heads/master
| 2022-11-18T10:44:13.988325
| 2020-07-13T16:11:47
| 2020-07-13T16:11:47
| 279,351,095
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,926
|
java
|
package l8;
import java.util.*;
public class ll {
private class node {
public node(int i) {
// TODO Auto-generated constructor stub
this.data = i;
}
public node() {
// TODO Auto-generated constructor stub
}
int data;
node next;
}
private node head;
private node tail;
private int size;
public boolean isEmpty() {
return size == 0;
}
public int getfirst() throws Exception {
if (size == 0) {
throw new Exception("LL is empty");
}
return head.data;
}
public int getlast() throws Exception {
if (size == 0) {
throw new Exception("LL is empty");
}
return tail.data;
}
public int getat(int idx) throws Exception {
if (size == 0) {
throw new Exception("LL is empty");
}
if (idx < 0 || idx >= size) {
throw new Exception("invalid index");
}
node temp = head;
for (int i = 0; i < idx; i++) {
temp = temp.next;
}
return temp.data;
}
public node getnodeat(int idx) throws Exception {
if (size == 0) {
throw new Exception("LL is empty");
}
if (idx < 0 || idx >= size) {
throw new Exception("invalid index");
}
node temp = head;
for (int i = 0; i < idx; i++) {
temp = temp.next;
}
return temp;
}
public void display() {
System.out.println("---------------------");
node temp = head;
while (temp != null) {
System.out.print(temp.data + " ");
temp = temp.next;
}
System.out.println(".");
System.out.println("---------------------");
}
public void addlast(int item) {
node nn = new node();
nn.data = item;
if (size > 0) {
tail.next = nn;
}
if (size == 0) {
head = tail = nn;
this.size++;
} else {
tail = nn;
size++;
}
}
public void addfirst(int item) {
node nn = new node();
nn.data = item;
if (size > 0) {
nn.next = head;
} else if (size == 0) {
head = tail = nn;
size++;
} else {
head = nn;
size++;
}
}
public void addAt(int item, int idx) throws Exception {
if (size == 0) {
throw new Exception("ll is empty");
}
if (idx < 0 || idx >= size) {
throw new Exception("invalid index");
}
if (idx == 0) {
addfirst(item);
return;
} else if (idx == size) {
addlast(item);
return;
}
// create a new node
node nn = new node();
nn.data = item;
nn.next = null;
// links set
node nm1 = getnodeat(idx - 1);
node np1 = nm1.next;
nm1.next = nn;
nn.next = np1;
// data members
size++;
}
public int removeFirst() throws Exception {
if (size == 0) {
throw new Exception("LL is Empty.");
}
int temp = head.data;
if (size == 1) {
head = tail = null;
size--;
} else {
head = head.next;
size--;
}
return temp;
}
public int removeLast() throws Exception {
if (size == 0) {
throw new Exception("LL is Empty.");
}
int temp = tail.data;
if (size == 1) {
head = tail = null;
size--;
} else {
tail = getnodeat(size - 2);
tail.next = null;
size--;
}
return temp;
}
public int removeAt(int idx) throws Exception {
if (size == 0) {
throw new Exception("LL is Empty.");
}
if (idx < 0 || idx >= size) {
throw new Exception("Invalid Index.");
}
if (idx == 0) {
return removeFirst();
} else if (idx == size - 1) {
return removeLast();
} else {
node nm1 = getnodeat(idx - 1);
node n = nm1.next;
node np1 = n.next;
nm1.next = np1;
size--;
return n.data;
}
}
public int kthfromlast(int k) {
node slow = head;
node fast = head;
for (int i = 0; i < k; i++) {
fast = fast.next;
}
while (fast.next != null) {
fast = fast.next;
slow = slow.next;
}
return slow.data;
}
public static void main(String[] args) throws Exception {
// TODO Auto-generated method stub
ll list = new ll();
Scanner scn=new Scanner(System.in);
int n=0;
while(n!=-1){
n=scn.nextInt();
list.addlast(n);
}
int m=scn.nextInt();
System.out.println(list.kthfromlast(m));
}
}
|
[
"you@example.com"
] |
you@example.com
|
aa2dbae6d4d3595a9a3a7f49e313df24b0aafba2
|
41bcdf4ebfaccc8c4e88cec995cd9c468916ecff
|
/Chapter2/Messaging_and_social_networking/SamplePush/app/src/main/java/com/example/samplepush/MainActivity.java
|
ca30cb0c0e1acf5110df53b4b16242913614b71e
|
[] |
no_license
|
LeeSM0518/Android
|
c2f788974ba9e3a6b5fd14de08efabfe2f97a20a
|
e2d99d017c4d4be9e8d930e1e041aa37aa825347
|
refs/heads/master
| 2021-07-13T14:20:56.427947
| 2020-06-11T18:39:18
| 2020-06-11T18:39:18
| 163,975,884
| 0
| 0
| null | 2019-02-24T13:43:51
| 2019-01-03T13:22:00
|
Java
|
UTF-8
|
Java
| false
| false
| 2,497
|
java
|
package com.example.samplepush;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.iid.InstanceIdResult;
public class MainActivity extends AppCompatActivity {
TextView textView;
TextView textView2;
EditText editText;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textView = findViewById(R.id.receiveTextView);
textView2 = findViewById(R.id.dataTextView);
editText = findViewById(R.id.sendEditText);
FirebaseInstanceId.getInstance().getInstanceId()
.addOnSuccessListener(this, new OnSuccessListener<InstanceIdResult>() {
@Override
public void onSuccess(InstanceIdResult instanceIdResult) {
String newToken = instanceIdResult.getToken();
println("등록 id : " + newToken);
}
});
Button button = findViewById(R.id.button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String instanceId = FirebaseInstanceId.getInstance().getId();
println("확인된 인스턴스 id : " + instanceId);
}
});
}
public void println(String data) {
textView2.append(data + "\n");
Log.d("FMS", data);
}
@Override
protected void onNewIntent(Intent intent) {
println("onNewIntent 호출됨");
if (intent != null) {
processIntent(intent);
}
super.onNewIntent(intent);
}
@SuppressLint("SetTextI18n")
private void processIntent(Intent intent) {
String from = intent.getStringExtra("from");
if (from == null) {
println("from is null.");
return;
}
String contents = intent.getStringExtra("contents");
println("DATA : " + from + ", " + contents);
textView.setText("[" + from + "]로부터 수신한 데이터 : " + contents);
}
}
|
[
"nalsm98@naver.com"
] |
nalsm98@naver.com
|
cfb50c2a22bafb4cf87a6be2ddb4bff886762c8d
|
8e77ed1d11d3ee6486976bdc6b7c5c1043c4d6df
|
/src/cn/com/oims/dao/pojo/ExamItemAddress.java
|
91d6ed9a3097a8b884540a3e1f3b567a74ce9812
|
[] |
no_license
|
498473645/OIMS
|
e553f266629b7baf0e0dc31bd50edcd534c83c21
|
4477b5882e6478c3cac44c83a2d2539eb98e887a
|
refs/heads/main
| 2023-08-07T04:41:21.592563
| 2021-09-23T03:10:21
| 2021-09-23T03:10:21
| 409,429,603
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,070
|
java
|
package cn.com.oims.dao.pojo;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
/**
* @author: hh
* @date: 2021/8/19
*/
@Entity
@Table(name = "exam_item_address")
public class ExamItemAddress implements Serializable {
@Id
@Column(name = "deptCode")
private String deptCode;
private String name;
private String location;
private String memos;
public String getLocation() {
return this.location;
}
public void setLocation(String location) {
this.location = location;
}
public String getDeptCode() {
return this.deptCode;
}
public void setDeptCode(String deptCode) {
this.deptCode = deptCode;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getMemos() {
return memos;
}
public void setMemos(String memos) {
this.memos = memos;
}
}
|
[
"you@example.com"
] |
you@example.com
|
51d049981865a603fc89c01b67f75d96cfe61727
|
9272784a4043bb74a70559016f5ee09b0363f9d3
|
/modules/xiaomai-domain/src/main/java/com/antiphon/xiaomai/modules/dao/custom/CustomSkillDao.java
|
2222ab4efbdbffcaee9f061438223f20e3d92689
|
[] |
no_license
|
sky8866/test
|
dd36dad7e15a5d878e599119c87c1b50bd1f2b93
|
93e1826846d83a5a1d25f069dadd169a747151af
|
refs/heads/master
| 2021-01-20T09:27:12.080227
| 2017-08-29T09:33:19
| 2017-08-29T09:33:19
| 101,595,198
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 251
|
java
|
package com.antiphon.xiaomai.modules.dao.custom;
import com.antiphon.xiaomai.modules.dao.base.HibernateDao;
import com.antiphon.xiaomai.modules.entity.custom.CustomSkill;
public interface CustomSkillDao extends HibernateDao<CustomSkill>{
}
|
[
"286549429@qq.com"
] |
286549429@qq.com
|
43ae543695b86e37a834b26c2166c178763ceceb
|
36bbde826ff3e123716dce821020cf2a931abf6e
|
/mason/mason2/core/src/main/java/com/perl5/lang/mason2/psi/stubs/MasonParentNamespacesStubIndex.java
|
46ff0280a5bff16ab547dc0f41f09d9db4cad321
|
[
"Apache-2.0"
] |
permissive
|
Camelcade/Perl5-IDEA
|
0332dd4794aab5ed91126a2c1ecd608f9c801447
|
deecc3c4fcdf93b4ff35dd31b4c7045dd7285407
|
refs/heads/master
| 2023-08-08T07:47:31.489233
| 2023-07-27T05:18:40
| 2023-07-27T06:17:04
| 33,823,684
| 323
| 79
|
NOASSERTION
| 2023-09-13T04:36:15
| 2015-04-12T16:09:15
|
Java
|
UTF-8
|
Java
| false
| false
| 1,448
|
java
|
/*
* Copyright 2015-2023 Alexandr Evstigneev
*
* 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.perl5.lang.mason2.psi.stubs;
import com.intellij.psi.stubs.StubIndexKey;
import com.perl5.lang.mason2.psi.MasonNamespaceDefinition;
import com.perl5.lang.perl.psi.stubs.PerlStubIndexBase;
import org.jetbrains.annotations.NotNull;
public class MasonParentNamespacesStubIndex extends PerlStubIndexBase<MasonNamespaceDefinition> {
public static final int VERSION = 1;
public static final StubIndexKey<String, MasonNamespaceDefinition> KEY = StubIndexKey.createIndexKey("perl.mason2.namespace.parent");
@Override
public int getVersion() {
return super.getVersion() + VERSION;
}
@Override
protected @NotNull Class<MasonNamespaceDefinition> getPsiClass() {
return MasonNamespaceDefinition.class;
}
@Override
public @NotNull StubIndexKey<String, MasonNamespaceDefinition> getKey() {
return KEY;
}
}
|
[
"hurricup@gmail.com"
] |
hurricup@gmail.com
|
6a8e4d5f649ac14c4777c68a05a18135a7c0a576
|
96c989a3c6c7fbd10d2bf8e94cb0eb62ce0fe560
|
/src/main/java/org/rest/sec/dto/User.java
|
ebe7b341a61be7b2c10b7694ed58e454ca29ce46
|
[
"MIT"
] |
permissive
|
vargar2/REST
|
25becc52d9809a5a2c0db8e5fd42580da6f105ca
|
1a1883d74b1b452043d8ef5dc657628ec0cf0f4c
|
refs/heads/master
| 2021-01-20T23:09:48.983228
| 2012-03-09T14:51:35
| 2012-03-09T14:51:35
| 3,680,117
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,600
|
java
|
package org.rest.sec.dto;
import java.util.Set;
import javax.xml.bind.annotation.XmlRootElement;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.rest.common.IEntity;
import org.rest.sec.model.Principal;
import org.rest.sec.model.Role;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
@XmlRootElement
@XStreamAlias( "user" )
public class User implements IEntity{
@XStreamAsAttribute private Long id;
private String name;
private String password;
/* Marshalling */
// - note: this gets rid of the collection entirely
@XStreamImplicit// - note: this requires: xstream.addDefaultImplementation( java.util.HashSet.class, PersistentSet.class );
// @XStreamConverter( value = HibernateCollectionConverter.class )
private Set< Role > roles;
public User(){
super();
}
public User( final String nameToSet, final String passwordToSet, final Set< Role > rolesToSet ){
super();
name = nameToSet;
password = passwordToSet;
roles = rolesToSet;
}
public User( final Principal principal ){
super();
name = principal.getName();
roles = principal.getRoles();
id = principal.getId();
}
// API
@Override
public Long getId(){
return id;
}
@Override
public void setId( final Long idToSet ){
id = idToSet;
}
public String getName(){
return name;
}
public void setName( final String nameToSet ){
name = nameToSet;
}
public String getPassword(){
return password;
}
public void setPassword( final String passwordToSet ){
password = passwordToSet;
}
public Set< Role > getRoles(){
return roles;
}
public void setRoles( final Set< Role > rolesToSet ){
roles = rolesToSet;
}
//
@Override
public int hashCode(){
final int prime = 31;
int result = 1;
result = prime * result + ( ( name == null ) ? 0 : name.hashCode() );
return result;
}
@Override
public boolean equals( final Object obj ){
if( this == obj )
return true;
if( obj == null )
return false;
if( getClass() != obj.getClass() )
return false;
final User other = (User) obj;
if( name == null ){
if( other.name != null )
return false;
}
else if( !name.equals( other.name ) )
return false;
return true;
}
@Override
public String toString(){
return new ToStringBuilder( this ).append( "id", id ).append( "name", name ).toString();
}
}
|
[
"hanriseldon@gmail.com"
] |
hanriseldon@gmail.com
|
675c2a6e98c25d5226f30cdde95ff3598e4476b5
|
d03142402e2e050d68d083fa84b25cb8223221fb
|
/topcoder/tco2020/round4/CovidCinema.java
|
03a45abace5ff2f71b8ade5ac5e33bc682f054ea
|
[
"Unlicense"
] |
permissive
|
mikhail-dvorkin/competitions
|
b859028712d69d6a14ac1b6194e43059e262d227
|
4e781da37faf8c82183f42d2789a78963f9d79c3
|
refs/heads/master
| 2023-09-01T03:45:21.589421
| 2023-08-24T20:24:58
| 2023-08-24T20:24:58
| 93,438,157
| 10
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,452
|
java
|
package topcoder.tco2020.round4;
import java.util.Arrays;
public class CovidCinema {
public String[] seat(int h, int w, int a, int b) {
String[] r;
r = seat(h, w, a, b, 'A', 'B');
if (r != null) return r;
r = seat(h, w, b, a, 'B', 'A');
if (r != null) return r;
return new String[0];
}
public String[] seat(int h, int w, int a, int b, char ca, char cb) {
char[][] ans = new char[h][w];
for (int d = 1; d <= h; d++) {
for (int i = 0; i < h; i++) {
Arrays.fill(ans[i], cb);
}
int count = a;
for (int j = 0; j < w; j++) {
for (int i = 0; i < d; i++) {
ans[i][j] = ca;
if (i + 1 < h) ans[i + 1][j] = '.';
if (j + 1 < w) ans[i][j + 1] = '.';
count--;
if (count == 0) break;
}
if (count == 0) break;
}
if (count > 0) continue;
count = b;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
if (ans[i][j] == cb) {
if (count == 0) ans[i][j] = '.'; else count--;
}
}
}
if (count == 0) {
String[] answer = new String[h];
for (int i = 0; i < h; i++) {
answer[i] = new String(ans[i]);
}
return answer;
}
}
return null;
}
public static void main(String[] args) {
String[] r;
// r = new CovidCinema().seat(5, 5, 1, 1);
// r = new CovidCinema().seat(5, 5, 1, 12);
r = new CovidCinema().seat(5, 5, 12, 1);
r = new CovidCinema().seat(5, 5, 13, 7);
for (String s : r) {
System.out.println(s);
}
}
}
|
[
"mikhail.dvorkin@gmail.com"
] |
mikhail.dvorkin@gmail.com
|
99c2a3d6b83166db050ff3da274c7b28211689a0
|
ea03c0eff8dbdceaab3fc1c3c9e843fadf3018a2
|
/modules/jaxws/test/org/apache/axis2/jaxws/nonanonymous/complextype/NonAnonymousComplexTypeTests.java
|
b376debfe17d128f6cc3b895afd96701b5f914a7
|
[
"Apache-2.0"
] |
permissive
|
cranelab/axis1_3
|
28544dbcf3bf0c9bf59a59441ad8ef21143f70f0
|
1754374507dee9d1502478c454abc1d13bcf15b9
|
refs/heads/master
| 2022-12-28T05:17:18.894411
| 2020-04-22T17:50:05
| 2020-04-22T17:50:05
| 257,970,632
| 0
| 0
|
Apache-2.0
| 2020-10-13T21:25:37
| 2020-04-22T17:21:46
|
Java
|
UTF-8
|
Java
| false
| false
| 2,008
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
*
*/
package org.apache.axis2.jaxws.nonanonymous.complextype;
import javax.xml.ws.WebServiceException;
import junit.framework.TestCase;
import org.apache.axis2.jaxws.nonanonymous.complextype.sei.EchoMessagePortType;
import org.apache.axis2.jaxws.nonanonymous.complextype.sei.EchoMessageService;
import org.apache.axis2.jaxws.TestLogger;
public class NonAnonymousComplexTypeTests extends TestCase {
/**
*
*/
public NonAnonymousComplexTypeTests() {
super();
// TODO Auto-generated constructor stub
}
/**
* @param arg0
*/
public NonAnonymousComplexTypeTests(String arg0) {
super(arg0);
// TODO Auto-generated constructor stub
}
public void testSimpleProxy() {
TestLogger.logger.debug("------------------------------");
TestLogger.logger.debug("Test : " + getName());
try {
String msg = "Hello Server";
EchoMessagePortType myPort = (new EchoMessageService()).getEchoMessagePort();
String response = myPort.echoMessage(msg);
TestLogger.logger.debug(response);
TestLogger.logger.debug("------------------------------");
} catch (WebServiceException webEx) {
webEx.printStackTrace();
fail();
}
}
}
|
[
"45187319+cranelab@users.noreply.github.com"
] |
45187319+cranelab@users.noreply.github.com
|
6dc83d6592fcf0191b049d00023fba8c0f93aafc
|
89723541f3a2cc7087d49dcee592694c5c0513c3
|
/hapi-fhir-structures-r4/src/main/java/org/hl7/fhir/r4/model/codesystems/AuditEntityTypeEnumFactory.java
|
aec8a2c899e8942de8453abc4af74037ff4d91c1
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
rkorytkowski/hapi-fhir
|
7207ae68ff8ef6e876f53b51bbdbd0312ae0daa7
|
9f45c2bcfa00349ce17e191899581f4fc6e8c0d6
|
refs/heads/master
| 2021-07-13T01:06:12.674713
| 2020-06-16T09:11:38
| 2020-06-16T09:12:23
| 145,406,752
| 0
| 2
|
Apache-2.0
| 2018-08-20T11:08:35
| 2018-08-20T11:08:35
| null |
UTF-8
|
Java
| false
| false
| 2,745
|
java
|
package org.hl7.fhir.r4.model.codesystems;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0
import org.hl7.fhir.r4.model.EnumFactory;
public class AuditEntityTypeEnumFactory implements EnumFactory<AuditEntityType> {
public AuditEntityType fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
return null;
if ("1".equals(codeString))
return AuditEntityType._1;
if ("2".equals(codeString))
return AuditEntityType._2;
if ("3".equals(codeString))
return AuditEntityType._3;
if ("4".equals(codeString))
return AuditEntityType._4;
throw new IllegalArgumentException("Unknown AuditEntityType code '"+codeString+"'");
}
public String toCode(AuditEntityType code) {
if (code == AuditEntityType._1)
return "1";
if (code == AuditEntityType._2)
return "2";
if (code == AuditEntityType._3)
return "3";
if (code == AuditEntityType._4)
return "4";
return "?";
}
public String toSystem(AuditEntityType code) {
return code.getSystem();
}
}
|
[
"jamesagnew@gmail.com"
] |
jamesagnew@gmail.com
|
ed3749d10213464469c17da1884aeff61b34f96a
|
cfc60fc1148916c0a1c9b421543e02f8cdf31549
|
/src/testcases/CWE23_Relative_Path_Traversal/CWE23_Relative_Path_Traversal__connect_tcp_54c.java
|
dab50003d9e747c608ab482c7d7aed7eca0fa029
|
[
"LicenseRef-scancode-public-domain"
] |
permissive
|
zhujinhua/GitFun
|
c77c8c08e89e61006f7bdbc5dd175e5d8bce8bd2
|
987f72fdccf871ece67f2240eea90e8c1971d183
|
refs/heads/master
| 2021-01-18T05:46:03.351267
| 2012-09-11T16:43:44
| 2012-09-11T16:43:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,138
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE23_Relative_Path_Traversal__connect_tcp_54c.java
Label Definition File: CWE23_Relative_Path_Traversal.label.xml
Template File: sources-sink-54c.tmpl.java
*/
/*
* @description
* CWE: 23 Relative Path Traversal
* BadSource: connect_tcp Read data using an outbound tcp connection
* GoodSource: A hardcoded string
* Sinks: readFile
* BadSink : no validation
* Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package
*
* */
package testcases.CWE23_Relative_Path_Traversal;
import testcasesupport.*;
import java.io.*;
import javax.servlet.http.*;
public class CWE23_Relative_Path_Traversal__connect_tcp_54c
{
public void bad_sink(String data ) throws Throwable
{
(new CWE23_Relative_Path_Traversal__connect_tcp_54d()).bad_sink(data );
}
/* goodG2B() - use goodsource and badsink */
public void goodG2B_sink(String data ) throws Throwable
{
(new CWE23_Relative_Path_Traversal__connect_tcp_54d()).goodG2B_sink(data );
}
}
|
[
"amitf@chackmarx.com"
] |
amitf@chackmarx.com
|
cbc29152e5b33a199c140f42eed1cd82758cf44d
|
b50782a86abb5d24282777fb0885a789f6412d31
|
/model/springcloud/zuul-server/src/main/java/com/protocol/impl/habit/MoodDetailServiceProtocol.java
|
f6a1841aaa6f8aea7e50cf935adb1965e64223db
|
[] |
no_license
|
wikerx/SpringCloud
|
e53006172f956f96b4da123170a9cfa4b45032ee
|
1da85d1ced395b1e5552bd6b65964aebf078d3fe
|
refs/heads/master
| 2022-12-15T10:48:38.452805
| 2019-06-01T05:06:26
| 2019-06-01T05:06:26
| 171,824,177
| 0
| 0
| null | 2022-12-09T02:42:07
| 2019-02-21T07:42:06
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,649
|
java
|
package com.protocol.impl.habit;
import com.constant.EnumError;
import com.protocol.ProtocolUtilService;
import com.protocol.impl.user.SignInServiceProtocol;
import com.utils.VerifyUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Map;
/**
* 小习惯,心情详情
*/
@Service("MoodDetailServiceProtocol")
public class MoodDetailServiceProtocol implements ProtocolUtilService {
protected final Logger logger = LoggerFactory.getLogger(SignInServiceProtocol.class);
private final static String interfaceDesc = "小习惯,心情详情";
/**
* @param code
* @param inputMap
* @return
*/
@Override
public Map service(String code, Map inputMap) {
HashMap<String, Object> outMap = new HashMap<>();
try {
String id = String.valueOf(inputMap.get("id"));
if (VerifyUtils.isEmpty(code, outMap, id,"id",logger,interfaceDesc))
return outMap;
//校验version,reqtime,sign是否为空,校验sign是否正确
if (VerifyUtils.checkVersionAndReqTimeAndSign(code, inputMap, outMap, id, logger, interfaceDesc))
return outMap;
//签名正确,放过请求
} catch (Exception e) {
logger.error(e.getMessage(), e);
outMap.put("code", EnumError.ERROR_CODE.getCode());
outMap.put("msg", EnumError.ERROR_CODE.getDesc());
logger.info("{} 接口业务逻辑处理结果:{}", interfaceDesc, outMap.get("msg"));
}
return outMap;
}
}
|
[
"18772101110@163.com"
] |
18772101110@163.com
|
12b05bd172eb83843501df13c41cdb6123779628
|
dee086c126b676fc6b0f9c84d7d36d65a8b999b2
|
/Coding Projects/Java/Misc. Projects/Hearts/src/DeckTester.java
|
dbc2912c9c918d868dcf757b4f887693a5ef72df
|
[] |
no_license
|
pokedart9001/Projects-and-Snippets
|
39396ac7de8f1c6056f5d85fe5015279844fbcc1
|
a85421c7dceb0cc2b07ca662e19a6073857884c1
|
refs/heads/main
| 2023-01-31T03:29:10.784606
| 2020-12-11T21:06:22
| 2020-12-11T21:06:22
| 320,661,605
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 740
|
java
|
/**
* This is a class that tests the Deck class.
*/
public class DeckTester {
/**
* The main method in this class checks the Deck operations for consistency.
* @param args is not used.
*/
public static void main(String[] args) {
String[] suits = {"Clubs", "Spades", "Hearts", "Diamonds"};
int[] valuesLow = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
int[] valuesHigh = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};
String[] ranks = {"Test1", "Test2", "Test3", "Test4", "Test5"};
Deck standardDeck = new Deck(suits, valuesHigh);
Deck testDeck = new Deck(suits, valuesLow, ranks);
standardDeck.shuffle(1);
System.out.println(standardDeck);
}
}
|
[
"example@example.com"
] |
example@example.com
|
c66c6a908be626e4d884f21f0fe45b6ae7fd1b4b
|
6635387159b685ab34f9c927b878734bd6040e7e
|
/src/javax/validation/bootstrap/GenericBootstrap.java
|
07699f069f4dde5c835ca1f8d9de2d398f8036cd
|
[] |
no_license
|
RepoForks/com.snapchat.android
|
987dd3d4a72c2f43bc52f5dea9d55bfb190966e2
|
6e28a32ad495cf14f87e512dd0be700f5186b4c6
|
refs/heads/master
| 2021-05-05T10:36:16.396377
| 2015-07-16T16:46:26
| 2015-07-16T16:46:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 485
|
java
|
package javax.validation.bootstrap;
import javax.validation.Configuration;
import javax.validation.ValidationProviderResolver;
public abstract interface GenericBootstrap
{
public abstract Configuration<?> configure();
public abstract GenericBootstrap providerResolver(ValidationProviderResolver paramValidationProviderResolver);
}
/* Location:
* Qualified Name: javax.validation.bootstrap.GenericBootstrap
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
f7b29fddd7ceeea33ce40636f8030248fcc654fd
|
0677e44d856818584226d6978968dd8cccc90c6c
|
/src/main/java/mchorse/aperture/events/CameraEditorPlaybackStateEvent.java
|
61cafa0ca2d158184044d59345bf0efe0672ce35
|
[
"MIT"
] |
permissive
|
HaiNguyen007/aperture
|
d94328a5a83656fc2a80c97e97aefaf34c7df993
|
0bd567e9a4377427b54916d762b245c8951c3018
|
refs/heads/master
| 2020-04-04T06:47:13.922800
| 2018-10-13T14:30:50
| 2018-10-13T14:30:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 610
|
java
|
package mchorse.aperture.events;
import net.minecraftforge.fml.common.eventhandler.Event;
/**
* Camera editor playback state event
*
* This event is fired when the camera editor is either played or paused.
*/
public class CameraEditorPlaybackStateEvent extends Event
{
/**
* Play is true and pause is false
*/
public boolean play;
/**
* Position at which camera editor started playing/was paused
*/
public int position;
public CameraEditorPlaybackStateEvent(boolean play, int position)
{
this.play = play;
this.position = position;
}
}
|
[
"mchorselessrider@gmail.com"
] |
mchorselessrider@gmail.com
|
67f72c073089491a0b7a1c56580e194e8ca40915
|
bde8dfc2cab9852f11167ea1fba072718efd7eeb
|
/acris-widgets-beantable/src/main/java/com/google/gwt/gen2/table/event/client/PageLoadHandler.java
|
e92da7ce82b5b9702067d3dceed97444be68f44b
|
[] |
no_license
|
seges/acris
|
1051395f8900dce44cbaabf373538de6d4a5c565
|
db8bd8f1533a767a4e43b4b8cc1039b0c8882e70
|
refs/heads/master
| 2020-12-13T02:18:28.968038
| 2015-08-29T13:28:07
| 2015-08-29T13:28:07
| 41,421,718
| 4
| 1
| null | 2018-08-21T18:08:35
| 2015-08-26T11:22:52
|
Java
|
UTF-8
|
Java
| false
| false
| 968
|
java
|
/*
* Copyright 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.gwt.gen2.table.event.client;
import com.google.gwt.event.shared.EventHandler;
/**
* Handler interface for {@link PageLoadEvent} events.
*/
public interface PageLoadHandler extends EventHandler {
/**
* Called when a {@link PageLoadEvent} is fired.
*
* @param event the event that was fired
*/
void onPageLoad(PageLoadEvent event);
}
|
[
"sloboda@seges.sk@e28c4d36-3818-11de-97fb-aff7d2a6cc54"
] |
sloboda@seges.sk@e28c4d36-3818-11de-97fb-aff7d2a6cc54
|
9f8b8dfdd82db915d43fed2ff87cdc6d9f430c1d
|
c498cefc16ba5d75b54d65297b88357d669c8f48
|
/gameserver/src/ru/catssoftware/gameserver/model/actor/stat/StaticObjStat.java
|
8e5b08982437d268b6e83eed697fad8b4a2a18f8
|
[] |
no_license
|
ManWithShotgun/l2i-JesusXD-3
|
e17f7307d9c5762b60a2039655d51ab36ec76fad
|
8e13b4dda28905792621088714ebb6a31f223c90
|
refs/heads/master
| 2021-01-17T16:10:42.561720
| 2016-07-22T18:41:22
| 2016-07-22T18:41:22
| 63,967,514
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,113
|
java
|
/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ru.catssoftware.gameserver.model.actor.stat;
import ru.catssoftware.gameserver.model.actor.instance.L2StaticObjectInstance;
public class StaticObjStat extends CharStat
{
public StaticObjStat(L2StaticObjectInstance activeChar)
{
super(activeChar);
setLevel((byte) 1);
}
@Override
public L2StaticObjectInstance getActiveChar()
{
return (L2StaticObjectInstance) _activeChar;
}
@Override
public final byte getLevel()
{
return 1;
}
}
|
[
"u3n3ter7@mail.ru"
] |
u3n3ter7@mail.ru
|
5dab635c32731fec937634f60f955d58fb76ba6d
|
3bcefa7861eb21b39533c88b204f4d94db433468
|
/messaging-rabbitmq/src/test/java/org/elasticsoftware/elasticactors/rabbitmq/BufferingMessageAckerTest.java
|
463590e7da2c305eb568283bf9c98f6d0fcadf03
|
[
"Apache-2.0"
] |
permissive
|
adrianprecub/elasticactors
|
2177b5fdd9d22264e3439adda6258b1b8bfbc7ec
|
0d4e5fb924ee07c4378b2c8a227f3e0324714a9f
|
refs/heads/master
| 2020-05-22T14:03:55.164588
| 2019-05-10T15:51:58
| 2019-05-10T15:51:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,367
|
java
|
/*
* Copyright 2013 - 2017 The Original Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.elasticsoftware.elasticactors.rabbitmq;
import com.rabbitmq.client.Channel;
import org.elasticsoftware.elasticactors.rabbitmq.ack.BufferingMessageAcker;
import org.testng.annotations.Test;
import static org.mockito.Mockito.*;
/**
* @author Joost van de Wijgerd
*/
public class BufferingMessageAckerTest {
@Test
public void testAcking() throws Exception {
Channel channel = mock(Channel.class);
BufferingMessageAcker messageAcker = new BufferingMessageAcker(channel);
messageAcker.start();
// deliver out of order
for(long i = 100; i < 1000; i++) {
messageAcker.deliver(i);
}
for(long i = 1; i < 100; i++) {
messageAcker.deliver(i);
}
Thread.sleep(1000);
verifyZeroInteractions(channel);
// ack the first 99 but not the first (nothing should be acked)
for(long i = 2; i < 100; i++) {
messageAcker.ack(i);
}
Thread.sleep(1000);
verifyZeroInteractions(channel);
// now ack the first (this should cause an ack on the channel
messageAcker.ack(1);
verify(channel,timeout(1000)).basicAck(99, true);
messageAcker.ack(102);
messageAcker.ack(100);
verify(channel,timeout(1000)).basicAck(100, true);
messageAcker.ack(101);
verify(channel,timeout(1000)).basicAck(102, true);
for(long i = 103; i < 1000; i++) {
messageAcker.ack(i);
}
verify(channel,timeout(1000)).basicAck(999, true);
// deliver one more message
messageAcker.deliver(1000);
Thread.sleep(1000);
verifyZeroInteractions(channel);
messageAcker.stop();
}
}
|
[
"jwijgerd@gmail.com"
] |
jwijgerd@gmail.com
|
713b8971fe0ad42988710d5ddd6b3ca27f953d81
|
155a82cd25c6e3f6b26021869b9f501cc8b450a2
|
/src/main/java/ac/za/cput/domain/academicResults/Assignments.java
|
dff53f0cf5ed24d96460bf6ee350ed377b192b7d
|
[] |
no_license
|
215062264/Assignment9
|
6afe3f3ee70d7891d07fc7f10f983166e916d617
|
5cf55bfbd63cb3722386b50dd5e5d20016c24321
|
refs/heads/master
| 2020-05-25T20:47:23.034525
| 2019-05-22T07:11:37
| 2019-05-22T07:11:37
| 187,983,368
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,066
|
java
|
package ac.za.cput.domain.academicResults;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import java.util.Objects;
@EntityScan
public class Assignments {
private String dueDate, studentNum;
private double mark;
private Assignments(){}
private Assignments(Assignments.Builder builder) {
this.dueDate = builder.dueDate;
this.studentNum = builder.studentNum;
this.mark = builder.mark;
}
public String getDueDate() {
return dueDate;
}
public String getStudentNum() {
return studentNum;
}
public double getAssignmentMark() {
return mark;
}
public static class Builder {
private String dueDate, studentNum;
private double mark;
public Assignments.Builder dueDate(String dueDate) {
this.dueDate = dueDate;
return this;
}
public Assignments.Builder studentNum(String studentNum) {
this.studentNum = studentNum;
return this;
}
public Assignments.Builder mark(double mark) {
this.mark = mark;
return this;
}
public Builder copy(Assignments assignments){
this.studentNum = assignments.studentNum;
this.dueDate = assignments.dueDate;
return this;
}
public Assignments build() {
return new Assignments(this);
}
}
@Override
public String toString() {
return "Assignments{" +
"dueDate='" + dueDate + '\'' +
", studentNum='" + studentNum + '\'' +
", Mark='" + mark + '\'' +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Assignments assignments = (Assignments) o;
return studentNum.equals(assignments.studentNum);
}
@Override
public int hashCode() {
return Objects.hash(studentNum);
}
}
|
[
"Kylejosias6@gmail.com"
] |
Kylejosias6@gmail.com
|
e94aaf9791fa7407be5e517f8c47086c3f3a5f2c
|
0e06e096a9f95ab094b8078ea2cd310759af008b
|
/classes10-dex2jar/com/google/android/gms/internal/ads/zzbbz.java
|
3537fb32ad98ab3d688f18914021d8ce0d166c93
|
[] |
no_license
|
Manifold0/adcom_decompile
|
4bc2907a057c73703cf141dc0749ed4c014ebe55
|
fce3d59b59480abe91f90ba05b0df4eaadd849f7
|
refs/heads/master
| 2020-05-21T02:01:59.787840
| 2019-05-10T00:36:27
| 2019-05-10T00:36:27
| 185,856,424
| 1
| 2
| null | 2019-05-10T00:36:28
| 2019-05-09T19:04:28
|
Java
|
UTF-8
|
Java
| false
| false
| 961
|
java
|
//
// Decompiled by Procyon v0.5.34
//
package com.google.android.gms.internal.ads;
import java.util.Map;
final class zzbbz<K> implements Entry<K, Object>
{
private Entry<K, zzbbx> zzdvi;
private zzbbz(final Entry<K, zzbbx> zzdvi) {
this.zzdvi = zzdvi;
}
@Override
public final K getKey() {
return this.zzdvi.getKey();
}
@Override
public final Object getValue() {
if (this.zzdvi.getValue() == null) {
return null;
}
return zzbbx.zzadu();
}
@Override
public final Object setValue(final Object o) {
if (!(o instanceof zzbcu)) {
throw new IllegalArgumentException("LazyField now only used for MessageSet, and the value of MessageSet must be an instance of MessageLite");
}
return this.zzdvi.getValue().zzl((zzbcu)o);
}
public final zzbbx zzadv() {
return this.zzdvi.getValue();
}
}
|
[
"querky1231@gmail.com"
] |
querky1231@gmail.com
|
2afa844931764978f94151d569639904c7117728
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/18/18_daa60e233b01ed6cce35b5d9f3d99d30f14e6448/JSR88DeploymentListener/18_daa60e233b01ed6cce35b5d9f3d99d30f14e6448_JSR88DeploymentListener_s.java
|
68e5703e54494dbf64c9d7d1141bdb1fbc88ff7d
|
[] |
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
| 3,192
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2010, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.arquillian.container.jsr88;
import java.util.logging.Logger;
import javax.enterprise.deploy.shared.CommandType;
import javax.enterprise.deploy.spi.TargetModuleID;
import javax.enterprise.deploy.spi.status.DeploymentStatus;
import javax.enterprise.deploy.spi.status.ProgressEvent;
import javax.enterprise.deploy.spi.status.ProgressListener;
import javax.enterprise.deploy.spi.status.ProgressObject;
/**
* Listens for JSR 88 deployment events to update the deployed state
* of the module.
*
* <p>During distribution (deployment), this listener observes the completed
* operation and subsequently starts the module, marking the module as
* started when the start operation is complete.</p>
*
* <p>During undeployment, this listener observes the completed operation
* and marks the module as not started.</p>
*
* @author Dan Allen
* @author Iskandar Salim
*/
class JSR88DeploymentListener implements ProgressListener
{
private static final Logger log = Logger.getLogger(JSR88RemoteContainer.class.getName());
private JSR88RemoteContainer container;
private TargetModuleID[] ids;
private CommandType type;
JSR88DeploymentListener(JSR88RemoteContainer container, TargetModuleID[] moduleIds, CommandType type)
{
this.container = container;
this.ids = moduleIds;
this.type = type;
}
@Override
public void handleProgressEvent(ProgressEvent event)
{
DeploymentStatus status = event.getDeploymentStatus();
log.info(status.getMessage());
if (status.isCompleted())
{
if (type.equals(CommandType.DISTRIBUTE))
{
ProgressObject startProgress = container.getDeploymentManager().start(ids);
startProgress.addProgressListener(new ProgressListener()
{
@Override
public void handleProgressEvent(ProgressEvent startEvent)
{
log.info(startEvent.getDeploymentStatus().getMessage());
if (startEvent.getDeploymentStatus().isCompleted())
{
container.moduleStarted(true);
}
}
});
}
else if (type.equals(CommandType.UNDEPLOY))
{
container.moduleStarted(false);
}
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.