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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ec74500f91307e90e283e4fdacdae0ec12696b47
|
7fdc7740a7b4958e26f4bdd0c67e2f33c9d032ab
|
/SpringBoot/learn-spring-boot/learn-spring-boot-chapter2/src/main/java/com/learn/springboot/chapter2/LearnSpringBootChapter2Application.java
|
ef85c9694192b23878ca9892867c74c207f02ff1
|
[] |
no_license
|
lysjava1992/javabase
|
9290464826d89c0415bb7c6084aa649de1496741
|
9d403aae8f20643fe1bf370cabcdd93164ea604b
|
refs/heads/master
| 2023-06-22T02:25:21.573301
| 2021-12-12T03:35:36
| 2021-12-12T03:35:36
| 216,582,761
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 381
|
java
|
package com.learn.springboot.chapter2;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @author admin
*/
@SpringBootApplication
public class LearnSpringBootChapter2Application {
public static void main(String[] args) {
SpringApplication.run(LearnSpringBootChapter2Application.class, args);
}
}
|
[
"763644568@qq.com"
] |
763644568@qq.com
|
22f197fb7eb1b6a69ea63d80b53e06cb92c2529e
|
2bc2eadc9b0f70d6d1286ef474902466988a880f
|
/tags/mule-2.0.0-RC1/examples/loanbroker/bpm/src/main/java/org/mule/examples/loanbroker/bpm/LoanBrokerApp.java
|
73a171f6d278448cfc0734e195b45f27c3375a37
|
[] |
no_license
|
OrgSmells/codehaus-mule-git
|
085434a4b7781a5def2b9b4e37396081eaeba394
|
f8584627c7acb13efdf3276396015439ea6a0721
|
refs/heads/master
| 2022-12-24T07:33:30.190368
| 2020-02-27T19:10:29
| 2020-02-27T19:10:29
| 243,593,543
| 0
| 0
| null | 2022-12-15T23:30:00
| 2020-02-27T18:56:48
| null |
UTF-8
|
Java
| false
| false
| 1,212
|
java
|
/*
* $Id$
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.examples.loanbroker.bpm;
import org.mule.examples.loanbroker.AbstractLoanBrokerApp;
import org.mule.providers.jdbc.util.MuleDerbyUtils;
import org.mule.umo.UMOException;
/**
* Executes the LoanBroker BPM example.
*/
public class LoanBrokerApp extends AbstractLoanBrokerApp
{
public LoanBrokerApp(String config) throws Exception
{
super(config);
}
public static void main(String[] args) throws Exception
{
LoanBrokerApp loanBrokerApp = new LoanBrokerApp("loan-broker-bpm-mule-config.xml");
loanBrokerApp.run(false);
}
protected void init() throws Exception
{
// before initialisation occurs, the database must be cleaned and a new one created
MuleDerbyUtils.defaultDerbyCleanAndInit("derby.properties", "database.name");
super.init();
}
}
|
[
"tcarlson@bf997673-6b11-0410-b953-e057580c5b09"
] |
tcarlson@bf997673-6b11-0410-b953-e057580c5b09
|
e68f03e745966fd7864b731886fddae44054e7ff
|
40cebab6dbf0ed783be03454ffbd53536eca3536
|
/src/ve/org/bcv/dao/impl/BaseDaoImpl.java
|
3100921d9aee560e2a0063ea97a4169ba311963d
|
[] |
no_license
|
saymonset/ENCSTAMEDIC
|
5ce1a54f334bb6da93a6322d397af0c1b9a34354
|
48e7a53359308df83d06646fde7d1b5cc3929538
|
refs/heads/master
| 2021-01-20T01:34:33.555999
| 2017-04-25T00:32:51
| 2017-04-25T00:32:51
| 89,299,568
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,234
|
java
|
/**
*
*/
package ve.org.bcv.dao.impl;
import java.io.Serializable;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import ve.org.bcv.dao.local.EntityRepository;
/**
* @author Ing Simon Alberto Rodriguez Pacheco
* 17/06/2016 14:45:06
* 2016
* mail : oraclefedora@gmail.com
*/
public abstract class BaseDaoImpl<E, PK extends Serializable> implements EntityRepository <E, PK> {
@PersistenceContext(unitName = "primary")
protected EntityManager em;
public abstract Class<E> getEntityClass();
public E save(E entity) {
em.persist(entity);
return entity;
}
public E update(E build) {
try {
build=em.merge(build);
} catch (Exception e) {
e.printStackTrace();
}
return build;
}
public void remove(E entity) {
em.remove(entity);
}
public void refresh(E entity) {
}
public void flush() {
}
public E findByPK(PK primaryKey) {
return em.find(getEntityClass(), primaryKey);
}
public List<E> findAll() {
return em.createQuery("Select t from " + getEntityClass().getSimpleName() + " t").getResultList();
}
}
|
[
"saymon_set@hotmail.com"
] |
saymon_set@hotmail.com
|
ee2485a754b54ccb605865e9a18cb7ef15ab125d
|
f5d5b368c1ae220b59cfb26bc26526b494c54d0e
|
/gameandroiddemo/src/com/me/flappybird/Flappybird.java
|
85d2d97b1efc73c46514b75ab44cf5813edad4c2
|
[] |
no_license
|
kishordgupta/2012_bkup
|
3778c26082697b1cf223e27822d8efe90b35fc76
|
53ef4014fb3e11158c3f9242cb1f829e02e3ef69
|
refs/heads/master
| 2021-01-10T08:25:57.122415
| 2020-10-16T12:06:52
| 2020-10-16T12:06:52
| 47,512,520
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,128
|
java
|
package com.me.flappybird;
import java.util.HashMap;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.audio.Sound;
import com.badlogic.gdx.math.Vector2;
public class Flappybird extends Game {
public static final Vector2 VIEWPORT = new Vector2(320, 480);
public AssetManager manager = new AssetManager();
public static HashMap<String, Sound> Sounds = new HashMap<String, Sound>();
@Override
public void create() {
Sounds.put(config.SoundsHit, Gdx.audio.newSound(Gdx.files.internal("data/sounds/sfx_hit.mp3")));
Sounds.put(config.SoundsScore, Gdx.audio.newSound(Gdx.files.internal("data/sounds/sfx_point.mp3")));
Sounds.put(config.SoundsJump, Gdx.audio.newSound(Gdx.files.internal("data/sounds/sfx_wing.mp3")));
setScreen(new Screenplay(this));
}
@Override
public void dispose() {
for (String key : Sounds.keySet()) {
Sounds.get(key).dispose();
}
manager.dispose();
super.dispose();
}
@Override
public void resize(int width, int height) {
// TODO Auto-generated method stub
super.resize(width, height);
}
}
|
[
"kdgupta87@gmail.com"
] |
kdgupta87@gmail.com
|
2c12d2e376cc2374f621ea4c853ef094047810dd
|
7ab398058a931ade5be64e474643127e1c5f72fe
|
/精灵之泉/src/main/java/com/sxbwstxpay/util/StringUtil.java
|
c13c5d29f6a6f5c2237ab03b7dd417d40f8fe8e6
|
[] |
no_license
|
liuzgAs/JingLingZhiQuan
|
a7e4cadaddd5f799ea347729c771d1c9be6492b0
|
89d365cf1f2b653c3f3e9630e0d140d230ba0f6f
|
refs/heads/master
| 2020-03-11T01:05:53.682687
| 2019-04-19T11:38:56
| 2019-04-19T11:38:56
| 129,681,484
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,704
|
java
|
package com.sxbwstxpay.util;
import android.text.TextUtils;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Created by zjb on 2016/4/6.
*/
public class StringUtil {
/**
* 验证手机格式
*/
public static boolean isMobileNO(String mobiles) {
/*
移动:134、135、136、137、138、139、150、151、157(TD)、158、159、187、188
联通:130、131、132、152、155、156、185、186
电信:133、153、180、189、(1349卫通)
总结起来就是第一位必定为1,第二位必定为3或5或8,其他位置的可以为0-9
*/
String telRegex = "[1][0123456789]\\d{9}";//"[1]"代表第1位为数字1,"[358]"代表第二位可以为3、5、8中的一个,"\\d{9}"代表后面是可以是0~9的数字,有9位。
if (TextUtils.isEmpty(mobiles)) {
return false;
} else {
return mobiles.matches(telRegex);
}
}
/**
* 密码必须大于6位,且由字母及数字组合
*
* @param password
* @return
*/
public static boolean isPassword(String password) {
String pass = "^(?=.*?[a-zA-Z])(?=.*?[0-9])[a-zA-Z0-9]{6,}$";
if (TextUtils.isEmpty(password)) {
return false;
} else {
return password.matches(pass);
}
}
/**
* 验证邮箱
*
* @param email
* @return
*/
public static boolean checkEmail(String email) {
boolean flag = false;
try {
String check = "^([a-z0-9A-Z]+[-|_|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$";
Pattern regex = Pattern.compile(check);
Matcher matcher = regex.matcher(email);
flag = matcher.matches();
} catch (Exception e) {
flag = false;
}
return flag;
}
/**
* 验证合法字符
*
* @return
*/
public static boolean checkCharacter(String character) {
boolean flag = false;
try {
String check = "[a-zA-Z0-9_]{4,16}";
Pattern regex = Pattern.compile(check);
Matcher matcher = regex.matcher(character);
flag = matcher.matches();
} catch (Exception e) {
flag = false;
}
return flag;
}
public static boolean isCarID(String carId) {
String telRegex = "[\\u4e00-\\u9fa5|WJ]{1}[A-Z0-9]{6}";
if (TextUtils.isEmpty(carId)) {
return false;
} else {
return carId.matches(telRegex);
}
}
private static Pattern p = Pattern.compile("[\u4e00-\u9fa5]*");
/**
* 验证姓名
*/
public static boolean checkChineseName(String name) {
boolean flag = false;
try {
Matcher matcher = p.matcher(name);
flag = matcher.matches();
if (name.length() < 2 || name.length() > 15) {
flag = false;
}
} catch (Exception e) {
flag = false;
}
return flag;
}
/**
* 提取出城市或者县
*
* @param city
* @param district
* @return
*/
public static String extractLocation(final String city, final String district) {
return district.contains("县") ? district.substring(0, district.length() - 1) : city.substring(0, city.length() - 1);
}
private static Pattern pattern = Pattern.compile("^(([1-9]{1}\\d*)|([0]{1}))(\\.(\\d){0,2})?$"); // 判断小数点后2位的数字的正则表达式
//金额验证
public static boolean isAmount(String str) {
Matcher match = pattern.matcher(str);
if (match.matches() == false) {
return false;
} else {
return true;
}
}
/**
* des: 秒数转换时分秒
* author: ZhangJieBo
* date: 2017/9/26 0026 下午 8:08
*/
public static String TimeFormat(int progress) {
int hour = progress / 3600;
int min = progress % 3600 / 60;
int sec = progress % 60;
//设置整数的输出格式: %02d d代表int 2代码位数 0代表位数不够时前面补0
String time = String.format("%02d", hour) + ":" + String.format("%02d", min) + ":" + String.format("%02d", sec);
return time;
}
/**
* des: 隐藏电话号码
* author: ZhangJieBo
* date: 2017/10/19 0019 下午 2:05
*/
public static String hidePhone(String phone) {
String substring01 = phone.substring(0, 3);
String substring02 = phone.substring(7, phone.length());
return substring01 + "****" + substring02;
}
}
|
[
"530092772@qq.com"
] |
530092772@qq.com
|
afff5b33bb9b71ef18692eb944f0fabed3fbbc91
|
44e536bb6266fa3f9e22aba8630d812f56872afc
|
/crs-hsys-client-core/src/main/java/io/crs/hsys/client/core/filter/roomtype/RoomTypeFilterPresenter.java
|
030518c41063501b823c7014ed7aed3eae96a1ef
|
[] |
no_license
|
LetsCloud/crs-hsys
|
b4c1aa83dbbe5c998b49e4a740bd24cf68732132
|
4fed6d998703ba0a88abf0e4f638f724937e2744
|
refs/heads/master
| 2022-12-25T22:43:03.360324
| 2020-03-21T22:55:52
| 2020-03-21T22:55:52
| 153,274,374
| 0
| 1
| null | 2022-12-16T15:02:48
| 2018-10-16T11:29:24
|
Java
|
UTF-8
|
Java
| false
| false
| 1,572
|
java
|
/**
*
*/
package io.crs.hsys.client.core.filter.roomtype;
import java.util.logging.Logger;
import javax.inject.Inject;
import com.google.web.bindery.event.shared.EventBus;
import com.gwtplatform.mvp.client.HasUiHandlers;
import io.crs.hsys.shared.cnst.InventoryType;
import io.crs.hsys.client.core.datasource.HotelDataSource2;
import io.crs.hsys.client.core.filter.AbstractFilterUiHandlers;
import io.crs.hsys.client.core.filter.hotelchild.AbstractHotelChildFilterPresenter;
import io.crs.hsys.client.core.security.CurrentUser;
/**
* @author robi
*
*/
public class RoomTypeFilterPresenter extends AbstractHotelChildFilterPresenter<RoomTypeFilterPresenter.MyView> {
private static Logger logger = Logger.getLogger(RoomTypeFilterPresenter.class.getName());
public interface MyView extends AbstractHotelChildFilterPresenter.MyView, HasUiHandlers<AbstractFilterUiHandlers> {
InventoryType getSelectedInventoryType();
}
@Inject
RoomTypeFilterPresenter(EventBus eventBus, MyView view, CurrentUser currentUser, HotelDataSource2 hotelDataSource) {
super(eventBus, view, currentUser, hotelDataSource);
logger.info("RoomTypeFilterPresenter()");
getView().setUiHandlers(this);
}
@Override
public void onReveal() {
super.onReveal();
logger.info("RoomTypeFilterPresenter().onReveal()");
}
public Boolean isOnlyActive() {
return getView().isOnlyActive();
}
public InventoryType getSelectedInventoryType() {
return getView().getSelectedInventoryType();
}
@Override
public void filterChange() {
// TODO Auto-generated method stub
}
}
|
[
"csernikr@gmail.com"
] |
csernikr@gmail.com
|
ff57c3018c85b3a6203aa8661f6fe1bd811bd38e
|
c8e934b6f99222a10e067a3fab34f39f10f8ea7e
|
/com/google/gson/internal/bind/DateTypeAdapter.java
|
32f3ce1335cd8ee03f883ff0890c084c3e8a50a4
|
[] |
no_license
|
ZPERO/Secret-Dungeon-Finder-Tool
|
19efef8ebe044d48215cdaeaac6384cf44ee35b9
|
c3c97e320a81b9073dbb5b99f200e99d8f4b26cc
|
refs/heads/master
| 2020-12-19T08:54:26.313637
| 2020-01-22T23:00:08
| 2020-01-22T23:00:08
| 235,683,952
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,284
|
java
|
package com.google.gson.internal.bind;
import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.internal.JavaVersion;
import com.google.gson.internal.PreJava9DateFormatProvider;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;
public final class DateTypeAdapter
extends TypeAdapter<Date>
{
public static final TypeAdapterFactory FACTORY = new TypeAdapterFactory()
{
public TypeAdapter create(Gson paramAnonymousGson, TypeToken paramAnonymousTypeToken)
{
if (paramAnonymousTypeToken.getRawType() == Date.class) {
return new DateTypeAdapter();
}
return null;
}
};
private final List<DateFormat> dateFormats = new ArrayList();
public DateTypeAdapter()
{
dateFormats.add(DateFormat.getDateTimeInstance(2, 2, Locale.US));
if (!Locale.getDefault().equals(Locale.US)) {
dateFormats.add(DateFormat.getDateTimeInstance(2, 2));
}
if (JavaVersion.isJava9OrLater()) {
dateFormats.add(PreJava9DateFormatProvider.getUSDateTimeFormat(2, 2));
}
}
/* Error */
private Date deserializeToDate(String paramString)
{
// Byte code:
// 0: aload_0
// 1: monitorenter
// 2: aload_0
// 3: getfield 26 com/google/gson/internal/bind/DateTypeAdapter:dateFormats Ljava/util/List;
// 6: invokeinterface 75 1 0
// 11: astore_2
// 12: aload_2
// 13: invokeinterface 80 1 0
// 18: ifeq +23 -> 41
// 21: aload_2
// 22: invokeinterface 84 1 0
// 27: checkcast 34 java/text/DateFormat
// 30: astore_3
// 31: aload_3
// 32: aload_1
// 33: invokevirtual 87 java/text/DateFormat:parse (Ljava/lang/String;)Ljava/util/Date;
// 36: astore_3
// 37: aload_0
// 38: monitorexit
// 39: aload_3
// 40: areturn
// 41: aload_1
// 42: new 89 java/text/ParsePosition
// 45: dup
// 46: iconst_0
// 47: invokespecial 92 java/text/ParsePosition:<init> (I)V
// 50: invokestatic 97 com/google/gson/internal/bind/util/ISO8601Utils:parse (Ljava/lang/String;Ljava/text/ParsePosition;)Ljava/util/Date;
// 53: astore_2
// 54: aload_0
// 55: monitorexit
// 56: aload_2
// 57: areturn
// 58: astore_2
// 59: new 99 com/google/gson/JsonSyntaxException
// 62: dup
// 63: aload_1
// 64: aload_2
// 65: invokespecial 102 com/google/gson/JsonSyntaxException:<init> (Ljava/lang/String;Ljava/lang/Throwable;)V
// 68: athrow
// 69: astore_1
// 70: aload_0
// 71: monitorexit
// 72: aload_1
// 73: athrow
// 74: astore_3
// 75: goto -63 -> 12
// Local variable table:
// start length slot name signature
// 0 78 0 this DateTypeAdapter
// 0 78 1 paramString String
// 11 46 2 localObject1 Object
// 58 7 2 localParseException1 java.text.ParseException
// 30 10 3 localObject2 Object
// 74 1 3 localParseException2 java.text.ParseException
// Exception table:
// from to target type
// 41 54 58 java/text/ParseException
// 2 12 69 java/lang/Throwable
// 12 31 69 java/lang/Throwable
// 31 37 69 java/lang/Throwable
// 41 54 69 java/lang/Throwable
// 59 69 69 java/lang/Throwable
// 31 37 74 java/text/ParseException
}
public Date read(JsonReader paramJsonReader)
throws IOException
{
if (paramJsonReader.peek() == JsonToken.NULL)
{
paramJsonReader.nextNull();
return null;
}
return deserializeToDate(paramJsonReader.nextString());
}
public void write(JsonWriter paramJsonWriter, Date paramDate)
throws IOException
{
if (paramDate == null) {}
try
{
paramJsonWriter.nullValue();
return;
}
catch (Throwable paramJsonWriter)
{
throw paramJsonWriter;
}
paramJsonWriter.value(((DateFormat)dateFormats.get(0)).format(paramDate));
}
}
|
[
"el.luisito217@gmail.com"
] |
el.luisito217@gmail.com
|
e34fe73f1544ab25efb06c668b2f805d66e8b4f7
|
cc5a7d0bfe6519e2d462de1ac9ef793fb610f2a7
|
/api1/src/main/java/com/heb/pm/batchUpload/ebmBda/EbmBdaCandidateWorkRequestCreator.java
|
d767fa8797c3a24dde99bdb2f5a84cdc9da90db5
|
[] |
no_license
|
manosbatsis/SAVEFILECOMPANY
|
d21535a46aebedf2a425fa231c678658d4b017a4
|
c33d41cf13dd2ff5bb3a882f6aecc89b24a206be
|
refs/heads/master
| 2023-03-21T04:46:23.286060
| 2019-10-10T10:38:02
| 2019-10-10T10:38:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,317
|
java
|
/*
* EbmBdaCandidateWorkRequestCreator
*
* Copyright (c) 2019 HEB
* All rights reserved.
*
* This software is the confidential and proprietary information
* of HEB.
*/
package com.heb.pm.batchUpload.ebmBda;
import com.heb.pm.batchUpload.parser.CandidateWorkRequestCreator;
import com.heb.pm.batchUpload.parser.ProductAttribute;
import com.heb.pm.batchUpload.parser.WorkRequestCreatorUtils;
import com.heb.pm.entity.*;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
* The class create the candidate request for ebmBda file.
* datas have been validate then insert to candidate work request table.
*
* @author vn70529
* @since 2.33.0
*/
@Service
public class EbmBdaCandidateWorkRequestCreator extends CandidateWorkRequestCreator {
private static final String SINGLE_SPACE = " ";
private static final String STRING_EMPTY = "EMPTY";
@Autowired
private EbmBdaValidator ebmBdaValidator;
@Override
public CandidateWorkRequest createRequest(List<String> cellValues, List<ProductAttribute> productAttributes, long transactionId, String userId) {
EbmBdaBatchUpload ebmBdaBatchUpload = this.createEbmBdaBatchUpload(cellValues);
this.ebmBdaValidator.validateRow(ebmBdaBatchUpload);
CandidateWorkRequest candidateWorkRequest =
WorkRequestCreatorUtils.getEmptyWorkRequest(null, null, userId, transactionId,
CandidateWorkRequest.SRC_SYSTEM_ID_DEFAULT, getBatchStatus(ebmBdaBatchUpload).getName());
if (!ebmBdaBatchUpload.hasErrors()) {
setDataToCandidateClassCommodity(candidateWorkRequest, ebmBdaBatchUpload);
}
setDataToCandidateStatus(candidateWorkRequest, ebmBdaBatchUpload);
return candidateWorkRequest;
}
/**
* set data to CandidateClassCommodity
*
* @param candidateWorkRequest the CandidateWorkRequest
* @param ebmBdaBatchUpload the EbmBdaBatchUpload
*/
public void setDataToCandidateClassCommodity(CandidateWorkRequest candidateWorkRequest, EbmBdaBatchUpload ebmBdaBatchUpload) {
CandidateClassCommodity candidateClassCommodity = new CandidateClassCommodity();
CandidateClassCommodityKey candidateClassCommodityKey = new CandidateClassCommodityKey();
candidateClassCommodityKey.setClassCode(Integer.valueOf(ebmBdaBatchUpload.getClassCode()));
candidateClassCommodityKey.setCommodityCode(Integer.valueOf(ebmBdaBatchUpload.getCommodityCode()));
candidateClassCommodity.setKey(candidateClassCommodityKey);
candidateClassCommodity.setEbmId(this.getEbmBdaId(ebmBdaBatchUpload.getEbmId()));
candidateClassCommodity.setBdaId(this.getEbmBdaId(ebmBdaBatchUpload.getBdaId()));
candidateClassCommodity.setCreateDate(LocalDateTime.now());
candidateClassCommodity.setCreateUserId(candidateWorkRequest.getUserId());
candidateClassCommodity.setLastUpdateDate(LocalDateTime.now());
candidateClassCommodity.setLastUpdateUserId(candidateWorkRequest.getUserId());
candidateClassCommodity.setCandidateWorkRequest(candidateWorkRequest);
candidateWorkRequest.setCandidateClassCommodities(new ArrayList<CandidateClassCommodity>());
candidateWorkRequest.getCandidateClassCommodities().add(candidateClassCommodity);
}
/**
* get value for edm, bda.
*
* @param value the value of ebm, bda.
* @return the id of ebm, bda
*/
public String getEbmBdaId(String value) {
//If value is null or empty then return null.
if (StringUtils.trimToEmpty(value).equals(StringUtils.EMPTY)) return null;
//If value is 'empty' or 'EMPTY' then return blank.
if (StringUtils.trimToEmpty(value).toUpperCase().equals(STRING_EMPTY)) return SINGLE_SPACE;
// If value is not null, not empty and not 'empty' then return value.
return value.trim();
}
/**
* set Data To CandidateStatus.
*
* @param candidateWorkRequest the CandidateWorkRequest
* @param ebmBdaBatchUpload the EbmBdaBatchUpload
*/
public void setDataToCandidateStatus(CandidateWorkRequest candidateWorkRequest, EbmBdaBatchUpload ebmBdaBatchUpload) {
String errorMessage = ebmBdaBatchUpload.hasErrors() ? ebmBdaBatchUpload.getErrors().get(0) : StringUtils.EMPTY;
candidateWorkRequest.setCandidateStatuses(new ArrayList<CandidateStatus>());
CandidateStatusKey key = new CandidateStatusKey();
key.setStatus(this.getBatchStatus(ebmBdaBatchUpload).getName());
key.setLastUpdateDate(LocalDateTime.now());
CandidateStatus candidateStatus = new CandidateStatus();
candidateStatus.setKey(key);
candidateStatus.setUpdateUserId(candidateWorkRequest.getUserId());
candidateStatus.setStatusChangeReason(CandidateStatus.STAT_CHG_RSN_ID_WRKG);
candidateStatus.setCommentText(errorMessage);
candidateStatus.setCandidateWorkRequest(candidateWorkRequest);
candidateWorkRequest.getCandidateStatuses().add(candidateStatus);
}
/**
* Create data for EbmBdaBatchUpload.
*
* @param cellValues the cell value.
* @return the EbmBdaBatchUpload
*/
private EbmBdaBatchUpload createEbmBdaBatchUpload(List<String> cellValues) {
EbmBdaBatchUpload eBMBDABatchUpload = new EbmBdaBatchUpload();
String value;
for (int j = 0; j < cellValues.size(); j++) {
value = cellValues.get(j);
switch (j) {
case EbmBdaBatchUpload.COL_POS_CLASS_CODE:
eBMBDABatchUpload.setClassCode(value);
break;
case EbmBdaBatchUpload.COL_POS_COMMODITY_CODE:
eBMBDABatchUpload.setCommodityCode(value);
break;
case EbmBdaBatchUpload.COL_POS_EBM_CODE:
eBMBDABatchUpload.setEbmId(value);
break;
case EbmBdaBatchUpload.COL_POS_BDA_CODE:
eBMBDABatchUpload.setBdaId(value);
break;
}
}
return eBMBDABatchUpload;
}
}
|
[
"tran.than@heb.com"
] |
tran.than@heb.com
|
49bf3737c406738a38c4247388213693a8c5bf6b
|
821eea25624740a008311eed3f962f1488684a5a
|
/src/main/java/Reciate/LC112.java
|
ab77c1bd3e9e39f08e5b97fe8823689b51657986
|
[] |
no_license
|
cchaoqun/Chaoqun_LeetCode
|
0c45598a0ba89cae9c53725b7b70adf767b226f1
|
5b2bf42bca66e46e4751455b81b17198b447bb39
|
refs/heads/master
| 2023-06-30T20:53:49.779110
| 2021-08-02T12:45:16
| 2021-08-02T12:45:16
| 367,815,848
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,562
|
java
|
package Reciate;
import java.util.LinkedList;
import java.util.Queue;
/*
* @Description: 112. 路径总和
给定一个二叉树和一个目标和,判断该树中是否存在根节点到叶子节点的路径,这条路径上所有节点值相加等于目标和。
说明:叶子节点是指没有子节点的节点。
*
示例:
给定如下二叉树,以及目标和 sum = 22,
5
/ \
4 8
/ / \
11 13 4
/ \ \
7 2 1
返回 true, 因为存在目标和为 22 的根节点到叶子节点的路径 5->4->11->2。
来源:力扣(LeetCode)
链接:https://leetcode-cn.com/problems/path-sum
著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
* @param null
* @return
* @author Chaoqun
* @creed: Talk is cheap,show me the code
* @date 2021/1/10 20:37
*/
public class LC112 {
//递归
// public boolean hasPathSum(TreeNode root, int sum) {
// return pathSum(root,sum,0);
// }
//
// public boolean pathSum(TreeNode root, int target, int sum){
// if(root!=null){
// //判断路径和==target 并且当前结点为叶子结点
// if(sum+root.val == target && root.left==null && root.right==null){
// return true;
// }else{
// //sum加上当前结点的值
// sum += root.val;
// //在左子节点递归
// //在右子节点递归
// return pathSum(root.left,target,sum) || pathSum(root.right,target,sum);
// }
// }
// return false;
// }
//递归简洁
// public boolean hasPathSum(TreeNode root, int sum){
// if(root==null){
// return false;
// }
// if(root.left==null && root.right==null){
// return root.val == sum;
// }
// return hasPathSum(root.left,sum-root.val) || hasPathSum(root.right,sum-root.val);
//
// }
//BFS
public boolean hasPathSum(TreeNode root, int sum){
if(root==null){
return false;
}
//创建两个队列
//结点队列
Queue<TreeNode> node = new LinkedList<>();
//根结点到当前结点路径和的队列
Queue<Integer> pathSum = new LinkedList<>();
//入队
node.offer(root);
pathSum.offer(root.val);
while(!node.isEmpty()){
//出队
TreeNode tempNode = node.poll();
int tempSum = pathSum.poll();
//当前为叶子结点
if(tempNode.left==null && tempNode.right==null){
//根结点到当前叶子结点的路径和==目标值
if(tempSum == sum){
return true;
}
continue;
}
//当前不是叶子结点
if(tempNode.left!=null){
node.offer(tempNode.left);
pathSum.offer(tempSum+tempNode.left.val);
}
if(tempNode.right!=null){
node.offer(tempNode.right);
pathSum.offer(tempSum+tempNode.right.val);
}
}
return false;
}
}
//Definition for a binary tree node.
class TreeNode {
int val;
TreeNode left;
TreeNode right;
TreeNode() {}
TreeNode(int val) { this.val = val; }
TreeNode(int val, TreeNode left, TreeNode right) {
this.val = val;
this.left = left;
this.right = right;
}
}
|
[
"chengchaoqun@hotmail.com"
] |
chengchaoqun@hotmail.com
|
61f99640236f489f0c450c2340430afbc34b0887
|
4d161a4ffb1dd12ddd850bf5e3bbd70a886be83e
|
/Debug/src/com/itheima/DebugTest02.java
|
415e789eee803264b74860b4f79062b9d8158bb5
|
[] |
no_license
|
wantairanwtr/heima
|
d70c13db762dfe4ad687ae4967a4c8906786f45d
|
6367467f5a8e9afbf7d2c4bb4c089aa0c036d4dd
|
refs/heads/master
| 2023-09-01T15:16:39.892679
| 2021-10-22T05:41:03
| 2021-10-22T05:41:03
| 406,267,497
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 546
|
java
|
package com.itheima;
import java.util.Scanner;
public class DebugTest02 {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
System.out.println("输入第一个整数");
int a=in.nextInt();
System.out.println("输入第二个数");
int b=in.nextInt();
int max=getMax(a,b);
System.out.println("较大的值是"+max);
}
public static int getMax(int a,int b){
if(a>b){
return a;
}else{
return b;
}
}
}
|
[
"email"
] |
email
|
9d272104064a0146539d6b2c9c6dd31c2b156ec5
|
2bc2eadc9b0f70d6d1286ef474902466988a880f
|
/tags/mule-2.0.0/core/src/main/java/org/mule/transformer/compression/GZipUncompressTransformer.java
|
7b7029ec13de827e43e56f91b9d020a5db9dd416
|
[] |
no_license
|
OrgSmells/codehaus-mule-git
|
085434a4b7781a5def2b9b4e37396081eaeba394
|
f8584627c7acb13efdf3276396015439ea6a0721
|
refs/heads/master
| 2022-12-24T07:33:30.190368
| 2020-02-27T19:10:29
| 2020-02-27T19:10:29
| 243,593,543
| 0
| 0
| null | 2022-12-15T23:30:00
| 2020-02-27T18:56:48
| null |
UTF-8
|
Java
| false
| false
| 1,901
|
java
|
/*
* $Id$
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.transformer.compression;
import org.mule.api.transformer.TransformerException;
import org.mule.config.i18n.MessageFactory;
import org.mule.util.IOUtils;
import java.io.IOException;
import java.io.InputStream;
import org.apache.commons.lang.SerializationUtils;
/**
* <code>GZipCompressTransformer</code> TODO
*/
public class GZipUncompressTransformer extends GZipCompressTransformer
{
public GZipUncompressTransformer()
{
super();
}
// @Override
public Object doTransform(Object src, String encoding) throws TransformerException
{
byte[] buffer = null;
try
{
byte[] input = null;
if (src instanceof InputStream)
{
InputStream inputStream = (InputStream)src;
try
{
input = IOUtils.toByteArray(inputStream);
}
finally
{
inputStream.close();
}
}
else
{
input = (byte[])src;
}
buffer = getStrategy().uncompressByteArray(input);
}
catch (IOException e)
{
throw new TransformerException(
MessageFactory.createStaticMessage("Failed to uncompress message."), this, e);
}
if (!getReturnClass().equals(byte[].class))
{
return SerializationUtils.deserialize(buffer);
}
return buffer;
}
}
|
[
"dirk.olmes@bf997673-6b11-0410-b953-e057580c5b09"
] |
dirk.olmes@bf997673-6b11-0410-b953-e057580c5b09
|
ace5a36d56f58606992cad5353ed3622da5b3e75
|
0f2d15e30082f1f45c51fdadc3911472223e70e0
|
/src/3.7/plugins/com.perforce.team.core/p4java/src/main/java/com/perforce/p4java/impl/mapbased/server/cmd/CommitDelegator.java
|
e0651238110cebfc185588ce33563dd7e8fea9e3
|
[
"BSD-2-Clause"
] |
permissive
|
eclipseguru/p4eclipse
|
a28de6bd211df3009d58f3d381867d574ee63c7a
|
7f91b7daccb2a15e752290c1f3399cc4b6f4fa54
|
refs/heads/master
| 2022-09-04T05:50:25.271301
| 2022-09-01T12:47:06
| 2022-09-01T12:47:06
| 136,226,938
| 2
| 1
|
BSD-2-Clause
| 2022-09-01T19:42:29
| 2018-06-05T19:45:54
|
Java
|
UTF-8
|
Java
| false
| false
| 7,426
|
java
|
package com.perforce.p4java.impl.mapbased.server.cmd;
import com.perforce.p4java.Log;
import com.perforce.p4java.exception.P4JavaException;
import com.perforce.p4java.graph.CommitAction;
import com.perforce.p4java.graph.ICommit;
import com.perforce.p4java.graph.IGraphObject;
import com.perforce.p4java.impl.generic.graph.Commit;
import com.perforce.p4java.impl.generic.graph.GraphObject;
import com.perforce.p4java.impl.mapbased.server.Parameters;
import com.perforce.p4java.option.server.GraphCommitLogOptions;
import com.perforce.p4java.server.CmdSpec;
import com.perforce.p4java.server.IOptionsServer;
import com.perforce.p4java.server.delegator.ICommitDelegator;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import static com.perforce.p4java.common.base.P4JavaExceptions.throwRequestExceptionIfConditionFails;
import static com.perforce.p4java.common.base.P4ResultMapUtils.parseCode0ErrorString;
import static com.perforce.p4java.common.base.P4ResultMapUtils.parseDataList;
import static com.perforce.p4java.common.base.P4ResultMapUtils.parseLong;
import static com.perforce.p4java.common.base.P4ResultMapUtils.parseString;
import static com.perforce.p4java.impl.mapbased.rpc.func.RpcFunctionMapKey.ACTION;
import static com.perforce.p4java.impl.mapbased.rpc.func.RpcFunctionMapKey.AUTHOR;
import static com.perforce.p4java.impl.mapbased.rpc.func.RpcFunctionMapKey.AUTHOR_EMAIL;
import static com.perforce.p4java.impl.mapbased.rpc.func.RpcFunctionMapKey.COMMIT;
import static com.perforce.p4java.impl.mapbased.rpc.func.RpcFunctionMapKey.COMMITTER;
import static com.perforce.p4java.impl.mapbased.rpc.func.RpcFunctionMapKey.COMMITTER_DATE;
import static com.perforce.p4java.impl.mapbased.rpc.func.RpcFunctionMapKey.COMMITTER_EMAIL;
import static com.perforce.p4java.impl.mapbased.rpc.func.RpcFunctionMapKey.DATE;
import static com.perforce.p4java.impl.mapbased.rpc.func.RpcFunctionMapKey.GRAPH_DESC;
import static com.perforce.p4java.impl.mapbased.rpc.func.RpcFunctionMapKey.PARENT;
import static com.perforce.p4java.impl.mapbased.rpc.func.RpcFunctionMapKey.SHA;
import static com.perforce.p4java.impl.mapbased.rpc.func.RpcFunctionMapKey.TREE;
import static com.perforce.p4java.impl.mapbased.rpc.func.RpcFunctionMapKey.TYPE;
import static com.perforce.p4java.server.CmdSpec.GRAPH;
import static java.util.Objects.nonNull;
import static org.apache.commons.lang3.StringUtils.isBlank;
public class CommitDelegator extends BaseDelegator implements ICommitDelegator {
/**
* Instantiates a new graph commit delegator.
*
* @param server the server
*/
public CommitDelegator(final IOptionsServer server) {
super(server);
}
@Override
public ICommit getCommitObject(String sha) throws P4JavaException {
List<Map<String, Object>> resultMaps = execMapCmdList(
GRAPH,
Parameters.processParameters(
null, null, new String[]{"cat-file", "commit", sha}, server),
null);
List<ICommit> commits = parseCommitList(resultMaps);
// should only return a single result
if(commits != null && !commits.isEmpty()) {
return commits.get(0);
}
return null;
}
@Override
public ICommit getCommitObject(String sha, String repo) throws P4JavaException {
List<Map<String, Object>> resultMaps = execMapCmdList(
GRAPH,
Parameters.processParameters(
null, null, new String[]{"cat-file", "-n", repo, "commit", sha}, server),
null);
List<ICommit> commits = parseCommitList(resultMaps);
// should only return a single result
if(commits != null && !commits.isEmpty()) {
return commits.get(0);
}
return null;
}
@Override
public InputStream getBlobObject(String repo, String sha) throws P4JavaException {
InputStream inputStream = execStreamCmd(
GRAPH,
Parameters.processParameters(
null, null, new String[]{"cat-file", "-n", repo, "blob", sha}, server)
);
return inputStream;
}
@Override
public IGraphObject getGraphObject(String sha) throws P4JavaException {
List<Map<String, Object>> resultMaps = execMapCmdList(
CmdSpec.GRAPH,
Parameters.processParameters(
null, null, new String[]{"cat-file", "-t", sha}, server),
null);
if (!nonNull(resultMaps)) {
return null;
}
String rsha = null;
String type = null;
for (Map<String, Object> map : resultMaps) {
if (nonNull(map)) {
// Check for errors
ResultMapParser.handleErrorStr(map);
String errStr = ResultMapParser.getErrorStr(map);
throwRequestExceptionIfConditionFails(isBlank(errStr), parseCode0ErrorString(map), errStr);
try {
if (map.containsKey(SHA)) {
rsha = parseString(map, SHA);
}
if (map.containsKey(TYPE)) {
type = parseString(map, TYPE);
}
} catch (Throwable thr) {
Log.exception(thr);
}
}
}
return new GraphObject(rsha, type);
}
/**
* Returns a List<IGraphCommitLog> encapsulating a commit logs which holds the
* data retrieved as part of the 'p4 graph log -n command'
*
* @param options Various options supported by the command
* @return List<IGraphCommitLog>
* @throws P4JavaException
*/
@Override
public List<ICommit> getGraphCommitLogList(GraphCommitLogOptions options) throws P4JavaException {
List<Map<String, Object>> resultMaps = execMapCmdList(
GRAPH, Parameters.processParameters(options, server), null);
if (!nonNull(resultMaps)) {
return null;
}
return parseCommitList(resultMaps);
}
private List<ICommit> parseCommitList(List<Map<String, Object>> resultMaps) throws P4JavaException {
List<ICommit> list = new ArrayList<>();
if (!nonNull(resultMaps)) {
return null;
}
for (Map<String, Object> map : resultMaps) {
String commit = null;
String tree = null;
CommitAction action = CommitAction.UNKNOWN;
List<String> parent = new ArrayList<>();
String author = null;
String authorEmail = null;
Date date = null;
String committer = null;
String committerEmail = null;
Date committerDate = null;
String description = null;
if (!nonNull(map) || map.isEmpty()) {
return null;
}
// Check for errors
ResultMapParser.handleErrorStr(map);
try {
if (map.containsKey(COMMIT)) {
commit = parseString(map, COMMIT);
}
if (map.containsKey(TREE)) {
tree = parseString(map, TREE);
}
if (map.containsKey(ACTION)) {
action = CommitAction.parse(parseString(map, ACTION));
}
parent = parseDataList(map, PARENT);
if (map.containsKey(AUTHOR)) {
author = parseString(map, AUTHOR);
}
if (map.containsKey(AUTHOR_EMAIL)) {
authorEmail = parseString(map, AUTHOR_EMAIL);
}
if (map.containsKey(DATE)) {
date = new Date(parseLong(map, DATE) * 1000);
}
if (map.containsKey(COMMITTER)) {
committer = parseString(map, COMMITTER);
}
if (map.containsKey(COMMITTER_EMAIL)) {
committerEmail = parseString(map, COMMITTER_EMAIL);
}
if (map.containsKey(COMMITTER_DATE)) {
committerDate = new Date(parseLong(map, COMMITTER_DATE) * 1000);
}
if (map.containsKey(GRAPH_DESC)) {
description = parseString(map, GRAPH_DESC);
}
} catch (Throwable thr) {
Log.exception(thr);
}
Commit entry = new Commit(commit, tree, action, parent, author, authorEmail, date, committer, committerEmail, committerDate, description);
list.add(entry);
}
return list;
}
}
|
[
"gunnar@wagenknecht.org"
] |
gunnar@wagenknecht.org
|
472f5c1e1f58dbc8d55a26107e015ae49b4f8f7e
|
a2753b177335ca9ee647cd862c9d21b824e0f4c6
|
/src/main/java/edu/arizona/biosemantics/etcsite/client/content/settings/SettingsView.java
|
a64d997d056c180ea53b5f0f370c3f297ee37438
|
[] |
no_license
|
rodenhausen/otoLiteFromEtcIntegration
|
d6d339cbca23512a453d7128e1375914e8177e5b
|
9b33cd4bd1667e2657d931591ba2866bf97d3d63
|
refs/heads/master
| 2016-09-05T15:48:19.048749
| 2014-08-20T02:23:07
| 2014-08-20T02:23:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,488
|
java
|
package edu.arizona.biosemantics.etcsite.client.content.settings;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.uibinder.client.UiTemplate;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.PasswordTextBox;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.Widget;
import edu.arizona.biosemantics.etcsite.shared.db.User;
public class SettingsView extends Composite implements ISettingsView {
private static SettingsViewUiBinder uiBinder = GWT.create(SettingsViewUiBinder.class);
@UiTemplate("SettingsView.ui.xml")
interface SettingsViewUiBinder extends UiBinder<Widget, SettingsView> {}
@UiField
Button submitButton;
@UiField
TextBox firstNameBox;
@UiField
TextBox lastNameBox;
@UiField
TextBox emailBox;
@UiField
TextBox affiliationBox;
@UiField
TextBox bioportalUserIdBox;
@UiField
TextBox bioportalAPIKeyBox;
@UiField
PasswordTextBox oldPasswordBox;
@UiField
PasswordTextBox newPasswordBox;
@UiField
PasswordTextBox confirmNewPasswordBox;
@UiField
Label idLabel;
@UiField
Label errorLabel;
private Presenter presenter;
private final int FIELD_WIDTH = 180;
private User user;
public SettingsView() {
initWidget(uiBinder.createAndBindUi(this));
firstNameBox.setPixelSize(FIELD_WIDTH, 14);
lastNameBox.setPixelSize(FIELD_WIDTH, 14);
emailBox.setPixelSize(FIELD_WIDTH, 14);
affiliationBox.setPixelSize(FIELD_WIDTH, 14);
bioportalUserIdBox.setPixelSize(FIELD_WIDTH, 14);
bioportalAPIKeyBox.setPixelSize(FIELD_WIDTH, 14);
oldPasswordBox.setPixelSize(FIELD_WIDTH, 14);
newPasswordBox.setPixelSize(FIELD_WIDTH, 14);
confirmNewPasswordBox.setPixelSize(FIELD_WIDTH, 14);
}
@UiHandler("submitButton")
void onClick(ClickEvent e) {
presenter.onSubmit();
}
@Override
public void setPresenter(Presenter presenter) {
this.presenter = presenter;
}
@Override
public void setData(User user){
firstNameBox.setText(user.getFirstName());
lastNameBox.setText(user.getLastName());
idLabel.setText(user.getOpenIdProviderId());
emailBox.setText(user.getEmail());
affiliationBox.setText(user.getAffiliation());
bioportalUserIdBox.setText(user.getBioportalUserId());
bioportalAPIKeyBox.setText(user.getBioportalAPIKey());
oldPasswordBox.setText("");
newPasswordBox.setText("");
confirmNewPasswordBox.setText("");
firstNameBox.setEnabled(true);
lastNameBox.setEnabled(true);
emailBox.setEnabled(true);
affiliationBox.setEnabled(true);
bioportalUserIdBox.setEnabled(true);
bioportalAPIKeyBox.setEnabled(true);
oldPasswordBox.setEnabled(true);
newPasswordBox.setEnabled(true);
confirmNewPasswordBox.setEnabled(true);
this.user = user;
if (!user.getOpenIdProvider().equals("none")){
firstNameBox.setEnabled(false);
lastNameBox.setEnabled(false);
oldPasswordBox.setText(user.getPassword());
oldPasswordBox.setEnabled(false);
newPasswordBox.setEnabled(false);
confirmNewPasswordBox.setEnabled(false);
}
}
@Override
public void setErrorMessage(String str){
errorLabel.setText(str);
}
@Override
public void clearPasswords() {
oldPasswordBox.setText("");
newPasswordBox.setText("");
confirmNewPasswordBox.setText("");
}
@Override
public String getFirstName() {
return firstNameBox.getText();
}
@Override
public String getLastName() {
return lastNameBox.getText();
}
@Override
public String getOpenIdProviderId(){
return idLabel.getText();
}
@Override
public String getEmail() {
return emailBox.getText();
}
@Override
public String getAffiliation() {
return affiliationBox.getText();
}
@Override
public String getBioportalUserId() {
return bioportalUserIdBox.getText();
}
@Override
public String getBioportalAPIKey() {
return bioportalAPIKeyBox.getText();
}
@Override
public String getOldPassword() {
return oldPasswordBox.getText();
}
@Override
public String getNewPassword() {
return newPasswordBox.getText();
}
@Override
public String getConfirmNewPassword() {
return confirmNewPasswordBox.getText();
}
@Override
public String getOpenIdProvider() {
return user.getOpenIdProvider();
}
}
|
[
"thomas.rodenhausen@gmail.com"
] |
thomas.rodenhausen@gmail.com
|
c57516567fe857904e4e30063e21d4533bc7336f
|
60d83aaa20e4ce4569675753586c1684d12213c3
|
/gravitee-gateway-handlers/gravitee-gateway-handlers-api/src/main/java/io/gravitee/gateway/handlers/api/http/client/spring/HttpClientConfigurationImportSelector.java
|
5d24311758d2c8ccfff10927fae8ced189052b29
|
[
"Apache-2.0"
] |
permissive
|
Tifancy/gravitee-gateway
|
04ec7ed95763f445a5e14a6eec35d147ec89bf82
|
b769afbc5ac9f53c40816c53cfcf59eed3d5d63d
|
refs/heads/master
| 2021-05-06T12:58:39.289701
| 2017-11-29T08:04:32
| 2017-11-29T08:04:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,312
|
java
|
/**
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
*
* 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.gravitee.gateway.handlers.api.http.client.spring;
import io.gravitee.gateway.api.http.client.HttpClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.DeferredImportSelector;
import org.springframework.core.io.support.SpringFactoriesLoader;
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.util.Assert;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
/**
* @author David BRASSELY (david at gravitee.io)
* @author GraviteeSource Team
*/
public class HttpClientConfigurationImportSelector implements DeferredImportSelector {
private final Logger LOGGER = LoggerFactory.getLogger(HttpClientConfigurationImportSelector.class);
@Override
public String[] selectImports(AnnotationMetadata importingClassMetadata) {
LOGGER.debug("Looking for an HTTP Client implementation");
List<String> configurations = getCandidateConfigurations();
if (configurations.isEmpty()) {
LOGGER.error("No HTTP client implementation can be found !");
throw new IllegalStateException("No HTTP client implementation can be found !");
}
LOGGER.debug("\tFound {} {} implementation(s)", configurations.size(), HttpClient.class.getSimpleName());
configurations = removeDuplicates(configurations);
return configurations.toArray(new String[configurations.size()]);
}
/**
* Return the HTTP client class names that should be considered. By default
* this method will load candidates using {@link SpringFactoriesLoader} with
* {@link #getSpringFactoriesLoaderFactoryClass()}.
* attributes}
* @return a list of candidate configurations
*/
protected List<String> getCandidateConfigurations() {
List<String> configurations = SpringFactoriesLoader.loadFactoryNames(
getSpringFactoriesLoaderFactoryClass(), this.getClass().getClassLoader());
Assert.notEmpty(configurations,
"No HTTP client classes found in META-INF/spring.factories. If you" +
"are using a custom packaging, make sure that file is correct.");
return configurations;
}
/**
* Return the class used by {@link org.springframework.core.io.support.SpringFactoriesLoader} to
* load configuration candidates.
* @return the factory class
*/
protected Class<?> getSpringFactoriesLoaderFactoryClass() {
return HttpClient.class;
}
protected final <T> List<T> removeDuplicates(List<T> list) {
return new ArrayList<>(new LinkedHashSet<>(list));
}
}
|
[
"brasseld@gmail.com"
] |
brasseld@gmail.com
|
bfbe5409afd82fb4c449516cda8623bb42bbb0a0
|
3468bdeab577155470f9f62e2a56dda1db5f1855
|
/ontology/graph/src/main/java/edu/arizona/biosemantics/common/ontology/graph/Reader.java
|
426da11d6ea53d3880c46f04eb2c83b0d1ada547
|
[] |
no_license
|
biosemantics/common
|
583d612a28b52b8d6e69088bfe7a669cbeeca767
|
14fcfafb72b6730ed79ea4f77afa8d22cabc8a2e
|
refs/heads/master
| 2021-04-15T19:03:11.977247
| 2019-04-24T23:28:05
| 2019-04-24T23:28:05
| 25,384,744
| 0
| 0
| null | 2017-09-26T21:32:31
| 2014-10-18T02:26:12
|
Java
|
UTF-8
|
Java
| false
| false
| 639
|
java
|
package edu.arizona.biosemantics.common.ontology.graph;
import java.io.File;
import java.io.FileInputStream;
import java.io.ObjectInputStream;
import edu.uci.ics.jung.graph.DirectedSparseMultigraph;
public class Reader {
private String inputGraphFile;
public Reader(String inputGraphFile) {
this.inputGraphFile = inputGraphFile;
}
public OntologyGraph read() throws Exception {
try(FileInputStream fileInputStream = new FileInputStream(new File(inputGraphFile))) {
try(ObjectInputStream in = new ObjectInputStream(fileInputStream)) {
Object object = in.readObject();
return (OntologyGraph)object;
}
}
}
}
|
[
"thomas.rodenhausen@gmail.com"
] |
thomas.rodenhausen@gmail.com
|
20c035e50f75c9811ee5cef68c4ff70025ba6bba
|
15237faf3113c144bad2c134dbe1cfa08756ba12
|
/platypus-js-forms/src/main/java/com/eas/client/forms/components/rt/VTextField.java
|
5518d3a2229a4f7821661c09b33da38f278f6615
|
[
"Apache-2.0"
] |
permissive
|
marat-gainullin/platypus-js
|
3fcf5a60ba8e2513d63d5e45c44c11cb073b07fb
|
22437b7172a3cbebe2635899608a32943fed4028
|
refs/heads/master
| 2021-01-20T12:14:26.954647
| 2020-06-10T07:06:34
| 2020-06-10T07:06:34
| 21,357,013
| 1
| 2
|
Apache-2.0
| 2020-06-09T20:44:52
| 2014-06-30T15:56:35
|
Java
|
UTF-8
|
Java
| false
| false
| 2,681
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.eas.client.forms.components.rt;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.beans.PropertyChangeListener;
import javax.swing.JTextField;
/**
*
* @author Марат
*/
public class VTextField extends JTextField implements HasValue<String>, HasEmptyText, HasEditable {
private String oldValue;
public VTextField(String aText) {
super(aText);
super.setText(aText != null ? aText : "");
if (aText == null) {
nullValue = true;
}
oldValue = aText;
super.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
checkValueChanged();
}
});
super.addActionListener((java.awt.event.ActionEvent e) -> {
checkValueChanged();
});
}
private void checkValueChanged() {
String newValue = getValue();
if (oldValue == null ? newValue != null : !oldValue.equals(newValue)) {
String wasOldValue = oldValue;
oldValue = newValue;
firePropertyChange(VALUE_PROP_NAME, wasOldValue, newValue);
}
}
@Override
public String getValue() {
return nullValue ? null : super.getText();
}
private boolean nullValue;
@Override
public void setValue(String aValue) {
nullValue = aValue == null;
super.setText(aValue != null ? aValue : "");
checkValueChanged();
}
@Override
public void addValueChangeListener(PropertyChangeListener listener) {
super.addPropertyChangeListener(VALUE_PROP_NAME, listener);
}
@Override
public void removeValueChangeListener(PropertyChangeListener listener) {
super.removePropertyChangeListener(VALUE_PROP_NAME, listener);
}
protected String emptyText;
@Override
public String getEmptyText() {
return emptyText;
}
@Override
public void setEmptyText(String aValue) {
emptyText = aValue;
}
@Override
public boolean getEditable() {
return super.isEditable();
}
@Override
public String getText() {
return super.getText();
}
@Override
public void setText(String aValue) {
nullValue = false;
super.setText(aValue != null ? aValue : "");
checkValueChanged();
}
}
|
[
"mg@altsoft.biz"
] |
mg@altsoft.biz
|
feee73589ef581d97bd45e0ebd71291cad011ce1
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project85/src/test/java/org/gradle/test/performance85_3/Test85_206.java
|
31585ff03759c3b29c58362b85136bdd39592977
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 292
|
java
|
package org.gradle.test.performance85_3;
import static org.junit.Assert.*;
public class Test85_206 {
private final Production85_206 production = new Production85_206("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
8518daddb6e0b601412aa2531cb1d6c89fe0ba50
|
243b6e8c391acc7ccaf3d36c94cdb21a1f62ff38
|
/security-core/src/main/java/com/security/core/properties/SmsCodeProperties.java
|
7ffb871fcb0cc0a394d3ed747f7ea324c674c1c7
|
[] |
no_license
|
fengyuhetao/security
|
e89ac05be5c03257725919d0d56007d89d835034
|
ba20b3d697aee9d62a1c56fdae45762a042f96da
|
refs/heads/master
| 2021-07-18T15:23:03.446363
| 2017-10-26T06:29:40
| 2017-10-26T06:29:40
| 107,833,379
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 276
|
java
|
package com.security.core.properties;/**
* Created by HT on 2017/10/15.
*/
import lombok.Data;
/**
* @author HT
* @create 2017-10-15 18:37
**/
@Data
public class SmsCodeProperties {
private int length = 4;
private int expireIn = 60;
private String url;
}
|
[
"fengyunhetao@gmail.com"
] |
fengyunhetao@gmail.com
|
9a31e283096479d3a6dab6ca48137371a1b3e33a
|
0deffdd02bc1a330a7f06d5366ba693b2fd10e61
|
/BOOT_CAMP_PROJECTS/Deevanshu/sessionbeandemo/ejbModule/com/soft/ejb/LoginBean.java
|
195f306e2a06990136b3e6a62beaa1be8b930c8d
|
[] |
no_license
|
deevanshu07/Projects
|
77adb903575de9563a324a294c04c88e50dfffeb
|
6c49672b3b1eda8b16327b56114560140b087e38
|
refs/heads/master
| 2021-04-27T21:52:13.560590
| 2018-04-26T15:35:21
| 2018-04-26T15:35:21
| 122,406,211
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,165
|
java
|
package com.soft.ejb;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.annotation.Resource;
import javax.ejb.Stateless;
import javax.sql.DataSource;
/**
* Session Bean implementation class LoginBean
*/
@Stateless
public class LoginBean implements LoginBeanRemote, LoginBeanLocal {
/**
* Default constructor.
*/
public LoginBean() {
// TODO Auto-generated constructor stub
}
@Resource(mappedName="java:OracleDS")
DataSource ds;
public boolean validate(String username,String password)
{
/*if(username.equals(password))
{
return true;
}
else
return false;*/
try
{
String sql="select * from user_login where username=?";
Connection con= ds.getConnection();
PreparedStatement pstmt=con.prepareStatement(sql);
pstmt.setString(1,username);
ResultSet result=pstmt.executeQuery();
if(result.next())
{
return true;
}
else
return false;
}
catch(Exception e)
{
e.printStackTrace();
}
return true;
}
}
|
[
"deevanshumahajan07@gmail.com"
] |
deevanshumahajan07@gmail.com
|
43e3cefc88f67514c9e3dd1db4bcbe9d26742429
|
dac8a56ee2c38c3a48f7a38677cc252fd0b5f94a
|
/CodeSnippets/December/15Dec/Prog4/Prog4.java
|
6625fcc0bbc99751132d346d63e2a0620e70c42b
|
[] |
no_license
|
nikitasanjaypatil/Java9
|
64dbc0ec8b204c54bfed128d9517ea0fb00e97a4
|
fd92b1b13d767e5ee48d88fe22f0260d3d1ac391
|
refs/heads/master
| 2023-03-15T03:44:34.347450
| 2021-02-28T17:13:01
| 2021-02-28T17:13:01
| 281,289,978
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 243
|
java
|
class Parent {
public String toString() {
return "Parent";
}
}
class Child extends Parent {
public static void main(String[] args) {
Parent p = new Child();
System.out.println(p.toString());
}
}
/*
* Output-
* Parent
*/
|
[
"nikitaspatilaarvi@gmail.com"
] |
nikitaspatilaarvi@gmail.com
|
8cb1e2b299233bdadf025d8b39bc00e1f588596c
|
f08256664e46e5ac1466f5c67dadce9e19b4e173
|
/sources/p602m/p613d/p614a/p626n2/C13622h.java
|
b8e29a7b999433f7a2445a0361669dd1f738e1e0
|
[] |
no_license
|
IOIIIO/DisneyPlusSource
|
5f981420df36bfbc3313756ffc7872d84246488d
|
658947960bd71c0582324f045a400ae6c3147cc3
|
refs/heads/master
| 2020-09-30T22:33:43.011489
| 2019-12-11T22:27:58
| 2019-12-11T22:27:58
| 227,382,471
| 6
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,237
|
java
|
package p602m.p613d.p614a.p626n2;
import java.math.BigInteger;
import p602m.p613d.p614a.C13484b1;
import p602m.p613d.p614a.C13589n;
import p602m.p613d.p614a.C13630p;
import p602m.p613d.p614a.C13643t;
import p602m.p613d.p653e.p654a.C13812e;
import p602m.p613d.p653e.p654a.C13812e.C13813a;
import p602m.p613d.p653e.p654a.C13812e.C13814b;
/* renamed from: m.d.a.n2.h */
/* compiled from: X9FieldElement */
public class C13622h extends C13589n {
/* renamed from: U */
private static C13624j f30288U = new C13624j();
/* renamed from: c */
protected C13812e f30289c;
public C13622h(C13812e eVar) {
this.f30289c = eVar;
}
/* renamed from: a */
public C13643t mo34785a() {
return new C13484b1(f30288U.mo34847a(this.f30289c.mo35117l(), f30288U.mo34846a(this.f30289c)));
}
/* renamed from: e */
public C13812e mo34842e() {
return this.f30289c;
}
public C13622h(BigInteger bigInteger, C13630p pVar) {
this(new C13814b(bigInteger, new BigInteger(1, pVar.mo34797i())));
}
public C13622h(int i, int i2, int i3, int i4, C13630p pVar) {
C13813a aVar = new C13813a(i, i2, i3, i4, new BigInteger(1, pVar.mo34797i()));
this(aVar);
}
}
|
[
"101110@vivaldi.net"
] |
101110@vivaldi.net
|
7aa6b8a6c14d21bc3b623d73c3515ceba604c363
|
7d2b200db2c005f39edbe6e85facf2d2f308b550
|
/app/src/main/java/com/xuechuan/xcedu/mvp/contract/VideoOrderContract.java
|
20d3d4500bba31af80338074518f36c080974569
|
[] |
no_license
|
yufeilong92/tushday
|
872f54cd05d3cf8441d6f47d2a35ffda96f19edf
|
7d463709de92e6c719557f4c5cba13676ed4b988
|
refs/heads/master
| 2020-04-13T08:38:43.435530
| 2018-12-25T14:02:12
| 2018-12-25T14:02:12
| 163,087,412
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,126
|
java
|
package com.xuechuan.xcedu.mvp.contract;
import android.content.Context;
import com.xuechuan.xcedu.mvp.view.RequestResulteView;
import com.xuechuan.xcedu.net.PayService;
import com.xuechuan.xcedu.net.view.StringCallBackView;
import java.util.List;
/**
* @version V 1.0 xxxxxxxx
* @Title: xcedu
* @Package com.xuechuan.xcedu.mvp.contract
* @Description: 视频下单
* @author: L-BackPacker
* @date: 2018/8/25 9:00
* @verdescript 版本号 修改时间 修改人 修改的概要说明
* @Copyright: 2018
*/
public interface VideoOrderContract {
interface Model {
public void sumbitPayFrom(Context context, String usebalance, List<Integer> products, String ordersource, final String remark, int addressid, RequestResulteView view);
}
interface View {
public void paySuccess(String result);
public void payError(String msg);
}
interface Presenter {
public void initModelView(Model model, View view);
public void sumbitPayFrom(Context context, String usebalance, List<Integer> products, String ordersource, final String remark, int addressid);
}
}
|
[
"931697478@qq.com"
] |
931697478@qq.com
|
b8ecb782121899dadc8e32ed6eefa096c9417ef4
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/elastic--elasticsearch/8a37cc2a3c2a718d17ed2e4883cb791f214e27c7/after/TermsQueryBuilder.java
|
10967addd18f552db41a8e77de8aeeae7b36339e
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,253
|
java
|
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.elasticsearch.index.query;
import org.elasticsearch.common.xcontent.XContentBuilder;
import java.io.IOException;
/**
* A filter for a field based on several terms matching on any of them.
*/
public class TermsQueryBuilder extends QueryBuilder<TermsQueryBuilder> {
public static final String NAME = "terms";
private final String name;
private final Object values;
private String queryName;
private String execution;
private String lookupIndex;
private String lookupType;
private String lookupId;
private String lookupRouting;
private String lookupPath;
private Boolean lookupCache;
static final TermsQueryBuilder PROTOTYPE = new TermsQueryBuilder(null, (Object) null);
/**
* A filter for a field based on several terms matching on any of them.
*
* @param name The field name
* @param values The terms
*/
public TermsQueryBuilder(String name, String... values) {
this(name, (Object[]) values);
}
/**
* A filter for a field based on several terms matching on any of them.
*
* @param name The field name
* @param values The terms
*/
public TermsQueryBuilder(String name, int... values) {
this.name = name;
this.values = values;
}
/**
* A filter for a field based on several terms matching on any of them.
*
* @param name The field name
* @param values The terms
*/
public TermsQueryBuilder(String name, long... values) {
this.name = name;
this.values = values;
}
/**
* A filter for a field based on several terms matching on any of them.
*
* @param name The field name
* @param values The terms
*/
public TermsQueryBuilder(String name, float... values) {
this.name = name;
this.values = values;
}
/**
* A filter for a field based on several terms matching on any of them.
*
* @param name The field name
* @param values The terms
*/
public TermsQueryBuilder(String name, double... values) {
this.name = name;
this.values = values;
}
/**
* A filter for a field based on several terms matching on any of them.
*
* @param name The field name
* @param values The terms
*/
public TermsQueryBuilder(String name, Object... values) {
this.name = name;
this.values = values;
}
/**
* A filter for a field based on several terms matching on any of them.
*
* @param name The field name
* @param values The terms
*/
public TermsQueryBuilder(String name, Iterable values) {
this.name = name;
this.values = values;
}
/**
* Sets the execution mode for the terms filter. Cane be either "plain", "bool"
* "and". Defaults to "plain".
* @deprecated elasticsearch now makes better decisions on its own
*/
@Deprecated
public TermsQueryBuilder execution(String execution) {
this.execution = execution;
return this;
}
/**
* Sets the filter name for the filter that can be used when searching for matched_filters per hit.
*/
public TermsQueryBuilder queryName(String queryName) {
this.queryName = queryName;
return this;
}
/**
* Sets the index name to lookup the terms from.
*/
public TermsQueryBuilder lookupIndex(String lookupIndex) {
this.lookupIndex = lookupIndex;
return this;
}
/**
* Sets the index type to lookup the terms from.
*/
public TermsQueryBuilder lookupType(String lookupType) {
this.lookupType = lookupType;
return this;
}
/**
* Sets the doc id to lookup the terms from.
*/
public TermsQueryBuilder lookupId(String lookupId) {
this.lookupId = lookupId;
return this;
}
/**
* Sets the path within the document to lookup the terms from.
*/
public TermsQueryBuilder lookupPath(String lookupPath) {
this.lookupPath = lookupPath;
return this;
}
public TermsQueryBuilder lookupRouting(String lookupRouting) {
this.lookupRouting = lookupRouting;
return this;
}
public TermsQueryBuilder lookupCache(boolean lookupCache) {
this.lookupCache = lookupCache;
return this;
}
@Override
public void doXContent(XContentBuilder builder, Params params) throws IOException {
builder.startObject(NAME);
if (values == null) {
builder.startObject(name);
if (lookupIndex != null) {
builder.field("index", lookupIndex);
}
builder.field("type", lookupType);
builder.field("id", lookupId);
if (lookupRouting != null) {
builder.field("routing", lookupRouting);
}
if (lookupCache != null) {
builder.field("cache", lookupCache);
}
builder.field("path", lookupPath);
builder.endObject();
} else {
builder.field(name, values);
}
if (execution != null) {
builder.field("execution", execution);
}
if (queryName != null) {
builder.field("_name", queryName);
}
builder.endObject();
}
@Override
public String queryId() {
return NAME;
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
9142c272d2b3fe75339e85a4a3120ae4749ac09d
|
c914af9235374ede137c33c9a3e2c1dd514e9d2d
|
/src/main/java/kr/nzzi/msa/pmg/pomangamapimonilith/domain/product/sub/sub/service/ProductSubService.java
|
014c3e20411306361c01a540f1d7e22a9302e285
|
[] |
no_license
|
cholnh/pomangam-api-monolith
|
0e83f64ed39edbf712150bd62c7a348dcb87ac38
|
bcbf045584068e0f03f69eab1e92d3b2e5771a29
|
refs/heads/master
| 2023-06-24T16:11:12.544604
| 2021-08-03T03:01:11
| 2021-08-03T03:01:11
| 390,221,364
| 0
| 0
| null | 2021-08-03T03:01:12
| 2021-07-28T05:09:15
|
Java
|
UTF-8
|
Java
| false
| false
| 513
|
java
|
package kr.nzzi.msa.pmg.pomangamapimonilith.domain.product.sub.sub.service;
import kr.nzzi.msa.pmg.pomangamapimonilith.domain.product.sub.category.dto.ProductSubCategoryDto;
import kr.nzzi.msa.pmg.pomangamapimonilith.domain.product.sub.sub.dto.ProductSubDto;
import java.util.List;
public interface ProductSubService {
List<ProductSubCategoryDto> findByIdxProduct(Long pIdx);
List<ProductSubCategoryDto> findByIdxProductSubCategory(Long cIdx);
ProductSubDto findByIdx(Long idx);
long count();
}
|
[
"cholnh1@naver.com"
] |
cholnh1@naver.com
|
014c7411f9377e7f12db14382c156564de6c72dc
|
a6fb1906006f64e216f4ea8f4c078469c375e606
|
/src/main/java/com/bolyartech/forge/server/misc/GzipUtils.java
|
8ba6eb4af836eb13d74aafb9372a91c49445a6c5
|
[
"Apache-2.0"
] |
permissive
|
ogrebgr/forge-server-http
|
d6626c9fa3f549931eae691d5b6094878ec23f58
|
43cc4a6577bed6267a05000bf21d8e206bed9776
|
refs/heads/master
| 2020-06-10T16:50:21.419915
| 2017-01-02T11:36:25
| 2017-01-02T11:36:25
| 75,931,207
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,009
|
java
|
package com.bolyartech.forge.server.misc;
import com.bolyartech.forge.server.response.HttpHeaders;
import com.bolyartech.forge.server.route.RequestContext;
import java.util.List;
public class GzipUtils {
public static boolean supportsGzip(RequestContext ctx) {
List<String> values = ctx.getHeaderValues(HttpHeaders.ACCEPT_ENCODING);
if (values != null) {
for (String val : values) {
if (val.contains(",")) {
String[] exploded = val.split(",");
for (String s : exploded) {
if (s.contains(HttpHeaders.CONTENT_ENCODING_GZIP)) {
return true;
}
}
} else {
if (val.contains(HttpHeaders.CONTENT_ENCODING_GZIP)) {
return true;
}
}
}
return false;
} else {
return false;
}
}
}
|
[
"ogibankov@gmail.com"
] |
ogibankov@gmail.com
|
96f89c3d2980bdb197af0f7900b60dd3717cdf78
|
192f29254d602b8075610e2a5d5b951782def105
|
/rating-service/src/main/java/com/hsbg/RatingController.java
|
7543f3765fa1c1e50c4348e2e7f4d588adcbe6bb
|
[] |
no_license
|
vilasvarghese/microservices
|
0d88573048d5c106931d8a77d9f941f7308d1bfa
|
fad77dc80fda59328a0456d698370eb3f63bc7ec
|
refs/heads/master
| 2022-11-10T01:42:02.754214
| 2022-10-18T08:10:06
| 2022-10-18T08:10:06
| 249,636,572
| 0
| 5
| null | 2020-10-13T21:35:57
| 2020-03-24T07:05:08
|
Java
|
UTF-8
|
Java
| false
| false
| 575
|
java
|
package com.hsbg;
import java.util.Collections;
import java.util.List;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.hsbg.models.Rating;
@RestController
@RequestMapping("/ratings")
public class RatingController {
//There is a class level mapping as well.
@RequestMapping("/employeerating/{employeeId}")
public Rating getEmployeeRatings(@PathVariable String employeeId){
return new Rating(employeeId, 4);
}
}
|
[
"vilas.varghese@gmail.com"
] |
vilas.varghese@gmail.com
|
7d74187c5360db8fbbbffc9789173e668cea9b23
|
fa444cda81bf78a21b634718d1b30f078b7087e1
|
/src/main/java/com/learn/patterns/freemanAndFreeman/headfirst/command/party/TVOffCommand.java
|
cae5c8ba4b42593ca0eacee1a4d891632d023448
|
[] |
no_license
|
dmitrybilyk/interviews
|
8fb4356a77ef63d74db613295bbbb296e3e652b7
|
f48d00bd348bab871304578c0c6c423c24db175e
|
refs/heads/master
| 2022-12-22T08:11:35.366586
| 2022-04-29T17:36:20
| 2022-04-29T17:36:20
| 23,141,851
| 4
| 0
| null | 2022-12-16T03:39:20
| 2014-08-20T08:42:27
|
Java
|
UTF-8
|
Java
| false
| false
| 255
|
java
|
package com.learn.patterns.freemanAndFreeman.headfirst.command.party;
public class TVOffCommand implements Command {
TV tv;
public TVOffCommand(TV tv) {
this.tv= tv;
}
public void execute() {
tv.off();
}
public void undo() {
tv.on();
}
}
|
[
"dmitry.bilyk@symmetrics.de"
] |
dmitry.bilyk@symmetrics.de
|
fedc5299a72c9b8095f9cb4d92778868a37d2cc6
|
30edba3cc1757d6df5b5a830e4ddb3fb7896e605
|
/hu.bme.mit.trainbenchmark.benchmark.sql/src/main/java/hu/bme/mit/trainbenchmark/benchmark/sql/transformations/repair/SQLTransformationRepairSwitchSet.java
|
4c63cffda3a45c129b4b57d9e1f38385507e54af
|
[] |
no_license
|
IncQueryLabs/trainbenchmark
|
b21ecf17b1ed4efdc2e04031ca35599abf1f5ec7
|
aa610691387a04f41f5fd745b610924cae32dd48
|
refs/heads/master
| 2023-08-11T08:38:00.435601
| 2015-11-09T15:47:04
| 2015-11-09T15:47:04
| 45,915,684
| 1
| 0
| null | 2015-11-10T14:04:53
| 2015-11-10T14:04:53
| null |
UTF-8
|
Java
| false
| false
| 1,766
|
java
|
/*******************************************************************************
* Copyright (c) 2010-2015, Benedek Izso, Gabor Szarnyas, Istvan Rath and Daniel Varro
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Benedek Izso - initial API and implementation
* Gabor Szarnyas - initial API and implementation
*******************************************************************************/
package hu.bme.mit.trainbenchmark.benchmark.sql.transformations.repair;
import java.io.IOException;
import java.sql.SQLException;
import java.util.Collection;
import hu.bme.mit.trainbenchmark.benchmark.config.BenchmarkConfig;
import hu.bme.mit.trainbenchmark.benchmark.sql.driver.SQLDriver;
import hu.bme.mit.trainbenchmark.benchmark.sql.match.SQLSwitchSetMatch;
import hu.bme.mit.trainbenchmark.constants.Query;
public class SQLTransformationRepairSwitchSet extends SQLTransformationRepair<SQLSwitchSetMatch> {
public SQLTransformationRepairSwitchSet(final SQLDriver driver, final BenchmarkConfig benchmarkConfig, final Query query) throws IOException {
super(driver, benchmarkConfig, query);
}
@Override
public void rhs(final Collection<SQLSwitchSetMatch> matches) throws SQLException {
if (preparedUpdateStatement == null) {
preparedUpdateStatement = driver.getConnection().prepareStatement(updateQuery);
}
for (final SQLSwitchSetMatch match : matches) {
preparedUpdateStatement.setLong(1, match.getPosition());
preparedUpdateStatement.setLong(2, match.getSw());
preparedUpdateStatement.executeUpdate();
}
}
}
|
[
"szarnyasg@gmail.com"
] |
szarnyasg@gmail.com
|
01b7dc33f8884a57e56133a0227985226553745b
|
9623f83defac3911b4780bc408634c078da73387
|
/powercraft_147/src/minecraft/net/minecraft/server/gui/GuiStatsListener.java
|
a5ba2afdf47afdcfd8b88acca2522b387360d2a3
|
[] |
no_license
|
BlearStudio/powercraft-legacy
|
42b839393223494748e8b5d05acdaf59f18bd6c6
|
014e9d4d71bd99823cf63d4fbdb65c1b83fde1f8
|
refs/heads/master
| 2021-01-21T21:18:55.774908
| 2015-04-06T20:45:25
| 2015-04-06T20:45:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 586
|
java
|
package net.minecraft.server.gui;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@SideOnly(Side.SERVER)
class GuiStatsListener implements ActionListener
{
final GuiStatsComponent statsComponent;
GuiStatsListener(GuiStatsComponent par1GuiStatsComponent)
{
this.statsComponent = par1GuiStatsComponent;
}
public void actionPerformed(ActionEvent par1ActionEvent)
{
GuiStatsComponent.update(this.statsComponent);
}
}
|
[
"nils.h.emmerich@gmail.com@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c"
] |
nils.h.emmerich@gmail.com@ed9f5d1b-00bb-0f29-faab-e8ebad1a710c
|
6191f001a631f60ca85d6e4c3ef831d1a42db68a
|
fe774f001d93d28147baec987a1f0afe0a454370
|
/ml-model/files/set34/The_Sudhanshu.java
|
eb7e2e1f5cdfc840580a7772b8e42a449365affe
|
[] |
no_license
|
gabrielchl/ml-novice-expert-dev-classifier
|
9dee42e04e67ab332cff9e66030c27d475592fe9
|
bcfca5870a3991dcfc1750c32ebbc9897ad34ea3
|
refs/heads/master
| 2023-03-20T05:07:20.148988
| 2021-03-19T01:38:13
| 2021-03-19T01:38:13
| 348,934,427
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 477
|
java
|
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;
public class Solution {
static int[] circularArrayRotation(int[] a, int k, int[] queries) {
int z=0,len = a.length;
int ro = k % len;
int arr[] = new int[queries.length];
for(int i : queries){
arr[z++] = a[((len-ro +i)% len)];
}
return arr;
}
}
|
[
"chihonglee777@gmail.com"
] |
chihonglee777@gmail.com
|
b8d9b8b547557852d378ae7375642882ff9b9083
|
99b7dd09706b62e21926fbeb07d846195463a881
|
/src/test/java/com/avi/educative/multithreading/OrderPrintingTest.java
|
d8bb3245d9187162eb87eed9bb711abdba565c39
|
[] |
no_license
|
aviundefined/dailypractice
|
ad10c9661d6af03c77935222bf0bf95fcf78bb2b
|
ca98e0610a38827b74719ca65cbe739e29bd7a99
|
refs/heads/master
| 2023-07-06T11:16:44.561228
| 2023-06-24T13:45:14
| 2023-06-24T13:45:14
| 208,435,489
| 0
| 0
| null | 2022-05-20T22:02:19
| 2019-09-14T12:12:10
|
Java
|
UTF-8
|
Java
| false
| false
| 435
|
java
|
package com.avi.educative.multithreading;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Created by navinash on 26/10/20.
* Copyright 2019 VMware, Inc. All rights reserved.
* -- VMware Confidential
*/
public class OrderPrintingTest {
@Test
public void test() throws InterruptedException {
final OrderPrinting orderPrinting = new OrderPrinting();
orderPrinting.orderPrinting();
}
}
|
[
"iitk.avinash.nigam@gmail.com"
] |
iitk.avinash.nigam@gmail.com
|
cff83064aa99695d2e73f9b0eb554b0e3e0c0601
|
5f04cf301638bfed95d34128486f21138e23602f
|
/foodie-dev-mapper/src/main/java/com/imooc/mapper/ItemsMapperCustom.java
|
650014f1554e2579475a47ea29601a3cc56e1d46
|
[] |
no_license
|
i-kang/foodie-dev
|
d6c406e5de7c0b21a10a65e3014c5abe870850f1
|
c937b2decdbed89dcf3059eb685b2db2f66f30b3
|
refs/heads/master
| 2020-11-30T12:29:24.495991
| 2019-11-16T13:38:44
| 2019-11-16T13:38:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 711
|
java
|
package com.imooc.mapper;
import com.imooc.vo.ItemCommentVO;
import com.imooc.vo.SearchItemsVO;
import com.imooc.vo.ShopCartVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
public interface ItemsMapperCustom {
List<ItemCommentVO> queryItemComments(@Param("paramsMap") Map<String, Object> map);
List<SearchItemsVO> searchItems(@Param("paramsMap") Map<String, Object> map);
List<SearchItemsVO> searchItemsByThirdCat(@Param("paramsMap") Map<String, Object> map);
List<ShopCartVO> queryItemsBySpecIds(@Param("paramsList") List specIdsList);
int decreaseItemSpecStock(@Param("specId") String specId, @Param("pendingStock") int pendingCounts);
}
|
[
"1677390657@qq.com"
] |
1677390657@qq.com
|
f6e3d5005187e8b06df6e5e1c2fbe59e6a9fec00
|
bbe10639bb9c8f32422122c993530959534560e1
|
/delivery/app-release_source_from_JADX/com/google/android/gms/games/internal/game/GameBadgeBuffer.java
|
de3b352db518054673efa5605798bbf0744e3ed0
|
[
"Apache-2.0"
] |
permissive
|
ANDROFAST/delivery_articulos
|
dae74482e41b459963186b6e7e3d6553999c5706
|
ddcc8b06d7ea2895ccda2e13c179c658703fec96
|
refs/heads/master
| 2020-04-07T15:13:18.470392
| 2018-11-21T02:15:19
| 2018-11-21T02:15:19
| 158,476,390
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 362
|
java
|
package com.google.android.gms.games.internal.game;
import com.google.android.gms.common.data.AbstractDataBuffer;
public final class GameBadgeBuffer extends AbstractDataBuffer<GameBadge> {
public /* synthetic */ Object get(int x0) {
return zzgq(x0);
}
public GameBadge zzgq(int i) {
return new GameBadgeRef(this.zzafC, i);
}
}
|
[
"cespedessanchezalex@gmail.com"
] |
cespedessanchezalex@gmail.com
|
38a9ee35d48343b3af9877cd220cf1e5341bb98a
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XRENDERING-418-8-14-PESA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/listener/chaining/AbstractChainingListener_ESTest.java
|
0225ac1118c55d103c3f400798401060b38feff7
|
[] |
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
| 592
|
java
|
/*
* This file was automatically generated by EvoSuite
* Fri Apr 03 01:54:48 UTC 2020
*/
package org.xwiki.rendering.listener.chaining;
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 AbstractChainingListener_ESTest extends AbstractChainingListener_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
a906c06389d385e7760727179eaf6017a675e16a
|
bee4de4cdda2739e0c62f15168b52d089dcee2a0
|
/src/main/java/com/sop4j/base/apache/compress/archivers/zip/ZipExtraField.java
|
d89b4057039a20661623acd347d6774796fe70d3
|
[
"Apache-2.0"
] |
permissive
|
wspeirs/sop4j-base
|
5be82eafa27bbdb42a039d7642d5efb363de56d0
|
3640cdd20c5227bafc565c1155de2ff756dca9da
|
refs/heads/master
| 2021-01-19T11:29:34.918100
| 2013-11-27T22:15:26
| 2013-11-27T22:15:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,969
|
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 com.sop4j.base.apache.compress.archivers.zip;
import java.util.zip.ZipException;
/**
* General format of extra field data.
*
* <p>Extra fields usually appear twice per file, once in the local
* file data and once in the central directory. Usually they are the
* same, but they don't have to be. {@link
* java.util.zip.ZipOutputStream java.util.zip.ZipOutputStream} will
* only use the local file data in both places.</p>
*
*/
public interface ZipExtraField {
/**
* The Header-ID.
*
* @return The HeaderId value
*/
ZipShort getHeaderId();
/**
* Length of the extra field in the local file data - without
* Header-ID or length specifier.
* @return the length of the field in the local file data
*/
ZipShort getLocalFileDataLength();
/**
* Length of the extra field in the central directory - without
* Header-ID or length specifier.
* @return the length of the field in the central directory
*/
ZipShort getCentralDirectoryLength();
/**
* The actual data to put into local file data - without Header-ID
* or length specifier.
* @return the data
*/
byte[] getLocalFileDataData();
/**
* The actual data to put into central directory - without Header-ID or
* length specifier.
* @return the data
*/
byte[] getCentralDirectoryData();
/**
* Populate data from this array as if it was in local file data.
*
* @param buffer the buffer to read data from
* @param offset offset into buffer to read data
* @param length the length of data
* @exception ZipException on error
*/
void parseFromLocalFileData(byte[] buffer, int offset, int length)
throws ZipException;
/**
* Populate data from this array as if it was in central directory data.
*
* @param buffer the buffer to read data from
* @param offset offset into buffer to read data
* @param length the length of data
* @exception ZipException on error
*/
void parseFromCentralDirectoryData(byte[] buffer, int offset, int length)
throws ZipException;
}
|
[
"bill.speirs@gmail.com"
] |
bill.speirs@gmail.com
|
28d45547c0f222085043875229129a00ec9d5efd
|
6fd8e47cdba944697e6bb3acbc9ccb0d09a17991
|
/cli/trunk/cli-profiles-parser/src/main/java/eu/cloud4soa/cli/profiles/grammar/syntaxtree/StorageComponent.java
|
c45a3c485f1f541543066a7d5450894a22267adf
|
[
"Apache-2.0"
] |
permissive
|
Cloud4SOA/Cloud4SOA
|
0bc251780fcb6934b1d50027c3638f31d60c0f40
|
eff65895b215873bef0dd07e899fc01abccb19b6
|
refs/heads/master
| 2023-01-22T02:22:01.225319
| 2013-08-08T08:03:39
| 2013-08-08T08:03:39
| 11,971,122
| 2
| 2
| null | 2023-01-02T21:59:37
| 2013-08-08T08:00:58
|
Java
|
UTF-8
|
Java
| false
| false
| 1,446
|
java
|
/*
* Copyright 2013 Cloud4SOA, www.cloud4soa.eu
*
* 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.
*/
/* Generated by JTB 1.4.4 */
package eu.cloud4soa.cli.profiles.grammar.syntaxtree;
import eu.cloud4soa.cli.profiles.grammar.visitor.*;
public class StorageComponent implements INode {
public Component f0;
public Capacity f1;
public NodeOptional f2;
private static final long serialVersionUID = 144L;
public StorageComponent(final Component n0, final Capacity n1, final NodeOptional n2) {
f0 = n0;
f1 = n1;
f2 = n2;
}
public <R, A> R accept(final IRetArguVisitor<R, A> vis, final A argu) {
return vis.visit(this, argu);
}
public <R> R accept(final IRetVisitor<R> vis) {
return vis.visit(this);
}
public <A> void accept(final IVoidArguVisitor<A> vis, final A argu) {
vis.visit(this, argu);
}
public void accept(final IVoidVisitor vis) {
vis.visit(this);
}
}
|
[
"pgouvas@gmail.com"
] |
pgouvas@gmail.com
|
ef7fc3ec85237e24234c7cbbfca23cb9c07faf42
|
7ec0194c493e63b18ab17b33fe69a39ed6af6696
|
/masterlock/app_decompiled/sources/com/google/android/gms/location/GeofencingClient.java
|
54e88cb20473b6e6ad083ebe5986ee83a9e0b854
|
[] |
no_license
|
rasaford/CS3235
|
5626a6e7e05a2a57e7641e525b576b0b492d9154
|
44d393fb3afb5d131ad9d6317458c5f8081b0c04
|
refs/heads/master
| 2020-07-24T16:00:57.203725
| 2019-11-05T13:00:09
| 2019-11-05T13:00:09
| 207,975,557
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,735
|
java
|
package com.google.android.gms.location;
import android.app.Activity;
import android.app.PendingIntent;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.RequiresPermission;
import com.google.android.gms.common.api.Api.ApiOptions.NoOptions;
import com.google.android.gms.common.api.GoogleApi;
import com.google.android.gms.common.api.internal.ApiExceptionMapper;
import com.google.android.gms.common.api.internal.StatusExceptionMapper;
import com.google.android.gms.common.internal.PendingResultUtil;
import com.google.android.gms.tasks.Task;
import java.util.List;
public class GeofencingClient extends GoogleApi<NoOptions> {
public GeofencingClient(@NonNull Activity activity) {
super(activity, LocationServices.API, null, (StatusExceptionMapper) new ApiExceptionMapper());
}
public GeofencingClient(@NonNull Context context) {
super(context, LocationServices.API, null, (StatusExceptionMapper) new ApiExceptionMapper());
}
@RequiresPermission("android.permission.ACCESS_FINE_LOCATION")
public Task<Void> addGeofences(GeofencingRequest geofencingRequest, PendingIntent pendingIntent) {
return PendingResultUtil.toVoidTask(LocationServices.GeofencingApi.addGeofences(asGoogleApiClient(), geofencingRequest, pendingIntent));
}
public Task<Void> removeGeofences(PendingIntent pendingIntent) {
return PendingResultUtil.toVoidTask(LocationServices.GeofencingApi.removeGeofences(asGoogleApiClient(), pendingIntent));
}
public Task<Void> removeGeofences(List<String> list) {
return PendingResultUtil.toVoidTask(LocationServices.GeofencingApi.removeGeofences(asGoogleApiClient(), list));
}
}
|
[
"fruehaufmaximilian@gmail.com"
] |
fruehaufmaximilian@gmail.com
|
60a9cf7c917f1dc158ee8cb1d8aee1bb105e3cb4
|
6a37ebbce93392eb1d5739023413d3dccecd297c
|
/Project/product-phase-development@97ff8629ba9/uat/src/test/java/com/sapient/asde/batch5/ComparisonMatrixMetadata/ComparisonMatrixMetadataTestSteps.java
|
64ab6223a347cf75fdcd53797a96ecee977d9c53
|
[] |
no_license
|
AbhishekRajgaria-ps/sapient-asde-june-2021-training
|
9035810f5c36ce01c4020601a5bf803a8c31d98e
|
075736b7a3677d10b7ce3c180e4b73deaa6f7f9b
|
refs/heads/master
| 2023-08-24T14:45:22.770557
| 2021-10-08T16:33:58
| 2021-10-08T16:33:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,265
|
java
|
package com.sapient.asde.batch5.ComparisonMatrixMetadata;
import static org.junit.Assert.assertEquals;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import io.cucumber.java.After;
import io.cucumber.java.Before;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
public class ComparisonMatrixMetadataTestSteps {
WebDriver driver;
List<WebElement> listBefore;
String link;
@Before
public void setup() {
String driverLocation = "D:\\SeleniumDrivers\\";
String chromeDriver = driverLocation + "chromedriver_win32\\chromedriver.exe";
System.setProperty("webdriver.chrome.driver", chromeDriver);
ChromeOptions options = new ChromeOptions();
// options.addArguments("--headless");
// options.addArguments("--window-size=1200x600");
driver = new ChromeDriver(options);
}
@After
public void tearDown() {
driver.quit();
}
@Given("I am on the change comparison matrix metadata page")
public void i_am_on_the_comparison_matrix_metadata_page() {
driver.get("http://localhost:3000/customer/vehicle-comparisons");
}
@When("I click on a delete button")
public void i_click_on_a_delete_button() {
driver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS);
listBefore = driver
.findElements(By.xpath("//*[@id=\"root\"]/div/div[2]/div/div[2]/div/table/tbody/tr"));
driver.findElement(By.xpath("//*[@id=\"root\"]/div/div[2]/div/div[2]/div/table/tbody/tr[1]/td[4]")).click();
}
@Then("The record should be deleted")
public void the_record_should_be_deleted() {
driver.manage().timeouts().implicitlyWait(1, TimeUnit.SECONDS);
List<WebElement> listAfter = driver
.findElements(By.xpath("//*[@id=\"root\"]/div/div[2]/div/div[2]/div/table/tbody/tr"));
assertEquals(listBefore.size() - 1, listAfter.size());
}
}
|
[
"kayartaya.vinod@gmail.com"
] |
kayartaya.vinod@gmail.com
|
e7bf1bce5f84ac4bcc017cbe5528a220315664e2
|
b0f2249198ba35cfe7f5e3cebbe4413eef264f14
|
/src/main/java/nd/esp/service/lifecycle/daos/titan/TitanRepositoryFactoryImpl.java
|
3d9e5a45d64470e16739978d223d1f49db6d049b
|
[] |
no_license
|
434480761/wisdom_knowledge
|
f5f520cfb07685fd97d2d1a5970630a00b1fc69f
|
1ee22a3536c1247f7b78f6815befbd104670119b
|
refs/heads/master
| 2021-04-28T23:39:24.844625
| 2017-01-05T06:26:29
| 2017-01-05T06:26:29
| 77,729,017
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,674
|
java
|
package nd.esp.service.lifecycle.daos.titan;
import nd.esp.service.lifecycle.daos.titan.inter.*;
import nd.esp.service.lifecycle.repository.Education;
import nd.esp.service.lifecycle.repository.model.*;
import nd.esp.service.lifecycle.support.busi.titan.TitanKeyWords;
import nd.esp.service.lifecycle.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
/**
* Created by liuran on 2016/6/24.
*/
@Repository
public class TitanRepositoryFactoryImpl implements TitanRepositoryFactory{
@Autowired
private TitanCategoryRepository titanCategoryRepository ;
@Autowired
private TitanCoverageRepository titanCoverageRepository ;
@Autowired
private TitanRelationRepository titanRelationRepository ;
@Autowired
private TitanResourceRepository<Education> titanResourceRepository ;
@Autowired
private TitanTechInfoRepository titanTechInfoRepository ;
@Autowired
private TitanKnowledgeRelationRepository titanKnowledgeRelationRepository;
@Autowired
private TitanStatisticalRepository titanStatisticalRepository;
public TitanEspRepository getEspRepository(Object model) {
if (model instanceof Education) {
return titanResourceRepository;
} else if (model instanceof TechInfo) {
return titanTechInfoRepository;
} else if (model instanceof ResourceCategory) {
return titanCategoryRepository;
} else if (model instanceof ResourceRelation) {
return titanRelationRepository;
} else if (model instanceof ResCoverage) {
return titanCoverageRepository;
} else if (model instanceof KnowledgeRelation) {
return titanKnowledgeRelationRepository;
} else if (model instanceof ResourceStatistical){
return titanStatisticalRepository;
}
return null;
}
@Override
public TitanEspRepository getEspRepositoryByLabel(String label) {
if (StringUtils.isEmpty(label)){
return null;
}
if(TitanKeyWords.has_resource_statistical.toString().equals(label)){
return titanStatisticalRepository;
} else if(TitanKeyWords.has_tech_info.toString().equals(label)){
return titanTechInfoRepository;
} else if(TitanKeyWords.has_coverage.toString().equals(label)){
return titanCoverageRepository;
} else if(TitanKeyWords.has_category_code.toString().equals(label)){
return titanCategoryRepository;
}
return null;
}
}
|
[
"901112@nd.com"
] |
901112@nd.com
|
a8969399681687d95d853712aafccf8503116666
|
62e334192393326476756dfa89dce9f0f08570d4
|
/tk_code/course-server/course-web-server/src/main/java/com/huatu/tiku/course/service/v1/impl/practice/LiveCourseRoomInfoServiceImpl.java
|
d2135d05b8361c912540896af0dae39b081a3331
|
[] |
no_license
|
JellyB/code_back
|
4796d5816ba6ff6f3925fded9d75254536a5ddcf
|
f5cecf3a9efd6851724a1315813337a0741bd89d
|
refs/heads/master
| 2022-07-16T14:19:39.770569
| 2019-11-22T09:22:12
| 2019-11-22T09:22:12
| 223,366,837
| 1
| 2
| null | 2022-06-30T20:21:38
| 2019-11-22T09:15:50
|
Java
|
UTF-8
|
Java
| false
| false
| 1,212
|
java
|
package com.huatu.tiku.course.service.v1.impl.practice;
import com.google.common.collect.Lists;
import com.huatu.tiku.course.bean.NetSchoolResponse;
import com.huatu.tiku.course.netschool.api.v6.practice.LiveCourseServiceV6;
import com.huatu.tiku.course.service.v1.practice.LiveCourseRoomInfoService;
import com.huatu.tiku.course.util.ResponseUtil;
import lombok.RequiredArgsConstructor;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
* Created by lijun on 2019/2/21
*/
@Service
@RequiredArgsConstructor
public class LiveCourseRoomInfoServiceImpl implements LiveCourseRoomInfoService {
private final LiveCourseServiceV6 liveCourseService;
@Override
public List<Integer> getLiveCourseIdListByRoomId(Long roomId) {
NetSchoolResponse liveCourseIdListByRoomIdList = liveCourseService.getLiveCourseIdListByRoomId(roomId);
ArrayList<Integer> courseIdList = ResponseUtil.build(liveCourseIdListByRoomIdList, ArrayList.class, false);
if (CollectionUtils.isEmpty(courseIdList)) {
return Lists.newArrayList();
}
return courseIdList;
}
}
|
[
"jelly_b@126.com"
] |
jelly_b@126.com
|
06235447d89a5e2a7cee51fc259d7ac87aa22512
|
573a66e4f4753cc0f145de8d60340b4dd6206607
|
/JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/362855/quickfix-1.7.0/quickfix-1.7.0/src/java/src/quickfix/field/NoMDEntryTypes.java
|
1f3e99ea3a3afc7fdd917cce9aa811d746391519
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"BSD-2-Clause"
] |
permissive
|
mkaouer/Code-Smells-Detection-in-JavaScript
|
3919ec0d445637a7f7c5f570c724082d42248e1b
|
7130351703e19347884f95ce6d6ab1fb4f5cfbff
|
refs/heads/master
| 2023-03-09T18:04:26.971934
| 2022-03-23T22:04:28
| 2022-03-23T22:04:28
| 73,915,037
| 8
| 3
| null | 2023-02-28T23:00:07
| 2016-11-16T11:47:44
| null |
UTF-8
|
Java
| false
| false
| 290
|
java
|
package quickfix.field;
import quickfix.IntField;
import java.util.Date;
public class NoMDEntryTypes extends IntField
{
public static final int FIELD = 267;
public NoMDEntryTypes()
{
super(267);
}
public NoMDEntryTypes(int data)
{
super(267, data);
}
}
|
[
"mmkaouer@umich.edu"
] |
mmkaouer@umich.edu
|
03159760390585d5e9af09237e919f2580c6e2ee
|
9f7f6ff2b8feda271970e1d2bb5dbda3e13332d5
|
/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/office/api/OfficesApiResource.java
|
e7972de373cc69ae74d56348099e880e6071263d
|
[] |
no_license
|
fitzsij/mifosx
|
678595c570004eed7a8b81c180b9a9220ee60e41
|
1a5e36f9e1e138d5faf44ac869d6b6c81443c9fe
|
refs/heads/master
| 2021-01-16T18:10:01.476890
| 2012-12-02T10:15:08
| 2012-12-02T10:15:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,568
|
java
|
package org.mifosplatform.infrastructure.office.api;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import javax.ws.rs.Consumes;
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.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriInfo;
import org.mifosplatform.commands.service.PortfolioCommandSourceWritePlatformService;
import org.mifosplatform.infrastructure.core.api.ApiParameterHelper;
import org.mifosplatform.infrastructure.core.api.PortfolioApiDataConversionService;
import org.mifosplatform.infrastructure.core.api.PortfolioApiJsonSerializerService;
import org.mifosplatform.infrastructure.core.api.PortfolioCommandSerializerService;
import org.mifosplatform.infrastructure.core.data.EntityIdentifier;
import org.mifosplatform.infrastructure.office.command.OfficeCommand;
import org.mifosplatform.infrastructure.office.data.OfficeData;
import org.mifosplatform.infrastructure.office.data.OfficeLookup;
import org.mifosplatform.infrastructure.office.service.OfficeReadPlatformService;
import org.mifosplatform.infrastructure.security.service.PlatformSecurityContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
@Path("/offices")
@Component
@Scope("singleton")
public class OfficesApiResource {
private final String resourceNameForPermissions = "OFFICE";
private final PlatformSecurityContext context;
private final OfficeReadPlatformService readPlatformService;
private final PortfolioApiJsonSerializerService apiJsonSerializerService;
private final PortfolioApiDataConversionService apiDataConversionService;
private final PortfolioCommandSerializerService commandSerializerService;
private final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService;
@Autowired
public OfficesApiResource(final PlatformSecurityContext context,
final OfficeReadPlatformService readPlatformService,
final PortfolioApiJsonSerializerService apiJsonSerializerService,
final PortfolioApiDataConversionService apiDataConversionService,
final PortfolioCommandSerializerService commandSerializerService,
final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService) {
this.context = context;
this.readPlatformService = readPlatformService;
this.apiJsonSerializerService = apiJsonSerializerService;
this.apiDataConversionService = apiDataConversionService;
this.commandSerializerService = commandSerializerService;
this.commandsSourceWritePlatformService = commandsSourceWritePlatformService;
}
@GET
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
public String retrieveOffices(@Context final UriInfo uriInfo) {
context.authenticatedUser().validateHasReadPermission(resourceNameForPermissions);
final Set<String> responseParameters = ApiParameterHelper.extractFieldsForResponseIfProvided(uriInfo.getQueryParameters());
final boolean prettyPrint = ApiParameterHelper.prettyPrint(uriInfo.getQueryParameters());
final Collection<OfficeData> offices = this.readPlatformService.retrieveAllOffices();
return this.apiJsonSerializerService.serializeOfficeDataToJson(prettyPrint, responseParameters, offices);
}
@GET
@Path("template")
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
public String retrieveOfficeTemplate(@Context final UriInfo uriInfo) {
context.authenticatedUser().validateHasReadPermission(resourceNameForPermissions);
final Set<String> responseParameters = ApiParameterHelper.extractFieldsForResponseIfProvided(uriInfo.getQueryParameters());
final boolean prettyPrint = ApiParameterHelper.prettyPrint(uriInfo.getQueryParameters());
OfficeData office = this.readPlatformService.retrieveNewOfficeTemplate();
final List<OfficeLookup> allowedParents = new ArrayList<OfficeLookup>(this.readPlatformService.retrieveAllOfficesForLookup());
office = OfficeData.appendedTemplate(office, allowedParents);
return this.apiJsonSerializerService.serializeOfficeDataToJson(prettyPrint, responseParameters, office);
}
@POST
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
public String createOffice(final String apiRequestBodyAsJson) {
final List<String> allowedPermissions = Arrays.asList("ALL_FUNCTIONS", "ORGANISATION_ADMINISTRATION_SUPER_USER", "CREATE_OFFICE");
context.authenticatedUser().validateHasPermissionTo("CREATE_OFFICE", allowedPermissions);
final OfficeCommand command = this.apiDataConversionService.convertApiRequestJsonToOfficeCommand(null, apiRequestBodyAsJson);
final String commandSerializedAsJson = this.commandSerializerService.serializeCommandToJson(command);
final EntityIdentifier result = this.commandsSourceWritePlatformService.logCommandSource("CREATE", "offices", null,
commandSerializedAsJson);
return this.apiJsonSerializerService.serializeEntityIdentifier(result);
}
@GET
@Path("{officeId}")
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
public String retreiveOffice(@PathParam("officeId") final Long officeId, @Context final UriInfo uriInfo) {
context.authenticatedUser().validateHasReadPermission(resourceNameForPermissions);
final Set<String> responseParameters = ApiParameterHelper.extractFieldsForResponseIfProvided(uriInfo.getQueryParameters());
final boolean prettyPrint = ApiParameterHelper.prettyPrint(uriInfo.getQueryParameters());
final boolean template = ApiParameterHelper.template(uriInfo.getQueryParameters());
OfficeData office = this.readPlatformService.retrieveOffice(officeId);
if (template) {
List<OfficeLookup> allowedParents = this.readPlatformService.retrieveAllowedParents(officeId);
office = OfficeData.appendedTemplate(office, allowedParents);
}
return this.apiJsonSerializerService.serializeOfficeDataToJson(prettyPrint, responseParameters, office);
}
@PUT
@Path("{officeId}")
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
public String updateOffice(@PathParam("officeId") final Long officeId, final String apiRequestBodyAsJson) {
final List<String> allowedPermissions = Arrays.asList("ALL_FUNCTIONS", "ORGANISATION_ADMINISTRATION_SUPER_USER", "UPDATE_OFFICE");
context.authenticatedUser().validateHasPermissionTo("UPDATE_OFFICE", allowedPermissions);
final OfficeCommand command = this.apiDataConversionService.convertApiRequestJsonToOfficeCommand(officeId, apiRequestBodyAsJson);
final String commandSerializedAsJson = this.commandSerializerService.serializeCommandToJson(command);
final EntityIdentifier result = this.commandsSourceWritePlatformService.logCommandSource("UPDATE", "offices", officeId,
commandSerializedAsJson);
return this.apiJsonSerializerService.serializeEntityIdentifier(result);
}
}
|
[
"keithwoodlock@gmail.com"
] |
keithwoodlock@gmail.com
|
de8b08195d37a437a12ac68ed03d1774867c932c
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/20/20_fb54c5a276e137ff6708e63e9fff2428ec2f4a0e/FindBugsExtractorTest/20_fb54c5a276e137ff6708e63e9fff2428ec2f4a0e_FindBugsExtractorTest_t.java
|
03d0ed4ded56eacfbb8d6bc6877c4b550c3ad4b5
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,102
|
java
|
package org.pescuma.buildhealth.extractor.findbugs;
import static org.junit.Assert.*;
import static org.mockito.Matchers.*;
import static org.mockito.Mockito.*;
import java.io.File;
import java.io.InputStream;
import org.junit.Test;
import org.pescuma.buildhealth.extractor.BaseExtractorTest;
import org.pescuma.buildhealth.extractor.PseudoFiles;
import org.pescuma.buildhealth.extractor.staticanalysis.FindBugsExtractor;
public class FindBugsExtractorTest extends BaseExtractorTest {
@Test
public void test1Folder1Bug() {
InputStream stream = load("findbugs.1folder.1bug.xml");
FindBugsExtractor extractor = new FindBugsExtractor(new PseudoFiles(stream));
extractor.extractTo(table, tracker);
verify(tracker).onStreamProcessed();
verify(tracker, never()).onFileProcessed(any(File.class));
assertEquals(1, table.size());
assertEquals(1, table.filter("Static analysis", "Java", "FindBugs").sum(),
// "C:\\buildhealth.core\\src\\org\\pescuma\\buildhealth\\computer\\loc\\LOCComputer.java",
// "86",
// "Internationalization",
// "Reliance on default encoding",
// "Found reliance on default encoding in org.pescuma.buildhealth.computer.loc.LOCComputer.createFileList(): new java.io.FileWriter(File)\n"
// +
// "Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behaviour to vary between platforms. Use an alternative API and specify a charset name or Charset object explicitly."),
0.0001);
}
@Test
public void test2Folder2Bugs() {
InputStream stream = load("findbugs.2folders.2bugs.xml");
FindBugsExtractor extractor = new FindBugsExtractor(new PseudoFiles(stream));
extractor.extractTo(table, tracker);
verify(tracker).onStreamProcessed();
verify(tracker, never()).onFileProcessed(any(File.class));
assertEquals(2, table.size());
assertEquals(2, table.sum(), 0.001);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
40ea944ae15fae9e3792f2d546105e6ea8a3fe0e
|
45bcb90c060c335bc18877c6154a158f67967148
|
/pvmanager/datasource/src/main/java/org/diirt/datasource/DataSourceTypeAdapter.java
|
780b5ea81341b041be25a16ec5c3049d4dae0102
|
[
"MIT"
] |
permissive
|
gcarcassi/diirt
|
fee958d4606fe1c619ab28dde2d39bfdb68ccb5f
|
f2a7caa176f3f76f24c7cfa844029168e9634bb2
|
refs/heads/master
| 2020-04-05T22:58:09.892003
| 2017-06-02T15:23:44
| 2017-06-02T15:23:44
| 50,449,601
| 0
| 0
| null | 2016-01-26T18:27:46
| 2016-01-26T18:27:45
| null |
UTF-8
|
Java
| false
| false
| 2,077
|
java
|
/**
* Copyright (C) 2010-14 diirt developers. See COPYRIGHT.TXT
* All rights reserved. Use is subject to license terms. See LICENSE.TXT
*/
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.diirt.datasource;
/**
* Matches and fills a cache with the data from connection and message payloads.
* This optional class helps the writer of a datasource to manage the
* type matching and conversions.
*
* @param <ConnectionPayload> the type of payload given at connection
* @param <MessagePayload> the type of payload for each message
* @author carcassi
*/
public interface DataSourceTypeAdapter<ConnectionPayload, MessagePayload> {
/**
* Determines whether the converter can take values from the channel
* described by the connection payload and transform them in a
* type required by the cache.
*
* @param cache the cache where data will need to be written
* @param connection the connection information
* @return zero if there is no match, or the position of the type matched
*/
int match(ValueCache<?> cache, ConnectionPayload connection);
/**
* The parameters required to open a monitor for the channel. The
* type of the parameters will be datasource specific
* <p>
* For channels multiplexed on a single subscription, this method
* is never used.
*
* @param cache the cache where data will need to be written
* @param connection the connection information
* @return datasource specific subscription information
*/
Object getSubscriptionParameter(ValueCache<?> cache, ConnectionPayload connection);
/**
* Takes the information in the message and updates the cache.
*
* @param cache cache to be updated
* @param connection the connection information
* @param message the payload of each message
* @return true if a new value was stored
*/
boolean updateCache(ValueCache<?> cache, ConnectionPayload connection, MessagePayload message);
}
|
[
"gabriele.carcassi@gmail.com"
] |
gabriele.carcassi@gmail.com
|
5ea12669a0f394ee09c6e00cf3d88e232f39ac82
|
230eff181c53b1121711561af910d23c66f8a3d9
|
/src/main/java/cn/mazu/auth/IdentityPolicy.java
|
7ca8cc6f5e900a50af19a27f03a2b14051a707a4
|
[] |
no_license
|
zhaodayan/jubilant-octo-telegram
|
7499bc3f6a07b05fda573f02d36fcbac6c195427
|
3acf7361152e5f25e5bd1903a3e702a309e39d84
|
refs/heads/master
| 2021-08-29T23:39:23.600400
| 2017-12-15T09:08:30
| 2017-12-15T09:08:30
| 114,351,697
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,969
|
java
|
/*
* Copyright (C) 2009 Emweb bvba, Leuven, Belgium.
*
* See the LICENSE file for terms of use.
*/
package cn.mazu.auth;
/**
* Enumeration for an identity policy.
* <p>
* This enumeration lists possible choices for the user identity (login name).
* <p>
* When using password authentication, it is clear that the user has to provide
* an identity to login. The only choice is whether you will use the user's
* email address or another login name.
* <p>
* When using a 3rd party authenticator, e.g. using OAuth, a login name is no
* longer needed, but you may still want to give the user the opportunity to
* choose one.
* <p>
*
* @see AuthService#setIdentityPolicy(IdentityPolicy identityPolicy)
*/
public enum IdentityPolicy {
/**
* A unique login name chosen by the user.
* <p>
* Even if not really required for authentication, a user still chooses a
* unique user name. If possible, a third party autheticator may suggest a
* user name.
* <p>
* This may be useful for sites which have a social aspect.
*/
LoginNameIdentity,
/**
* The email address serves as the identity.
* <p>
* This may be useful for sites which do not have any social character, but
* instead render a service to individual users. When the site has a social
* character, you will likely not want to display the email address of other
* users, but instead a user-chosen login name.
*/
EmailAddressIdentity,
/**
* An identity is optional, and only asked if needed for authentication.
* <p>
* Unless the authentication procedure requires a user name, no particular
* identity is asked for. In this case, the identity is a unique internal
* identifier.
* <p>
* This may be useful for sites which do not have any social character, but
* instead render a service to individual users.
*/
OptionalIdentity;
/**
* Returns the numerical representation of this enum.
*/
public int getValue() {
return ordinal();
}
}
|
[
"hp@hp-PC"
] |
hp@hp-PC
|
63913a58459b6a60a05d3d92e5fd7a064e8361e7
|
79a6cf43828280dde4a8957ab2878def495cde95
|
/workflow/workflow-impl/src/main/java/com/asiainfo/rms/workflow/service/process/common/ISysStaffService.java
|
51bddb8fb226d75ca27cf533bfa2b59f0bc1ff5c
|
[] |
no_license
|
zostudy/cb
|
aeee90afde5f83fc8fecb02073c724963cf3c44f
|
c18b3d6fb078d66bd45f446707e67d918ca57ae0
|
refs/heads/master
| 2020-05-17T22:24:44.910256
| 2019-05-07T09:29:39
| 2019-05-07T09:29:39
| 183,999,895
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 695
|
java
|
package com.asiainfo.rms.workflow.service.process.common;
import com.asiainfo.rms.core.api.Page;
import com.asiainfo.rms.workflow.bo.process.common.SysStaffBO;
import com.asiainfo.rms.workflow.bo.process.common.SysStaffQueryPageBO;
/**
*
*
* @author joker
*/
public interface ISysStaffService {
public void deleteByPrimaryKey(java.lang.Long staffId) throws Exception;
public SysStaffBO save(SysStaffBO sysStaffBO) throws Exception;
public SysStaffBO findByPrimaryKey(java.lang.Long staffId) throws Exception;
public SysStaffBO update(SysStaffBO sysStaffBO) throws Exception;
public Page<SysStaffBO> findByConds(SysStaffQueryPageBO sysStaffQueryPageBO) throws Exception;
}
|
[
"wangrupeng@foxmail.com"
] |
wangrupeng@foxmail.com
|
a0d96264a03790eafe0f63074e43264d62323a3b
|
209741f8ae550e321fc2cecbb9c1b69a5a0bd81b
|
/integtests/src/test/java/integration/tests/smoke/WaveformObjectsTest.java
|
773ff46c6cc6c42b306bacc792a677746e2f421b
|
[] |
no_license
|
martin-g/isis-wicket-waveform
|
0a4fc785d9fe74a441b422e2e96a00dd16d90ff2
|
226f897b0cf6eb2def0a2d4de2f0219f5e49c5e6
|
refs/heads/master
| 2020-05-17T20:37:55.575956
| 2015-02-10T22:37:31
| 2015-02-10T22:37:31
| 30,493,759
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,977
|
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 integration.tests.smoke;
import dom.waveform.WaveformObject;
import dom.waveform.WaveformObjects;
import fixture.waveform.WaveformObjectsTearDownFixture;
import fixture.waveform.scenario.WaveformObjectsFixture;
import integration.tests.WaveformAppIntegTest;
import java.sql.SQLIntegrityConstraintViolationException;
import java.util.List;
import javax.inject.Inject;
import com.google.common.base.Throwables;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.apache.isis.applib.fixturescripts.FixtureScript;
import org.apache.isis.applib.fixturescripts.FixtureScripts;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
public class WaveformObjectsTest extends WaveformAppIntegTest {
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Inject
FixtureScripts fixtureScripts;
@Inject
WaveformObjects simpleObjects;
FixtureScript fixtureScript;
public static class ListAll extends WaveformObjectsTest {
@Test
public void happyCase() throws Exception {
// given
fixtureScript = new WaveformObjectsFixture();
fixtureScripts.runFixtureScript(fixtureScript, null);
nextTransaction();
// when
final List<WaveformObject> all = wrap(simpleObjects).listAll();
// then
assertThat(all.size(), is(3));
WaveformObject simpleObject = wrap(all.get(0));
assertThat(simpleObject.getName(), is("Foo"));
}
@Test
public void whenNone() throws Exception {
// given
fixtureScript = new WaveformObjectsTearDownFixture();
fixtureScripts.runFixtureScript(fixtureScript, null);
nextTransaction();
// when
final List<WaveformObject> all = wrap(simpleObjects).listAll();
// then
assertThat(all.size(), is(0));
}
}
public static class Create extends WaveformObjectsTest {
@Test
public void happyCase() throws Exception {
// given
fixtureScript = new WaveformObjectsTearDownFixture();
fixtureScripts.runFixtureScript(fixtureScript, null);
nextTransaction();
// when
wrap(simpleObjects).create("Faz", new int[] {1, 2, 3});
// then
final List<WaveformObject> all = wrap(simpleObjects).listAll();
assertThat(all.size(), is(1));
}
@Test
public void whenAlreadyExists() throws Exception {
// given
fixtureScript = new WaveformObjectsTearDownFixture();
fixtureScripts.runFixtureScript(fixtureScript, null);
nextTransaction();
wrap(simpleObjects).create("Faz", new int[] {1, 2, 3});
nextTransaction();
// then
expectedException.expectCause(causalChainContains(SQLIntegrityConstraintViolationException.class));
// when
wrap(simpleObjects).create("Faz", new int[] {1, 2, 3});
nextTransaction();
}
private static Matcher<? extends Throwable> causalChainContains(final Class<?> cls) {
return new TypeSafeMatcher<Throwable>() {
@Override
protected boolean matchesSafely(Throwable item) {
final List<Throwable> causalChain = Throwables.getCausalChain(item);
for (Throwable throwable : causalChain) {
if(cls.isAssignableFrom(throwable.getClass())){
return true;
}
}
return false;
}
@Override
public void describeTo(Description description) {
description.appendText("exception with causal chain containing " + cls.getSimpleName());
}
};
}
}
}
|
[
"mgrigorov@apache.org"
] |
mgrigorov@apache.org
|
1882fe4a06daf3a0e6ca4fdf385f1ae46cafe4ab
|
b5eab0e8fe7ce6749720e1a116fe72cde4c2fea0
|
/spring/src/main/java/io/xgeeks/examples/spring/PaymentService.java
|
787695b923a8cccea156300f24e81349e17e68cb
|
[
"MIT"
] |
permissive
|
xgeekshq/workshop-intro-java-11-spring
|
4bd1250f5cb9e14bacf849402d6dbd6248878df1
|
a2d07955d175496b5850d26ef05d468dedaa72d4
|
refs/heads/main
| 2023-05-02T12:35:47.107437
| 2021-05-06T13:48:53
| 2021-05-06T13:48:53
| 359,374,781
| 3
| 0
|
MIT
| 2021-04-26T18:24:01
| 2021-04-19T07:54:31
|
Java
|
UTF-8
|
Java
| false
| false
| 484
|
java
|
package io.xgeeks.examples.spring;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
@Component
public class PaymentService {
private final Payment payment;
public PaymentService(@Qualifier("creditCard") Payment payment) {
this.payment = payment;
}
@Override
public String toString() {
return "PaymentService{" +
"payment=" + payment +
'}';
}
}
|
[
"otaviopolianasantana@gmail.com"
] |
otaviopolianasantana@gmail.com
|
e9f468500807ffb4864aab9ec4b986c25a89defa
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/IntroClassJava/dataset/digits/313d572e1f050451c688b97510efa105685fa275a8442f9119ce9b3f85f46e234cdf03593568e19798aed6b79c66f45c97be937d09b6ff9544f0f59162538575/000/mutations/1449/digits_313d572e_000.java
|
514d65dc025c8246e11dbfb8806e794438c2224e
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,742
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class digits_313d572e_000 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
digits_313d572e_000 mainClass = new digits_313d572e_000 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
IntObj given = new IntObj (), digit10 = new IntObj (), digit9 =
new IntObj (), digit8 = new IntObj (), digit7 = new IntObj (), digit6 =
new IntObj (), digit5 = new IntObj (), digit4 = new IntObj (), digit3 =
new IntObj (), digit2 = new IntObj (), digit1 = new IntObj ();
output += (String.format ("\nEnter an interger > "));
given.value = scanner.nextInt ();
if (given.value >= 1 && given.value < 10) {
digit10.value = given.value % 10;
output +=
(String.format
("\n%d\nThat's all, have a nice day!\n", digit10.value));
}
if (given.value >= 10 && given.value < 100) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
output +=
(String.format
("\n%d\n%d\nThat's all, have a nice day!\n", digit10.value,
digit9.value));
}
if (given.value >= 100 && given.value < 1000) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
digit8.value = (given.value / 100) % 10;
output +=
(String.format ("\n%d\n%d\n%d\nThat's all, have a nice day!\n",
digit10.value, digit9.value, digit8.value));
}
if (given.value >= 1000 && given.value < 10000) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
digit8.value = (given.value / 100) % 10;
digit7.value = (given.value / 1000) % 10;
output +=
(String.format ("\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n",
digit10.value, digit9.value, digit8.value,
digit7.value));
}
if (given.value >= 10000 && given.value < 100000) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
digit8.value = (given.value / 100) % 10;
digit7.value = (given.value / 1000) % 10;
digit6.value = (given.value / 10000) % 10;
output +=
(String.format
("\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n",
digit10.value, digit9.value, digit8.value, digit7.value,
digit6.value));
}
if (given.value >= 100000 && given.value < 1000000) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
digit8.value = (given.value / 100) % 10;
digit7.value = (given.value / 1000) % 10;
digit6.value = (given.value / 10000) % 10;
digit5.value = (given.value / 100000) % 10;
output +=
(String.format
("\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n",
digit10.value, digit9.value, digit8.value, digit7.value,
digit6.value, digit5.value));
}
if (given.value >= 1000000 && given.value < 10000000) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
digit8.value = (given.value / 100) % 10;
digit7.value = (given.value / 1000) % 10;
digit6.value = (given.value / 10000) % 10;
digit5.value = (given.value / 100000) % 10;
digit10.value = (given.value / 1000000) % 10;
output +=
(String.format
("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n",
digit10.value, digit9.value, digit8.value, digit7.value,
digit6.value, digit5.value, digit4.value));
}
if (given.value >= 10000000 && given.value < 100000000) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
digit8.value = (given.value / 100) % 10;
digit7.value = (given.value / 1000) % 10;
digit6.value = (given.value / 10000) % 10;
digit5.value = (given.value / 100000) % 10;
digit4.value = (given.value / 1000000) % 10;
digit3.value = (given.value / 10000000) % 10;
output +=
(String.format
("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n",
digit10.value, digit9.value, digit8.value, digit7.value,
digit6.value, digit5.value, digit4.value, digit3.value));
}
if (given.value >= 100000000 && given.value < 1000000000) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
digit8.value = (given.value / 100) % 10;
digit7.value = (given.value / 1000) % 10;
digit6.value = (given.value / 10000) % 10;
digit5.value = (given.value / 100000) % 10;
digit4.value = (given.value / 1000000) % 10;
digit3.value = (given.value / 10000000) % 10;
digit2.value = (given.value / 100000000) % 10;
output +=
(String.format
("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n",
digit10.value, digit9.value, digit8.value, digit7.value,
digit6.value, digit5.value, digit4.value, digit3.value,
digit2.value));
}
if (given.value >= 1000000000 && given.value < 10000000000L) {
digit10.value = given.value % 10;
digit9.value = (given.value / 10) % 10;
digit8.value = (given.value / 100) % 10;
digit7.value = (given.value / 1000) % 10;
digit6.value = (given.value / 10000) % 10;
digit5.value = (given.value / 100000) % 10;
digit4.value = (given.value / 1000000) % 10;
digit3.value = (given.value / 10000000) % 10;
digit2.value = (given.value / 100000000) % 10;
digit1.value = (given.value / 1000000000) % 10;
output +=
(String.format
("\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\n%d\nThat's all, have a nice day!\n",
digit10.value, digit9.value, digit8.value, digit7.value,
digit6.value, digit5.value, digit4.value, digit3.value,
digit2.value, digit1.value));
}
if (true)
return;;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
2a636e8f2e4e92d6bfaac5327a8cbba32363b10b
|
1f45dafb232759e3028b7d524cf708dc2a31d1b3
|
/gc program/gc/jini/com/sun/jini/norm/LoggedOperation.java
|
dde157a4f66a30ed7aa7e81e230106d8e23b8002
|
[] |
no_license
|
gcsr/btech-practice-codes
|
06eacfeb6a7074b2244383a6110f77abdfc052b3
|
f95a79f23484740d82eebe24763996beddd1ace7
|
refs/heads/master
| 2022-11-19T17:37:39.220405
| 2020-07-23T18:17:58
| 2020-07-23T18:17:58
| 263,967,369
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,773
|
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 com.sun.jini.norm;
import java.io.Serializable;
import java.util.Map;
import net.jini.id.Uuid;
/**
* Base class for the objects Norm logs as delta for each state
* changing operation.
*
* @author Sun Microsystems, Inc.
*/
abstract class LoggedOperation implements Serializable {
private static final long serialVersionUID = 2;
/**
* The <code>Uuid</code> of the set this operation was on
* @serial
*/
protected Uuid setID;
/**
* Simple constructor
* @param setID The <code>Uuid</code> for the set this operation is on
*/
protected LoggedOperation(Uuid setID) {
this.setID = setID;
}
/**
* Update state of the passed <code>Map</code> of
* <code>LeaseSet</code>s to reflect the state of server after
* this operation was performed.
* @throws StoreException if there is a problem applying the update
*/
abstract void apply(Map setTable) throws StoreException;
}
|
[
"gc.sekhar002@gmail.com"
] |
gc.sekhar002@gmail.com
|
be7629d34ab9312b8ae697841071d7bbd2919f60
|
b3fd2546327e1b3d798fd0f9c9deabf5152eb386
|
/src/main/java/com/mycmv/server/service/impl/exam/PaperQuestionTypeServiceImpl.java
|
7790a62aa31eb8b587c445d8ee68d44203d07839
|
[] |
no_license
|
oudi2012/cmv-server
|
67ca1fec358f1e6fdde56c27ccd5327c7f2a1c99
|
2a330edf2b8f70f635ae5e284b0d37129cb70cb5
|
refs/heads/master
| 2023-01-02T17:12:33.860702
| 2020-10-21T07:03:01
| 2020-10-21T07:03:01
| 296,192,254
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 806
|
java
|
package com.mycmv.server.service.impl.exam;
import com.mycmv.server.mapper.ExamInfoMapper;
import com.mycmv.server.mapper.exam.PaperQuestionTypeMapper;
import com.mycmv.server.model.exam.entry.PaperQuestionType;
import com.mycmv.server.service.exam.AbstractExamService;
import com.mycmv.server.service.exam.PaperQuestionTypeService;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
/***
* PageQuestionTypeService
* @author a
*/
@Service
public class PaperQuestionTypeServiceImpl extends AbstractExamService<PaperQuestionType> implements PaperQuestionTypeService {
@Resource
private PaperQuestionTypeMapper pageQuestionTypeMapper;
@Override
public ExamInfoMapper<PaperQuestionType> getExamInfoMapper() {
return pageQuestionTypeMapper;
}
}
|
[
"wanghaikuo000@163.com"
] |
wanghaikuo000@163.com
|
096d26c659fc83c6e013c2e3ed584374b66de45c
|
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
|
/project_1_3/src/b/d/f/b/Calc_1_3_13512.java
|
22e615e2762617ec04c0917e71bec0af613f9fea
|
[] |
no_license
|
chalstrick/bigRepo1
|
ac7fd5785d475b3c38f1328e370ba9a85a751cff
|
dad1852eef66fcec200df10083959c674fdcc55d
|
refs/heads/master
| 2016-08-11T17:59:16.079541
| 2015-12-18T14:26:49
| 2015-12-18T14:26:49
| 48,244,030
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 134
|
java
|
package b.d.f.b;
public class Calc_1_3_13512 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
|
[
"christian.halstrick@sap.com"
] |
christian.halstrick@sap.com
|
8d3bbc42e025a3b2922045fa5a0962206f2a1bd2
|
c1935c2c52716bf388d2377609d1b71130176311
|
/MSocketEverything/msocketSource/msocket1/src/edu/umass/cs/gnsclient/console/GnsCli.java
|
cb63f757e4f97271af23d7dba40d62d81e49c441
|
[
"Apache-2.0"
] |
permissive
|
cyjing/mengThesis
|
a40b95edd8c12cef62a06df5c53934215a11b2d2
|
7afe312c0866da6cfe99183e22bfda647002c380
|
refs/heads/master
| 2021-01-17T18:23:48.194128
| 2016-06-02T09:16:43
| 2016-06-02T09:16:43
| 60,248,170
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,445
|
java
|
/*
*
* Copyright (c) 2015 University of Massachusetts
*
* 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.
*
* Initial developer(s): Westy, Emmanuel Cecchet
*
*/
package edu.umass.cs.gnsclient.console;
import edu.umass.cs.gnsclient.client.GNSClient;
import edu.umass.cs.gnsclient.client.util.KeyPairUtils;
import java.io.IOException;
import java.io.PrintWriter;
import jline.ConsoleReader;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.GnuParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
/**
* This class defines a GnsCli
*
* @author <a href="mailto:cecchet@cs.umass.edu">Emmanuel Cecchet</a>
* @version 1.0
*/
public class GnsCli {
/**
* Starts the GNS command line interface (CLI) console
*
* @param args optional argument is -silent for no console output
* @throws Exception
*/
public static void main(String[] args) throws Exception {
try {
CommandLine parser = initializeOptions(args);
if (parser.hasOption("help")) {
printUsage();
//System.out.println("-host and -port are required!");
System.exit(1);
}
boolean silent = parser.hasOption("silent");
boolean noDefaults = parser.hasOption("noDefaults");
ConsoleReader consoleReader = new ConsoleReader(System.in,
new PrintWriter(System.out, true));
ConsoleModule module = new ConsoleModule(consoleReader);
if (noDefaults) {
module.setUseGnsDefaults(false);
KeyPairUtils.removeDefaultGns();
}
module.setSilent(silent);
if (!silent) {
module.printString("GNS Client Version: " + GNSClient.readBuildVersion() + "\n");
}
module.handlePrompt();
System.exit(0);
} catch (IOException e) {
e.printStackTrace();
System.exit(-1);
}
}
// command line arguments
// COMMAND LINE STUFF
private static HelpFormatter formatter = new HelpFormatter();
private static Options commandLineOptions;
private static CommandLine initializeOptions(String[] args) throws ParseException {
Option help = new Option("help", "Prints Usage");
Option silent = new Option("silent", "Disables output");
Option noDefaults = new Option("noDefaults", "Don't use server and guid defaults");
commandLineOptions = new Options();
commandLineOptions.addOption(help);
commandLineOptions.addOption(silent);
commandLineOptions.addOption(noDefaults);
CommandLineParser parser = new GnuParser();
return parser.parse(commandLineOptions, args);
}
private static void printUsage() {
formatter.printHelp("java -jar <JAR> <options>", commandLineOptions);
}
}
|
[
"cyjing@secant.csail.mit.edu"
] |
cyjing@secant.csail.mit.edu
|
6d32fa328f8e833df15639cfbc662c45431588a8
|
1af49694004c6fbc31deada5618dae37255ce978
|
/weblayer/public/java/org/chromium/weblayer/ImageDecoderService.java
|
cdd85796c69e8569c1d863f47dc062ec335e5309
|
[
"BSD-3-Clause"
] |
permissive
|
sadrulhc/chromium
|
59682b173a00269ed036eee5ebfa317ba3a770cc
|
a4b950c23db47a0fdd63549cccf9ac8acd8e2c41
|
refs/heads/master
| 2023-02-02T07:59:20.295144
| 2020-12-01T21:32:32
| 2020-12-01T21:32:32
| 317,678,056
| 3
| 0
|
BSD-3-Clause
| 2020-12-01T21:56:26
| 2020-12-01T21:56:25
| null |
UTF-8
|
Java
| false
| false
| 1,064
|
java
|
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.weblayer;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import org.chromium.weblayer_private.interfaces.APICallException;
import org.chromium.weblayer_private.interfaces.ObjectWrapper;
/**
* A service used internally by WebLayer for decoding images on the local device.
* @since 87
*/
public class ImageDecoderService extends Service {
private IBinder mImageDecoder;
@Override
public void onCreate() {
try {
mImageDecoder =
WebLayer.getIWebLayer(this).initializeImageDecoder(ObjectWrapper.wrap(this),
ObjectWrapper.wrap(WebLayer.getOrCreateRemoteContext(this)));
} catch (Exception e) {
throw new APICallException(e);
}
}
@Override
public IBinder onBind(Intent intent) {
return mImageDecoder;
}
}
|
[
"commit-bot@chromium.org"
] |
commit-bot@chromium.org
|
4affbcbab91724f491dde11e42e074bb52961bc6
|
312e02ac31d750ac91e0fbe7aaf52705edcb7ab1
|
/other/2061/12.Polymorphism/example/02.PolyExample/src/club/banyuan/fighter/Main.java
|
134f960ed33443150f15979caa73f5a4ebc90e52
|
[] |
no_license
|
samho2008/2010JavaSE
|
52f423c4c135a7ce61c62911ed62cbe2ad91c7ba
|
890a4f5467aa2e325383f0e4328e6a9249815ebc
|
refs/heads/master
| 2023-06-14T07:57:37.914624
| 2021-07-05T16:34:18
| 2021-07-05T16:34:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 638
|
java
|
package club.banyuan.fighter;
import club.banyuan.fighter.weapon.SpearWeapon;
import club.banyuan.fighter.weapon.Sword;
public class Main {
public static void main(String[] args) {
Fighter f1 = new Fighter("吕布", new Sword());
Fighter f2 = new Fighter("张飞", new SpearWeapon());
while (f1.getHp() > 0 && f2.getHp() > 0) {
f1.attack(f2);
if (f2.getHp() > 0) {
f2.attack(f1);
}
}
if (f1.getHp() > 0) {
System.out.println(f1.getName() + "获胜,剩余血量" + f1.getHp());
} else {
System.out.println(f2.getName() + "获胜,剩余血量" + f2.getHp());
}
}
}
|
[
"zhoujian@banyuan.club"
] |
zhoujian@banyuan.club
|
7457bd8f050dce256277ef8688f3b3ef0cbac586
|
541bc2a6b05fa44c4ad32d034d7718b1c21bd562
|
/src/com/kaduihuan/tool/DataUtil.java
|
a43208a75d7ac66a80123f91b85ad326b3f2988b
|
[] |
no_license
|
howe/mobile
|
324d577f03085a0042a832ed0b4eeeacd74e3a9d
|
6da3cd2b9614e684842046ea19915f0777d10dc1
|
refs/heads/master
| 2016-09-13T08:10:36.920853
| 2016-05-10T13:48:48
| 2016-05-10T13:48:48
| 58,468,629
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,221
|
java
|
package com.kaduihuan.tool;
/**
* 数据转换
*
* @author Howe
*
*/
public class DataUtil {
public static String getLeft(String sort){
switch (sort) {
case "A":
return "134px";
case "B":
return "164px";
case "C":
return "194px";
case "D":
return "224px";
case "E":
return "254px";
case "F":
return "284px";
case "G":
return "314px";
case "H":
return "344px";
case "I":
return "374px";
case "J":
return "404px";
case "K":
return "434px";
case "L":
return "464px";
case "M":
return "494px";
case "N":
return "524px";
case "O":
return "554px";
case "P":
return "584px";
case "Q":
return "614px";
case "R":
return "644px";
case "S":
return "674px";
case "T":
return "704px";
case "U":
return "734px";
case "V":
return "764px";
case "W":
return "794px";
case "X":
return "824px";
case "Y":
return "854px";
case "Z":
return "884px";
default:
return "42px";
}
}
public static String plid2Url(Integer id){
switch (id){
case 1:
return "/apple.html";
case 2:
return "/android.html";
case 3:
return "/online.html";
case 4:
return "/web.html";
case 5:
return "/wp.html";
default:
return "/";
}
}
public static String plid2Buy(String id){
switch (id) {
case "1":
return "/ibuy.jspx";
case "2":
return "/abuy3.jspx";
case "3":
return "/wbuy.jspx";
case "4":
return "/obuy.jspx";
case "5":
return "/wpbuy.jspx";
default:
return "/";
}
}
public static Integer plid2Name(String name){
switch (name){
case "苹果版":
return 1;
case "安卓版":
return 2;
case "端游":
return 3;
case "页游":
return 4;
case "WP版":
return 5;
default:
return null;
}
}
public static String changeTenpayBankType(String bank_type) {
switch (bank_type.toUpperCase()) {
case "BL":
return "余额支付";
case "ICBC":
return "工商银行";
case "CCB":
return "建设银行";
case "ABC":
return "农业银行";
case "CMB":
return "招商银行";
case "SPDB":
return "上海浦发银行";
case "SDB":
return "深圳发展银行";
case "CIB":
return "兴业银行";
case "BOB":
return "北京银行";
case "CEB":
return "光大银行";
case "CMBC":
return "民生银行";
case "CITIC":
return "中信银行";
case "GDB":
return "广东发展银行";
case "PAB":
return "平安银行";
case "BOC":
return "中国银行";
case "COMM":
return "交通银行";
case "NJCB":
return "南京银行";
case "NBCB":
return "宁波银行";
case "SRCB":
return "上海农商";
case "BEA":
return "东亚银行";
case "POSTGC":
return "邮政储蓄";
case "ICBCB2B":
return "工商银行(企业版)";
case "CMBB2B":
return "招商银行(企业版)";
case "CCBB2B":
return "建设银行(企业版)";
case "ABCB2B":
return "农业银行(企业版)";
case "SPDBB2B":
return "浦发银行(企业版)";
case "CEBB2B":
return "光大银行(企业版)";
default:
return "未知";
}
}
public static String changeKuaiqianBankType(String bankId) {
switch (bankId.toUpperCase()) {
case "BL":
return "余额支付";
case "GZCB":
return "广州银行";
case "CBHB":
return "渤海银行";
case "BJRCB":
return "北京农商银行";
case "ICBC":
return "工商银行";
case "CCB":
return "建设银行";
case "ABC":
return "农业银行";
case "CMB":
return "招商银行";
case "SPDB":
return "上海浦发银行";
case "SDB":
return "深圳发展银行";
case "CIB":
return "兴业银行";
case "HXB":
return "华夏银行";
case "BOB":
return "北京银行";
case "CEB":
return "光大银行";
case "CMBC":
return "民生银行";
case "CITIC":
return "中信银行";
case "GDB":
return "广东发展银行";
case "PAB":
return "平安银行";
case "BOC":
return "中国银行";
case "BCOM":
return "交通银行";
case "NJCB":
return "南京银行";
case "HSB":
return "徽商银行";
case "CZB":
return "浙商银行";
case "HZB":
return "杭州银行";
case "NBCB":
return "宁波银行";
case "SRCB":
return "上海农商";
case "UPOP":
return "银联在线支付";
case "BEA":
return "东亚银行";
case "JSB":
return "江苏银行";
case "DLB":
return "大连银行";
case "SHB":
return "上海银行";
case "PSBC":
return "邮政储蓄";
case "ICBC_B2B":
return "工商银行(企业版)";
case "CMB_B2B":
return "招商银行(企业版)";
case "CCB_B2B":
return "建设银行(企业版)";
case "ABC_B2B":
return "农业银行(企业版)";
case "BOC_B2B":
return "中国银行(企业版)";
case "BCOM_B2B":
return "交通银行(企业版)";
case "CIB_B2B":
return "兴业银行(企业版)";
case "SPDB_B2B":
return "浦发银行(企业版)";
case "CEB_B2B":
return "光大银行(企业版)";
default:
return "未知";
}
}
}
|
[
"howechiang@gmail.com"
] |
howechiang@gmail.com
|
09f7c5ea53928e15ebe703c19575aa94329a8047
|
9e38b74e80d32e088fb188212da0bbe32e099e8a
|
/src/main/java/io/github/jhipster/areaapp/web/rest/vm/KeyAndPasswordVM.java
|
6435356dc98d10a3e348f1539786c7e77bdf6611
|
[] |
no_license
|
BulkSecurityGeneratorProject/areaApp
|
2878e75d7ba6cb93949f9a35326d6e1f12a55ab1
|
8010983638aeb6c4095994b265eb22090734c414
|
refs/heads/master
| 2022-12-15T13:33:09.793172
| 2019-05-15T10:23:45
| 2019-05-15T10:23:45
| 296,585,810
| 0
| 0
| null | 2020-09-18T10:12:21
| 2020-09-18T10:12:20
| null |
UTF-8
|
Java
| false
| false
| 507
|
java
|
package io.github.jhipster.areaapp.web.rest.vm;
/**
* View Model object for storing the user's key and password.
*/
public class KeyAndPasswordVM {
private String key;
private String newPassword;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getNewPassword() {
return newPassword;
}
public void setNewPassword(String newPassword) {
this.newPassword = newPassword;
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
314353f3984c46c47b8d325bda0c9c78e45ef094
|
5019fe77a57e28ac988f2e3c61efa4ba6a00c959
|
/sdk/src/main/java/org/zstack/sdk/DetachIsoFromVmInstanceAction.java
|
fc62a478c4a5086eee3fbcfa06b64ad30eeccde7
|
[
"Apache-2.0"
] |
permissive
|
liuyong240/zstack
|
45b69b2faaf893ea4bbc0941effef773c780c8e2
|
c57c001f1ce377c64bf00ec765bcc7144e6ca273
|
refs/heads/master
| 2020-05-22T22:37:57.602737
| 2017-03-12T17:22:30
| 2017-03-12T17:22:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,583
|
java
|
package org.zstack.sdk;
import java.util.HashMap;
import java.util.Map;
public class DetachIsoFromVmInstanceAction extends AbstractAction {
private static final HashMap<String, Parameter> parameterMap = new HashMap<>();
public static class Result {
public ErrorCode error;
public DetachIsoFromVmInstanceResult value;
public Result throwExceptionIfError() {
if (error != null) {
throw new ApiException(
String.format("error[code: %s, description: %s, details: %s]", error.code, error.description, error.details)
);
}
return this;
}
}
@Param(required = true, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String vmInstanceUuid;
@Param(required = false)
public java.util.List systemTags;
@Param(required = false)
public java.util.List userTags;
@Param(required = true)
public String sessionId;
public long timeout;
public long pollingInterval;
public Result call() {
ApiResult res = ZSClient.call(this);
Result ret = new Result();
if (res.error != null) {
ret.error = res.error;
return ret;
}
DetachIsoFromVmInstanceResult value = res.getResult(DetachIsoFromVmInstanceResult.class);
ret.value = value == null ? new DetachIsoFromVmInstanceResult() : value;
return ret;
}
public void call(final Completion<Result> completion) {
ZSClient.call(this, new InternalCompletion() {
@Override
public void complete(ApiResult res) {
Result ret = new Result();
if (res.error != null) {
ret.error = res.error;
completion.complete(ret);
return;
}
DetachIsoFromVmInstanceResult value = res.getResult(DetachIsoFromVmInstanceResult.class);
ret.value = value == null ? new DetachIsoFromVmInstanceResult() : value;
completion.complete(ret);
}
});
}
Map<String, Parameter> getParameterMap() {
return parameterMap;
}
RestInfo getRestInfo() {
RestInfo info = new RestInfo();
info.httpMethod = "DELETE";
info.path = "/vm-instances/{vmInstanceUuid}/iso";
info.needSession = true;
info.needPoll = true;
info.parameterName = "null";
return info;
}
}
|
[
"xin.zhang@mevoco.com"
] |
xin.zhang@mevoco.com
|
b1134851d47e00cc8af8fca3100f2cc772fc79e8
|
afb78b6d9d2a3cb1f8d9714231a44d4423b7184b
|
/Java-OCP2-master/Lesson_6_Interfaces_and_Lambda_Expressions/Lesson6_Interfaces_ProductSalesInterfaces02/Main.java
|
e7e0b9653b9dd41c2db0c3eabe6a1f17727258e5
|
[] |
no_license
|
Shaigift/Java2HerbertSchildt
|
056afb53a536ce2936fcae25f8888be0681a0180
|
b55046273bfd53b6088366c1c9895652da260025
|
refs/heads/main
| 2023-05-09T03:14:09.633196
| 2021-06-08T09:03:20
| 2021-06-08T09:03:20
| 374,947,888
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 149
|
java
|
package Lesson6_Interfaces_ProductSalesInterfaces02;
public class Main {
public static void main(String[] args) {
TestSales.main(args);
}
}
|
[
"mphogivenshai@gmail.com"
] |
mphogivenshai@gmail.com
|
906d9fd2fdcc1a3d8e605da15782077be18ee679
|
ee461488c62d86f729eda976b421ac75a964114c
|
/tags/HtmlUnit-2.3/src/main/java/com/gargoylesoftware/htmlunit/util/DebuggingWebConnection.java
|
5e6d9add8a356a88f1d292c82a85305ad1e14607
|
[
"Apache-2.0"
] |
permissive
|
svn2github/htmlunit
|
2c56f7abbd412e6d9e0efd0934fcd1277090af74
|
6fc1a7d70c08fb50fef1800673671fd9cada4899
|
refs/heads/master
| 2023-09-03T10:35:41.987099
| 2015-07-26T13:12:45
| 2015-07-26T13:12:45
| 37,107,064
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,232
|
java
|
/*
* Copyright (c) 2002-2008 Gargoyle Software Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.gargoylesoftware.htmlunit.util;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.List;
import org.apache.commons.httpclient.NameValuePair;
import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.gargoylesoftware.htmlunit.TextUtil;
import com.gargoylesoftware.htmlunit.WebConnection;
import com.gargoylesoftware.htmlunit.WebRequestSettings;
import com.gargoylesoftware.htmlunit.WebResponse;
/**
* Wrapper around a "real" WebConnection that will use the wrapped web connection
* to do the real job and save all received responses
* in the temp directory with an overview page.<br>
* <br>
* This may be useful at conception time to understand what is "browsed".<br>
* <br>
* Example:
* <pre>
* final WebClient client = new WebClient();
* final WebConnection connection = new DebuggingWebConnection(client.getWebConnection(), "myTest");
* client.setWebConnection(connection);
* </pre>
* In this example an overview page will be generated under the name myTest.html in the temp directory.<br>
* <br>
* <em>This class is only intended as an help during the conception.</em>
*
* @version $Revision$
* @author Marc Guillemot
* @author Ahmed Ashour
*/
public class DebuggingWebConnection extends WebConnectionWrapper {
private static final Log LOG = LogFactory.getLog(DebuggingWebConnection.class);
private int counter_;
private final WebConnection wrappedWebConnection_;
private final String reportBaseName_;
private final File javaScriptFile_;
/**
* Wraps a web connection to have a report generated of the received responses.
* @param webConnection the webConnection that do the real work
* @param reportBaseName the base name to use for the generated files
* The report will be reportBaseName + ".html" in the temp file.
* @throws IOException in case of problems writing the files
*/
public DebuggingWebConnection(final WebConnection webConnection,
final String reportBaseName) throws IOException {
super(webConnection);
wrappedWebConnection_ = webConnection;
reportBaseName_ = reportBaseName;
javaScriptFile_ = File.createTempFile(reportBaseName_, ".js");
createOverview();
}
/**
* Calls the wrapped webconnection and save the received response.
* {@inheritDoc}
*/
@Override
public WebResponse getResponse(final WebRequestSettings settings) throws IOException {
final WebResponse response = wrappedWebConnection_.getResponse(settings);
saveResponse(response, settings);
return response;
}
/**
* Saves the response content in the temp dir and adds it to the summary page.
* @param response the response to save
* @param settings the settings used to get the response
* @throws IOException if a problem occurs writing the file
*/
protected void saveResponse(final WebResponse response, final WebRequestSettings settings)
throws IOException {
counter_++;
final String extension;
if ("application/x-javascript".equals(response.getContentType())) {
extension = ".js";
}
else if ("text/html".equals(response.getContentType())) {
extension = ".html";
}
else {
extension = ".txt";
}
final File f = File.createTempFile(reportBaseName_ + counter_ + "-", extension);
final String content = response.getContentAsString();
FileUtils.writeStringToFile(f, content, response.getContentCharSet());
LOG.info("Created file " + f.getAbsolutePath()
+ " for response " + counter_ + ": " + response.getUrl());
final StringBuilder buffer = new StringBuilder();
buffer.append("tab[tab.length] = {code: " + response.getStatusCode() + ", ");
buffer.append("fileName: '" + f.getName() + "', ");
buffer.append("contentType: '" + response.getContentType() + "', ");
buffer.append("method: '" + settings.getHttpMethod().name() + "', ");
buffer.append("url: '" + response.getUrl() + "', ");
buffer.append("headers: " + nameValueListToJsMap(response.getResponseHeaders()));
buffer.append("};\n");
final FileWriter jsFileWriter = new FileWriter(javaScriptFile_, true);
jsFileWriter.write(buffer.toString());
jsFileWriter.close();
}
/**
* Produces a String that will produce a JS map like "{'key1': 'value1', 'key 2': 'value2'}"
* @param headers a list of {@link NameValuePair}
* @return the JS String
*/
static String nameValueListToJsMap(final List<NameValuePair> headers) {
if (headers == null || headers.isEmpty()) {
return "{}";
}
final StringBuilder buffer = new StringBuilder("{");
for (final NameValuePair header : headers) {
buffer.append("'" + header.getName() + "': '" + header.getValue().replaceAll("'", "\\'") + "', ");
}
buffer.delete(buffer.length() - 2, buffer.length());
buffer.append("}");
return buffer.toString();
}
/**
* Creates the summary file and the JavaScript file that will be updated for each received response
* @throws IOException if a problem occurs writing the file
*/
private void createOverview() throws IOException {
FileUtils.writeStringToFile(javaScriptFile_, "var tab = [];\n", TextUtil.DEFAULT_CHARSET);
final File summary = new File(javaScriptFile_.getParentFile(), reportBaseName_ + ".html");
final String content = "<html><head><title>Summary for " + reportBaseName_ + "</title>\n"
+ "<h1>Received responses</h1>\n"
+ "<script src='" + javaScriptFile_.getName() + "' type='text/javascript'></script>\n"
+ "</head>\n"
+ "<body>"
+ "<ol>\n"
+ "<script>\n"
+ "for (var i=0; i<tab.length; i++) {\n"
+ " var curRes = tab[i];\n"
+ " document.writeln('<li>'"
+ " + curRes.code + ' ' + curRes.method + ' ' "
+ " + '<a href=\"' + curRes.fileName + '\" target=_blank>' + curRes.url + '</a> "
+ " (' + curRes.contentType + ')</li>');\n"
+ "}\n"
+ "</script>\n"
+ "</ol>"
+ "</body></html>";
FileUtils.writeStringToFile(summary, content, TextUtil.DEFAULT_CHARSET);
LOG.info("Summary will be in " + summary.getAbsolutePath());
}
}
|
[
"mguillem@5f5364db-9458-4db8-a492-e30667be6df6"
] |
mguillem@5f5364db-9458-4db8-a492-e30667be6df6
|
0f5fac4651c0cda3aaa61d62f1b366214a487572
|
5aaebaafeb75c7616689bcf71b8dd5ab2c89fa3b
|
/src/ANXGallery/sources/com/xiaomi/metoknlp/devicediscover/f.java
|
5cb24a8248e4a28f555c726c866b62e24aa33115
|
[] |
no_license
|
gitgeek4dx/ANXGallery9
|
9bf2b4da409ab16492e64340bde4836d716ea7ec
|
af2e3c031d1857fa25636ada923652b66a37ff9e
|
refs/heads/master
| 2022-01-15T05:23:24.065872
| 2019-07-25T17:34:35
| 2019-07-25T17:34:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,891
|
java
|
package com.xiaomi.metoknlp.devicediscover;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.HandlerThread;
import android.os.Message;
import com.xiaomi.metoknlp.MetokApplication;
import com.xiaomi.metoknlp.a;
/* compiled from: WifiCampStatistics */
public class f {
private static final long H = (a.h() ? 30000 : 1800000);
private static final Object mLock = new Object();
private ConnectivityManager I;
private o J;
private b K;
/* access modifiers changed from: private */
public n L;
private Context mContext;
private HandlerThread mHandlerThread;
private BroadcastReceiver mReceiver = new k(this);
static {
a.g();
}
public f(Context context) {
this.mContext = context;
}
private boolean A() {
if (!a.g().m()) {
return true;
}
long n = a.g().n();
if (n == Long.MAX_VALUE) {
n = 172800000;
}
this.K.d();
return this.K.getDuration() > n;
}
private boolean B() {
long c = this.K.c();
long l = a.g().l();
if (l == Long.MAX_VALUE) {
l = 172800000;
}
return System.currentTimeMillis() - c > l;
}
private void C() {
this.J.a(this.K.a(), this.K.b(), this.K.getDuration());
}
private void D() {
this.mContext.registerReceiver(this.mReceiver, new IntentFilter("android.net.conn.CONNECTIVITY_CHANGE"));
}
private void E() {
if (this.L.hasMessages(1)) {
this.L.removeMessages(1);
}
if (this.L.hasMessages(2)) {
this.L.removeMessages(2);
}
this.mContext.unregisterReceiver(this.mReceiver);
}
/* access modifiers changed from: private */
public void a(boolean z) {
NetworkInfo networkInfo = null;
try {
if (!(this.mContext == null || this.mContext.getPackageManager().checkPermission("android.permission.ACCESS_NETWORK_STATE", this.mContext.getPackageName()) != 0 || this.I == null)) {
networkInfo = this.I.getActiveNetworkInfo();
}
} catch (Exception unused) {
}
if (this.K != null) {
if (networkInfo == null || networkInfo.getType() != 1 || !networkInfo.isConnected()) {
this.K.f();
} else {
String a = i.a(this.mContext, 1);
if (this.K.a() == null || !this.K.a().equals(a)) {
this.K.a(a);
}
if (this.L.hasMessages(2)) {
this.L.removeMessages(2);
}
Message obtainMessage = this.L.obtainMessage(2);
long j = H;
obtainMessage.obj = Boolean.valueOf(z);
if (z) {
this.L.sendMessage(obtainMessage);
} else {
this.L.sendMessageDelayed(obtainMessage, j);
}
}
}
}
/* access modifiers changed from: private */
public void b(boolean z) {
if (!a.g().k()) {
return;
}
if (z || (z() && B() && A())) {
C();
this.K.e();
this.K.save();
}
}
private int getFetchDeviceWay() {
try {
return ((MetokApplication) this.mContext).getFetchDeviceWay();
} catch (Exception unused) {
return 0;
}
}
private boolean z() {
long currentTimeMillis = System.currentTimeMillis();
long b = this.K.b();
long o = a.g().o();
if (o == Long.MAX_VALUE) {
o = H;
}
String a = this.K.a();
return a != null && a.equals(i.a(this.mContext, 1)) && currentTimeMillis - b >= o;
}
public void F() {
synchronized (mLock) {
this.J = null;
}
}
public void a(o oVar) {
synchronized (mLock) {
this.J = oVar;
}
}
public void fecthDeviceImmediately() {
a(true);
}
public void start() {
this.K = new b(this.mContext);
this.I = (ConnectivityManager) this.mContext.getSystemService("connectivity");
this.mHandlerThread = new HandlerThread("WifiCampStatics");
this.mHandlerThread.start();
this.L = new n(this, this.mHandlerThread.getLooper());
if (getFetchDeviceWay() == 0) {
D();
}
}
public void stop() {
if (getFetchDeviceWay() == 0) {
E();
}
this.I = null;
this.K.reset();
if (this.mHandlerThread != null) {
this.mHandlerThread.quitSafely();
this.mHandlerThread = null;
}
}
}
|
[
"sv.xeon@gmail.com"
] |
sv.xeon@gmail.com
|
4179b552507496caa03713ae6e98cfe7e552198a
|
36155fc6d1b1cd36edb4b80cb2fc2653be933ebd
|
/lc/src/LC/SOL/NaryTreePreorderTraversal.java
|
a1bf01a935b28acb8f45d3bab54c0a440ce53246
|
[] |
no_license
|
Delon88/leetcode
|
c9d46a6e29749f7a2c240b22e8577952300f2b0f
|
84d17ee935f8e64caa7949772f20301ff94b9829
|
refs/heads/master
| 2021-08-11T05:52:28.972895
| 2021-08-09T03:12:46
| 2021-08-09T03:12:46
| 96,177,512
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 740
|
java
|
package LC.SOL;
import java.util.ArrayList;
import java.util.List;
public class NaryTreePreorderTraversal {
class Node {
public int val;
public List<Node> children;
public Node() {}
public Node(int _val,List<Node> _children) {
val = _val;
children = _children;
}
};
class Solution {
List<Integer> ret;
public List<Integer> preorder(Node root) {
ret = new ArrayList<>();
pre(root);
return ret;
}
void pre(Node root) {
if ( root == null ) return;
ret.add(root.val);
for ( Node ch : root.children) {
pre(ch);
}
}
}
}
|
[
"Mr.AlainDelon@gmail.com"
] |
Mr.AlainDelon@gmail.com
|
bc978ed436d91c3bea9096bfec9b914dedfcaffc
|
d436fade2ee33c96f79a841177a6229fdd6303b7
|
/com/planet_ink/coffee_mud/Abilities/Prayers/Prayer_CureLight.java
|
f9dbf1c9f20024ffb859e66a4e8cbe3a38870268
|
[
"Apache-2.0"
] |
permissive
|
SJonesy/UOMUD
|
bd4bde3614a6cec6fba0e200ac24c6b8b40a2268
|
010684f83a8caec4ea9d38a7d57af2a33100299a
|
refs/heads/master
| 2021-01-20T18:30:23.641775
| 2017-05-19T21:38:36
| 2017-05-19T21:38:36
| 90,917,941
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,024
|
java
|
package com.planet_ink.coffee_mud.Abilities.Prayers;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2001-2017 Bo Zimmerman
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.
*/
public class Prayer_CureLight extends Prayer implements MendingSkill
{
@Override public String ID() { return "Prayer_CureLight"; }
private final static String localizedName = CMLib.lang().L("Cure Light Wounds");
@Override public String name() { return localizedName; }
@Override public int abstractQuality(){ return Ability.QUALITY_BENEFICIAL_OTHERS;}
@Override public int classificationCode(){return Ability.ACODE_PRAYER|Ability.DOMAIN_HEALING;}
@Override public long flags(){return Ability.FLAG_HOLY|Ability.FLAG_HEALINGMAGIC;}
@Override protected long minCastWaitTime(){return CMProps.getTickMillis()/2;}
@Override
public boolean supportsMending(Physical item)
{
return (item instanceof MOB)
&&((((MOB)item).curState()).getHitPoints()<(((MOB)item).maxState()).getHitPoints());
}
@Override
public int castingQuality(MOB mob, Physical target)
{
if(mob!=null)
{
if(target instanceof MOB)
{
if(!supportsMending(target))
return Ability.QUALITY_INDIFFERENT;
if(CMLib.flags().isUndead((MOB)target))
return Ability.QUALITY_MALICIOUS;
}
}
return super.castingQuality(mob,target);
}
@Override
public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel)
{
final MOB target=this.getTarget(mob,commands,givenTarget);
if(target==null)
return false;
final boolean undead=CMLib.flags().isUndead(target);
if(!super.invoke(mob,commands,givenTarget,auto,asLevel))
return false;
final boolean success=proficiencyCheck(mob,0,auto);
if(success)
{
final CMMsg msg=CMClass.getMsg(mob,target,this,(!undead?0:CMMsg.MASK_MALICIOUS)|verbalCastCode(mob,target,auto),auto?L("A faint white glow surrounds <T-NAME>."):L("^S<S-NAME> @x1, delivering a light healing touch to <T-NAMESELF>.^?",prayWord(mob)));
if(mob.location().okMessage(mob,msg))
{
mob.location().send(mob,msg);
final int healing=CMLib.dice().roll(2,adjustedLevel(mob,asLevel),4);
final int oldHP=target.curState().getHitPoints();
CMLib.combat().postHealing(mob,target,this,healing,CMMsg.MASK_ALWAYS|CMMsg.TYP_CAST_SPELL,null);
if(target.curState().getHitPoints()>oldHP)
target.tell(L("You feel a little better!"));
lastCastHelp=System.currentTimeMillis();
}
}
else
beneficialWordsFizzle(mob,target,auto?"":L("<S-NAME> @x1 for <T-NAMESELF>, but nothing happens.",prayWord(mob)));
// return whether it worked
return success;
}
}
|
[
"bo@zimmers.net"
] |
bo@zimmers.net
|
b85293a8be66e39afede067b4fbf1282004719e4
|
f3c35ce8ca93ad644f523ca19171478dd0ec95da
|
/ib-engine/src/main/java/com/dwidasa/engine/service/AppVersionService.java
|
9ee5a3e02e4c408d6c241047fcea5b317e3b7cc9
|
[] |
no_license
|
depot-air/internet-banking
|
da049da2f6288a388bd9f2d33a9e8e57f5954269
|
25a5e0038c446536eca748e18f35b7a6a8224604
|
refs/heads/master
| 2022-12-21T03:54:50.227565
| 2020-01-16T11:15:31
| 2020-01-16T11:15:31
| 234,302,680
| 0
| 1
| null | 2022-12-09T22:33:28
| 2020-01-16T11:12:17
|
Java
|
UTF-8
|
Java
| false
| false
| 629
|
java
|
package com.dwidasa.engine.service;
import com.dwidasa.engine.model.AppVersion;
/**
* Created by IntelliJ IDEA.
* User: ryoputranto
* Date: 1/30/12
* Time: 10:18 AM
*/
public interface AppVersionService extends GenericService<AppVersion, Long> {
/**
* Get latest version for particular device/platform and version
* @param deviceType string represent device/platform type, eg BlackBerry (10), Android (11), Iphone (12)
* @param versionId version identification number
* @return app version of the latest version
*/
public AppVersion getLatestVersion(String deviceType, Long versionId);
}
|
[
"gunungloli@gmail.com"
] |
gunungloli@gmail.com
|
467e3693c15b69a07a9697a92fb5198229761a7a
|
f34602b407107a11ce0f3e7438779a4aa0b1833e
|
/professor/dvl/roadnet-client/src/main/java/com/roadnet/apex/IAdministrationServiceUploadCustomReportTransferErrorCodeFaultMessage.java
|
0011b159e06aa407b9529e18398aef165b37bda0
|
[] |
no_license
|
ggmoura/treinar_11836
|
a447887dc65c78d4bd87a70aab2ec9b72afd5d87
|
0a91f3539ccac703d9f59b3d6208bf31632ddf1c
|
refs/heads/master
| 2022-06-14T13:01:27.958568
| 2020-04-04T01:41:57
| 2020-04-04T01:41:57
| 237,103,996
| 0
| 2
| null | 2022-05-20T21:24:49
| 2020-01-29T23:36:21
|
Java
|
UTF-8
|
Java
| false
| false
| 1,572
|
java
|
package com.roadnet.apex;
import javax.xml.ws.WebFault;
/**
* This class was generated by Apache CXF 3.2.4
* 2020-03-15T13:07:02.574-03:00
* Generated source version: 3.2.4
*/
@WebFault(name = "TransferErrorCode", targetNamespace = "http://roadnet.com/apex/DataContracts/")
public class IAdministrationServiceUploadCustomReportTransferErrorCodeFaultMessage extends Exception {
private com.roadnet.apex.datacontracts.TransferErrorCode transferErrorCode;
public IAdministrationServiceUploadCustomReportTransferErrorCodeFaultMessage() {
super();
}
public IAdministrationServiceUploadCustomReportTransferErrorCodeFaultMessage(String message) {
super(message);
}
public IAdministrationServiceUploadCustomReportTransferErrorCodeFaultMessage(String message, java.lang.Throwable cause) {
super(message, cause);
}
public IAdministrationServiceUploadCustomReportTransferErrorCodeFaultMessage(String message, com.roadnet.apex.datacontracts.TransferErrorCode transferErrorCode) {
super(message);
this.transferErrorCode = transferErrorCode;
}
public IAdministrationServiceUploadCustomReportTransferErrorCodeFaultMessage(String message, com.roadnet.apex.datacontracts.TransferErrorCode transferErrorCode, java.lang.Throwable cause) {
super(message, cause);
this.transferErrorCode = transferErrorCode;
}
public com.roadnet.apex.datacontracts.TransferErrorCode getFaultInfo() {
return this.transferErrorCode;
}
}
|
[
"gleidson.gmoura@gmail.com"
] |
gleidson.gmoura@gmail.com
|
c1a3dfb7c7f334562adf4f20efdf64077add7fe4
|
5eae683a6df0c4b97ab1ebcd4724a4bf062c1889
|
/bin/ext-content/cmsfacades/src/de/hybris/platform/cmsfacades/navigations/service/functions/DefaultNavigationEntryMediaModelConversionFunction.java
|
ce879dc6fe125499bb06c11872a192a83fb7039e
|
[] |
no_license
|
sujanrimal/GiftCardProject
|
1c5e8fe494e5c59cca58bbc76a755b1b0c0333bb
|
e0398eec9f4ec436d20764898a0255f32aac3d0c
|
refs/heads/master
| 2020-12-11T18:05:17.413472
| 2020-01-17T18:23:44
| 2020-01-17T18:23:44
| 233,911,127
| 0
| 0
| null | 2020-06-18T15:26:11
| 2020-01-14T18:44:18
| null |
UTF-8
|
Java
| false
| false
| 2,238
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.cmsfacades.navigations.service.functions;
import de.hybris.platform.cms2.servicelayer.services.admin.CMSAdminSiteService;
import de.hybris.platform.cmsfacades.data.NavigationEntryData;
import de.hybris.platform.core.model.media.MediaModel;
import de.hybris.platform.servicelayer.dto.converter.ConversionException;
import de.hybris.platform.servicelayer.exceptions.AmbiguousIdentifierException;
import de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException;
import de.hybris.platform.servicelayer.media.MediaService;
import java.util.function.Function;
import org.springframework.beans.factory.annotation.Required;
/**
* Default implementation for conversion of {@link NavigationEntryData} into {@link MediaModel}.
* @deprecated since 1811 - no longer needed
*/
@Deprecated
public class DefaultNavigationEntryMediaModelConversionFunction implements Function<NavigationEntryData, MediaModel>
{
private MediaService mediaService;
private CMSAdminSiteService cmsAdminSiteService;
@Override
public MediaModel apply(final NavigationEntryData navigationEntryData)
{
try
{
return getMediaService().getMedia(getCmsAdminSiteService().getActiveCatalogVersion(), navigationEntryData.getItemId());
}
catch (AmbiguousIdentifierException | UnknownIdentifierException e)
{
throw new ConversionException("Invalid Media: " + navigationEntryData.getItemId(), e);
}
}
protected MediaService getMediaService()
{
return mediaService;
}
@Required
public void setMediaService(final MediaService mediaService)
{
this.mediaService = mediaService;
}
protected CMSAdminSiteService getCmsAdminSiteService()
{
return cmsAdminSiteService;
}
@Required
public void setCmsAdminSiteService(CMSAdminSiteService cmsAdminSiteService)
{
this.cmsAdminSiteService = cmsAdminSiteService;
}
}
|
[
"travis.d.crawford@accenture.com"
] |
travis.d.crawford@accenture.com
|
080912e5c0dc62557d7b7dae5df644f7dc79f0ec
|
eb3ad750a23be626d4190eeb48d1047cb8e32c3e
|
/BWCategorizer/src/main/java/com/nvarghese/beowulf/scs/categorizers/SingleSetCategorizer.java
|
af6f23848bb21592c06f4066a1e366dc5f65ad4c
|
[] |
no_license
|
00mjk/beowulf-1
|
1ad29e79e2caee0c76a8b0bd5e15c24c22017d56
|
d28d7dfd6b9080130540fc7427bfe7ad01209ade
|
refs/heads/master
| 2021-05-26T23:07:39.561391
| 2013-01-23T03:09:44
| 2013-01-23T03:09:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,496
|
java
|
package com.nvarghese.beowulf.scs.categorizers;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.code.morphia.Datastore;
import com.nvarghese.beowulf.common.scan.model.WebScanDocument;
import com.nvarghese.beowulf.common.webtest.WebTestType;
import com.nvarghese.beowulf.common.webtest.dao.TestModuleMetaDataDAO;
import com.nvarghese.beowulf.common.webtest.model.TestModuleMetaDataDocument;
import com.nvarghese.beowulf.scs.ScsManager;
/**
*
*
*/
public abstract class SingleSetCategorizer extends Categorizer {
protected WebTestType testType;
protected Set<Long> moduleNumbers;
static Logger logger = LoggerFactory.getLogger(SingleSetCategorizer.class);
public SingleSetCategorizer(Datastore ds, WebScanDocument webScanDocument, WebTestType testType) {
super(ds, webScanDocument);
this.testType = testType;
moduleNumbers = new HashSet<Long>();
}
@Override
public void initialize() {
TestModuleMetaDataDAO testModuleMetaDataDAO = new TestModuleMetaDataDAO(ScsManager.getInstance().getDataStore());
List<TestModuleMetaDataDocument> testModuleMetaDataDocs = testModuleMetaDataDAO.findByTestType(testType);
for (TestModuleMetaDataDocument metaDoc : testModuleMetaDataDocs) {
if (getEnabledTestModuleNumbers().contains(metaDoc.getModuleNumber())) {
moduleNumbers.add(metaDoc.getModuleNumber());
}
}
}
}
|
[
"nibin012@gmail.com"
] |
nibin012@gmail.com
|
d839502fe1db6175311f30cf15e5695e05017ef9
|
513c1eb639ae80c0c3e9eb0a617cd1d00e2bc034
|
/src/net/demilich/metastone/game/events/EnrageChangedEvent.java
|
623843cee65207c351cd98e044db8cbda3942b69
|
[
"MIT"
] |
permissive
|
hillst/MetaStone
|
a21b63a1d2d02646ee3b6226261b4eb3304c175a
|
5882d834d32028f5f083543f0700e59ccf1aa1fe
|
refs/heads/master
| 2021-05-28T22:05:42.911637
| 2015-06-05T00:58:06
| 2015-06-05T00:58:06
| 36,316,023
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 528
|
java
|
package net.demilich.metastone.game.events;
import net.demilich.metastone.game.GameContext;
import net.demilich.metastone.game.entities.Entity;
public class EnrageChangedEvent extends GameEvent {
private final Entity target;
public EnrageChangedEvent(GameContext context, Entity target) {
super(context);
this.target = target;
}
@Override
public Entity getEventTarget() {
return target;
}
@Override
public GameEventType getEventType() {
return GameEventType.ENRAGE_CHANGED;
}
}
|
[
"hillst@onid.oregonstate.edu"
] |
hillst@onid.oregonstate.edu
|
1d375f3b66da6f7c276a5200ad37829fdf31f353
|
ba44e8867d176d74a6ca0a681a4f454ca0b53cad
|
/component/entity/SAPMBOCreationWizard.java
|
35e26f4a9770b288135758fb6bd2765f57a11cc3
|
[] |
no_license
|
eric2323223/FATPUS
|
1879e2fa105c7e7683afd269965d8b59a7e40894
|
989d2cf49127d88fdf787da5ca6650e2abd5a00e
|
refs/heads/master
| 2016-09-15T19:10:35.317021
| 2012-06-29T02:32:36
| 2012-06-29T02:32:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,511
|
java
|
package component.entity;
import com.rational.test.ft.object.interfaces.GuiSubitemTestObject;
import com.rational.test.ft.script.RationalTestScript;
import com.sybase.automation.framework.widget.DOF;
import com.sybase.automation.framework.widget.helper.TreeHelper;
import component.dialog.EditDefaultValueDialog;
import component.dialog.SAPOperationSelectionDialog;
import component.entity.model.VerificationCriteria;
import component.wizard.page.LoadParameterPage;
import component.wizard.page.OperationParameterPage;
import component.wizard.page.ParameterPage;
public class SAPMBOCreationWizard extends ACW{
@Override
public void start(String string) {
DOF.getWNTree().click(RIGHT, atPath(WN.projectNameWithVersion(string)));
DOF.getContextMenu().click(atPath("New->Mobile Business Object"));
}
public void setBapiOperation(String str){
SAPOperationSelectionDialog.setBapiOperation(str, dialog());
}
public void verifyParameterDefaultValue(VerificationCriteria vc){
GuiSubitemTestObject tree = DOF.getTree(DOF.getDualHeadersTree(dialog()));
String parameter = vc.getExpected().split(",")[0];
String expected = vc.getExpected().split(",")[1];
String value = TreeHelper.getCellValue(tree, parameter, "Default Value");
if(expected.equals(value) && vc.isContinueWhenMatch()){
this.canContinue = true;
logInfo("VP passed");
}else{
this.canContinue = false;
if(!expected.equals(value)){
logError("VP Fails. Expected=["+expected+"] Actual=["+value+"]");
}
}
}
public void setActivateVerify(String str){
//do nothing, just a trigger.
}
public int getPageIndexOfOperation(String operation){
if(operation.equals("setName"))
return 0;
if(operation.equals("setConnectionProfile"))
return 1;
if(operation.equals("setDataSourceType"))
return 1;
if(operation.equals("setAttribute"))
return 2;
if(operation.equals("setOperation"))
return 2;
if(operation.equals("setBapiOperation"))
return 2;
if(operation.equals("setParameter"))
return 2;
if(operation.equals("setActivateVerify"))
return 3;
if(operation.equals("setParameterValue"))
return 3;
else
throw new RuntimeException("Unknown operation name: "+operation);
}
@Override
public String getDependOperation(String operation) {
if(operation.equals("setActivateVerify")){
return "verifyParameterDefaultValue";
}
return null;
}
public void setOperation(String str){
SAPOperationSelectionDialog.setOperation(str, dialog());
}
public void setAttribute(String str){
super.setAttribute(str);
}
public void setParameter(String str){
SAPOperationSelectionDialog.setParameter(str, dialog());
}
public void setParameterValue(String str) {
// OperationParameterPage.setParameterDefaultValue(str, dialog());
for(String entry:str.split(":")){
LoadParameterPage.setParameterDefaultValue(entry, dialog());
}
}
@Override
public void setConnectionProfile(String string) {
super.setConnectionProfile(string);
}
@Override
public void setDataSourceType(String string) {
super.setDataSourceType(string);
}
@Override
public void setName(String string) {
super.setName(string);
}
public void finish(){
RationalTestScript.sleep(1);
DOF.getButton(dialog(), "&Finish").click();
LongOperationMonitor.waitForProgressBarVanish(dialog());
LongOperationMonitor.waitForDialogToVanish("Progress Information");
while(true){
if(dialog()!=null){
sleep(1);
}else{
break;
}
}
MainMenu.saveAll();
}
}
|
[
"eric2323223@gmail.com"
] |
eric2323223@gmail.com
|
0f21a92d97a7d6e808a88234a26b250644da47e1
|
70a051499d8fdc45208bf6c983294f54a202eea6
|
/src/main/java/com/griefdefender/api/event/FlagPermissionEvent.java
|
9a85afaff305eda0541bf41e418366c18a4aa562
|
[
"MIT"
] |
permissive
|
andrepl/GriefDefenderAPI
|
3af92c7d8377968f0887a6a8eed185e87995aac3
|
2663329cb51dea48773aa2afd71e4d8732eec72d
|
refs/heads/master
| 2020-09-14T06:37:53.401571
| 2019-09-06T16:29:06
| 2019-09-06T16:29:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,633
|
java
|
/*
* This file is part of GriefDefenderAPI, licensed under the MIT License (MIT).
*
* Copyright (c) bloodmc
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.griefdefender.api.event;
import com.griefdefender.api.Tristate;
import com.griefdefender.api.permission.flag.Flag;
public interface FlagPermissionEvent extends PermissionEvent {
interface ClearAll extends FlagPermissionEvent { }
interface Clear extends FlagPermissionEvent { }
interface Set extends FlagPermissionEvent {
Flag getFlag();
Tristate getValue();
}
}
|
[
"jdroque@gmail.com"
] |
jdroque@gmail.com
|
5750ecd6419f33458ec7dd40514de0d7c6037a5d
|
c148cc8c215dc089bd346b0e4c8e21a2b8665d86
|
/google-ads/src/main/java/com/google/ads/googleads/v0/services/CustomerManagerLinkServiceSettings.java
|
22703d313a7731893b1a28aa9b87323535dfcd6e
|
[
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] |
permissive
|
duperran/google-ads-java
|
39ae44927d64ceead633b2f3a47407f4e9ef0814
|
da810ba8e1b5328a4b9b510eb582dc692a071408
|
refs/heads/master
| 2020-04-07T13:57:37.899838
| 2018-11-16T16:37:48
| 2018-11-16T16:37:48
| 158,428,852
| 0
| 0
|
Apache-2.0
| 2018-11-20T17:42:50
| 2018-11-20T17:42:50
| null |
UTF-8
|
Java
| false
| false
| 7,447
|
java
|
/*
* Copyright 2018 Google 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
*
* 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 com.google.ads.googleads.v0.services;
import com.google.ads.googleads.v0.resources.CustomerManagerLink;
import com.google.ads.googleads.v0.services.stub.CustomerManagerLinkServiceStubSettings;
import com.google.api.core.ApiFunction;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import java.io.IOException;
import java.util.List;
import javax.annotation.Generated;
// AUTO-GENERATED DOCUMENTATION AND CLASS
/**
* Settings class to configure an instance of {@link CustomerManagerLinkServiceClient}.
*
* <p>The default instance has everything set to sensible defaults:
*
* <ul>
* <li>The default service address (googleads.googleapis.com) and default port (443) are used.
* <li>Credentials are acquired automatically through Application Default Credentials.
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
* </ul>
*
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object. For
* example, to set the total timeout of getCustomerManagerLink to 30 seconds:
*
* <pre>
* <code>
* CustomerManagerLinkServiceSettings.Builder customerManagerLinkServiceSettingsBuilder =
* CustomerManagerLinkServiceSettings.newBuilder();
* customerManagerLinkServiceSettingsBuilder.getCustomerManagerLinkSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30));
* CustomerManagerLinkServiceSettings customerManagerLinkServiceSettings = customerManagerLinkServiceSettingsBuilder.build();
* </code>
* </pre>
*/
@Generated("by gapic-generator")
@BetaApi
public class CustomerManagerLinkServiceSettings
extends ClientSettings<CustomerManagerLinkServiceSettings> {
/** Returns the object with the settings used for calls to getCustomerManagerLink. */
public UnaryCallSettings<GetCustomerManagerLinkRequest, CustomerManagerLink>
getCustomerManagerLinkSettings() {
return ((CustomerManagerLinkServiceStubSettings) getStubSettings())
.getCustomerManagerLinkSettings();
}
public static final CustomerManagerLinkServiceSettings create(
CustomerManagerLinkServiceStubSettings stub) throws IOException {
return new CustomerManagerLinkServiceSettings.Builder(stub.toBuilder()).build();
}
/** Returns a builder for the default ExecutorProvider for this service. */
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
return CustomerManagerLinkServiceStubSettings.defaultExecutorProviderBuilder();
}
/** Returns the default service endpoint. */
public static String getDefaultEndpoint() {
return CustomerManagerLinkServiceStubSettings.getDefaultEndpoint();
}
/** Returns the default service scopes. */
public static List<String> getDefaultServiceScopes() {
return CustomerManagerLinkServiceStubSettings.getDefaultServiceScopes();
}
/** Returns a builder for the default credentials for this service. */
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
return CustomerManagerLinkServiceStubSettings.defaultCredentialsProviderBuilder();
}
/** Returns a builder for the default ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return CustomerManagerLinkServiceStubSettings.defaultGrpcTransportProviderBuilder();
}
public static TransportChannelProvider defaultTransportChannelProvider() {
return CustomerManagerLinkServiceStubSettings.defaultTransportChannelProvider();
}
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
return CustomerManagerLinkServiceStubSettings.defaultApiClientHeaderProviderBuilder();
}
/** Returns a new builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
}
/** Returns a builder containing all the values of this settings class. */
public Builder toBuilder() {
return new Builder(this);
}
protected CustomerManagerLinkServiceSettings(Builder settingsBuilder) throws IOException {
super(settingsBuilder);
}
/** Builder for CustomerManagerLinkServiceSettings. */
public static class Builder
extends ClientSettings.Builder<CustomerManagerLinkServiceSettings, Builder> {
protected Builder() throws IOException {
this((ClientContext) null);
}
protected Builder(ClientContext clientContext) {
super(CustomerManagerLinkServiceStubSettings.newBuilder(clientContext));
}
private static Builder createDefault() {
return new Builder(CustomerManagerLinkServiceStubSettings.newBuilder());
}
protected Builder(CustomerManagerLinkServiceSettings settings) {
super(settings.getStubSettings().toBuilder());
}
protected Builder(CustomerManagerLinkServiceStubSettings.Builder stubSettings) {
super(stubSettings);
}
public CustomerManagerLinkServiceStubSettings.Builder getStubSettingsBuilder() {
return ((CustomerManagerLinkServiceStubSettings.Builder) getStubSettings());
}
// NEXT_MAJOR_VER: remove 'throws Exception'
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
}
/** Returns the builder for the settings used for calls to getCustomerManagerLink. */
public UnaryCallSettings.Builder<GetCustomerManagerLinkRequest, CustomerManagerLink>
getCustomerManagerLinkSettings() {
return getStubSettingsBuilder().getCustomerManagerLinkSettings();
}
@Override
public CustomerManagerLinkServiceSettings build() throws IOException {
return new CustomerManagerLinkServiceSettings(this);
}
}
}
|
[
"nbirnie@google.com"
] |
nbirnie@google.com
|
ffe5e74f35d9320faba9574711726ae89d325084
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/model_seeding/2_a4j-net.kencochrane.a4j.beans.ListingProductInfo-1.0-1/net/kencochrane/a4j/beans/ListingProductInfo_ESTest_scaffolding.java
|
e4cdeb3d16b7a1698fb4ced68851ef4998183b26
|
[] |
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
| 550
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Thu Oct 24 12:27:09 GMT 2019
*/
package net.kencochrane.a4j.beans;
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 ListingProductInfo_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
a3998ef3eb93d4e615ad419adced1d9332e28c4a
|
6253283b67c01a0d7395e38aeeea65e06f62504b
|
/decompile/app/SystemUI/src/main/java/com/fyusion/sdk/common/ext/filter/a/l.java
|
4cdfede10cc7324df0ada5b12bb7a9a531924cd8
|
[] |
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
| 5,140
|
java
|
package com.fyusion.sdk.common.ext.filter.a;
import com.fyusion.sdk.common.ext.filter.BlockFilter;
import com.fyusion.sdk.common.ext.filter.ImageFilter;
import com.fyusion.sdk.common.t;
import fyusion.vislib.BuildConfig;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.Map;
import java.util.TreeMap;
/* compiled from: Unknown */
public class l {
s a = new s();
public boolean b = true;
public boolean c = true;
private Map<Integer, ImageFilter> d = new TreeMap();
private boolean e = true;
private int f;
private int g;
private t h = new t();
private String a(int i, String str) {
return "highp vec4 applyFilter" + i + " (highp vec4 input_color, highp vec2 texture_coordinate)" + "{" + str + "}";
}
private String a(ImageFilter imageFilter, String str, String str2) {
return (imageFilter.isEnabled() && str2 != null) ? str + str2 : str;
}
private String b(int i) {
return "color = applyFilter" + i + " (color, texture_coordinate);";
}
public int a() {
return this.g;
}
void a(int i) {
for (a aVar : this.d.values()) {
if (aVar.isEnabled()) {
aVar.a(i);
}
}
}
public void a(t tVar) {
this.h = tVar;
this.f = this.h.e();
this.g = this.h.f();
for (a aVar : this.d.values()) {
if (aVar.isEnabled() && (aVar instanceof BlockFilter)) {
((BlockFilter) aVar).setTextureContainer(this.h);
}
}
}
public void a(Collection<ImageFilter> collection) {
for (ImageFilter imageFilter : collection) {
this.d.put(Integer.valueOf(imageFilter.getLayer()), imageFilter);
}
}
public void a(o[] oVarArr, boolean z) {
int i = -99;
if (!z) {
i = oVarArr[0].b;
}
int i2 = i;
o oVar = new o(oVarArr[0]);
if (!(oVarArr[1] == null || oVarArr[1].b == i2)) {
oVarArr[1].b();
}
oVarArr[1] = new o(oVarArr[0]);
o[] oVarArr2 = new o[]{oVar, oVarArr[1]};
for (a a : this.d.values()) {
a.a(oVarArr2, oVarArr2[0].b != i2, this.a);
oVarArr2[0].a(oVarArr2[1]);
}
oVarArr[1].a(oVarArr2[0]);
if (!(oVarArr2[1] == null || oVarArr2[1].b == i2 || oVarArr2[1].b == oVarArr[1].b)) {
oVarArr2[1].b();
}
if (oVarArr[0].b != i2 && oVarArr[0].b != oVarArr[1].b) {
oVarArr[0].b();
}
}
public int b() {
return this.f;
}
public synchronized boolean c() {
return this.e;
}
public Collection<ImageFilter> d() {
return !c() ? Collections.emptyList() : Collections.unmodifiableCollection(this.d.values());
}
void e() {
for (a aVar : this.d.values()) {
if (aVar.isEnabled()) {
aVar.a = this.b;
aVar.b = this.c;
aVar.a();
}
}
this.b = false;
}
void f() {
for (a aVar : this.d.values()) {
if (aVar.isEnabled()) {
aVar.b();
}
}
}
public String g() {
String str = BuildConfig.FLAVOR;
Iterator it = this.d.values().iterator();
while (true) {
String str2 = str;
if (!it.hasNext()) {
return str2;
}
a aVar = (a) it.next();
str = a(aVar, str2, aVar.d());
}
}
public String h() {
String str = BuildConfig.FLAVOR;
Iterator it = this.d.values().iterator();
while (true) {
String str2 = str;
if (!it.hasNext()) {
return str2;
}
a aVar = (a) it.next();
str = a(aVar, str2, aVar.e());
}
}
public String i() {
String str = BuildConfig.FLAVOR;
Iterator it = this.d.values().iterator();
while (true) {
String str2 = str;
if (!it.hasNext()) {
return str2;
}
a aVar = (a) it.next();
str = a(aVar, str2, aVar.f());
}
}
public String j() {
String str = BuildConfig.FLAVOR;
Iterator it = this.d.values().iterator();
while (true) {
String str2 = str;
if (!it.hasNext()) {
return str2;
}
a aVar = (a) it.next();
str = a(aVar, str2, a(aVar.getLayer() + 1, aVar.g()));
}
}
String k() {
String str = BuildConfig.FLAVOR;
Iterator it = this.d.values().iterator();
while (true) {
String str2 = str;
if (!it.hasNext()) {
return str2;
}
a aVar = (a) it.next();
str = a(aVar, str2, b(aVar.getLayer() + 1));
}
}
public void l() {
for (a aVar : this.d.values()) {
if (aVar.isEnabled()) {
aVar.h();
}
}
}
}
|
[
"liming@droi.com"
] |
liming@droi.com
|
e39d00d88bba74fd6212b5f0f5035bafe81a2b94
|
73458087c9a504dedc5acd84ecd63db5dfcd5ca1
|
/src/jcifs/dcerpc/DcerpcBinding.java
|
2abd9dc297446b32b6f193917f11d16b02bf73c0
|
[] |
no_license
|
jtap60/com.estr
|
99ff2a6dd07b02b41a9cc3c1d28bb6545e68fb27
|
8b70bf2da8b24c7cef5973744e6054ef972fc745
|
refs/heads/master
| 2020-04-14T02:12:20.424436
| 2018-12-30T10:56:45
| 2018-12-30T10:56:45
| 163,578,360
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,638
|
java
|
package jcifs.dcerpc;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;
import jcifs.dcerpc.msrpc.lsarpc;
import jcifs.dcerpc.msrpc.netdfs;
import jcifs.dcerpc.msrpc.samr;
import jcifs.dcerpc.msrpc.srvsvc;
public class DcerpcBinding
{
private static HashMap INTERFACES = new HashMap();
String endpoint = null;
int major;
int minor;
HashMap options = null;
String proto;
String server;
UUID uuid = null;
static
{
INTERFACES.put("srvsvc", srvsvc.getSyntax());
INTERFACES.put("lsarpc", lsarpc.getSyntax());
INTERFACES.put("samr", samr.getSyntax());
INTERFACES.put("netdfs", netdfs.getSyntax());
}
DcerpcBinding(String paramString1, String paramString2)
{
proto = paramString1;
server = paramString2;
}
public static void addInterface(String paramString1, String paramString2)
{
INTERFACES.put(paramString1, paramString2);
}
Object getOption(String paramString)
{
if (paramString.equals("endpoint")) {
return endpoint;
}
if (options != null) {
return options.get(paramString);
}
return null;
}
void setOption(String paramString, Object paramObject)
{
if (paramString.equals("endpoint"))
{
endpoint = paramObject.toString().toLowerCase();
if (endpoint.startsWith("\\pipe\\"))
{
paramString = (String)INTERFACES.get(endpoint.substring(6));
if (paramString != null)
{
int i = paramString.indexOf(':');
int j = paramString.indexOf('.', i + 1);
uuid = new UUID(paramString.substring(0, i));
major = Integer.parseInt(paramString.substring(i + 1, j));
minor = Integer.parseInt(paramString.substring(j + 1));
return;
}
}
throw new DcerpcException("Bad endpoint: " + endpoint);
}
if (options == null) {
options = new HashMap();
}
options.put(paramString, paramObject);
}
public String toString()
{
String str = proto + ":" + server + "[" + endpoint;
Object localObject1 = str;
if (options != null)
{
Iterator localIterator = options.keySet().iterator();
for (;;)
{
localObject1 = str;
if (!localIterator.hasNext()) {
break;
}
localObject1 = localIterator.next();
Object localObject2 = options.get(localObject1);
str = str + "," + localObject1 + "=" + localObject2;
}
}
return (String)localObject1 + "]";
}
}
/* Location:
* Qualified Name: jcifs.dcerpc.DcerpcBinding
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
baf6800de9f1fcf90b0657b32a77b432df905fbd
|
af028c3aeccc7e24244c7258f0044ff392378ebf
|
/src/test/java/com/bdi/fondation/web/rest/UserJWTControllerIntTest.java
|
47ba9835e2cda3d69502575c29402691f8359577
|
[] |
no_license
|
BulkSecurityGeneratorProject/TastFondation
|
3da9a92eade4ef565ad9d12d538535b3b728ee28
|
75ef2596294252052062056489fb922b3f2e1765
|
refs/heads/master
| 2022-12-16T19:31:12.666472
| 2018-05-27T01:00:13
| 2018-05-27T01:00:13
| 296,554,262
| 0
| 0
| null | 2020-09-18T08:00:28
| 2020-09-18T08:00:27
| null |
UTF-8
|
Java
| false
| false
| 4,869
|
java
|
package com.bdi.fondation.web.rest;
import com.bdi.fondation.TastFondationApp;
import com.bdi.fondation.domain.User;
import com.bdi.fondation.repository.UserRepository;
import com.bdi.fondation.security.jwt.TokenProvider;
import com.bdi.fondation.web.rest.vm.LoginVM;
import com.bdi.fondation.web.rest.errors.ExceptionTranslator;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.transaction.annotation.Transactional;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header;
import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.Matchers.isEmptyString;
import static org.hamcrest.Matchers.not;
/**
* Test class for the UserJWTController REST controller.
*
* @see UserJWTController
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = TastFondationApp.class)
public class UserJWTControllerIntTest {
@Autowired
private TokenProvider tokenProvider;
@Autowired
private AuthenticationManager authenticationManager;
@Autowired
private UserRepository userRepository;
@Autowired
private PasswordEncoder passwordEncoder;
@Autowired
private ExceptionTranslator exceptionTranslator;
private MockMvc mockMvc;
@Before
public void setup() {
UserJWTController userJWTController = new UserJWTController(tokenProvider, authenticationManager);
this.mockMvc = MockMvcBuilders.standaloneSetup(userJWTController)
.setControllerAdvice(exceptionTranslator)
.build();
}
@Test
@Transactional
public void testAuthorize() throws Exception {
User user = new User();
user.setLogin("user-jwt-controller");
user.setEmail("user-jwt-controller@example.com");
user.setActivated(true);
user.setPassword(passwordEncoder.encode("test"));
userRepository.saveAndFlush(user);
LoginVM login = new LoginVM();
login.setUsername("user-jwt-controller");
login.setPassword("test");
mockMvc.perform(post("/api/authenticate")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(login)))
.andExpect(status().isOk())
.andExpect(jsonPath("$.id_token").isString())
.andExpect(jsonPath("$.id_token").isNotEmpty())
.andExpect(header().string("Authorization", not(nullValue())))
.andExpect(header().string("Authorization", not(isEmptyString())));
}
@Test
@Transactional
public void testAuthorizeWithRememberMe() throws Exception {
User user = new User();
user.setLogin("user-jwt-controller-remember-me");
user.setEmail("user-jwt-controller-remember-me@example.com");
user.setActivated(true);
user.setPassword(passwordEncoder.encode("test"));
userRepository.saveAndFlush(user);
LoginVM login = new LoginVM();
login.setUsername("user-jwt-controller-remember-me");
login.setPassword("test");
login.setRememberMe(true);
mockMvc.perform(post("/api/authenticate")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(login)))
.andExpect(status().isOk())
.andExpect(jsonPath("$.id_token").isString())
.andExpect(jsonPath("$.id_token").isNotEmpty())
.andExpect(header().string("Authorization", not(nullValue())))
.andExpect(header().string("Authorization", not(isEmptyString())));
}
@Test
@Transactional
public void testAuthorizeFails() throws Exception {
LoginVM login = new LoginVM();
login.setUsername("wrong-user");
login.setPassword("wrong password");
mockMvc.perform(post("/api/authenticate")
.contentType(TestUtil.APPLICATION_JSON_UTF8)
.content(TestUtil.convertObjectToJsonBytes(login)))
.andExpect(status().isUnauthorized())
.andExpect(jsonPath("$.id_token").doesNotExist())
.andExpect(header().doesNotExist("Authorization"));
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
23297342f6fa19b07fcf8bc966c43ea76803852d
|
2a3f19a4a2b91d9d715378aadb0b1557997ffafe
|
/sources/org/acra/CrashReportFileNameParser.java
|
9beee54cdf5788d589015efd8e46c550f29c6270
|
[] |
no_license
|
amelieko/McDonalds-java
|
ce5062f863f7f1cbe2677938a67db940c379d0a9
|
2fe00d672caaa7b97c4ff3acdb0e1678669b0300
|
refs/heads/master
| 2022-01-09T22:10:40.360630
| 2019-04-21T14:47:20
| 2019-04-21T14:47:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 385
|
java
|
package org.acra;
final class CrashReportFileNameParser {
CrashReportFileNameParser() {
}
public final boolean isSilent(String reportFileName) {
return reportFileName.contains(ACRAConstants.SILENT_SUFFIX);
}
public final boolean isApproved(String reportFileName) {
return isSilent(reportFileName) || reportFileName.contains("-approved");
}
}
|
[
"makfc1234@gmail.com"
] |
makfc1234@gmail.com
|
5a0fb066272b30dac728f9671e5f806e0f0e58ff
|
99c7920038f551b8c16e472840c78afc3d567021
|
/aliyun-java-sdk-dataworks-public-v5/src/main/java/com/aliyuncs/v5/dataworks_public/model/v20200518/ListConnectionsRequest.java
|
0b481ec87d8562cb56b03b19962f21c4bdfbda49
|
[
"Apache-2.0"
] |
permissive
|
aliyun/aliyun-openapi-java-sdk-v5
|
9fa211e248b16c36d29b1a04662153a61a51ec88
|
0ece7a0ba3730796e7a7ce4970a23865cd11b57c
|
refs/heads/master
| 2023-03-13T01:32:07.260745
| 2021-10-18T08:07:02
| 2021-10-18T08:07:02
| 263,800,324
| 4
| 2
|
NOASSERTION
| 2022-05-20T22:01:22
| 2020-05-14T02:58:50
|
Java
|
UTF-8
|
Java
| false
| false
| 3,420
|
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.v5.dataworks_public.model.v20200518;
import com.aliyuncs.v5.RpcAcsRequest;
import com.aliyuncs.v5.http.MethodType;
import com.aliyuncs.v5.dataworks_public.Endpoint;
/**
* @author auto create
* @version
*/
public class ListConnectionsRequest extends RpcAcsRequest<ListConnectionsResponse> {
private Integer pageNumber;
private String subType;
private String name;
private Integer envType;
private Integer pageSize;
private String connectionType;
private Long projectId;
private String status;
public ListConnectionsRequest() {
super("dataworks-public", "2020-05-18", "ListConnections", "dide");
setMethod(MethodType.GET);
try {
com.aliyuncs.v5.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap);
com.aliyuncs.v5.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType);
} catch (Exception e) {}
}
public Integer getPageNumber() {
return this.pageNumber;
}
public void setPageNumber(Integer pageNumber) {
this.pageNumber = pageNumber;
if(pageNumber != null){
putQueryParameter("PageNumber", pageNumber.toString());
}
}
public String getSubType() {
return this.subType;
}
public void setSubType(String subType) {
this.subType = subType;
if(subType != null){
putQueryParameter("SubType", subType);
}
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
if(name != null){
putQueryParameter("Name", name);
}
}
public Integer getEnvType() {
return this.envType;
}
public void setEnvType(Integer envType) {
this.envType = envType;
if(envType != null){
putQueryParameter("EnvType", envType.toString());
}
}
public Integer getPageSize() {
return this.pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
if(pageSize != null){
putQueryParameter("PageSize", pageSize.toString());
}
}
public String getConnectionType() {
return this.connectionType;
}
public void setConnectionType(String connectionType) {
this.connectionType = connectionType;
if(connectionType != null){
putQueryParameter("ConnectionType", connectionType);
}
}
public Long getProjectId() {
return this.projectId;
}
public void setProjectId(Long projectId) {
this.projectId = projectId;
if(projectId != null){
putQueryParameter("ProjectId", projectId.toString());
}
}
public String getStatus() {
return this.status;
}
public void setStatus(String status) {
this.status = status;
if(status != null){
putQueryParameter("Status", status);
}
}
@Override
public Class<ListConnectionsResponse> getResponseClass() {
return ListConnectionsResponse.class;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
43964cce177476b7ac3f6a8a973dafeba3ef7e5c
|
4c6adf0ce6ef3f02dcef9c345e0e5e4ff139d886
|
/Common/FO/fo-jar/fo-withdraw/src/main/java/com/pay/fundout/withdraw/dao/ruleconfig/impl/BatchRuleConfigDAOImpl.java
|
65c2b68889dccf657d5c0431c458788423227e29
|
[] |
no_license
|
happyjianguo/pay-1
|
8631906be62707316f0ed3eb6b2337c90d213bc0
|
40ae79738cfe4e5d199ca66468f3a33e9d8f2007
|
refs/heads/master
| 2020-07-27T19:51:54.958859
| 2016-12-19T07:34:24
| 2016-12-19T07:34:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,126
|
java
|
/**
* File: WithDrawRuleConfigDaoImpl.java
* Description:
* Copyright 2010 -2010 pay Corporation. All rights reserved.
* 2010-9-16 darv Changes
*
*
*/
package com.pay.fundout.withdraw.dao.ruleconfig.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.pay.fundout.withdraw.dao.ruleconfig.BatchRuleConfigDAO;
import com.pay.fundout.withdraw.dto.ruleconfig.RuleConfigQueryDTO;
import com.pay.fundout.withdraw.model.ruleconfig.BatchRuleConfig;
import com.pay.inf.dao.Page;
import com.pay.inf.dao.impl.BaseDAOImpl;
/**
* @author darv
*
*/
public class BatchRuleConfigDAOImpl extends BaseDAOImpl implements
BatchRuleConfigDAO {
@Override
public long createBatchRuleConfig(BatchRuleConfig batchRuleConfig) {
this.create("create", batchRuleConfig);
return batchRuleConfig.getSequenceId();
}
@Override
public Long getSeqId() {
return (Long) this.getSqlMapClientTemplate().queryForObject(
namespace.concat("getSeqId"));
}
@SuppressWarnings("unchecked")
@Override
public List getBatchRuleConfigList() {
return this.getSqlMapClientTemplate().queryForList(
namespace.concat("findBatchRuleConfigList"));
}
@Override
public Page<RuleConfigQueryDTO> getRuleConfigList(
Page<RuleConfigQueryDTO> page, Map params) {
return (Page<RuleConfigQueryDTO>) findByQuery("getRuleConfigList",
page, params);
}
@Override
public RuleConfigQueryDTO getRuleConfigById(Long sequenceId) {
return (RuleConfigQueryDTO) getSqlMapClientTemplate().queryForObject(
namespace.concat("getRuleConfigById"), sequenceId);
}
@Override
public void updateRuleConfigById(BatchRuleConfig ruleConfig) {
this.update(ruleConfig);
}
/**
* 通过时间配置ID获得有效的规则
*
* @param timeId
* @return
*/
@SuppressWarnings("unchecked")
@Override
public List<BatchRuleConfig> getBatchRuleByTimeId(Long timeId) {
Map<String, Object> params = new HashMap();
params.put("batchTimeConfId", timeId);
params.put("status", 1);
return getSqlMapClientTemplate().queryForList(
namespace.concat("findBySelective"), params);
}
}
|
[
"stanley.zou@hrocloud.com"
] |
stanley.zou@hrocloud.com
|
8d8114d1cedb8c04541eddf08f14076c079c6354
|
0ca3fb706c62745f674f4f9234c7200a3ebf5f70
|
/BigApp/BigApps/src/com/example/bigapps/horizonlist/HorizonListActivity3.java
|
86c359d13bfe36972e7f678b3edcf39e80632c41
|
[] |
no_license
|
YC-YC/TestApplications
|
3205084fb6da5f73fce42a03777faf3ecc512eb1
|
b15f7d874e7356fc6c69697d5f1ab1fe2d7e2131
|
refs/heads/master
| 2020-05-30T07:19:30.702952
| 2017-04-20T08:11:30
| 2017-04-20T08:11:30
| 68,898,780
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,000
|
java
|
/**
*
*/
package com.example.bigapps.horizonlist;
import java.util.ArrayList;
import java.util.List;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Toast;
import com.example.bigapps.R;
import com.example.bigapps.horizonlist.MyHorizontalScollView.CurrentImageChangeListener;
import com.example.bigapps.horizonlist.MyHorizontalScollView.OnItemClickListener;
/**
* @author YC
* @time 2016-3-29 上午9:22:35
*/
public class HorizonListActivity3 extends Activity {
private static final String TAG = "HorizonListActivity";
private List<CityItem> cityList;
private MyHorizontalScollView mHorizontalScollView;
private HorizontalScrollViewAdapter mAdapter;
private LayoutInflater mInflater;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mInflater = LayoutInflater.from(this);
setContentView(R.layout.main_horizonlist3);
setData();
initViews();
}
private void initViews() {
mHorizontalScollView = (MyHorizontalScollView) findViewById(R.id.id_horizontalscollview);
mAdapter = new HorizontalScrollViewAdapter(this, cityList);
mHorizontalScollView.setAdapter(mAdapter);
mHorizontalScollView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onClick(View view, int pos) {
Toast.makeText(getApplicationContext(), "点击了第" + pos +"项", Toast.LENGTH_SHORT).show();
}
});
mHorizontalScollView.setCurrentImageChangeListener(new CurrentImageChangeListener() {
@SuppressLint("NewApi")
@Override
public void onCurrentImgChanged(int position, View viewIndicator) {
Log.i(TAG, "第一个显示项是" + position);
// viewIndicator.setScaleX(2.5f);
// viewIndicator.setScaleY(2.5f);
viewIndicator.setBackgroundResource(R.drawable.ic_launcher);
}
});
}
private void setData() {
cityList = new ArrayList<CityItem>();
CityItem item = new CityItem("深圳", "0755", R.drawable.china);
cityList.add(item);
item = new CityItem("上海", "021", R.drawable.china);
cityList.add(item);
item = new CityItem("广州", "020", R.drawable.china);
cityList.add(item);
item = new CityItem("北京", "010", R.drawable.china);
cityList.add(item);
item = new CityItem("武汉", "027", R.drawable.china);
cityList.add(item);
item = new CityItem("孝感", "0712", R.drawable.china);
cityList.add(item);
cityList.addAll(cityList);
}
public class CityItem {
private String cityName;
private String cityCode;
private int imgID;
public CityItem(String cityName, String cityCode, int imgID) {
super();
this.cityName = cityName;
this.cityCode = cityCode;
this.imgID = imgID;
}
public String getCityName() {
return cityName;
}
public String getCityCode() {
return cityCode;
}
public int getImgID() {
return imgID;
}
}
}
|
[
"yellowc.yc@aliyun.com"
] |
yellowc.yc@aliyun.com
|
06ad552cc67da3939c144b4f640f139e7dfad310
|
f9c637ab9501b0a68fa0d18a061cbd555abf1f79
|
/test/import-data/KafkaSparkProducer/src/com/adr/bigdata/dataimport/logic/impl/docgen/DocGenerationJobFactory.java
|
266613e6e807407832a8d6a6f1b921e0569fb077
|
[] |
no_license
|
minha361/leanHTMl
|
c05000a6447b31f7869b75c532695ca2b0cd6968
|
dc760e7d149480c0b36f3c7064b97d0f3d4b3872
|
refs/heads/master
| 2022-06-01T02:54:46.048064
| 2020-08-11T03:20:34
| 2020-08-11T03:20:34
| 48,735,593
| 0
| 0
| null | 2022-05-20T20:49:57
| 2015-12-29T07:55:48
|
Java
|
UTF-8
|
Java
| false
| false
| 1,116
|
java
|
package com.adr.bigdata.dataimport.logic.impl.docgen;
import java.io.Serializable;
import org.apache.spark.SparkConf;
public final class DocGenerationJobFactory implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
public static DocGenerationJob getDocGenerationJob(int type) {
switch (type) {
case 1:
return new BrandDocGenerationJob();
case 2:
return new CategoryDocGenerationJob();
case 3:
//return new AttributeDocGenerationJob();
throw new IllegalArgumentException("Type AttributeDocGenerationJob no longer supported " + type);
case 4:
return new AttributeValueDocGenerationJob();
case 5:
return new MerchantDocGenerationJob();
case 6:
return new WarehouseDocGenerationJob();
case 7:
return new PromotionDocGenerationJob();
case 8:
return new PromotionProductItemMappingDocGenerationJob();
case 9:
return new WarehouseProductItemMappingDocGenerationJob();
case 10:
return new ProductItemDocGenerationJob();
default:
throw new IllegalArgumentException("Type not supported " + type);
}
}
}
|
[
"v.minhlq2@adayroi.com"
] |
v.minhlq2@adayroi.com
|
f0dd55090728442f8f304bce75dd83b9eb7248b3
|
51b7aa8ca8dedd69039d17959701bec7cd99a4c1
|
/http-client-spi/src/main/java/software/amazon/awssdk/http/async/SdkAsyncHttpClientFactory.java
|
a946adad8798cd9dea746bafb07aac9cd50a0281
|
[
"Apache-2.0"
] |
permissive
|
MatteCarra/aws-sdk-java-v2
|
41d711ced0943fbd6b5a709e50f78b6564b5ed21
|
af9fb86db6715b1dbea79028aa353292559d5876
|
refs/heads/master
| 2021-06-30T05:21:08.988292
| 2017-09-18T15:33:38
| 2017-09-18T15:33:38
| 103,685,332
| 0
| 1
| null | 2017-09-15T17:45:50
| 2017-09-15T17:45:50
| null |
UTF-8
|
Java
| false
| false
| 1,449
|
java
|
/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package software.amazon.awssdk.http.async;
import software.amazon.awssdk.http.SdkHttpConfigurationOption;
import software.amazon.awssdk.utils.AttributeMap;
/**
* Interface for creating an {@link SdkAsyncHttpClient} with service specific defaults applied.
*
* <p>Implementations must be thread safe.</p>
*/
public interface SdkAsyncHttpClientFactory {
/**
* Create an {@link SdkAsyncHttpClient} with service specific defaults applied. Applying service defaults is optional
* and some options may not be supported by a particular implementation.
*
* @param serviceDefaults Service specific defaults. Keys will be one of the constants defined in
* {@link SdkHttpConfigurationOption}.
* @return Created client
*/
SdkAsyncHttpClient createHttpClientWithDefaults(AttributeMap serviceDefaults);
}
|
[
"millem@amazon.com"
] |
millem@amazon.com
|
4f5c73f25ec6a390f423a8dbe369886a3511e9c2
|
eb612e4e13f8df44e8dd45716e0fe0977ef4354b
|
/src/com/ibaguo/nlp/corpus/dictionary/item/SimpleItem.java
|
4072f7a402a368323415f381cb520874cb14688d
|
[
"Apache-2.0"
] |
permissive
|
Growingluffy/mqa
|
295d3b2502363cc7b20961c34f5544783a6acb71
|
26c4254175ff0a626296f70fbdb57966e7924459
|
refs/heads/master
| 2020-05-04T17:52:04.734222
| 2016-01-22T08:57:44
| 2016-01-22T08:57:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,985
|
java
|
package com.ibaguo.nlp.corpus.dictionary.item;
import java.util.*;
public class SimpleItem
{
public Map<String, Integer> labelMap;
public SimpleItem()
{
labelMap = new TreeMap<String, Integer>();
}
public void addLabel(String label)
{
Integer frequency = labelMap.get(label);
if (frequency == null)
{
frequency = 1;
}
else
{
++frequency;
}
labelMap.put(label, frequency);
}
public void addLabel(String label, Integer frequency)
{
Integer innerFrequency = labelMap.get(label);
if (innerFrequency == null)
{
innerFrequency = frequency;
}
else
{
innerFrequency += frequency;
}
labelMap.put(label, innerFrequency);
}
public boolean containsLabel(String label)
{
return labelMap.containsKey(label);
}
public int getFrequency(String label)
{
Integer frequency = labelMap.get(label);
if (frequency == null) return 0;
return frequency;
}
@Override
public String toString()
{
final StringBuilder sb = new StringBuilder();
ArrayList<Map.Entry<String, Integer>> entries = new ArrayList<Map.Entry<String, Integer>>(labelMap.entrySet());
Collections.sort(entries, new Comparator<Map.Entry<String, Integer>>()
{
@Override
public int compare(Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2)
{
return -o1.getValue().compareTo(o2.getValue());
}
});
for (Map.Entry<String, Integer> entry : entries)
{
sb.append(entry.getKey());
sb.append(' ');
sb.append(entry.getValue());
sb.append(' ');
}
return sb.toString();
}
public static SimpleItem create(String param)
{
if (param == null) return null;
String[] array = param.split(" ");
return create(array);
}
public static SimpleItem create(String param[])
{
if (param.length % 2 == 1) return null;
SimpleItem item = new SimpleItem();
int natureCount = (param.length) / 2;
for (int i = 0; i < natureCount; ++i)
{
item.labelMap.put(param[2 * i], Integer.parseInt(param[1 + 2 * i]));
}
return item;
}
public void combine(SimpleItem other)
{
for (Map.Entry<String, Integer> entry : other.labelMap.entrySet())
{
addLabel(entry.getKey(), entry.getValue());
}
}
public int getTotalFrequency()
{
int frequency = 0;
for (Integer f : labelMap.values())
{
frequency += f;
}
return frequency;
}
public String getMostLikelyLabel()
{
return labelMap.entrySet().iterator().next().getKey();
}
}
|
[
"thyferny@163.com"
] |
thyferny@163.com
|
257a6283aa4b96e13eadfd05787aea78be2d4e7d
|
716b231c89805b3e1217c6fc0a4ff9fbcdcdb688
|
/train-order-service/src/com/l9e/transaction/dao/PassengerDao.java
|
7cf1e64147ba6601a4d61110377a4900d927b8f5
|
[] |
no_license
|
d0l1u/train_ticket
|
32b831e441e3df73d55559bc416446276d7580be
|
c385cb36908f0a6e9e4a6ebb9b3ad737edb664d7
|
refs/heads/master
| 2020-06-14T09:00:34.760326
| 2019-07-03T00:30:46
| 2019-07-03T00:30:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 348
|
java
|
package com.l9e.transaction.dao;
import java.util.List;
import java.util.Map;
import com.l9e.transaction.vo.Passenger;
/**
* 乘客-车票信息持久
* @author licheng
*
*/
public interface PassengerDao {
/**
* 查询乘客-车票信息
* @param params
* @return
*/
List<Passenger> selectPassenger(Map<String, Object> params);
}
|
[
"meizs"
] |
meizs
|
0f7f059284036c9aed47bc41eae350add5b83e4b
|
cbb75ebbee3fb80a5e5ad842b7a4bb4a5a1ec5f5
|
/org/apache/http/conn/params/ConnManagerPNames.java
|
342e66032fb29dcb69609bcb3a84866bd5fb62b6
|
[] |
no_license
|
killbus/jd_decompile
|
9cc676b4be9c0415b895e4c0cf1823e0a119dcef
|
50c521ce6a2c71c37696e5c131ec2e03661417cc
|
refs/heads/master
| 2022-01-13T03:27:02.492579
| 2018-05-14T11:21:30
| 2018-05-14T11:21:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 371
|
java
|
package org.apache.http.conn.params;
@Deprecated
/* compiled from: TbsSdkJava */
public interface ConnManagerPNames {
public static final String MAX_CONNECTIONS_PER_ROUTE = "http.conn-manager.max-per-route";
public static final String MAX_TOTAL_CONNECTIONS = "http.conn-manager.max-total";
public static final String TIMEOUT = "http.conn-manager.timeout";
}
|
[
"13511577582@163.com"
] |
13511577582@163.com
|
7b3129687a3003dd76e427bf2e93e28869b5283e
|
a59ac307b503ff470e9be5b1e2927844eff83dbe
|
/wheatfield/branches/rkylin-wheatfield-HBDH/wheatfield/src/main/java/com/rkylin/wheatfield/task/WithholdTask.java
|
698691f7facee9e45ce1f364d501300b35500664
|
[] |
no_license
|
yangjava/kylin-wheatfield
|
2cc82ee9e960543264b1cfc252f770ba62669e05
|
4127cfca57a332d91f8b2ae1fe1be682b9d0f5fc
|
refs/heads/master
| 2020-12-02T22:07:06.226674
| 2017-07-03T07:59:15
| 2017-07-03T07:59:15
| 96,085,446
| 0
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,706
|
java
|
package com.rkylin.wheatfield.task;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import com.rkylin.common.RedisIdGenerator;
import com.rkylin.utils.RkylinMailUtil;
import com.rkylin.wheatfield.common.DateUtils;
import com.rkylin.wheatfield.constant.Constants;
import com.rkylin.wheatfield.constant.SettleConstants;
import com.rkylin.wheatfield.constant.TransCodeConst;
import com.rkylin.wheatfield.exception.AccountException;
import com.rkylin.wheatfield.manager.AccountInfoManager;
import com.rkylin.wheatfield.manager.TransDaysSummaryManager;
import com.rkylin.wheatfield.manager.TransOrderInfoManager;
import com.rkylin.wheatfield.service.GenerationPaymentService;
import com.rkylin.wheatfield.service.OperationServive;
import com.rkylin.wheatfield.service.PaymentAccountService;
import com.rkylin.wheatfield.service.SettlementServiceThr;
import com.rkylin.wheatfield.settlement.SettlementLogic;
import com.rkylin.wheatfield.utils.DateUtil;
public class WithholdTask {
@Autowired
TransOrderInfoManager transOrderInfoManager;
@Autowired
GenerationPaymentService generationPaymentService;
@Autowired
PaymentAccountService paymentAccountService;
@Autowired
OperationServive operationServive;
@Autowired
TransDaysSummaryManager transDaysSummaryManager;
@Autowired
RedisIdGenerator redisIdGenerator;
@Autowired
AccountInfoManager accountInfoManager;
@Autowired
SettlementServiceThr settlementServiceThr;
@Autowired
SettlementLogic settlementLogic;
DateUtil dateUtil=new DateUtil();
/** 日志对象 */
private static final Logger logger = LoggerFactory.getLogger(WithdrawTask.class);
/**
* 会堂代付
*/
public void withholdHT(){
settlementServiceThr.paymentGeneration(
TransCodeConst.PAYMENT_WITHHOLD, Constants.HT_ID,
SettleConstants.ORDER_WITHHOLD,
SettleConstants.WITHHOLD_BATCH_CODE,1);
// SettleConstants.WITHHOLD_BATCH_CODE_OLD,1);
settlementServiceThr.paymentGeneration(
TransCodeConst.PAYMENT_WITHHOLD, Constants.HT_CLOUD_ID,
SettleConstants.ORDER_WITHHOLD,
SettleConstants.WITHHOLD_BATCH_CODE,1);
// SettleConstants.WITHHOLD_BATCH_CODE_OLD,1);
}
/**
* 会堂T+0代付
* @throws ParseException
*/
public void withholdHTT0() throws ParseException{
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
Date date0903 = sdf.parse("2015-09-03");
Date date0904 = sdf.parse("2015-09-04");
Date dateCur = sdf.parse(sdf.format(new Date()));
if(dateCur.compareTo(date0903)!=0 && dateCur.compareTo(date0904)!=0){
settlementServiceThr.paymentGeneration(
TransCodeConst.PAYMENT_WITHHOLD, Constants.HT_ID,
SettleConstants.ORDER_WITHHOLD,
// SettleConstants.WITHHOLD_BATCH_CODE_OLD,0);
SettleConstants.WITHHOLD_BATCH_CODE,0);
settlementServiceThr.paymentGeneration(
TransCodeConst.PAYMENT_WITHHOLD, Constants.HT_CLOUD_ID,
SettleConstants.ORDER_WITHHOLD,
// SettleConstants.WITHHOLD_BATCH_CODE_OLD,0);
SettleConstants.WITHHOLD_BATCH_CODE,0);
//生成会唐代付文件并上传
try {
String accountDate=generationPaymentService.getAccountDate();
String batch=settlementLogic.getBatchNo(DateUtils.getAccountDate(Constants.DATE_FORMAT_YYYYMMDD, accountDate),SettleConstants.ROP_PAYMENT_BATCH_CODE, Constants.HT_ID);
logger.info("-------会堂T+0代付批次号------"+batch);
// generationPaymentService.uploadPaymentFile(7,batch, Constants.HT_ID,DateUtils.getDate(accountDate, Constants.DATE_FORMAT_YYYYMMDD));
generationPaymentService.submitToRecAndPaySys(7,Constants.HT_ID,accountDate,DateUtils.getDate(accountDate, Constants.DATE_FORMAT_YYYYMMDD));
} catch (AccountException e) {
logger.error("生成会堂T+0代付提交到代收付失败"+e.getMessage());
RkylinMailUtil.sendMailThread("会堂T+0代付提交到代收付", "生成会堂T+0提交到代收付失败"+e.getMessage(), TransCodeConst.GENERATION_PAY_ERROR_TOEMAIL);
}
}
}
/**
* 课栈代付
*/
public void withholdKZ(){
settlementServiceThr.paymentGeneration(
TransCodeConst.PAYMENT_WITHHOLD, Constants.KZ_ID,
SettleConstants.ORDER_WITHHOLD,
SettleConstants.WITHHOLD_CODE,1);
// SettleConstants.WITHHOLD_CODE_OLD,1);
}
/**
* 君融贷代付
*/
public void withholdJRD(){
settlementServiceThr.paymentGeneration(
TransCodeConst.PAYMENT_WITHHOLD, Constants.JRD_ID,
SettleConstants.ORDER_WITHHOLD,
SettleConstants.WITHHOLD_CODE,1);
// SettleConstants.WITHHOLD_CODE_OLD,1);
}
/**
* 棉庄代付
*/
public void withholdMZ(){
settlementServiceThr.paymentGeneration(
TransCodeConst.PAYMENT_WITHHOLD, Constants.MZ_ID,
SettleConstants.ORDER_WITHHOLD,
SettleConstants.WITHHOLD_CODE,1);
// SettleConstants.WITHHOLD_CODE_OLD,1);
}
/**
* 食全食美代付
*/
public void withholdSQSM(){
settlementServiceThr.paymentGeneration(
TransCodeConst.PAYMENT_WITHHOLD, Constants.SQSM_ID,
SettleConstants.ORDER_WITHHOLD,
// SettleConstants.WITHHOLD_CODE_OLD,1);
SettleConstants.WITHHOLD_CODE,1);
}
/**
* 展酷代付
*/
public void withholdZk(){
settlementServiceThr.paymentGeneration(
TransCodeConst.PAYMENT_WITHHOLD, Constants.ZK_ID,
SettleConstants.ORDER_WITHHOLD,
// SettleConstants.WITHHOLD_CODE_OLD,1);
SettleConstants.WITHHOLD_CODE,1);
}
// /**
// * 通信运维代付汇总
// */
public void withholdTXYW(){
settlementServiceThr.paymentGeneration(
TransCodeConst.PAYMENT_WITHHOLD, Constants.TXYW_ID,
SettleConstants.ORDER_WITHHOLD,
SettleConstants.WITHHOLD_CODE,1);
}
}
|
[
"yangjava@users.noreply.github.com"
] |
yangjava@users.noreply.github.com
|
bc1b8dd0017d6f0ad87dd15497cb9db4882f5a0b
|
139960e2d7d55e71c15e6a63acb6609e142a2ace
|
/mobile_app1/module1276/src/main/java/module1276packageJava0/Foo0.java
|
1bb96ec47138ec0b68cb1c367efb72f023566fd3
|
[
"Apache-2.0"
] |
permissive
|
uber-common/android-build-eval
|
448bfe141b6911ad8a99268378c75217d431766f
|
7723bfd0b9b1056892cef1fef02314b435b086f2
|
refs/heads/master
| 2023-02-18T22:25:15.121902
| 2023-02-06T19:35:34
| 2023-02-06T19:35:34
| 294,831,672
| 83
| 7
|
Apache-2.0
| 2021-09-24T08:55:30
| 2020-09-11T23:27:37
|
Java
|
UTF-8
|
Java
| false
| false
| 1,283
|
java
|
package module1276packageJava0;
import java.lang.Integer;
public class Foo0 {
Integer int0;
Integer int1;
Integer int2;
public void foo0() {
new module778packageKt0.Foo0().foo5();
new module414packageJava0.Foo0().foo6();
new module114packageKt0.Foo0().foo3();
new module252packageJava0.Foo0().foo5();
new module273packageKt0.Foo0().foo7();
new module1244packageKt0.Foo0().foo4();
new module487packageJava0.Foo0().foo3();
new module466packageJava0.Foo0().foo4();
new module1102packageKt0.Foo0().foo5();
new leafModuleMaxpackageJava0.Foo0().foo1();
new module1139packageJava0.Foo0().foo1();
new module790packageKt0.Foo0().foo6();
new module873packageJava0.Foo0().foo7();
new module1084packageJava0.Foo0().foo7();
new module129packageJava0.Foo0().foo4();
new module940packageKt0.Foo0().foo11();
new module322packageKt0.Foo0().foo3();
new module355packageJava0.Foo0().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
public void foo6() {
foo5();
}
public void foo7() {
foo6();
}
public void foo8() {
foo7();
}
}
|
[
"oliviern@uber.com"
] |
oliviern@uber.com
|
90f44b2f1a377a85634e5a57e971e98be1db61f7
|
86fa67369e29c0086601fad2d5502322f539a321
|
/runtime/doovos/sites/sousse/sys/tmp/jjit/src/jjit/local/jnt/scimark2/Random/nextDoubles__D_V_9D9925F2/nextDoubles_023.java
|
a78ef774328b65902b85080e37a5ffdaa0f3c31f
|
[] |
no_license
|
thevpc/doovos
|
05a4ce98825bf3dbbdc7972c43cd15fc18afdabb
|
1ae822549a3a546381dbf3b722814e0be1002b11
|
refs/heads/master
| 2021-01-12T14:56:52.283641
| 2020-08-22T12:37:40
| 2020-08-22T12:37:40
| 72,081,680
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,076
|
java
|
package jjit.local.jnt.scimark2.Random.nextDoubles__D_V_9D9925F2;
import org.doovos.kernel.api.jvm.interpreter.*;
import org.doovos.kernel.api.jvm.interpreter.KFrame;
import org.doovos.kernel.api.jvm.reflect.KClass;
import org.doovos.kernel.api.jvm.reflect.KClassRepository;
import org.doovos.kernel.api.jvm.reflect.KField;
import org.doovos.kernel.api.memory.*;
import org.doovos.kernel.api.memory.KMemoryManager;
import org.doovos.kernel.api.memory.KRegister;
import org.doovos.kernel.api.process.KLocalThread;
import org.doovos.kernel.api.process.KProcess;
import org.doovos.kernel.vanilla.jvm.interpreter.jjit.instr.*;
import org.doovos.kernel.vanilla.jvm.interpreter.jjit.instr.JJITInstruction;
/**
* jnt.scimark2.Random
* nextDoubles([D)V
* [count=9] [135] ALOAD(1) [136] ILOAD(4) [137] ALOAD(0) [138] GETFIELD(jnt.scimark2.Random,dm1,D) [139] ILOAD(5) [140] I2D [141] DMUL [142] DASTORE [143] IINC(4,1)
*/
public final class nextDoubles_023 extends JJITAbstractInstruction implements Cloneable{
private KField c_dm1 = null;
private KClassRepository c_repo;
private KClass c_CRandom = null;
private KMemoryManager c_memman;
private JJITInstruction c_next;
public JJITInstruction run(KFrame frame) throws Exception {
// **REMOVED Unused Var** KRegister s0;
// **REMOVED Unused Var** KRegister s1;
// **REMOVED Unused Var** KRegister s2;
// **REMOVED Unused Var** KRegister s3;
// **REMOVED Unused Var** double m_d;
// **REMOVED Unused Var** int index = 0;
// **REMOVED Unused Var** double m_d2;
// this_ref 0 ; r=1/w=0 : NotCached
// local_1 1 ; r=1/w=0 : NotCached
// local_4 4 ; r=2/w=1 : Cached
int local_4 = frame.getLocal(4).intValue();
// local_5 5 ; r=1/w=0 : NotCached
// *********[135] ALOAD(1)
// **REMOVED Substitution** s0 = frame.getLocal(1);
// *********[136] ILOAD(4)
// **REMOVED Substitution** s1 = new KInteger(local_4);
// *********[137] ALOAD(0)
// **REMOVED Substitution** s2 = frame.getLocal(0);
// *********[138] GETFIELD(jnt.scimark2.Random,dm1,D)
// **REMOVED Substitution** s2 = new KDouble(c_dm1.getInstanceDouble(((KReference)frame.getLocal(0))));
// *********[139] ILOAD(5)
// **REMOVED Substitution** s3 = frame.getLocal(5);
// *********[140] I2D
// **REMOVED Substitution** s3 = new KDouble(frame.getLocal(5).intValue());
// *********[141] DMUL
// **REMOVED Substitution** m_d = frame.getLocal(5).doubleValue();
// **REMOVED Substitution** s2 = new KDouble((c_dm1.getInstanceDouble(((KReference)frame.getLocal(0))) * frame.getLocal(5).doubleValue()));
// *********[142] DASTORE
// **REMOVED Substitution** m_d2 = (c_dm1.getInstanceDouble(((KReference)frame.getLocal(0))) * frame.getLocal(5).doubleValue());
// **REMOVED Substitution** index = local_4;
c_memman.setDoubleArray(((KReference)frame.getLocal(1)),local_4,(c_dm1.getInstanceDouble(((KReference)frame.getLocal(0))) * frame.getLocal(5).doubleValue()));
// *********[143] IINC(4,1)
// **REMOVED Substitution** local_4 = (local_4 + 1);
frame.setLocal(4,new KInteger((local_4 + 1)));
return c_next;
}
public void init(int index,JJITInstruction[] instructions,KRegister[] constants,KProcess process) throws Exception {
// *********[135] ALOAD(1)
// *********[136] ILOAD(4)
// *********[137] ALOAD(0)
// *********[138] GETFIELD(jnt.scimark2.Random,dm1,D)
c_repo = process.getClassRepository();
c_CRandom = c_repo.getClassByName("jnt.scimark2.Random");
c_dm1 = c_CRandom.getField("dm1",true);
// *********[139] ILOAD(5)
// *********[140] I2D
// *********[141] DMUL
// *********[142] DASTORE
c_memman = process.getMemoryManager();
// *********[143] IINC(4,1)
c_next = instructions[(index + 1)];
}
}
|
[
"taha.bensalah@gmail.com"
] |
taha.bensalah@gmail.com
|
a297a5dad642db1cf9774146501cb127afe62a7d
|
a7267160d848c32bd5134d1d4feabea41c297798
|
/workspace/Idea_workspace/myframe/src/test/gg.java
|
4b6002e632dd0399a7f6979ab5bb10490efa6d8d
|
[] |
no_license
|
MellowCo/java_demo
|
4512c7c8890ecfccee5046db3f51190edc8d34be
|
71940fabec00b8e8b6589ffa2ad818edda38ba6b
|
refs/heads/main
| 2022-12-31T15:22:18.351896
| 2020-10-20T07:31:59
| 2020-10-20T07:31:59
| 303,027,728
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,525
|
java
|
package test;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JLabel;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.JTextField;
public class gg extends JFrame {
private JPanel contentPane;
private JTextField textField;
private JTextField textField_1;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
gg frame = new gg();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the frame.
*/
public gg() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 300);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
JLabel lblNewLabel = new JLabel("New label");
JLabel lblNewLabel_1 = new JLabel("New label");
textField = new JTextField();
textField.setColumns(10);
textField_1 = new JTextField();
textField_1.setColumns(10);
GroupLayout gl_contentPane = new GroupLayout(contentPane);
gl_contentPane.setHorizontalGroup(
gl_contentPane.createParallelGroup(Alignment.LEADING)
.addGroup(gl_contentPane.createSequentialGroup()
.addGap(28)
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
.addGroup(gl_contentPane.createSequentialGroup()
.addComponent(lblNewLabel_1)
.addPreferredGap(ComponentPlacement.UNRELATED)
.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addGroup(gl_contentPane.createSequentialGroup()
.addComponent(lblNewLabel)
.addPreferredGap(ComponentPlacement.UNRELATED)
.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
.addContainerGap(266, Short.MAX_VALUE))
);
gl_contentPane.setVerticalGroup(
gl_contentPane.createParallelGroup(Alignment.LEADING)
.addGroup(gl_contentPane.createSequentialGroup()
.addGap(30)
.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)
.addComponent(lblNewLabel)
.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addPreferredGap(ComponentPlacement.RELATED)
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
.addComponent(lblNewLabel_1)
.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
.addContainerGap(173, Short.MAX_VALUE))
);
contentPane.setLayout(gl_contentPane);
}
}
|
[
"799478052@qq.com"
] |
799478052@qq.com
|
b4040f8ecd5e1d1e4a5038df1a3a0b0e9d1c3af7
|
62e42590a2fcbfab0bdbdce38e12e079fdffc94c
|
/tools/java/org.hl7.fhir.igtools/src/org/hl7/fhir/igtools/openapi/PathItemWriter.java
|
1db4b1a5b3cccedfa9453e539af0f7509d59763e
|
[
"BSD-3-Clause"
] |
permissive
|
fhir-ru/fhir-ru
|
97f2ab4e46496e9e4d7ac21d86d72e7c5bf7215c
|
5046061d15f40accdaf13707a683c8463f37f806
|
refs/heads/master
| 2023-02-22T13:46:54.829135
| 2021-01-21T15:09:57
| 2021-01-21T15:09:57
| 20,682,990
| 5
| 4
|
NOASSERTION
| 2020-04-28T12:31:08
| 2014-06-10T11:37:02
|
Java
|
UTF-8
|
Java
| false
| false
| 602
|
java
|
package org.hl7.fhir.igtools.openapi;
import com.google.gson.JsonObject;
public class PathItemWriter extends BaseWriter {
public PathItemWriter(JsonObject object) {
super(object);
}
public PathItemWriter summary(String value) {
object.addProperty("summary", value);
return this;
}
public PathItemWriter description(String value) {
object.addProperty("description", value);
return this;
}
public OperationWriter operation(String op) {
return new OperationWriter(ensureMapObject(op));
}
}
|
[
"grahameg@2f0db536-2c49-4257-a3fa-e771ed206c19"
] |
grahameg@2f0db536-2c49-4257-a3fa-e771ed206c19
|
38b01d21c50cec2acc751eb73ce6138f86d4f7dc
|
c59595ed3e142591f6668d6cf68267ee6378bf58
|
/android/src/main/java/com/google/api/client/googleapis/auth/clientlogin/AuthKeyValueParser.java
|
908e8b707f6c2cec7f0236f100b2ea953321ebdf
|
[] |
no_license
|
BBPL/ardrone
|
4c713a2e4808ddc54ae23c3bcaa4252d0f7b4b36
|
712c277850477b1115d5245885a4c5a6de3d57dc
|
refs/heads/master
| 2021-04-30T05:08:05.372486
| 2018-02-13T16:46:48
| 2018-02-13T16:46:48
| 121,408,031
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,657
|
java
|
package com.google.api.client.googleapis.auth.clientlogin;
import com.google.api.client.http.HttpResponse;
import com.google.api.client.util.ClassInfo;
import com.google.api.client.util.FieldInfo;
import com.google.api.client.util.GenericData;
import com.google.api.client.util.ObjectParser;
import com.google.api.client.util.Types;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.nio.charset.Charset;
import java.util.Map;
final class AuthKeyValueParser implements ObjectParser {
public static final AuthKeyValueParser INSTANCE = new AuthKeyValueParser();
private AuthKeyValueParser() {
}
public String getContentType() {
return "text/plain";
}
public <T> T parse(HttpResponse httpResponse, Class<T> cls) throws IOException {
httpResponse.setContentLoggingLimit(0);
InputStream content = httpResponse.getContent();
try {
T parse = parse(content, (Class) cls);
return parse;
} finally {
content.close();
}
}
public <T> T parse(InputStream inputStream, Class<T> cls) throws IOException {
ClassInfo of = ClassInfo.of(cls);
T newInstance = Types.newInstance(cls);
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
while (true) {
String readLine = bufferedReader.readLine();
if (readLine == null) {
return newInstance;
}
int indexOf = readLine.indexOf(61);
String substring = readLine.substring(0, indexOf);
String substring2 = readLine.substring(indexOf + 1);
Field field = of.getField(substring);
if (field != null) {
Object valueOf;
Class type = field.getType();
if (type == Boolean.TYPE || type == Boolean.class) {
valueOf = Boolean.valueOf(substring2);
} else {
readLine = substring2;
}
FieldInfo.setFieldValue(field, newInstance, valueOf);
} else if (GenericData.class.isAssignableFrom(cls)) {
((GenericData) newInstance).set(substring, substring2);
} else if (Map.class.isAssignableFrom(cls)) {
((Map) newInstance).put(substring, substring2);
}
}
}
public <T> T parseAndClose(InputStream inputStream, Charset charset, Class<T> cls) throws IOException {
return parseAndClose(new InputStreamReader(inputStream, charset), (Class) cls);
}
public Object parseAndClose(InputStream inputStream, Charset charset, Type type) {
throw new UnsupportedOperationException("Type-based parsing is not yet supported -- use Class<T> instead");
}
public <T> T parseAndClose(Reader reader, Class<T> cls) throws IOException {
try {
ClassInfo of = ClassInfo.of(cls);
T newInstance = Types.newInstance(cls);
BufferedReader bufferedReader = new BufferedReader(reader);
while (true) {
String readLine = bufferedReader.readLine();
if (readLine == null) {
break;
}
int indexOf = readLine.indexOf(61);
String substring = readLine.substring(0, indexOf);
String substring2 = readLine.substring(indexOf + 1);
Field field = of.getField(substring);
if (field != null) {
Object valueOf;
Class type = field.getType();
if (type == Boolean.TYPE || type == Boolean.class) {
valueOf = Boolean.valueOf(substring2);
} else {
readLine = substring2;
}
FieldInfo.setFieldValue(field, newInstance, valueOf);
} else if (GenericData.class.isAssignableFrom(cls)) {
((GenericData) newInstance).set(substring, substring2);
} else if (Map.class.isAssignableFrom(cls)) {
((Map) newInstance).put(substring, substring2);
}
}
return newInstance;
} finally {
reader.close();
}
}
public Object parseAndClose(Reader reader, Type type) {
throw new UnsupportedOperationException("Type-based parsing is not yet supported -- use Class<T> instead");
}
}
|
[
"feber.sm@gmail.com"
] |
feber.sm@gmail.com
|
b17061e38a0fe77138b88e099691cad2c1af3a59
|
0022c0a8e7913e1f4dd531e89d83d5a8707f023d
|
/src/main/java/jblog/service/UserService.java
|
ed79488973c80808a34ee8445b03a5dab83263d8
|
[] |
no_license
|
Brilliant-Kwon/Spring_MVC_jblog_intellij
|
d7fc3ad7c4ab952a1974f3ae5ec41e5e0d7c561e
|
69ab6e64a4f32ed18bade2c2cf5e519801c3ffa2
|
refs/heads/master
| 2020-04-29T01:01:54.637197
| 2019-03-20T07:23:56
| 2019-03-20T07:23:56
| 175,716,646
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 255
|
java
|
package jblog.service;
import jblog.vo.UserVo;
public interface UserService {
public boolean join(UserVo vo);//회원 가입
public UserVo getUser(String id);//중복 검사
public UserVo getUser(String id, String password);//로그인
}
|
[
"k1212keun@skuniv.ac.kr"
] |
k1212keun@skuniv.ac.kr
|
be8d85d86b548bddc9a463c594015d9a3a81aadb
|
11b9a30ada6672f428c8292937dec7ce9f35c71b
|
/src/main/java/java/rmi/server/SkeletonMismatchException.java
|
ef859aa061e323b26e0bf6f4b74d04e850184f4c
|
[] |
no_license
|
bogle-zhao/jdk8
|
5b0a3978526723b3952a0c5d7221a3686039910b
|
8a66f021a824acfb48962721a20d27553523350d
|
refs/heads/master
| 2022-12-13T10:44:17.426522
| 2020-09-27T13:37:00
| 2020-09-27T13:37:00
| 299,039,533
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,772
|
java
|
/***** Lobxxx Translate Finished ******/
/*
* Copyright (c) 1996, 2004, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package java.rmi.server;
import java.rmi.RemoteException;
/**
* This exception is thrown when a call is received that does not
* match the available skeleton. It indicates either that the
* remote method names or signatures in this interface have changed or
* that the stub class used to make the call and the skeleton
* receiving the call were not generated by the same version of
* the stub compiler (<code>rmic</code>).
*
* <p>
* 当接收到与可用骨架不匹配的调用时,抛出此异常。
* 它指示该接口中的远程方法名称或签名已更改,或者用于进行调用的存根类和接收调用的框架不是由相同版本的存根编译器生成的(<code> rmic </code >)。
*
*
* @author Roger Riggs
* @since JDK1.1
* @deprecated no replacement. Skeletons are no longer required for remote
* method calls in the Java 2 platform v1.2 and greater.
*/
@Deprecated
public class SkeletonMismatchException extends RemoteException {
/* indicate compatibility with JDK 1.1.x version of class */
private static final long serialVersionUID = -7780460454818859281L;
/**
* Constructs a new <code>SkeletonMismatchException</code> with
* a specified detail message.
*
* <p>
*
* @param s the detail message
* @since JDK1.1
* @deprecated no replacement
*/
@Deprecated
public SkeletonMismatchException(String s) {
super(s);
}
}
|
[
"zhaobo@MacBook-Pro.local"
] |
zhaobo@MacBook-Pro.local
|
628aaf0d9db9490843ab91f575e045aa07689d3e
|
ac3a7a8d120d4e281431329c8c9d388fcfb94342
|
/src/test/java/com/leetcode/algorithm/medium/triangle/SolutionTest.java
|
2c7bf143269cfe31967037d35b1aec2e96295ee6
|
[
"MIT"
] |
permissive
|
paulxi/LeetCodeJava
|
c69014c24cda48f80a25227b7ac09c6c5d6cfadc
|
10b4430629314c7cfedaae02c7dc4c2318ea6256
|
refs/heads/master
| 2021-04-03T08:03:16.305484
| 2021-03-02T06:20:24
| 2021-03-02T06:20:24
| 125,126,097
| 3
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 471
|
java
|
package com.leetcode.algorithm.medium.triangle;
import org.junit.jupiter.api.Test;
import java.util.Arrays;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class SolutionTest {
@Test
public void testCase1() {
Solution solution = new Solution();
assertEquals(11, solution.minimumTotal(Arrays.asList(
Arrays.asList(2),
Arrays.asList(3, 4),
Arrays.asList(6, 5, 7),
Arrays.asList(4, 1, 8, 3)
)));
}
}
|
[
"paulxi@gmail.com"
] |
paulxi@gmail.com
|
66be90f29ec9964c494c728f368abcb4336b5cbf
|
f417dbb7856d987373c1588014b9aed059235015
|
/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpEQ.java
|
b79e045b62b59100c60f1b61e661de733bac9476
|
[
"Apache-2.0"
] |
permissive
|
MonsterCodingJ/spring-framework
|
975c0bc44247cfbd367bdb35da67146c0d7e3971
|
5f152cb1530ea88485efef115e0ff05687301792
|
refs/heads/master
| 2022-12-05T04:43:08.831380
| 2020-08-28T00:47:56
| 2020-08-28T00:47:56
| 290,420,347
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,522
|
java
|
/*
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.expression.spel.ast;
import org.springframework.asm.MethodVisitor;
import org.springframework.expression.EvaluationContext;
import org.springframework.expression.EvaluationException;
import org.springframework.expression.spel.CodeFlow;
import org.springframework.expression.spel.ExpressionState;
import org.springframework.expression.spel.support.BooleanTypedValue;
/**
* Implements the equality operator.
*
* @author Andy Clement
* @since 3.0
*/
public class OpEQ extends Operator {
public OpEQ(int pos, SpelNodeImpl... operands) {
super("==", pos, operands);
this.exitTypeDescriptor = "Z";
}
@Override
public BooleanTypedValue getValueInternal(ExpressionState state) throws EvaluationException {
Object left = getLeftOperand().getValueInternal(state).getValue();
Object right = getRightOperand().getValueInternal(state).getValue();
this.leftActualDescriptor = CodeFlow.toDescriptorFromObject(left);
this.rightActualDescriptor = CodeFlow.toDescriptorFromObject(right);
return BooleanTypedValue.forValue(equalityCheck(state.getEvaluationContext(), left, right));
}
// This check is different to the one in the other numeric operators (OpLt/etc)
// because it allows for simple object comparison
@Override
public boolean isCompilable() {
SpelNodeImpl left = getLeftOperand();
SpelNodeImpl right = getRightOperand();
if (!left.isCompilable() || !right.isCompilable()) {
return false;
}
String leftDesc = left.exitTypeDescriptor;
String rightDesc = right.exitTypeDescriptor;
DescriptorComparison dc = DescriptorComparison.checkNumericCompatibility(leftDesc,
rightDesc, this.leftActualDescriptor, this.rightActualDescriptor);
return (!dc.areNumbers || dc.areCompatible);
}
@Override
public void generateCode(MethodVisitor mv, CodeFlow cf) {
cf.loadEvaluationContext(mv);
String leftDesc = getLeftOperand().exitTypeDescriptor;
String rightDesc = getRightOperand().exitTypeDescriptor;
boolean leftPrim = CodeFlow.isPrimitive(leftDesc);
boolean rightPrim = CodeFlow.isPrimitive(rightDesc);
cf.enterCompilationScope();
getLeftOperand().generateCode(mv, cf);
cf.exitCompilationScope();
if (leftPrim) {
CodeFlow.insertBoxIfNecessary(mv, leftDesc.charAt(0));
}
cf.enterCompilationScope();
getRightOperand().generateCode(mv, cf);
cf.exitCompilationScope();
if (rightPrim) {
CodeFlow.insertBoxIfNecessary(mv, rightDesc.charAt(0));
}
String operatorClassName = Operator.class.getName().replace('.', '/');
String evaluationContextClassName = EvaluationContext.class.getName().replace('.', '/');
mv.visitMethodInsn(INVOKESTATIC, operatorClassName, "equalityCheck",
"(L" + evaluationContextClassName + ";Ljava/lang/Object;Ljava/lang/Object;)Z", false);
cf.pushDescriptor("Z");
}
}
|
[
"459997077@qq.com"
] |
459997077@qq.com
|
daf4216f853219846658158f3a96e25039b15a76
|
307c96177195afafc1277b6bbc99f2220fb37584
|
/src/main/java/com/laptrinhjavaweb/dto/RoleDto.java
|
bc22d495a297343251957fadf5c5c604fd2e161b
|
[] |
no_license
|
taivtse/estate-jsp-servlet-project
|
d71c853a2922acdcf8b3967a121d0cf4534e0d73
|
a21de2c317feb64f38c76109b1e0e90fab081909
|
refs/heads/master
| 2020-04-22T10:18:21.461926
| 2019-05-07T10:52:02
| 2019-05-07T10:52:02
| 170,300,543
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 513
|
java
|
package com.laptrinhjavaweb.dto;
public class RoleDto {
private Integer id;
private String code;
private String name;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
[
"taivtse@gmail.com"
] |
taivtse@gmail.com
|
a2566a91a77206af922e7ead46d6e4525cfb8541
|
f93b916ae7e4c7167dd976288efdbde56d6db40f
|
/jsoagger-core-ioc/src/main/java/io/github/jsoagger/core/i18n/MessageSource.java
|
b0aabe8a32c0768d86cab190183f386aa53306aa
|
[
"Apache-2.0"
] |
permissive
|
jsoagger/jsoagger-core
|
c036f1078918f84f9e75fcb391a4e0202a2265de
|
d6305315a7188fbf453dfbe942010af42a77506f
|
refs/heads/master
| 2022-12-23T12:00:24.417172
| 2021-07-11T13:36:28
| 2021-07-11T13:36:28
| 204,711,001
| 0
| 0
|
Apache-2.0
| 2022-12-16T04:39:08
| 2019-08-27T13:37:32
|
Java
|
UTF-8
|
Java
| false
| false
| 3,675
|
java
|
/**
*
*/
package io.github.jsoagger.core.i18n;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
/**
* @author Ramilafananana VONJISOA
*
*/
public class MessageSource {
private List<String> basenames = new ArrayList<>();
private List<ResourceBundle> resourcesBundles = new ArrayList<>();
private Locale defaultOne = Locale.getDefault();
private boolean initialized = false;
private boolean useCodeAsDefaultMessage;
private String defaultEncoding = "UTF-8";
private MessageSource parentMessageSource;
/**
* Constructor.
*/
public MessageSource() {}
/**
* Load bundles
*/
private void initialise() {
for (String location : basenames) {
try {
ResourceBundle bundle = ResourceBundle.getBundle(location, defaultOne, new UTF8Control());
resourcesBundles.add(bundle);
} catch (MissingResourceException e) {
// System.out.println("ERROR - ERROR Missing resource bundle " + location);
}
}
initialized = true;
}
/**
* @param key
* @return
*/
public String getWithKeys(String key, Object... args) {
if (!initialized) {
initialise();
}
String message = key;
for (ResourceBundle resourcesBundle : resourcesBundles) {
try {
message = resourcesBundle.getString(key);
if (args.length > 0) {
message = MessageFormat.format(message, args);
}
return message;
} catch (MissingResourceException e) {
}
}
if (message.equals(key) && parentMessageSource != null) {
message = parentMessageSource.get(key);
}
return message.trim();
}
/**
* @param key
* @return
*/
public String get(String key) {
return getWithKeys(key);
}
/**
* @param key
* @param defaultMessage
* @param locale
* @return
*/
public String getOrDefault(String key, String defaultMessage, Locale locale, Object... keys) {
String message = getWithKeys(key, keys);
return message == null ? defaultMessage : message;
}
/**
* @param key
* @param defaultMessage
* @return
*/
public String getOrDefault(String key, String defaultMessage, Object... keys) {
String message = getWithKeys(key, keys);
return message == null ? defaultMessage : message;
}
/**
* @return the basenames
*/
public List<String> getBasenames() {
return basenames;
}
/**
* @param basenames the basenames to set
*/
public void setBasenames(List<String> basenames) {
this.basenames = basenames;
}
/**
* @return the useCodeAsDefaultMessage
*/
public boolean isUseCodeAsDefaultMessage() {
return useCodeAsDefaultMessage;
}
/**
* @param useCodeAsDefaultMessage the useCodeAsDefaultMessage to set
*/
public void setUseCodeAsDefaultMessage(boolean useCodeAsDefaultMessage) {
this.useCodeAsDefaultMessage = useCodeAsDefaultMessage;
}
/**
* @return the defaultEncoding
*/
public String getDefaultEncoding() {
return defaultEncoding;
}
/**
* @param defaultEncoding the defaultEncoding to set
*/
public void setDefaultEncoding(String defaultEncoding) {
this.defaultEncoding = defaultEncoding;
}
/**
* @return the parentMessageSource
*/
public MessageSource getParentMessageSource() {
return parentMessageSource;
}
/**
* @param parentMessageSource the parentMessageSource to set
*/
public void setParentMessageSource(MessageSource parentMessageSource) {
this.parentMessageSource = parentMessageSource;
}
}
|
[
"rmvonji@gmail.com"
] |
rmvonji@gmail.com
|
7dc652f0688914380b277f43af87b64fa13e2309
|
d371a55ad99e8f18bd083a02acc708c1a1588242
|
/src/test/java/e2e/InheritedVersionsTest.java
|
bf9a7bf4dfc59b3339f63444ab8977de28fac6af
|
[
"MIT"
] |
permissive
|
danielflower/multi-module-maven-release-plugin
|
38b2d565b23c17391b9a32e9c3efe802f136daa2
|
a29f1b84d872374a332783cf7d933d92ebbd2a5e
|
refs/heads/master
| 2023-08-25T11:18:53.469550
| 2023-02-18T15:28:25
| 2023-02-18T15:28:25
| 29,593,072
| 130
| 86
|
MIT
| 2023-08-16T11:59:20
| 2015-01-21T14:23:53
|
Java
|
UTF-8
|
Java
| false
| false
| 4,003
|
java
|
package e2e;
import org.apache.maven.shared.invoker.MavenInvocationException;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.lib.ObjectId;
import org.junit.BeforeClass;
import org.junit.Test;
import scaffolding.MvnRunner;
import scaffolding.TestProject;
import java.io.IOException;
import java.util.List;
import static org.hamcrest.CoreMatchers.allOf;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsEqual.equalTo;
import static scaffolding.ExactCountMatcher.oneOf;
import static scaffolding.ExactCountMatcher.twoOf;
import static scaffolding.GitMatchers.hasCleanWorkingDirectory;
import static scaffolding.GitMatchers.hasTag;
import static scaffolding.MvnRunner.assertArtifactInLocalRepo;
public class InheritedVersionsTest {
public static final String[] ARTIFACT_IDS = new String[]{"inherited-versions-from-parent", "core-utils", "console-app"};
final String buildNumber = String.valueOf(System.currentTimeMillis());
final String expected = "1.0." + buildNumber;
final TestProject testProject = TestProject.inheritedVersionsFromParent();
@BeforeClass
public static void installPluginToLocalRepo() throws MavenInvocationException {
MvnRunner.installReleasePluginToLocalRepo();
}
@Test
public void buildsAndInstallsAndTagsAllModules() throws Exception {
buildsEachProjectOnceAndOnlyOnce(testProject.mvnRelease(buildNumber));
installsAllModulesIntoTheRepoWithTheBuildNumber();
theLocalAndRemoteGitReposAreTaggedWithTheModuleNameAndVersion();
}
private void buildsEachProjectOnceAndOnlyOnce(List<String> commandOutput) throws Exception {
assertThat(
commandOutput,
allOf(
oneOf(containsString("Going to release inherited-versions-from-parent " + expected)),
twoOf(containsString("Building inherited-versions-from-parent")), // once for initial build; once for release build
oneOf(containsString("Building core-utils")),
oneOf(containsString("Building console-app")),
oneOf(containsString("The Calculator Test has run"))
)
);
}
private void installsAllModulesIntoTheRepoWithTheBuildNumber() throws Exception {
assertArtifactInLocalRepo("com.github.danielflower.mavenplugins.testprojects.versioninheritor", "inherited-versions-from-parent", expected);
assertArtifactInLocalRepo("com.github.danielflower.mavenplugins.testprojects.versioninheritor", "core-utils", expected);
assertArtifactInLocalRepo("com.github.danielflower.mavenplugins.testprojects.versioninheritor", "console-app", expected);
}
private void theLocalAndRemoteGitReposAreTaggedWithTheModuleNameAndVersion() throws IOException, InterruptedException {
for (String artifactId : ARTIFACT_IDS) {
String expectedTag = artifactId + "-" + expected;
assertThat(testProject.local, hasTag(expectedTag));
assertThat(testProject.origin, hasTag(expectedTag));
}
}
@Test
public void thePomChangesAreRevertedAfterTheRelease() throws IOException, InterruptedException {
ObjectId originHeadAtStart = head(testProject.origin);
ObjectId localHeadAtStart = head(testProject.local);
assertThat(originHeadAtStart, equalTo(localHeadAtStart));
testProject.mvnRelease(buildNumber);
assertThat(head(testProject.origin), equalTo(originHeadAtStart));
assertThat(head(testProject.local), equalTo(localHeadAtStart));
assertThat(testProject.local, hasCleanWorkingDirectory());
}
// @Test
// public void whenOneModuleDependsOnAnotherThenWhenReleasingThisDependencyHasTheRelaseVersion() {
// // TODO: implement this
// }
private ObjectId head(Git git) throws IOException {
return git.getRepository().getRefDatabase().findRef("HEAD").getObjectId();
}
}
|
[
"git@danielflower.com"
] |
git@danielflower.com
|
78eeda211af8c4932ee43a6c569c945f5b1dcce1
|
96f8d42c474f8dd42ecc6811b6e555363f168d3e
|
/baike/sources/qsbk/app/widget/bu.java
|
1ea02312aa79cc82b8934f80cc7bb385f664b567
|
[] |
no_license
|
aheadlcx/analyzeApk
|
050b261595cecc85790558a02d79739a789ae3a3
|
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
|
refs/heads/master
| 2020-03-10T10:24:49.773318
| 2018-04-13T09:44:45
| 2018-04-13T09:44:45
| 129,332,351
| 6
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 427
|
java
|
package qsbk.app.widget;
import android.view.View;
import android.view.View.OnClickListener;
class bu implements OnClickListener {
final /* synthetic */ GroupDialog a;
bu(GroupDialog groupDialog) {
this.a = groupDialog;
}
public void onClick(View view) {
if (GroupDialog.b(this.a) != null) {
GroupDialog.b(this.a).onClick(this.a, -1);
}
this.a.dismiss();
}
}
|
[
"aheadlcxzhang@gmail.com"
] |
aheadlcxzhang@gmail.com
|
3b081e81a5c193d5cef777429c0bff31281a137d
|
342379b0e7a0572860158a34058dfad1c8944186
|
/core/src/test/java/com/vladmihalcea/hpjp/hibernate/query/hierarchical/TreeTest.java
|
5e2a4bf1330eb2ff3d37f50f8bd0662b10e82b0f
|
[
"Apache-2.0"
] |
permissive
|
vladmihalcea/high-performance-java-persistence
|
80a20e67fa376322f5b1c5eddf75758b29247a2a
|
acef7e84e8e2dff89a6113f007eb7656bc6bdea4
|
refs/heads/master
| 2023-09-01T03:43:41.263446
| 2023-08-31T14:44:54
| 2023-08-31T14:44:54
| 44,294,727
| 1,211
| 518
|
Apache-2.0
| 2023-07-21T19:06:38
| 2015-10-15T04:57:57
|
Java
|
UTF-8
|
Java
| false
| false
| 885
|
java
|
package com.vladmihalcea.hpjp.hibernate.query.hierarchical;
import org.hibernate.*;
import org.junit.Test;
import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
/**
* @author Vlad Mihalcea
*/
public class TreeTest extends AbstractTreeTest {
@Test
public void test() {
List<PostComment> comments = doInJPA(entityManager -> {
return (List<PostComment>) entityManager
.unwrap(Session.class)
.createQuery(
"SELECT c " +
"FROM PostComment c " +
"WHERE c.status = :status")
.setParameter("status", Status.APPROVED)
.setResultTransformer(PostCommentTreeTransformer.INSTANCE)
.getResultList();
});
assertEquals(2, comments.size());
}
}
|
[
"mihalcea.vlad@gmail.com"
] |
mihalcea.vlad@gmail.com
|
7abaded15f765e13715880104108e5252ba43f0f
|
caa125234a3c3e8fff496a9d4e11f49ac7701309
|
/main/java/com/maywide/biz/prd/entity/Salespkg.java
|
f7b3d4b61a40d77ff2162461236d9a96182d0e41
|
[] |
no_license
|
lisongkang/my-first-project-for-revcocomcmms
|
1885f49fa1a7ef8686c3d8b7d9b5a50585bb3b8d
|
6079a3d9d24bd44ae3af24dc603846d460910f3b
|
refs/heads/master
| 2022-05-01T16:34:20.261009
| 2022-04-18T13:55:04
| 2022-04-18T13:55:04
| 207,246,589
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,421
|
java
|
package com.maywide.biz.prd.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springframework.data.domain.Persistable;
import com.maywide.core.entity.PersistableEntity;
@Entity
@Table(name = "PRD_SALESPKG")
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
public class Salespkg extends PersistableEntity<Long> implements Persistable<Long> {
private Long id;
private String salespkgcode;
private String salespkgname;
private String sclass;
private String ssubclass;
private String bizcode;
private Double sums;
private String hotflag;
private java.util.Date sdate;
private java.util.Date edate;
private Long appnums;
private String status;
private String feecode;
private String ifeecode;
private String rfeecode;
private String scopeflag;
private Long createoper;
private java.util.Date createtime;
private Long updateoper;
private java.util.Date updatetime;
private String memo;
private String ordertype;
private String areas;
private String isshowpost; // �Ƿ���ʾ����˳����-��
private String pkgtype; //Ӫ������
private String postflag;
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
@Column(name = "SALESPKGID")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@Transient
public String getDisplay() {
return salespkgname;
}
@Column(name = "SALESPKGCODE", nullable = false, unique = false, insertable = true, updatable = true)
public String getSalespkgcode() {
return salespkgcode;
}
public void setSalespkgcode(String salespkgcode) {
this.salespkgcode = salespkgcode;
}
@Column(name = "SALESPKGNAME", nullable = false, unique = false, insertable = true, updatable = true)
public String getSalespkgname() {
return salespkgname;
}
public void setSalespkgname(String salespkgname) {
this.salespkgname = salespkgname;
}
@Column(name = "SCLASS", nullable = false, unique = false, insertable = true, updatable = true)
public String getSclass() {
return sclass;
}
public void setSclass(String sclass) {
this.sclass = sclass;
}
@Column(name = "SSUBCLASS", nullable = false, unique = false, insertable = true, updatable = true)
public String getSsubclass() {
return ssubclass;
}
public void setSsubclass(String ssubclass) {
this.ssubclass = ssubclass;
}
@Column(name = "BIZCODE", nullable = false, unique = false, insertable = true, updatable = true)
public String getBizcode() {
return bizcode;
}
public void setBizcode(String bizcode) {
this.bizcode = bizcode;
}
@Column(name = "SUMS", nullable = true, unique = false, insertable = true, updatable = true)
public Double getSums() {
return sums;
}
public void setSums(Double sums) {
this.sums = sums;
}
@Column(name = "HOTFLAG", nullable = false, unique = false, insertable = true, updatable = true)
public String getHotflag() {
return hotflag;
}
public void setHotflag(String hotflag) {
this.hotflag = hotflag;
}
@Column(name = "SDATE", nullable = false, unique = false, insertable = true, updatable = true)
public java.util.Date getSdate() {
return sdate;
}
public void setSdate(java.util.Date sdate) {
this.sdate = sdate;
}
@Column(name = "EDATE", nullable = false, unique = false, insertable = true, updatable = true)
public java.util.Date getEdate() {
return edate;
}
public void setEdate(java.util.Date edate) {
this.edate = edate;
}
@Column(name = "APPNUMS", nullable = false, unique = false, insertable = true, updatable = true)
public Long getAppnums() {
return appnums;
}
public void setAppnums(Long appnums) {
this.appnums = appnums;
}
@Column(name = "STATUS", nullable = false, unique = false, insertable = true, updatable = true)
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Column(name = "FEECODE", nullable = true, unique = false, insertable = true, updatable = true)
public String getFeecode() {
return feecode;
}
public void setFeecode(String feecode) {
this.feecode = feecode;
}
@Column(name = "IFEECODE", nullable = true, unique = false, insertable = true, updatable = true)
public String getIfeecode() {
return ifeecode;
}
public void setIfeecode(String ifeecode) {
this.ifeecode = ifeecode;
}
@Column(name = "RFEECODE", nullable = true, unique = false, insertable = true, updatable = true)
public String getRfeecode() {
return rfeecode;
}
public void setRfeecode(String rfeecode) {
this.rfeecode = rfeecode;
}
@Column(name = "SCOPEFLAG", nullable = false, unique = false, insertable = true, updatable = true)
public String getScopeflag() {
return scopeflag;
}
public void setScopeflag(String scopeflag) {
this.scopeflag = scopeflag;
}
@Column(name = "CREATEOPER", nullable = false, unique = false, insertable = true, updatable = true)
public Long getCreateoper() {
return createoper;
}
public void setCreateoper(Long createoper) {
this.createoper = createoper;
}
@Column(name = "CREATETIME", nullable = false, unique = false, insertable = true, updatable = true)
public java.util.Date getCreatetime() {
return createtime;
}
public void setCreatetime(java.util.Date createtime) {
this.createtime = createtime;
}
@Column(name = "UPDATEOPER", nullable = false, unique = false, insertable = true, updatable = true)
public Long getUpdateoper() {
return updateoper;
}
public void setUpdateoper(Long updateoper) {
this.updateoper = updateoper;
}
@Column(name = "UPDATETIME", nullable = false, unique = false, insertable = true, updatable = true)
public java.util.Date getUpdatetime() {
return updatetime;
}
public void setUpdatetime(java.util.Date updatetime) {
this.updatetime = updatetime;
}
@Column(name = "MEMO", nullable = true, unique = false, insertable = true, updatable = true)
public String getMemo() {
return memo;
}
public void setMemo(String memo) {
this.memo = memo;
}
@Column(name = "ORDERTYPE", nullable = true, unique = false, insertable = true, updatable = true)
public String getOrdertype() {
return ordertype;
}
public void setOrdertype(String ordertype) {
this.ordertype = ordertype;
}
@Column(name = "AREAS", nullable = true, unique = false, insertable = true, updatable = true)
public String getAreas() {
return areas;
}
public void setAreas(String areas) {
this.areas = areas;
}
@Column(name = "ISSHOWPOST", nullable = true, unique = false, insertable = true, updatable = true)
public String getIsshowpost() {
return isshowpost;
}
@Column(name= "POSTFLAG", nullable = true, unique = false, insertable = true, updatable = true)
public String getPostflag() {
return postflag;
}
public void setPostflag(String postflag) {
this.postflag = postflag;
}
public void setIsshowpost(String isshowpost) {
this.isshowpost = isshowpost;
}
@Column(name = "PKGTYPE", nullable = true, unique = false, insertable = true, updatable = true)
public String getPkgtype() {
return pkgtype;
}
public void setPkgtype(String pkgtype) {
this.pkgtype = pkgtype;
}
}
|
[
"1223128449@qq.com"
] |
1223128449@qq.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.