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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
775f294b6ba1a7700048a993a1d3fdde3e85c6e5
|
4ba132c18d7856f0842efba125dc4067731e65c2
|
/trade_hosting_apps/trade_hosting_position_statis/server/src/main/java/xueqiao/trade/hosting/position/statis/service/handler/HostingContractHandler.java
|
4585065401161e187cccad8141fb421ee4c770dd
|
[] |
no_license
|
feinoah/xueqiao-trade
|
a65496d7c529084964062dec00fc48903a4356a4
|
cf4283ab1ae8c7467ec51102dc08194e3e9ffc38
|
refs/heads/main
| 2023-04-19T11:42:31.813771
| 2021-04-25T12:03:56
| 2021-04-25T12:03:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,593
|
java
|
package xueqiao.trade.hosting.position.statis.service.handler;
import com.longsheng.xueqiao.contract.standard.thriftapi.SledCommodity;
import com.longsheng.xueqiao.contract.standard.thriftapi.SledCommodityConfig;
import com.longsheng.xueqiao.contract.standard.thriftapi.SledContractDetails;
import org.soldier.base.beanfactory.Globals;
import org.soldier.platform.svr_platform.comm.ErrorInfo;
import xueqiao.trade.hosting.framework.utils.ParameterChecker;
import xueqiao.trade.hosting.position.statis.service.bean.SledContractData;
import xueqiao.trade.hosting.position.statis.thriftapi.StatPositionErrorCode;
import xueqiao.trade.hosting.storage.apis.IHostingContractApi;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class HostingContractHandler {
private IHostingContractApi mContractApi;
/**
* SledContractData 临时缓存
*/
private Map<Long, SledContractData> sledContractDataMap = null;
public HostingContractHandler() {
mContractApi = Globals.getInstance().queryInterfaceForSure(IHostingContractApi.class);
sledContractDataMap = new HashMap<>();
}
/**
* 获取合约计算相关的参数
* 用map做一个临时缓存
*/
public SledContractData getSledContractData(long sledContractId) throws ErrorInfo {
if (sledContractDataMap.containsKey(sledContractId)) {
return sledContractDataMap.get(sledContractId);
}
synchronized (sledContractDataMap) {
if (sledContractDataMap.containsKey(sledContractId)) {
return sledContractDataMap.get(sledContractId);
}
SledContractData contractData = getSledContractDataInner(sledContractId);
sledContractDataMap.put(sledContractId, contractData);
return contractData;
}
}
/**
* 内部获取SledContractData方法
*/
private SledContractData getSledContractDataInner(long sledContractId) throws ErrorInfo {
ParameterChecker.check(sledContractId > 0, "sledContractId should be more than zero");
SledContractDetails details = mContractApi.getContractDetailForSure(sledContractId);
ParameterChecker.check(details != null, "sledContractDetails is null");
SledCommodity sledCommodity = details.getSledCommodity();
ParameterChecker.check(sledCommodity != null, "sledCommodity is null");
SledCommodityConfig SledCommodityConfig = getSledCommodityConfig(sledCommodity);
SledContractData sledContractData = new SledContractData();
sledContractData.setSledCommodityId(sledContractId);
sledContractData.setTradeCurrency(sledCommodity.getTradeCurrency());
sledContractData.setContractSize(sledCommodity.getContractSize());
sledContractData.setChargeUnit(SledCommodityConfig.getChargeUnit());
return sledContractData;
}
/**
* 获取有效的 SledCommodityConfig
*/
private static SledCommodityConfig getSledCommodityConfig(SledCommodity sledCommodity) throws ErrorInfo {
List<SledCommodityConfig> configList = sledCommodity.getSledCommodityConfig();
if (configList.size() == 0) {
throw new ErrorInfo(StatPositionErrorCode.ERROR_STAT_POSITION_COMMODITY_CONFIG_NOT_FOUND.getValue(), "commodity config not found.");
}
long now = System.currentTimeMillis() / 1000;
SledCommodityConfig sledCommodityConfig = null;
for (SledCommodityConfig config : configList) {
if (now >= config.getActiveStartTimestamp() && now <= config.getActiveEndTimestamp()) {
sledCommodityConfig = config;
break;
}
}
if (sledCommodityConfig == null) {
throw new ErrorInfo(StatPositionErrorCode.ERROR_STAT_POSITION_COMMODITY_CONFIG_NOT_FOUND.getValue(), "commodity config not found.");
}
return sledCommodityConfig;
}
}
|
[
"wangli@authine.com"
] |
wangli@authine.com
|
951c51eb4bbbd565bb41d9dff94a475858e1b7b3
|
d71e879b3517cf4fccde29f7bf82cff69856cfcd
|
/ExtractedJars/LibriVox_app.librivox.android/javafiles/app/librivox/android/BDSearchSuggestionProvider.java
|
e6a8d0d94715f0b7aa825290ab32116cdb1f4b2e
|
[
"MIT"
] |
permissive
|
Andreas237/AndroidPolicyAutomation
|
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
|
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
|
refs/heads/master
| 2020-04-10T02:14:08.789751
| 2019-05-16T19:29:11
| 2019-05-16T19:29:11
| 160,739,088
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 835
|
java
|
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) annotate safe
package app.librivox.android;
import android.content.SearchRecentSuggestionsProvider;
public class BDSearchSuggestionProvider extends SearchRecentSuggestionsProvider
{
public BDSearchSuggestionProvider()
{
// 0 0:aload_0
// 1 1:invokespecial #8 <Method void SearchRecentSuggestionsProvider()>
setupSuggestions("app.librivox.android.BDSearchSuggestionProvider", 1);
// 2 4:aload_0
// 3 5:ldc1 #10 <String "app.librivox.android.BDSearchSuggestionProvider">
// 4 7:iconst_1
// 5 8:invokevirtual #14 <Method void setupSuggestions(String, int)>
// 6 11:return
}
}
|
[
"silenta237@gmail.com"
] |
silenta237@gmail.com
|
3018f234938f4d1ae836256547b5ca69f1626c5e
|
9f5f40df25ff4e80b5a9f2ef91529c3aba69021a
|
/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/ArcFourHmacMd5Encryption.java
|
59f45b989e5bbaa36cbd7cea7718fc5492b45eee
|
[
"LicenseRef-scancode-unknown",
"OLDAP-2.8",
"ANTLR-PD",
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-jdbm-1.00",
"Apache-2.0",
"LicenseRef-scancode-ietf"
] |
permissive
|
isabella232/directory-server
|
d5a627c2e16157f9662d388884de07e7ac7823e0
|
2ec1117fec41919a68d04ba3a51724562e3b46f8
|
refs/heads/master
| 2023-03-08T19:14:47.065238
| 2020-11-06T15:25:43
| 2020-11-06T15:25:43
| 311,733,075
| 0
| 0
|
Apache-2.0
| 2021-02-23T13:28:34
| 2020-11-10T17:20:04
| null |
UTF-8
|
Java
| false
| false
| 3,409
|
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.directory.server.kerberos.shared.crypto.encryption;
import java.security.GeneralSecurityException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.Mac;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
import org.apache.directory.shared.kerberos.exceptions.KerberosException;
import org.apache.directory.shared.kerberos.components.EncryptedData;
import org.apache.directory.shared.kerberos.codec.types.EncryptionType;
import org.apache.directory.shared.kerberos.components.EncryptionKey;
/**
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
class ArcFourHmacMd5Encryption extends EncryptionEngine
{
public EncryptionType getEncryptionType()
{
return EncryptionType.RC4_HMAC;
}
public int getChecksumLength()
{
return 16;
}
public int getConfounderLength()
{
return 8;
}
public byte[] getDecryptedData( EncryptionKey key, EncryptedData data, KeyUsage usage ) throws KerberosException
{
return data.getCipher();
}
public EncryptedData getEncryptedData( EncryptionKey key, byte[] plainText, KeyUsage usage )
{
return new EncryptedData( getEncryptionType(), key.getKeyVersion(), plainText );
}
public byte[] encrypt( byte[] plainText, byte[] keyBytes )
{
return processCipher( true, plainText, keyBytes );
}
public byte[] decrypt( byte[] cipherText, byte[] keyBytes )
{
return processCipher( false, cipherText, keyBytes );
}
public byte[] calculateIntegrity( byte[] data, byte[] key, KeyUsage usage )
{
try
{
Mac digester = Mac.getInstance( "HmacMD5" );
return digester.doFinal( data );
}
catch ( NoSuchAlgorithmException nsae )
{
return null;
}
}
private byte[] processCipher( boolean isEncrypt, byte[] data, byte[] keyBytes )
{
try
{
Cipher cipher = Cipher.getInstance( "ARCFOUR" );
SecretKey key = new SecretKeySpec( keyBytes, "ARCFOUR" );
if ( isEncrypt )
{
cipher.init( Cipher.ENCRYPT_MODE, key );
}
else
{
cipher.init( Cipher.DECRYPT_MODE, key );
}
return cipher.doFinal( data );
}
catch ( GeneralSecurityException nsae )
{
nsae.printStackTrace();
return null;
}
}
}
|
[
"elecharny@apache.org"
] |
elecharny@apache.org
|
321e2b56be1efc5fbd4684509427d435ba09ded0
|
6253283b67c01a0d7395e38aeeea65e06f62504b
|
/decompile/framework/com.huawei.systemmanager.separated/tmsdkobf/jx.java
|
e89731f224114ae36c0af381bc5fa8493f1256eb
|
[] |
no_license
|
sufadi/decompile-hw
|
2e0457a0a7ade103908a6a41757923a791248215
|
4c3efd95f3e997b44dd4ceec506de6164192eca3
|
refs/heads/master
| 2023-03-15T15:56:03.968086
| 2017-11-08T03:29:10
| 2017-11-08T03:29:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,360
|
java
|
package tmsdkobf;
import android.text.TextUtils;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.regex.Pattern;
import tmsdk.common.module.aresengine.IncomingSmsFilterConsts;
import tmsdk.common.utils.d;
/* compiled from: Unknown */
public class jx {
private jp uH = new jp(IncomingSmsFilterConsts.PAY_SMS);
private Map<String, String> uI = new HashMap(16);
private Map<String, String> uJ = new HashMap(16);
private Map<String, String> uK = new HashMap(16);
private boolean uL;
private static boolean bI(String str) {
return !TextUtils.isEmpty(str) && str.indexOf(42) >= 0;
}
private static boolean bJ(String str) {
return str.length() > 0 && str.indexOf(42) == str.length() - 1;
}
private static String bK(String str) {
return str.replace("\\", "\\\\").replace(".", "\\.").replace("+", "\\+").replace("*", ".*");
}
public void clear() {
this.uH.clear();
this.uI.clear();
this.uJ.clear();
this.uK.clear();
}
public String getName(String str) {
String str2;
String de = rb.de(str);
if (rb.dd(de)) {
try {
str2 = (String) this.uH.get(Integer.parseInt(de));
} catch (Throwable e) {
d.a("ContactsMap", "minMatch to int", e);
str2 = (String) this.uI.get(de);
}
} else {
str2 = (String) this.uI.get(de);
}
if (str2 != null) {
return str2;
}
CharSequence dc = rb.dc(str);
CharSequence da = rb.da(dc);
for (Entry entry : this.uJ.entrySet()) {
de = (String) entry.getKey();
if (rb.db(de)) {
if (dc.startsWith(de)) {
return (String) entry.getValue();
}
} else if (da.startsWith(de)) {
return (String) entry.getValue();
}
}
for (Entry entry2 : this.uK.entrySet()) {
Pattern compile = Pattern.compile((String) entry2.getKey());
if (compile.matcher(dc).matches() || compile.matcher(da).matches()) {
return (String) entry2.getValue();
}
}
return null;
}
public void k(String str, String str2) {
if (this.uL && bI(str)) {
l(str, str2);
} else if (!TextUtils.isEmpty(str)) {
Object obj;
if (str2 == null) {
obj = "";
}
String de = rb.de(str);
if (rb.dd(de)) {
try {
this.uH.put(Integer.parseInt(de), obj);
} catch (NumberFormatException e) {
d.c("ContactsMap", "Exception in parseInt(minMatch): " + e.getMessage());
this.uI.put(de, obj);
}
} else {
this.uI.put(de, obj);
}
}
}
public void l(String str, String str2) {
if (!TextUtils.isEmpty(str)) {
Object obj;
if (str2 == null) {
obj = "";
}
if (bJ(str)) {
this.uJ.put(str.substring(0, str.length() - 1), obj);
} else {
this.uK.put(bK(str), obj);
}
}
}
}
|
[
"liming@droi.com"
] |
liming@droi.com
|
4b9e176d4110635a3dc692658606997a6b00a31c
|
dc0afaa5b63e1bf4ee195fa1bf56629a32d8d57a
|
/java/spring/first-cache/src/main/java/me/test/first/cache/UserBiz.java
|
869345a9c1d0c845670030b0070f920dff66dc85
|
[] |
no_license
|
btpka3/btpka3.github.com
|
370e6954af485bd6aee35fa5944007aab131e416
|
e5435d201641a2f21c632a28eae5ef408d2e799c
|
refs/heads/master
| 2023-08-23T18:37:31.643843
| 2023-08-16T11:48:38
| 2023-08-16T11:48:38
| 8,571,000
| 19
| 19
| null | 2021-04-12T10:01:13
| 2013-03-05T03:08:08
|
Java
|
UTF-8
|
Java
| false
| false
| 2,123
|
java
|
package me.test.first.cache;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.jdbc.query.SqlUpdateCallback;
import org.springframework.stereotype.Service;
import com.mysema.query.sql.dml.SQLUpdateClause;
import com.mysema.query.types.Predicate;
@Service
public class UserBiz {
private final Logger logger = LoggerFactory.getLogger(UserBiz.class);
@Autowired
private QueryDslJdbcTemplate template;
public List<User> list(
String name,
Boolean gender) {
List<Predicate> conds = new ArrayList<Predicate>();
if (StringUtils.isNotEmpty(name)) {
conds.add(QUser.user.name.like("%" + StringUtils.trimToEmpty(name) + "%"));
}
if (gender != null) {
conds.add(QUser.user.gender.eq(gender));
}
// return query.from(QUser.user).where(conds.toArray(new Predicate[0])).list(QUser.user);
return template.newSqlQuery().from(QUser.user).where(conds.toArray(new Predicate[0])).list(QUser.user);
}
@Cacheable(value = "user", key = "#id")
public User selectById(Long id) {
logger.debug("$$$$$$$$$$$$$$$$$$$$$$$ selectById()");
// return query.from(QUser.user).where(QUser.user.id.eq(id)).uniqueResult(QUser.user);
return template.newSqlQuery().from(QUser.user).where(QUser.user.id.eq(id)).uniqueResult(QUser.user);
}
@CacheEvict(value = "user", key = "#user.id")
public void update(final User user) {
logger.debug("$$$$$$$$$$$$$$$$$$$$$$$ update(User)");
template.update(QUser.user, new SqlUpdateCallback() {
@Override
public long doInSqlUpdateClause(SQLUpdateClause update) {
return update.populate(user).where(QUser.user.id.eq(user.getId())).execute();
}
});
}
}
|
[
"btpka3@163.com"
] |
btpka3@163.com
|
f6368139a80fcc175e1037dab1d847e25dbd260a
|
1cc74e3aeba105d27dc878af23959efb63453370
|
/library/src/main/java/com/wfy/simple/library/IRoute.java
|
9be0b937561474d68c72360f69778b727eb7086e
|
[] |
no_license
|
FY6/SimpleRouter
|
b3821d807883e78bcaae9734256d88f1ce29e84a
|
2151122e37440b2774c19c8c2537a34ac994837d
|
refs/heads/master
| 2020-06-02T02:42:23.456753
| 2019-09-08T03:47:46
| 2019-09-08T03:47:46
| 191,009,675
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 133
|
java
|
package com.wfy.simple.library;
import java.util.Map;
public interface IRoute {
void loadInto(Map<String, Class<?>> routes);
}
|
[
"f_y_wang6@163.com"
] |
f_y_wang6@163.com
|
9e113127e3e8af5937a75ac910cb35b83fc171b7
|
20ef0eaaa77093335a0ea254e5e9cf9cffcf4f0c
|
/jingpeng/007_双宝项目/ShuangBaoSystem/src/com/testRoom/model/ShiYan03Entity.java
|
2c894b630d987f4b3f5dfe082e760fef56ebadf1
|
[] |
no_license
|
elaine140626/jingpeng
|
1749830a96352b0c853f148c4808dd67650df8a0
|
2329eb463b4d36bdb4dedf451702b4c73ef87982
|
refs/heads/master
| 2021-03-15T00:29:17.637034
| 2019-08-15T01:35:49
| 2019-08-15T01:35:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,169
|
java
|
package com.testRoom.model;
public class ShiYan03Entity {
private String SerialNumber; // 流水号
private String TestRoomName; // 实验室名
private String TestRules; // 试验依据
private String testDate; // 试验日期
private String SampleName; // 样品名称
private String SampleCount; // 试件个数
private String TestOperator; // 实验员
private String SampleAmount; // 试件数量, 0每组3个试件,1每组6个试件
private String Strength_Grade; // 强度等级
private String MoldDate; // 成型日期
private String ConstructionUnit; // 施工单位
private String EngineeringName; // 工程名称
private String Purpose; // 工程部位/用途
private String AvgCompStrength; // 平均抗压强度(MPa)
private String IsQualifiedTest; // 结果判定
private String QRCode; // 二维码
public String getSerialNumber() {
return SerialNumber;
}
public void setSerialNumber(String serialNumber) {
SerialNumber = serialNumber;
}
public String getTestRoomName() {
return TestRoomName;
}
public void setTestRoomName(String testRoomName) {
TestRoomName = testRoomName;
}
public String getTestRules() {
return TestRules;
}
public void setTestRules(String testRules) {
TestRules = testRules;
}
public String getTestDate() {
return testDate;
}
public void setTestDate(String testDate) {
this.testDate = testDate;
}
public String getSampleName() {
return SampleName;
}
public void setSampleName(String sampleName) {
SampleName = sampleName;
}
public String getSampleCount() {
return SampleCount;
}
public void setSampleCount(String sampleCount) {
SampleCount = sampleCount;
}
public String getTestOperator() {
return TestOperator;
}
public void setTestOperator(String testOperator) {
TestOperator = testOperator;
}
public String getSampleAmount() {
return SampleAmount;
}
public void setSampleAmount(String sampleAmount) {
SampleAmount = sampleAmount;
}
public String getStrength_Grade() {
return Strength_Grade;
}
public void setStrength_Grade(String strength_Grade) {
Strength_Grade = strength_Grade;
}
public String getMoldDate() {
return MoldDate;
}
public void setMoldDate(String moldDate) {
MoldDate = moldDate;
}
public String getConstructionUnit() {
return ConstructionUnit;
}
public void setConstructionUnit(String constructionUnit) {
ConstructionUnit = constructionUnit;
}
public String getEngineeringName() {
return EngineeringName;
}
public void setEngineeringName(String engineeringName) {
EngineeringName = engineeringName;
}
public String getPurpose() {
return Purpose;
}
public void setPurpose(String purpose) {
Purpose = purpose;
}
public String getAvgCompStrength() {
return AvgCompStrength;
}
public void setAvgCompStrength(String avgCompStrength) {
AvgCompStrength = avgCompStrength;
}
public String getIsQualifiedTest() {
return IsQualifiedTest;
}
public void setIsQualifiedTest(String isQualifiedTest) {
IsQualifiedTest = isQualifiedTest;
}
public String getQRCode() {
return QRCode;
}
public void setQRCode(String qRCode) {
QRCode = qRCode;
}
}
|
[
"474296307@qq.com"
] |
474296307@qq.com
|
555a5db7ec1676b3cb8d3a6fe8ba068566342e73
|
5067d13ba6abc9aea2a03927b9f7468e73095273
|
/src/com/dcms/cms/manager/assist/CmsMessageMng.java
|
f7c0a36161001068b06fd43de3cc2ac8a44164f7
|
[] |
no_license
|
dailinyi/dcmsv5-postgreSQL
|
ced164536a7c0fe99c53446f1d499de3bff8f3a4
|
09985b1519533090f4d67dd1ee410a37242d93b4
|
refs/heads/master
| 2021-01-01T05:51:51.135571
| 2015-02-02T15:18:11
| 2015-02-02T15:18:11
| 30,084,495
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 631
|
java
|
package com.dcms.cms.manager.assist;
import java.util.Date;
import com.dcms.cms.entity.assist.CmsMessage;
import com.dcms.common.page.Pagination;
public interface CmsMessageMng {
public Pagination getPage(Integer siteId, Integer sendUserId,
Integer receiverUserId, String title, Date sendBeginTime,
Date sendEndTime, Boolean status, Integer box, Boolean cacheable,
int pageNo, int pageSize);
public CmsMessage findById(Integer id);
public CmsMessage save(CmsMessage bean);
public CmsMessage update(CmsMessage bean);
public CmsMessage deleteById(Integer id);
public CmsMessage[] deleteByIds(Integer[] ids);
}
|
[
"dailinyi@rd.tuan800.com"
] |
dailinyi@rd.tuan800.com
|
4ab8d8fcf4ef78db16e76385a6ea6f4a0ca7db2e
|
071130a8280b1becf319d9d6576dc2fdc531ffdb
|
/ecs-sync-model/src/main/java/com/emc/ecs/sync/config/AbstractConfig.java
|
a64fc6eba6c2927fcc3e4335962f8da2512a19f2
|
[
"Apache-2.0"
] |
permissive
|
anarchy9388/ecs-sync
|
6fbba5ab78719ddd7a7d08e5203b8a34fa2d7882
|
03fdb0f023a04802134084678e76cbff7e8eab66
|
refs/heads/master
| 2022-12-22T07:03:30.257048
| 2020-09-28T22:09:05
| 2020-09-28T22:09:05
| 299,441,322
| 0
| 0
|
Apache-2.0
| 2020-09-28T22:09:07
| 2020-09-28T21:59:49
| null |
UTF-8
|
Java
| false
| false
| 868
|
java
|
/*
* Copyright 2013-2017 EMC Corporation. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.emc.ecs.sync.config;
public class AbstractConfig {
@Override
public String toString() {
return ConfigUtil.summarize(this);
}
/**
* blank if null
*/
protected String bin(String value) {
return value == null ? "" : value;
}
}
|
[
"stu.arnett@emc.com"
] |
stu.arnett@emc.com
|
f38cac24a58f719d592b9fc9a9dc89cf3879d7b8
|
d6d7fcb04a4b854eeced75b6af3fafe6903d6938
|
/src/com/ht/base/DBConn.java
|
78c37e147961ccabfa97933eede59e126efab9d1
|
[] |
no_license
|
GZzzhsmart/QQ2016
|
3fde09843450dddd53f43e0365d86223bf0b79f3
|
3b8725b5548c14df06581c536c78256c3e4eb6b4
|
refs/heads/master
| 2021-07-19T02:40:24.337693
| 2017-10-24T00:06:38
| 2017-10-24T00:06:38
| 104,151,134
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,055
|
java
|
package com.ht.base;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class DBConn {
private static String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; //驱动
private static String url = "jdbc:sqlserver://localhost\\SQL2005:1433;databasename=QQ2016";
private static String username="sa";
private static String password="123456";
private static Connection conn=null;
//静态语句块,连接数据库
static{
try {
Class.forName(driver);
conn = DriverManager.getConnection(url,username,password);
System.out.println("sql数据库连接成功");
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
}
}
//连接数据库
public static Connection openDB(){
try {
//判断连接状态
if(conn.isClosed()){
conn = DriverManager.getConnection(url,username,password);
}
}catch (SQLException e) {
e.printStackTrace();
}
return conn;
}
public static void main(String[] args) {
}
}
|
[
"1729340612@qq.com"
] |
1729340612@qq.com
|
7c6832ce68245bce73040bf10d9c9e3fb7d87e10
|
65af42883b3a34b1f29c520912319831db23cb05
|
/src/test/java/com/prestashop/pages/ItemPage.java
|
fa10e20e2d612f6ab1f6f40043b2131e172babcd
|
[] |
no_license
|
huseyinaltas/cucumber-acceptance-tests
|
b3cdbf9334d11411d12b1307990039d4e6474457
|
395ebef4589cbe32362b45f820cebf3949556628
|
refs/heads/master
| 2020-03-24T02:34:01.605390
| 2018-07-26T01:56:44
| 2018-07-26T01:56:44
| 142,381,607
| 0
| 0
| null | 2018-07-26T03:06:37
| 2018-07-26T03:06:37
| null |
UTF-8
|
Java
| false
| false
| 739
|
java
|
package com.prestashop.pages;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.ui.Select;
import com.prestashop.utilities.Driver;
public class ItemPage {
public ItemPage() {
PageFactory.initElements(Driver.getDriver(), this);
}
@FindBy(tagName = "h1")
public WebElement itemName;
@FindBy(id = "quantity_wanted")
public WebElement count;
@FindBy(className = "icon-plus")
public WebElement plus;
@FindBy(className = "icon-minus")
public WebElement minus;
public Select size() {
return new Select(Driver.getDriver().findElement(By.id("group_1")));
}
}
|
[
"github@cybertekschool.com"
] |
github@cybertekschool.com
|
51342089d18e2d225b8098a8a68a6d197dbd1863
|
21dc50c89085338068bf2f20c9cda05f0c201e3c
|
/src/main/java/java_multithreading/level_5/lesson_9/task_2/Solution.java
|
b54f37435f38e0a043eb896eb47a24ff9aeca9d1
|
[] |
no_license
|
GreegAV/JavaRushCourses
|
614781a8de1cb529804184c38647b19827081572
|
310eae8a64c587578df813a7c22de83f179fa993
|
refs/heads/master
| 2022-01-29T11:07:03.262587
| 2018-10-19T06:33:06
| 2018-10-19T06:33:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,469
|
java
|
package java_multithreading.level_5.lesson_9.task_2;
import java.util.TimerTask;
/**
* @author Ivan Korol on 7/31/2018
*/
public class Solution extends TimerTask {
protected TimerTask original;
protected final Thread.UncaughtExceptionHandler handler;
public Solution(TimerTask original) {
if (original == null) {
throw new NullPointerException();
}
this.original = original;
this.handler = new Thread.UncaughtExceptionHandler()
{
@Override
public void uncaughtException(Thread t, Throwable e)
{
String stars = t.getName().replaceAll(".", "*");
String newMessage = e.getMessage().replace(t.getName(), stars);
e = new Exception(newMessage, e);
System.out.println(e.getMessage());
t.setName(stars);
}
}; //init handler here
}
public void run() {
try {
original.run();
} catch (Throwable cause) {
Thread currentThread = Thread.currentThread();
handler.uncaughtException(currentThread, new Exception("Blah " + currentThread.getName() + " blah-blah-blah", cause));
}
}
public long scheduledExecutionTime() {
return original.scheduledExecutionTime();
}
public boolean cancel() {
return original.cancel();
}
public static void main(String[] args) {
}
}
|
[
"korol.vanja2008@gmail.com"
] |
korol.vanja2008@gmail.com
|
7d52f94124c5f319da501f9748c6c2c94c45a4c2
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE129_Improper_Validation_of_Array_Index/CWE129_Improper_Validation_of_Array_Index__getCookies_Servlet_array_read_no_check_81_bad.java
|
890b699a09750c9d98cfc7747662efc4bc3394c0
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 1,565
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE129_Improper_Validation_of_Array_Index__getCookies_Servlet_array_read_no_check_81_bad.java
Label Definition File: CWE129_Improper_Validation_of_Array_Index.label.xml
Template File: sources-sinks-81_bad.tmpl.java
*/
/*
* @description
* CWE: 129 Improper Validation of Array Index
* BadSource: getCookies_Servlet Read data from the first cookie using getCookies()
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: array_read_no_check
* GoodSink: Read from array after verifying index
* BadSink : Read from array without any verification of index
* Flow Variant: 81 Data flow: data passed in a parameter to an abstract method
*
* */
package testcases.CWE129_Improper_Validation_of_Array_Index;
import testcasesupport.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.sql.*;
import javax.servlet.http.*;
public class CWE129_Improper_Validation_of_Array_Index__getCookies_Servlet_array_read_no_check_81_bad extends CWE129_Improper_Validation_of_Array_Index__getCookies_Servlet_array_read_no_check_81_base
{
public void action(int data , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
/* Need to ensure that the array is of size > 3 and < 101 due to the GoodSource and the large_fixed BadSource */
int array[] = { 0, 1, 2, 3, 4 };
/* POTENTIAL FLAW: Attempt to read from array at location data, which may be outside the array bounds */
IO.writeLine(array[data]);
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
9f5feffd740027dd66112812501a8d066fa65944
|
d61cbe04b46e3480d5f2acf356f8ccdbab28dbc7
|
/Desarrollo Web en Java/06_Modulo_Seguridad/18_Seguridad/src/com/icaballero/rest/ServicioREST.java
|
671711ed02252b35d3a6eb83f1c8878575943d36
|
[] |
no_license
|
decalion/Formaciones-Platzi-Udemy
|
d479548c50f3413eba5bad3d01bdd6a33ba75f60
|
3180d5062d847cc466d4a614863a731189137e50
|
refs/heads/master
| 2022-11-30T18:59:39.796599
| 2021-06-08T20:11:18
| 2021-06-08T20:11:18
| 200,000,005
| 1
| 2
| null | 2022-11-24T09:11:48
| 2019-08-01T07:27:00
|
Java
|
UTF-8
|
Java
| false
| false
| 888
|
java
|
package com.icaballero.rest;
import java.util.List;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import com.icaballero.negocio.Curso;
import com.icaballero.servicios.ServicioCursos;
@ApplicationScoped
@Path(value = "/cursos")
public class ServicioREST {
@Inject
ServicioCursos sc;
@GET
@Produces(MediaType.APPLICATION_JSON)
public List<Curso> listaCursos() {
ServicioCursos sc= new ServicioCursos();
return sc.buscarTodos();
}
@GET
@Path("/filtro/{nombre:.*}")
@Produces(MediaType.APPLICATION_JSON)
public List<Curso> filtroPorNombre(@PathParam("nombre") String nombre) {
//ServicioCursos sc= new ServicioCursos();
return sc.buscarPorNombre(nombre);
}
}
|
[
"icaballerohernandez@gmail.com"
] |
icaballerohernandez@gmail.com
|
583b38f21dfe610e0fe80b0079ce13e7fb62152a
|
24d4605647869da8d34f627f7c8494a640af64ab
|
/ContentProvider/Files/app/src/main/java/com/commonsware/android/cp/files/AbstractFileProvider.java
|
f9e4b7790aa469f038d787599de3bedc8177db1c
|
[
"Apache-2.0"
] |
permissive
|
chrisluwi/cw-omnibus
|
30deeba5fed2e8c237a19a7c578e7c1bab772f51
|
9122eb0f1f7125471b3e2b27a7498f6358397910
|
refs/heads/master
| 2021-01-11T01:34:19.253614
| 2021-01-10T05:49:28
| 2021-01-10T05:49:28
| 70,690,515
| 0
| 0
|
Apache-2.0
| 2021-01-10T05:49:29
| 2016-10-12T10:47:18
|
Java
|
UTF-8
|
Java
| false
| false
| 3,178
|
java
|
/***
Copyright (c) 2014-2015 CommonsWare, LLC
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.
Covered in detail in the book _The Busy Coder's Guide to Android Development_
https://commonsware.com/Android
*/
package com.commonsware.android.cp.files;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.res.AssetFileDescriptor;
import android.database.Cursor;
import android.database.MatrixCursor;
import android.net.Uri;
import android.provider.OpenableColumns;
import com.commonsware.cwac.provider.LegacyCompatCursorWrapper;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLConnection;
abstract class AbstractFileProvider extends ContentProvider {
private final static String[] OPENABLE_PROJECTION= {
OpenableColumns.DISPLAY_NAME, OpenableColumns.SIZE };
@Override
public Cursor query(Uri uri, String[] projection, String selection,
String[] selectionArgs, String sortOrder) {
if (projection == null) {
projection=OPENABLE_PROJECTION;
}
final MatrixCursor cursor=new MatrixCursor(projection, 1);
MatrixCursor.RowBuilder b=cursor.newRow();
for (String col : projection) {
if (OpenableColumns.DISPLAY_NAME.equals(col)) {
b.add(getFileName(uri));
}
else if (OpenableColumns.SIZE.equals(col)) {
b.add(getDataLength(uri));
}
else { // unknown, so just add null
b.add(null);
}
}
return(new LegacyCompatCursorWrapper(cursor));
}
@Override
public String getType(Uri uri) {
return(URLConnection.guessContentTypeFromName(uri.toString()));
}
protected String getFileName(Uri uri) {
return(uri.getLastPathSegment());
}
protected long getDataLength(Uri uri) {
return(AssetFileDescriptor.UNKNOWN_LENGTH);
}
@Override
public Uri insert(Uri uri, ContentValues initialValues) {
throw new RuntimeException("Operation not supported");
}
@Override
public int update(Uri uri, ContentValues values, String where,
String[] whereArgs) {
throw new RuntimeException("Operation not supported");
}
@Override
public int delete(Uri uri, String where, String[] whereArgs) {
throw new RuntimeException("Operation not supported");
}
static void copy(InputStream in, File dst)
throws IOException {
FileOutputStream out=new FileOutputStream(dst);
byte[] buf=new byte[1024];
int len;
while ((len=in.read(buf)) >= 0) {
out.write(buf, 0, len);
}
in.close();
out.close();
}
}
|
[
"mmurphy@commonsware.com"
] |
mmurphy@commonsware.com
|
666d00df0ff3c9b75d4d17ad3fc0a2345c37e057
|
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
|
/aliyun-java-sdk-eiam/src/main/java/com/aliyuncs/eiam/transform/v20211201/ListUsersForApplicationResponseUnmarshaller.java
|
6ae83fa46f7fcf129bab9dcdbe6c5a82a4a85983
|
[
"Apache-2.0"
] |
permissive
|
aliyun/aliyun-openapi-java-sdk
|
a263fa08e261f12d45586d1b3ad8a6609bba0e91
|
e19239808ad2298d32dda77db29a6d809e4f7add
|
refs/heads/master
| 2023-09-03T12:28:09.765286
| 2023-09-01T09:03:00
| 2023-09-01T09:03:00
| 39,555,898
| 1,542
| 1,317
|
NOASSERTION
| 2023-09-14T07:27:05
| 2015-07-23T08:41:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,704
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.eiam.transform.v20211201;
import java.util.ArrayList;
import java.util.List;
import com.aliyuncs.eiam.model.v20211201.ListUsersForApplicationResponse;
import com.aliyuncs.eiam.model.v20211201.ListUsersForApplicationResponse.User;
import com.aliyuncs.transform.UnmarshallerContext;
public class ListUsersForApplicationResponseUnmarshaller {
public static ListUsersForApplicationResponse unmarshall(ListUsersForApplicationResponse listUsersForApplicationResponse, UnmarshallerContext _ctx) {
listUsersForApplicationResponse.setRequestId(_ctx.stringValue("ListUsersForApplicationResponse.RequestId"));
listUsersForApplicationResponse.setTotalCount(_ctx.longValue("ListUsersForApplicationResponse.TotalCount"));
List<User> users = new ArrayList<User>();
for (int i = 0; i < _ctx.lengthValue("ListUsersForApplicationResponse.Users.Length"); i++) {
User user = new User();
user.setUserId(_ctx.stringValue("ListUsersForApplicationResponse.Users["+ i +"].UserId"));
users.add(user);
}
listUsersForApplicationResponse.setUsers(users);
return listUsersForApplicationResponse;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
d639f3a66bdf89550a9536eeb2816203ce01d906
|
b9559e00a99cc08ee72efb30d3a04166054651e2
|
/Java/AHEAD/unmixinbase/TypeDeclaration.java
|
a7643f80a775ea9d072997b54ccc7efd77547604
|
[] |
no_license
|
joliebig/featurehouse_fstcomp_examples
|
d4dd7d90a77ae3b20b6118677a17001fdb53ee93
|
20dd7dc9a807ec0c20939eb5c6e00fcc1ce19d20
|
refs/heads/master
| 2021-01-19T08:08:37.797995
| 2013-01-29T13:48:20
| 2013-01-29T13:48:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 475
|
java
|
import java.util.*;
import Jakarta.util.*;
import java.io.*;
public class TypeDeclaration {
public boolean extractable = false;
public void propagateChanges() {
AstNode.override( "TypeDeclaration.propageChanges", this );
}
// we expect this method to be overridden in the cases that
// we can extract classbodies and propagate them to their owners
public boolean canExtract() {
extractable = false;
return false;
}
}
|
[
"apel"
] |
apel
|
1195a35c2902c454f6a300c8598c58072996270e
|
6f0b41324d655be41de2ed14db0e45f215ff9ca9
|
/student/src/tuan3/cau1B.java
|
4be37fe93e0375d2d8ef3c7cda7e760866faab6e
|
[] |
no_license
|
quangnh97/OOP-JAVA
|
4d26b3bd6cd481214b60d2b1c1efe25a4867eb4e
|
c30d4f536bbefebac82e02355229b3e46974ed98
|
refs/heads/master
| 2020-03-29T08:40:16.778815
| 2019-05-13T14:21:31
| 2019-05-13T14:21:31
| 149,722,631
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 625
|
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 tuan3;
import java.util.Scanner;
/**
*
* @author QUANG
*/
public class cau1B {
public static int soFibonaxi(int n) {
if( n == 0) return 0;
else if(n == 1) return 1;
return soFibonaxi(n-1) + soFibonaxi(n-2);
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println(soFibonaxi(n));
}
}
|
[
"="
] |
=
|
8b5dff5d90c0893b158f6be8fe5209fe0b0b5b09
|
b7b44dc837cab3bb94194680bd6ab9dbc3c1506a
|
/shopping-domain/src/main/java/com/edaochina/shopping/domain/dto/sys/SysCountyAgencyDto.java
|
8965b43aea9a41acc709c885db1591f6f6c12c5b
|
[] |
no_license
|
wu-weirdo/shopping-mall
|
33c98da0832eced9a1f7a3249a4e8f1d7b0c5dc8
|
246ada0045743a48d299329dde18353b2eae9631
|
refs/heads/master
| 2023-01-23T05:50:03.870968
| 2020-11-18T15:53:39
| 2020-11-18T15:53:39
| 313,981,048
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 543
|
java
|
package com.edaochina.shopping.domain.dto.sys;
/**
* @author jintian
* @date 2019/5/21 15:30
*/
public class SysCountyAgencyDto {
/**
* 用户id
*/
private String userId;
/**
* 查询信息
*/
private String search;
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getSearch() {
return search;
}
public void setSearch(String search) {
this.search = search;
}
}
|
[
"982280485@qq.com"
] |
982280485@qq.com
|
87a59560ba6b020977a95f3da41775dd0987dd66
|
fbe841f1d41507f7af2a5d760cf241bb558f1681
|
/kim.s.h/workspace_java/java_study/src/dbMgr/DBConnectionMgr.java
|
2d8b7c65fd392550b7acf6ebc3f799b52440fa28
|
[] |
no_license
|
kimsh0306/allData20200423
|
a9be47723d0dcf132eb415b01ffa5ed7f6e8f339
|
6dff9fcd9c894e6f26ccefcff6fba4ca1542a0b1
|
refs/heads/master
| 2022-10-26T05:03:26.545490
| 2020-06-19T10:27:49
| 2020-06-19T10:27:49
| 258,162,187
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,652
|
java
|
package dbMgr;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
public class DBConnectionMgr {
//선언부-전역변수는 초기화를 생성자가 해준다.
//Connection ->특정 데이터베이스와의 연결(세션). SQL 문은 실행되고 결과는 연결의 맥락 안에서 반환된다.
Connection con = null;
public static final String _DRIVER
= "oracle.jdbc.driver.OracleDriver";
//물리적으로 떨어져 있는 오라클 서버에 URL정보 추가
public static final String _URL
= "jdbc:oracle:thin:@192.168.0.26:1521:orcl11";//여기까지-------------전역변수이면서 상수
public static String _USER = "scott";//bank
public static String _PW = "tiger";
//static은 클래스급이다.공유를 생각하라(하나다)=>하나를 접근하는 것이다.정적변수다.
private static DBConnectionMgr dbMgr = null;
private DBConnectionMgr() {}
//싱글톤 패턴으로 객체 관리하기 ------------------------------- 인스턴스화 과정이다.
public static DBConnectionMgr getInstance() {//타입이 하나다, 싱글톤. 하나의 객체를 2천만명이 공유할 수 있다.
if(dbMgr==null) {
dbMgr = new DBConnectionMgr();
}
return dbMgr;
}//---------------------------------------------------- 인스턴스화 과정 여기가지.
//물리적으로 떨어져 있는 오라클 서버와 연결통로 만들기
public Connection getConnection() {//static이 없다.
System.out.println("getConnection 호출 성공");
//오라클 회사 정보를 수집함.
try {
Class.forName(_DRIVER);
//인스턴스화를 해주는 메소드 구현.con을 리턴하니까.그 어디에도 인스턴화가 없다.con = new Connection();이 없다.
//반드시 구현체 클래스가 있어야 한다.
con=DriverManager.getConnection(_URL,_USER,_PW);//변경가능
}catch(ClassNotFoundException ce) {
System.out.println("드라이버 클래스 이름을 찾을 수 없어요.");
}catch(Exception e) {
System.out.println("예외가 발생했음. 정상적으로 처리가 안됨.");
}
return con;
}
/* DBConnectionMgr은 여러 업무에서 공통으로 사용하는 클래스입니다.
* 사용한 자원(Connection, PreparedStatment, ResultSet)은
* 반드시 반납을 하도록 합니다.
* 동시 접속자 수가 많은 시스템에서 자원사용은 곧 메모리랑 직결되므로
* 서버가 다운되거나 시스템 장애 발생에 원인이 됩니다.
*/
public void freeConnection(Connection con
,PreparedStatement pstmt
,ResultSet rs) {
try {
//사용자원의 생성 역순으로 반환할 것.
if(rs!=null) {
rs.close();
}
if(pstmt!=null) {
pstmt.close();
}
if(con!=null) {
con.close();
}
}catch(Exception e) {
System.out.println("Exception: "+e.toString());
}
}
//1)메소드 오버로딩 - 파라미터갯수
//2)메소드 오버라이딩
public void freeConnection(Connection con
,PreparedStatement pstmt) {
try {
//사용자원의 생성 역순으로 반환할 것.
if(pstmt!=null) {
pstmt.close();
}
if(con!=null) {
con.close();
}
}catch(Exception e) {
System.out.println("Exception: "+e.toString());
}
}
public void freeConnection(Connection con
,CallableStatement cstmt) {
try {
//사용자원의 생성 역순으로 반환할 것.
if(cstmt!=null) {
cstmt.close();
}
if(con!=null) {
con.close();
}
}catch(Exception e) {
System.out.println("Exception: "+e.toString());
}
}
}
|
[
"b666790@gmail.com"
] |
b666790@gmail.com
|
f63596e1515e7a555cecc6529659cdc948561089
|
5193d3873f0d56ff8e9c72daacda67aa0b641f66
|
/src/com/xn/pay/model/TeamZfbDataModel.java
|
a1e256cfb9c538ce3d8afda67ae7a0be7c80b1da
|
[] |
no_license
|
hzhuazhi/fineDeploy
|
281445e508787536d42e1b44b5698a9e045a752f
|
be1dbdf1a832b658f131cce8b31a8878883c968d
|
refs/heads/master
| 2022-12-04T19:11:41.083230
| 2020-08-30T09:34:40
| 2020-08-30T09:34:40
| 271,991,148
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,950
|
java
|
package com.xn.pay.model;
import com.xn.common.page.BasePage;
/**
* @Description 团队长旗下支付宝数据详情的实体属性Bean
* @Author yoko
* @Date 2020/7/11 16:31
* @Version 1.0
*/
public class TeamZfbDataModel extends BasePage {
/**
* 账号昵称
*/
private String nickname;
/**
* 账号
*/
private String acNum;
/**
* 邀请码
*/
private String icode;
/**
* 总金额(累计充值)
*/
private String totalMoney;
/**
* 余额
*/
private String balance;
/**
* 归属用户ID:上级的用户ID;对应本表的主键ID
*/
private long ownId;
/**
* 收款账号备注
*/
private String zfbAcNum;
/**
* 总消耗成功金额
*/
private String totalSucMoney;
/**
* 今日消耗成功金额
*/
private String todaySucMoney;
/**
* 是否上传收款账号
*/
private int isHave;
/**
* 创建时间
*/
private String createTime;
/**
* 日期
*/
private int curday;
public String getAcNum() {
return acNum;
}
public void setAcNum(String acNum) {
this.acNum = acNum;
}
public String getIcode() {
return icode;
}
public void setIcode(String icode) {
this.icode = icode;
}
public String getTotalMoney() {
return totalMoney;
}
public void setTotalMoney(String totalMoney) {
this.totalMoney = totalMoney;
}
public String getBalance() {
return balance;
}
public void setBalance(String balance) {
this.balance = balance;
}
public long getOwnId() {
return ownId;
}
public void setOwnId(long ownId) {
this.ownId = ownId;
}
public String getZfbAcNum() {
return zfbAcNum;
}
public void setZfbAcNum(String zfbAcNum) {
this.zfbAcNum = zfbAcNum;
}
public String getTotalSucMoney() {
return totalSucMoney;
}
public void setTotalSucMoney(String totalSucMoney) {
this.totalSucMoney = totalSucMoney;
}
public String getTodaySucMoney() {
return todaySucMoney;
}
public void setTodaySucMoney(String todaySucMoney) {
this.todaySucMoney = todaySucMoney;
}
public int getIsHave() {
return isHave;
}
public void setIsHave(int isHave) {
this.isHave = isHave;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getNickname() {
return nickname;
}
public void setNickname(String nickname) {
this.nickname = nickname;
}
public int getCurday() {
return curday;
}
public void setCurday(int curday) {
this.curday = curday;
}
}
|
[
"duanfeng_1712@qq.com"
] |
duanfeng_1712@qq.com
|
2b1f249d8bcb01f8fa5cc93322b8f4ac2ae64f46
|
072216667ef59e11cf4994220ea1594538db10a0
|
/googleplay/com/google/android/gms/maps/model/w.java
|
4162da1b9fb2f6b87ab124fbb413e545126ec324
|
[] |
no_license
|
jackTang11/REMIUI
|
896037b74e90f64e6f7d8ddfda6f3731a8db6a74
|
48d65600a1b04931a510e1f036e58356af1531c0
|
refs/heads/master
| 2021-01-18T05:43:37.754113
| 2015-07-03T04:01:06
| 2015-07-03T04:01:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,435
|
java
|
package com.google.android.gms.maps.model;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.internal.safeparcel.a;
import com.google.android.gms.common.internal.safeparcel.b;
import com.google.android.wallet.instrumentmanager.R;
public class w implements Creator<TileOverlayOptions> {
static void a(TileOverlayOptions tileOverlayOptions, Parcel parcel, int i) {
int bU = b.bU(parcel);
b.c(parcel, 1, tileOverlayOptions.getVersionCode());
b.a(parcel, 2, tileOverlayOptions.qu(), false);
b.a(parcel, 3, tileOverlayOptions.isVisible());
b.a(parcel, 4, tileOverlayOptions.getZIndex());
b.a(parcel, 5, tileOverlayOptions.getFadeIn());
b.J(parcel, bU);
}
public /* synthetic */ Object createFromParcel(Parcel x0) {
return gz(x0);
}
public TileOverlayOptions gz(Parcel parcel) {
boolean z = false;
int bT = a.bT(parcel);
IBinder iBinder = null;
float f = 0.0f;
boolean z2 = true;
int i = 0;
while (parcel.dataPosition() < bT) {
int bS = a.bS(parcel);
switch (a.dk(bS)) {
case R.styleable.WalletImFormEditText_validatorErrorString /*1*/:
i = a.g(parcel, bS);
break;
case R.styleable.WalletImFormEditText_validatorRegexp /*2*/:
iBinder = a.q(parcel, bS);
break;
case R.styleable.WalletImFormEditText_requiredErrorString /*3*/:
z = a.c(parcel, bS);
break;
case R.styleable.WalletImFormEditText_required /*4*/:
f = a.l(parcel, bS);
break;
case R.styleable.WalletImFormEditText_validateWhenNotVisible /*5*/:
z2 = a.c(parcel, bS);
break;
default:
a.b(parcel, bS);
break;
}
}
if (parcel.dataPosition() == bT) {
return new TileOverlayOptions(i, iBinder, z, f, z2);
}
throw new a.a("Overread allowed size end=" + bT, parcel);
}
public TileOverlayOptions[] iY(int i) {
return new TileOverlayOptions[i];
}
public /* synthetic */ Object[] newArray(int x0) {
return iY(x0);
}
}
|
[
"songjd@putao.com"
] |
songjd@putao.com
|
d3f5c7d55b95e3a9f0f661ef485ce48afc983a5d
|
a6e2cd9ea01bdc5cfe58acce25627786fdfe76e9
|
/src/main/java/com/alipay/api/domain/AlipaySecurityProdXwbtestabcAbcQueryModel.java
|
bcd9a2e87b7c31b6831f63660f1c0228793f4c0f
|
[
"Apache-2.0"
] |
permissive
|
cc-shifo/alipay-sdk-java-all
|
38b23cf946b73768981fdeee792e3dae568da48c
|
938d6850e63160e867d35317a4a00ed7ba078257
|
refs/heads/master
| 2022-12-22T14:06:26.961978
| 2020-09-23T04:00:10
| 2020-09-23T04:00:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 546
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* xuwebio测试用
*
* @author auto create
* @since 1.0, 2017-11-17 10:59:46
*/
public class AlipaySecurityProdXwbtestabcAbcQueryModel extends AlipayObject {
private static final long serialVersionUID = 8133162893348931646L;
/**
* 1
*/
@ApiField("xwb")
private String xwb;
public String getXwb() {
return this.xwb;
}
public void setXwb(String xwb) {
this.xwb = xwb;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
8871031cb83c19aec7cecb1463eda6c7f2928208
|
fca12884ae4fec77dd7049ada6d10cbfdfa1bc81
|
/src/chapter14/Repeat.java
|
0c46b4b9954b920e06b8e2ddd6146df08e45027a
|
[] |
no_license
|
xiangflight/code_of_OnJava8
|
9eb199562712901c2eee2c7db4c6be6d57cb3e19
|
7e7bf7474c1cfc71d49e5663278df99dc8975f36
|
refs/heads/master
| 2020-05-25T01:14:26.248738
| 2019-12-12T12:33:15
| 2019-12-12T12:33:15
| 187,548,889
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 322
|
java
|
package chapter14;
import java.util.function.IntConsumer;
import static java.util.stream.IntStream.*;
/**
* @author xiangdotzhaoAtwoqutechcommacom
* @date 2019-08-22 09:18
*/
public class Repeat {
public static void repeat(int n, Runnable action) {
range(0, n).forEach(value -> action.run());
}
}
|
[
"xiangflight@foxmail.com"
] |
xiangflight@foxmail.com
|
9386a6869bb5cdb9e63732fe6d32011e095d309d
|
78f7fd54a94c334ec56f27451688858662e1495e
|
/partyanalyst-service/trunk/src/main/java/com/itgrids/partyanalyst/dao/ISearchEngineIPAddressDAO.java
|
3abd5dc10a3c455e707b7d913c25d6041dd49ac7
|
[] |
no_license
|
hymanath/PA
|
2e8f2ef9e1d3ed99df496761a7b72ec50d25e7ef
|
d166bf434601f0fbe45af02064c94954f6326fd7
|
refs/heads/master
| 2021-09-12T09:06:37.814523
| 2018-04-13T20:13:59
| 2018-04-13T20:13:59
| 129,496,146
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 368
|
java
|
package com.itgrids.partyanalyst.dao;
import java.util.List;
import org.appfuse.dao.GenericDao;
import com.itgrids.partyanalyst.model.SearchEngineIPAddress;
public interface ISearchEngineIPAddressDAO extends GenericDao<SearchEngineIPAddress,Long>{
public List<String> getAllSearchEngineIPAddresses();
public List<String> getAllIPAddress();
}
|
[
"itgrids@b17b186f-d863-de11-8533-00e0815b4126"
] |
itgrids@b17b186f-d863-de11-8533-00e0815b4126
|
7dcbd033e6ce88602c812e7d2d8e572971449afc
|
65e6c8d79f89eab2b0be41b18f998b1aaab33959
|
/zz91/ast1949-common/src/main/java/com/ast/ast1949/util/EnumUtils.java
|
088ba490c945f472c88367d3b7279d92b1689d11
|
[] |
no_license
|
cash2one/91
|
14eeb47d22c7e561d2a718489cbc99409d6abd07
|
525b49860cd5e92ef012b474df6c9dc4f8256756
|
refs/heads/master
| 2021-01-19T11:20:46.930263
| 2016-06-28T02:36:26
| 2016-06-28T02:37:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,293
|
java
|
/**
* Copyright 2010 ASTO.
* All right reserved.
* Created on 2010-3-15
*/
package com.ast.ast1949.util;
/**
* 常用类别的枚举值
*
* @author yuyonghui
*
*/
public enum EnumUtils {
/**
* 名企访谈
*/
NEWS_INTERVIEW("1"),
/**
* 再生技术
*/
NEWS_TECH("2"),
/**
* 技术热点
*/
NEWS_HOT_TECH("3"),
/**
* 商务热点
*/
NEWS_HOT_BIZ("4"),
/**
* 热门资讯
*/
NEWS_HOT_NEWS("5"),
/**
* 废金属
*/
PRODUCTS_METAL("1000"),
/**
* 废塑料
*/
PRODUCTS_PLASTIC("1001"),
/**
* 废纸
*/
PRODUCTS_PAPER("1002"),
/**
* 废纺织和皮革
*/
PRODUCTS_TEXTILE_LEATHER("1003"),
/**
* 废旧轮胎和橡胶
*/
PRODUCTS_TIRE_RUBBER("1004"),
/**
* 废旧设备和交通工具
*/
PRODUCTS_EQUIPMENT_VEHICLES("1005"),
/**
* 废旧电子和电脑设备
*/
PRODUCTS_COMPUTER("1006"),
/**
* 废旧玻璃和废木制品
*/
PRODUCTS_GLASS_WOOD("1007"),
/**
* 供求信息
*/
PRODUCTS_CODE("10351001"),
/**
* 报价
*/
PRICE_CODE("10351003"),
;
private final String value;
private EnumUtils(String value) {
this.value = value;
}
public String getValue() {
return this.value;
}
}
|
[
"785395338@qq.com"
] |
785395338@qq.com
|
d3b83a423eb696700d1bfebe25f0f2cb768478da
|
3cb3d9f00ed5d4b12892f877354eef2398d3ad5e
|
/unified-login/src/main/java/com/zuma/converter/JPAPage2PageVOConverter.java
|
5687c724ab986bbcbda8a7ab99ab229083f8375c
|
[] |
no_license
|
BrightStarry/unifiedlogincloud
|
4f631407b349dc5adf1353ddc32026b299dacb5d
|
d18066389bac7dfce7111635a2eaa2bbfdc03f09
|
refs/heads/master
| 2021-09-22T10:06:52.239762
| 2021-09-11T03:09:00
| 2021-09-11T03:09:00
| 110,092,022
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 957
|
java
|
package com.zuma.converter;
import com.zuma.domain.User;
import com.zuma.vo.PageVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.domain.Page;
import java.util.ArrayList;
/**
* author:ZhengXing
* datetime:2017/10/17 0017 13:54
* JPA的page对象转换为自定义的PageDTO对象
*/
@Slf4j
public class JPAPage2PageVOConverter {
/**
* 一对一转换
* @param page
* @param <T>
* @return
*/
public static <T> PageVO<T> convert(Page<T> page) {
int pageNo = page.getNumber();
PageVO<T> pageVO = new PageVO<T>(++pageNo, page.getSize(), page.getTotalElements(), page.getTotalPages(), page.getContent());
//防止list为空,会发生栈溢出
if(pageVO.getList() == null)
pageVO.setList(new ArrayList<T>());
//防止totalPage为0
pageVO.setTotalPage(pageVO.getTotalPage() == 0 ? 1 : pageVO.getTotalPage());
return pageVO;
}
}
|
[
"970389745@qq.com"
] |
970389745@qq.com
|
c1f2625874652b6941bfe7f267c50f81675a37a5
|
d6a117163ece7fd49ee01874169d1c3ed665a9d5
|
/DailyCodes/26nov/Program2.java
|
fd7c2099ca18a8069b9f9e5255136fcdf0bac075
|
[] |
no_license
|
Priyanshu611/sortedmap
|
1a2f3919568151a0efd2727a7a3fc0a76831f19f
|
2b3e11dc262c69c7ef077267d6a9e63e9b94c731
|
refs/heads/master
| 2023-05-31T06:51:14.956615
| 2021-06-28T08:03:34
| 2021-06-28T08:03:34
| 281,047,255
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 319
|
java
|
class Demo2 {
void m1(String s1){
System.out.println("In string method");
}
void m1(StringBuffer s2){
System.out.println("In string buffer method");
}
}
class Test {
public static void main(String[] args){
Demo2 obj = new Demo2();
obj.m1("Shashi");
obj.m1(new StringBuffer("Shashi"));
}
}
|
[
"spriyanshu611@gmail.com"
] |
spriyanshu611@gmail.com
|
0399a9722c1b59a237c4c5b58b63af5e765ad5ed
|
880b36f12a25cbefe5f8b124d8e9fd8b2eecf964
|
/serpent-agent-test/tests/jetbrains/buildServer/python/agent/FakePythonService.java
|
e961d813690763f1ded599dd0325d5ebe6b488a9
|
[] |
no_license
|
leo-from-spb/teamcity-python
|
c6a120f59b7ea320ce89637678889f82d294c4fc
|
aab39d002b98198d1ee4b8425fd7b3c5730b8d11
|
refs/heads/master
| 2021-01-22T14:40:09.181595
| 2020-10-27T16:45:44
| 2020-10-27T16:45:44
| 37,993,343
| 15
| 10
| null | 2020-10-27T16:36:46
| 2015-06-24T15:30:42
|
Java
|
UTF-8
|
Java
| false
| false
| 647
|
java
|
package jetbrains.buildServer.python.agent;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Map;
import java.util.TreeMap;
/**
* @author Leonid.Bushuev
*/
public class FakePythonService extends PythonService
{
final @NotNull Map<String,String> myRunParameters =
new TreeMap<String,String>();
@NotNull @Override
public Map<String, String> getRunParameters()
{
return myRunParameters;
}
void addParameter(@NotNull String name, @Nullable String value)
{
myRunParameters.put(name, value);
}
}
|
[
"leonidos@gmail.com"
] |
leonidos@gmail.com
|
52703b691643be1d85a969e4bcb875abab258a83
|
fe2ef5d33ed920aef5fc5bdd50daf5e69aa00ed4
|
/jbpm.3/jpdl/jar/src/test/java/org/jbpm/graph/def/ParentTest.java
|
8081297c01d2e364f8bf618304f44e512b459932
|
[] |
no_license
|
sensui74/legacy-project
|
4502d094edbf8964f6bb9805be88f869bae8e588
|
ff8156ae963a5c61575ff34612c908c4ccfc219b
|
refs/heads/master
| 2020-03-17T06:28:16.650878
| 2016-01-08T03:46:00
| 2016-01-08T03:46:00
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,677
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2005, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This 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 software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jbpm.graph.def;
import junit.framework.TestCase;
public class ParentTest extends TestCase {
ProcessDefinition processDefinition = null;
public void testProcessDefinitionParent() {
assertNull(new ProcessDefinition().getParent());
}
public void testNodeInProcessParents() {
processDefinition = ProcessDefinition.parseXmlString(
"<process-definition>" +
" <start-state name='start'>" +
" <transition to='state'/>" +
" </start-state>" +
" <state name='state'>" +
" <transition to='end'/>" +
" </state>" +
" <end-state name='end'/>" +
"</process-definition>"
);
assertSame(processDefinition, processDefinition.getStartState().getParent());
assertSame(processDefinition, processDefinition.getNode("state").getParent());
assertSame(processDefinition, processDefinition.getNode("end").getParent());
}
public void testTransitionInProcessParents() {
processDefinition = ProcessDefinition.parseXmlString(
"<process-definition>" +
" <start-state name='start'>" +
" <transition to='state'/>" +
" </start-state>" +
" <state name='state'>" +
" <transition to='end'/>" +
" </state>" +
" <end-state name='end'/>" +
"</process-definition>"
);
assertSame(processDefinition, processDefinition.getStartState().getDefaultLeavingTransition().getParent());
assertSame(processDefinition, processDefinition.getNode("state").getDefaultLeavingTransition().getParent());
}
public void testNodeInSuperProcessParent() {
processDefinition = ProcessDefinition.parseXmlString(
"<process-definition>" +
" <start-state name='start'>" +
" <transition to='superstate/state'/>" +
" </start-state>" +
" <super-state name='superstate'>" +
" <state name='state'>" +
" <transition to='../end'/>" +
" </state>" +
" </super-state>" +
" <end-state name='end'/>" +
"</process-definition>"
);
SuperState superState = (SuperState) processDefinition.getNode("superstate");
assertSame(processDefinition, processDefinition.getStartState().getParent());
assertSame(processDefinition, superState.getParent());
assertSame(processDefinition, processDefinition.getNode("end").getParent());
assertSame(superState, processDefinition.findNode("superstate/state").getParent());
}
public void testTransitionInSuperProcessParent() {
processDefinition = ProcessDefinition.parseXmlString(
"<process-definition>" +
" <start-state name='start'>" +
" <transition to='superstate/state'/>" +
" </start-state>" +
" <super-state name='superstate'>" +
" <state name='state'>" +
" <transition to='../end'/>" +
" <transition name='loop' to='state'/>" +
" <transition name='tostate2' to='state2'/>" +
" </state>" +
" <state name='state2' />" +
" </super-state>" +
" <end-state name='end'/>" +
"</process-definition>"
);
SuperState superState = (SuperState) processDefinition.getNode("superstate");
assertSame(processDefinition, processDefinition.getStartState().getDefaultLeavingTransition().getParent());
assertSame(processDefinition, processDefinition.findNode("superstate/state").getDefaultLeavingTransition().getParent());
assertSame(superState, processDefinition.findNode("superstate/state").getLeavingTransition("loop").getParent());
assertSame(superState, processDefinition.findNode("superstate/state").getLeavingTransition("tostate2").getParent());
}
}
|
[
"wow_fei@163.com"
] |
wow_fei@163.com
|
16d7dd5f8df8af9a1c1d90de32e66f561f682c01
|
210c66c696a399cce427e7681a6e7c2269fccc11
|
/app/src/main/java/com/zhjydy/presenter/contract/PhoneNumChangContract.java
|
9b79dbff56a052c2632bf35f91d045de7d47badd
|
[] |
no_license
|
henryliu1988/zjydy
|
e2d2c5e6e27118ddf03c6a379374623e477d4194
|
9a665cfa3fa707c0dde012c5dff78c4b7ff64c1f
|
refs/heads/master
| 2020-09-13T08:43:37.871726
| 2017-06-21T12:13:54
| 2017-06-21T12:13:54
| 67,607,730
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 595
|
java
|
package com.zhjydy.presenter.contract;
import com.zhjydy.model.net.WebResponse;
import com.zhjydy.presenter.BasePresenter;
import com.zhjydy.presenter.BaseView;
import rx.Observable;
/**
* Created by Administrator on 2016/10/9 0009.
*/
public interface PhoneNumChangContract {
interface View extends BaseView<Presenter> {
void submitResult(boolean result, String msg, String phone);
}
interface Presenter extends BasePresenter {
Observable<WebResponse> getConfirmCode(String phone);
void submitChangeConfirm(String phone, String confirmCode);
}
}
|
[
"lytao123sc@126.com"
] |
lytao123sc@126.com
|
476ed026adfc0a93df4d5f6dc718d0d75402b89a
|
f5a57a8fe70ff7042e27fdea36ccad3d1715e5b3
|
/lambda4j/src/test/java/org/lambda4j/function/tri/TriBooleanFunctionTest.java
|
bd4e74e3222a9cf509aad566c57f24d01fba7801
|
[
"Apache-2.0"
] |
permissive
|
djessich/lambda4j
|
035103413138f02801e07097d80bd477ab6beb72
|
c8f8f2a8693001f159c740464d3bf39bd1ed094c
|
refs/heads/master
| 2023-03-22T05:49:53.513219
| 2022-07-14T21:18:58
| 2022-07-14T21:18:58
| 40,265,220
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,356
|
java
|
/*
* Copyright (c) 2021 The lambda4j authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.lambda4j.function.tri;
import java.util.NoSuchElementException;
import java.util.Optional;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EmptySource;
import org.junit.jupiter.params.provider.NullSource;
class TriBooleanFunctionTest {
@Test
void of_givenExpression_returnsFunctionalInterface() {
TriBooleanFunction<String> function =
TriBooleanFunction.of((value1, value2, value3) -> Boolean.toString(value1));
Assertions.assertNotNull(function);
}
@Test
void of_givenNull_returnsNull() {
TriBooleanFunction<String> function = TriBooleanFunction.of((TriBooleanFunction<String>) null);
Assertions.assertNull(function);
}
@ParameterizedTest
@NullSource
@EmptySource
void lift_givenExpression_returnsFunctionalInterface(String ret) {
TriBooleanFunction<Optional<String>> function = TriBooleanFunction.lift((value1, value2, value3) -> ret);
Assertions.assertNotNull(function);
Optional<String> optional = Assertions.assertDoesNotThrow(() -> function.apply(false, false, false));
Assertions.assertNotNull(optional);
if (ret == null) {
Assertions.assertFalse(optional.isPresent());
Assertions.assertThrows(NoSuchElementException.class, optional::get);
} else {
Assertions.assertTrue(optional.isPresent());
Assertions.assertEquals(ret, optional.get());
}
}
@Test
void lift_givenNull_throwsException() {
Assertions.assertThrows(NullPointerException.class, () -> TriBooleanFunction.lift(null));
}
}
|
[
"dominik.jessich@chello.at"
] |
dominik.jessich@chello.at
|
0a8bbdcdd487397de3e91f1110f43d3f3638714a
|
a39e26e734c43d25e7a73cc9a54fde42b16b1027
|
/reactfx/org/reactfx/inhibeans/property/ReadOnlyDoublePropertyBase.java
|
1502bf8a900ac45f5cc8fae631b1e5f6c47f0193
|
[] |
no_license
|
bernardobreder/demo-richtextfx
|
52e86edd191e667725f92f7e8d863e2ba787e5a5
|
586cfa204aa89a5bea99db506845cc965bc2b9ad
|
refs/heads/master
| 2021-06-29T14:36:55.003269
| 2017-09-21T11:20:22
| 2017-09-21T11:20:22
| 104,338,805
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 835
|
java
|
package org.reactfx.inhibeans.property;
import org.reactfx.Guard;
/**
* Inhibitory version of
* {@link javafx.beans.property.ReadOnlyDoublePropertyBase}.
*/
@Deprecated
public abstract class ReadOnlyDoublePropertyBase extends
javafx.beans.property.ReadOnlyDoublePropertyBase implements Property<Number> {
private int blocked = 0;
private boolean fireOnRelease = false;
@Override
public Guard block() {
++blocked;
return ((Guard) this::release).closeableOnce();
}
private void release() {
assert blocked > 0;
if (--blocked == 0 && fireOnRelease) {
fireOnRelease = false;
super.fireValueChangedEvent();
}
}
@Override
protected void fireValueChangedEvent() {
if (blocked > 0) {
fireOnRelease = true;
}
else {
super.fireValueChangedEvent();
}
}
}
|
[
"bernardobreder@gmail.com"
] |
bernardobreder@gmail.com
|
7f371ce8e7cdb53fdb13baa8b759144b1fcee61b
|
2dbfe54e05ade7639392252f30ac72cd6b800943
|
/src/main/java/com/sandalen/sandalen/service/BookService.java
|
b7e505f7ab041c532f88bc1a684ce6a3e7500146
|
[] |
no_license
|
whl6785968/SandalenForSpringBoot
|
c1c67410396bb233326a951b09967055455bfe60
|
fd66bbd492da7488508eb182291d9443e4ed1c95
|
refs/heads/master
| 2022-06-27T15:41:26.109136
| 2019-12-11T08:46:59
| 2019-12-11T08:46:59
| 192,031,325
| 0
| 0
| null | 2022-06-17T02:15:00
| 2019-06-15T03:18:21
|
HTML
|
UTF-8
|
Java
| false
| false
| 341
|
java
|
package com.sandalen.sandalen.service;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;
import java.util.Map;
@Service
public class BookService {
// @RabbitListener(queues = "atguigu.emps")
public void listenAtguigu(Map map){
System.out.println(map);
}
}
|
[
"806403789@qq.com"
] |
806403789@qq.com
|
32154c236ff2786780434c5cd5ee0e5e91fc4e7b
|
6e5c37409a53c882bf41ba5bbbf49975d6c1c9aa
|
/src/org/hl7/v3/GTSAbbreviationHolidaysChristianRoman.java
|
8ac612a46cc76771d8eaa09f7e86d7da3546bf9e
|
[] |
no_license
|
hosflow/fwtopsysdatasus
|
46fdf8f12ce1fd5628a04a2145757798b622ee9f
|
2d9a835fcc7fd902bc7fb0b19527075c1260e043
|
refs/heads/master
| 2021-09-03T14:39:52.008357
| 2018-01-09T20:34:19
| 2018-01-09T20:34:19
| 116,867,672
| 0
| 0
| null | null | null | null |
IBM852
|
Java
| false
| false
| 1,092
|
java
|
package org.hl7.v3;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Classe Java de GTSAbbreviationHolidaysChristianRoman.
*
* <p>O seguinte fragmento do esquema especifica o conte˙do esperado contido dentro desta classe.
* <p>
* <pre>
* <simpleType name="GTSAbbreviationHolidaysChristianRoman">
* <restriction base="{urn:hl7-org:v3}cs">
* <enumeration value="JHCHREAS"/>
* <enumeration value="JHCHRGFR"/>
* <enumeration value="JHCHRNEW"/>
* <enumeration value="JHCHRPEN"/>
* <enumeration value="JHCHRXME"/>
* <enumeration value="JHCHRXMS"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "GTSAbbreviationHolidaysChristianRoman")
@XmlEnum
public enum GTSAbbreviationHolidaysChristianRoman {
JHCHREAS,
JHCHRGFR,
JHCHRNEW,
JHCHRPEN,
JHCHRXME,
JHCHRXMS;
public String value() {
return name();
}
public static GTSAbbreviationHolidaysChristianRoman fromValue(String v) {
return valueOf(v);
}
}
|
[
"andre.topazio@gmail.com"
] |
andre.topazio@gmail.com
|
bda64c0325536934d5c4ba7eba41767509cedf32
|
4854f4f21615128c025ff262c68e0bf83ce9c9f6
|
/app/src/main/java/com/kara4k/omertextest/presenter/mappers/ReadyPostMapper.java
|
a7503b04908868cd804f299893254858fdf78393
|
[] |
no_license
|
kara4k/OmertexTest
|
45a66c378d615a7ec39bef4f40285b3d33e4eaf9
|
3e83cbed187d1cd5d682005f36271be0d1cc9495
|
refs/heads/master
| 2021-07-21T19:52:26.641174
| 2017-10-30T20:34:12
| 2017-10-30T20:34:12
| 107,413,661
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 903
|
java
|
package com.kara4k.omertextest.presenter.mappers;
import com.kara4k.omertextest.model.photos.Urls;
import com.kara4k.omertextest.model.posts.Post;
import com.kara4k.omertextest.presenter.vo.ReadyPost;
import javax.inject.Inject;
import io.reactivex.annotations.NonNull;
import io.reactivex.functions.BiFunction;
public class ReadyPostMapper implements BiFunction<Post, Urls, ReadyPost> {
@Inject
public ReadyPostMapper() {
}
@Override
public ReadyPost apply(@NonNull Post post, @NonNull Urls urls) throws Exception {
ReadyPost readyPost = new ReadyPost();
readyPost.setId(post.getId());
readyPost.setUserId(post.getUserId());
readyPost.setTitle(post.getTitle());
readyPost.setBody(post.getBody());
readyPost.setThumbUrl(urls.getThumb());
readyPost.setPhotoSmallUrl(urls.getSmall());
return readyPost;
}
}
|
[
"kara4k@gmail.com"
] |
kara4k@gmail.com
|
923d3d8a4d40d451cd50c498f11102355b4e0359
|
c78424065d971cc7186e31f5119441e83985d882
|
/quickstart-spring-boot-netty-action/quickstart-spring-boot-netty-action-heartbeat-client/src/main/java/org/quickstart/spring/boot/netty/action/client/config/SwaggerConfig.java
|
510cd3df302933cb6a1a875fe9f5f10207563269
|
[
"Apache-2.0"
] |
permissive
|
youngzil/quickstart-spring-boot
|
9a1045978b861643f9b88435e9d41a0a5467a834
|
47045c0cb4ee0d67b0502c7b383cdda7f04ffe23
|
refs/heads/master
| 2023-07-25T03:10:42.986966
| 2022-08-25T15:53:30
| 2022-08-25T15:53:30
| 140,261,715
| 0
| 1
|
Apache-2.0
| 2023-07-07T21:41:30
| 2018-07-09T09:19:54
|
Java
|
UTF-8
|
Java
| false
| false
| 1,403
|
java
|
package org.quickstart.spring.boot.netty.action.client.config;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
@Configuration
@EnableSwagger2WebMvc
/** 是否打开swagger **/
@ConditionalOnExpression("'${swagger.enable}' == 'true'")
public class SwaggerConfig {
@Bean
public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors.basePackage("org.quickstart.spring.boot.netty.action.client.controller"))
.paths(PathSelectors.any())
.build();
}
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("sbc order api")
.description("sbc order api")
.termsOfServiceUrl("http://crossoverJie.top")
.contact("crossoverJie")
.version("1.0.0")
.build();
}
}
|
[
"youngzil@163.com"
] |
youngzil@163.com
|
d3bb2baff1307e413b0afb1cd5a639b80a87b3e2
|
cd78472786acb4884edf71242653b315f056ddf1
|
/LibreriaTeam/src/entities/Editore.java
|
a7406efc2fdce821219ea10259843b5387916b10
|
[] |
no_license
|
maboglia/Generation2021
|
e82684a394236b3d59c2cc3bad461718a2fbec39
|
bbb2c6819139cfa7494f61b350f0a114cda5f93f
|
refs/heads/main
| 2023-03-11T16:53:50.312631
| 2021-02-26T14:42:07
| 2021-02-26T14:42:07
| 317,784,687
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 727
|
java
|
package entities;
public class Editore {
private String nome;
private int id;
public Editore() {}
/**
* @param nome
* @param id
*/
public Editore(String nome, int id) {
super();
this.nome = nome;
this.id = id;
}
/**
* @return the nome
*/
public String getNome() {
return nome;
}
/**
* @param nome the nome to set
*/
public void setNome(String nome) {
this.nome = nome;
}
/**
* @return the id
*/
public int getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(int id) {
this.id = id;
}
@Override
public String toString() {
return "Editore [nome=" + nome + ", id=" + id + "]";
}
}
|
[
"mauro.bogliaccino@gmail.com"
] |
mauro.bogliaccino@gmail.com
|
89d6c5f9afc48565060d02c3949e656af6a8ae9d
|
a7c85a1e89063038e17ed2fa0174edf14dc9ed56
|
/coas-perf-tests/src/main/java/coas/perf/ComplexCondition100/Advice48.java
|
3ceeeaa78836242172bb52205e8731c12f4e2fd0
|
[] |
no_license
|
pmaslankowski/java-contracts
|
28b1a3878f68fdd759d88b341c8831716533d682
|
46518bb9a83050956e631faa55fcdf426589830f
|
refs/heads/master
| 2021-03-07T13:15:28.120769
| 2020-09-07T20:06:31
| 2020-09-07T20:06:31
| 246,267,189
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 609
|
java
|
package coas.perf.ComplexCondition100;
import pl.coas.api.Aspect;
import pl.coas.api.AspectClass;
import pl.coas.api.JoinPoint;
import pl.coas.api.Pointcut;
import coas.perf.ComplexCondition100.Subject100;
@AspectClass
public class Advice48 {
public static final Advice48 coas$aspect$instance = new Advice48();
public Object onTarget(JoinPoint jp) {
int res = (int) jp.proceed();
for (int i=0; i < 1000; i++) {
if (res % 2 == 0) {
res /= 2;
} else {
res = 2 * res + 1;
}
}
return res;
}
}
|
[
"pmaslankowski@gmail.com"
] |
pmaslankowski@gmail.com
|
8b12b316e8aede04cee506b9d9905f21587252c5
|
05948ca1cd3c0d2bcd65056d691c4d1b2e795318
|
/classes2/com/xiaoenai/app/classes/forum/ae.java
|
2381463a8699397b557da69d56d0551c65d41a86
|
[] |
no_license
|
waterwitness/xiaoenai
|
356a1163f422c882cabe57c0cd3427e0600ff136
|
d24c4d457d6ea9281a8a789bc3a29905b06002c6
|
refs/heads/master
| 2021-01-10T22:14:17.059983
| 2016-10-08T08:39:11
| 2016-10-08T08:39:11
| 70,317,042
| 0
| 8
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 450
|
java
|
package com.xiaoenai.app.classes.forum;
import com.xiaoenai.app.classes.common.dialog.v;
class ae
implements Runnable
{
ae(aa paramaa) {}
public void run()
{
this.a.d.l_();
if (this.a.a) {
ForumMineInfoActivity.d(this.a.d).dismiss();
}
}
}
/* Location: E:\apk\xiaoenai2\classes2-dex2jar.jar!\com\xiaoenai\app\classes\forum\ae.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
f6acaeb9b1257f66a03c4980f79ba6973764df6f
|
f072523c1391462970c174ef33133b4c4c981c42
|
/springboot-easypoi/src/main/java/com/thinkingcao/demo/easypoi/utils/ExcelUtils.java
|
890eba8770ffb56dfa3369b1f3bf0daf969894ee
|
[] |
no_license
|
Thinkingcao/SpringBootLearning
|
a689b522ac7fe2c4998097f553335e3126526b7d
|
4f3dd49c29baffb027c366884e1fdade165e6946
|
refs/heads/master
| 2022-06-29T16:04:14.605974
| 2022-05-19T13:42:22
| 2022-05-19T13:42:22
| 182,008,253
| 97
| 101
| null | 2022-06-21T04:15:31
| 2019-04-18T03:16:14
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 3,775
|
java
|
package com.thinkingcao.demo.easypoi.utils;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
//Excel导入导出工具类
public class ExcelUtils {
public static void exportExcel(List<?> list, String title, String sheetName, Class<?> pojoClass, String fileName,
boolean isCreateHeader, HttpServletResponse response) {
ExportParams exportParams = new ExportParams(title, sheetName);
exportParams.setCreateHeadRows(isCreateHeader);
defaultExport(list, pojoClass, fileName, response, exportParams);
}
public static void exportExcel(List<?> list, String title, String sheetName, Class<?> pojoClass, String fileName,
HttpServletResponse response) {
defaultExport(list, pojoClass, fileName, response, new ExportParams(title, sheetName));
}
public static void exportExcel(List<Map<String, Object>> list, String fileName, HttpServletResponse response) {
defaultExport(list, fileName, response);
}
private static void defaultExport(List<?> list, Class<?> pojoClass, String fileName, HttpServletResponse response,
ExportParams exportParams) {
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, pojoClass, list);
if (workbook != null)
;
downLoadExcel(fileName, response, workbook);
}
private static void downLoadExcel(String fileName, HttpServletResponse response, Workbook workbook) {
try {
response.setCharacterEncoding("UTF-8");
response.setHeader("content-Type", "application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
workbook.write(response.getOutputStream());
} catch (IOException e) {
// throw new NormalException(e.getMessage());
}
}
private static void defaultExport(List<Map<String, Object>> list, String fileName, HttpServletResponse response) {
Workbook workbook = ExcelExportUtil.exportExcel(list, ExcelType.HSSF);
if (workbook != null)
;
downLoadExcel(fileName, response, workbook);
}
public static <T> List<T> importExcel(String filePath, Integer titleRows, Integer headerRows, Class<T> pojoClass) {
if (StringUtils.isBlank(filePath)) {
return null;
}
ImportParams params = new ImportParams();
params.setTitleRows(titleRows);
params.setHeadRows(headerRows);
List<T> list = null;
try {
list = ExcelImportUtil.importExcel(new File(filePath), pojoClass, params);
} catch (NoSuchElementException e) {
// throw new NormalException("模板不能为空");
} catch (Exception e) {
e.printStackTrace();
// throw new NormalException(e.getMessage());
}
return list;
}
public static <T> List<T> importExcel(MultipartFile file, Integer titleRows, Integer headerRows,
Class<T> pojoClass) {
if (file == null) {
return null;
}
ImportParams params = new ImportParams();
params.setTitleRows(titleRows);
params.setHeadRows(headerRows);
List<T> list = null;
try {
list = ExcelImportUtil.importExcel(file.getInputStream(), pojoClass, params);
} catch (NoSuchElementException e) {
// throw new NormalException("excel文件不能为空");
} catch (Exception e) {
// throw new NormalException(e.getMessage());
System.out.println(e.getMessage());
}
return list;
}
}
|
[
"617271837@qq.com"
] |
617271837@qq.com
|
a776de40ce3107728f3286d394ef669d75662821
|
88734ecb79e25a12f9e37c3337b337445690cad4
|
/manager/api/beans/src/main/java/io/apiman/manager/api/beans/search/SearchCriteriaFilterBean.java
|
7c2b4a221b96d71af4884d3edcd78d4a9b7a2fe9
|
[
"Apache-2.0"
] |
permissive
|
mahom1985/apiman
|
cfadb4740a85975cbe1d99065545fc019a9c861c
|
8a5db162cce3c677f37706c0d988d5b600cf6d2a
|
refs/heads/master
| 2020-05-29T12:20:09.332672
| 2015-04-27T14:54:41
| 2015-04-27T14:54:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,296
|
java
|
/*
* Copyright 2014 JBoss Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.apiman.manager.api.beans.search;
import java.io.Serializable;
import org.jboss.errai.common.client.api.annotations.Portable;
/**
* Represents a single filter or search criteria. This is used when searching
* for beans.
*
* @author eric.wittmann@redhat.com
*/
@Portable
public class SearchCriteriaFilterBean implements Serializable {
private static final long serialVersionUID = -1199180207971619165L;
private String name;
private String value;
private SearchCriteriaFilterOperator operator;
/**
* Constructor.
*/
public SearchCriteriaFilterBean() {
}
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the value
*/
public String getValue() {
return value;
}
/**
* @param value the value to set
*/
public void setValue(String value) {
this.value = value;
}
/**
* @return the operator
*/
public SearchCriteriaFilterOperator getOperator() {
return operator;
}
/**
* @param operator the operator to set
*/
public void setOperator(SearchCriteriaFilterOperator operator) {
this.operator = operator;
}
/**
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result + ((operator == null) ? 0 : operator.hashCode());
result = prime * result + ((value == null) ? 0 : value.hashCode());
return result;
}
/**
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
SearchCriteriaFilterBean other = (SearchCriteriaFilterBean) obj;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (operator == null) {
if (other.operator != null)
return false;
} else if (!operator.equals(other.operator))
return false;
if (value == null) {
if (other.value != null)
return false;
} else if (!value.equals(other.value))
return false;
return true;
}
}
|
[
"eric.wittmann@gmail.com"
] |
eric.wittmann@gmail.com
|
c88f0c1b020432e94d47fdced6fd40d4a63f99d2
|
8e43ac077f62bf582724b3fa78227dbff97eb009
|
/spring-cloud-config-client/src/main/java/com/spring/microservice/web/controller/TestController.java
|
5209e4928198d0b018e1525541be68fd284725ed
|
[] |
no_license
|
gudanrenao/my-spring-cloud-demo
|
4de4789dbf9f03ecc4c432dea9d3b271bbae16a8
|
2a865f9a53aa3d94146a756e3fca10d2cbc18f36
|
refs/heads/master
| 2020-04-26T23:04:12.942241
| 2019-03-14T06:50:15
| 2019-03-14T06:50:15
| 173,891,191
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 794
|
java
|
package com.spring.microservice.web.controller;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
/**
* @Description
* @Author ZWen
* @Date 2019/2/22 6:12 PM
* @Version 1.0
**/
@RestController
public class TestController {
private final Environment environment;
public TestController(Environment environment) {
this.environment = environment;
}
@GetMapping("/test")
public String test() {
return "SUCCESS";
}
@GetMapping("/env/get/{name}")
public String getEnvironment(@PathVariable String name){
return environment.getProperty(name);
}
}
|
[
"zhangwenit@126.com"
] |
zhangwenit@126.com
|
b512de63fd52b40184359b89ed555692b1a2583e
|
9f68540857f4233e06b9a9bdaa2f6a186cf4f583
|
/src/com/android/settings/EditPinPreference.java
|
b55460eafdd513afec402a9bacbf77c105ca8ce9
|
[
"Apache-2.0"
] |
permissive
|
Ankits-lab/packages_apps_Settings
|
142dc865ff5ba0a5502b36fc4176f096231c3181
|
82cbefb9817e5b244bb50fdaffbe0f90381f269c
|
refs/heads/main
| 2023-01-12T04:07:58.863359
| 2020-11-14T09:36:09
| 2020-11-14T09:36:09
| 312,785,971
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,586
|
java
|
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settings;
import android.app.Dialog;
import android.content.Context;
import android.text.InputType;
import android.util.AttributeSet;
import android.view.View;
import android.widget.EditText;
import com.android.settingslib.CustomEditTextPreferenceCompat;
/**
* TODO: Add a soft dialpad for PIN entry.
*/
class EditPinPreference extends CustomEditTextPreferenceCompat {
interface OnPinEnteredListener {
void onPinEntered(EditPinPreference preference, boolean positiveResult);
}
private OnPinEnteredListener mPinListener;
public EditPinPreference(Context context, AttributeSet attrs) {
super(context, attrs);
}
public EditPinPreference(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
public void setOnPinEnteredListener(OnPinEnteredListener listener) {
mPinListener = listener;
}
@Override
protected void onBindDialogView(View view) {
super.onBindDialogView(view);
final EditText editText = (EditText) view.findViewById(android.R.id.edit);
if (editText != null) {
editText.setInputType(InputType.TYPE_CLASS_NUMBER |
InputType.TYPE_NUMBER_VARIATION_PASSWORD);
editText.setTextAlignment(View.TEXT_ALIGNMENT_VIEW_START);
}
}
public boolean isDialogOpen() {
Dialog dialog = getDialog();
return dialog != null && dialog.isShowing();
}
@Override
protected void onDialogClosed(boolean positiveResult) {
super.onDialogClosed(positiveResult);
if (mPinListener != null) {
mPinListener.onPinEntered(this, positiveResult);
}
}
public void showPinDialog() {
Dialog dialog = getDialog();
if (dialog == null || !dialog.isShowing()) {
onClick();
}
}
}
|
[
"keneankit01@gmail.com"
] |
keneankit01@gmail.com
|
f4059067ff02fe0f508549044752917d72ced844
|
edf4f46f7b473ce341ba292f84e3d1760218ebd1
|
/third_party/android/platform-libcore/android-platform-libcore/luni/src/test/java/tests/api/javax/net/ssl/SSLHandshakeExceptionTest.java
|
d6f44fe0059a31c86d4df63c3426fef8061fe32d
|
[
"LicenseRef-scancode-unicode",
"MIT",
"ICU",
"W3C",
"CPL-1.0",
"W3C-19980720",
"LicenseRef-scancode-newlib-historical",
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-proprietary-license"
] |
permissive
|
openweave/openweave-core
|
7e7e6f6c089e2e8015a8281f74fbdcaf4aca5d2a
|
e3c8ca3d416a2e1687d6f5b7cec0b7d0bf1e590e
|
refs/heads/master
| 2022-11-01T17:21:59.964473
| 2022-08-10T16:36:19
| 2022-08-10T16:36:19
| 101,915,019
| 263
| 125
|
Apache-2.0
| 2022-10-17T18:48:30
| 2017-08-30T18:22:10
|
C++
|
UTF-8
|
Java
| false
| false
| 2,599
|
java
|
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package tests.api.javax.net.ssl;
import dalvik.annotation.TestTargetClass;
import dalvik.annotation.TestTargets;
import dalvik.annotation.TestLevel;
import dalvik.annotation.TestTargetNew;
import javax.net.ssl.SSLHandshakeException;
import junit.framework.TestCase;
@TestTargetClass(SSLHandshakeException.class)
public class SSLHandshakeExceptionTest extends TestCase {
private static String[] msgs = {
"",
"Check new message",
"Check new message Check new message Check new message Check new message Check new message" };
/**
* Test for <code>SSLHandshakeException(String)</code> constructor Assertion:
* constructs SSLHandshakeException with detail message msg. Parameter
* <code>msg</code> is not null.
*/
@TestTargetNew(
level = TestLevel.PARTIAL_COMPLETE,
notes = "",
method = "SSLHandshakeException",
args = {java.lang.String.class}
)
public void test_Constructor01() {
SSLHandshakeException sslE;
for (int i = 0; i < msgs.length; i++) {
sslE = new SSLHandshakeException(msgs[i]);
assertEquals("getMessage() must return: ".concat(msgs[i]), sslE.getMessage(), msgs[i]);
assertNull("getCause() must return null", sslE.getCause());
}
}
/**
* Test for <code>SSLHandshakeException(String)</code> constructor Assertion:
* constructs SSLHandshakeException with detail message msg. Parameter
* <code>msg</code> is null.
*/
@TestTargetNew(
level = TestLevel.PARTIAL_COMPLETE,
notes = "",
method = "SSLHandshakeException",
args = {java.lang.String.class}
)
public void test_Constructor02() {
String msg = null;
SSLHandshakeException sslE = new SSLHandshakeException(msg);
assertNull("getMessage() must return null.", sslE.getMessage());
assertNull("getCause() must return null", sslE.getCause());
}
}
|
[
"rszewczyk@nestlabs.com"
] |
rszewczyk@nestlabs.com
|
f3fb39229bedeb2df95547c1e0f60f94450ea025
|
82dd89952b4092235616207691a7e56132d4a6c9
|
/compiler/src/main/java/at/yawk/yarn/compiler/process/reference/TypeFilterProcessor.java
|
2b75637e797c34160457798bdc1960336a713793
|
[] |
no_license
|
yawkat/yarn
|
b6b448b0a206cbc1037257a6d318e2fb03a8b9bb
|
96294be752a7f391b58a6453c94122dea087141f
|
refs/heads/master
| 2021-01-10T01:22:17.721634
| 2015-06-26T16:12:47
| 2015-06-26T16:13:52
| 36,084,350
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,531
|
java
|
package at.yawk.yarn.compiler.process.reference;
import at.yawk.yarn.compiler.*;
import at.yawk.yarn.compiler.Compiler;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import javax.lang.model.element.*;
import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.TypeKind;
import javax.lang.model.type.TypeMirror;
/**
* @author yawkat
*/
public class TypeFilterProcessor implements LookupBeanReferenceProcessor {
@Override
public void process(Compiler compiler, LookupBeanReference reference) {
TypeMirror type = reference.getType();
ExecutableElement functional;
if (type.getKind() == TypeKind.DECLARED) {
Optional<ExecutableElement> found =
findFunctionalInterfaceMethod((TypeElement) ((DeclaredType) type).asElement());
functional = found == null ? null : found.orElse(null);
} else {
functional = null;
}
reference.addFilter(provider -> {
if (provider instanceof BeanDefinition) {
return Util.inherits(type, ((BeanDefinition) provider).getType());
}
if (provider instanceof BeanMethod) {
if (functional != null) {
BeanMethod method = (BeanMethod) provider;
List<TypeMirror> present = method.getParameterTypes();
List<? extends VariableElement> expected = functional.getParameters();
if (Util.inherits(functional.getReturnType(), method.getReturnType()) &&
present.size() == expected.size()) {
for (int i = 0; i < present.size(); i++) {
if (!Util.inherits(present.get(i), expected.get(i).asType())) {
return false;
}
}
return true;
}
}
}
return false;
});
}
/**
* @return filled: only abstract interface method <br>
* empty: no abstract interface method found <br>
* null: too many interface methods found or not an interface
*/
private static Optional<ExecutableElement> findFunctionalInterfaceMethod(TypeElement element) {
if (element.getKind() != ElementKind.INTERFACE) { return null; }
ExecutableElement match = null;
for (Element enclosed : Util.getEnclosedElementsWithParents(element)) {
if (enclosed.getKind() != ElementKind.METHOD) { continue; }
Set<Modifier> modifiers = enclosed.getModifiers();
if (!modifiers.contains(Modifier.ABSTRACT)) { continue; }
if (match != null) {
// too many found
return null;
}
match = (ExecutableElement) enclosed;
}
for (TypeMirror itf : element.getInterfaces()) {
Optional<ExecutableElement> superMatch = findFunctionalInterfaceMethod(
(TypeElement) ((DeclaredType) itf).asElement());
if (superMatch == null) {
// fail-fast in super
return null;
}
if (superMatch.isPresent()) {
// multiple matches, not functional
// todo: overridden now-default methods?
if (match != null) { return null; }
match = superMatch.get();
}
}
return Optional.ofNullable(match);
}
}
|
[
"me@yawk.at"
] |
me@yawk.at
|
4c8dad2aac84d3284dbe3175acfea429a11c628b
|
bc5b4ba58d5bc5c5fa17c39d6e09cc30293c018d
|
/app/src/main/java/com/kaqi/niuniu/ireader/ui/base/BaseMVPActivity.java
|
aa4649a6918677a5a8f8de9d564c90eb078f1bb5
|
[
"Apache-2.0"
] |
permissive
|
nances/INNBook
|
9bf533ff4a00e709952c0a3f16498636f5fff832
|
9729177ee5c9ee7153c6249bcea6b8d49d7a8842
|
refs/heads/master
| 2020-05-17T00:51:41.618413
| 2019-07-24T08:13:49
| 2019-07-24T08:13:49
| 183,406,972
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 585
|
java
|
package com.kaqi.niuniu.ireader.ui.base;
/**
* Created by newbiechen on 17-4-25.
*/
public abstract class BaseMVPActivity<T extends BaseContract.BasePresenter> extends BaseActivity{
protected T mPresenter;
protected abstract T bindPresenter();
@Override
protected void processLogic() {
attachView(bindPresenter());
}
private void attachView(T presenter){
mPresenter = presenter;
mPresenter.attachView(this);
}
@Override
protected void onDestroy() {
super.onDestroy();
mPresenter.detachView();
}
}
|
[
"niqiao1111@163.com"
] |
niqiao1111@163.com
|
e91e7ee26788f15cf706c6887a1ea57d0be31046
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes11.dex_source_from_JADX/com/facebook/pages/fb4a/videohub/graphql/VideoHub.java
|
238422fd2a9e26eb661fb52ba58c8d38a40f9727
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,993
|
java
|
package com.facebook.pages.fb4a.videohub.graphql;
import com.facebook.graphql.query.TypedGraphQlQueryString;
import com.facebook.pages.fb4a.videohub.graphql.VideoHubModels.PageVideoHubQueryModel;
import com.google.common.collect.RegularImmutableSet;
/* compiled from: profile/%s/aboutpage?is_combined=%b&v=7 */
public final class VideoHub {
/* compiled from: profile/%s/aboutpage?is_combined=%b&v=7 */
public class PageVideoHubQueryString extends TypedGraphQlQueryString<PageVideoHubQueryModel> {
public PageVideoHubQueryString() {
super(PageVideoHubQueryModel.class, false, "PageVideoHubQuery", "155f3c5e487df8a885669ba4c130cc24", "node", "10154561741366729", RegularImmutableSet.a);
}
public final String m4148a(String str) {
switch (str.hashCode()) {
case -1925666883:
return "4";
case -1773565470:
return "9";
case -1606466720:
return "3";
case -1597296023:
return "6";
case -826475764:
return "7";
case -803548981:
return "0";
case -631654088:
return "8";
case -561505403:
return "13";
case 420666299:
return "1";
case 421050507:
return "10";
case 571910232:
return "2";
case 580042479:
return "12";
case 651215103:
return "14";
case 819250700:
return "5";
case 1939875509:
return "11";
default:
return str;
}
}
}
public static final PageVideoHubQueryString m4149a() {
return new PageVideoHubQueryString();
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
fb37c0e9d079692fbd70087e204723e185340680
|
6b02314363105c21c440ef166834a4e66ac2689e
|
/src/main/java/com/springboot/Annotation/MYRequestParam.java
|
d77e92e680eb8942c4afcaa3c57712d9b3b0ec30
|
[] |
no_license
|
chy2z/myspringboot
|
45a1c0c34836f3b60cd9949bfe97fc575f8f2c1f
|
98a58d851cbdfef9aae14ab05481e54c54633243
|
refs/heads/master
| 2022-03-14T13:15:55.764056
| 2022-02-24T13:40:44
| 2022-02-24T13:40:44
| 129,182,409
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 573
|
java
|
package com.springboot.Annotation;
import java.lang.annotation.*;
/**
* 参数注解
*/
@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface MYRequestParam {
/**
* name 和 value 是同一个
* @return
*/
@MYAliasFor("name")
String value() default "";
/**
* name 和 value 是同一个
* @return
*/
@MYAliasFor("value")
String name() default "";
boolean required() default true;
String defaultValue() default "\n\t\t\n\t\t\n\ue000\ue001\ue002\n\t\t\t\t\n";
}
|
[
"chenghy.js@eakay.cn"
] |
chenghy.js@eakay.cn
|
7f2b3e7781c1a8faea3a8aa3dc00b4782a944c00
|
73e9a535bdf1da43207fa7e46381574627185de5
|
/Work Item Management System - OOP Final Project/src/main/java/com/telerikacademy/workItemManagement/commands/addingCommands/AddCommentToWorkItem.java
|
d3de2433cbe462d32661f78a97693e69ec47c796
|
[] |
no_license
|
yavoryankov83/Java_Projects
|
ef9d1782fa93d620e85877c9d65bcc41ec36c43a
|
03bef26ce2111d850fed96874b006a94d0478994
|
refs/heads/master
| 2021-06-28T10:53:34.534170
| 2019-11-19T01:33:33
| 2019-11-19T01:33:33
| 174,329,281
| 0
| 0
| null | 2020-10-13T14:44:29
| 2019-03-07T11:12:15
|
Java
|
UTF-8
|
Java
| false
| false
| 3,200
|
java
|
package com.telerikacademy.workItemManagement.commands.addingCommands;
import com.telerikacademy.workItemManagement.commands.common.Validator;
import com.telerikacademy.workItemManagement.commands.contracts.Command;
import com.telerikacademy.workItemManagement.core.contracts.ModelsFactory;
import com.telerikacademy.workItemManagement.core.contracts.ModelsRepository;
import com.telerikacademy.workItemManagement.models.contracts.*;
import java.util.List;
import java.util.stream.Collectors;
import static com.telerikacademy.workItemManagement.commands.common.CommandConstants.*;
public class AddCommentToWorkItem implements Command {
private static final int CORRECT_NUMBER_OF_ARGUMENTS = 3;
private ModelsRepository modelsRepository;
private ModelsFactory modelsFactory;
public AddCommentToWorkItem(ModelsRepository modelsRepository, ModelsFactory modelsFactory) {
this.modelsRepository = modelsRepository;
this.modelsFactory = modelsFactory;
}
@Override
public String execute(String... parameters) {
Validator.validateCommandArgumentsCount(
parameters,
CORRECT_NUMBER_OF_ARGUMENTS,
String.format(
INVALID_NUMBER_OF_ARGUMENTS_MESSAGE,
CORRECT_NUMBER_OF_ARGUMENTS,
parameters.length));
long workItemId = Long.parseLong(parameters[0]);
String authorName = parameters[1];
String message = parameters[2];
return addCommentToWorkItem(workItemId, authorName, message);
}
private String addCommentToWorkItem(long workItemId, String authorName, String message) {
if (!modelsRepository.getAllWorkItems().containsKey(workItemId)) {
throw new IllegalArgumentException(String.format(WORK_ITEM_NOT_EXISTS_MESSAGE, workItemId));
}
if (!modelsRepository.getAllMembers().containsKey(authorName)) {
throw new IllegalArgumentException(String.format(MEMBER_NOT_EXIST_MESSAGE, authorName));
}
String teamName = modelsRepository.getMembersAssignedToTeam().get(authorName);
Team team = modelsRepository.getAllTeams().get(teamName);
List<WorkItem> workItemsToAddComment = team.getBoards()
.stream()
.flatMap(board -> board.getWorkItems()
.stream()
.filter(workItem -> workItem.getId() == workItemId))
.collect(Collectors.toList());
if (workItemsToAddComment.isEmpty()) {
return String.format(AUTHOR_AND_WORKITEM_NOT_IN_SAME_TEAM_MESSAGE,
authorName,
workItemId);
}
WorkItem workItemToAddComment = workItemsToAddComment.get(0);
Member member = modelsRepository.getAllMembers().get(authorName);
Comment comment = modelsFactory.createComment(member, message);
workItemToAddComment.addComment(comment);
workItemToAddComment.addToActivityHistory(
String.format(
COMMENT_CREATED_SUCCESS_MESSAGE,
authorName,
workItemId));
member.addToActivityHistory(String.format(COMMENT_CREATED_SUCCESS_MESSAGE, authorName, workItemId));
return String.format(COMMENT_CREATED_SUCCESS_MESSAGE, authorName, workItemId);
}
}
|
[
"yavoryankov83@gmail.com"
] |
yavoryankov83@gmail.com
|
77033668a74ef993a05e070edbd211471e8c8ec9
|
4a8c69bb63e19d525abe3e9253c1560d6043fb74
|
/anychart/src/main/java/com/anychart/anychart/Iterator.java
|
c1e3f4104ba72e10c1728e9e6ec984bf6e7905f6
|
[] |
no_license
|
SeppPenner/AnyChart-Android
|
180e120edbc5e0120f73b71fc6d6bd99ed0b4498
|
e657ae1b30ff8f9d982e18bf9a5a7aa71e3488a5
|
refs/heads/master
| 2020-03-13T21:37:02.890929
| 2018-04-23T03:18:42
| 2018-04-23T03:18:42
| 131,300,064
| 2
| 0
| null | 2018-04-27T13:28:22
| 2018-04-27T13:28:22
| null |
UTF-8
|
Java
| false
| false
| 2,993
|
java
|
package com.anychart.anychart;
import java.util.Locale;
import java.util.Arrays;
import java.util.List;
import java.util.ArrayList;
import android.text.TextUtils;
// class
/**
* <b>anychart.data.Iterator</b> class is used to work with data in a View.<br/>
The iterator allows getting data from a {@link anychart.data.View} by crawling through rows. Iterator
can be obtained using {@link anychart.data.View#getIterator} method and has methods to control current
index and get values from data/metadata fields in a current row.
*/
public class Iterator extends JsObject {
public Iterator() {
js.setLength(0);
js.append("var iterator").append(++variableIndex).append(" = anychart.data.iterator();");
jsBase = "iterator" + variableIndex;
}
protected Iterator(String jsBase) {
js.setLength(0);
this.jsBase = jsBase;
}
protected Iterator(StringBuilder js, String jsBase, boolean isChain) {
this.js = js;
this.jsBase = jsBase;
this.isChain = isChain;
}
protected String getJsBase() {
return jsBase;
}
private String name;
/**
* Sets metadata value by the field name.
*/
public Iterator setMeta(String name) {
if (jsBase == null) {
this.name = name;
} else {
this.name = name;
if (!isChain) {
js.append(jsBase);
isChain = true;
}
js.append(String.format(Locale.US, ".meta(%s)", wrapQuotes(name)));
if (isRendered) {
onChangeListener.onChange(String.format(Locale.US, jsBase + ".meta(%s);", wrapQuotes(name)));
js.setLength(0);
}
}
return this;
}
private Number index;
/**
* Sets a passed index as the current index and returns it in case of success.
*/
public void setSelect(Number index) {
if (jsBase == null) {
this.index = index;
} else {
this.index = index;
if (isChain) {
js.append(";");
isChain = false;
}
js.append(String.format(Locale.US, "var " + ++variableIndex + " = " + jsBase + ".select(%s);", index));
if (isRendered) {
onChangeListener.onChange(String.format(Locale.US, jsBase + ".select(%s);", index));
js.setLength(0);
}
}
}
protected String generateJsGetters() {
StringBuilder jsGetters = new StringBuilder();
jsGetters.append(super.generateJsGetters());
return jsGetters.toString();
}
@Override
protected String generateJs() {
if (isChain) {
js.append(";");
isChain = false;
}
js.append(generateJsGetters());
String result = js.toString();
js.setLength(0);
return result;
}
}
|
[
"arsenymalkov@gmail.com"
] |
arsenymalkov@gmail.com
|
54a05350c5e0bfd5e791449f2bf47a618d301616
|
f3728b756bb03c4d74fc81a39dd29c639a6e9903
|
/Code/src/extended/chapter_5_stringproblem/Problem_21_PalindromeMinCut.java
|
aee550c5e63ce2a09a023bebd17f6348ff86082c
|
[] |
no_license
|
dongyfengfff/Sword-pointing-to-offer
|
be497e4202ea24b2ba9924a8609fc49759635676
|
3f2f128ab76521d5ca9babb9d586f63417639557
|
refs/heads/master
| 2021-07-12T17:03:55.276870
| 2017-10-14T02:36:50
| 2017-10-14T02:36:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,064
|
java
|
package extended.chapter_5_stringproblem;
/**
* Author: zhangxin
* Time: 2017/1/16 0016.
* Desc: 回文最少分割数
* ACDCDCDAD => A CDCDC DAD
* 动态规划?
* 切分的方法:如果当前遍历到dp[i],假设在j位置:i <= j < len,有str[i...j]是回文串
* dp[i]的值可能是:dp[j-1]+1,dp[j+1]代表剩下的str[j+1..len-1],1代表str[i...j]本身就是回文
* 那么这样就需要让j在i...len-1的位置上进行枚举,找到最小的情况;即 dp[i] = Min{dp[j+1]+1(i<=j<len,且str[i...j]必须是回文)}
* 那如果判定str[i..j]是回文呢?此时有需要一个布尔二维数组,p[][],其实只用到了一般三角的位置;p[i][j]表示str[i..j]是否回文
* 如果p[i][j]为true:有以下三种情况:
* str[i...j]:由一个字符组成;
* str[i...j]:由两个相同的字符组成
* str[i...j]:str[i+1...j-1]是true&&str[i]==str[j];
*/
public class Problem_21_PalindromeMinCut {
public static int minCut(String str) {
if (str == null || str.equals("")) {
return 0;
}
char[] chas = str.toCharArray();
int len = chas.length;
//动态规划数组; dp[i]的含义是子串str[i...len-1]至少需要几次才能切成回文子串,dp[0]就是最后结果;
int[] dp = new int[len + 1];
//初始化,最后dp[len]其实是在第一次i=len-1,j=i时,使用min()中来使用的;
//TODO:可以从len-2开始,dp[len-1]直接设置成0就可以吧;
dp[len] = -1;
//
boolean[][] p = new boolean[len][len];
for (int i = len - 1; i >= 0; i--) {
dp[i] = Integer.MAX_VALUE; //初始化值为最大值;
for (int j = i; j < len; j++) {
//i和j两头相等&&(j-i<2||两头内部是回文);回文必须要求两头相等==>i和j,这是必须的;
if (chas[i] == chas[j] && (j - i < 2 || p[i + 1][j - 1])) {
p[i][j] = true;
dp[i] = Math.min(dp[i], dp[j + 1] + 1);
}
}
}
return dp[0];
}
}
|
[
"zachaxy@163.com"
] |
zachaxy@163.com
|
c0894ea071de885630c780976fd56c156cc4f941
|
9049eabb2562cd3e854781dea6bd0a5e395812d3
|
/sources/com/google/android/gms/accountsettings/p007mg/poc/p008ui/view/BottomNavMenuScrollView.java
|
0cd0d0fe2b23fa1abd89a13bac4de9b1a10e3082
|
[] |
no_license
|
Romern/gms_decompiled
|
4c75449feab97321da23ecbaac054c2303150076
|
a9c245404f65b8af456b7b3440f48d49313600ba
|
refs/heads/master
| 2022-07-17T23:22:00.441901
| 2020-05-17T18:26:16
| 2020-05-17T18:26:16
| 264,227,100
| 2
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,339
|
java
|
package com.google.android.gms.accountsettings.p007mg.poc.p008ui.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.OverScroller;
import android.widget.ScrollView;
/* renamed from: com.google.android.gms.accountsettings.mg.poc.ui.view.BottomNavMenuScrollView */
/* compiled from: :com.google.android.gms@201515033@20.15.15 (120300-306758586) */
public class BottomNavMenuScrollView extends ScrollView {
/* renamed from: a */
public int f7782a;
/* renamed from: b */
public int f7783b;
/* renamed from: c */
public boolean f7784c;
/* renamed from: d */
public exk f7785d;
/* renamed from: e */
private final OverScroller f7786e;
/* renamed from: f */
private float f7787f;
public BottomNavMenuScrollView(Context context) {
super(context);
this.f7786e = new OverScroller(context);
}
/* renamed from: a */
private final boolean m4981a(int i) {
if (i < Math.round(((float) this.f7782a) * 0.75f)) {
post(new exz(this));
return true;
} else if (i < this.f7782a) {
post(new eya(this));
return true;
} else if (i >= this.f7783b) {
return false;
} else {
post(new eyb(this));
return true;
}
}
public final void fling(int i) {
int height = getHeight();
this.f7786e.fling(getScrollX(), getScrollY(), 0, i, 0, 0, 0, Math.max(0, getChildAt(0).getHeight() - height));
if (!m4981a(this.f7786e.getFinalY())) {
super.fling(i);
}
}
public final boolean onTouchEvent(MotionEvent motionEvent) {
boolean z = true;
if (motionEvent.getAction() == 0 || motionEvent.getAction() == 2) {
if (motionEvent.getY() >= this.f7787f) {
z = false;
}
this.f7784c = z;
this.f7787f = motionEvent.getY();
} else if (motionEvent.getAction() == 1 && m4981a(getScrollY())) {
return true;
}
return super.onTouchEvent(motionEvent);
}
public BottomNavMenuScrollView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.f7786e = new OverScroller(context);
}
}
|
[
"roman.karwacik@rwth-aachen.de"
] |
roman.karwacik@rwth-aachen.de
|
c3bdc7d268f599dcd855a97efaa636dadb27dbfd
|
e56870ece3b7b99c95778166226572ee2711de05
|
/net/minecraft/world/level/levelgen/feature/treedecorators/WorldGenFeatureTreeBeehive.java
|
91efe34d35a68df153b5d8a0369360ac31c08e73
|
[] |
no_license
|
Black-Hole/mc-dev
|
e5e499fd11d4cab0f33ac2812404a5ca2a76dc8e
|
9fdd00a0a6f440445632f65920c075e23be7fa92
|
refs/heads/master
| 2023-06-21T13:28:09.851862
| 2023-06-12T23:39:23
| 2023-06-13T01:45:16
| 141,016,166
| 4
| 1
| null | 2018-07-15T09:56:12
| 2018-07-15T09:56:11
| null |
UTF-8
|
Java
| false
| false
| 4,103
|
java
|
package net.minecraft.world.level.levelgen.feature.treedecorators;
import com.mojang.serialization.Codec;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import net.minecraft.core.BlockPosition;
import net.minecraft.core.EnumDirection;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.RandomSource;
import net.minecraft.world.entity.EntityTypes;
import net.minecraft.world.level.block.BlockBeehive;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.entity.TileEntityTypes;
import net.minecraft.world.level.block.state.IBlockData;
public class WorldGenFeatureTreeBeehive extends WorldGenFeatureTree {
public static final Codec<WorldGenFeatureTreeBeehive> CODEC = Codec.floatRange(0.0F, 1.0F).fieldOf("probability").xmap(WorldGenFeatureTreeBeehive::new, (worldgenfeaturetreebeehive) -> {
return worldgenfeaturetreebeehive.probability;
}).codec();
private static final EnumDirection WORLDGEN_FACING = EnumDirection.SOUTH;
private static final EnumDirection[] SPAWN_DIRECTIONS = (EnumDirection[]) EnumDirection.EnumDirectionLimit.HORIZONTAL.stream().filter((enumdirection) -> {
return enumdirection != WorldGenFeatureTreeBeehive.WORLDGEN_FACING.getOpposite();
}).toArray((i) -> {
return new EnumDirection[i];
});
private final float probability;
public WorldGenFeatureTreeBeehive(float f) {
this.probability = f;
}
@Override
protected WorldGenFeatureTrees<?> type() {
return WorldGenFeatureTrees.BEEHIVE;
}
@Override
public void place(WorldGenFeatureTree.a worldgenfeaturetree_a) {
RandomSource randomsource = worldgenfeaturetree_a.random();
if (randomsource.nextFloat() < this.probability) {
List<BlockPosition> list = worldgenfeaturetree_a.leaves();
List<BlockPosition> list1 = worldgenfeaturetree_a.logs();
int i = !list.isEmpty() ? Math.max(((BlockPosition) list.get(0)).getY() - 1, ((BlockPosition) list1.get(0)).getY() + 1) : Math.min(((BlockPosition) list1.get(0)).getY() + 1 + randomsource.nextInt(3), ((BlockPosition) list1.get(list1.size() - 1)).getY());
List<BlockPosition> list2 = (List) list1.stream().filter((blockposition) -> {
return blockposition.getY() == i;
}).flatMap((blockposition) -> {
Stream stream = Stream.of(WorldGenFeatureTreeBeehive.SPAWN_DIRECTIONS);
Objects.requireNonNull(blockposition);
return stream.map(blockposition::relative);
}).collect(Collectors.toList());
if (!list2.isEmpty()) {
Collections.shuffle(list2);
Optional<BlockPosition> optional = list2.stream().filter((blockposition) -> {
return worldgenfeaturetree_a.isAir(blockposition) && worldgenfeaturetree_a.isAir(blockposition.relative(WorldGenFeatureTreeBeehive.WORLDGEN_FACING));
}).findFirst();
if (!optional.isEmpty()) {
worldgenfeaturetree_a.setBlock((BlockPosition) optional.get(), (IBlockData) Blocks.BEE_NEST.defaultBlockState().setValue(BlockBeehive.FACING, WorldGenFeatureTreeBeehive.WORLDGEN_FACING));
worldgenfeaturetree_a.level().getBlockEntity((BlockPosition) optional.get(), TileEntityTypes.BEEHIVE).ifPresent((tileentitybeehive) -> {
int j = 2 + randomsource.nextInt(2);
for (int k = 0; k < j; ++k) {
NBTTagCompound nbttagcompound = new NBTTagCompound();
nbttagcompound.putString("id", BuiltInRegistries.ENTITY_TYPE.getKey(EntityTypes.BEE).toString());
tileentitybeehive.storeBee(nbttagcompound, randomsource.nextInt(599), false);
}
});
}
}
}
}
}
|
[
"black-hole@live.com"
] |
black-hole@live.com
|
e01784417fa95e5626a9dc45d5fe991c4bb34c6c
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-13303-2-28-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/display/internal/DocumentContentDisplayer_ESTest.java
|
2daa92537e8513fac3032b607505d14c3a6e2d4b
|
[] |
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
| 581
|
java
|
/*
* This file was automatically generated by EvoSuite
* Tue Apr 07 22:50:08 UTC 2020
*/
package org.xwiki.display.internal;
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 DocumentContentDisplayer_ESTest extends DocumentContentDisplayer_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
60213311bf343cffb1862f835dced3433a7b3c68
|
c4a14d70951d7ec5aac7fe7ebb2db891cfe6c0b1
|
/modulos/apps/LOCALGIS-Model/src/main/java/com/geopista/model/ExportMapBean.java
|
7a573157bae827284e2858baa0f2c47a917cba5a
|
[] |
no_license
|
pepeysusmapas/allocalgis
|
925756321b695066775acd012f9487cb0725fcde
|
c14346d877753ca17339f583d469dbac444ffa98
|
refs/heads/master
| 2020-09-14T20:15:26.459883
| 2016-09-27T10:08:32
| 2016-09-27T10:08:32
| null | 0
| 0
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 1,764
|
java
|
/**
* ExportMapBean.java
* © MINETUR, Government of Spain
* This program is part of LocalGIS
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.geopista.model;
import java.util.Hashtable;
import com.geopista.protocol.administrador.Entidad;
public class ExportMapBean implements java.io.Serializable{
private String name;
private int srid;
private String id_map;
private Entidad entidad;
private Hashtable<String, ExportLayersFamilyBean> htLayers = new Hashtable();
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getId_map() {
return id_map;
}
public void setId_map(String id_map) {
this.id_map = id_map;
}
public Entidad getEntidad() {
return entidad;
}
public void setEntidad(Entidad entidad) {
this.entidad = entidad;
}
public Hashtable<String, ExportLayersFamilyBean> getHtLayers() {
return htLayers;
}
public void setHtLayers(Hashtable<String, ExportLayersFamilyBean> htLayers) {
this.htLayers = htLayers;
}
public int getSrid() {
return srid;
}
public void setSrid(int srid) {
this.srid = srid;
}
}
|
[
"jorge.martin@cenatic.es"
] |
jorge.martin@cenatic.es
|
f0d30356da78314d09e7fa77f1cdc918d39c8b62
|
69e3c6e8c2986094bdf9eb0aed360d02937903d7
|
/dom/src/main/java/org/isisaddons/module/security/dom/role/ApplicationRoles.java
|
b222e7e49a4e3d2defc265a9565d4e2520c4c46c
|
[
"Apache-2.0",
"ISC"
] |
permissive
|
leanddrot/isis-module-security
|
acddc6ecbd26a6055021dc12f33c227f28115178
|
e1b2cea07da66ba2b77d1cd4e178b8f6077f512b
|
refs/heads/master
| 2020-12-26T17:35:30.419261
| 2014-09-04T19:07:43
| 2014-09-04T19:07:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,359
|
java
|
/*
* Copyright 2014 Dan Haywood
*
* 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.isisaddons.module.security.dom.role;
import java.util.List;
import org.apache.isis.applib.AbstractFactoryAndRepository;
import org.apache.isis.applib.annotation.*;
import org.apache.isis.applib.annotation.ActionSemantics.Of;
import org.apache.isis.applib.query.QueryDefault;
import org.apache.isis.objectstore.jdo.applib.service.JdoColumnLength;
@Named("Roles")
@DomainService(menuOrder = "90.2", repositoryFor = ApplicationRole.class)
public class ApplicationRoles extends AbstractFactoryAndRepository {
public String iconName() {
return "applicationRole";
}
@MemberOrder(sequence = "20.1")
@ActionSemantics(Of.SAFE)
public ApplicationRole findRoleByName(
final @Named("Name") @TypicalLength(ApplicationRole.TYPICAL_LENGTH_NAME) @MaxLength(ApplicationRole.MAX_LENGTH_NAME) String name) {
return uniqueMatch(new QueryDefault<>(ApplicationRole.class, "findByName", "name", name));
}
@MemberOrder(sequence = "20.2")
@ActionSemantics(Of.NON_IDEMPOTENT)
public ApplicationRole newRole(
final @Named("Name") @TypicalLength(ApplicationRole.TYPICAL_LENGTH_NAME) @MaxLength(ApplicationRole.MAX_LENGTH_NAME) String name,
final @Named("Description") @Optional @TypicalLength(ApplicationRole.TYPICAL_LENGTH_DESCRIPTION) @MaxLength(JdoColumnLength.DESCRIPTION) String description) {
ApplicationRole role = newTransientInstance(ApplicationRole.class);
role.setName(name);
role.setDescription(description);
persist(role);
return role;
}
@MemberOrder(sequence = "20.3")
@ActionSemantics(Of.SAFE)
public List<ApplicationRole> allRoles() {
return allInstances(ApplicationRole.class);
}
}
|
[
"dan@haywood-associates.co.uk"
] |
dan@haywood-associates.co.uk
|
946a53cb58d34a0c9ace1bf1bd121bc3363d075b
|
7291377a5a469f73579e946c1cd5e85ff76262f9
|
/Game/Caro AI/CaroV3/src/t3h/other/GUI.java
|
612f223e7047c397f0174d8e1b0d485db8e4f1f6
|
[] |
no_license
|
HrBbCi/Netbean
|
487fb25b14c449fc88f34dd88ebd9f5768b0a5e5
|
1e3fdab1b43c0cb7e3f2e0b58d816a59b2f9a137
|
refs/heads/master
| 2020-07-11T20:42:04.057658
| 2019-08-27T06:55:35
| 2019-08-27T06:55:35
| 204,639,423
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,462
|
java
|
/*
* Decompiled with CFR 0_102.
*/
package com.t3h.other;
import com.t3h.other.AutoPlay;
import com.t3h.other.GamePlay;
import com.t3h.other.Menu;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.LayoutManager;
import java.awt.Toolkit;
import javax.swing.JFrame;
public class GUI
extends JFrame {
public static final int WIDTH_FRAME = 1200;
public static final int HEIGHT_FRAME = 630;
private Menu menu;
private GamePlay gamePlay;
private AutoPlay autoPlay;
public GUI() {
this.setBounds((int)(this.getToolkit().getScreenSize().getWidth() - 1200.0) / 2, (int)(this.getToolkit().getScreenSize().getHeight() - 630.0) / 2, 1200, 630);
this.setDefaultCloseOperation(3);
this.setLayout(new CardLayout());
this.setResizable(false);
this.menu = new Menu();
this.menu.setGui(this);
this.add(this.menu);
this.gamePlay = new GamePlay();
this.gamePlay.setGui(this);
this.gamePlay.setVisible(false);
this.add(this.gamePlay);
this.autoPlay = new AutoPlay();
this.autoPlay.setGui(this);
this.autoPlay.setVisible(false);
this.add(this.autoPlay);
}
public void setTwoPlayer() {
this.gamePlay.setVisible(true);
}
public void setFa() {
this.autoPlay.setVisible(true);
}
public void setMenu() {
this.menu.setVisible(true);
}
}
|
[
"kienbtptit@gmail.com"
] |
kienbtptit@gmail.com
|
48a30e7238ad6d866d819ddab86cf78735de6f24
|
fe06f97c2cf33a8b4acb7cb324b79a6cb6bb9dac
|
/java/dao/impl/EHU_SACT/T5110dDAOImpl.java
|
949186f73b613e8060fc837127f697127b55c7b1
|
[] |
no_license
|
HeimlichLin/TableSchema
|
3f67dae0b5b169ee3a1b34837ea9a2d34265f175
|
64b66a2968c3a169b75d70d9e5cf75fa3bb65354
|
refs/heads/master
| 2023-02-11T09:42:47.210289
| 2023-02-01T02:58:44
| 2023-02-01T02:58:44
| 196,526,843
| 0
| 0
| null | 2022-06-29T18:53:55
| 2019-07-12T07:03:58
|
Java
|
UTF-8
|
Java
| false
| false
| 4,483
|
java
|
package com.doc.common.dao.impl;
public class T5110dDAOImpl extends GeneralDAOImpl<T5110dPo> implements T5110dDAO {
public static final T5110dDAOImpl INSTANCE = new T5110dDAOImpl();
public static final String TABLENAME = "T5110D";
public T5110dDAOImpl() {
super(TABLENAME);
}
protected static final MapConverter<T5110dPo> CONVERTER = new MapConverter<T5110dPo>() {
@Override
public T5110dPo convert(final DataObject dataObject) {
final T5110dPo t5110dPo = new T5110dPo();
t5110dPo.setDutyno(dataObject.getString(T5110dPo.COLUMNS.DUTYNO.name()));
t5110dPo.setMwb(dataObject.getString(T5110dPo.COLUMNS.MWB.name()));
t5110dPo.setHwb(dataObject.getString(T5110dPo.COLUMNS.HWB.name()));
t5110dPo.setPaymethord(dataObject.getString(T5110dPo.COLUMNS.PAYMETHORD.name()));
t5110dPo.setDuty(BigDecimalUtils.formObj(dataObject.getValue(T5110dPo.COLUMNS.DUTY.name())));
t5110dPo.setLastupdate(TimestampUtils.of(dataObject.getValue(T5110dPo.COLUMNS.LASTUPDATE.name())));
t5110dPo.setPaymethod2(dataObject.getString(T5110dPo.COLUMNS.PAYMETHOD2.name()));
t5110dPo.setPaymethod3(dataObject.getString(T5110dPo.COLUMNS.PAYMETHOD3.name()));
t5110dPo.setPaymethod4(dataObject.getString(T5110dPo.COLUMNS.PAYMETHOD4.name()));
t5110dPo.setPaymethod5(dataObject.getString(T5110dPo.COLUMNS.PAYMETHOD5.name()));
t5110dPo.setPaymethod6(dataObject.getString(T5110dPo.COLUMNS.PAYMETHOD6.name()));
t5110dPo.setPaymethod7(dataObject.getString(T5110dPo.COLUMNS.PAYMETHOD7.name()));
t5110dPo.setPaymethod8(dataObject.getString(T5110dPo.COLUMNS.PAYMETHOD8.name()));
t5110dPo.setPaymethod9(dataObject.getString(T5110dPo.COLUMNS.PAYMETHOD9.name()));
t5110dPo.setDuty2(dataObject.getString(T5110dPo.COLUMNS.DUTY2.name()));
t5110dPo.setDuty3(dataObject.getString(T5110dPo.COLUMNS.DUTY3.name()));
t5110dPo.setDuty4(dataObject.getString(T5110dPo.COLUMNS.DUTY4.name()));
t5110dPo.setDuty5(dataObject.getString(T5110dPo.COLUMNS.DUTY5.name()));
t5110dPo.setDuty6(dataObject.getString(T5110dPo.COLUMNS.DUTY6.name()));
t5110dPo.setDuty7(dataObject.getString(T5110dPo.COLUMNS.DUTY7.name()));
t5110dPo.setDuty8(dataObject.getString(T5110dPo.COLUMNS.DUTY8.name()));
t5110dPo.setDuty9(dataObject.getString(T5110dPo.COLUMNS.DUTY9.name()));
return t5110dPo;
}
@Override
public DataObject toDataObject(final T5110dPo t5110dPo) {
final DataObject dataObject = new DataObject();
dataObject.setValue(T5110dPo.COLUMNS.DUTYNO.name(), t5110dPo.getDutyno());
dataObject.setValue(T5110dPo.COLUMNS.MWB.name(), t5110dPo.getMwb());
dataObject.setValue(T5110dPo.COLUMNS.HWB.name(), t5110dPo.getHwb());
dataObject.setValue(T5110dPo.COLUMNS.PAYMETHORD.name(), t5110dPo.getPaymethord());
dataObject.setValue(T5110dPo.COLUMNS.DUTY.name(), t5110dPo.getDuty());
dataObject.setValue(T5110dPo.COLUMNS.LASTUPDATE.name(), t5110dPo.getLastupdate());
dataObject.setValue(T5110dPo.COLUMNS.PAYMETHOD2.name(), t5110dPo.getPaymethod2());
dataObject.setValue(T5110dPo.COLUMNS.PAYMETHOD3.name(), t5110dPo.getPaymethod3());
dataObject.setValue(T5110dPo.COLUMNS.PAYMETHOD4.name(), t5110dPo.getPaymethod4());
dataObject.setValue(T5110dPo.COLUMNS.PAYMETHOD5.name(), t5110dPo.getPaymethod5());
dataObject.setValue(T5110dPo.COLUMNS.PAYMETHOD6.name(), t5110dPo.getPaymethod6());
dataObject.setValue(T5110dPo.COLUMNS.PAYMETHOD7.name(), t5110dPo.getPaymethod7());
dataObject.setValue(T5110dPo.COLUMNS.PAYMETHOD8.name(), t5110dPo.getPaymethod8());
dataObject.setValue(T5110dPo.COLUMNS.PAYMETHOD9.name(), t5110dPo.getPaymethod9());
dataObject.setValue(T5110dPo.COLUMNS.DUTY2.name(), t5110dPo.getDuty2());
dataObject.setValue(T5110dPo.COLUMNS.DUTY3.name(), t5110dPo.getDuty3());
dataObject.setValue(T5110dPo.COLUMNS.DUTY4.name(), t5110dPo.getDuty4());
dataObject.setValue(T5110dPo.COLUMNS.DUTY5.name(), t5110dPo.getDuty5());
dataObject.setValue(T5110dPo.COLUMNS.DUTY6.name(), t5110dPo.getDuty6());
dataObject.setValue(T5110dPo.COLUMNS.DUTY7.name(), t5110dPo.getDuty7());
dataObject.setValue(T5110dPo.COLUMNS.DUTY8.name(), t5110dPo.getDuty8());
dataObject.setValue(T5110dPo.COLUMNS.DUTY9.name(), t5110dPo.getDuty9());
return dataObject;
}
};
public MapConverter<T5110dPo> getConverter() {
return CONVERTER;
}
@Override
public SqlWhere getPkSqlWhere(T5110dPo po) {
throw new ApBusinessException("無pk不支援");
}
}
|
[
"jerry.l@acer.com"
] |
jerry.l@acer.com
|
fe3e82725fd1de89fbbd50bb7c5e3cbac52c8cb4
|
41fe59ea9a363730543d8d9d1b475546e2fd4e08
|
/src/main/java/com/wewebu/expression/language/OwExprException.java
|
a16d6632df1591ad30c4486d7902f80f696cee32
|
[] |
no_license
|
flashboss/workdesk
|
49a8c99e864edf121a31f2b043803ef0e36af633
|
fcf280c918c7d895d55be166e32c7c214045d367
|
refs/heads/master
| 2016-08-11T05:37:44.452860
| 2015-05-22T14:56:27
| 2015-05-22T14:56:27
| 36,077,649
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 865
|
java
|
package com.wewebu.expression.language;
/**
*<p>
* OwExprException.
*</p>
*
*<p><font size="-2">
* Alfresco Workdesk<br/>
* Copyright (c) Alfresco Software, Inc.<br/>
* All rights reserved.<br/>
* <br/>
* For licensing information read the license.txt file or<br/>
* go to: http://wiki.alfresco.com<br/>
*</font></p>
*/
public class OwExprException extends Exception
{
/**
*
*/
private static final long serialVersionUID = 5178777258210357773L;
public OwExprException()
{
super();
}
public OwExprException(String message_p, Throwable cause_p)
{
super(message_p, cause_p);
}
public OwExprException(String message_p)
{
super(message_p);
}
public OwExprException(Throwable cause_p)
{
super(cause_p);
}
}
|
[
"luca.stancapiano@pronetics.it"
] |
luca.stancapiano@pronetics.it
|
a12f81e871068a64532625a3dd726178f158a7cb
|
d3d1258ace8814eb0fea0077bd0554cab0d206d0
|
/src/test/java/com/puc/tcc/scheduler/SchedulerApplicationTests.java
|
bd11fb52096dd33bd18610137cbe1012663a01cc
|
[] |
no_license
|
matheustf/tcc-scheduler
|
4a9446b0b8e42606eb66fab4b19ff3bf51f19450
|
c33c6d5875df728763f07270be2a5206b2c13ea4
|
refs/heads/master
| 2020-03-27T04:18:29.405774
| 2018-10-16T12:50:17
| 2018-10-16T12:50:17
| 145,929,336
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 341
|
java
|
package com.puc.tcc.scheduler;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class SchedulerApplicationTests {
@Test
public void contextLoads() {
}
}
|
[
"teles.matheus@hotmail.com"
] |
teles.matheus@hotmail.com
|
e416af8f1dad3932ba4efcab707eeaf51fda6d87
|
79595075622ded0bf43023f716389f61d8e96e94
|
/app/src/main/java/com/android/internal/telephony/cat/ItemsIconId.java
|
9a2a669832f00f675c403579c0d074556ec93785
|
[] |
no_license
|
dstmath/OppoR15
|
96f1f7bb4d9cfad47609316debc55095edcd6b56
|
b9a4da845af251213d7b4c1b35db3e2415290c96
|
refs/heads/master
| 2020-03-24T16:52:14.198588
| 2019-05-27T02:24:53
| 2019-05-27T02:24:53
| 142,840,716
| 7
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 300
|
java
|
package com.android.internal.telephony.cat;
/* compiled from: CommandDetails */
class ItemsIconId extends ValueObject {
int[] recordNumbers;
boolean selfExplanatory;
ItemsIconId() {
}
ComprehensionTlvTag getTag() {
return ComprehensionTlvTag.ITEM_ICON_ID_LIST;
}
}
|
[
"toor@debian.toor"
] |
toor@debian.toor
|
b15a1904e4c10e8fa1d6245860346968d0940819
|
a280aa9ac69d3834dc00219e9a4ba07996dfb4dd
|
/regularexpress/home/weilaidb/work/app/hadoop-2.7.3-src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/test/java/org/apache/hadoop/mapred/TestShuffleHandler.java
|
b62c2e659891e69f48cba5fc5b7278bdcf97cd0c
|
[] |
no_license
|
weilaidb/PythonExample
|
b2cc6c514816a0e1bfb7c0cbd5045cf87bd28466
|
798bf1bdfdf7594f528788c4df02f79f0f7827ce
|
refs/heads/master
| 2021-01-12T13:56:19.346041
| 2017-07-22T16:30:33
| 2017-07-22T16:30:33
| 68,925,741
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,664
|
java
|
package org.apache.hadoop.mapred;
import static org.apache.hadoop.test.MetricsAsserts.assertCounter;
import static org.apache.hadoop.test.MetricsAsserts.assertGauge;
import static org.apache.hadoop.test.MetricsAsserts.getMetrics;
import static org.apache.hadoop.test.MockitoMaker.make;
import static org.apache.hadoop.test.MockitoMaker.stub;
import static org.junit.Assert.assertTrue;
import static org.jboss.netty.buffer.ChannelBuffers.wrappedBuffer;
import static org.jboss.netty.handler.codec.http.HttpResponseStatus.OK;
import static org.jboss.netty.handler.codec.http.HttpVersion.HTTP_1_1;
import static org.junit.Assert.assertEquals;
import static org.junit.Assume.assumeTrue;
import java.io.DataInputStream;
import java.io.EOFException;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.SocketException;
import java.net.URL;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.zip.CheckedOutputStream;
import java.util.zip.Checksum;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.FileUtil;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.DataOutputBuffer;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.nativeio.NativeIO;
import org.apache.hadoop.mapreduce.TypeConverter;
import org.apache.hadoop.mapreduce.security.SecureShuffleUtils;
import org.apache.hadoop.mapreduce.security.token.JobTokenIdentifier;
import org.apache.hadoop.mapreduce.security.token.JobTokenSecretManager;
import org.apache.hadoop.mapreduce.task.reduce.ShuffleHeader;
import org.apache.hadoop.metrics2.MetricsRecordBuilder;
import org.apache.hadoop.metrics2.MetricsSource;
import org.apache.hadoop.metrics2.MetricsSystem;
import org.apache.hadoop.metrics2.impl.MetricsSystemImpl;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.security.token.Token;
import org.apache.hadoop.service.ServiceStateException;
import org.apache.hadoop.util.PureJavaCrc32;
import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.yarn.api.records.ApplicationId;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.hadoop.yarn.server.api.ApplicationInitializationContext;
import org.apache.hadoop.yarn.server.api.ApplicationTerminationContext;
import org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ContainerLocalizer;
import org.apache.hadoop.yarn.server.records.Version;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelFuture;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.ChannelStateEvent;
import org.jboss.netty.channel.socket.SocketChannel;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.AbstractChannel;
import org.jboss.netty.handler.codec.http.DefaultHttpResponse;
import org.jboss.netty.handler.codec.http.HttpRequest;
import org.jboss.netty.handler.codec.http.HttpResponse;
import org.jboss.netty.handler.codec.http.HttpResponseStatus;
import org.jboss.netty.handler.codec.http.HttpMethod;
import org.junit.Assert;
import org.junit.Test;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.mockito.Mockito;
import org.mortbay.jetty.HttpHeaders;
public class TestShuffleHandler
|
[
"weilaidb@localhost.localdomain"
] |
weilaidb@localhost.localdomain
|
61b0d693ba0fa559ab15df30bc19335d4b2eea0f
|
c18ca0ee85f21ef5e9890db9bb70ab8bb114200a
|
/JAVA Prgramming/cam3/src/de/must/applet/HTMLDialogOpener.java
|
813b7eeddf5bbef5a056f776f6f431fba648f267
|
[] |
no_license
|
f1lm/MS-2014-Boise-State-University
|
a3032b8b9e13303cdb3b4cb0001eddfd0d1cbffe
|
9d87f14e48a5c51a8a3ebfb0e010a493faf70576
|
refs/heads/master
| 2020-04-15T15:17:48.031552
| 2015-03-18T01:37:30
| 2015-03-18T01:37:30
| 32,502,472
| 1
| 1
| null | 2015-03-19T05:19:57
| 2015-03-19T05:19:56
| null |
UTF-8
|
Java
| false
| false
| 1,788
|
java
|
/*
* Copyright (c) 2012 Christoph Mueller. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY CHRISTOPH MUELLER ``AS IS'' AND ANY
* EXPRESSED 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 CHRISTOPH MUELLER OR
* HIS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package de.must.applet;
import java.net.MalformedURLException;
import java.net.URL;
import de.must.io.Logger;
public class HTMLDialogOpener {
public HTMLDialogOpener(String dialogId) {
String urlString = AppletGlobal.getInstance().getCodeBase() + Constants.MAIN_SERVLET;
urlString += "?" + Constants.SESSION + "=" + AppletGlobal.getInstance().sessionId;
urlString += "&" + Constants.HTML_DIALOG_ID + "=" + dialogId;
try {
AppletGlobal.getInstance().getAppletContext().showDocument(new URL(urlString), "_blank");
} catch (MalformedURLException e) {
Logger.getInstance().error(getClass(), e);
}
}
}
|
[
"milsonmun@yahoo.com"
] |
milsonmun@yahoo.com
|
e4e6f69cd46c82a5cb69bc2e4241f47b712d0aed
|
b77be0b0e6b3ea59e8208a5980601729a198f4d1
|
/app/src/main/java/com/google/android/gms/drive/query/internal/NotFilter.java
|
3c970d002ceea4a793fc2db744807bc5fd2241e7
|
[] |
no_license
|
jotaxed/Final
|
72bece24fb2e59ee5d604b6aca5d90656d2a7170
|
f625eb81e99a23e959c9d0ec6b0419a3b795977a
|
refs/heads/master
| 2020-04-13T11:50:14.498334
| 2018-12-26T13:46:17
| 2018-12-26T13:46:17
| 163,185,048
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 785
|
java
|
package com.google.android.gms.drive.query.internal;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.drive.query.Filter;
public class NotFilter extends AbstractFilter {
public static final Creator<NotFilter> CREATOR = new k();
final int CK;
final FilterHolder Sv;
NotFilter(int versionCode, FilterHolder toNegate) {
this.CK = versionCode;
this.Sv = toNegate;
}
public NotFilter(Filter toNegate) {
this(1, new FilterHolder(toNegate));
}
public <T> T a(f<T> fVar) {
return fVar.j(this.Sv.getFilter().a(fVar));
}
public int describeContents() {
return 0;
}
public void writeToParcel(Parcel out, int flags) {
k.a(this, out, flags);
}
}
|
[
"jotaxed@gmail.com"
] |
jotaxed@gmail.com
|
abefeaf439e881644a8518e61708c354d678e825
|
0efd81befd1445937adf7ad76ea9b0f32b5f625d
|
/.history/CodeForces/NapoleanCake_20210316092602.java
|
1075cf5473bec4582ecf3eeaf0b27e47e2dc995e
|
[] |
no_license
|
Aman-kulshreshtha/100DaysOfCode
|
1a080eb36a65c50b7e18db7c4eac508c3f51e2c4
|
be4cb2fd80cfe5b7e2996eed0a35ad7f390813c1
|
refs/heads/main
| 2023-03-23T07:11:26.924928
| 2021-03-21T16:16:46
| 2021-03-21T16:16:46
| 346,999,930
| 0
| 0
| null | 2021-03-12T09:41:46
| 2021-03-12T08:49:46
| null |
UTF-8
|
Java
| false
| false
| 622
|
java
|
import java.util.*;
public class NapoleanCake {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-- > 0) {
int n = sc.nextInt();
var cake = new ArrayDeque<Boolean>();
for(int i = 0 ; i < n ; i++) {
cake.addFirst(false);
int cream = sc.nextInt();
if(cream > cake.size()) {
for(int j = 0 ; j < cake.size(); j++) {
}
}
}
}
sc.close();
System.exit(0);
}
}
|
[
"aman21102000@gmail.com"
] |
aman21102000@gmail.com
|
c1f4ef8a5753a07074bd2ac4b61c7fc682246592
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/model_seeding/55_lavalamp-net.sf.lavalamp.site.LoginFailedException-1.0-8/net/sf/lavalamp/site/LoginFailedException_ESTest_scaffolding.java
|
04b9a990bcf8ef180ee341870a65f0c38c332fdf
|
[] |
no_license
|
tigerqiu712/evosuite-model-seeding-empirical-evaluation
|
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
|
11a920b8213d9855082d3946233731c843baf7bc
|
refs/heads/master
| 2020-12-23T21:04:12.152289
| 2019-10-30T08:02:29
| 2019-10-30T08:02:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 547
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Oct 25 23:34:29 GMT 2019
*/
package net.sf.lavalamp.site;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class LoginFailedException_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
a060792642a856d2c9c324adbbb303cb77476582
|
52c36ce3a9d25073bdbe002757f08a267abb91c6
|
/src/main/java/com/alipay/api/request/AlipaySamsungEbppRechargeRequest.java
|
2655778f81b97bc4da2d8722f25b1d3d5a6e701e
|
[
"Apache-2.0"
] |
permissive
|
itc7/alipay-sdk-java-all
|
d2f2f2403f3c9c7122baa9e438ebd2932935afec
|
c220e02cbcdda5180b76d9da129147e5b38dcf17
|
refs/heads/master
| 2022-08-28T08:03:08.497774
| 2020-05-27T10:16:10
| 2020-05-27T10:16:10
| 267,271,062
| 0
| 0
|
Apache-2.0
| 2020-05-27T09:02:04
| 2020-05-27T09:02:04
| null |
UTF-8
|
Java
| false
| false
| 5,608
|
java
|
package com.alipay.api.request;
import java.util.Map;
import com.alipay.api.AlipayRequest;
import com.alipay.api.internal.util.AlipayHashMap;
import com.alipay.api.response.AlipaySamsungEbppRechargeResponse;
import com.alipay.api.AlipayObject;
/**
* ALIPAY API: alipay.samsung.ebpp.recharge request
*
* @author auto create
* @since 1.0, 2019-03-08 15:29:11
*/
public class AlipaySamsungEbppRechargeRequest implements AlipayRequest<AlipaySamsungEbppRechargeResponse> {
private AlipayHashMap udfParams; // add user-defined text parameters
private String apiVersion="1.0";
/**
* 设备唯一值
*/
private String apdId;
/**
* 手机位置信息
*/
private String cellId;
/**
* apdid对应的设备信息key
*/
private String deviceInfoToken;
/**
* 商户输入的扩展信息
*/
private String exparam;
/**
* 商户用户的无线设备的终端信息
*/
private String imei;
/**
* 客户端IP
*/
private String ip;
/**
* 基站LAC
*/
private String lacId;
/**
* 业务来源
*/
private String loginFrom;
/**
* 设备mac信息
*/
private String mac;
/**
* 设备的安全支付标识
*/
private String tid;
/**
* 设备umid信息
*/
private String umid;
/**
* wifi上的mac地址
*/
private String wirelessMac;
public void setApdId(String apdId) {
this.apdId = apdId;
}
public String getApdId() {
return this.apdId;
}
public void setCellId(String cellId) {
this.cellId = cellId;
}
public String getCellId() {
return this.cellId;
}
public void setDeviceInfoToken(String deviceInfoToken) {
this.deviceInfoToken = deviceInfoToken;
}
public String getDeviceInfoToken() {
return this.deviceInfoToken;
}
public void setExparam(String exparam) {
this.exparam = exparam;
}
public String getExparam() {
return this.exparam;
}
public void setImei(String imei) {
this.imei = imei;
}
public String getImei() {
return this.imei;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getIp() {
return this.ip;
}
public void setLacId(String lacId) {
this.lacId = lacId;
}
public String getLacId() {
return this.lacId;
}
public void setLoginFrom(String loginFrom) {
this.loginFrom = loginFrom;
}
public String getLoginFrom() {
return this.loginFrom;
}
public void setMac(String mac) {
this.mac = mac;
}
public String getMac() {
return this.mac;
}
public void setTid(String tid) {
this.tid = tid;
}
public String getTid() {
return this.tid;
}
public void setUmid(String umid) {
this.umid = umid;
}
public String getUmid() {
return this.umid;
}
public void setWirelessMac(String wirelessMac) {
this.wirelessMac = wirelessMac;
}
public String getWirelessMac() {
return this.wirelessMac;
}
private String terminalType;
private String terminalInfo;
private String prodCode;
private String notifyUrl;
private String returnUrl;
private boolean needEncrypt=false;
private AlipayObject bizModel=null;
public String getNotifyUrl() {
return this.notifyUrl;
}
public void setNotifyUrl(String notifyUrl) {
this.notifyUrl = notifyUrl;
}
public String getReturnUrl() {
return this.returnUrl;
}
public void setReturnUrl(String returnUrl) {
this.returnUrl = returnUrl;
}
public String getApiVersion() {
return this.apiVersion;
}
public void setApiVersion(String apiVersion) {
this.apiVersion = apiVersion;
}
public void setTerminalType(String terminalType){
this.terminalType=terminalType;
}
public String getTerminalType(){
return this.terminalType;
}
public void setTerminalInfo(String terminalInfo){
this.terminalInfo=terminalInfo;
}
public String getTerminalInfo(){
return this.terminalInfo;
}
public void setProdCode(String prodCode) {
this.prodCode=prodCode;
}
public String getProdCode() {
return this.prodCode;
}
public String getApiMethodName() {
return "alipay.samsung.ebpp.recharge";
}
public Map<String, String> getTextParams() {
AlipayHashMap txtParams = new AlipayHashMap();
txtParams.put("apd_id", this.apdId);
txtParams.put("cell_id", this.cellId);
txtParams.put("device_info_token", this.deviceInfoToken);
txtParams.put("exparam", this.exparam);
txtParams.put("imei", this.imei);
txtParams.put("ip", this.ip);
txtParams.put("lac_id", this.lacId);
txtParams.put("login_from", this.loginFrom);
txtParams.put("mac", this.mac);
txtParams.put("tid", this.tid);
txtParams.put("umid", this.umid);
txtParams.put("wireless_mac", this.wirelessMac);
if(udfParams != null) {
txtParams.putAll(this.udfParams);
}
return txtParams;
}
public void putOtherTextParam(String key, String value) {
if(this.udfParams == null) {
this.udfParams = new AlipayHashMap();
}
this.udfParams.put(key, value);
}
public Class<AlipaySamsungEbppRechargeResponse> getResponseClass() {
return AlipaySamsungEbppRechargeResponse.class;
}
public boolean isNeedEncrypt() {
return this.needEncrypt;
}
public void setNeedEncrypt(boolean needEncrypt) {
this.needEncrypt=needEncrypt;
}
public AlipayObject getBizModel() {
return this.bizModel;
}
public void setBizModel(AlipayObject bizModel) {
this.bizModel=bizModel;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
8e156f36eb2b4082f3123707573f09fa6df360b2
|
bb375e9fce8cff772cd5b1929b4a96721c6ca49d
|
/App02_Activity/src/com/huwl/oracle/app02_activity/SmallActivity.java
|
504619027d492570db8702ec931b17976ab6b798
|
[] |
no_license
|
chenqilin70/Practice
|
916d58b62ffcd36952bb569605eb498fd38fd9d7
|
95fab26da4add2ac253ea3f65ae334023b09e7de
|
refs/heads/master
| 2021-01-23T16:13:19.952843
| 2017-08-02T09:38:48
| 2017-08-02T09:38:48
| 93,285,863
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 351
|
java
|
package com.huwl.oracle.app02_activity;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
public class SmallActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_small);
}
}
|
[
"kylinchen85@foxmail.com"
] |
kylinchen85@foxmail.com
|
b9aff1c38a301fc1d1367840b33ead0d6ef1f644
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/test/com/facebook/share/internal/ShareContentValidationTest.java
|
05af1553af2dd23ff3fd91253edc108b835f40b3
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 7,574
|
java
|
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
* copy, modify, and distribute this software in source code or binary form for use
* in connection with the web services and APIs provided by Facebook.
*
* As with any software that integrates with the Facebook platform, your use of
* this software is subject to the Facebook Developer Principles and Policies
* [http://developers.facebook.com/policy/]. This copyright notice shall be
* included in all copies or substantial portions of the software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.facebook.share.internal;
import SharePhotoContent.Builder;
import com.facebook.FacebookException;
import com.facebook.FacebookPowerMockTestCase;
import com.facebook.internal.Validate;
import com.facebook.share.model.ShareOpenGraphAction;
import com.facebook.share.model.ShareOpenGraphContent;
import com.facebook.share.model.SharePhoto;
import com.facebook.share.model.SharePhotoContent;
import com.facebook.share.model.ShareVideoContent;
import org.junit.Test;
import org.powermock.core.classloader.annotations.PrepareForTest;
/**
* Tests for {@link ShareContentValidation}
*/
@PrepareForTest(Validate.class)
public class ShareContentValidationTest extends FacebookPowerMockTestCase {
// Share by Message
@Test(expected = FacebookException.class)
public void testItValidatesNullForMessage() {
ShareContentValidation.validateForMessage(null);
}
// -PhotoContent
@Test(expected = FacebookException.class)
public void testItValidatesNullImageForPhotoShareByMessage() {
SharePhotoContent.Builder spcBuilder = new SharePhotoContent.Builder();
SharePhoto sharePhoto = new SharePhoto.Builder().setImageUrl(null).setBitmap(null).build();
SharePhotoContent sharePhotoContent = spcBuilder.addPhoto(sharePhoto).build();
ShareContentValidation.validateForMessage(sharePhotoContent);
}
@Test(expected = FacebookException.class)
public void testItValidatesEmptyListOfPhotoForPhotoShareByMessage() {
SharePhotoContent sharePhoto = new SharePhotoContent.Builder().build();
ShareContentValidation.validateForMessage(sharePhoto);
}
@Test(expected = FacebookException.class)
public void testItValidatesMaxSizeOfPhotoShareByMessage() {
SharePhotoContent sharePhotoContent = new SharePhotoContent.Builder().addPhoto(buildSharePhoto("https://facebook.com/awesome-1.gif")).addPhoto(buildSharePhoto("https://facebook.com/awesome-2.gif")).addPhoto(buildSharePhoto("https://facebook.com/awesome-3.gif")).addPhoto(buildSharePhoto("https://facebook.com/awesome-4.gif")).addPhoto(buildSharePhoto("https://facebook.com/awesome-5.gif")).addPhoto(buildSharePhoto("https://facebook.com/awesome-6.gif")).addPhoto(buildSharePhoto("https://facebook.com/awesome-7.gif")).build();
ShareContentValidation.validateForMessage(sharePhotoContent);
}
// -ShareVideoContent
@Test(expected = FacebookException.class)
public void testItValidatesEmptyPreviewPhotoForShareVideoContentByMessage() {
ShareVideoContent sharePhoto = new ShareVideoContent.Builder().setPreviewPhoto(null).build();
ShareContentValidation.validateForMessage(sharePhoto);
}
// -ShareOpenGraphContent
@Test(expected = FacebookException.class)
public void testItValidatesShareOpenGraphWithNoActionByMessage() {
ShareOpenGraphContent shareOpenGraphContent = new ShareOpenGraphContent.Builder().setAction(null).build();
ShareContentValidation.validateForMessage(shareOpenGraphContent);
}
@Test(expected = FacebookException.class)
public void testItValidateShareOpenGraphWithNoTypeByMessage() {
ShareOpenGraphAction shareOpenGraphAction = new ShareOpenGraphAction.Builder().setActionType(null).build();
ShareOpenGraphContent shareOpenGraphContent = new ShareOpenGraphContent.Builder().setAction(shareOpenGraphAction).build();
ShareContentValidation.validateForMessage(shareOpenGraphContent);
}
@Test(expected = FacebookException.class)
public void testItValidatesShareOpenGraphWithPreviewPropertyNameByMessage() {
ShareOpenGraphAction shareOpenGraphAction = new ShareOpenGraphAction.Builder().setActionType("foo").build();
ShareOpenGraphContent shareOpenGraphContent = new ShareOpenGraphContent.Builder().setAction(shareOpenGraphAction).build();
ShareContentValidation.validateForMessage(shareOpenGraphContent);
}
// Share by Native (Is the same as Message)
@Test(expected = FacebookException.class)
public void testItValidatesNullContentForNativeShare() {
ShareContentValidation.validateForNativeShare(null);
}
// Share by Web
@Test(expected = FacebookException.class)
public void testItValidatesNullContentForWebShare() {
ShareContentValidation.validateForWebShare(null);
}
@Test
public void testItDoesAcceptSharePhotoContentByWeb() {
SharePhoto sharePhoto = buildSharePhoto("https://facebook.com/awesome.gif");
SharePhotoContent sharePhotoContent = new SharePhotoContent.Builder().addPhoto(sharePhoto).build();
ShareContentValidation.validateForWebShare(sharePhotoContent);
}
@Test(expected = FacebookException.class)
public void testItDoesNotAcceptShareVideoContentByWeb() {
SharePhoto previewPhoto = buildSharePhoto("https://facebook.com/awesome.gif");
ShareVideoContent shareVideoContent = new ShareVideoContent.Builder().setPreviewPhoto(previewPhoto).build();
ShareContentValidation.validateForWebShare(shareVideoContent);
}
// Share by Api
@Test(expected = FacebookException.class)
public void testItValidatesNullContentForApiShare() {
ShareContentValidation.validateForApiShare(null);
}
@Test(expected = FacebookException.class)
public void testItValidatesNullImageForSharePhotoContentByApi() {
SharePhotoContent.Builder spcBuilder = new SharePhotoContent.Builder();
SharePhoto sharePhoto = new SharePhoto.Builder().setImageUrl(null).build();
SharePhotoContent sharePhotoContent = spcBuilder.addPhoto(sharePhoto).build();
ShareContentValidation.validateForApiShare(sharePhotoContent);
}
@Test
public void testItAcceptsShareOpenGraphContent() {
String actionKey = "foo";
String actionValue = "fooValue";
ShareOpenGraphAction shareOpenGraphAction = new ShareOpenGraphAction.Builder().putString(actionKey, actionValue).setActionType(actionKey).build();
ShareOpenGraphContent shareOpenGraphContent = new ShareOpenGraphContent.Builder().setPreviewPropertyName(actionKey).setAction(shareOpenGraphAction).build();
ShareContentValidation.validateForMessage(shareOpenGraphContent);
ShareContentValidation.validateForNativeShare(shareOpenGraphContent);
ShareContentValidation.validateForApiShare(shareOpenGraphContent);
ShareContentValidation.validateForWebShare(shareOpenGraphContent);
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
4bf4e9eb55964e289587c291681c6400d6660624
|
0fe74e907299056870718b6dc498b0bb6d94fd15
|
/maalr.spring.core/src/main/java/de/uni_koeln/spinfo/maalr/login/UserInfoBackend.java
|
85a85a966696e8c6d41976adc182e0daec20f441
|
[
"Apache-2.0"
] |
permissive
|
plattafurma-libra/pledari-grond
|
37b6f207af32335f1674cda723829f9fbc327f25
|
ee6904c306063a6bd20ae2425b960f9dcb94f9a4
|
refs/heads/master
| 2022-01-09T19:43:04.552194
| 2018-01-12T19:36:35
| 2018-01-12T19:36:35
| 117,278,519
| 2
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,093
|
java
|
/*******************************************************************************
* Copyright 2013 Sprachliche Informationsverarbeitung, University of Cologne
*
* 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 de.uni_koeln.spinfo.maalr.login;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.security.access.annotation.Secured;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import de.uni_koeln.spinfo.maalr.common.shared.Constants;
import de.uni_koeln.spinfo.maalr.common.shared.LightUserInfo;
import de.uni_koeln.spinfo.maalr.common.shared.Role;
import de.uni_koeln.spinfo.maalr.mongo.exceptions.InvalidUserException;
/**
* Spring service which manages the user database.
*
* @author sschwieb
*
*/
@Service
@Scope(value = "singleton")
public class UserInfoBackend {
private static final Logger logger = LoggerFactory.getLogger(UserInfoBackend.class);
/**
* Returns the user infos of the user currently logged in. If no user infos
* exist for this user, a new user will be stored. <br>
* <strong>Security:</strong> Any user may call this method.
*
* @return
*/
// @Secured( { Constants.Roles.GUEST_1, Constants.Roles.OPENID_2,
// Constants.Roles.TRUSTED_EXTERNAL_3, Constants.Roles.TRUSTED_INTERNAL_4,
// Constants.Roles.ADMIN_5 })
@Deprecated
public MaalrUserInfo getOrCreateCurrentUser() {
UserInfoDB userInfos = new UserInfoDB();
String name;
if (SecurityContextHolder.getContext().getAuthentication().isAuthenticated()) {
name = SecurityContextHolder.getContext().getAuthentication().getName();
} else {
name = ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest().getRemoteAddr();
}
try {
return userInfos.getOrCreate(name);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
/**
* Modifies the role of the referenced user. The referenced user must exist. <br>
* <strong>Security:</strong> Only admins may call this method.
*
* @param login
* @param role
* @throws InvalidUserException
*/
@Secured(Constants.Roles.ADMIN_5)
public void updateUserRole(MaalrUserInfo user, Role role) throws InvalidUserException {
if (user.getLogin().equals("admin")) {
throw new InvalidUserException("Not allowed to change admin role!");
}
if (user.getRole().equals(role))
return;
logger.info("Updating role of '" + user.getLogin() +"' from " + user.getRole() + " to " + role);
user.setRole(role);
UserInfoDB userInfos = new UserInfoDB();
userInfos.updateUser(user);
}
/**
* Modifies personal information of the user. Everyone with a unique user
* name (but no guests) may execute this method. Only personal information
* will be updated: email, firstname, lastname. <br>
* <strong>Security:</strong> Any non-guest may call this method for
* himself. Admins may call this method for everyone.
*
* @param updated
* The updated user
* @throws InvalidUserException
* If the currently logged in user is not the user to update,
* and the currently logged in user is not an admin.
*/
@Secured(Constants.Roles.ADMIN_5)
public void updateUserFields(MaalrUserInfo updated) throws InvalidUserException {
MaalrUserInfo current = getOrCreateCurrentUser();
MaalrUserInfo toUpdate = null;
if (current.getRole() == Role.ADMIN_5) {
toUpdate = updated;
} else {
if (!current.getLogin().equals(updated.getLogin())) {
// Only the logged in user may change these properties
throw new InvalidUserException("Action not allowed");
}
toUpdate = current;
}
logger.info("Updating user data - old:" + toUpdate + ", new: " + updated + " (ignoring any role changes)");
UserInfoDB userInfos = new UserInfoDB();
userInfos.updateUser(toUpdate);
}
/**
* For tests only! This method deletes all users in the database. <br>
* <strong>Security:</strong> Only admins may call this method. However,
* they should not.
*/
@Secured(Constants.Roles.ADMIN_5)
public void deleteAllEntries() {
UserInfoDB userInfos = new UserInfoDB();
userInfos.deleteAllEntries();
}
/**
* Returns <code>true</code> if a user with the given login exists. <br>
* <strong>Security:</strong> Any user may call this method.
*
* @param login
* @return
*/
public boolean userExists(String login) {
if (login == null)
return false;
UserInfoDB userInfos = new UserInfoDB();
return userInfos.userExists(login);
}
/**
* Returns the user with the given login, or <code>null</code>, if it
* doesn't exist. <br>
* <strong>Security:</strong> Any user may call this method.
*
* @param login
* @return
*/
public MaalrUserInfo getByLogin(String login) {
UserInfoDB userInfos = new UserInfoDB();
return userInfos.getByLogin(login);
}
/**
* Returns the user with the given Email, or <code>null</code>, if it
* doesn't exist. <br>
* <strong>Security:</strong> Any user may call this method.
*
* @param email
* @return
*/
public MaalrUserInfo getByEmail(String email) {
UserInfoDB userInfos = new UserInfoDB();
return userInfos.getByEmail(email);
}
/**
* Inserts a new user into the database. <br>
* <strong>Security:</strong> Any user may call this method.
*
* @param user
* @throws InvalidUserException
*/
public MaalrUserInfo insert(MaalrUserInfo user) throws InvalidUserException {
UserInfoDB userInfos = new UserInfoDB();
return userInfos.insert(user);
}
/**
* Returns the list of all users. <br>
* <strong>Security:</strong> Only admins may call this method.
*
* @param role
* the role to match, or <code>null</code> for any role
* @param text
* a substring which must match one of email, login, firstname,
* or lastname. <code>null</code> for any.
* @param sortColumn
* the column used for sorting, as defined in
* {@link LightUserInfo}. <code>null</code> for any.
* @param sortAscending
* true or false, for ascending or descending
* @param from
* the start index in the returned list
* @param length
* the number of elements to return
* @return
*/
@Secured(Constants.Roles.ADMIN_5)
public List<MaalrUserInfo> getAllUsers(Role role, String text, String sortColumn, boolean sortAscending, int from, int length) {
UserInfoDB userInfos = new UserInfoDB();
return userInfos.getAllUsers(role, text, sortColumn, sortAscending, from, length);
}
@Secured(Constants.Roles.ADMIN_5)
public List<MaalrUserInfo> getAllUsers(int from, int length, String sortColumn, boolean sortAscending) {
UserInfoDB userInfos = new UserInfoDB();
return userInfos.getAllUsers(from, length, sortColumn, sortAscending);
}
/**
* Returns the number of users in the database. <br>
* <strong>Security:</strong> Only admins may call this method.
*
* @return
*/
@Secured(Constants.Roles.ADMIN_5)
public int getNumberOfUsers() {
UserInfoDB userInfos = new UserInfoDB();
return userInfos.getNumberOfUsers();
}
@Secured(Constants.Roles.ADMIN_5)
public boolean deleteUser(LightUserInfo user) {
UserInfoDB db = new UserInfoDB();
return db.deleteUser(user);
}
}
|
[
"atanassov.mihail@gmail.com"
] |
atanassov.mihail@gmail.com
|
b6fac7a0a4d6235b062df8bfe9e59016b5af4405
|
3dcbf4da0aedbcaebaa902b96dd149221bb8fb5f
|
/solar/solar-implementation-for-macys/solar-core/src/main/java/com/mss/solar/core/svcs/impl/EmailServiceImpl.java
|
02a27fe1a88018c6fa96d1068ba7a9ed0a2cab45
|
[] |
no_license
|
bharathichikkala/master
|
5d4c594aa8d9fd44d36c58464c9705998ea1a21f
|
b04c0d2eaf829416232686e63352bd5a88c484eb
|
refs/heads/master
| 2023-01-21T13:52:10.502961
| 2019-09-30T08:36:37
| 2019-09-30T08:36:37
| 132,092,849
| 1
| 1
| null | 2023-01-19T20:28:47
| 2018-05-04T05:41:29
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 5,813
|
java
|
package com.mss.solar.core.svcs.impl;
import java.io.FileOutputStream;
import java.util.Base64;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.activation.DataHandler;
import javax.activation.DataSource;
import javax.activation.FileDataSource;
import javax.mail.BodyPart;
import javax.mail.Message;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.javamail.MimeMessageHelper;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import com.mss.solar.core.common.EnumTypeForErrorCodes;
import com.mss.solar.core.common.Utils;
import com.mss.solar.core.domain.User;
import com.mss.solar.core.model.ServiceResponse;
import com.mss.solar.core.repos.UserRepository;
import com.mss.solar.core.svcs.EmailService;
@Service
@RestController
public class EmailServiceImpl implements EmailService{
private Logger log = LoggerFactory.getLogger(this.getClass());
@Autowired
private UserRepository userRepo;
@Autowired
private JavaMailSender mailSender;
@Autowired
private Utils utils;
@Value("${images.url}")
public String imagesUrl;
/**
* notifyUser service implementation
*
* @param userId
* @param payload
* @return ServiceResponse<String>
*/
@Async
@Override
public ServiceResponse<String> notifyUser(@PathVariable("userId") Long userId,
@PathVariable("payload") String payload) {
ServiceResponse<String> response = new ServiceResponse<>();
try {
User user = userRepo.findOne(userId);
if (payload.contains("base64") == false) {
MimeMessage mail = mailSender.createMimeMessage();
MimeMessageHelper helper = new MimeMessageHelper(mail, true);
helper.setTo(user.getEmail());
helper.setSubject("Notification");
helper.setText("text/html", payload);
mailSender.send(mail);
response.setData("Mail Sent Successfully");
} else {
notifyUserByImage(user.getEmail(), payload);
}
} catch (Exception e) {
response.setError(EnumTypeForErrorCodes.SCUS201.name(), EnumTypeForErrorCodes.SCUS201.errorMsg());
log.error(utils.toJson(response.getError()), e);
}
return response;
}
/**
* notifyUserByEmail service implementation
*
* @param email
* @param payload
* @return ServiceResponse<String>
*/
@Async
@Override
public ServiceResponse<String> notifyUserByEmail(@PathVariable("email") String email,
@PathVariable("payload") String payload) {
ServiceResponse<String> response = new ServiceResponse<>();
try {
if (payload.contains("base64") == false) {
MimeMessage mail = mailSender.createMimeMessage();
MimeMessageHelper helper = new MimeMessageHelper(mail, true);
helper.setSubject("Notification");
helper.setTo(email);
helper.setText("text/html", payload);
mailSender.send(mail);
response.setData("Mail Sent Successfully");
} else {
notifyUserByImage(email, payload);
}
} catch (Exception e) {
response.setError(EnumTypeForErrorCodes.SCUS201.name(), EnumTypeForErrorCodes.SCUS201.errorMsg());
log.error(utils.toJson(response.getError()), e);
}
return response;
}
/**
* notifyUserByImage service implementation
*
* @param userId
* @param payload
* @return ServiceResponse<String>
*/
@Async
@Override
public ServiceResponse<String> notifyUserByImage(@PathVariable("email") String email,
@PathVariable("payload") String payload) {
ServiceResponse<String> response = new ServiceResponse<>();
try {
MimeMessage message = mailSender.createMimeMessage();
message.setRecipients(Message.RecipientType.TO, email);
message.setSubject("Notification");
message.setSentDate(new Date());
MimeMultipart multipart = new MimeMultipart("related");
/*
* BodyPart messageBodyPart = new MimeBodyPart();
* messageBodyPart.setContent(payload, "text/html");
* multipart.addBodyPart(messageBodyPart);
*/
String regexString = Pattern.quote("base64,") + "(.*?)" + Pattern.quote("\"");
Matcher matcher = Pattern.compile(regexString).matcher(payload);
int i = 1;
while (matcher.find()) {
String result = matcher.group().substring(matcher.group().indexOf("base64,") + 7,
matcher.group().indexOf('"'));
if (result.isEmpty() == false) {
FileOutputStream imageOutFile = new FileOutputStream(imagesUrl + i + ".jpg");
byte[] imageByteArray = Base64.getDecoder().decode(result);
imageOutFile.write(imageByteArray);
imageOutFile.close();
String contentId = Integer.toString(i);
BodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setContent(payload + "<img src=\"cid:" + contentId + "\">", "text/html");
multipart.addBodyPart(messageBodyPart);
BodyPart imageBodyPart = new MimeBodyPart();
DataSource fds = new FileDataSource(imagesUrl + i + ".jpg");
imageBodyPart.setDataHandler(new DataHandler(fds));
imageBodyPart.addHeader("Content-ID", "<" + contentId + ">");
multipart.addBodyPart(imageBodyPart);
}
i++;
}
message.setContent(multipart);
mailSender.send(message);
response.setData("Mail Sent Successfully");
} catch (Exception e) {
response.setError(EnumTypeForErrorCodes.SCUS201.name(), EnumTypeForErrorCodes.SCUS201.errorMsg());
log.error(utils.toJson(response.getError()), e);
}
return response;
}
}
|
[
"bchikkala@metanoiasolutions.net"
] |
bchikkala@metanoiasolutions.net
|
ab2c69bc807dd7a217ba3ed43569f3c34b71d5c3
|
6500848c3661afda83a024f9792bc6e2e8e8a14e
|
/gp_JADX/com/google/android/finsky/datasync/p180a/C2513j.java
|
11b314aeae820cd7931ea12150e7904b27ff8697
|
[] |
no_license
|
enaawy/gproject
|
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
|
91cb88559c60ac741d4418658d0416f26722e789
|
refs/heads/master
| 2021-09-03T03:49:37.813805
| 2018-01-05T09:35:06
| 2018-01-05T09:35:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,071
|
java
|
package com.google.android.finsky.datasync.p180a;
import com.android.volley.C0657w;
import com.android.volley.C0659a;
import com.android.volley.C0660x;
import com.android.volley.C0684b;
import com.android.volley.p060a.ag;
import com.google.android.finsky.ai.C1189b;
import com.google.android.finsky.api.C1254c;
import com.google.android.finsky.api.C1287h;
import com.google.android.finsky.ba.C1461c;
import com.google.android.finsky.datasync.C2531s;
import com.google.android.finsky.utils.C4678i;
import com.google.android.finsky.utils.FinskyLog;
import com.google.android.finsky.utils.ai;
import java.util.List;
import java.util.concurrent.ExecutionException;
public final class C2513j extends C2503a {
public final C1287h f13506g;
C2513j(List list, long j, C1287h c1287h, C2531s c2531s, C1461c c1461c, ai aiVar) {
super(list, null, j, c2531s, c1461c, aiVar);
this.f13506g = c1287h;
}
protected final void mo2923a(String str) {
}
public final boolean mo2924a() {
return ((Integer) C1189b.f7268d.m5760a()).intValue() == 3 && ((Integer) C1189b.f7270f.m5760a()).intValue() == 1 && ((Integer) C1189b.f7271g.m5760a()).intValue() == 1;
}
public final boolean mo2925b() {
return ((Integer) C1189b.f7268d.m5760a()).intValue() == 4;
}
public final void mo2926c() {
for (String str : this.b) {
if (!m13411d()) {
C0660x agVar = new ag();
C1254c a = this.f13506g.mo2016a(str);
if (a != null) {
a.mo1607a(false, false, false, agVar, (C0657w) agVar);
try {
agVar.get();
} catch (InterruptedException e) {
FinskyLog.m21665c("[Cache and Sync] Interrupted while trying to retrieve toc response.", new Object[0]);
return;
} catch (ExecutionException e2) {
FinskyLog.m21665c("[Cache and Sync] Execution exception while trying to retrieve toc response.", new Object[0]);
return;
}
}
} else {
return;
}
}
C1189b.f7268d.m5763a(Integer.valueOf(4));
C1189b.f7269e.m5763a(Integer.valueOf(5));
FinskyLog.m21662b("[Cache and Sync] Cache state is now: COMPLETE. Cache and sync successfully completed.", new Object[0]);
C1189b.f7273i.m5763a(Long.valueOf(C4678i.m21812a()));
C1189b.f7274j.m5763a((Long) C1189b.f7273i.m5760a());
C1189b.f7276l.m5763a((Integer) C1189b.f7277m.m5760a());
C1189b.f7277m.m5763a(Integer.valueOf(0));
C1189b.f7279o.m5763a((Integer) C1189b.f7280p.m5760a());
C1189b.f7280p.m5763a(Integer.valueOf(0));
this.d.m13481a(this.b, 1621);
C0659a dl = this.d.f13567d.dl();
if (dl != null) {
C0684b c0684b = new C0684b();
c0684b.f4131a = new byte[0];
dl.mo1066a("cache_and_sync_marker_cache_key", c0684b);
}
}
}
|
[
"genius.ron@gmail.com"
] |
genius.ron@gmail.com
|
13b944dc742456fbb7de0e1ab32892a5d13357ec
|
8820d79fa9a43c5164e33e4166d25c38ffa5bb99
|
/SB-REST-POST--REQUEST/src/main/java/com/ranjeet/resource/ERailResource.java
|
2fc4d46d3f8e8bf7d2bf1b3c9885aeb163100d97
|
[] |
no_license
|
Ranjeetkumars/microservice-with-restful
|
0d9aa10402783e85faa831c87f8eec179113baba
|
c031cc89a93d61f209e879f111c5f9a1134cb8af
|
refs/heads/master
| 2023-06-02T18:45:10.877720
| 2021-06-15T17:50:40
| 2021-06-15T17:50:40
| 376,135,013
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,590
|
java
|
package com.ranjeet.resource;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.ranjeet.respone.Ticket;
import com.ranjeet.reuest.PassengerInfo;
@RestController
public class ERailResource {
@PostMapping(value = "/bookTicket", produces = { "application/xml", "application/json" }, consumes = {
"application/json","application/xml" })
public Ticket bookTicket( @RequestBody PassengerInfo info) {
System.out.println(info);
// logic
Ticket t = new Ticket();
t.setTicketId("TA02899");
t.setTicketStatus("CONFIRMED");
t.setJounerydate(info.getJounerydate());
t.setPassengerName(info.getFname() + " " + info.getLname());
t.setTrainNumbre(info.getTrinNumber());
t.setTicketPrice(1180.0);
return t;
}
@PostMapping(value = "/bookTicketRetuenWithResponseEntity", produces = { "application/xml", "application/json" }, consumes = {
"application/json","application/xml" })
public ResponseEntity<Ticket> bookTicket1( @RequestBody PassengerInfo info) {
System.out.println(info);
// logic
Ticket t = new Ticket();
t.setTicketId("TA02899");
t.setTicketStatus("CONFIRMED");
t.setJounerydate(info.getJounerydate());
t.setPassengerName(info.getFname() + " " + info.getLname());
t.setTrainNumbre(info.getTrinNumber());
t.setTicketPrice(1180.0);
return new ResponseEntity<> (t, HttpStatus.CREATED);
}
}
|
[
"ranjeetkumar@procreate.co.in"
] |
ranjeetkumar@procreate.co.in
|
cd67b321230cd9f4e568dff6d92104ee50ba34ce
|
dcefd96a707d439ca2248eceeb0f63d32a7ae7eb
|
/spring-boot-rest-data/src/main/java/com/example/jpa/entity/Comment.java
|
a7de1b5bc532e2409d9b52767bc5763694a99a24
|
[] |
no_license
|
kavya-amin/FSD-Spring-Boot
|
d7d0105bbbaa6ace26815e7d26fb3f59d59565d4
|
f29bf57a4baf774d09962dee06cd919e76a4aba1
|
refs/heads/master
| 2023-04-27T17:08:34.639768
| 2019-12-16T05:41:17
| 2019-12-16T05:41:17
| 219,980,316
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 849
|
java
|
package com.example.jpa.entity;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
@Data
@Entity
public class Comment {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "comment_id")
private int commentId;
@Column(name = "comments")
private String comment;
@Transient
private StringBuffer comments;
@JsonIgnore
@ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.DETACH, CascadeType.REFRESH})
@JoinColumn(name = "post_id")
private Post post;
}
|
[
"b8ibmjava19@iiht.tech"
] |
b8ibmjava19@iiht.tech
|
edcaadb90f759e56d90fada7bc595a1ac6f3e7bf
|
aaabffe8bf55973bfb1390cf7635fd00ca8ca945
|
/src/main/java/com/microsoft/graph/requests/generated/IBaseSubscribedSkuRequest.java
|
741da75166394fb4b169e887bf9c8fbebb94bdbd
|
[
"MIT"
] |
permissive
|
rgrebski/msgraph-sdk-java
|
e595e17db01c44b9c39d74d26cd925b0b0dfe863
|
759d5a81eb5eeda12d3ed1223deeafd108d7b818
|
refs/heads/master
| 2020-03-20T19:41:06.630857
| 2018-03-16T17:31:43
| 2018-03-16T17:31:43
| 137,648,798
| 0
| 0
| null | 2018-06-17T11:07:06
| 2018-06-17T11:07:05
| null |
UTF-8
|
Java
| false
| false
| 3,615
|
java
|
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
package com.microsoft.graph.requests.generated;
import com.microsoft.graph.concurrency.*;
import com.microsoft.graph.core.*;
import com.microsoft.graph.models.extensions.*;
import com.microsoft.graph.models.generated.*;
import com.microsoft.graph.http.*;
import com.microsoft.graph.requests.extensions.*;
import com.microsoft.graph.requests.generated.*;
import com.microsoft.graph.options.*;
import com.microsoft.graph.serializer.*;
import java.util.Arrays;
import java.util.EnumSet;
// **NOTE** This file was generated by a tool and any changes will be overwritten.
/**
* The interface for the Base Subscribed Sku Request.
*/
public interface IBaseSubscribedSkuRequest extends IHttpRequest {
/**
* Gets the SubscribedSku from the service
*
* @param callback the callback to be called after success or failure
*/
void get(final ICallback<SubscribedSku> callback);
/**
* Gets the SubscribedSku from the service
*
* @return the SubscribedSku from the request
* @throws ClientException this exception occurs if the request was unable to complete for any reason
*/
SubscribedSku get() throws ClientException;
/**
* Delete this item from the service
*
* @param callback the callback when the deletion action has completed
*/
void delete(final ICallback<Void> callback);
/**
* Delete this item from the service
*
* @throws ClientException if there was an exception during the delete operation
*/
void delete() throws ClientException;
/**
* Patches this SubscribedSku with a source
*
* @param sourceSubscribedSku the source object with updates
* @param callback the callback to be called after success or failure
*/
void patch(final SubscribedSku sourceSubscribedSku, final ICallback<SubscribedSku> callback);
/**
* Patches this SubscribedSku with a source
*
* @param sourceSubscribedSku the source object with updates
* @return the updated SubscribedSku
* @throws ClientException this exception occurs if the request was unable to complete for any reason
*/
SubscribedSku patch(final SubscribedSku sourceSubscribedSku) throws ClientException;
/**
* Posts a SubscribedSku with a new object
*
* @param newSubscribedSku the new object to create
* @param callback the callback to be called after success or failure
*/
void post(final SubscribedSku newSubscribedSku, final ICallback<SubscribedSku> callback);
/**
* Posts a SubscribedSku with a new object
*
* @param newSubscribedSku the new object to create
* @return the created SubscribedSku
* @throws ClientException this exception occurs if the request was unable to complete for any reason
*/
SubscribedSku post(final SubscribedSku newSubscribedSku) throws ClientException;
/**
* Sets the select clause for the request
*
* @param value the select clause
* @return the updated request
*/
IBaseSubscribedSkuRequest select(final String value);
/**
* Sets the expand clause for the request
*
* @param value the expand clause
* @return the updated request
*/
IBaseSubscribedSkuRequest expand(final String value);
}
|
[
"caitbal@microsoft.com"
] |
caitbal@microsoft.com
|
cdc5043f13b3835e6b3d0a8001e3aaf1bdd9eb18
|
cc99d1e133138b6a967f05d6528190ea3c6d8810
|
/src/main/java/code/gen/written/resources/DeliveryAgentResource.java
|
2b2b3309d7207b1cc3183f4d278deeff5a6d56f1
|
[] |
no_license
|
aknigam/CodeGeneration
|
1af877d2126c62618feb7e4a1e2aba8238011b37
|
ed54b36dc74eeaa21a277dbf1c83d4c85c14c490
|
refs/heads/master
| 2023-08-03T15:37:24.795399
| 2019-06-18T10:11:02
| 2019-06-18T10:11:02
| 185,789,696
| 0
| 0
| null | 2023-07-22T05:14:36
| 2019-05-09T11:55:14
|
Java
|
UTF-8
|
Java
| false
| false
| 3,108
|
java
|
package code.gen.written.resources;
import code.gen.written.entities.DeliveryAgent;
import code.gen.written.entities.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import code.gen.entities.*;
import code.gen.written.service.DeliveryAgentService;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
//@Component
@Path("/service/v1/deliveryAgents")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public class DeliveryAgentResource {
// @Autowired
private DeliveryAgentService deliveryAgentService;
public DeliveryAgentResource() {
}
@POST
public Response createDeliveryAgent(DeliveryAgent deliveryAgent){
return Response.ok(deliveryAgentService.create(deliveryAgent)).build();
}
@PUT
@Path("/{deliveryAgentId}")
public Response updateDeliveryAgent(@PathParam("deliveryAgentId") int deliveryAgentId, DeliveryAgent deliveryAgent){
deliveryAgent.setId(deliveryAgentId);
return Response.ok(deliveryAgentService.update(deliveryAgentId, deliveryAgent)).build();
}
@GET
@Path("/{deliveryAgentId}")
public Response getDeliveryAgent(@PathParam("deliveryAgentId") int deliveryAgentId){
return Response.ok(deliveryAgentService.get(deliveryAgentId)).build();
}
@DELETE
@Path("/{deliveryAgentId}")
public Response deleteDeliveryAgent(@PathParam("deliveryAgentId") int deliveryAgentId){
deliveryAgentService.delete(deliveryAgentId);
return Response.ok().build();
}
// ONE TO ONE person STARTS -------------------------------------------------------
@POST
@Path("/{deliveryAgentId}/person")
public Response addDeliveryAgentPerson(@PathParam("deliveryAgentId") int deliveryAgentId, Person person){
int personId = deliveryAgentService.addDeliveryAgentPerson(deliveryAgentId, person);
return Response.ok(personId).build();
}
@GET
@Path("/{deliveryAgentId}/person")
public Response getDeliveryAgentPerson(@PathParam("deliveryAgentId") int deliveryAgentId){
Person person = deliveryAgentService.getDeliveryAgentPerson(deliveryAgentId);
return Response.ok(person).build();
}
@PUT
@Path("/{deliveryAgentId}/person")
public Response updateDeliveryAgentPerson(@PathParam("deliveryAgentId") int deliveryAgentId, Person person){
deliveryAgentService.updateDeliveryAgentPerson(deliveryAgentId, person);
return Response.ok().build();
}
@DELETE
@Path("/{deliveryAgentId}/person")
public Response deleteDeliveryAgentPerson(@PathParam("deliveryAgentId") int deliveryAgentId){
deliveryAgentService.deleteDeliveryAgentPerson(deliveryAgentId);
return Response.ok().build();
}
// ONE TO ONE person ENDS -------------------------------------------------------
}
|
[
"a.nigam@cvent.com"
] |
a.nigam@cvent.com
|
cb98ad8a9ac0f8bb59f4de3b523f3335548b02ee
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/54/419.java
|
dd120bffa0e5d1170a8e333102b13d95601fe1ee
|
[
"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
| 586
|
java
|
package <missing>;
public class GlobalMembers
{
public static int Main()
{
int m;
int n;
int k;
int i;
int j;
int r = 1;
int s;
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
n = Integer.parseInt(tempVar);
}
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
k = Integer.parseInt(tempVar2);
}
for (i = 1;r < n;i++)
{
for (j = i, s = (j * n + k) % (n - 1), r = 1;s == 0 && r < n;r++)
{
j = (j * n + k) / (n - 1);
s = (j * n + k) % (n - 1);
}
}
System.out.printf("%d\n",j * n + k);
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
3da8a982ab48d9ddb8f7a28295eefbabf08bade6
|
3efa417c5668b2e7d1c377c41d976ed31fd26fdc
|
/src/br/com/mind5/stats/statsOwnerUser/ownerUserMonthSearch/dao/SowusarchDaoSelectSingle.java
|
5df21266be0c53dcb096d7858882f1b159038d1a
|
[] |
no_license
|
grazianiborcai/Agenda_WS
|
4b2656716cc49a413636933665d6ad8b821394ef
|
e8815a951f76d498eb3379394a54d2aa1655f779
|
refs/heads/master
| 2023-05-24T19:39:22.215816
| 2023-05-15T15:15:15
| 2023-05-15T15:15:15
| 109,902,084
| 0
| 0
| null | 2022-06-29T19:44:56
| 2017-11-07T23:14:21
|
Java
|
UTF-8
|
Java
| false
| false
| 3,883
|
java
|
package br.com.mind5.stats.statsOwnerUser.ownerUserMonthSearch.dao;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import br.com.mind5.dao.DaoFormatter;
import br.com.mind5.dao.DaoOperation;
import br.com.mind5.dao.DaoResultParser;
import br.com.mind5.dao.DaoStmtTemplate;
import br.com.mind5.dao.DaoStmtWhere;
import br.com.mind5.dao.DaoWhereBuilderOption;
import br.com.mind5.dao.common.DaoDbTable;
import br.com.mind5.dao.common.DaoOptionValue;
import br.com.mind5.stats.statsOwnerUser.ownerUserMonthSearch.info.SowusarchInfo;
public final class SowusarchDaoSelectSingle extends DaoStmtTemplate<SowusarchInfo> {
private final String MAIN_TABLE = DaoDbTable.STAT_OWNER_USER_MONTH_TABLE;
public SowusarchDaoSelectSingle(Connection conn, SowusarchInfo recordInfo, String schemaName) {
super(conn, recordInfo, schemaName);
}
@Override protected String getTableNameHook() {
return MAIN_TABLE;
}
@Override protected String getLookupTableHook() {
return DaoDbTable.STAT_OWNER_USER_MONTH_SEARCH_VIEW;
}
@Override protected DaoOperation getOperationHook() {
return DaoOperation.SELECT;
}
@Override protected String buildWhereClauseHook(String tableName, SowusarchInfo recordInfo) {
DaoWhereBuilderOption whereOption = new DaoWhereBuilderOption();
whereOption.ignoreNull = DaoOptionValue.IGNORE_NULL;
whereOption.ignoreRecordMode = DaoOptionValue.IGNORE_RECORD_MODE;
DaoStmtWhere whereClause = new SowusarchDaoWhere(whereOption, tableName, recordInfo);
return whereClause.getWhereClause();
}
@Override protected DaoResultParser<SowusarchInfo> getResultParserHook() {
return new DaoResultParser<SowusarchInfo>() {
@Override public List<SowusarchInfo> parseResult(SowusarchInfo recordInfo, ResultSet stmtResult, long lastId) throws SQLException {
List<SowusarchInfo> finalResult = new ArrayList<>();
if (stmtResult.next() == false)
return finalResult;
do {
SowusarchInfo dataInfo = new SowusarchInfo();
dataInfo.codOwner = DaoFormatter.sqlToLong(stmtResult, SowusarchDaoDbTableColumn.COL_COD_OWNER);
dataInfo.calmonth = stmtResult.getString(SowusarchDaoDbTableColumn.COL_CALMONTH);
dataInfo.year = DaoFormatter.sqlToInt(stmtResult, SowusarchDaoDbTableColumn.COL_YEAR);
dataInfo.month = DaoFormatter.sqlToInt(stmtResult, SowusarchDaoDbTableColumn.COL_MONTH);
dataInfo.codCountry = stmtResult.getString(SowusarchDaoDbTableColumn.COL_COD_COUNTRY);
dataInfo.codState = stmtResult.getString(SowusarchDaoDbTableColumn.COL_STATE_PROVINCE);
dataInfo.city = stmtResult.getString(SowusarchDaoDbTableColumn.COL_CITY);
dataInfo.countUserCreatedMonth = DaoFormatter.sqlToInt(stmtResult, SowusarchDaoDbTableColumn.COL_COUNT_USER_CREATION_MONTH);
dataInfo.countUserCreatedLastYear = DaoFormatter.sqlToInt(stmtResult, SowusarchDaoDbTableColumn.COL_COUNT_USER_CREATION_MONTH_LAST_YEAR);
dataInfo.countUserActiveMonth = DaoFormatter.sqlToInt(stmtResult, SowusarchDaoDbTableColumn.COL_COUNT_USER_ACTIVE_MONTH);
dataInfo.countUserActiveLastYear = DaoFormatter.sqlToInt(stmtResult, SowusarchDaoDbTableColumn.COL_COUNT_USER_ACTIVE_MONTH_LAST_YEAR);
dataInfo.countUserInactiveMonth = DaoFormatter.sqlToInt(stmtResult, SowusarchDaoDbTableColumn.COL_COUNT_USER_INACTIVE_MONTH);
dataInfo.countUserInactiveLastYear = DaoFormatter.sqlToInt(stmtResult, SowusarchDaoDbTableColumn.COL_COUNT_USER_INACTIVE_MONTH_LAST_YEAR);
dataInfo.lastChanged = DaoFormatter.sqlToLocalDateTime(stmtResult, SowusarchDaoDbTableColumn.COL_LAST_CHANGED);
finalResult.add(dataInfo);
} while (stmtResult.next());
return finalResult;
}
};
}
}
|
[
"mmaciel@mind5.com.br"
] |
mmaciel@mind5.com.br
|
a43b35af70e0d4d1b7275ac580f55154e65d6c68
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/29/29_721cbc7d7dc7104b21681a64fe9265b33a662200/InRoomPathSolver/29_721cbc7d7dc7104b21681a64fe9265b33a662200_InRoomPathSolver_s.java
|
d5c3bdbc961639a57cb80f3075327e7b5184534a
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,151
|
java
|
/* CASi Context Awareness Simulation Software
* Copyright (C) 2012 Moritz Bürger, Marvin Frick, Tobias Mende
*
* This program is free software. It is licensed under the
* GNU Lesser General Public License with one clarification.
*
* You should have received a copy of the
* GNU Lesser General Public License along with this program.
* See the LICENSE.txt file in this projects root folder or visit
* <http://www.gnu.org/licenses/lgpl.html> for more details.
*/
package de.uniluebeck.imis.casi.utils.pathfinding;
import java.awt.Shape;
import java.awt.geom.Point2D;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import de.uniluebeck.imis.casi.simulation.model.Room;
/**
* This class provides a solver using A<sup>*</sup> which is able to find a path
* in a given room.
*
* @author Tobias Mende
*
*/
public class InRoomPathSolver extends AStar<Point2D> {
private Shape room;
private Point2D destination;
/**
* Constructor for a solver that solves path finding problems in rooms
*
* @param room
* the room to search path in
* @param this.destination
* the destination point
* @throws IllegalArgumentException
* if the destination is not in the room.
*/
public InRoomPathSolver(Room room, Point2D end)
throws IllegalArgumentException {
this.room = room.getShapeRepresentation();
this.destination = end;
if (!this.room.contains(this.destination)) {
throw new IllegalArgumentException(
"The destination is not in the room. Can't get path for it.");
}
}
@Override
protected boolean isDestination(Point2D node) {
return node.distance(destination) <= 1;
}
@Override
protected double costs(Point2D from, Point2D to) {
return from.distance(to);
}
@Override
protected double heuristic(Point2D from, Point2D to) {
return from.distance(destination);
}
@Override
protected List<Point2D> calculateSuccessors(Point2D node) {
List<Point2D> successors = new LinkedList<Point2D>();
List<Point2D> temp = new ArrayList<Point2D>(8);
/*
* Generating points so that (- marks the node): + + + + - + + + +
*/
temp.add(new Point2D.Double(node.getX() - 1, node.getY() - 1));
temp.add(new Point2D.Double(node.getX() + 1, node.getY() - 1));
temp.add(new Point2D.Double(node.getX(), node.getY() - 1));
temp.add(new Point2D.Double(node.getX() - 1, node.getY() + 1));
temp.add(new Point2D.Double(node.getX() + 1, node.getY() + 1));
temp.add(new Point2D.Double(node.getX(), node.getY() + 1));
temp.add(new Point2D.Double(node.getX() - 1, node.getY()));
temp.add(new Point2D.Double(node.getX() + 1, node.getY()));
// Add only points, that are in the room.
for (Point2D p : temp) {
if (room.contains(p)) {
successors.add(p);
}
}
return successors;
}
@Override
public List<Point2D> compute(Point2D start) {
if (start.equals(destination)) {
List<Point2D> path = new LinkedList<Point2D>();
path.add(start);
return path;
}
return super.compute(start);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
e7d387c1fb86a0be0fce2d16b2652842d97fa5c8
|
15b260ccada93e20bb696ae19b14ec62e78ed023
|
/v2/src/main/java/com/alipay/api/domain/ExtendMedicalCard.java
|
0fbb0dea79696c6b0d8d5f3d144ddf29589ba023
|
[
"Apache-2.0"
] |
permissive
|
alipay/alipay-sdk-java-all
|
df461d00ead2be06d834c37ab1befa110736b5ab
|
8cd1750da98ce62dbc931ed437f6101684fbb66a
|
refs/heads/master
| 2023-08-27T03:59:06.566567
| 2023-08-22T14:54:57
| 2023-08-22T14:54:57
| 132,569,986
| 470
| 207
|
Apache-2.0
| 2022-12-25T07:37:40
| 2018-05-08T07:19:22
|
Java
|
UTF-8
|
Java
| false
| false
| 3,378
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 用户的已绑定卡数据
*
* @author auto create
* @since 1.0, 2023-08-04 16:04:15
*/
public class ExtendMedicalCard extends AlipayObject {
private static final long serialVersionUID = 5797521655755686123L;
/**
* 签约状态为成功绑定为不可空
卡颁发机构名称
*/
@ApiField("card_org_name")
private String cardOrgName;
/**
* 签约状态为成功绑定为不可空
卡颁发机构编号
*/
@ApiField("card_org_no")
private String cardOrgNo;
/**
* 城市编码(格式为:行政区域代码)
多个地市逗号分隔
*/
@ApiField("city")
private String city;
/**
* Json格式的业务扩展参数
*/
@ApiField("extend_params")
private String extendParams;
/**
* 签约状态为成功绑定为不可空
签约成功时间。 格式为 yyyy-MM-dd HH:mm:ss
*/
@ApiField("gmt_sign")
private String gmtSign;
/**
* 000102020011
*/
@ApiField("medical_card_id")
private String medicalCardId;
/**
* 签约状态为成功绑定为不可空
医保卡号,敏感信息脱敏输出
*/
@ApiField("medical_card_no")
private String medicalCardNo;
/**
* 市医保:CITY_INS
省医保:PROVINCE_INS
县医保:COUNTY_INS
*/
@ApiField("medical_card_type")
private String medicalCardType;
/**
* 医保卡持卡人证件号码(脱敏)
*/
@ApiField("out_user_card_no")
private String outUserCardNo;
/**
* 医保卡持有人姓名( 脱敏)
*/
@ApiField("out_user_name")
private String outUserName;
/**
* 绑定状态
已激活:signed
已解绑:unsigned
*/
@ApiField("sign_status")
private String signStatus;
public String getCardOrgName() {
return this.cardOrgName;
}
public void setCardOrgName(String cardOrgName) {
this.cardOrgName = cardOrgName;
}
public String getCardOrgNo() {
return this.cardOrgNo;
}
public void setCardOrgNo(String cardOrgNo) {
this.cardOrgNo = cardOrgNo;
}
public String getCity() {
return this.city;
}
public void setCity(String city) {
this.city = city;
}
public String getExtendParams() {
return this.extendParams;
}
public void setExtendParams(String extendParams) {
this.extendParams = extendParams;
}
public String getGmtSign() {
return this.gmtSign;
}
public void setGmtSign(String gmtSign) {
this.gmtSign = gmtSign;
}
public String getMedicalCardId() {
return this.medicalCardId;
}
public void setMedicalCardId(String medicalCardId) {
this.medicalCardId = medicalCardId;
}
public String getMedicalCardNo() {
return this.medicalCardNo;
}
public void setMedicalCardNo(String medicalCardNo) {
this.medicalCardNo = medicalCardNo;
}
public String getMedicalCardType() {
return this.medicalCardType;
}
public void setMedicalCardType(String medicalCardType) {
this.medicalCardType = medicalCardType;
}
public String getOutUserCardNo() {
return this.outUserCardNo;
}
public void setOutUserCardNo(String outUserCardNo) {
this.outUserCardNo = outUserCardNo;
}
public String getOutUserName() {
return this.outUserName;
}
public void setOutUserName(String outUserName) {
this.outUserName = outUserName;
}
public String getSignStatus() {
return this.signStatus;
}
public void setSignStatus(String signStatus) {
this.signStatus = signStatus;
}
}
|
[
"auto-publish"
] |
auto-publish
|
3f5b38609f55e74dd0fb54c62ea8c8022e6b9010
|
e49bef1b36c879b1f0366cb80ab5a3ae745aabd3
|
/sources/com/google/android/gms/common/internal/StringResourceValueReader.java
|
6a8c0e409fcdcf2ef2ddc303af7688a9f3822139
|
[] |
no_license
|
mathias-mike/EplStars
|
2e154f6ac0bee3cd1c9bafd7e6ce9bd47ce9bf67
|
7c7b86b6c892d974567f62c92793e76edd0d09d7
|
refs/heads/master
| 2023-07-23T11:16:33.160876
| 2021-09-02T10:07:51
| 2021-09-02T10:07:51
| 124,019,552
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 929
|
java
|
package com.google.android.gms.common.internal;
import android.content.Context;
import android.content.res.Resources;
import com.google.android.gms.common.R;
import javax.annotation.Nullable;
/* compiled from: com.google.android.gms:play-services-basement@@17.1.0 */
public class StringResourceValueReader {
private final Resources zzfi;
private final String zzfj;
public StringResourceValueReader(Context context) {
Preconditions.checkNotNull(context);
Resources resources = context.getResources();
this.zzfi = resources;
this.zzfj = resources.getResourcePackageName(R.string.common_google_play_services_unknown_issue);
}
@Nullable
public String getString(String str) {
int identifier = this.zzfi.getIdentifier(str, "string", this.zzfj);
if (identifier == 0) {
return null;
}
return this.zzfi.getString(identifier);
}
}
|
[
"leesanmoj@gmail.com"
] |
leesanmoj@gmail.com
|
04f39358742e8eda7857180159cd6664bd652bb7
|
9d30036152aa45ebd1a653366c78f4c150bc0d6e
|
/gen/net/masterthought/dlanguage/psi/impl/DLanguageScopeBlockStatementImpl.java
|
15346d672716d1bfa5e6662793643b065c1a54bd
|
[] |
no_license
|
rq4w7z/DLanguage
|
d9ab13bb3a67b723a67d70b2d7aaf19fb422efa9
|
43e57a3b4baa9e37279c3085580a7fa1f23441f7
|
refs/heads/master
| 2021-01-18T17:04:28.826557
| 2015-11-07T10:10:53
| 2015-11-07T10:10:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| true
| 1,034
|
java
|
// This is a generated file. Not intended for manual editing.
package net.masterthought.dlanguage.psi.impl;
import java.util.List;
import org.jetbrains.annotations.*;
import com.intellij.lang.ASTNode;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiElementVisitor;
import com.intellij.psi.util.PsiTreeUtil;
import static net.masterthought.dlanguage.psi.DLanguageTypes.*;
import com.intellij.extapi.psi.ASTWrapperPsiElement;
import net.masterthought.dlanguage.psi.*;
public class DLanguageScopeBlockStatementImpl extends ASTWrapperPsiElement implements DLanguageScopeBlockStatement {
public DLanguageScopeBlockStatementImpl(ASTNode node) {
super(node);
}
public void accept(@NotNull PsiElementVisitor visitor) {
if (visitor instanceof DLanguageVisitor) ((DLanguageVisitor)visitor).visitScopeBlockStatement(this);
else super.accept(visitor);
}
@Override
@NotNull
public DLanguageBlockStatement getBlockStatement() {
return findNotNullChildByClass(DLanguageBlockStatement.class);
}
}
|
[
"kingsleyhendrickse@me.com"
] |
kingsleyhendrickse@me.com
|
cc963b1e8e616db97d5cb0f36cf0f1d927d85859
|
05e13c408bede78bb40cbaba237669064eddee10
|
/src/main/java/com/fedex/ws/uploaddocument/v17/ExpressFreightDetail.java
|
caf6951e6550e9e390129cb3b4ad667c01dc7615
|
[] |
no_license
|
noboomu/shipping-carriers
|
f60ae167bd645368012df0817f0c0d54e8fff616
|
74b2a7b37ac36fe2ea16b4f79f2fb0f69113e0f6
|
refs/heads/master
| 2023-05-07T08:54:31.217066
| 2021-06-02T23:48:11
| 2021-06-02T23:48:11
| 373,320,009
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,995
|
java
|
package com.fedex.ws.uploaddocument.v17;
import java.math.BigInteger;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlSchemaType;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for ExpressFreightDetail complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ExpressFreightDetail">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="PackingListEnclosed" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* <element name="ShippersLoadAndCount" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" minOccurs="0"/>
* <element name="BookingConfirmationNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="ReferenceLabelRequested" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* <element name="BeforeDeliveryContact" type="{http://fedex.com/ws/uploaddocument/v17}ExpressFreightDetailContact" minOccurs="0"/>
* <element name="UndeliverableContact" type="{http://fedex.com/ws/uploaddocument/v17}ExpressFreightDetailContact" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ExpressFreightDetail", propOrder = {
"packingListEnclosed",
"shippersLoadAndCount",
"bookingConfirmationNumber",
"referenceLabelRequested",
"beforeDeliveryContact",
"undeliverableContact"
})
public class ExpressFreightDetail {
@XmlElement(name = "PackingListEnclosed")
protected Boolean packingListEnclosed;
@XmlElement(name = "ShippersLoadAndCount")
@XmlSchemaType(name = "positiveInteger")
protected BigInteger shippersLoadAndCount;
@XmlElement(name = "BookingConfirmationNumber")
protected String bookingConfirmationNumber;
@XmlElement(name = "ReferenceLabelRequested")
protected Boolean referenceLabelRequested;
@XmlElement(name = "BeforeDeliveryContact")
protected ExpressFreightDetailContact beforeDeliveryContact;
@XmlElement(name = "UndeliverableContact")
protected ExpressFreightDetailContact undeliverableContact;
/**
* Gets the value of the packingListEnclosed property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isPackingListEnclosed() {
return packingListEnclosed;
}
/**
* Sets the value of the packingListEnclosed property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setPackingListEnclosed(Boolean value) {
this.packingListEnclosed = value;
}
/**
* Gets the value of the shippersLoadAndCount property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getShippersLoadAndCount() {
return shippersLoadAndCount;
}
/**
* Sets the value of the shippersLoadAndCount property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setShippersLoadAndCount(BigInteger value) {
this.shippersLoadAndCount = value;
}
/**
* Gets the value of the bookingConfirmationNumber property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getBookingConfirmationNumber() {
return bookingConfirmationNumber;
}
/**
* Sets the value of the bookingConfirmationNumber property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setBookingConfirmationNumber(String value) {
this.bookingConfirmationNumber = value;
}
/**
* Gets the value of the referenceLabelRequested property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isReferenceLabelRequested() {
return referenceLabelRequested;
}
/**
* Sets the value of the referenceLabelRequested property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setReferenceLabelRequested(Boolean value) {
this.referenceLabelRequested = value;
}
/**
* Gets the value of the beforeDeliveryContact property.
*
* @return
* possible object is
* {@link ExpressFreightDetailContact }
*
*/
public ExpressFreightDetailContact getBeforeDeliveryContact() {
return beforeDeliveryContact;
}
/**
* Sets the value of the beforeDeliveryContact property.
*
* @param value
* allowed object is
* {@link ExpressFreightDetailContact }
*
*/
public void setBeforeDeliveryContact(ExpressFreightDetailContact value) {
this.beforeDeliveryContact = value;
}
/**
* Gets the value of the undeliverableContact property.
*
* @return
* possible object is
* {@link ExpressFreightDetailContact }
*
*/
public ExpressFreightDetailContact getUndeliverableContact() {
return undeliverableContact;
}
/**
* Sets the value of the undeliverableContact property.
*
* @param value
* allowed object is
* {@link ExpressFreightDetailContact }
*
*/
public void setUndeliverableContact(ExpressFreightDetailContact value) {
this.undeliverableContact = value;
}
}
|
[
"bauer.j@gmail.com"
] |
bauer.j@gmail.com
|
4bd01bf3e94f11b66dab09b9d0200c76234bd80b
|
d4dafb381a9c5930918db8bedf403944df918884
|
/src/main/java/cn/com/google_guava/eventbus/demo2/MultipleEventBusExample.java
|
4db6c9c98a647eee143f6a34b02ab6b395f42df9
|
[] |
no_license
|
git-sky/javabasics
|
3f307d33876e17b260740492fcd6c33bdf91bddb
|
25bf3ddbe6c08b77b499450cfdbd75e4eb81b51d
|
refs/heads/master
| 2022-12-25T12:01:04.569153
| 2021-06-20T14:48:55
| 2021-06-20T14:48:55
| 97,925,787
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 487
|
java
|
package cn.com.google_guava.eventbus.demo2;
import com.google.common.eventbus.EventBus;
/**
* 结论:eventBus会根据Listener的参数类型的不同,分别向不同的Subscribe发送不同的消息。
*/
public class MultipleEventBusExample {
public static void main(String[] args) {
final EventBus eventBus = new EventBus();
eventBus.register(new MultipleEventListeners());
eventBus.post("I am String event");
eventBus.post(1000);
}
}
|
[
"linkme2008@sina.com"
] |
linkme2008@sina.com
|
bf4a3468d173976028dc977c52df72ae98cc6275
|
26183990a4c6b9f6104e6404ee212239da2d9f62
|
/components/review_score_aggregator/src/java/main/com/topcoder/management/review/scoreaggregator/Util.java
|
d63add4267635146c58ecdf156a19d34576484be
|
[] |
no_license
|
topcoder-platform/tc-java-components
|
34c5798ece342a9f1804daeb5acc3ea4b0e0765b
|
51b204566eb0df3902624c15f4fb69b5f99dc61b
|
refs/heads/dev
| 2023-08-08T22:09:32.765506
| 2022-02-25T06:23:56
| 2022-02-25T06:23:56
| 138,811,944
| 0
| 8
| null | 2022-02-23T21:06:12
| 2018-06-27T01:10:36
|
Rich Text Format
|
UTF-8
|
Java
| false
| false
| 3,955
|
java
|
/*
* Copyright (C) 2006-2014 TopCoder Inc., All Rights Reserved.
*/
package com.topcoder.management.review.scoreaggregator;
/**
* <p>
* Helper class for the Status Tracker Component.
* </p>
*
* <p>
* Note, since this is a multi-package component, this helper class is defined as public instead of package-private to
* avoid defining such class in every package. This is allowed by the TopCoder rule. All the static methods are shared
* between multiple packages are defined as public, otherwise will be defined as package-private.
* </p>
*
* @author daiwb
* @version 1.0.1
*/
public final class Util {
/**
* <p>
* This private constructor prevents to create a new instance.
* </p>
*/
private Util() {
}
/**
* <p>
* Checks whether the given Object is null.
* </p>
*
* @param arg
* the argument to check
* @param name
* the name of the argument to check
*
* @throws IllegalArgumentException
* if the given Object is null
*/
public static void checkNull(Object arg, String name) {
if (arg == null) {
throw new IllegalArgumentException(name + " should not be null.");
}
}
/**
* <p>
* Checks whether the given String is null or empty. Here empty means the length of the given string is zero after
* trimmed.
* </p>
*
* @param arg
* the String to check
* @param name
* the name of the String argument to check
*
* @throws IllegalArgumentException
* if the given string is null or empty
*/
public static void checkString(String arg, String name) {
checkNull(arg, name);
if (arg.trim().length() == 0) {
throw new IllegalArgumentException(name + " should not be empty String.");
}
}
/**
* <p>
* Checks whether the given double value is valid.
* </p>
* <p>
* If score is negative/NaN/Infinite, IllegalArgumentException will be thrown.
* </p>
*
* @param score
* The double value to check
* @param name
* The name of the double value
* @throws IllegalArgumentException
* if score is negative/Nan/Infinite
*/
public static void checkDoubleValue(double score, String name) {
if (Double.isNaN(score)) {
throw new IllegalArgumentException(name + " should not be NaN.");
}
if (Double.isInfinite(score)) {
throw new IllegalArgumentException(name + " should not be Infinite.");
}
if (score < 0) {
throw new IllegalArgumentException(name + " should not be negative.");
}
}
/**
* <p>
* Helper method to return the id of the given Submission.
* </p>
*
* @param sub
* the submission to get id from
* @return the id of the submission
* @throws IllegalArgumentException
* if sub is null
*/
public static long getId(Submission sub) {
if (sub == null) {
throw new IllegalArgumentException("sub should not be null.");
}
return sub.getId();
}
/**
* <p>
* Returns the aggregatedScore of the given AggregatedSubmission.
* </p>
*
* @param sub
* the submission to get aggregatedScore from
* @return the aggregatedScore of the submission
* @throws IllegalArgumentException
* if sub is null
*/
public static double getAggregatedScore(AggregatedSubmission sub) {
if (sub == null) {
throw new IllegalArgumentException("sub should not be null.");
}
return sub.getAggregatedScore();
}
}
|
[
"pvmagacho@gmail.com"
] |
pvmagacho@gmail.com
|
cb0c86672cc318ad48f01be26891261043a12060
|
11dd29da2bad6d56e760a1ca6d03283524d04022
|
/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/TaskOnFailException.java
|
be0891f889ec0004aa5b6732d4b30c3ad08a969b
|
[
"Apache-2.0",
"Plexus",
"BSD-3-Clause",
"LicenseRef-scancode-jdom",
"BSD-2-Clause"
] |
permissive
|
apache/airavata
|
6705d5735f56cc4d749a8f62139348cce80eaa09
|
ee036e22cf64d4338b90eed36147b8f3f7ee68e5
|
refs/heads/master
| 2023-08-31T18:00:30.186951
| 2023-08-24T16:28:08
| 2023-08-24T16:28:08
| 16,338,711
| 88
| 170
|
Apache-2.0
| 2023-08-12T19:27:33
| 2014-01-29T08:00:06
|
Java
|
UTF-8
|
Java
| false
| false
| 1,378
|
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.airavata.helix.impl.task;
public class TaskOnFailException extends Exception {
private String reason;
private boolean critical;
private Throwable e;
public TaskOnFailException(String reason, boolean critical, Throwable e) {
super(reason, e);
this.reason = reason;
this.critical = critical;
this.e = e;
}
public String getReason() {
return reason;
}
public boolean isCritical() {
return critical;
}
public Throwable getError() {
return e;
}
}
|
[
"dimuthu.upeksha2@gmail.com"
] |
dimuthu.upeksha2@gmail.com
|
0ebbc0359f9dce6db6b94e8216da8c24a4bd40f0
|
9071ecb5f7b6418a047bf524600e89f893fc23ea
|
/mixiusi-machine/src/main/java/com/mixiusi/protocol/request/coffee/PayQrcodeRequest.java
|
4c32636e0d0fdaa8ca28444ab060e413233cb6da
|
[] |
no_license
|
liukun321/DubboDemo
|
72b8757bcabf3c3a873a44dc09475f2b0135036a
|
ada6751601d57452a93956d8b25647c1e0903f4c
|
refs/heads/master
| 2020-03-17T14:14:06.116243
| 2018-07-20T09:28:27
| 2018-07-20T09:28:27
| 133,664,374
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,216
|
java
|
package com.mixiusi.protocol.request.coffee;
import com.mixiusi.protocol.ServiceID;
import com.mixiusi.protocol.enums.ICoffeeService;
import com.mixiusi.protocol.pack.PackIndex;
import com.mixiusi.protocol.pack.Unpack;
import com.mixiusi.protocol.request.RequestID;
import com.mixiusi.protocol.request.SingleRequest;
@RequestID(service = ServiceID.SVID_LITE_COFFEE, command = { ICoffeeService.CommandId.PAY_QRCODE
+ "" })
public class PayQrcodeRequest extends SingleRequest {
@PackIndex(0)
private String coffeeId;
@PackIndex(1)
private String dosing;
@PackIndex(2)
private short provider;
// @PackIndex(3)
// private String buyerId;
@Override
public Unpack unpackBody(Unpack unpack) throws Exception {
coffeeId = unpack.popVarstr();
dosing = unpack.popVarstr();
provider = unpack.popShort();
return null;
}
public void setCoffeeId(String coffeeId) {
this.coffeeId = coffeeId;
}
public String getCoffeeId() {
return coffeeId;
}
public void setDosing(String dosing) {
this.dosing = dosing;
}
public String getDosing() {
return dosing;
}
public void setProvider(short provider) {
this.provider = provider;
}
public short getProvider() {
return provider;
}
}
|
[
"cmlk123@126.com"
] |
cmlk123@126.com
|
da49098eb1a424f1ee993711285e489d33973a22
|
4ed13753f5bc20ec143dc25039280f80c3edddd8
|
/gosu-test/src/test/java/gw/internal/gosu/regression/GosuPropertyOverrideRegressionHelper.java
|
0ba54ff9099ab3b7f3ca6f864a640fca8999dff1
|
[
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause"
] |
permissive
|
hmsck/gosu-lang
|
180a96aab69ff0184700e70876bb0cf10c8a938f
|
78c5f6c839597a81ac5ec75a46259cbb6ad40545
|
refs/heads/master
| 2021-02-13T06:53:30.208378
| 2019-10-31T23:15:13
| 2019-10-31T23:15:13
| 244,672,021
| 0
| 0
|
Apache-2.0
| 2020-03-03T15:27:47
| 2020-03-03T15:27:46
| null |
UTF-8
|
Java
| false
| false
| 1,728
|
java
|
/*
* Copyright 2014 Guidewire Software, Inc.
*/
package gw.internal.gosu.regression;
/**
* Created by IntelliJ IDEA.
* User: akeefer
* Date: Jan 19, 2010
* Time: 2:12:14 PM
* To change this template use File | Settings | File Templates.
*/
public abstract class GosuPropertyOverrideRegressionHelper {
// Is methods with no setter
public abstract boolean isFooPBoolean();
public abstract Boolean isFooBoolean();
public abstract String isFooString();
public abstract int isFooPInt();
// Is methods with setters
public abstract boolean isFooPBooleanWithSetter();
public abstract Boolean isFooBooleanWithSetter();
public abstract String isFooStringWithSetter();
public abstract int isFooPIntWithSetter();
public abstract void setFooPBooleanWithSetter(boolean value);
public abstract void setFooBooleanWithSetter(Boolean value);
public abstract void setFooStringWithSetter(String value);
public abstract void setFooPIntWithSetter(int value);
// Get methods without setters
public abstract boolean getBarPBoolean();
public abstract Boolean getBarBoolean();
public abstract String getBarString();
public abstract int getBarPInt();
// Get methods with setters
public abstract boolean getBarPBooleanWithSetter();
public abstract Boolean getBarBooleanWithSetter();
public abstract String getBarStringWithSetter();
public abstract int getBarPIntWithSetter();
public abstract void setBarPBooleanWithSetter(boolean value);
public abstract void setBarBooleanWithSetter(Boolean value);
public abstract void setBarStringWithSetter(String value);
public abstract void setBarPIntWithSetter(int value);
// TODO - AHK - Setters without getters?
}
|
[
"lboasso@guidewire.com"
] |
lboasso@guidewire.com
|
6b93d3f9eeae3eb39768e0c01162c1e5b35f78a0
|
2dd61fdcf7b3e92aeeafa81d02135344b9fad440
|
/.bach/src/build/build/Bootstrap.java
|
65ce999b5227c11c37f1184a1408534ea6ed8099
|
[
"Apache-2.0"
] |
permissive
|
gyder/bach
|
b3841d0b6320f6fb10b7d449460b81da5de13bca
|
4c4cbf909619ad5a42d7963f245eb66d3c3b0bcc
|
refs/heads/master
| 2022-12-02T13:04:37.371138
| 2020-08-14T08:27:07
| 2020-08-14T08:27:07
| 287,564,149
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,120
|
java
|
/*
* Bach - Java Shell Builder
* Copyright (C) 2020 Christian Stein
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package build;
import java.io.File;
import java.lang.module.ModuleDescriptor;
import java.nio.file.Files;
import java.nio.file.Path;
import java.time.Instant;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.spi.ToolProvider;
public class Bootstrap {
public static void main(String... args) throws Exception {
var destination = Path.of(".bach/workspace/bootstrap/classes");
var pattern = DateTimeFormatter.ofPattern("yyyy.MM.dd.HHmm").withZone(ZoneId.of("UTC"));
var version = ModuleDescriptor.Version.parse(pattern.format(Instant.now()));
step("Bootstrap");
run(
"javac",
"-d",
"" + destination,
"--module=build,de.sormuras.bach",
"--module-source-path=.bach/src" + File.pathSeparator + "src/*/main/java",
"--module-version=" + version + "-BOOTSTRAP",
"-encoding",
"UTF-8",
"-W" + "error",
"-X" + "lint");
step("Build");
var java = ProcessHandle.current().info().command().orElse("java");
start(
java,
"-ea",
"-D" + "user.language=en",
"-D" + "java.util.logging.config.file=src/logging.properties",
"-D" + "ebug",
"--enable-preview",
"--module-path=" + destination,
"--module=build/build.Build");
var modules = Path.of(".bach/workspace/modules");
if (Files.notExists(modules)) {
System.err.println("Modules directory not found: " + modules);
return;
}
step("Smoke-test module de.sormuras.bach");
start(java, "--module-path", modules.toString(), "--module", "de.sormuras.bach", "help");
step("Boostrap finished.");
}
static void step(String caption) {
System.out.println();
System.out.println("#");
System.out.println("# " + caption);
System.out.println("#");
System.out.println();
}
static void run(String name, String... args) {
System.out.printf(">> %s %s%n", name, String.join(" ", args));
var tool = ToolProvider.findFirst(name).orElseThrow(() -> new Error(name));
int code = tool.run(System.out, System.err, args);
if (code != 0) throw new Error("Non-zero exit code: " + code);
}
static void start(String... command) throws Exception {
System.out.println(">> " + String.join(" ", command));
var process = new ProcessBuilder(command).inheritIO().start();
int code = process.waitFor();
if (code != 0) throw new Error("Non-zero exit code: " + code);
}
}
|
[
"sormuras@gmail.com"
] |
sormuras@gmail.com
|
cedeaa5c65d18e727e9dcbf099101d57769e0907
|
f3cf1fb059299c7e804c2c04a8ef94af19154003
|
/src/main/java/org/diorite/impl/input/ConsoleReaderThread.java
|
b7104b6aa5f59e13e0bfd8c4908adb1e0405169e
|
[
"MIT"
] |
permissive
|
maqes/Diorite-Core
|
76e0337eac7c9cb29e64f9257f40b5f06d618b6e
|
3ee2d0f0ad0389c4b1824870d5ca7f03f8124116
|
refs/heads/master
| 2021-01-19T06:52:51.775658
| 2015-06-06T00:12:33
| 2015-06-06T00:12:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,757
|
java
|
package org.diorite.impl.input;
import java.io.IOException;
import java.util.NoSuchElementException;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.diorite.impl.Main;
import org.diorite.impl.ServerImpl;
import org.diorite.event.EventType;
import org.diorite.event.others.SenderCommandEvent;
import jline.console.ConsoleReader;
public class ConsoleReaderThread extends Thread
{
private final ServerImpl server;
public ConsoleReaderThread(final ServerImpl server)
{
super("{Diorite|Console}");
this.server = server;
this.setDaemon(true);
}
@Override
public void run()
{
if (! Main.isConsoleEnabled())
{
return;
}
final ConsoleReader reader = this.server.getReader();
try
{
while (this.server.isRunning())
{
final String line = Main.isUseJline() ? reader.readLine(">", null) : reader.readLine();
if ((line == null) || (line.trim().length() <= 0))
{
continue;
}
EventType.callEvent(new SenderCommandEvent(this.server.getConsoleSender(), line));
}
} catch (final NoSuchElementException ignored)
{
} catch (final IOException e)
{
e.printStackTrace();
}
}
@Override
public String toString()
{
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).appendSuper(super.toString()).append("server", this.server).toString();
}
public static void start(final ServerImpl server)
{
new ConsoleReaderThread(server).start();
}
}
|
[
"bartlomiejkmazur@gmail.com"
] |
bartlomiejkmazur@gmail.com
|
1cb18e2d547983c6ab1208ef9a2264a946bfb818
|
22e31515ba266e9dbf3a571ae45619f8e6701777
|
/src/test/java/inheritanceconstructor/classroom/ClassRoomTest.java
|
0fe3bc81d5c418e236d537742e0e39cb0fe02d2d
|
[] |
no_license
|
Dini68/consi
|
b8a682dc8dbdff998cf40e0b57eff50ea6c164d0
|
0c6e6f450c8f394c157b7c08124a59c72bd2c696
|
refs/heads/master
| 2023-05-07T02:32:26.446413
| 2021-05-29T16:04:23
| 2021-05-29T16:04:23
| 346,857,950
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,039
|
java
|
package inheritanceconstructor.classroom;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
public class ClassRoomTest {
@Test
public void constructorTest() {
//Given
ClassRoom classroom = new ClassRoom("122", 20, Facility.CHALKBOARD);
//Then
assertEquals("122", classroom.getLocation());
assertEquals(20, classroom.getCapacity());
assertEquals(Facility.CHALKBOARD, classroom.getFacility());
}
@Test
public void isSuitableSuccess() {
//Given
ClassRoom classroom = new ClassRoom("122", 20, Facility.COMPUTERS);
Course course = new Course(15, Facility.COMPUTERS);
//Then
assertTrue(classroom.isSuitable(course));
}
@Test
public void isSuitableFail() {
//Given
ClassRoom classroom = new ClassRoom("122", 20, Facility.COMPUTERS);
Course course = new Course(15, Facility.CHALKBOARD);
//Then
assertFalse(classroom.isSuitable(course));
}
}
|
[
"kdini68@gmail.com"
] |
kdini68@gmail.com
|
74048302e360d38d5732e334695d51f90389ab72
|
d7e6bf026a043ed770718127bc8d79c5f8ed0314
|
/src/org/lynxlake/_01DefiningClassesExercises/_06RawData/Engine.java
|
bbaaa0208db54b56a89d2bb3ffe2a42940f03dd4
|
[] |
no_license
|
plamen911/java-oop-basics
|
e2fa792b27a214985d2b9810de8a3784f260665b
|
e82e766a794ff0bde963e50d24d63df9cb2370a8
|
refs/heads/master
| 2021-01-13T03:36:30.473424
| 2017-03-11T07:04:01
| 2017-03-11T07:04:01
| 77,316,579
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 489
|
java
|
package org.lynxlake._01DefiningClassesExercises._06RawData;
class Engine {
private int speed;
private int power;
public Engine(int speed, int power) {
this.speed = speed;
this.power = power;
}
public int getSpeed() {
return speed;
}
public void setSpeed(int speed) {
this.speed = speed;
}
public int getPower() {
return power;
}
public void setPower(int power) {
this.power = power;
}
}
|
[
"1"
] |
1
|
d9bfd0d657255999eec7d47c72aac7f145a27b7d
|
96aab3fe160261eaf6e98f72a125e1551d737dc9
|
/doo/src/main/java/ticTacToe/v400/controllers/RandomCoordinateController.java
|
ce009ad40e1d2fefcb059795f799a4c51d98f7fc
|
[] |
no_license
|
mlires/IWVG
|
4050432f848b5fc3c4f764768d4a217303d7af84
|
2b92872e957fae47114a220ed5b1e52a7be17d3e
|
refs/heads/master
| 2020-07-02T17:30:38.650161
| 2020-05-29T10:01:15
| 2020-05-29T10:01:15
| 201,606,068
| 0
| 0
| null | 2019-08-10T09:04:05
| 2019-08-10T09:04:03
| null |
UTF-8
|
Java
| false
| false
| 209
|
java
|
package ticTacToe.v400.controllers;
import ticTacToe.v400.models.Coordinate;
public interface RandomCoordinateController extends CoordinateController {
Coordinate getTarget(Coordinate origin);
}
|
[
"setillofm@gmail.com"
] |
setillofm@gmail.com
|
6b99da2b313f7322dd8644ad099643a7d1888848
|
6707f9f2b2cfa6c8c436f64e2b4897f41aeab4bd
|
/eRoute/Tag/1.11.0/Codigo/RouteLite/routeLite/src/main/java/com/amesol/routelite/datos/basedatos/BDVend.java
|
decaf278f61c7e8560f4c054073f3c5a6acf1c3d
|
[] |
no_license
|
cadusousa/Productos
|
b36a2ace550b7c61ecae1b28d0f95b7ffc8f91a6
|
c70bdeff530d699aa9f1c08577c99a0ebaeb0de4
|
refs/heads/master
| 2023-03-07T17:44:45.009859
| 2021-02-26T20:07:23
| 2021-02-26T20:07:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,487
|
java
|
package com.amesol.routelite.datos.basedatos;
import android.os.Build;
import java.io.File;
import java.util.List;
import com.amesol.routelite.datos.ModuloTerm;
import com.amesol.routelite.datos.Usuario;
import com.amesol.routelite.datos.Vendedor;
import com.amesol.routelite.datos.generales.Entidad;
import com.amesol.routelite.datos.generales.ISetDatos;
import com.amesol.routelite.datos.utilerias.ArchivoConfiguracion.CampoConfiguracion;
import com.amesol.routelite.datos.utilerias.CONHist;
import com.amesol.routelite.datos.utilerias.ConfigParametro;
import com.amesol.routelite.datos.utilerias.ConfiguracionLocal;
import com.amesol.routelite.datos.utilerias.MOTConfiguracion;
import com.amesol.routelite.datos.utilerias.Sesion;
import com.amesol.routelite.datos.utilerias.Sesion.Campo;
public class BDVend{
private static final String NO_CONF ="no existe archivo de configuracion";
private static final String NO_VEND ="usuario no seleccionado";
public static final String NO_BD_VEND ="no existe la base de datos del vendedor";
private static String nombreBD="";
protected static BaseDatos bd = null;
protected static synchronized BaseDatos getBD() throws Exception{
if(bd == null) throw new Exception(NO_BD_VEND);
return bd;
}
public static void Iniciar() throws Exception{
crearInstancia();
obtenerDatosSesion();
}
private static void obtenerDatosSesion() throws Exception{
if (BDVend.estaAbierta()){
Vendedor vendedor = null;
vendedor = Consultas.ConsultasVendedor.obtenerVendedorPorUsuario(getUsuarioTitular());
if(vendedor == null) throw new Exception("vendedor no corresponde al usuario");
Sesion.set(Campo.VendedorActual, vendedor);
Sesion.set(Campo.CONHist, new CONHist());
Sesion.set(Campo.MOTConfiguracion, new MOTConfiguracion());
Sesion.set(Campo.ConfigParametro, new ConfigParametro());
//Obtener el tipo de módulo para guardarlo en la sesion
MOTConfiguracion motConfiguracion = (MOTConfiguracion)Sesion.get(Campo.MOTConfiguracion);
ModuloTerm moduloTerm = new ModuloTerm();
moduloTerm.ModuloClave = motConfiguracion.get("ModuloClave").toString();
BDVend.recuperar(moduloTerm);
Sesion.set(Campo.TipoModulo, moduloTerm.TipoIndice);
String ModeloDispositivo= Build.MANUFACTURER.toUpperCase();
Sesion.set(Campo.ModeloDispositivo, ModeloDispositivo);
}
}
private static synchronized void crearInstancia() throws Exception{
if (Sesion.get(Campo.ConfiguracionLocal) == null) throw new Exception(NO_CONF);
ConfiguracionLocal conf =(ConfiguracionLocal)Sesion.get(Campo.ConfiguracionLocal);
Usuario usuario = getUsuarioTitular();
if(usuario == null) throw new Exception(NO_VEND);
File archivoBD = new File(conf.get(CampoConfiguracion.DIRECTORIO_TRABAJO).toString());
archivoBD = new File(archivoBD, "bd");
nombreBD = usuario.USUId + ".db";
archivoBD = new File(archivoBD,nombreBD);
if(!archivoBD.exists()) return;
bd = new BaseDatos(archivoBD.getAbsolutePath());
if (conf.get(CampoConfiguracion.HABILITAR_LOG) != null && (Boolean)conf.get(CampoConfiguracion.HABILITAR_LOG)) {
bd.setHabilitarLog((Boolean) conf.get(CampoConfiguracion.HABILITAR_LOG));
bd.setGuardarLog(false);
bd.setLogFileName(usuario.USUId);
}
else{
bd.setHabilitarLog(false);
bd.setGuardarLog(false);
}
bd.crearInstancia();
}
public static synchronized void cerrar() throws Exception{
if((bd != null)&&(bd.estaAbierta())){
bd.cerrar();
bd = null;
}
}
public static synchronized boolean estaAbierta() {
boolean abierta = false;
try {
if(bd == null) return false;
abierta = bd.estaAbierta();
} catch (Exception e) {
e.printStackTrace();
return false;
}
return abierta;
}
public static String nombreBaseDatos(){
return nombreBD;
}
public static void recuperar(Entidad entidad, Class<?> tipoHijos, String condicion) throws Exception{
getBD().recuperar(entidad, tipoHijos, condicion);
}
public static void recuperar(Entidad entidad, Class<?> tipoHijos) throws Exception{
getBD().recuperar(entidad, tipoHijos);
}
public static void recuperar(Entidad entidad) throws Exception {
getBD().recuperar(entidad);
}
public static void guardarInsertar(Entidad entidad) throws Exception{
getBD().guardarInsertar(entidad);
}
public static void eliminar(Entidad entidad) throws Exception{
getBD().eliminar(entidad);
}
public static void eliminar(List<Entidad> entidades) throws Exception{
getBD().eliminar(entidades);
}
public static void commit() throws Exception{
getBD().commit();
}
public static void rollback() throws Exception{
getBD().rollback();
}
public static boolean existe(Entidad entidad) throws Exception{
return getBD().existe(entidad);
}
public static ISetDatos consultar(Class<?> tabla) throws Exception{
return getBD().consultar(tabla);
}
public static ISetDatos consultar(Class<?> tabla, String[] columnas) throws Exception{
return getBD().consultar(tabla, columnas);
}
public static ISetDatos consultar(Class<?> tabla, String[] columnas, String filtro, Object[] parametros) throws Exception{
return getBD().consultar(tabla, columnas, filtro, parametros);
}
public static ISetDatos consultar(Class<?> tabla, String[] columnas, String filtro, Object[] parametros, String agrupador) throws Exception{
return getBD().consultar(tabla, columnas, filtro, parametros, agrupador);
}
public static ISetDatos consultar(Class<?> tabla, String[] columnas, String filtro, Object[] parametros, String agrupador, String having) throws Exception{
return getBD().consultar(tabla, columnas, filtro, parametros, agrupador, having);
}
public static ISetDatos consultar(Class<?> tabla, String[] columnas, String filtro, Object[] parametros, String agrupador, String having, String ordenamiento) throws Exception{
return getBD().consultar(tabla, columnas, filtro, parametros, agrupador, having, ordenamiento);
}
protected static ISetDatos consultar(String consultaSQL) throws Exception{
return getBD().consultar(consultaSQL);
}
protected static ISetDatos consultar(String consultaSQL, Object[] parametros) throws Exception{
return getBD().consultar(consultaSQL, parametros);
}
protected static ISetDatos consultar(Class<?> tabla, String[] columnas, String filtro, Object[] parametros, String agrupador, String having, String ordenamiento, String cantidad ) throws Exception{
return getBD().consultar(tabla, columnas, filtro, parametros, agrupador, having, ordenamiento, cantidad);
}
public static Object instanciar(Class<?> tabla, ISetDatos setDatos) throws Exception{
return getBD().instanciar(tabla, setDatos);
}
protected static void ejecutarComando(String comando) throws Exception{
getBD().ejecutarComando(comando);
}
private static Usuario getUsuarioTitular() throws Exception{
Usuario usuario = (Usuario) Sesion.get(Campo.UsuarioActual);
String claveTitular = ((ConfiguracionLocal)Sesion.get(Campo.ConfiguracionLocal)).get(CampoConfiguracion.USUARIO).toString();
if(usuario == null || !usuario.Clave.equalsIgnoreCase(claveTitular)){
return Consultas.ConsultasUsuario.obtenerUsuarioPorClave(claveTitular);
}
return usuario;
}
public static void setGuardarLog(Boolean bGuardar){
bd.setGuardarLog(bGuardar);
}
public static void setOrigenLog(String sOrigen){
bd.setLogOrigen(sOrigen);
}
}
|
[
"escoraxel@gmail.com"
] |
escoraxel@gmail.com
|
caa0fc4631fe236b0d199d7114abfbe6984ac1ac
|
49b62e01bcfb3328a3e32b98619d91d197d4968e
|
/app/src/main/java/adpter/NotificationAdpter.java
|
80eb3917a21318873f7481fad7deee0614903087
|
[] |
no_license
|
tyhjh/SchoolMsg
|
c4772bb3d4140d52f8ae72c8165221d8b26ace28
|
29c4d14fce24d19761f8371d952d4afa10bffda7
|
refs/heads/master
| 2021-01-19T04:44:27.753130
| 2016-12-13T11:31:50
| 2016-12-13T11:31:50
| 69,633,361
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,531
|
java
|
package adpter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.example.tyhj.schoolmsg.R;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.yanzhenjie.recyclerview.swipe.SwipeMenuAdapter;
import java.util.List;
import api.FormatTools;
import publicinfo.Notice;
import publicinfo.MyFunction;
/**
* Created by Tyhj on 2016/10/24.
*/
public class NotificationAdpter extends SwipeMenuAdapter<NotificationAdpter.Holder> {
Context context;
List<Notice> list;
LayoutInflater intentFilter;
public NotificationAdpter(Context context, List<Notice> list){
this.context=context;
this.list=list;
this.intentFilter=LayoutInflater.from(context);
}
@Override
public void onBindViewHolder(final Holder holder, int position) {
Notice notice=list.get(holder.getPosition());
holder.head.setClipToOutline(true);
holder.head.setOutlineProvider(MyFunction.getOutline(true,10,0));
holder.head.setImageDrawable(FormatTools.getInstance().Bytes2Drawable(notice.getHead()));
holder.name.setText(notice.getName());
holder.button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
}
});
}
@Override
public int getItemCount() {
return list.size();
}
@Override
public View onCreateContentView(ViewGroup parent, int viewType) {
View view=intentFilter.inflate(R.layout.item_notice,parent,false);
return view;
}
@Override
public Holder onCompatCreateViewHolder(View realContentView, int viewType) {
Holder holder=new Holder(realContentView);
return holder;
}
class Holder extends RecyclerView.ViewHolder{
ImageView head;
LinearLayout ll_group;
Button button;
TextView name;
public Holder(View itemView) {
super(itemView);
head= (ImageView) itemView.findViewById(R.id.iv_headImage);
ll_group= (LinearLayout) itemView.findViewById(R.id.ll_group);
button= (Button) itemView.findViewById(R.id.btn_add);
name= (TextView) itemView.findViewById(R.id.tv_name);
}
}
}
|
[
"1043315346@qq.com"
] |
1043315346@qq.com
|
42ca7ce5764bb77785fe36ab86b25a99a280c190
|
45999e21674e6aa8908f1ffd8a03bafb0b508bb5
|
/src/main/java/it/unimi/dsi/fastutil/booleans/BooleanSet.java
|
378ad558a837864e553cdb9b5bc52efd8f295b08
|
[
"Apache-2.0"
] |
permissive
|
LibertyLand/fastutil-lite
|
144150fc2340b279908e14da4618fe79b3b8b11e
|
9b0dde4b5b8376d92b739ef918fe7a1a7edc1b0c
|
refs/heads/master
| 2020-08-05T19:14:55.981188
| 2019-10-03T21:42:59
| 2019-10-03T21:42:59
| 212,672,065
| 0
| 0
|
Apache-2.0
| 2019-10-03T20:18:50
| 2019-10-03T20:18:50
| null |
UTF-8
|
Java
| false
| false
| 2,871
|
java
|
/*
* Copyright (C) 2002-2017 Sebastiano Vigna
*
* 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 it.unimi.dsi.fastutil.booleans;
import java.util.Set;
/** A type-specific {@link Set}; provides some additional methods that use polymorphism to avoid (un)boxing.
*
* <p>Additionally, this interface strengthens (again) {@link #iterator()}.
*
* @see Set
*/
public interface BooleanSet extends BooleanCollection , Set<Boolean> {
/** Returns a type-specific iterator on the elements of this set.
*
* <p>Note that this specification strengthens the one given in {@link java.lang.Iterable#iterator()},
* which was already strengthened in the corresponding type-specific class,
* but was weakened by the fact that this interface extends {@link Set}.
*
* @return a type-specific iterator on the elements of this set.
*/
@Override
BooleanIterator iterator();
/** Removes an element from this set.
*
* <p>Note that the corresponding method of a type-specific collection is {@code rem()}.
* This unfortunate situation is caused by the clash
* with the similarly named index-based method in the {@link java.util.List} interface.
*
* @see java.util.Collection#remove(Object)
*/
boolean remove(boolean k);
/** {@inheritDoc}
* @deprecated Please use the corresponding type-specific method instead.
*/
@SuppressWarnings("deprecation")
@Deprecated
@Override
default boolean remove(final Object o) {
return BooleanCollection.super.remove(o);
}
/** {@inheritDoc}
* @deprecated Please use the corresponding type-specific method instead.
*/
@SuppressWarnings("deprecation")
@Deprecated
@Override
default boolean add(final Boolean o) {
return BooleanCollection.super.add(o);
}
/** {@inheritDoc}
* @deprecated Please use the corresponding type-specific method instead.
*/
@SuppressWarnings("deprecation")
@Deprecated
@Override
default boolean contains(final Object o) {
return BooleanCollection.super.contains(o);
}
/** Removes an element from this set.
*
* <p>This method is inherited from the type-specific collection this
* type-specific set is based on, but it should not used as
* this interface reinstates {@code remove()} as removal method.
*
* @deprecated Please use {@code remove()} instead.
*/
@Deprecated
@Override
default boolean rem(boolean k) {
return remove(k);
}
}
|
[
"phantom_zero@ymail.com"
] |
phantom_zero@ymail.com
|
d3da3c5178cf5f77e9d1041b0f4f0eee9642b0d9
|
6a2d65c29a0face7d675c936bc58102b35a2e67b
|
/SpringCloudBorn-consumer-hystrix-dashboard/src/main/java/com/example/DeptConsumer_DashBoard_App.java
|
b6622f1e65c43d983df291dacc4706dba5ce4d2b
|
[] |
no_license
|
18753377299/SpringCloudBorn
|
3ad41248149ececc2856c1ace5a1e3000cf7668b
|
0ac2b4c457a8a77dc81c7fe2d1a839748738ebe4
|
refs/heads/master
| 2022-07-01T16:27:43.492498
| 2021-05-18T15:01:51
| 2021-05-18T15:01:51
| 197,711,597
| 0
| 0
| null | 2022-06-21T01:28:54
| 2019-07-19T06:03:44
|
Java
|
UTF-8
|
Java
| false
| false
| 456
|
java
|
package com.example;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
/**
* Hello world!
*
*/
@SpringBootApplication
@EnableHystrixDashboard
public class DeptConsumer_DashBoard_App
{
public static void main(String[] args)
{
SpringApplication.run(DeptConsumer_DashBoard_App.class, args);
}
}
|
[
"1733856225@qq.com"
] |
1733856225@qq.com
|
d931b019936b0cb61bc0905703aba3f81bb84a44
|
429d69a746b8082180a7591b34826b29e4a7f6f9
|
/KevinMedinaMensaje/src/modelo/Pirata.java
|
c97fb50b9dcd3896a7f7c30b1da35bc7b3224d4e
|
[] |
no_license
|
uebprogramacion1/Parcial2
|
441a8b6cb9f1b5e879d080a5f8b76fc005411e48
|
6decfb4071cebf9d10a08cd45d7c615f4f4ff211
|
refs/heads/master
| 2020-08-03T18:35:23.511527
| 2019-09-30T12:04:12
| 2019-09-30T12:04:12
| 150,153,211
| 0
| 1
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 1,077
|
java
|
package modelo;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.Properties;
public class Pirata {
private String llave;
private String palabra;
//OJO: AQUÍ SE PERDIÓ LA DECLARACIÓN DE UN ATRIBUTO
private Properties codigohonor;
public Pirata() {
this.llave = "xxx";
this.palabra = "yes";
this.codigohonor = new Properties();
}
public void establecerLlaves(String cofrecerrado) {
codigohonor.setProperty("hermandad", "barbosa");
codigohonor.setProperty("enemistad", "salazar");
try {
codigohonor.store(new FileOutputStream(cofrecerrado), null);
}
catch (Exception e) {
e.printStackTrace();
}
}
public String recibirLlaves(String cofreabierto) {
try {
codigohonor.load(new FileInputStream(cofreabierto));
this.llave = codigohonor.getProperty("hermandad");
this.palabra = codigohonor.getProperty("enemistad");
}
catch (Exception e) {
e.printStackTrace();
}
return this.llave + " ** " + this.palabra;
}
}
|
[
"rcamargol@unbosque.edu.co"
] |
rcamargol@unbosque.edu.co
|
8d07ce7791ca6514b2ebe8ca31b2a0341e10d760
|
9f24a18f1a1f5ecb9a8f3806bc0ee662a3fc3fd5
|
/tools/java/crcl4java/crcl4java-motoman/src/main/java/com/github/wshackle/crcl4java/motoman/kinematics/MP_COORD.java
|
5a2403e7a0f6a25f37205b1aa06ab89aa3de1676
|
[
"LicenseRef-scancode-public-domain"
] |
permissive
|
usnistgov/crcl
|
d5f9f068218af3e5e1cfef5cba12c837e6e22c87
|
8fb0c1dfa08108aeafb94efe0b4b85dc2ffccdd2
|
refs/heads/master
| 2023-03-02T10:34:15.524055
| 2023-02-27T21:40:38
| 2023-02-27T21:40:38
| 50,199,231
| 7
| 6
| null | 2016-01-22T18:22:24
| 2016-01-22T18:22:24
| null |
UTF-8
|
Java
| false
| false
| 2,413
|
java
|
/*
* This software is public domain software, however it is preferred
* that the following disclaimers be attached.
* Software Copywrite/Warranty Disclaimer
*
* This software was developed at the National Institute of Standards and
* Technology by employees of the Federal Government in the course of their
* official duties. Pursuant to title 17 Section 105 of the United States
* Code this software is not subject to copyright protection and is in the
* public domain.
*
* This software is experimental. NIST assumes no responsibility whatsoever
* for its use by other parties, and makes no guarantees, expressed or
* implied, about its quality, reliability, or any other characteristic.
* We would appreciate acknowledgement if the software is used.
* This software can be redistributed and/or modified freely provided
* that any derivative works bear some notice that they are derived from it,
* and any modified versions bear some notice that they have been modified.
*
* See http://www.copyright.gov/title17/92chap1.html#105
*
*/
package com.github.wshackle.crcl4java.motoman.kinematics;
import com.github.wshackle.crcl4java.motoman.motctrl.COORD_POS;
/**
*
* @author Will Shackleford {@literal <william.shackleford@nist.gov>}
*/
public class MP_COORD {
public int x, y, z;
public int rx, ry, rz;
public int ex1, ex2;
public MP_COORD diff(MP_COORD other) {
MP_COORD ret =new MP_COORD();
ret.x = this.x - other.x;
ret.y = this.y - other.y;
ret.z = this.z - other.z;
ret.rx = this.rx - other.rx;
ret.ry = this.ry - other.ry;
ret.rz = this.rz - other.rz;
ret.ex1 = this.ex1 - other.ex1;
ret.ex2 = this.ex2 - other.ex2;
return ret;
}
public MP_COORD diff(COORD_POS other) {
MP_COORD ret =new MP_COORD();
ret.x = this.x - other.x;
ret.y = this.y - other.y;
ret.z = this.z - other.z;
ret.rx = this.rx - other.rx;
ret.ry = this.ry - other.ry;
ret.rz = this.rz - other.rz;
ret.ex1 = this.ex1 - other.ex1;
ret.ex2 = this.ex2 - other.ex2;
return ret;
}
@Override
public String toString() {
return "MP_COORD{" + "x=" + x + ", y=" + y + ", z=" + z + ", rx=" + rx + ", ry=" + ry + ", rz=" + rz + ", ex1=" + ex1 + ", ex2=" + ex2 + '}';
}
}
|
[
"william.shackleford@nist.gov"
] |
william.shackleford@nist.gov
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.