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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
67941c6e6bbfa87c07b34f594a164b1a6a41b684
|
a265a35604df9ba29899050c5b0a5ec98291b5ca
|
/src/speed_racing/Car.java
|
9871c4bec1a5d03f56ccfa1383ed46e1c947a019
|
[] |
no_license
|
tolip05/javaextention
|
790019012745163ea6e6c78107ac8c5ba34eb31e
|
3186c69f765cff9ca5d60a878497af19e4c4294d
|
refs/heads/master
| 2020-03-30T07:35:37.791567
| 2018-09-30T09:16:56
| 2018-09-30T09:17:41
| 150,951,247
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 955
|
java
|
package speed_racing;
public class Car {
public static final int DISTANCCED_TRAVELLED = 0;
private String model;
private double fuel;
private double pricePerKilometer;
private int distanccedTravelled;
public Car(String model, double fuel, double pricePerKilometer) {
this.model = model;
this.fuel = fuel;
this.pricePerKilometer = pricePerKilometer;
this.distanccedTravelled = DISTANCCED_TRAVELLED;
}
public void drive(int kilometers) {
double fuelForDrive = kilometers * this.pricePerKilometer;
if (fuelForDrive > this.fuel){
throw new IllegalStateException("Insufficient fuel for the drive");
}else{
this.distanccedTravelled += kilometers;
this.fuel -= fuelForDrive;
}
}
@Override
public String toString() {
return String.format("%s %.2f %d",this.model,this.fuel,this.distanccedTravelled);
}
}
|
[
"kosta1980@abv.bg"
] |
kosta1980@abv.bg
|
4f0959a72af98d20930852a76b155991f862a4a4
|
9c95bf55193b098eb729e35587e2cee935536b47
|
/ngap/src/main/java/tr/havelsan/ueransim/ngap0/msg/NGAP_PWSCancelResponse.java
|
f274bb24ec9f17a456dc2ebaae0703bd17de4c92
|
[
"MIT"
] |
permissive
|
sabouaram/UERANSIM
|
6205af5db33be3578f548c315162bbe9de36a434
|
f3d28be0706e28e209fc087695c339d172c5a329
|
refs/heads/master
| 2022-12-26T01:25:18.554061
| 2020-09-16T13:39:21
| 2020-09-16T13:39:21
| 297,064,651
| 1
| 0
|
MIT
| 2020-09-20T11:49:12
| 2020-09-20T11:49:12
| null |
UTF-8
|
Java
| false
| false
| 2,106
|
java
|
package tr.havelsan.ueransim.ngap0.msg;
import tr.havelsan.ueransim.ngap0.pdu.*;
import tr.havelsan.ueransim.ngap0.core.*;
import tr.havelsan.ueransim.ngap0.*;
import tr.havelsan.ueransim.ngap0.ies.sequence_ofs.*;
import tr.havelsan.ueransim.ngap0.ies.sequences.*;
import tr.havelsan.ueransim.ngap0.ies.choices.*;
import tr.havelsan.ueransim.ngap0.ies.printable_strings.*;
import tr.havelsan.ueransim.ngap0.ies.bit_strings.*;
import tr.havelsan.ueransim.ngap0.ies.octet_strings.*;
import tr.havelsan.ueransim.ngap0.ies.integers.*;
import tr.havelsan.ueransim.ngap0.ies.enumerations.*;
public class NGAP_PWSCancelResponse extends NGAP_BaseMessage {
public NGAP_PWSCancelResponse() {
}
@Override
public NgapMessageType getMessageType() {
return NgapMessageType.PWSCancelResponse;
}
@Override
public NgapProtocolIeType getProtocolIeType() {
return NgapProtocolIeType.forMessage("PWSCancelResponse");
}
@Override
public int getCriticality() {
return 0;
}
@Override
public int getProcedureCode() {
return 32;
}
@Override
public int getPduType() {
return 1;
}
@Override
public int[] getIeId() {
return new int[] { 35, 95, 12, 19 };
}
@Override
public int[] getIeCriticality() {
return new int[] { 0, 0, 1, 1 };
}
@Override
public Class<? extends NGAP_Value>[] getIeTypes() {
return new Class[] { NGAP_MessageIdentifier.class, NGAP_SerialNumber.class, NGAP_BroadcastCancelledAreaList.class, NGAP_CriticalityDiagnostics.class };
}
@Override
public int[] getIePresence() {
return new int[] { 2, 2, 0, 0 };
}
@Override
public String[] getMemberIdentifiers() {
return new String[] { "protocolIEs" };
}
@Override
public String[] getMemberNames() {
return new String[] { "protocolIEs" };
}
@Override
public String getAsnName() {
return "PWSCancelResponse";
}
@Override
public String getXmlTagName() {
return "PWSCancelResponse";
}
}
|
[
"aligng1620@gmail.com"
] |
aligng1620@gmail.com
|
459f07d508c7f6bacdf2cc25a4994db2d371f727
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-13372-1-11-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/objects/BaseProperty_ESTest_scaffolding.java
|
cb7293b165e87fc161e429c2549b8c592cf4f460
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 438
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Apr 04 05:17:14 UTC 2020
*/
package com.xpn.xwiki.objects;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class BaseProperty_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
6068bf77a6885318222d796927bf1707269c53eb
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/files/File_1003233.java
|
4f12bf9bf40059bd3f3bea83bd4bdaaf5d4f219d
|
[
"Apache-2.0"
] |
permissive
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,130
|
java
|
/*
* Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0,
* and the EPL 1.0 (https://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.store;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.CodingErrorAction;
import java.nio.charset.StandardCharsets;
import org.h2.engine.Constants;
/**
* An input stream that reads the data from a reader and limits the number of
* bytes that can be read.
*/
public class CountingReaderInputStream extends InputStream {
private final Reader reader;
private final CharBuffer charBuffer =
CharBuffer.allocate(Constants.IO_BUFFER_SIZE);
private final CharsetEncoder encoder = StandardCharsets.UTF_8.newEncoder().
onMalformedInput(CodingErrorAction.REPLACE).
onUnmappableCharacter(CodingErrorAction.REPLACE);
private ByteBuffer byteBuffer = ByteBuffer.allocate(0);
private long length;
private long remaining;
public CountingReaderInputStream(Reader reader, long maxLength) {
this.reader = reader;
this.remaining = maxLength;
}
@Override
public int read(byte[] buff, int offset, int len) throws IOException {
if (!fetch()) {
return -1;
}
len = Math.min(len, byteBuffer.remaining());
byteBuffer.get(buff, offset, len);
return len;
}
@Override
public int read() throws IOException {
if (!fetch()) {
return -1;
}
return byteBuffer.get() & 255;
}
private boolean fetch() throws IOException {
if (byteBuffer != null && byteBuffer.remaining() == 0) {
fillBuffer();
}
return byteBuffer != null;
}
private void fillBuffer() throws IOException {
int len = (int) Math.min(charBuffer.capacity() - charBuffer.position(),
remaining);
if (len > 0) {
len = reader.read(charBuffer.array(), charBuffer.position(), len);
}
if (len > 0) {
remaining -= len;
} else {
len = 0;
remaining = 0;
}
length += len;
charBuffer.limit(charBuffer.position() + len);
charBuffer.rewind();
byteBuffer = ByteBuffer.allocate(Constants.IO_BUFFER_SIZE);
boolean end = remaining == 0;
encoder.encode(charBuffer, byteBuffer, end);
if (end && byteBuffer.position() == 0) {
// EOF
byteBuffer = null;
return;
}
byteBuffer.flip();
charBuffer.compact();
charBuffer.flip();
charBuffer.position(charBuffer.limit());
}
/**
* The number of characters read so far (but there might still be some bytes
* in the buffer).
*
* @return the number of characters
*/
public long getLength() {
return length;
}
@Override
public void close() throws IOException {
reader.close();
}
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
8a2e47dc6ed758f52220a66592e0307a8da7bde1
|
ad8dc43f5ffd3473c09ba6cb3b26369ef29b7653
|
/src/main/java/com/heimlich/domain/project/excel/fospm1/Fospm101Excel.java
|
f562dad9740e6434c23b6be0e4eb5314714b3f82
|
[] |
no_license
|
HeimlichLin/projectController
|
2392d865d222d56be0fa232f186d6b9f5ddfc2c9
|
78f4790817532962b41209cbc50656ca656203fd
|
refs/heads/main
| 2023-08-30T21:21:18.985546
| 2021-10-04T08:15:10
| 2021-10-04T08:15:10
| 413,332,074
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,182
|
java
|
package com.heimlich.domain.project.excel.fospm1;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.util.List;
import java.util.Map;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.util.Region;
import com.heimlich.common.exception.ApBusinessException;
import com.heimlich.domain.common.excel.component.ExcelModel;
import com.heimlich.domain.project.excel.impl.CommonExcelModelExport;
public class Fospm101Excel extends CommonExcelModelExport {
public Fospm101Excel(ExcelModel dto) {
super(dto);
}
@Override
protected void writeExtract(HSSFWorkbook book, HSSFSheet sheet) {
final HSSFRow row = sheet.createRow(sheet.getLastRowNum() + 1);
final HSSFCellStyle style = this.getDetialStyple();
double netWeightTotal = 0;
double valueAmtTotal = 0;
final ExcelModel model = this.getDto();
final List<Map<String, String>> mapsList = model.getGridList();
int size = model.getMapLabel().entrySet().size();
for (final Map<String, String> map : mapsList) {
try {
double netWeight = new DecimalFormat().parse(NVL(map.get("WGT"), 0)).doubleValue();
double valueAmt = new DecimalFormat().parse(NVL(map.get("CIFOB"), 0)).doubleValue();
netWeightTotal += netWeight;
valueAmtTotal += valueAmt;
} catch (ParseException e) {
throw new ApBusinessException("加總失敗");
}
}
DecimalFormat decimalFormat = new DecimalFormat("#,##0.000");
for (int i = 0; i <= size; i++) {
final HSSFCell cell = row.createCell((short) i);
cell.setEncoding(HSSFCell.ENCODING_UTF_16);
cell.setCellStyle(style);
if (i == 0) {
cell.setCellValue("總和");
}
if (i == size - 1) {
cell.setCellValue(String.valueOf(decimalFormat.format(netWeightTotal)));
}
if (i == size) {
cell.setCellValue(String.valueOf(decimalFormat.format(valueAmtTotal)));
}
}
sheet.addMergedRegion(new Region(sheet.getLastRowNum(), (short) 0, sheet.getLastRowNum(), (short) (size - 2)));
}
}
|
[
"jerry.lin@tradevan.com.tw"
] |
jerry.lin@tradevan.com.tw
|
b7c2a85562276a7d049ebf11312df275004d8db7
|
bb85738ee2111133a39ba39db8bd58cde041d362
|
/MidExam/MuOnline.java
|
e6380bf987fe18220589b78add4c19f9fee02815
|
[] |
no_license
|
Petrov-connect/Java-Fundamentals
|
788737d4f1a6f2a20b162adab0f6f7b4e22a3274
|
ad50683faa2d586a8a60bdbc3c1e67ebbf901cf2
|
refs/heads/master
| 2023-03-29T10:42:36.856472
| 2021-04-04T23:03:34
| 2021-04-04T23:03:34
| 318,351,144
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,774
|
java
|
package MidExam;
//created by J.M.
import java.util.*;
import java.util.stream.Collectors;
public class MuOnline {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
List<String> rooms = Arrays.stream((scan.nextLine().split("\\|"))).collect(Collectors.toList());
int health = 100;
int bitcoins = 0;
int count = 0;
while (count <= rooms.size() - 1) {
String[] command = rooms.get(count).split(" ");
switch (command[0]) {
case "potion":
int cure = Integer.parseInt(command[1]);
if ((health + cure) > 100) {
cure = 100 - health;
}
health += cure;
System.out.printf("You healed for %d hp.%n", cure);
System.out.printf("Current health: %d hp.%n", health);
break;
case "chest":
bitcoins += Integer.parseInt(command[1]);
System.out.printf("You found %d bitcoins.%n", Integer.parseInt(command[1]));
break;
default:
health -= Integer.parseInt(command[1]);
if (health > 0) {
System.out.printf("You slayed %s.%n", command[0]);
} else {
System.out.printf("You died! Killed by %s.%n", command[0]);
System.out.printf("Best room: %d%n", count + 1);
return;
}
break;
}
count++;
}
System.out.printf("You've made it!%nBitcoins: %d%nHealth: %d%n", bitcoins, health);
}
}
|
[
"Petrov.connect@gmail.com"
] |
Petrov.connect@gmail.com
|
d43650d37d3ba9c39bde2edaacb6c92b500c7932
|
17537c091572a94c58975214094fdfeedb57fde1
|
/core/common/data/commonData/src/main/java/com/home/commonData/message/sceneBase/response/unit/CUnitAddBulletMO.java
|
f728d41397f80be72545e635cb81b59dc7df7e10
|
[
"Apache-2.0"
] |
permissive
|
mengtest/home3
|
dc2e5f910bbca6e536ded94d3f749671f0ca76d5
|
a15a63694918483b2e4853edab197b5cdddca560
|
refs/heads/master
| 2023-01-29T13:49:23.822515
| 2020-12-11T10:17:39
| 2020-12-11T10:17:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 315
|
java
|
package com.home.commonData.message.sceneBase.response.unit;
import com.home.commonData.data.scene.base.BulletDO;
import com.home.commonData.message.sceneBase.response.base.CUnitRMO;
/** 客户端主控单位添加子弹 */
public class CUnitAddBulletMO extends CUnitRMO
{
/** 子弹数据 */
BulletDO bullet;
}
|
[
"359944951@qq.com"
] |
359944951@qq.com
|
ab06067aa46375aff53440c7a9b017abbae5ab82
|
f6b90fae50ea0cd37c457994efadbd5560a5d663
|
/android/nut-dex2jar.src/com/tencent/mm/sdk/b/a.java
|
c25aeb67f4d996c4d2c77633e2ed9e1c0f52a837
|
[] |
no_license
|
dykdykdyk/decompileTools
|
5925ae91f588fefa7c703925e4629c782174cd68
|
4de5c1a23f931008fa82b85046f733c1439f06cf
|
refs/heads/master
| 2020-01-27T09:56:48.099821
| 2016-09-14T02:47:11
| 2016-09-14T02:47:11
| 66,894,502
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,892
|
java
|
package com.tencent.mm.sdk.b;
import android.os.Build;
import android.os.Build.VERSION;
import android.os.Looper;
import android.os.Process;
public final class a
{
private static int level = 6;
public static d q;
private static a.a r;
private static a.a s;
private static final String t = ((StringBuilder)localObject).toString();
static
{
Object localObject = new b();
r = (a.a)localObject;
s = (a.a)localObject;
localObject = new StringBuilder();
((StringBuilder)localObject).append("VERSION.RELEASE:[" + Build.VERSION.RELEASE);
((StringBuilder)localObject).append("] VERSION.CODENAME:[" + Build.VERSION.CODENAME);
((StringBuilder)localObject).append("] VERSION.INCREMENTAL:[" + Build.VERSION.INCREMENTAL);
((StringBuilder)localObject).append("] BOARD:[" + Build.BOARD);
((StringBuilder)localObject).append("] DEVICE:[" + Build.DEVICE);
((StringBuilder)localObject).append("] DISPLAY:[" + Build.DISPLAY);
((StringBuilder)localObject).append("] FINGERPRINT:[" + Build.FINGERPRINT);
((StringBuilder)localObject).append("] HOST:[" + Build.HOST);
((StringBuilder)localObject).append("] MANUFACTURER:[" + Build.MANUFACTURER);
((StringBuilder)localObject).append("] MODEL:[" + Build.MODEL);
((StringBuilder)localObject).append("] PRODUCT:[" + Build.PRODUCT);
((StringBuilder)localObject).append("] TAGS:[" + Build.TAGS);
((StringBuilder)localObject).append("] TYPE:[" + Build.TYPE);
((StringBuilder)localObject).append("] USER:[" + Build.USER + "]");
}
public static void a(String paramString1, String paramString2)
{
a(paramString1, paramString2, null);
}
public static void a(String paramString1, String paramString2, Object[] paramArrayOfObject)
{
if ((s != null) && (s.h() <= 4))
if (paramArrayOfObject != null)
break label70;
while (true)
{
paramArrayOfObject = paramString2;
if (paramString2 == null)
paramArrayOfObject = "";
paramString1 = i(paramString1);
paramString2 = s;
Process.myPid();
Thread.currentThread().getId();
Looper.getMainLooper().getThread().getId();
paramString2.h(paramString1, paramArrayOfObject);
return;
label70: paramString2 = String.format(paramString2, paramArrayOfObject);
}
}
public static void b(String paramString1, String paramString2)
{
if ((s != null) && (s.h() <= 3))
{
String str = paramString2;
if (paramString2 == null)
str = "";
paramString1 = i(paramString1);
paramString2 = s;
Process.myPid();
Thread.currentThread().getId();
Looper.getMainLooper().getThread().getId();
paramString2.g(paramString1, str);
}
}
public static void c(String paramString1, String paramString2)
{
if ((s != null) && (s.h() <= 2))
{
String str = paramString2;
if (paramString2 == null)
str = "";
paramString1 = i(paramString1);
paramString2 = s;
Process.myPid();
Thread.currentThread().getId();
Looper.getMainLooper().getThread().getId();
paramString2.e(paramString1, str);
}
}
public static void d(String paramString1, String paramString2)
{
if ((s != null) && (s.h() <= 1))
{
String str = paramString2;
if (paramString2 == null)
str = "";
paramString1 = i(paramString1);
paramString2 = s;
Process.myPid();
Thread.currentThread().getId();
Looper.getMainLooper().getThread().getId();
paramString2.f(paramString1, str);
}
}
private static String i(String paramString)
{
String str = paramString;
if (q != null)
str = q.i(paramString);
return str;
}
}
/* Location: C:\crazyd\work\ustone\odm2016031702\baidu\android\nut-dex2jar.jar
* Qualified Name: com.tencent.mm.sdk.b.a
* JD-Core Version: 0.6.2
*/
|
[
"819468107@qq.com"
] |
819468107@qq.com
|
f6c6e7be1365b3c51531d832b32912b728078de1
|
4dcdab2b7e086fad289efc49904a48af203a5569
|
/Java/src/BinarySearch/DivideTwoIntegers.java
|
d2549a0ae9c85b8c5c268d9724803053bf5dd773
|
[] |
no_license
|
jamie2017/EverydayCoding
|
9d70f59dfe298debced978f36b3be4ea178133d7
|
8a5107438411756ae85721b09c192747b3035dc0
|
refs/heads/master
| 2021-04-26T21:49:27.449050
| 2018-03-08T23:29:53
| 2018-03-08T23:29:53
| 124,162,965
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 768
|
java
|
package BinarySearch;
/**
* Created by JMYE on 9/16/16.
*/
public class DivideTwoIntegers {
public int divide(int dividend, int divisor) {
boolean isNegative = (dividend < 0 && divisor > 0) || (dividend > 0 && divisor < 0);
long absDividend = Math.abs((long) dividend);
long absDivisor = Math.abs((long) divisor);
long result = 0;
while (absDividend >= absDivisor) {
long tmp = absDivisor, count = 1;
while (tmp <= absDividend) {
tmp <<= 1;
count <<= 1;
}
result += count >> 1;
absDividend -= tmp >> 1;
}
return isNegative ? (int) ~result + 1: result > Integer.MAX_VALUE? Integer.MAX_VALUE: (int) result;
}
}
|
[
"yjm.code@gmail.com"
] |
yjm.code@gmail.com
|
959ed6d8bf6d9dc08197105786536b42fd6a9694
|
75029011e7962b3078a3be2721b7a6e964fce2f3
|
/ch02/02-java-config/src/main/java/com/codve/Student.java
|
8aac3b25769b322b1ef26dd100441fc98befdbce
|
[] |
no_license
|
jiangyuwise/spring-in-action
|
6a0487c9dfbc9804f1f37b991201bb22c1885403
|
c8149a811390304812c4cbd9120a31bc6b4d9e72
|
refs/heads/master
| 2022-07-18T12:46:00.115964
| 2019-12-20T13:17:57
| 2019-12-20T13:17:57
| 218,033,535
| 0
| 0
| null | 2022-06-21T02:19:09
| 2019-10-28T11:42:26
|
Java
|
UTF-8
|
Java
| false
| false
| 526
|
java
|
package com.codve;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @author admin
* @date 2019/10/28 10:40
*/
public class Student implements AbstractPerson {
private AbstractTask task;
public Student(AbstractTask task) {
this.task = task;
}
public void setTask(AbstractTask task) {
this.task = task;
}
@Override
public void work() {
System.out.println("student work on " + task.info());
}
}
|
[
"jiangyuwise@gmail.com"
] |
jiangyuwise@gmail.com
|
d805432adab28ae65ec074d0667cd6783eea0f4d
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/paistudio-20220112/src/main/java/com/aliyun/paistudio20220112/models/GetResourceGroupMachineGroupResponseBody.java
|
b27d08561e751519f7f32dcfef58bcc5221f0529
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 5,422
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.paistudio20220112.models;
import com.aliyun.tea.*;
public class GetResourceGroupMachineGroupResponseBody extends TeaModel {
@NameInMap("Cpu")
public String cpu;
@NameInMap("EcsCount")
public Long ecsCount;
@NameInMap("EcsSpec")
public String ecsSpec;
@NameInMap("GmtCreatedTime")
public String gmtCreatedTime;
@NameInMap("GmtExpiredTime")
public String gmtExpiredTime;
@NameInMap("GmtModifiedTime")
public String gmtModifiedTime;
@NameInMap("GmtStartedTime")
public String gmtStartedTime;
@NameInMap("Gpu")
public String gpu;
@NameInMap("GpuType")
public String gpuType;
@NameInMap("MachineGroupID")
public String machineGroupID;
@NameInMap("Memory")
public String memory;
@NameInMap("PaymentDuration")
public String paymentDuration;
@NameInMap("PaymentDurationUnit")
public String paymentDurationUnit;
@NameInMap("PaymentType")
public String paymentType;
@NameInMap("RequestId")
public String requestId;
@NameInMap("ResourceGroupID")
public String resourceGroupID;
@NameInMap("Status")
public String status;
public static GetResourceGroupMachineGroupResponseBody build(java.util.Map<String, ?> map) throws Exception {
GetResourceGroupMachineGroupResponseBody self = new GetResourceGroupMachineGroupResponseBody();
return TeaModel.build(map, self);
}
public GetResourceGroupMachineGroupResponseBody setCpu(String cpu) {
this.cpu = cpu;
return this;
}
public String getCpu() {
return this.cpu;
}
public GetResourceGroupMachineGroupResponseBody setEcsCount(Long ecsCount) {
this.ecsCount = ecsCount;
return this;
}
public Long getEcsCount() {
return this.ecsCount;
}
public GetResourceGroupMachineGroupResponseBody setEcsSpec(String ecsSpec) {
this.ecsSpec = ecsSpec;
return this;
}
public String getEcsSpec() {
return this.ecsSpec;
}
public GetResourceGroupMachineGroupResponseBody setGmtCreatedTime(String gmtCreatedTime) {
this.gmtCreatedTime = gmtCreatedTime;
return this;
}
public String getGmtCreatedTime() {
return this.gmtCreatedTime;
}
public GetResourceGroupMachineGroupResponseBody setGmtExpiredTime(String gmtExpiredTime) {
this.gmtExpiredTime = gmtExpiredTime;
return this;
}
public String getGmtExpiredTime() {
return this.gmtExpiredTime;
}
public GetResourceGroupMachineGroupResponseBody setGmtModifiedTime(String gmtModifiedTime) {
this.gmtModifiedTime = gmtModifiedTime;
return this;
}
public String getGmtModifiedTime() {
return this.gmtModifiedTime;
}
public GetResourceGroupMachineGroupResponseBody setGmtStartedTime(String gmtStartedTime) {
this.gmtStartedTime = gmtStartedTime;
return this;
}
public String getGmtStartedTime() {
return this.gmtStartedTime;
}
public GetResourceGroupMachineGroupResponseBody setGpu(String gpu) {
this.gpu = gpu;
return this;
}
public String getGpu() {
return this.gpu;
}
public GetResourceGroupMachineGroupResponseBody setGpuType(String gpuType) {
this.gpuType = gpuType;
return this;
}
public String getGpuType() {
return this.gpuType;
}
public GetResourceGroupMachineGroupResponseBody setMachineGroupID(String machineGroupID) {
this.machineGroupID = machineGroupID;
return this;
}
public String getMachineGroupID() {
return this.machineGroupID;
}
public GetResourceGroupMachineGroupResponseBody setMemory(String memory) {
this.memory = memory;
return this;
}
public String getMemory() {
return this.memory;
}
public GetResourceGroupMachineGroupResponseBody setPaymentDuration(String paymentDuration) {
this.paymentDuration = paymentDuration;
return this;
}
public String getPaymentDuration() {
return this.paymentDuration;
}
public GetResourceGroupMachineGroupResponseBody setPaymentDurationUnit(String paymentDurationUnit) {
this.paymentDurationUnit = paymentDurationUnit;
return this;
}
public String getPaymentDurationUnit() {
return this.paymentDurationUnit;
}
public GetResourceGroupMachineGroupResponseBody setPaymentType(String paymentType) {
this.paymentType = paymentType;
return this;
}
public String getPaymentType() {
return this.paymentType;
}
public GetResourceGroupMachineGroupResponseBody setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
public String getRequestId() {
return this.requestId;
}
public GetResourceGroupMachineGroupResponseBody setResourceGroupID(String resourceGroupID) {
this.resourceGroupID = resourceGroupID;
return this;
}
public String getResourceGroupID() {
return this.resourceGroupID;
}
public GetResourceGroupMachineGroupResponseBody setStatus(String status) {
this.status = status;
return this;
}
public String getStatus() {
return this.status;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
dc8b43ddd03cd9c9e52d6f3246f66264a8baff13
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/rds-20140815/src/main/java/com/aliyun/rds20140815/models/DescribeDBInstanceEncryptionKeyResponse.java
|
0961b8a14fefba89c27d8caa5f10a3cbc733ae45
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,527
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.rds20140815.models;
import com.aliyun.tea.*;
public class DescribeDBInstanceEncryptionKeyResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("statusCode")
@Validation(required = true)
public Integer statusCode;
@NameInMap("body")
@Validation(required = true)
public DescribeDBInstanceEncryptionKeyResponseBody body;
public static DescribeDBInstanceEncryptionKeyResponse build(java.util.Map<String, ?> map) throws Exception {
DescribeDBInstanceEncryptionKeyResponse self = new DescribeDBInstanceEncryptionKeyResponse();
return TeaModel.build(map, self);
}
public DescribeDBInstanceEncryptionKeyResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public DescribeDBInstanceEncryptionKeyResponse setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
public Integer getStatusCode() {
return this.statusCode;
}
public DescribeDBInstanceEncryptionKeyResponse setBody(DescribeDBInstanceEncryptionKeyResponseBody body) {
this.body = body;
return this;
}
public DescribeDBInstanceEncryptionKeyResponseBody getBody() {
return this.body;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
85bb6f69c6da561ffaf02fe5ac8db57ee2cf0ac3
|
e3990e8c3b1e0b8824a0a19bf9d12e48441def7a
|
/ebean-api/src/main/java/io/ebean/config/ContainerConfig.java
|
00cf8f8bfc455fda9d4ad9f7b2bc47ae11a1a473
|
[
"Apache-2.0"
] |
permissive
|
ebean-orm/ebean
|
13c9c465f597dd2cf8b3e54e4b300543017c9dee
|
bfe94786de3c3b5859aaef5afb3a7572e62275c4
|
refs/heads/master
| 2023-08-22T12:57:34.271133
| 2023-08-22T11:43:41
| 2023-08-22T11:43:41
| 5,793,895
| 1,199
| 224
|
Apache-2.0
| 2023-09-11T14:05:26
| 2012-09-13T11:49:56
|
Java
|
UTF-8
|
Java
| false
| false
| 2,737
|
java
|
package io.ebean.config;
import java.util.Properties;
/**
* Configuration for the container that holds the Database instances.
* <p>
* Provides configuration for cluster communication (if clustering is used). The cluster communication is
* used to invalidate appropriate parts of the L2 cache across the cluster.
*/
public class ContainerConfig {
private boolean active;
private String serviceName;
private String namespace;
private String podName;
private int port;
private Properties properties;
/**
* Return the service name.
*/
public String getServiceName() {
return serviceName;
}
/**
* Set the service name.
*/
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
/**
* Return the namespace.
*/
public String getNamespace() {
return namespace;
}
/**
* Set the namespace.
*/
public void setNamespace(String namespace) {
this.namespace = namespace;
}
/**
* Return the pod name.
*/
public String getPodName() {
return podName;
}
/**
* Set the pod name.
*/
public void setPodName(String podName) {
this.podName = podName;
}
/**
* Return the port to use.
*/
public int getPort() {
return port;
}
/**
* Set the port to use.
*/
public void setPort(int port) {
this.port = port;
}
/**
* Return true if clustering is active.
*/
public boolean isActive() {
return active;
}
/**
* Set to true for clustering to be active.
*/
public void setActive(boolean active) {
this.active = active;
}
/**
* Return the deployment properties.
*/
public Properties getProperties() {
return properties;
}
/**
* Set the deployment properties.
*/
public void setProperties(Properties properties) {
this.properties = properties;
}
/**
* Load the settings from properties.
*/
public void loadFromProperties(Properties properties) {
this.properties = properties;
this.active = getProperty(properties, "ebean.cluster.active", active);
this.serviceName = properties.getProperty("ebean.cluster.serviceName", serviceName);
this.namespace = properties.getProperty("ebean.cluster.namespace", namespace);
this.podName = properties.getProperty("ebean.cluster.podName", podName);
String portParam = properties.getProperty("ebean.cluster.port");
if (portParam != null) {
this.port = Integer.parseInt(portParam);
}
}
/**
* Return the boolean property setting.
*/
protected boolean getProperty(Properties properties, String key, boolean defaultValue) {
return "true".equalsIgnoreCase(properties.getProperty(key, Boolean.toString(defaultValue)));
}
}
|
[
"robin.bygrave@gmail.com"
] |
robin.bygrave@gmail.com
|
2c65d89241eefecc017cd3c64149e337ab6c084f
|
097df92ce1bfc8a354680725c7d10f0d109b5b7d
|
/com/amazon/ws/emr/hadoop/fs/shaded/com/amazonaws/services/dynamodbv2/datamodeling/unmarshallers/ShortSetUnmarshaller.java
|
87fffd771dd2dde607d901bbdc5e3367369e91f9
|
[] |
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
| 894
|
java
|
package com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.dynamodbv2.datamodeling.unmarshallers;
import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.dynamodbv2.model.AttributeValue;
import java.util.HashSet;
import java.util.Set;
public class ShortSetUnmarshaller
extends NSUnmarshaller
{
private static final ShortSetUnmarshaller INSTANCE = new ShortSetUnmarshaller();
public static ShortSetUnmarshaller instance()
{
return INSTANCE;
}
public Object unmarshall(AttributeValue value)
{
Set<Short> result = new HashSet();
for (String s : value.getNS()) {
result.add(Short.valueOf(s));
}
return result;
}
}
/* Location:
* Qualified Name: com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.dynamodbv2.datamodeling.unmarshallers.ShortSetUnmarshaller
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"Arwin.tio@adroll.com"
] |
Arwin.tio@adroll.com
|
9a8a3146d8341a4096c96709b19f2c9d2fe2e57f
|
94efd688ea095982776e8da8a3afb66c86b68bec
|
/src/com/ek/mobileapp/utils/download/CallBack.java
|
fe8d08c44a97c07a2ccbfaa930428755fe3f0569
|
[] |
no_license
|
yangjiandong/mobileApp
|
c3abba255bc3b1c8d97a6bc53273155f1ec89f57
|
e7e6e83c18a0964acf423ffa3f0728d0b31e7a07
|
refs/heads/master
| 2022-07-03T03:51:36.627787
| 2012-08-17T00:28:57
| 2012-08-17T00:28:57
| 4,870,206
| 1
| 0
| null | 2022-06-17T01:57:30
| 2012-07-03T09:19:37
|
Java
|
UTF-8
|
Java
| false
| false
| 864
|
java
|
package com.ek.mobileapp.utils.download;
//String url = "http://zhangmenshiting5.baidu.com/data2/music/1837238/2460371341806461.mp3?xcode=74d240eb72f4e01b578f247b5baed415&lid=0";
//DownLoad dl = new DownLoad(url,"xyzth.mp3", new CallBack());
//dl.DownLoadFile();
final class CallBack implements DownLoadCallBack
{
@Override
public void UpdateUIProgress(int cur)
{
//setTitle("线程执行了");
//sb.setProgress(cur);
}
@Override
public void SetMaxProgress(int val)
{
//sb.setMax(val);
}
@Override
public void Success() {
//setTitle("下载完成!");
}
@Override
public void Error() {
//setTitle("下载出错!");
}
@Override
public void ReturnPercent(String percent) {
//tv_kb_state.setText(percent);
}
}
|
[
"young.jiandong@gmail.com"
] |
young.jiandong@gmail.com
|
c4518c7ed71e756fbfce7e93b842671914e3ed08
|
b0c2344b56a4bb2f423606a67d926b560c79c2fa
|
/Lesson07/00_palindrome/PalindromeSolution.java
|
0ef006ede057f4dab8f6a421249553654af11156
|
[] |
no_license
|
jackbergus/LPI17
|
588c93ac7e586948ea0c446194b58c27db7b7142
|
6df79e422ed69d904437e77841286cee341bceb2
|
refs/heads/master
| 2021-01-23T21:43:02.653148
| 2018-03-27T16:40:13
| 2018-03-27T16:40:13
| 102,901,753
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,324
|
java
|
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
public class PalindromeSolution {
public static boolean isPalindrome(String toCheck) {
return toCheck.length() <= 1 ||
(toCheck.charAt(0) == toCheck.charAt(toCheck.length() - 1)) &&
(isPalindrome(toCheck.substring(1, toCheck.length() - 1)));
}
public static void main (String args[]) throws IOException {
StringGenerator sg = new StringGenerator();
double max = 10000000.0;
double count = 0;
String str = "Hello";
BufferedWriter writer = new BufferedWriter(new FileWriter("errors.txt"));
for (int i = 0; i<(int)max; i++) {
StringGenerator.RandomString test = sg.generateRandomPalindrome();
boolean result = isPalindrome(test.left);
if (result != test.isPalindrome) {
writer.write("ERROR: " + test.left +" must "+(test.isPalindrome ? "" : "not") + " be palindrome\n");
} else {
count++;
}
}
writer.close();
System.out.println("Score = " + (count/max*30));
if ((count/max*30) < 30.0) {
System.out.println("Please check the errors.txt file to look at your errors");
}
}
}
|
[
"bergamigiacomo@gmail.com"
] |
bergamigiacomo@gmail.com
|
3abe1049eccbc70124fe04ed685db1a0f3942615
|
465ccada89ddb766ec30d53db54a4f278b35afff
|
/src/hr/fer/zemris/algorithmsdatabase/model/ProblemParamDefine.java
|
a27c1b9d93269dd838bae187e97d04babd4dcf47
|
[] |
no_license
|
KarloKnezevic/AlgorithmsDatabase
|
4d9dabb94f804a8e6f3794d5e2d194c00af1532a
|
af5c62981e744ac5c2359ff02903b76b0f318fc8
|
refs/heads/master
| 2021-01-23T20:14:12.409339
| 2013-07-29T12:40:23
| 2013-07-29T12:40:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,824
|
java
|
package hr.fer.zemris.algorithmsdatabase.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.QueryHint;
import javax.persistence.Table;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
/**
*
* @author Karlo Knezevic, karlo.knezevic@fer.hr
*
*/
@Entity
@Table(name = "problemparamdefine")
@NamedQueries({ @NamedQuery(name = "ProblemParamDefine.list", query = "select a from ProblemParamDefine as a", hints = { @QueryHint(name = "org.hibernate.cacheable", value = "true") }) })
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class ProblemParamDefine {
private Long id;
private Long probId;
private Long probParId;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@Column(nullable = false, length = 10)
public Long getProbId() {
return probId;
}
public void setProbId(Long probId) {
this.probId = probId;
}
@Column(nullable = false, length = 10)
public Long getProbParId() {
return probParId;
}
public void setProbParId(Long probParId) {
this.probParId = probParId;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final ProblemParamDefine other = (ProblemParamDefine) obj;
if (id == null) {
if (other.id != null) {
return false;
}
} else if (!id.equals(other.id)) {
return false;
}
return true;
}
@Override
public String toString() {
return "(" + id + " [" + probId + ", " + probParId + "])";
}
}
|
[
"knezevic.karlo1@gmail.com"
] |
knezevic.karlo1@gmail.com
|
867266e575dcbf20dc83b40febda47355bcf1989
|
847f93bb462bfc1922f49beb00b775c390ac556e
|
/BaekJoon_java/src/BOJ1074.java
|
51acb7a618030c679ae10d5f050a06c06498ce0c
|
[] |
no_license
|
PaengE/AlgorithmPractice
|
873a7d4b7f5710a1fcf9842eaf2930d739d8edb2
|
2ba166d14c7911af74eb595e4202a1b875fce785
|
refs/heads/master
| 2023-07-08T10:09:15.874030
| 2021-08-11T08:10:15
| 2021-08-11T08:10:15
| 200,774,172
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,517
|
java
|
import java.io.*;
import java.util.StringTokenizer;
public class BOJ1074 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
StringTokenizer st = new StringTokenizer(br.readLine());
int n = Integer.parseInt(st.nextToken());
int r = Integer.parseInt(st.nextToken());
int c = Integer.parseInt(st.nextToken());
int t = (int) Math.pow(2, n);
int ans = find(n, c, r, t);
bw.write(String.valueOf(ans));
bw.close();
br.close();
}
static int find(int n, int c, int r, int t) {
// 가로 세로를 반으로 나눔
int x = t / 2;
int y = t / 2;
int ans = 0;
while (n-- > 0) {
int half = (int) (Math.pow(2, n) / 2);
int idx = (int) Math.pow(4, n);
if (r < y && c < x) { // 좌상
x -= half;
y -= half;
} else if (r < y && c >= x) { // 우상
x += half;
y -= half;
ans += idx;
} else if (r >= y && c < x) { // 좌하
x -= half;
y += half;
ans += idx * 2;
} else { // 우하
x += half;
y += half;
ans += idx * 3;
}
}
return ans;
}
}
|
[
"ckddn2820@gmail.com"
] |
ckddn2820@gmail.com
|
f60be850bb0a7517bdda05c589af67a93f687436
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/kylin/learning/6029/InitialTaskManager.java
|
f51c56dbae8a1cacb5e8955bf129ec57ca8da3d7
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,455
|
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.kylin.rest.init;
import org.apache.commons.lang.StringUtils;
import org.apache.kylin. common.KylinConfig;
import org.apache.kylin.common.util.StringUtil;
import org.apache.kylin.rest.metrics.QueryMetrics2Facade;
import org.apache.kylin.rest.metrics.QueryMetricsFacade;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
/**
* Created by dongli on 3/16/16.
*/
public class InitialTaskManager implements InitializingBean {
private static final Logger logger = LoggerFactory.getLogger(InitialTaskManager.class);
@Override
public void afterPropertiesSet() throws Exception {
logger.info("Kylin service is starting.....");
runInitialTasks();
}
private void runInitialTasks() {
// init metrics system for kylin
QueryMetricsFacade.init();
QueryMetrics2Facade.init();
KylinConfig kylinConfig = KylinConfig.getInstanceFromEnv();
String initTasks = kylinConfig.getInitTasks();
if (!StringUtils.isEmpty(initTasks)) {
String[] taskClasses = StringUtil.splitByComma(initTasks);
for (String taskClass : taskClasses) {
try {
InitialTask task = (InitialTask) Class.forName(taskClass).newInstance();
logger.info("Running initial task: " + taskClass);
task.execute();
} catch (Throwable e) {
logger.error("Initial task failed: " + taskClass, e);
}
}
logger.info("All initial tasks finished.");
}
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
896381bfee0173dc8d45662576c242ec49cc129a
|
bd69661f67730b2cc05083489dc9b394f5619c57
|
/SpiderX/src/com/google/common/graph/UndirectedMultiNetworkConnections.java
|
0c2871b6b43e4e33010858c5c129685b3d158ecb
|
[] |
no_license
|
WoYang/WebSpiderAndroid
|
6292763823fe5792b542e6b1e60264267337a068
|
4a5f713bf97fa3f6f3242bd19750afd78c562887
|
refs/heads/master
| 2021-01-12T10:53:42.601043
| 2018-11-12T08:55:51
| 2018-11-12T08:55:51
| 72,708,475
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,702
|
java
|
/*
* Copyright (C) 2016 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.common.graph;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.graph.GraphConstants.INNER_CAPACITY;
import static com.google.common.graph.GraphConstants.INNER_LOAD_FACTOR;
import com.google.common.collect.HashMultiset;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Multiset;
import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;
/**
* An implementation of {@link NetworkConnections} for undirected networks with parallel edges.
*
* @author James Sexton
* @param <N> Node parameter type
* @param <E> Edge parameter type
*/
final class UndirectedMultiNetworkConnections<N, E>
extends AbstractUndirectedNetworkConnections<N, E> {
private UndirectedMultiNetworkConnections(Map<E, N> incidentEdges) {
super(incidentEdges);
}
static <N, E> UndirectedMultiNetworkConnections<N, E> of() {
return new UndirectedMultiNetworkConnections<N, E>(
new HashMap<E, N>(INNER_CAPACITY, INNER_LOAD_FACTOR));
}
static <N, E> UndirectedMultiNetworkConnections<N, E> ofImmutable(Map<E, N> incidentEdges) {
return new UndirectedMultiNetworkConnections<N, E>(ImmutableMap.copyOf(incidentEdges));
}
private transient Reference<Multiset<N>> adjacentNodesReference;
@Override
public Set<N> adjacentNodes() {
return Collections.unmodifiableSet(adjacentNodesMultiset().elementSet());
}
private Multiset<N> adjacentNodesMultiset() {
Multiset<N> adjacentNodes = getReference(adjacentNodesReference);
if (adjacentNodes == null) {
adjacentNodes = HashMultiset.create(incidentEdgeMap.values());
adjacentNodesReference = new SoftReference<Multiset<N>>(adjacentNodes);
}
return adjacentNodes;
}
@Override
public Set<E> edgesConnecting(final Object node) {
return new MultiEdgesConnecting<E>(incidentEdgeMap, node) {
@Override
public int size() {
return adjacentNodesMultiset().count(node);
}
};
}
@Override
public N removeInEdge(Object edge, boolean isSelfLoop) {
if (!isSelfLoop) {
return removeOutEdge(edge);
}
return null;
}
@Override
public N removeOutEdge(Object edge) {
N node = super.removeOutEdge(edge);
Multiset<N> adjacentNodes = getReference(adjacentNodesReference);
if (adjacentNodes != null) {
checkState(adjacentNodes.remove(node));
}
return node;
}
@Override
public void addInEdge(E edge, N node, boolean isSelfLoop) {
if (!isSelfLoop) {
addOutEdge(edge, node);
}
}
@Override
public void addOutEdge(E edge, N node) {
super.addOutEdge(edge, node);
Multiset<N> adjacentNodes = getReference(adjacentNodesReference);
if (adjacentNodes != null) {
checkState(adjacentNodes.add(node));
}
}
@Nullable
private static <T> T getReference(@Nullable Reference<T> reference) {
return (reference == null) ? null : reference.get();
}
}
|
[
"564477645@qq.com"
] |
564477645@qq.com
|
c5a5ad242012afa4a51c0454c079ed66751b8659
|
781e2692049e87a4256320c76e82a19be257a05d
|
/all_data/cs61bl/lab04/cs61bl-kt/ModNCounter.java
|
6fe236d9af41ebf37d3f18f2e20a66c055d1b0ab
|
[] |
no_license
|
itsolutionscorp/AutoStyle-Clustering
|
54bde86fe6dbad35b568b38cfcb14c5ffaab51b0
|
be0e2f635a7558f56c61bc0b36c6146b01d1e6e6
|
refs/heads/master
| 2020-12-11T07:27:19.291038
| 2016-03-16T03:18:00
| 2016-03-16T03:18:42
| 59,454,921
| 4
| 0
| null | 2016-05-23T05:40:56
| 2016-05-23T05:40:56
| null |
UTF-8
|
Java
| false
| false
| 326
|
java
|
public class ModNCounter {
private int myCount;
private int myN;
public ModNCounter(int n) {
myCount = 0;
myN = n;
}
public void increment() {
if (myCount == myN -1)
{
myCount = 0;
}
else
{
myCount ++;
}
}
public void reset() {
myCount = 0;
}
public int value() {
return myCount;
}
}
|
[
"moghadam.joseph@gmail.com"
] |
moghadam.joseph@gmail.com
|
2670cc00d99e23c5d4a23c87ebf50d67df306029
|
ba9e09bf9f245fa2fd12b14c27d6efef63a4fb53
|
/assignments/assignment2/A2-Android-Test/src/vandy/mooc/tests/Test6_MultipleValidAndInvalidUrls.java
|
62c213631f4626494aaf6284bcda4c342c54011f
|
[] |
no_license
|
Bravo2017/POSA-15
|
c5cca3986f286ba9b545e63d1cfe221344d26dde
|
67b9b210cf6d54a140ffbf95abbeb689c04e13da
|
refs/heads/master
| 2020-03-22T19:27:27.618119
| 2017-02-16T16:06:24
| 2017-02-16T16:06:24
| 140,529,464
| 1
| 0
| null | 2018-07-11T06:09:23
| 2018-07-11T06:09:23
| null |
UTF-8
|
Java
| false
| false
| 745
|
java
|
package vandy.mooc.tests;
/**
* Created by Monte Creasor on 2015-05-26.
*/
/**
* Multiple Valid and Invalid URLs Test]:
*
* ACTIONS: Add, download, display, and deletion of a multiple valid and
* invalid image URLs.
* EXPECT RESULTS: Multiple entries in URL list and only the valid image URLs
* displayed images in the DisplayImageActivity grid view, and only the valid
* images deleted from the delete action.
*/
public class Test6_MultipleValidAndInvalidUrls extends DownloadImagesActivityBaseTest {
public void testRun() {
TestUrlsHelper.doTest(
mSolo,
mMixedUrlList,
VALID_MIXED_IMAGE_COUNT,
INVALID_MIXED_IMAGE_COUNT,
false);
}
}
|
[
"d.schmidt@vanderbilt.edu"
] |
d.schmidt@vanderbilt.edu
|
0be87f09a6dff5a796803dcc144f3fd71ae32a44
|
bb8fb4101a5b33bb59b86a3789612d5e8f4023ad
|
/ego-item/src/main/java/com/ego/item/service/impl/TbItemServiceImpl.java
|
64737f90a6aabfd14f5890f36c14469dddaac862
|
[] |
no_license
|
wangyc0104/ego
|
ca1f190fd4173fdc62d4210122ead678dcb278fb
|
44e9f3a42f350dd61d491aed948d7bb52b4f33e0
|
refs/heads/master
| 2022-12-22T13:25:39.049267
| 2019-07-16T13:41:58
| 2019-07-16T13:41:58
| 197,201,493
| 0
| 0
| null | 2022-12-16T05:46:12
| 2019-07-16T13:39:52
|
CSS
|
UTF-8
|
Java
| false
| false
| 1,480
|
java
|
package com.ego.item.service.impl;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.alibaba.dubbo.config.annotation.Reference;
import com.ego.commons.pojo.TbItemChild;
import com.ego.commons.utils.JsonUtils;
import com.ego.dubbo.service.TbItemDubboService;
import com.ego.item.service.TbItemService;
import com.ego.pojo.TbItem;
import com.ego.redis.dao.JedisDao;
@Service
public class TbItemServiceImpl implements TbItemService {
@Reference
TbItemDubboService tbItemDubboServiceImpl;
@Resource
private JedisDao jedisDaoImpl;
@Value("${redis.item.key}")
private String itemKey;
@Override
public TbItemChild show(long id) {
String key = itemKey + id;
if (jedisDaoImpl.exists(key)) {
String json = jedisDaoImpl.get(key);
if (json != null && !json.equals("")) {
return JsonUtils.jsonToPojo(json, TbItemChild.class);
}
}
TbItem item = tbItemDubboServiceImpl.selById(id);
TbItemChild child = new TbItemChild();
child.setId(item.getId());
child.setTitle(item.getTitle());
child.setPrice(item.getPrice());
child.setSellPoint(item.getSellPoint());
child.setImages(item.getImage() != null && !item.equals("") ? item.getImage().split(",") : new String[1]);
// 把child转换成Json数据并保存到缓存中
jedisDaoImpl.set(key, JsonUtils.objectToJson(child));
return child;
}
}
|
[
"wangyc0104@126.com"
] |
wangyc0104@126.com
|
eea62385eb9639c7c4cb46bb6aadf7fcb93fa6e6
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava3/Foo246Test.java
|
10ba2f92ec513a9ddc19abc029f271b03f027ea7
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 481
|
java
|
package applicationModulepackageJava3;
import org.junit.Test;
public class Foo246Test {
@Test
public void testFoo0() {
new Foo246().foo0();
}
@Test
public void testFoo1() {
new Foo246().foo1();
}
@Test
public void testFoo2() {
new Foo246().foo2();
}
@Test
public void testFoo3() {
new Foo246().foo3();
}
@Test
public void testFoo4() {
new Foo246().foo4();
}
@Test
public void testFoo5() {
new Foo246().foo5();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
b9bbd21d04805ec9987ee6719a19ae3939831f56
|
ccf82688f082e26cba5fc397c76c77cc007ab2e8
|
/Mage.Sets/src/mage/cards/c/ClashOfTitans.java
|
c9405028f8281d112d25dba44dd9e996015787e5
|
[
"MIT"
] |
permissive
|
magefree/mage
|
3261a89320f586d698dd03ca759a7562829f247f
|
5dba61244c738f4a184af0d256046312ce21d911
|
refs/heads/master
| 2023-09-03T15:55:36.650410
| 2023-09-03T03:53:12
| 2023-09-03T03:53:12
| 4,158,448
| 1,803
| 1,133
|
MIT
| 2023-09-14T20:18:55
| 2012-04-27T13:18:34
|
Java
|
UTF-8
|
Java
| false
| false
| 1,159
|
java
|
package mage.cards.c;
import mage.abilities.effects.common.FightTargetsEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.target.Target;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ClashOfTitans extends CardImpl {
public ClashOfTitans(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{R}{R}");
// Target creature fights another target creature.
this.getSpellAbility().addEffect(new FightTargetsEffect());
Target target = new TargetCreaturePermanent();
target.setTargetTag(1);
this.getSpellAbility().addTarget(target);
target = new TargetCreaturePermanent(StaticFilters.FILTER_ANOTHER_CREATURE_TARGET_2);
target.setTargetTag(2);
this.getSpellAbility().addTarget(target);
}
private ClashOfTitans(final ClashOfTitans card) {
super(card);
}
@Override
public ClashOfTitans copy() {
return new ClashOfTitans(this);
}
}
|
[
"theelk801@gmail.com"
] |
theelk801@gmail.com
|
b774563f9f962e1d0ee911907ee01c1a2279e6f4
|
df79dbcfc869b9d2180a44e34aa1e5ef208d1655
|
/New folder/Multithreading/src/com/classLevelLock/Hello.java
|
f6de7cabb4e15adb1d99cedf317a49ee8f4b0ac8
|
[] |
no_license
|
paragkhedkar07/TotalProjects
|
a170e3d5455a046b62709986f3f00a95b49fee70
|
7791da688c121d2422a4f4e52e91256c9b7606e5
|
refs/heads/master
| 2023-03-14T23:47:43.492749
| 2021-03-27T14:59:08
| 2021-03-27T14:59:08
| 352,097,373
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 219
|
java
|
package com.classLevelLock;
public class Hello
{
synchronized static public void display(String msg)
{
System.out.println("[");
System.out.println(msg);
System.out.println("]");
}
}
|
[
"paragkhedkar07@gmail.com"
] |
paragkhedkar07@gmail.com
|
6ab1ca89c64a7458a8689db132f742d8b519334f
|
54063bd2f151a0e49904ee044fa838d08312a285
|
/library/src/main/java/com/jryx/lib/json/serializerAdapter/LongDefault0Adapter.java
|
783964074d5375ae4af31d7e6a9d03fa04c26e0b
|
[] |
no_license
|
sunshaobei/jiriyixing
|
ee6896cf4cae48a6844c7c4f9a671c56d953436c
|
d24b723302eb1317693b6bc9d8dc085dfa2b67b6
|
refs/heads/master
| 2020-03-22T00:00:02.879273
| 2018-07-08T09:30:48
| 2018-07-08T09:30:48
| 139,218,262
| 0
| 0
| null | 2018-07-08T09:30:49
| 2018-06-30T04:12:32
|
Java
|
UTF-8
|
Java
| false
| false
| 1,268
|
java
|
package com.jryx.lib.json.serializerAdapter;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import com.google.gson.JsonSyntaxException;
import java.lang.reflect.Type;
/**
* Created by sunsh on 2017/5/11.
*/
public class LongDefault0Adapter implements JsonSerializer<Long>, JsonDeserializer<Long> {
@Override
public Long deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
throws JsonParseException {
try {
if (json.getAsString().equals("") || json.getAsString().equals("null")) {//定义为long类型,如果后台返回""或者null,则返回0
return 0L;
}
} catch (Exception ignore) {
}
try {
return json.getAsLong();
} catch (NumberFormatException e) {
throw new JsonSyntaxException(e);
}
}
@Override
public JsonElement serialize(Long src, Type typeOfSrc, JsonSerializationContext context) {
return new JsonPrimitive(src);
}
}
|
[
"sunshaobei@foxmail.com"
] |
sunshaobei@foxmail.com
|
9f12ee37e103e33ea3c39f6bbea2fc863372db02
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/5/5_29e52808b557f9c10f057c83ddc763954ecf962e/MultipleSessionsACLStabilityTest/5_29e52808b557f9c10f057c83ddc763954ecf962e_MultipleSessionsACLStabilityTest_s.java
|
faf4283ba9f2dc739d42dcfa057650bd710824ef
|
[] |
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
| 4,021
|
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.jackrabbit.oak.security.authorization.evaluation;
import javax.jcr.SimpleCredentials;
import org.apache.jackrabbit.oak.api.ContentSession;
import org.apache.jackrabbit.oak.api.Root;
import org.apache.jackrabbit.oak.api.Tree;
import org.apache.jackrabbit.oak.spi.security.privilege.PrivilegeConstants;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
/**
* Tests if ACL changes done by different sessions are isolated correctly following the MVCC pattern.
*/
public class MultipleSessionsACLStabilityTest extends AbstractOakCoreTest {
private Root testRoot1;
private Root testRoot2;
private ContentSession testSession1;
private ContentSession testSession2;
@Before
public void before() throws Exception {
super.before();
testSession1 = getTestSession();
String uid = testPrincipal.getName();
testSession2 = login(new SimpleCredentials(uid, uid.toCharArray()));
setupPermission("/", testPrincipal, true, PrivilegeConstants.JCR_ALL);
setupPermission("/a/bb", testPrincipal, false, PrivilegeConstants.JCR_READ);
testRoot1 = getTestRoot();
testRoot2 = testSession2.getLatestRoot();
}
@Test
public void testAllowChild() throws Exception {
Tree rootTree1 = testRoot1.getTree("/");
Tree rootTree2 = testRoot2.getTree("/");
assertFalse(rootTree1.hasChild("a/bb"));
assertFalse(rootTree2.hasChild("a/bb"));
// now allow read with root session
setupPermission("/a/bb", testPrincipal, true, PrivilegeConstants.JCR_READ);
// the test sessions still need to see the old ACLs
assertFalse(rootTree1.hasChild("a/bb"));
assertFalse(rootTree2.hasChild("a/bb"));
}
@Test
public void testAllowChild2() throws Exception {
// same as above, but before reading the items
setupPermission("/a/bb", testPrincipal, true, PrivilegeConstants.JCR_READ);
Tree rootTree1 = testRoot1.getTree("/");
Tree rootTree2 = testRoot2.getTree("/");
assertFalse(rootTree1.hasChild("a/bb"));
assertFalse(rootTree2.hasChild("a/bb"));
}
@Ignore("OAK-1197") // FIXME OAK-1197
@Test
public void testAllowChild3() throws Exception {
Tree rootTree1 = testRoot1.getTree("/");
Tree rootTree2 = testRoot2.getTree("/");
assertTrue(rootTree1.hasChild("a"));
assertTrue(rootTree2.hasChild("a"));
assertFalse(rootTree1.hasChild("a/bb"));
assertFalse(rootTree2.hasChild("a/bb"));
setupPermission(testRoot1, "/a", testPrincipal, false, PrivilegeConstants.JCR_READ);
assertFalse(rootTree1.hasChild("a"));
assertTrue(rootTree2.hasChild("a"));
String uid = testPrincipal.getName();
ContentSession session3 = login(new SimpleCredentials(uid, uid.toCharArray()));
Tree rootTree3 = session3.getLatestRoot().getTree("/");
assertFalse(rootTree3.hasChild("a"));
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
553b6b57deaf7692f8fa365fa0851ddc50bfb43e
|
e7e497b20442a4220296dea1550091a457df5a38
|
/java_workplace/renren_web_framework/commons/xiaonei-core-struts/trunk/src/main/java/com/xiaonei/platform/core/opt/base/chain/impl/handler/BadUserStatusHandler.java
|
8471179b37902cca32b93813d614f8be085e2ffb
|
[] |
no_license
|
gunner14/old_rr_code
|
cf17a2dedf8dfcdcf441d49139adaadc770c0eea
|
bb047dc88fa7243ded61d840af0f8bad22d68dee
|
refs/heads/master
| 2021-01-17T18:23:28.154228
| 2013-12-02T23:45:33
| 2013-12-02T23:45:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,020
|
java
|
package com.xiaonei.platform.core.opt.base.chain.impl.handler;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.xiaonei.platform.core.opt.OpiConstants;
import com.xiaonei.platform.core.opt.base.chain.BizFilterException;
import com.xiaonei.platform.core.opt.base.chain.WebContext;
/**
*
* 处理异常BizFilterException.CODE_BAD_USER_STATUS。
* 发生此异常的原因是当前用户是被封禁的用户。
*
* @author Li Weibo
* @since 2009-1-3 下午08:51:54
*/
public class BadUserStatusHandler extends ExceptionHandlerBase {
@Override
public int getHandledExceptionCode() {
return BizFilterException.CODE_BAD_USER_STATUS;
}
@Override
public void handleIt(BizFilterException e, WebContext context) {
HttpServletResponse response = context.getResponse();
try {
//次用户已经被封禁了,所以直接让TA退出登录
response.sendRedirect(OpiConstants.urlLogin + "/Logout.do");
} catch (IOException e1) {
e1.printStackTrace();
}
}
}
|
[
"liyong19861014@gmail.com"
] |
liyong19861014@gmail.com
|
f4adbddc95a5ccad4641485a97d9b485acc55d32
|
95186acbb0e65d373c28dc2cf57d17fe18b5716e
|
/cmall-order/src/main/java/com/zcw/cmall/order/feign/CartFeignService.java
|
34c39f00c9e4d19f536b02c65b71565b9a33f24a
|
[
"Apache-2.0"
] |
permissive
|
yuan282828sc/cmall
|
1a1fcf9108e92e4194302f7d67c06ca795686919
|
8d6b29807cbf4f3b85892958e09a9ca362fa874e
|
refs/heads/main
| 2023-04-07T17:14:02.251338
| 2021-04-01T06:57:50
| 2021-04-01T06:57:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 507
|
java
|
package com.zcw.cmall.order.feign;
import com.zcw.cmall.order.vo.OrderItemVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import java.util.List;
/**
* @author Chrisz
* @date 2020/12/22 - 20:27
*/
@FeignClient("cmall-cart")
public interface CartFeignService {
/**
* 获取购物车所有选中的购物项
* @return
*/
@GetMapping("/currentUserCartItems")
List<OrderItemVo> getCurrentUserCartItems();
}
|
[
"47981300+1582691494@users.noreply.github.com"
] |
47981300+1582691494@users.noreply.github.com
|
3b62a2a7db97a2a5e28eed05af34c58731812ad6
|
7d283d66b8fec00f8b78f2d62690815b350a4e2f
|
/dhis-web-coldchain/src/main/java/org/hisp/dhis/coldchain/equipment/action/UpdateEquipmentStatusAction.java
|
16cddc9c6d12398f7cfbb317b346dee1ad11db8a
|
[] |
no_license
|
mithileshhisp/dhis-local-in
|
cf0bf8f4f2abbd2d6a5fe96b6ba5576be658122e
|
5974d41ff163326e71610620b3f7013afc2aff27
|
refs/heads/master
| 2021-01-10T06:42:43.497674
| 2016-09-06T05:33:12
| 2016-09-06T05:33:12
| 43,063,043
| 0
| 1
| null | 2016-09-06T05:11:04
| 2015-09-24T11:33:36
|
Java
|
UTF-8
|
Java
| false
| false
| 7,878
|
java
|
package org.hisp.dhis.coldchain.equipment.action;
import java.util.ArrayList;
import java.util.List;
import org.hisp.dhis.coldchain.equipment.EquipmentAttributeValue;
import org.hisp.dhis.coldchain.equipment.EquipmentAttributeValueService;
import org.hisp.dhis.coldchain.equipment.Equipment;
import org.hisp.dhis.coldchain.equipment.EquipmentService;
import org.hisp.dhis.coldchain.equipment.EquipmentStatus;
import org.hisp.dhis.coldchain.equipment.EquipmentStatusService;
import org.hisp.dhis.coldchain.equipment.EquipmentTypeAttribute;
import org.hisp.dhis.coldchain.equipment.EquipmentType_Attribute;
import org.hisp.dhis.i18n.I18nFormat;
import org.hisp.dhis.user.CurrentUserService;
import com.opensymphony.xwork2.Action;
public class UpdateEquipmentStatusAction implements Action
{
// -------------------------------------------------------------------------
// Dependency
// -------------------------------------------------------------------------
private EquipmentStatusService equipmentStatusService;
private EquipmentService equipmentService;
private CurrentUserService currentUserService;
private I18nFormat format;
private EquipmentAttributeValueService equipmentAttributeValueService;
public void setEquipmentAttributeValueService( EquipmentAttributeValueService equipmentAttributeValueService )
{
this.equipmentAttributeValueService = equipmentAttributeValueService;
}
// -------------------------------------------------------------------------
// Input & Output
// -------------------------------------------------------------------------
private Integer equipmentId;
private String reportingDate;
private String dateOfUpdation;
private String status;
private String description;
// -------------------------------------------------------------------------
// Action Implementation
// -------------------------------------------------------------------------
public String execute() throws Exception
{
Equipment equipment = equipmentService.getEquipment( equipmentId );
// EquipmentType equipmentType = equipment.getEquipmentType();
List<EquipmentTypeAttribute> equipmentTypeAttributes = new ArrayList<EquipmentTypeAttribute>( );
for( EquipmentType_Attribute equipmentType_Attribute : equipment.getEquipmentType().getEquipmentType_Attributes() )
{
equipmentTypeAttributes.add( equipmentType_Attribute.getEquipmentTypeAttribute() );
}
EquipmentAttributeValue equipmentAttributeValue = new EquipmentAttributeValue();
for ( EquipmentTypeAttribute equipmentTypeAttribute : equipmentTypeAttributes )
{
if( EquipmentTypeAttribute.TYPE_COMBO.equalsIgnoreCase( equipmentTypeAttribute.getValueType() ) )
{
if ( EquipmentStatus.WORKING_STATUS.equalsIgnoreCase( equipmentTypeAttribute.getDescription() ) )
{
//System.out.println( "Inside Working Status" );
equipmentAttributeValue = equipmentAttributeValueService.getEquipmentAttributeValue( equipment, equipmentTypeAttribute );
if( equipmentAttributeValue == null )
{
equipmentAttributeValue = new EquipmentAttributeValue();
if( status.equalsIgnoreCase( EquipmentStatus.STATUS_WORKING_WELL ))
{
equipmentAttributeValue.setValue( EquipmentStatus.STATUS_WORKING_WELL.trim() );
}
else if( status.equalsIgnoreCase( EquipmentStatus.STATUS_WORKING_NEEDS_MAINTENANCE ))
{
equipmentAttributeValue.setValue( EquipmentStatus.STATUS_WORKING_NEEDS_MAINTENANCE.trim() );
}
else
{
equipmentAttributeValue.setValue( EquipmentStatus.STATUS_NOT_WORKING.trim() );
}
equipmentAttributeValueService.addEquipmentAttributeValue( equipmentAttributeValue );
}
else
{
if( status.equalsIgnoreCase( EquipmentStatus.STATUS_WORKING_WELL ))
{
equipmentAttributeValue.setValue( EquipmentStatus.STATUS_WORKING_WELL.trim() );
}
else if( status.equalsIgnoreCase( EquipmentStatus.STATUS_WORKING_NEEDS_MAINTENANCE ))
{
equipmentAttributeValue.setValue( EquipmentStatus.STATUS_WORKING_NEEDS_MAINTENANCE.trim() );
}
else
{
equipmentAttributeValue.setValue( EquipmentStatus.STATUS_NOT_WORKING.trim() );
}
equipmentAttributeValueService.updateEquipmentAttributeValue( equipmentAttributeValue );
}
}
}
}
if( status.equalsIgnoreCase( EquipmentStatus.STATUS_WORKING_WELL ))
{
equipment.setWorking( true );
equipmentService.updateEquipment( equipment );
}
else
{
equipment.setWorking( false );
equipmentService.updateEquipment( equipment );
}
String storedBy = currentUserService.getCurrentUsername();
EquipmentStatus equipmentStatus = new EquipmentStatus();
equipmentStatus.setDescription( description );
equipmentStatus.setEquipment( equipment );
equipmentStatus.setStatus( status );
equipmentStatus.setReportingDate( format.parseDate( reportingDate.trim() ) );
equipmentStatus.setUpdationDate( format.parseDate( dateOfUpdation.trim() ) );
equipmentStatus.setStoredBy( storedBy );
equipmentStatusService.addEquipmentStatus( equipmentStatus );
return SUCCESS;
}
// -------------------------------------------------------------------------
// Setters & Getters
// -------------------------------------------------------------------------
public void setEquipmentStatusService( EquipmentStatusService equipmentStatusService )
{
this.equipmentStatusService = equipmentStatusService;
}
public void setEquipmentService( EquipmentService equipmentService )
{
this.equipmentService = equipmentService;
}
public void setCurrentUserService( CurrentUserService currentUserService )
{
this.currentUserService = currentUserService;
}
public void setFormat( I18nFormat format )
{
this.format = format;
}
public void setEquipmentId( Integer equipmentId )
{
this.equipmentId = equipmentId;
}
public void setReportingDate( String reportingDate )
{
this.reportingDate = reportingDate;
}
public void setDateOfUpdation( String dateOfUpdation )
{
this.dateOfUpdation = dateOfUpdation;
}
public void setStatus( String status )
{
this.status = status;
}
public void setDescription( String description )
{
this.description = description;
}
}
|
[
"mithilesh.hisp@gmail.com"
] |
mithilesh.hisp@gmail.com
|
aa1f60a75e24f4936af196d035354d4986b75747
|
ff1793b508f32698ff5237de6d3015f95ee411c6
|
/src/main/java/nz/co/doltech/gwtjui/demo/client/application/interactions/sortable/SortablePresenter.java
|
eaef2293536a10f5e9a3f21f9cabccef21e9a1df
|
[
"Apache-2.0"
] |
permissive
|
BenDol/gwt-jui-demo
|
94a35ca58f1bff17811d64807e618b745ba8efeb
|
e81a436297b4ffaa69f22002d0cd9becb1d1cc0a
|
refs/heads/master
| 2021-05-02T13:07:05.141909
| 2016-12-11T13:17:10
| 2016-12-11T13:17:10
| 45,221,905
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,845
|
java
|
/*
* Copyright 2015 Doltech Systems Ltd.
*
* 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 nz.co.doltech.gwtjui.demo.client.application.interactions.sortable;
import com.google.inject.Inject;
import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.HasUiHandlers;
import com.gwtplatform.mvp.client.Presenter;
import com.gwtplatform.mvp.client.View;
import com.gwtplatform.mvp.client.annotations.NameToken;
import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit;
import com.gwtplatform.mvp.client.proxy.ProxyPlace;
import nz.co.doltech.gwtjui.demo.client.application.ApplicationPresenter;
import nz.co.doltech.gwtjui.demo.client.application.interactions.InteractionsPresenter;
import nz.co.doltech.gwtjui.demo.client.place.NameTokens;
public class SortablePresenter extends Presenter<SortablePresenter.MyView, SortablePresenter.MyProxy>
implements SortableUiHandlers {
interface MyView extends View, HasUiHandlers<SortableUiHandlers> {
}
@NameToken(NameTokens.sortable)
@ProxyCodeSplit
interface MyProxy extends ProxyPlace<SortablePresenter> {
}
@Inject
SortablePresenter(EventBus eventBus, MyView view, MyProxy proxy) {
super(eventBus, view, proxy, InteractionsPresenter.SLOT_INTERACTIONS);
getView().setUiHandlers(this);
}
}
|
[
"dolb90@gmail.com"
] |
dolb90@gmail.com
|
da640fe9c02afebcff19c55e281f11906e334c2b
|
aa6997aba1475b414c1688c9acb482ebf06511d9
|
/src/java/sql/JDBCType.java
|
ec8aeea453d7b7e139abbe3901eb75aaa6211493
|
[] |
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
| 5,940
|
java
|
/*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package java.sql;
/**
* <P>Defines the constants that are used to identify generic
* SQL types, called JDBC types.
* <p>
*
* @see SQLType
* @since 1.8
*/
public enum JDBCType implements SQLType {
/**
* Identifies the generic SQL type {@code BIT}.
*/
BIT(Types.BIT),
/**
* Identifies the generic SQL type {@code TINYINT}.
*/
TINYINT(Types.TINYINT),
/**
* Identifies the generic SQL type {@code SMALLINT}.
*/
SMALLINT(Types.SMALLINT),
/**
* Identifies the generic SQL type {@code INTEGER}.
*/
INTEGER(Types.INTEGER),
/**
* Identifies the generic SQL type {@code BIGINT}.
*/
BIGINT(Types.BIGINT),
/**
* Identifies the generic SQL type {@code FLOAT}.
*/
FLOAT(Types.FLOAT),
/**
* Identifies the generic SQL type {@code REAL}.
*/
REAL(Types.REAL),
/**
* Identifies the generic SQL type {@code DOUBLE}.
*/
DOUBLE(Types.DOUBLE),
/**
* Identifies the generic SQL type {@code NUMERIC}.
*/
NUMERIC(Types.NUMERIC),
/**
* Identifies the generic SQL type {@code DECIMAL}.
*/
DECIMAL(Types.DECIMAL),
/**
* Identifies the generic SQL type {@code CHAR}.
*/
CHAR(Types.CHAR),
/**
* Identifies the generic SQL type {@code VARCHAR}.
*/
VARCHAR(Types.VARCHAR),
/**
* Identifies the generic SQL type {@code LONGVARCHAR}.
*/
LONGVARCHAR(Types.LONGVARCHAR),
/**
* Identifies the generic SQL type {@code DATE}.
*/
DATE(Types.DATE),
/**
* Identifies the generic SQL type {@code TIME}.
*/
TIME(Types.TIME),
/**
* Identifies the generic SQL type {@code TIMESTAMP}.
*/
TIMESTAMP(Types.TIMESTAMP),
/**
* Identifies the generic SQL type {@code BINARY}.
*/
BINARY(Types.BINARY),
/**
* Identifies the generic SQL type {@code VARBINARY}.
*/
VARBINARY(Types.VARBINARY),
/**
* Identifies the generic SQL type {@code LONGVARBINARY}.
*/
LONGVARBINARY(Types.LONGVARBINARY),
/**
* Identifies the generic SQL value {@code NULL}.
*/
NULL(Types.NULL),
/**
* Indicates that the SQL type
* is database-specific and gets mapped to a Java object that can be
* accessed via the methods getObject and setObject.
*/
OTHER(Types.OTHER),
/**
* Indicates that the SQL type
* is database-specific and gets mapped to a Java object that can be
* accessed via the methods getObject and setObject.
*/
JAVA_OBJECT(Types.JAVA_OBJECT),
/**
* Identifies the generic SQL type {@code DISTINCT}.
*/
DISTINCT(Types.DISTINCT),
/**
* Identifies the generic SQL type {@code STRUCT}.
*/
STRUCT(Types.STRUCT),
/**
* Identifies the generic SQL type {@code ARRAY}.
*/
ARRAY(Types.ARRAY),
/**
* Identifies the generic SQL type {@code BLOB}.
*/
BLOB(Types.BLOB),
/**
* Identifies the generic SQL type {@code CLOB}.
*/
CLOB(Types.CLOB),
/**
* Identifies the generic SQL type {@code REF}.
*/
REF(Types.REF),
/**
* Identifies the generic SQL type {@code DATALINK}.
*/
DATALINK(Types.DATALINK),
/**
* Identifies the generic SQL type {@code BOOLEAN}.
*/
BOOLEAN(Types.BOOLEAN),
/* JDBC 4.0 Types */
/**
* Identifies the SQL type {@code ROWID}.
*/
ROWID(Types.ROWID),
/**
* Identifies the generic SQL type {@code NCHAR}.
*/
NCHAR(Types.NCHAR),
/**
* Identifies the generic SQL type {@code NVARCHAR}.
*/
NVARCHAR(Types.NVARCHAR),
/**
* Identifies the generic SQL type {@code LONGNVARCHAR}.
*/
LONGNVARCHAR(Types.LONGNVARCHAR),
/**
* Identifies the generic SQL type {@code NCLOB}.
*/
NCLOB(Types.NCLOB),
/**
* Identifies the generic SQL type {@code SQLXML}.
*/
SQLXML(Types.SQLXML),
/* JDBC 4.2 Types */
/**
* Identifies the generic SQL type {@code REF_CURSOR}.
*/
REF_CURSOR(Types.REF_CURSOR),
/**
* Identifies the generic SQL type {@code TIME_WITH_TIMEZONE}.
*/
TIME_WITH_TIMEZONE(Types.TIME_WITH_TIMEZONE),
/**
* Identifies the generic SQL type {@code TIMESTAMP_WITH_TIMEZONE}.
*/
TIMESTAMP_WITH_TIMEZONE(Types.TIMESTAMP_WITH_TIMEZONE);
/**
* The Integer value for the JDBCType. It maps to a value in
* {@code Types.java}
*/
private Integer type;
/**
* Constructor to specify the data type value from {@code Types) for
* this data type.
*
* @param type The value from {@code Types) for this data type
*/
JDBCType(final Integer type) {
this.type = type;
}
/**
* {@inheritDoc }
*
* @return The name of this {@code SQLType}.
*/
public String getName() {
return name();
}
/**
* Returns the name of the vendor that supports this data type.
*
* @return The name of the vendor for this data type which is {@literal java.sql} for JDBCType.
*/
public String getVendor() {
return "java.sql";
}
/**
* Returns the vendor specific type number for the data type.
*
* @return An Integer representing the data type. For {@code JDBCType}, the value will be the same
* value as in {@code Types} for the data type.
*/
public Integer getVendorTypeNumber() {
return type;
}
/**
* Returns the {@code JDBCType} that corresponds to the specified
* {@code Types} value
*
* @param type {@code Types} value
* @return The {@code JDBCType} constant
* @throws IllegalArgumentException if this enum type has no constant with the specified {@code
* Types} value
* @see Types
*/
public static JDBCType valueOf(int type) {
for (JDBCType sqlType : JDBCType.class.getEnumConstants()) {
if (type == sqlType.type) {
return sqlType;
}
}
throw new IllegalArgumentException("Type:" + type + " is not a valid "
+ "Types.java value.");
}
}
|
[
"yueny09@163.com"
] |
yueny09@163.com
|
4e4faa0134acdcafa23148be33b472801682fe37
|
d0306e252cc3e2985434e1d40cbc64ad17083829
|
/src/HDFCBank.java
|
d86863aa33820ba88c118f4a538c25c11a3d3816
|
[] |
no_license
|
nsk227/SeleniumProject1
|
ac9a263c40ea9402d923695d4765ae4f6f1f036f
|
aff6c6f0a482b3bfb8d056bee2da0f50b5b4da2b
|
refs/heads/master
| 2023-01-21T14:18:39.956052
| 2020-12-04T00:49:24
| 2020-12-04T00:49:24
| 318,360,328
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 464
|
java
|
public class HDFCBank implements Bank{
public void debit()
{
System.out.println("HDFCBank - debit");
}
public void credit()
{
System.out.println("HDFCBank - credit");
}
public void transfermoney()
{
System.out.println("HDFCBank - transfermoney");
}
//Apart fromt the unimplemented methods of Bank interface
//class can have its own methods
public void getHDFCSpecificROI(){
System.out.println("HDFCBank - ROI");
}
}
|
[
"you@example.com"
] |
you@example.com
|
a011f2662f9facc728f18e2b7a2519990274640e
|
7c3eff12403ab54d2debff0853b0c92924c6d6c6
|
/api/src/main/java/org/apache/commons/rdf/api/TripleLike.java
|
1427f179f9f2d9e5036c2b3385e4ac74e2c8638e
|
[
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] |
permissive
|
Imdapro/commons-rdf
|
c563174b9299accfe1f895b194406f6ff432173b
|
76f0b6c1fc8c5390cba4b593dc86e5f4c759227c
|
refs/heads/master
| 2021-01-18T21:14:25.079708
| 2017-05-04T20:46:49
| 2017-05-04T20:46:49
| 87,014,086
| 0
| 2
| null | 2017-05-04T20:46:50
| 2017-04-02T20:29:57
|
Java
|
UTF-8
|
Java
| false
| false
| 2,178
|
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.commons.rdf.api;
/**
* A generalised "triple-like" interface, extended by {@link Triple} and
* {@link Quad}.
* <p>
* A TripleLike statement has at least a {@link #getSubject()},
* {@link #getPredicate()} and {@link #getObject()}, but unlike a {@link Triple}
* does not have a formalised {@link Triple#equals(Object)} or
* {@link Triple#hashCode()} semantics and is not required to be
* <em>immutable</em> or <em>thread-safe</em>. This interfaced can also be used
* for <em>generalised triples</em> (e.g. a {@link BlankNode} as predicate).
* <p>
* Implementations should specialise which specific {@link RDFTerm} types they
* return by overriding {@link #getSubject()}, {@link #getPredicate()} and
* {@link #getObject()}.
*
*
* @since 0.3.0-incubating
* @see Triple
* @see Quad
* @see QuadLike
*/
public interface TripleLike {
/**
* The subject of this statement.
*
* @return The subject, typically an {@link IRI} or {@link BlankNode}.
*/
RDFTerm getSubject();
/**
* The predicate of this statement.
*
* @return The predicate, typically an {@link IRI}.
*/
RDFTerm getPredicate();
/**
* The object of this statement.
*
* @return The object, typically an {@link IRI}, {@link BlankNode} or
* {@link Literal}.
*/
RDFTerm getObject();
}
|
[
"stain@apache.org"
] |
stain@apache.org
|
f8ee5d072e243f6056ef4e39a09c8555cd441336
|
c6c1a124eb1ff2fc561213d43d093f84d1ab2c43
|
/javaplus-stk/src/main/java/cn/javaplus/stock/tests/TestWriteImage.java
|
5172c03d24bb3a4cd68378860ab08db224bbb542
|
[] |
no_license
|
fantasylincen/javaplus
|
69201dba21af0973dfb224c53b749a3c0440317e
|
36fc370b03afe952a96776927452b6d430b55efd
|
refs/heads/master
| 2016-09-06T01:55:33.244591
| 2015-08-15T12:15:51
| 2015-08-15T12:15:51
| 15,601,930
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 509
|
java
|
package cn.javaplus.stock.tests;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import cn.javaplus.stock.util.Market;
import cn.javaplus.stock.util.MyImage;
public class TestWriteImage {
/**
* @param args
*/
public static void main(String[] args) {
String file = Market.WORKSPACE_DIR + "buy-sell-000001.png";
MyImage img = new MyImage(800, 400);
img.savePng(file);
}
}
|
[
"12-2"
] |
12-2
|
45bcab2eba7da1e1e5878db14c7433b359dc3df8
|
efc256721d2d07022f562fb28c6a21ffdb396fdc
|
/wrench-project-parent/dml-switch/src/main/java/ir/piana/dev/project/dmlswitch/data/repo/FinancialShetab87Repo.java
|
3db35a9a7cbfdede01aceb05c6667cdb3c007a63
|
[] |
no_license
|
pianairco/piana-wrench
|
bc467528d35943d191fa3c52a9dc4aa08e16338a
|
8b7baea7fae303ad2beb53abe308fc5e3a317cfa
|
refs/heads/master
| 2020-04-27T07:40:12.145415
| 2019-03-27T07:49:19
| 2019-03-27T07:49:19
| 174,143,578
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 403
|
java
|
package ir.piana.dev.project.dmlswitch.data.repo;
import ir.piana.dev.project.dmlswitch.data.entity.FinancialShetabV87Entity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
/**
* @author Mohammad Rahmati, 3/5/2019
*/
@Repository
public interface FinancialShetab87Repo
extends JpaRepository<FinancialShetabV87Entity, Long> {
}
|
[
"Rahmati@office.dml.com"
] |
Rahmati@office.dml.com
|
31ebad3c7759af976d6aaa8224b0c51781992854
|
3df76d43273824ddeb625acb338ce543a22904f7
|
/ds4p-receiver/ds4p-admin-test-harness-p2/src/main/java/utsapi2_0/UtsMetathesaurusContent/GetConceptResponse.java
|
5588f9369d2a6ee88302163355a44a8e74b165e8
|
[] |
no_license
|
PilotDS4P/ds4p-pilot-receiver-public
|
c91ff3f41c9bf7cdf37d18a923b5479d9ce2163e
|
545c7dd006fd7a58daab8502e6ae85e4ec0e3804
|
refs/heads/master
| 2016-09-15T21:40:32.493523
| 2013-05-30T19:31:50
| 2013-05-30T19:31:50
| 10,087,112
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,674
|
java
|
/**
* This software is being provided per FARS 52.227-14 Rights in Data - General.
* Any redistribution or request for copyright requires written consent by the
* Department of Veterans Affairs.
*/
package UtsMetathesaurusContent;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for getConceptResponse complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="getConceptResponse">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="return" type="{http://webservice.uts.umls.nlm.nih.gov/}conceptDTO" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "getConceptResponse", propOrder = {
"_return"
})
public class GetConceptResponse {
@XmlElement(name = "return")
protected ConceptDTO _return;
/**
* Gets the value of the return property.
*
* @return
* possible object is
* {@link ConceptDTO }
*
*/
public ConceptDTO getReturn() {
return _return;
}
/**
* Sets the value of the return property.
*
* @param value
* allowed object is
* {@link ConceptDTO }
*
*/
public void setReturn(ConceptDTO value) {
this._return = value;
}
}
|
[
"duane.decouteau@gmail.com"
] |
duane.decouteau@gmail.com
|
cfcd2d1e589468ea3ee82d7fb2ceea569d3e3e01
|
e50ca2a0397508c318b1b6e1f0ccb26a4e65170d
|
/curtain-order-dubbo/curtain-order-dubbo-client/src/main/java/com/towcent/curtain/order/app/client/sys/dto/Session.java
|
be6d64d7d75413da1b45b968f14879de98e72724
|
[] |
no_license
|
towcentTeam01/curtain-order
|
333a28683663e32411359e0d2b212b9e18516fd4
|
57059ab46872679531f8a77ee38b423f679dc479
|
refs/heads/master
| 2020-04-07T13:13:48.605368
| 2019-05-07T00:19:01
| 2019-05-07T00:19:01
| 158,398,363
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,234
|
java
|
package com.towcent.curtain.order.app.client.sys.dto;
import java.io.Serializable;
/**
* 移动端session对象(保存相关账户信息、以及角色等信息)
*
* @author huangtao
* @date 2015年11月19日 下午4:20:29
* @version 0.1.0
*/
public class Session implements Serializable {
private static final long serialVersionUID = 1L;
// sessionId
private String tokenId;
private String account;
// App类别(1:客户端)
private Byte appType = 1;
private String deviceNo;
private String deviceToken;
private Byte sysType = 2;
private String phoneModel;
private String appVersion;
private String openId;
/** 会员账户 */
private SysFrontAccount sysFrontAccount;
public String getTokenId() {
return tokenId;
}
public void setTokenId(String tokenId) {
this.tokenId = tokenId;
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public Byte getAppType() {
return appType;
}
public void setAppType(Byte appType) {
this.appType = appType;
}
public String getDeviceNo() {
return deviceNo;
}
public void setDeviceNo(String deviceNo) {
this.deviceNo = deviceNo;
}
public String getDeviceToken() {
return deviceToken;
}
public void setDeviceToken(String deviceToken) {
this.deviceToken = deviceToken;
}
public Byte getSysType() {
return sysType;
}
public void setSysType(Byte sysType) {
this.sysType = sysType;
}
public String getPhoneModel() {
return phoneModel;
}
public void setPhoneModel(String phoneModel) {
this.phoneModel = phoneModel;
}
public String getAppVersion() {
return appVersion;
}
public void setAppVersion(String appVersion) {
this.appVersion = appVersion;
}
/**
* sysFrontAccount.
*
* @return the sysFrontAccount
*/
public SysFrontAccount getSysFrontAccount() {
return sysFrontAccount;
}
/**
* sysFrontAccount.
*
* @param sysFrontAccount the sysFrontAccount to set
*/
public void setSysFrontAccount(SysFrontAccount sysFrontAccount) {
this.sysFrontAccount = sysFrontAccount;
}
public String getOpenId() {
return openId;
}
public void setOpenId(String openId) {
this.openId = openId;
}
}
|
[
"taohuanga@163.com"
] |
taohuanga@163.com
|
dffdb51a09be128ade411cbbb9ea07c4562214dd
|
3d64c0bea178ec47a8948bd3368353d45f525301
|
/src/main/java/com/share/charge/mybatis/generator/mapper/OmsOrderMapper.java
|
7e24038bc3e8d368511772a7d17f7d3f24a62c69
|
[] |
no_license
|
Alisurice/mvc-project-seed
|
8e92fba87080b1f1beb92a74933c7f49ef0cffae
|
5e2998fc19f3348d575801740df6f894727336c7
|
refs/heads/master
| 2023-06-12T18:31:31.578107
| 2021-06-12T08:07:51
| 2021-06-12T08:07:51
| 375,361,900
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 921
|
java
|
package com.share.charge.mybatis.generator.mapper;
import com.share.charge.mybatis.generator.model.OmsOrder;
import com.share.charge.mybatis.generator.model.OmsOrderExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface OmsOrderMapper {
long countByExample(OmsOrderExample example);
int deleteByExample(OmsOrderExample example);
int deleteByPrimaryKey(Integer id);
int insert(OmsOrder record);
int insertSelective(OmsOrder record);
List<OmsOrder> selectByExample(OmsOrderExample example);
OmsOrder selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") OmsOrder record, @Param("example") OmsOrderExample example);
int updateByExample(@Param("record") OmsOrder record, @Param("example") OmsOrderExample example);
int updateByPrimaryKeySelective(OmsOrder record);
int updateByPrimaryKey(OmsOrder record);
}
|
[
"test"
] |
test
|
20c162f6b669bd2695845fbf4d6bff93ca40bc5c
|
3bd3f4b6d35687115e772b072bf3caf63f615f75
|
/2022-08/spring-26/classwork/src/main/java/ru/otus/spring/security/SecurityConfiguration.java
|
febc60baba08e7d5afab9f24e5882aaabd88ffc7
|
[] |
no_license
|
OtusTeam/Spring
|
a2394de99776bff02610bd17c67a8403d38cc0d5
|
afbcb23d33a9688652da604d2a508036fc5236a7
|
refs/heads/master
| 2023-08-28T19:12:49.241468
| 2023-08-26T07:28:32
| 2023-08-26T07:28:32
| 173,905,170
| 142
| 187
| null | 2023-07-07T23:21:26
| 2019-03-05T08:23:16
|
Java
|
UTF-8
|
Java
| false
| false
| 2,482
|
java
|
package ru.otus.spring.security;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.crypto.password.PasswordEncoder;
@EnableWebSecurity
@Configuration
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
public void configure(WebSecurity web) {
web.ignoring().antMatchers("/");
}
@Override
public void configure(HttpSecurity http) throws Exception {
http.csrf().disable()
//.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
//.and()
.authorizeRequests().antMatchers("/public").permitAll()
.and()
.authorizeRequests().antMatchers("/authenticated", "/success").authenticated()
.and()
.authorizeRequests().antMatchers("/user").hasAnyRole("ADMIN", "USER")
.and()
.authorizeRequests().antMatchers("/admin").hasRole("ADMIN")
.and()
.formLogin()
.and()
.logout().logoutUrl("/logout");
}
@Bean
public PasswordEncoder passwordEncoder() {
return new PasswordEncoder() {
@Override
public String encode(CharSequence charSequence) {
return charSequence.toString();
}
@Override
public boolean matches(CharSequence charSequence, String s) {
return charSequence.toString().equals(s);
}
};
}
@Autowired
public void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.inMemoryAuthentication()
.withUser("admin").password("password").roles("ADMIN")
.and()
.withUser("user").password("password").roles("USER")
.and()
.withUser("manager").password("manager").roles("MANAGER", "USER");
}
}
|
[
"kataus@gmail.com"
] |
kataus@gmail.com
|
7f45323c1c7260a1be775a8674252ec16b98bf96
|
7dbe6165180bd40267bff563fe1e5c9c84b291ed
|
/app/src/main/java/com/lantel/app/api/AllBean.java
|
a4bdc428b0396c12f87465e359ec928267e55a2f
|
[] |
no_license
|
13302864582/Lantel360CRM_Parent
|
ef02380e0886f885ea6496c93e2dd87c0ca92805
|
b29b1aab925f83927c6122d3c73767c9cc5b8953
|
refs/heads/master
| 2020-05-22T23:38:11.039162
| 2019-06-25T10:50:19
| 2019-06-25T10:50:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,785
|
java
|
package com.lantel.app.api;
import com.lantel.common.HttpResBean;
import java.util.List;
public class AllBean extends HttpResBean {
private AllBean.DataBean data;
public DataBean getData() {
return data;
}
public void setData(DataBean data) {
this.data = data;
}
public static class DataBean {
private List<ClassroomsBean> classrooms;
private DictsBean dicts;
private List<PublicSchoolsBean> public_schools;
private List<LessonsBean> lessons;
public List<LessonsBean> getLessons() {
return lessons;
}
public void setLessons(List<LessonsBean> lessons) {
this.lessons = lessons;
}
public DictsBean getDicts() {
return dicts;
}
public void setDicts(DictsBean dicts) {
this.dicts = dicts;
}
public List<PublicSchoolsBean> getPublic_schools() {
return public_schools;
}
public void setPublic_schools(List<PublicSchoolsBean> public_schools) {
this.public_schools = public_schools;
}
public List<ClassroomsBean> getClassrooms() {
return classrooms;
}
public void setClassrooms(List<ClassroomsBean> classrooms) {
this.classrooms = classrooms;
}
public static class ClassroomsBean {
private int cr_id;
private String room_name;
public int getCr_id() {
return cr_id;
}
public void setCr_id(int cr_id) {
this.cr_id = cr_id;
}
public String getRoom_name() {
return room_name;
}
public void setRoom_name(String room_name) {
this.room_name = room_name;
}
}
public static class PublicSchoolsBean{
private int bid;
private String school_name;
public int getBid() {
return bid;
}
public void setBid(int bid) {
this.bid = bid;
}
public String getSchool_name() {
return school_name;
}
public void setSchool_name(String school_name) {
this.school_name = school_name;
}
}
public static class DictsBean {
private List<LeaveReasonBean> leave_reason;
public List<LeaveReasonBean> getLeave_reason() {
return leave_reason;
}
public void setLeave_reason(List<LeaveReasonBean> leave_reason) {
this.leave_reason = leave_reason;
}
public static class LeaveReasonBean {
private int did;
private String title;
public int getDid() {
return did;
}
public void setDid(int did) {
this.did = did;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}
}
public static class LessonsBean{
private int lid;
private String lesson_name;
public int getLid() {
return lid;
}
public void setLid(int lid) {
this.lid = lid;
}
public String getLesson_name() {
return lesson_name;
}
public void setLesson_name(String lesson_name) {
this.lesson_name = lesson_name;
}
}
}
}
|
[
"759030201@qq.com"
] |
759030201@qq.com
|
fc72b6a0fa0d091452f297847b5e1e26feb02b9f
|
d9a99eeb8226d39c2c9e7158e241b565003239f6
|
/greetgo.conf/src/kz/greetgo/conf/hot/DefaultLongValue.java
|
f2a9a4cd6bda1c396aa24a6e7336c97645dc001d
|
[] |
no_license
|
gitsby/greetgo.conf
|
d138314dca85d5f34945f3f66037d64ffb36b13b
|
fbfc399b797e2fe7ba12eceb7cfe8156c336438d
|
refs/heads/master
| 2020-07-06T14:22:49.483166
| 2019-07-09T12:08:50
| 2019-07-09T12:08:50
| 104,435,235
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 579
|
java
|
package kz.greetgo.conf.hot;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
/**
* Perform default parameter value
*
* @author pompei
*/
@Documented
@Target({METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface DefaultLongValue {
/**
* Perform default parameter value
*
* @return default parameter value
*/
long value();
}
|
[
"ekolpakov@greet-go.com"
] |
ekolpakov@greet-go.com
|
059637594168818624763433c73278b88f145c4f
|
38c4451ab626dcdc101a11b18e248d33fd8a52e0
|
/identifiers/apache-ant-1.8.4/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFileIterator.java
|
9669e19e44ac63e9a6b58ee37739448a1cfdc854
|
[] |
no_license
|
habeascorpus/habeascorpus-data
|
47da7c08d0f357938c502bae030d5fb8f44f5e01
|
536d55729f3110aee058ad009bcba3e063b39450
|
refs/heads/master
| 2020-06-04T10:17:20.102451
| 2013-02-19T15:19:21
| 2013-02-19T15:19:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 332
|
java
|
org PACKAGE_IDENTIFIER false
apache PACKAGE_IDENTIFIER false
tools PACKAGE_IDENTIFIER false
ant PACKAGE_IDENTIFIER false
taskdefs PACKAGE_IDENTIFIER false
optional PACKAGE_IDENTIFIER false
depend PACKAGE_IDENTIFIER false
ClassFileIterator TYPE_IDENTIFIER true
ClassFile TYPE_IDENTIFIER false
getNextClassFile METHOD_IDENTIFIER true
|
[
"pschulam@gmail.com"
] |
pschulam@gmail.com
|
d79e1d858d41c2d649b79c4d1e3249af0e44c0a2
|
7dbbe21b902fe362701d53714a6a736d86c451d7
|
/BzenStudio-5.6/Source/com/zend/ide/hb/sb.java
|
3ee3db61cc35394cec323484443d0c512dad6143
|
[] |
no_license
|
HS-matty/dev
|
51a53b4fd03ae01981549149433d5091462c65d0
|
576499588e47e01967f0c69cbac238065062da9b
|
refs/heads/master
| 2022-05-05T18:32:24.148716
| 2022-03-20T16:55:28
| 2022-03-20T16:55:28
| 196,147,486
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,165
|
java
|
package com.zend.ide.hb;
import com.zend.ide.p.q;
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.io.File;
import javax.swing.JList;
class sb extends q
{
final ub b;
private sb(ub paramub)
{
}
public Component getListCellRendererComponent(JList paramJList, Object paramObject, int paramInt, boolean paramBoolean1, boolean paramBoolean2)
{
super.getListCellRendererComponent(paramJList, paramObject, paramInt, paramBoolean1, paramBoolean2);
o();
Object localObject;
if ((paramObject instanceof d))
{
localObject = (d)paramObject;
String str1 = ((d)localObject).f().getAbsolutePath();
String str2 = " (" + ((d)localObject).a() + ") ";
ub.a(this.b, ((d)localObject).d());
ub.a(this.b, ((d)localObject).b().trim());
ub.b(this.b, ((d)localObject).g().length());
a(str1, null, null);
a(str2, null, null);
if ((ub.a(this.b) >= 0) && (ub.a(this.b) + ub.b(this.b) <= ub.c(this.b).length()))
{
String str3 = ub.c(this.b);
int j;
while ((j = str3.indexOf("\t")) != -1)
{
str3 = str3.substring(0, j) + ub.d(this.b) + str3.substring(j + 1);
if (j >= ub.a(this.b))
continue;
ub.c(this.b, ub.d(this.b).length() - 1);
}
a(str3.substring(0, ub.a(this.b)), null, null);
a(str3.substring(ub.a(this.b), ub.a(this.b) + ub.b(this.b)), null, Color.RED);
a(str3.substring(ub.a(this.b) + ub.b(this.b)), null, null);
}
else
{
a(ub.c(this.b), null, null);
}
}
else
{
localObject = paramObject.toString();
int i = ((String)localObject).indexOf(":");
a(((String)localObject).substring(0, i + 1), getFont().deriveFont(1), null);
a(((String)localObject).substring(i + 1), getFont().deriveFont(1), Color.red);
}
setToolTipText(getText());
return (Component)this;
}
sb(ub paramub, eb parameb)
{
this(paramub);
}
}
/* Location: C:\Program Files\Zend\ZendStudio-5.5.1\bin\ZendIDE.jar
* Qualified Name: com.zend.ide.hb.sb
* JD-Core Version: 0.6.0
*/
|
[
"byqdes@gmail.com"
] |
byqdes@gmail.com
|
7c5c2c60f54f4d92b305ec247b432b239b7acdbe
|
9005a4e760354309ac59bce7cc7cc5828af2b8a0
|
/weather/src/main/java/pl/com/app/model/Product.java
|
30f2cc913dd90c67c312e97b90cc68f8e19eaf8e
|
[] |
no_license
|
Tomek91/WEATHER-APP-MODULE
|
1ec2cccaffd9a0425e1ade313aebe91f66979446
|
fecf9a0b91c3dbbd16fda299bbe9fa9604cb5fee
|
refs/heads/master
| 2022-11-29T12:44:30.473649
| 2020-01-05T15:54:50
| 2020-01-05T15:54:50
| 229,489,948
| 0
| 0
| null | 2022-11-24T09:17:35
| 2019-12-21T22:22:37
|
Java
|
UTF-8
|
Java
| false
| false
| 1,942
|
java
|
package pl.com.app.model;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Objects;
@Entity
@Table(name = "products")
public class Product {
@Id
@GeneratedValue
private Long id;
@Column(unique = true)
private String name;
private BigDecimal price;
@ManyToOne()
@JoinColumn(name = "category_id")
private Category category;
public Product() {
}
public Product(Long id, String name, BigDecimal price, Category category) {
this.id = id;
this.name = name;
this.price = price;
this.category = category;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public Category getCategory() {
return category;
}
public void setCategory(Category category) {
this.category = category;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Product product = (Product) o;
return Objects.equals(id, product.id) &&
Objects.equals(name, product.name) &&
Objects.equals(price, product.price) &&
Objects.equals(category, product.category);
}
@Override
public int hashCode() {
return Objects.hash(id, name, price, category);
}
@Override
public String toString() {
return "Product{" +
"id=" + id +
", name='" + name + '\'' +
", price=" + price +
", category=" + category +
'}';
}
}
|
[
"tomek.r9@wp.pl"
] |
tomek.r9@wp.pl
|
9139a1117d549cfd590e5470f02657c0bf25ac07
|
d0370050c3e3347064632c9cf0fa6c9e453e10c6
|
/src/Logging/HandlerExample_01.java
|
7a81e233c8e779423a98d8b7e90c1314f9ee6e76
|
[] |
no_license
|
demotivirus/CodeFinder
|
ecdfcdcc09a2d8be8235da3daa0e8e11c38591e9
|
8cf7ec82d0549fe1d4f8600caa354a1c2de06106
|
refs/heads/master
| 2021-07-14T05:14:33.506327
| 2021-06-28T10:03:05
| 2021-06-28T10:03:05
| 220,710,293
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 985
|
java
|
package Logging;
import java.util.logging.*;
public class HandlerExample_01 {
private static final Logger LOGGER = Logger.getLogger(HandlerExample_01.class.getName());
public static void main(String[] args) {
Handler consoleHandler = null;
Handler fileHandler = null;
try{
consoleHandler = new ConsoleHandler();
fileHandler = new FileHandler("/javaCode.log");
LOGGER.addHandler(consoleHandler);
LOGGER.addHandler(fileHandler);
consoleHandler.setLevel(Level.ALL);
fileHandler.setLevel(Level.ALL);
LOGGER.setLevel(Level.ALL);
LOGGER.config("Config done");
LOGGER.removeHandler(consoleHandler);
LOGGER.log(Level.FINE, "Finer logged");
} catch (Exception ex){
LOGGER.log(Level.SEVERE, "Error occur in FileHandler.", ex);
}
LOGGER.finer("Finest example on LOGGER handler completed.");
}
}
|
[
"demotivirus@gmail.com"
] |
demotivirus@gmail.com
|
6840da52c6bb84fc45046515027dd376674c1be8
|
10354290ed5bc29a8349ab449fe904a8a149ee73
|
/src/main/java/mekanism/client/gui/element/custom/GuiSupportedUpgrades.java
|
2c46431f28002e45cc6422cd54b241431c784408
|
[
"MIT"
] |
permissive
|
thecow275/Mekanism
|
17ac675b59aa8af9ac73909f8182262881d422ca
|
6093851f05dfb5ff2da52ace87f06ea03a7571a4
|
refs/heads/master
| 2022-12-10T08:45:16.038104
| 2022-10-22T15:47:07
| 2022-10-22T15:47:07
| 31,206,431
| 0
| 0
| null | 2020-10-22T16:22:32
| 2015-02-23T12:04:36
|
Java
|
UTF-8
|
Java
| false
| false
| 4,564
|
java
|
package mekanism.client.gui.element.custom;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.PoseStack;
import java.util.Set;
import mekanism.api.Upgrade;
import mekanism.api.text.EnumColor;
import mekanism.client.gui.IGuiWrapper;
import mekanism.client.gui.element.GuiElement;
import mekanism.client.gui.element.GuiElementHolder;
import mekanism.common.MekanismLang;
import mekanism.common.lib.Color;
import mekanism.common.util.EnumUtils;
import mekanism.common.util.UpgradeUtils;
import net.minecraft.client.gui.GuiComponent;
import net.minecraft.network.chat.Component;
import org.jetbrains.annotations.NotNull;
import org.lwjgl.opengl.GL11;
public class GuiSupportedUpgrades extends GuiElement {
private static final int ELEMENT_SIZE = 12;
private static final int FIRST_ROW_ROOM = (123 - 55) / ELEMENT_SIZE;
private static final int ROW_ROOM = 123 / ELEMENT_SIZE;
public static int calculateNeededRows() {
int count = EnumUtils.UPGRADES.length;
if (count <= FIRST_ROW_ROOM) {
return 1;
}
count -= FIRST_ROW_ROOM;
return 2 + count / ROW_ROOM;
}
private final Set<Upgrade> supportedUpgrades;
public GuiSupportedUpgrades(IGuiWrapper gui, int x, int y, Set<Upgrade> supportedUpgrades) {
super(gui, x, y, 125, ELEMENT_SIZE * calculateNeededRows() + 2);
this.supportedUpgrades = supportedUpgrades;
}
@Override
public void drawBackground(@NotNull PoseStack matrix, int mouseX, int mouseY, float partialTicks) {
super.drawBackground(matrix, mouseX, mouseY, partialTicks);
//Draw the background
renderBackgroundTexture(matrix, GuiElementHolder.HOLDER, GuiElementHolder.HOLDER_SIZE, GuiElementHolder.HOLDER_SIZE);
int backgroundColor = Color.argb(GuiElementHolder.getBackgroundColor()).alpha(0.5).argb();
for (int i = 0; i < EnumUtils.UPGRADES.length; i++) {
Upgrade upgrade = EnumUtils.UPGRADES[i];
UpgradePos pos = getUpgradePos(i);
int xPos = x + 1 + pos.x;
int yPos = y + 1 + pos.y;
gui().renderItem(matrix, UpgradeUtils.getStack(upgrade), xPos, yPos, 0.75F);
if (!supportedUpgrades.contains(upgrade)) {
//Make the upgrade appear faded if it is not supported
RenderSystem.depthFunc(GL11.GL_GREATER);
GuiComponent.fill(matrix, xPos, yPos, xPos + ELEMENT_SIZE, yPos + ELEMENT_SIZE, backgroundColor);
RenderSystem.depthFunc(GL11.GL_LEQUAL);
}
}
}
@Override
public void renderForeground(PoseStack matrix, int mouseX, int mouseY) {
super.renderForeground(matrix, mouseX, mouseY);
drawTextScaledBound(matrix, MekanismLang.UPGRADES_SUPPORTED.translate(), relativeX + 2, relativeY + 3, titleTextColor(), 54);
}
@Override
public void renderToolTip(@NotNull PoseStack matrix, int mouseX, int mouseY) {
super.renderToolTip(matrix, mouseX, mouseY);
for (int i = 0; i < EnumUtils.UPGRADES.length; i++) {
UpgradePos pos = getUpgradePos(i);
if (mouseX >= x + 1 + pos.x && mouseX < x + 1 + pos.x + ELEMENT_SIZE &&
mouseY >= y + 1 + pos.y && mouseY < y + 1 + pos.y + ELEMENT_SIZE) {
Upgrade upgrade = EnumUtils.UPGRADES[i];
Component upgradeName = MekanismLang.UPGRADE_TYPE.translateColored(EnumColor.YELLOW, upgrade);
if (supportedUpgrades.contains(upgrade)) {
displayTooltips(matrix, mouseX, mouseY, upgradeName, upgrade.getDescription());
} else {
displayTooltips(matrix, mouseX, mouseY, MekanismLang.UPGRADE_NOT_SUPPORTED.translateColored(EnumColor.RED, upgradeName), upgrade.getDescription());
}
//We can break once we managed to find a tooltip to render
break;
}
}
}
private UpgradePos getUpgradePos(int index) {
int row = index < FIRST_ROW_ROOM ? 0 : 1 + (index - FIRST_ROW_ROOM) / ROW_ROOM;
if (row == 0) {
//First row has x start a lot further in
return new UpgradePos(55 + (index % FIRST_ROW_ROOM) * ELEMENT_SIZE, 0);
}
//Shift the index so that we don't have to deal with the weird first row in terms of counting
index -= FIRST_ROW_ROOM;
return new UpgradePos((index % ROW_ROOM) * ELEMENT_SIZE, row * ELEMENT_SIZE);
}
private record UpgradePos(int x, int y) {
}
}
|
[
"sara@freimer.com"
] |
sara@freimer.com
|
42018b5cbc8c3035f3a3f7ebb8449dd2ec7d31e6
|
03c720e9b9ec200c5e6bde091b5d8719deb731dd
|
/src/test/java/reconciliation/ApplicationTest.java
|
6981fbd9e69b405af651875857775d1719faf12e
|
[] |
no_license
|
linknabor/reconciliation
|
9c91909bfe8fd1d4944fa0483b7c70371d129f31
|
7ad4d835b0dc583f05264c0c1a40f68cae7207a4
|
refs/heads/master
| 2020-05-24T08:25:34.819617
| 2019-05-22T09:25:34
| 2019-05-22T09:25:34
| 187,184,596
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,193
|
java
|
/**
*
*/
package reconciliation;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
/**
* 单元测试编写样例
* @author david
*
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes=ApplicationTest.class)
public class ApplicationTest {
@BeforeClass
public static void beforeClassTest() {
System.out.println("before class test");
}
@Before
public void beforeTest() {
System.out.println("before test");
}
@Test
public void Test1() {
System.out.println("test 1+1=2");
Assert.assertEquals(2, 1 + 1);
}
@Test
public void Test2() {
System.out.println("test 2+2=4");
Assert.assertEquals(4, 2 + 2);
}
@After
public void afterTest() {
System.out.println("after test");
}
@AfterClass
public static void afterClassTest() {
System.out.println("after class test");
}
}
|
[
"davidhardson@hotmail.com"
] |
davidhardson@hotmail.com
|
a90a4d93b70abd424af4a75baf4000a340c8419a
|
15b260ccada93e20bb696ae19b14ec62e78ed023
|
/v2/src/main/java/com/alipay/api/response/KoubeiCateringOrderPayResponse.java
|
95e8059f3c5a8be17192298e48b42c676a149ea2
|
[
"Apache-2.0"
] |
permissive
|
alipay/alipay-sdk-java-all
|
df461d00ead2be06d834c37ab1befa110736b5ab
|
8cd1750da98ce62dbc931ed437f6101684fbb66a
|
refs/heads/master
| 2023-08-27T03:59:06.566567
| 2023-08-22T14:54:57
| 2023-08-22T14:54:57
| 132,569,986
| 470
| 207
|
Apache-2.0
| 2022-12-25T07:37:40
| 2018-05-08T07:19:22
|
Java
|
UTF-8
|
Java
| false
| false
| 1,531
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: koubei.catering.order.pay response.
*
* @author auto create
* @since 1.0, 2022-11-22 14:58:36
*/
public class KoubeiCateringOrderPayResponse extends AlipayResponse {
private static final long serialVersionUID = 5637923517876247322L;
/**
* online_pay:表示在线买单跳转地址
*/
@ApiField("biz_type")
private String bizType;
/**
* 该支付宝门店对应商家的partnerId号
*/
@ApiField("merchant_pid")
private String merchantPid;
/**
* 支付宝门店id
*/
@ApiField("shop_id")
private String shopId;
/**
* 当前用户操作的桌码
*/
@ApiField("table_num")
private String tableNum;
/**
* 当前操作用户id
*/
@ApiField("user_id")
private String userId;
public void setBizType(String bizType) {
this.bizType = bizType;
}
public String getBizType( ) {
return this.bizType;
}
public void setMerchantPid(String merchantPid) {
this.merchantPid = merchantPid;
}
public String getMerchantPid( ) {
return this.merchantPid;
}
public void setShopId(String shopId) {
this.shopId = shopId;
}
public String getShopId( ) {
return this.shopId;
}
public void setTableNum(String tableNum) {
this.tableNum = tableNum;
}
public String getTableNum( ) {
return this.tableNum;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserId( ) {
return this.userId;
}
}
|
[
"auto-publish"
] |
auto-publish
|
f5c6d4de547baef5a3be0ccbde01ccb224bcdc64
|
083c8f766ca7c409bdba73027e3f2a2ca68b9a3c
|
/cache4j/src/main/net/sf/cache4j/CacheConfig.java
|
718ceda692d989ef47495a4cd17cde9e6dcd305c
|
[
"BSD-2-Clause",
"BSD-3-Clause"
] |
permissive
|
petablox/petablox-bench
|
08fe7cdd27219e44aeb269e934e9605756c57d8e
|
7d2671cc50d775c1c70a3df381b8cc161ced3c16
|
refs/heads/master
| 2021-09-22T20:37:52.437177
| 2018-09-16T00:41:52
| 2018-09-16T00:41:52
| null | 0
| 0
| null | null | null | null |
WINDOWS-1251
|
Java
| false
| false
| 4,285
|
java
|
/* =========================================================================
* File: $Id: $CacheConfig.java,v$
*
* Copyright (c) 2006, Yuriy Stepovoy. All rights reserved.
* email: stepovoy@gmail.com
*
* =========================================================================
*/
package net.sf.cache4j;
/**
* CacheConfig конфигурация кеша
* @version $Revision: 1.0 $ $Date:$
* @author Yuriy Stepovoy. <a href="mailto:stepovoy@gmail.com">stepovoy@gmail.com</a>
**/
public interface CacheConfig {
// ----------------------------------------------------------------------------- Константы
// ----------------------------------------------------------------------------- Атрибуты класса
// ----------------------------------------------------------------------------- Статические переменные
// ----------------------------------------------------------------------------- Конструкторы
// ----------------------------------------------------------------------------- Public методы
/**
* Возвращает идентификатор кеша.
* Идентификатор должен быть уникальный для всего приложения.
*/
public Object getCacheId();
/**
* Возвращает описание экземпляра кеша.
*/
public String getCacheDesc();
/**
* Возвращает максимальное время жизни объекта в кеше.
* 0 - без ограничений.
*/
public long getTimeToLive();
/**
* Возвращает максимальное время бездействия объекта в кеше.
* 0 - без ограничений.
*/
public long getIdleTime();
/**
* Возвращает максимальный размер объектов в кеше (байт).
* Если значение больше нуля то при помещении объекта вычисляется его размер
* и проверяется размер объектов в кеше.
* 0 - без ограничений.
*/
public long getMaxMemorySize();
/**
* Возвращает максимальное количество объектов в кеше.
* Если значение больше нуля то при помещении объекта в кеш выполняется проверка
* на количество объектов в кеше.
* 0 - без ограничений.
*/
public int getMaxSize();
/**
* Возвращает тип кеша.
* <ul>
* <li>blocking - (по умолчанию) класс {@link net.sf.cache4j.impl.BlockingCache}</li>
* <li>synchronized - класс {@link net.sf.cache4j.impl.SynchronizedCache}</li>
* <li>nocache - класс {@link net.sf.cache4j.impl.EmptyCache}</li>
* </ul>
*/
public String getType();
/**
* Возвращает алгоритм удаления объектов из кеша.
* <ul>
* <li>lru (Least Recently Used) (по умолчанию)</li>
* <li>lfu (Least Frequently Used)</li>
* <li>fifo (First In First Out)</li>
* </ul>
*/
public String getAlgorithm();
/**
* Возвращает тип ссылки на объект содержащийся в кеше.
* <ul>
* <li>strong - сильная ссылка (по умолчанию)</li>
* <li>soft - магкая ссылка <code>java.lang.ref.SoftReference</code></li>
* </ul>
*/
public String getReference();
// ----------------------------------------------------------------------------- Package scope методы
// ----------------------------------------------------------------------------- Protected методы
// ----------------------------------------------------------------------------- Private методы
// ----------------------------------------------------------------------------- Inner классы
}
/*
$Log: CacheConfig.java,v $
*/
|
[
"aditya@fir10.gtisc.gatech.edu"
] |
aditya@fir10.gtisc.gatech.edu
|
995bb681b0a7777b45bd21f7c8680270e365cd10
|
88f1f670cd31deaf5186fe4d20413026ea7c076b
|
/compiler/compiler-parser-listener-stackbased/src/main/java/dev/nimbler/compiler/parser/listener/stackbased/state/setters/ExpressionSetter.java
|
e725951c5d689865f9725e0ce8198547d125e998
|
[] |
no_license
|
neaterbits/compiler
|
499517c43bd688262391353bb87fee8e261fb352
|
caea422856ed72befd1c98263e861658ffe18001
|
refs/heads/main
| 2023-08-21T20:14:09.257839
| 2021-08-09T19:18:06
| 2021-08-09T19:23:57
| 183,889,843
| 0
| 0
| null | 2023-08-15T17:45:38
| 2019-04-28T09:53:16
|
Java
|
UTF-8
|
Java
| false
| false
| 169
|
java
|
package dev.nimbler.compiler.parser.listener.stackbased.state.setters;
public interface ExpressionSetter<EXPRESSION> {
void addExpression(EXPRESSION expression);
}
|
[
"nils.lorentzen@gmail.com"
] |
nils.lorentzen@gmail.com
|
c4306a6394b9d177aadd31839f347a99c371c0d3
|
4149f30d2005a759d21b682bb23bd8bf1f03c372
|
/other/src/main/java/serialize/JacksonSerialize.java
|
afaf1121053879771b3b0dbd25f811f876a1a945
|
[] |
no_license
|
abelzyp/zava
|
522e18fbfbcb85a319f4df2f8dba1babc77ce87c
|
e4e4cc45eb718ff150c6cf390f80edf059c64c04
|
refs/heads/master
| 2023-06-21T14:51:08.182488
| 2023-06-18T09:16:25
| 2023-06-18T09:16:25
| 145,134,859
| 1
| 1
| null | 2023-06-18T09:16:27
| 2018-08-17T15:06:44
|
Java
|
UTF-8
|
Java
| false
| false
| 728
|
java
|
package serialize;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;
/**
* Jackson序列化
* -序列化速度:一般
* -序列化文件大小:较大
* -编程模型复杂度:简单
*
* @author zhangyupeng
* @date 2019-04-24
*/
public class JacksonSerialize {
public static String serialize(Object obj) throws JsonProcessingException {
ObjectMapper mapper = new ObjectMapper();
return mapper.writeValueAsString(obj);
}
static Object deserialize(String json, Class<?> clazz) throws IOException {
ObjectMapper mapper = new ObjectMapper();
return mapper.readValue(json, clazz);
}
}
|
[
"abelzyp@foxmail.com"
] |
abelzyp@foxmail.com
|
f9c628d6cc8a4a174f9ebc79d17c5ad897a03de9
|
83ec53285d2f805876665d70cd48cdaddb95047c
|
/aws-java-sdk-lambda/src/main/java/com/amazonaws/services/lambda/model/DeleteFunctionRequest.java
|
92ba90b560b2e2da0ea11a7e81b91ed6c666eec1
|
[
"Apache-2.0",
"JSON"
] |
permissive
|
sarvex/aws-sdk-java
|
58d1d2094a689ab20925ad9b208a46008af5efb4
|
8cd1cfb947a419914ebf477ede050fe320d9ca71
|
refs/heads/master
| 2023-05-13T16:53:16.261624
| 2023-05-01T06:35:34
| 2023-05-01T06:35:34
| 32,573,530
| 0
| 0
|
Apache-2.0
| 2023-05-01T06:35:35
| 2015-03-20T08:59:36
|
Java
|
UTF-8
|
Java
| false
| false
| 4,118
|
java
|
/*
* Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.lambda.model;
import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;
/**
* Container for the parameters to the {@link com.amazonaws.services.lambda.AWSLambda#deleteFunction(DeleteFunctionRequest) DeleteFunction operation}.
* <p>
* Deletes the specified Lambda function code and configuration.
* </p>
* <p>
* This operation requires permission for the
* <code>lambda:DeleteFunction</code> action.
* </p>
*
* @see com.amazonaws.services.lambda.AWSLambda#deleteFunction(DeleteFunctionRequest)
*/
public class DeleteFunctionRequest extends AmazonWebServiceRequest implements Serializable, Cloneable {
/**
* The Lambda function to delete.
* <p>
* <b>Constraints:</b><br/>
* <b>Length: </b>1 - 64<br/>
* <b>Pattern: </b>[a-zA-Z0-9-_]+<br/>
*/
private String functionName;
/**
* The Lambda function to delete.
* <p>
* <b>Constraints:</b><br/>
* <b>Length: </b>1 - 64<br/>
* <b>Pattern: </b>[a-zA-Z0-9-_]+<br/>
*
* @return The Lambda function to delete.
*/
public String getFunctionName() {
return functionName;
}
/**
* The Lambda function to delete.
* <p>
* <b>Constraints:</b><br/>
* <b>Length: </b>1 - 64<br/>
* <b>Pattern: </b>[a-zA-Z0-9-_]+<br/>
*
* @param functionName The Lambda function to delete.
*/
public void setFunctionName(String functionName) {
this.functionName = functionName;
}
/**
* The Lambda function to delete.
* <p>
* Returns a reference to this object so that method calls can be chained together.
* <p>
* <b>Constraints:</b><br/>
* <b>Length: </b>1 - 64<br/>
* <b>Pattern: </b>[a-zA-Z0-9-_]+<br/>
*
* @param functionName The Lambda function to delete.
*
* @return A reference to this updated object so that method calls can be chained
* together.
*/
public DeleteFunctionRequest withFunctionName(String functionName) {
this.functionName = functionName;
return this;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getFunctionName() != null) sb.append("FunctionName: " + getFunctionName() );
sb.append("}");
return sb.toString();
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getFunctionName() == null) ? 0 : getFunctionName().hashCode());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (obj instanceof DeleteFunctionRequest == false) return false;
DeleteFunctionRequest other = (DeleteFunctionRequest)obj;
if (other.getFunctionName() == null ^ this.getFunctionName() == null) return false;
if (other.getFunctionName() != null && other.getFunctionName().equals(this.getFunctionName()) == false) return false;
return true;
}
@Override
public DeleteFunctionRequest clone() {
return (DeleteFunctionRequest) super.clone();
}
}
|
[
"aws@amazon.com"
] |
aws@amazon.com
|
687c1dc00d71e07b7d9b745911b3ece2e7e924da
|
b272ea8c0f5f0fac08d85f507dcb347b1e1f1341
|
/famous-battle/src/main/java/com/noseparte/battle/utils/WatchBattleRoomJobListener.java
|
38e84a7f81f231014afab315f84527b625c6ef20
|
[
"MIT"
] |
permissive
|
xuepomh/Almost-Famous
|
d45fec1eb1513e255c26e9a51b499066273b99e9
|
ebe944c8e21697ef71d4fdef0ba3ff332f6de452
|
refs/heads/master
| 2020-07-27T08:37:42.514212
| 2020-06-15T05:36:49
| 2020-06-15T05:36:49
| 209,032,567
| 0
| 0
|
MIT
| 2020-06-15T05:36:50
| 2019-09-17T11:11:29
| null |
UTF-8
|
Java
| false
| false
| 1,005
|
java
|
package com.noseparte.battle.utils;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.JobListener;
@Slf4j
@AllArgsConstructor
public class WatchBattleRoomJobListener implements JobListener {
String name;
@Override
public String getName() {
return name;
}
@Override
public void jobToBeExecuted(JobExecutionContext context) {
if (log.isDebugEnabled()) {
log.debug("jobToBeExecuted = {}", getName());
}
}
@Override
public void jobExecutionVetoed(JobExecutionContext context) {
if (log.isDebugEnabled()) {
log.debug("jobExecutionVetoed = {}", getName());
}
}
@Override
public void jobWasExecuted(JobExecutionContext context, JobExecutionException jobException) {
if (log.isDebugEnabled()) {
log.debug("jobWasExecuted = {}", getName());
}
}
}
|
[
"noseparte@aliyun.com"
] |
noseparte@aliyun.com
|
7cc3d4b22f84ac65aa87f053a7fa485be7aedfcf
|
daea58ba46223adbd8d6a7b3d0e892e1cbfa5be0
|
/src/com/facebook/buck/rules/macros/OutputToFileExpander.java
|
79913bad7669b3d500c78167df88534c7f912b30
|
[
"Apache-2.0"
] |
permissive
|
dakkad/buck
|
bf6de2f68667ce6c161bb6aef89c94b0bbecc5e7
|
8030b4fb51c320b7cb025d8372a4f778829a6e59
|
refs/heads/master
| 2020-12-11T05:45:08.837163
| 2015-04-09T10:50:11
| 2015-04-09T10:50:11
| 29,131,850
| 1
| 0
| null | 2015-01-12T11:10:21
| 2015-01-12T11:10:21
| null |
UTF-8
|
Java
| false
| false
| 3,131
|
java
|
/*
* Copyright 2015-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain
* a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package com.facebook.buck.rules.macros;
import static java.nio.charset.StandardCharsets.UTF_8;
import com.facebook.buck.io.ProjectFilesystem;
import com.facebook.buck.model.BuildTarget;
import com.facebook.buck.model.BuildTargets;
import com.facebook.buck.rules.BuildRuleResolver;
import com.google.common.collect.ImmutableList;
import com.google.common.hash.Hashing;
import java.io.IOException;
import java.nio.file.Path;
public class OutputToFileExpander implements MacroExpander {
private final MacroExpander delegate;
public OutputToFileExpander(MacroExpander delegate) {
this.delegate = delegate;
}
@Override
public String expand(
BuildTarget target,
BuildRuleResolver resolver,
ProjectFilesystem filesystem,
String input) throws MacroException {
try {
Path tempFile = createTempFile(filesystem, target, input);
String expanded = delegate.expand(target, resolver, filesystem, input);
filesystem.writeContentsToPath(expanded, tempFile);
return "@" + filesystem.getAbsolutifier().apply(tempFile);
} catch (IOException e) {
throw new MacroException("Unable to create file to hold expanded results", e);
}
}
@Override
public ImmutableList<BuildTarget> extractTargets(BuildTarget target, String input)
throws MacroException {
return delegate.extractTargets(target, input);
}
/**
* @return The absolute path to the temp file.
*/
private Path createTempFile(ProjectFilesystem filesystem, BuildTarget target, String input)
throws IOException {
Path directory = BuildTargets.getScratchPath(target, "%s/tmp");
filesystem.mkdirs(directory);
// "prefix" should give a stable name, so that the same delegate with the same input can output
// the same file. We won't optimise for this case, since it's actually unlikely to happen within
// a single run, but using a random name would cause 'buck-out' to expand in an uncontrolled
// manner.
String prefix = Hashing.sha1().newHasher()
.putString(delegate.getClass().getName(), UTF_8)
.putString(input, UTF_8)
.hash()
.toString();
// ProjectFilesystem.createTempFile expects an absolute path, so make sure we're using one
Path absolute = filesystem.resolve(directory);
Path temp = filesystem.createTempFile(absolute, prefix, ".macro");
// And now return the actual path to the file in a form relative to the file system root.
return directory.resolve(temp.getFileName());
}
}
|
[
"sdwilsh@fb.com"
] |
sdwilsh@fb.com
|
a7a60cddfdb661c7598a80d73598f7df6e7080e2
|
40665051fadf3fb75e5a8f655362126c1a2a3af6
|
/geosolutions-it-MapStoreMobile/3cab0d67dc1a511d1acda63abc2a2112bb96c7ab/99/MapViewManager.java
|
5a6db1e9654018b093ccddc6e8ffd005c63b1003
|
[] |
no_license
|
fermadeiral/StyleErrors
|
6f44379207e8490ba618365c54bdfef554fc4fde
|
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
|
refs/heads/master
| 2020-07-15T12:55:10.564494
| 2019-10-24T02:30:45
| 2019-10-24T02:30:45
| 205,546,543
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,345
|
java
|
package it.geosolutions.android.map.view;
import java.util.ArrayList;
import org.mapsforge.android.maps.MapView;
import android.util.Log;
/**
* A <MapView> manager that provide methods to register and destroy map Views.
* Wraps actions that should be done by the old <MapActivityBase> when not possible to
* Extend this class
* @author Lorenzo Natali <lorenzo.natali@geo-solutions.it
*
*/
public class MapViewManager {
private ArrayList<MapView> mapViews = new ArrayList<MapView>(2);
private int lastMapViewId=0;
/**
* destroys the map views
*/
public void destroyMapViews() {
while (!this.mapViews.isEmpty()) {
MapView mapView = this.mapViews.remove(0);
mapView.destroy();
Log.v("MAPVIEWMANAGER","destroy mapview"+ 0);
}
}
public void resumeMapViews(){
for (int i = 0, n = this.mapViews.size(); i < n; ++i) {
this.mapViews.get(i).onResume();
Log.v("MAPVIEWMANAGER","resume mapview"+ i);
}
}
/**
* register a <MapView> to the manager
* @param mapView
*/
public final void registerMapView(MapView mapView) {
this.mapViews.add(mapView);
}
/**
* @return a unique MapView ID on each call.
*/
public final int getMapViewId() {
return ++this.lastMapViewId;
}
}
|
[
"fer.madeiral@gmail.com"
] |
fer.madeiral@gmail.com
|
68bbb9265240d75466da0b50169400a07cc9a46b
|
07faeaab515163f3493f86805e50f0b0d1aa258a
|
/src_collaboration/com/seeyon/v3x/batch/BatchState.java
|
c1b3c526eba06679df35446e67d595104f595629
|
[] |
no_license
|
zhengxyzw/seeyon_v3x
|
033563e558794eb3d3c6d14b65fc3bd985f24e03
|
f2f91c1db65c93681ef504d410d517e77048deec
|
refs/heads/master
| 2020-06-12T20:33:08.873703
| 2017-07-11T01:21:52
| 2017-07-11T01:21:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 658
|
java
|
package com.seeyon.v3x.batch;
public enum BatchState {
Normal(0),//正常状态 可以进行批处理或者 批处理成功
NotSupport(11),//不支持此应用批处理
PolicyNotOpe(12),//节点权限不允许操作
ProcessLocked(13),//流程正在修改
NoSuchSummary(14),//流程已经不存在了
NewFlow(15),//触发新流程。需要选人
FormNotNull(16),//表单有必填项
ProcessNeedPerson(17),//流程需要选择人员
InvidateNode(18),//下个节点有无用的节点。
Error(20),//发生异常
;
private int code;
BatchState(int c){
this.code = c;
}
public int getCode(){
return this.code;
}
}
|
[
"839428881@qq.com"
] |
839428881@qq.com
|
1fa3963ae8ebd9a14cf145f6f6799ab685148cf9
|
91f7dc07b2c0d07cf02ecee54b8548d42fe2f720
|
/sources/external/scy-com-Plugins_SDK/portlets/wol-portlet/docroot/WEB-INF/service/com/liferay/wol/model/WallEntryClp.java
|
04f1b9ff3b10cacdf6c33dcc1d0afa5be6164d28
|
[
"MIT"
] |
permissive
|
yattias/scy
|
8996a485de7dfef22ac9ae69005cfb12be91dbc3
|
e80421c7457e5ba27874abeef06668196ed8125a
|
refs/heads/master
| 2021-01-10T01:15:04.267584
| 2013-04-03T09:32:50
| 2013-04-03T09:32:50
| 36,696,984
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,239
|
java
|
/**
* Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package com.liferay.wol.model;
import com.liferay.portal.kernel.bean.ReadOnlyBeanHandler;
import com.liferay.portal.kernel.util.DateUtil;
import com.liferay.portal.kernel.util.HtmlUtil;
import com.liferay.portal.model.impl.BaseModelImpl;
import java.io.Serializable;
import java.lang.reflect.Proxy;
import java.util.Date;
/**
* <a href="WallEntryClp.java.html"><b><i>View Source</i></b></a>
*
* @author Brian Wing Shun Chan
*
*/
public class WallEntryClp extends BaseModelImpl<WallEntry> implements WallEntry {
public WallEntryClp() {
}
public long getPrimaryKey() {
return _wallEntryId;
}
public void setPrimaryKey(long pk) {
setWallEntryId(pk);
}
public Serializable getPrimaryKeyObj() {
return new Long(_wallEntryId);
}
public long getWallEntryId() {
return _wallEntryId;
}
public void setWallEntryId(long wallEntryId) {
_wallEntryId = wallEntryId;
}
public long getGroupId() {
return _groupId;
}
public void setGroupId(long groupId) {
_groupId = groupId;
}
public long getCompanyId() {
return _companyId;
}
public void setCompanyId(long companyId) {
_companyId = companyId;
}
public long getUserId() {
return _userId;
}
public void setUserId(long userId) {
_userId = userId;
}
public String getUserName() {
return _userName;
}
public void setUserName(String userName) {
_userName = userName;
}
public Date getCreateDate() {
return _createDate;
}
public void setCreateDate(Date createDate) {
_createDate = createDate;
}
public Date getModifiedDate() {
return _modifiedDate;
}
public void setModifiedDate(Date modifiedDate) {
_modifiedDate = modifiedDate;
}
public String getComments() {
return _comments;
}
public void setComments(String comments) {
_comments = comments;
}
public WallEntry toEscapedModel() {
if (isEscapedModel()) {
return this;
}
else {
WallEntry model = new WallEntryClp();
model.setEscapedModel(true);
model.setWallEntryId(getWallEntryId());
model.setGroupId(getGroupId());
model.setCompanyId(getCompanyId());
model.setUserId(getUserId());
model.setUserName(HtmlUtil.escape(getUserName()));
model.setCreateDate(getCreateDate());
model.setModifiedDate(getModifiedDate());
model.setComments(HtmlUtil.escape(getComments()));
model = (WallEntry)Proxy.newProxyInstance(WallEntry.class.getClassLoader(),
new Class[] { WallEntry.class },
new ReadOnlyBeanHandler(model));
return model;
}
}
public Object clone() {
WallEntryClp clone = new WallEntryClp();
clone.setWallEntryId(getWallEntryId());
clone.setGroupId(getGroupId());
clone.setCompanyId(getCompanyId());
clone.setUserId(getUserId());
clone.setUserName(getUserName());
clone.setCreateDate(getCreateDate());
clone.setModifiedDate(getModifiedDate());
clone.setComments(getComments());
return clone;
}
public int compareTo(WallEntry wallEntry) {
int value = 0;
value = DateUtil.compareTo(getCreateDate(), wallEntry.getCreateDate());
value = value * -1;
if (value != 0) {
return value;
}
return 0;
}
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
WallEntryClp wallEntry = null;
try {
wallEntry = (WallEntryClp)obj;
}
catch (ClassCastException cce) {
return false;
}
long pk = wallEntry.getPrimaryKey();
if (getPrimaryKey() == pk) {
return true;
}
else {
return false;
}
}
public int hashCode() {
return (int)getPrimaryKey();
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{wallEntryId=");
sb.append(getWallEntryId());
sb.append(", groupId=");
sb.append(getGroupId());
sb.append(", companyId=");
sb.append(getCompanyId());
sb.append(", userId=");
sb.append(getUserId());
sb.append(", userName=");
sb.append(getUserName());
sb.append(", createDate=");
sb.append(getCreateDate());
sb.append(", modifiedDate=");
sb.append(getModifiedDate());
sb.append(", comments=");
sb.append(getComments());
sb.append("}");
return sb.toString();
}
public String toXmlString() {
StringBuilder sb = new StringBuilder();
sb.append("<model><model-name>");
sb.append("com.liferay.wol.model.WallEntry");
sb.append("</model-name>");
sb.append(
"<column><column-name>wallEntryId</column-name><column-value><![CDATA[");
sb.append(getWallEntryId());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>groupId</column-name><column-value><![CDATA[");
sb.append(getGroupId());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>companyId</column-name><column-value><![CDATA[");
sb.append(getCompanyId());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>userId</column-name><column-value><![CDATA[");
sb.append(getUserId());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>userName</column-name><column-value><![CDATA[");
sb.append(getUserName());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>createDate</column-name><column-value><![CDATA[");
sb.append(getCreateDate());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>modifiedDate</column-name><column-value><![CDATA[");
sb.append(getModifiedDate());
sb.append("]]></column-value></column>");
sb.append(
"<column><column-name>comments</column-name><column-value><![CDATA[");
sb.append(getComments());
sb.append("]]></column-value></column>");
sb.append("</model>");
return sb.toString();
}
private long _wallEntryId;
private long _groupId;
private long _companyId;
private long _userId;
private String _userName;
private Date _createDate;
private Date _modifiedDate;
private String _comments;
}
|
[
"mueller.daniel.1981@b2e416e9-8f50-0410-b9aa-47b31ee1ff64"
] |
mueller.daniel.1981@b2e416e9-8f50-0410-b9aa-47b31ee1ff64
|
c7292dc74d5838db44c095ae4ffb389e3a6658c6
|
5baae9a71d762126ed1214e7660a676e1e065236
|
/app/src/main/java/com/massky/new119eproject/util/DES.java
|
fefb59a223467bd68c16c7b21cae3b7728adc204
|
[] |
no_license
|
1559727195/Beijing1
|
9166b64a207a3742e6f55655bc0e47c614da98e9
|
28daf00d5d892d05f14f842b167d07c4a0f6c09e
|
refs/heads/master
| 2021-08-31T03:34:43.928158
| 2017-12-20T08:09:25
| 2017-12-20T08:09:25
| 114,860,714
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,619
|
java
|
package com.massky.new119eproject.util;
import android.util.Base64;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
/**
* Created by masskywcy on 2017-01-22.
*/
//DES加密
public class DES {
private static byte[] iv = {1, 8, 3, 4, 5, 6, 7, 2};
/**
* @param encryptString 明文
* @param encryptKey 密钥
* @return 加密后的密文
*/
public static String encryptDES(String encryptString, String encryptKey) {
try {
//实例化IvParameterSpec对象,使用指定的初始化向量
IvParameterSpec zeroIv = new IvParameterSpec(iv);
//实例化SecretKeySpec,根据传入的密钥获得字节数组来构造SecretKeySpec
SecretKeySpec key = new SecretKeySpec(encryptKey.getBytes(), "DES");
//创建密码器
Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
//用密钥初始化Cipher对象
cipher.init(Cipher.ENCRYPT_MODE, key, zeroIv);
//执行加密操作
byte[] encryptedData = cipher.doFinal(encryptString.getBytes());
return Base64.encodeToString(encryptedData, 0);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (InvalidAlgorithmParameterException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
}
return null;
}
/**
* 解密的过程与加密的过程大致相同
*
* @param decryptString 密文
* @param decryptKey 密钥
* @return 返回明文
*/
public static String decryptDES(String decryptString, String decryptKey) {
try {
//先使用Base64解密
byte[] byteMi = Base64.decode(decryptString, 0);
//实例化IvParameterSpec对象使用指定的初始化向量
IvParameterSpec zeroIv = new IvParameterSpec(iv);
//实例化SecretKeySpec,根据传入的密钥获得字节数组来构造SecretKeySpec,
SecretKeySpec key = new SecretKeySpec(decryptKey.getBytes(), "DES");
//创建密码器
Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
//用密钥初始化Cipher对象,上面是加密,这是解密模式
cipher.init(Cipher.DECRYPT_MODE, key, zeroIv);
//获取解密后的数据
byte[] decryptedData = cipher.doFinal(byteMi);
return new String(decryptedData);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (NoSuchPaddingException e) {
e.printStackTrace();
} catch (InvalidAlgorithmParameterException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (BadPaddingException e) {
e.printStackTrace();
} catch (IllegalBlockSizeException e) {
e.printStackTrace();
}
return null;
}
}
|
[
"zhu@gmail.com"
] |
zhu@gmail.com
|
a51e48fad9f200bd8e950a1d7808539cf843d0ff
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Hibernate/Hibernate5402.java
|
651669a64b7209e043ab0f57f4464b6405eba1a7
|
[] |
no_license
|
saber13812002/DeepCRM
|
3336a244d4852a364800af3181e03e868cf6f9f5
|
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
|
refs/heads/master
| 2023-03-16T00:08:06.473699
| 2018-04-18T05:29:50
| 2018-04-18T05:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 813
|
java
|
@Test
@TestForIssue(jiraKey = "")
public void testGetLimitStringWithSubselect() {
final String subselectInSelectClauseSQL = "select persistent0_.id as col_0_0_, " +
"(select max(persistent1_.acceptancedate) " +
"from av_advisoryvariant persistent1_ " +
"where persistent1_.clientid=persistent0_.id) as col_1_0_ " +
"from c_customer persistent0_ " +
"where persistent0_.type='v'";
assertEquals(
"WITH query AS (SELECT inner_query.*, ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) as __hibernate_row_nr__ FROM ( " +
subselectInSelectClauseSQL + " ) inner_query ) " +
"SELECT col_0_0_, col_1_0_ FROM query WHERE __hibernate_row_nr__ >= ? AND __hibernate_row_nr__ < ?",
dialect.getLimitHandler().processSql( subselectInSelectClauseSQL, toRowSelection( 2, 5 ) )
);
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
fd6de8b003f012e3ea9fe70e21f1a3e4007faac9
|
c7de81ecbce3a6ddfe553ba587ed60352a717d47
|
/h5web-game/src/main/java/com/xmbl/h5/web/game/mq/G2RRpcClient.java
|
d596fc00c5b1671a6851f434b2899d16a7085c3a
|
[] |
no_license
|
strongyuen/h5web-parent
|
c446e056f470abe893963e8a0a9d9727f9aea794
|
f74824fc8143197bc1d80cd8c96ec4d048eecf97
|
refs/heads/master
| 2022-03-02T18:42:20.621511
| 2019-09-19T10:37:19
| 2019-09-19T10:37:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,733
|
java
|
package com.xmbl.h5.web.game.mq;
import java.nio.ByteBuffer;
import java.util.Objects;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
import com.google.protobuf.Message;
import com.xmbl.h5.web.common.consts.RabbitConst;
import com.xmbl.h5.web.common.proto.Options;
import com.xmbl.h5.web.game.msg.GameMsgFactory;
@Component
public class G2RRpcClient {
@Autowired
private RabbitTemplate template;
@Autowired
@Qualifier(RabbitConst.h5_web_rank_query_rpc_exchange)
private DirectExchange exchange;
@Autowired
private GameMsgFactory gameMsgFactory;
@SuppressWarnings("unchecked")
public <T extends Message> T send(Message message) {
int messageId = message.getDescriptorForType().getOptions().getExtension(Options.messageId);
byte[] bytes = message.toByteArray();
int length = Integer.BYTES + bytes.length;
ByteBuffer buffer = ByteBuffer.allocate(length);
buffer.putInt(messageId);
buffer.put(bytes);
buffer.flip();
byte[] data = new byte[length];
buffer.get(data);
byte[] resultData = (byte[]) template.convertSendAndReceive(exchange.getName(), RabbitConst.h5_web_rank_query_rpc_route_key, data);
ByteBuffer rByteBuffer = ByteBuffer.allocate(resultData.length);
rByteBuffer.put(resultData);
rByteBuffer.flip();
int msgId = rByteBuffer.getInt();
byte[] rData = new byte[rByteBuffer.remaining()];
rByteBuffer.get(rData);
Message msg = gameMsgFactory.parseMessage(msgId, rData);
if (Objects.isNull(msg)) {
return null;
}
return (T) msg;
}
}
|
[
"noseparte@aliyun.com"
] |
noseparte@aliyun.com
|
8f5342a1e9974671690073f141718b94a3579ddd
|
f2bd083ebc26faa924f563f3db5685e75ef93f71
|
/tddl-common/src/main/java/com/taobao/tddl/common/utils/mbean/TddlMBean.java
|
75f87cf7418e3ce7f53b5ecd6ec5520928e530a1
|
[
"Apache-2.0"
] |
permissive
|
hejianzxl/TDDL-1
|
bf942c10d8e42d4a8f3e3eadb0c262fcaa03f299
|
33ab99c37ae8b927f1cd3294d1ec8aa31b71c84b
|
refs/heads/master
| 2022-07-01T08:56:47.798878
| 2015-08-18T02:55:16
| 2015-08-18T02:55:16
| 144,922,536
| 0
| 0
|
Apache-2.0
| 2022-06-21T04:20:21
| 2018-08-16T01:48:15
|
Java
|
UTF-8
|
Java
| false
| false
| 3,842
|
java
|
package com.taobao.tddl.common.utils.mbean;
import java.util.HashMap;
import java.util.Map;
import javax.management.Attribute;
import javax.management.AttributeList;
import javax.management.AttributeNotFoundException;
import javax.management.DynamicMBean;
import javax.management.IntrospectionException;
import javax.management.InvalidAttributeValueException;
import javax.management.MBeanAttributeInfo;
import javax.management.MBeanException;
import javax.management.MBeanInfo;
import javax.management.ReflectionException;
import com.taobao.tddl.common.utils.logger.Logger;
import com.taobao.tddl.common.utils.logger.LoggerFactory;
/**
* @description
* @author <a href="junyu@taobao.com">junyu</a>
* @version 1.0
* @since 1.6
*/
public class TddlMBean implements DynamicMBean {
private static Logger logger = LoggerFactory.getLogger(TddlMBean.class);
private Map<String, Attribute> attributesMap = new HashMap<String, Attribute>();
private String desc;
public TddlMBean(String desc){
this.desc = desc;
}
@Override
public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException {
return attributesMap.get(attribute).getValue();
}
public void setAttribute(String name, Object value) {
Attribute attr = new Attribute(name, value);
this.attributesMap.put(name, attr);
}
@Override
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException,
MBeanException, ReflectionException {
String name = attribute.getName();
this.attributesMap.put(name, attribute);
}
@Override
public AttributeList getAttributes(String[] attributes) {
AttributeList list = new AttributeList();
for (String attribute : attributes) {
Attribute attr = attributesMap.get(attribute);
if (null != attr) {
list.add(attr);
}
}
return list;
}
@Override
public AttributeList setAttributes(AttributeList attributes) {
for (Attribute attribute : attributes.asList()) {
String name = attribute.getName();
this.attributesMap.put(name, attribute);
}
AttributeList list = new AttributeList();
for (Map.Entry<String, Attribute> attribute : attributesMap.entrySet()) {
list.add(attribute.getValue());
}
return list;
}
@Override
public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException,
ReflectionException {
return null;
}
@Override
public MBeanInfo getMBeanInfo() {
MBeanAttributeInfo[] fis = new MBeanAttributeInfo[attributesMap.size()];
int i = 0;
for (Map.Entry<String, Attribute> attribute : attributesMap.entrySet()) {
MBeanAttributeInfo info = null;
try {
info = new MBeanAttributeInfo(attribute.getValue().getName(), "", attribute.getValue()
.getValue()
.getClass()
.getMethod("toString"), null);
} catch (IntrospectionException e) {
logger.error(e);
} catch (SecurityException e) {
logger.error(e);
} catch (NoSuchMethodException e) {
logger.error(e);
}
fis[i++] = info;
}
MBeanInfo info = new MBeanInfo("TDDLMbean", desc, fis, null, null, null);
return info;
}
}
|
[
"jianghang115@gmail.com"
] |
jianghang115@gmail.com
|
d59f20bd008f9739fe24935f0e1731b9f13bcedc
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2011-04-20/seasar2-2.4.44/seasar2/s2-framework/src/main/java/org/seasar/framework/container/creator/ConverterCreator.java
|
757c160655903b9d15ff1c06a0c8976a5012103b
|
[
"Apache-2.0"
] |
permissive
|
svn2github/s2container
|
54ca27cf0c1200a93e1cb88884eb8226a9be677d
|
625adc6c4e1396654a7297d00ec206c077a78696
|
refs/heads/master
| 2020-06-04T17:15:02.140847
| 2013-08-09T09:38:15
| 2013-08-09T09:38:15
| 10,850,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,903
|
java
|
/*
* Copyright 2004-2011 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.seasar.framework.container.creator;
import org.seasar.framework.container.ComponentCreator;
import org.seasar.framework.container.ComponentCustomizer;
import org.seasar.framework.container.deployer.InstanceDefFactory;
import org.seasar.framework.convention.NamingConvention;
/**
* コンバータ用の {@link ComponentCreator}です。
*
* @author shot
*/
public class ConverterCreator extends ComponentCreatorImpl {
/**
* {@link ConverterCreator}を作成します。
*
* @param namingConvention
*/
public ConverterCreator(NamingConvention namingConvention) {
super(namingConvention);
setNameSuffix(namingConvention.getConverterSuffix());
setInstanceDef(InstanceDefFactory.PROTOTYPE);
}
/**
* コンバータ用の {@link ComponentCustomizer}を返します。
*
* @return
*/
public ComponentCustomizer getConverterCustomizer() {
return getCustomizer();
}
/**
* コンバータ用の {@link ComponentCustomizer}を設定します。
*
* @param customizer
*/
public void setConverterCustomizer(ComponentCustomizer customizer) {
setCustomizer(customizer);
}
}
|
[
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] |
koichik@319488c0-e101-0410-93bc-b5e51f62721a
|
3cf950e8ef67a8fa7c2b4e3fd5b877633af125e3
|
b52bdef128ecebcc8808ed95f8287bc97a4c4174
|
/core/src/main/java/com/orientechnologies/orient/core/storage/index/sbtree/multivalue/v2/OMultiValueEntry.java
|
1fd9fe2408298d43e8f01172cf771b258c9e1082
|
[
"Apache-2.0",
"CDDL-1.0",
"BSD-3-Clause"
] |
permissive
|
saeedtabrizi/orientdb
|
4736d86e82e713b34d21566ca844db5af177f53a
|
361cf4816b6597ab7d5cd356745ee3f7f475116d
|
refs/heads/develop
| 2021-01-15T14:43:20.379474
| 2019-09-09T12:20:03
| 2019-09-09T12:20:03
| 56,811,541
| 0
| 0
|
Apache-2.0
| 2019-09-09T12:22:10
| 2016-04-21T23:24:41
|
Java
|
UTF-8
|
Java
| false
| false
| 761
|
java
|
package com.orientechnologies.orient.core.storage.index.sbtree.multivalue.v2;
final class OMultiValueEntry implements Comparable<OMultiValueEntry> {
public final long id;
public final int clusterId;
public final long clusterPosition;
public OMultiValueEntry(final long id, final int clusterId, final long clusterPosition) {
this.id = id;
this.clusterId = clusterId;
this.clusterPosition = clusterPosition;
}
@Override
public int compareTo(final OMultiValueEntry o) {
int result = Long.compare(id, o.id);
if (result != 0) {
return result;
}
result = Integer.compare(clusterId, o.clusterId);
if (result != 0) {
return result;
}
return Long.compare(clusterPosition, o.clusterPosition);
}
}
|
[
"lomakin.andrey@gmail.com"
] |
lomakin.andrey@gmail.com
|
6f6dcd3c25b6c1872ad73b254a5411a79aef4995
|
d19dc7e85ccddd789add06e741e8e0865fce9a76
|
/javabasic/day07-code/src/cn/itcast/day07/demo05/Demo03ArrayListPrint.java
|
cfef4414d8726686ac2b8b1c5ba7c7e159a0beaf
|
[] |
no_license
|
sjtuwyf/java-basic-code
|
6cd7b812cf1e221077c551368b3260ea6d2c9ae2
|
51047c659f66099937e095597c7e71cf726f1ff0
|
refs/heads/main
| 2023-03-31T13:32:59.573720
| 2021-04-04T04:07:41
| 2021-04-04T04:07:41
| 342,221,770
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 669
|
java
|
package cn.itcast.day07.demo05;
import java.util.ArrayList;
public class Demo03ArrayListPrint {
public static void main(String[] args) {
ArrayList<String> list = new ArrayList<>();
list.add("a");
list.add("b");
list.add("c");
list.add("d");
list.add("e");
printArrayList(list);
}
public static void printArrayList(ArrayList<String> list){
System.out.print("{");
for (int i = 0; i < list.size(); i++) {
System.out.print(list.get(i));
if(i!=list.size()){
System.out.print("@");
}
}
System.out.print("}");
}
}
|
[
"sjtuwyf@126.com"
] |
sjtuwyf@126.com
|
b127fa8cccc655376d91b275a7038f3a8ac132e0
|
e94edf09608ed9c261a425af0280d28beb59a194
|
/WorkingWithAbstraction/src/pointInRectangle/GeometryFactory.java
|
46a195099296cd6c1a76ba7c2e76ab904e1f73ed
|
[] |
no_license
|
uckpeH93/Java-OOP
|
3d3b06a57c08b85bcfd29099a20c91c9666513b9
|
9ca47d89dafb45ec37e493654f7c26a41fa3340b
|
refs/heads/master
| 2023-04-22T20:10:34.437141
| 2021-05-06T20:29:33
| 2021-05-06T20:29:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 520
|
java
|
package pointInRectangle;
//created by J.M.
public class GeometryFactory {
public static Rectangle createRectangle(int[] rectangleInfo) {
return new Rectangle(createPoint2D(rectangleInfo[0], rectangleInfo[1]),
createPoint2D(rectangleInfo[2], rectangleInfo[3]));
}
public static Point2D createPoint2D(int x, int y) {
return new Point2D(x, y);
}
public static Point2D createPoint2D(int[] pointInfo) {
return new Point2D(pointInfo[0], pointInfo[1]);
}
}
|
[
"Petrov.connect@gmail.com"
] |
Petrov.connect@gmail.com
|
68c12a4aff976b6ee50bfe6b3c592d5b61e5a03d
|
fbf44ff3348391045ae588f6308dd1d3ca9e2061
|
/plugins/common-biz-interceptor/src/main/java/com/gb/apm/plugins/commbiz/interceptor/TxcInterceptor.java
|
536b25efe6283adbb347619a291c3addb523286d
|
[] |
no_license
|
ayumiono/gbapm-agent
|
428488ffaa3aa25f4992d5381c80aed7f1cd0904
|
36b205b10981cfafb2a5706a44be89336cb697b1
|
refs/heads/master
| 2020-05-02T14:01:06.965399
| 2019-03-27T13:27:56
| 2019-03-27T13:27:56
| 177,998,864
| 2
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,064
|
java
|
package com.gb.apm.plugins.commbiz.interceptor;
import com.gb.apm.bootstrap.core.context.SpanEventRecorder;
import com.gb.apm.bootstrap.core.context.TraceContext;
import com.gb.apm.bootstrap.core.interceptor.AroundInterceptor;
import com.gb.apm.common.trace.AnnotationKey;
import com.gb.apm.dapper.context.MethodDescriptor;
public class TxcInterceptor implements AroundInterceptor {
protected final MethodDescriptor methodDescriptor;
protected final TraceContext traceContext;
public TxcInterceptor(TraceContext traceContext, MethodDescriptor methodDescriptor) {
this.traceContext = traceContext;
this.methodDescriptor = methodDescriptor;
}
@Override
public void before(Object target, Object[] args) {
}
@Override
public void after(Object target, Object[] args, Object result, Throwable throwable) {
SpanEventRecorder recorder = this.traceContext.currentTraceObject().currentSpanEventRecorder();
if(throwable == null) {
long txc_id = (long) result;
recorder.recordAttribute(AnnotationKey.TXC_XID, txc_id);
}
}
}
|
[
"xuelong.chen@goodbaby.com"
] |
xuelong.chen@goodbaby.com
|
a44fe6051a1a0989b88422ce94f07123fba10a59
|
83d781a9c2ba33fde6df0c6adc3a434afa1a7f82
|
/MarketBackend/src/com/newco/marketplace/persistence/daoImpl/ledger/CreditCardDaoImpl.java
|
bcbffb6100e5cd65b46fe5bea3450eac3f577a3b
|
[] |
no_license
|
ssriha0/sl-b2b-platform
|
71ab8ef1f0ccb0a7ad58b18f28a2bf6d5737fcb6
|
5b4fcafa9edfe4d35c2dcf1659ac30ef58d607a2
|
refs/heads/master
| 2023-01-06T18:32:24.623256
| 2020-11-05T12:23:26
| 2020-11-05T12:23:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,480
|
java
|
package com.newco.marketplace.persistence.daoImpl.ledger;
import java.util.ArrayList;
import java.util.List;
import org.apache.log4j.Logger;
import com.newco.marketplace.dto.vo.LookupVO;
import com.newco.marketplace.dto.vo.ledger.CreditCardVO;
import com.newco.marketplace.exception.core.DataServiceException;
import com.newco.marketplace.persistence.iDao.ledger.ICreditCardDao;
import com.newco.marketplace.utils.StackTraceHelper;
import com.sears.os.dao.impl.ABaseImplDao;
public class CreditCardDaoImpl extends ABaseImplDao implements ICreditCardDao {
private static final Logger logger = Logger.getLogger(CreditCardDaoImpl.class.getName());
public CreditCardVO getCardDetails(CreditCardVO creditCardVO) throws DataServiceException {
try {
creditCardVO = (CreditCardVO) queryForObject("creditCardDetails.query", creditCardVO);
}
catch (Exception ex) {
logger.info("[CreditCardDaoImpl.getCardDetails - Exception] " + StackTraceHelper.getStackTrace(ex));
throw new DataServiceException("Error", ex);
}
return creditCardVO;
}
public CreditCardVO getCardDetailsByAccountId(CreditCardVO creditCardVO) throws DataServiceException {
try {
creditCardVO = (CreditCardVO) queryForObject("creditCardDetailsByAccountId.query", creditCardVO);
}
catch (Exception ex) {
logger.info("[CreditCardDaoImpl.getCardDetailsByAccountId - Exception] " + StackTraceHelper.getStackTrace(ex));
throw new DataServiceException("Error", ex);
}
return creditCardVO;
}
public CreditCardVO getCardDetailsAll(CreditCardVO creditCardVO) throws DataServiceException {
try {
creditCardVO = (CreditCardVO) queryForObject("creditCardDetails_all.query", creditCardVO);
}
catch (Exception ex) {
logger.info("[CreditCardDaoImpl.getCardDetailsAll - Exception] " + StackTraceHelper.getStackTrace(ex));
throw new DataServiceException("Error", ex);
}
return creditCardVO;
}
public void saveCardDetails(CreditCardVO creditCardVO) throws DataServiceException {
try{
insert("creditCard.insert", creditCardVO);
}
catch (Exception ex) {
logger.info("[CreditCardDaoImpl.saveCardDetails - Exception] " + StackTraceHelper.getStackTrace(ex));
throw new DataServiceException("Error", ex);
}
}
public void saveAuthorizationResponse(CreditCardVO creditCardVO) throws DataServiceException{
try{
insert("creditCard.insertWSResponse", creditCardVO);
}
catch (Exception ex) {
logger.info("[CreditCardDaoImpl.saveCardDetails - Exception] " + StackTraceHelper.getStackTrace(ex));
throw new DataServiceException("Error", ex);
}
}
public ArrayList<CreditCardVO> getCardsForEntity(CreditCardVO creditCardVO) throws DataServiceException{
ArrayList alCards = null;
try {
alCards = (ArrayList) queryForList("creditCardsForEntity.query", creditCardVO);
}
catch (Exception ex) {
logger.info("[CreditCardDaoImpl.getCardsForEntity - Exception] " + StackTraceHelper.getStackTrace(ex));
throw new DataServiceException("Error", ex);
}
return alCards;
}
public CreditCardVO getActiveCardsForBuyer(Integer buyerId) throws DataServiceException{
CreditCardVO creditVO = null;
ArrayList alCards = null;
try {
//creditVO = (CreditCardVO) queryForObject("creditCardsForBuyer.queryWithActiveInd", buyerId);
alCards = (ArrayList) queryForList("creditCardsForBuyer.queryWithActiveInd", buyerId);
}
catch (Exception ex) {
logger.info("[CreditCardDaoImpl.getCardsForEntity - Exception] " + StackTraceHelper.getStackTrace(ex));
throw new DataServiceException("Error", ex);
}
//KV Temporary fix on the launch night before the fina build!
if(alCards != null && alCards.size() > 0) creditVO = (CreditCardVO)alCards.get(0);
return creditVO;
}
//B2C API changes -- Start
public List<CreditCardVO> getActiveCardListForBuyer(Integer buyerId) throws DataServiceException{
CreditCardVO creditVO = null;
List<CreditCardVO> alCards = new ArrayList<CreditCardVO>();
try {
alCards = queryForList("creditCardsForBuyer.queryWithActiveInd", buyerId);
}
catch (Exception ex) {
logger.info("[CreditCardDaoImpl.getCardsForEntity - Exception] " + StackTraceHelper.getStackTrace(ex));
throw new DataServiceException("Error", ex);
}
return alCards;
}
public CreditCardVO getActiveDefaultCardForBuyer(Integer buyerId) throws DataServiceException{
CreditCardVO creditVO = null;
List<CreditCardVO> alCards = new ArrayList<CreditCardVO>();
try {
alCards = queryForList("creditCardsForBuyer.queryWithActiveDefaultInd", buyerId);
}
catch (Exception ex) {
logger.info("[CreditCardDaoImpl.getCardsForEntity - Exception] " + StackTraceHelper.getStackTrace(ex));
throw new DataServiceException("Error", ex);
}
if(alCards != null && alCards.size() > 0) creditVO = (CreditCardVO)alCards.get(0);
return creditVO;
}
public List<CreditCardVO> getAllActiveAndAuthorizedCards(Integer buyerId) throws DataServiceException{
List<CreditCardVO> alCards = new ArrayList<CreditCardVO>();
try {
alCards = queryForList("creditCardsForBuyer.queryAllActiveAndAuthorizedCards", buyerId);
}
catch (Exception ex) {
logger.info("[CreditCardDaoImpl.getCardsForEntity - Exception] " + StackTraceHelper.getStackTrace(ex));
throw new DataServiceException("Error", ex);
}
return alCards;
}
public List<CreditCardVO> getAllEnabledCards(Integer buyerId) throws DataServiceException{
List<CreditCardVO> alCards = new ArrayList<CreditCardVO>();
try {
alCards = queryForList("creditCardsForBuyer.queryActiveEnabledCards", buyerId);
}
catch (Exception ex) {
logger.info("[CreditCardDaoImpl.getCardsForEntity - Exception] " + StackTraceHelper.getStackTrace(ex));
throw new DataServiceException("Error", ex);
}
return alCards;
}
public boolean resetDefaultCreditCard(CreditCardVO creditVO)
throws DataServiceException {
update("reset_defaultcard.update", creditVO);
return true;
}
//B2C API changes -- End
public boolean updateDeactivateCreditCardAccountInfo(CreditCardVO creditVO)
throws DataServiceException {
update("deactivate_creditcard.update", creditVO);
return true;
}
public LookupVO getCreditCardResponseDetails(String response) throws DataServiceException
{
return (LookupVO)queryForObject("credit_card_response_code.query", response);
}
/**SL-20853 encryption flag fetch from applications_properties table
* @return
* @throws DataServiceException
*/
public String getEncryptFlag(String appKey)throws DataServiceException {
try{
return (String) queryForObject("get_encryption_flag.select", appKey);
}
catch (Exception ex) {
throw new DataServiceException("Exception occurred in CreditCardDao.getEncryptFlag()", ex);
}
}
}
|
[
"Kunal.Pise@transformco.com"
] |
Kunal.Pise@transformco.com
|
7aa095ddd7ead57188066ebcedfc1034e2816ae6
|
ecaf6ec5b5429928d41d23883e11e129729a7374
|
/cargo/ucum/src/test/java/org/qsardb/cargo/ucum/UnitConverterUtilTest.java
|
010550f356eb7246888fd734bbfc5e07fab99cd2
|
[
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] |
permissive
|
qsardb/qsardb
|
615fa33241bcf792a80693dd7215b4d50d76347b
|
7e11747c5fd108d5aee31bc0dbfad26b48142351
|
refs/heads/master
| 2023-05-30T03:49:59.387275
| 2021-06-21T12:11:25
| 2021-06-21T12:11:25
| 7,729,841
| 4
| 0
|
BSD-3-Clause
| 2021-06-22T12:36:30
| 2013-01-21T09:43:11
|
Java
|
UTF-8
|
Java
| false
| false
| 5,550
|
java
|
/*
* Copyright (c) 2011 University of Tartu
*/
package org.qsardb.cargo.ucum;
import java.math.*;
import javax.measure.converter.*;
import javax.measure.unit.*;
import org.junit.*;
import static org.junit.Assert.*;
public class UnitConverterUtilTest {
@Test
public void identityConversion() throws ConversionException {
assertEquals(new BigDecimal("1"), convert(MOLES_PER_LITRE, MOLES_PER_LITRE, new BigDecimal("1")));
}
@Test
public void rationalConversion() throws ConversionException {
assertEquals(new BigDecimal("1000"), convert(MOLES_PER_LITRE, MILLIMOLES_PER_LITRE, new BigDecimal("1")));
assertEquals(new BigDecimal("1"), convert(MILLIMOLES_PER_LITRE, MOLES_PER_LITRE, new BigDecimal("1000")));
}
@Test
public void fromLogConversion() throws ConversionException {
assertEquals(new BigDecimal("0.1"), convert(UnitUtil.log(MOLES_PER_LITRE), MOLES_PER_LITRE, new BigDecimal("-1")));
assertEquals(new BigDecimal("1"), convert(UnitUtil.log(MOLES_PER_LITRE), MOLES_PER_LITRE, new BigDecimal("0")));
assertEquals(new BigDecimal("10"), convert(UnitUtil.log(MOLES_PER_LITRE), MOLES_PER_LITRE, new BigDecimal("1")));
assertEquals(new BigDecimal("100"), convert(UnitUtil.log(MOLES_PER_LITRE), MILLIMOLES_PER_LITRE, new BigDecimal("-1")));
assertEquals(new BigDecimal("1000"), convert(UnitUtil.log(MOLES_PER_LITRE), MILLIMOLES_PER_LITRE, new BigDecimal("0")));
assertEquals(new BigDecimal("10000"), convert(UnitUtil.log(MOLES_PER_LITRE), MILLIMOLES_PER_LITRE, new BigDecimal("1")));
assertEquals(new BigDecimal("0.0001"), convert(UnitUtil.log(MILLIMOLES_PER_LITRE), MOLES_PER_LITRE, new BigDecimal("-1")));
assertEquals(new BigDecimal("0.001"), convert(UnitUtil.log(MILLIMOLES_PER_LITRE), MOLES_PER_LITRE, new BigDecimal("0")));
assertEquals(new BigDecimal("0.01"), convert(UnitUtil.log(MILLIMOLES_PER_LITRE), MOLES_PER_LITRE, new BigDecimal("1")));
}
@Test
public void fromPConversion() throws Exception {
assertEquals(new BigDecimal("10"), convert(UnitUtil.p(MOLES_PER_LITRE), MOLES_PER_LITRE, new BigDecimal("-1")));
assertEquals(new BigDecimal("1"), convert(UnitUtil.p(MOLES_PER_LITRE), MOLES_PER_LITRE, new BigDecimal("0")));
assertEquals(new BigDecimal("0.1"), convert(UnitUtil.p(MOLES_PER_LITRE), MOLES_PER_LITRE, new BigDecimal("1")));
}
@Test
public void toLogConversion() throws ConversionException {
assertEquals(new BigDecimal("-1"), convert(MOLES_PER_LITRE, UnitUtil.log(MOLES_PER_LITRE), new BigDecimal("0.1")));
assertEquals(new BigDecimal("0"), convert(MOLES_PER_LITRE, UnitUtil.log(MOLES_PER_LITRE), new BigDecimal("1")));
assertEquals(new BigDecimal("1"), convert(MOLES_PER_LITRE, UnitUtil.log(MOLES_PER_LITRE), new BigDecimal("10")));
assertEquals(new BigDecimal("-1"), convert(MILLIMOLES_PER_LITRE, UnitUtil.log(MOLES_PER_LITRE), new BigDecimal("100")));
assertEquals(new BigDecimal("0"), convert(MILLIMOLES_PER_LITRE, UnitUtil.log(MOLES_PER_LITRE), new BigDecimal("1000")));
assertEquals(new BigDecimal("1"), convert(MILLIMOLES_PER_LITRE, UnitUtil.log(MOLES_PER_LITRE), new BigDecimal("10000")));
assertEquals(new BigDecimal("-1"), convert(MOLES_PER_LITRE, UnitUtil.log(MILLIMOLES_PER_LITRE), new BigDecimal("0.0001")));
assertEquals(new BigDecimal("0"), convert(MOLES_PER_LITRE, UnitUtil.log(MILLIMOLES_PER_LITRE), new BigDecimal("0.001")));
assertEquals(new BigDecimal("1"), convert(MOLES_PER_LITRE, UnitUtil.log(MILLIMOLES_PER_LITRE), new BigDecimal("0.01")));
}
@Test
public void toPConversion() throws ConversionException {
assertEquals(new BigDecimal("-1"), convert(MOLES_PER_LITRE, UnitUtil.p(MOLES_PER_LITRE), new BigDecimal("10")));
assertEquals(new BigDecimal("0"), convert(MOLES_PER_LITRE, UnitUtil.p(MOLES_PER_LITRE), new BigDecimal("1")));
assertEquals(new BigDecimal("1"), convert(MOLES_PER_LITRE, UnitUtil.p(MOLES_PER_LITRE), new BigDecimal("0.1")));
}
@Test
public void logLogConversion() throws ConversionException {
assertEquals(new BigDecimal("1"), convert(UnitUtil.log(MOLES_PER_LITRE), UnitUtil.log(MOLES_PER_LITRE), new BigDecimal("1")));
assertEquals(new BigDecimal("2"), convert(UnitUtil.log(MOLES_PER_LITRE), UnitUtil.log(MILLIMOLES_PER_LITRE), new BigDecimal("-1")));
assertEquals(new BigDecimal("3"), convert(UnitUtil.log(MOLES_PER_LITRE), UnitUtil.log(MILLIMOLES_PER_LITRE), new BigDecimal("0")));
assertEquals(new BigDecimal("4"), convert(UnitUtil.log(MOLES_PER_LITRE), UnitUtil.log(MILLIMOLES_PER_LITRE), new BigDecimal("1")));
assertEquals(new BigDecimal("-4"), convert(UnitUtil.log(MILLIMOLES_PER_LITRE), UnitUtil.log(MOLES_PER_LITRE), new BigDecimal("-1")));
assertEquals(new BigDecimal("-3"), convert(UnitUtil.log(MILLIMOLES_PER_LITRE), UnitUtil.log(MOLES_PER_LITRE), new BigDecimal("0")));
assertEquals(new BigDecimal("-2"), convert(UnitUtil.log(MILLIMOLES_PER_LITRE), UnitUtil.log(MOLES_PER_LITRE), new BigDecimal("1")));
}
static
private void assertEquals(BigDecimal expected, BigDecimal actual){
assertTrue((expected.round(CONTEXT)).compareTo(actual.round(CONTEXT)) == 0);
}
static
private BigDecimal convert(Unit<?> from, Unit<?> to, BigDecimal value) throws ConversionException {
UnitConverter converter = UnitConverterUtil.getConverter(from, to);
return converter.convert(value, CONTEXT);
}
private static final Unit<?> MOLES_PER_LITRE = (SI.MOLE).divide(NonSI.LITRE);
private static final Unit<?> MILLIMOLES_PER_LITRE = (SI.MetricPrefix.MILLI(SI.MOLE)).divide(NonSI.LITRE);
private static final MathContext CONTEXT = new MathContext(8, RoundingMode.HALF_DOWN);
}
|
[
"villu.ruusmann@gmail.com"
] |
villu.ruusmann@gmail.com
|
c770dd0f053a133ad8bd7820813276b088b204ea
|
ef339baebe031cfd9e88fd4c693ed8589df36ab1
|
/component/component-system/system/src/main/java/com/troy/keeper/system/util/UserParamter.java
|
a51d3a27cf909de5ed0b8eabef4b81c6994d9f7b
|
[] |
no_license
|
JaxYoun/keepertrunk
|
8fdde30ad14833e92de154ca95e81baacd6967b1
|
3d0c1e2a2b8b59b6cf1a83406428907f6474b2ed
|
refs/heads/master
| 2020-03-14T17:56:17.978489
| 2018-05-01T15:52:24
| 2018-05-01T15:52:24
| 131,731,589
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,144
|
java
|
package com.troy.keeper.system.util;
import com.troy.keeper.core.utils.JsonUtils;
import com.troy.keeper.system.domain.SmUser;
import com.troy.keeper.system.dto.UserInfoDTO;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
/**
* 用户数据Parameter
* Created by SimonChu on 2017/6/12.
*/
public class UserParamter {
// 用户ID
private Long id;
// 组织机构ID
private Long orgId;
// 名字
private String userName;
// 类型
private Integer type;
// 账号
private String loginName;
// 邮箱号
private String email;
// 手机号
private String mobilePhone;
// 菜单列表
private List<Map<String, Object>> menuIds;
// 当前的岗位ID
private Long currentPostId;
// 岗位列表
private List<Map<String, Object>> posts;
public List<Map<String, Object>> getPosts() {
return posts;
}
public void setPosts(List<Map<String, Object>> posts) {
this.posts = posts;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getOrgId() {
return orgId;
}
public void setOrgId(Long orgId) {
this.orgId = orgId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getLoginName() {
return loginName;
}
public void setLoginName(String loginName) {
this.loginName = loginName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getMobilePhone() {
return mobilePhone;
}
public void setMobilePhone(String mobilePhone) {
this.mobilePhone = mobilePhone;
}
public List<Map<String, Object>> getMenuIds() {
return menuIds;
}
public void setMenuIds(List<Map<String, Object>> menuIds) {
this.menuIds = menuIds;
}
public Long getCurrentPostId() {
return currentPostId;
}
public void setCurrentPostId(Long currentPostId) {
this.currentPostId = currentPostId;
}
/**
* 返回当前对象的内容为Map类型
*
* @return
*/
public Map<String, Object> getUserParamter() {
Map<String, Object> data = new HashMap<>();
data.put("id", this.getId());
data.put("orgId", this.getOrgId());
data.put("userName", this.getUserName());
data.put("type", this.getType());
data.put("loginName", this.getLoginName());
data.put("email", this.getEmail());
data.put("mobilePhone", this.getMobilePhone());
data.put("menuIds", this.getMenuIds());
data.put("currentPostId", this.getCurrentPostId());
data.put("posts", this.getPosts());
return data;
}
/**
* 返回当前对象的内容为UserInfoDTO类型
*
* @return
*/
public UserInfoDTO getUserParamterDTO(){
UserInfoDTO userInfoDTO = new UserInfoDTO();
userInfoDTO.setId(this.getId());
userInfoDTO.setOrgId(this.getOrgId());
userInfoDTO.setUserName(this.getUserName());
userInfoDTO.setType(this.getType());
userInfoDTO.setLoginName(this.getLoginName());
userInfoDTO.setEmail(this.getEmail());
userInfoDTO.setMobilePhone(this.getMobilePhone());
userInfoDTO.setMenuIds(this.getMenuIds());
userInfoDTO.setCurrentPostId(this.getCurrentPostId());
userInfoDTO.setPosts(this.getPosts());
return userInfoDTO;
}
/**
* 获取Parmter数据为Jackson实现的JSONObjectString 读取
*
* @return
*/
public String getUserParamterToJackson() {
Map<String, Object> data = new HashMap<>();
data.put("id", this.getId());
data.put("orgId", this.getOrgId());
data.put("userName", this.getUserName());
data.put("type", this.getType());
data.put("loginName", this.getLoginName());
data.put("email", this.getEmail());
data.put("mobilePhone", this.getMobilePhone());
data.put("menuIds", this.getMenuIds());
data.put("currentPostId", this.getCurrentPostId());
data.put("posts", this.getPosts());
return JsonUtils.toJson(data);
}
/**
* 将Optional<SmUser>转换为UserParamter
*
* @param smUser
*/
public void setUserParamter(Optional<SmUser> smUser) {
if (smUser.isPresent()){
this.id = smUser.get().getId();
this.orgId = smUser.get().getOrgId();
this.type = smUser.get().getType();
this.userName = smUser.get().getUserName();
this.loginName = smUser.get().getLoginName();
this.email = smUser.get().getEmail();
this.mobilePhone = smUser.get().getMobilePhone();
}
}
}
|
[
"gao88jie@qq.com"
] |
gao88jie@qq.com
|
41ab6d957d73aa96bd066ca83ae14f29920284b9
|
5f84735a68feec078b9fcef19283fcda537ebe5a
|
/ext/rule/spin/src/main/java/org/queryall/impl/rdfrule/RdfStringOutputStream.java
|
0b3c735201987c75f44c842f7114ec8b81f9c4d2
|
[] |
no_license
|
ansell/queryall
|
a07bea0f3a889ca6aeba9275f3255fa77b7a4be4
|
870cb10467737ebcb7a39543f5a0fe6a3f3ba40c
|
refs/heads/develop
| 2020-05-19T20:57:21.319597
| 2015-12-27T05:38:16
| 2015-12-27T05:38:16
| 2,281,948
| 1
| 0
| null | 2013-07-14T23:45:40
| 2011-08-28T03:44:23
|
Java
|
UTF-8
|
Java
| false
| false
| 1,783
|
java
|
package org.queryall.impl.rdfrule;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.Charset;
/**
* Captures output as a UTF-8 character stream that can be serialised to a string as necessary
*/
public class RdfStringOutputStream extends OutputStream
{
private static final Charset UTF_8 = Charset.forName("UTF-8");
private StringBuffer stringBuffer = new StringBuffer();
@Override
public void close()
{
this.stringBuffer.setLength(0);
this.stringBuffer = null;
}
@Override
public String toString()
{
return this.stringBuffer.toString();
}
@Override
public void write(final byte[] byteArray) throws IOException
{
if(this.stringBuffer == null)
{
throw new IOException("Attempted to write to closed output stream");
}
this.stringBuffer.append(new String(byteArray, RdfStringOutputStream.UTF_8));
}
@Override
public void write(final byte[] byteArray, final int offset, final int length) throws IOException
{
if(this.stringBuffer == null)
{
throw new IOException("Attempted to write to closed output stream");
}
this.stringBuffer.append(new String(byteArray, offset, length, RdfStringOutputStream.UTF_8));
}
@Override
public void write(final int byteAsInt) throws IOException
{
if(this.stringBuffer == null)
{
throw new IOException("Attempted to write to closed output stream");
}
final byte[] singleByte = new byte[1];
singleByte[0] = (byte)byteAsInt;
this.stringBuffer.append(new String(singleByte, RdfStringOutputStream.UTF_8));
}
}
|
[
"p_ansell@yahoo.com"
] |
p_ansell@yahoo.com
|
56455eed255992a61eed6d0dbe66e027fcecdff5
|
d0969e8811c0aeee14674813a83959e3c949e875
|
/acmsguru/223/Main.java
|
e1f7b366e0a3802531ba3fbcf60950802494c5a8
|
[] |
no_license
|
charles-wangkai/codeforces
|
738354a0c4bb0d83bb0ff431a0d1f39c5e5eab5c
|
b61ee17b1dea78c74d7ac2f31c4a1ddc230681a7
|
refs/heads/master
| 2023-09-01T09:07:31.814311
| 2023-09-01T01:34:10
| 2023-09-01T01:34:10
| 161,009,629
| 39
| 14
| null | 2020-10-01T17:43:45
| 2018-12-09T06:00:22
|
Java
|
UTF-8
|
Java
| false
| false
| 1,534
|
java
|
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int k = sc.nextInt();
System.out.println(solve(n, k));
sc.close();
}
static BigInteger solve(int n, int k) {
BigInteger[][] wayNums = new BigInteger[k + 1][1 << (n + 1)];
for (int i = 0; i <= k; ++i) {
Arrays.fill(wayNums[i], BigInteger.ZERO);
}
wayNums[0][0] = BigInteger.ONE;
for (int r = 0; r < n; ++r) {
for (int c = 0; c < n; ++c) {
BigInteger[][] nextWayNums = new BigInteger[k + 1][1 << (n + 1)];
for (int i = 0; i <= k; ++i) {
Arrays.fill(nextWayNums[i], BigInteger.ZERO);
}
for (int i = 0; i <= k; ++i) {
for (int state = 0; state < 1 << (n + 1); ++state) {
int nextState = (state << 1) % (1 << (n + 1));
nextWayNums[i][nextState] = nextWayNums[i][nextState].add(wayNums[i][state]);
if (i != k
&& (c == 0 || ((state & 1) == 0 && (state & (1 << n)) == 0))
&& (c == n - 1 || (state & (1 << (n - 2))) == 0)
&& (state & (1 << (n - 1))) == 0) {
nextWayNums[i + 1][nextState + 1] =
nextWayNums[i + 1][nextState + 1].add(wayNums[i][state]);
}
}
}
wayNums = nextWayNums;
}
}
return Arrays.stream(wayNums[k]).reduce(BigInteger::add).get();
}
}
|
[
"charles.wangkai@gmail.com"
] |
charles.wangkai@gmail.com
|
bc84add8dc65ce014daad5d693556a8b369a7354
|
812be6b9d1ba4036652df166fbf8662323f0bdc9
|
/java/Dddml.Wms.JavaCommon/src/generated/java/org/dddml/wms/domain/goodidentificationmvo/GoodIdentificationMvoApplicationService.java
|
912ef2373dc3964142a28cbd35dfa61c0510b6b8
|
[] |
no_license
|
lanmolsz/wms
|
8503e54a065670b48a15955b15cea4926f05b5d6
|
4b71afd80127a43890102167a3af979268e24fa2
|
refs/heads/master
| 2020-03-12T15:10:26.133106
| 2018-09-27T08:28:05
| 2018-09-27T08:28:05
| 130,684,482
| 0
| 0
| null | 2018-04-23T11:11:24
| 2018-04-23T11:11:24
| null |
UTF-8
|
Java
| false
| false
| 1,549
|
java
|
package org.dddml.wms.domain.goodidentificationmvo;
import java.util.Map;
import java.util.List;
import org.dddml.support.criterion.Criterion;
import org.dddml.wms.domain.product.*;
import java.util.Date;
import org.dddml.wms.domain.*;
import org.dddml.wms.specialization.Event;
import org.dddml.wms.domain.Command;
public interface GoodIdentificationMvoApplicationService
{
void when(GoodIdentificationMvoCommand.CreateGoodIdentificationMvo c);
void when(GoodIdentificationMvoCommand.MergePatchGoodIdentificationMvo c);
void when(GoodIdentificationMvoCommand.DeleteGoodIdentificationMvo c);
GoodIdentificationMvoState get(ProductGoodIdentificationId id);
Iterable<GoodIdentificationMvoState> getAll(Integer firstResult, Integer maxResults);
Iterable<GoodIdentificationMvoState> get(Iterable<Map.Entry<String, Object>> filter, List<String> orders, Integer firstResult, Integer maxResults);
Iterable<GoodIdentificationMvoState> get(Criterion filter, List<String> orders, Integer firstResult, Integer maxResults);
Iterable<GoodIdentificationMvoState> getByProperty(String propertyName, Object propertyValue, List<String> orders, Integer firstResult, Integer maxResults);
long getCount(Iterable<Map.Entry<String, Object>> filter);
long getCount(Criterion filter);
GoodIdentificationMvoEvent getEvent(ProductGoodIdentificationId productGoodIdentificationId, long version);
GoodIdentificationMvoState getHistoryState(ProductGoodIdentificationId productGoodIdentificationId, long version);
}
|
[
"yangjiefeng@gmail.com"
] |
yangjiefeng@gmail.com
|
7903b5e458b50a470675f0003d9d702f7dc5fefe
|
9f08c9f729571da8871ea9c9e7cfb0b3c95f3104
|
/stardontemplateapp/src/main/java/com/stardon/stardontemplateapp/loading/Loading.java
|
5351a4aa40ed9eb3912a91bbf17d7de4958bf93e
|
[] |
no_license
|
ccc920123/AndroidStudioProject
|
2da4f836fbc047c26702111773f4bfb35a0be9e5
|
9d15632d467398cbb2838dc4f593dbc9d519245c
|
refs/heads/master
| 2020-09-25T23:17:42.968223
| 2016-12-26T06:01:18
| 2016-12-26T06:01:18
| 66,187,720
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,235
|
java
|
package com.stardon.stardontemplateapp.loading;
import android.content.Context;
import java.util.Timer;
import java.util.TimerTask;
/**
* 类名: Loading <H3>入口</H3>
* <br/>功能描述:Loading 在使用时用该类直接调用该类中的方法,如果你要使用自定义控件,请直接使用到
* <br/> LoadingIndicatorView,这里有28中样式。通过LoadingIndicatorView.BallPulse(方法来时样式切换)
* <br/> 方法依次:与下图对应
* <br/> BallPulse,BallGridPulse, BallClipRotate, BallClipRotatePulse,
* <br/>SquareSpin,BallClipRotateMultiple,BallPulseRise,BallRotate,
* <br/> CubeTransition,BallZigZag,BallZigZagDeflect,BallTrianglePath,
* <br/> BallScale,LineScale,LineScaleParty,BallScaleMultiple,
* <br/> BallPulseSync,BallBeat,LineScalePulseOut,LineScalePulseOutRapid,
* <br/>BallScaleRipple,BallScaleRippleMultiple,BallSpinFadeLoader,LineSpinFadeLoader,
* <br/>TriangleSkewSpin,Pacman,BallGridBeat,SemiCircleSpin
* <br/><img width="234" height="273" src="../../../../../res/drawable/loading.gif" />
* <br/>作者: 陈渝金
* <br/>时间: 2016/12/2
* <br/>最后修改者:
* <br/>最后修改内容:
*/
public class Loading {
/**
* 定义对话框
*/
public static LoadingDialog loadingDialog;
/**
* 计时器,
*/
private static Timer timer;
/**
* 字体大小,默认是和消息等待框相同
*/
private static int loadsize=0;
/**
* 设置load图标大小
*/
private static int loadingSize=0;
/**
* @param context
* @Description 显示一个自定义ProgressDialog,默认不可取消,通过Dialogs.setCloseAble()设置可取消。
*/
public static void alertProgress(Context context) {
alertProgress(context,LoadingIndicatorView.BallSpinFadeLoader);
}
/**
* @param context
* @param style ProgressView有28种样式可选,创建的时候使用LoadingIndicatorView.XX或直接传入数字选择样式,
* 还可以自定义颜色和大小
* @Description 显示一个自定义ProgressDialog,默认不可取消,通过Dialogs.setCloseAble()设置可取消。
*/
public static void alertProgress(Context context,int style) {
alertProgress(context, -1,style);
}
/**
* @param context
* @param style ProgressView有28种样式可选,创建的时候使用ProgressView.XX或直接传入数字选择样式,
* 还可以自定义颜色和大小
* @param message 消息,消息颜色默认和LoadingIndicatorView一致,可使用Dialogs.progressDialog.
* setTextColor()设置颜色
* @Description 显示一个自定义ProgressDialog,默认不可取消,通过Dialogs.setCloseAble()设置可取消。
*/
public static void alertProgress(Context context,
String message,int style) {
alertProgress(context, message, -1,style);
}
/**
* @param context
* @param style ProgressView有28种样式可选,创建的时候使用LoadingIndicatorView.XX或直接传入数字选择样式,
* 还可以自定义颜色和大小
* @param maxWaitTime 等待时间
* @Description 显示一个自定义ProgressDialog
*/
public static void alertProgress(Context context,
long maxWaitTime,int style) {
alertProgress(context, null, maxWaitTime,style);
}
/**
* @param context
* @param style ProgressView有28种样式可选,创建的时候使用LoadingIndicatorView.XX或直接传入数字选择样式,
* 还可以自定义颜色和大小
* @param message 消息,消息颜色默认和LoadingIndicatorView一致,可使用Dialogs.progressDialog.
* setTextColor()设置颜色
* @param maxWaitTime 等待时间
* @Description 显示一个自定义ProgressDialog,默认不可取消,通过Dialogs.setCloseAble()设置可取消。
*/
public static void alertProgress(Context context,
String message, long maxWaitTime,int style) {
try {
closeLoadingDialog();
if(loadingSize!=0) {
LoadingIndicatorView.setSize(loadingSize);
}
LoadingIndicatorView.setStyle(style);
loadingDialog = new LoadingDialog(context, new LoadingIndicatorView(context), message);
if(loadsize!=0) {
loadingDialog.setTextSize(loadsize);
}
loadingDialog.show();
if (maxWaitTime > 1000) {
timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
closeLoadingDialog();
}
}, maxWaitTime);
}
} catch (Exception e) {
e.printStackTrace();
}
}
/**方法名称: closeLoadingDialog
* <br/>方法详述: 关闭消息等待框
* <br/>参数:
* <br/>返回值:
* <br/>异常抛出 Exception:
* <br/>异常抛出 NullPointerException:
*/
public static void closeLoadingDialog() {
try {
if (loadingDialog != null) {
loadingDialog.dismiss();
loadingDialog = null;
}
} catch (Exception e) {
}
try {
if (timer != null) {
timer.cancel();
timer = null;
}
} catch (Exception e) {
}
}
/**方法名称: setTextSize
* <br/>方法详述: 设置文字大小
* <br/>参数:
* <br/>返回值:
* <br/>异常抛出 Exception:
* <br/>异常抛出 NullPointerException:
*/
public static void setTextSize(int size)
{
loadsize=size;
}
/**方法名称: setLoadingSize
* <br/>方法详述: 设置图标大小
* <br/>参数:
* <br/>返回值:
* <br/>异常抛出 Exception:
* <br/>异常抛出 NullPointerException:
*/
public static void setLoadingSize(int loadSize)
{
loadingSize=loadSize;
}
}
|
[
"920123"
] |
920123
|
4aa69b6c13a26e5428543f1e4a61bed3eb3ed559
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/openhab--openhab1-addons/44a5d44107fdfd11587967c017e73171a8dbfe30/before/ScriptIdentifiableSimpleNameProvider.java
|
dd5f3df6ab26ced8c2a9265abfa1a7d8091cd9c2
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,189
|
java
|
/**
* openHAB, the open Home Automation Bus.
* Copyright (C) 2010-2013, openHAB.org <admin@openhab.org>
*
* See the contributors.txt file in the distribution for a
* full listing of individual contributors.
*
* 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>.
*
* Additional permission under GNU GPL version 3 section 7
*
* If you modify this Program, or any covered work, by linking or
* combining it with Eclipse (or a modified version of that library),
* containing parts covered by the terms of the Eclipse Public License
* (EPL), the licensors of this Program grant you additional permission
* to convey the resulting work.
*/
package org.openhab.model.script.jvmmodel;
import java.util.Arrays;
import org.eclipse.xtext.common.types.JvmIdentifiableElement;
import org.eclipse.xtext.common.types.JvmType;
import org.eclipse.xtext.xbase.featurecalls.IdentifiableSimpleNameProvider;
@SuppressWarnings("all")
public class ScriptIdentifiableSimpleNameProvider extends IdentifiableSimpleNameProvider {
protected String _getSimpleName(final JvmType element) {
return "this";
}
protected String _getSimpleName(final JvmIdentifiableElement element) {
return super.getSimpleName(element);
}
public String getSimpleName(final JvmIdentifiableElement element) {
if (element instanceof JvmType) {
return _getSimpleName((JvmType)element);
} else if (element != null) {
return _getSimpleName(element);
} else {
throw new IllegalArgumentException("Unhandled parameter types: " +
Arrays.<Object>asList(element).toString());
}
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
8dd9012622c0c87337d7e8f14e6202b05f6487c8
|
7dd73504d783c7ebb0c2e51fa98dea2b25c37a11
|
/eaglercraftx-1.8-main/patches/minecraft/net/minecraft/client/gui/GuiIngame.edit.java
|
22696b5d3a18d0264134ea37a9661278075eb036
|
[
"LicenseRef-scancode-proprietary-license"
] |
permissive
|
bagel-man/bagel-man.github.io
|
32813dd7ef0b95045f53718a74ae1319dae8c31e
|
eaccb6c00aa89c449c56a842052b4e24f15a8869
|
refs/heads/master
| 2023-04-05T10:27:26.743162
| 2023-03-16T04:24:32
| 2023-03-16T04:24:32
| 220,102,442
| 3
| 21
|
MIT
| 2022-12-14T18:44:43
| 2019-11-06T22:29:24
|
C++
|
UTF-8
|
Java
| false
| false
| 1,374
|
java
|
# Eagler Context Redacted Diff
# Copyright (c) 2022 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 8 @ 2
+ import java.util.ArrayList;
+ import java.util.Collection;
+ import java.util.List;
+ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
+
> CHANGE 3 : 6 @ 3 : 6
~
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
> DELETE 2 @ 2 : 11
> DELETE 2 @ 2 : 3
> DELETE 1 @ 1 : 2
> CHANGE 32 : 33 @ 32 : 33
~ private final EaglercraftRandom rand = new EaglercraftRandom();
> DELETE 3 @ 3 : 4
> DELETE 27 @ 27 : 28
> CHANGE 95 : 96 @ 95 : 98
~ this.overlayDebug.renderDebugInfo(scaledresolution, partialTicks);
> INSERT 87 : 90 @ 87
+ if (this.mc.gameSettings.hudWorld && (mc.currentScreen == null || !(mc.currentScreen instanceof GuiChat))) {
+ j -= 10;
+ }
> DELETE 166 @ 166 : 170
> CHANGE 17 : 18 @ 17 : 18
~ for (Score score : (List<Score>) arraylist1) {
> CHANGE 12 : 13 @ 12 : 13
~ for (Score score1 : (List<Score>) arraylist1) {
> CHANGE 343 : 344 @ 343 : 344
~ EaglerTextureAtlasSprite textureatlassprite = this.mc.getBlockRendererDispatcher().getBlockModelShapes()
> DELETE 57 @ 57 : 58
> EOF
|
[
"tom@blowmage.com"
] |
tom@blowmage.com
|
5d0c272348ab28802dd59a85a15f8d971878a414
|
05e13c408bede78bb40cbaba237669064eddee10
|
/src/main/java/com/ups/xmlschema/xoltws/track/v2/ShipToRequestType.java
|
a39d64da627a655eae402c9f57e3376b36f70f07
|
[] |
no_license
|
noboomu/shipping-carriers
|
f60ae167bd645368012df0817f0c0d54e8fff616
|
74b2a7b37ac36fe2ea16b4f79f2fb0f69113e0f6
|
refs/heads/master
| 2023-05-07T08:54:31.217066
| 2021-06-02T23:48:11
| 2021-06-02T23:48:11
| 373,320,009
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,574
|
java
|
package com.ups.xmlschema.xoltws.track.v2;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for ShipToRequestType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ShipToRequestType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Address" type="{http://www.ups.com/XMLSchema/XOLTWS/Track/v2.0}AddressRequestType" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ShipToRequestType", propOrder = {
"address"
})
public class ShipToRequestType {
@XmlElement(name = "Address")
protected AddressRequestType address;
/**
* Gets the value of the address property.
*
* @return
* possible object is
* {@link AddressRequestType }
*
*/
public AddressRequestType getAddress() {
return address;
}
/**
* Sets the value of the address property.
*
* @param value
* allowed object is
* {@link AddressRequestType }
*
*/
public void setAddress(AddressRequestType value) {
this.address = value;
}
}
|
[
"bauer.j@gmail.com"
] |
bauer.j@gmail.com
|
a5081a2839799671bfe31506d2f505480cf2fae4
|
d3353ed9d6919efb892ee55d067504643753f684
|
/jdk-analyze/src/main/java/org/omg/PortableServer/ServantLocatorHelper.java
|
e0510e959195bf73e2016dfa146654bbd17d4706
|
[] |
no_license
|
chenhaoxiang/JDK1.8
|
33f77637aae3d05c9d217e04afec6ed9b40e9eab
|
949733b67ec0d788b9034dbcd22f9369d3c52df3
|
refs/heads/master
| 2020-07-04T01:15:33.970521
| 2020-03-23T13:19:49
| 2020-03-23T13:19:49
| 202,107,217
| 6
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,645
|
java
|
package org.omg.PortableServer;
/**
* org/omg/PortableServer/ServantLocatorHelper.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u201/12322/corba/src/share/classes/org/omg/PortableServer/poa.idl
* Saturday, December 15, 2018 6:37:04 PM PST
*/
/**
* When the POA has the NON_RETAIN policy it uses servant
* managers that are ServantLocators. Because the POA
* knows that the servant returned by this servant
* manager will be used only for a single request,
* it can supply extra information to the servant
* manager's operations and the servant manager's pair
* of operations may be able to cooperate to do
* something different than a ServantActivator.
* When the POA uses the ServantLocator interface,
* immediately after performing the operation invocation
* on the servant returned by preinvoke, the POA will
* invoke postinvoke on the servant manager, passing the
* ObjectId value and the Servant value as parameters
* (among others). This feature may be used to force
* every request for objects associated with a POA to
* be mediated by the servant manager.
*/
abstract public class ServantLocatorHelper
{
private static String _id = "IDL:omg.org/PortableServer/ServantLocator:1.0";
public static void insert (org.omg.CORBA.Any a, org.omg.PortableServer.ServantLocator that)
{
org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
a.type (type ());
write (out, that);
a.read_value (out.create_input_stream (), type ());
}
public static org.omg.PortableServer.ServantLocator extract (org.omg.CORBA.Any a)
{
return read (a.create_input_stream ());
}
private static org.omg.CORBA.TypeCode __typeCode = null;
synchronized public static org.omg.CORBA.TypeCode type ()
{
if (__typeCode == null)
{
__typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.omg.PortableServer.ServantLocatorHelper.id (), "ServantLocator");
}
return __typeCode;
}
public static String id ()
{
return _id;
}
public static org.omg.PortableServer.ServantLocator read (org.omg.CORBA.portable.InputStream istream)
{
throw new org.omg.CORBA.MARSHAL ();
}
public static void write (org.omg.CORBA.portable.OutputStream ostream, org.omg.PortableServer.ServantLocator value)
{
throw new org.omg.CORBA.MARSHAL ();
}
public static org.omg.PortableServer.ServantLocator narrow (org.omg.CORBA.Object obj)
{
if (obj == null)
return null;
else if (obj instanceof org.omg.PortableServer.ServantLocator)
return (org.omg.PortableServer.ServantLocator)obj;
else if (!obj._is_a (id ()))
throw new org.omg.CORBA.BAD_PARAM ();
else
{
org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
org.omg.PortableServer._ServantLocatorStub stub = new org.omg.PortableServer._ServantLocatorStub ();
stub._set_delegate(delegate);
return stub;
}
}
public static org.omg.PortableServer.ServantLocator unchecked_narrow (org.omg.CORBA.Object obj)
{
if (obj == null)
return null;
else if (obj instanceof org.omg.PortableServer.ServantLocator)
return (org.omg.PortableServer.ServantLocator)obj;
else
{
org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
org.omg.PortableServer._ServantLocatorStub stub = new org.omg.PortableServer._ServantLocatorStub ();
stub._set_delegate(delegate);
return stub;
}
}
}
|
[
"uifuture@uifuture.com"
] |
uifuture@uifuture.com
|
89e98e40a5686863e81734bb91aca42d308f17a8
|
eefcbe8f7a4b5d320668148029132f805aa434dd
|
/ch9/p459.java
|
1c9dbf2d611b6d7b283fce189b2c1a9f68a0ba5e
|
[] |
no_license
|
avergnaud/ocp-8
|
0276952849e7281d5c17bda082cd2aafb501fadc
|
417db3e9eb819521fe47b9c1cc04fda93354cde5
|
refs/heads/master
| 2021-01-23T19:19:06.783455
| 2016-12-22T08:24:43
| 2016-12-22T08:24:43
| 51,137,734
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 253
|
java
|
package ch9;
import static java.lang.System.out;
import java.nio.file.*;
public class p459 {
public static void main(String... args) {
Path p1 = FileSystems.getDefault().getPath("C:");
Path p2 = Paths.get("C:");
out.println(p1.equals(p2));
}
}
|
[
"a.vergnaud@gmail.com"
] |
a.vergnaud@gmail.com
|
e3a330fa542d160dd804855f67b10802c4db9b08
|
dce6c0fa6cc9f26315c69c626acddf01d1a120e4
|
/Backend/J2EE/Spring/Spring_Hibernate for Beginners/spring-hibernate-source-code-v18/03-hibernate-5/solution-code-hibernate-hb-05-many-to-many/src/com/luv2code/hibernate/demo/AddCoursesForMaryDemo.java
|
abb780fc1384ffab5988988c89136b874611c2ad
|
[
"MIT"
] |
permissive
|
specter01wj/LAB-Udemy
|
5df55e82c11eb2ef881045082d11791bfd307ae2
|
6bbb779c2d3efc84671674c124ae751bfb126a7e
|
refs/heads/master
| 2023-08-19T03:21:15.081682
| 2023-08-18T03:30:02
| 2023-08-18T03:30:02
| 102,077,376
| 1
| 0
|
MIT
| 2023-03-06T07:39:10
| 2017-09-01T05:36:39
|
HTML
|
UTF-8
|
Java
| false
| false
| 1,907
|
java
|
package com.luv2code.hibernate.demo;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import com.luv2code.hibernate.demo.entity.Course;
import com.luv2code.hibernate.demo.entity.Instructor;
import com.luv2code.hibernate.demo.entity.InstructorDetail;
import com.luv2code.hibernate.demo.entity.Review;
import com.luv2code.hibernate.demo.entity.Student;
public class AddCoursesForMaryDemo {
public static void main(String[] args) {
// create session factory
SessionFactory factory = new Configuration()
.configure("hibernate.cfg.xml")
.addAnnotatedClass(Instructor.class)
.addAnnotatedClass(InstructorDetail.class)
.addAnnotatedClass(Course.class)
.addAnnotatedClass(Review.class)
.addAnnotatedClass(Student.class)
.buildSessionFactory();
// create session
Session session = factory.getCurrentSession();
try {
// start a transaction
session.beginTransaction();
// get the student mary from database
int studentId = 2;
Student tempStudent = session.get(Student.class, studentId);
System.out.println("\nLoaded student: " + tempStudent);
System.out.println("Courses: " + tempStudent.getCourses());
// create more courses
Course tempCourse1 = new Course("Rubik's Cube - How to Speed Cube");
Course tempCourse2 = new Course("Atari 2600 - Game Development");
// add student to courses
tempCourse1.addStudent(tempStudent);
tempCourse2.addStudent(tempStudent);
// save the courses
System.out.println("\nSaving the courses ...");
session.save(tempCourse1);
session.save(tempCourse2);
// commit transaction
session.getTransaction().commit();
System.out.println("Done!");
}
finally {
// add clean up code
session.close();
factory.close();
}
}
}
|
[
"specter01wj@gmail.com"
] |
specter01wj@gmail.com
|
f8a5bb3baa0b706958319410a274eaa9cff9699c
|
8f1b826e74e329ee8526ce58c7c094820ce0ffed
|
/addons/osio-addon/src/main/java/io/fabric8/forge/generator/utils/MavenHelpers.java
|
2918095132ad5b70929a52fe73d454c41c0b8561
|
[
"Apache-2.0"
] |
permissive
|
invincibleJai/launcher-backend
|
bedb9579c638b4caabac246cd1ac058903976d8d
|
4233828692bf68ae46ec64494c887cb5dc9f4e23
|
refs/heads/master
| 2021-09-02T11:56:19.560455
| 2017-12-15T05:04:48
| 2017-12-15T05:04:48
| 114,340,278
| 0
| 1
| null | 2017-12-26T09:36:49
| 2017-12-15T07:25:41
|
Java
|
UTF-8
|
Java
| false
| false
| 2,209
|
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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.fabric8.forge.generator.utils;
import java.io.File;
import io.fabric8.forge.generator.che.CheStackDetector;
import io.fabric8.utils.Files;
import org.jboss.forge.addon.resource.DirectoryResource;
import org.jboss.forge.addon.resource.Resource;
import org.jboss.forge.addon.resource.util.ResourceUtil;
import org.jboss.forge.addon.ui.context.UIContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.Document;
/**
*/
public class MavenHelpers {
private static final transient Logger LOG = LoggerFactory.getLogger(MavenHelpers.class);
public static PomFileXml findPom(UIContext context, File pomFile) {
if (pomFile == null) {
DirectoryResource initialDir = (DirectoryResource) context.getInitialSelection().get();
if (initialDir != null) {
Resource<?> child = initialDir.getChild("pom.xml");
if (child.exists()) {
pomFile = ResourceUtil.getContextFile(child);
}
}
}
if (Files.isFile(pomFile)) {
Document doc = null;
try {
doc = CheStackDetector.parseXmlFile(pomFile);
} catch (Exception e) {
LOG.debug("Failed to parse " + pomFile + " with: " + e, e);
}
return new PomFileXml(pomFile, doc);
}
return null;
}
}
|
[
"gegastaldi@gmail.com"
] |
gegastaldi@gmail.com
|
764e2abfe2db214b4323917985b0195cff4ff2d0
|
ba005c6729aed08554c70f284599360a5b3f1174
|
/lib/selenium-server-standalone-3.4.0/net/sourceforge/htmlunit/corejs/javascript/typedarrays/Conversions.java
|
af40b40962f0308a5732d4bef33fa72a2f508ff1
|
[] |
no_license
|
Viral-patel703/Testyourbond-aut0
|
f6727a6da3b1fbf69cc57aeb89e15635f09e249a
|
784ab7a3df33d0efbd41f3adadeda22844965a56
|
refs/heads/master
| 2020-08-09T00:27:26.261661
| 2017-11-07T10:12:05
| 2017-11-07T10:12:05
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,132
|
java
|
package net.sourceforge.htmlunit.corejs.javascript.typedarrays;
import net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime;
public class Conversions
{
public static final int EIGHT_BIT = 256;
public static final int SIXTEEN_BIT = 65536;
public static final long THIRTYTWO_BIT = 4294967296L;
public Conversions() {}
public static int toInt8(Object arg)
{
int iv;
int iv;
if ((arg instanceof Integer)) {
iv = ((Integer)arg).intValue();
} else {
iv = ScriptRuntime.toInt32(arg);
}
int int8Bit = iv % 256;
return int8Bit >= 128 ? int8Bit - 256 : int8Bit;
}
public static int toUint8(Object arg) { int iv;
int iv;
if ((arg instanceof Integer)) {
iv = ((Integer)arg).intValue();
} else {
iv = ScriptRuntime.toInt32(arg);
}
return iv % 256;
}
public static int toUint8Clamp(Object arg) {
double d = ScriptRuntime.toNumber(arg);
if (d <= 0.0D) {
return 0;
}
if (d >= 255.0D) {
return 255;
}
double f = Math.floor(d);
if (f + 0.5D < d) {
return (int)(f + 1.0D);
}
if (d < f + 0.5D) {
return (int)f;
}
if ((int)f % 2 != 0) {
return (int)f + 1;
}
return (int)f;
}
public static int toInt16(Object arg) { int iv;
int iv;
if ((arg instanceof Integer)) {
iv = ((Integer)arg).intValue();
} else {
iv = ScriptRuntime.toInt32(arg);
}
int int16Bit = iv % 65536;
return int16Bit >= 32768 ? int16Bit - 65536 : int16Bit;
}
public static int toUint16(Object arg) { int iv;
int iv;
if ((arg instanceof Integer)) {
iv = ((Integer)arg).intValue();
} else {
iv = ScriptRuntime.toInt32(arg);
}
return iv % 65536;
}
public static int toInt32(Object arg) {
long lv = ScriptRuntime.toNumber(arg);
long int32Bit = lv % 4294967296L;
return (int)(int32Bit >= 2147483648L ? int32Bit - 4294967296L : int32Bit);
}
public static long toUint32(Object arg)
{
long lv = ScriptRuntime.toNumber(arg);
return lv % 4294967296L;
}
}
|
[
"VIRUS-inside@users.noreply.github.com"
] |
VIRUS-inside@users.noreply.github.com
|
0b102da2d5f2f74c07997bb7daaa4e79f777a379
|
efb97250b130a55948d3c450fdcd0ec69fec920e
|
/modbus/src/main/java/com/berrontech/huali/modbus/sero/io/LineHandler.java
|
470f40cbb81d88615faf43f3eabf094cf41e0800
|
[] |
no_license
|
levent8421/AlarmCenter
|
6f24f35bae57dbe179988453fd1b59c7b0d69925
|
a10921980423ce4741bd16c9747705a2505efdb0
|
refs/heads/master
| 2022-12-02T04:44:24.199019
| 2020-08-13T10:33:52
| 2020-08-13T10:33:52
| 286,463,356
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 282
|
java
|
/*
Copyright (C) 2006-2009 Serotonin Software Technologies Inc.
@author Matthew Lohbihler
*/
package com.berrontech.huali.modbus.sero.io;
/**
* @author Matthew Lohbihler
*/
public interface LineHandler {
public void handleLine(String line);
public void done();
}
|
[
"levent8421@outlook.com"
] |
levent8421@outlook.com
|
9acdf987a49b1650405cd85bb7b6e5510a5d627f
|
4ca66f616ebd8c999f5917059cc21321e35ba851
|
/src/minecraft/net/minecraft/client/util/JsonBlendingMode.java
|
7da6dc408e2ec4811f9e328297b2d57aab72c78a
|
[] |
no_license
|
MobbyGFX96/Jupiter
|
1c66c872b4944654c1554f6e3821a63332f5f2cb
|
c5ee2e16019fc57f5a7f3ecf4a78e9e64ab40221
|
refs/heads/master
| 2016-09-10T17:05:11.977792
| 2014-07-21T09:24:02
| 2014-07-21T09:24:02
| 22,002,806
| 5
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,388
|
java
|
package net.minecraft.client.util;
import com.google.gson.JsonObject;
import net.minecraft.util.JsonUtils;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL14;
public class JsonBlendingMode {
private static final String __OBFID = "CL_00001038";
private static JsonBlendingMode field_148118_a = null;
private final int field_148116_b;
private final int field_148117_c;
private final int field_148114_d;
private final int field_148115_e;
private final int field_148112_f;
private final boolean field_148113_g;
private final boolean field_148119_h;
private JsonBlendingMode(boolean p_i45084_1_, boolean p_i45084_2_, int p_i45084_3_, int p_i45084_4_, int p_i45084_5_, int p_i45084_6_, int p_i45084_7_) {
this.field_148113_g = p_i45084_1_;
this.field_148116_b = p_i45084_3_;
this.field_148114_d = p_i45084_4_;
this.field_148117_c = p_i45084_5_;
this.field_148115_e = p_i45084_6_;
this.field_148119_h = p_i45084_2_;
this.field_148112_f = p_i45084_7_;
}
public JsonBlendingMode() {
this(false, true, 1, 0, 1, 0, 32774);
}
public JsonBlendingMode(int p_i45085_1_, int p_i45085_2_, int p_i45085_3_) {
this(false, false, p_i45085_1_, p_i45085_2_, p_i45085_1_, p_i45085_2_, p_i45085_3_);
}
public JsonBlendingMode(int p_i45086_1_, int p_i45086_2_, int p_i45086_3_, int p_i45086_4_, int p_i45086_5_) {
this(true, false, p_i45086_1_, p_i45086_2_, p_i45086_3_, p_i45086_4_, p_i45086_5_);
}
public static JsonBlendingMode func_148110_a(JsonObject p_148110_0_) {
if (p_148110_0_ == null) {
return new JsonBlendingMode();
} else {
int var1 = 32774;
int var2 = 1;
int var3 = 0;
int var4 = 1;
int var5 = 0;
boolean var6 = true;
boolean var7 = false;
if (JsonUtils.jsonObjectFieldTypeIsString(p_148110_0_, "func")) {
var1 = func_148108_a(p_148110_0_.get("func").getAsString());
if (var1 != 32774) {
var6 = false;
}
}
if (JsonUtils.jsonObjectFieldTypeIsString(p_148110_0_, "srcrgb")) {
var2 = func_148107_b(p_148110_0_.get("srcrgb").getAsString());
if (var2 != 1) {
var6 = false;
}
}
if (JsonUtils.jsonObjectFieldTypeIsString(p_148110_0_, "dstrgb")) {
var3 = func_148107_b(p_148110_0_.get("dstrgb").getAsString());
if (var3 != 0) {
var6 = false;
}
}
if (JsonUtils.jsonObjectFieldTypeIsString(p_148110_0_, "srcalpha")) {
var4 = func_148107_b(p_148110_0_.get("srcalpha").getAsString());
if (var4 != 1) {
var6 = false;
}
var7 = true;
}
if (JsonUtils.jsonObjectFieldTypeIsString(p_148110_0_, "dstalpha")) {
var5 = func_148107_b(p_148110_0_.get("dstalpha").getAsString());
if (var5 != 0) {
var6 = false;
}
var7 = true;
}
return var6 ? new JsonBlendingMode() : (var7 ? new JsonBlendingMode(var2, var3, var4, var5, var1) : new JsonBlendingMode(var2, var3, var1));
}
}
private static int func_148108_a(String p_148108_0_) {
String var1 = p_148108_0_.trim().toLowerCase();
return var1.equals("add") ? 32774 : (var1.equals("subtract") ? 32778 : (var1.equals("reversesubtract") ? 32779 : (var1.equals("reverse_subtract") ? 32779 : (var1.equals("min") ? 32775 : (var1.equals("max") ? 32776 : 32774)))));
}
private static int func_148107_b(String p_148107_0_) {
String var1 = p_148107_0_.trim().toLowerCase();
var1 = var1.replaceAll("_", "");
var1 = var1.replaceAll("one", "1");
var1 = var1.replaceAll("zero", "0");
var1 = var1.replaceAll("minus", "-");
return var1.equals("0") ? 0 : (var1.equals("1") ? 1 : (var1.equals("srccolor") ? 768 : (var1.equals("1-srccolor") ? 769 : (var1.equals("dstcolor") ? 774 : (var1.equals("1-dstcolor") ? 775 : (var1.equals("srcalpha") ? 770 : (var1.equals("1-srcalpha") ? 771 : (var1.equals("dstalpha") ? 772 : (var1.equals("1-dstalpha") ? 773 : -1)))))))));
}
public void func_148109_a() {
if (!this.equals(field_148118_a)) {
if (field_148118_a == null || this.field_148119_h != field_148118_a.func_148111_b()) {
field_148118_a = this;
if (this.field_148119_h) {
GL11.glDisable(GL11.GL_BLEND);
return;
}
GL11.glEnable(GL11.GL_BLEND);
}
GL14.glBlendEquation(this.field_148112_f);
if (this.field_148113_g) {
GL14.glBlendFuncSeparate(this.field_148116_b, this.field_148114_d, this.field_148117_c, this.field_148115_e);
} else {
GL11.glBlendFunc(this.field_148116_b, this.field_148114_d);
}
}
}
public boolean equals(Object p_equals_1_) {
if (this == p_equals_1_) {
return true;
} else if (!(p_equals_1_ instanceof JsonBlendingMode)) {
return false;
} else {
JsonBlendingMode var2 = (JsonBlendingMode) p_equals_1_;
return this.field_148112_f != var2.field_148112_f ? false : (this.field_148115_e != var2.field_148115_e ? false : (this.field_148114_d != var2.field_148114_d ? false : (this.field_148119_h != var2.field_148119_h ? false : (this.field_148113_g != var2.field_148113_g ? false : (this.field_148117_c != var2.field_148117_c ? false : this.field_148116_b == var2.field_148116_b)))));
}
}
public int hashCode() {
int var1 = this.field_148116_b;
var1 = 31 * var1 + this.field_148117_c;
var1 = 31 * var1 + this.field_148114_d;
var1 = 31 * var1 + this.field_148115_e;
var1 = 31 * var1 + this.field_148112_f;
var1 = 31 * var1 + (this.field_148113_g ? 1 : 0);
var1 = 31 * var1 + (this.field_148119_h ? 1 : 0);
return var1;
}
public boolean func_148111_b() {
return this.field_148119_h;
}
}
|
[
"MObbyGFX96@hotmail.co.uk"
] |
MObbyGFX96@hotmail.co.uk
|
717c591e8511748d598d62fd3a178fdbfb6bcc15
|
5ec76201d1717f95d5f77c8d0d183f35b33ad1a6
|
/src/main/java/com/scm/gsoft/domain/inv/Depto.java
|
c0fcdae0d73ae1292be6cf50880fa6ae8a28e9d5
|
[] |
no_license
|
KevinMendez7/G-Soft
|
7da92a5a722d629a1ddef6c53f6d667514134314
|
0f43c2c5094dc5c55afbc8e9d3f4d0fc101ab873
|
refs/heads/master
| 2020-03-28T18:17:28.018515
| 2018-09-15T04:31:54
| 2018-09-15T04:31:54
| 148,868,460
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,218
|
java
|
package com.scm.gsoft.domain.inv;
// Generated 26/08/2018 02:38:20 AM by Hibernate Tools 4.3.1
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
/**
* Depto generated by hbm2java
*/
@Entity
@Table(name = "depto")
public class Depto implements java.io.Serializable {
@Id
@Column(name = "id_depto")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long idDepto;
@Column(name = "codigo")
private String codigo;
@Column(name = "concepto")
private String concepto;
public Depto() {
}
public Depto(String codigo) {
this.codigo = codigo;
}
public Depto(String codigo, String concepto) {
this.codigo = codigo;
this.concepto = concepto;
}
public Long getIdDepto() {
return this.idDepto;
}
public void setIdDepto(Long idDepto) {
this.idDepto = idDepto;
}
public String getCodigo() {
return this.codigo;
}
public void setCodigo(String codigo) {
this.codigo = codigo;
}
public String getConcepto() {
return this.concepto;
}
public void setConcepto(String concepto) {
this.concepto = concepto;
}
}
|
[
"kevin_33_6@hotmail.com"
] |
kevin_33_6@hotmail.com
|
16a0dd02848d5f57a69d9ccd73157ce942502035
|
41898abc4b9e37589ddaff8b64b581e072fc097f
|
/services/codehub/src/main/java/com/huaweicloud/sdk/codehub/v3/model/GetProductTemplatesRequest.java
|
494cf5534df5fe783b5c55459848a2cc1afb3018
|
[
"Apache-2.0"
] |
permissive
|
jierui001/huaweicloud-sdk-java-v3
|
55f5ee27973bf38cef2b80d19e6d31547c506e3f
|
a14a19255d2890784a4e9cea05076d2d76ac3ebd
|
refs/heads/master
| 2022-12-27T04:54:25.594241
| 2020-09-30T02:49:42
| 2020-09-30T02:49:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,282
|
java
|
package com.huaweicloud.sdk.codehub.v3.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.function.Consumer;
import java.util.Objects;
/**
* Request Object
*/
public class GetProductTemplatesRequest {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="project_uuid")
private String projectUuid;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="page_no")
private String pageNo;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value="page_size")
private String pageSize;
public GetProductTemplatesRequest withProjectUuid(String projectUuid) {
this.projectUuid = projectUuid;
return this;
}
/**
* Get projectUuid
* @return projectUuid
*/
public String getProjectUuid() {
return projectUuid;
}
public void setProjectUuid(String projectUuid) {
this.projectUuid = projectUuid;
}
public GetProductTemplatesRequest withPageNo(String pageNo) {
this.pageNo = pageNo;
return this;
}
/**
* Get pageNo
* @return pageNo
*/
public String getPageNo() {
return pageNo;
}
public void setPageNo(String pageNo) {
this.pageNo = pageNo;
}
public GetProductTemplatesRequest withPageSize(String pageSize) {
this.pageSize = pageSize;
return this;
}
/**
* Get pageSize
* @return pageSize
*/
public String getPageSize() {
return pageSize;
}
public void setPageSize(String pageSize) {
this.pageSize = pageSize;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GetProductTemplatesRequest getProductTemplatesRequest = (GetProductTemplatesRequest) o;
return Objects.equals(this.projectUuid, getProductTemplatesRequest.projectUuid) &&
Objects.equals(this.pageNo, getProductTemplatesRequest.pageNo) &&
Objects.equals(this.pageSize, getProductTemplatesRequest.pageSize);
}
@Override
public int hashCode() {
return Objects.hash(projectUuid, pageNo, pageSize);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GetProductTemplatesRequest {\n");
sb.append(" projectUuid: ").append(toIndentedString(projectUuid)).append("\n");
sb.append(" pageNo: ").append(toIndentedString(pageNo)).append("\n");
sb.append(" pageSize: ").append(toIndentedString(pageSize)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
ef5178358715282d38a88308b3c628fb492eaf69
|
77fb90c41fd2844cc4350400d786df99e14fa4ca
|
/support/android/preference/ServerVersion.java
|
04d4ce1165fa89b43231d7c92e348cf2b3563c5a
|
[] |
no_license
|
highnes7/umaang_decompiled
|
341193b25351188d69b4413ebe7f0cde6525c8fb
|
bcfd90dffe81db012599278928cdcc6207632c56
|
refs/heads/master
| 2020-06-19T07:47:18.630455
| 2019-07-12T17:16:13
| 2019-07-12T17:16:13
| 196,615,053
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 909
|
java
|
package support.android.preference;
public final class ServerVersion
{
public static final int notification_action_background = 2131231317;
public static final int notification_bg = 2131231318;
public static final int notification_bg_low = 2131231319;
public static final int notification_bg_low_normal = 2131231320;
public static final int notification_bg_low_pressed = 2131231321;
public static final int notification_bg_normal = 2131231322;
public static final int notification_bg_normal_pressed = 2131231323;
public static final int notification_icon_background = 2131231328;
public static final int notification_template_icon_bg = 2131231331;
public static final int notification_template_icon_low_bg = 2131231332;
public static final int notification_tile_bg = 2131231333;
public static final int notify_panel_notification_icon_bg = 2131231334;
public ServerVersion() {}
}
|
[
"highnes.7@gmail.com"
] |
highnes.7@gmail.com
|
182f0ee1886eb8c0b0c46fb7853fb5ed6a441137
|
b3a694913d943bdb565fbf828d6ab8a08dd7dd12
|
/sources/p116io/jsonwebtoken/Claims.java
|
032b5f8abecb50a5a9d8be90de31323e0c66ed16
|
[] |
no_license
|
v1ckxy/radar-covid
|
feea41283bde8a0b37fbc9132c9fa5df40d76cc4
|
8acb96f8ccd979f03db3c6dbfdf162d66ad6ac5a
|
refs/heads/master
| 2022-12-06T11:29:19.567919
| 2020-08-29T08:00:19
| 2020-08-29T08:00:19
| 294,198,796
| 1
| 0
| null | 2020-09-09T18:39:43
| 2020-09-09T18:39:43
| null |
UTF-8
|
Java
| false
| false
| 1,039
|
java
|
package p116io.jsonwebtoken;
import java.util.Date;
import java.util.Map;
/* renamed from: io.jsonwebtoken.Claims */
public interface Claims extends Map<String, Object>, ClaimsMutator<Claims> {
public static final String AUDIENCE = "aud";
public static final String EXPIRATION = "exp";
/* renamed from: ID */
public static final String f2453ID = "jti";
public static final String ISSUED_AT = "iat";
public static final String ISSUER = "iss";
public static final String NOT_BEFORE = "nbf";
public static final String SUBJECT = "sub";
<T> T get(String str, Class<T> cls);
String getAudience();
Date getExpiration();
String getId();
Date getIssuedAt();
String getIssuer();
Date getNotBefore();
String getSubject();
Claims setAudience(String str);
Claims setExpiration(Date date);
Claims setId(String str);
Claims setIssuedAt(Date date);
Claims setIssuer(String str);
Claims setNotBefore(Date date);
Claims setSubject(String str);
}
|
[
"josemmoya@outlook.com"
] |
josemmoya@outlook.com
|
18af253bfceff1f434e0fff6fd8143d2ce6c8507
|
23a96a03e550ee22a14b8fe9ed2ce44b6341de18
|
/examples/invoice.j/src/main/java/clarion/Toolbarformvcrclass.java
|
897e9659aee28b3ae2e67ab20ec988d99b0327b5
|
[] |
no_license
|
polarisltd/jClarion
|
29782a3ed0a144943c6d99dd81f6c16ef0a504d8
|
37e57590cb9cc41448fdd09fda91c9094b0dd057
|
refs/heads/master
| 2020-12-31T07:33:15.586952
| 2016-04-28T13:51:58
| 2016-04-28T13:55:40
| 57,305,055
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,732
|
java
|
package clarion;
import clarion.Abtoolba;
import clarion.Formvcrclass;
import clarion.Toolbartarget;
import clarion.Windowmanager;
import clarion.equates.Constants;
import clarion.equates.Event;
import clarion.equates.Prop;
import clarion.equates.Toolbar;
import org.jclarion.clarion.Clarion;
import org.jclarion.clarion.ClarionNumber;
import org.jclarion.clarion.runtime.CWin;
public class Toolbarformvcrclass extends Toolbartarget
{
public Formvcrclass formVCR;
public Toolbarformvcrclass()
{
formVCR=null;
}
public void displayButtons()
{
if (this.formVCR.getAction().equals(Constants.INSERTRECORD)) {
CWin.enable(Toolbar.HISTORY);
}
else {
CWin.disable(Toolbar.HISTORY);
}
Clarion.getControl(Toolbar.BOTTOM).setProperty(Prop.DISABLE,this.formVCR.getActionAllowed(Clarion.newNumber(Event.SCROLLBOTTOM),Clarion.newNumber(0)).intValue()==1 ?Constants.FALSE:Constants.TRUE);
Clarion.getControl(Toolbar.TOP).setProperty(Prop.DISABLE,this.formVCR.getActionAllowed(Clarion.newNumber(Event.SCROLLTOP),Clarion.newNumber(0)).intValue()==1 ?Constants.FALSE:Constants.TRUE);
Clarion.getControl(Toolbar.PAGEDOWN).setProperty(Prop.DISABLE,this.formVCR.getActionAllowed(Clarion.newNumber(Event.PAGEDOWN),Clarion.newNumber(0)).intValue()==1 ?Constants.FALSE:Constants.TRUE);
Clarion.getControl(Toolbar.PAGEUP).setProperty(Prop.DISABLE,this.formVCR.getActionAllowed(Clarion.newNumber(Event.PAGEUP),Clarion.newNumber(0)).intValue()==1 ?Constants.FALSE:Constants.TRUE);
Clarion.getControl(Toolbar.DOWN).setProperty(Prop.DISABLE,this.formVCR.getActionAllowed(Clarion.newNumber(Event.SCROLLDOWN),Clarion.newNumber(0)).intValue()==1 ?Constants.FALSE:Constants.TRUE);
Clarion.getControl(Toolbar.UP).setProperty(Prop.DISABLE,this.formVCR.getActionAllowed(Clarion.newNumber(Event.SCROLLUP),Clarion.newNumber(0)).intValue()==1 ?Constants.FALSE:Constants.TRUE);
CWin.disable(Toolbar.LOCATE);
super.displayButtons();
}
public void takeToolbar()
{
Abtoolba.setTips(Abtoolba.updateVCRTips.getString());
this.displayButtons();
}
public void takeEvent(Windowmanager p1)
{
takeEvent((ClarionNumber)null,p1);
}
public void takeEvent(ClarionNumber vcr,Windowmanager wm)
{
{
int case_1=CWin.accepted();
boolean case_1_break=false;
if (case_1==Toolbar.HELP) {
CWin.pressKey(Constants.F1KEY);
case_1_break=true;
}
if (!case_1_break && case_1==Toolbar.INSERT) {
CWin.post(Event.ACCEPTED,this.insertButton.intValue());
case_1_break=true;
}
if (!case_1_break && case_1==Toolbar.CHANGE) {
CWin.post(Event.ACCEPTED,this.changeButton.intValue());
case_1_break=true;
}
if (!case_1_break && case_1==Toolbar.DELETE) {
CWin.post(Event.ACCEPTED,this.deleteButton.intValue());
case_1_break=true;
}
if (!case_1_break && case_1==Toolbar.SELECT) {
CWin.post(Event.ACCEPTED,this.selectButton.intValue());
case_1_break=true;
}
}
{
int execute_1=CWin.accepted()-Toolbar.BOTTOM+1;
if (execute_1==1) {
CWin.post(Event.SCROLLBOTTOM,this.control.intValue());
}
if (execute_1==2) {
CWin.post(Event.SCROLLTOP,this.control.intValue());
}
if (execute_1==3) {
CWin.post(Event.PAGEDOWN,this.control.intValue());
}
if (execute_1==4) {
CWin.post(Event.PAGEUP,this.control.intValue());
}
if (execute_1==5) {
CWin.post(Event.SCROLLDOWN,this.control.intValue());
}
if (execute_1==6) {
CWin.post(Event.SCROLLUP,this.control.intValue());
}
if (execute_1==7) {
CWin.post(Event.LOCATE,this.control.intValue());
}
if (execute_1<1 || execute_1>7) {
super.takeEvent(null,wm);
}
}
}
public ClarionNumber tryTakeToolbar()
{
this.takeToolbar();
return Clarion.newNumber(1);
}
}
|
[
"polarisltd@gmail.com"
] |
polarisltd@gmail.com
|
b49b7b0a7a177aea5407bd5b5808dfccf5ae0572
|
147cec9d3d3a7842d7d747a79af5ff0e606a526a
|
/net/minecraft/inventory/SlotMerchantResult.java
|
49101a18ed2c57f7b868837e20c7c31bbc663f06
|
[] |
no_license
|
LXisCool1337/Async-Src
|
3f365c69a12ef61d1192d5a276473106c4c4b067
|
77ac70ec28e8d2933ea5a554c026c59023ec630d
|
refs/heads/main
| 2023-09-02T20:59:38.814117
| 2021-11-16T19:19:08
| 2021-11-16T19:19:08
| 428,784,004
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,423
|
java
|
package net.minecraft.inventory;
import net.minecraft.entity.IMerchant;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.StatList;
import net.minecraft.village.MerchantRecipe;
public class SlotMerchantResult extends Slot
{
private final InventoryMerchant theMerchantInventory;
private EntityPlayer thePlayer;
private int field_75231_g;
private final IMerchant theMerchant;
public SlotMerchantResult(EntityPlayer player, IMerchant merchant, InventoryMerchant merchantInventory, int slotIndex, int xPosition, int yPosition)
{
super(merchantInventory, slotIndex, xPosition, yPosition);
this.thePlayer = player;
this.theMerchant = merchant;
this.theMerchantInventory = merchantInventory;
}
public boolean isItemValid(ItemStack stack)
{
return false;
}
public ItemStack decrStackSize(int amount)
{
if (this.getHasStack())
{
this.field_75231_g += Math.min(amount, this.getStack().stackSize);
}
return super.decrStackSize(amount);
}
protected void onCrafting(ItemStack stack, int amount)
{
this.field_75231_g += amount;
this.onCrafting(stack);
}
protected void onCrafting(ItemStack stack)
{
stack.onCrafting(this.thePlayer.worldObj, this.thePlayer, this.field_75231_g);
this.field_75231_g = 0;
}
public void onPickupFromSlot(EntityPlayer playerIn, ItemStack stack)
{
this.onCrafting(stack);
MerchantRecipe merchantrecipe = this.theMerchantInventory.getCurrentRecipe();
if (merchantrecipe != null)
{
ItemStack itemstack = this.theMerchantInventory.getStackInSlot(0);
ItemStack itemstack1 = this.theMerchantInventory.getStackInSlot(1);
if (this.doTrade(merchantrecipe, itemstack, itemstack1) || this.doTrade(merchantrecipe, itemstack1, itemstack))
{
this.theMerchant.useRecipe(merchantrecipe);
playerIn.triggerAchievement(StatList.timesTradedWithVillagerStat);
if (itemstack != null && itemstack.stackSize <= 0)
{
itemstack = null;
}
if (itemstack1 != null && itemstack1.stackSize <= 0)
{
itemstack1 = null;
}
this.theMerchantInventory.setInventorySlotContents(0, itemstack);
this.theMerchantInventory.setInventorySlotContents(1, itemstack1);
}
}
}
private boolean doTrade(MerchantRecipe trade, ItemStack firstItem, ItemStack secondItem)
{
ItemStack itemstack = trade.getItemToBuy();
ItemStack itemstack1 = trade.getSecondItemToBuy();
if (firstItem != null && firstItem.getItem() == itemstack.getItem())
{
if (itemstack1 != null && secondItem != null && itemstack1.getItem() == secondItem.getItem())
{
firstItem.stackSize -= itemstack.stackSize;
secondItem.stackSize -= itemstack1.stackSize;
return true;
}
if (itemstack1 == null && secondItem == null)
{
firstItem.stackSize -= itemstack.stackSize;
return true;
}
}
return false;
}
}
|
[
"77858604+LXisCool1337@users.noreply.github.com"
] |
77858604+LXisCool1337@users.noreply.github.com
|
e2a18833a7e91363990121c4d1803b15b9437261
|
d2f810efbf145ea3e8b5925a7b5e90419477b586
|
/src/net/minecraft/client/renderer/entity/RenderSquid.java
|
06ea5e3c2eec214d1ebe2a86fe9d7ebf3c058392
|
[] |
no_license
|
nullexthecodegod/Stealth
|
7505536594fda0a577a3406b3ed89b75857dc2be
|
334edcd2fc0f2fbda88b8845adb9c1a2f17023dd
|
refs/heads/master
| 2021-05-14T18:15:11.746357
| 2018-01-11T04:32:51
| 2018-01-11T04:32:51
| 116,067,644
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,617
|
java
|
package net.minecraft.client.renderer.entity;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.passive.EntitySquid;
import net.minecraft.util.ResourceLocation;
public class RenderSquid extends RenderLiving
{
private static final ResourceLocation squidTextures = new ResourceLocation("textures/entity/squid.png");
public RenderSquid(RenderManager renderManagerIn, ModelBase modelBaseIn, float shadowSizeIn)
{
super(renderManagerIn, modelBaseIn, shadowSizeIn);
}
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(EntitySquid entity)
{
return squidTextures;
}
protected void rotateCorpse(EntitySquid bat, float p_77043_2_, float p_77043_3_, float partialTicks)
{
float var5 = bat.prevSquidPitch + (bat.squidPitch - bat.prevSquidPitch) * partialTicks;
float var6 = bat.prevSquidYaw + (bat.squidYaw - bat.prevSquidYaw) * partialTicks;
GlStateManager.translate(0.0F, 0.5F, 0.0F);
GlStateManager.rotate(180.0F - p_77043_3_, 0.0F, 1.0F, 0.0F);
GlStateManager.rotate(var5, 1.0F, 0.0F, 0.0F);
GlStateManager.rotate(var6, 0.0F, 1.0F, 0.0F);
GlStateManager.translate(0.0F, -1.2F, 0.0F);
}
/**
* Defines what float the third param in setRotationAngles of ModelBase is
*/
protected float handleRotationFloat(EntitySquid livingBase, float partialTicks)
{
return livingBase.lastTentacleAngle + (livingBase.tentacleAngle - livingBase.lastTentacleAngle) * partialTicks;
}
/**
* Defines what float the third param in setRotationAngles of ModelBase is
*/
protected float handleRotationFloat(EntityLivingBase livingBase, float partialTicks)
{
return this.handleRotationFloat((EntitySquid)livingBase, partialTicks);
}
protected void rotateCorpse(EntityLivingBase bat, float p_77043_2_, float p_77043_3_, float partialTicks)
{
this.rotateCorpse((EntitySquid)bat, p_77043_2_, p_77043_3_, partialTicks);
}
/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(Entity entity)
{
return this.getEntityTexture((EntitySquid)entity);
}
}
|
[
"NullEX@Offset#6604"
] |
NullEX@Offset#6604
|
9997cb557761e4d08c185de1559cca8a6b4853e1
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/elastic--elasticsearch/0fa5b87fddc10ce487299c10fd3a833962058959/before/QuerySearchResult.java
|
9340e7b963aa4909cfe113512f1ef25d04295b30
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,317
|
java
|
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch 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.elasticsearch.search.query;
import org.apache.lucene.search.TopDocs;
import org.elasticsearch.Version;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.search.SearchShardTarget;
import org.elasticsearch.search.aggregations.Aggregations;
import org.elasticsearch.search.aggregations.InternalAggregations;
import org.elasticsearch.search.suggest.Suggest;
import java.io.IOException;
import static org.elasticsearch.common.lucene.Lucene.readTopDocs;
import static org.elasticsearch.common.lucene.Lucene.writeTopDocs;
/**
*
*/
public class QuerySearchResult extends QuerySearchResultProvider {
private long id;
private SearchShardTarget shardTarget;
private int from;
private int size;
private TopDocs topDocs;
private InternalAggregations aggregations;
private Suggest suggest;
private boolean searchTimedOut;
private Boolean terminatedEarly = null;
public QuerySearchResult() {
}
public QuerySearchResult(long id, SearchShardTarget shardTarget) {
this.id = id;
this.shardTarget = shardTarget;
}
@Override
public boolean includeFetch() {
return false;
}
@Override
public QuerySearchResult queryResult() {
return this;
}
public long id() {
return this.id;
}
public SearchShardTarget shardTarget() {
return shardTarget;
}
@Override
public void shardTarget(SearchShardTarget shardTarget) {
this.shardTarget = shardTarget;
}
public void searchTimedOut(boolean searchTimedOut) {
this.searchTimedOut = searchTimedOut;
}
public boolean searchTimedOut() {
return searchTimedOut;
}
public void terminatedEarly(boolean terminatedEarly) {
this.terminatedEarly = terminatedEarly;
}
public Boolean terminatedEarly() {
return this.terminatedEarly;
}
public TopDocs topDocs() {
return topDocs;
}
public void topDocs(TopDocs topDocs) {
this.topDocs = topDocs;
}
public Aggregations aggregations() {
return aggregations;
}
public void aggregations(InternalAggregations aggregations) {
this.aggregations = aggregations;
}
public Suggest suggest() {
return suggest;
}
public void suggest(Suggest suggest) {
this.suggest = suggest;
}
public int from() {
return from;
}
public QuerySearchResult from(int from) {
this.from = from;
return this;
}
public int size() {
return size;
}
public QuerySearchResult size(int size) {
this.size = size;
return this;
}
public static QuerySearchResult readQuerySearchResult(StreamInput in) throws IOException {
QuerySearchResult result = new QuerySearchResult();
result.readFrom(in);
return result;
}
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
long id = in.readLong();
readFromWithId(id, in);
}
public void readFromWithId(long id, StreamInput in) throws IOException {
this.id = id;
// shardTarget = readSearchShardTarget(in);
from = in.readVInt();
size = in.readVInt();
topDocs = readTopDocs(in);
if (in.readBoolean()) {
aggregations = InternalAggregations.readAggregations(in);
}
if (in.readBoolean()) {
suggest = Suggest.readSuggest(Suggest.Fields.SUGGEST, in);
}
searchTimedOut = in.readBoolean();
terminatedEarly = in.readOptionalBoolean();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeLong(id);
writeToNoId(out);
}
public void writeToNoId(StreamOutput out) throws IOException {
// shardTarget.writeTo(out);
out.writeVInt(from);
out.writeVInt(size);
writeTopDocs(out, topDocs, 0);
if (aggregations == null) {
out.writeBoolean(false);
} else {
out.writeBoolean(true);
aggregations.writeTo(out);
}
if (suggest == null) {
out.writeBoolean(false);
} else {
out.writeBoolean(true);
suggest.writeTo(out);
}
out.writeBoolean(searchTimedOut);
out.writeOptionalBoolean(terminatedEarly);
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
1fc21d0fd4e6a0304aec7ba50c455816c9422c50
|
04406cd4df93f7b1e19953e359b17cd49e0bfd96
|
/sources/com.superking.ludo.star/java/cz/msebera/android/httpclient/impl/DefaultHttpRequestFactory.java
|
6426f610b56de36a2e4f47faf9d42f8956ecfca5
|
[] |
no_license
|
lancelot1337/Udo
|
97c2f2249518460960b6723940615a9665d77f43
|
2e42f9e37bc7cc47cdb95aaef1a678d20dc024b9
|
refs/heads/master
| 2021-01-25T12:01:26.726595
| 2018-03-01T15:22:22
| 2018-03-01T15:22:22
| 123,451,782
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,003
|
java
|
package cz.msebera.android.httpclient.impl;
import cz.msebera.android.httpclient.HttpRequest;
import cz.msebera.android.httpclient.HttpRequestFactory;
import cz.msebera.android.httpclient.MethodNotSupportedException;
import cz.msebera.android.httpclient.RequestLine;
import cz.msebera.android.httpclient.annotation.Immutable;
import cz.msebera.android.httpclient.client.methods.HttpDelete;
import cz.msebera.android.httpclient.client.methods.HttpGet;
import cz.msebera.android.httpclient.client.methods.HttpHead;
import cz.msebera.android.httpclient.client.methods.HttpOptions;
import cz.msebera.android.httpclient.client.methods.HttpPost;
import cz.msebera.android.httpclient.client.methods.HttpPut;
import cz.msebera.android.httpclient.client.methods.HttpTrace;
import cz.msebera.android.httpclient.message.BasicHttpEntityEnclosingRequest;
import cz.msebera.android.httpclient.message.BasicHttpRequest;
import cz.msebera.android.httpclient.util.Args;
@Immutable
public class DefaultHttpRequestFactory implements HttpRequestFactory {
public static final DefaultHttpRequestFactory INSTANCE = new DefaultHttpRequestFactory();
private static final String[] RFC2616_COMMON_METHODS = new String[]{HttpGet.METHOD_NAME};
private static final String[] RFC2616_ENTITY_ENC_METHODS = new String[]{HttpPost.METHOD_NAME, HttpPut.METHOD_NAME};
private static final String[] RFC2616_SPECIAL_METHODS = new String[]{HttpHead.METHOD_NAME, HttpOptions.METHOD_NAME, HttpDelete.METHOD_NAME, HttpTrace.METHOD_NAME, "CONNECT"};
private static boolean isOneOf(String[] methods, String method) {
for (String method2 : methods) {
if (method2.equalsIgnoreCase(method)) {
return true;
}
}
return false;
}
public HttpRequest newHttpRequest(RequestLine requestline) throws MethodNotSupportedException {
Args.notNull(requestline, "Request line");
String method = requestline.getMethod();
if (isOneOf(RFC2616_COMMON_METHODS, method)) {
return new BasicHttpRequest(requestline);
}
if (isOneOf(RFC2616_ENTITY_ENC_METHODS, method)) {
return new BasicHttpEntityEnclosingRequest(requestline);
}
if (isOneOf(RFC2616_SPECIAL_METHODS, method)) {
return new BasicHttpRequest(requestline);
}
throw new MethodNotSupportedException(method + " method not supported");
}
public HttpRequest newHttpRequest(String method, String uri) throws MethodNotSupportedException {
if (isOneOf(RFC2616_COMMON_METHODS, method)) {
return new BasicHttpRequest(method, uri);
}
if (isOneOf(RFC2616_ENTITY_ENC_METHODS, method)) {
return new BasicHttpEntityEnclosingRequest(method, uri);
}
if (isOneOf(RFC2616_SPECIAL_METHODS, method)) {
return new BasicHttpRequest(method, uri);
}
throw new MethodNotSupportedException(method + " method not supported");
}
}
|
[
"sudhanshusah2001@gmail.com"
] |
sudhanshusah2001@gmail.com
|
56b211b5524705fc478d9c17362114ab723ca92c
|
441fa6c927cbb51cfccfc412d9382268f5df78d0
|
/spring-rest-jpa/src/main/java/com/example/demo/repository/AccountRepository.java
|
28ccd82beb4f8e1fee0cc714005a9da3b064331d
|
[] |
no_license
|
Anusha-A/Spring-All-projects
|
dbdd1f891d16e8d4e21856a1f384a796ffc5f1f1
|
c35f1f6e55deeff4b57b76c9afb5d7af9251d14c
|
refs/heads/master
| 2022-07-16T06:05:16.118904
| 2019-12-15T02:25:46
| 2019-12-15T02:25:46
| 228,117,890
| 0
| 0
| null | 2022-06-21T02:26:58
| 2019-12-15T02:27:47
|
CSS
|
UTF-8
|
Java
| false
| false
| 280
|
java
|
package com.example.demo.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.example.demo.entity.Account;
@Repository
public interface AccountRepository extends JpaRepository<Account, Long>{
}
|
[
"b8ibmjava29@iiht.tech"
] |
b8ibmjava29@iiht.tech
|
27e41f2a7d7d784eeb42bbb8a763952e4385fb0f
|
a2aabe104ae4b67ab081429fcacce7ba87e8f24b
|
/src/main/java/hok/chompzki/biocristals/blocks/BlockWeakCristal.java
|
8b72f0affa93a8576cb9aa64c52bd09aa724994b
|
[] |
no_license
|
Piron1991/BioCristals
|
b2f8dca0e4e0fb0dd73469548f8bd7a5819a11bf
|
f5ec3f2aa9d5e6ad3398e89debc385aaebc486df
|
refs/heads/master
| 2021-01-21T09:10:57.978652
| 2015-07-06T18:22:07
| 2015-07-06T18:22:07
| 38,337,935
| 0
| 0
| null | 2015-06-30T23:15:13
| 2015-06-30T23:15:13
| null |
UTF-8
|
Java
| false
| false
| 3,990
|
java
|
package hok.chompzki.biocristals.blocks;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import hok.chompzki.biocristals.BioCristalsMod;
import hok.chompzki.biocristals.api.BioHelper;
import hok.chompzki.biocristals.api.IGrowthCristal;
import hok.chompzki.biocristals.registrys.ConfigRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class BlockWeakCristal extends Block implements IGrowthCristal{
//Plants: Wheat, Carrots, Suger Cane, Potato, Melon, Pumpkin
@SideOnly(Side.CLIENT)
private IIcon[] field_149867_a;
public final String name;
private final int maxMeta;
private final ItemStack[] drops;
public BlockWeakCristal(String name, int maxMeta, ItemStack... drops) {
super(Material.iron);
this.name = name;
this.maxMeta = maxMeta;
setBlockName(BioCristalsMod.MODID + "_" + name);
setCreativeTab(BioCristalsMod.creativeTab);
setBlockTextureName(BioCristalsMod.MODID + ":" + name);
this.setTickRandomly(true);
this.setStepSound(soundTypeGrass);
this.drops = drops;
}
public void updateTick(World world, int x, int y, int z, Random rand)
{
super.updateTick(world, x, y, z, rand);
if (rand.nextInt(ConfigRegistry.weakCristalGrowthChance) == 0)
{
this.grow(world, x, y, z);
}
}
public void func_149863_m(World p_149863_1_, int p_149863_2_, int p_149863_3_, int p_149863_4_)
{
int l = p_149863_1_.getBlockMetadata(p_149863_2_, p_149863_3_, p_149863_4_) + MathHelper.getRandomIntegerInRange(p_149863_1_.rand, 2, 5);
if (l > maxMeta)
{
l = maxMeta;
}
p_149863_1_.setBlockMetadataWithNotify(p_149863_2_, p_149863_3_, p_149863_4_, l, 2);
}
@SideOnly(Side.CLIENT)
public IIcon getIcon(int p_149691_1_, int p_149691_2_)
{
if (p_149691_2_ < 0 || p_149691_2_ > maxMeta)
{
p_149691_2_ = maxMeta;
}
return this.field_149867_a[p_149691_2_];
}
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister p_149651_1_)
{
this.field_149867_a = new IIcon[maxMeta+1];
for (int i = 0; i < this.field_149867_a.length; ++i)
{
this.field_149867_a[i] = p_149651_1_.registerIcon(this.getTextureName() + "_" + i);
}
}
@Override
public boolean isMature(World world, EntityPlayer player, ItemStack stack,
int x, int y, int z) {
return world.getBlockMetadata(x, y, z) == maxMeta;
}
@Override
public void harvest(World world, EntityPlayer player, ItemStack stack,
int x, int y, int z) {
List<ItemStack> list = new ArrayList<ItemStack>();
this.harvest(world, player, stack, x, y, z, list);
BioHelper.dropItems(world, list, x, y+1, z);
}
@Override
public void harvest(World world, EntityPlayer player, ItemStack stack,
int x, int y, int z, List<ItemStack> list) {
for(ItemStack d : drops)
list.add(d.copy());
int meta = 0;
world.setBlockMetadataWithNotify(x, y, z, meta, 2);
}
@Override
public void grow(World world, int x, int y, int z) {
int l = world.getBlockMetadata(x, y, z);
if (l < maxMeta)
{
++l;
world.setBlockMetadataWithNotify(x, y, z, l, 2);
}
}
}
|
[
"Jonathan.Crusoe@Gmail.com"
] |
Jonathan.Crusoe@Gmail.com
|
e31b7b5e4b7da5c5f6e91acf41d1077b82fd4fdd
|
83d781a9c2ba33fde6df0c6adc3a434afa1a7f82
|
/Wallet/Wallet.ServiceInterface/src/main/java/com/servicelive/wallet/serviceinterface/requestbuilder/ABaseRequestBuilder.java
|
0c631b24605dd4df537356c20519f47163dfffd9
|
[] |
no_license
|
ssriha0/sl-b2b-platform
|
71ab8ef1f0ccb0a7ad58b18f28a2bf6d5737fcb6
|
5b4fcafa9edfe4d35c2dcf1659ac30ef58d607a2
|
refs/heads/master
| 2023-01-06T18:32:24.623256
| 2020-11-05T12:23:26
| 2020-11-05T12:23:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,084
|
java
|
package com.servicelive.wallet.serviceinterface.requestbuilder;
import com.servicelive.common.vo.ABaseVO;
// TODO: Auto-generated Javadoc
/**
* Class ABaseRequestBuilder.
*/
public abstract class ABaseRequestBuilder {
/**
* setRequest.
*
* @param request
* @param fundingTypeId
* @param serviceOrderId
*
* @return void
*/
protected void setRequest(ABaseVO request, Long fundingTypeId, String serviceOrderId) {
setRequest(request, fundingTypeId, serviceOrderId, null, null, null);
}
/**
* setRequest.
*
* @param request
* @param fundingTypeId
* @param serviceOrderId
* @param buyerId
* @param providerId
* @param userName
*
* @return void
*/
protected void setRequest(ABaseVO request, Long fundingTypeId, String serviceOrderId, Long buyerId, Long providerId, String userName) {
request.setFundingTypeId(fundingTypeId);
request.setServiceOrderId(serviceOrderId);
request.setBuyerId(buyerId);
request.setProviderId(providerId);
request.setUserName(userName);
}
}
|
[
"Kunal.Pise@transformco.com"
] |
Kunal.Pise@transformco.com
|
475095d03a123ec5453100b770e5ec4b01098734
|
ef40a58074fa9e8074c6a71a44e28fe5eca26d25
|
/upms/upms-service-biz/src/main/java/com/bluetop/upms/biz/utils/JWTUtil.java
|
59e44a83311328f178066ca68d98339ecf547dc1
|
[] |
no_license
|
thestar111/bluetop
|
58311c6e6cf6f4d47df351f55cb2005a0a099085
|
6a7773666392db864a2f6cff0ae15669cc03806a
|
refs/heads/master
| 2023-06-06T10:06:15.253056
| 2021-07-01T09:00:46
| 2021-07-01T09:00:46
| 323,187,664
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,000
|
java
|
package com.bluetop.upms.biz.utils;
import com.auth0.jwt.JWT;
import com.auth0.jwt.JWTVerifier;
import com.auth0.jwt.algorithms.Algorithm;
import com.auth0.jwt.exceptions.JWTDecodeException;
import com.auth0.jwt.interfaces.DecodedJWT;
import com.bluetop.upms.biz.cons.Config;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.exception.ExceptionUtils;
import java.io.UnsupportedEncodingException;
import java.util.Date;
/**
* <JWT工具类>
*
* @author zhouping
* @version 1.0
* @date 2020/12/28 2:37 上午
* @see [相关类/方法]
* @since JDK 1.8
*/
@Slf4j
public final class JWTUtil {
/**
* 校验token是否正确
*
* @param token 密钥
* @param username 用户名
* @param secret 用户的密码
* @return 是否正确
*/
public static void verify(String token, String username, String secret) throws Exception {
Algorithm algorithm = Algorithm.HMAC256(secret);
JWTVerifier verifier = JWT.require(algorithm)
.withClaim(Config.JWT_CLIENT_USERNAME, username)
.withIssuer(Config.JWT_IUSER)
.build();
verifier.verify(token);
}
/**
* 获得token中自定义用户信息
*
* @param token
* @returntoken中包含的用户名
*/
public static String getUsername(String token) {
try {
DecodedJWT jwt = JWT.decode(token);
return jwt.getClaim(Config.JWT_CLIENT_USERNAME).asString();
} catch (JWTDecodeException e) {
return null;
}
}
/**
* 获取token中的项目key
*
* @param token
* @return
*/
public static String getApplicationKey(String token) {
try {
DecodedJWT jwt = JWT.decode(token);
return jwt.getClaim(Config.JWT_APPLICATION_KEY).asString();
} catch (JWTDecodeException e) {
log.error("[JWTUtils] get application key failed. {}", ExceptionUtils.getRootCauseMessage(e));
return null;
}
}
/**
* 生成签名
*
* @param username 用户名
* @param secret 用户的密码
* @param activeTime 有效时间,毫秒
* @param applicationKey 项目key
* @return 加密的token
*/
public static String sign(String username, String secret, String applicationKey, long activeTime) throws UnsupportedEncodingException {
long currentTimes = System.currentTimeMillis();
Date signdate = new Date(currentTimes);
Date expireTime = new Date(currentTimes + activeTime);
Algorithm algorithm = Algorithm.HMAC256(secret);
return JWT.create()
.withClaim(Config.JWT_CLIENT_USERNAME, username)
.withClaim(Config.JWT_APPLICATION_KEY, applicationKey)
.withIssuer(Config.JWT_IUSER)
.withExpiresAt(expireTime)
.withIssuedAt(signdate)
.sign(algorithm);
}
}
|
[
"zhouping19911013@163.com"
] |
zhouping19911013@163.com
|
7bf7a16f4c89fd219a42a615c4f8591d2cbebbc4
|
6ef4869c6bc2ce2e77b422242e347819f6a5f665
|
/devices/google/Pixel 2/29/QPP6.190730.005/src/framework/android/telephony/_$$Lambda$PhoneStateListener$IPhoneStateListenerStub$YY3srkIkMm8vTSFJZHoiKzUUrGs.java
|
587444bbbadda4ff28b227c7ce7968fe05e186f4
|
[] |
no_license
|
hacking-android/frameworks
|
40e40396bb2edacccabf8a920fa5722b021fb060
|
943f0b4d46f72532a419fb6171e40d1c93984c8e
|
refs/heads/master
| 2020-07-03T19:32:28.876703
| 2019-08-13T03:31:06
| 2019-08-13T03:31:06
| 202,017,534
| 2
| 0
| null | 2019-08-13T03:33:19
| 2019-08-12T22:19:30
|
Java
|
UTF-8
|
Java
| false
| false
| 1,011
|
java
|
/*
* Decompiled with CFR 0.145.
*/
package android.telephony;
import android.telephony.PhoneStateListener;
import com.android.internal.util.FunctionalUtils;
public final class _$$Lambda$PhoneStateListener$IPhoneStateListenerStub$YY3srkIkMm8vTSFJZHoiKzUUrGs
implements FunctionalUtils.ThrowingRunnable {
private final /* synthetic */ PhoneStateListener.IPhoneStateListenerStub f$0;
private final /* synthetic */ PhoneStateListener f$1;
private final /* synthetic */ boolean f$2;
public /* synthetic */ _$$Lambda$PhoneStateListener$IPhoneStateListenerStub$YY3srkIkMm8vTSFJZHoiKzUUrGs(PhoneStateListener.IPhoneStateListenerStub iPhoneStateListenerStub, PhoneStateListener phoneStateListener, boolean bl) {
this.f$0 = iPhoneStateListenerStub;
this.f$1 = phoneStateListener;
this.f$2 = bl;
}
@Override
public final void runOrThrow() {
this.f$0.lambda$onCarrierNetworkChange$41$PhoneStateListener$IPhoneStateListenerStub(this.f$1, this.f$2);
}
}
|
[
"me@paulo.costa.nom.br"
] |
me@paulo.costa.nom.br
|
603a2b0e0c1dacb11f70ad38ae48d4fb14115bd8
|
f551156ea724c509395e20884df570461381653a
|
/src/main/java/com/jfly/activiti/service/ActTaskService.java
|
aa47ba2b3bdf3a6b50efb4920f21a421d7e028bb
|
[] |
no_license
|
surick/jfly
|
b212999aada9a6eac2954919b1b0597364eaa199
|
a3d23a57c111f1a94bf4e71c36979ab1b35b0fdf
|
refs/heads/master
| 2021-01-25T13:35:43.132098
| 2019-03-31T14:19:06
| 2019-03-31T14:19:06
| 123,590,423
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 678
|
java
|
package com.jfly.activiti.service;
import com.jfly.activiti.domain.ActivitiDO;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
/**
*/
public interface ActTaskService {
List<ActivitiDO> listTodo(ActivitiDO act);
void complete(String taskId, String procInsId, String comment, String title, Map<String, Object> vars);
void complete(String taskId,Map<String,Object> vars);
String startProcess(String procDefKey, String businessTable, String businessId, String title, Map<String, Object> vars);
String getFormKey(String procDefId, String taskDefKey);
InputStream tracePhoto(String processDefinitionId, String executionId);
}
|
[
"jk103@qq.com"
] |
jk103@qq.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.