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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3538c697837f653bb97356282b4e0dc788bb7fdd
|
29b237e6536bc4d02a33e6c79ff1418e6d7844fd
|
/fxgl-physics/src/main/java/org/jbox2d/collision/RayCastInput.java
|
628cd3b977cad1d73e8252d986bb8dfe4adeac9a
|
[
"MIT"
] |
permissive
|
javafxclinic/FXGL
|
e658558ac4df156a00de3927b50d3b660494880d
|
ee479e930bcd531e1d071a9ef8ffb07e127496cd
|
refs/heads/master
| 2021-01-20T13:22:50.643166
| 2017-04-27T17:11:23
| 2017-04-27T17:11:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,721
|
java
|
/*
* The MIT License (MIT)
*
* FXGL - JavaFX Game Library
*
* Copyright (c) 2015-2017 AlmasB (almaslvl@gmail.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.jbox2d.collision;
import com.almasb.fxgl.core.math.Vec2;
// updated to rev 100
/**
* Ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1).
*/
public class RayCastInput {
public final Vec2 p1, p2;
public float maxFraction;
public RayCastInput() {
p1 = new Vec2();
p2 = new Vec2();
maxFraction = 0;
}
public void set(final RayCastInput rci) {
p1.set(rci.p1);
p2.set(rci.p2);
maxFraction = rci.maxFraction;
}
}
|
[
"almaslvl@gmail.com"
] |
almaslvl@gmail.com
|
d79fb1b19548b497b36072abdb258da70eeba562
|
d60e287543a95a20350c2caeabafbec517cabe75
|
/LACCPlus/Hadoop/644_1.java
|
46741beb8d904186b467b71fd95145dc86ebfd00
|
[
"MIT"
] |
permissive
|
sgholamian/log-aware-clone-detection
|
242067df2db6fd056f8d917cfbc143615c558b2c
|
9993cb081c420413c231d1807bfff342c39aa69a
|
refs/heads/main
| 2023-07-20T09:32:19.757643
| 2021-08-27T15:02:50
| 2021-08-27T15:02:50
| 337,837,827
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 478
|
java
|
//,temp,TestDFSIO.java,470,479,temp,TestDFSIO.java,404,413
//,3
public class xxx {
@Override // IOMapperBase
public Closeable getIOStream(String name) throws IOException {
// open file for append
OutputStream out =
fs.append(new Path(getDataDir(getConf()), name), bufferSize);
if(compressionCodec != null)
out = compressionCodec.createOutputStream(out);
LOG.info("out = " + out.getClass().getName());
return out;
}
};
|
[
"sgholami@uwaterloo.ca"
] |
sgholami@uwaterloo.ca
|
c7bea3529b270e067c56f707c8d310fd215bffa3
|
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
|
/project_1_3/src/f/c/i/Calc_1_3_5283.java
|
a5fbe1231a8a4cced7aafc58267024df88d372e5
|
[] |
no_license
|
chalstrick/bigRepo1
|
ac7fd5785d475b3c38f1328e370ba9a85a751cff
|
dad1852eef66fcec200df10083959c674fdcc55d
|
refs/heads/master
| 2016-08-11T17:59:16.079541
| 2015-12-18T14:26:49
| 2015-12-18T14:26:49
| 48,244,030
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 131
|
java
|
package f.c.i;
public class Calc_1_3_5283 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
|
[
"christian.halstrick@sap.com"
] |
christian.halstrick@sap.com
|
7faa7a6b9b9ebd0307394d7bc331e0d0c75bbb37
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/66/164.java
|
713289c02452c312390cc16ac972ee09e5104691
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,484
|
java
|
//====================================================================================================
//The Free Edition of C++ to Java Converter limits conversion output to 100 lines per snippet.
//To purchase the Premium Edition, visit our website:
//https://www.tangiblesoftwaresolutions.com/order/order-cplus-to-java.html
//====================================================================================================
package <missing>;
public class GlobalMembers
{
public static void Main()
{
int year;
int month;
int day;
int a;
int b;
int c;
int m;
int n;
int x;
int y;
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
year = Integer.parseInt(tempVar);
}
String tempVar2 = ConsoleInput.scanfRead(" ");
if (tempVar2 != null)
{
month = Integer.parseInt(tempVar2);
}
String tempVar3 = ConsoleInput.scanfRead(" ");
if (tempVar3 != null)
{
day = Integer.parseInt(tempVar3);
}
a = (year - 1) % 400;
m = a / 100;
n = a / 4;
b = 365 * a + (n - m);
if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0)
{
switch (month)
{
case 1:
c = b;
break;
case 2:
c = b + 31;
break;
case 3:
c = b + 60;
break;
case 4:
c = b + 91;
break;
case 5:
c = b + 121;
break;
case 6:
c = b + 152;
break;
case 7:
c = b + 182;
break;
case 8:
c = b + 213;
break;
case 9:
c = b + 244;
break;
case 10:
c = b + 274;
break;
case 11:
c = b + 305;
break;
case 12:
c = b + 335;
break;
}
x = c + day;
y = x % 7;
}
else
{
switch (month)
{
case 1:
c = b;
break;
case 2:
c = b + 31;
break;
case 3:
c = b + 69;
break;
case 4:
c = b + 90;
break;
case 5:
c = b + 120;
break;
case 6:
c = b + 151;
break;
case 7:
c = b + 181;
break;
case 8:
c = b + 212;
break;
case 9:
c = b + 243;
break;
case 10:
c = b + 273;
break;
case 11:
c = b + 304;
//====================================================================================================
//End of the allowed output for the Free Edition of C++ to Java Converter.
//To purchase the Premium Edition, visit our website:
//https://www.tangiblesoftwaresolutions.com/order/order-cplus-to-java.html
//====================================================================================================
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
311675c49af2dee458e81ff126d0e3671f8d98f8
|
72f6573f05194d264e496a9f4065a9e93f4f777d
|
/ssm3/src/main/java/com/bolo/orm/mybatis/MyBatisDao.java
|
451c39ca06bf6688cfd3cc098413d7ff3cda0f20
|
[
"BSD-2-Clause"
] |
permissive
|
zhangjunfang/eclipse-dir
|
66c87159c3d95e129b0b8cfd89fdfc87a63570dd
|
6a6a4a8114f07e850ed2efd2b7049fcebbd63032
|
refs/heads/master
| 2016-09-05T17:55:03.981020
| 2014-07-06T03:41:36
| 2014-07-06T03:41:36
| 21,530,444
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 943
|
java
|
package com.bolo.orm.mybatis;
import java.io.Serializable;
import java.util.List;
import org.mybatis.spring.support.SqlSessionDaoSupport;
/**
*
* @author ocean
* date : 2014-4-14 上午09:26:26
* email : zhangjunfang0505@163.com
* Copyright : newcapec zhengzhou
*/
public class MyBatisDao extends SqlSessionDaoSupport{
public void save(String key, Object object) {
getSqlSession().insert(key, object);
}
public void delete(String key, Serializable id) {
getSqlSession().delete(key, id);
}
public void delete(String key, Object object) {
getSqlSession().delete(key, object);
}
@SuppressWarnings("unchecked")
public <T> T get(String key, Object params) {
return (T) getSqlSession().selectOne(key, params);
}
public <T> List<T> getList(String key) {
return getSqlSession().selectList(key);
}
public <T> List<T> getList(String key, Object params) {
return getSqlSession().selectList(key, params);
}
}
|
[
"zhangjunfang0505@163.com"
] |
zhangjunfang0505@163.com
|
c23adbea54bd30c391e2a709de93416ee33c65d5
|
5412f18fafb75955e6dc16cf3dcfcfa3067dd454
|
/limo_apps/Dev_and_test_apps/MapImageGenerator/src/com/reconinstruments/mapImages/shp/ShpError.java
|
226d453ea65583415893bcf90e14e871270b6b59
|
[] |
no_license
|
mfkiwl/jet
|
a6080e6f76add78a51c8f2136ba49344f0126581
|
d375f89c1d5be0aa43cab8ade08d4b55d74a3f37
|
refs/heads/master
| 2021-05-31T20:44:46.987776
| 2016-05-27T21:45:55
| 2016-05-27T21:45:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 970
|
java
|
/**
*Copyright 2011 Recon Instruments
*All Rights Reserved.
*/
/**
*This file is ported from the ActionScript package for loading ESRI shape file
*which was originally composed by Edwin van Rijkom.
*Author: Hongzhi Wang at 2011
*Instances of the ShpError class are thrown from the SHP library classes
*on encountering errors.*
*/
package com.reconinstruments.mapImages.shp;
public class ShpError extends java.lang.Error
{
/**
* for fixing the warning
*/
private static final long serialVersionUID = 1L;
/**
* Defines the identifier value of an undefined error.
*/
public static final int ERROR_UNDEFINED = 0;
/**
* Defines the identifier value of a 'no data' error, which is thrown
* when a ByteArray runs out of data.
*/
public static final int ERROR_NODATA = 1;
public int errorId = ERROR_UNDEFINED;
/**
* Constructor.
* @param message
* @return
*/
public ShpError( String message )
{
super( message );
}
}
|
[
"gil@reconinstruments.com"
] |
gil@reconinstruments.com
|
78a6d97aef8db8fe2887953bf5d36a9c440783a9
|
f1c84c97cbdd9088888155e81b670bd202da6bcb
|
/Supermarket-demo/src/main/java/com/mycomapny/dao/CustomerDao.java
|
fba4741400940903ffba983426ef9a4a4d9bd9a1
|
[] |
no_license
|
kavya-amin/FSD-projects
|
07cc3f2c233c50aa0c630c99c732973225937eda
|
0751728a4b1b89954478090948b97b55dd90358e
|
refs/heads/master
| 2022-12-24T20:37:58.457632
| 2019-11-06T06:47:46
| 2019-11-06T06:47:46
| 215,511,280
| 0
| 0
| null | 2022-12-16T14:51:50
| 2019-10-16T09:39:00
|
Java
|
UTF-8
|
Java
| false
| false
| 212
|
java
|
package com.mycomapny.dao;
import java.util.List;
import com.mycompany.model.Customer;
public interface CustomerDao {
public void createCustomer(Customer customer);
public List<Customer> getAllCustomer();
}
|
[
"b8ibmjava19@iiht.tech"
] |
b8ibmjava19@iiht.tech
|
9cbbf89223528cb80a2d584167b44318cb6abf04
|
82eba08b9a7ee1bd1a5f83c3176bf3c0826a3a32
|
/ZmailServer/src/java/org/zmail/cs/service/util/SyncToken.java
|
f8a8d251f959355aa4a4c3d303c9d6754c1db3f4
|
[
"MIT"
] |
permissive
|
keramist/zmailserver
|
d01187fb6086bf3784fe180bea2e1c0854c83f3f
|
762642b77c8f559a57e93c9f89b1473d6858c159
|
refs/heads/master
| 2021-01-21T05:56:25.642425
| 2013-10-21T11:27:05
| 2013-10-22T12:48:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,973
|
java
|
/*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Server
* Copyright (C) 2007, 2009, 2010, 2012 VMware, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.zimbra.com/license.
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
* ***** END LICENSE BLOCK *****
*/
package org.zmail.cs.service.util;
import java.util.Enumeration;
import junit.framework.TestCase;
import junit.framework.TestFailure;
import junit.framework.TestResult;
import junit.framework.TestSuite;
import org.zmail.common.service.ServiceException;
import org.zmail.common.util.CliUtil;
import org.zmail.cs.mailbox.MailServiceException;
/**
* A short identifier which identifies the synchronization state between a client and the server.
*
* The sync token can have two forms:
*
* 1) "INTEGER" -- this is the highest change ID the client knows about (see Mailbox.getLastChangeID)
*
* OR
*
* 2) "INTEGER-INTEGER"
* -- the first integer is the highest change ID that the client has *all* the data for
* -- the second integer is the highest item id in the NEXT CHANGE ID that the client has data for
*
* e.g. "4-32" means "I have all of change 4, AND I have up to item 32 in change 5"
*
*/
public class SyncToken implements Cloneable, Comparable {
private int mChangeId;
private int mOffsetInNext = -1;
public SyncToken(int changeid) {
assert(changeid >= 0);
mChangeId = changeid;
}
public SyncToken(int changeid, int offsetInNextChange) {
assert(changeid >= 0 && offsetInNextChange >= 0);
mChangeId = changeid;
mOffsetInNext = offsetInNextChange;
}
public SyncToken(String s) throws ServiceException {
int idx = s.indexOf('-');
if (idx < 0) {
mChangeId = Integer.parseInt(s);
} else {
if (idx == s.length()-1)
throw MailServiceException.INVALID_SYNC_TOKEN(s);
String lhs = s.substring(0, idx);
mChangeId = Integer.parseInt(lhs);
String rhs = s.substring(idx+1);
mOffsetInNext = Integer.parseInt(rhs);
if (mOffsetInNext < 0)
throw MailServiceException.INVALID_SYNC_TOKEN(s);
}
}
public int getChangeId() { return mChangeId; }
public boolean hasOffsetInNext() { return mOffsetInNext > 0; }
public int getOffsetInNext() { return mOffsetInNext; }
public String toString() {
if (mOffsetInNext < 0) {
return Integer.toString(mChangeId);
} else {
return mChangeId+"-"+mOffsetInNext;
}
}
/**
* TRUE if this syncToken is AFTER or UP-TO-DATE with the passed-in token
*
* @param changeId
* @return
*/
public boolean after(int changeId) {
return mChangeId >= changeId;
}
public boolean after(int changeId, int offset) {
if (mChangeId < changeId)
return false;
if (mChangeId > changeId)
return true;
return (mOffsetInNext >= offset);
}
public boolean after(SyncToken other) {
if (other.mOffsetInNext >= 0)
return after(other.mChangeId, other.mOffsetInNext);
else
return after(other.mChangeId);
}
@Override public SyncToken clone() {
if (mOffsetInNext >= 0)
return new SyncToken(mChangeId, mOffsetInNext);
else
return new SyncToken(mChangeId);
}
public int compareTo(Object arg0) {
SyncToken other = (SyncToken)arg0;
int diff = this.mChangeId - other.mChangeId;
if (diff == 0) {
if (this.mOffsetInNext == -1 && other.mOffsetInNext == -1)
return 0;
else if (this.mOffsetInNext >=0 && other.mOffsetInNext == -1)
return 1;
else if (this.mOffsetInNext == -1 && other.mOffsetInNext >=0)
return -1;
else return (this.mOffsetInNext - other.mOffsetInNext);
} else
return diff;
}
public static class Tester extends TestCase {
public Tester() {}
public void testSyncToken() throws ServiceException {
SyncToken one = new SyncToken(1);
SyncToken two = new SyncToken(2);
SyncToken three = new SyncToken(3);
SyncToken two_one = new SyncToken(2,1);
SyncToken two_two = new SyncToken(2,2);
SyncToken three_one = new SyncToken(3,1);
assertTrue(two.after(one));
assertTrue(three.after(two));
assertTrue(three.after(one));
assertFalse(one.after(three));
assertTrue(two_one.after(two));
assertFalse(two.after(two_one));
assertTrue(two_two.after(two_one));
assertFalse(two_one.after(two_two));
assertTrue(three_one.after(three));
assertTrue(three_one.after(two));
assertFalse(three.after(three_one));
assertFalse(one.after(three_one));
}
}
public static void main(String[] args) {
CliUtil.toolSetup("DEBUG");
TestSuite suite = new TestSuite(Tester.class);
TestResult results = new TestResult();
suite.run(results);
if (!results.wasSuccessful()) {
System.out.println("\n**************************");
System.out.println("TEST FAILURES:");
System.out.println("**************************");
}
if (results.failureCount() > 0) {
Enumeration failures = results.failures();
while(failures.hasMoreElements()) {
TestFailure error = (TestFailure)failures.nextElement();
System.out.println("--> Test Failure: " + error.trace() + error.thrownException());
System.out.print("\n");
}
}
if (results.errorCount() > 0) {
Enumeration errors = results.errors();
while(errors.hasMoreElements()) {
TestFailure failure = (TestFailure)errors.nextElement();
System.out.println("--> Test Error: " + failure.trace() + failure.thrownException() + " at ");
failure.thrownException().printStackTrace();
System.out.print("\n");
}
}
if (results.wasSuccessful()) {
System.out.println("\n**************************");
System.out.println("Tests SUCCESSFUL!");
System.out.println("**************************");
}
}
}
|
[
"bourgerie.quentin@gmail.com"
] |
bourgerie.quentin@gmail.com
|
5bd3c378fa60c680c3220603addd40e215512db2
|
f52a5fc41c384393314af6a10af0e6daa545d37a
|
/AE-go_GameServer/src/com/aionemu/gameserver/network/aion/clientpackets/CM_EXCHANGE_LOCK.java
|
2f150813073af5049205440d414098dc9a22b6dd
|
[] |
no_license
|
flagada08/Aion-emu_project_1.9
|
f8f8e0bdf5f9a5c78acf8511d6f2aee359d66634
|
cab40fdc84ca8742b5badde954958ef323cca355
|
refs/heads/master
| 2023-01-20T09:03:37.704021
| 2020-11-26T12:11:38
| 2020-11-26T12:11:38
| 316,220,578
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,444
|
java
|
/**
* This file is part of aion-emu <aion-emu.com>.
*
* aion-emu 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.
*
* aion-emu 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 aion-emu. If not, see <http://www.gnu.org/licenses/>.
*/
package com.aionemu.gameserver.network.aion.clientpackets;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.network.aion.AionClientPacket;
import com.aionemu.gameserver.services.ExchangeService;
import com.google.inject.Inject;
/**
* @author -Avol-
*
*/
public class CM_EXCHANGE_LOCK extends AionClientPacket
{
@Inject
private ExchangeService exchangeService;
public CM_EXCHANGE_LOCK(int opcode)
{
super(opcode);
}
@Override
protected void readImpl()
{
//nothing
}
@Override
protected void runImpl()
{
final Player activePlayer = getConnection().getActivePlayer();
exchangeService.lockExchange(activePlayer);
}
}
|
[
"flagada08@gmail.com"
] |
flagada08@gmail.com
|
08b79b160b1c774b62d1e587bfc9addb31df3ffa
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-14263-55-23-MOEAD-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/render/DefaultVelocityManager_ESTest.java
|
8ef5b79ddf11c3f544ff66bdab0ef9e4b82c4d05
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 571
|
java
|
/*
* This file was automatically generated by EvoSuite
* Thu Apr 09 04:56:06 UTC 2020
*/
package com.xpn.xwiki.render;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DefaultVelocityManager_ESTest extends DefaultVelocityManager_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
e13aa134374caba8695036f8dcde6247d67a5e7d
|
31e198531cad335afd17b661f28e8c5e336edd66
|
/src/com/kingdee/eas/st/common/app/STBillBaseEntryControllerRemoteHome.java
|
d9d159a5da6439dc9d52394f6d124a5af6e843a3
|
[] |
no_license
|
javaobjects/Project_0
|
2e17e4e400447b97a6a5f902fdaa9219c94ed66e
|
7009cce7d249051eb2c05219dca27de3adf1f48f
|
refs/heads/master
| 2020-09-29T14:47:48.373140
| 2020-01-15T09:13:49
| 2020-01-15T09:13:49
| 227,056,515
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 252
|
java
|
package com.kingdee.eas.st.common.app;
import javax.ejb.*;
import java.rmi.RemoteException;
public interface STBillBaseEntryControllerRemoteHome extends EJBHome {
STBillBaseEntryControllerRemote create() throws CreateException,
RemoteException;
}
|
[
"yanbo0039@yeah.net"
] |
yanbo0039@yeah.net
|
608d165d82e43f6ae5e816c5018ce536acfdfd53
|
a6f3c8a4080290b8cefec9c0beea3d9e1246af4b
|
/collect_app/src/main/java/org/sdgtest/collect/android/utilities/UrlUtils.java
|
d7b755cfe4f173f96494c22d182ba46a8e20f7ee
|
[
"Apache-2.0"
] |
permissive
|
Luciekimotho/sdgca-survey
|
26b747407c0a53bfac67f7a9198fe1ce16f5c9d9
|
557af63f43a3b6ae12f32b330781ab8efd2ee3ba
|
refs/heads/main
| 2023-03-19T18:38:32.663639
| 2021-03-03T09:03:35
| 2021-03-03T09:03:35
| 341,894,700
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,057
|
java
|
/*
* Copyright (C) 2017 University of Washington
*
* 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.sdgtest.collect.android.utilities;
import androidx.annotation.NonNull;
import org.sdgtest.collect.android.R;
import org.sdgtest.collect.android.application.Collect;
import org.sdgtest.collect.android.exception.BadUrlException;
public class UrlUtils {
private UrlUtils() {
}
@NonNull
public static String getSpreadsheetID(String urlString) throws BadUrlException {
// now parse the url string if we have one
final String googleHeader = "docs.google.com/spreadsheets/d/";
if (urlString == null || urlString.isEmpty()) {
throw new BadUrlException(
Collect.getInstance().getString(R.string.missing_submission_url));
} else if (urlString.length() < googleHeader.length()) {
throw new BadUrlException(
Collect.getInstance().getString(R.string.invalid_sheet_id, urlString));
} else {
int start = urlString.indexOf(googleHeader) + googleHeader.length();
int end = urlString.indexOf('/', start);
if (end == -1) {
// if there wasn't a "/", just try to get the end
end = urlString.length();
}
if (start == -1) {
throw new BadUrlException(
Collect.getInstance().getString(R.string.invalid_sheet_id, urlString));
}
return urlString.substring(start, end);
}
}
}
|
[
"luciekimotho@gmail.com"
] |
luciekimotho@gmail.com
|
644535ae799eb8967a137f4d500bef533c7109fb
|
3c705aeab0b3758a610a0f3a118898b1073b5297
|
/src/com/sonorth/evodroid/About.java
|
cb13e57f348ad54448c70e30063684243bd6b98e
|
[] |
no_license
|
derek0111/evodroid-1
|
60a8f31045bbdedcca2713640b05dcd5c0d839e6
|
c5433e0f55f491bfad4b123cc23c5630adc210c7
|
refs/heads/master
| 2021-01-17T09:59:54.637015
| 2012-07-13T00:58:10
| 2012-07-13T00:58:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,957
|
java
|
package com.sonorth.evodroid;
import com.sonorth.evodroid.util.BlackBerryUtils;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class About extends Activity {
final String app_author_url = "http://evodroid.sonorth.com";
final String tos_url = "/tos";
final String privacy_policy_url = "/privacy";
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.about);
if ( BlackBerryUtils.getInstance().isPlayBook() ) {
TextView appTitle = (TextView) findViewById(R.id.about_first_line);
appTitle.setText(getResources().getText(R.string.app_title_playbook));
}
TextView version = (TextView) findViewById(R.id.about_version);
PackageManager pm = getPackageManager();
try {
PackageInfo pi = pm.getPackageInfo("com.sonorth.evodroid", 0);
version.setText(getResources().getText(R.string.version) + " "
+ pi.versionName);
} catch (NameNotFoundException e) {
}
Button tos = (Button) findViewById(R.id.about_tos);
tos.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Uri uri = Uri.parse(app_author_url + tos_url);
startActivity(new Intent(Intent.ACTION_VIEW, uri));
}
});
Button pp = (Button) findViewById(R.id.about_privacy);
pp.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Uri uri = Uri.parse(app_author_url + privacy_policy_url);
startActivity(new Intent(Intent.ACTION_VIEW, uri));
}
});
}
public void onClick(View v) {
Uri uri = Uri.parse(app_author_url);
startActivity(new Intent(Intent.ACTION_VIEW, uri));
}
}
|
[
"you@example.com"
] |
you@example.com
|
4cb66c68239afe40688236b35df50825d3fde874
|
b99e6f1b7953531743354f7c276425c4aaafa0f5
|
/MyStockChart_Lib_1.0/src/main/java/com/mystockchart_lib/charting/mychart/MyBarChart.java
|
26ae39cbf888fb3fb1efc4697149a969f979e16e
|
[] |
no_license
|
3105Jhm/4tr-mx
|
37fadd5d12e587e4b341785f9d01d0609fc81803
|
f256a9039f92b6ef134680f1721e3e4c6522ab9c
|
refs/heads/master
| 2022-06-24T05:33:07.018001
| 2020-05-11T06:34:25
| 2020-05-11T06:34:25
| 260,776,803
| 0
| 0
| null | 2020-05-11T06:30:09
| 2020-05-02T21:18:30
|
Java
|
UTF-8
|
Java
| false
| false
| 1,794
|
java
|
package com.mystockchart_lib.charting.mychart;
import android.content.Context;
import android.util.AttributeSet;
import com.mystockchart_lib.charting.charts.BarChart;
import com.mystockchart_lib.charting.components.YAxis;
import com.mystockchart_lib.charting.highlight.Highlight;
/**
* 条形图
*/
public class MyBarChart extends BarChart {
public MyBarChart(Context context) {
super(context);
}
public MyBarChart(Context context, AttributeSet attrs) {
super(context, attrs);
}
public MyBarChart(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
protected void init() {
super.init();
/*此处不能重新示例*/
mAxisLeft = new MyYAxis(YAxis.AxisDependency.LEFT);
mAxisRendererLeft = new MyYAxisRenderer(mViewPortHandler, (MyYAxis) mAxisLeft, mLeftAxisTransformer);
mXAxis = new MyXAxis();
mXAxisRenderer = new MyXAxisRenderer(mViewPortHandler, (MyXAxis) mXAxis, mLeftAxisTransformer,this);
mAxisRight = new MyYAxis(YAxis.AxisDependency.RIGHT);
mAxisRendererRight = new MyYAxisRenderer(mViewPortHandler, (MyYAxis) mAxisRight, mRightAxisTransformer);
}
@Override
protected void calcModulus() {
mXAxis.mAxisLabelModulus = 1;
}
/*返回转型后的左右轴*/
@Override
public MyYAxis getAxisLeft() {
return (MyYAxis) super.getAxisLeft();
}
@Override
public MyXAxis getXAxis() {
return (MyXAxis)super.getXAxis();
}
@Override
public MyYAxis getAxisRight() {
return (MyYAxis) super.getAxisRight();
}
public void setHighlightValue(Highlight h){
mIndicesToHighlight = new Highlight[]{
h};
}
}
|
[
"932599583@qq.com"
] |
932599583@qq.com
|
f359c7de45eb914ed260458e26aef767bc1f0b99
|
8db21b4782aead385da5ec3978915baf4e4a082b
|
/com.jiuqi.etl.rpa.runtime/src/com/jiuqi/etl/rpa/runtime/dialog/file/SelectFileTaskFactory.java
|
aa9e9c7ea02e7737ab022eb6af8fa6a54525b966
|
[] |
no_license
|
hihod/uni-studio-based-on-jiuqi
|
5fd26938476edb4feec47e30ae35a9dfc10cfaa0
|
c106df0a6f5542ca0026c14cead63870b9b490e5
|
refs/heads/master
| 2022-01-31T21:54:28.815046
| 2019-08-19T03:13:23
| 2019-08-19T03:13:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 675
|
java
|
package com.jiuqi.etl.rpa.runtime.dialog.file;
import com.jiuqi.etl.engine.ITaskRunner;
import com.jiuqi.etl.model.ControlFlowModel;
import com.jiuqi.etl.model.TaskModel;
import com.jiuqi.etl.task.TaskFactory;
public class SelectFileTaskFactory extends TaskFactory {
public static final String ID = "com.jiuqi.etl.rpa.dialog.file";
@Override
public TaskModel createTaskModel() {
return new SelectFileTaskModel();
}
@Override
public ITaskRunner createTaskRunner(ControlFlowModel ctrlflow, TaskModel model) {
return new SelectFileTaskRunner((SelectFileTaskModel)model);
}
@Override
public String getTaskId() {
return ID;
}
}
|
[
"mrliangpengyv@gmail.com"
] |
mrliangpengyv@gmail.com
|
066d4f770469e2256def8fb3058ff6fedcd93e4b
|
6c418276e914d350b49ecf2c0890a19c8904e589
|
/app/src/main/java/com/tag/app/tagnearemployee/boardingscreens/boardingactivity/BoardingModel.java
|
662883dc0554a0b704d14387e8ef33e006d7e27b
|
[] |
no_license
|
sanjujagadish/java
|
21647f306fd22f384737173f0d2250f46d31f1a3
|
e65a460182061cb48755c2880a3d954931134743
|
refs/heads/master
| 2020-12-10T07:42:29.901803
| 2020-01-13T14:16:12
| 2020-01-13T14:16:12
| 233,537,008
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 555
|
java
|
package com.tag.app.tagnearemployee.boardingscreens.boardingactivity;
import com.tag.app.tagnearemployee.retrofit.RestClient;
import io.reactivex.disposables.Disposable;
public class BoardingModel implements BoardingContract.Model {
private final RestClient restClient;
private Disposable subscription;
public BoardingModel(RestClient restClient) {
this.restClient=restClient;
}
@Override
public void destroy() {
if (subscription != null && !subscription.isDisposed())
subscription.dispose(); }
}
|
[
"you@example.com"
] |
you@example.com
|
0ec9638e8be2f6b12bd3bf1120bf9f88f9c4c927
|
3e355a798304584431e5e5a1f1bc141e16c330fc
|
/AL-Game/data/scripts/system/handlers/instance/LowerUdasTempleInstance.java
|
be5819cf3c5bbce9b184a06918557223c6e3426f
|
[] |
no_license
|
webdes27/Aion-Lightning-4.6-SRC
|
db0b2b547addc368b7d5e3af6c95051be1df8d69
|
8899ce60aae266b849a19c3f93f47be9485c70ab
|
refs/heads/master
| 2021-09-14T19:16:29.368197
| 2018-02-27T16:05:28
| 2018-02-27T16:05:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,631
|
java
|
/**
* This file is part of Aion-Lightning <aion-lightning.org>.
*
* Aion-Lightning 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.
*
* Aion-Lightning 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 Aion-Lightning.
* If not, see <http://www.gnu.org/licenses/>.
*/
package instance;
import com.aionemu.commons.utils.Rnd;
import com.aionemu.gameserver.instance.handlers.GeneralInstanceHandler;
import com.aionemu.gameserver.instance.handlers.InstanceID;
import com.aionemu.gameserver.model.EmotionType;
import com.aionemu.gameserver.model.gameobjects.Creature;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.network.aion.serverpackets.SM_DIE;
import com.aionemu.gameserver.network.aion.serverpackets.SM_EMOTION;
import com.aionemu.gameserver.utils.PacketSendUtility;
import com.aionemu.gameserver.world.WorldMapInstance;
/**
* @author xTz, Luzien
*/
@InstanceID(300160000)
public class LowerUdasTempleInstance extends GeneralInstanceHandler {
@Override
public void onInstanceCreate(WorldMapInstance instance) {
super.onInstanceCreate(instance);
int rnd = Rnd.get(1, 100);
if (rnd > 80) { //spawn named drop chests, 20% both, 30% epic, 50% fabled chest
spawn(216150, 455.984f, 1192.506f, 190.221f, (byte) 116);
spawn(216645, 435.664f, 1182.577f, 190.221f, (byte) 116);
} else if (rnd > 50) {
spawn(216150, 455.984f, 1192.506f, 190.221f, (byte) 116);
} else {
spawn(216645, 435.664f, 1182.577f, 190.221f, (byte) 116);
}
}
@Override
public boolean onDie(final Player player, Creature lastAttacker) {
PacketSendUtility.broadcastPacket(player, new SM_EMOTION(player, EmotionType.DIE, 0, player.equals(lastAttacker) ? 0 : lastAttacker.getObjectId()), true);
PacketSendUtility.sendPacket(player, new SM_DIE(player.haveSelfRezEffect(), player.haveSelfRezItem(), 0, 8));
return true;
}
<<<<<<< .mine
@Override
public void onPlayerLogOut(Player player) {
TeleportService2.moveToInstanceExit(player, mapId, player.getRace());
}
=======
>>>>>>> .r274
}
|
[
"michelgorter@outlook.com"
] |
michelgorter@outlook.com
|
7a93fa54033a8eff87f471e1ab1017fa2aca0503
|
4f00d990f611630595e75eb6efb02f0babe99b19
|
/JFramework/crypto/src/main/java/it/richkmeli/jframework/crypto/algorithm/bouncycastle/asn1/DERExternal.java
|
fc515608f376972492df644662f54d6a5c8c9b5b
|
[
"Apache-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
whichbuffer/JFramework
|
9bd16cf2b304feb1f9d1d9a4fb95400b48e96c02
|
ef9f227c91d639eaf209a07727ea299a67757300
|
refs/heads/master
| 2022-12-27T02:09:28.988085
| 2020-08-08T23:01:42
| 2020-08-08T23:01:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,675
|
java
|
package it.richkmeli.jframework.crypto.algorithm.bouncycastle.asn1;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
/**
* Class representing the DER-type External
*/
public class DERExternal
extends ASN1External {
/**
* Construct a DER EXTERNAL object, the input encoding vector must have exactly two elements on it.
* <p>
* Acceptable input formats are:
* <ul>
* <li> {@link ASN1ObjectIdentifier} + data {@link DERTaggedObject} (direct reference form)</li>
* <li> {@link ASN1Integer} + data {@link DERTaggedObject} (indirect reference form)</li>
* <li> Anything but {@link DERTaggedObject} + data {@link DERTaggedObject} (data value form)</li>
* </ul>
*
* @throws IllegalArgumentException if input size is wrong, or
*/
public DERExternal(ASN1EncodableVector vector) {
super(vector);
}
/**
* Creates a new instance of DERExternal
* See X.690 for more informations about the meaning of these parameters
*
* @param directReference The direct reference or <code>null</code> if not set.
* @param indirectReference The indirect reference or <code>null</code> if not set.
* @param dataValueDescriptor The data value descriptor or <code>null</code> if not set.
* @param externalData The external data in its encoded form.
*/
public DERExternal(ASN1ObjectIdentifier directReference, ASN1Integer indirectReference, ASN1Primitive dataValueDescriptor, DERTaggedObject externalData) {
this(directReference, indirectReference, dataValueDescriptor, externalData.getTagNo(), externalData.toASN1Primitive());
}
/**
* Creates a new instance of DERExternal.
* See X.690 for more informations about the meaning of these parameters
*
* @param directReference The direct reference or <code>null</code> if not set.
* @param indirectReference The indirect reference or <code>null</code> if not set.
* @param dataValueDescriptor The data value descriptor or <code>null</code> if not set.
* @param encoding The encoding to be used for the external data
* @param externalData The external data
*/
public DERExternal(ASN1ObjectIdentifier directReference, ASN1Integer indirectReference, ASN1Primitive dataValueDescriptor, int encoding, ASN1Primitive externalData) {
super(directReference, indirectReference, dataValueDescriptor, encoding, externalData);
}
ASN1Primitive toDERObject() {
return this;
}
ASN1Primitive toDLObject() {
return this;
}
int encodedLength()
throws IOException {
return this.getEncoded().length;
}
/* (non-Javadoc)
* @see it.richkmeli.jframework.crypto.algorithm.bouncycastle.asn1.ASN1Primitive#encode(it.richkmeli.jframework.crypto.algorithm.bouncycastle.asn1.DEROutputStream)
*/
void encode(ASN1OutputStream out, boolean withTag) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
if (directReference != null) {
baos.write(directReference.getEncoded(ASN1Encoding.DER));
}
if (indirectReference != null) {
baos.write(indirectReference.getEncoded(ASN1Encoding.DER));
}
if (dataValueDescriptor != null) {
baos.write(dataValueDescriptor.getEncoded(ASN1Encoding.DER));
}
DERTaggedObject obj = new DERTaggedObject(true, encoding, externalContent);
baos.write(obj.getEncoded(ASN1Encoding.DER));
out.writeEncoded(withTag, BERTags.CONSTRUCTED, BERTags.EXTERNAL, baos.toByteArray());
}
}
|
[
"richkmeli@gmail.com"
] |
richkmeli@gmail.com
|
af63b093da0c2d2579b012b41c587f45bff21fac
|
8c53dc77a7c33ef56d2eb2323812d645c8c0b7db
|
/01.Generics - Lab/src/demo/simpleGenericExample/Dog.java
|
cbeca3efadb0fd23af8a9d7c6a49f9f530473295
|
[] |
no_license
|
AleksandarBoev/Software-University-Java-OOP-Advanced
|
a68a1305db7fb3ba2d9a24bdad91e86ce298c7d8
|
2c92ab3beb5371ea8d8df78ea79cf493ad18cb19
|
refs/heads/master
| 2020-03-22T15:58:39.173553
| 2018-10-23T19:42:58
| 2018-10-23T19:42:58
| 140,293,524
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 333
|
java
|
package demo.simpleGenericExample;
public class Dog extends Animal {
public Dog(String species, int dangerLevel) {
super(species, dangerLevel);
}
@Override
public void makeSound() {
System.out.println("Baouau");
}
@Override
public String toString() {
return "Dog here";
}
}
|
[
"aleksandarboev95@gmail.com"
] |
aleksandarboev95@gmail.com
|
4edc29224cf42272a2d5288c880539b01495551a
|
e75be673baeeddee986ece49ef6e1c718a8e7a5d
|
/submissions/blizzard/Corpus/eclipse.jdt.ui/10004.java
|
a86527e7f426bc4871b897f02cb3b7b59efbab44
|
[
"MIT"
] |
permissive
|
zhendong2050/fse18
|
edbea132be9122b57e272a20c20fae2bb949e63e
|
f0f016140489961c9e3c2e837577f698c2d4cf44
|
refs/heads/master
| 2020-12-21T11:31:53.800358
| 2018-07-23T10:10:57
| 2018-07-23T10:10:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 366
|
java
|
package p;
class A {
void call(Ex ex) {
ex.method("Eclipse1", new Integer(1));
Top top = ex;
top.method("Eclipse2", new Integer(2));
}
}
class Top<TC> {
<TM> void method(TC cTop, TM mTop) {
}
}
class Ex<C extends String> extends Top<C> {
<M extends Integer> void method(C cEx, M mEx) {
}
}
|
[
"tim.menzies@gmail.com"
] |
tim.menzies@gmail.com
|
550d73352707a567a5bfa485c84ce584a14593a4
|
7a2c91813117a8d949571521510895ee53daad49
|
/src/main/java/com/alipay/api/response/MybankCreditLoantradeLoanschemeQueryResponse.java
|
3be0ca71d702d62965936809774be5aa154ad1d4
|
[
"Apache-2.0"
] |
permissive
|
dut3062796s/alipay-sdk-java-all
|
eb5afb5b570fb0deb40d8c960b85a01d13506568
|
559180f4c370f7fcfef67a1c559768d11475c745
|
refs/heads/master
| 2020-07-03T21:00:06.124387
| 2019-06-23T01:13:43
| 2019-06-23T01:13:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,288
|
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.MyBkAccountVO;
import com.alipay.api.domain.LoanChargeInfo;
import com.alipay.api.domain.InstallmentValue;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: mybank.credit.loantrade.loanscheme.query response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class MybankCreditLoantradeLoanschemeQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 1137722699273398139L;
/**
* 收款账号
*/
@ApiListField("account_vo")
@ApiField("my_bk_account_v_o")
private List<MyBkAccountVO> accountVo;
/**
* 警戒额度,单位元
*/
@ApiField("alert_amt")
private String alertAmt;
/**
* 费用列表
*/
@ApiListField("charge_info_list")
@ApiField("loan_charge_info")
private List<LoanChargeInfo> chargeInfoList;
/**
* 授信有效截止日期(日期精度为天,包含截止日),必选
*/
@ApiField("credit_expire_date")
private Date creditExpireDate;
/**
* 授信额度,政策模型或人工审批出来的授信,单位元
*/
@ApiField("credit_lmt_amt")
private String creditLmtAmt;
/**
* 授信编号,允许为空
*/
@ApiField("credit_no")
private String creditNo;
/**
* 授信方式,包括预授信方式、自动授信方式、人工授信方式
*/
@ApiField("credit_source")
private String creditSource;
/**
* 授信有效起始日期(日期精度为天,包含起始日),必选
*/
@ApiField("credit_start_date")
private Date creditStartDate;
/**
* 利率. 年利率小数
*/
@ApiField("int_rate")
private String intRate;
/**
* 政策产品码(微贷的政策产品码,BC开头)
*/
@ApiField("loan_policy_code")
private String loanPolicyCode;
/**
* 期限,指贷款期限的长度
*/
@ApiField("loan_term")
private Long loanTerm;
/**
* 期限单位;贷款期限的长度单位,有年、月、日
*/
@ApiField("loan_term_unit")
private String loanTermUnit;
/**
* 可贷额度,单位元
*/
@ApiField("loanable_amt")
private String loanableAmt;
/**
* 还款方式集合
*/
@ApiField("repay_mode_list")
private InstallmentValue repayModeList;
/**
* 金融云产品编码
*/
@ApiField("sale_pd_code")
private String salePdCode;
/**
* 水位额度,单位元
*/
@ApiField("water_amt")
private String waterAmt;
public void setAccountVo(List<MyBkAccountVO> accountVo) {
this.accountVo = accountVo;
}
public List<MyBkAccountVO> getAccountVo( ) {
return this.accountVo;
}
public void setAlertAmt(String alertAmt) {
this.alertAmt = alertAmt;
}
public String getAlertAmt( ) {
return this.alertAmt;
}
public void setChargeInfoList(List<LoanChargeInfo> chargeInfoList) {
this.chargeInfoList = chargeInfoList;
}
public List<LoanChargeInfo> getChargeInfoList( ) {
return this.chargeInfoList;
}
public void setCreditExpireDate(Date creditExpireDate) {
this.creditExpireDate = creditExpireDate;
}
public Date getCreditExpireDate( ) {
return this.creditExpireDate;
}
public void setCreditLmtAmt(String creditLmtAmt) {
this.creditLmtAmt = creditLmtAmt;
}
public String getCreditLmtAmt( ) {
return this.creditLmtAmt;
}
public void setCreditNo(String creditNo) {
this.creditNo = creditNo;
}
public String getCreditNo( ) {
return this.creditNo;
}
public void setCreditSource(String creditSource) {
this.creditSource = creditSource;
}
public String getCreditSource( ) {
return this.creditSource;
}
public void setCreditStartDate(Date creditStartDate) {
this.creditStartDate = creditStartDate;
}
public Date getCreditStartDate( ) {
return this.creditStartDate;
}
public void setIntRate(String intRate) {
this.intRate = intRate;
}
public String getIntRate( ) {
return this.intRate;
}
public void setLoanPolicyCode(String loanPolicyCode) {
this.loanPolicyCode = loanPolicyCode;
}
public String getLoanPolicyCode( ) {
return this.loanPolicyCode;
}
public void setLoanTerm(Long loanTerm) {
this.loanTerm = loanTerm;
}
public Long getLoanTerm( ) {
return this.loanTerm;
}
public void setLoanTermUnit(String loanTermUnit) {
this.loanTermUnit = loanTermUnit;
}
public String getLoanTermUnit( ) {
return this.loanTermUnit;
}
public void setLoanableAmt(String loanableAmt) {
this.loanableAmt = loanableAmt;
}
public String getLoanableAmt( ) {
return this.loanableAmt;
}
public void setRepayModeList(InstallmentValue repayModeList) {
this.repayModeList = repayModeList;
}
public InstallmentValue getRepayModeList( ) {
return this.repayModeList;
}
public void setSalePdCode(String salePdCode) {
this.salePdCode = salePdCode;
}
public String getSalePdCode( ) {
return this.salePdCode;
}
public void setWaterAmt(String waterAmt) {
this.waterAmt = waterAmt;
}
public String getWaterAmt( ) {
return this.waterAmt;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
8a460c5a4cbcefae8ee8257d0d94c259f61721ba
|
fecf325cfcc16d0397ca35806220e2bc410240a6
|
/src/main/java/com/gms/web/exam/LambdaMethod.java
|
99e81d7e1f4deb67beae2e7e612cc23a56755194
|
[] |
no_license
|
kosoto/Spring5.1
|
d2cdf5dc1a03b6a9bc482203812b90b0656cf36e
|
4e3896dd2fe165eba8dca02a5038c29c58ae8397
|
refs/heads/master
| 2020-03-28T19:22:50.684779
| 2018-09-16T12:20:05
| 2018-09-16T12:20:05
| 148,969,898
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 361
|
java
|
package com.gms.web.exam;
import java.util.function.Consumer;
import java.util.function.Function;
public class LambdaMethod {
public static void main(String[] args) {
Function<String, Integer> f = Integer::parseInt;
int a = f.apply("5");
System.out.println(a);
Consumer<String> c = System.out::println;
c.accept("Hello Lambda");
}
}
|
[
"kstad@naver.com"
] |
kstad@naver.com
|
247e0788fdf034baa513fb71216df5074c166fb1
|
1790f987d310b7ddb897a4cbad5b812828efbf02
|
/my_library/src/main/java/com/ist/cadillacpaltform/UI/adapter/MacManageCarsAdapter.java
|
c411b17327dbbaf54660f702d8858782147600e8
|
[] |
no_license
|
sunshaochi/Cadillacsecond4.0
|
d65f168e98ff72c8cfaf8b5e4d6073d839ddf161
|
d34d453ae7a6b8abbf903763c7a9804ae0e02e64
|
refs/heads/master
| 2020-03-17T16:59:24.568009
| 2018-05-17T06:45:32
| 2018-05-17T06:45:32
| 133,769,802
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,577
|
java
|
package com.ist.cadillacpaltform.UI.adapter;
import android.content.Context;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.ist.cadillacpaltform.R;
import com.ist.cadillacpaltform.SDK.bean.HighStockAge.CarInfo;
import java.util.ArrayList;
import java.util.List;
/**
* Created by dearlhd on 2017/1/10.
*/
public class MacManageCarsAdapter extends BaseAdapter {
private Context mContext;
private List<CarInfo> mCars;
private OnRightItemClickListener mListener;
public interface OnRightItemClickListener {
void onDeleteClick (long carId);
}
public MacManageCarsAdapter (Context context, List<CarInfo> cars) {
mContext = context;
mCars = cars;
if (mCars == null) {
mCars = new ArrayList<CarInfo>();
}
}
public void setOnRightItemClickListener (OnRightItemClickListener listener) {
mListener = listener;
}
public void addCars (List<CarInfo> cars) {
if (cars != null) {
mCars.addAll(cars);
notifyDataSetChanged();
}
}
@Override
public int getCount() {
return mCars.size();
}
@Override
public Object getItem(int position) {
return mCars.get(position);
}
@Override
public long getItemId(int position) {
return mCars.get(position).getId();
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
if (convertView == null) {
convertView = LayoutInflater.from(mContext).inflate(R.layout.item_listview_car_info, null);
holder = new ViewHolder();
holder.tvCarModel = (TextView) convertView.findViewById(R.id.tv_car_model);
holder.tvCarColor = (TextView) convertView.findViewById(R.id.tv_car_color);
holder.tvCarPrice = (TextView) convertView.findViewById(R.id.tv_car_price);
holder.tvDealer = (TextView) convertView.findViewById(R.id.tv_dealer);
holder.tvRightBtn1 = (TextView) convertView.findViewById(R.id.tv_right_button1);
holder.tvDeleteBtn = (TextView) convertView.findViewById(R.id.tv_right_button2);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
final CarInfo car = mCars.get(position);
String intro = car.getLine().getName() + " " + car.getConfig().getName();
holder.tvCarModel.setText(intro);
holder.tvCarColor.setText(car.getColor());
holder.tvCarPrice.setText(car.getPrice() + "万");
if(car.getDealer()!=null) {
holder.tvDealer.setText(car.getDealer().getName());
}
holder.tvRightBtn1.setVisibility(View.GONE);
holder.tvDeleteBtn.setText("删除");
holder.tvDeleteBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (mListener != null) {
mListener.onDeleteClick(car.getId());
}
mCars.remove(position);
notifyDataSetChanged();
}
});
return convertView;
}
private class ViewHolder {
TextView tvCarModel;
TextView tvCarColor;
TextView tvCarPrice;
TextView tvDealer;
TextView tvRightBtn1;
TextView tvDeleteBtn;
}
}
|
[
"673132032@qq.com"
] |
673132032@qq.com
|
455f332208d04d3147783fdc0d7c381331bd56f2
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/15/15_644699c1fe379fc6f813bab8c86a7e03708d0623/VertexAttribute/15_644699c1fe379fc6f813bab8c86a7e03708d0623_VertexAttribute_t.java
|
bb3bd9f3ac31b9254e8ef27eb93d47e310fe5e94
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,847
|
java
|
/*******************************************************************************
* Copyright 2011 See AUTHORS file.
*
* 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.badlogic.gdx.graphics;
import com.badlogic.gdx.graphics.VertexAttributes.Usage;
import com.badlogic.gdx.graphics.glutils.ShaderProgram;
/** A single vertex attribute defined by its {@link Usage}, its number of components and its shader alias. The Usage is needed for
* the fixed function pipeline of OpenGL ES 1.x. Generic attributes are not supported in the fixed function pipeline. The number
* of components defines how many components the attribute has. The alias defines to which shader attribute this attribute should
* bind. The alias is used by a {@link Mesh} when drawing with a {@link ShaderProgram}. The alias can be changed at any time.
*
* @author mzechner */
public final class VertexAttribute {
/** the attribute {@link Usage} **/
public final int usage;
/** the number of components this attribute has **/
public final int numComponents;
/** the offset of this attribute in bytes, don't change this! **/
public int offset;
/** the alias for the attribute used in a {@link ShaderProgram} **/
public String alias;
/** optional unit/index specifier, used for texture coordinates and bone weights **/
public int unit;
/** Constructs a new VertexAttribute.
*
* @param usage the usage, used for the fixed function pipeline. Generic attributes are not supported in the fixed function
* pipeline.
* @param numComponents the number of components of this attribute, must be between 1 and 4.
* @param alias the alias used in a shader for this attribute. Can be changed after construction. */
public VertexAttribute (int usage, int numComponents, String alias) {
this(usage, numComponents, alias, 0);
}
/** Constructs a new VertexAttribute.
*
* @param usage the usage, used for the fixed function pipeline. Generic attributes are not supported in the fixed function
* pipeline.
* @param numComponents the number of components of this attribute, must be between 1 and 4.
* @param alias the alias used in a shader for this attribute. Can be changed after construction.
* @param index unit/index of the attribute, used for boneweights and texture coordinates.
* */
public VertexAttribute (int usage, int numComponents, String alias, int index) {
this.usage = usage;
this.numComponents = numComponents;
this.alias = alias;
this.unit = index;
}
public static VertexAttribute Position () {
return new VertexAttribute(Usage.Position, 3, ShaderProgram.POSITION_ATTRIBUTE);
}
public static VertexAttribute TexCoords (int unit) {
return new VertexAttribute(Usage.TextureCoordinates, 2, ShaderProgram.TEXCOORD_ATTRIBUTE + unit, unit);
}
public static VertexAttribute Normal () {
return new VertexAttribute(Usage.Normal, 3, ShaderProgram.NORMAL_ATTRIBUTE);
}
public static VertexAttribute Color () {
return new VertexAttribute(Usage.ColorPacked, 4, ShaderProgram.COLOR_ATTRIBUTE);
}
public static VertexAttribute ColorUnpacked () {
return new VertexAttribute(Usage.Color, 4, ShaderProgram.COLOR_ATTRIBUTE);
}
public static VertexAttribute Tangent() {
return new VertexAttribute(Usage.Tangent, 3, ShaderProgram.TANGENT_ATTRIBUTE);
}
public static VertexAttribute Binormal() {
return new VertexAttribute(Usage.BiNormal, 3, ShaderProgram.BINORMAL_ATTRIBUTE);
}
public static VertexAttribute BoneWeight (int unit) {
return new VertexAttribute(Usage.BoneWeight, 2, "a_boneWeight" + unit, unit);
}
/** Tests to determine if the passed object was created with the same parameters */
@Override
public boolean equals (final Object obj) {
if (!(obj instanceof VertexAttribute)) {
return false;
}
return equals((VertexAttribute)obj);
}
public boolean equals (final VertexAttribute other) {
return other != null && usage == other.usage && numComponents == other.numComponents && alias.equals(other.alias) && unit == other.unit;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
1a645d5175b562d91cea63f907844b7825fae60d
|
32d26f73b762aec883ea0ddd520ed9618dcab04d
|
/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/indexaccum/IAMax.java
|
f10f105444759ad288d89136e0f45f4179c8e6b1
|
[
"Apache-2.0"
] |
permissive
|
mohendra/nd4j
|
2828e3a63b11c7b312741f1219e523dd8531c499
|
a4d35593e45f6ee4d2827889835363a662997103
|
refs/heads/master
| 2021-01-24T23:35:33.519547
| 2016-01-18T19:17:22
| 2016-01-18T19:17:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,896
|
java
|
/*
*
* * Copyright 2015 Skymind,Inc.
* *
* * Licensed under the Apache License, Version 2.0 (the "License");
* * you may not use this file except in compliance with the License.
* * You may obtain a copy of the License at
* *
* * http://www.apache.org/licenses/LICENSE-2.0
* *
* * Unless required by applicable law or agreed to in writing, software
* * distributed under the License is distributed on an "AS IS" BASIS,
* * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* * See the License for the specific language governing permissions and
* * limitations under the License.
*
*
*/
package org.nd4j.linalg.api.ops.impl.indexaccum;
import org.apache.commons.math3.util.FastMath;
import org.nd4j.linalg.api.complex.IComplexNumber;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.api.ops.BaseIndexAccumulation;
import org.nd4j.linalg.api.ops.Op;
import org.nd4j.linalg.factory.Nd4j;
/**
* Calculate the index of the max absolute value over a vector
*
* @author Adam Gibson
*/
public class IAMax extends BaseIndexAccumulation {
public IAMax() {
}
public IAMax(INDArray x, INDArray y, int n) {
super(x, y, n);
}
public IAMax(INDArray x) {
super(x);
}
public IAMax(INDArray x, INDArray y) {
super(x, y);
}
public int update(double accum, int accumIdx, double x, int xIdx){
return (FastMath.abs(accum)>=FastMath.abs(x) ? accumIdx : xIdx);
}
public int update(float accum, int accumIdx, float x, int xIdx){
return (FastMath.abs(accum)>=FastMath.abs(x) ? accumIdx : xIdx);
}
public int update(double accum, int accumIdx, double x, double y, int idx){
return (FastMath.abs(accum)>=FastMath.abs(x) ? accumIdx : idx);
}
public int update(float accum, int accumIdx, float x, float y, int idx){
return (FastMath.abs(accum)>=FastMath.abs(x) ? accumIdx : idx);
}
public int update(IComplexNumber accum, int accumIdx, IComplexNumber x, int xIdx){
return (accum.absoluteValue().doubleValue()>=x.absoluteValue().doubleValue() ? accumIdx : xIdx);
}
@Override
public int update(IComplexNumber accum, int accumIdx, double x, int idx) {
return (accum.absoluteValue().doubleValue()>=FastMath.abs(x) ? accumIdx : idx);
}
@Override
public int update(IComplexNumber accum, int accumIdx, double x, double y, int idx) {
return (accum.absoluteValue().doubleValue()>=FastMath.abs(x) ? accumIdx : idx);
}
public int update(IComplexNumber accum, int accumIdx, IComplexNumber x, IComplexNumber y, int idx){
return (accum.absoluteValue().doubleValue()>=x.absoluteValue().doubleValue() ? accumIdx : idx);
}
@Override
public String name() {
return "iamax";
}
@Override
public IComplexNumber op(IComplexNumber origin, double other) {
return Nd4j.createComplexNumber(origin.absoluteValue(), 0);
}
@Override
public IComplexNumber op(IComplexNumber origin, float other) {
return Nd4j.createComplexNumber(origin.absoluteValue(),0);
}
@Override
public IComplexNumber op(IComplexNumber origin, IComplexNumber other) {
return Nd4j.createComplexNumber(origin.absoluteValue(),0);
}
@Override
public float op(float origin, float other) {
return FastMath.abs(origin);
}
@Override
public double op(double origin, double other) {
return FastMath.abs(origin);
}
@Override
public double op(double origin) {
return origin;
}
@Override
public float op(float origin) {
return FastMath.abs(origin);
}
@Override
public IComplexNumber op(IComplexNumber origin) {
return Nd4j.createComplexNumber(origin.absoluteValue(),0);
}
@Override
public double zeroDouble(){
return 0.0;
}
@Override
public float zeroFloat(){
return 0.0f;
}
@Override
public IComplexNumber zeroComplex(){
return Nd4j.createComplexNumber(0,0);
}
@Override
public Op opForDimension(int index, int dimension) {
INDArray xAlongDimension = x.vectorAlongDimension(index, dimension);
if (y() != null)
return new IAMax(xAlongDimension, y.vectorAlongDimension(index, dimension), xAlongDimension.length());
else
return new IAMax(x.vectorAlongDimension(index, dimension));
}
@Override
public Op opForDimension(int index, int... dimension) {
INDArray xAlongDimension = x.tensorAlongDimension(index, dimension);
if (y() != null)
return new IAMax(xAlongDimension, y.tensorAlongDimension(index, dimension), xAlongDimension.length());
else
return new IAMax(x.tensorAlongDimension(index, dimension));
}
}
|
[
"blacka101@gmail.com"
] |
blacka101@gmail.com
|
80e620020aefa4a0286aa17c7534d824421b4388
|
995e655293513d0b9f93d62e28f74b436245ae74
|
/src/com/htc/gc/companion/ui/widget/CustomHtcRadioButton.java
|
c84ea770fffd038a9844a977e10f056d0ae571f4
|
[] |
no_license
|
JALsnipe/HTC-RE-YouTube-Live-Android
|
796e7c97898cac41f0f53120e79cde90d3f2fab1
|
f941b64ad6445c0a0db44318651dc76715291839
|
refs/heads/master
| 2021-01-17T09:46:50.725810
| 2015-01-09T23:32:14
| 2015-01-09T23:32:14
| 29,039,855
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,621
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.htc.gc.companion.ui.widget;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import com.htc.gc.companion.b;
import com.htc.gc.companion.ui.cq;
import com.htc.lib1.cc.widget.HtcRadioButton;
public class CustomHtcRadioButton extends HtcRadioButton
implements cq
{
int a;
boolean b;
Drawable c[];
public CustomHtcRadioButton(Context context)
{
this(context, null);
}
public CustomHtcRadioButton(Context context, AttributeSet attributeset)
{
this(context, attributeset, 0);
}
public CustomHtcRadioButton(Context context, AttributeSet attributeset, int i)
{
super(context, attributeset, i);
a = 0;
b = false;
c = new Drawable[5];
a(context, attributeset);
}
public void a(Context context, AttributeSet attributeset)
{
TypedArray typedarray = context.obtainStyledAttributes(attributeset, b.GCThemeMode);
if (typedarray != null)
{
b = typedarray.getBoolean(0, false);
typedarray.recycle();
}
if (!b)
{
a = context.getResources().getColor(0x7f0e00d6);
c[0] = context.getResources().getDrawable(0x7f020198);
c[1] = context.getResources().getDrawable(0x7f02015b);
c[2] = null;
c[3] = context.getResources().getDrawable(0x7f0201cb);
c[4] = context.getResources().getDrawable(0x7f0201cb);
} else
{
a = context.getResources().getColor(0x7f0e00b3);
c[0] = context.getResources().getDrawable(0x7f02015b);
c[1] = context.getResources().getDrawable(0x7f02015b);
c[2] = null;
c[3] = context.getResources().getDrawable(0x7f0201ca);
c[4] = context.getResources().getDrawable(0x7f0201ca);
}
a(c[0], c[1], c[2], c[3], c[4]);
}
protected void a(Canvas canvas)
{
super.a(canvas);
if (e != null)
{
e.setColorFilter(a, android.graphics.PorterDuff.Mode.SRC_ATOP);
if (!isChecked() && !o)
{
e.setAlpha(255);
}
e.draw(canvas);
}
if (h != null)
{
if (isChecked())
{
h.setColorFilter(a, android.graphics.PorterDuff.Mode.SRC_ATOP);
} else
{
h.clearColorFilter();
}
h.draw(canvas);
}
}
protected void b(Canvas canvas)
{
super.b(canvas);
if (e != null)
{
e.clearColorFilter();
if (!isChecked())
{
if (o)
{
e.setAlpha(0);
} else
{
e.setAlpha(255);
}
}
e.draw(canvas);
}
if (i != null)
{
if (isChecked())
{
i.setColorFilter(a, android.graphics.PorterDuff.Mode.SRC_ATOP);
} else
{
i.clearColorFilter();
}
i.draw(canvas);
}
}
protected void c(Canvas canvas)
{
}
protected void d(Canvas canvas)
{
}
}
|
[
"josh.lieberman92@gmail.com"
] |
josh.lieberman92@gmail.com
|
eb248f1c0d74caacc3899fd08bbf03156910426c
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2007-02-19/seasar2-2.4.10/s2-framework/src/main/java/org/seasar/framework/util/AssertionUtil.java
|
4149c06892f69b1e1d4763c33beaff027298b002
|
[
"Apache-2.0"
] |
permissive
|
svn2github/s2container
|
54ca27cf0c1200a93e1cb88884eb8226a9be677d
|
625adc6c4e1396654a7297d00ec206c077a78696
|
refs/heads/master
| 2020-06-04T17:15:02.140847
| 2013-08-09T09:38:15
| 2013-08-09T09:38:15
| 10,850,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,374
|
java
|
/*
* Copyright 2004-2007 the Seasar Foundation and the Others.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.seasar.framework.util;
import org.seasar.framework.exception.EmptyRuntimeException;
/**
* @author shot
*/
public class AssertionUtil {
private AssertionUtil() {
}
public static void assertNotNull(String message, Object obj) {
if (obj == null) {
throw new NullPointerException(message);
}
}
public static void assertNotEmpty(String message, String s) {
if (StringUtil.isEmpty(s)) {
throw new EmptyRuntimeException(message);
}
}
public static void assertIntegerNotNegative(String message, int num) {
if (num < 0) {
throw new IllegalArgumentException(message);
}
}
}
|
[
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] |
koichik@319488c0-e101-0410-93bc-b5e51f62721a
|
e0d168f91d9d4f50487f4053061516d47b2fbdb2
|
32c6e6ed90124a1fc9693ad5584b7f25260b683e
|
/app/src/main/java/com/example/sakethdargula1/quizapp/ResultsFragment.java
|
bc51a26c33388eb766d38594329b7e7f0405acc2
|
[] |
no_license
|
sak6lab/QuizApp
|
8def2429883ab502097d18fc0304d2b3bdefebfe
|
34a40696a9e716c876b2357dbaf403284970101f
|
refs/heads/master
| 2021-01-21T11:00:32.946052
| 2017-06-21T13:48:06
| 2017-06-21T13:48:06
| 91,718,897
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,935
|
java
|
package com.example.sakethdargula1.quizapp;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import java.util.ArrayList;
public class ResultsFragment extends Fragment {
private static final String ARG_CORRECT_ANSWER = "correctAnswer";
private static final String ARG_USER_ANSWER = "userAnswer";
private ArrayList<String> getCorrectAnswers;
private ArrayList<String> getUserAnswers;
private int score = 0;
private OnScoreSendListener scoreSendListener;
public ResultsFragment() {
}
public static ResultsFragment newInstance(ArrayList<Question> questions) {
ResultsFragment fragment = new ResultsFragment();
Bundle args = new Bundle();
ArrayList<String> correctAnswers = new ArrayList<>();
ArrayList<String> userAnswers = new ArrayList<>();
for(Question question: questions){
correctAnswers.add(question.getCorrectAnswer());
userAnswers.add(question.getUserAnswer());
}
args.putStringArrayList(ARG_CORRECT_ANSWER, correctAnswers);
args.putStringArrayList(ARG_USER_ANSWER, userAnswers);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
getCorrectAnswers = getArguments().getStringArrayList(ARG_CORRECT_ANSWER);
getUserAnswers = getArguments().getStringArrayList(ARG_USER_ANSWER);
}
getResults();
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_results, container, false);
TextView resultsView = (TextView)view.findViewById(R.id.textView_Results);
resultsView.setText("You got a "+score+"/10!");
return view;
}
public void getResults(){
for(int x = 0;x<getCorrectAnswers.size();x++){
if(getCorrectAnswers.get(x).equals(getUserAnswers.get(x))){
score++;
}
}
scoreSendListener.sendScore(score);
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof OnScoreSendListener) {
scoreSendListener = (OnScoreSendListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement OnFragmentInteractionListener");
}
}
@Override
public void onDetach() {
super.onDetach();
scoreSendListener = null;
}
public interface OnScoreSendListener{
void sendScore(int score);
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
7faf83419ff4bb577106d43218eaff4fb053aebe
|
995f73d30450a6dce6bc7145d89344b4ad6e0622
|
/DVC-AN20_EMUI10.1.1/src/main/java/vendor/huawei/hardware/hisiradio/V1_0/RILUICCAUTHAUTSTYPE.java
|
d09f219b2f56acb1e166adf0bf9bad88973e9303
|
[] |
no_license
|
morningblu/HWFramework
|
0ceb02cbe42585d0169d9b6c4964a41b436039f5
|
672bb34094b8780806a10ba9b1d21036fd808b8e
|
refs/heads/master
| 2023-07-29T05:26:14.603817
| 2021-09-03T05:23:34
| 2021-09-03T05:23:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,707
|
java
|
package vendor.huawei.hardware.hisiradio.V1_0;
import android.os.HidlSupport;
import android.os.HwBlob;
import android.os.HwParcel;
import java.util.ArrayList;
import java.util.Objects;
public final class RILUICCAUTHAUTSTYPE {
public String auts = new String();
public int autsLen;
public int autsPresent;
public final boolean equals(Object otherObject) {
if (this == otherObject) {
return true;
}
if (otherObject == null || otherObject.getClass() != RILUICCAUTHAUTSTYPE.class) {
return false;
}
RILUICCAUTHAUTSTYPE other = (RILUICCAUTHAUTSTYPE) otherObject;
if (this.autsPresent == other.autsPresent && this.autsLen == other.autsLen && HidlSupport.deepEquals(this.auts, other.auts)) {
return true;
}
return false;
}
public final int hashCode() {
return Objects.hash(Integer.valueOf(HidlSupport.deepHashCode(Integer.valueOf(this.autsPresent))), Integer.valueOf(HidlSupport.deepHashCode(Integer.valueOf(this.autsLen))), Integer.valueOf(HidlSupport.deepHashCode(this.auts)));
}
public final String toString() {
return "{" + ".autsPresent = " + this.autsPresent + ", .autsLen = " + this.autsLen + ", .auts = " + this.auts + "}";
}
public final void readFromParcel(HwParcel parcel) {
readEmbeddedFromParcel(parcel, parcel.readBuffer(24), 0);
}
public static final ArrayList<RILUICCAUTHAUTSTYPE> readVectorFromParcel(HwParcel parcel) {
ArrayList<RILUICCAUTHAUTSTYPE> _hidl_vec = new ArrayList<>();
HwBlob _hidl_blob = parcel.readBuffer(16);
int _hidl_vec_size = _hidl_blob.getInt32(8);
HwBlob childBlob = parcel.readEmbeddedBuffer((long) (_hidl_vec_size * 24), _hidl_blob.handle(), 0, true);
_hidl_vec.clear();
for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) {
RILUICCAUTHAUTSTYPE _hidl_vec_element = new RILUICCAUTHAUTSTYPE();
_hidl_vec_element.readEmbeddedFromParcel(parcel, childBlob, (long) (_hidl_index_0 * 24));
_hidl_vec.add(_hidl_vec_element);
}
return _hidl_vec;
}
public final void readEmbeddedFromParcel(HwParcel parcel, HwBlob _hidl_blob, long _hidl_offset) {
this.autsPresent = _hidl_blob.getInt32(_hidl_offset + 0);
this.autsLen = _hidl_blob.getInt32(_hidl_offset + 4);
this.auts = _hidl_blob.getString(_hidl_offset + 8);
parcel.readEmbeddedBuffer((long) (this.auts.getBytes().length + 1), _hidl_blob.handle(), _hidl_offset + 8 + 0, false);
}
public final void writeToParcel(HwParcel parcel) {
HwBlob _hidl_blob = new HwBlob(24);
writeEmbeddedToBlob(_hidl_blob, 0);
parcel.writeBuffer(_hidl_blob);
}
public static final void writeVectorToParcel(HwParcel parcel, ArrayList<RILUICCAUTHAUTSTYPE> _hidl_vec) {
HwBlob _hidl_blob = new HwBlob(16);
int _hidl_vec_size = _hidl_vec.size();
_hidl_blob.putInt32(8, _hidl_vec_size);
_hidl_blob.putBool(12, false);
HwBlob childBlob = new HwBlob(_hidl_vec_size * 24);
for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) {
_hidl_vec.get(_hidl_index_0).writeEmbeddedToBlob(childBlob, (long) (_hidl_index_0 * 24));
}
_hidl_blob.putBlob(0, childBlob);
parcel.writeBuffer(_hidl_blob);
}
public final void writeEmbeddedToBlob(HwBlob _hidl_blob, long _hidl_offset) {
_hidl_blob.putInt32(0 + _hidl_offset, this.autsPresent);
_hidl_blob.putInt32(4 + _hidl_offset, this.autsLen);
_hidl_blob.putString(8 + _hidl_offset, this.auts);
}
}
|
[
"dstmath@163.com"
] |
dstmath@163.com
|
49963c03034bd53780d5cfdf8887e7174b1d9225
|
09dd033f6b7e831924dd85ecf6c8a692d431db7c
|
/esb/org.wso2.developerstudio.eclipse.gmf.esb.diagram/src/org/wso2/developerstudio/eclipse/gmf/esb/diagram/providers/assistants/EsbModelingAssistantProviderOfCacheMediatorEditPart.java
|
a60c7edcc488837e8dc6c7e8b2db1a685ebb125d
|
[
"Apache-2.0"
] |
permissive
|
sumuditha-viraj/developer-studio
|
354c4402b3f4667344b0454f585f3aca9589b858
|
cef47b9847bed96c241b9a070bfa00ecc6716ef0
|
refs/heads/master
| 2021-01-17T23:44:15.476712
| 2018-08-22T07:34:53
| 2018-08-22T07:34:53
| 30,071,053
| 0
| 0
| null | 2015-01-30T16:10:08
| 2015-01-30T12:29:53
|
Java
|
UTF-8
|
Java
| false
| false
| 973
|
java
|
package org.wso2.developerstudio.eclipse.gmf.esb.diagram.providers.assistants;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.wso2.developerstudio.eclipse.gmf.esb.diagram.providers.EsbElementTypes;
import org.wso2.developerstudio.eclipse.gmf.esb.diagram.providers.EsbModelingAssistantProvider;
/**
* @generated
*/
public class EsbModelingAssistantProviderOfCacheMediatorEditPart extends
EsbModelingAssistantProvider {
/**
* @generated
*/
@Override
public List<IElementType> getTypesForPopupBar(IAdaptable host) {
List<IElementType> types = new ArrayList<IElementType>(4);
types.add(EsbElementTypes.CacheMediatorInputConnector_3106);
types.add(EsbElementTypes.CacheMediatorOutputConnector_3107);
types.add(EsbElementTypes.CacheMediatorOnHitOutputConnector_3618);
types.add(EsbElementTypes.MediatorFlow_3619);
return types;
}
}
|
[
"kaviththiranga@gmail.com"
] |
kaviththiranga@gmail.com
|
11787c2bf287a20cce9abbad5b3fbce5dc681153
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Spring/Spring822.java
|
34ea55540502dc9d4a753ac9ddc5e6d78d4e3cad
|
[] |
no_license
|
saber13812002/DeepCRM
|
3336a244d4852a364800af3181e03e868cf6f9f5
|
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
|
refs/heads/master
| 2023-03-16T00:08:06.473699
| 2018-04-18T05:29:50
| 2018-04-18T05:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 255
|
java
|
@Override
public String[] getBeanDefinitionNames() {
String[] frozenNames = this.frozenBeanDefinitionNames;
if (frozenNames != null) {
return frozenNames.clone();
}
else {
return StringUtils.toStringArray(this.beanDefinitionNames);
}
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
8b3eda8f410760f261c7c1c20b1f0a1d8b24c0a1
|
02a087e8de0a7d0cfed9dba60e8cff5be4ae3be1
|
/Research_Bucket/Completed_Archived/ArchitecturalClones/old/data/raw/Audit/1.12-WfEventAudit.java
|
c8672a7e78e77eb0f9433fa8db15b9700044e935
|
[
"LicenseRef-scancode-public-domain"
] |
permissive
|
dan7800/Research
|
7baf8d5afda9824dc5a53f55c3e73f9734e61d46
|
f68ea72c599f74e88dd44d85503cc672474ec12a
|
refs/heads/master
| 2021-01-23T09:50:47.744309
| 2018-09-01T14:56:01
| 2018-09-01T14:56:01
| 32,521,867
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,513
|
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.ofbiz.workflow;
import java.sql.Timestamp;
/**
* WfEventAudit - Workflow Event Audit Interface
*/
public interface WfEventAudit {
/**
* @throws WfException
* @throws SourceNotAvailable
* @return return the source
*/
public WfExecutionObject source() throws WfException, SourceNotAvailable;
/**
* @throws WfException
* @return return the timestamp
*/
public Timestamp timeStamp() throws WfException;
/**
* @throws WfException
* @return return the event type
*/
public String eventType() throws WfException;
/**
* @throws WfException
* @return return the activity key
*/
public String activityKey() throws WfException;
/**
* @throws WfException
* @return return the activity name
*/
public String activityName() throws WfException;
/**
* @throws WfException
* @return return the process key
*/
public String processKey() throws WfException;
/**
* @throws WfException
* @return return the process name
*/
public String processName() throws WfException;
/**
* @throws WfException
* @return return the process mgr name
*/
public String processMgrName() throws WfException;
/**
* @throws WfException
* @return return the process mgr version
*/
public String processMgrVersion() throws WfException;
} // interface WfEventAuditOperations
|
[
"dan@go.com"
] |
dan@go.com
|
4b1cb31836228e4b6b5ffe2bda7cb9146c1547fb
|
d883f3b07e5a19ff8c6eb9c3a4b03d9f910f27b2
|
/Services/Intake/WCF/WcfIntakeServices/src/test/java/com/sandata/lab/wcf/intake/data/map/ScheduleMapperTests.java
|
d5f38520177a12253ec09b94b4532f0ce18f9001
|
[] |
no_license
|
dev0psunleashed/Sandata_SampleDemo
|
ec2c1f79988e129a21c6ddf376ac572485843b04
|
a1818601c59b04e505e45e33a36e98a27a69bc39
|
refs/heads/master
| 2021-01-25T12:31:30.026326
| 2017-02-20T11:49:37
| 2017-02-20T11:49:37
| 82,551,409
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,032
|
java
|
/*
* Copyright (c) 2015. Sandata Technologies, LLC
* 26 Harbor Park Drive, Port Washington, NY 11050, 800-544-7263
* All rights reserved.
*
* This software is the confidential and proprietary information of Sandata Technologies, LLC
* ("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
* Sandata.
*/
package com.sandata.lab.wcf.intake.data.map;
import com.sandata.lab.data.model.schedule.Schedule;
import com.sandata.lab.data.model.wcf.schedule.WcfSchedule;
import com.sandata.lab.wcf.intake.BaseTestSupport;
import mockit.integration.junit4.JMockit;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.util.Assert;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;
/**
* Tests the mapping of WCF Schedule entity.
* <p/>
*
* @author David Rutgos
*/
@RunWith(JMockit.class)
public class ScheduleMapperTests extends BaseTestSupport {
private DateFormat dateFormat;
private Schedule schedule;
private ScheduleMapper mapper;
@Test
public void should_map_normalized_schedule_collection_to_wcf_schedule_collection() throws Exception {
Assert.notNull(mapper);
List<Schedule> schedules = new ArrayList<>();
schedules.add(schedule);
List<WcfSchedule> wcfSchedules = mapper.map(schedules);
Assert.notNull(wcfSchedules);
Assert.isTrue(wcfSchedules.size() == 1);
validateSchedule(wcfSchedules.get(0));
}
@Test
public void should_map_normalized_schedule_to_wcf_schedule() throws Exception {
Assert.notNull(mapper);
WcfSchedule wcfSchedule = mapper.map(schedule);
validateSchedule(wcfSchedule);
}
private void validateSchedule(final WcfSchedule wcfSchedule) {
Assert.notNull(wcfSchedule);
Assert.isTrue(wcfSchedule.getScheduleId() == schedule.getScheduleId());
Assert.isTrue(wcfSchedule.getStaffId() == schedule.getScheduleId());
Assert.isTrue(wcfSchedule.getPatientId() == schedule.getPatientId());
Assert.isTrue(wcfSchedule.getStartDate().equals(schedule.getStartDate()));
Assert.isTrue(wcfSchedule.getEndDate().equals(schedule.getEndDate()));
Assert.isTrue(wcfSchedule.getFromTime().equals(schedule.getFromTime()));
Assert.isTrue(wcfSchedule.getEndTime().equals(schedule.getEndTime()));
Assert.isTrue(wcfSchedule.getRestrictions().equals(schedule.getRestrictions()));
Assert.isTrue(wcfSchedule.getFrequencyId().equals(schedule.getFrequencyId()));
Assert.isTrue(wcfSchedule.getNumberOfOccurrences().equals(schedule.getNumberOfOccurrences()));
Assert.isTrue(wcfSchedule.getDayOfMonth().equals(schedule.getDayOfMonth()));
Assert.notNull(wcfSchedule.getScheduleWeekDays());
Assert.isTrue(schedule.getScheduleWeekDays().size() == 3);
List<Integer> scheduleWeekDays = schedule.getScheduleWeekDays();
Assert.isTrue(scheduleWeekDays.get(2) == 3);
}
@Override
protected void onSetup() throws Exception {
dateFormat = new SimpleDateFormat("MM-dd-yyyy", Locale.ENGLISH);
mapper = new ScheduleMapper();
schedule = new Schedule();
schedule.setScheduleId(1);
schedule.setStaffId(1);
schedule.setPatientId(1);
Date startDate = dateFormat.parse("08-03-2015");
schedule.setStartDate(startDate);
Date endDate = dateFormat.parse("08-04-2015");
schedule.setEndDate(endDate);
schedule.setFromTime("12");
schedule.setEndTime("16");
schedule.setRestrictions("None");
schedule.setFrequencyId(999);
schedule.setNumberOfOccurrences(5);
schedule.setDayOfMonth(29);
schedule.setScheduleWeekDays(new ArrayList<Integer>(){{add(1);add(2);add(3);}});
}
}
|
[
"pradeep.ganesh@softcrylic.co.in"
] |
pradeep.ganesh@softcrylic.co.in
|
bca8a49aaff52ac690b80e176f50428356f62abd
|
400ae0816bbf90fdb9a2dc1fc5d2e602b31a93b2
|
/app/src/main/java/com/dengzi/moduletest/ipc/IpcActivity.java
|
e3f52320c1ba57e3b8dceab4d124ab521dbf7744
|
[] |
no_license
|
xiaodengzi0812/ModuleTest
|
ea2562fcd52ab6d20381f3f50a49e2e10892c39c
|
9499aa725ba1d9084824522151ff78c399dab5c6
|
refs/heads/master
| 2021-01-20T04:22:50.664023
| 2018-01-17T15:06:53
| 2018-01-17T15:06:53
| 101,388,824
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,455
|
java
|
package com.dengzi.moduletest.ipc;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import com.dengzi.moduletest.R;
import com.dengzi.moduletest.ipc.service.GuardService;
import com.dengzi.moduletest.ipc.service.JobWakeUpService;
import com.dengzi.moduletest.ipc.service.UserService;
/**
* @author Djk
* @Title: ipc进程间通信
* @Time: 2017/10/19.
* @Version:1.0.0
*/
public class IpcActivity extends AppCompatActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ipc);
}
public void bindService(View view) {
initService();
}
/**
* 开启服务
*/
private void initService() {
// 开启自己的服务
Intent userServiceIntent = new Intent(this, UserService.class);
startService(userServiceIntent);
// 开启守护的服务
Intent guardServiceIntent = new Intent(this, GuardService.class);
startService(guardServiceIntent);
// 大于5.0则启动jobservice
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Intent jobServiceIntent = new Intent(this, JobWakeUpService.class);
startService(jobServiceIntent);
}
}
}
|
[
"dengjiankai@wanda.cn"
] |
dengjiankai@wanda.cn
|
31cc8a8accd0f31b8a7220198796d48b0d10d1b6
|
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
|
/src/testcases/CWE83_XSS_Attribute/CWE83_XSS_Attribute__Servlet_PropertiesFile_81_goodG2B.java
|
603d111867c62c5ab200d1edd3182a14ee1fe443
|
[] |
no_license
|
bqcuong/Juliet-Test-Case
|
31e9c89c27bf54a07b7ba547eddd029287b2e191
|
e770f1c3969be76fdba5d7760e036f9ba060957d
|
refs/heads/master
| 2020-07-17T14:51:49.610703
| 2019-09-03T16:22:58
| 2019-09-03T16:22:58
| 206,039,578
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,371
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE83_XSS_Attribute__Servlet_PropertiesFile_81_goodG2B.java
Label Definition File: CWE83_XSS_Attribute__Servlet.label.xml
Template File: sources-sink-81_goodG2B.tmpl.java
*/
/*
* @description
* CWE: 83 Cross Site Scripting (XSS) in attributes; Examples(replace QUOTE with an actual double quote): ?img_loc=http://www.google.comQUOTE%20onerror=QUOTEalert(1) and ?img_loc=http://www.google.comQUOTE%20onerror=QUOTEjavascript:alert(1)
* BadSource: PropertiesFile Read data from a .properties file (in property named data)
* GoodSource: A hardcoded string
* Sinks: printlnServlet
* BadSink : XSS in img src attribute
* Flow Variant: 81 Data flow: data passed in a parameter to an abstract method
*
* */
package testcases.CWE83_XSS_Attribute;
import testcasesupport.*;
import javax.servlet.http.*;
public class CWE83_XSS_Attribute__Servlet_PropertiesFile_81_goodG2B extends CWE83_XSS_Attribute__Servlet_PropertiesFile_81_base
{
public void action(String data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
if (data != null)
{
/* POTENTIAL FLAW: Input is not verified/sanitized before use in an image tag */
response.getWriter().println("<br>bad() - <img src=\"" + data + "\">");
}
}
}
|
[
"bqcuong2212@gmail.com"
] |
bqcuong2212@gmail.com
|
c342d931e60191ae1cf1f18008d5dfa00054c6a8
|
87514d13de195adc59a5fc22cde31a741a23f3d8
|
/plugin/src/main/java/com/stratio/cassandra/lucene/search/condition/builder/MatchConditionBuilder.java
|
4a3630aefaf7545c576c0c1bc1e26a494cb317ae
|
[
"Apache-2.0"
] |
permissive
|
denniskline/cassandra-lucene-index
|
eb6cfb3dadbd13cd1d2220713bb4f86f880063f5
|
e6f36a89879a6f99aac587156923e29e06a34acb
|
refs/heads/master
| 2021-12-03T09:20:32.717996
| 2017-04-10T08:05:20
| 2017-04-10T08:05:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,144
|
java
|
/*
* Licensed to STRATIO (C) under one or more contributor license agreements.
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. The STRATIO (C) 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.stratio.cassandra.lucene.search.condition.builder;
import com.stratio.cassandra.lucene.search.condition.MatchCondition;
import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonProperty;
/**
* {@link ConditionBuilder} for building a new {@link MatchCondition}.
*
* @author Andres de la Pena {@literal <adelapena@stratio.com>}
*/
public class MatchConditionBuilder extends ConditionBuilder<MatchCondition, MatchConditionBuilder> {
/** The name of the field to be matched. */
@JsonProperty("field")
private final String field;
/** The value of the field to be matched. */
@JsonProperty("value")
private final Object value;
/**
* Creates a new {@link MatchConditionBuilder} for the specified field and value.
*
* @param field the name of the field to be matched
* @param value the value of the field to be matched
*/
@JsonCreator
public MatchConditionBuilder(@JsonProperty("field") String field, @JsonProperty("value") Object value) {
this.field = field;
this.value = value;
}
/**
* Returns the {@link MatchCondition} represented by this builder.
*
* @return a new match condition
*/
@Override
public MatchCondition build() {
return new MatchCondition(boost, field, value);
}
}
|
[
"a.penya.garcia@gmail.com"
] |
a.penya.garcia@gmail.com
|
83c19826dffef531e557bb2fb7020ee06219d7a8
|
019b263501931c33775878fa3d4c252132204469
|
/app/src/main/java/com/daxiong/fun/model/ImageBucket.java
|
46780216532accdec5a00a2cee098f3f1520acc7
|
[] |
no_license
|
13302864582/baifen_parent_app
|
0d5312fae7577d2b7e5eff09f867a3be6c7d0193
|
b55dbd3cc6f1dfe0ec9ceef2e0b329834eea8dba
|
refs/heads/master
| 2020-07-07T13:07:51.179123
| 2019-08-24T10:39:57
| 2019-08-24T10:39:57
| 203,355,952
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 665
|
java
|
package com.daxiong.fun.model;
import java.util.List;
/**
* 一个目录的相册对象
*
* @author parsonswang
*
*/
public class ImageBucket extends BaseModel {
private int count = 0;
private String bucketName;
private List<ImageItem> imageList;
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
public String getBucketName() {
return bucketName;
}
public void setBucketName(String bucketName) {
this.bucketName = bucketName;
}
public List<ImageItem> getImageList() {
return imageList;
}
public void setImageList(List<ImageItem> imageList) {
this.imageList = imageList;
}
}
|
[
"759030201@qq.com"
] |
759030201@qq.com
|
95a1ed9366c750b417a4bf004bc5b301247b7691
|
7991248e6bccacd46a5673638a4e089c8ff72a79
|
/storage/common/src/main/java/org/artifactory/model/xstream/security/MutableRepoAclImpl.java
|
58fe2e965968694647dfe52382070aac8f17f039
|
[] |
no_license
|
theoriginalshaheedra/artifactory-oss
|
69b7f6274cb35c79db3a3cd613302de2ae019b31
|
415df9a9467fee9663850b4b8b4ee5bd4c23adeb
|
refs/heads/master
| 2023-04-23T15:48:36.923648
| 2021-05-05T06:15:24
| 2021-05-05T06:15:24
| 364,455,815
| 1
| 0
| null | 2021-05-05T07:11:40
| 2021-05-05T03:57:33
|
Java
|
UTF-8
|
Java
| false
| false
| 2,628
|
java
|
/*
*
* Artifactory is a binaries repository manager.
* Copyright (C) 2018 JFrog Ltd.
*
* Artifactory is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Artifactory 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Artifactory. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.artifactory.model.xstream.security;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import org.artifactory.security.AceInfo;
import org.artifactory.security.Acl;
import org.artifactory.security.MutableRepoAcl;
import org.artifactory.security.RepoPermissionTarget;
import java.util.Set;
/**
* @author Yoav Landman
*/
//xstream kept to backwards support security.xml import
@XStreamAlias("acl")
public class MutableRepoAclImpl extends MutableBaseRepoAclImpl<RepoPermissionTarget> implements MutableRepoAcl {
protected RepoPermissionTargetImpl permissionTarget;
public MutableRepoAclImpl() {
super();
this.permissionTarget = new RepoPermissionTargetImpl();
}
public MutableRepoAclImpl(Acl<RepoPermissionTarget> copy) {
super(copy.getLastUpdated(), copy.getUpdatedBy(), copy.getAccessIdentifier(), copy.getAces());
this.permissionTarget = new RepoPermissionTargetImpl(copy.getPermissionTarget());
}
public MutableRepoAclImpl(RepoPermissionTarget permissionTarget, Set<AceInfo> aces, String updatedBy,
long lastUpdated) {
super(aces, updatedBy, lastUpdated);
this.permissionTarget = new RepoPermissionTargetImpl(permissionTarget);
}
public MutableRepoAclImpl(RepoPermissionTarget permissionTarget, Set<AceInfo> aces, String updatedBy,
long lastUpdated,
String accessIdentifier) {
super(lastUpdated, updatedBy, accessIdentifier, aces);
this.permissionTarget = new RepoPermissionTargetImpl(permissionTarget);
}
@Override
public RepoPermissionTargetImpl getPermissionTarget() {
return permissionTarget;
}
@Override
public void setPermissionTarget(RepoPermissionTarget permissionTarget) {
this.permissionTarget = new RepoPermissionTargetImpl(permissionTarget);
}
}
|
[
"david.monichi@gmail.com"
] |
david.monichi@gmail.com
|
8ce91a734e0070385a630e255d48c5ded4637dd1
|
6f53535d466f3d082f597808d21f33de7f547ead
|
/src/main/java/io/rocketbase/toggl/backend/service/WorkerService.java
|
902e12f19d8bf3b435116b864be27a69e9aa3f65
|
[] |
no_license
|
rocketbase-io/toggl-reporter
|
8e60d2d6e86a0ca76942dafe81ac2cf4099f09b8
|
3f85cd798e6dcb7512ed593ef2ba09811ca28946
|
refs/heads/master
| 2020-05-20T17:10:43.542783
| 2018-01-25T12:03:52
| 2018-01-25T12:03:52
| 84,492,150
| 13
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 648
|
java
|
package io.rocketbase.toggl.backend.service;
import io.rocketbase.toggl.backend.model.Worker;
import io.rocketbase.toggl.backend.repository.WorkerRepository;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
public class WorkerService {
@Resource
private WorkerRepository workerRepository;
public List<Worker> findAll() {
return workerRepository.findAll();
}
public Worker updateWorker(Worker worker) {
return workerRepository.save(worker);
}
public void deleteWorker(Worker worker) {
workerRepository.delete(worker);
}
}
|
[
"marten@rocketbase.io"
] |
marten@rocketbase.io
|
34de5c747b106b071c5576209b361c5679086980
|
9d864f5a053b29d931b4c2b4f773e13291189d27
|
/src/providers/jldap/src/java/edu/amc/sakai/user/PoolingLdapConnectionManager.java
|
86e2f2e22d79117a32ce752bd798343f444d2209
|
[] |
no_license
|
kyeddlapalli/sakai-cle
|
b1bd1e4431d8d96b6b650bfe9454eacd3e7042b2
|
1f06c7ac69c7cbe731c8d175d557313d0fb34900
|
refs/heads/master
| 2021-01-18T10:57:25.449065
| 2014-01-12T21:18:15
| 2014-01-12T21:18:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,396
|
java
|
/**********************************************************************************
* $URL: https://source.sakaiproject.org/svn/providers/trunk/jldap/src/java/edu/amc/sakai/user/PoolingLdapConnectionManager.java $
* $Id: PoolingLdapConnectionManager.java 105079 2012-02-24 23:08:11Z ottenhoff@longsight.com $
***********************************************************************************
*
* Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008 The Sakai Foundation
*
* Licensed under the Educational Community 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.opensource.org/licenses/ECL-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 edu.amc.sakai.user;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.commons.pool.ObjectPool;
import org.apache.commons.pool.impl.GenericObjectPool;
import com.novell.ldap.LDAPConnection;
import com.novell.ldap.LDAPException;
/**
* Allocates connected, constrained, bound and optionally secure <code>LDAPConnection</code>s.
* Uses commons-pool to provide a pool of connections instead of creating a new
* connection for each request. Originally tried implementing this with
* <code>om.novell.ldap.connectionpool.PoolManager</code>, but it did not handle
* recovering connections that had suffered a network error or connections that
* were never returned but dropped out of scope.
* @see LdapConnectionManagerConfig
* @see PooledLDAPConnection
* @see PooledLDAPConnectionFactory
* @author John Lewis, Unicon Inc
*/
public class PoolingLdapConnectionManager extends SimpleLdapConnectionManager {
/** Class-specific logger */
private static Log log = LogFactory.getLog(PoolingLdapConnectionManager.class);
/** LDAP connection pool */
private ObjectPool pool;
private PooledLDAPConnectionFactory factory;
/** How long to block waiting for an available connection before throwing an exception */
private static final int POOL_MAX_WAIT = 60000;
/**
* {@inheritDoc}
*/
public void init() {
super.init();
if ( pool != null ) {
return;
}
if ( factory == null ) {
factory = new PooledLDAPConnectionFactory();
}
factory.setConnectionManager(this);
pool = new GenericObjectPool(factory,
getConfig().getPoolMaxConns(), // maxActive
GenericObjectPool.WHEN_EXHAUSTED_BLOCK, // whenExhaustedAction
POOL_MAX_WAIT, // maxWait (millis)
getConfig().getPoolMaxConns(), // maxIdle
true, // testOnBorrow
false // testOnReturn
);
}
/**
* {@inheritDoc}
*/
public LDAPConnection getConnection() throws LDAPException {
if (log.isDebugEnabled()) log.debug("getConnection(): attempting to borrow connection from pool");
try {
LDAPConnection conn = (LDAPConnection)pool.borrowObject();
if (log.isDebugEnabled()) log.debug("getConnection(): successfully to borrowed connection from pool");
return conn;
} catch (Exception e) {
if (e instanceof LDAPException) throw (LDAPException) e;
throw new RuntimeException("failed to get pooled connection", e);
}
}
public LDAPConnection getBoundConnection(String dn, String pw) throws LDAPException {
if (log.isDebugEnabled()) log.debug("getBoundConnection():dn=["+dn+"] attempting to borrow connection from pool and bind to dn");
LDAPConnection conn = null;
try {
conn = (LDAPConnection)pool.borrowObject();
if (log.isDebugEnabled()) log.debug("getBoundConnection():dn=["+dn+"] successfully borrowed connection from pool");
conn.bind(LDAPConnection.LDAP_V3, dn, pw.getBytes("UTF8"));
if (log.isDebugEnabled()) log.debug("getBoundConnection():dn=["+dn+"] successfully bound to dn");
return conn;
} catch (Exception e) {
if ( conn != null ) {
try {
if (log.isDebugEnabled()) log.debug("getBoundConnection():dn=["+dn+"]; error occurred, returning connection to pool");
returnConnection(conn);
} catch ( Exception ee ) {
if (log.isDebugEnabled()) log.debug("getBoundConnection():dn=["+dn+"] failed to return connection to pool", ee);
}
}
if (e instanceof LDAPException) throw (LDAPException) e;
throw new RuntimeException("failed to get pooled connection", e);
}
}
/**
* {@inheritDoc}
*/
public void returnConnection(LDAPConnection conn) {
if ( conn == null ) {
if (log.isDebugEnabled()) log.debug("returnConnection() received null connection; nothing to do");
return;
} else {
if (log.isDebugEnabled()) log.debug("returnConnection(): attempting to return connection to the pool");
}
try {
pool.returnObject(conn);
if (log.isDebugEnabled()) log.debug("returnConnection(): successfully returned connection to pool");
} catch (Exception e) {
throw new RuntimeException("failed to return pooled connection", e);
}
}
/**
* {@inheritDoc}
*/
public void destroy() {
try {
if ( log.isDebugEnabled() ) log.debug("destroy(): closing connection pool");
pool.close();
if ( log.isDebugEnabled() ) log.debug("destroy(): successfully closed connection pool");
} catch (Exception e) {
throw new RuntimeException("failed to shutdown connection pool", e);
}
if ( log.isDebugEnabled() ) log.debug("destroy(): delegating to parent destroy() impl");
super.destroy();
}
public PooledLDAPConnectionFactory getFactory() {
return factory;
}
public void setFactory(PooledLDAPConnectionFactory factory) {
this.factory = factory;
}
/**
* Assign a pool implementation. If not specified, one will
* be constructed by {@link #init()}. If specified,
* {@link #setFactory(PooledLDAPConnectionFactory)} will have
* no effect.
*
* <p>This method exists almost entirely for testing purposes.</p>
*
* @param pool the pool to cache; accepts <code>null</code>
*/
protected void setPool(ObjectPool pool) {
this.pool = pool;
}
}
|
[
"noah@botimer.net"
] |
noah@botimer.net
|
a661a0799b87c7d3da53c31c0e91f4288f5a265a
|
765ac09918d17e182570bbbcf8e336fcb2b5433f
|
/adam-lan/src/main/java/net/thevpc/scholar/adamlan/AdamLanExecEnv.java
|
cfd7be300f9146e22cd2ac317558e44c6cf3c693
|
[] |
no_license
|
thevpc/adamlang
|
7263b20b154b6028c341e24fb74ca9ba4c4db794
|
df0405515104bcb2e1e7e9318a72bfd85e17d458
|
refs/heads/master
| 2021-07-06T11:57:09.492439
| 2020-11-13T19:59:31
| 2020-11-13T19:59:31
| 202,870,477
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 391
|
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 net.thevpc.scholar.adamlan;
/**
*
* @author thevpc
*/
public interface AdamLanExecEnv {
void println(Object msg);
void print(Object msg);
Object read(Class type, String title);
}
|
[
"taha.bensalah@gmail.com"
] |
taha.bensalah@gmail.com
|
bc0ba4b20047eee77edffa1cf76f95f190dd45c7
|
69ed18f94b2c1caf9742d983f5daf28f40614ca2
|
/SpringboardLtsBackend/src/com/bomwebportal/lts/dao/order/PaymentLtsDAO.java
|
6e74a015e5fc1d1b8257c97e92e1d6e72040a816
|
[] |
no_license
|
RodexterMalinao/springBoard
|
d1b4f9d2f7e76f63e2690f414863096e3e271369
|
aa4bf03395b12d923d28767e1561049c45ee3261
|
refs/heads/master
| 2020-09-03T07:21:15.415737
| 2019-12-16T07:12:22
| 2019-12-16T07:12:22
| 219,409,720
| 0
| 1
| null | 2019-12-16T07:12:23
| 2019-11-04T03:28:03
|
Java
|
UTF-8
|
Java
| false
| false
| 8,082
|
java
|
package com.bomwebportal.lts.dao.order;
import com.pccw.util.db.DaoBaseImpl;
import com.pccw.util.db.stringOracleType.OraDate;
import com.pccw.util.db.stringOracleType.OraDateCreateDate;
import com.pccw.util.db.stringOracleType.OraDateLastUpdDate;
import com.pccw.util.db.stringOracleType.OraDateYYYYMMDDHH24MISS;
import com.pccw.util.db.stringOracleType.OraNumber;
public class PaymentLtsDAO extends DaoBaseImpl {
private static final long serialVersionUID = -5397275703585512009L;
private String orderId; // BOMWEB_PAYMENT.ORDER_ID
private String custNo; // BOMWEB_PAYMENT.CUST_NO
private String payMtdKey; // BOMWEB_PAYMENT.PAY_MTD_KEY
private String acctNo; // BOMWEB_PAYMENT.ACCT_NO
private OraDate autopayAppDate = new OraDateYYYYMMDDHH24MISS(); // BOMWEB_PAYMENT.AUTOPAY_APP_DATE
private OraNumber autopayUpLimAmt; // BOMWEB_PAYMENT.AUTOPAY_UP_LIM_AMT
private String bAcctNo; // BOMWEB_PAYMENT.B_ACCT_NO
private String bAcctHoldName; // BOMWEB_PAYMENT.B_ACCT_HOLD_NAME
private String bAcctHoldIdType; // BOMWEB_PAYMENT.B_ACCT_HOLD_ID_TYPE
private String bAcctHoldIdNum; // BOMWEB_PAYMENT.B_ACCT_HOLD_ID_NUM
private String branchCd; // BOMWEB_PAYMENT.BRANCH_CD
private String bankCd; // BOMWEB_PAYMENT.BANK_CD
private String payMtdType; // BOMWEB_PAYMENT.PAY_MTD_TYPE
private String thirdPartyInd; // BOMWEB_PAYMENT.THIRD_PARTY_IND
private String ccType; // BOMWEB_PAYMENT.CC_TYPE
private String ccNum; // BOMWEB_PAYMENT.CC_NUM
private String ccHoldName; // BOMWEB_PAYMENT.CC_HOLD_NAME
private String ccExpDate; // BOMWEB_PAYMENT.CC_EXP_DATE
private String ccIssueBank; // BOMWEB_PAYMENT.CC_ISSUE_BANK
private String ccIdDocType; // BOMWEB_PAYMENT.CC_ID_DOC_TYPE
private String ccIdDocNo; // BOMWEB_PAYMENT.CC_ID_DOC_NO
private OraDate createDate = new OraDateCreateDate(); // BOMWEB_PAYMENT.CREATE_DATE
private String createBy; // BOMWEB_PAYMENT.CREATE_BY
private String lastUpdBy; // BOMWEB_PAYMENT.LAST_UPD_BY
private OraDate lastUpdDate = new OraDateLastUpdDate(); // BOMWEB_PAYMENT.LAST_UPD_DATE
private String ccVerifiedInd; // BOMWEB_PAYMENT.CC_VERIFIED_IND
private String action; // BOMWEB_PAYMENT.ACTION
private String salesMemoNum; // BOMWEB_PAYMENT.SALES_MEMO_NUM
private OraNumber prepayAmt; // BOMWEB_PAYMENT.SALES_MEMO_NUM
private String autopayStatementInd; // BOMWEB_PAYMENT.AUTOPAY_STATEMENT_IND
private String termCd; // BOMWEB_PAYMENT.TERM_CD
private OraDate termDate = new OraDateYYYYMMDDHH24MISS(); // BOMWEB_PAYMENT.TERM_DATE
public PaymentLtsDAO() {
primaryKeyFields = new String[] { "orderId", "acctNo", "payMtdType" };
}
public String getTableName() {
return "BOMWEB_PAYMENT";
}
public String getOrderId() {
return this.orderId;
}
public String getCustNo() {
return this.custNo;
}
public String getPayMtdKey() {
return this.payMtdKey;
}
public String getAcctNo() {
return this.acctNo;
}
public String getBAcctNo() {
return this.bAcctNo;
}
public String getBAcctHoldName() {
return this.bAcctHoldName;
}
public String getBAcctHoldIdType() {
return this.bAcctHoldIdType;
}
public String getBAcctHoldIdNum() {
return this.bAcctHoldIdNum;
}
public String getBranchCd() {
return this.branchCd;
}
public String getBankCd() {
return this.bankCd;
}
public String getCcType() {
return this.ccType;
}
public String getCcNum() {
return this.ccNum;
}
public String getCcHoldName() {
return this.ccHoldName;
}
public String getCcExpDate() {
return this.ccExpDate;
}
public String getCcIssueBank() {
return this.ccIssueBank;
}
public String getCcIdDocType() {
return this.ccIdDocType;
}
public String getCcIdDocNo() {
return this.ccIdDocNo;
}
public String getCreateBy() {
return this.createBy;
}
public String getLastUpdBy() {
return this.lastUpdBy;
}
public String getCcVerifiedInd() {
return this.ccVerifiedInd;
}
public String getAction() {
return this.action;
}
public String getAutopayUpLimAmt() {
return this.autopayUpLimAmt != null ? this.autopayUpLimAmt.toString()
: null;
}
public String getAutopayAppDate() {
return this.autopayAppDate != null ? this.autopayAppDate.toString()
: null;
}
public String getCreateDate() {
return this.createDate != null ? this.createDate.toString() : null;
}
public String getLastUpdDate() {
return this.lastUpdDate != null ? this.lastUpdDate.toString() : null;
}
public String getTermDate() {
return this.termDate != null ? this.termDate.toString() : null;
}
public OraDate getAutopayAppDateORACLE() {
return this.autopayAppDate;
}
public OraDate getCreateDateORACLE() {
return this.createDate;
}
public OraDate getLastUpdDateORACLE() {
return this.lastUpdDate;
}
public OraDate getTermDateORACLE() {
return this.termDate;
}
public void setOrderId(String pOrderId) {
this.orderId = pOrderId;
}
public void setCustNo(String pCustNo) {
this.custNo = pCustNo;
}
public void setPayMtdKey(String pPayMtdKey) {
this.payMtdKey = pPayMtdKey;
}
public void setAcctNo(String pAcctNo) {
this.acctNo = pAcctNo;
}
public void setBAcctNo(String pBAcctNo) {
this.bAcctNo = pBAcctNo;
}
public void setBAcctHoldName(String pBAcctHoldName) {
this.bAcctHoldName = pBAcctHoldName;
}
public void setBAcctHoldIdType(String pBAcctHoldIdType) {
this.bAcctHoldIdType = pBAcctHoldIdType;
}
public void setBAcctHoldIdNum(String pBAcctHoldIdNum) {
this.bAcctHoldIdNum = pBAcctHoldIdNum;
}
public void setBranchCd(String pBranchCd) {
this.branchCd = pBranchCd;
}
public void setBankCd(String pBankCd) {
this.bankCd = pBankCd;
}
public void setCcType(String pCcType) {
this.ccType = pCcType;
}
public void setCcNum(String pCcNum) {
this.ccNum = pCcNum;
}
public void setCcHoldName(String pCcHoldName) {
this.ccHoldName = pCcHoldName;
}
public void setCcExpDate(String pCcExpDate) {
this.ccExpDate = pCcExpDate;
}
public void setCcIssueBank(String pCcIssueBank) {
this.ccIssueBank = pCcIssueBank;
}
public void setCcIdDocType(String pCcIdDocType) {
this.ccIdDocType = pCcIdDocType;
}
public void setCcIdDocNo(String pCcIdDocNo) {
this.ccIdDocNo = pCcIdDocNo;
}
public void setCreateBy(String pCreateBy) {
this.createBy = pCreateBy;
}
public void setLastUpdBy(String pLastUpdBy) {
this.lastUpdBy = pLastUpdBy;
}
public void setCcVerifiedInd(String pCcVerifiedInd) {
this.ccVerifiedInd = pCcVerifiedInd;
}
public void setAction(String pAction) {
this.action = pAction;
}
public void setAutopayUpLimAmt(String pAutopayUpLimAmt) {
this.autopayUpLimAmt = new OraNumber(pAutopayUpLimAmt);
}
public void setAutopayAppDate(String pAutopayAppDate) {
this.autopayAppDate = new OraDateYYYYMMDDHH24MISS(pAutopayAppDate);
}
public void setCreateDate(String pCreateDate) {
this.createDate = new OraDateCreateDate(pCreateDate);
}
public void setLastUpdDate(String pLastUpdDate) {
this.lastUpdDate = new OraDateLastUpdDate(pLastUpdDate);
}
public void setTermDate(String pTermDate) {
this.termDate = new OraDateYYYYMMDDHH24MISS(pTermDate);
}
public String getPayMtdType() {
return payMtdType;
}
public void setPayMtdType(String payMtdType) {
this.payMtdType = payMtdType;
}
public String getThirdPartyInd() {
return thirdPartyInd;
}
public void setThirdPartyInd(String thirdPartyInd) {
this.thirdPartyInd = thirdPartyInd;
}
public String getSalesMemoNum() {
return this.salesMemoNum;
}
public void setSalesMemoNum(String pSalesMemoNum) {
this.salesMemoNum = pSalesMemoNum;
}
public String getPrepayAmt() {
return this.prepayAmt != null ? this.prepayAmt.toString()
: null;
}
public void setPrepayAmt(String pPrepayAmt) {
this.prepayAmt = new OraNumber(pPrepayAmt);
}
public String getAutopayStatementInd() {
return autopayStatementInd;
}
public void setAutopayStatementInd(String autopayStatementInd) {
this.autopayStatementInd = autopayStatementInd;
}
public String getTermCd() {
return termCd;
}
public void setTermCd(String termCd) {
this.termCd = termCd;
}
}
|
[
"acer_08_06@yahoo.com"
] |
acer_08_06@yahoo.com
|
2a7081f836ee28fbb13cf39bb4ef779610b94d63
|
263b9556d76279459ab9942b0005a911e2b085c5
|
/src/main/java/com/alipay/api/domain/AntProdpaasProductCommonQueryModel.java
|
e8b2163afc6aa1ddd426f2350d1fd152cc2e258e
|
[
"Apache-2.0"
] |
permissive
|
getsgock/alipay-sdk-java-all
|
1c98ffe7cb5601c715b4f4b956e6c2b41a067647
|
1ee16a85df59c08fb9a9b06755743711d5cd9814
|
refs/heads/master
| 2020-03-30T05:42:59.554699
| 2018-09-19T06:17:22
| 2018-09-19T06:17:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,231
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 查询产品平台产品信息接口
*
* @author auto create
* @since 1.0, 2016-09-09 20:38:32
*/
public class AntProdpaasProductCommonQueryModel extends AlipayObject {
private static final long serialVersionUID = 6113531893594199457L;
/**
* 产品码
*/
@ApiField("product_code")
private String productCode;
/**
* 产品查询维度,主要分为基础信息,条件信息和产品关联关系信息等
*/
@ApiField("product_options")
private ProductVOOptions productOptions;
/**
* 产品版本
*/
@ApiField("product_version")
private String productVersion;
public String getProductCode() {
return this.productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
public ProductVOOptions getProductOptions() {
return this.productOptions;
}
public void setProductOptions(ProductVOOptions productOptions) {
this.productOptions = productOptions;
}
public String getProductVersion() {
return this.productVersion;
}
public void setProductVersion(String productVersion) {
this.productVersion = productVersion;
}
}
|
[
"liuqun.lq@alibaba-inc.com"
] |
liuqun.lq@alibaba-inc.com
|
b4ff7ce9d57eac13cadd13cee1fd96a3172e7244
|
1c6fe1c9ad917dc9dacaf03eade82d773ccf3c8a
|
/acm-module-dc2/src/main/java/com/wisdom/acm/dc2/vo/TrainScheduleStationVo.java
|
78d89afaf601a0eca560b64c3a0452fd51a2d867
|
[
"Apache-2.0"
] |
permissive
|
daiqingsong2021/ord_project
|
332056532ee0d3f7232a79a22e051744e777dc47
|
a8167cee2fbdc79ea8457d706ec1ccd008f2ceca
|
refs/heads/master
| 2023-09-04T12:11:51.519578
| 2021-10-28T01:58:43
| 2021-10-28T01:58:43
| 406,659,566
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,563
|
java
|
package com.wisdom.acm.dc2.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wisdom.base.common.vo.GeneralVo;
import lombok.Data;
import javax.persistence.Column;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class TrainScheduleStationVo
{
/**
* 主键ID
*/
private String id;
/**
* 线路类型(0:上行,1:下行)
*/
private String lineType;
/**
* 类型编码
*/
private String typeCode;
/**
* 类型名称
*/
private String typeName;
/**
* 出段
*/
private String period;
/**
* 正线始发站
*/
private String startStation;
/**
* 终点站
*/
private String endStation;
/**
* 进段
*/
private String inStation;
/**
*列数
*/
private String coloumns;
/**
*备注
*/
private String remark;
/**
*里程
*/
private String mileage;
/**
*线路
*/
private String line;
/**
*线路
*/
private String lineName;
/**
*时刻表编码
*/
private String scheduleCode;
/**
*时刻表ID
*/
private String scheduleId;
/**
*类型关系
*/
private String relatinNumber;
//新线总里程
private BigDecimal newLineStationMileage=new BigDecimal("0");
//既有线总里程
private BigDecimal oldLineStationMileage=new BigDecimal("0");
/**
*是否为标题行
*/
private String rowType;
}
|
[
"homeli@126.com"
] |
homeli@126.com
|
38b3a660aa13ef20ea7996757ea721429a680a2e
|
46167791cbfeebc8d3ddc97112764d7947fffa22
|
/spring-boot/src/main/java/com/justexample/repository/Entity0049Repository.java
|
c79ebf83eea24043950563faa6cab848d7f8a77c
|
[] |
no_license
|
kahlai/unrealistictest
|
4f668b4822a25b4c1f06c6b543a26506bb1f8870
|
fe30034b05f5aacd0ef69523479ae721e234995c
|
refs/heads/master
| 2023-08-25T09:32:16.059555
| 2021-11-09T08:17:22
| 2021-11-09T08:17:22
| 425,726,016
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 252
|
java
|
package com.justexample.repository;
import java.util.List;
import com.justexample.entity.Entity0049;
import org.springframework.data.jpa.repository.JpaRepository;
public interface Entity0049Repository extends JpaRepository<Entity0049,Long>{
}
|
[
"laikahhoe@gmail.com"
] |
laikahhoe@gmail.com
|
f1f044eeee1ad016031e4ea60a04a5513b0045a7
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/druid-io--druid/b20e3038b6a14332185f538f11fe1146f75b44d1/before/DruidConformance.java
|
4f46c94c91cab8e195b9c133526a7f8bb97a6048
|
[] |
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
| 1,621
|
java
|
/*
* Licensed to Metamarkets Group Inc. (Metamarkets) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Metamarkets licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package io.druid.sql.calcite.planner;
import org.apache.calcite.sql.validate.SqlAbstractConformance;
/**
* Implementation of Calcite {@code SqlConformance} for Druid.
*/
public class DruidConformance extends SqlAbstractConformance
{
private static final DruidConformance INSTANCE = new DruidConformance();
private DruidConformance()
{
// Singleton.
}
public static DruidConformance instance()
{
return INSTANCE;
}
@Override
public boolean isBangEqualAllowed()
{
// For x != y (as an alternative to x <> y)
return true;
}
@Override
public boolean isSortByOrdinal()
{
// For ORDER BY 1
return true;
}
@Override
public boolean isSortByAlias()
{
// For ORDER BY columnAlias (where columnAlias is a "column AS columnAlias")
return true;
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
dfca22511f4459241c627d3af321c60afc33233f
|
36e2aa3feb361d533cf232773cf9d184e5225fa2
|
/src/main/java/com/faforever/client/update/ClientUpdateServiceImpl.java
|
3ad3f911fd5dccb17cec6adfbf5ddcab81f79b5e
|
[
"MIT"
] |
permissive
|
IsisEstergos/downlords-faf-client
|
030067fbcc81d6f77374d1d6f6fbc26ac6e26de6
|
5a91089806e8a13aba92c17fc9be4c5fe0ffe077
|
refs/heads/master
| 2020-05-29T10:22:46.694127
| 2016-01-12T16:49:02
| 2016-01-12T18:00:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,182
|
java
|
package com.faforever.client.update;
import com.faforever.client.fx.HostService;
import com.faforever.client.i18n.I18n;
import com.faforever.client.notification.Action;
import com.faforever.client.notification.NotificationService;
import com.faforever.client.notification.PersistentNotification;
import com.faforever.client.task.TaskService;
import com.faforever.client.util.Bytes;
import com.google.common.annotations.VisibleForTesting;
import org.apache.maven.artifact.versioning.ComparableVersion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import javax.annotation.Resource;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.nio.file.Path;
import java.util.Arrays;
import static com.faforever.client.notification.Severity.INFO;
import static com.faforever.client.notification.Severity.WARN;
import static java.util.Collections.singletonList;
import static org.apache.commons.lang3.StringUtils.defaultString;
public class ClientUpdateServiceImpl implements ClientUpdateService {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static final String DEVELOPMENT_VERSION_STRING = "dev";
@Resource
TaskService taskService;
@Resource
NotificationService notificationService;
@Resource
I18n i18n;
@Resource
HostService hostService;
@Resource
ApplicationContext applicationContext;
@VisibleForTesting
ComparableVersion currentVersion;
public ClientUpdateServiceImpl() {
currentVersion = new ComparableVersion(
defaultString(getClass().getPackage().getImplementationVersion(), DEVELOPMENT_VERSION_STRING)
);
}
@Override
public void checkForUpdateInBackground() {
CheckForUpdateTask task = applicationContext.getBean(CheckForUpdateTask.class);
task.setCurrentVersion(currentVersion);
taskService.submitTask(task).thenAccept(updateInfo -> {
if (updateInfo == null) {
return;
}
notificationService.addNotification(
new PersistentNotification(
i18n.get("clientUpdateAvailable.notification", updateInfo.getName(), Bytes.formatSize(updateInfo.getSize())),
INFO,
Arrays.asList(
new Action(
i18n.get("clientUpdateAvailable.downloadAndInstall"),
event -> downloadAndInstallInBackground(updateInfo)
),
new Action(
i18n.get("clientUpdateAvailable.releaseNotes"),
Action.Type.OK_STAY,
event -> hostService.showDocument(updateInfo.getReleaseNotesUrl().toExternalForm())
)
)
)
);
}).exceptionally(throwable -> {
logger.warn("Client update check failed", throwable);
return null;
});
}
@Override
public ComparableVersion getCurrentVersion() {
return currentVersion;
}
private void install(Path binaryPath) {
// TODO probably need to make this executable on unix
String command = binaryPath.toAbsolutePath().toString();
try {
logger.info("Starting installer at {}", command);
new ProcessBuilder(command).inheritIO().start();
} catch (IOException e) {
logger.warn("Installation could not be started", e);
}
}
private void downloadAndInstallInBackground(UpdateInfo updateInfo) {
DownloadUpdateTask task = applicationContext.getBean(DownloadUpdateTask.class);
task.setUpdateInfo(updateInfo);
taskService.submitTask(task)
.thenAccept(this::install)
.exceptionally(throwable -> {
logger.warn("Error while downloading client update", throwable);
notificationService.addNotification(
new PersistentNotification(i18n.get("clientUpdateDownloadFailed.notification"),
WARN,
singletonList(
new Action(i18n.get("clientUpdateDownloadFailed.retry"), event -> downloadAndInstallInBackground(updateInfo))
)
)
);
return null;
});
}
}
|
[
"michel.jung89@gmail.com"
] |
michel.jung89@gmail.com
|
43598511c1bc24076567240b4a0814698c86a219
|
b6e757005224f0564d5b967b5908a10fdc065f6e
|
/ssm_biz/src/main/java/com/wuancake/oa/biz/EmployeeBiz.java
|
1c41bb17d4691a0816db7155a4f0bed9b7314f75
|
[] |
no_license
|
Edenua/gxx
|
54396aec1b033c20eaf2e861ed6f7949d0412e81
|
e0c6eff7d5529f6f3a7417349f1c7ebe2c34f379
|
refs/heads/master
| 2020-05-09T17:34:45.283829
| 2019-04-14T15:16:14
| 2019-04-14T15:16:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 281
|
java
|
package com.wuancake.oa.biz;
import com.wuancake.oa.entity.Employee;
import java.util.List;
public interface EmployeeBiz {
void add(Employee employee);
void edit(Employee employee);
void remove(String sn);
Employee get(String sn);
List<Employee> getAll();
}
|
[
"l"
] |
l
|
2902cc657fd876ed2c3bde308ae765db37d1d070
|
495bd721adc0a8e6566566516e94f15186149cf7
|
/bridge-impl/src/main/java/com/liferay/faces/bridge/scope/BridgeRequestScopeBaseImpl.java
|
311446d20f381871ae010c7c2739089155d8edca
|
[] |
no_license
|
prakashnsm/liferay-faces
|
fd7c01b20bd35be6ee3749ef855f0c61f8581aa3
|
86ebb2e87a9a34d5f3c3d54354a5260767192698
|
refs/heads/master
| 2020-04-07T10:26:56.866379
| 2013-04-02T19:12:07
| 2013-04-02T19:12:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,129
|
java
|
/**
* Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
*
* 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; either version 2.1 of the License, or (at your option)
* any later version.
*
* 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 com.liferay.faces.bridge.scope;
import java.util.HashMap;
import java.util.Map;
/**
* @author Neil Griffin
*/
public abstract class BridgeRequestScopeBaseImpl implements BridgeRequestScope {
// Private Data Members
private Map<String, Object> attributeMap;
public BridgeRequestScopeBaseImpl() {
this.attributeMap = new HashMap<String, Object>();
}
public Object getAttribute(String key) {
return attributeMap.get(key);
}
public void setAttribute(String key, Object value) {
attributeMap.put(key, value);
}
}
|
[
"neil.griffin.scm@gmail.com"
] |
neil.griffin.scm@gmail.com
|
a6129f0266fe95f52f9fd2af8ae486f608ba4ab6
|
5b5f90c99f66587cea981a640063a54b6ea75185
|
/src/main/java/com/coxandkings/travel/operations/resource/paxinfo/PaxInfoResource.java
|
89157ec11c783630016204d5aeac2beaaafd81cc
|
[] |
no_license
|
suyash-capiot/operations
|
02558d5f4c72a895d4a7e7e743495a118b953e97
|
b6ad01cbdd60190e3be1f2a12d94258091fec934
|
refs/heads/master
| 2020-04-02T06:22:30.589898
| 2018-10-26T12:11:11
| 2018-10-26T12:11:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 462
|
java
|
package com.coxandkings.travel.operations.resource.paxinfo;
public class PaxInfoResource {
private String bookingId;
private String orderId;
public String getBookingId() {
return bookingId;
}
public void setBookingId(String bookingId) {
this.bookingId = bookingId;
}
public String getOrderId() {
return orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
}
}
|
[
"sahil@capiot.com"
] |
sahil@capiot.com
|
90585757af510464853caafb38d4098a668f0463
|
2613bdf3410bdf59ae7d9f2d1e78c53114b57f06
|
/01. Java/d20160518/Phone.java
|
d493d09a2e8a7758bf32f3fac8add1a085862b7e
|
[] |
no_license
|
dely2p/2016
|
7647012db5d2dd208e6e74f276e0e896d3fb47a6
|
bcbcebf8af26efcf5fa076234744e518e769894c
|
refs/heads/master
| 2020-05-21T20:52:07.048971
| 2016-09-29T08:16:35
| 2016-09-29T08:16:35
| 63,388,473
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 1,226
|
java
|
package d20160518;
public class Phone {
String user, number,maker; // 멤버변수
int power, ncnt;
Phone(){ // 생성자
user = "홍길동";
power = 30;
ncnt = 0;
maker = "samsung";
}
void 전화걸기(String number){ // 전화걸기 method
System.out.println(number+"에게 전화걸기!");
System.out.println("따르르르르르릉~~~~");
}
void 전화받기(String number){ // 전화받기 method
System.out.println(number+"에게 전화왔습니다!");
System.out.println("여보세요?????");
}
void 번호저장(String number){ // 번호저장 method
this.number = number;
System.out.println("번호가 저장되었습니다.");
ncnt++;
}
void 사진찍기(){ // 사진찍기 method
System.out.println("찰칵!");
}
void 충전하기(){ // 충전하기 method
power += 20;
System.out.println("현재충전량 : "+power);
}
void 정보(){ // 상태정보 method
System.out.println("[상태정보]");
System.out.println("user name : "+user);
System.out.println("maker : "+maker);
System.out.println("현재충전량 : "+power);
System.out.println("전화번호 개수 : "+ncnt);
}
}
|
[
"lhyal2p@gmail.com"
] |
lhyal2p@gmail.com
|
971ae3d2f8d1e6896cd763b8d0135a768449622d
|
0ae7317e280a12a918a394cf5487840a1d1485ad
|
/src/main/java/com/goat/jdk/learn/chapter008/A06/jdk8/HashMapErrorTest.java
|
8e5cfe6565c5661a6160c3bde2be25245798428d
|
[] |
no_license
|
yangfancoming/goatjdk
|
81dd83058e133114cbe829be07186f730f9939a8
|
098ad4c495d3f45fdc1718f650306db4968d1667
|
refs/heads/master
| 2022-06-26T03:50:22.515609
| 2021-10-29T08:26:37
| 2021-10-29T08:26:37
| 204,645,318
| 0
| 0
| null | 2022-06-17T02:37:10
| 2019-08-27T07:26:14
|
Java
|
UTF-8
|
Java
| false
| false
| 1,208
|
java
|
package com.goat.jdk.learn.chapter008.A06.jdk8;
import java.util.*;
/**
* Description:
*与HashSet类似,如果可变对象作为HashMap/Hashtable的key,并且程序修改了作为key 的可变对象
*程序再也无法准确访问到Map中被修改过当地key
*/
public class HashMapErrorTest{
public static void main(String[] args){
HashMap ht = new HashMap();
// 此处的A类与前一个程序的A类是同一个类
ht.put(new A(60000) , "疯狂Java讲义");
ht.put(new A(87563) , "轻量级Java EE企业应用实战");
// 获得Hashtable的key Set集合对应的Iterator迭代器
Iterator it = ht.keySet().iterator();
// 取出Map中第一个key,并修改它的count值
A first = (A)it.next();
first.count = 87563; // ①
// 输出{A@1560b=疯狂Java讲义, A@1560b=轻量级Java EE企业应用实战}
System.out.println(ht);
// 只能删除没有被修改过的key所对应的key-value对
ht.remove(new A(87563));
System.out.println(ht);
// 无法获取剩下的value,下面两行代码都将输出null。
System.out.println(ht.get(new A(87563))); // ② 输出null
System.out.println(ht.get(new A(60000))); // ③ 输出null
}
}
|
[
"34465021+jwfl724168@users.noreply.github.com"
] |
34465021+jwfl724168@users.noreply.github.com
|
3bf853cd0fa0930377070f69c3eaa27f5b73868f
|
6a5e1c7fd25e38251c19b74ab719f659d767c416
|
/archive-transformation-steps/src/main/java/engine/steps/fieldsplitter/FieldSplitter.java
|
47cc45667579d3a6df1cca3655613d2c0169213a
|
[
"Apache-2.0"
] |
permissive
|
marciojv/hopOLD
|
d734576991460ee9275602a505a4d806c166b1a3
|
461d0608069fd5c66ac3113ca03f94417353a0c4
|
refs/heads/master
| 2022-04-13T23:14:29.027246
| 2020-04-08T17:19:13
| 2020-04-08T17:19:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,374
|
java
|
/*! ******************************************************************************
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com
*
*******************************************************************************
*
* 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.apache.hop.trans.steps.fieldsplitter;
import org.apache.hop.core.Const;
import org.apache.hop.core.exception.HopException;
import org.apache.hop.core.exception.HopValueException;
import org.apache.hop.core.row.RowDataUtil;
import org.apache.hop.core.row.ValueMetaInterface;
import org.apache.hop.i18n.BaseMessages;
import org.apache.hop.trans.Trans;
import org.apache.hop.trans.TransMeta;
import org.apache.hop.trans.step.BaseStep;
import org.apache.hop.trans.step.StepDataInterface;
import org.apache.hop.trans.step.StepInterface;
import org.apache.hop.trans.step.StepMeta;
import org.apache.hop.trans.step.StepMetaInterface;
/**
* Split a single String fields into multiple parts based on certain conditions.
*
* @author Matt
* @author Daniel Einspanjer
* @since 31-Okt-2003
* @since 15-01-2008
*/
public class FieldSplitter extends BaseStep implements StepInterface {
private static Class<?> PKG = FieldSplitterMeta.class; // for i18n purposes, needed by Translator2!!
private FieldSplitterMeta meta;
private FieldSplitterData data;
public FieldSplitter( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
Trans trans ) {
super( stepMeta, stepDataInterface, copyNr, transMeta, trans );
}
private Object[] splitField( Object[] r ) throws HopException {
if ( first ) {
first = false;
// get the RowMeta
data.previousMeta = getInputRowMeta().clone();
// search field
data.fieldnr = data.previousMeta.indexOfValue( meta.getSplitField() );
if ( data.fieldnr < 0 ) {
throw new HopValueException( BaseMessages.getString(
PKG, "FieldSplitter.Log.CouldNotFindFieldToSplit", meta.getSplitField() ) );
}
// only String type allowed
if ( !data.previousMeta.getValueMeta( data.fieldnr ).isString() ) {
throw new HopValueException( ( BaseMessages.getString(
PKG, "FieldSplitter.Log.SplitFieldNotValid", meta.getSplitField() ) ) );
}
// prepare the outputMeta
//
data.outputMeta = getInputRowMeta().clone();
meta.getFields( data.outputMeta, getStepname(), null, null, this, metaStore );
// Now create objects to do string to data type conversion...
//
data.conversionMeta = data.outputMeta.cloneToType( ValueMetaInterface.TYPE_STRING );
data.delimiter = environmentSubstitute( meta.getDelimiter() );
data.enclosure = environmentSubstitute( meta.getEnclosure() );
}
// reserve room
Object[] outputRow = RowDataUtil.allocateRowData( data.outputMeta.size() );
int nrExtraFields = meta.getFieldID().length - 1;
System.arraycopy( r, 0, outputRow, 0, data.fieldnr );
System.arraycopy( r, data.fieldnr + 1, outputRow, data.fieldnr + 1 + nrExtraFields,
data.previousMeta.size() - ( data.fieldnr + 1 ) );
// OK, now we have room in the middle to place the fields...
//
// Named values info.id[0] not filled in!
final boolean selectFieldById = ( meta.getFieldID().length > 0 )
&& ( meta.getFieldID()[ 0 ] != null )
&& ( meta.getFieldID()[ 0 ].length() > 0 );
if ( log.isDebug() ) {
if ( selectFieldById ) {
logDebug( BaseMessages.getString( PKG, "FieldSplitter.Log.UsingIds" ) );
} else {
logDebug( BaseMessages.getString( PKG, "FieldSplitter.Log.UsingPositionOfValue" ) );
}
}
String valueToSplit = data.previousMeta.getString( r, data.fieldnr );
boolean removeEnclosure = Boolean.valueOf( System.getProperties().getProperty( Const.HOP_SPLIT_FIELDS_REMOVE_ENCLOSURE, "false" ) );
String[] valueParts = Const.splitString( valueToSplit, data.delimiter, data.enclosure, removeEnclosure );
int prev = 0;
for ( int i = 0; i < meta.getFieldsCount(); i++ ) {
String rawValue = null;
if ( selectFieldById ) {
for ( String part : valueParts ) {
if ( part.startsWith( meta.getFieldID()[ i ] ) ) {
// Optionally remove the id
if ( meta.getFieldRemoveID()[ i ] ) {
rawValue = part.substring( meta.getFieldID()[ i ].length() );
} else {
rawValue = part;
}
break;
}
}
if ( log.isDebug() ) {
logDebug( BaseMessages.getString( PKG, "FieldSplitter.Log.SplitInfo" ) + rawValue );
}
} else {
rawValue = ( valueParts == null || i >= valueParts.length ) ? null : valueParts[ i ];
prev += ( rawValue == null ? 0 : rawValue.length() ) + data.delimiter.length();
if ( log.isDebug() ) {
logDebug( BaseMessages
.getString( PKG, "FieldSplitter.Log.SplitFieldsInfo", rawValue, String.valueOf( prev ) ) );
}
}
Object value;
try {
ValueMetaInterface valueMeta = data.outputMeta.getValueMeta( data.fieldnr + i );
ValueMetaInterface conversionValueMeta = data.conversionMeta.getValueMeta( data.fieldnr + i );
if ( rawValue != null && valueMeta.isNull( rawValue ) ) {
rawValue = null;
}
value =
valueMeta.convertDataFromString( rawValue, conversionValueMeta, meta.getFieldNullIf()[ i ],
meta.getFieldIfNull()[ i ], meta.getFieldTrimType()[ i ] );
} catch ( Exception e ) {
throw new HopValueException( BaseMessages.getString(
PKG, "FieldSplitter.Log.ErrorConvertingSplitValue", rawValue, meta.getSplitField() + "]!" ), e );
}
outputRow[ data.fieldnr + i ] = value;
}
return outputRow;
}
public synchronized boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws HopException {
meta = (FieldSplitterMeta) smi;
data = (FieldSplitterData) sdi;
Object[] r = getRow(); // get row from rowset, wait for our turn, indicate busy!
if ( r == null ) {
// no more input to be expected...
setOutputDone();
return false;
}
Object[] outputRowData = splitField( r );
putRow( data.outputMeta, outputRowData );
if ( checkFeedback( getLinesRead() ) ) {
if ( log.isBasic() ) {
logBasic( BaseMessages.getString( PKG, "FieldSplitter.Log.LineNumber" ) + getLinesRead() );
}
}
return true;
}
public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {
meta = (FieldSplitterMeta) smi;
data = (FieldSplitterData) sdi;
return super.init( smi, sdi );
}
}
|
[
"mattcasters@gmail.com"
] |
mattcasters@gmail.com
|
eb2ccd52dee33689b0ed8afe804a6a316e0f402b
|
9278748d7e7dae7f8b48d9ebf17c43ea91237569
|
/13-book-step3/src/com/itutry/service/impl/BookServiceImpl.java
|
0d4df65835bbeecbcebd3c8ab4e6d7c2fba069b1
|
[] |
no_license
|
china-university-mooc/Java-Web-Atguigu
|
813a9c0dc40e1c03487db0b9c94b83ca0eaeab5b
|
d40c537d0a1a2c4d09eea77adc244bcf3c12f8ee
|
refs/heads/master
| 2023-03-04T19:24:42.639098
| 2020-09-05T04:00:06
| 2020-09-05T04:00:06
| 255,493,713
| 0
| 0
| null | 2023-02-22T08:28:57
| 2020-04-14T02:46:22
|
Java
|
UTF-8
|
Java
| false
| false
| 2,222
|
java
|
package com.itutry.service.impl;
import com.itutry.dao.BookDao;
import com.itutry.dao.impl.BookDaoImpl;
import com.itutry.pojo.Book;
import com.itutry.pojo.Page;
import com.itutry.service.BookService;
import java.util.List;
public class BookServiceImpl implements BookService {
private final BookDao bookDao = new BookDaoImpl();
@Override
public void addBook(Book book) {
bookDao.addBook(book);
}
@Override
public void deleteBookById(Integer id) {
bookDao.deleteBookById(id);
}
@Override
public void updateBook(Book book) {
bookDao.updateBook(book);
}
@Override
public Book queryBookById(Integer id) {
return bookDao.queryBookById(id);
}
@Override
public List<Book> queryBooks() {
return bookDao.queryBooks();
}
@Override
public Page<Book> page(int pageNo, int pageSize) {
Page<Book> page = new Page<>();
page.setPageSize(pageSize);
// 求记录数
int totalCount = bookDao.queryForTotalCount();
page.setTotalCount(totalCount);
// 求总页数
int pageTotal = totalCount / pageSize;
if (totalCount % pageSize > 0) {
pageTotal++;
}
page.setPageTotal(pageTotal);
page.setPageNo(pageNo);
int begin = (page.getPageNo() - 1) * pageSize;
List<Book> items = bookDao.queryForPageItems(begin, pageSize);
page.setItems(items);
return page;
}
@Override
public Page<Book> pageByPrice(int pageNo, int pageSize, int min, int max) {
Page<Book> page = new Page<>();
page.setPageSize(pageSize);
// 求记录数
int totalCount = bookDao.queryForTotalCountByPrice(min, max);
page.setTotalCount(totalCount);
// 求总页数
int pageTotal = totalCount / pageSize;
if (totalCount % pageSize > 0) {
pageTotal++;
}
page.setPageTotal(pageTotal);
page.setPageNo(pageNo);
int begin = (page.getPageNo() - 1) * pageSize;
List<Book> items = bookDao.queryForPageItemsByPrice(begin, pageSize, min, max);
page.setItems(items);
return page;
}
}
|
[
"zhaozhang@thoughtworks.com"
] |
zhaozhang@thoughtworks.com
|
97ca7ea60ae1893ea68730a7cc1a6ec79afb4b86
|
b85b2e744829d7dfe5d28babb4c3644ad67f6aa9
|
/DataConservancyCode/dcs-integration/dcs-integration-support/src/main/java/org/dataconservancy/dcs/integration/support/Interpolator.java
|
ecfa26ef2c4ca89d3c633fcb335b5e8575814600
|
[] |
no_license
|
Data-to-Insight-Center/sead-virtual-archive
|
850bcc22a0e6a6beef50e59b6f6397b9b57a725d
|
5aecb3512f4942d0f4c1273cdae8419ee7d5577f
|
refs/heads/master
| 2020-04-14T13:13:55.011374
| 2020-02-01T16:22:23
| 2020-02-01T16:22:23
| 14,767,215
| 0
| 1
| null | 2020-02-01T16:22:28
| 2013-11-28T03:50:23
|
Java
|
UTF-8
|
Java
| false
| false
| 3,254
|
java
|
/*
* Copyright 2012 Johns Hopkins University
*
* 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.dataconservancy.dcs.integration.support;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Properties;
/**
* Simple utility which interpolates expressions delimited by '${' and '}'. For example, the expression
* <code>${dcs.baseurl}</code> could be interpolated to <code>http://localhost:8080/dcs/</code>.
*/
public class Interpolator {
private static final Logger log = LoggerFactory.getLogger(Interpolator.class);
/**
* Interpolates expressions starting with '${' and ending with '}'.
* <p/>
* Note: this method does support escaped or nested expressions.
*
* @param sb the StringBuilder which may contain expressions
* @param off the offset in the StringBuilder to start interpolation
* @param values contains values for the expressions, keyed by the expression (minus '${' and '}')
* @return the interpolated StringBuilder
*/
public static StringBuilder interpolate(final StringBuilder sb, final int off, final Properties values) {
log.debug("Operating on string '{}' offset {}", sb, off);
if (off < 0) {
throw new IllegalArgumentException("Offset must be 0 or greater.");
}
if (off >= sb.length()) {
throw new IllegalArgumentException("Offset beyond the end of the string.");
}
int index = -1;
if ((index = sb.indexOf("${", off)) >= off) {
final StringBuilder expressionSb = new StringBuilder();
for (int i = index + 2; sb.charAt(i) != '}' && i <= sb.length(); i++) {
expressionSb.append(sb.charAt(i));
}
final String expression = expressionSb.toString();
log.debug("Extracted expression {}", expression);
final String interpolatedValue;
if (values.containsKey(expression)) {
interpolatedValue = values.getProperty(expression);
} else {
interpolatedValue = "";
}
final int toIndex = index + expression.length() + "}".length() + 2;
final String replacedSubstring = sb.substring(index, toIndex);
log.debug("Replacing the expression substring (from {}, to {}, substring {}) with value: {}",
new Object[]{index, toIndex, replacedSubstring, interpolatedValue});
sb.replace(index, toIndex, interpolatedValue);
final int nextOff = index + interpolatedValue.length();
if (nextOff < sb.length()) {
return interpolate(sb, nextOff, values);
}
}
return sb;
}
}
|
[
"kavchand@indiana.edu"
] |
kavchand@indiana.edu
|
95b100cb53654b0324814da5e2ee0f9a1ef92e59
|
6a649709010f35916b58ad639eb24dc9d7452344
|
/AL-Game/src/com/aionemu/gameserver/services/item/ItemRestrictionService.java
|
ad12ecb2bbd9da9b560aa22900278b6565dc5761
|
[] |
no_license
|
soulxj/aion-cn
|
807860611e746d8d4c456a769a36d3274405fd7e
|
8a0a53cf8f99233cbee82f341f2b5c33be0364fa
|
refs/heads/master
| 2016-09-11T01:12:19.660692
| 2014-08-11T14:59:38
| 2014-08-11T14:59:38
| 41,342,802
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,916
|
java
|
/*
* This file is part of aion-lightning <aion-lightning.com>.
*
* aion-lightning 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.
*
* aion-lightning 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 aion-lightning. If not, see <http://www.gnu.org/licenses/>.
*/
package com.aionemu.gameserver.services.item;
import com.aionemu.gameserver.configs.main.LegionConfig;
import com.aionemu.gameserver.model.gameobjects.Item;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.model.items.storage.StorageType;
import com.aionemu.gameserver.model.team.legion.LegionPermissionsMask;
import com.aionemu.gameserver.model.templates.item.ItemCategory;
import com.aionemu.gameserver.model.templates.item.ItemTemplate;
import com.aionemu.gameserver.network.aion.serverpackets.SM_SYSTEM_MESSAGE;
import com.aionemu.gameserver.services.LegionService;
import com.aionemu.gameserver.utils.PacketSendUtility;
/**
* @author ATracer
*/
public class ItemRestrictionService {
/**
* Check if item can be moved from storage by player
*/
public static boolean isItemRestrictedFrom(Player player, Item item, byte storage) {
StorageType type = StorageType.getStorageTypeById(storage);
switch (type) {
case LEGION_WAREHOUSE:
if (!LegionService.getInstance().getLegionMember(player.getObjectId()).hasRights(LegionPermissionsMask.WH_WITHDRAWAL)
|| !LegionConfig.LEGION_WAREHOUSE || !player.isLegionMember()) {
// You do not have the authority to use the Legion warehouse.
PacketSendUtility.sendPacket(player, new SM_SYSTEM_MESSAGE(1300322));
return true;
}
break;
}
return false;
}
/**
* Check if item can be moved to storage by player
*/
public static boolean isItemRestrictedTo(Player player, Item item, byte storage) {
StorageType type = StorageType.getStorageTypeById(storage);
switch (type) {
case REGULAR_WAREHOUSE:
if (!item.isStorableinWarehouse(player)) {
// You cannot store this in the warehouse.
PacketSendUtility.sendPacket(player, new SM_SYSTEM_MESSAGE(1300418));
return true;
}
break;
case ACCOUNT_WAREHOUSE:
if (!item.isStorableinAccWarehouse(player)) {
// You cannot store this item in the account warehouse.
PacketSendUtility.sendPacket(player, new SM_SYSTEM_MESSAGE(1400356));
return true;
}
break;
case LEGION_WAREHOUSE:
if (!item.isStorableinLegWarehouse(player) || !LegionConfig.LEGION_WAREHOUSE) {
// You cannot store this item in the Legion warehouse.
PacketSendUtility.sendPacket(player, new SM_SYSTEM_MESSAGE(1400355));
return true;
}
else if (!player.isLegionMember() || !LegionService.getInstance().getLegionMember(player.getObjectId()).hasRights(LegionPermissionsMask.WH_DEPOSIT)) {
// You do not have the authority to use the Legion warehouse.
PacketSendUtility.sendPacket(player, new SM_SYSTEM_MESSAGE(1300322));
return true;
}
break;
}
return false;
}
/** Check, whether the item can be removed */
public static boolean canRemoveItem(Player player, Item item) {
ItemTemplate it = item.getItemTemplate();
if (it.getCategory() == ItemCategory.QUEST) {
// TODO: not removable, if quest status start and quest can not be abandoned
// Waiting for quest data reparse
return true;
}
return true;
}
}
|
[
"feidebugao@gmail.com"
] |
feidebugao@gmail.com
|
c605f55870b9f1236858e7290fbe0ea26a6eac11
|
ea0e7b0e4b397f69a2c0d07c7c374022a707c264
|
/src/main/java/PlatypusPaternity.java
|
2a8574f60f237c2ef794d8702b2623d9ae136df1
|
[] |
no_license
|
tasyrkin/Topcoder
|
348b722ba983639a7133bf223f31e2a6c8254e46
|
5376d48612b3516b82ebc40370dd6407aad23032
|
refs/heads/master
| 2020-06-06T23:16:14.692875
| 2019-01-07T01:33:25
| 2019-01-07T01:33:25
| 38,580,284
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,223
|
java
|
public class PlatypusPaternity{
public int maxFamily(String[] femaleCompatibility, String[] maleCompatibility, String[] siblingGroups){
int max = 0;
for(int i = 0; i < siblingGroups.length; i++){
char[]childs = siblingGroups[i].toCharArray();
int chn = 0;
for(int j = 0; j < childs.length; j++){
boolean fath = false;
boolean moth = false;
if(childs[j] == 'Y'){
for(int k = 0; k < femaleCompatibility.length; k++){
if(/*i < femaleCompatibility[j].length() && */femaleCompatibility[k].charAt(j) == 'Y')moth = true;
else moth = false;
if(/*i < maleCompatibility[j].length() && */maleCompatibility[k].charAt(j) == 'Y')fath = true;
else fath = false;
if(moth&&fath)break;
}
if(fath&&moth)chn++;
}
}
if(max<chn)max=chn;
}
if(max == 0)return 0;
return max+2;
}
public static void main(String[] args) {
PlatypusPaternity pp = new PlatypusPaternity();
String[] femaleCompatibility = {"YYYYYYYYN"};
String[] maleCompatibility = {"YYYYYYYYY"};
String[] siblingGroups = {"YNYNYNYNY",
"NNNYNYNNN",
"NYNNNNNYN"};
int i = pp.maxFamily(femaleCompatibility, maleCompatibility, siblingGroups);
System.out.println(i);
}
}
|
[
"tasyrkin@gmail.com"
] |
tasyrkin@gmail.com
|
a4b8089dfd425a565df6c8860f95988a8fcf86c0
|
b2fa66ec49f50b4bb92fee6494479238c8b46876
|
/src/test/java/fi/riista/feature/organization/RiistakeskusAuthorizationTest.java
|
aa824fe64da6a9794aabf925327b834f8b7cef17
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
suomenriistakeskus/oma-riista-web
|
f007a9dc663317956ae672ece96581f1704f0e85
|
f3550bce98706dfe636232fb2765a44fa33f78ca
|
refs/heads/master
| 2023-04-27T12:07:50.433720
| 2023-04-25T11:31:05
| 2023-04-25T11:31:05
| 77,215,968
| 16
| 4
|
MIT
| 2023-04-25T11:31:06
| 2016-12-23T09:49:44
|
Java
|
UTF-8
|
Java
| false
| false
| 3,857
|
java
|
package fi.riista.feature.organization;
import fi.riista.test.EmbeddedDatabaseTest;
import org.junit.Test;
import static fi.riista.feature.account.user.SystemUserPrivilege.MODERATE_RHY_ANNUAL_STATISTICS;
import static fi.riista.feature.organization.RiistakeskusAuthorization.Permission.BATCH_APPROVE_ANNUAL_STATISTICS;
import static fi.riista.feature.organization.RiistakeskusAuthorization.Permission.LIST_ANNUAL_STATISTICS;
import static fi.riista.feature.organization.occupation.OccupationType.AMPUMAKOKEEN_VASTAANOTTAJA;
import static fi.riista.feature.organization.occupation.OccupationType.SRVA_YHTEYSHENKILO;
import static fi.riista.feature.organization.occupation.OccupationType.TOIMINNANOHJAAJA;
import static fi.riista.security.EntityPermission.READ;
import static fi.riista.security.EntityPermission.UPDATE;
import static fi.riista.util.DateUtil.today;
public class RiistakeskusAuthorizationTest extends EmbeddedDatabaseTest {
@Test
public void testAdmin() {
onSavedAndAuthenticated(createNewAdmin(), () -> testAllPermissions(true, 0));
}
@Test
public void testModerator() {
onSavedAndAuthenticated(createNewModerator(), () -> {
testPermission(READ, true, 0);
testPermission(UPDATE, true, 0);
testPermission(LIST_ANNUAL_STATISTICS, true, 0);
testPermission(BATCH_APPROVE_ANNUAL_STATISTICS, false, 0);
});
}
@Test
public void testModeratorWithAnnualStatisticsPrivilege() {
onSavedAndAuthenticated(createNewModerator(MODERATE_RHY_ANNUAL_STATISTICS), () -> testAllPermissions(true, 0));
}
@Test
public void testActiveCoordinator() {
withRhyAndCoordinator((rhy, coordinator) -> {
onSavedAndAuthenticated(createUser(coordinator), () -> {
testPermission(READ, false, 2);
testPermission(UPDATE, false, 2);
testPermission(LIST_ANNUAL_STATISTICS, true, 2);
testPermission(BATCH_APPROVE_ANNUAL_STATISTICS, false, 2);
});
});
}
@Test
public void testExpiredCoordinator() {
withRhy(rhy -> withPerson(person -> {
model().newOccupation(rhy, person, TOIMINNANOHJAAJA).setEndDate(today().minusDays(1));
onSavedAndAuthenticated(createUser(person), () -> testAllPermissions(false));
}));
}
@Test
public void testActiveSrvaContactPerson() {
withRhy(rhy -> withPerson(person -> {
model().newOccupation(rhy, person, SRVA_YHTEYSHENKILO);
onSavedAndAuthenticated(createUser(person), () -> testAllPermissions(false));
}));
}
@Test
public void testActiveShootingTestOfficial() {
withRhy(rhy -> withPerson(person -> {
model().newOccupation(rhy, person, AMPUMAKOKEEN_VASTAANOTTAJA);
onSavedAndAuthenticated(createUser(person), () -> testAllPermissions(false));
}));
}
@Test
public void testNonRhyOccupiedPerson() {
onSavedAndAuthenticated(createUserWithPerson(), () -> testAllPermissions(false));
}
private void testPermission(final Enum<?> permission, final boolean permitted, final int maxQueries) {
onCheckingPermission(permission)
.expect(permitted)
.expectNumberOfQueriesAtMost(maxQueries)
.apply(getRiistakeskus());
}
private void testAllPermissions(final boolean permitted) {
testAllPermissions(permitted, 2);
}
private void testAllPermissions(final boolean permitted, final int maxQueries) {
testPermission(READ, permitted, maxQueries);
testPermission(UPDATE, permitted, maxQueries);
testPermission(LIST_ANNUAL_STATISTICS, permitted, maxQueries);
testPermission(BATCH_APPROVE_ANNUAL_STATISTICS, permitted, maxQueries);
}
}
|
[
"kyosti.herrala@vincit.fi"
] |
kyosti.herrala@vincit.fi
|
7621364ee077617a5dda25c0a0fab56f5dfd3767
|
bf842c0f05fe27f0652e09edb5645528a2e94205
|
/Exception Handling/src/com/top10/exception/IllegalArgument.java
|
330f638e65147c26306a337e2e2dd1b0bb3e8ccd
|
[] |
no_license
|
chamanbharti/core-java-project
|
804dd3fce33823308bf08b2cad47380ae08aa3ba
|
6bc9f5cfe0466e2ae7fa78a6eb52eba69407610a
|
refs/heads/master
| 2021-01-21T16:18:12.232458
| 2017-05-20T11:08:15
| 2017-05-20T11:08:15
| 91,882,464
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 884
|
java
|
package com.top10.exception;
import java.io.File;
public class IllegalArgument {
public static String createRelativePath(String parent, String filename) {
if(parent == null)
throw new IllegalArgumentException("The parent path cannot be null!");
if(filename == null)
throw new IllegalArgumentException("The filename cannot be null!");
return parent + File.separator + filename;
}
public static void main(String[] args) {
// The following command will be successfully executed.
System.out.println(IllegalArgument.createRelativePath("dir1", "file1"));
System.out.println();
// The following command throws an IllegalArgumentException.
System.out.println(IllegalArgument.createRelativePath(null, "file1"));
}
}
|
[
"chaman.bharti84@gmail.com"
] |
chaman.bharti84@gmail.com
|
e0513c8eb4906d9d8a72e94391f07e18688e7bea
|
139960e2d7d55e71c15e6a63acb6609e142a2ace
|
/mobile_app1/module1215/src/main/java/module1215packageJava0/Foo2.java
|
f4d6c2237a8e9dc6d5e2c18236743ce58de4aa93
|
[
"Apache-2.0"
] |
permissive
|
uber-common/android-build-eval
|
448bfe141b6911ad8a99268378c75217d431766f
|
7723bfd0b9b1056892cef1fef02314b435b086f2
|
refs/heads/master
| 2023-02-18T22:25:15.121902
| 2023-02-06T19:35:34
| 2023-02-06T19:35:34
| 294,831,672
| 83
| 7
|
Apache-2.0
| 2021-09-24T08:55:30
| 2020-09-11T23:27:37
|
Java
|
UTF-8
|
Java
| false
| false
| 286
|
java
|
package module1215packageJava0;
import java.lang.Integer;
public class Foo2 {
Integer int0;
Integer int1;
Integer int2;
public void foo0() {
new module1215packageJava0.Foo1().foo2();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
}
|
[
"oliviern@uber.com"
] |
oliviern@uber.com
|
78411f2650d3ecd3a7020fa5557a391f7bf15133
|
26e611565ce0e9eed154caaf6548a281a829d356
|
/onvif-ws-client/src/main/java/org/onvif/ver10/accesscontrol/wsdl/EnableAccessPoint.java
|
0b503492b11ca2c517cfdc9648c7b541047f3e79
|
[
"Apache-2.0"
] |
permissive
|
doniexun/onvif-1
|
ecb366070dca73781c7baf3b9bcff94dd68001f5
|
ff9839c099e5f81d877a1753598a508c5c0bfc6b
|
refs/heads/master
| 2020-05-27T09:14:42.784064
| 2017-12-20T18:15:59
| 2017-12-20T18:15:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,526
|
java
|
package org.onvif.ver10.accesscontrol.wsdl;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Classe Java per anonymous complex type.
*
* <p>Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Token" type="{http://www.onvif.org/ver10/pacs}ReferenceToken"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"token"
})
@XmlRootElement(name = "EnableAccessPoint")
public class EnableAccessPoint {
@XmlElement(name = "Token", required = true)
protected String token;
/**
* Recupera il valore della proprietà token.
*
* @return
* possible object is
* {@link String }
*
*/
public String getToken() {
return token;
}
/**
* Imposta il valore della proprietà token.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setToken(String value) {
this.token = value;
}
}
|
[
"f.pompermaier@gmail.com"
] |
f.pompermaier@gmail.com
|
7b9b59c6ea407a5b4efd0d029074eaa287c94b87
|
82b174612a480d4cab4049b082199c0410741432
|
/IOCProjAnno57-Resource/src/main/java/com/nt/beans/Student.java
|
d7d035d90aa2fe17c767033a5d177b388ad648fe
|
[] |
no_license
|
pratikrohokale/SPRINGREFCORE
|
7d5df0c6988226eefc57fdc74222a9cb80bfd92c
|
aedb550265ac1aa7a945062d7f0dad6425440bb7
|
refs/heads/master
| 2021-07-05T09:01:44.943257
| 2019-06-20T05:03:08
| 2019-06-20T05:03:08
| 192,851,623
| 0
| 0
| null | 2020-10-13T14:02:16
| 2019-06-20T05:01:43
|
Java
|
UTF-8
|
Java
| false
| false
| 819
|
java
|
package com.nt.beans;
import javax.inject.Named;
@Named("st")
public class Student {
//@Resource(name="course1")
private Course course;
public Student() {
System.out.println("Student:0-param constructor");
}
/* @Resource(name="course1")-->Does not supports constructor mode autowiring
public Student(Course course){
System.out.println("Student::1-param constuructor");
this.course=course;
}*/
/* @Resource(name="course1")
public void setCourse(Course course) {
System.out.println("setCourse(-)");
this.course = course;
}*/
/*@Resource(name="course1")
public void assign(Course course){
System.out.println("assign(-)");
this.course=course;
}*/
@Override
public String toString() {
return "Student [course=" + course + "]";
}
}//class
|
[
"prohokale01@gmail.com"
] |
prohokale01@gmail.com
|
2ccda3f045007caaf2880bd773bd537fb621e70d
|
f798e0dcdb3000c46825d5b1771d4b8f0abad7d7
|
/Business/Services/Scheduling/src/main/java/net/madz/scheduling/entities/ServiceSummaryPlan.java
|
4e8b7f16aeaf2afff3953be03d6709f0d765c8ee
|
[] |
no_license
|
zhongdj/Swordfish
|
f7fa1ef8c051b0706b732dba0f6bbf53f61af10c
|
92d12a642dbfb20205278c9e4a5fc20a7779dea8
|
refs/heads/master
| 2021-01-19T13:52:39.012083
| 2013-12-17T12:04:02
| 2013-12-17T12:04:02
| 12,898,088
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,194
|
java
|
package net.madz.scheduling.entities;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.Table;
import net.madz.lifecycle.annotations.LifecycleMeta;
import net.madz.lifecycle.annotations.Transition;
import net.madz.lifecycle.annotations.action.Condition;
import net.madz.scheduling.biz.IServiceOrder;
import net.madz.scheduling.meta.ServiceSummaryPlanLifecycleMeta;
import net.madz.scheduling.meta.ServiceSummaryPlanLifecycleMeta.Conditions.VolumeMeasurable;
import net.madz.scheduling.meta.ServiceSummaryPlanLifecycleMeta.Transitions.AdjustTotalVolume;
import net.madz.scheduling.meta.ServiceSummaryPlanLifecycleMeta.Transitions.CreateServiceOrder;
@Entity
@Table(name = "service_summary_plan")
@LifecycleMeta(ServiceSummaryPlanLifecycleMeta.class)
public class ServiceSummaryPlan extends ServiceSummaryPlanBase implements VolumeMeasurable {
protected static final long serialVersionUID = -2519583821494066599L;
@Transition(CreateServiceOrder.class)
public IServiceOrder createServiceOrder(MixingPlantResource plantResource, ConcreteTruckResource truckResource, double volume) {
IServiceOrder order = createServiceOrder();
order.configureResources(plantResource, truckResource, volume);
return order;
}
protected IServiceOrder createServiceOrder() {
final ServiceOrder serviceOrder = new ServiceOrder(this);
serviceOrder.init();
return serviceOrder;
}
@Transition(AdjustTotalVolume.class)
public void adjustTotalVolume(double newTotalVolume) {
this.totalVolume = newTotalVolume;
}
@Transition(ServiceSummaryPlanLifecycleMeta.Transitions.ConfirmFinish.class)
public void confirmFinish() {
this.finishedOn = new Date();
}
@Transition(ServiceSummaryPlanLifecycleMeta.Transitions.Cancel.class)
public void cancel() {
this.canceledOn = new Date();
}
@Condition(VolumeMeasurable.class)
public VolumeMeasurable getVolumeMeasurable() {
return this;
}
public boolean isVolumeLeft() {
final double leftValue = this.getTotalVolume() - this.getPlannedVolume();
return leftValue > 0;
}
}
|
[
"zhongdj@gmail.com"
] |
zhongdj@gmail.com
|
ab237c8fb291dc6a80aec825f4d8b94976c108c1
|
08506438512693067b840247fa2c9a501765f39d
|
/Product/Production/Services/AdminDistributionCore/src/main/java/gov/hhs/fha/nhinc/admindistribution/entity/proxy/service/EntityAdminDistributionG0UnsecuredServicePortDescriptor.java
|
e06f1ee8a5afa9a1357e4861b1f689ecb5c50a12
|
[] |
no_license
|
AurionProject/Aurion
|
2f577514de39e91e1453c64caa3184471de891fa
|
b99e87e6394ecdde8a4197b755774062bf9ef890
|
refs/heads/master
| 2020-12-24T07:42:11.956869
| 2017-09-27T22:08:31
| 2017-09-27T22:08:31
| 49,459,710
| 1
| 0
| null | 2017-03-07T23:24:56
| 2016-01-11T22:55:12
|
Java
|
UTF-8
|
Java
| false
| false
| 1,911
|
java
|
/*
* Copyright (c) 2012, United States Government, as represented by the Secretary of Health and Human Services.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* * Neither the name of the United States Government nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE UNITED STATES GOVERNMENT BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package gov.hhs.fha.nhinc.admindistribution.entity.proxy.service;
/**
* @author akong
*
*/
public class EntityAdminDistributionG0UnsecuredServicePortDescriptor extends
EntityAdminDistributionUnsecuredServicePortDescriptor {
}
|
[
"neilkwebb@hotmail.com"
] |
neilkwebb@hotmail.com
|
17dbf79b3226d83bdaf6b7dc94fb81937186cbf8
|
6a2a5652672096896019afe5f4069353f920c3e0
|
/PureIoc/src/net/cassite/pure/ioc/handlers/param/DefaultParamHandler.java
|
b1b7b4c935e5c347af742b3e58d9bf974182a54d
|
[
"MIT"
] |
permissive
|
wkgcass/common
|
cc4c0f2c03d641e2bbc117ad21ec270e342818a0
|
5813f552e87d8eea693fbc8f07494d0f7ce61b54
|
refs/heads/master
| 2021-03-12T23:48:14.589227
| 2015-10-29T12:08:41
| 2015-10-29T12:08:41
| 38,412,339
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,654
|
java
|
package net.cassite.pure.ioc.handlers.param;
import java.lang.annotation.Annotation;
import java.util.Arrays;
import org.apache.log4j.Logger;
import net.cassite.pure.ioc.AnnotationHandlingException;
import net.cassite.pure.ioc.IOCController;
import net.cassite.pure.ioc.handlers.IrrelevantAnnotationHandlingException;
import net.cassite.pure.ioc.handlers.ParamAnnotationHandler;
import net.cassite.pure.ioc.handlers.ParamHandlerChain;
import net.cassite.style.reflect.MemberSup;
/**
* Default implementation of ParamAnnotationHandler <br>
* simply return the corresponding value of given parameter type.
*
* @author wkgcass
*
*/
public class DefaultParamHandler extends IOCController implements ParamAnnotationHandler {
private static final Logger LOGGER = Logger.getLogger(DefaultParamHandler.class);
@Override
public boolean canHandle(Annotation[] annotations) {
return true;
}
@Override
public Object handle(MemberSup<?> caller, Class<?> cls, Annotation[] toHandle, ParamHandlerChain chain) throws AnnotationHandlingException {
LOGGER.debug("Entered DefaultParamHandler with args:\n\tcaller:\t" + caller + "\n\tcls:\t" + cls + "\n\ttoHandle:\t"
+ Arrays.toString(toHandle) + "\n\tchain:\t" + chain);
try {
return chain.next().handle(caller, cls, toHandle, chain);
} catch (IrrelevantAnnotationHandlingException e) {
LOGGER.debug("Start handling with DefaultParamHandler");
return get(cls);
}
}
}
|
[
"wkgcass@hotmail.com"
] |
wkgcass@hotmail.com
|
07a5b3b365fa5ed159648bdd366902b324a51fcd
|
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
|
/src/chosun/ciis/hd/orga/rec/HD_ORGA_1300_LCURLISTRecord.java
|
4d961c8e6bd3c4e4675fe7c132ba83617baa9024
|
[] |
no_license
|
nosmoon/misdevteam
|
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
|
1829d5bd489eb6dd307ca244f0e183a31a1de773
|
refs/heads/master
| 2020-04-15T15:57:05.480056
| 2019-01-10T01:12:01
| 2019-01-10T01:12:01
| 164,812,547
| 1
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 1,413
|
java
|
/***************************************************************************************************
* 파일명 : .java
* 기능 : 독자우대-구독신청
* 작성일자 : 2007-05-22
* 작성자 : 김대섭
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.hd.orga.rec;
import java.sql.*;
import chosun.ciis.hd.orga.dm.*;
import chosun.ciis.hd.orga.ds.*;
/**
*
*/
public class HD_ORGA_1300_LCURLISTRecord extends java.lang.Object implements java.io.Serializable{
public String dept_cd;
public String dept_nm;
public String abrv_nm;
public HD_ORGA_1300_LCURLISTRecord(){}
public void setDept_cd(String dept_cd){
this.dept_cd = dept_cd;
}
public void setDept_nm(String dept_nm){
this.dept_nm = dept_nm;
}
public void setAbrv_nm(String abrv_nm){
this.abrv_nm = abrv_nm;
}
public String getDept_cd(){
return this.dept_cd;
}
public String getDept_nm(){
return this.dept_nm;
}
public String getAbrv_nm(){
return this.abrv_nm;
}
}
/* 작성시간 : Thu Mar 12 10:26:50 KST 2009 */
|
[
"DLCOM000@172.16.30.11"
] |
DLCOM000@172.16.30.11
|
28ce96cc158c9ebfa6b7256e80cebd07522e8e04
|
208ba847cec642cdf7b77cff26bdc4f30a97e795
|
/g/src/main/java/org.wp.g/util/widgets/WPEditText.java
|
2c69a9fb82192e7e964d72b652ca4f31f4f33e97
|
[] |
no_license
|
kageiit/perf-android-large
|
ec7c291de9cde2f813ed6573f706a8593be7ac88
|
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
|
refs/heads/master
| 2021-01-12T14:00:19.468063
| 2016-09-27T13:10:42
| 2016-09-27T13:10:42
| 69,685,305
| 0
| 0
| null | 2016-09-30T16:59:49
| 2016-09-30T16:59:48
| null |
UTF-8
|
Java
| false
| false
| 1,879
|
java
|
package org.wp.g.util.widgets;
import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.widget.EditText;
/*
* @deprecated This custom EditText is used solely by the "legacy" editor in WP Android.
* It will be removed when we drop the legacy editor and should not be used in new code.
*/
@Deprecated
public class WPEditText extends EditText {
private EditTextImeBackListener mOnImeBack;
private OnSelectionChangedListener onSelectionChangedListener;
public WPEditText(Context context) {
super(context);
}
public WPEditText(Context context, AttributeSet attrs) {
super(context, attrs);
}
public WPEditText(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
protected void onSelectionChanged(int selStart, int selEnd) {
if (onSelectionChangedListener != null) {
onSelectionChangedListener.onSelectionChanged();
}
}
@Override
public boolean onKeyPreIme(int keyCode, KeyEvent event) {
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK
&& event.getAction() == KeyEvent.ACTION_UP) {
if (mOnImeBack != null)
mOnImeBack.onImeBack(this, this.getText().toString());
}
return super.onKeyPreIme(keyCode, event);
}
public void setOnEditTextImeBackListener(EditTextImeBackListener listener) {
mOnImeBack = listener;
}
public interface EditTextImeBackListener {
public abstract void onImeBack(WPEditText ctrl, String text);
}
public void setOnSelectionChangedListener(OnSelectionChangedListener listener) {
onSelectionChangedListener = listener;
}
public interface OnSelectionChangedListener {
public abstract void onSelectionChanged();
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
eb2c17e88f87eebfe34cb8de31bace999f02d3f1
|
225e9c2aebb7b47971c738f45775713d7cfb15f5
|
/jdk/jdk1.8/src/main/com/sun/corba/se/spi/activation/NoSuchEndPoint.java
|
81394d320cb1ac0c33271622f7855df0cd2c45f3
|
[] |
no_license
|
smalldoctor/source-code
|
6bb53559840f138a456c160aa22d0d7bba5322a0
|
c7571807e8d29d46a353148de6dfce3e52f5cfe9
|
refs/heads/master
| 2022-11-05T19:01:27.152507
| 2019-07-02T09:57:44
| 2019-07-02T09:57:44
| 106,514,195
| 0
| 0
| null | 2022-10-05T19:09:17
| 2017-10-11T06:27:26
|
Java
|
UTF-8
|
Java
| false
| false
| 651
|
java
|
package com.sun.corba.se.spi.activation;
/**
* com/sun/corba/se/spi/activation/NoSuchEndPoint.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u141/9370/corba/src/share/classes/com/sun/corba/se/spi/activation/activation.idl
* Wednesday, July 12, 2017 4:36:58 AM PDT
*/
public final class NoSuchEndPoint extends org.omg.CORBA.UserException
{
public NoSuchEndPoint ()
{
super(NoSuchEndPointHelper.id());
} // ctor
public NoSuchEndPoint (String $reason)
{
super(NoSuchEndPointHelper.id() + " " + $reason);
} // ctor
} // class NoSuchEndPoint
|
[
"15312408287@163.com"
] |
15312408287@163.com
|
2b21ea5ec2ec3c8a259ba29dc2341b91403e68ad
|
8294bbedd27c50a99bae00eccc83a87ac9232875
|
/lib_video/src/main/java/com/imooc/lib_video/videoplayer/CustomJzVideoView.java
|
f80069e05a9ea828eab7867d2835fca8de961ed7
|
[] |
no_license
|
99kyuu/NeteaseCloudMusic-MVVM
|
c3ff6a40a73422b268763793905962951dd51897
|
a6c1b07ff283e3977b5b23eb7655168b85bbba7c
|
refs/heads/master
| 2022-12-03T16:54:02.497873
| 2020-08-24T02:39:44
| 2020-08-24T02:39:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 852
|
java
|
package com.imooc.lib_video.videoplayer;
import android.content.Context;
import android.util.AttributeSet;
import cn.jzvd.JzvdStd;
public class CustomJzVideoView extends JzvdStd {
public CustomJzVideoView(Context context) {
super(context);
}
public CustomJzVideoView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public void onStatePlaying() {
super.onStatePlaying();
if (listener != null) {
listener.onStatePlaying();
}
}
@Override
public void onStatePause() {
super.onStatePause();
if (listener != null) {
listener.onStatePause();
}
}
public OnVideoStateChangeListener listener;
public void setListener(OnVideoStateChangeListener listener) {
this.listener = listener;
}
public interface OnVideoStateChangeListener {
void onStatePlaying();
void onStatePause();
}
}
|
[
"1025618933@qq,com"
] |
1025618933@qq,com
|
c1cb261596fedc206880b4f1c2746fdba47605fe
|
34182a13cd6291fc4657546e196c6447553b5eb0
|
/spring/spring-1/src/main/java/com/xubh/spring/annotation/generic/UserService.java
|
2da6464474c21bf071dfb352d476719346eb45d4
|
[] |
no_license
|
786991884/sxnd-study
|
9bf3d417879680f94b012867ef71ba880a19e4fc
|
8c1f8e8823c077f095dc4be0c89522b6f0eb1457
|
refs/heads/master
| 2021-01-12T08:49:59.493518
| 2018-04-03T09:17:54
| 2018-04-03T09:17:54
| 76,701,131
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 243
|
java
|
package com.xubh.spring.annotation.generic;
import org.springframework.stereotype.Service;
//若注解没有指定 bean 的 id, 则类名第一个字母小写即为 bean 的 id
@Service
public class UserService extends BaseService<User>{
}
|
[
"786991884@qq.com"
] |
786991884@qq.com
|
43298945f2fcd775a13999fafe6ba2eaa3284059
|
c19031587773aa2788d595b77560280f5e975133
|
/JavaSource/ar/com/cognisys/sat/bean/privado/perfil/BajaUsuarioBean.java
|
3840bbe04e563da0991c19c710d68b30a7711e63
|
[] |
no_license
|
desarrollorusoft/SAT
|
0eeac664c09a600bb2b530efc047d5b1e89fabaa
|
a4f65840450221fb632d07387c01361cd2bd18ab
|
refs/heads/master
| 2023-02-11T04:02:59.807706
| 2021-01-07T17:55:42
| 2021-01-07T17:55:42
| 327,686,097
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,362
|
java
|
package ar.com.cognisys.sat.bean.privado.perfil;
import ar.com.cognisys.common.exception.ExcepcionControladaError;
import ar.com.cognisys.common.jsfbean.abstracto.SeccionBean;
import ar.com.cognisys.generico.modelo.comun.AsistenteObjeto;
import ar.com.cognisys.sat.bean.SesionBean;
import ar.com.cognisys.sat.bean.asistente.AsistentePerfil;
import ar.com.cognisys.sat.core.modelo.comun.usuarioSat.Usuario;
import ar.com.cognisys.sat.core.modelo.excepcion.ExcepcionControladaAlerta;
import ar.com.cognisys.sat.core.modelo.validador.ValidadorContribuyente;
import ar.com.cognisys.sat.excepcion.Mensaje;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
@ManagedBean(name = "BajaUsuario")
@ViewScoped
public class BajaUsuarioBean extends SeccionBean {
private static final long serialVersionUID = -2802679879346620864L;
private boolean rs;
@Override
protected void inicializacion() {
this.refrescar();
}
@Override
public void cargar() throws ExcepcionControladaError {}
@Override
public void cargar(Object arg0) throws ExcepcionControladaError {}
@Override
public void siguiente() throws ExcepcionControladaError {}
@Override
public void refrescar() {
this.setRs( SesionBean.getUsuarioLogueado().tieneComercio() );
}
public boolean isRs() {
return rs;
}
public void setRs(boolean rs) {
this.rs = rs;
}
}
|
[
"carlos_bocchio@rusoft.com.ar"
] |
carlos_bocchio@rusoft.com.ar
|
7f84371cd652f154b3be47124e7841fd4ac2a9b6
|
5296f4116459130f9c878d967a844bdcc59482bf
|
/src/main/java/com/nice/multipleInheritance/Father.java
|
49ecca3b535add96aff845bf34446dd8c0c6a3ff
|
[] |
no_license
|
Jeka1978/Java-8-nice
|
c79075989774872ae8e89d921b1e7948a3f4c8d1
|
c03bcd2cc0b0202cc58393b06ccd4aea609237c2
|
refs/heads/master
| 2021-01-11T09:58:12.197374
| 2017-02-07T19:15:41
| 2017-02-07T19:15:41
| 81,244,438
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 215
|
java
|
package com.nice.multipleInheritance;
/**
* Created by Evegeny on 07/02/2017.
*/
public interface Father {
double PI = 3.14;
default void talk(){
System.out.println("come to me now!!!!!");
}
}
|
[
"papakita2009"
] |
papakita2009
|
55c943adef3d536d04b3d7d6bdc08da66327c279
|
213240d7f7877a70ee8389452b0650d1d35cfa5e
|
/src/Programmers/올바른괄호.java
|
957ef743febba652bdc0fb98f3ad964384d0f8fa
|
[] |
no_license
|
Joonsik-Choi/CodingTest
|
23e8a00e27eff8e7b7e206a9bc2f16286839c99a
|
80cd3fbfa7ac9930ddd42ca0aa4f0f5c9a7e44a3
|
refs/heads/master
| 2023-02-22T05:54:09.661994
| 2021-01-27T03:56:46
| 2021-01-27T03:56:46
| 293,209,203
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 769
|
java
|
package Programmers;
import java.util.Stack;
public class 올바른괄호 {
public static void main(String[] args) {
System.out.println(solution("(())"));
}
static boolean solution(String s) {
boolean answer = true;
Stack<Character> stack=new Stack<>();
for (int i = 0; i <s.length() ; i++) {
char c=s.charAt(i);
if(c=='('){
stack.push(c);
continue;
}
else if(c==')' && !stack.empty() && stack.peek()=='('){
stack.pop();
continue;
}
else{
answer=false;
break;
}
}
if(!stack.empty())answer=false;
return answer;
}
}
|
[
"ryan0@kakao.com"
] |
ryan0@kakao.com
|
60538f17afad49e41be7c91749075928e6190955
|
bfd7995c494bd8a7f9307d82297d2f70f1104173
|
/app/src/main/java/com/james/compass/views/CustomImageView.java
|
066e874b058b55e86fa010e63749daf86851988a
|
[] |
no_license
|
MaTriXy/Compass
|
2db7fda6745c61f7f8e60e8a737ad85bc63dbecf
|
e86f1cd6ff46c3f07204b6753434ae502cd4cb16
|
refs/heads/master
| 2023-08-10T09:46:03.492818
| 2016-06-21T21:34:58
| 2016-06-21T21:34:58
| 74,939,377
| 0
| 0
| null | 2023-08-01T04:56:20
| 2016-11-28T05:11:49
|
Java
|
UTF-8
|
Java
| false
| false
| 3,148
|
java
|
package com.james.compass.views;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.media.ThumbnailUtils;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.AppCompatImageView;
import android.util.AttributeSet;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import com.james.compass.utils.StaticUtils;
public class CustomImageView extends AppCompatImageView {
public CustomImageView(Context context) {
super(context);
}
public CustomImageView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public CustomImageView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
public void transition(final Activity activity, final Bitmap second) {
if (second == null || second.getWidth() < 1 || second.getHeight() < 1) return;
if (activity == null) {
setImageBitmap(second);
return;
}
final int size = Math.min(getMeasuredWidth(), getMeasuredHeight());
new Thread() {
@Override
public void run() {
final Bitmap image;
try {
image = ThumbnailUtils.extractThumbnail(second, size, size);
} catch (OutOfMemoryError e) {
e.printStackTrace();
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
setImageBitmap(second);
}
});
return;
}
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
Animation exitAnim = AnimationUtils.loadAnimation(getContext(), android.R.anim.fade_out);
exitAnim.setDuration(150);
exitAnim.setAnimationListener(new Animation.AnimationListener() {
@Override public void onAnimationStart(Animation animation) {
}
@Override public void onAnimationRepeat(Animation animation) {
}
@Override public void onAnimationEnd(Animation animation) {
setImageBitmap(image);
Animation enterAnim = AnimationUtils.loadAnimation(getContext(), android.R.anim.fade_in);
enterAnim.setDuration(150);
startAnimation(enterAnim);
}
});
startAnimation(exitAnim);
}
});
}
}.start();
}
public void transition(Activity activity, Drawable second) {
transition(activity, StaticUtils.drawableToBitmap(second));
}
}
|
[
"18jafenn90@gmail.com"
] |
18jafenn90@gmail.com
|
c4564f900f27ae3fc2d94f68baf798fbcf81ca3a
|
f430ca7a5a96578100cf01bfcbf5fea47eae5d8b
|
/store/store/src/com/itheima/web/servlet/CartServlet.java
|
70a5123d617f02101890714e94172de53a358fdb
|
[] |
no_license
|
LXC19980829/JavaProject
|
6ef8658617f689bb601982ff810368298a200ac4
|
eab86192ed127619c8a6bad08fcaf819e35aeb6d
|
refs/heads/master
| 2022-10-09T07:42:12.488554
| 2020-02-16T09:51:19
| 2020-02-16T09:51:19
| 271,562,204
| 1
| 0
| null | 2020-06-11T14:05:44
| 2020-06-11T14:05:43
| null |
UTF-8
|
Java
| false
| false
| 2,553
|
java
|
package com.itheima.web.servlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.itheima.domain.Cart;
import com.itheima.domain.CartItem;
import com.itheima.domain.Product;
import com.itheima.service.ProductService;
import com.itheima.utils.BeanFactory;
/**
* 购物车的servlet
*/
public class CartServlet extends BaseServlet {
private static final long serialVersionUID = 1L;
/**
* 从session中获取购物车对象
* @param request
* @return
*/
public Cart getCart(HttpServletRequest request) {
Cart cart = (Cart) request.getSession().getAttribute("cart");
if (cart == null) { //第一次获取
cart = new Cart();
request.getSession().setAttribute("cart", cart);
}
return cart;
}
/**
* 商品添加到购物车
* @param request
* @param response
* @return
* @throws Exception
*/
public String add(HttpServletRequest request, HttpServletResponse response) throws Exception {
//1.获取商品id和购买数量
String pid = request.getParameter("pid");
int count = Integer.parseInt(request.getParameter("count"));
//2.调用productservice查询商品
ProductService service = (ProductService) BeanFactory.getBean("ProductService");
Product product = service.getById(pid);
//3.创建购物车项对象和获取购物车对象
CartItem item = new CartItem(product, count);
Cart cart = getCart(request);
//4.购物车项添加到购物车
cart.add2Cart(item);
//5.重定向
response.sendRedirect(request.getContextPath()+"/jsp/cart.jsp");
return null;
}
/**
* 删除指定购物车项
* @param request
* @param response
* @return
* @throws Exception
*/
public String remove(HttpServletRequest request, HttpServletResponse response) throws Exception {
//1.获取商品id
String pid = request.getParameter("pid");
//2.获取购物车
Cart cart = getCart(request);
//3.从购物车中移除该商品
if (pid != null && cart != null) {
cart.removeFromCart(pid);
}
//4.重定向回到cart.jsp页面
response.sendRedirect(request.getContextPath()+"/jsp/cart.jsp");
return null;
}
/**
* 清空购物车
* @param request
* @param response
* @return
* @throws Exception
*/
public String clear(HttpServletRequest request, HttpServletResponse response) throws Exception {
//1.清空
getCart(request).clearCart();
//4.重定向回到cart.jsp页面
response.sendRedirect(request.getContextPath()+"/jsp/cart.jsp");
return null;
}
}
|
[
"799108252@qq.com"
] |
799108252@qq.com
|
feedbf9c3e8d5b7d3771572d83218ff668dcc48b
|
48304c1ae3f5fa2c235a851979be6e6a77b7e7b8
|
/day19/src/cn/com/mryhl/demo04_factory/CarFactory.java
|
4475cb633c2313a3a5cdfd17501b7567486fe325
|
[] |
no_license
|
mr-yhl/javajybc
|
e5647e093765a4d0893f1f34059baa38b8b8bbaa
|
bc22c226b901817d6a535328d8a598871bddf5c0
|
refs/heads/master
| 2023-01-03T18:21:53.509449
| 2020-10-24T03:28:07
| 2020-10-24T03:28:07
| 284,627,147
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 539
|
java
|
package cn.com.mryhl.demo04_factory;
/*
用来生产小汽车的工厂
*/
public class CarFactory {
/*
定义方法,用来获取小汽车
*/
public static Car getCar(String carName) {
//判断如果carName是法拉利,就返回法拉利对象
if (carName.equals("法拉利")) {
return new FaLali();
} else if (carName.equals("奥拓")) {
return new AoTuo();
} else {
//其他的全部返回null值
return null;
}
}
}
|
[
"jyhlbx@outlook.com"
] |
jyhlbx@outlook.com
|
39c5fdaa01dcff41edb66ffeaf02da4d7ef9d52f
|
2b2fcb1902206ad0f207305b9268838504c3749b
|
/JWakfu/src/com/velocity/jwakfu/net/packets/out/Packet1024LoginResponse.java
|
fabbf303900d0621372868c42aef5970e986eb8f
|
[] |
no_license
|
shelsonjava/Synx
|
4fbcee964631f747efc9296477dee5a22826791a
|
0cb26d5473ba1f36a3ea1d7163a5b9e6ebcb0b1d
|
refs/heads/master
| 2021-01-15T13:51:41.816571
| 2013-11-17T10:46:22
| 2013-11-17T10:46:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,708
|
java
|
package com.velocity.jwakfu.net.packets.out;
import com.velocity.jwakfu.io.OutPacket;
import com.velocity.jwakfu.net.packets.OutgoingPacket;
import com.velocity.jwakfu.net.packets.out.enums.LoginResponseCode;
import com.velocity.jwakfu.util.DataUtils;
public class Packet1024LoginResponse implements OutgoingPacket {
private static final int PACKET_ID = 1024;
private LoginResponseCode responseCode;
private long charId;
private long expirationDate;
private boolean isAdmin;
private String characterName;
public Packet1024LoginResponse(LoginResponseCode responseCode) {
this.responseCode = responseCode;
}
public Packet1024LoginResponse(String characterName, long charId, long expirationDate, boolean isAdmin) {
this.responseCode = LoginResponseCode.CORRECT_LOGIN;
this.characterName = characterName;
this.charId = charId;
this.expirationDate = expirationDate;
this.isAdmin = isAdmin;
}
@Override
public OutPacket encode() {
OutPacket buffer = new OutPacket(PACKET_ID);
buffer.writeByte(responseCode.getCode());
if (responseCode == LoginResponseCode.CORRECT_LOGIN) {
//header
buffer.writeShort(50); //Size
buffer.writeByte(1); //block count
//body
{
buffer.writeByte(0); //Block id
buffer.writeInt(6); //Block offset
buffer.writeByte(0); //Ignored byte
buffer.writeLong(charId);
buffer.writeByte(0);
buffer.writeLong(expirationDate);
buffer.writeInt(isAdmin ? 1 : 0);
DataUtils.writeString(buffer.getData(), characterName);
DataUtils.writeString(buffer.getData(), "??");
buffer.writeShort(0); //Has to do with additional data. See packet dissection of #1024.
}
}
return buffer;
}
}
|
[
"music_inme@hotmail.fr"
] |
music_inme@hotmail.fr
|
e751455dd52301d430104f3ef06f760560b10111
|
f7f49edc0c6d8fdb0c753862035b7f945d92e135
|
/bitcamp-java-application/v08/src/main/java/com/eomcs/lms/App.java
|
a4ef16bc386da2afaf091210e8857bac343bf872
|
[] |
no_license
|
madridista18/bitcamp-java-20190527
|
6a38a8687432d54e3140d9876f08b86579260e77
|
8ae5ea7882114b452c16c98c0dd8fd41caf8e96c
|
refs/heads/master
| 2022-03-05T13:12:31.111267
| 2019-11-07T03:27:05
| 2019-11-07T03:27:05
| 194,775,341
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,745
|
java
|
// 애플리케이션 메인 클래스
// => 애플리케이션을 실행할 때 이 클래스를 실행한다.
package com.eomcs.lms;
import java.sql.Date;
import java.util.Scanner;
public class App {
static Scanner keyScan;
public static void main(String[] args) {
java.io.InputStream keyboard = System.in;
keyScan = new Scanner(keyboard);
Lesson[] lessons = new Lesson[100];
int lessonsSize = 0;
Member[] members = new Member[100];
int membersSize = 0;
Board[] boards = new Board[100];
int boardsSize = 0;
while (true) {
System.out.print("명령> ");
String command = keyScan.nextLine();
if (command.equals("quit")) {
break;
} else if (command.equals("/lesson/add")) {
// 수업 데이터를 저장할 메모리를 Lesson 설계도에 따라 만든다.
Lesson lesson = new Lesson();
// 사용자가 입력한 값을 Lesson 인스턴스의 각 변수에 저장한다.
lesson.no = getIntValue("번호? ");
lesson.title = getStringValue("수업명? ");
lesson.contents = getStringValue("설명? ");
lesson.startDate = getDateValue("시작일? ");
lesson.endDate = getDateValue("종료일? ");
lesson.totalHours = getIntValue("총 수업시간? ");
lesson.dayHours = getIntValue("일 수업시간? ");
// 수업 데이터를 저장하고 있는 인스턴스의 주소를 레퍼런스 배열에 저장한다.
lessons[lessonsSize++] = lesson;
System.out.println("저장하였습니다. ");
} else if (command.equals("/lesson/list")) {
for (int i = 0; i < lessonsSize; i++) {
// 레퍼런스 배열에서 한 개의 인스턴스 주소를 꺼낸다.
Lesson lesson = lessons[i];
// 그 인스턴스 주소로 찾아가서 인스턴스의 각 변수 값을 꺼내 출력한다.
System.out.printf("%s, %s, %s ~ %s, %s\n",
lesson.no, lesson.title, lesson.contents, lesson.startDate, lesson.endDate, lesson.totalHours);
// lessons[i2].no -> 배열로 바로 넣을수도 있지만 속도가 느리더라도
// 가독성이 좋고 좀 더 객체 지향적인 측면때문에 이 방법을 이용한다는 것을 알아야 한다.
// 초보는 속도에 신경쓰지 말아야한다.
}
} else if (command.equals("/member/add")) {
Member member = new Member();
member.no = getIntValue("번호? ");
member.name = getStringValue("이름? ");
member.email = getStringValue("이메일? ");
member.password = getStringValue("암호? ");
member.photo = getStringValue("사진? ");
member.phoneNumber = getStringValue("전화? ");
member.registeredDate = new Date(System.currentTimeMillis());
members[membersSize++] = member;
System.out.println("저장하였습니다. ");
} else if (command.equals("/member/list")) {
for (int i = 0; i < membersSize; i++) {
Member member = members[i];
System.out.printf("%s, %s, %s, %s, %s\n",
member.no, member.name, member.email, member.phoneNumber, member.registeredDate );
}
} else if (command.equals("/board/add")) {
Board board = new Board();
board.no = getIntValue("번호? ");
board.contents = getStringValue("내용? ");
board.createdDate = new Date(System.currentTimeMillis());
boards[boardsSize++] = board;
System.out.println("저장하였습니다. ");
} else if (command.equals("/board/list")) {
for (int i = 0; i < boardsSize; i++) {
Board board = boards[i];
System.out.printf("%s, %s, %s\n",
board.no, board.contents, board.createdDate);
}
} else {
System.out.println("해당 명령을 지원하지 않습니다. ");
}
System.out.println();
}
}
private static int getIntValue(String message) {
while (true) {
try {
System.out.print(message);
return Integer.parseInt(keyScan.nextLine());
} catch (NumberFormatException e) {
System.out.println("숫자를 입력하세요.");
}
}
}
// copy(복사) & paste(붙여넣기)
private static Date getDateValue(String message) {
while (true) {
try {
System.out.print(message);
return Date.valueOf(keyScan.nextLine());
} catch (IllegalArgumentException e) {
System.out.println("yyyy-MM-dd 형식으로 입력하세요.");
}
}
}
private static String getStringValue(String message) {
System.out.print(message);
return keyScan.nextLine();
}
}
|
[
"madridista18@naver.com"
] |
madridista18@naver.com
|
dbf51cacef5a59e83e0b9a2fc48fd10d2b83db67
|
417b0e3d2628a417047a7a70f28277471d90299f
|
/src/main/java/com/microsoft/bingads/internal/OperationStatusRetry.java
|
4935d07f51e890a3e7d1108228f3caf488360935
|
[
"MIT"
] |
permissive
|
jpatton14/BingAds-Java-SDK
|
30e330a5d950bf9def0c211ebc5ec677d8e5fb57
|
b928a53db1396b7e9c302d3eba3f3cc5ff7aa9de
|
refs/heads/master
| 2021-07-07T08:28:17.011387
| 2017-10-03T14:44:43
| 2017-10-03T14:44:43
| 105,914,216
| 0
| 0
| null | 2017-10-05T16:33:39
| 2017-10-05T16:33:39
| null |
UTF-8
|
Java
| false
| false
| 2,460
|
java
|
package com.microsoft.bingads.internal;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import com.microsoft.bingads.AsyncCallback;
import com.microsoft.bingads.ServiceClient;
import com.microsoft.bingads.internal.functionalinterfaces.Consumer;
import com.microsoft.bingads.internal.functionalinterfaces.TriConsumer;
public class OperationStatusRetry<TOperationStatus, TOperationStatusProvider, TService> {
private final int INTERVAL_OF_RETRY = 1000; // TimeUnit Milliseconds
public void executeWithRetry(
final TriConsumer<TOperationStatusProvider, ServiceClient<TService>, AsyncCallback<TOperationStatus>> action,
final TOperationStatusProvider statusProvider, final ServiceClient<TService> serviceClient,
final Consumer<TOperationStatus> statusConsumer, final Consumer<Exception> exceptionConsumer,
final int maxRetryCount) {
action.accept(statusProvider, serviceClient, new AsyncCallback<TOperationStatus>() {
@Override
public void onCompleted(Future<TOperationStatus> result) {
try {
statusConsumer.accept(result.get());
} catch (InterruptedException exception) {
if (maxRetryCount > 0) {
retry(action, statusProvider, serviceClient, statusConsumer,exceptionConsumer, maxRetryCount - 1);
} else {
exceptionConsumer.accept(exception);
}
} catch (ExecutionException exception) {
if (maxRetryCount > 0) {
retry(action, statusProvider, serviceClient, statusConsumer,exceptionConsumer, maxRetryCount - 1);
} else {
exceptionConsumer.accept(exception);
}
}
}
});
}
private void retry(final TriConsumer<TOperationStatusProvider, ServiceClient<TService>, AsyncCallback<TOperationStatus>> action,
final TOperationStatusProvider statusProvider, final ServiceClient<TService> serviceClient,
final Consumer<TOperationStatus> statusConsumer, final Consumer<Exception> exceptionConsumer,
final int maxRetryCount) {
ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
executor.schedule(new Runnable() {
@Override
public void run() {
executeWithRetry(action, statusProvider, serviceClient, statusConsumer,
exceptionConsumer, maxRetryCount - 1);
}
}, INTERVAL_OF_RETRY, TimeUnit.MILLISECONDS);
}
}
|
[
"jiaj@microsoft.com"
] |
jiaj@microsoft.com
|
7e2598b20cd55ad19f1b4040ee43f1554c993a81
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/kylin/learning/756/ExternalAclProvider.java
|
20f16833a13a7faaa6501a8519943253dc6e9f0d
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,585
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.kylin.rest.security;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.apache.kylin.common.KylinConfig;
import org.apache.kylin.common.util.ClassUtil;
import org.apache.kylin.common.util.Pair;
import org.springframework.security.acls.model.Permission;
/**
*/
abstract public class ExternalAclProvider {
private volatile static ExternalAclProvider singleton = null;
public static ExternalAclProvider getInstance() {
if (singleton == null) {
synchronized (ExternalAclProvider.class) {
if (singleton == null) {
String cls = KylinConfig.getInstanceFromEnv().getExternalAclProvider();
if (!StringUtils.isBlank(cls)) {
singleton = (ExternalAclProvider) ClassUtil.newInstance(cls);
singleton.init();
}
}
}
}
return singleton;
}
// ============================================================================
public final static String ADMINISTRATION = "ADMIN";
public final static String MANAGEMENT = "MANAGEMENT";
public final static String OPERATION = "OPERATION";
public final static String READ = "QUERY";
// used by ranger ExternalAclProvider
public static String transformPermission(Permission p) {
String permString = null;
if (AclPermission.ADMINISTRATION.equals(p)) {
permString = ADMINISTRATION;
} else if (AclPermission.MANAGEMENT.equals(p)) {
permString = MANAGEMENT;
} else if (AclPermission.OPERATION.equals(p)) {
permString = OPERATION;
} else if (AclPermission.READ.equals(p)) {
permString = READ;
} else {
permString = p.getPattern();
}
return permString;
}
// ============================================================================
abstract public void init();
/**
* Checks if a user has permission on an entity.
*
* @param user
* @param userRoles
* @param entityType String constants defined in AclEntityType
* @param entityUuid
* @param permission
*
* @return true if has permission
*/
abstract public boolean checkPermission(String user, List<String> userRoles, //
String entityType, String entityUuid, Permission permission);
/**
* Returns all granted permissions on specified entity.
*
* @param entityType String constants defined in AclEntityType
* @param entityUuid
* @return a list of (user/role, permission)
*/
abstract public List<Pair <String, AclPermission>> getAcl(String entityType, String entityUuid);
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
c9dedb7c332a500e10b7ddef63277053690755a3
|
3d4349c88a96505992277c56311e73243130c290
|
/Preparation/processed-dataset/data-class_1_91/5.java
|
45d217d39c1b58ca428ddd8978b7fb4097960291
|
[] |
no_license
|
D-a-r-e-k/Code-Smells-Detection
|
5270233badf3fb8c2d6034ac4d780e9ce7a8276e
|
079a02e5037d909114613aedceba1d5dea81c65d
|
refs/heads/master
| 2020-05-20T00:03:08.191102
| 2019-05-15T11:51:51
| 2019-05-15T11:51:51
| 185,272,690
| 7
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 206
|
java
|
/**
* This method gets the object name of the object being observed.
*
* @return The ObjectName of the object being observed.
*/
public ObjectName getObservedObject() {
return observedObject;
}
|
[
"dariusb@unifysquare.com"
] |
dariusb@unifysquare.com
|
8f3eeda8e15d2b857a1249f48861707fd85994c4
|
755adf77ac6a04139351bedac3141ee227842e6f
|
/src/main/java/com/edu/game/dota/fight/service/effect/EffectKeys.java
|
5722d63e0bff5ad00de8242f39736920a10d642e
|
[] |
no_license
|
zuohuai/coreJava
|
e37b6873e4baeebe3ba6464a30bfaaef33c7af63
|
ca7ad299c141544d8b187100579a25a49c618a59
|
refs/heads/master
| 2021-01-17T13:39:56.335930
| 2017-07-20T06:55:54
| 2017-07-20T06:55:54
| 47,189,343
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 679
|
java
|
package com.eyu.snm.module.fight.service.effect;
/**
* 效果配置信息key
* @author shenlong
*/
public interface EffectKeys {
/** 判定时是否依赖之前是否命中 */
String RELAY = "relay";
/** BUFF配置的标识 */
String BUFF = "buff";
/** 属性变更 */
String ATTR = "alters";
/** 修正下一次行动时间 */
String UPDATETIME = "updateTime";
/** 打断类型 */
String BREAKTYPE = "breakType";
/** 命中目标数量 */
String TARGET_NUM = "targetNum";
/** 暴击目标数量 */
String CRIT_NUM = "critNum";
/** 指定位置 */
String POSITION = "position";
/** 公式ID */
String FORMULA_ID = "formulaId";
}
|
[
"zuo_huai@163.com"
] |
zuo_huai@163.com
|
3a94cbff10fd31056d31239cc950db1230266801
|
7a58d2f7d7c32c75d692785b22a9fca7ae03890d
|
/src/main/java/org/bian/dto/CRBrandManagementPlanUpdateInputModelBrandManagementPlanInstanceRecord.java
|
5d125ac254ebf5a2b085c4d18b50108c33aac7b5
|
[
"Apache-2.0"
] |
permissive
|
bianapis/sd-brand-management-v2
|
87fb63d1a1f2c48a7a34b1ad439b17e61043233b
|
fc02a9acfb31e1a87b83e72a78359da580e2fc4c
|
refs/heads/master
| 2020-07-24T02:57:36.917914
| 2019-09-12T04:21:44
| 2019-09-12T04:21:44
| 207,781,393
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,513
|
java
|
package org.bian.dto;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.Valid;
/**
* CRBrandManagementPlanUpdateInputModelBrandManagementPlanInstanceRecord
*/
public class CRBrandManagementPlanUpdateInputModelBrandManagementPlanInstanceRecord {
private String brandDefinition = null;
private String brandValueAssessment = null;
private String brandUsage = null;
private String brandDevelopmentSchedule = null;
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: Definition of the brand, including how it is to be represented in different media and contexts
* @return brandDefinition
**/
public String getBrandDefinition() {
return brandDefinition;
}
public void setBrandDefinition(String brandDefinition) {
this.brandDefinition = brandDefinition;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: An analysis of the brand value based on comparative market research
* @return brandValueAssessment
**/
public String getBrandValueAssessment() {
return brandValueAssessment;
}
public void setBrandValueAssessment(String brandValueAssessment) {
this.brandValueAssessment = brandValueAssessment;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: An inventory of situations where the brand is incorporated or exposed in business development activity - these situations may require on-going exposure monitoring or assessment
* @return brandUsage
**/
public String getBrandUsage() {
return brandUsage;
}
public void setBrandUsage(String brandUsage) {
this.brandUsage = brandUsage;
}
/**
* `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: Schedule of any brand development related activities, includes usage and exposure tracking and impact analysis activities
* @return brandDevelopmentSchedule
**/
public String getBrandDevelopmentSchedule() {
return brandDevelopmentSchedule;
}
public void setBrandDevelopmentSchedule(String brandDevelopmentSchedule) {
this.brandDevelopmentSchedule = brandDevelopmentSchedule;
}
}
|
[
"team1@bian.org"
] |
team1@bian.org
|
0383433eed7464be9e092548da7499444311677c
|
4468800dd72174adada7c612b4343b9be4898a6d
|
/web01/src/step12/Servlet04.java
|
14e7dd130caa216a2ee7fd5169af3a639dc00659
|
[] |
no_license
|
sharryhong/java93-hs
|
be793ea5d1e692c62939b001eba9d7a314f42be1
|
ec73dbe0669d26073ec0fd7e7db99548c466cee9
|
refs/heads/master
| 2021-01-23T04:34:06.551942
| 2017-06-23T09:13:33
| 2017-06-23T09:13:33
| 86,209,572
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,388
|
java
|
package step12;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URLEncoder;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/* 쿠키 보내기 4
* => 한글 보내기
*
*/
@WebServlet("/step12/Servlet04")
public class Servlet04 extends HttpServlet {
private static final long serialVersionUID = 1L;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
// 웹서버 중에서 쿠키 값을 유니코드로 그대로 내보내는 서버는 다음과 같이 평소방법으로 설정하면 된다.
// Cookie cookie = new Cookie("c4", "ABC가각간");
// 만약 웹서버가 한글을 포함한 문자열을 내보내는 서버가 아니라면 다음과 같이 개발자가 url인코딩을 수행해야 한다.
Cookie cookie = new Cookie("c4", URLEncoder.encode("ABC가각간", "UTF-8")); // URLEncoder : ASCII 코드화 한다.
cookie.setPath(req.getContextPath());
resp.addCookie(cookie);
resp.setContentType("text/plain;charset=UTF-8");
PrintWriter out = resp.getWriter();
out.println("Servlet04: 쿠키 보냈음");
}
}
|
[
"kshopzoa15@gmail.com"
] |
kshopzoa15@gmail.com
|
9b45bdc0e521ab59571b3a407bd002076c085e65
|
b2041ed2001f1db327e3991cd77575b12cb7372a
|
/DLPort/src/main/java/com/DLPort/OurActivity/InviterActivity.java
|
10d528cfa5561fd60d4bdff86e17eb84ff075588
|
[] |
no_license
|
LFengYe/WorkProject_v3.3
|
4de58fc49c24a53b8be0c77f01669ebb86651c8f
|
59cc45cc07d2477957ba0cc124f00e5ea1217df7
|
refs/heads/master
| 2021-01-19T18:35:51.562958
| 2017-08-01T07:15:26
| 2017-08-01T07:15:28
| 88,365,855
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,384
|
java
|
package com.DLPort.OurActivity;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
import com.DLPort.R;
import com.DLPort.app.Constant;
import com.DLPort.myactivity.BaseActivity;
import com.DLPort.mytool.GlobalParams;
import com.DLPort.mytool.MyHandler;
import com.DLPort.mytool.MyThread;
import com.DLPort.mytool.MyToast;
import com.DLPort.myview.TitleView;
import org.json.JSONException;
import org.json.JSONObject;
/**
* Created by fuyzh on 16/5/18.
* 邀请活动
*/
public class InviterActivity extends BaseActivity {
private static final String TAG = "InviterActivity";
private TextView inviterContent;
private Handler handler = new MyHandler(this) {
@Override
public void handleMessage(Message msg) {
super.handleMessage(msg);
if (msg.what == 1) {
try {
JSONObject jsonUser = null;
jsonUser = new JSONObject((String) msg.obj);
Log.d(TAG, "响应数据:" + jsonUser.toString());
int status = jsonUser.getInt("Status");
if (0 == status) {
progressData(jsonUser.getString("Data"));
}else if(1 == status||-1==status) {
MyToast.makeText(InviterActivity.this, jsonUser.getString("Message"));
}
} catch (JSONException e) {
Log.d(TAG, "异常——————————————————————————————");
e.printStackTrace();
}
}else if (msg.what == 2){
Log.i(TAG, "响应不正常");
MyToast.makeText(InviterActivity.this, "服务器异常");
}else if (msg.what == 3) {
// 编码异常
Log.i(TAG, "编码异常");
} else if (msg.what == 4) {
// ClientProtocolException
Log.i(TAG, "ClientProtocolException");
} else if (msg.what == 5) {
// IO异常
Log.i(TAG, "IO异常");
MyToast.makeText(InviterActivity.this, "服务器连接异常");
}
}
private void progressData(String jsonData) {
try {
JSONObject object = new JSONObject(jsonData);
inviterContent.setText(object.getString("InviterContent"));
} catch (JSONException e) {
e.printStackTrace();
}
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_inviter);
initTitle();
initView();
getInviterContent();
}
private void initTitle() {
TitleView titleView = (TitleView) findViewById(R.id.inviter_title);
titleView.setLeftViewVisible(true);
titleView.setMiddleTextVisible(true);
titleView.setWineText(R.string.My);
titleView.setMiddleText(R.string.inviter);
View view = findViewById(R.id.title_back);
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
}
private void initView() {
inviterContent = (TextView) findViewById(R.id.inviter_content);
}
private void getInviterContent() {
SharedPreferences sp = null;
Bundle bundle = getIntent().getExtras();
int type = bundle.getInt("Type");
if (type == 0)
sp = getSharedPreferences("user", Context.MODE_PRIVATE);
if (type == 1)
sp = getSharedPreferences("huo", Context.MODE_PRIVATE);
if (GlobalParams.isNetworkAvailable(InviterActivity.this)) {
if (null != sp)
// new MyThread(Constant.URL_UserPostinviter, handler, null, sp.getString("Token", null)).start();
new MyThread(Constant.URL_UserPostinviter, handler, null, InviterActivity.this).start();
} else {
MyToast.makeText(InviterActivity.this, "亲,网络未连接");
}
}
}
|
[
"xiaofengcanyue2009@163.com"
] |
xiaofengcanyue2009@163.com
|
1647d66087aef470c9234bcdd3b5125ce002d604
|
9f158052abbcf81796bee6f54121e0fe7b8c4063
|
/src/main/java/org/docksidestage/sqlserver/dbflute/cbean/cq/WhiteDelimiterCQ.java
|
46dde82b8a8e58d403260c4145adba37b34b8036
|
[
"Apache-2.0"
] |
permissive
|
dbflute-test/dbflute-test-dbms-sqlserver
|
1ac021bf3d22f8759145f025472b1ff2ddf5aa23
|
59e3f480f4467956158ccea1d625bfc51c1c2b65
|
refs/heads/master
| 2022-05-26T17:03:16.876568
| 2022-05-15T09:49:58
| 2022-05-15T09:49:58
| 26,388,818
| 0
| 0
| null | 2015-09-08T06:15:56
| 2014-11-09T07:29:30
|
Java
|
UTF-8
|
Java
| false
| false
| 1,744
|
java
|
package org.docksidestage.sqlserver.dbflute.cbean.cq;
import org.dbflute.cbean.ConditionQuery;
import org.dbflute.cbean.sqlclause.SqlClause;
import org.docksidestage.sqlserver.dbflute.cbean.cq.bs.BsWhiteDelimiterCQ;
/**
* The condition-query of WHITE_DELIMITER.
* <p>
* You can implement your original methods here.
* This class remains when re-generating.
* </p>
* @author DBFlute(AutoGenerator)
*/
public class WhiteDelimiterCQ extends BsWhiteDelimiterCQ {
// ===================================================================================
// Constructor
// ===========
// You should NOT touch with this constructor.
/**
* Constructor.
* @param referrerQuery The instance of referrer query. (Nullable: If null, this is base query)
* @param sqlClause The instance of SQL clause. (NotNull)
* @param aliasName The alias name for this query. (NotNull)
* @param nestLevel The nest level of this query. (If zero, this is base query)
*/
public WhiteDelimiterCQ(ConditionQuery referrerQuery, SqlClause sqlClause, String aliasName, int nestLevel) {
super(referrerQuery, sqlClause, aliasName, nestLevel);
}
// ===================================================================================
// Arrange Query
// =============
// You can make your arranged query methods here.
//public void arrangeXxx() {
// ...
//}
}
|
[
"dbflute@gmail.com"
] |
dbflute@gmail.com
|
aa144b08472804a3590b3efde4e9debc75b0f9fa
|
0ea271177f5c42920ac53cd7f01f053dba5c14e4
|
/5.5.0/sources/com/google/android/gms/common/api/internal/zzq.java
|
c951f6c51d9eaec687f81dda65851d4de6dc74f3
|
[] |
no_license
|
alireza-ebrahimi/telegram-talaeii
|
367a81a77f9bc447e729b2ca339f9512a4c2860e
|
68a67e6f104ab8a0888e63c605e8bbad12c4a20e
|
refs/heads/master
| 2020-03-21T13:44:29.008002
| 2018-12-09T10:30:29
| 2018-12-09T10:30:29
| 138,622,926
| 12
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 358
|
java
|
package com.google.android.gms.common.api.internal;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.Api;
import com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks;
public interface zzq extends ConnectionCallbacks {
void zza(ConnectionResult connectionResult, Api<?> api, boolean z);
}
|
[
"alireza.ebrahimi2006@gmail.com"
] |
alireza.ebrahimi2006@gmail.com
|
31a2b939b7cfd9b34380478f74a1fef3d22131ad
|
947e71b34d21f3c9f5c0a197d91a880f346afa6c
|
/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ArtifactEntity.java
|
542017889e2ca00e557827c55c1ce497842b1776
|
[
"MIT",
"Apache-2.0",
"GPL-1.0-or-later",
"GPL-2.0-or-later",
"OFL-1.1",
"MS-PL",
"AFL-2.1",
"GPL-2.0-only",
"Python-2.0",
"BSD-2-Clause",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown"
] |
permissive
|
liuwenru/Apache-Ambari-ZH
|
4bc432d4ea7087bb353a6dd97ffda0a85cb0fef0
|
7879810067f1981209b658ceb675ac76e951b07b
|
refs/heads/master
| 2023-01-14T14:43:06.639598
| 2020-07-28T12:06:25
| 2020-07-28T12:06:25
| 223,551,095
| 38
| 44
|
Apache-2.0
| 2023-01-02T21:55:10
| 2019-11-23T07:43:49
|
Java
|
UTF-8
|
Java
| false
| false
| 4,140
|
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.ambari.server.orm.entities;
import java.util.Collections;
import java.util.Map;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
import com.google.gson.Gson;
/**
* Entity representing an Artifact.
*/
@IdClass(ArtifactEntityPK.class)
@Table(name = "artifact")
@NamedQueries({
@NamedQuery(name = "artifactByNameAndForeignKeys",
query = "SELECT artifact FROM ArtifactEntity artifact " +
"WHERE artifact.artifactName=:artifactName AND artifact.foreignKeys=:foreignKeys"),
@NamedQuery(name = "artifactByName",
query = "SELECT artifact FROM ArtifactEntity artifact " +
"WHERE artifact.artifactName=:artifactName"),
@NamedQuery(name = "artifactByForeignKeys",
query = "SELECT artifact FROM ArtifactEntity artifact " +
"WHERE artifact.foreignKeys=:foreignKeys")
})
@Entity
public class ArtifactEntity {
@Id
@Column(name = "artifact_name", nullable = false, insertable = true, updatable = false, unique = true)
private String artifactName;
@Id
@Column(name = "foreign_keys", nullable = false, insertable = true, updatable = false)
@Basic
private String foreignKeys;
@Column(name = "artifact_data", nullable = false, insertable = true, updatable = true)
@Basic
private String artifactData;
@Transient
private static final Gson jsonSerializer = new Gson();
/**
* Get the artifact name.
*
* @return artifact name
*/
public String getArtifactName() {
return artifactName;
}
/**
* Set the artifact name.
*
* @param artifactName the artifact name
*/
public void setArtifactName(String artifactName) {
this.artifactName = artifactName;
}
/**
* Set the artifact data by specifying a map that is then
* converted to a json string.
*
* @param artifactData artifact data map
*/
public void setArtifactData(Map<String, Object> artifactData) {
this.artifactData = jsonSerializer.toJson(artifactData);
}
/**
* Get the artifact data as a map
*
* @return artifact data as a map
*/
public Map<String, Object> getArtifactData() {
return jsonSerializer.<Map<String, Object>>fromJson(
artifactData, Map.class);
}
/**
* Set the foreign keys.
*
* @param foreignKeys ordered map of foreign key property names to values
*/
public void setForeignKeys(Map<String, String> foreignKeys) {
this.foreignKeys = serializeForeignKeys(foreignKeys);
}
/**
* Get the foreign keys.
*
* @return foreign key map of property name to value
*/
public Map<String, String> getForeignKeys() {
return foreignKeys == null ?
Collections.emptyMap() :
jsonSerializer.<Map<String, String>>fromJson(foreignKeys, Map.class);
}
/**
* Serialize a map of foreign keys to a string.
*
* @param foreignKeys map of foreign keys to values
*
* @return string representation of the foreign keys map
*/
public static String serializeForeignKeys(Map<String, String> foreignKeys) {
return jsonSerializer.toJson(foreignKeys);
}
}
|
[
"ijarvis@sina.com"
] |
ijarvis@sina.com
|
8f49a8ef339fea6f0dd12d2df1dffe156c393d3d
|
e7b67e2d2f488aa8760c20df0dc7dbf68a43e84e
|
/src/com/tzmb2c/web/dao/impl/SpecialGoodsDaoImpl.java
|
dc577d36d2eb2b4fb0c2a98333c47ad632b7186e
|
[] |
no_license
|
1658544535/java
|
573f10b1a4f759444bd9382f5584a26ddc7f6833
|
e026335e89e3f2ae6c4143e48a0ea0f89870daa0
|
refs/heads/master
| 2021-01-11T06:37:55.119261
| 2017-02-08T03:13:12
| 2017-02-08T03:13:12
| 81,417,586
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,696
|
java
|
/*
* 文 件 名: SpecialGoodsDaoImpl.java
* 创 建 人: admin
* 创建时间: 2016-10-14
*/
package com.tzmb2c.web.dao.impl;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import com.tzmb2c.web.dao.SpecialGoodsDao;
import com.tzmb2c.web.pojo.SpecialGoodsPojo;
import com.tzmb2c.web.mapper.SpecialGoodsMapper;
/**
* SpecialGoods Dao层
*/
public class SpecialGoodsDaoImpl implements SpecialGoodsDao {
@Autowired
private SpecialGoodsMapper specialGoodsMapper;
public int add(SpecialGoodsPojo specialGoods) throws SQLException{
if(null == specialGoods){
return 0;
}
int rows = specialGoodsMapper.insert(specialGoods);
return rows;
}
public int update(SpecialGoodsPojo specialGoods) throws SQLException{
if(null == specialGoods){
return 0;
}
int rows = specialGoodsMapper.update(specialGoods);
return rows;
}
public int delete(Long id) throws SQLException{
if(null == id){
return 0;
}
int rows = specialGoodsMapper.deleteById(id);
return rows;
}
public SpecialGoodsPojo getById(Long id) throws SQLException{
if(null == id){
return null;
}
SpecialGoodsPojo specialGoods = specialGoodsMapper.getById(id);
return specialGoods;
}
public Integer countBy(Map<String, Object> params) throws SQLException{
Integer rows = specialGoodsMapper.countBy(params);
return rows;
}
public List<SpecialGoodsPojo> listPage(Map<String, Object> params) throws SQLException{
List<SpecialGoodsPojo> lists = specialGoodsMapper.listPage(params);
return lists;
}
}
|
[
"chenkaiyi@804ee1a8-b229-4ccc-8a08-c3058f68b53b"
] |
chenkaiyi@804ee1a8-b229-4ccc-8a08-c3058f68b53b
|
c6960d8f24441f8b7af5f506bcb5ce60ce6630f2
|
69914759ff0118b640498b393ddeb2d98e8504a5
|
/src/main/java/com/jfinal/plugin/ehcache/CacheName.java
|
ffc2f276cf47e09b029bc0aa945267f99efb3840
|
[
"Apache-2.0"
] |
permissive
|
jfinal/jfinal
|
56a79d23ba61816b87c3a10d42610f86a9bcc600
|
6b3da99a9721d99ea08b900f7c4311b48811c517
|
refs/heads/master
| 2023-09-03T13:05:36.456098
| 2023-08-02T02:32:35
| 2023-08-02T02:32:35
| 4,134,560
| 3,303
| 1,500
|
Apache-2.0
| 2023-09-04T06:58:42
| 2012-04-25T08:48:48
|
Java
|
UTF-8
|
Java
| false
| false
| 1,444
|
java
|
/**
* Copyright (c) 2011-2023, James Zhan 詹波 (jfinal@126.com).
*
* 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.jfinal.plugin.ehcache;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* CacheName can configure CacheInterceptor's cache name or EvictInterceptor's evict cache name.
* <p>
* The order of CacheInterceptor searching for CacheName annotation:<br>
* 1: Action method of current invocation<br>
* 2: Controller of the current invocation<br>
* CacheInterceptor will use the actionKey as the cache name If the CacheName annotation not found.
*/
@Inherited
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
public @interface CacheName {
String value();
}
|
[
"jfinal@126.com"
] |
jfinal@126.com
|
1f6dc14236aad64291ef7b4adce223040ba7ffc1
|
564749fa8e0996d3f76a2c2df8fb77962830e922
|
/tools/API/Tags/V2.0.2/api-maven-plugin/src/main/java/com/gome/test/api/GenRichHelperMojo.java
|
25fe982a7bc138d453753b28301d291e1f925229
|
[] |
no_license
|
wang-shun/automation
|
ab7fd40e42740b09f527c0a20e2a4a00e3d234f4
|
2e621b3a9f4890c03e63479357ec2b6e6015af21
|
refs/heads/master
| 2020-03-29T13:46:37.342288
| 2018-08-20T16:01:44
| 2018-08-20T16:01:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,919
|
java
|
package com.gome.test.api;
import com.gome.test.utils.Logger;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import java.io.*;
/**
* @Mojo(name = "api")
* @goal genRichHelper
*/
public class GenRichHelperMojo extends AbstractMojo {
/**
* Helper的父目录
*
* @parameter property="project.basedir"
*/
public File basedir;
/**
* @parameter property="settings.localRepository"
*/
public String localRepository;
/**
* @parameter property="clients"
*/
public String[] clients;
/**
* mvn api:genhelper -DclientJarGroupId=clientJarGroupId
*
* @parameter
*/
private String timeout;
public void execute() throws MojoExecutionException, MojoFailureException {
if (clients != null) {
for (String client : clients) {
String[] jars = client.split(";");
generate(jars[0], jars[1], jars[2]);
}
}
}
public void generate(String clientGroupId, String clientArtifactId, String clientVersion) throws MojoFailureException {
Logger.info("------------------------------------------------------------------------");
Logger.info(String.format("generat Helper :\nlocalRepository:%s\ngroupId:%s\nartifactId:%s\nversion:%s\nbasedir:%s",
localRepository, clientGroupId, clientArtifactId, clientVersion, basedir.getAbsolutePath()));
Logger.info("------------------------------------------------------------------------");
RicHelperGen gen = new RicHelperGen();
try {
gen.genTestProject(basedir, localRepository, clientGroupId, clientArtifactId, clientVersion, getLog());
} catch (Exception ex) {
throw new MojoFailureException("Exception: ", ex);
}
}
}
|
[
"greatmrliang@126.COM"
] |
greatmrliang@126.COM
|
dd2147aaa298e34132240387caf135cc2f925a4a
|
732bd2ab16d6b2fb570c46a3a0c312a5a40bce23
|
/Apache-Fop/src/main/java/org/apache/fop/fo/extensions/ExtensionObj.java
|
6ea919e2400f9346e709040065c820fe0d7a6c37
|
[
"Apache-2.0"
] |
permissive
|
Guronzan/GenPDF
|
ddedaff22350c387fd7cf04db3c76c0b2c7ba636
|
b1e2d36fda01fbccd7edce5165a388470396e1dd
|
refs/heads/master
| 2016-09-06T08:51:50.479904
| 2014-05-25T11:35:10
| 2014-05-25T11:35:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,196
|
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.
*/
/* $Id: ExtensionObj.java 1296526 2012-03-03 00:18:45Z gadams $ */
package org.apache.fop.fo.extensions;
import org.apache.fop.apps.FOPException;
import org.apache.fop.fo.FOEventHandler;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.PropertyList;
import org.xml.sax.Attributes;
import org.xml.sax.Locator;
/**
* Base class for pdf bookmark extension objects.
*/
public abstract class ExtensionObj extends FObj {
/**
* Create a new extension object.
*
* @param parent
* the parent formatting object
*/
public ExtensionObj(final FONode parent) {
super(parent);
}
/**
* {@inheritDoc}
*/
@Override
public void processNode(final String elementName, final Locator locator,
final Attributes attlist, final PropertyList pList)
throws FOPException {
}
/**
* Create a default property list for this element.
*
* @param parent
* the parent property list
* @param foEventHandler
* an event handler
* @return property list
* @throws FOPException
* in case of exception
*/
@Override
protected PropertyList createPropertyList(final PropertyList parent,
final FOEventHandler foEventHandler) throws FOPException {
return null;
}
}
|
[
"guillaume.rodrigues@gmail.com"
] |
guillaume.rodrigues@gmail.com
|
3ab4c587089d71a15847479e401bd90f9cd2cd93
|
0a2b91cbbdefa87def10e1921c2923ab08c7357a
|
/app/src/main/java/com/bbld/tsl_water/bean/VersionAndroid.java
|
106ae742929e375195d7e2c9f6bacfcd31e420a9
|
[] |
no_license
|
likeyizhi/TSL_Water
|
4aa63459fca5174fd8f149baa50c72b8714a3304
|
02b29ed1dd329353864a67ac34088455e1ed8379
|
refs/heads/master
| 2021-01-19T18:41:01.510170
| 2017-08-23T07:41:57
| 2017-08-23T07:41:57
| 101,152,299
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 902
|
java
|
package com.bbld.tsl_water.bean;
/**
* Created by likey on 2017/4/27.
*/
public class VersionAndroid {
/** "version": "1.3",
"url": "http://182.92.183.143:8050/androidApk/mmjh_yhd-1.3-3cs03.apk",
"status": 0,
"mes": "操作成功",
*/
private String version;
private String url;
private int status;
private String mes;
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
public String getMes() {
return mes;
}
public void setMes(String mes) {
this.mes = mes;
}
}
|
[
"aaxxzzz@qq.com"
] |
aaxxzzz@qq.com
|
93eceb258e39f1633aec538e1273f05f28a69aa4
|
6c69998676e9df8be55e28f6d63942b9f7cef913
|
/src/com/insigma/siis/local/pagemodel/comm/DataPermissionUtil.java
|
f4da2ec6ce0990bae333afe5b1ed5aa9078a8fdc
|
[] |
no_license
|
HuangHL92/ZHGBSYS
|
9dea4de5931edf5c93a6fbcf6a4655c020395554
|
f2ff875eddd569dca52930d09ebc22c4dcb47baf
|
refs/heads/master
| 2023-08-04T04:37:08.995446
| 2021-09-15T07:35:53
| 2021-09-15T07:35:53
| 406,219,162
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,794
|
java
|
package com.insigma.siis.local.pagemodel.comm;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import com.insigma.odin.framework.persistence.HBUtil;
import com.insigma.odin.framework.privilege.vo.GroupVO;
import com.insigma.odin.framework.util.SysUtil;
public class DataPermissionUtil {
/**
* 获取当前用户的可见市、乡、镇、村编码
* 格式为:'330800','330822123456'
* @return
*/
public static String getCueUserAAA148(){
List<GroupVO> groups = SysUtil.getCacheCurrentUser().getUserGroups();
StringBuffer aaa148 = new StringBuffer();
if(groups!=null && groups.size()>0){
for(Iterator<GroupVO> it = groups.iterator();it.hasNext();){
GroupVO g = it.next();
if(!aaa148.toString().equals("")){
aaa148.append(",");
}
aaa148.append("'");
aaa148.append(g.getId());
aaa148.append("'");
}
}else{
aaa148.append("'");
aaa148.append(
(String) HBUtil.getHBSession().
createSQLQuery("select aaa005 from aa01 a where a.aaa001 ='AREA_ID' ")
.list().iterator().next());
aaa148.append("'");
}
return aaa148.toString();
}
/**
* 获取当前用户的组集合对象(返回一个List,里面存放的是Group的Id)
* @return List 里面存放的是Group的Id
*/
public static List<String> getCueUserGroupList(){
List<String> list = new ArrayList<String>();
List<GroupVO> groups = SysUtil.getCacheCurrentUser().getUserGroups();
if(groups!=null && groups.size()>0){
for(Iterator<GroupVO> it = groups.iterator();it.hasNext();){
GroupVO g = it.next();
list.add(g.getId());
}
}else{
list.add((String) HBUtil.getHBSession().createSQLQuery("select aaa005 from aa01 a where a.aaa001 ='AREA_ID' ").list().iterator().next());
}
return list;
}
}
|
[
"351036848@qq.com"
] |
351036848@qq.com
|
8fd18c07f4d37aee47d0a91276f03afd2f98fe15
|
80403ec5838e300c53fcb96aeb84d409bdce1c0c
|
/server/modules/experiment/src/org/labkey/experiment/LineageManager.java
|
d74dd5571149a29a62928d5597bd3f3eaa8a682d
|
[] |
no_license
|
scchess/LabKey
|
7e073656ea494026b0020ad7f9d9179f03d87b41
|
ce5f7a903c78c0d480002f738bccdbef97d6aeb9
|
refs/heads/master
| 2021-09-17T10:49:48.147439
| 2018-03-22T13:01:41
| 2018-03-22T13:01:41
| 126,447,224
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,478
|
java
|
package org.labkey.experiment;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.labkey.api.data.DbSchema;
import org.labkey.api.data.DbSchemaType;
import org.labkey.api.data.SQLFragment;
import org.labkey.api.exp.api.ExpLineage;
import org.labkey.api.exp.api.ExpLineageOptions;
import org.labkey.api.exp.api.ExpProtocolOutput;
import org.labkey.api.util.ConfigurationException;
import org.labkey.api.util.Pair;
import org.labkey.experiment.api.ExperimentServiceImpl;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class LineageManager
{
static final String exp_graph_sql2;
static final String exp_graph_sql2_for_lookup="";
static
{
try
{
String sql = IOUtils.toString(ExperimentServiceImpl.class.getResourceAsStream("ExperimentRunGraph2.sql"), "UTF-8");
if (DbSchema.get("exp", DbSchemaType.Module).getSqlDialect().isPostgreSQL())
exp_graph_sql2 = StringUtils.replace(StringUtils.replace(sql, "$RECURSIVE$", "RECURSIVE"), "$VARCHAR$", "VARCHAR");
else
exp_graph_sql2 = StringUtils.replace(StringUtils.replace(StringUtils.replace(sql, "$RECURSIVE$", ""), "$VARCHAR$", "NVARCHAR"), "||", "+");
// sql = IOUtils.toString(ExperimentServiceImpl.class.getResourceAsStream("ExperimentRunGraphForLookup2.sql"), "UTF-8");
// if (DbSchema.get("exp", DbSchemaType.Module).getSqlDialect().isPostgreSQL())
// exp_graph_sql2_for_lookup = StringUtils.replace(StringUtils.replace(sql, "$RECURSIVE$", "RECURSIVE"), "$VARCHAR$", "VARCHAR");
// else
// exp_graph_sql2_for_lookup = StringUtils.replace(StringUtils.replace(StringUtils.replace(sql, "$RECURSIVE$", ""), "$VARCHAR$", "NVARCHAR"), "||", "+");
}
catch (IOException x)
{
throw new ConfigurationException("Cannot read file ExperimentRunGraph.sql");
}
}
// public static ExpLineage getLineage2(ExpProtocolOutput start, ExpLineageOptions options)
// {
// if (ExperimentServiceImpl.get().isUnknownMaterial(start))
// return new ExpLineage(start);
//
// Pair<Map<String, String>, Map<String, String>> pair = ExperimentServiceImpl.get().collectRunsAndRolesToInvestigate(start, options);
// List<String> runLsids = new ArrayList<>(pair.first.size() + pair.second.size());
// runLsids.addAll(pair.first.keySet());
// runLsids.addAll(pair.second.keySet());
// if (runLsids.isEmpty())
// return new ExpLineage(start);
//
// SQLFragment sqlf = generateExperimentTreeSQL(runLsids, options);
// Set<Integer> dataids = new HashSet<>();
// Set<Integer> materialids = new HashSet<>();
// Set<Integer> runids = new HashSet<>();
// Set<ExpLineage.Edge> edges = new HashSet<>();
//
// // add edges for initial runs and roles up
// for (Map.Entry<String, String> runAndRole : pair.first.entrySet())
// edges.add(new ExpLineage.Edge(runAndRole.getKey(), start.getLSID(), runAndRole.getValue()));
//
// // add edges for initial runs and roles down
// for (Map.Entry<String, String> runAndRole : pair.second.entrySet())
// edges.add(new ExpLineage.Edge(start.getLSID(), runAndRole.getKey(), runAndRole.getValue()));
//
//
// }
}
|
[
"klum@labkey.com"
] |
klum@labkey.com
|
f445381704c8d73b7fb491536b99dd4939dc7f2f
|
1095fea85170be0fead52a277f7c5c2661c747ff
|
/rs3 files/876 Deob/source/com/jagex/Class647_Sub1_Sub3_Sub5.java
|
4926481bf414a27427695bd3fabda25a4391e79a
|
[
"Apache-2.0"
] |
permissive
|
emcry666/project-scape
|
fed5d533f561cb06b3187ea116ff2692b840b6b7
|
827d213f129a9fd266cf42e7412402609191c484
|
refs/heads/master
| 2021-09-01T01:01:40.472745
| 2017-12-23T19:55:02
| 2017-12-23T19:55:02
| 114,505,346
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,141
|
java
|
/* Class647_Sub1_Sub3_Sub5 - Decompiled by JODE
* Visit http://jode.sourceforge.net/
*/
package com.jagex;
public class Class647_Sub1_Sub3_Sub5 extends Class647_Sub1_Sub3 {
Class540 aClass540_12115;
void method16727(Class178 class178) {
/* empty */
}
boolean method16698(Class178 class178, int i, int i_0_, byte i_1_) {
return false;
}
boolean method16699(int i) {
return false;
}
boolean method16741() {
return false;
}
boolean method16702(int i) {
return false;
}
void method16703(Class178 class178, Class647_Sub1 class647_sub1, int i, int i_2_, int i_3_, boolean bool, int i_4_) {
/* empty */
}
void method16704(byte i) {
/* empty */
}
void method16728(Class178 class178) {
/* empty */
}
void method16706(Class178 class178, short i) {
/* empty */
}
public Class564 method16707(Class178 class178, byte i) {
return null;
}
boolean method16713(Class178 class178, int i, int i_5_) {
return false;
}
Class559 method16744(Class178 class178, byte i) {
if (aClass540_12115.aClass167_7218 == null)
return null;
Class435 class435 = class178.method3113();
Class435 class435_6_ = method10585();
Class432 class432 = method10569();
class435.method6803(class435_6_);
Class565 class565 = (aClass560_10822.aClass565ArrayArrayArray7508[aByte10821][(int) class432.aClass437_4862.aFloat4903 >> 9][(int) class432.aClass437_4862.aFloat4905 >> 9]);
if (class565 != null && null != class565.aClass647_Sub1_Sub2_7591)
class435.method6819(0.0F, (float) -(class565.aClass647_Sub1_Sub2_7591.aShort11740), 0.0F);
aClass540_12115.aClass167_7218.method2708(class435, null, 0);
return null;
}
boolean method16716() {
return false;
}
public int method16720() {
if (aClass540_12115.aClass167_7218 == null)
return 0;
return aClass540_12115.aClass167_7218.method2804();
}
void method16697() {
/* empty */
}
public int method16719() {
if (aClass540_12115.aClass167_7218 == null)
return 0;
return aClass540_12115.aClass167_7218.method2804();
}
boolean method16736(Class178 class178, int i, int i_7_) {
return false;
}
public Class564 method16721(Class178 class178) {
return null;
}
boolean method16718() {
return false;
}
boolean method16715() {
return true;
}
Class559 method16726(Class178 class178) {
if (aClass540_12115.aClass167_7218 == null)
return null;
Class435 class435 = class178.method3113();
Class435 class435_8_ = method10585();
Class432 class432 = method10569();
class435.method6803(class435_8_);
Class565 class565 = (aClass560_10822.aClass565ArrayArrayArray7508[aByte10821][(int) class432.aClass437_4862.aFloat4903 >> 9][(int) class432.aClass437_4862.aFloat4905 >> 9]);
if (class565 != null && null != class565.aClass647_Sub1_Sub2_7591)
class435.method6819(0.0F, (float) -(class565.aClass647_Sub1_Sub2_7591.aShort11740), 0.0F);
aClass540_12115.aClass167_7218.method2708(class435, null, 0);
return null;
}
boolean method16701(int i) {
return true;
}
public int method16743(int i) {
if (aClass540_12115.aClass167_7218 == null)
return 0;
return aClass540_12115.aClass167_7218.method2804();
}
void method16756(Class178 class178) {
/* empty */
}
boolean method16730() {
return false;
}
Class559 method16724(Class178 class178) {
if (aClass540_12115.aClass167_7218 == null)
return null;
Class435 class435 = class178.method3113();
Class435 class435_9_ = method10585();
Class432 class432 = method10569();
class435.method6803(class435_9_);
Class565 class565 = (aClass560_10822.aClass565ArrayArrayArray7508[aByte10821][(int) class432.aClass437_4862.aFloat4903 >> 9][(int) class432.aClass437_4862.aFloat4905 >> 9]);
if (class565 != null && null != class565.aClass647_Sub1_Sub2_7591)
class435.method6819(0.0F, (float) -(class565.aClass647_Sub1_Sub2_7591.aShort11740), 0.0F);
aClass540_12115.aClass167_7218.method2708(class435, null, 0);
return null;
}
void method16732(Class178 class178, Class647_Sub1 class647_sub1, int i, int i_10_, int i_11_, boolean bool) {
/* empty */
}
boolean method16731() {
return false;
}
void method16734() {
/* empty */
}
void method16735() {
/* empty */
}
Class647_Sub1_Sub3_Sub5(Class560 class560, Class540 class540, int i, int i_12_, int i_13_, int i_14_, int i_15_) {
super(class560, i, i_12_, i_13_, i_14_, i_15_, i_13_ >> 9, i_13_ >> 9, i_15_ >> 9, i_15_ >> 9, false, (byte) 0);
aClass540_12115 = class540;
}
Class559 method16725(Class178 class178) {
if (aClass540_12115.aClass167_7218 == null)
return null;
Class435 class435 = class178.method3113();
Class435 class435_16_ = method10585();
Class432 class432 = method10569();
class435.method6803(class435_16_);
Class565 class565 = (aClass560_10822.aClass565ArrayArrayArray7508[aByte10821][(int) class432.aClass437_4862.aFloat4903 >> 9][(int) class432.aClass437_4862.aFloat4905 >> 9]);
if (class565 != null && null != class565.aClass647_Sub1_Sub2_7591)
class435.method6819(0.0F, (float) -(class565.aClass647_Sub1_Sub2_7591.aShort11740), 0.0F);
aClass540_12115.aClass167_7218.method2708(class435, null, 0);
return null;
}
}
|
[
"34613829+emcry666@users.noreply.github.com"
] |
34613829+emcry666@users.noreply.github.com
|
7a03c1b109b594c616be6cdc42c70755ed6a4947
|
39bef83f3a903f49344b907870feb10a3302e6e4
|
/Android Studio Projects/bf.io.openshop/src/android/support/v4/view/animation/LookupTableInterpolator.java
|
acfc4c5fffe35d6c302e5ce9ca0fc40b6d2d40ca
|
[] |
no_license
|
Killaker/Android
|
456acf38bc79030aff7610f5b7f5c1334a49f334
|
52a1a709a80778ec11b42dfe9dc1a4e755593812
|
refs/heads/master
| 2021-08-19T06:20:26.551947
| 2017-11-24T22:27:19
| 2017-11-24T22:27:19
| 111,960,738
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 785
|
java
|
package android.support.v4.view.animation;
import android.view.animation.*;
abstract class LookupTableInterpolator implements Interpolator
{
private final float mStepSize;
private final float[] mValues;
public LookupTableInterpolator(final float[] mValues) {
this.mValues = mValues;
this.mStepSize = 1.0f / (-1 + this.mValues.length);
}
public float getInterpolation(final float n) {
if (n >= 1.0f) {
return 1.0f;
}
if (n <= 0.0f) {
return 0.0f;
}
final int min = Math.min((int)(n * (-1 + this.mValues.length)), -2 + this.mValues.length);
return this.mValues[min] + (n - min * this.mStepSize) / this.mStepSize * (this.mValues[min + 1] - this.mValues[min]);
}
}
|
[
"ema1986ct@gmail.com"
] |
ema1986ct@gmail.com
|
fa1137497a80ed61e3b923bacbfeb2e853738e9b
|
e2a0e376f7903ce182ebc3464078ae1891fbcf6d
|
/app/src/main/java/yidu/cooking/widget/MuliTypeAdapter/TypeFactory.java
|
62a94b7cc3d00f8bc99cb579cd1620597743ad0e
|
[] |
no_license
|
yjy239/wifiproject
|
de1ef9df464126ca7ae4c70f9ed152d827e8ecd2
|
7fa0eb5cdc7a1c6a1b8d22e4d41c8b6124cdbb75
|
refs/heads/master
| 2020-12-02T22:13:25.296223
| 2017-07-03T10:29:52
| 2017-07-03T10:29:52
| 96,099,398
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 273
|
java
|
package yidu.cooking.widget.MuliTypeAdapter;
import android.view.View;
//import testcom.onlineeducation.bean.EduBean;
/**
* Created by Administrator on 2017/3/29 0029.
*/
public interface TypeFactory {
BaseViewHolder createViewHolder(int type, View itemView);
}
|
[
"2651167692@qq.com"
] |
2651167692@qq.com
|
2e377d8acd9a85fdea3e4cd16d7f0e366164b01e
|
4da9097315831c8639a8491e881ec97fdf74c603
|
/src/StockIT-v2-release_source_from_JADX/sources/com/google/android/gms/internal/ads/zzcma.java
|
3fc84f227d0bdbf3410aec1032c64f7f680c083d
|
[
"Apache-2.0"
] |
permissive
|
atul-vyshnav/2021_IBM_Code_Challenge_StockIT
|
5c3c11af285cf6f032b7c207e457f4c9a5b0c7e1
|
25c26a4cc59a3f3e575f617b59acc202ee6ee48a
|
refs/heads/main
| 2023-08-11T06:17:05.659651
| 2021-10-01T08:48:06
| 2021-10-01T08:48:06
| 410,595,708
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 238
|
java
|
package com.google.android.gms.internal.ads;
/* compiled from: com.google.android.gms:play-services-ads@@19.4.0 */
final class zzcma {
/* access modifiers changed from: private */
public static final zzclx zzggo = new zzclx();
}
|
[
"57108396+atul-vyshnav@users.noreply.github.com"
] |
57108396+atul-vyshnav@users.noreply.github.com
|
866b2d8ceff21cf418f4bf7768725dcf7d208ae5
|
963599f6f1f376ba94cbb504e8b324bcce5de7a3
|
/sources/com/google/android/datatransport/runtime/dagger/Provides.java
|
5c602fa51bb264cb6d2fbb6ad25a390845b56ae2
|
[] |
no_license
|
NikiHard/cuddly-pancake
|
563718cb73fdc4b7b12c6233d9bf44f381dd6759
|
3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4
|
refs/heads/main
| 2023-04-09T06:58:04.403056
| 2021-04-20T00:45:08
| 2021-04-20T00:45:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 369
|
java
|
package com.google.android.datatransport.runtime.dagger;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Documented
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Provides {
}
|
[
"a.amirovv@mail.ru"
] |
a.amirovv@mail.ru
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.