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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cfe31358bcba9e6765d352f2f916debd061e5a8f
|
c20c3cb1699f726fc285a6917d0ee673915f5b06
|
/meep/Meep/src/com/oregonscientific/meep/notification/NotificationDatabaseHelper.java
|
39c510dc04841c86d4dc4e4d797fb6d1672db6b8
|
[
"Apache-2.0"
] |
permissive
|
zoozooll/MyExercise
|
35a18c0ead552d5be45f627066a5066f6cc8c99b
|
1be14e0252babb28e32951fa1e35fc867a6ac070
|
refs/heads/master
| 2023-04-04T04:24:14.275531
| 2021-04-18T15:01:03
| 2021-04-18T15:01:03
| 108,665,215
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,053
|
java
|
/**
* Copyright (C) 2013 IDT International Ltd.
*/
package com.oregonscientific.meep.notification;
import java.sql.SQLException;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper;
import com.j256.ormlite.support.ConnectionSource;
import com.j256.ormlite.table.TableUtils;
/**
* Database helper class used to manage the creation and upgrading of
* notification database. This class also usually provides the DAOs used by the
* other classes.
*/
public class NotificationDatabaseHelper extends OrmLiteSqliteOpenHelper {
private final String TAG = getClass().getName();
// name of the database file
private static final String DATABASE_NAME = "notification.db";
// any time you make changes to your database objects, you may have to
// increase the database version
private static final int DATABASE_VERSION = 1;
public NotificationDatabaseHelper(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);
}
/**
* This is called when the database is first created. Usually you should call
* createTable statements here to create the tables that will store your data.
*/
@Override
public void onCreate(SQLiteDatabase db, ConnectionSource connectionSource) {
try {
Log.i(TAG, "Creating database tables and insert data...");
TableUtils.createTable(connectionSource, $User.class);
TableUtils.createTable(connectionSource, $Notification.class);
} catch (SQLException e) {
Log.e(TAG, "Cannot create database: ", e);
throw new RuntimeException(e);
}
}
/**
* This is called when your application is upgraded and it has a higher
* version number. This allows you to adjust the various data to match the new
* version number.
*/
@Override
public void onUpgrade(
SQLiteDatabase db,
ConnectionSource connectionSource,
int oldVersion,
int newVersion) {
// TODO: Alter appropriate database tables
Log.i(TAG, "Upgrading database tables...");
}
}
|
[
"kangkang365@gmail.com"
] |
kangkang365@gmail.com
|
c91e55ec879eb4a8ed8f1b95f64236869df97c21
|
a4cb372ced240bf1cf0a9d123bdd4a805ff05df6
|
/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/DeferredLogsTests.java
|
1727c4f36bc610d5380bedb6fc2894f0ed11ec91
|
[] |
no_license
|
ZhaoBinxian/spring-boot-maven-ben
|
c7ea6a431c3206959009ff5344547436e98d75ca
|
ebd43548bae1e35fff174c316ad154cd0e5defb3
|
refs/heads/master
| 2023-07-18T12:53:49.028864
| 2021-09-07T04:55:54
| 2021-09-07T04:55:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,945
|
java
|
/*
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://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.springframework.boot.logging;
import org.apache.commons.logging.Log;
import org.junit.jupiter.api.Test;
import org.mockito.InOrder;
import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.verifyNoMoreInteractions;
/**
* Tests for {@link DeferredLogs}.
*
* @author Phillip Webb
*/
class DeferredLogsTests {
@Test
void switchOverAllSwitchesLoggersWithOrderedOutput() {
Log log1 = mock(Log.class);
Log log2 = mock(Log.class);
DeferredLogs loggers = new DeferredLogs();
Log dlog1 = loggers.getLog(log1);
Log dlog2 = loggers.getLog(log2);
dlog1.info("a");
dlog2.info("b");
dlog1.info("c");
dlog2.info("d");
verifyNoInteractions(log1, log2);
loggers.switchOverAll();
InOrder ordered = inOrder(log1, log2);
ordered.verify(log1).info("a", null);
ordered.verify(log2).info("b", null);
ordered.verify(log1).info("c", null);
ordered.verify(log2).info("d", null);
verifyNoMoreInteractions(log1, log2);
dlog1.info("e");
dlog2.info("f");
ordered.verify(log1).info("e", null);
ordered.verify(log2).info("f", null);
}
}
|
[
"zhaobinxian@greatyun.com"
] |
zhaobinxian@greatyun.com
|
27d04cc81b3180280343d7e9f36ad020bdbf75c5
|
a6e2cd9ea01bdc5cfe58acce25627786fdfe76e9
|
/src/main/java/com/alipay/api/response/KoubeiCateringOrderPayQueryResponse.java
|
5de3c1c291d53d79d420664eaff97fc28e38991f
|
[
"Apache-2.0"
] |
permissive
|
cc-shifo/alipay-sdk-java-all
|
38b23cf946b73768981fdeee792e3dae568da48c
|
938d6850e63160e867d35317a4a00ed7ba078257
|
refs/heads/master
| 2022-12-22T14:06:26.961978
| 2020-09-23T04:00:10
| 2020-09-23T04:00:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,248
|
java
|
package com.alipay.api.response;
import java.util.Date;
import java.util.List;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
import com.alipay.api.domain.PosDiscountDetail;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: koubei.catering.order.pay.query response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class KoubeiCateringOrderPayQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 5734229549111965842L;
/**
* 优惠明细列表
*/
@ApiListField("discount_details")
@ApiField("pos_discount_detail")
private List<PosDiscountDetail> discountDetails;
/**
* 外部支付订单号,唯一标识本次支付的requestID
*/
@ApiField("out_pay_no")
private String outPayNo;
/**
* 买家实付金额
*/
@ApiField("pay_amount")
private String payAmount;
/**
* 口碑内部支付订单号,和外部支付订单号一一映射
*/
@ApiField("pay_no")
private String payNo;
/**
* 买家交易支付成功时间
*/
@ApiField("pay_time")
private Date payTime;
/**
* 商家实收金额
*/
@ApiField("receipt_amount")
private String receiptAmount;
/**
* 支付结果,INIT-待支付,PROCESS-支付中,PAY-已支付,REFUND-已退款,CLOSE-已关闭
*/
@ApiField("status")
private String status;
/**
* 订单付款金额,以元为单位,精确到分
*/
@ApiField("total_amount")
private String totalAmount;
/**
* 支付宝交易号
*/
@ApiField("trade_no")
private String tradeNo;
/**
* 买家支付宝账号
*/
@ApiField("user_id")
private String userId;
public void setDiscountDetails(List<PosDiscountDetail> discountDetails) {
this.discountDetails = discountDetails;
}
public List<PosDiscountDetail> getDiscountDetails( ) {
return this.discountDetails;
}
public void setOutPayNo(String outPayNo) {
this.outPayNo = outPayNo;
}
public String getOutPayNo( ) {
return this.outPayNo;
}
public void setPayAmount(String payAmount) {
this.payAmount = payAmount;
}
public String getPayAmount( ) {
return this.payAmount;
}
public void setPayNo(String payNo) {
this.payNo = payNo;
}
public String getPayNo( ) {
return this.payNo;
}
public void setPayTime(Date payTime) {
this.payTime = payTime;
}
public Date getPayTime( ) {
return this.payTime;
}
public void setReceiptAmount(String receiptAmount) {
this.receiptAmount = receiptAmount;
}
public String getReceiptAmount( ) {
return this.receiptAmount;
}
public void setStatus(String status) {
this.status = status;
}
public String getStatus( ) {
return this.status;
}
public void setTotalAmount(String totalAmount) {
this.totalAmount = totalAmount;
}
public String getTotalAmount( ) {
return this.totalAmount;
}
public void setTradeNo(String tradeNo) {
this.tradeNo = tradeNo;
}
public String getTradeNo( ) {
return this.tradeNo;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getUserId( ) {
return this.userId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
61fda90be0d745ab8f3d569a4b4cd60717d48338
|
90577e7daee3183e57a14c43f0a0e26c6616c6a6
|
/com.cssrc.ibms.system/src/main/java/com/cssrc/ibms/system/model/SysFileType.java
|
55d26527aa0b2da173f4ca2d8179e9550c29333d
|
[] |
no_license
|
xeon-ye/8ddp
|
a0fec7e10182ab4728cafc3604b9d39cffe7687e
|
52c7440b471c6496f505e3ada0cf4fdeecce2815
|
refs/heads/master
| 2023-03-09T17:53:38.427613
| 2021-02-18T02:18:55
| 2021-02-18T02:18:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,013
|
java
|
package com.cssrc.ibms.system.model;
/**
* 文件类别记录表(分类与记录Id关联)
* @author YangBo
*
*/
public class SysFileType extends GlobalType{
/**
*
*/
private static final long serialVersionUID = 1L;
public SysFileType(){
}
public SysFileType(GlobalType globalType){
this.typeId = globalType.getTypeId();
this.typeName = globalType.getTypeName();
this.nodePath = globalType.getNodePath();
this.depth = globalType.getDepth();
this.parentId = globalType.getParentId();
this.nodeKey = globalType.getNodeKey();
this.catKey = globalType.getCatKey();
this.sn = globalType.getSn();
this.userId = globalType.getUserId();
this.depId = globalType.getDepId();
this.type = globalType.getType();
this.open = globalType.getOpen();
this.isParent = globalType.getIsParent();
this.isLeaf = globalType.getIsLeaf();
this.childNodes = globalType.getChildNodes();
this.nodeCode = globalType.getNodeCode();
this.nodeCodeType = globalType.getNodeCodeType();
}
}
|
[
"john_qzl@163.com"
] |
john_qzl@163.com
|
8c24c066229173f0628dd1d398917d8b78afc13b
|
3f72c63e10028edb9a5c9f09ab4fb281c2d1504b
|
/Medium/House Robber III.java
|
924423a9294fd27f7be349c37d92bfc2e170e488
|
[] |
no_license
|
varunu28/LeetCode-Java-Solutions
|
665be934e287c493d4401f04ac486903cd90cd5d
|
d9c6a40491a4fff7ce976d4252c0a15b30656e49
|
refs/heads/master
| 2023-08-31T07:02:21.176350
| 2023-08-30T15:02:04
| 2023-08-30T15:02:04
| 98,157,751
| 671
| 386
| null | 2023-01-07T16:51:44
| 2017-07-24T06:41:38
|
Java
|
UTF-8
|
Java
| false
| false
| 832
|
java
|
/**
* Definition for a binary tree node.
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode() {}
* TreeNode(int val) { this.val = val; }
* TreeNode(int val, TreeNode left, TreeNode right) {
* this.val = val;
* this.left = left;
* this.right = right;
* }
* }
*/
class Solution {
public int rob(TreeNode root) {
int[] ans = helper(root);
return Math.max(ans[0], ans[1]);
}
private int[] helper(TreeNode root) {
if (root == null) {
return new int[]{0, 0};
}
int[] left = helper(root.left);
int[] right = helper(root.right);
int robbed = root.val + left[1] + right[1];
int notRobbed = Math.max(left[0], left[1]) + Math.max(right[0], right[1]);
return new int[]{robbed, notRobbed};
}
}
|
[
"varun.u28@gmail.com"
] |
varun.u28@gmail.com
|
8b163e9f8c372bf93431822b035c88e21e871341
|
42687b13df351a38339e0bb0114b137037b38d7a
|
/cat/cars_source_from_JADX/sources/kotlin/UnsafeVariance.java
|
811b89723230713af9b392fcde99ae2af2ff25c2
|
[] |
no_license
|
Hong5489/FireShellCTF2020
|
3f3096f65b56e58346a14365c88d70b3a6676405
|
0722492979aeec697d8fb07fbb403eeb133fc79e
|
refs/heads/master
| 2021-04-16T08:04:34.640027
| 2020-03-23T05:19:48
| 2020-03-23T05:19:48
| 249,339,328
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 844
|
java
|
package kotlin;
import java.lang.annotation.Documented;
import java.lang.annotation.RetentionPolicy;
import kotlin.annotation.AnnotationRetention;
import kotlin.annotation.AnnotationTarget;
import kotlin.annotation.MustBeDocumented;
import kotlin.annotation.Retention;
import kotlin.annotation.Target;
@MustBeDocumented
@Target(allowedTargets = {AnnotationTarget.TYPE})
@Retention(AnnotationRetention.SOURCE)
@Documented
@java.lang.annotation.Target({})
@Metadata(mo6927bv = {1, 0, 3}, mo6928d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0010\u001b\n\u0000\b\u0002\u0018\u00002\u00020\u0001B\u0000¨\u0006\u0002"}, mo6929d2 = {"Lkotlin/UnsafeVariance;", "", "kotlin-stdlib"}, mo6930k = 1, mo6931mv = {1, 1, 15})
@java.lang.annotation.Retention(RetentionPolicy.SOURCE)
/* compiled from: Annotations.kt */
public @interface UnsafeVariance {
}
|
[
"hongwei5489@gmail.com"
] |
hongwei5489@gmail.com
|
901aa3c93c5b3c8f850d2aef89c04f3aeabf51f4
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes7.dex_source_from_JADX/com/facebook/feed/rows/photosfeed/PhotosFeedListType.java
|
8ecd6b9041226b1f2ddd66c1d6a3ce226fa9d167
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 549
|
java
|
package com.facebook.feed.rows.photosfeed;
import com.facebook.feed.rows.core.FeedListName;
import com.facebook.feed.rows.core.FeedListType;
/* compiled from: a9080d3eb0efacd93554dfcc50a0b51e */
public class PhotosFeedListType implements FeedListType {
private static final PhotosFeedListType f20241a = new PhotosFeedListType();
private PhotosFeedListType() {
}
public final FeedListName m23384a() {
return FeedListName.PHOTOS_FEED;
}
public static PhotosFeedListType m23383b() {
return f20241a;
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
ef30a16bf287a5e26233a800da49f31ddc734986
|
fa32414cd8cb03a7dc3ef7d85242ee7914a2f45f
|
/app/src/main/java/com/google/android/exoplayer/chunk/ChunkExtractorWrapper.java
|
74f8fe6822baee093f684445e2d60d668baeb25f
|
[] |
no_license
|
SeniorZhai/Mob
|
75c594488c4ce815a1f432eb4deacb8e6f697afe
|
cac498f0b95d7ec6b8da1275b49728578b64ef01
|
refs/heads/master
| 2016-08-12T12:49:57.527237
| 2016-03-10T06:57:09
| 2016-03-10T06:57:09
| 53,562,752
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,621
|
java
|
package com.google.android.exoplayer.chunk;
import com.google.android.exoplayer.MediaFormat;
import com.google.android.exoplayer.drm.DrmInitData;
import com.google.android.exoplayer.extractor.Extractor;
import com.google.android.exoplayer.extractor.ExtractorInput;
import com.google.android.exoplayer.extractor.ExtractorOutput;
import com.google.android.exoplayer.extractor.SeekMap;
import com.google.android.exoplayer.extractor.TrackOutput;
import com.google.android.exoplayer.util.Assertions;
import com.google.android.exoplayer.util.ParsableByteArray;
import java.io.IOException;
public final class ChunkExtractorWrapper implements ExtractorOutput, TrackOutput {
private final Extractor extractor;
private boolean extractorInitialized;
private SingleTrackOutput output;
private boolean seenTrack;
public interface SingleTrackOutput extends TrackOutput {
void drmInitData(DrmInitData drmInitData);
void seekMap(SeekMap seekMap);
}
public ChunkExtractorWrapper(Extractor extractor) {
this.extractor = extractor;
}
public void init(SingleTrackOutput output) {
this.output = output;
if (this.extractorInitialized) {
this.extractor.seek();
return;
}
this.extractor.init(this);
this.extractorInitialized = true;
}
public int read(ExtractorInput input) throws IOException, InterruptedException {
boolean z = true;
int result = this.extractor.read(input, null);
if (result == 1) {
z = false;
}
Assertions.checkState(z);
return result;
}
public TrackOutput track(int id) {
Assertions.checkState(!this.seenTrack);
this.seenTrack = true;
return this;
}
public void endTracks() {
Assertions.checkState(this.seenTrack);
}
public void seekMap(SeekMap seekMap) {
this.output.seekMap(seekMap);
}
public void drmInitData(DrmInitData drmInitData) {
this.output.drmInitData(drmInitData);
}
public void format(MediaFormat format) {
this.output.format(format);
}
public int sampleData(ExtractorInput input, int length) throws IOException, InterruptedException {
return this.output.sampleData(input, length);
}
public void sampleData(ParsableByteArray data, int length) {
this.output.sampleData(data, length);
}
public void sampleMetadata(long timeUs, int flags, int size, int offset, byte[] encryptionKey) {
this.output.sampleMetadata(timeUs, flags, size, offset, encryptionKey);
}
}
|
[
"370985116@qq.com"
] |
370985116@qq.com
|
07585bef3569fc478a135f680b0f10629958c282
|
63ea0a491944d379a87fe3e86c4f3f6ac97ee7f7
|
/src/powercrystals/minefactoryreloaded/circuits/analog/Min4.java
|
ce59be75edc8d17bee987f6d0587e6bf9bd669ca
|
[] |
no_license
|
StevenRS11/MineFactoryReloaded
|
ed993da4824b6da2e853cf789ace23be8b3fe663
|
e4a0048f2329f4cdba599f7defc17e51c4eef363
|
refs/heads/master
| 2021-01-18T13:14:42.404346
| 2013-06-12T06:57:35
| 2013-06-12T06:57:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 857
|
java
|
package powercrystals.minefactoryreloaded.circuits.analog;
import powercrystals.minefactoryreloaded.api.rednet.IRedNetLogicCircuit;
import powercrystals.minefactoryreloaded.circuits.base.StatelessCircuit;
public class Min4 extends StatelessCircuit implements IRedNetLogicCircuit
{
@Override
public int getInputCount()
{
return 4;
}
@Override
public int getOutputCount()
{
return 1;
}
@Override
public int[] recalculateOutputValues(long worldTime, int[] inputValues)
{
return new int[] { Math.min(Math.min(Math.min(inputValues[0], inputValues[1]), inputValues[2]), inputValues[3]) };
}
@Override
public String getUnlocalizedName()
{
return "circuit.mfr.min.4";
}
@Override
public String getInputPinLabel(int pin)
{
return "I" + pin;
}
@Override
public String getOutputPinLabel(int pin)
{
return "O" + pin;
}
}
|
[
"powcrystals@gmail.com"
] |
powcrystals@gmail.com
|
7a9785cd55f2c4ac19f628aba0ede2ea4e2ca7b9
|
f61bf26fa8b4b12753ef76bda6dc5511ea189125
|
/itest/src/it/regression-multi/src/test/java/org/ops4j/pax/exam/regression/multi/reference/NoReferenceTest.java
|
7bc75896b696a157a0192c460e6f3b8501a3d21d
|
[
"Apache-2.0"
] |
permissive
|
ops4j/org.ops4j.pax.exam2
|
d8d38eecda3edf0cacf3f7ebd1746ffb17036f07
|
9717368a14429c6df0e22c994cb8f23dc99585ce
|
refs/heads/master
| 2023-07-04T14:01:30.331866
| 2021-11-21T20:43:43
| 2021-11-21T20:43:43
| 1,081,991
| 66
| 97
|
Apache-2.0
| 2023-08-21T19:44:17
| 2010-11-15T13:59:35
|
Java
|
UTF-8
|
Java
| false
| false
| 1,670
|
java
|
/*
* Copyright (C) 2011 Harald Wellmann
*
* 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.ops4j.pax.exam.regression.multi.reference;
import static org.junit.Assume.assumeTrue;
import static org.ops4j.pax.exam.regression.multi.RegressionConfiguration.isEquinox;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.ops4j.pax.exam.util.PathUtils;
import org.osgi.framework.BundleException;
public class NoReferenceTest {
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Test
public void exceptionWithoutCustomHandler() throws BundleException, IOException {
assumeTrue( isEquinox() );
assumeTrue(System.getProperty("java.protocol.handler.pkgs") == null);
expectedException.expect(MalformedURLException.class);
expectedException.expectMessage("unknown protocol");
String reference = "reference:file:" + PathUtils.getBaseDir() +
"/target/regression-pde-bundle";
new URL(reference);
}
}
|
[
"harald.wellmann@gmx.de"
] |
harald.wellmann@gmx.de
|
8e1f75db1218039cd5446bba8c8c3624fa0aa73d
|
e02a097188ca73dcb23f143f22ab783af5fd050f
|
/rdf-delta-cmds/src/main/java/org/seaborne/delta/cmds/patch2rdf.java
|
9bc1c4c570e11df2368a1663cf4eaf31cce1a6a6
|
[
"Apache-2.0"
] |
permissive
|
acoburn/rdf-delta
|
85122a364eb1236fb647a074dba7949ed34180d4
|
5570b755383c43b5fc79b37a76173b5c49bdd472
|
refs/heads/master
| 2021-05-07T09:00:07.291047
| 2017-11-04T01:02:41
| 2017-11-04T01:02:41
| 109,456,221
| 0
| 0
| null | 2017-11-04T01:00:46
| 2017-11-04T01:00:46
| null |
UTF-8
|
Java
| false
| false
| 3,870
|
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.seaborne.delta.cmds;
import java.io.InputStream ;
import arq.cmdline.ModDatasetAssembler;
import jena.cmd.ArgDecl;
import jena.cmd.CmdException;
import jena.cmd.CmdGeneral ;
import org.apache.jena.atlas.logging.LogCtl ;
import org.apache.jena.riot.Lang;
import org.apache.jena.riot.RDFDataMgr;
import org.apache.jena.sparql.core.DatasetGraph;
import org.apache.jena.sparql.core.DatasetGraphFactory;
import org.apache.jena.system.JenaSystem;
import org.apache.jena.system.Txn;
import org.seaborne.delta.Id;
import org.seaborne.patch.RDFPatch;
import org.seaborne.patch.RDFPatchOps;
/** Apply patches to a base RDF file (or empty dataset) . */
public class patch2rdf extends CmdGeneral
{
static { JenaSystem.init(); LogCtl.setCmdLogging() ; }
protected ModDatasetAssembler modDataset = new ModDatasetAssembler();
protected ArgDecl dataDecl = new ArgDecl(ArgDecl.HasValue, "data") ;
public static void main(String... args) {
new patch2rdf(args).mainRun();
}
public patch2rdf(String[] argv) {
super(argv) ;
super.addModule(modDataset) ;
super.add(dataDecl);
}
@Override
protected String getSummary() {
return getCommandName()+"[--data QUADS | --desc ASSEMBLER ] FILE..." ;
}
@Override
protected void processModulesAndArgs() {
super.processModulesAndArgs();
if ( modDataset.getAssemblerFile() != null && super.hasArg(dataDecl) )
throw new CmdException("Both an assembler file and a data file specificed");
}
@Override
protected void exec() {
DatasetGraph dsg;
// Data.
if ( modDataset.getAssemblerFile() != null )
dsg = modDataset.getDatasetGraph();
else {
dsg = DatasetGraphFactory.createTxnMem();
if ( super.hasArg(dataDecl) ) {
getValues(dataDecl).forEach(fn->{
Txn.executeWrite(dsg, ()->RDFDataMgr.read(dsg, fn));
});
}
}
// Patches
if ( getPositional().isEmpty() )
execOne(System.in);
getPositional().forEach(fn->{
// Check patch threading?
RDFPatch patch = RDFPatchOps.read(fn);
if ( isVerbose() ) {
System.err.printf("# Patch id=%s", Id.str(patch.getId()));
if ( patch.getPrevious() != null )
System.err.printf(" prev=%s", Id.str(patch.getPrevious()));
System.err.println();
}
apply(dsg, patch);
});
Txn.executeRead(dsg, ()->RDFDataMgr.write(System.out, dsg, Lang.TRIG));
}
private void apply(DatasetGraph dsg, RDFPatch patch) {
RDFPatchOps.applyChange(dsg, patch);
}
private void execOne(InputStream input) {
throw new CmdException("From InputStream (inc stdin) not yet supported");
}
@Override
protected String getCommandName() {
return "patch2rdf";
}
}
|
[
"andy@seaborne.org"
] |
andy@seaborne.org
|
5680086ab3909560d03e2a4c06990df21471f043
|
b7d2d56d76ebeef12c647fc5d4233725d219da08
|
/src/main/java/com/taobao/api/response/IncrementCustomersGetResponse.java
|
14497277c1a08b0ae6edaa1f1cf7193a3f0e7654
|
[
"Apache-2.0"
] |
permissive
|
lianying/asdf
|
be483449e6f70c9a1ca09bf3e31e233adfb8684d
|
928f90f3f71718c54cc96c0fa078805cfbadc1fd
|
refs/heads/master
| 2021-01-19T17:24:44.023553
| 2013-03-30T15:08:31
| 2013-03-30T15:08:31
| 9,112,578
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,134
|
java
|
package com.taobao.api.response;
import java.util.List;
import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.internal.mapping.ApiListField;
import com.taobao.api.domain.AppCustomer;
import com.taobao.api.TaobaoResponse;
/**
* TOP API: taobao.increment.customers.get response.
*
* @author auto create
* @since 1.0, null
*/
public class IncrementCustomersGetResponse extends TaobaoResponse {
private static final long serialVersionUID = 5141954997236416463L;
/**
* 查询到的用户开通信息
*/
@ApiListField("app_customers")
@ApiField("app_customer")
private List<AppCustomer> appCustomers;
/**
* 查询到的开通增量服务的用户数
*/
@ApiField("total_results")
private Long totalResults;
public void setAppCustomers(List<AppCustomer> appCustomers) {
this.appCustomers = appCustomers;
}
public List<AppCustomer> getAppCustomers( ) {
return this.appCustomers;
}
public void setTotalResults(Long totalResults) {
this.totalResults = totalResults;
}
public Long getTotalResults( ) {
return this.totalResults;
}
}
|
[
"anying.li2011@gmail.com"
] |
anying.li2011@gmail.com
|
90bcc4348d4c3fdffa200d3dca7c6ac0d30450dc
|
fef1fd0d14e3ebd11b7bf0a7be28b7d5f5a03466
|
/test/net/ion/niss/webapp/misc/TestSystemInfo.java
|
cdd7f9bef2af92c55b99479645e79e973236d6b5
|
[] |
no_license
|
bleujin/niss
|
2c00f486afa32dd1e4db2689ce4c7b519a3161dd
|
b6e09ab4eb479cd5823782cba3f38df83c24610d
|
refs/heads/master
| 2022-11-13T10:37:36.061587
| 2022-10-19T10:06:53
| 2022-10-19T10:06:53
| 22,373,043
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 540
|
java
|
package net.ion.niss.webapp.misc;
import java.io.StringWriter;
import java.io.Writer;
import junit.framework.TestCase;
import net.ion.framework.parse.gson.GsonBuilder;
import net.ion.framework.parse.gson.JsonObject;
import net.ion.framework.util.Debug;
public class TestSystemInfo extends TestCase {
public void testInfo() throws Exception {
JsonObject json = new SystemInfo().list() ;
Writer writer = new StringWriter() ;
new GsonBuilder().setPrettyPrinting().create().toJson(json, writer);
Debug.line(writer);
}
}
|
[
"bleujin@gmail.com"
] |
bleujin@gmail.com
|
616a208c83e9c2d3b3593218e851dcc4f45a33a7
|
34f8d4ba30242a7045c689768c3472b7af80909c
|
/JDK10-Java SE Development Kit 10/src/java.xml/com/sun/org/apache/xml/internal/utils/res/XResources_ja_JP_HA.java
|
a893202f37fe858d7d5db49bca3db691a23d74d2
|
[
"Apache-2.0"
] |
permissive
|
lovelycheng/JDK
|
5b4cc07546f0dbfad15c46d427cae06ef282ef79
|
19a6c71e52f3ecd74e4a66be5d0d552ce7175531
|
refs/heads/master
| 2023-04-08T11:36:22.073953
| 2022-09-04T01:53:09
| 2022-09-04T01:53:09
| 227,544,567
| 0
| 0
| null | 2019-12-12T07:18:30
| 2019-12-12T07:18:29
| null |
UTF-8
|
Java
| false
| false
| 3,430
|
java
|
/*
* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*
* 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 com.sun.org.apache.xml.internal.utils.res;
//
// LangResources_en.properties
//
/**
* The Japanese (Hiragana) resource bundle.
* @xsl.usage internal
*/
public class XResources_ja_JP_HA extends XResourceBundle
{
private static final Object[][] _contents = new Object[][]
{
{ "ui_language", "ja" }, { "help_language", "ja" }, { "language", "ja" },
{ "alphabet", new CharArrayWrapper(
new char[]{ 0x3042, 0x3044, 0x3046, 0x3048, 0x304a, 0x304b, 0x304d,
0x304f, 0x3051, 0x3053, 0x3055, 0x3057, 0x3059, 0x305b,
0x305d, 0x305f, 0x3061, 0x3064, 0x3066, 0x3068, 0x306a,
0x306b, 0x306c, 0x306d, 0x306e, 0x306f, 0x3072, 0x3075,
0x3078, 0x307b, 0x307e, 0x307f, 0x3080, 0x3081, 0x3082,
0x3084, 0x3086, 0x3088, 0x3089, 0x308a, 0x308b, 0x308c,
0x308d, 0x308f, 0x3090, 0x3091, 0x3092, 0x3093 }) },
{ "tradAlphabet", new CharArrayWrapper(
new char[]{ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
'Y', 'Z' }) },
//language orientation
{ "orientation", "LeftToRight" },
//language numbering
{ "numbering", "multiplicative-additive" },
{ "multiplierOrder", "follows" },
// largest numerical value
//{"MaxNumericalValue", new Integer(10000000000)},
//These would not be used for EN. Only used for traditional numbering
{ "numberGroups", new IntArrayWrapper(new int[]{ 1 }) },
//These only used for mutiplicative-additive numbering
// Note that we are using longs and that the last two
// multipliers are not supported. This is a known limitation.
{ "multiplier", new LongArrayWrapper(
new long[]{ Long.MAX_VALUE, Long.MAX_VALUE, 100000000, 10000, 1000,
100, 10 }) },
{ "multiplierChar", new CharArrayWrapper(
new char[]{ 0x4EAC, 0x5146, 0x5104, 0x4E07, 0x5343, 0x767e, 0x5341 }) },
// chinese only?
{ "zero", new CharArrayWrapper(new char[0]) },
{ "digits", new CharArrayWrapper(
new char[]{ 0x4E00, 0x4E8C, 0x4E09, 0x56DB, 0x4E94, 0x516D, 0x4E03,
0x516B, 0x4E5D }) }, { "tables", new StringArrayWrapper(
new String[]{ "digits" }) }
};
/**
* Get the association list.
*
* @return The association list.
*/
public Object[][] getContents()
{
return _contents;
}
}
|
[
"zeng-dream@live.com"
] |
zeng-dream@live.com
|
31f3a789251e2513b7010ed349fdc5847a596444
|
09a8689816547852cec71944cacbda85c1fc2f11
|
/file-server-representation-impl/src/main/java/org/cyk/system/file/server/representation/impl/ApplicationScopeLifeCycleListener.java
|
c4b1441b8a41ccb7b5ceed255fb9452528a028fd
|
[] |
no_license
|
devlopper/org.cyk.system.file.server
|
1f6b6e464f02fa21580c59cc095669684d403a1c
|
414721e8c08deb121a3ce9aedfb8e9db1ef18d9f
|
refs/heads/master
| 2022-02-09T09:28:05.050964
| 2021-04-11T13:56:44
| 2021-04-11T13:56:44
| 180,776,404
| 0
| 0
| null | 2022-01-21T23:49:38
| 2019-04-11T11:18:51
|
Java
|
UTF-8
|
Java
| false
| false
| 757
|
java
|
package org.cyk.system.file.server.representation.impl;
import java.io.Serializable;
import javax.enterprise.context.ApplicationScoped;
import org.cyk.utility.__kernel__.AbstractApplicationScopeLifeCycleListener;
@ApplicationScoped
public class ApplicationScopeLifeCycleListener extends AbstractApplicationScopeLifeCycleListener implements Serializable {
private static final long serialVersionUID = 1L;
@Override
public void __initialize__(Object object) {
__inject__(org.cyk.system.file.server.business.impl.ApplicationScopeLifeCycleListener.class).initialize(null);
__inject__(org.cyk.system.file.server.representation.api.ApplicationScopeLifeCycleListener.class).initialize(null);
}
@Override
public void __destroy__(Object object) {}
}
|
[
"kycdev@gmail.com"
] |
kycdev@gmail.com
|
33c3591ec5c3fd34a742dcdec28f135ca633b3b7
|
4e90b1f53de6bd78063ba9c348a1e9792ac5c2cd
|
/hapi-fhir-structures-dstu2.1/src/main/java/org/hl7/fhir/dstu21/model/valuesets/EncounterDischargeDisposition.java
|
cebc56e0df69cd5a0d7cbf8040636515acd2b89f
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
matt-blanchette/hapi-fhir
|
fd2c096145ed50341b50b48358a53f239f7089ef
|
0f835b5e5500e95eb6acc7f327579b37a5adcf4b
|
refs/heads/master
| 2020-12-24T10:24:36.455253
| 2016-01-20T16:50:49
| 2016-01-20T16:50:49
| 50,038,488
| 0
| 0
| null | 2016-01-20T15:18:50
| 2016-01-20T15:18:49
| null |
UTF-8
|
Java
| false
| false
| 3,258
|
java
|
package org.hl7.fhir.dstu21.model.valuesets;
import org.hl7.fhir.dstu21.exceptions.FHIRException;
public enum EncounterDischargeDisposition {
/**
* null
*/
HOME,
/**
* null
*/
OTHERHCF,
/**
* null
*/
HOSP,
/**
* null
*/
LONG,
/**
* null
*/
AADVICE,
/**
* null
*/
EXP,
/**
* null
*/
PSY,
/**
* null
*/
REHAB,
/**
* null
*/
OTH,
/**
* added to help the parsers
*/
NULL;
public static EncounterDischargeDisposition fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("home".equals(codeString))
return HOME;
if ("other-hcf".equals(codeString))
return OTHERHCF;
if ("hosp".equals(codeString))
return HOSP;
if ("long".equals(codeString))
return LONG;
if ("aadvice".equals(codeString))
return AADVICE;
if ("exp".equals(codeString))
return EXP;
if ("psy".equals(codeString))
return PSY;
if ("rehab".equals(codeString))
return REHAB;
if ("oth".equals(codeString))
return OTH;
throw new FHIRException("Unknown EncounterDischargeDisposition code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case HOME: return "home";
case OTHERHCF: return "other-hcf";
case HOSP: return "hosp";
case LONG: return "long";
case AADVICE: return "aadvice";
case EXP: return "exp";
case PSY: return "psy";
case REHAB: return "rehab";
case OTH: return "oth";
default: return "?";
}
}
public String getSystem() {
return "http://hl7.org/fhir/discharge-disposition";
}
public String getDefinition() {
switch (this) {
case HOME: return "";
case OTHERHCF: return "";
case HOSP: return "";
case LONG: return "";
case AADVICE: return "";
case EXP: return "";
case PSY: return "";
case REHAB: return "";
case OTH: return "";
default: return "?";
}
}
public String getDisplay() {
switch (this) {
case HOME: return "Home";
case OTHERHCF: return "Other healthcare facility";
case HOSP: return "Hospice";
case LONG: return "Long-term care";
case AADVICE: return "Left against advice";
case EXP: return "Expired";
case PSY: return "Psychiatric hospital";
case REHAB: return "Rehabilitation";
case OTH: return "Other";
default: return "?";
}
}
}
|
[
"jamesagnew@gmail.com"
] |
jamesagnew@gmail.com
|
e724e08aeee8674d6d4b973a3bc563d2f9fef9f1
|
b9e76d42efa886982c6cfea37bbcb2b5fe556336
|
/edu.columbia.rdf.edb.ui/src/main/java/edu/columbia/rdf/edb/ui/network/LoginService.java
|
332171453636eb2d198dfdfd4e284e91c0827d7f
|
[] |
no_license
|
antonybholmes/edb-ui
|
d8276fbf0093332b9b3c4ba830e454ba87808f69
|
82a29e3fde42c81ce8483102581c36fd2125e9d3
|
refs/heads/master
| 2023-06-24T19:52:52.733436
| 2021-07-24T21:59:01
| 2021-07-24T21:59:01
| 100,645,553
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,252
|
java
|
package edu.columbia.rdf.edb.ui.network;
import java.io.IOException;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import org.jebtk.core.xml.XmlUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class LoginService implements Iterable<Login> {
private List<Login> logins = new ArrayList<Login>();
private Path mFile;
private static final LoginService instance = new LoginService();
public static final LoginService getInstance() {
return instance;
}
public LoginService() {
// do nothing
}
/**
* Returns a list of the recent files.
*
* @return a list of recent files.
*/
public final int size() {
return logins.size();
}
/**
* Adds a new login.
*
* @param login
*/
public final void add(Login login) {
if (logins.contains(login)) {
return;
}
logins.add(login);
}
public void write()
throws ParserConfigurationException, TransformerException {
write(true, false);
}
/**
* Writes login details to file. It has the option of writing user names and
* passwords along with the server and port which are mandatory.
*
* @param writeUsers
* @param writePasswords
* @throws IOException
* @throws ParserConfigurationException
* @throws TransformerException
*/
public final void write(boolean writeUsers, boolean writePasswords)
throws ParserConfigurationException, TransformerException {
// create the root
Document doc = XmlUtils.createDoc(); // new XmlDocument(serversElement);
Element serversElement = doc.createElement("servers");
doc.appendChild(serversElement);
for (Login login : logins) {
serversElement.appendChild(login.toXml(doc));
}
XmlUtils.writeXml(doc, mFile);
}
public final Iterator<Login> iterator() {
return logins.iterator();
}
public final Login get(int i) {
if (i < 0 || i >= logins.size()) {
return null;
}
return logins.get(i);
}
}
|
[
"antony.b.holmes@gmail.com"
] |
antony.b.holmes@gmail.com
|
cff2fb3d504ae8fe1432f2cda670896f7ccbd454
|
fee347a9d4cef1ca3a60b72d14c107aef113d2fb
|
/DOS/legacy/front-end/src/main/java/com/agnux/kemikal/interfacedaos/CotizacionesInterfaceDao.java
|
a0e95034cc5eb65118d7204be4e91f224bc2f31d
|
[] |
no_license
|
Telematica/erp
|
7517e3fd3c53b359bcb41d3616928407cd343b08
|
3a0d9ed195e09adea01e944016a7e1cc82666e02
|
refs/heads/main
| 2023-02-19T21:51:14.011725
| 2021-01-23T17:41:33
| 2021-01-23T17:41:33
| 323,704,516
| 1
| 0
| null | 2020-12-22T18:32:00
| 2020-12-22T18:32:00
| null |
UTF-8
|
Java
| false
| false
| 2,826
|
java
|
package com.agnux.kemikal.interfacedaos;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
public interface CotizacionesInterfaceDao {
public ArrayList<HashMap<String, Object>> getCotizacion(Integer id_cotizacion);
public ArrayList<HashMap<String, Object>> getDatosGrid(Integer id_cotizacion);
public ArrayList<HashMap<String, Object>> getValoriva();
public ArrayList<HashMap<String, Object>> get_buscador_clientes(String cadena, Integer filtro, Integer id_empresa, Integer id_sucursal);
public ArrayList<HashMap<String, String>> getProductoTipos();
public ArrayList<HashMap<String, String>> getBuscadorProductos(String sku, String tipo, String descripcion,Integer id_empresa);
public ArrayList<HashMap<String, Object>> get_presentaciones_producto(String sku);
public ArrayList<HashMap<String, Object>> getMonedas();
public void getDatosEmpresaPdf(HashMap<String, String> datosEmpresa);
public void getDatosCotizacionPdf(Integer id_cotizacion);
public int selectFunctionForThisApp(Integer id_cotizacion, String data, String accion,String string_array);
public HashMap<String, String> selectFunctionValidateAaplicativo(String data, Integer idApp, String string_array);
public ArrayList<HashMap<String, Object>> getPage(String folio,String cliente,String fecha_inicial,String fecha_final,int offset, int pageSize, String orderBy , String asc);
public int countAll(String folio,String cliente,String fecha_inicial,String fecha_final);
public String getFolio();
public String getEmp_Municipio();
public String getEmp_Entidad();
public String getFecha_cotizacion();
public String getEmp_Calle();
public String getEmp_Numero();
public String getEmp_Colonia();
public String getEmp_Pais();
public String getEmp_Cp();
public String getEmp_Rfc();
public String getClient_razon_social();
public String getClient_calle();
public String getClient_numero();
public String getClient_colonia();
public String getClient_localidad();
public String getClient_entidad();
public String getClient_pais();
public String getClient_cp();
public String getClient_telefono();
public String getClient_contacto();
public String getClient_rfc();
public ArrayList<LinkedHashMap<String, String>> getListaConceptos();
public String getSubtotal();
public String getImpuesto();
public String getTotal();
public String getMoneda_id();
public String getMoneda();
public String getObservaciones();
public String getEmp_RazonSocial();
public void getDatosCotizacionDescripcionPdf(Integer id_cotizacion);
}
|
[
"j4nusx@yahoo.com"
] |
j4nusx@yahoo.com
|
b2fc59f1ebe34714bb9911eabb8e7a3bde87105c
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/28/28_2d8bca08d846ca9e8d28777a741e912d91ff187c/AddComponentToEnterpriseApplicationDataModelProvider/28_2d8bca08d846ca9e8d28777a741e912d91ff187c_AddComponentToEnterpriseApplicationDataModelProvider_t.java
|
84f759cff8d13f9d1884298104b97be777fad143
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,356
|
java
|
/*******************************************************************************
* Copyright (c) 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jst.j2ee.application.internal.operations;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.eclipse.core.resources.IProject;
import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
import org.eclipse.wst.common.componentcore.internal.operation.CreateReferenceComponentsDataModelProvider;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
public class AddComponentToEnterpriseApplicationDataModelProvider extends CreateReferenceComponentsDataModelProvider implements IAddComponentToEnterpriseApplicationDataModelProperties {
public AddComponentToEnterpriseApplicationDataModelProvider() {
super();
}
public Object getDefaultProperty(String propertyName) {
if (TARGET_COMPONENTS_TO_URI_MAP.equals(propertyName)) {
Map map = new HashMap();
List components = (List) getProperty(TARGET_COMPONENT_LIST);
for (int i = 0; i < components.size(); i++) {
IVirtualComponent component = (IVirtualComponent) components.get(i);
IProject project = component.getProject();
String name = component.getName();
if(name != null)
name = name.replace(' ','_');
if (J2EEProjectUtilities.isDynamicWebProject(project)) {
name += IModuleExtensions.DOT_WAR;
} else if (J2EEProjectUtilities.isJCAProject(project)) {
name += IModuleExtensions.DOT_RAR;
} else {
name += IModuleExtensions.DOT_JAR;
}
map.put(component, name);
}
setProperty(propertyName, map);
return map;
}
return super.getDefaultProperty(propertyName);
}
public IDataModelOperation getDefaultOperation() {
return new AddComponentToEnterpriseApplicationOp(model);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
e418e9079afb971b02ea7f5d649c6c9c0376a754
|
be55dc360600dccfd5450e3664a7d361cf32baa5
|
/StacksAndQueues/src/BrowserHistoryUpgrade.java
|
8386f30c950fba1a3be7d211b07b659ec999e738
|
[] |
no_license
|
Polina-MD80/JavaAdvanced
|
e3518bc2a1d03f872f86c1fcf3e3890c7dc6a59c
|
c934a62c943b12559ed606df087416832776aadb
|
refs/heads/master
| 2023-03-06T21:29:42.817102
| 2021-02-20T08:48:41
| 2021-02-20T08:48:41
| 321,795,408
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,370
|
java
|
import java.util.ArrayDeque;
import java.util.Scanner;
public
class BrowserHistoryUpgrade {
public static
void main (String[] args) {
Scanner scanner = new Scanner (System.in);
String navigation = scanner.nextLine ();
ArrayDeque<String> stack = new ArrayDeque<> ();
ArrayDeque<String> queue = new ArrayDeque<> ();
String currant = "";
while (!"Home".equals (navigation)) {
if (navigation.equals ("back")) {
if (!currant.equals ("")) {
queue.offer (currant);
}
if (stack.isEmpty ()) {
System.out.println ("no previous URLs");
} else {
currant = stack.pop ();
}
} else if (navigation.equals ("forward")) {
if (queue.isEmpty ()) {
System.out.println ("no next URLs");
} else {
currant = queue.poll ();
stack.push (currant);
}
} else {
stack.push (currant);
currant = navigation;
queue.clear ();
}
if (!currant.equals ("")) {
System.out.println (currant);
}
navigation = scanner.nextLine ();
}
}
}
|
[
"poli.paskaleva@gmail.com"
] |
poli.paskaleva@gmail.com
|
71471b277eb43f98af473f51beae01b99d6dd35f
|
9254e7279570ac8ef687c416a79bb472146e9b35
|
/retailbot-20210224/src/main/java/com/aliyun/retailbot20210224/models/UpgradePackageShrinkRequest.java
|
fffe292931c1ae46b51c91f258b1e50a1b681d30
|
[
"Apache-2.0"
] |
permissive
|
lquterqtd/alibabacloud-java-sdk
|
3eaa17276dd28004dae6f87e763e13eb90c30032
|
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
|
refs/heads/master
| 2023-08-12T13:56:26.379027
| 2021-10-19T07:22:15
| 2021-10-19T07:22:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,425
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.retailbot20210224.models;
import com.aliyun.tea.*;
public class UpgradePackageShrinkRequest extends TeaModel {
// 机器人code
@NameInMap("RobotCodes")
public String robotCodesShrink;
// 需要升级的行业包
@NameInMap("PackageDTO")
public String packageDTOShrink;
// 操作人信息
@NameInMap("Operator")
public String operatorShrink;
public static UpgradePackageShrinkRequest build(java.util.Map<String, ?> map) throws Exception {
UpgradePackageShrinkRequest self = new UpgradePackageShrinkRequest();
return TeaModel.build(map, self);
}
public UpgradePackageShrinkRequest setRobotCodesShrink(String robotCodesShrink) {
this.robotCodesShrink = robotCodesShrink;
return this;
}
public String getRobotCodesShrink() {
return this.robotCodesShrink;
}
public UpgradePackageShrinkRequest setPackageDTOShrink(String packageDTOShrink) {
this.packageDTOShrink = packageDTOShrink;
return this;
}
public String getPackageDTOShrink() {
return this.packageDTOShrink;
}
public UpgradePackageShrinkRequest setOperatorShrink(String operatorShrink) {
this.operatorShrink = operatorShrink;
return this;
}
public String getOperatorShrink() {
return this.operatorShrink;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
8191ad80d0c54da61c502c1c697e246a4589bd98
|
bfcce2270be74b70f75c2ad25ebeed67a445220d
|
/bin/platform/bootstrap/gensrc/de/hybris/platform/impex/model/cronjob/ImpExExportJobModel.java
|
0c877aa41aa5818ca0f945d98334ab8ab23d2eb8
|
[
"Unlicense"
] |
permissive
|
hasanakgoz/Hybris
|
018c1673e8328bd5763d29c5ef72fd35536cd11a
|
2a9d0ea1e24d6dee5bfc20a8541ede903eedc064
|
refs/heads/master
| 2020-03-27T12:46:57.199555
| 2018-03-26T10:47:21
| 2018-03-26T10:47:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,581
|
java
|
/*
* ----------------------------------------------------------------
* --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! ---
* --- Generated at Mar 15, 2018 5:02:29 PM ---
* ----------------------------------------------------------------
*
* [y] hybris Platform
*
* Copyright (c) 2000-2016 SAP SE
* All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* Hybris ("Confidential Information"). You shall not disclose such
* Confidential Information and shall use it only in accordance with the
* terms of the license agreement you entered into with SAP Hybris.
*
*/
package de.hybris.platform.impex.model.cronjob;
import de.hybris.platform.core.model.ItemModel;
import de.hybris.platform.cronjob.model.JobModel;
import de.hybris.platform.servicelayer.model.ItemModelContext;
/**
* Generated model class for type ImpExExportJob first defined at extension impex.
*/
@SuppressWarnings("all")
public class ImpExExportJobModel extends JobModel
{
/**<i>Generated model type code constant.</i>*/
public static final String _TYPECODE = "ImpExExportJob";
/**
* <i>Generated constructor</i> - Default constructor for generic creation.
*/
public ImpExExportJobModel()
{
super();
}
/**
* <i>Generated constructor</i> - Default constructor for creation with existing context
* @param ctx the model context to be injected, must not be null
*/
public ImpExExportJobModel(final ItemModelContext ctx)
{
super(ctx);
}
/**
* <i>Generated constructor</i> - Constructor with all mandatory attributes.
* @deprecated since 4.1.1 Please use the default constructor without parameters
* @param _code initial attribute declared by type <code>Job</code> at extension <code>processing</code>
*/
@Deprecated
public ImpExExportJobModel(final String _code)
{
super();
setCode(_code);
}
/**
* <i>Generated constructor</i> - for all mandatory and initial attributes.
* @deprecated since 4.1.1 Please use the default constructor without parameters
* @param _code initial attribute declared by type <code>Job</code> at extension <code>processing</code>
* @param _nodeID initial attribute declared by type <code>Job</code> at extension <code>processing</code>
* @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code>
*/
@Deprecated
public ImpExExportJobModel(final String _code, final Integer _nodeID, final ItemModel _owner)
{
super();
setCode(_code);
setNodeID(_nodeID);
setOwner(_owner);
}
}
|
[
"sandeepvalapi@gmail.com"
] |
sandeepvalapi@gmail.com
|
88ca11cb42b24921440a39b3c1a49623c269baa8
|
4ed0d3ad57a111c99b21445754553f533594feac
|
/kodilla-testing/src/main/java/com/kodilla/testing/library/Book.java
|
22c6f7cf95d1a8eb9da1da211b31bc5dfb85a601
|
[] |
no_license
|
KrzysiekPrzybylski/Krzysztof-Przybylski--Kodilla-JAVA
|
631e5eef3fa86cb18704843d1efe0b06b43edda3
|
a0a8e03bf53cf3a30e7154061265aace7eacf0a6
|
refs/heads/master
| 2023-06-05T06:04:57.575520
| 2021-07-01T10:39:54
| 2021-07-01T10:39:54
| 309,326,706
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,338
|
java
|
package com.kodilla.testing.library;
public class Book {
String title;
String author;
int publicationYear;
public Book(String title, String author, int publicationYear) {
this.title = title;
this.author = author;
this.publicationYear = publicationYear;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public int getPublicationYear() {
return publicationYear;
}
public void setPublicationYear(int publicationYear) {
this.publicationYear = publicationYear;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Book book = (Book) o;
if (publicationYear != book.publicationYear) return false;
if (!title.equals(book.title)) return false;
return author.equals(book.author);
}
@Override
public int hashCode() {
int result = title.hashCode();
result = 31 * result + author.hashCode();
result = 31 * result + publicationYear;
return result;
}
}
|
[
"krzy.przybylski@gmail.com"
] |
krzy.przybylski@gmail.com
|
08611ae6d6adfd63699c81b7f62622e8ff0c517b
|
37cdf8cf498444eaadb5a989a5df663b06a49520
|
/com/naikara_talk/util/CsvUtil.java
|
c80dbc38d1676b02c4fc69671d23910efb12c0ff
|
[] |
no_license
|
sangjiexun/naikaratalk
|
d1b8f9e000427f3e03294512d3d15f809088eef1
|
744145606dd260e05126cda7651b595fe8cff309
|
refs/heads/master
| 2020-12-14T20:24:32.209184
| 2014-09-18T23:46:43
| 2014-09-18T23:46:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,519
|
java
|
package com.naikara_talk.util;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.List;
import com.csvreader.CsvWriter;
/**
* <b>システム名称 :</b>NAIKARA Talkシステム<br>
* <b>サブシステム名称 :</b>CSV共通<br>
* <b>クラス名称 :</b>CSV共通クラス。<br>
* <b>クラス概要 :</b>CSV共通。<br>
* <br>
* <b>著作権 :</b>All rights recerved, Copyright(C), nai INDUSTRIES, LTD.
* @author TECS
* <b>変更履歴 :</b>2013/07/09 TECS 新規作成
*/
public class CsvUtil {
/**
* CSVファイルの作成<br>
* <br>
* CSVファイルを作成する。<br>
* <br>
* @param list データリスト<br>
* @param filePath ファイルのパス<br>
* @return なし <br>
* @exception なし
*/
public static void createCsvFile(List<List<String>> list, String filePath) {
CsvWriter cw = null;
try {
cw = new CsvWriter(filePath, NaikaraTalkConstants.COMMA, Charset.forName(NaikaraTalkConstants.SJIS));
cw.setForceQualifier(true);
for (List<String> lineList : list) {
String[] ss = new String[lineList.size()];
cw.writeRecord(lineList.toArray(ss));
}
} catch (IOException e) {
e.printStackTrace();
} finally {
if (cw != null) {
cw.close();
}
}
}
}
|
[
"late4@sfc.wide.ad.jp"
] |
late4@sfc.wide.ad.jp
|
705f358a3f09beadb6dbaf75e8562ee86a021c7d
|
bc5e6d9483c5b94878310a7c2a3e1dcb8d644202
|
/data/game/data/scripts/handlers/effecthandlers/ChangeFace.java
|
568493ada2525a4f51a99b2e6c9613f40b03b0fc
|
[] |
no_license
|
finfan222/l2hf
|
17ecedb581c2f3f28d1b51229722082fa94560ae
|
bd3731afdac4791e19281790f47806fdcf6f11ae
|
refs/heads/master
| 2023-03-03T06:50:32.060299
| 2021-01-05T01:26:56
| 2021-01-05T01:26:56
| 326,816,095
| 0
| 0
| null | 2021-01-14T21:53:24
| 2021-01-04T21:50:23
|
Java
|
UTF-8
|
Java
| false
| false
| 1,803
|
java
|
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.effecthandlers;
import org.lineage.gameserver.model.StatSet;
import org.lineage.gameserver.model.actor.instance.PlayerInstance;
import org.lineage.gameserver.model.conditions.Condition;
import org.lineage.gameserver.model.effects.AbstractEffect;
import org.lineage.gameserver.model.skills.BuffInfo;
/**
* Change Face effect implementation.
* @author Zoey76
*/
public class ChangeFace extends AbstractEffect
{
private final int _value;
public ChangeFace(Condition attachCond, Condition applyCond, StatSet set, StatSet params)
{
super(attachCond, applyCond, set, params);
_value = params.getInt("value", 0);
}
@Override
public boolean isInstant()
{
return true;
}
@Override
public void onStart(BuffInfo info)
{
if ((info.getEffector() == null) || (info.getEffected() == null) || !info.getEffector().isPlayer() || !info.getEffected().isPlayer() || info.getEffected().isAlikeDead())
{
return;
}
final PlayerInstance player = info.getEffector().getActingPlayer();
player.getAppearance().setFace(_value);
player.broadcastUserInfo();
}
}
|
[
"finex.dev@gmail.com"
] |
finex.dev@gmail.com
|
5d59347cb33f0cbb3afa51f3f0844431fe2aa4b3
|
ff0c33ccd3bbb8a080041fbdbb79e29989691747
|
/jdk.localedata/sun/text/resources/cldr/ext/FormatData_ff_Adlm_MR.java
|
ff957e6864746b5894720af4aa7b92b2b842b771
|
[] |
no_license
|
jiecai58/jdk15
|
7d0f2e518e3f6669eb9ebb804f3c89bbfb2b51f0
|
b04691a72e51947df1b25c31175071f011cb9bbe
|
refs/heads/main
| 2023-02-25T00:30:30.407901
| 2021-01-29T04:48:33
| 2021-01-29T04:48:33
| 330,704,930
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,064
|
java
|
/*
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* COPYRIGHT AND PERMISSION NOTICE
*
* Copyright (C) 1991-2016 Unicode, Inc. All rights reserved.
* Distributed under the Terms of Use in
* http://www.unicode.org/copyright.html.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of the Unicode data files and any associated documentation
* (the "Data Files") or Unicode software and any associated documentation
* (the "Software") to deal in the Data Files or Software
* without restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, and/or sell copies of
* the Data Files or Software, and to permit persons to whom the Data Files
* or Software are furnished to do so, provided that
* (a) this copyright and permission notice appear with all copies
* of the Data Files or Software,
* (b) this copyright and permission notice appear in associated
* documentation, and
* (c) there is clear notice in each modified Data File or in the Software
* as well as in the documentation associated with the Data File(s) or
* Software that the data or software has been modified.
*
* THE DATA FILES AND SOFTWARE ARE 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 OF THIRD PARTY RIGHTS.
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
* NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
* DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THE DATA FILES OR SOFTWARE.
*
* Except as contained in this notice, the name of a copyright holder
* shall not be used in advertising or otherwise to promote the sale,
* use or other dealings in these Data Files or Software without prior
* written authorization of the copyright holder.
*/
package sun.text.resources.cldr.ext;
import java.util.ListResourceBundle;
public class FormatData_ff_Adlm_MR extends ListResourceBundle {
@Override
protected final Object[][] getContents() {
final String[] metaValue_TimePatterns = new String[] {
"h:mm:ss a zzzz",
"h:mm:ss a z",
"h:mm:ss a",
"h:mm a",
};
final Object[][] data = new Object[][] {
{ "buddhist.TimePatterns", metaValue_TimePatterns },
{ "japanese.TimePatterns", metaValue_TimePatterns },
{ "roc.TimePatterns", metaValue_TimePatterns },
{ "TimePatterns", metaValue_TimePatterns },
{ "islamic.TimePatterns", metaValue_TimePatterns },
};
return data;
}
}
|
[
"caijie2@tuhu.cn"
] |
caijie2@tuhu.cn
|
78ed5967f0e9cc97ef3e582fe4612388143be080
|
4be719618eff81f92601dd33df174f149d52b38e
|
/cougar-framework/cougar-marshalling-impl/src/test/java/com/betfair/cougar/marshalling/impl/databinding/DataBindingManagerTest.java
|
b65091fd51d765ac51e46987efbec7a78bf5d307
|
[
"Apache-2.0"
] |
permissive
|
chrissekaran/cougar
|
dbda7b1bc526974a8c141f2571be3681f9652b93
|
58eafe7b9770f543c7a32390703fd0cbefd97064
|
refs/heads/master
| 2020-12-30T21:55:42.446413
| 2014-02-26T18:37:29
| 2014-02-26T18:37:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,370
|
java
|
/*
* Copyright 2013, The Sporting Exchange Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.betfair.cougar.marshalling.impl.databinding;
import java.util.*;
import javax.ws.rs.core.MediaType;
import com.betfair.cougar.marshalling.api.databinding.*;
import com.betfair.cougar.test.CougarTestCase;
public class DataBindingManagerTest extends CougarTestCase {
public void testGetFactory() throws Exception {
DataBindingManager dbm = DataBindingManager.getInstance();
DataBindingMap map = new DataBindingMap();
map.setPreferredContentType("application/xml");
Set<String> cTypes = new HashSet<String>();
cTypes.add("text/xml");
cTypes.add("application/xml");
cTypes.add("foo/bar");
map.setContentTypes(cTypes);
map.setFactory(new DataBindingFactory() {
@Override
public Marshaller getMarshaller() {
// TODO Auto-generated method stub
return null;
}
@Override
public FaultMarshaller getFaultMarshaller() {
// TODO Auto-generated method stub
return null;
}
@Override
public FaultUnMarshaller getFaultUnMarshaller() {
return null;
}
@Override
public UnMarshaller getUnMarshaller() {
// TODO Auto-generated method stub
return null;
}});
List bindingMaps = new ArrayList<Map>();
bindingMaps.add(map);
DataBindingManagerHelper dbmh = new DataBindingManagerHelper();
dbmh.setDataBindingManager(dbm);
dbmh.setDataBindingMaps(bindingMaps);
dbmh.afterPropertiesSet();
DataBindingFactory appXmlFactory = dbm.getFactory(MediaType.valueOf("application/xml"));
assertNotNull(appXmlFactory);
//Essentially all the content types defined above should resolve to the same factory
assertEquals(appXmlFactory, dbm.getFactory(MediaType.valueOf("foo/bar")));
}
}
|
[
"simon@exemel.co.uk"
] |
simon@exemel.co.uk
|
164657cfc076595c86c6a5e71b4c34cb2c29f384
|
e66dfd2f3250e0e271dcdac4883227873e914429
|
/zml-jce/src/main/java/com/jce/framework/core/util/JeecgDataAutorUtils.java
|
caca3df8d122631347c6df1617b499061de27013
|
[] |
no_license
|
tianshency/zhuminle
|
d13b45a8a528f0da2142aab0fd999775fe476e0c
|
c864d0ab074dadf447504f54a82b2fc5b149b97e
|
refs/heads/master
| 2020-03-18T00:54:16.153820
| 2018-05-20T05:20:08
| 2018-05-20T05:20:08
| 134,118,245
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,495
|
java
|
package com.jce.framework.core.util;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.jce.framework.core.constant.Globals;
import com.jce.framework.web.system.pojo.base.TSDataRule;
import org.springframework.util.StringUtils;
/**
* @ClassName: JeecgDataAutorUtils
* @Description: 数据权限查询规则容器工具类
* @author 张代浩
* @date 2012-12-15 下午11:27:39
*
*/
public class JeecgDataAutorUtils {
/**
* 往链接请求里面,传入数据查询条件
*
* @param request
* @param MENU_DATA_AUTHOR_RULES
*/
public static synchronized void installDataSearchConditon(
HttpServletRequest request, List<TSDataRule> MENU_DATA_AUTHOR_RULES) {
@SuppressWarnings("unchecked")
List<TSDataRule> list = (List<TSDataRule>)loadDataSearchConditonSQL();// 1.先从request获取MENU_DATA_AUTHOR_RULES,如果存则获取到LIST
if (list==null) { // 2.如果不存在,则new一个list
list = new ArrayList<TSDataRule>();
}
for (TSDataRule tsDataRule : MENU_DATA_AUTHOR_RULES) {
list.add(tsDataRule);
}
request.setAttribute(Globals.MENU_DATA_AUTHOR_RULES, list); // 3.往list里面增量存指
}
/**
* 获取查询条件方法
*
* @param request
* @return
*/
@SuppressWarnings("unchecked")
public static synchronized List<TSDataRule> loadDataSearchConditonSQL() {
return (List<TSDataRule>) ContextHolderUtils.getRequest().getAttribute(
Globals.MENU_DATA_AUTHOR_RULES);
}
/**
* 获取查询条件方法
*
* @param request
* @return
*/
public static synchronized String loadDataSearchConditonSQLString() {
return (String) ContextHolderUtils.getRequest().getAttribute(
Globals.MENU_DATA_AUTHOR_RULE_SQL);
}
/**
* 往链接请求里面,传入数据查询条件
*
* @param request
* @param MENU_DATA_AUTHOR_RULE_SQL
*/
public static synchronized void installDataSearchConditon(
HttpServletRequest request, String MENU_DATA_AUTHOR_RULE_SQL) {
// 1.先从request获取MENU_DATA_AUTHOR_RULE_SQL,如果存则获取到sql串
String ruleSql = (String)loadDataSearchConditonSQLString();
if (!StringUtils.hasText(ruleSql)) {
ruleSql += MENU_DATA_AUTHOR_RULE_SQL; // 2.如果不存在,则new一个sql串
}
request.setAttribute(Globals.MENU_DATA_AUTHOR_RULE_SQL,
MENU_DATA_AUTHOR_RULE_SQL);// 3.往sql串里面增量拼新的条件
}
}
|
[
"tianshencaoyin@163.com"
] |
tianshencaoyin@163.com
|
87fcb8603d426e12f503f7c57142036d763d7838
|
3d0ef511c36646e4bdb9a13935c132a19d16bee5
|
/jcache-javaee/src/test/java/javax/enterprise/cache/spi/CustomCacheInjectionTest.java
|
56821c435fc271b6340194de0b45e0b9186cae4a
|
[
"Apache-2.0"
] |
permissive
|
Adopt-a-JSR/jcache-javaee
|
4f61b3b775a1c72b3e95a72421a0993d83c167b7
|
bd13cbe5a6f55733e7f5cdcafb5b405c429f4bf9
|
refs/heads/master
| 2021-01-13T00:45:09.495606
| 2016-02-08T05:52:38
| 2016-02-08T05:52:38
| 51,198,585
| 10
| 3
| null | 2016-02-09T13:34:37
| 2016-02-06T10:36:31
| null |
UTF-8
|
Java
| false
| false
| 856
|
java
|
package javax.enterprise.cache.spi;
import javax.cache.Cache;
import javax.enterprise.cache.CacheContext;
import javax.inject.Inject;
import org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import org.junit.Test;
import org.junit.runner.RunWith;
/**
*
* @author airhacks.com
*/
@RunWith(CdiTestRunner.class)
public class CustomCacheInjectionTest {
@Inject
@CacheContext("it")
Cache first;
@Inject
@CacheContext("hack3rz")
Cache second;
@Inject
@CacheContext("hack3rz")
Cache alreadyInjected;
@Test
public void cachesWithDifferentNamesAreNotSame() {
assertNotSame(first, second);
}
@Test
public void cachesWithSameNameAreSame() {
assertSame(second, alreadyInjected);
}
}
|
[
"abien@adam-bien.com"
] |
abien@adam-bien.com
|
25402ed207300a862721e0869bb0da6880bd4626
|
cca87c4ade972a682c9bf0663ffdf21232c9b857
|
/com/tencent/mm/plugin/appbrand/AppBrandX5BasedJsEngine.java
|
c5b4c8095c33caa9e37691ba07d387ae0ce6d923
|
[] |
no_license
|
ZoranLi/wechat_reversing
|
b246d43f7c2d7beb00a339e2f825fcb127e0d1a1
|
36b10ef49d2c75d69e3c8fdd5b1ea3baa2bba49a
|
refs/heads/master
| 2021-07-05T01:17:20.533427
| 2017-09-25T09:07:33
| 2017-09-25T09:07:33
| 104,726,592
| 12
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,592
|
java
|
package com.tencent.mm.plugin.appbrand;
import android.content.Context;
import android.os.Looper;
import android.webkit.JavascriptInterface;
import android.webkit.ValueCallback;
import com.tencent.mm.sdk.platformtools.w;
import com.tencent.smtt.sdk.ac;
import com.tencent.smtt.sdk.ae;
import com.tencent.smtt.sdk.y;
import java.util.concurrent.CountDownLatch;
public class AppBrandX5BasedJsEngine implements d {
public ae ixF;
private volatile boolean ixG;
private volatile boolean ixH = false;
private volatile CountDownLatch ixI;
private com.tencent.mm.sdk.platformtools.ae mHandler;
public AppBrandX5BasedJsEngine(Context context, Object obj, String str) {
this.ixF = new ae(context);
this.ixG = false;
this.ixF.addJavascriptInterface(obj, str);
this.mHandler = new com.tencent.mm.sdk.platformtools.ae(Looper.getMainLooper());
this.ixF.addJavascriptInterface(this, "WeixinJsThreadCaller");
}
@JavascriptInterface
public int callFromJsThread() {
w.d("MicroMsg.AppBrandX5BasedJsEngine", "enter callFromJsThread, pendingPause %b", new Object[]{Boolean.valueOf(this.ixH)});
if (this.ixH) {
w.i("MicroMsg.AppBrandX5BasedJsEngine", "pause await threadId %d", new Object[]{Long.valueOf(Thread.currentThread().getId())});
this.ixH = false;
this.ixI = new CountDownLatch(1);
try {
this.ixI.await();
} catch (InterruptedException e) {
w.e("MicroMsg.AppBrandX5BasedJsEngine", "pause await e = %s", new Object[]{e});
}
}
return 1;
}
public void evaluateJavascript(final String str, final y<String> yVar) {
if (!this.ixG) {
Runnable anonymousClass1 = new Runnable(this) {
final /* synthetic */ AppBrandX5BasedJsEngine ixK;
public final void run() {
ae aeVar = this.ixK.ixF;
String str = str;
y yVar = yVar;
if (ae.wXd) {
try {
ac cfb = ac.cfb();
if (cfb != null && cfb.cfc()) {
cfb.cfd().wWu.invokeStaticMethod("com.tencent.tbs.tbsshell.WebCoreProxy", "evaluateJavascript", new Class[]{String.class, ValueCallback.class, Object.class}, new Object[]{str, yVar, aeVar.wXh});
}
} catch (Exception e) {
}
} else if (aeVar.vsw != null) {
aeVar.vsw.evaluateJavascript(str, yVar);
}
}
};
if (Looper.getMainLooper().getThread() == Thread.currentThread()) {
anonymousClass1.run();
} else {
this.mHandler.post(anonymousClass1);
}
}
}
public final void Po() {
if (!this.ixG) {
ae aeVar = this.ixF;
if (ae.wXd) {
try {
ac cfb = ac.cfb();
if (cfb != null && cfb.cfc()) {
cfb.cfd().wWu.invokeStaticMethod("com.tencent.tbs.tbsshell.WebCoreProxy", "destroyX5JsCore", new Class[]{Object.class}, new Object[]{aeVar.wXh});
}
} catch (Exception e) {
}
} else if (aeVar.vsw != null) {
aeVar.vsw.clearHistory();
aeVar.vsw.clearCache(true);
aeVar.vsw.loadUrl("about:blank");
aeVar.vsw.freeMemory();
aeVar.vsw.pauseTimers();
aeVar.vsw.destroy();
aeVar.vsw = null;
}
}
this.ixG = true;
}
public void pause() {
if (Pp()) {
this.ixH = true;
evaluateJavascript("var ret = WeixinJsThreadCaller.callFromJsThread();", new y<String>(this) {
final /* synthetic */ AppBrandX5BasedJsEngine ixK;
{
this.ixK = r1;
}
public final /* synthetic */ void onReceiveValue(Object obj) {
w.d("MicroMsg.AppBrandX5BasedJsEngine", "invoke callFromJsThread ret %s", new Object[]{(String) obj});
}
});
}
}
public void resume() {
this.ixH = false;
if (this.ixI != null) {
this.ixI.countDown();
this.ixI = null;
}
}
public boolean Pp() {
return true;
}
}
|
[
"lizhangliao@xiaohongchun.com"
] |
lizhangliao@xiaohongchun.com
|
f4767b865c4e4adbb2c32703847fbc82259efc8b
|
5eb61dc67145c1b1d5a908b803520ba9da83f82d
|
/SpringBoot02/src/main/java/com/nys/config/AuthorSettings.java
|
fdae78e53f0256fc00f50a876a1d54675a896e5a
|
[] |
no_license
|
OnTheRightWay/workspace
|
27549e5344a8d56575a5b5798bdabf9fe661872d
|
f6767929db06f66defdee50dcf87fb7441207e87
|
refs/heads/master
| 2021-09-09T15:06:33.482564
| 2018-03-17T06:07:57
| 2018-03-17T06:07:57
| 113,117,366
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 653
|
java
|
package com.nys.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@Component
@ConfigurationProperties(prefix = "author")
//该注解可以加载properties中的配置
//通过prefix指定配置文件中的前缀
public class AuthorSettings {
private String name;
private String gender;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
}
|
[
"34029301+OnTheRightWay@users.noreply.github.com"
] |
34029301+OnTheRightWay@users.noreply.github.com
|
33c92d921789003ad96f61d2783ec648b5279582
|
40d844c1c780cf3618979626282cf59be833907f
|
/src/testcases/CWE190_Integer_Overflow/s01/CWE190_Integer_Overflow__int_console_readLine_multiply_52c.java
|
6f006feb3f031d006b48cfb1ab325e44f75f4954
|
[] |
no_license
|
rubengomez97/juliet
|
f9566de7be198921113658f904b521b6bca4d262
|
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
|
refs/heads/master
| 2023-06-02T00:37:24.532638
| 2021-06-23T17:22:22
| 2021-06-23T17:22:22
| 379,676,259
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,192
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__int_console_readLine_multiply_52c.java
Label Definition File: CWE190_Integer_Overflow__int.label.xml
Template File: sources-sinks-52c.tmpl.java
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: console_readLine Read data from the console using readLine
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: multiply
* GoodSink: Ensure there will not be an overflow before multiplying data by 2
* BadSink : If data is positive, multiply by 2, which can cause an overflow
* Flow Variant: 52 Data flow: data passed as an argument from one method to another to another in three different classes in the same package
*
* */
package testcases.CWE190_Integer_Overflow.s01;
import testcasesupport.*;
import javax.servlet.http.*;
public class CWE190_Integer_Overflow__int_console_readLine_multiply_52c
{
public void badSink(int data ) throws Throwable
{
if(data > 0) /* ensure we won't have an underflow */
{
/* POTENTIAL FLAW: if (data*2) > Integer.MAX_VALUE, this will overflow */
int result = (int)(data * 2);
IO.writeLine("result: " + result);
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(int data ) throws Throwable
{
if(data > 0) /* ensure we won't have an underflow */
{
/* POTENTIAL FLAW: if (data*2) > Integer.MAX_VALUE, this will overflow */
int result = (int)(data * 2);
IO.writeLine("result: " + result);
}
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink(int data ) throws Throwable
{
if(data > 0) /* ensure we won't have an underflow */
{
/* FIX: Add a check to prevent an overflow from occurring */
if (data < (Integer.MAX_VALUE/2))
{
int result = (int)(data * 2);
IO.writeLine("result: " + result);
}
else
{
IO.writeLine("data value is too large to perform multiplication.");
}
}
}
}
|
[
"you@example.com"
] |
you@example.com
|
1418b13b510dde3451a2273d5a83e2b7ec9df03f
|
d8c5f1d5f5b7d222834d233db26d8b03e37bdfa3
|
/clients/oathkeeper/java/src/main/java/sh/ory/oathkeeper/model/Upstream.java
|
2b5769e010e68b09a699f2767b2c94c8ea709406
|
[
"Apache-2.0"
] |
permissive
|
kolotaev/sdk
|
31a9585720c3649b8830cf054fc7e404abe8e588
|
0dda1becd70be8d7b9d678321ebe780c1ba00485
|
refs/heads/master
| 2023-07-09T21:36:44.459798
| 2021-08-17T09:05:22
| 2021-08-17T09:05:22
| 397,220,777
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,436
|
java
|
/*
* ORY Oathkeeper
* ORY Oathkeeper is a reverse proxy that checks the HTTP Authorization for validity against a set of rules. This service uses Hydra to validate access tokens and policies.
*
* The version of the OpenAPI document: v0.38.14-beta.1
* Contact: hi@ory.am
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package sh.ory.oathkeeper.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* Upstream
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-07-14T17:07:40.967782263Z[Etc/UTC]")
public class Upstream {
public static final String SERIALIZED_NAME_PRESERVE_HOST = "preserve_host";
@SerializedName(SERIALIZED_NAME_PRESERVE_HOST)
private Boolean preserveHost;
public static final String SERIALIZED_NAME_STRIP_PATH = "strip_path";
@SerializedName(SERIALIZED_NAME_STRIP_PATH)
private String stripPath;
public static final String SERIALIZED_NAME_URL = "url";
@SerializedName(SERIALIZED_NAME_URL)
private String url;
public Upstream preserveHost(Boolean preserveHost) {
this.preserveHost = preserveHost;
return this;
}
/**
* PreserveHost, if false (the default), tells ORY Oathkeeper to set the upstream request's Host header to the hostname of the API's upstream's URL. Setting this flag to true instructs ORY Oathkeeper not to do so.
* @return preserveHost
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "PreserveHost, if false (the default), tells ORY Oathkeeper to set the upstream request's Host header to the hostname of the API's upstream's URL. Setting this flag to true instructs ORY Oathkeeper not to do so.")
public Boolean getPreserveHost() {
return preserveHost;
}
public void setPreserveHost(Boolean preserveHost) {
this.preserveHost = preserveHost;
}
public Upstream stripPath(String stripPath) {
this.stripPath = stripPath;
return this;
}
/**
* StripPath if set, replaces the provided path prefix when forwarding the requested URL to the upstream URL.
* @return stripPath
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "StripPath if set, replaces the provided path prefix when forwarding the requested URL to the upstream URL.")
public String getStripPath() {
return stripPath;
}
public void setStripPath(String stripPath) {
this.stripPath = stripPath;
}
public Upstream url(String url) {
this.url = url;
return this;
}
/**
* URL is the URL the request will be proxied to.
* @return url
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "URL is the URL the request will be proxied to.")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Upstream upstream = (Upstream) o;
return Objects.equals(this.preserveHost, upstream.preserveHost) &&
Objects.equals(this.stripPath, upstream.stripPath) &&
Objects.equals(this.url, upstream.url);
}
@Override
public int hashCode() {
return Objects.hash(preserveHost, stripPath, url);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Upstream {\n");
sb.append(" preserveHost: ").append(toIndentedString(preserveHost)).append("\n");
sb.append(" stripPath: ").append(toIndentedString(stripPath)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).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(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"3372410+aeneasr@users.noreply.github.com"
] |
3372410+aeneasr@users.noreply.github.com
|
d3c7c4948ceef9fc25af2bcffd46c40ea9ca97ee
|
9410ef0fbb317ace552b6f0a91e0b847a9a841da
|
/src/main/java/com/tencentcloudapi/mdl/v20200326/models/DeleteStreamLivePlanRequest.java
|
0543f706954cdf7b396159b834cfeddf460589d4
|
[
"Apache-2.0"
] |
permissive
|
TencentCloud/tencentcloud-sdk-java-intl-en
|
274de822748bdb9b4077e3b796413834b05f1713
|
6ca868a8de6803a6c9f51af7293d5e6dad575db6
|
refs/heads/master
| 2023-09-04T05:18:35.048202
| 2023-09-01T04:04:14
| 2023-09-01T04:04:14
| 230,567,388
| 7
| 4
|
Apache-2.0
| 2022-05-25T06:54:45
| 2019-12-28T06:13:51
|
Java
|
UTF-8
|
Java
| false
| false
| 2,889
|
java
|
/*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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.
* 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.tencentcloudapi.mdl.v20200326.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class DeleteStreamLivePlanRequest extends AbstractModel{
/**
* ID of the channel whose event is to be deleted
*/
@SerializedName("ChannelId")
@Expose
private String ChannelId;
/**
* Name of the event to delete
*/
@SerializedName("EventName")
@Expose
private String EventName;
/**
* Get ID of the channel whose event is to be deleted
* @return ChannelId ID of the channel whose event is to be deleted
*/
public String getChannelId() {
return this.ChannelId;
}
/**
* Set ID of the channel whose event is to be deleted
* @param ChannelId ID of the channel whose event is to be deleted
*/
public void setChannelId(String ChannelId) {
this.ChannelId = ChannelId;
}
/**
* Get Name of the event to delete
* @return EventName Name of the event to delete
*/
public String getEventName() {
return this.EventName;
}
/**
* Set Name of the event to delete
* @param EventName Name of the event to delete
*/
public void setEventName(String EventName) {
this.EventName = EventName;
}
public DeleteStreamLivePlanRequest() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public DeleteStreamLivePlanRequest(DeleteStreamLivePlanRequest source) {
if (source.ChannelId != null) {
this.ChannelId = new String(source.ChannelId);
}
if (source.EventName != null) {
this.EventName = new String(source.EventName);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "ChannelId", this.ChannelId);
this.setParamSimple(map, prefix + "EventName", this.EventName);
}
}
|
[
"tencentcloudapi@tencent.com"
] |
tencentcloudapi@tencent.com
|
54876e8dbb2278df1b3e1f6b6bcb74e2c33cbf52
|
e81b41f0fa6eb32067267decba524a3e2aab1500
|
/Chapter1/Bai2.java
|
de91f60c9850a9df653be1f41bf0802dc5c63557
|
[] |
no_license
|
phongdz-cloud/Java-Core
|
a83eb9284e403c189da552b2a2563fbe791e4faf
|
6799b5388d013bb40fc2358e3211f81befa70cb6
|
refs/heads/master
| 2023-06-17T03:31:39.608378
| 2021-07-09T05:18:04
| 2021-07-09T05:18:04
| 381,699,062
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 370
|
java
|
import java.util.Scanner;
//Nhập vào số nguyên n, xuất ra giá trị tuyệt đối của n
public class Bai2 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
System.out.println(solution(n));
}
static int solution(int n)
{
return Math.abs(n);
}
}
|
[
"74032468+phongdz-cloud@users.noreply.github.com"
] |
74032468+phongdz-cloud@users.noreply.github.com
|
fd7c28fe2fe3b9446cc9ce8c2a25f175b8829872
|
eb9f655206c43c12b497c667ba56a0d358b6bc3a
|
/platform/platform-impl/src/com/intellij/openapi/options/newEditor/ConfigurableProjectProvider.java
|
da5f4409cca3b6f0bfc3fedeb14bc83794ac3dcc
|
[
"Apache-2.0"
] |
permissive
|
JetBrains/intellij-community
|
2ed226e200ecc17c037dcddd4a006de56cd43941
|
05dbd4575d01a213f3f4d69aa4968473f2536142
|
refs/heads/master
| 2023-09-03T17:06:37.560889
| 2023-09-03T11:51:00
| 2023-09-03T12:12:27
| 2,489,216
| 16,288
| 6,635
|
Apache-2.0
| 2023-09-12T07:41:58
| 2011-09-30T13:33:05
| null |
UTF-8
|
Java
| false
| false
| 469
|
java
|
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.options.newEditor;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Nullable;
@ApiStatus.Internal
@ApiStatus.Experimental
public interface ConfigurableProjectProvider {
@Nullable Project getProject();
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
e85089a7e2d792f42f2229fc69996eaad2172b72
|
26eeb0e4d339ebc6f5b1dda4b3d32b621bdcb69b
|
/src/main/java/com/github/vaerys/commands/pixels/EditXp.java
|
a9b837e9fc17bc85a7dedf5b1154ea073098ca2d
|
[] |
no_license
|
Lyrth/DiscordSailv2
|
44c1c5f90c58ab6cd5724446647918ab5be44375
|
0b8a2b83258055fb0ff02c7e95f1531c265795a2
|
refs/heads/Lyrth-Test
| 2021-07-10T13:55:08.980831
| 2018-08-26T04:33:01
| 2018-08-26T04:33:01
| 131,976,464
| 0
| 0
| null | 2018-10-17T09:33:58
| 2018-05-03T10:01:56
|
Java
|
UTF-8
|
Java
| false
| false
| 7,416
|
java
|
package com.github.vaerys.commands.pixels;
import com.github.vaerys.enums.ChannelSetting;
import com.github.vaerys.enums.SAILType;
import com.github.vaerys.handlers.GuildHandler;
import com.github.vaerys.main.Constants;
import com.github.vaerys.main.Utility;
import com.github.vaerys.masterobjects.CommandObject;
import com.github.vaerys.masterobjects.UserObject;
import com.github.vaerys.objects.userlevel.ProfileObject;
import com.github.vaerys.objects.utils.SubCommandObject;
import com.github.vaerys.templates.Command;
import sx.blah.discord.handle.obj.Permissions;
/**
* Created by AndrielChaoti 22-Aug-17
*/
public class EditXp extends Command {
private static final SubCommandObject SET_XP = new SubCommandObject(
new String[]{"SetPixels", "SetXp"},
"[@User] [Amount]",
"Set's the user's pixels to the amount specified.",
SAILType.PIXEL
);
private static final SubCommandObject DEL_XP = new SubCommandObject(
new String[]{"RemovePixels", "SubPixels", "RemoveXp", "SubXp"},
"[@User] [Amount]",
"Removes the specified amount of pixels from the user's profile.",
SAILType.PIXEL
);
private static final SubCommandObject ADD_XP = new SubCommandObject(
new String[]{"AddPixels", "AddXp"},
"[@User] [Amount]",
"Adds the specified amount of pixels to the user's profile.",
SAILType.PIXEL
);
@Override
public String execute(String args, CommandObject command) {
String[] splitArgs = args.split(" ");
boolean xpChanged = false;
UserObject user = Utility.getUser(command, splitArgs[0], false);
if (user == null) return "> Could not find user.";
if (Utility.testUserHierarchy(user, command.user, command.guild)) {
return "> You do not have permission to edit " + user.displayName + "'s pixels.";
}
long pixelAmount;
try {
if (isSubType(command)) {
if (splitArgs.length < 2) return getMissingArgsSubCommand(command);
pixelAmount = Long.parseLong(splitArgs[1]);
} else {
if (splitArgs.length < 3) return missingArgs(command);
pixelAmount = Long.parseLong(splitArgs[2]);
}
} catch (NumberFormatException e) {
String value = isSubType(command) ? splitArgs[1] : splitArgs[2];
return "> **" + value + "** Not a valid Number.";
}
if (pixelAmount < 0) return "> I don't know what negative pixels are. What are you trying to do?";
if (pixelAmount > Constants.PIXELS_CAP)
return "> That's too many pixels for me to be working with. (Max: " + Constants.PIXELS_CAP + ")";
ProfileObject profile = user.getProfile(command.guild);
if (profile == null) return "> " + user.displayName + " doesn't have a profile yet.";
String out;
if (SET_XP.isSubCommand(command)) {
out = setXp(profile, pixelAmount, user);
xpChanged = true;
} else if (ADD_XP.isSubCommand(command)) {
out = addXp(profile, pixelAmount, user);
xpChanged = true;
} else if (DEL_XP.isSubCommand(command)) {
out = delXp(profile, pixelAmount, user);
xpChanged = true;
} else {
String modif = splitArgs[1].toLowerCase();
switch (modif) {
case "+":
case "add":
out = addXp(profile, pixelAmount, user);
xpChanged = true;
break;
case "-":
case "rem":
case "sub":
out = delXp(profile, pixelAmount, user);
xpChanged = true;
break;
case "=":
case "set":
out = setXp(profile, pixelAmount, user);
xpChanged = true;
break;
default:
out = "> Invalid modifier. Valid modifiers are **[+/-/=]** or **add/sub/set**";
break;
}
}
if (xpChanged) {
profile.removeLevelFloor();
GuildHandler.checkUsersRoles(user.longID, command.guild);
}
return out;
}
private String addXp(ProfileObject profile, long pixelAmount, UserObject user) {
long diff = Constants.PIXELS_CAP - (profile.getXP());
profile.setXp(profile.getXP() + pixelAmount);
//pixels should never go over the pixel cap.
if (profile.getXP() > Constants.PIXELS_CAP) {
profile.setXp(Constants.PIXELS_CAP);
return "> Added **" + diff + "** pixels to **" + user.displayName + "**. They are now at the Pixel cap.";
}
return "> Added **" + pixelAmount + "** pixels to **" + user.displayName + "**.";
}
private String setXp(ProfileObject profile, long pixelAmount, UserObject user) {
profile.setXp(pixelAmount);
return "> Set Pixels to **" + pixelAmount + "** for user **" + user.displayName + "**.";
}
private String delXp(ProfileObject profile, long pixelAmount, UserObject user) {
profile.setXp(profile.getXP() - pixelAmount);
// Special handling if XP is set below 0
if (profile.getXP() < 0) {
long diff = pixelAmount + profile.getXP();
profile.setXp(0);
return "> Removed **" + diff + "** Pixels from **" + user.displayName + "**. They no longer have any pixels.";
}
return "> Removed **" + pixelAmount + "** pixels from **" + user.displayName + "**.";
}
private String getMissingArgsSubCommand(CommandObject command) {
for (SubCommandObject s : subCommands) {
if (s.isSubCommand(command)) {
return ">> **" + s.getUsage() + "** <<";
}
}
return missingArgs(command);
}
private boolean isSubType(CommandObject command) {
for (SubCommandObject s : subCommands) {
if (s.isSubCommand(command)) return true;
}
return false;
}
@Override
protected String[] names() {
return new String[]{"EditPixels", "EditXp"};
}
@Override
public String description(CommandObject command) {
String modifiers = "\n**Modifiers**:\n" +
"> +/add - `Add [Pixels] pixels.`\n" +
"> -/sub - `Remove [Pixels] pixels.`\n" +
"> =/set - `Set pixels to [Pixels].`\n";
return "Allows you to add or remove pixels from a user." + modifiers;
}
@Override
protected SAILType type() {
return SAILType.PIXEL;
}
@Override
protected ChannelSetting channel() {
return null;
}
@Override
protected Permissions[] perms() {
return new Permissions[]{Permissions.MANAGE_ROLES, Permissions.MANAGE_MESSAGES};
}
@Override
protected String usage() {
return "[@User] [modifier] [Pixels]";
}
@Override
protected boolean doAdminLogging() {
return true;
}
@Override
protected boolean requiresArgs() {
return true;
}
@Override
public void init() {
subCommands.add(SET_XP);
subCommands.add(ADD_XP);
subCommands.add(DEL_XP);
}
}
|
[
"thelegotechhead@yahoo.com.au"
] |
thelegotechhead@yahoo.com.au
|
2cec0293991b74b36a221d8a0bcb2afafa478955
|
90f17cd659cc96c8fff1d5cfd893cbbe18b1240f
|
/src/main/java/io/invertase/firebase/perf/RNFirebasePerformancePackage.java
|
705e114214290bc66006a0e79b22602c7a7a01eb
|
[] |
no_license
|
redpicasso/fluffy-octo-robot
|
c9b98d2e8745805edc8ddb92e8afc1788ceadd08
|
b2b62d7344da65af7e35068f40d6aae0cd0835a6
|
refs/heads/master
| 2022-11-15T14:43:37.515136
| 2020-07-01T22:19:16
| 2020-07-01T22:19:16
| 276,492,708
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 814
|
java
|
package io.invertase.firebase.perf;
import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class RNFirebasePerformancePackage implements ReactPackage {
public List<NativeModule> createNativeModules(ReactApplicationContext reactApplicationContext) {
List<NativeModule> arrayList = new ArrayList();
arrayList.add(new RNFirebasePerformance(reactApplicationContext));
return arrayList;
}
public List<ViewManager> createViewManagers(ReactApplicationContext reactApplicationContext) {
return Collections.emptyList();
}
}
|
[
"aaron@goodreturn.org"
] |
aaron@goodreturn.org
|
c30c0dcde900e613330061134907ea494e8cd4a3
|
73771682c5666e41315ca88910039feeaf097157
|
/caliper-runner/src/main/java/com/google/caliper/runner/target/ProxyConnectionService.java
|
3432ce770c5f8663c80387545f55f3a2bf47e78e
|
[
"Apache-2.0"
] |
permissive
|
pdhung3012/caliper
|
94b49c2187768406694124fdae14ae91998aa8e4
|
55b07aa675d19b47f246b4e5e45235d45093db8e
|
refs/heads/master
| 2020-07-04T20:15:39.124355
| 2019-08-14T18:22:04
| 2019-08-14T18:22:04
| 202,401,793
| 0
| 0
|
Apache-2.0
| 2019-08-14T18:07:51
| 2019-08-14T18:07:50
| null |
UTF-8
|
Java
| false
| false
| 7,120
|
java
|
/*
* Copyright (C) 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.caliper.runner.target;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly;
import static java.util.concurrent.TimeUnit.SECONDS;
import com.google.caliper.bridge.KillVmRequest;
import com.google.caliper.bridge.OpenedSocket;
import com.google.caliper.bridge.RemoteClasspathMessage;
import com.google.caliper.bridge.StartVmRequest;
import com.google.caliper.bridge.StopProxyRequest;
import com.google.caliper.bridge.VmStoppedMessage;
import com.google.caliper.runner.server.ServerSocketService;
import com.google.common.io.Closer;
import com.google.common.util.concurrent.AbstractExecutionThreadService;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import javax.inject.Inject;
/**
* Service for managing a connection to a proxy for the Caliper runner running on a remote device.
*/
final class ProxyConnectionService extends AbstractExecutionThreadService {
private final UUID proxyId = UUID.randomUUID();
private final ServerSocketService server;
private final Closer closer = Closer.create();
private OpenedSocket.Reader reader;
private OpenedSocket.Writer writer;
private final SettableFuture<String> classpathFuture = SettableFuture.create();
private final ConcurrentMap<UUID, VmProxy> vms = new ConcurrentHashMap<>();
@Inject
ProxyConnectionService(ServerSocketService server) {
this.server = server;
}
/** Returns the random UUID that identifies this proxy connection. */
public UUID proxyId() {
return proxyId;
}
@Override
public void startUp() throws IOException, ExecutionException, InterruptedException {
// Some other class should have handled starting the proxy process, so just wait for it to
// open its connection to us.
OpenedSocket socket = server.getConnection(proxyId).get();
this.reader = closer.register(socket.reader());
this.writer = closer.register(socket.writer());
}
@Override
public void run() throws IOException {
while (isRunning()) {
Object message = reader.read();
if (message == null) {
return;
}
if (message instanceof VmStoppedMessage) {
VmStoppedMessage stoppedMessage = (VmStoppedMessage) message;
UUID vmId = stoppedMessage.vmId();
VmProxy vm = vms.remove(vmId);
if (vm != null) {
vm.stopped(stoppedMessage.exitCode());
}
} else if (message instanceof RemoteClasspathMessage) {
classpathFuture.set(((RemoteClasspathMessage) message).classpath());
}
}
}
/** Returns the classpath to use for processes on the remote device. */
public String getRemoteClasspath() throws ExecutionException {
return getUninterruptibly(classpathFuture);
}
/**
* Starts a VM by sending the given request and return a {@link VmProcess} instance representing
* that VM.
*/
public VmProcess startVm(StartVmRequest request) throws ExecutionException, IOException {
// Create the proxy for the VM first so that it's already in the map so there's no possibility
// of a race with the process exiting and sending a VmStoppedMessage back.
VmProxy vm = new VmProxy(request.vmId(), request.stdoutId(), request.stderrId());
vms.put(request.vmId(), vm);
// Send the request to actually start the VM.
writer.write(request);
vm.awaitStarted();
return vm;
}
private void waitForAllVmsToExit(long timeout, TimeUnit unit) {
if (vms.isEmpty()) {
return;
}
List<ListenableFuture<?>> exitFutures = new ArrayList<>();
for (VmProxy vm : vms.values()) {
exitFutures.add(vm.exitCode);
}
ListenableFuture<?> allExited = Futures.allAsList(exitFutures);
try {
allExited.get(timeout, unit);
} catch (Exception ignore) {
// oh well
return;
}
// ensure the shutdown hooks are removed
for (VmProxy vm : vms.values()) {
try {
vm.awaitExit();
} catch (InterruptedException e) {
throw new AssertionError(e);
}
}
}
@Override
protected void triggerShutdown() {
try {
writer.write(new StopProxyRequest());
} catch (IOException ignore) {
// well, we'll exit anyway
}
}
@Override
public void shutDown() throws IOException {
// they should probably have already exited, but just to be safe
waitForAllVmsToExit(5, SECONDS);
closer.close();
}
/** Proxy for a VM process running on the remote device. */
private final class VmProxy extends VmProcess {
private final UUID vmId;
private final UUID stdoutId;
private final UUID stderrId;
private volatile InputStream stdout;
private volatile InputStream stderr;
private final SettableFuture<Integer> exitCode = SettableFuture.create();
VmProxy(UUID vmId, UUID stdoutId, UUID stderrId) {
this.vmId = checkNotNull(vmId);
this.stdoutId = checkNotNull(stdoutId);
this.stderrId = checkNotNull(stderrId);
}
/** Waits for the stdout/stderr connections to be established. */
void awaitStarted() throws ExecutionException {
this.stdout = getUninterruptibly(server.getInputStream(stdoutId));
this.stderr = getUninterruptibly(server.getInputStream(stderrId));
}
/** Sets the exit code of the process, unblocking {@code awaitExit()}. */
void stopped(int exitCode) {
this.exitCode.set(exitCode);
}
@Override
public InputStream stdout() {
return stdout;
}
@Override
public InputStream stderr() {
return stderr;
}
@Override
protected int doAwaitExit() throws InterruptedException {
try {
return exitCode.get();
} catch (ExecutionException e) {
throw new RuntimeException(e);
}
}
@Override
protected void doKill() {
try {
writer.write(KillVmRequest.create(vmId));
} catch (IOException e) {
throw new RuntimeException(e);
}
}
@Override
public String toString() {
return "VmProxy{vmId=" + vmId + "}";
}
}
}
|
[
"shapiro.rd@gmail.com"
] |
shapiro.rd@gmail.com
|
215df552e9c1ae5cc3be85a2ecea1be221d23907
|
67322ffaef15475611b410685097bd138be28c54
|
/timesheet/src/main/java/com/fastcode/timesheet/application/extended/usertask/IUsertaskMapperExtended.java
|
e3754903516e9cd5ae06041b9e112df3595a89b2
|
[] |
no_license
|
fastcoderepos/usman5-sampleApplication4
|
f094d4919b9cd416e3fa0cb04583ecd3887dcbcf
|
ad6df9a472981a860a0bab4af4f0b5afc77302f5
|
refs/heads/master
| 2023-03-21T04:02:53.642221
| 2021-03-18T08:44:27
| 2021-03-18T08:44:27
| 349,000,392
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 269
|
java
|
package com.fastcode.timesheet.application.extended.usertask;
import com.fastcode.timesheet.application.core.usertask.IUsertaskMapper;
import org.mapstruct.Mapper;
@Mapper(componentModel = "spring")
public interface IUsertaskMapperExtended extends IUsertaskMapper {}
|
[
"info@nfinityllc.com"
] |
info@nfinityllc.com
|
30751919edc4a409efd4cd4b0d571aaad1a9bbce
|
019edd34f4e9a6086a17f9dbc4606e08bb76557b
|
/io.reactivex.core/src/io/reactivex/core/internal/operators/completable/CompletableResumeNext.java
|
ad561665c72aef8f5b512a883207aafe17749990
|
[
"Apache-2.0"
] |
permissive
|
Prerna11082/rxjava
|
7f74c920789ac6486d1278b6e4f6a9d09935e900
|
2b5d4b55ad112d38a3599d4981fb2d35da6978f5
|
refs/heads/master
| 2020-04-06T13:29:23.714616
| 2018-11-21T17:46:04
| 2018-11-21T17:46:04
| 157,502,034
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,496
|
java
|
/**
* Copyright (c) 2016-present, RxJava Contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
* the License for the specific language governing permissions and limitations under the License.
*/
package io.reactivex.core.internal.operators.completable;
import io.reactivex.common.disposables.Disposable; import io.reactivex.core.*;
import io.reactivex.common.exceptions.CompositeException;
import io.reactivex.common.exceptions.Exceptions;
import io.reactivex.common.functions.Function;
import io.reactivex.common.internal.functions.ObjectHelper;
import io.reactivex.core.Completable;
import io.reactivex.core.CompletableObserver;
import io.reactivex.core.CompletableSource;
import io.reactivex.core.internal.disposables.DisposableHelper;
import java.util.concurrent.atomic.AtomicReference;
public final class CompletableResumeNext extends Completable {
final CompletableSource source;
final Function<? super Throwable, ? extends CompletableSource> errorMapper;
public CompletableResumeNext(CompletableSource source,
Function<? super Throwable, ? extends CompletableSource> errorMapper) {
this.source = source;
this.errorMapper = errorMapper;
}
@Override
protected void subscribeActual(final CompletableObserver observer) {
ResumeNextObserver parent = new ResumeNextObserver(observer, errorMapper);
observer.onSubscribe(parent);
source.subscribe(parent);
}
static final class ResumeNextObserver
extends AtomicReference<Disposable>
implements CompletableObserver, Disposable {
private static final long serialVersionUID = 5018523762564524046L;
final CompletableObserver downstream;
final Function<? super Throwable, ? extends CompletableSource> errorMapper;
boolean once;
ResumeNextObserver(CompletableObserver observer, Function<? super Throwable, ? extends CompletableSource> errorMapper) {
this.downstream = observer;
this.errorMapper = errorMapper;
}
@Override
public void onSubscribe(Disposable d) {
DisposableHelper.replace(this, d);
}
@Override
public void onComplete() {
downstream.onComplete();
}
@Override
public void onError(Throwable e) {
if (once) {
downstream.onError(e);
return;
}
once = true;
CompletableSource c;
try {
c = ObjectHelper.requireNonNull(errorMapper.apply(e), "The errorMapper returned a null CompletableSource");
} catch (Throwable ex) {
Exceptions.throwIfFatal(ex);
downstream.onError(new CompositeException(e, ex));
return;
}
c.subscribe(this);
}
@Override
public boolean isDisposed() {
return DisposableHelper.isDisposed(get());
}
@Override
public void dispose() {
DisposableHelper.dispose(this);
}
}
}
|
[
"sumersingh@PS-MacBook.local"
] |
sumersingh@PS-MacBook.local
|
aa2d40ece808403fd9551643e886759e6c233dde
|
13c07fc7b43542f4b91c2697c282f398a28e4099
|
/tests-arquillian/src/test/java/org/jboss/weld/tests/internal/contructs/WeldInternalConstructsTest.java
|
6974b3d4226208f492b10505c2152d5f60af9e64
|
[
"Apache-2.0"
] |
permissive
|
Mattlk13/core
|
d889253fa1d1815ffbfea21dcc077616766eb3bb
|
6c369e15b89d25ce33151f5f5db91c57e916c68a
|
refs/heads/master
| 2023-08-18T03:11:48.024635
| 2020-03-28T12:23:48
| 2020-03-28T12:23:48
| 81,315,189
| 0
| 0
|
Apache-2.0
| 2023-05-01T20:35:07
| 2017-02-08T10:01:42
|
Java
|
UTF-8
|
Java
| false
| false
| 7,064
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2017, Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jboss.weld.tests.internal.contructs;
import java.util.Set;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
import javax.inject.Inject;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.BeanArchive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.weld.bean.WeldBean;
import org.jboss.weld.proxy.WeldClientProxy;
import org.jboss.weld.proxy.WeldConstruct;
import org.jboss.weld.test.util.Utils;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
/**
* A test set covering WELD-1914. All our subclasses/proxies should implement {@link WeldContruct} and client proxies should
* also implement {@link WeldClientProxy}. This test asserts this as well as functionality of methods in
* {@link WeldClientProxy}.
*
* @author <a href="mailto:manovotn@redhat.com">Matej Novotny</a>
*/
@RunWith(Arquillian.class)
public class WeldInternalConstructsTest {
@Deployment
public static Archive getDeployment() {
return ShrinkWrap.create(BeanArchive.class, Utils.getDeploymentNameAsHash(WeldInternalConstructsTest.class))
.addPackage(WeldInternalConstructsTest.class.getPackage());
}
@Inject
BeanHolder holder;
@Inject
BeanManager bm;
@Test
public void testClientProxyBean() {
ClientProxyBean clientProxyBean = holder.getClientProxyBean();
// trigger proxy creation
clientProxyBean.ping();
// injected bean should be instance of WeldConstruct and WeldClientProxy
Assert.assertTrue(clientProxyBean instanceof WeldConstruct);
Assert.assertTrue(clientProxyBean instanceof WeldClientProxy);
// cast to WeldClientProxy and test the methods
WeldClientProxy wcp = (WeldClientProxy) clientProxyBean;
WeldClientProxy.Metadata cm = wcp.getMetadata();
Object contextualInstance = cm.getContextualInstance();
// kind of indirect check that this is the actual contextual instance
Assert.assertTrue(contextualInstance instanceof ClientProxyBean);
Assert.assertFalse(contextualInstance instanceof WeldConstruct);
Bean<?> bean = cm.getBean();
Set<Bean<?>> beans = bm.getBeans(ClientProxyBean.class);
Assert.assertEquals(1, beans.size());
Assert.assertEquals(((WeldBean) beans.iterator().next()).getIdentifier().asString(), ((WeldBean) bean).getIdentifier().asString());
}
@Test
public void testInterceptedDependentBean() {
InterceptedDependentBean interceptedBean = holder.getInterceptedDependentBean();
// trigger interception and assert it works
Assert.assertTrue(interceptedBean.ping());
// should be instance of WeldConstruct but NOT WeldClientProxy
Assert.assertTrue(interceptedBean instanceof WeldConstruct);
Assert.assertFalse(interceptedBean instanceof WeldClientProxy);
}
@Test
public void testDecoratedDependentBean() {
DecoratedDependentBean decoratedBean = holder.getDecoratedDependentBean();
// trigger decoration and assert it works
Assert.assertTrue(decoratedBean.ping());
// should be instance of WeldConstruct but NOT WeldClientProxy
Assert.assertTrue(decoratedBean instanceof WeldConstruct);
Assert.assertFalse(decoratedBean instanceof WeldClientProxy);
}
@Test
public void testDecoratedProxiedBean() {
DecoratedProxiedBean decoratedBean = holder.getDecoratedProxiedBean();
// trigger decoration and assert it works
Assert.assertTrue(decoratedBean.ping());
// should be instance of WeldConstruct and WeldClientProxy
Assert.assertTrue(decoratedBean instanceof WeldConstruct);
Assert.assertTrue(decoratedBean instanceof WeldClientProxy);
// cast to WeldClientProxy and test the methods
WeldClientProxy wcp = (WeldClientProxy) decoratedBean;
WeldClientProxy.Metadata cm = wcp.getMetadata();
Object contextualInstance = cm.getContextualInstance();
// kind of indirect check that this is the actual contextual instance
Assert.assertTrue(contextualInstance instanceof DecoratedProxiedBean);
Assert.assertFalse(contextualInstance instanceof WeldClientProxy);
// NOTE - contextual instance is still a Weld subclass because of interception/decoration
Assert.assertTrue(contextualInstance instanceof WeldConstruct);
Bean<?> bean = cm.getBean();
Set<Bean<?>> beans = bm.getBeans(DecoratedProxiedBean.class);
Assert.assertEquals(1, beans.size());
Assert.assertEquals(((WeldBean) beans.iterator().next()).getIdentifier().asString(), ((WeldBean) bean).getIdentifier().asString());
}
@Test
public void testInterceptedProxiedBean() {
InterceptedProxiedBean interceptedBean = holder.getInterceptedProxiedBean();
// trigger interception and assert it works
Assert.assertTrue(interceptedBean.ping());
// should be instance of WeldConstruct and WeldClientProxy
Assert.assertTrue(interceptedBean instanceof WeldConstruct);
Assert.assertTrue(interceptedBean instanceof WeldClientProxy);
// cast to WeldClientProxy and test the methods
WeldClientProxy wcp = (WeldClientProxy) interceptedBean;
WeldClientProxy.Metadata cm = wcp.getMetadata();
Object contextualInstance = cm.getContextualInstance();
// kind of indirect check that this is the actual contextual instance
Assert.assertTrue(contextualInstance instanceof InterceptedProxiedBean);
Assert.assertFalse(contextualInstance instanceof WeldClientProxy);
// NOTE - contextual instance is still a Weld subclass because of interception/decoration
Assert.assertTrue(contextualInstance instanceof WeldConstruct);
Bean<?> bean = cm.getBean();
Set<Bean<?>> beans = bm.getBeans(InterceptedProxiedBean.class);
Assert.assertEquals(1, beans.size());
Assert.assertEquals(((WeldBean) beans.iterator().next()).getIdentifier().asString(), ((WeldBean) bean).getIdentifier().asString());
}
}
|
[
"mkouba@redhat.com"
] |
mkouba@redhat.com
|
c904ca63e87f54a30ec05abd5a7becf120afe8d0
|
7b733d7be68f0fa4df79359b57e814f5253fc72d
|
/system/services/src/com/percussion/services/utils/jsf/validators/PSNameValidator.java
|
8c3d81c7eaf7b9a0fc23bf0a155fa3c9f21eea02
|
[
"LicenseRef-scancode-dco-1.1",
"Apache-2.0",
"OFL-1.1",
"LGPL-2.0-or-later"
] |
permissive
|
percussion/percussioncms
|
318ac0ef62dce12eb96acf65fc658775d15d95ad
|
c8527de53c626097d589dc28dba4a4b5d6e4dd2b
|
refs/heads/development
| 2023-08-31T14:34:09.593627
| 2023-08-31T14:04:23
| 2023-08-31T14:04:23
| 331,373,975
| 18
| 6
|
Apache-2.0
| 2023-09-14T21:29:25
| 2021-01-20T17:03:38
|
Java
|
UTF-8
|
Java
| false
| false
| 1,884
|
java
|
/*
* Copyright 1999-2023 Percussion Software, 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.percussion.services.utils.jsf.validators;
import com.percussion.utils.string.PSStringUtils;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.validator.ValidatorException;
/**
* Validates a name.
*
* @author dougrand
*
*/
public class PSNameValidator extends PSBaseValidator
{
@SuppressWarnings("unused")
public void validate(FacesContext ctx, UIComponent comp, Object value)
throws ValidatorException
{
String str = getString(value, true);
Character ch = PSStringUtils.validate(str, PSStringUtils.SPACE_CHARS);
if (ch != null)
{
fail(FacesMessage.SEVERITY_ERROR, "space character is not allowed");
}
else
{
if (!PSStringUtils.validateNameStart(str))
{
fail(FacesMessage.SEVERITY_ERROR, "'" + str.charAt(0)
+ "' character is not allowed at the beginning of a name.");
}
ch = PSStringUtils.validate(str, PSStringUtils.INVALID_NAME_CHARS);
if (ch != null)
{
fail(FacesMessage.SEVERITY_ERROR, "'" + ch
+ "' character is not allowed.");
}
}
}
}
|
[
"nate.chadwick@gmail.com"
] |
nate.chadwick@gmail.com
|
97afcb6e20d91daada056ed1ff9327b4b46d4f60
|
ce3eb64bf344cfb2c7384a95493fc09b5af5f296
|
/source/es/uco/WOW/Utils/Student.java
|
4c176f4564c775735cb9a21f373d23b947aac96b
|
[
"MIT"
] |
permissive
|
ngphloc/zebra
|
d8da06eb4578bac5af69c381c1b7462a08bf37af
|
2d99addaaec70d29bb9ed9ffcef95425ffb88bd0
|
refs/heads/master
| 2022-05-25T06:22:32.342128
| 2022-05-03T02:49:06
| 2022-05-03T02:49:06
| 41,139,150
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,910
|
java
|
package es.uco.WOW.Utils;
import java.io.Serializable;
import java.util.Vector;
/**
* <p>Title: Wow! TestEditor</p>
* <p>Description: Herramienta para la edicion de preguntas tipo test adaptativas </p>
* <p>Copyright: Copyright (c) 2008</p>
* <p>Company: Universidad de C�rdoba (Espa�a), University of Science</p>
*
* @version 1.0
*/
/**
* NAME: Student
* FUNCTION: This class contains the necessary data to manage
* all the information about the log file of a student.
* LAST MODIFICATION: 06-02-2008
*
* @author Isaac R�der Jim�nez, reviewed by Phuoc-Loc Nguyen
*/
public class Student implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* Student's login.
*/
private String login = "";
/**
* Name or login of the student.
*/
private String name = "";
/**
* Name of the student's log file
*/
private String fileName = "";
/**
* Relative path to the student's log file
*/
private String path = "";
/**
* Name of the course where this file is located
*/
private String course = "";
/**
* Total number of classic tests done by the student
*/
private int totalClassicTest = 0;
/**
* Total number of adaptive tests done by the student
*/
private int totalAdaptiveTest = 0;
/**
* This is a list where each position stores a TestLogStudent
* object with information about all the tests done by the student
*/
private Vector test = null;
/**
* Returns the name of the course where this file is located
* @return String
*/
public String getCourse() {
return course.trim();
}
/**
* Returns the name of the file of the student
* @return String
*/
public String getFileName() {
return fileName.trim();
}
/**
* Returns the login of the student
* @return String
*/
public String getLogin() {
return login.trim();
}
/**
* Returns the name of the student
* @return String
*/
public String getName() {
return name.trim();
}
/**
* Returns the relative path to this file
* @return String
*/
public String getPath() {
return path.trim();
}
/**
* Returns a Vector object with a list
* of TestLogStudent objects that contains which
* test the student has done.
* @return Vector
*/
public Vector getTest() {
return test;
}
/**
* Returns the total number of adaptive
* test that the student has done
* @return int
*/
public int getTotalAdaptiveTest() {
return totalAdaptiveTest;
}
/**
* Returns the total number of classic
* test that the student has done
* @return int
*/
public int getTotalClassicTest() {
return totalClassicTest;
}
/**
* Sets the course where this file is located
* @param string
*/
public void setCourse(final String string) {
course = string;
}
/**
* Sets the name of the file where this
* information will be stored
* @param string
*/
public void setFileName(final String string) {
fileName = string;
}
/**
* Sets the student's login
* @param string
*/
public void setLogin(final String string) {
login = string;
}
/**
* Sets the student's name
* @param string
*/
public void setName(final String string) {
name = string;
}
/**
* Sets the relative path to this file
* @param string
*/
public void setPath(final String string) {
path = string;
}
/**
* Sets a Vector with information about
* the test that this student has done
* @param vector
*/
public void setTest(final Vector vector) {
test = vector;
}
/**
* Sets the total number of adaptive
* test that this student has done
* @param i
*/
public void setTotalAdaptiveTest(final int i) {
totalAdaptiveTest = i;
}
/**
* Sets the total number of classic
* test that this student has done
* @param i
*/
public void setTotalClassicTest(final int i) {
totalClassicTest = i;
}
} // End of Student class
|
[
"ngphloc@gmail.com"
] |
ngphloc@gmail.com
|
20867dcff30b27ddac7d430b8e65ed61ae1e0fbe
|
fe94bb01bbaf452ab1752cb3c1d1e4ecf297b9be
|
/src/main/java/com/opencart/entity/rest/OcCartResource.java
|
99d207a20ec9d259fa4893cdcf4c7c06248c1ffe
|
[] |
no_license
|
gmai2006/opencart
|
9d3b037f09294973112bafbadd22d5edd8457de5
|
dba44adabf4b8eab3bdb07062c887ba0a2a5405f
|
refs/heads/master
| 2020-12-31T06:13:33.113098
| 2018-01-24T07:35:45
| 2018-01-24T07:35:45
| 80,637,392
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,280
|
java
|
/*************************************************************************
*
* DATASCIENCE9 LLC CONFIDENTIAL
* __________________
*
* [2018] Datascience9 LLC
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Datascience9 LLC and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Datascience9 LLC
* and its suppliers and may be covered by U.S. and Foreign Patents,
* patents in process, and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Datascience9 LLC.
* @author Paul Mai - Datascience9 LLC
*/
package com.opencart.entity.rest;
import static java.util.Objects.requireNonNull;
import java.util.List;
import java.util.logging.Logger;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.DELETE;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.QueryParam;
import javax.ws.rs.PUT;
import com.google.inject.Inject;
import com.opencart.entity.service.OcCartService;
import com.opencart.entity.service.OcCartServiceImpl;
import com.opencart.entity.OcCart;
@Path("/OcCart")
@Produces(MediaType.APPLICATION_JSON)
/**
* Auto generated RESTful class
*/
public class OcCartResource {
private final Logger logger = Logger.getLogger(this.getClass().getName());
private final OcCartService service;
@Inject
protected OcCartResource(final OcCartService service) {
requireNonNull(service);
this.service = service;
}
@Consumes(MediaType.APPLICATION_JSON)
@Path("/")
@PUT
public OcCart insert(final OcCart obj) {
return service.create(obj);
}
//Should work out of the box as no business required for this method
@Consumes(MediaType.APPLICATION_JSON)
@Path("/")
@POST
public OcCart update(final OcCart obj) {
return service.update(obj);
}
@Path("/")
@DELETE
public void delete(final OcCart obj) {
service.delete(obj);
}
}
|
[
"gmai2006@gmail.com"
] |
gmai2006@gmail.com
|
b9ab8d896d5d2bf23304c750976fa6859614abab
|
0883cd89cdb84e0e5ec2a83199371cdcf9b655a7
|
/basic/day11/demo06/Weapon.java
|
c4ac20d7b2858cb5cc8cd07a89f1876e8a348792
|
[] |
no_license
|
xdiaann/basic_code
|
48d05935172364a8bc133dae7e681816eb73c295
|
0ffc1bef25c240d02ca858a975897805474ceb59
|
refs/heads/master
| 2022-10-02T04:49:50.308137
| 2019-09-01T09:27:50
| 2019-09-01T09:27:50
| 204,382,946
| 0
| 0
| null | 2022-09-01T23:33:01
| 2019-08-26T02:48:27
|
Java
|
UTF-8
|
Java
| false
| false
| 338
|
java
|
package day11.demo06;
public class Weapon {
private String code; // 武器的代号
public Weapon() {
}
public Weapon(String code) {
this.code = code;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}
|
[
"250160399@qq.com"
] |
250160399@qq.com
|
c0846b0720e3ab7f8e2a08db82cf6daf3a3febd7
|
7062160db29da294173fef13c3515e74977c5c24
|
/src/main/java/me/hsgamer/serverrestarter/ServerRestarter.java
|
8a2987defe6177586b1b3764e54cca1ad0ba30ee
|
[] |
no_license
|
HSGamer/ServerRestarter
|
a1213101ba7c63f1ce66cc688f5c99fc219118ab
|
62a604bd09fa337badfd0b4f4ba86a9c7e4513d2
|
refs/heads/master
| 2023-05-05T12:44:14.799418
| 2021-05-13T14:50:30
| 2021-05-13T14:50:30
| 367,067,974
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,812
|
java
|
package me.hsgamer.serverrestarter;
import me.hsgamer.hscore.bukkit.baseplugin.BasePlugin;
import me.hsgamer.hscore.bukkit.utils.MessageUtils;
import me.hsgamer.serverrestarter.command.CheckCommand;
import me.hsgamer.serverrestarter.command.ForceRestartCommand;
import me.hsgamer.serverrestarter.command.ReloadCommand;
import me.hsgamer.serverrestarter.command.SkipCommand;
import me.hsgamer.serverrestarter.config.MainConfig;
import me.hsgamer.serverrestarter.config.MessageConfig;
import me.hsgamer.serverrestarter.manager.RestartManager;
import me.hsgamer.serverrestarter.utils.BungeeUtils;
public final class ServerRestarter extends BasePlugin {
private final MainConfig mainConfig = new MainConfig(this);
private final MessageConfig messageConfig = new MessageConfig(this);
private final RestartManager restartManager = new RestartManager(this);
@Override
public void load() {
mainConfig.setup();
messageConfig.setup();
MessageUtils.setPrefix(MessageConfig.PREFIX::getValue);
BungeeUtils.setPlugin(this);
}
@Override
public void enable() {
BungeeUtils.register();
registerCommand(new ReloadCommand(this));
registerCommand(new ForceRestartCommand(this));
registerCommand(new SkipCommand(this));
registerCommand(new CheckCommand(this));
}
@Override
public void postEnable() {
restartManager.nextSchedule();
}
@Override
public void disable() {
restartManager.stopSchedule();
BungeeUtils.unregister();
}
public MainConfig getMainConfig() {
return mainConfig;
}
public MessageConfig getMessageConfig() {
return messageConfig;
}
public RestartManager getRestartManager() {
return restartManager;
}
}
|
[
"huynhqtienvtag@gmail.com"
] |
huynhqtienvtag@gmail.com
|
b111afc2ea0752efbf50c83860789d1e61e4437a
|
f05bde6d5bdee3e9a07e34af1ce18259919dd9bd
|
/lang_interface/java/com/intel/daal/algorithms/math/tanh/ResultId.java
|
6869d84288dfdb8d8ad888541742d48d0f6915f2
|
[
"Intel",
"Apache-2.0"
] |
permissive
|
HFTrader/daal
|
f827c83b75cf5884ecfb6249a664ce6f091bfc57
|
b18624d2202a29548008711ec2abc93d017bd605
|
refs/heads/daal_2017_beta
| 2020-12-28T19:08:39.038346
| 2016-04-15T17:02:24
| 2016-04-15T17:02:24
| 56,404,044
| 0
| 1
| null | 2016-04-16T20:26:14
| 2016-04-16T20:26:14
| null |
UTF-8
|
Java
| false
| false
| 1,651
|
java
|
/* file: ResultId.java */
/*******************************************************************************
* Copyright 2014-2016 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
package com.intel.daal.algorithms.math.tanh;
/**
* <a name="DAAL-CLASS-ALGORITHMS__TANH__RESULTID"></a>
* \brief Available identifiers of results of the hyperbolic tangent function
*/
public final class ResultId {
/** @private */
static {
System.loadLibrary("JavaAPI");
}
private int _value;
/**
* Constructs the result object identifier using the provided value
* @param value Value of the input object identifier
*/
public ResultId(int value) {
_value = value;
}
/**
* Returns the value corresponding to the result identifier
* @return Value corresponding to the result identifier
*/
public int getValue() {
return _value;
}
private static final int ValueId = 0;
public static final ResultId value = new ResultId(ValueId); /*!< Table to store the result */
}
|
[
"vasily.rubtsov@intel.com"
] |
vasily.rubtsov@intel.com
|
b02b38419c2df986b99f93f12500164c34c9b4d0
|
7b82d70ba5fef677d83879dfeab859d17f4809aa
|
/tmp/sys/rapid-boot/component/captcha/src/main/java/com/handy/captcha/CaptchaResponse.java
|
5d76b883e342f828c32668615d263509d20b12b7
|
[
"LicenseRef-scancode-mulanpsl-1.0-en",
"MulanPSL-1.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
apollowesley/jun_test
|
fb962a28b6384c4097c7a8087a53878188db2ebc
|
c7a4600c3f0e1b045280eaf3464b64e908d2f0a2
|
refs/heads/main
| 2022-12-30T20:47:36.637165
| 2020-10-13T18:10:46
| 2020-10-13T18:10:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 342
|
java
|
package com.handy.captcha;
import lombok.Data;
import java.io.Serializable;
/**
* @author handy
* @Description: {验证码返回参数}
* @date 2019/8/25 13:54
*/
@Data
public class CaptchaResponse implements Serializable {
private String Message;
private String RequestId;
private String BizId;
private String Code;
}
|
[
"wujun728@hotmail.com"
] |
wujun728@hotmail.com
|
bf2bd10eaa5dca8e1c1a873b26c6330a0b032528
|
c43a842691f449d1cd4e80a8305a87c4733e9141
|
/intkey/src/main/java/au/org/ala/delta/intkey/directives/IllustrateTaxaDirective.java
|
eef00d817eaee23251b37e22e2c8ac725e69ea48
|
[] |
no_license
|
AtlasOfLivingAustralia/open-delta
|
7588acd033a2c39bd4dfef44f2b57a4ebd4b5135
|
3188f6af29015efa1b4c1fde46c0ec3bf44da4cd
|
refs/heads/master
| 2023-04-28T15:41:09.946694
| 2017-11-16T00:29:11
| 2017-11-16T00:29:11
| 50,964,310
| 13
| 10
| null | 2023-04-25T18:34:54
| 2016-02-03T01:16:10
|
Java
|
UTF-8
|
Java
| false
| false
| 1,813
|
java
|
/*******************************************************************************
* Copyright (C) 2011 Atlas of Living Australia
* All Rights Reserved.
*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
******************************************************************************/
package au.org.ala.delta.intkey.directives;
import java.util.ArrayList;
import java.util.List;
import au.org.ala.delta.intkey.directives.invocation.IllustrateTaxaDirectiveInvocation;
import au.org.ala.delta.intkey.directives.invocation.BasicIntkeyDirectiveInvocation;
import au.org.ala.delta.intkey.model.IntkeyContext;
public class IllustrateTaxaDirective extends StandardIntkeyDirective {
public IllustrateTaxaDirective() {
super(true, "illustrate", "taxa");
}
@Override
protected List<IntkeyDirectiveArgument<?>> generateArgumentsList(IntkeyContext context) {
List<IntkeyDirectiveArgument<?>> arguments = new ArrayList<IntkeyDirectiveArgument<?>>();
arguments.add(new TaxonListArgument("taxa", null, false, true));
return arguments;
}
@Override
protected List<IntkeyDirectiveFlag> buildFlagsList() {
return null;
}
@Override
protected BasicIntkeyDirectiveInvocation buildCommandObject() {
return new IllustrateTaxaDirectiveInvocation();
}
}
|
[
"chris.flemming.ala@gmail.com@dd429c29-c832-59a0-e864-46e68368aa0b"
] |
chris.flemming.ala@gmail.com@dd429c29-c832-59a0-e864-46e68368aa0b
|
953f419613d34c143bc74f6c0a16a1a3d7e0f54a
|
5932df56e08e9236dc665db0a93498a33c3ce695
|
/Base/src/cat/atridas/antagonista/entities/LocalComponent.java
|
4486cc58650c38bec8f500f733edd69ae04882f7
|
[] |
no_license
|
Atridas/Antagonista
|
c737273fc693def4e004d39a11a7ae04e3636922
|
052e3f8b55f8e77a0f295b5ffca2c0ff1256679c
|
refs/heads/master
| 2021-01-20T06:57:50.344221
| 2012-04-15T12:28:35
| 2012-04-15T12:28:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 518
|
java
|
package cat.atridas.antagonista.entities;
/**
* Local Copy of a component.
*
* @author Isaac 'Atridas' Serrano Guasch
* @since 0.2
*
* @param <T> Final Component Class.
*/
public interface LocalComponent <T extends Component<?>> extends Component<T> {
/**
* Pushes the state of this component into the Global copy.
* @since 0.2
*/
void pushChanges();
/**
* Pulls the changes from the global component into this local copy.
* @since 0.2
*/
void pullChanges();
}
|
[
"none@none"
] |
none@none
|
47a18d99a5b20a511b09204e6ea741c0a53e2611
|
4b1a45f212b5988ebad3ba60631ecb2812e32824
|
/src/main/java/org/fundacionjala/coding/william/CountChar.java
|
e3676bcfc60fae647974a74a8f20f4b1349daf0f
|
[] |
no_license
|
AT-07/coding
|
f8def53865bbf499e9f7a1f66a0fa5ea05176d56
|
467868ac1b457ff54164fda0d2a6b612b43f5a1f
|
refs/heads/develop
| 2020-03-19T18:58:51.640333
| 2018-07-10T20:15:17
| 2018-07-10T20:15:17
| 136,834,518
| 1
| 0
| null | 2018-07-10T20:15:19
| 2018-06-10T18:30:00
|
Java
|
UTF-8
|
Java
| false
| false
| 571
|
java
|
package org.fundacionjala.coding.william;
import java.util.stream.IntStream;
/**
* Class CountChar.
*/
public class CountChar {
/**
* Method that performs the character count of a string.
*
* @param cadena input string.
* @param letra character that we will compare.
* @return returns the number of characters that exist in a string.
*/
public int countChar(final String cadena, final char letra) {
return (int) IntStream.range(0, cadena.length()).filter(i -> cadena.toLowerCase().charAt(i) == letra).count();
}
}
|
[
"carledriss@gmail.com"
] |
carledriss@gmail.com
|
f335275474419bd1afbdf1bfcf525c8fdaa019ba
|
db5c256bbf37ec68ddf6d44c2ed1283eafcdb7f4
|
/weixin-java-channel/src/main/java/me/chanjar/weixin/channel/bean/league/supplier/BizBaseInfo.java
|
39b77daa328c06b2be2ae3940a8a7bf7039f7b3c
|
[
"Apache-2.0"
] |
permissive
|
Wechat-Group/WxJava
|
4d724e7a2669b28f2fe6090e4b3b4a91e9ca3876
|
13f9c64643c72433207ab4b53dd2a43d7b1c23f6
|
refs/heads/develop
| 2023-08-19T01:34:13.885728
| 2023-08-17T04:54:01
| 2023-08-17T04:54:01
| 49,122,742
| 18,244
| 5,637
|
Apache-2.0
| 2023-09-11T02:06:02
| 2016-01-06T08:24:05
|
Java
|
UTF-8
|
Java
| false
| false
| 663
|
java
|
package me.chanjar.weixin.channel.bean.league.supplier;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.Serializable;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 小店基础信息
*
* @author <a href="https://github.com/lixize">Zeyes</a>
*/
@Data
@NoArgsConstructor
public class BizBaseInfo implements Serializable {
private static final long serialVersionUID = 3713638025924977002L;
/** 小店appid */
@JsonProperty("appid")
private String appid;
/** 小店头像 */
@JsonProperty("headimg_url")
private String headimgUrl;
/** 小店昵称 */
@JsonProperty("nickname")
private String nickname;
}
|
[
"binarywang@gmail.com"
] |
binarywang@gmail.com
|
cac06dbcf232a2cfd43e970c5a8f5fe45abf4c61
|
ad4a1409d861bc8694b2dabae7d225ec2fa17ff6
|
/src/com/company/UpDownCasting.java
|
cee9da12071e03ea1deff161b02ace5099864f56
|
[] |
no_license
|
FidelM345/javachafa
|
6bdc4a1b58928291dc4df7c18576787b4a8c0cc7
|
9f0302c27771ab7eb54ee19e024b931d999e25c4
|
refs/heads/main
| 2023-02-23T21:53:39.923193
| 2021-01-19T13:58:48
| 2021-01-19T13:58:48
| 330,126,936
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,535
|
java
|
package com.company;
class EmployeeMaster{
String name;
String gender;
public void workNow(){
System.out.println("I am From the Employee Master");
}
public void workTomorrow(){
System.out.println("Work Tomorrow I am From the Employee Master");
}
}
class StaffChild extends EmployeeMaster{
int age;
public void workNow(){
System.out.println("I am From the Staff Child class");
}
}
public class UpDownCasting {
public static void main(String[] args) {
// write your code here
EmployeeMaster employeeMaster=new StaffChild();
employeeMaster.name="Fidel Omolo from parent";
employeeMaster.gender="Male from parent";
System.out.println("\n");
employeeMaster.workNow();
System.out.println("\n");
employeeMaster.workTomorrow();
System.out.println("\n");
System.out.println(employeeMaster.name);
System.out.println("\n");
System.out.println(employeeMaster.gender);
System.out.println("\n");
//Down Casting----- acts like inheritance you will have access to both the parent and child attributes and properties
// error is displayed we will check it later
/* StaffChild staffChild= (StaffChild) new EmployeeMaster();
System.out.println("Showing the downcasting examples");
System.out.println("\n");
staffChild.workNow();
System.out.println("\n");
staffChild.workTomorrow();*/
}
}
|
[
"fidelomolo7@gmail.com"
] |
fidelomolo7@gmail.com
|
5bdf062aea189c27d57133d80c7169c7c1c56862
|
2bf47b3f02edb1e1cf9c70c689c26e6bb7fdf461
|
/Resurser/medview/medserver/model/CouldNotDeactivateException.java
|
b3f0b51247acda73fcf39bb75fe6fcbd5e083b36
|
[] |
no_license
|
Dazing/MedImager
|
003819ed24a787ea33354d18ecabc23f16458b0a
|
7cecae2e3e7c56aae5446bf955cdb181eab24cf6
|
refs/heads/master
| 2021-01-11T11:58:28.119785
| 2017-06-01T12:47:29
| 2017-06-01T12:47:29
| 79,548,761
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 172
|
java
|
package medview.medserver.model;
public class CouldNotDeactivateException extends Exception
{
public CouldNotDeactivateException(String message)
{
super(message);
}
}
|
[
"carl@chbraw.com"
] |
carl@chbraw.com
|
ad67aec0cd449169a1e7a309d1855a18f0b5baef
|
ef76c178d6154316c7d8115fecdc1198af676052
|
/sfm/src/main/java/org/sfm/reflect/impl/InjectConstructorInstantiator.java
|
a54dd3dab72980204d9351a6eeb592a1981b8050
|
[
"MIT"
] |
permissive
|
raipc/SimpleFlatMapper
|
691e86f8fb48490240719f0d6572995a66e097ef
|
f2b50294886dd520d6e681271b4720dc932dcf50
|
refs/heads/master
| 2020-12-25T12:17:54.161536
| 2016-09-14T20:36:42
| 2016-09-14T20:36:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,449
|
java
|
package org.sfm.reflect.impl;
import org.sfm.reflect.ExecutableInstantiatorDefinition;
import org.sfm.reflect.InstantiatorDefinition;
import org.sfm.reflect.Parameter;
import org.sfm.reflect.Getter;
import org.sfm.reflect.Instantiator;
import org.sfm.utils.ErrorHelper;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.Map;
public final class InjectConstructorInstantiator<S, T> implements Instantiator<S, T> {
private final Constructor<? extends T> constructor;
private final ArgumentBuilder<S> argBuilder;
private final InstantiatorDefinition instantiatorDefinition;
@SuppressWarnings("unchecked")
public InjectConstructorInstantiator(ExecutableInstantiatorDefinition instantiatorDefinition, Map<Parameter, Getter<? super S, ?>> injections) {
this.argBuilder = new ArgumentBuilder<S>(instantiatorDefinition, injections);
this.constructor = (Constructor<? extends T>) instantiatorDefinition.getExecutable();
this.instantiatorDefinition = instantiatorDefinition;
}
@Override
public T newInstance(S s) throws Exception {
try {
return constructor.newInstance(argBuilder.build(s));
} catch(InvocationTargetException e) {
return ErrorHelper.rethrow(e.getCause());
}
}
@Override
public String toString() {
return "InjectConstructorInstantiator{" +
"instantiatorDefinition=" + instantiatorDefinition +
'}';
}
}
|
[
"arnaud.roger@gmail.com"
] |
arnaud.roger@gmail.com
|
69e48e305353584286324d5bff9d65c3b09b1000
|
8b762f35fac2c2b8d9e102afd1e9d7eaa5ad407b
|
/app/src/main/java/com/company/NetSDK/SDKDEV_COMM_CFG_EX.java
|
7ecae77ec27f915db30d7337e2c67b83caee9bac
|
[] |
no_license
|
zlhuang/NFCProject
|
c4b89f18fcaaa93ecbe617f52e44c9803fd56839
|
8363199e0633d81e05044301c8f5cad2a98a0ce0
|
refs/heads/master
| 2021-06-23T11:29:24.768628
| 2017-08-29T07:49:01
| 2017-08-29T07:49:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,930
|
java
|
package com.company.NetSDK;
import java.io.Serializable;
/**
* \if ENGLISH_LANG
* Extended COM configuration structure
* \else
* ��չ�������ýṹ��
* \endif
*/
public class SDKDEV_COMM_CFG_EX implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
/**
* \if ENGLISH_LANG
* Decoder protocol amount
* \else
* �����������
* \endif
*/
public int dwDecProListNum;
/**
* \if ENGLISH_LANG
* Protocol name list
* \else
* Э�����б�
* \endif
*/
public byte DecProName[][] = new byte[FinalVar.SDK_MAX_DECPRO_LIST_SIZE][FinalVar.SDK_MAX_NAME_LEN];
/**
* \if ENGLISH_LANG
* Each decoder current property
* \else
* ����������ǰ����
* \endif
*/
public SDK_485_CFG stDecoder[] = new SDK_485_CFG[FinalVar.SDK_MAX_DECODER_NUM];
/**
* \if ENGLISH_LANG
* 232 function amount
* \else
* 232���ܸ���
* \endif
*/
public int dw232FuncNameNum;
/**
* \if ENGLISH_LANG
* Function name list
* \else
* �������б�
* \endif
*/
public byte s232FuncName[][] = new byte[FinalVar.SDK_MAX_232FUNCS][FinalVar.SDK_MAX_NAME_LEN];
/**
* \if ENGLISH_LANG
* 232 com amount
* \else
* 232���ڸ���
* \endif
*/
public int dw232ComNum;
/**
* \if ENGLISH_LANG
* Current 232 COM property
* \else
* ��232���ڵ�ǰ����
* \endif
*/
public SDK_RS232_CFG st232[] = new SDK_RS232_CFG[FinalVar.SDK_MAX_232_NUM_EX];
public SDKDEV_COMM_CFG_EX() {
for (int i = 0; i < FinalVar.SDK_MAX_DECODER_NUM; i++) {
stDecoder[i] = new SDK_485_CFG();
}
for (int i = 0; i < FinalVar.SDK_MAX_232_NUM_EX; i++) {
st232[i] = new SDK_RS232_CFG();
}
}
}
|
[
"brucejiao@qq.com"
] |
brucejiao@qq.com
|
ac9bd12fb4df1f797930804a184f07c4e227e735
|
ae64a6a2ef2ec228dc00fb3c545d17fe0d01b596
|
/com/socialnmobile/colornote/sync/bc.java
|
f5bd2b2e8997d4b350581b14b84d02d1789da5da
|
[] |
no_license
|
Ravinther/Createnotes
|
1ed5a2a5d8825e2482b17754b152c9a646631a9c
|
2179f634acb5f00402806a672778b52f7508295b
|
refs/heads/master
| 2021-01-20T19:53:12.160695
| 2016-08-15T15:56:32
| 2016-08-15T15:56:32
| 65,744,902
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 242
|
java
|
package com.socialnmobile.colornote.sync;
public final class bc extends cl {
private static final long serialVersionUID = -3079260876106499767L;
public bc(long j, long j2) {
super("expected=" + j + " actual=" + j2);
}
}
|
[
"m.ravinther@yahoo.com"
] |
m.ravinther@yahoo.com
|
a59045292a1de12c6a91ebe44387618f318f70b9
|
fbf27d453d933352a2c8ef76e0445f59e6b5d304
|
/server/src/com/fy/engineserver/newtask/timelimit/TimeLimitOfDay.java
|
22aaf30ad67cc8f2f42fdf558fd8b2f5aa4f58c6
|
[] |
no_license
|
JoyPanda/wangxian_server
|
0996a03d86fa12a5a884a4c792100b04980d3445
|
d4a526ecb29dc1babffaf607859b2ed6947480bb
|
refs/heads/main
| 2023-06-29T05:33:57.988077
| 2021-04-06T07:29:03
| 2021-04-06T07:29:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,759
|
java
|
package com.fy.engineserver.newtask.timelimit;
import java.util.Calendar;
import com.fy.engineserver.newtask.service.TaskConfig;
/**
* 时间限制 每天的aa:bb,cc:dd精确到分
*
*
*/
public class TimeLimitOfDay extends TimeLimit implements TaskConfig {
Calendar start;
Calendar end;
public TimeLimitOfDay(String value) {
String[] split = value.split(",");
if (split == null || split.length != 2) {
throw new IllegalStateException("每天时间限制异常[" + value + "]");
}
String[] startTime = split[0].split(":");
String[] endTime = split[1].split(":");
setLimltType(TASK_TIME_LIMIT_DAY);
start = Calendar.getInstance();
end = Calendar.getInstance();
start.set(Calendar.HOUR_OF_DAY, Integer.valueOf(startTime[0]));
start.set(Calendar.MINUTE, Integer.valueOf(startTime[1]));
end.set(Calendar.HOUR_OF_DAY, Integer.valueOf(endTime[0]));
end.set(Calendar.MINUTE, Integer.valueOf(endTime[1]));
}
@Override
public boolean timeAllow(long time) {
Calendar now = Calendar.getInstance();
if (time != -1) {
now.setTimeInMillis(time);
}
Calendar todayStart = start;
todayStart.set(Calendar.YEAR, now.get(Calendar.YEAR));
todayStart.set(Calendar.MONTH, now.get(Calendar.MONTH));
todayStart.set(Calendar.DAY_OF_YEAR, now.get(Calendar.DAY_OF_YEAR));
Calendar todayEnd = end;
todayEnd.set(Calendar.YEAR, now.get(Calendar.YEAR));
todayEnd.set(Calendar.MONTH, now.get(Calendar.MONTH));
todayEnd.set(Calendar.DAY_OF_YEAR, now.get(Calendar.DAY_OF_YEAR));
if (now.before(todayStart) || now.after(todayEnd)) {
return false;
}
return true;
}
public static void main(String[] args) {
TimeLimitOfDay day = new TimeLimitOfDay("9:33,12:00");
// System.out.println(day.timeAllow());
}
}
|
[
"1414464063@qq.com"
] |
1414464063@qq.com
|
a2ce11f98d34aabd44a1590beb0ff3781b909768
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project70/src/main/java/org/gradle/test/performance70_3/Production70_294.java
|
13f321ed057981d514510ddf34cebf46d749fba8
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 305
|
java
|
package org.gradle.test.performance70_3;
public class Production70_294 extends org.gradle.test.performance16_3.Production16_294 {
private final String property;
public Production70_294() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
65ab4d0662332cb350ce78e819a6cadba10fa235
|
b473c2f1ccf7b67e3d061a2d11e669c33982e7bf
|
/apache-batik/sources/org/apache/batik/parser/DefaultPathHandler.java
|
296ef37629e9b14c523c359653ef6ff5603d7376
|
[
"Apache-2.0"
] |
permissive
|
eGit/appengine-awt
|
4ab046498bad79eddf1f7e74728bd53dc0044526
|
4262657914eceff1fad335190613a272cc60b940
|
refs/heads/master
| 2021-01-01T15:36:07.658506
| 2015-08-26T11:40:24
| 2015-08-26T11:40:24
| 41,421,915
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,822
|
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.batik.parser;
/**
* The class provides an adapter for PathHandler.
*
* @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
* @version $Id: DefaultPathHandler.java 478188 2006-11-22 15:19:17Z dvholten $
*/
public class DefaultPathHandler implements PathHandler {
/**
* The only instance of this class.
*/
public static final PathHandler INSTANCE
= new DefaultPathHandler();
/**
* This class does not need to be instantiated.
*/
protected DefaultPathHandler() {
}
/**
* Implements {@link PathHandler#startPath()}.
*/
public void startPath() throws ParseException {
}
/**
* Implements {@link PathHandler#endPath()}.
*/
public void endPath() throws ParseException {
}
/**
* Implements {@link PathHandler#movetoRel(float,float)}.
*/
public void movetoRel(float x, float y) throws ParseException {
}
/**
* Implements {@link PathHandler#movetoAbs(float,float)}.
*/
public void movetoAbs(float x, float y) throws ParseException {
}
/**
* Implements {@link PathHandler#closePath()}.
*/
public void closePath() throws ParseException {
}
/**
* Implements {@link PathHandler#linetoRel(float,float)}.
*/
public void linetoRel(float x, float y) throws ParseException {
}
/**
* Implements {@link PathHandler#linetoAbs(float,float)}.
*/
public void linetoAbs(float x, float y) throws ParseException {
}
/**
* Implements {@link PathHandler#linetoHorizontalRel(float)}.
*/
public void linetoHorizontalRel(float x) throws ParseException {
}
/**
* Implements {@link PathHandler#linetoHorizontalAbs(float)}.
*/
public void linetoHorizontalAbs(float x) throws ParseException {
}
/**
* Implements {@link PathHandler#linetoVerticalRel(float)}.
*/
public void linetoVerticalRel(float y) throws ParseException {
}
/**
* Implements {@link PathHandler#linetoVerticalAbs(float)}.
*/
public void linetoVerticalAbs(float y) throws ParseException {
}
/**
* Implements {@link
* PathHandler#curvetoCubicRel(float,float,float,float,float,float)}.
*/
public void curvetoCubicRel(float x1, float y1,
float x2, float y2,
float x, float y) throws ParseException {
}
/**
* Implements {@link
* PathHandler#curvetoCubicAbs(float,float,float,float,float,float)}.
*/
public void curvetoCubicAbs(float x1, float y1,
float x2, float y2,
float x, float y) throws ParseException {
}
/**
* Implements {@link
* PathHandler#curvetoCubicSmoothRel(float,float,float,float)}.
*/
public void curvetoCubicSmoothRel(float x2, float y2,
float x, float y) throws ParseException {
}
/**
* Implements {@link
* PathHandler#curvetoCubicSmoothAbs(float,float,float,float)}.
*/
public void curvetoCubicSmoothAbs(float x2, float y2,
float x, float y) throws ParseException {
}
/**
* Implements {@link
* PathHandler#curvetoQuadraticRel(float,float,float,float)}.
*/
public void curvetoQuadraticRel(float x1, float y1,
float x, float y) throws ParseException {
}
/**
* Implements {@link
* PathHandler#curvetoQuadraticAbs(float,float,float,float)}.
*/
public void curvetoQuadraticAbs(float x1, float y1,
float x, float y) throws ParseException {
}
/**
* Implements {@link PathHandler#curvetoQuadraticSmoothRel(float,float)}.
*/
public void curvetoQuadraticSmoothRel(float x, float y)
throws ParseException {
}
/**
* Implements {@link PathHandler#curvetoQuadraticSmoothAbs(float,float)}.
*/
public void curvetoQuadraticSmoothAbs(float x, float y)
throws ParseException {
}
/**
* Implements {@link
* PathHandler#arcRel(float,float,float,boolean,boolean,float,float)}.
*/
public void arcRel(float rx, float ry,
float xAxisRotation,
boolean largeArcFlag, boolean sweepFlag,
float x, float y) throws ParseException {
}
/**
* Implements {@link
* PathHandler#arcAbs(float,float,float,boolean,boolean,float,float)}.
*/
public void arcAbs(float rx, float ry,
float xAxisRotation,
boolean largeArcFlag, boolean sweepFlag,
float x, float y) throws ParseException {
}
}
|
[
"HebnerN@gmail.com"
] |
HebnerN@gmail.com
|
976afdfc57e1f12e4e1bfd988ef78702a728237c
|
97ddf16bd3ef5739279a430a53d28f391c49804e
|
/src/main/java/com/qunar/superoa/utils/ResultUtil.java
|
ce23c030d9700647d05bd329cecbe17e7aee4fc5
|
[
"MIT"
] |
permissive
|
qunarcorp/superoa
|
40acb07a2ca9feabd573aef0cc050ee8e36bc814
|
57896bb2ff8e7f2c006ffa3f28805df21a3c8542
|
refs/heads/master
| 2022-11-28T09:37:47.141823
| 2021-12-26T19:00:55
| 2021-12-26T19:00:55
| 211,114,868
| 19
| 12
|
MIT
| 2022-11-21T22:40:21
| 2019-09-26T14:54:14
|
Java
|
UTF-8
|
Java
| false
| false
| 3,056
|
java
|
package com.qunar.superoa.utils;
import com.google.gson.Gson;
import com.qunar.superoa.controller.BaseController;
import com.qunar.superoa.dto.MobelResult;
import com.qunar.superoa.dto.Result;
import java.util.Map;
import org.springframework.validation.BindingResult;
/**
* @Auther: lee.guo
* @Despriction: result封装工具
*/
public class ResultUtil {
/**
* 返回成功
*/
public static Result success() {
return success(null);
}
/**
* 返回成功 & Data
*/
public static Result success(Object object) {
Result result = new Result();
result.setStatus(0);
result.setMessage("成功");
result.setData(object);
return result;
}
/**
* 移动端 返回成功
*/
public static MobelResult mSuccess() {
return mSuccess(null);
}
/**
* 移动端 返回成功 & Data
*/
public static MobelResult mSuccess(Object object) {
MobelResult result = new MobelResult();
result.setErrcode(0);
result.setMsg("成功");
result.setData(object);
return result;
}
/**
* 返回Gson成功 & Data
*/
public static Result successForGson(Object object) {
return success(new Gson().fromJson(new Gson().toJson(object), Object.class));
}
/**
* 执行传递过来的类中的RUN方法
*/
public static Result run(BaseController object) throws Exception {
return success(object.run());
}
/**
* 执行传递过来的类中的RUN方法 并根据校验信息返回成功或失败
*/
public static Result validAndRun(BindingResult bindingResult, BaseController object)
throws Exception {
if (bindingResult.hasErrors()) {
return error(-2, bindingResult.getFieldError().getDefaultMessage());
}
return success(object.run());
}
/**
* 返回错误信息
*/
public static Result error(Integer code, String msg) {
Result result = new Result();
result.setStatus(code);
result.setMessage(msg);
return result;
}
/**
* 转为Map Result格式
*/
public static Result O2MR(Object object) {
Map<String, Object> map = CommonUtil.o2m(object);
Result result = new Result();
String errcode = map.get("errcode") + "";
Integer code = errcode.indexOf(".") == -1 ? Integer.parseInt(errcode)
: Integer.parseInt(errcode.substring(0, errcode.indexOf(".")));
result.setStatus(code);
result.setMessage(map.get("errmsg") + "");
try {
result.setData(CommonUtil.getMapData(object));
} catch (Exception e) {
result.setData(CommonUtil.getObjectData(object));
}
return result;
}
;
/**
* 转为Array Result格式
*/
public static Result O2AR(Object object) {
Map<String, Object> map = CommonUtil.o2m(object);
Result result = new Result();
String errcode = map.get("errcode") + "";
Integer code = Integer.parseInt(errcode.substring(0, errcode.indexOf(".")));
result.setStatus(code);
result.setMessage(map.get("errmsg") + "");
result.setData(CommonUtil.getListData(object));
return result;
}
;
}
|
[
"20832776@qunar.com"
] |
20832776@qunar.com
|
5ff9d85be24b886cb741ff254c14ffd2b43db7cb
|
d0cca8dc0d1e48b649388564c5a9851c3375333c
|
/src/org/jzl/course/service/GameService.java
|
6f718b6222a94811b3433d401f671b06a004b0c7
|
[] |
no_license
|
j112929/weixin_dasuda
|
f57e8deb65c367fd5dec96e4b61eda81c3360b12
|
21f1228c34668f303b51d7080fc25e734b04dbee
|
refs/heads/master
| 2021-01-10T10:27:34.390378
| 2016-03-14T07:41:14
| 2016-03-14T07:41:14
| 53,471,283
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,454
|
java
|
package org.jzl.course.service;
import java.util.HashMap;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.jzl.course.util.GameUtil;
import org.jzl.course.util.MySQLUtil;
import org.jzl.weixin.pojo.Game;
import org.jzl.weixin.pojo.GameRound;
public class GameService {
public static String process(HttpServletRequest request,String openId,String content){
Game game = MySQLUtil.getLastGame(request, openId);
String gameAnswer = null;
String guessResult = null;
int gameId = -1;
boolean newGameFlag = (null == game || 0 != game.getGameStatus());
if(newGameFlag){
gameAnswer = GameUtil.generateRandNumber();
guessResult = GameUtil.guessResult(gameAnswer, content);
game = new Game();
game.setOpenId(openId);
game.setGameAnswer(gameAnswer);
game.setCreateTime(GameUtil.getStdDateTime());
game.setGameStatus(0);
gameId = MySQLUtil.saveGame(request, game);
}else{
gameAnswer = game.getGameAnswer();
guessResult = GameUtil.guessResult(game.getGameAnswer(), content);
gameId = game.getGameId();
}
GameRound gameRound = new GameRound();
gameRound.setGameId(gameId);
gameRound.setOpenId(openId);
gameRound.setGuessNumber(content);
gameRound.setGuessTime(GameUtil.getStdDateTime());
gameRound.setGuessResult(guessResult);
MySQLUtil.saveGameRound(request, gameRound);
List<GameRound> roundList = MySQLUtil.findAllRoundByGameId(request, gameId);
StringBuffer buffer = new StringBuffer();
buffer.append("查看玩法请回复:help").append("\n");
buffer.append("查看战绩请回复:score").append("\n");
for (int i = 0; i < roundList.size(); i++) {
gameRound = roundList.get(i);
buffer.append(String.format("第%d回合:%s %s", i+1,
gameRound.getGuessNumber(),gameRound.getGuessResult())).append("\n");
}
if("4A0B".equals(guessResult)){
buffer.append("正确答案:").append(gameAnswer).append("\n");
buffer.append("恭喜答对了![强]").append("\n");
buffer.append("重新输入4个不重复的数字开始新的一局。");
MySQLUtil.updateGame(request, gameId, 1, GameUtil.getStdDateTime());
}else if(roundList.size()>=5){
buffer.append("正确答案:").append(gameAnswer).append("\n");
buffer.append("唉,5回合都没猜出来,本局结束![流泪]").append("\n");
buffer.append("重新输入4个不重复的数字开始新的一局。");
MySQLUtil.updateGame(request, gameId, 2, GameUtil.getStdDateTime());
}else{
buffer.append("请再接再厉!");
}
return buffer.toString();
}
public static String getGameRule(){
StringBuffer buffer = new StringBuffer();
buffer.append("《“猜数字”游戏玩法》").append("\n");
buffer.append("系统设定一个没有重复数字的4位数,由玩家来猜,每局10次机会。").append("\n");
buffer.append("每猜一次,系统会给出猜测结果xAyB,x表示数字与位置均正确的数的个数,y表示数字正确但位置不对的数的个数。").append("\n");
buffer.append("玩家根据猜测结果xAyB一直猜,直到猜中(4A0B)为止。").append("\n");
buffer.append("如果10次都没猜中,系统会公布答案,游戏结束。").append("\n");
buffer.append("玩家任意输入一个没有重复数字的4位数即开始游戏,例如:7890");
return buffer.toString();
}
public static String getUserScore(HttpServletRequest request,String openId){
StringBuffer buffer = new StringBuffer();
HashMap<Integer, Integer> scoreMap = MySQLUtil.getScoreByOpenId(request, openId);
if(null == scoreMap || 0 == scoreMap.size()){
buffer.append("您还没有玩过“猜数字”游戏!").append("\n");
buffer.append("请输入4个不重复的数字开始新的一局,例如:0269");
}else {
buffer.append("您的游戏战绩如下:").append("\n");
for (Integer status : scoreMap.keySet()) {
if(0L == status){
buffer.append("游戏中:").append(scoreMap.get(status)).append("\n");
}else if(1L == status){
buffer.append("胜利局数:").append(scoreMap.get(status)).append("\n");
}else if(2L == status){
buffer.append("失败局数:").append(scoreMap.get(status)).append("\n");
}
}
buffer.append("请输入4个不重复的数字开始新的一局,例如:0269");
}
return buffer.toString();
}
}
|
[
"1129290218@qq.com"
] |
1129290218@qq.com
|
e38f4fe89283aef229c916dabc9281f24b31c5e5
|
405093d77282b36cd11ceb5aa317f6bb949cfb67
|
/srcmlm3/org/basic/comp/base/LoginDialog.java
|
0ac7af85e65a5770d22f063940f9b235793bf852
|
[] |
no_license
|
saiful-mukhlis/basic140313
|
5038fb28e2e66c2825cc21cab026dd66bf5ec5a3
|
65f75e31b56ea7ed715153493fcf783bcc32a412
|
refs/heads/master
| 2021-01-15T21:09:57.938423
| 2013-03-14T10:14:18
| 2013-03-14T10:14:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,240
|
java
|
package org.basic.comp.base;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.awt.SystemColor;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import com.basic.db.Usr;
import com.basic.lang.LApp;
import com.basic.lang.LLogin;
import com.global.App;
import com.global.DataUser;
import com.global.util.UtilAccount;
import com.jgoodies.forms.builder.ButtonBarBuilder2;
import com.jgoodies.forms.builder.DefaultFormBuilder;
import com.jgoodies.forms.builder.PanelBuilder;
import com.jgoodies.forms.layout.CellConstraints;
import com.jgoodies.forms.layout.FormLayout;
import com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal;
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx;
import com.orientechnologies.orient.core.record.impl.ODocument;
public class LoginDialog {
private JPanel panelBesic;
private JPanel panelLogin;
private TextField usernameField;
private PasswordField passwordField;
private JButton okButton;
private JButton cancelButton;
protected JPanel panelTitle;
protected JLabel titleLabel;
protected JLabel ketLabel;
protected Icon icon;
private void initComponent(ODatabaseDocumentTx db) {
panelBesic = new JPanel();
panelBesic.setBackground(Color.WHITE);
panelLogin = new JPanel();
panelLogin.setBackground(Color.WHITE);
usernameField = new TextField();
usernameField.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
passwordField.requestFocus();
}
});
passwordField = new PasswordField();
okButton = new JButton(LApp.LOGIN);
cancelButton = new JButton(LApp.CANCEL);
panelTitle = new JPanel();
titleLabel = new JLabel(LLogin.title);
ketLabel = new JLabel(LLogin.ket);
icon = App.getIcon(LApp.iconLogin32);
setAksiButton();
}
public void buildComponent(ODatabaseDocumentTx db) {
initComponent(db);
setPanelTitle(panelTitle, titleLabel,ketLabel, icon);
FormLayout layout = new FormLayout(
"r:p:g(.1), 4dlu, f:max(200dlu;p):g(.4), 4dlu:g");
// layout.setColumnGroups(new int[][] { { 3, 5, 7, 13, 15 } });
DefaultFormBuilder builder = new DefaultFormBuilder(layout);
builder.setDefaultDialogBorder();
builder.append(LLogin.username, usernameField);
builder.append(LLogin.password, passwordField);
JPanel panel = builder.getPanel();
panel.setBackground(Color.WHITE);
ButtonBarBuilder2 builderButton = new ButtonBarBuilder2();
builderButton.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));
builderButton.addGlue();
builderButton.addButton(okButton, cancelButton);
JPanel panel2 = builderButton.getPanel();
panelLogin.setLayout(new BorderLayout());
panelLogin.add(panel, BorderLayout.CENTER);
//panelLogin.add(new JSeparator(), BorderLayout.SOUTH);
panelBesic.setLayout(new BorderLayout());
panelBesic.add(panelTitle, BorderLayout.NORTH);
panelBesic.add(panelLogin, BorderLayout.CENTER);
panelBesic.add(panel2, BorderLayout.SOUTH);
}
public void setAksiButton(){
cancelButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
aksiCancel();
}
});
okButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
aksiOk();
}
});
passwordField.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
aksiOk();
}
});
}
protected void aksiOk() {
String u=usernameField.getText();
String p=new String(passwordField.getPassword());
try {
ODatabaseDocumentTx db = App.getDbd();
ODatabaseRecordThreadLocal. INSTANCE.set(db);
ODocument usr=App.getUsrDao().getOne(db, Usr.USERNAME, u);
if (usr==null) {
App.showErrorUsernameTidakTerdaftar();
}else{
UtilAccount util=new UtilAccount();
String tmp=util.md5(p);
String pwd=usr.field(Usr.PASSWORD);
if (tmp.equalsIgnoreCase(pwd)) {
DataUser.setUsr(usr);
ODocument grp = App.getGrpDao().getOne(db, "@rid", DataUser.getUsr().field(Usr.GRP));
DataUser.setGrp(grp);
App.getBosDao().minus(db);
// perp();
db.close();
dispose(panelBesic);
}else{
db.close();
App.showErrorPasswordSalah();
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
protected void aksiCancel() {
dispose(panelBesic);
}
public void dispose(Object o) {
if (o instanceof Window) {
((Window) o).dispose();
} else {
if (o instanceof Component) {
dispose(((Component) o).getParent());
}
}
}
public JPanel getPanel() {
return panelBesic;
}
public void setPanelTitle(JPanel panel, JLabel titleLabel,
JLabel ketLabel, Icon icon) {
setLabelTitle(titleLabel);
FormLayout layout = new FormLayout(
"10dlu,f:p:g, 10dlu, f:32px, 10dlu", // cols
"5dlu, p, 3dlu,p, 3dlu,p, 3dlu"); // rows
PanelBuilder builder = new PanelBuilder(layout);
GradientPanel p = new GradientPanel();
p.setBackground(new Color(240, 255, 255));
p.setForeground(SystemColor.WHITE);
builder.setDefaultDialogBorder();
CellConstraints cc = new CellConstraints();
builder.add(titleLabel, cc.xy(2, 2));
//builder.add(ketLabel, cc.xy(2, 4));
//ketLabel.setLineWrap(true);
JLabel l = new JLabel();
l.setIcon(icon);
builder.add(l, cc.xywh(4, 2, 1, 3, "center, top"));
//builder.addSeparator("", cc.xyw(1, 3, 2));
// builder.getPanel().setBackground(SystemColor.WHITE);
builder.getPanel().setOpaque(false);
JPanel pan=builder.getPanel();
//pan.setBackground(Color.WHITE);
p.add(pan);
//p.setBackground(Color.WHITE);
panel.setBackground(Color.WHITE);
panel.setLayout(new BorderLayout(0, 0));
panel.setBorder(BorderFactory.createEmptyBorder(0, 0, 20, 0));
panel.add(p, BorderLayout.CENTER);
JSeparator s = new JSeparator();
panel.add(s, BorderLayout.SOUTH);
}
public void setLabelTitle(JLabel titleLabel) {
titleLabel.setFont(new Font("Tahoma", Font.PLAIN, 14));
}
}
|
[
"saiful.mukhlis@gmail.com"
] |
saiful.mukhlis@gmail.com
|
d6190cb978b4b9d57849b2e98a26fdb4e80242dc
|
58a0495674943c94d8391a677eaa4a749ad3cf36
|
/src/main/java/com/thinkinginjava/initialization/ArraysOfPrimitives.java
|
94e5e8a37ec6e70fd3dcd4a56f8257963770582c
|
[] |
no_license
|
PavelTsekhanovich/ThinkingInJava
|
f00897ce6bd38871d9eaa0e00bf1d8c17350203e
|
7754c639472c47ba1940856edbb0dee75d6a8b6b
|
refs/heads/master
| 2021-09-17T23:22:21.421088
| 2018-07-06T19:24:24
| 2018-07-06T19:24:24
| 105,444,993
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 483
|
java
|
package com.thinkinginjava.initialization;
import static com.thinkinginjava.Print.print;
public class ArraysOfPrimitives {
public static void main(String[] args) {
int[] a1 = {1, 2, 3, 4, 5};
int[] a2;
a2 = a1;
for (int i = 0; i < a2.length; i++)
a2[i] = a2[i] + 1;
for (int i = 0; i < a1.length; i++)
print("a1[" + i + "] = " + a1[i]);
}
} /* Output:
a1[0] = 2
a1[1] = 3
a1[2] = 4
a1[3] = 5
a1[4] = 6
*///:~
|
[
"p.tsekhanovich93@gmail.com"
] |
p.tsekhanovich93@gmail.com
|
b82e055fe3a209875292939a4d57ad867ff6ca26
|
d62d163af6852f893f5f2619a5bc2f408064ef0b
|
/app/src/main/java/org/gluu/casa/core/PasswordStatusService.java
|
b358d2624293cf15a71bf6d82beb54924760ed73
|
[
"Apache-2.0"
] |
permissive
|
GluuFederation/casa
|
693ab56926668e18e064f3e91884acf3f04fca51
|
debfa481e1a1ebef56653658cd279d415d72811c
|
refs/heads/master
| 2023-08-16T17:47:05.099253
| 2023-06-09T13:27:51
| 2023-06-09T13:27:51
| 140,332,921
| 19
| 12
|
Apache-2.0
| 2023-09-11T11:44:47
| 2018-07-09T19:29:44
|
Java
|
UTF-8
|
Java
| false
| false
| 2,992
|
java
|
package org.gluu.casa.core;
import org.gluu.casa.conf.MainSettings;
import org.gluu.casa.core.model.IdentityPerson;
import org.gluu.casa.misc.Utils;
import org.slf4j.Logger;
import javax.enterprise.context.SessionScoped;
import javax.inject.Inject;
import javax.inject.Named;
import java.io.Serializable;
import java.util.List;
@Named
@SessionScoped
public class PasswordStatusService implements Serializable {
private static final String EXTERNAL_IDENTITIES_PREFIX = "passport-";
@Inject
private Logger logger;
@Inject
private PersistenceService persistenceService;
@Inject
private MainSettings confSettings;
@Inject
private SessionContext asco;
private boolean passSetAvailable;
private boolean passResetAvailable;
private boolean password2faRequisite;
public boolean isPassword2faRequisite() {
return password2faRequisite;
}
public boolean isPassSetAvailable() {
return passSetAvailable;
}
public boolean isPassResetAvailable() {
return passResetAvailable;
}
public void reloadStatus() {
/*
offer pass set if
- user has no password and
- has oxExternalUid like passport-*
offer pass reset if
- user has password and
- app config allows this
offer 2fa when
- user has password or
- backend ldap detected
*/
passResetAvailable = false;
passSetAvailable = false;
IdentityPerson p = persistenceService.get(IdentityPerson.class, persistenceService.getPersonDn(asco.getUser().getId()));
if (p.hasPassword()) {
passResetAvailable = confSettings.isEnablePassReset();
} else {
passSetAvailable = hasPassportPrefix(p.getOxExternalUid()) || hasPassportPrefix(p.getOxUnlinkedExternalUids());
}
password2faRequisite = p.hasPassword() || persistenceService.isBackendLdapEnabled();
}
public boolean passwordMatch(String userName, String password) {
boolean match = false;
try {
match = persistenceService.authenticate(userName, password);
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
return match;
}
public boolean changePassword(String userId, String newPassword) {
boolean success = false;
try {
if (Utils.isNotEmpty(newPassword)) {
IdentityPerson person = persistenceService.get(IdentityPerson.class, persistenceService.getPersonDn(userId));
person.setPassword(newPassword);
success = persistenceService.modify(person);
}
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
return success;
}
private boolean hasPassportPrefix(List<String> externalUids) {
return externalUids.stream().anyMatch(uid -> uid.startsWith(EXTERNAL_IDENTITIES_PREFIX));
}
}
|
[
"bonustrack310@gmail.com"
] |
bonustrack310@gmail.com
|
071edfa2540e2f8d9667445c69c54a78437d5f36
|
b777d16431306b6c62d5af7fbf27939b14b5ee37
|
/Pkcs11Wrapper/src/java/src/ModuleInfo.java
|
5a3c0e5af5c221821ae89316dee69c237e068a0d
|
[] |
no_license
|
europa502/DigitalDocumentSigners
|
8c533c55db30cba125f7ea011ca358d896ce95e9
|
1d2ebed584c1f5c2e8669f13f8a4279690a09df9
|
refs/heads/master
| 2021-07-11T13:26:17.940517
| 2017-10-12T10:12:57
| 2017-10-12T10:12:57
| 106,675,976
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 625
|
java
|
package demo.pkcs11.wrapper;
import iaik.pkcs.pkcs11.Module;
import iaik.pkcs.pkcs11.Info;
public class ModuleInfo {
public static void main(String[] args) {
if (args.length == 1){
try {
Module pkcs11Module = Module.getInstance(args[0]);
pkcs11Module.initialize(null);
Info info = pkcs11Module.getInfo();
System.out.println(info);
pkcs11Module.finalize(null);
} catch (Throwable ex) {
ex.printStackTrace();
}
} else {
printUsage();
System.exit(1);
}
}
protected static void printUsage() {
System.out.println("ModuleInfo <PKCS#11 module name>");
System.out.println("e.g.: ModuleInfo cryptoki.dll");
}
}
|
[
"root@localhost.localdomain"
] |
root@localhost.localdomain
|
6dd95275e878a4ae72c4239ad4b2a1db735bfd00
|
863acb02a064a0fc66811688a67ce3511f1b81af
|
/sources/p005cm/aptoide/p006pt/app/view/donations/DonationsService.java
|
c171ced19fed59de98bc99439e700a8a955ff47e
|
[
"MIT"
] |
permissive
|
Game-Designing/Custom-Football-Game
|
98d33eb0c04ca2c48620aa4a763b91bc9c1b7915
|
47283462b2066ad5c53b3c901182e7ae62a34fc8
|
refs/heads/master
| 2020-08-04T00:02:04.876780
| 2019-10-06T06:55:08
| 2019-10-06T06:55:08
| 211,914,568
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,723
|
java
|
package p005cm.aptoide.p006pt.app.view.donations;
import java.util.ArrayList;
import java.util.List;
import org.jacoco.agent.p025rt.internal_8ff85ea.Offline;
import p005cm.aptoide.p006pt.app.view.donations.data.GetDonations;
import p005cm.aptoide.p006pt.app.view.donations.data.GetDonations.Donor;
import p026rx.C0120S;
import p026rx.C0126V;
import p026rx.Single;
import retrofit2.http.GET;
import retrofit2.http.Query;
/* renamed from: cm.aptoide.pt.app.view.donations.DonationsService */
public class DonationsService {
private static transient /* synthetic */ boolean[] $jacocoData;
private C0126V ioScheduler;
private ServiceV8 service;
/* renamed from: cm.aptoide.pt.app.view.donations.DonationsService$ServiceV8 */
public interface ServiceV8 {
@GET("broker/8.20181010/leaderboard/donations")
C0120S<GetDonations> getDonations(@Query("domain") String str, @Query("limit") int i);
}
private static /* synthetic */ boolean[] $jacocoInit() {
boolean[] zArr = $jacocoData;
if (zArr != null) {
return zArr;
}
boolean[] probes = Offline.getProbes(-8958910446731640491L, "cm/aptoide/pt/app/view/donations/DonationsService", 11);
$jacocoData = probes;
return probes;
}
public DonationsService(ServiceV8 service2, C0126V ioScheduler2) {
boolean[] $jacocoInit = $jacocoInit();
this.service = service2;
this.ioScheduler = ioScheduler2;
$jacocoInit[0] = true;
}
public Single<List<Donation>> getDonations(String packageName) {
boolean[] $jacocoInit = $jacocoInit();
C0120S donations = this.service.getDonations(packageName, 5);
C0126V v = this.ioScheduler;
$jacocoInit[1] = true;
C0120S b = donations.mo3634b(v);
C2038a aVar = new C2038a(this);
$jacocoInit[2] = true;
C0120S j = b.mo3669j(aVar);
$jacocoInit[3] = true;
Single<List<Donation>> n = j.mo3678n();
$jacocoInit[4] = true;
return n;
}
/* access modifiers changed from: private */
public List<Donation> mapToDonationsList(GetDonations donationsResponse) {
boolean[] $jacocoInit = $jacocoInit();
List<Donation> result = new ArrayList<>();
$jacocoInit[5] = true;
$jacocoInit[6] = true;
for (Donor donor : donationsResponse.getItems()) {
$jacocoInit[7] = true;
Donation donation = new Donation(donor.getDomain(), donor.getOwner(), Float.parseFloat(donor.getAppc()));
$jacocoInit[8] = true;
result.add(donation);
$jacocoInit[9] = true;
}
$jacocoInit[10] = true;
return result;
}
}
|
[
"tusharchoudhary0003@gmail.com"
] |
tusharchoudhary0003@gmail.com
|
22f851724ac010710b169bfc81635e58d99b6282
|
0adcb787c2d7b3bbf81f066526b49653f9c8db40
|
/src/main/java/com/alipay/api/response/AlipayInsAutoCarSaveResponse.java
|
c83836534268a10d68aaccf22d8cc4b93ae5af40
|
[
"Apache-2.0"
] |
permissive
|
yikey/alipay-sdk-java-all
|
1cdca570c1184778c6f3cad16fe0bcb6e02d2484
|
91d84898512c5a4b29c707b0d8d0cd972610b79b
|
refs/heads/master
| 2020-05-22T13:40:11.064476
| 2019-04-11T14:11:02
| 2019-04-11T14:11:02
| 186,365,665
| 1
| 0
| null | 2019-05-13T07:16:09
| 2019-05-13T07:16:08
| null |
UTF-8
|
Java
| false
| false
| 599
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.ins.auto.car.save response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class AlipayInsAutoCarSaveResponse extends AlipayResponse {
private static final long serialVersionUID = 4591234375291222787L;
/**
* 车牌号
*/
@ApiField("car_no")
private String carNo;
public void setCarNo(String carNo) {
this.carNo = carNo;
}
public String getCarNo( ) {
return this.carNo;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
f6ea6f6723156334f4c2ba0ccb94f57594493eac
|
732ac04a2f64fb72c16408b8b980260ad806a74d
|
/src/com/sun/corba/se/PortableActivationIDL/InitialNameService.java
|
b3a5b6125a6a53c0a57a7ed102dedcf3b7ac804c
|
[
"Apache-2.0"
] |
permissive
|
Golde-nchow/jdk1.8-source-analysis
|
bb45a4d659ab02de37422b2fefbf452712de3b9e
|
e30ab95df7f147c261cc2f0c5723b6c530197ad2
|
refs/heads/master
| 2022-07-03T01:29:57.438319
| 2022-06-12T14:20:25
| 2022-06-12T14:20:25
| 210,581,079
| 0
| 0
|
Apache-2.0
| 2019-09-24T11:00:27
| 2019-09-24T11:00:26
| null |
UTF-8
|
Java
| false
| false
| 641
|
java
|
package com.sun.corba.se.PortableActivationIDL;
/**
* com/sun/corba/se/PortableActivationIDL/InitialNameService.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u151/9699/corba/src/share/classes/com/sun/corba/se/PortableActivationIDL/activation.idl
* Tuesday, September 5, 2017 7:35:43 PM PDT
*/
/** Interface used to support binding references in the bootstrap name
* service.
*/
public interface InitialNameService extends InitialNameServiceOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity
{
} // interface InitialNameService
|
[
"793514387@qq.com"
] |
793514387@qq.com
|
e98d4a57269bfc8af95423fe174450d3d6d89dda
|
14b497b11196ca5bf170bbed99b54e172404c4ce
|
/src/learning_java/book/ThinkingInJava/Chapter12/MyException.java
|
3e8c2db76b53d982e34eedc16ff5ed7a413b7151
|
[] |
no_license
|
lenfranky/java_learning_lz
|
54a326cf23f3248bd2a5386dd146ec36cbfeeed4
|
619bcf7b4ab60156940260debed3bd9dc8c702ba
|
refs/heads/master
| 2020-04-03T15:43:49.104485
| 2019-06-26T12:24:22
| 2019-06-26T12:24:22
| 155,374,640
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 179
|
java
|
package learning_java.book.ThinkingInJava.Chapter12;
public class MyException extends Exception{
public MyException() {}
public MyException(String msg) { super(msg); }
}
|
[
"327792549@qq.com"
] |
327792549@qq.com
|
0de4fb08072edc390c527530325a96b66043fa46
|
83e81c25b1f74f88ed0f723afc5d3f83e7d05da8
|
/packages/SystemUI/src/com/android/systemui/qs/tiles/DataSaverTile.java
|
4b4b8ea595c1600d0a45e3be84f8da504e6e8622
|
[
"Apache-2.0",
"LicenseRef-scancode-unicode"
] |
permissive
|
Ankits-lab/frameworks_base
|
8a63f39a79965c87a84e80550926327dcafb40b7
|
150a9240e5a11cd5ebc9bb0832ce30e9c23f376a
|
refs/heads/main
| 2023-02-06T03:57:44.893590
| 2020-11-14T09:13:40
| 2020-11-14T09:13:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,507
|
java
|
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.android.systemui.qs.tiles;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.provider.Settings;
import android.service.quicksettings.Tile;
import android.widget.Switch;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.systemui.Prefs;
import com.android.systemui.R;
import com.android.systemui.plugins.qs.QSTile.BooleanState;
import com.android.systemui.qs.QSHost;
import com.android.systemui.qs.tileimpl.QSTileImpl;
import com.android.systemui.statusbar.phone.SystemUIDialog;
import com.android.systemui.statusbar.policy.DataSaverController;
import com.android.systemui.statusbar.policy.NetworkController;
import javax.inject.Inject;
public class DataSaverTile extends QSTileImpl<BooleanState> implements
DataSaverController.Listener{
private final DataSaverController mDataSaverController;
@Inject
public DataSaverTile(QSHost host, NetworkController networkController) {
super(host);
mDataSaverController = networkController.getDataSaverController();
mDataSaverController.observe(getLifecycle(), this);
}
@Override
public BooleanState newTileState() {
return new BooleanState();
}
@Override
public Intent getLongClickIntent() {
return new Intent(Settings.ACTION_DATA_SAVER_SETTINGS);
}
@Override
protected void handleClick() {
if (mState.value
|| Prefs.getBoolean(mContext, Prefs.Key.QS_DATA_SAVER_DIALOG_SHOWN, false)) {
// Do it right away.
toggleDataSaver();
return;
}
// Shows dialog first
SystemUIDialog dialog = new SystemUIDialog(mContext);
dialog.setTitle(com.android.internal.R.string.data_saver_enable_title);
dialog.setMessage(com.android.internal.R.string.data_saver_description);
dialog.setPositiveButton(com.android.internal.R.string.data_saver_enable_button,
(OnClickListener) (dialogInterface, which) -> toggleDataSaver());
dialog.setNegativeButton(com.android.internal.R.string.cancel, null);
dialog.setShowForAllUsers(true);
dialog.show();
Prefs.putBoolean(mContext, Prefs.Key.QS_DATA_SAVER_DIALOG_SHOWN, true);
}
private void toggleDataSaver() {
mState.value = !mDataSaverController.isDataSaverEnabled();
mDataSaverController.setDataSaverEnabled(mState.value);
refreshState(mState.value);
}
@Override
public CharSequence getTileLabel() {
return mContext.getString(R.string.data_saver);
}
@Override
protected void handleUpdateState(BooleanState state, Object arg) {
state.value = arg instanceof Boolean ? (Boolean) arg
: mDataSaverController.isDataSaverEnabled();
state.state = state.value ? Tile.STATE_ACTIVE : Tile.STATE_INACTIVE;
state.label = mContext.getString(R.string.data_saver);
state.contentDescription = state.label;
state.icon = ResourceIcon.get(state.value ? R.drawable.ic_data_saver
: R.drawable.ic_data_saver_off);
state.expandedAccessibilityClassName = Switch.class.getName();
}
@Override
public int getMetricsCategory() {
return MetricsEvent.QS_DATA_SAVER;
}
@Override
protected String composeChangeAnnouncement() {
if (mState.value) {
return mContext.getString(R.string.accessibility_quick_settings_data_saver_changed_on);
} else {
return mContext.getString(R.string.accessibility_quick_settings_data_saver_changed_off);
}
}
@Override
public void onDataSaverChanged(boolean isDataSaving) {
refreshState(isDataSaving);
}
}
|
[
"keneankit01@gmail.com"
] |
keneankit01@gmail.com
|
4d1169c79b041a35c5dced648034794d7087f21f
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/5/5_698743d8fc6d3323dc2e1e09f426f8e47387e389/PatientDashboard/5_698743d8fc6d3323dc2e1e09f426f8e47387e389_PatientDashboard_t.java
|
4c8e62e9bdea5ff277fab05d1c89b76ca32a6d2d
|
[] |
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
| 8,023
|
java
|
/*
* The contents of this file are subject to the OpenMRS Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://license.openmrs.org
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*
* Copyright (C) OpenMRS, LLC. All Rights Reserved.
*/
package org.openmrs.module.mirebalais.smoke.pageobjects;
import static org.openqa.selenium.support.ui.ExpectedConditions.invisibilityOfElementLocated;
import static org.openqa.selenium.support.ui.ExpectedConditions.visibilityOfElementLocated;
import java.util.HashMap;
import java.util.List;
import org.openmrs.module.mirebalais.smoke.pageobjects.forms.ConsultNoteForm;
import org.openmrs.module.mirebalais.smoke.pageobjects.forms.EditEncounterForm;
import org.openmrs.module.mirebalais.smoke.pageobjects.forms.EmergencyDepartmentNoteForm;
import org.openmrs.module.mirebalais.smoke.pageobjects.forms.XRayForm;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
public class PatientDashboard extends AbstractPageObject {
public static final String CHECKIN = "Tcheke";
public static final String CONSULTATION = "Konsiltasyon";
public static final String VITALS = "Siy Vito";
public static final String RADIOLOGY = "Preskripsyon Radyoloji";
public static final String ACTIVE_VISIT_MESSAGE = "Vizit aktiv";
public static final String ADMISSION = "Admisyon";
public static final String TRANSFER = "Transfè";
private ConsultNoteForm consultNoteForm;
private EmergencyDepartmentNoteForm eDNoteForm;
private XRayForm xRayForm;
private HashMap<String, By> formList;
private By deleteEncounter = By.cssSelector("i.deleteEncounterId");
private By confirmDeleteEncounter = By.cssSelector("#delete-encounter-dialog .confirm");
private By actions = By.cssSelector(".actions");
private By checkIn = By.cssSelector("i.icon-check-in");
private By confirmStartVisit = By.cssSelector("#quick-visit-creation-dialog .confirm");
private By firstPencilIcon = By.cssSelector("#encountersList span i:nth-child(1)");
public PatientDashboard(WebDriver driver) {
super(driver);
consultNoteForm = new ConsultNoteForm(driver);
eDNoteForm = new EmergencyDepartmentNoteForm(driver);
xRayForm = new XRayForm(driver);
createFormsMap();
}
public void orderXRay(String study1, String study2) throws Exception {
openForm(formList.get("Order X-Ray"));
xRayForm.fillForm(study1, study2);
}
public boolean verifyIfSuccessfulMessageIsDisplayed() {
return (driver.findElement(By.className("icon-ok")) != null);
}
public boolean hasActiveVisit() {
return driver.findElement(By.id("visit-details")).getText().contains(ACTIVE_VISIT_MESSAGE);
}
public void deleteFirstEncounter() {
clickOn(deleteEncounter);
clickOn(confirmDeleteEncounter);
wait5seconds.until(invisibilityOfElementLocated(By.id("delete-encounter-dialog")));
}
public Integer countEncountersOfType(String encounterName) {
int count = 0;
List<WebElement> encounters = driver.findElements(By.cssSelector("span.encounter-name"));
for (WebElement encounter : encounters) {
if (encounter.getText().equals(encounterName))
count++;
}
return count;
}
public void startVisit() {
hoverOn(actions);
clickOn(checkIn);
clickOn(confirmStartVisit);
wait5seconds.until(visibilityOfElementLocated(By.cssSelector(".visit-actions.active-visit")));
}
public void addConsultNoteWithDischarge(String primaryDiagnosis) throws Exception {
openForm(formList.get("Consult Note"));
consultNoteForm.fillFormWithDischarge(primaryDiagnosis);
}
public String addConsultNoteWithAdmissionToLocation(String primaryDiagnosis, int numbered) throws Exception {
openForm(formList.get("Consult Note"));
return consultNoteForm.fillFormWithAdmissionAndReturnLocation(primaryDiagnosis, numbered);
}
public String addConsultNoteWithTransferToLocation(String primaryDiagnosis, int numbered) throws Exception {
openForm(formList.get("Consult Note"));
return consultNoteForm.fillFormWithTransferAndReturnLocation(primaryDiagnosis, numbered);
}
public void addConsultNoteWithDeath(String primaryDiagnosis) throws Exception {
openForm(formList.get("Consult Note"));
consultNoteForm.fillFormWithDeath(primaryDiagnosis);
}
public void editExistingConsultNote(String primaryDiagnosis) throws Exception {
openForm(By.cssSelector(".consult-encounter-template .editEncounter"));
consultNoteForm.editPrimaryDiagnosis(primaryDiagnosis);
}
public void addEmergencyDepartmentNote(String primaryDiagnosis) throws Exception {
openForm(formList.get("ED Note"));
eDNoteForm.fillFormWithDischarge(primaryDiagnosis);
}
public void editExistingEDNote(String primaryDiagnosis) throws Exception {
openForm(By.cssSelector(".consult-encounter-template .editEncounter"));
eDNoteForm.editPrimaryDiagnosis(primaryDiagnosis);
}
public void openForm(By formIdentification) {
clickOn(formIdentification);
}
public void viewConsultationDetails() {
clickOn(By.cssSelector(".consult-encounter-template .show-details"));
}
public void requestRecord() {
hoverOn(By.cssSelector(".actions"));
clickOn(By.cssSelector(".actions i.icon-folder-open"));
clickOn(By.cssSelector("#request-paper-record-dialog .confirm"));
}
public String getDossierNumber() {
List<WebElement> elements = driver.findElements(By.cssSelector(".identifiers span"));
return elements.get(1).getText();
}
public boolean canRequestRecord() {
hoverOn(By.cssSelector(".actions"));
return driver.findElement(By.cssSelector(".actions i.icon-folder-open")).isDisplayed();
}
public Boolean startVisitButtonIsVisible() {
try {
driver.findElement(By.id("noVisitShowVisitCreationDialog"));
return true;
}
catch (NoSuchElementException e) {
return false;
}
}
public Boolean containsText(String text) {
return driver.getPageSource().contains(text);
}
public List<WebElement> getVisits() {
return driver.findElements(By.cssSelector(".menu-item.viewVisitDetails"));
}
public boolean isDead() {
try {
driver.findElement(By.className("death-message"));
return true;
}
catch (NoSuchElementException e) {
return false;
}
}
public String providerForFirstEncounter() {
return driver.findElement(By.className("encounter-details")).findElement(By.className("provider")).getText();
}
public String locationForFirstEncounter() {
return driver.findElement(By.className("encounter-details")).findElement(By.className("location")).getText();
}
public EditEncounterForm.SelectedProviderAndLocation editFirstEncounter(int providerOption, int locationOption) {
EditEncounterForm editEncounterForm = editEncounter();
editEncounterForm.selectProvider(providerOption);
editEncounterForm.selectLocation(locationOption);
return editEncounterForm.selectedProviderAndLocation();
}
private EditEncounterForm editEncounter() {
driver.findElement(firstPencilIcon).click();
return new EditEncounterForm(driver);
}
private void createFormsMap() {
formList = new HashMap<String, By>();
formList.put("Consult Note", By.cssSelector("#visit-details a:nth-child(2) .icon-stethoscope"));
formList.put("Surgical Note", By.cssSelector("#visit-details .icon-paste"));
formList.put("Order X-Ray", By.id("org.openmrs.module.radiologyapp.orderXray"));
formList.put("ED Note", By.cssSelector("#visit-details a:nth-child(3) .icon-stethoscope"));
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
688131d1eadf47c673048a570841937953529298
|
10eec5ba9e6dc59478cdc0d7522ff7fc6c94cd94
|
/maind/src/main/java/com/google/gson/TypeAdapter.java
|
1d386710bbe63ce302800dfef44889da14de4ce5
|
[] |
no_license
|
EchoAGI/Flexispy.re
|
a2f5fec409db083ee3fe0d664dc2cca7f9a4f234
|
ba65a5b8b033b92c5867759f2727c5141b7e92fc
|
refs/heads/master
| 2023-04-26T02:52:18.732433
| 2018-07-16T07:46:56
| 2018-07-16T07:46:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,044
|
java
|
package com.google.gson;
import com.google.gson.internal.bind.JsonTreeReader;
import com.google.gson.internal.bind.JsonTreeWriter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import java.io.StringWriter;
import java.io.Writer;
public abstract class TypeAdapter
{
public final Object fromJson(Reader paramReader)
{
JsonReader localJsonReader = new com/google/gson/stream/JsonReader;
localJsonReader.<init>(paramReader);
return read(localJsonReader);
}
public final Object fromJson(String paramString)
{
StringReader localStringReader = new java/io/StringReader;
localStringReader.<init>(paramString);
return fromJson(localStringReader);
}
public final Object fromJsonTree(JsonElement paramJsonElement)
{
try
{
JsonTreeReader localJsonTreeReader = new com/google/gson/internal/bind/JsonTreeReader;
localJsonTreeReader.<init>(paramJsonElement);
return read(localJsonTreeReader);
}
catch (IOException localIOException)
{
JsonIOException localJsonIOException = new com/google/gson/JsonIOException;
localJsonIOException.<init>(localIOException);
throw localJsonIOException;
}
}
public final TypeAdapter nullSafe()
{
TypeAdapter.1 local1 = new com/google/gson/TypeAdapter$1;
local1.<init>(this);
return local1;
}
public abstract Object read(JsonReader paramJsonReader);
public final String toJson(Object paramObject)
{
StringWriter localStringWriter = new java/io/StringWriter;
localStringWriter.<init>();
try
{
toJson(localStringWriter, paramObject);
return localStringWriter.toString();
}
catch (IOException localIOException)
{
AssertionError localAssertionError = new java/lang/AssertionError;
localAssertionError.<init>(localIOException);
throw localAssertionError;
}
}
public final void toJson(Writer paramWriter, Object paramObject)
{
JsonWriter localJsonWriter = new com/google/gson/stream/JsonWriter;
localJsonWriter.<init>(paramWriter);
write(localJsonWriter, paramObject);
}
public final JsonElement toJsonTree(Object paramObject)
{
try
{
JsonTreeWriter localJsonTreeWriter = new com/google/gson/internal/bind/JsonTreeWriter;
localJsonTreeWriter.<init>();
write(localJsonTreeWriter, paramObject);
return localJsonTreeWriter.get();
}
catch (IOException localIOException)
{
JsonIOException localJsonIOException = new com/google/gson/JsonIOException;
localJsonIOException.<init>(localIOException);
throw localJsonIOException;
}
}
public abstract void write(JsonWriter paramJsonWriter, Object paramObject);
}
/* Location: /Volumes/D1/codebase/android/POC/assets/product/maind/classes-enjarify.jar!/com/google/gson/TypeAdapter.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/
|
[
"52388483@qq.com"
] |
52388483@qq.com
|
a1be19e7ce2cbcc66029caade5d9e95640c92b6c
|
56456387c8a2ff1062f34780b471712cc2a49b71
|
/com/google/android/gms/internal/zzsd$6.java
|
cce469f5da976004945133eb4bc12f7d35e82fde
|
[] |
no_license
|
nendraharyo/presensimahasiswa-sourcecode
|
55d4b8e9f6968eaf71a2ea002e0e7f08d16c5a50
|
890fc86782e9b2b4748bdb9f3db946bfb830b252
|
refs/heads/master
| 2020-05-21T11:21:55.143420
| 2019-05-10T19:03:56
| 2019-05-10T19:03:56
| 186,022,425
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 726
|
java
|
package com.google.android.gms.internal;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.wallet.Wallet.zzb;
class zzsd$6
extends Wallet.zzb
{
zzsd$6(zzsd paramzzsd, GoogleApiClient paramGoogleApiClient, int paramInt)
{
super(paramGoogleApiClient);
}
protected void zza(zzse paramzzse)
{
int i = this.val$requestCode;
paramzzse.zzlo(i);
Status localStatus = Status.zzagC;
zza(localStatus);
}
}
/* Location: C:\Users\haryo\Desktop\enjarify-master\presensi-enjarify.jar!\com\google\android\gms\internal\zzsd$6.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/
|
[
"haryo.nendra@gmail.com"
] |
haryo.nendra@gmail.com
|
4286398e277cfa8ff2512361eb5e1dc5198dbd22
|
44f32201be3c8e610b5c72a8ae487d64056d68e5
|
/.history/demo/test0325/src/main/java/com/hello/test0325/dbtable/T200227market_20200413175622.java
|
c5070a4ee02e5d962367d47f5950cde328e1e993
|
[] |
no_license
|
hisouske/test0325
|
19e421ce5019a949e5a7887d863b1b997a9d5a3b
|
8efd4169cf6e6d2b70d32a991e3747174be9c7e9
|
refs/heads/master
| 2021-05-16T20:28:30.546404
| 2020-04-22T06:39:58
| 2020-04-22T06:39:58
| 250,457,284
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,845
|
java
|
package com.hello.test0325.dbtable;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import lombok.Builder;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@Data
@Entity
@Table(name="\"200227market\"")
public class T200227market{
@Id
@GeneratedValue
@Column
private int marketcode;
@Column(name = "memid")
private String username;
@Column
private String marketname;
@Column
private String marketpic;
@Column
private String markettext;
@ManyToOne(cascade = CascadeType.ALL)
@JoinTable(name = "PARENT_CHILD",
joinColumns = @JoinColumn(name = "marketcode",insertable = false, updatable = false),
inverseJoinColumns = @JoinColumn(name = "memid",insertable = false, updatable = false))
private T200227member join200227member;
// @ManyToOne(targetEntity = T200227member.class, fetch =FetchType.LAZY)
// @JoinColumn(name = "memid", insertable = false, updatable = false)
// private T200227member t200227member;
public T200227market(){
}
@Builder
public T200227market(int marketcode,String memid,String marketname, String marketpic,String markettext,T200227member member){
// this.id = id;
this.marketcode = marketcode;
// this.memid = memid;
this.marketname = marketname;
this.marketpic = marketpic;
this.markettext = markettext;
// T200227member member = new T200227member();
this.join200227member = member;
System.out.println("builder >>2>"+this);
}
}
|
[
"zzang22yn@naver.com"
] |
zzang22yn@naver.com
|
b9624225625203262227cf0dfa688bac9ededf87
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/test_apks/insecurebank/source/com/google/android/gms/ads/internal/reward/mediation/client/RewardItemParcel.java
|
ef65cff407eb3340c75f59ffe53708f26a5973bf
|
[
"Apache-2.0"
] |
permissive
|
iantal/AndroidPermissions
|
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
|
d623b732734243590b5f004d167e542e2e2ae249
|
refs/heads/master
| 2023-07-19T01:29:26.689186
| 2019-09-30T19:01:42
| 2019-09-30T19:01:42
| 107,239,248
| 0
| 0
|
Apache-2.0
| 2023-07-16T07:41:38
| 2017-10-17T08:22:57
| null |
UTF-8
|
Java
| false
| false
| 1,064
|
java
|
package com.google.android.gms.ads.internal.reward.mediation.client;
import android.os.Parcel;
import com.google.android.gms.ads.reward.RewardItem;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import com.google.android.gms.internal.zzgd;
@zzgd
public final class RewardItemParcel
implements SafeParcelable
{
public static final zzc CREATOR = new zzc();
public final String type;
public final int versionCode;
public final int zzFk;
public RewardItemParcel(int paramInt1, String paramString, int paramInt2)
{
this.versionCode = paramInt1;
this.type = paramString;
this.zzFk = paramInt2;
}
public RewardItemParcel(RewardItem paramRewardItem)
{
this(1, paramRewardItem.getType(), paramRewardItem.getAmount());
}
public RewardItemParcel(String paramString, int paramInt)
{
this(1, paramString, paramInt);
}
public int describeContents()
{
return 0;
}
public void writeToParcel(Parcel paramParcel, int paramInt)
{
zzc.zza(this, paramParcel, paramInt);
}
}
|
[
"antal.micky@yahoo.com"
] |
antal.micky@yahoo.com
|
b5022f38d96997def983ba970269d1514971d6f3
|
028cbe18b4e5c347f664c592cbc7f56729b74060
|
/external/modules/trinidad/2.0.2-glassfish-1/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/ppr/ScriptBufferingResponseWriter.java
|
2539b22127caae5dbd3c638a5befafd03c3c43fb
|
[] |
no_license
|
dmatej/Glassfish-SVN-Patched
|
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
|
269e29ba90db6d9c38271f7acd2affcacf2416f1
|
refs/heads/master
| 2021-05-28T12:55:06.267463
| 2014-11-11T04:21:44
| 2014-11-11T04:21:44
| 23,610,469
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,061
|
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.myfaces.trinidadinternal.renderkit.core.ppr;
import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.faces.component.UIComponent;
import javax.faces.context.ResponseWriter;
import org.apache.myfaces.trinidadinternal.io.ResponseWriterDecorator;
/**
* ResponseWriter implementation that buffers scripts.
*/
public class ScriptBufferingResponseWriter extends ResponseWriterDecorator
{
public ScriptBufferingResponseWriter(ResponseWriter out)
{
super(out);
}
public ScriptBufferingResponseWriter(ResponseWriter out, boolean enabled)
{
super(out);
_enabled = enabled;
}
/**
* Constructor for clones - share the scripts and libraries list.
*/
ScriptBufferingResponseWriter(ResponseWriter out, ScriptBufferingResponseWriter base)
{
super(out);
_scripts = base._scripts;
_libraries = base._libraries;
_enabled = base._enabled;
}
// Returns a List of Strings containing script content, or null
// if no scripts were encountered.
public List<String> getBufferedScripts()
{
if (_scripts != null)
return Collections.unmodifiableList(_scripts);
return null;
}
// Returns a List of Strings representing JavaScript library urls, or null
// if no libraries were encountered.
public List<String> getBufferedLibraries()
{
if (_libraries != null)
return Collections.unmodifiableList(_libraries);
return null;
}
// Resets our buffers. This is needed for the streaming case, where we
// flush scripts contents to the browser as each streamed data set becomes
// available. When this happens, we need to clear out our script/library
// buffers. This should be called immediately after calls to
// getBufferedScripts()/getBufferedLibraries().
public void clearBufferedContents()
{
_scripts = null;
_libraries = null;
}
public ResponseWriter cloneWithWriter(Writer writer)
{
ScriptBufferingResponseWriter rw = new ScriptBufferingResponseWriter(
getResponseWriter().cloneWithWriter(writer));
return rw;
}
public void writeComment(Object text) throws IOException
{
// Assume that comments in scripts come from people doing
// the old HTML trick
if (_inScript)
{
if (text != null)
_getScriptBuilder().append(text);
}
else
{
super.writeComment(text);
}
}
public void writeText(Object text, String property) throws IOException
{
if (_inScript)
{
if (text != null)
_getScriptBuilder().append(text);
}
else
super.writeText(text, property);
}
public void writeText(
char[] text,
int start,
int length) throws IOException
{
if (_inScript)
_getScriptBuilder().append(text, start, length);
else
super.writeText(text, start, length);
}
public void write(String text) throws IOException
{
if (_inScript)
_getScriptBuilder().append(text);
else
super.write(text);
}
public void write(
char[] text,
int start,
int length) throws IOException
{
if (_inScript)
_getScriptBuilder().append(text, start, length);
else
super.write(text, start, length);
}
public void write(int ch) throws IOException
{
if (_inScript)
_getScriptBuilder().append(ch);
else
super.write(ch);
}
@Override
public void write(char[] c) throws IOException
{
if (_inScript)
_getScriptBuilder().append(c);
else
super.write(c);
}
@Override
public void write(String text, int off, int len) throws IOException
{
if (_inScript)
_getScriptBuilder().append(text, off, len);
else
super.write(text, off, len);
}
/* Needed in JSF 1.2
@Override
public void writeText(Object text,
UIComponent component,
String propertyName) throws IOException
{
if (text != null)
{
if (_inScript)
_getScriptBuilder().append(text);
else
super.writeText(text, component, propertyName);
}
}
*/
public void startElement(String name, UIComponent component)
throws IOException
{
if (_enabled && "script".equals(name))
{
_inScript = true;
}
else
{
super.startElement(name, component);
}
}
public void endElement(String name) throws IOException
{
if (_inScript)
{
if (_scriptBuilder != null)
_getScriptList().add(_scriptBuilder.toString());
_scriptBuilder = null;
_inScript = false;
}
else
{
super.endElement(name);
}
}
public void writeAttribute(String name,
Object value,
String property) throws IOException
{
if (value == null)
return;
if (_inScript)
{
if ("src".equals(name) && (value != null))
_getLibraryList().add(value.toString());
}
else
{
super.writeAttribute(name, value, property);
}
}
public void writeURIAttribute(
String name,
Object value,
String property) throws IOException
{
if (_inScript)
{
if ("src".equals(name) && (value != null))
_getLibraryList().add(value.toString());
}
else
{
super.writeURIAttribute(name, value, property);
}
}
private StringBuilder _getScriptBuilder()
{
if (_scriptBuilder == null)
_scriptBuilder = new StringBuilder();
return _scriptBuilder;
}
private List<String> _getLibraryList()
{
return _libraries;
}
private List<String> _getScriptList()
{
return _scripts;
}
private boolean _inScript;
private StringBuilder _scriptBuilder;
private List<String> _libraries = new ArrayList<String>();
private List<String> _scripts = new ArrayList<String>();
private boolean _enabled = true;
}
|
[
"janey@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5"
] |
janey@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
|
aef3c4f76a9497d2fad41d3f9802a06a45456b96
|
d92ce06a7f2f288f619b4d056aebe34d141fcab2
|
/PNVis.edit/src/OurPNVis/provider/FinishedItemProvider.java
|
9267ce0cd703116c41ec5af4b927812d0b54ead8
|
[] |
no_license
|
mgordo/software-engineering2
|
623de13924d5f42dc9a251b9fad3effc88793454
|
1ba3eea364ec579ffa46052370bf6cd08323e2e9
|
refs/heads/master
| 2021-01-10T06:30:47.661657
| 2015-10-17T18:18:31
| 2015-10-17T18:18:31
| 43,981,466
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,414
|
java
|
/**
*/
package OurPNVis.provider;
import OurPNVis.Finished;
import OurPNVis.OurPNVisPackage;
import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.pnml.tools.epnk.pnmlcoremodel.provider.AttributeItemProvider;
/**
* This is the item provider adapter for a {@link OurPNVis.Finished} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class FinishedItemProvider
extends AttributeItemProvider
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FinishedItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addTextPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Text feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addTextPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Finished_text_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Finished_text_feature", "_UI_Finished_type"),
OurPNVisPackage.Literals.FINISHED__TEXT,
true,
false,
false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
null,
null));
}
/**
* This returns Finished.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/Finished"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
Finished finished = (Finished)object;
return getString("_UI_Finished_type") + " " + finished.isText();
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Finished.class)) {
case OurPNVisPackage.FINISHED__TEXT:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return PNVisEditPlugin.INSTANCE;
}
}
|
[
"masterkai_1977@hotmail.com"
] |
masterkai_1977@hotmail.com
|
1eba83a5b13854d7eae5fae68bd7e9066d2625df
|
a9d297e8807df9c8281d18181b394069cc85c7ab
|
/src/test/java/walkingkooka/text/pretty/ColumnConfigRequestTest.java
|
e98da48875feddbce8fef7351d6c886977beb8c7
|
[
"Apache-2.0"
] |
permissive
|
mP1/walkingkooka-text-pretty
|
ea5ab1a28b071716682e363518d7815455ebb59d
|
ba107fb5015698fcf475d2d2d66603ca860e4efb
|
refs/heads/master
| 2023-02-04T19:53:44.228408
| 2023-02-04T03:55:51
| 2023-02-04T03:55:51
| 216,320,685
| 0
| 0
|
Apache-2.0
| 2023-02-04T03:55:52
| 2019-10-20T06:57:14
|
Java
|
UTF-8
|
Java
| false
| false
| 1,515
|
java
|
/*
* Copyright 2019 Miroslav Pokorny (github.com/mP1)
*
* 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 walkingkooka.text.pretty;
import org.junit.jupiter.api.Test;
import walkingkooka.ToStringTesting;
import walkingkooka.reflect.ClassTesting;
import walkingkooka.reflect.JavaVisibility;
public final class ColumnConfigRequestTest implements ClassTesting<ColumnConfigRequest>,
ToStringTesting<ColumnConfigRequest> {
@Test
public void testToString() {
final ColumnConfig config = ColumnConfig.empty().maxWidth(12).leftAlign();
this.toStringAndCheck(ColumnConfigRequest.with(config), config.toString());
}
// ClassTesting.....................................................................................................
@Override
public Class<ColumnConfigRequest> type() {
return ColumnConfigRequest.class;
}
@Override
public JavaVisibility typeVisibility() {
return JavaVisibility.PACKAGE_PRIVATE;
}
}
|
[
"miroslav.pokorny@gmail.com"
] |
miroslav.pokorny@gmail.com
|
6c35134db523f1a083841b6320ad667a26ed3cbd
|
ed30ded3a3702456bd3fc3f9fa124f6703841075
|
/Java_Morning215/src/interface1/Demo.java
|
e7df38dc32d2c14f2f07364831ab78b054b06fd4
|
[] |
no_license
|
javaandselenium/java215
|
bff83075fcb9ab3282b1a5618e6d4f5a5f24d63e
|
03665ffc6092bcbe8d112d46f63dd65248f1d698
|
refs/heads/master
| 2023-02-01T08:07:54.181566
| 2020-12-19T02:10:01
| 2020-12-19T02:10:01
| 313,807,150
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 192
|
java
|
package interface1;
public class Demo {
public void demo() {
System.out.println("demo");
}
}
class Sample {
public void sample() {
System.out.println("sample");
}
}
|
[
"QSP@DESKTOP-EVK9GMC"
] |
QSP@DESKTOP-EVK9GMC
|
b4a39239151173235d3ee3747683068a7c48c0f6
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/model_seeding/42_asphodel-org.asphodel.index.IndexeeContent-0.5-3/org/asphodel/index/IndexeeContent_ESTest_scaffolding.java
|
728aa12b1b1d081315f8d7f5f260bebc35ba1598
|
[] |
no_license
|
tigerqiu712/evosuite-model-seeding-empirical-evaluation
|
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
|
11a920b8213d9855082d3946233731c843baf7bc
|
refs/heads/master
| 2020-12-23T21:04:12.152289
| 2019-10-30T08:02:29
| 2019-10-30T08:02:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 539
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Tue Oct 29 10:47:11 GMT 2019
*/
package org.asphodel.index;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class IndexeeContent_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
412dd735c732f6338756ebd00699051649875656
|
e83cedc2eb3a0eb53c385df8486eb0682f416692
|
/src/com/js/swing/mytooltip/MyToolTip.java
|
36f382baa7ecbb1cae5fa53b476aea53900f6d7c
|
[] |
no_license
|
xiexlp/BootstrapUtil
|
91b0a568b7bf74301aa0c1eeb356202768cb2efb
|
cc58101d3266cd69148b98ebc52027712256296f
|
refs/heads/master
| 2022-01-22T08:16:18.961518
| 2019-07-23T07:52:27
| 2019-07-23T07:52:27
| 198,380,440
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,640
|
java
|
package com.js.swing.mytooltip;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Paint;
import javax.swing.JButton;
import javax.swing.JToolTip;
public class MyToolTip extends JToolTip {
private static final long serialVersionUID = 1L;
private JButton jb;
public MyToolTip() {
super();
//setLocation(0,0);
//setBounds(-10,-10,100,100);
jb = new JButton("Push me!");
jb.setLocation(10, 30);
jb.setSize(100,30);
add(jb);
}
public Dimension getPreferredSize() {
return new Dimension(200,100);
}
// @Override
// public void setTipText(String tipText){
// //System.out.println("settiptext");
// //setTipText("11111111111111");
// }
public void paintComponent(Graphics g) {
Graphics2D g2d = (Graphics2D)g;
int width = (int)(getPreferredSize().getWidth());
int height = (int)(getPreferredSize().getHeight());
Paint oldPaint = g2d.getPaint();
g2d.setPaint(Color.CYAN);
g2d.fillRect(0, 0, width, height);
g2d.setPaint(oldPaint);
if (getTipText() != null) {
g2d.drawString("<html><body bgcolor='white'>点击我</body></html>", 10, 20);
}
}
public void paintChildren(Graphics g) {
jb.repaint();
}
public JButton getButton() {
return jb;
}
}
|
[
"pkuping@foxmail.com"
] |
pkuping@foxmail.com
|
a7b34ceffb23cd2b78a24d22b5cf90053c259bc4
|
5b824097f226414eb5f8ae1374e827b077463532
|
/src/main/java/com/pdk/chat/wx/util/WeixinParseUtil.java
|
08a09a370a61a15613437e23017945da2e924558
|
[] |
no_license
|
RenMingNeng/pdk-chat
|
94a0ab9b67db2f8b26031ede284f59655be5fefc
|
b9f73dae762a92c7040684fb240071c2a3715254
|
refs/heads/master
| 2021-08-31T13:18:08.902435
| 2017-12-21T12:26:01
| 2017-12-21T12:26:01
| 114,598,953
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,979
|
java
|
package com.pdk.chat.wx.util;
import com.pdk.chat.wx.message.base.WeixinMessageReceive;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.core.util.QuickWriter;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;
import com.thoughtworks.xstream.io.xml.XmlFriendlyReplacer;
import com.thoughtworks.xstream.io.xml.XppDriver;
import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import javax.servlet.http.HttpServletRequest;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller;
import java.io.InputStream;
import java.io.Writer;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class WeixinParseUtil {
public static final String TYPE_TEXT = "text";
public static final String TYPE_IMAGE = "image";
public static final String TYPE_LINK = "link";
public static final String TYPE_LOCATION = "location";
public static final String TYPE_VOICE = "voice";
public static final String TYPE_EVENT = "event";
public static final String EVENT_TYPE_SUBSCRIBE = "subscribe";
public static final String EVENT_TYPE_UNSUBSCRIBE = "unsubscribe";
public static final String EVENT_TYPE_CLICK = "CLICK";
public static final String EVENT_TYPE_LOCATION = "LOCATION";
@SuppressWarnings("unchecked")
private static Map<String, String> parse2Map(HttpServletRequest request) throws Exception {
Map<String, String> map = new HashMap<>();
InputStream inputStream = request.getInputStream();
SAXReader reader = new SAXReader();
Document document = reader.read(inputStream);
Element root = document.getRootElement();
List<Element> elementList = root.elements();
for (Element e : elementList)
map.put(e.getName(), e.getText());
inputStream.close();
return map;
}
public static WeixinMessageReceive parseXml(HttpServletRequest request) throws Exception {
Map<String, String> map = parse2Map(request);
Class<? extends WeixinMessageReceive> clazz = getReceiveClass(map);
WeixinMessageReceive message = clazz.newInstance();
for (Map.Entry<String, String> entry : map.entrySet()) {
Method method;
try {
method = clazz.getMethod("set" + entry.getKey(),String.class);
} catch (NoSuchMethodException e) {
continue;
}
method.invoke(message,entry.getValue());
}
return message;
}
public static <T extends Object> T paserXml(InputStream is,Class<T> clazz) throws Exception{
JAXBContext context = JAXBContext.newInstance(clazz);
Unmarshaller un = context.createUnmarshaller();
return (T) un.unmarshal(is);
}
private static Class<? extends WeixinMessageReceive> getReceiveClass(Map<String, String> map){
String type = map.get("MsgType");
if(TYPE_EVENT.equals(type)){
String event = map.get("Event");
EventMessageTypeEnum eventEnum = EventMessageTypeEnum.getByEvent(event);
if(eventEnum == null)
return WeixinMessageReceive.class;
return eventEnum.getReceiveClazz();
}else {
MessageTypeEnum typeEnum = MessageTypeEnum.getByWxmsgType(type);
if (typeEnum == null)
return WeixinMessageReceive.class;
return typeEnum.getReceiveClazz();
}
}
public static String transMsg2Xml(Object object){
xstream.alias("xml", object.getClass());
return xstream.toXML(object);
}
private static XStream xstream = new XStream(new XppDriver(new XmlFriendlyReplacer(
"_-", "_")) {
public HierarchicalStreamWriter createWriter(Writer out) {
return new PrettyPrintWriter(out, xmlFriendlyReplacer()) {
boolean cdata = true;
@SuppressWarnings("unchecked")
public void startNode(String name, Class clazz) {
super.startNode(name, clazz);
}
protected void writeText(QuickWriter writer, String text) {
if (cdata) {
writer.write("<![CDATA[");
writer.write(text);
writer.write("]]>");
} else {
writer.write(text);
}
}
};
}
});
}
|
[
"395841246@qq.com"
] |
395841246@qq.com
|
4a89b2b9cad613ec22a4d287a621aecd9a699b16
|
11b9a30ada6672f428c8292937dec7ce9f35c71b
|
/src/main/java/java/lang/Comparable.java
|
e4ea3a8df31b8735aaa1cf0fa1636af0add77aa8
|
[] |
no_license
|
bogle-zhao/jdk8
|
5b0a3978526723b3952a0c5d7221a3686039910b
|
8a66f021a824acfb48962721a20d27553523350d
|
refs/heads/master
| 2022-12-13T10:44:17.426522
| 2020-09-27T13:37:00
| 2020-09-27T13:37:00
| 299,039,533
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,910
|
java
|
/***** Lobxxx Translate Finished ******/
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package java.lang;
import java.util.*;
/**
* This interface imposes a total ordering on the objects of each class that
* implements it. This ordering is referred to as the class's <i>natural
* ordering</i>, and the class's <tt>compareTo</tt> method is referred to as
* its <i>natural comparison method</i>.<p>
*
* Lists (and arrays) of objects that implement this interface can be sorted
* automatically by {@link Collections#sort(List) Collections.sort} (and
* {@link Arrays#sort(Object[]) Arrays.sort}). Objects that implement this
* interface can be used as keys in a {@linkplain SortedMap sorted map} or as
* elements in a {@linkplain SortedSet sorted set}, without the need to
* specify a {@linkplain Comparator comparator}.<p>
*
* The natural ordering for a class <tt>C</tt> is said to be <i>consistent
* with equals</i> if and only if <tt>e1.compareTo(e2) == 0</tt> has
* the same boolean value as <tt>e1.equals(e2)</tt> for every
* <tt>e1</tt> and <tt>e2</tt> of class <tt>C</tt>. Note that <tt>null</tt>
* is not an instance of any class, and <tt>e.compareTo(null)</tt> should
* throw a <tt>NullPointerException</tt> even though <tt>e.equals(null)</tt>
* returns <tt>false</tt>.<p>
*
* It is strongly recommended (though not required) that natural orderings be
* consistent with equals. This is so because sorted sets (and sorted maps)
* without explicit comparators behave "strangely" when they are used with
* elements (or keys) whose natural ordering is inconsistent with equals. In
* particular, such a sorted set (or sorted map) violates the general contract
* for set (or map), which is defined in terms of the <tt>equals</tt>
* method.<p>
*
* For example, if one adds two keys <tt>a</tt> and <tt>b</tt> such that
* {@code (!a.equals(b) && a.compareTo(b) == 0)} to a sorted
* set that does not use an explicit comparator, the second <tt>add</tt>
* operation returns false (and the size of the sorted set does not increase)
* because <tt>a</tt> and <tt>b</tt> are equivalent from the sorted set's
* perspective.<p>
*
* Virtually all Java core classes that implement <tt>Comparable</tt> have natural
* orderings that are consistent with equals. One exception is
* <tt>java.math.BigDecimal</tt>, whose natural ordering equates
* <tt>BigDecimal</tt> objects with equal values and different precisions
* (such as 4.0 and 4.00).<p>
*
* For the mathematically inclined, the <i>relation</i> that defines
* the natural ordering on a given class C is:<pre>
* {(x, y) such that x.compareTo(y) <= 0}.
* </pre> The <i>quotient</i> for this total order is: <pre>
* {(x, y) such that x.compareTo(y) == 0}.
* </pre>
*
* It follows immediately from the contract for <tt>compareTo</tt> that the
* quotient is an <i>equivalence relation</i> on <tt>C</tt>, and that the
* natural ordering is a <i>total order</i> on <tt>C</tt>. When we say that a
* class's natural ordering is <i>consistent with equals</i>, we mean that the
* quotient for the natural ordering is the equivalence relation defined by
* the class's {@link Object#equals(Object) equals(Object)} method:<pre>
* {(x, y) such that x.equals(y)}. </pre><p>
*
* This interface is a member of the
* <a href="{@docRoot}/../technotes/guides/collections/index.html">
* Java Collections Framework</a>.
*
* <p>
* 此接口对实现它的每个类的对象施加总排序。这种排序被称为类的<i>自然排序</i>,并且类的<tt> compareTo </tt>方法被称为其<i>自然比较方法</i>。<p>
*
* 实现此接口的对象的列表(和数组)可以通过{@link Collections#sort(List)Collections.sort}(和{@link Arrays#sort(Object [])Arrays.sort}
* )自动排序。
* 实现此接口的对象可以用作{@linkplain SortedMap sorted map}中的键或作为{@linkplain SortedSet sorted set}中的元素,而无需指定{@linkplain比较器比较器}
* 。
* <p>。
*
* 当且仅当<tt> e1.compareTo(e2)== 0 </tt>具有<tt> C </tt>时,类<tt> C </tt>的自然排序被认为与</i>与类<tt> C </tt>的每个<tt> e
* 1 </tt>和<tt> e2 </tt>相同的布尔值<tt> e1.equals(e2)</tt>。
* 请注意,<tt> null </tt>不是任何类的实例,<tt> e.compareTo(null)</tt>应该抛出一个<tt> NullPointerException </tt> equals(n
* ull)</tt>返回<tt> false </tt>。
* <p>。
*
* 强烈推荐(虽然不是必需的)自然排序与等号一致。这是因为没有显式比较器的排序集(和排序映射)在使用其自然排序与equals不一致的元素(或键)时表现为"奇怪"。
* 特别地,这样的排序集合(或排序映射)违反了集合(或映射)的一般契约,其根据<tt>等于</tt>方法定义。<p>。
*
* 例如,如果添加两个键<tt> a </tt>和<tt> b </tt>,使得{@code(!a.equals(b)&& a.compareTo(b)== 0)}对于不使用显式比较器的排序集,第二个<tt>
* add </tt>操作返回false(并且排序集的大小不增加),因为<tt> a </tt>和<tt> b </tt>等价于排序集的透视图。
* <p>。
*
* 事实上,实现<tt> Comparable </tt>的所有Java核心类都具有与equals一致的自然排序。
* 一个例外是<tt> java.math.BigDecimal </tt>,其自然排序等于<tt> BigDecimal </tt>对象具有相等的值和不同的精度(如4.0和4.00)。<p>。
*
* 对于数学倾斜,定义给定类C上的自然排序的<i>关系</i>是:<pre> {(x,y),使得x.compareTo(y)<= 0}。
* </pre> </pre> </i>对于这个总订单:<pre> {(x,y),使得x.compareTo(y)== 0}。
* </pre>
*
*
* @param <T> the type of objects that this object may be compared to
*
* @author Josh Bloch
* @see java.util.Comparator
* @since 1.2
*/
public interface Comparable<T> {
/**
* Compares this object with the specified object for order. Returns a
* negative integer, zero, or a positive integer as this object is less
* than, equal to, or greater than the specified object.
*
* <p>The implementor must ensure <tt>sgn(x.compareTo(y)) ==
* -sgn(y.compareTo(x))</tt> for all <tt>x</tt> and <tt>y</tt>. (This
* implies that <tt>x.compareTo(y)</tt> must throw an exception iff
* <tt>y.compareTo(x)</tt> throws an exception.)
*
* <p>The implementor must also ensure that the relation is transitive:
* <tt>(x.compareTo(y)>0 && y.compareTo(z)>0)</tt> implies
* <tt>x.compareTo(z)>0</tt>.
*
* <p>Finally, the implementor must ensure that <tt>x.compareTo(y)==0</tt>
* implies that <tt>sgn(x.compareTo(z)) == sgn(y.compareTo(z))</tt>, for
* all <tt>z</tt>.
*
* <p>It is strongly recommended, but <i>not</i> strictly required that
* <tt>(x.compareTo(y)==0) == (x.equals(y))</tt>. Generally speaking, any
* class that implements the <tt>Comparable</tt> interface and violates
* this condition should clearly indicate this fact. The recommended
* language is "Note: this class has a natural ordering that is
* inconsistent with equals."
*
* <p>In the foregoing description, the notation
* <tt>sgn(</tt><i>expression</i><tt>)</tt> designates the mathematical
* <i>signum</i> function, which is defined to return one of <tt>-1</tt>,
* <tt>0</tt>, or <tt>1</tt> according to whether the value of
* <i>expression</i> is negative, zero or positive.
*
* <p>
* 它紧跟从<tt> compareTo </tt>的合同开始,商是<tt> C </tt>上的<i>等价关系</i>,并且自然排序是<i> order </i> on <tt> C </tt>。
* 当我们说一个类的自然排序<i>与equals </i>一致时,我们的意思是自然排序的商是由类的{@link Object#equals(Object)equals(Object) }方法:<pre> {(x,y),使得x.equals(y)}
* 。
* 它紧跟从<tt> compareTo </tt>的合同开始,商是<tt> C </tt>上的<i>等价关系</i>,并且自然排序是<i> order </i> on <tt> C </tt>。
* </pre> <p>。
*
* 这个接口是成员
* <a href="{@docRoot}/../technotes/guides/collections/index.html">
* Java集合框架</a>。
*
*
* @param o the object to be compared.
* @return a negative integer, zero, or a positive integer as this object
* is less than, equal to, or greater than the specified object.
*
* @throws NullPointerException if the specified object is null
* @throws ClassCastException if the specified object's type prevents it
* from being compared to this object.
*/
public int compareTo(T o);
}
|
[
"zhaobo@MacBook-Pro.local"
] |
zhaobo@MacBook-Pro.local
|
38fe6043298964667f47a93402275b003db88c09
|
2f842d88272f23e7de1f201cce46b7991ebed356
|
/user/src/main/java/com/coldchain/dao/UserSignMapper.java
|
d41b10167bed8d35d65d25d13a1fcf42dd5c516f
|
[] |
no_license
|
luolxb/coldChain
|
9ddfa2716760c9776035b0de01d0982f27af23c2
|
e82cb7bdac3d0eb53bf696329c050e07eb621e8e
|
refs/heads/master
| 2023-01-07T10:13:50.314346
| 2020-11-04T07:53:46
| 2020-11-04T07:53:46
| 309,877,016
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 665
|
java
|
package com.coldchain.dao;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.coldchain.entity.UserSign;
import org.apache.ibatis.annotations.Param;
/**
* <p>
* Mapper 接口
* </p>
*
* @author dyr
* @since 2020-04-08
*/
public interface UserSignMapper extends BaseMapper<UserSign> {
IPage<UserSign> selectUserSignPage(Page page, @Param(Constants.WRAPPER) QueryWrapper<UserSign> wrapper);
}
|
[
"18687269789@163.com"
] |
18687269789@163.com
|
59292871b57ee023e3908b9af263440884d064c2
|
828b5327357d0fb4cb8f3b4472f392f3b8b10328
|
/flink-table/flink-table-common/src/main/java/org/apache/flink/table/descriptors/ExternalCatalogDescriptorValidator.java
|
7cf0fd520f267d605c245c9e1e60594d646c6739
|
[
"CC-BY-3.0",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"ISC",
"MIT-0",
"GPL-2.0-only",
"BSD-2-Clause-Views",
"OFL-1.1",
"Apache-2.0",
"LicenseRef-scancode-jdom",
"GCC-exception-3.1",
"MPL-2.0",
"CC-PDDC",
"AGPL-3.0-only",
"MPL-2.0-no-copyleft-exception",
"LicenseRef-scancode-public-domain",
"LGPL-2.1-only",
"BSD-2-Clause",
"CDDL-1.1",
"CDDL-1.0",
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-proprietary-license",
"BSD-3-Clause",
"MIT",
"EPL-1.0",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-free-unknown",
"CC0-1.0",
"Classpath-exception-2.0",
"CC-BY-2.5"
] |
permissive
|
Romance-Zhang/flink_tpc_ds_game
|
7e82d801ebd268d2c41c8e207a994700ed7d28c7
|
8202f33bed962b35c81c641a05de548cfef6025f
|
refs/heads/master
| 2022-11-06T13:24:44.451821
| 2019-09-27T09:22:29
| 2019-09-27T09:22:29
| 211,280,838
| 0
| 1
|
Apache-2.0
| 2022-10-06T07:11:45
| 2019-09-27T09:11:11
|
Java
|
UTF-8
|
Java
| false
| false
| 1,868
|
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.flink.table.descriptors;
import org.apache.flink.annotation.Internal;
/**
* Validator for {@link ExternalCatalogDescriptor}.
*
* @deprecated use {@link CatalogDescriptorValidator} instead.
*/
@Deprecated
@Internal
public abstract class ExternalCatalogDescriptorValidator implements DescriptorValidator {
/**
* Prefix for catalog-related properties.
*/
public static final String CATALOG = "catalog";
/**
* Key for describing the type of the catalog. Usually used for factory discovery.
*/
public static final String CATALOG_TYPE = "catalog.type";
/**
* Key for describing the property version. This property can be used for backwards
* compatibility in case the property format changes.
*/
public static final String CATALOG_PROPERTY_VERSION = "catalog.property-version";
@Override
public void validate(DescriptorProperties properties) {
properties.validateString(CATALOG_TYPE, false, 1);
properties.validateInt(CATALOG_PROPERTY_VERSION, true, 0);
}
}
|
[
"1003761104@qq.com"
] |
1003761104@qq.com
|
01f0aac08c9468d86ff28a9ff1037b02e1e59cc4
|
665e71f8e0c63ec182b4ac4e0d94e39cdcd2d0a7
|
/src/main/java/org/minimalj/frontend/impl/json/JsonSearchTable.java
|
3bd0b5f0f569608a3daa3561eeec15535debe666
|
[
"Apache-2.0"
] |
permissive
|
tayoadaraloye/minimal-j
|
91b40563a7a38fbce62446074b10d157d4b9174a
|
e456270bc4a12b2ce0cef85ac3967fb17b6a2879
|
refs/heads/master
| 2023-05-27T11:32:24.408946
| 2020-09-10T19:10:51
| 2020-09-10T19:10:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,161
|
java
|
package org.minimalj.frontend.impl.json;
import org.minimalj.frontend.Frontend.IComponent;
import org.minimalj.frontend.Frontend.IContent;
import org.minimalj.frontend.Frontend.InputComponentListener;
import org.minimalj.frontend.Frontend.Search;
import org.minimalj.frontend.Frontend.TableActionListener;
public class JsonSearchTable<T> extends JsonComponent implements IContent {
private final Search<T> search;
private final JsonTable<T> table;
public JsonSearchTable(Search<T> search, Object[] keys, boolean multiSelect, TableActionListener<T> listener) {
super("List");
this.search = search;
addComponent(new JsonTextField("SearchTextField", new JsonSearchInputListener()));
table = new JsonTable<>(keys, multiSelect, listener);
addComponent(table);
}
private class JsonSearchInputListener implements InputComponentListener {
@Override
public void changed(IComponent source) {
JsonTextField textField = (JsonTextField) source;
String query = textField.getValue();
table.setObjects(search.search(query));
}
}
public void addComponent(JsonComponent c) {
JsonFrontend.getClientSession().addContent(getId(), c);
}
}
|
[
"bruno.eberhard@pop.ch"
] |
bruno.eberhard@pop.ch
|
655966876d61a715c85341421dca36f88c1f9be6
|
566da785b625b3a0f9522cab93752ea24a0fcfe0
|
/zscat-web/src/main/java/com/zscat/platform/blog/CategoryController.java
|
648f43b2d397c7487b290d1f4e2e0f9a9cd041d9
|
[] |
no_license
|
shenzhuan/zscat-platform
|
c063beb8e660437293fccfceb1b1876dc51836d9
|
fb17501a5b68d7db99632f7278fc99b0f93df564
|
refs/heads/master
| 2020-04-11T11:31:18.148582
| 2018-12-14T05:26:28
| 2018-12-14T05:26:28
| 161,750,531
| 2
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,449
|
java
|
package com.zscat.platform.blog;
import com.alibaba.dubbo.config.annotation.Reference;
import com.zscat.blog.entity.ArticleCustom;
import com.zscat.blog.entity.Pager;
import com.zscat.blog.entity.Partner;
import com.zscat.blog.service.CategoryService;
import com.zscat.blog.service.PartnerService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import java.util.List;
/**
* 展示的分类controller
* FILE: com.eumji.zblog.controller.ArchiveController.java
* MOTTO: 不积跬步无以至千里,不积小流无以至千里
* AUTHOR: ZSCAT
* DATE: 2017/5/8
* TIME: 15:15
*/
@Controller
@RequestMapping("/blog/categories")
public class CategoryController {
@Reference(
version = "${web.service.version}",
application = "${dubbo.application.id}",
registry = "${dubbo.registry.id}"
)
CategoryService categoryService;
@Reference(
version = "${web.service.version}",
application = "${dubbo.application.id}",
registry = "${dubbo.registry.id}"
)
PartnerService partnerService;
/**
* 获取某个标签的分页文章
* @param model
* @param pager
* @param categoryId
* @return
*/
@RequestMapping("/load/{categoryId}")
public String loadArticleByCategory(Model model, Pager pager, @PathVariable Integer categoryId){
List<ArticleCustom> articleList = categoryService.loadArticleByCategory(pager,categoryId);
if (!articleList.isEmpty()){
pager.setTotalCount(1);
pager.setPageNum(1);
model.addAttribute("articleList",articleList);
model.addAttribute("pager",pager);
model.addAttribute("categoryName",articleList.get(0).getCategoryName());
}
return "blog/part/categorySummary";
}
/**
* 跳转到分类的页面 暂时停用
* @param model
* @param categoryId
* @return
*/
@Deprecated
@RequestMapping("/details/{categoryId}")
public String categoryPage(Model model, @PathVariable Integer categoryId){
List<Partner> partnerList = partnerService.findAll();
model.addAttribute("partnerList",partnerList);
model.addAttribute("categoryId",categoryId);
return "category";
}
}
|
[
"zhuan.shen@rjfittime.com"
] |
zhuan.shen@rjfittime.com
|
b76178cd178565add8740fb6d80dd34fc8f33a97
|
da0e50718eb9979fb9343bf86983c35c9571a3e0
|
/src/main/java/br/com/eskinfotechweb/algamoneyapi/model/Pessoa_.java
|
ddcb7f7425b73e7ac4345358c4ad28153d0a267c
|
[] |
no_license
|
eskokado/algamoney-api
|
3aa43553c870ccffef1a4fa03a6c10f3082ea515
|
32c76a516025abf6bb1c5c3bb885f098a1feb775
|
refs/heads/master
| 2023-06-22T12:54:28.081848
| 2019-07-17T15:40:51
| 2019-07-17T15:40:51
| 193,543,326
| 0
| 0
| null | 2023-06-20T18:33:04
| 2019-06-24T16:43:50
|
Java
|
UTF-8
|
Java
| false
| false
| 716
|
java
|
package br.com.eskinfotechweb.algamoneyapi.model;
import javax.annotation.Generated;
import javax.persistence.metamodel.ListAttribute;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value = "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor")
@StaticMetamodel(Pessoa.class)
public abstract class Pessoa_ {
public static volatile SingularAttribute<Pessoa, Long> codigo;
public static volatile SingularAttribute<Pessoa, Boolean> ativo;
public static volatile SingularAttribute<Pessoa, Endereco> endereco;
public static volatile ListAttribute<Pessoa, Contato> contatos;
public static volatile SingularAttribute<Pessoa, String> nome;
}
|
[
"eskokado@gmail.com"
] |
eskokado@gmail.com
|
ba46d691f2d13687882c1084ea41bc826e9cfee5
|
acccd700b71d843747b7586d1f292b14c99439df
|
/src/main/java/com/express/aliExpress_offre/client/vo/ProduitVo.java
|
a7c0a5b9b734fcbf67cd76d95a22d1dc3f9715db
|
[] |
no_license
|
organization14/aliExpress
|
e2e2a87e8e8bd4d9b92098f41722f699a388d9c4
|
9c4c35beaaa49124dc5c9109aa92d2e86fb37e4c
|
refs/heads/master
| 2020-04-21T20:34:09.802553
| 2019-02-09T08:48:48
| 2019-02-09T08:49:54
| 169,849,485
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,028
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.express.aliExpress_offre.client.vo;
import java.io.Serializable;
/**
*
* @author Admin
*/
public class ProduitVo implements Serializable {
private static final long serialVersionUID = 1L;
private String reference;
private String libelle;
private CategorieVo categorieVo;
public String getReference() {
return reference;
}
public void setReference(String reference) {
this.reference = reference;
}
public String getLibelle() {
return libelle;
}
public void setLibelle(String libelle) {
this.libelle = libelle;
}
public CategorieVo getCategorieVo() {
return categorieVo;
}
public void setCategorieVo(CategorieVo categorieVo) {
this.categorieVo = categorieVo;
}
}
|
[
"Admin@Admin-PC"
] |
Admin@Admin-PC
|
bf277b00270af9f092377588aebaed8ab9a86dc4
|
6b9812c4d0abe3506d2edfd170989996f5b5089c
|
/src/com/pragma/toolbar/ToolbarUnhandledException.java
|
a071a67ff0048e5ab5737657d1d71973d0cbeef1
|
[] |
no_license
|
zorzal2/zorzal-tomcat
|
e570acd9826f8313fff6fc68f61ae2d39c20b402
|
4009879d14c6fe1b97fa8cf66a447067aeef7e2e
|
refs/heads/master
| 2022-12-24T19:53:56.790015
| 2019-07-28T20:56:25
| 2019-07-28T20:56:25
| 195,703,062
| 0
| 0
| null | 2022-12-15T23:23:46
| 2019-07-07T22:32:10
|
Java
|
UTF-8
|
Java
| false
| false
| 599
|
java
|
package com.pragma.toolbar;
import com.pragma.PragmaException;
public class ToolbarUnhandledException extends PragmaException {
public ToolbarUnhandledException() {
super();
// TODO Auto-generated constructor stub
}
public ToolbarUnhandledException(String message) {
super(message);
// TODO Auto-generated constructor stub
}
public ToolbarUnhandledException(String message, Throwable cause) {
super(message, cause);
// TODO Auto-generated constructor stub
}
public ToolbarUnhandledException(Throwable cause) {
super(cause);
// TODO Auto-generated constructor stub
}
}
|
[
"15364292+llobeto@users.noreply.github.com"
] |
15364292+llobeto@users.noreply.github.com
|
e3d42d5a0909aaf9a1592ebd7bf17bb38411851c
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/koush--AndroidAsync/de1f928555f3342692841d0d7250b5d27a27f67c/before/MultipartFormDataBody.java
|
ce2e48449a9f6780757cd018329929b0f80ebea6
|
[] |
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,540
|
java
|
package com.koushikdutta.async.http;
import com.koushikdutta.async.LineEmitter;
import com.koushikdutta.async.LineEmitter.StringCallback;
import com.koushikdutta.async.NullDataCallback;
import com.koushikdutta.async.callback.DataCallback;
import com.koushikdutta.async.http.libcore.RawHeaders;
import com.koushikdutta.async.http.server.AsyncHttpRequestBodyBase;
import com.koushikdutta.async.http.server.BoundaryEmitter;
public class MultipartFormDataBody extends AsyncHttpRequestBodyBase {
public static final String CONTENT_TYPE = "multipart/form-data";
BoundaryEmitter boundaryEmitter;
String boundary;
public MultipartFormDataBody(String contentType, String[] values) {
super(contentType);
for (String value: values) {
String[] splits = value.split("=");
if (splits.length != 2)
continue;
if (!"boundary".equals(splits[0]))
continue;
boundary = splits[1];
boundaryEmitter = new BoundaryEmitter(boundary) {
@Override
protected void onBoundaryStart() {
final RawHeaders headers = new RawHeaders();
new LineEmitter(boundaryEmitter).setLineCallback(new StringCallback() {
@Override
public void onStringAvailable(String s) {
if (!"\r".equals(s)){
headers.addLine(s);
}
else {
boundaryEmitter.setDataCallback(onPart(new Part(headers)));
}
}
});
}
@Override
protected void onBoundaryEnd() {
// System.out.println("boundary end");
}
};
boundaryEmitter.setDataEmitter(this);
return;
}
report(new Exception ("No boundary found for multipart/form-data"));
}
MultipartCallback mCallback;
public void setMultipartCallback(MultipartCallback callback) {
mCallback = callback;
}
public MultipartCallback getMultipartCallback() {
return mCallback;
}
private DataCallback onPart(Part part) {
// System.out.println("here");
// System.out.println(headers.toHeaderString());
if (mCallback == null)
return new NullDataCallback();
return mCallback.onPart(part);
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
3f7773fae40adea31afb8a26c5b415dc6f793350
|
c9dc4a2f0af04f743ddd8602d7309ace5fe95a75
|
/src/main/java/com/huios/blog/repository/search/AppuserSearchRepository.java
|
18908633ed2862d62db8a985937c5b87f51f8fc7
|
[] |
no_license
|
serviceshuios/jhipster-training
|
01f74ec49ceb2497a9a2b3caefd063164796591a
|
f93da749327a3a66e63b3541522b7bf19daa8bd3
|
refs/heads/master
| 2023-06-03T09:09:56.337480
| 2021-06-23T17:57:07
| 2021-06-23T17:57:07
| 379,687,945
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 335
|
java
|
package com.huios.blog.repository.search;
import com.huios.blog.domain.Appuser;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
/**
* Spring Data Elasticsearch repository for the {@link Appuser} entity.
*/
public interface AppuserSearchRepository extends ElasticsearchRepository<Appuser, Long> {}
|
[
"services.huios@gmail.com"
] |
services.huios@gmail.com
|
c37f2c03e255b8ebf55348aa8f6a33a699335f60
|
9197e425ca5d9e31f09206229367e6606d2e4212
|
/NewEra/src/lintCodeWorkOut/ListInsertionSort.java
|
c80351d9934669a9a61d019e3e57d94b4780bf8f
|
[] |
no_license
|
songxuchen/J2EE
|
cbbc0f964704a48ca5354bb5d75eb7b094753fef
|
bc1c63434d05be34b6c0a806c1ea3e7b7bc71efe
|
refs/heads/master
| 2020-03-14T09:20:21.241460
| 2016-09-13T20:49:31
| 2016-09-13T20:49:31
| 131,542,984
| 1
| 0
| null | 2018-04-30T01:03:15
| 2018-04-30T01:03:14
| null |
UTF-8
|
Java
| false
| false
| 579
|
java
|
package lintCodeWorkOut;
public class ListInsertionSort {
public ListNode insertionSortList(ListNode head) {
ListNode dummy = new ListNode(Integer.MIN_VALUE);
ListNode node = head;
while(node != null){
ListNode next = node.next;
ListNode prev = dummy;
while(prev.next != null && node.val > prev.next.val){
prev = prev.next;
}
node.next = prev.next;
prev.next = node;
node = next;
}
return dummy.next;
}
}
|
[
"isaacbhuang@gmail.com"
] |
isaacbhuang@gmail.com
|
a2904be50f8a67e2f35ba813124fc05b5a868690
|
a23b0c79672b59b7fee2f0730269318d8959ee18
|
/src/main/java/org/apache/lucene/index/TrackingConcurrentMergeScheduler.java
|
0bc082e0b0c37877f017a7ca7cf042cb2824a290
|
[
"Apache-2.0"
] |
permissive
|
lemonJun/ESHunt
|
1d417fc3605be8c5b384c66a5b623dea6ba77a6a
|
d66ed11d64234e783f67699e643daa77c9d077e3
|
refs/heads/master
| 2021-01-19T08:30:47.171304
| 2017-04-09T06:08:58
| 2017-04-09T06:08:58
| 87,639,997
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,401
|
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.apache.lucene.index;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.metrics.CounterMetric;
import org.elasticsearch.common.metrics.MeanMetric;
import org.elasticsearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.util.concurrent.ConcurrentCollections;
import org.elasticsearch.index.merge.OnGoingMerge;
import java.io.IOException;
import java.util.Collections;
import java.util.Locale;
import java.util.Set;
/**
* An extension to the {@link ConcurrentMergeScheduler} that provides tracking on merge times, total
* and current merges.
*/
public class TrackingConcurrentMergeScheduler extends ConcurrentMergeScheduler {
protected final ESLogger logger;
private final MeanMetric totalMerges = new MeanMetric();
private final CounterMetric totalMergesNumDocs = new CounterMetric();
private final CounterMetric totalMergesSizeInBytes = new CounterMetric();
private final CounterMetric currentMerges = new CounterMetric();
private final CounterMetric currentMergesNumDocs = new CounterMetric();
private final CounterMetric currentMergesSizeInBytes = new CounterMetric();
private final Set<OnGoingMerge> onGoingMerges = ConcurrentCollections.newConcurrentSet();
private final Set<OnGoingMerge> readOnlyOnGoingMerges = Collections.unmodifiableSet(onGoingMerges);
public TrackingConcurrentMergeScheduler(ESLogger logger) {
super();
this.logger = logger;
}
public long totalMerges() {
return totalMerges.count();
}
public long totalMergeTime() {
return totalMerges.sum();
}
public long totalMergeNumDocs() {
return totalMergesNumDocs.count();
}
public long totalMergeSizeInBytes() {
return totalMergesSizeInBytes.count();
}
public long currentMerges() {
return currentMerges.count();
}
public long currentMergesNumDocs() {
return currentMergesNumDocs.count();
}
public long currentMergesSizeInBytes() {
return currentMergesSizeInBytes.count();
}
public Set<OnGoingMerge> onGoingMerges() {
return readOnlyOnGoingMerges;
}
@Override
protected void doMerge(MergePolicy.OneMerge merge) throws IOException {
int totalNumDocs = merge.totalNumDocs();
long totalSizeInBytes = merge.totalBytesSize();
long timeNS = System.nanoTime();
currentMerges.inc();
currentMergesNumDocs.inc(totalNumDocs);
currentMergesSizeInBytes.inc(totalSizeInBytes);
OnGoingMerge onGoingMerge = new OnGoingMerge(merge);
onGoingMerges.add(onGoingMerge);
if (logger.isTraceEnabled()) {
logger.trace("merge [{}] starting..., merging [{}] segments, [{}] docs, [{}] size, into [{}] estimated_size", merge.info == null ? "_na_" : merge.info.info.name, merge.segments.size(), totalNumDocs, new ByteSizeValue(totalSizeInBytes), new ByteSizeValue(merge.estimatedMergeBytes));
}
try {
beforeMerge(onGoingMerge);
super.doMerge(merge);
} finally {
long tookMS = TimeValue.nsecToMSec(System.nanoTime() - timeNS);
onGoingMerges.remove(onGoingMerge);
afterMerge(onGoingMerge);
currentMerges.dec();
currentMergesNumDocs.dec(totalNumDocs);
currentMergesSizeInBytes.dec(totalSizeInBytes);
totalMergesNumDocs.inc(totalNumDocs);
totalMergesSizeInBytes.inc(totalSizeInBytes);
totalMerges.inc(tookMS);
String message = String.format(Locale.ROOT, "merge segment [%s] done: took [%s], [%,.1f MB], [%,d docs]", merge.info == null ? "_na_" : merge.info.info.name, TimeValue.timeValueMillis(tookMS), totalSizeInBytes / 1024f / 1024f, totalNumDocs);
if (tookMS > 20000) { // if more than 20 seconds, DEBUG log it
logger.debug(message);
} else if (logger.isTraceEnabled()) {
logger.trace(message);
}
}
}
/**
* A callback allowing for custom logic before an actual merge starts.
*/
protected void beforeMerge(OnGoingMerge merge) {
}
/**
* A callback allowing for custom logic before an actual merge starts.
*/
protected void afterMerge(OnGoingMerge merge) {
}
@Override
public MergeScheduler clone() {
// Lucene IW makes a clone internally but since we hold on to this instance
// the clone will just be the identity.
return this;
}
}
|
[
"506526593@qq.com"
] |
506526593@qq.com
|
26808727cb6f37ceb3826b15726d680374c44ef6
|
95457173cd79274e162f41e23575f4b4ef8f921a
|
/src/org/eredlab/g4/ccl/net/nntp/NewGroupsOrNewsQuery.java
|
fa9698a77b18e149ef56f8effc0cd6f4e81b4092
|
[] |
no_license
|
denyot/pos
|
32bffd774035aa86f4ada7dad9a32b7e9ecbadd6
|
ee862aa4c4cabc6da4a6b86a3c3e60d503775f5c
|
refs/heads/master
| 2020-09-26T13:40:25.238048
| 2019-11-25T22:25:07
| 2019-11-25T22:25:07
| 226,265,703
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,208
|
java
|
package org.eredlab.g4.ccl.net.nntp;
import java.util.Calendar;
public final class NewGroupsOrNewsQuery
{
private String __date;
private String __time;
private StringBuffer __distributions;
private StringBuffer __newsgroups;
private boolean __isGMT;
public NewGroupsOrNewsQuery(Calendar date, boolean gmt)
{
this.__distributions = null;
this.__newsgroups = null;
this.__isGMT = gmt;
StringBuffer buffer = new StringBuffer();
int num = date.get(1);
String str = Integer.toString(num);
num = str.length();
if (num >= 2)
buffer.append(str.substring(num - 2));
else {
buffer.append("00");
}
num = date.get(2) + 1;
str = Integer.toString(num);
num = str.length();
if (num == 1)
{
buffer.append('0');
buffer.append(str);
}
else if (num == 2) {
buffer.append(str);
} else {
buffer.append("01");
}
num = date.get(5);
str = Integer.toString(num);
num = str.length();
if (num == 1)
{
buffer.append('0');
buffer.append(str);
}
else if (num == 2) {
buffer.append(str);
} else {
buffer.append("01");
}
this.__date = buffer.toString();
buffer.setLength(0);
num = date.get(11);
str = Integer.toString(num);
num = str.length();
if (num == 1)
{
buffer.append('0');
buffer.append(str);
}
else if (num == 2) {
buffer.append(str);
} else {
buffer.append("00");
}
num = date.get(12);
str = Integer.toString(num);
num = str.length();
if (num == 1)
{
buffer.append('0');
buffer.append(str);
}
else if (num == 2) {
buffer.append(str);
} else {
buffer.append("00");
}
num = date.get(13);
str = Integer.toString(num);
num = str.length();
if (num == 1)
{
buffer.append('0');
buffer.append(str);
}
else if (num == 2) {
buffer.append(str);
} else {
buffer.append("00");
}
this.__time = buffer.toString();
}
public void addNewsgroup(String newsgroup)
{
if (this.__newsgroups != null)
this.__newsgroups.append(',');
else
this.__newsgroups = new StringBuffer();
this.__newsgroups.append(newsgroup);
}
public void omitNewsgroup(String newsgroup)
{
addNewsgroup("!" + newsgroup);
}
public void addDistribution(String distribution)
{
if (this.__distributions != null)
this.__distributions.append(',');
else
this.__distributions = new StringBuffer();
this.__distributions.append(distribution);
}
public String getDate()
{
return this.__date;
}
public String getTime()
{
return this.__time;
}
public boolean isGMT()
{
return this.__isGMT;
}
public String getDistributions()
{
return this.__distributions == null ? null : this.__distributions.toString();
}
public String getNewsgroups()
{
return this.__newsgroups == null ? null : this.__newsgroups.toString();
}
}
|
[
"823300635@qq.com"
] |
823300635@qq.com
|
2b264122fac3d668859175efeca6780a95bb1945
|
6c18ce3240f78f77181fff0a0f803a56c05ab851
|
/src/main/java/net/flawedlogic/dimensionalexploration/proxy/ClientProxy.java
|
9677ffd7b1d57876a6eb8e2c0f2880a4cd853ab7
|
[] |
no_license
|
EPIICTHUNDERCAT/Dimensional-Exploration
|
775cd7bd3259a34f7ad3b5767678e69097afe5e4
|
d2ed3ba81d7119068ff276f4c5635dd49f8f87c7
|
refs/heads/master
| 2021-01-20T04:16:24.933233
| 2018-03-29T01:51:02
| 2018-03-29T01:51:02
| 89,668,006
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 894
|
java
|
package net.flawedlogic.dimensionalexploration.proxy;
import net.flawedlogic.dimensionalexploration.init.DEBlocks;
import net.flawedlogic.dimensionalexploration.init.DEItems;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
public class ClientProxy extends CommonProxy{
public void preInit(FMLPreInitializationEvent preEvent) {
super.preInit(preEvent);
}
public void init(FMLInitializationEvent event) {
super.init(event);
}
@Override
public void register(FMLPreInitializationEvent preEvent){
super.register(preEvent);
}
@Override
public void registerRender(FMLInitializationEvent event) {
DEItems.registerRender(event);
DEBlocks.registerRender(event);
}
@Override
public void registerEntities(FMLPreInitializationEvent preEvent) {
super.registerEntities(preEvent);
}
}
|
[
"rvillalobos102299@gmail.com"
] |
rvillalobos102299@gmail.com
|
e711737f99b28c2d5aec47082b2917db875abb49
|
a7b868c8c81984dbcb17c1acc09c0f0ab8e36c59
|
/src/main/java/com/alipay/api/response/AlipayOpenAppYoukuvideoAuditcallbackSendResponse.java
|
bbd3de5380d49a841b82d7d083e4dfb4fa626359
|
[
"Apache-2.0"
] |
permissive
|
1755616537/alipay-sdk-java-all
|
a7ebd46213f22b866fa3ab20c738335fc42c4043
|
3ff52e7212c762f030302493aadf859a78e3ebf7
|
refs/heads/master
| 2023-02-26T01:46:16.159565
| 2021-02-02T01:54:36
| 2021-02-02T01:54:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 400
|
java
|
package com.alipay.api.response;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.open.app.youkuvideo.auditcallback.send response.
*
* @author auto create
* @since 1.0, 2019-03-29 16:10:00
*/
public class AlipayOpenAppYoukuvideoAuditcallbackSendResponse extends AlipayResponse {
private static final long serialVersionUID = 5379956635223791373L;
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
19064dadde7a0a7c26a5a9abed8dda6d55dcfb59
|
7abec7de691d3ebefd7e9e0d647dd1e094119376
|
/modules/utility/geotk-utility/src/main/java/org/geotoolkit/io/yaml/MetadataFactory.java
|
15af9512f9f90b691a6181c4429d2bca91c0c6b5
|
[] |
no_license
|
kailIII/geotoolkit
|
b760978c9e872b19bfec11270514d2428596adad
|
0d12b45c0473d87556f4d1bcadd34d7792e7a051
|
refs/heads/master
| 2020-12-26T04:37:41.379469
| 2015-06-12T15:09:31
| 2015-06-12T15:09:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,214
|
java
|
/*
* Geotoolkit.org - An Open Source Java GIS Toolkit
* http://www.geotoolkit.org
*
* (C) 2009-2012, Open Source Geospatial Foundation (OSGeo)
* (C) 2009-2014, Geomatys
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package org.geotoolkit.io.yaml;
import java.util.Set;
import java.util.Map;
import java.text.ParseException;
import javax.xml.bind.annotation.XmlSeeAlso;
import org.apache.sis.metadata.MetadataStandard;
import org.apache.sis.metadata.KeyNamePolicy;
import org.apache.sis.metadata.TypeValuePolicy;
import org.apache.sis.metadata.ValueExistencePolicy;
import org.geotoolkit.factory.Factory;
import org.geotoolkit.resources.Errors;
/**
* Creates metadata objects of the given {@link Class} using the properties given in a {@link Map}.
* {@code MetadataFactory} tries to instantiate metadata objects using {@link Class#newInstance()}.
* The class given to the {@link #create(Class, Map)} method is typically a GeoAPI interface (e.g.
* {@link org.opengis.metadata.citation.Citation}), in which case {@code MetadataFactory} will try
* to find its implementation class ({@link org.apache.sis.metadata.iso.citation.DefaultCitation}).
* The keys in the map shall be the {@linkplain KeyNamePolicy#UML_IDENTIFIER UML identifiers} of metadata properties,
* e.g. {@code "title"} for the value to be returned by {@link org.opengis.metadata.citation.Citation#getTitle()}.
*
* @author Martin Desruisseaux (Geomatys)
* @module
*/
final class MetadataFactory extends Factory {
/**
* The default instance.
*/
static final MetadataFactory DEFAULT = new MetadataFactory(MetadataStandard.ISO_19115);
/**
* The standard implemented by this factory.
*/
private final MetadataStandard standard;
/**
* Creates a new factory for the given metadata standard.
*
* @param standard The metadata standard implemented by this factory.
*/
MetadataFactory(final MetadataStandard standard) {
this.standard = standard;
}
/**
* Returns the property names and expected types for the given class.
*/
final Map<String,Class<?>> getDefinition(final Class<?> type) {
return standard.asTypeMap(type, KeyNamePolicy.UML_IDENTIFIER, TypeValuePolicy.ELEMENT_TYPE);
}
/**
* Returns {@code true} if the given definition map contains all the given keys.
*/
private static boolean containsAll(final Map<?,?> definition, final Set<?> keys) {
for (final Object key : keys) {
if (!definition.containsKey(key)) {
return false;
}
}
return true;
}
/**
* Returns the given type or a sub-type which contains all the given key, or {@code null} if none.
*
* @param <T> Compile-time {@code type}.
* @param type Base type of the desired metadata object.
* @param definition The value of {@code getDefinition(type)}.
* @param keys The keys of user-supplied properties of the metadata to construct.
* @return The type of the metadata object to instantiate, or {@code null} if none.
*/
private <T> Class<? extends T> guessType(final Class<T> type, final Map<?,?> definition, final Set<String> keys) {
if (containsAll(definition, keys)) {
return type;
}
final XmlSeeAlso see = type.getAnnotation(XmlSeeAlso.class);
if (see != null) {
int count = 0;
Map<?,?>[] subTypeDefinitions = null;
final Class<?>[] subTypes = see.value(); // We will filter this array in the loop.
for (final Class<?> subType : subTypes) {
if (type.isAssignableFrom(subType) && subType != type) {
final Map<String,Class<?>> cd = getDefinition(subType);
if (containsAll(cd, keys)) {
return subType.asSubclass(type);
}
if (subTypeDefinitions == null) {
subTypeDefinitions = new Map<?,?>[subTypes.length];
}
subTypeDefinitions[count] = cd;
subTypes[count++] = subType;
}
}
/*
* Only after we verified all direct children, iterate recursively over other children.
*/
for (int i=0; i<count; i++) {
final Class<?> subType = guessType(subTypes[i], subTypeDefinitions[i], keys);
if (subType != null) {
return subType.asSubclass(type);
}
}
}
return null;
}
/**
* Creates a new metadata of the given type, initialized with the property values given in the properties map.
*
* @param <T> The parameterized type of the {@code type} argument.
* @param type The interface or implementation type of the metadata object to be created.
* @param definition The value of {@code getDefinition(type)}.
* @param properties The property values to be given to the metadata object.
* @param position The position to report in case of error.
* @return A new metadata object of the given type, filled with the given values.
* @throws ParseException If the metadata object can not be created.
*/
final <T> T create(final Class<T> type, final Map<String,Class<?>> definition,
final Map<String,?> properties, final int position) throws ParseException
{
Class<? extends T> impl = standard.getImplementation(type);
if (impl == null) {
if (standard.isMetadata(type)) {
throw new ParseException(Errors.format(Errors.Keys.UNKNOWN_TYPE_1, type), position);
}
impl = type; // Will try to instantiate the type directly.
}
impl = guessType(impl, definition, properties.keySet());
final Object metadata;
try {
metadata = impl.newInstance();
} catch (Exception e) {
/*
* We catch all Exceptions because Class.newInstance() propagates all of them,
* including the checked ones (it bypasses the compile-time exception checking).
*/
throw (ParseException) new ParseException(e.getLocalizedMessage(), position).initCause(e);
}
final Map<String,Object> asMap = standard.asValueMap(metadata,
KeyNamePolicy.UML_IDENTIFIER, ValueExistencePolicy.NON_EMPTY);
try {
asMap.putAll(properties);
} catch (RuntimeException e) {
throw (ParseException) new ParseException(e.getLocalizedMessage(), position).initCause(e);
}
return type.cast(metadata);
}
}
|
[
"martin.desruisseaux@geomatys.fr"
] |
martin.desruisseaux@geomatys.fr
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.