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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
926503593a9db43c2bcdeab1d3cf8717f45fb8d9
|
7b17f15297561ba5d9149ffea065ee515878899b
|
/src/com/galaxii/common/util/ImageUtil.java
|
02953c0e50d85b78d3c9d5bc5d80128c1a21a823
|
[] |
no_license
|
t-kawatsu/galaxii
|
f4ece07fd98091164f42656e2ea811866ec87780
|
4828cfc34997ea5b0629dc5509ef6b8fe9148d87
|
refs/heads/master
| 2020-03-23T23:39:15.026973
| 2018-07-25T05:32:06
| 2018-07-25T05:32:06
| 142,247,063
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,074
|
java
|
package com.galaxii.common.util;
import java.io.File;
import java.io.IOException;
import org.im4java.core.ConvertCmd;
import org.im4java.core.IMOperation;
import org.im4java.core.Info;
/**
* http://books.google.co.jp/books?id=SKJxWg_uKJUC&pg=PA60&lpg=PA60&dq=imagemagick+%E5%9B%BA%E5%AE%9A%E5%B9%85%E3%80%80%E4%BD%99%E7%99%BD&source=bl&ots=efIl-8qfih&sig=tsuH1Pvz1wQXPVnxyok5MG6VIw4&hl=ja&sa=X&ei=0vpFUY2oKJDvmAXoyYFw&ved=0CEkQ6AEwAw#v=onepage&q=imagemagick%20%E5%9B%BA%E5%AE%9A%E5%B9%85%E3%80%80%E4%BD%99%E7%99%BD&f=false
* @author t-kawatsu
*
*/
public class ImageUtil {
private ConvertCmd cmd = new ConvertCmd();
public void resize(File base, File dest, int w, int h)
throws IOException, InterruptedException, Exception {
// create the operation, add images and operators/options
IMOperation op = new IMOperation();
// add base image
op.addImage();
// resize
op.resize(w, h);
// make opaque to white
op.addRawArgs("-background", "white");
op.addRawArgs("-flatten");
// fix image size
op.addRawArgs("-gravity", "center");
op.extent(w, h);
// add dest image
op.addImage();
// execute the operation
cmd.run(op, base.toString(), dest.toString());
}
public void trimResize(File base, File dest, int w, int h)
throws IOException, InterruptedException, Exception {
Info info = new Info(base.toString(),true);
int bw = info.getImageWidth();
int bh = info.getImageHeight();
int dw = bw - w;
int dh = bh - h;
// create the operation, add images and operators/options
IMOperation op = new IMOperation();
// add base image
op.addImage();
// resize
if(dw < dh) {
op.resize(w, null);
} else {
op.resize(null, h);
}
// make opaque to white
op.background("white");
op.flatten();
// fix image size
op.gravity("center");
op.extent(w, h);
// crop
if(dw < dh) {
op.crop(w, h, 0, 0);
} else {
op.crop(w, h, 0, 0);
}
// +repage
op.p_repage();
// add dest image
op.addImage();
// execute the operation
cmd.run(op, base.toString(), dest.toString());
}
}
|
[
"t-kawatsu@share.jogoj.com"
] |
t-kawatsu@share.jogoj.com
|
326bcc844e2b352fcfa0ee31a0461cd6a8c69a7e
|
1568c40f143fc3a9cf3ef1a2d54cb9919397628a
|
/src/main/java/pages/olxAuto/VehicleInfoPage.java
|
2527440279790f393514bab6c450fdb6e6fe0809
|
[] |
no_license
|
alexnaum/LearnJava
|
3f419946538c2092abbf3d5f7eb2cb5a3bcc43ee
|
17a1a63e1cbb5080236b9d087c85e2f08bce46db
|
refs/heads/main
| 2023-08-30T11:00:51.386905
| 2021-11-17T21:06:06
| 2021-11-17T21:12:49
| 397,722,644
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 489
|
java
|
package pages.olxAuto;
import lombok.Getter;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import pages.BasePage;
@Getter
public class VehicleInfoPage extends BasePage {
public VehicleInfoPage(WebDriver driver) {
super(driver);
}
@FindBy(xpath = "//*[contains(text(),'Пробег')]")
private WebElement mileAge;
public VehicleInfoPage getMileAge(){
return this;
}
}
|
[
"test@gmail.com"
] |
test@gmail.com
|
25d5f10fff146cf0b06ebd869311d6a7ba0564ff
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdas/applicationModule/src/main/java/applicationModulepackageJava15/Foo258.java
|
816da4d9d7ab69f9d0b98a75872cb5e4993bbf1e
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 348
|
java
|
package applicationModulepackageJava15;
public class Foo258 {
public void foo0() {
new applicationModulepackageJava15.Foo257().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
838638cd7bd1064eef06243201728ef7665c4327
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/test/tk/mybatis/mapper/test/rowbounds/TestSelectRowBounds.java
|
d1bf17923d674e2df093f4262036e0c689e51602
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 2,253
|
java
|
/**
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 abel533@gmail.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package tk.mybatis.mapper.test.rowbounds;
import java.util.List;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.session.SqlSession;
import org.junit.Assert;
import org.junit.Test;
import tk.mybatis.mapper.entity.Example;
import tk.mybatis.mapper.mapper.CountryMapper;
import tk.mybatis.mapper.mapper.MybatisHelper;
import tk.mybatis.mapper.model.Country;
/**
*
*
* @author liuzh
*/
public class TestSelectRowBounds {
@Test
public void testSelectByExample() {
SqlSession sqlSession = MybatisHelper.getSqlSession();
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
Example example = new Example(Country.class);
example.createCriteria().andGreaterThan("id", 100).andLessThan("id", 151);
example.or().andLessThan("id", 41);
List<Country> countries = mapper.selectByExampleAndRowBounds(example, new RowBounds(10, 20));
// ????
Assert.assertEquals(20, countries.size());
} finally {
sqlSession.close();
}
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
8102fa4f137260f8fbb75cfe002016650359f0b9
|
a1c11e8817a1de8a4494909c8c3c8e420d5b124e
|
/sample.user/src/main/java/com/sample/user/service/handler/EditUserHandler.java
|
9d1d6fcaa60c3dadc0123fc33e3a6842898d8a6d
|
[] |
no_license
|
mysticalmountain/sample
|
51011376efc02b4b5204a43f544ac6416b6cd0d6
|
c80c7ecc05413721858cc3bd6b55f3b55b9b0969
|
refs/heads/master
| 2020-04-15T06:55:31.635205
| 2017-10-28T15:38:28
| 2017-10-28T15:38:28
| 68,129,193
| 0
| 0
| null | 2016-11-18T03:12:48
| 2016-09-13T17:03:14
|
Java
|
UTF-8
|
Java
| false
| false
| 3,603
|
java
|
package com.sample.user.service.handler;
import com.sample.core.Constant;
import com.sample.core.exception.UnifiedException;
import com.sample.core.model.dto.GenericReq;
import com.sample.core.model.dto.Rsp;
import com.sample.core.service.Service;
import com.sample.core.service.handler.AbstractServiceHandler;
import com.sample.permission.dto.RoleDto;
import com.sample.permission.model.Role;
import com.sample.permission.repository.RoleRepository;
import com.sample.user.dto.UserDto;
import com.sample.user.model.Authority;
import com.sample.user.model.Profile;
import com.sample.user.model.User;
import com.sample.user.model.enums.AuthType;
import com.sample.user.repository.AuthorityRepository;
import com.sample.user.repository.ProfileRepository;
import com.sample.user.repository.UserRepository;
import com.sample.user.service.EditUserService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
/**
* Created by andongxu on 16-11-18.
*/
@Component
public class EditUserHandler extends AbstractServiceHandler<GenericReq<UserDto>, Rsp> {
@Autowired
private UserRepository userRepository;
@Autowired
private ProfileRepository profileRepository;
@Autowired
private RoleRepository roleRepository;
@Autowired
private AuthorityRepository authorityRepository;
@Override
public boolean support(Object... objs) {
Service service = (Service) objs[1];
if (service.code().equals(EditUserService.class.getAnnotation(Service.class).code())) {
return true;
}
return false;
}
@Override
public Rsp doHandle(GenericReq<UserDto> userDtoGenericReq, Service service) throws UnifiedException {
UserDto userDto = userDtoGenericReq.getData();
User user = null;
if (userDto != null && userDto.getId() != null) {
user = userRepository.findOne(userDto.getId());
}
if (user == null) {
user = new User();
BeanUtils.copyProperties(userDto, user);
user = userRepository.save(user);
} else {
BeanUtils.copyProperties(userDto, user);
user = userRepository.save(user);
}
if (userDto.getProfileDto() != null) {
Profile profile = new Profile();
BeanUtils.copyProperties(userDto.getProfileDto(), profile);
profile.setUser(user);
profileRepository.save(profile);
}
if (userDto.getAuthorityDto() != null) {
Authority authority = new Authority();
BeanUtils.copyProperties(userDto.getAuthorityDto(), authority);
authority.setAuthType(AuthType.USERNAME);
authority.setUser(user);
authorityRepository.save(authority);
}
if (userDto.getRoleDtos() != null) {
Iterator<RoleDto> roleDtoIterator = userDto.getRoleDtos().iterator();
Set<Role> roleSet = new HashSet<Role>();
while (roleDtoIterator.hasNext()) {
RoleDto roleDto = roleDtoIterator.next();
Role role = roleRepository.findOne(roleDto.getId());
roleSet.add(role);
}
user.setRoles(roleSet);
userRepository.save(user);
}
Rsp rsp = new Rsp();
rsp.setErrorMsg(Constant.SUCCESS[1]);
rsp.setErrorCode(Constant.SUCCESS[0]);
rsp.setSuccess(true);
return rsp;
}
}
|
[
"dongxudotan@163.com"
] |
dongxudotan@163.com
|
e5483d47d651533646256239ea1981c18f2ad83f
|
33456d6a297295d35301a00fa2ed03398cc82bc7
|
/libglide/src/main/java/com/zhxh/libglide/glide/binding/inter/LifeCycle.java
|
ed35b063e55d49e4ca98cb06ebcbfa2a30d85499
|
[] |
no_license
|
zhxhcoder/XSourcStudy
|
78b01956721545f5f66b18195084d3500c07fe94
|
c07e7f75a4ecf5b788344f6d177bc3d21b3cf80e
|
refs/heads/master
| 2022-12-13T11:20:43.479176
| 2022-12-11T03:54:27
| 2022-12-11T03:54:27
| 174,454,806
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 246
|
java
|
package com.zhxh.libglide.glide.binding.inter;
import androidx.annotation.NonNull;
/**
*/
public interface LifeCycle {
void addListener(@NonNull LifecycleListener listener);
void removeListener(@NonNull LifecycleListener listener);
}
|
[
"zhxhcoder@gmail.com"
] |
zhxhcoder@gmail.com
|
dfe4d4e0079196951e880cac9c955c722dab48f2
|
aaa9751e4ed70a7b3b41fa2025900dd01205518a
|
/org.eclipse.rcpl.libs/src2/com/microsoft/schemas/office/x2006/digsig/impl/STSignatureTextImpl.java
|
28718dc815d1d0bbed28b256e1679799e4524585
|
[] |
no_license
|
rassisi/rcpl
|
596f0c0aeb4b4ae838f001ad801f9a9c42e31759
|
93b4620bb94a45d0f42666b0bf6ffecae2c0d063
|
refs/heads/master
| 2022-09-20T19:57:54.802738
| 2020-05-10T20:54:01
| 2020-05-10T20:54:01
| 141,136,917
| 0
| 0
| null | 2022-09-01T23:00:59
| 2018-07-16T12:40:18
|
Java
|
UTF-8
|
Java
| false
| false
| 905
|
java
|
/*
* XML Type: ST_SignatureText
* Namespace: http://schemas.microsoft.com/office/2006/digsig
* Java type: com.microsoft.schemas.office.x2006.digsig.STSignatureText
*
* Automatically generated - do not modify.
*/
package com.microsoft.schemas.office.x2006.digsig.impl;
/**
* An XML ST_SignatureText(@http://schemas.microsoft.com/office/2006/digsig).
*
* This is an atomic type that is a restriction of com.microsoft.schemas.office.x2006.digsig.STSignatureText.
*/
public class STSignatureTextImpl extends org.apache.xmlbeans.impl.values.JavaStringHolderEx implements com.microsoft.schemas.office.x2006.digsig.STSignatureText
{
public STSignatureTextImpl(org.apache.xmlbeans.SchemaType sType)
{
super(sType, false);
}
protected STSignatureTextImpl(org.apache.xmlbeans.SchemaType sType, boolean b)
{
super(sType, b);
}
}
|
[
"Ramin@DESKTOP-69V2J7P.fritz.box"
] |
Ramin@DESKTOP-69V2J7P.fritz.box
|
22261b611fa5f22054605e6c41c0d1be0acd9851
|
7f95b0c2d6e1922aeb64d0ba0a52698d17b6a5f2
|
/product-service/supermarket/src/main/java/com/gemini/business/supermarket/platform/enums/TargetEnum.java
|
80912bf6fc7360c7c8a5d7ec0ecdb960d0aa02ec
|
[] |
no_license
|
xiaominglol/product-cloud
|
35cb8cc50748d1748e0e64737d5ab1b95ecf53ef
|
a0227879f92cc85a72839d34530ea5514bf3ed5e
|
refs/heads/master
| 2020-11-25T21:44:39.903145
| 2020-03-30T06:34:30
| 2020-03-30T06:34:30
| 228,858,639
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 855
|
java
|
package com.gemini.business.supermarket.platform.enums;
import com.gemini.boot.framework.mybatis.entity.Dict;
import com.gemini.boot.framework.mybatis.service.DictService;
/**
* id:402609161446912
* code:Target
* name:打开方式
* description:打开方式
*/
public enum TargetEnum implements DictService {
/**
* id:402609161446914
* code:_blank
* name:新窗口
* description:打开方式:新窗口
*/
_blank() {
@Override
public Dict dict() {
return Dicts.get(402609161446914L);
}
},
/**
* id:402609161446915
* code:_self
* name:当前窗口
* description:打开方式:当前窗口
*/
_self() {
@Override
public Dict dict() {
return Dicts.get(402609161446915L);
}
}
}
|
[
"474345633@qq.com"
] |
474345633@qq.com
|
cce01dd95d8a0c89b76b05d97127c10837f79e5a
|
ab7fcaefee61952e5eb95a9eee44679227e6f15e
|
/CreateTargetOnly/Source/gen/Source/impl/SourceFactoryImpl.java
|
d83f6f89f213d73a39ef88dc4fdc64dea226523e
|
[] |
no_license
|
mabilov/tgg_workarounds
|
9b12e81994ea34c272235722cb0bc160ab8df5b8
|
3d6c6b568745030b443ceb58f7d34834b5ff37ac
|
refs/heads/master
| 2016-08-08T06:30:44.735028
| 2015-06-24T10:21:53
| 2015-06-24T10:21:53
| 37,904,885
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,554
|
java
|
/**
*/
package Source.impl;
import Source.*;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class SourceFactoryImpl extends EFactoryImpl implements SourceFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static SourceFactory init() {
try {
SourceFactory theSourceFactory = (SourceFactory) EPackage.Registry.INSTANCE
.getEFactory(SourcePackage.eNS_URI);
if (theSourceFactory != null) {
return theSourceFactory;
}
} catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new SourceFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SourceFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case SourcePackage.SOURCE_MODEL:
return createSourceModel();
case SourcePackage.ACTIVITY:
return createActivity();
case SourcePackage.SPLIT_MERGE:
return createSplitMerge();
default:
throw new IllegalArgumentException("The class '" + eClass.getName()
+ "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SourceModel createSourceModel() {
SourceModelImpl sourceModel = new SourceModelImpl();
return sourceModel;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Activity createActivity() {
ActivityImpl activity = new ActivityImpl();
return activity;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SplitMerge createSplitMerge() {
SplitMergeImpl splitMerge = new SplitMergeImpl();
return splitMerge;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SourcePackage getSourcePackage() {
return (SourcePackage) getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static SourcePackage getPackage() {
return SourcePackage.eINSTANCE;
}
} //SourceFactoryImpl
|
[
"marat.abilov@gmail.com"
] |
marat.abilov@gmail.com
|
88e9aca7b997726d9642b2600d4e108859cb130e
|
82bda3ed7dfe2ca722e90680fd396935c2b7a49d
|
/app-meipai/src/main/java/com/arashivision/insbase/arlog/MultipartUtility.java
|
81d903f7b37cab810a353da029906435bf5310e6
|
[] |
no_license
|
cvdnn/PanoramaApp
|
86f8cf36d285af08ba15fb32348423af7f0b7465
|
dd6bbe0987a46f0b4cfb90697b38f37f5ad47cfc
|
refs/heads/master
| 2023-03-03T11:15:40.350476
| 2021-01-29T09:14:06
| 2021-01-29T09:14:06
| 332,968,433
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,135
|
java
|
package com.arashivision.insbase.arlog;
import android.util.Log;
import com.baidubce.http.Headers;
import com.facebook.stetho.websocket.WebSocketHandler;
import com.tencent.connect.common.Constants;
import e.a.a.a.a;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.UUID;
public class MultipartUtility {
public static final String CTRLF = "\r\n";
public static final String TWO_HYPHENS = "--";
public final String mBoundary = UUID.randomUUID().toString();
public ArrayList<Part> mParts = new ArrayList<>();
public final String mRequestUrl;
public class FilePart implements Part {
public byte[] end;
public String fieldName;
public long fieldSize;
public File file;
public long fileLength;
public byte[] head;
public final /* synthetic */ MultipartUtility this$0;
public FilePart(MultipartUtility multipartUtility, String str, String str2) {
String str3 = "UTF-8";
this.this$0 = multipartUtility;
this.fieldName = str;
File file2 = new File(str2);
this.file = file2;
if (file2.isFile()) {
this.fileLength = this.file.length();
String name = this.file.getName();
StringBuilder a2 = a.a(MultipartUtility.TWO_HYPHENS);
a2.append(multipartUtility.mBoundary);
String str4 = MultipartUtility.CTRLF;
a2.append(str4);
a2.append("Content-Disposition: form-data; name=\"");
a2.append(str);
a2.append("\";filename=\"");
a.a(a2, name, "\"", str4, str4);
try {
this.head = a2.toString().getBytes(str3);
byte[] bytes = str4.getBytes(str3);
this.end = bytes;
this.fieldSize = ((long) (this.head.length + bytes.length)) + this.fileLength;
} catch (UnsupportedEncodingException e2) {
throw new RuntimeException(e2);
}
} else {
throw new RuntimeException(a.a("file: ", str2, " is not a file"));
}
}
public long getSize() {
return this.fieldSize;
}
public PartType getType() {
return PartType.FILE;
}
}
public interface Part {
long getSize();
PartType getType();
}
public enum PartType {
STRING,
FILE
}
public class StringPart implements Part {
public byte[] content;
public String name;
public String value;
public StringPart(String str, String str2) {
this.name = str;
this.value = str2;
StringBuilder a2 = a.a(MultipartUtility.TWO_HYPHENS);
a2.append(MultipartUtility.this.mBoundary);
String str3 = MultipartUtility.CTRLF;
a2.append(str3);
a2.append("Content-Disposition: form-data; name=\"");
a2.append(str);
a2.append("\"");
a.a(a2, str3, "Content-Type: text/plain; charset=UTF-8\r\n", str3, str2);
a2.append(str3);
try {
this.content = a2.toString().getBytes("UTF-8");
} catch (UnsupportedEncodingException e2) {
throw new RuntimeException(e2);
}
}
public long getSize() {
return (long) this.content.length;
}
public PartType getType() {
return PartType.STRING;
}
}
public MultipartUtility(String str) {
this.mRequestUrl = str;
}
public MultipartUtility addFilePart(String str, String str2) {
this.mParts.add(new FilePart(this, str, str2));
return this;
}
public MultipartUtility addFormField(String str, String str2) {
this.mParts.add(new StringPart(str, str2));
return this;
}
public String commit() throws IOException {
Iterator it = this.mParts.iterator();
long j2 = 0;
while (it.hasNext()) {
j2 += ((Part) it.next()).getSize();
}
String str = TWO_HYPHENS;
StringBuilder a2 = a.a(str);
a2.append(this.mBoundary);
a2.append(str);
a2.append(CTRLF);
byte[] bytes = a2.toString().getBytes("UTF-8");
long length = j2 + ((long) bytes.length);
HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(this.mRequestUrl).openConnection();
httpURLConnection.setUseCaches(false);
httpURLConnection.setDoOutput(true);
httpURLConnection.setDoInput(true);
httpURLConnection.setFixedLengthStreamingMode((int) length);
httpURLConnection.setRequestMethod(Constants.HTTP_POST);
httpURLConnection.setRequestProperty(WebSocketHandler.HEADER_CONNECTION, "Keep-Alive");
httpURLConnection.setRequestProperty(Headers.CACHE_CONTROL, "no-cache");
StringBuilder sb = new StringBuilder();
sb.append("multipart/form-data;boundary=");
sb.append(this.mBoundary);
httpURLConnection.setRequestProperty("Content-Type", sb.toString());
DataOutputStream dataOutputStream = new DataOutputStream(httpURLConnection.getOutputStream());
Iterator it2 = this.mParts.iterator();
while (it2.hasNext()) {
Part part = (Part) it2.next();
if (part.getType() == PartType.STRING) {
dataOutputStream.write(((StringPart) part).content);
} else if (part.getType() == PartType.FILE) {
FilePart filePart = (FilePart) part;
dataOutputStream.write(filePart.head);
FileInputStream fileInputStream = new FileInputStream(filePart.file);
byte[] bArr = new byte[16384];
long j3 = 0;
while (true) {
int read = fileInputStream.read(bArr);
if (read == -1) {
break;
}
j3 += (long) read;
dataOutputStream.write(bArr, 0, read);
}
if (j3 == filePart.fileLength) {
dataOutputStream.write(filePart.end);
} else {
StringBuilder a3 = a.a("upload file's size changed: ");
a3.append(filePart.fileLength);
a3.append("->");
a3.append(j3);
throw new RuntimeException(a3.toString());
}
} else {
continue;
}
}
dataOutputStream.write(bytes);
dataOutputStream.flush();
dataOutputStream.close();
int responseCode = httpURLConnection.getResponseCode();
StringBuilder sb2 = new StringBuilder();
sb2.append("response code: ");
sb2.append(responseCode);
Log.i("MultipartUtility", sb2.toString());
if (responseCode < 400) {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new BufferedInputStream(httpURLConnection.getInputStream())));
StringBuilder sb3 = new StringBuilder();
while (true) {
String readLine = bufferedReader.readLine();
if (readLine != null) {
sb3.append(readLine);
sb3.append("\n");
} else {
bufferedReader.close();
String sb4 = sb3.toString();
httpURLConnection.disconnect();
return sb4;
}
}
} else {
throw new IOException(a.a("Server response: ", responseCode));
}
}
}
|
[
"cvvdnn@gmail.com"
] |
cvvdnn@gmail.com
|
458421773508bcbef9aff48a41eb521115ef26bf
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdasApi21/applicationModule/src/main/java/applicationModulepackageJava4/Foo878.java
|
2a91aeb99f1e8cbb438d45577c320db8effbd77c
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 346
|
java
|
package applicationModulepackageJava4;
public class Foo878 {
public void foo0() {
new applicationModulepackageJava4.Foo877().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
805121b9a2e82679b0f7b9bf568915ece15c761d
|
92225460ebca1bb6a594d77b6559b3629b7a94fa
|
/src/com/kingdee/eas/fdc/invite/app/AbstractAppraiseGuideLineTypeEditUIHandler.java
|
00d197984cba4b39a5cc75dd95d14910e41c018f
|
[] |
no_license
|
yangfan0725/sd
|
45182d34575381be3bbdd55f3f68854a6900a362
|
39ebad6e2eb76286d551a9e21967f3f5dc4880da
|
refs/heads/master
| 2023-04-29T01:56:43.770005
| 2023-04-24T05:41:13
| 2023-04-24T05:41:13
| 512,073,641
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 381
|
java
|
/**
* output package name
*/
package com.kingdee.eas.fdc.invite.app;
import com.kingdee.bos.Context;
import com.kingdee.eas.framework.batchHandler.RequestContext;
import com.kingdee.eas.framework.batchHandler.ResponseContext;
/**
* output class name
*/
public abstract class AbstractAppraiseGuideLineTypeEditUIHandler extends com.kingdee.eas.framework.app.EditUIHandler
{
}
|
[
"yfsmile@qq.com"
] |
yfsmile@qq.com
|
c7305134ae248a32fa9c273a23e40e9ebc128785
|
9a70020d409332b7db0e2e5e087f500a0e58217c
|
/BOJ/17177/Main.java
|
7e10a1af11e71ca748d9f578f520079c8e897fba
|
[
"MIT"
] |
permissive
|
ISKU/Algorithm
|
daf5e9d5397eaf7dad2d6f7fb18c1c94d8f0246d
|
a51449e4757e07a9dcd1ff05f2ef4b53e25a9d2a
|
refs/heads/master
| 2021-06-22T09:42:45.033235
| 2021-02-01T12:45:28
| 2021-02-01T12:45:28
| 62,798,871
| 55
| 12
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 624
|
java
|
/*
* Author: Minho Kim (ISKU)
* Date: May 4, 2019
* E-mail: minho.kim093@gmail.com
*
* https://github.com/ISKU/Algorithm
* https://www.acmicpc.net/problem/17177
*/
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double a = sc.nextDouble();
double b = sc.nextDouble();
double c = sc.nextDouble();
double e = Math.sqrt((a * a) - (b * b));
double f = Math.sqrt((a * a) - (c * c));
// ad + bc = ef, d = (ef - bc) / a
double d = ((e * f) - (b * c)) / a;
System.out.printf("%.0f\n", (d <= 0) ? -1 : d);
}
}
|
[
"minho.kim093@gmail.com"
] |
minho.kim093@gmail.com
|
d420298edcd050268a40596f17fa032e329e49cc
|
7773ea6f465ffecfd4f9821aad56ee1eab90d97a
|
/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/adjustFunctionContext/beforeIntStreamMap.java
|
f8319f3e83f87e0c5b73586ba929cbc5d75b2d31
|
[
"Apache-2.0"
] |
permissive
|
aghasyedbilal/intellij-community
|
5fa14a8bb62a037c0d2764fb172e8109a3db471f
|
fa602b2874ea4eb59442f9937b952dcb55910b6e
|
refs/heads/master
| 2023-04-10T20:55:27.988445
| 2020-05-03T22:00:26
| 2020-05-03T22:26:23
| 261,074,802
| 2
| 0
|
Apache-2.0
| 2020-05-04T03:48:36
| 2020-05-04T03:48:35
| null |
UTF-8
|
Java
| false
| false
| 199
|
java
|
// "Replace 'map()' with 'mapToDouble()'" "true"
import java.util.stream.*;
class Test {
void test() {
IntStream.range(0, 100).map(x -> x/<caret>1.0).forEach(s -> System.out.println(s));
}
}
|
[
"Tagir.Valeev@jetbrains.com"
] |
Tagir.Valeev@jetbrains.com
|
32272390a66a3fde0508f9f2bbe45e1509277f11
|
379392993a89ede4a49b38a1f0e57dacbe17ec7d
|
/com/google/android/gms/internal/zzdo.java
|
8683e81598ad469a7708825c74ea9ba3a45dd37b
|
[] |
no_license
|
mdali602/DTC
|
d5c6463d4cf67877dbba43e7d50a112410dccda3
|
5a91a20a0fe92d010d5ee7084470fdf8af5dafb5
|
refs/heads/master
| 2021-05-12T02:06:40.493406
| 2018-01-15T18:06:00
| 2018-01-15T18:06:00
| 117,578,063
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,957
|
java
|
package com.google.android.gms.internal;
import android.content.Context;
import android.os.Binder;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.google.android.gms.ads.internal.zzw;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.internal.zzf;
import com.google.android.gms.common.internal.zzf.zzc;
import com.google.android.gms.internal.zzdd.zzb;
@zzme
public class zzdo {
@Nullable
private Context mContext;
private final Object zzrJ = new Object();
private final Runnable zzyG = new C05371(this);
@Nullable
private zzdr zzyH;
@Nullable
private zzdv zzyI;
class C05371 implements Runnable {
final /* synthetic */ zzdo zzyJ;
C05371(zzdo com_google_android_gms_internal_zzdo) {
this.zzyJ = com_google_android_gms_internal_zzdo;
}
public void run() {
this.zzyJ.disconnect();
}
}
class C10242 implements zzb {
final /* synthetic */ zzdo zzyJ;
C10242(zzdo com_google_android_gms_internal_zzdo) {
this.zzyJ = com_google_android_gms_internal_zzdo;
}
public void zzk(boolean z) {
if (z) {
this.zzyJ.connect();
} else {
this.zzyJ.disconnect();
}
}
}
class C10253 implements zzf.zzb {
final /* synthetic */ zzdo zzyJ;
C10253(zzdo com_google_android_gms_internal_zzdo) {
this.zzyJ = com_google_android_gms_internal_zzdo;
}
public void onConnected(@Nullable Bundle bundle) {
synchronized (this.zzyJ.zzrJ) {
try {
this.zzyJ.zzyI = this.zzyJ.zzyH.zzeB();
} catch (Throwable e) {
zzqf.zzb("Unable to obtain a cache service instance.", e);
this.zzyJ.disconnect();
}
this.zzyJ.zzrJ.notifyAll();
}
}
public void onConnectionSuspended(int i) {
synchronized (this.zzyJ.zzrJ) {
this.zzyJ.zzyI = null;
this.zzyJ.zzrJ.notifyAll();
}
}
}
class C10264 implements zzc {
final /* synthetic */ zzdo zzyJ;
C10264(zzdo com_google_android_gms_internal_zzdo) {
this.zzyJ = com_google_android_gms_internal_zzdo;
}
public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
synchronized (this.zzyJ.zzrJ) {
this.zzyJ.zzyI = null;
if (this.zzyJ.zzyH != null) {
this.zzyJ.zzyH = null;
zzw.zzdc().zzlc();
}
this.zzyJ.zzrJ.notifyAll();
}
}
}
/* JADX WARNING: inconsistent code. */
/* Code decompiled incorrectly, please refer to instructions dump. */
private void connect() {
/*
r3 = this;
r1 = r3.zzrJ;
monitor-enter(r1);
r0 = r3.mContext; Catch:{ all -> 0x0024 }
if (r0 == 0) goto L_0x000b;
L_0x0007:
r0 = r3.zzyH; Catch:{ all -> 0x0024 }
if (r0 == 0) goto L_0x000d;
L_0x000b:
monitor-exit(r1); Catch:{ all -> 0x0024 }
L_0x000c:
return;
L_0x000d:
r0 = new com.google.android.gms.internal.zzdo$3; Catch:{ all -> 0x0024 }
r0.<init>(r3); Catch:{ all -> 0x0024 }
r2 = new com.google.android.gms.internal.zzdo$4; Catch:{ all -> 0x0024 }
r2.<init>(r3); Catch:{ all -> 0x0024 }
r0 = r3.zza(r0, r2); Catch:{ all -> 0x0024 }
r3.zzyH = r0; Catch:{ all -> 0x0024 }
r0 = r3.zzyH; Catch:{ all -> 0x0024 }
r0.zzxz(); Catch:{ all -> 0x0024 }
monitor-exit(r1); Catch:{ all -> 0x0024 }
goto L_0x000c;
L_0x0024:
r0 = move-exception;
monitor-exit(r1); Catch:{ all -> 0x0024 }
throw r0;
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.zzdo.connect():void");
}
private void disconnect() {
synchronized (this.zzrJ) {
if (this.zzyH == null) {
return;
}
if (this.zzyH.isConnected() || this.zzyH.isConnecting()) {
this.zzyH.disconnect();
}
this.zzyH = null;
this.zzyI = null;
Binder.flushPendingCommands();
zzw.zzdc().zzlc();
}
}
/* JADX WARNING: inconsistent code. */
/* Code decompiled incorrectly, please refer to instructions dump. */
public void initialize(android.content.Context r3) {
/*
r2 = this;
if (r3 != 0) goto L_0x0003;
L_0x0002:
return;
L_0x0003:
r1 = r2.zzrJ;
monitor-enter(r1);
r0 = r2.mContext; Catch:{ all -> 0x000c }
if (r0 == 0) goto L_0x000f;
L_0x000a:
monitor-exit(r1); Catch:{ all -> 0x000c }
goto L_0x0002;
L_0x000c:
r0 = move-exception;
monitor-exit(r1); Catch:{ all -> 0x000c }
throw r0;
L_0x000f:
r0 = r3.getApplicationContext(); Catch:{ all -> 0x000c }
r2.mContext = r0; Catch:{ all -> 0x000c }
r0 = com.google.android.gms.internal.zzgd.zzFf; Catch:{ all -> 0x000c }
r0 = r0.get(); Catch:{ all -> 0x000c }
r0 = (java.lang.Boolean) r0; Catch:{ all -> 0x000c }
r0 = r0.booleanValue(); Catch:{ all -> 0x000c }
if (r0 == 0) goto L_0x0028;
L_0x0023:
r2.connect(); Catch:{ all -> 0x000c }
L_0x0026:
monitor-exit(r1); Catch:{ all -> 0x000c }
goto L_0x0002;
L_0x0028:
r0 = com.google.android.gms.internal.zzgd.zzFe; Catch:{ all -> 0x000c }
r0 = r0.get(); Catch:{ all -> 0x000c }
r0 = (java.lang.Boolean) r0; Catch:{ all -> 0x000c }
r0 = r0.booleanValue(); Catch:{ all -> 0x000c }
if (r0 == 0) goto L_0x0026;
L_0x0036:
r0 = new com.google.android.gms.internal.zzdo$2; Catch:{ all -> 0x000c }
r0.<init>(r2); Catch:{ all -> 0x000c }
r2.zza(r0); Catch:{ all -> 0x000c }
goto L_0x0026;
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.zzdo.initialize(android.content.Context):void");
}
public zzdp zza(zzds com_google_android_gms_internal_zzds) {
zzdp com_google_android_gms_internal_zzdp;
synchronized (this.zzrJ) {
if (this.zzyI == null) {
com_google_android_gms_internal_zzdp = new zzdp();
} else {
try {
com_google_android_gms_internal_zzdp = this.zzyI.zza(com_google_android_gms_internal_zzds);
} catch (Throwable e) {
zzqf.zzb("Unable to call into cache service.", e);
com_google_android_gms_internal_zzdp = new zzdp();
}
}
}
return com_google_android_gms_internal_zzdp;
}
protected zzdr zza(zzf.zzb com_google_android_gms_common_internal_zzf_zzb, zzc com_google_android_gms_common_internal_zzf_zzc) {
return new zzdr(this.mContext, zzw.zzdc().zzlb(), com_google_android_gms_common_internal_zzf_zzb, com_google_android_gms_common_internal_zzf_zzc);
}
protected void zza(zzb com_google_android_gms_internal_zzdd_zzb) {
zzw.zzcP().zza(com_google_android_gms_internal_zzdd_zzb);
}
public void zzev() {
if (((Boolean) zzgd.zzFg.get()).booleanValue()) {
synchronized (this.zzrJ) {
connect();
zzw.zzcM();
zzpo.zzXC.removeCallbacks(this.zzyG);
zzw.zzcM();
zzpo.zzXC.postDelayed(this.zzyG, ((Long) zzgd.zzFh.get()).longValue());
}
}
}
}
|
[
"mohd.ali@xotiv.com"
] |
mohd.ali@xotiv.com
|
08675b6f6007f2678829e057fcc38c08f096b0c9
|
e252ec1303b06d7d495928dce85fbe44037c7ed3
|
/src/main/java/com/cloudstong/platform/third/bpm/service/BpmFormRunService.java
|
589d54e88ffba2374384e0c8a424f062b9fcbf8b
|
[] |
no_license
|
liaosheng2018/yunplatform
|
f8a0d8ba75ab28cdb6d602b4fb3f4f374bec1b15
|
2ef9fde99ab8969914422183891c66a52b0ef5d2
|
refs/heads/master
| 2022-03-29T20:19:48.008963
| 2020-01-12T06:16:27
| 2020-01-12T06:16:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,858
|
java
|
package com.cloudstong.platform.third.bpm.service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.cloudstong.platform.core.util.UniqueIdUtil;
import com.cloudstong.platform.third.bpm.dao.BpmDefinitionDao;
import com.cloudstong.platform.third.bpm.dao.BpmFormRunDao;
import com.cloudstong.platform.third.bpm.dao.BpmNodeSetDao;
import com.cloudstong.platform.third.bpm.model.BpmDefinition;
import com.cloudstong.platform.third.bpm.model.BpmFormRun;
import com.cloudstong.platform.third.bpm.model.BpmNodeSet;
import com.cloudstong.platform.third.bpm.model.FlowNode;
import com.cloudstong.platform.third.bpm.model.NodeCache;
@Service
public class BpmFormRunService {
@Resource
private BpmFormRunDao dao;
@Resource
private BpmNodeSetDao bpmNodeSetDao;
@Resource
private ProcessRunService processRunService;
@Resource
private BpmDefinitionDao bpmDefinitionDao;
public void addFormRun(String actDefId, Long runId, String actInstanceId) {
List<BpmNodeSet> list = bpmNodeSetDao.getOnlineFormByActDefId(actDefId);
for (BpmNodeSet bpmNodeSet : list) {
BpmFormRun bpmFormRun = getByBpmNodeSet(runId, actInstanceId, bpmNodeSet);
dao.save(bpmFormRun);
}
}
private BpmNodeSet getDefalutStartForm(List<BpmNodeSet> list, Short setType) {
BpmNodeSet bpmNodeSet = null;
for (BpmNodeSet node : list) {
if (node.getSetType().equals(setType)) {
bpmNodeSet = node;
break;
}
}
return bpmNodeSet;
}
private BpmNodeSet getStartForm(List<BpmNodeSet> list) {
BpmNodeSet bpmNodeSet = getDefalutStartForm(list, BpmNodeSet.SetType_StartForm);
return bpmNodeSet;
}
private BpmNodeSet getGlobalForm(List<BpmNodeSet> list) {
BpmNodeSet bpmNodeSet = getDefalutStartForm(list, BpmNodeSet.SetType_GloabalForm);
return bpmNodeSet;
}
public Map<String, BpmNodeSet> getTaskForm(List<BpmNodeSet> list) {
Map map = new HashMap();
for (BpmNodeSet node : list) {
if (node.getSetType().equals(BpmNodeSet.SetType_TaskNode)) {
map.put(node.getNodeId(), node);
}
}
return map;
}
private BpmFormRun getByBpmNodeSet(Long runId, String actInstanceId, BpmNodeSet bpmNodeSet) {
BpmFormRun bpmFormRun = new BpmFormRun();
bpmFormRun.setId(Long.valueOf(UniqueIdUtil.genId()));
bpmFormRun.setRunId(runId);
bpmFormRun.setActInstanceId(actInstanceId);
bpmFormRun.setActDefId(bpmNodeSet.getActDefId());
bpmFormRun.setActNodeId(bpmNodeSet.getNodeId());
bpmFormRun.setFormdefId(bpmNodeSet.getFormDefId());
bpmFormRun.setFormdefKey(bpmNodeSet.getFormKey());
bpmFormRun.setFormType(bpmNodeSet.getFormType());
bpmFormRun.setFormUrl(bpmNodeSet.getFormUrl());
bpmFormRun.setSetType(bpmNodeSet.getSetType());
return bpmFormRun;
}
public BpmNodeSet getStartBpmNodeSet(String actDefId, Short toFirstNode) {
String firstTaskName = processRunService.getFirstNodetByDefId(actDefId);
List list = bpmNodeSetDao.getByActDefId(actDefId);
BpmNodeSet bpmNodeSetStart = getStartForm(list);
BpmNodeSet bpmNodeSetGlobal = getGlobalForm(list);
Map taskMap = getTaskForm(list);
BpmNodeSet firstBpmNodeSet = (BpmNodeSet) taskMap.get(firstTaskName);
if (bpmNodeSetStart == null) {
if (toFirstNode.shortValue() == 1) {
if ((firstBpmNodeSet != null) && (firstBpmNodeSet.getFormType() != null) && (firstBpmNodeSet.getFormType().shortValue() != -1)) {
return firstBpmNodeSet;
}
if ((bpmNodeSetGlobal != null) && (bpmNodeSetGlobal.getFormType() != null) && (bpmNodeSetGlobal.getFormType().shortValue() != -1)) {
return bpmNodeSetGlobal;
}
} else if ((bpmNodeSetGlobal != null) && (bpmNodeSetGlobal.getFormType() != null) && (bpmNodeSetGlobal.getFormType().shortValue() != -1)) {
return bpmNodeSetGlobal;
}
} else {
return bpmNodeSetStart;
}
return null;
}
public boolean getCanDirectStart(Long defId) {
BpmDefinition bpmDefinition = (BpmDefinition)this.bpmDefinitionDao.getById(defId);
Integer directStart = bpmDefinition.getDirectstart();
if (directStart == null) {
return true;
}
return directStart.intValue() == 1;
}
private boolean hasForm(BpmNodeSet nodeSet) {
if ((nodeSet == null) || (nodeSet.getFormType().shortValue() == -1))
return false;
return true;
}
public BpmFormRun getByInstanceAndNode(String actInstanceId, String actNodeId) {
BpmFormRun bpmFormRun = dao.getByInstanceAndNode(actInstanceId, actNodeId);
if ((bpmFormRun != null) && (bpmFormRun.getFormType() != null) && (bpmFormRun.getFormType().shortValue() != -1)) {
return bpmFormRun;
}
bpmFormRun = dao.getGlobalForm(actInstanceId);
if ((bpmFormRun != null) && (bpmFormRun.getFormType() != null) && (bpmFormRun.getFormType().shortValue() != -1)) {
return bpmFormRun;
}
return null;
}
public BpmFormRun getByInstanceAndNodeId(String actInstanceId, String actNodeId) {
BpmFormRun bpmFormRun = dao.getByInstanceAndNode(actInstanceId, actNodeId);
return bpmFormRun;
}
public List<BpmFormRun> getByInstanceId(String actInstanceId) {
return dao.getByInstanceId(actInstanceId);
}
public BpmNodeSet getStartBpmNodeSet(Long defId, String actDefId) throws Exception {
FlowNode flowNode = NodeCache.getFirstNodeId(actDefId);
String nodeId = "";
if (flowNode != null) {
nodeId = flowNode.getNodeId();
}
BpmNodeSet firstNodeSet = this.bpmNodeSetDao.getByActDefIdNodeId(actDefId, nodeId);
if ((firstNodeSet != null) && (-1 != firstNodeSet.getFormKey())) {
return firstNodeSet;
}
BpmNodeSet globalNodeSet = this.bpmNodeSetDao.getByStartGlobal(defId);
return globalNodeSet;
}
}
|
[
"wangzhiyun999@163.com"
] |
wangzhiyun999@163.com
|
ac616e4481b291a3dc32dff14950c7aae74b196e
|
2219a1cafeded237833980ec2c2a6d7ec87662b9
|
/net/src/test/java/net/demo/netty/http/websockets/WebSocketClientHandler.java
|
b340d6b42c59d10e3e92c0f0d174a3da84ed5bac
|
[
"MIT"
] |
permissive
|
liufeiit/tulip
|
cac93dc7e30626ed6a9710e41d8f9e2b35126838
|
8934a3297f104fe4cf80fa8fa532d9b4d813ccb6
|
refs/heads/master
| 2021-01-17T10:21:50.882512
| 2015-10-28T12:13:58
| 2015-10-28T12:13:58
| 23,213,945
| 0
| 1
| null | 2016-03-09T14:00:49
| 2014-08-22T05:25:18
|
Java
|
UTF-8
|
Java
| false
| false
| 2,735
|
java
|
package net.demo.netty.http.websockets;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;
import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.handler.codec.http.FullHttpResponse;
import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame;
import io.netty.handler.codec.http.websocketx.PongWebSocketFrame;
import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
import io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker;
import io.netty.handler.codec.http.websocketx.WebSocketFrame;
import io.netty.util.CharsetUtil;
public class WebSocketClientHandler extends SimpleChannelInboundHandler<Object> {
private final WebSocketClientHandshaker handshaker;
private ChannelPromise handshakeFuture;
public WebSocketClientHandler(WebSocketClientHandshaker handshaker) {
this.handshaker = handshaker;
}
public ChannelFuture handshakeFuture() {
return handshakeFuture;
}
@Override
public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
handshakeFuture = ctx.newPromise();
}
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
handshaker.handshake(ctx.channel());
}
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
System.out.println("WebSocket Client disconnected!");
}
@Override
public void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception {
Channel ch = ctx.channel();
if (!handshaker.isHandshakeComplete()) {
handshaker.finishHandshake(ch, (FullHttpResponse) msg);
System.out.println("WebSocket Client connected!");
handshakeFuture.setSuccess();
return;
}
if (msg instanceof FullHttpResponse) {
FullHttpResponse response = (FullHttpResponse) msg;
throw new Exception("Unexpected FullHttpResponse (getStatus=" + response.getStatus() + ", content="
+ response.content().toString(CharsetUtil.UTF_8) + ')');
}
WebSocketFrame frame = (WebSocketFrame) msg;
if (frame instanceof TextWebSocketFrame) {
TextWebSocketFrame textFrame = (TextWebSocketFrame) frame;
System.out.println("WebSocket Client received message: " + textFrame.text());
} else if (frame instanceof PongWebSocketFrame) {
System.out.println("WebSocket Client received pong");
} else if (frame instanceof CloseWebSocketFrame) {
System.out.println("WebSocket Client received closing");
ch.close();
}
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
cause.printStackTrace();
if (!handshakeFuture.isDone()) {
handshakeFuture.setFailure(cause);
}
ctx.close();
}
}
|
[
"liufei_it@126.com"
] |
liufei_it@126.com
|
ca9ec941fc09ddf0dd5b644a7c64909e0c297764
|
9d95e8087cf4aa9eda9c822f3a0f29d6c30a4256
|
/808/src/ch2_Working_With_Java_Data_Types/ex3.java
|
199d9b6714baf1bee12246122ea66cead582de0e
|
[] |
no_license
|
CJ-1995/EEIT-29
|
403b2845437a4cb146484c02d9719a02beaae932
|
ed214e9df012a2a2acfda4a12abeb9b108924f2e
|
refs/heads/master
| 2023-06-08T15:46:32.587465
| 2021-06-27T16:24:59
| 2021-06-27T16:24:59
| 366,985,043
| 0
| 0
| null | 2021-06-27T16:25:00
| 2021-05-13T08:33:00
|
Java
|
UTF-8
|
Java
| false
| false
| 851
|
java
|
package ch2_Working_With_Java_Data_Types;
public class ex3 {
public static void main(String[] args) {
// TODO Auto-generated method stub
}
}
/*
Given:
public class ComputeSum {
public int x;
public int y;
public int sum;
public ComputeSum(int nx, int ny) {
x = nx;
y = ny;
updateSum();
}
public void setX(int nx) {
x = nx;
updateSum();
}
public void setY(int ny) {
x = ny;
updateSum();
}
void updateSum() {
sum = x + y;
}
}
This class needs to protect an invariant on the sum field.
Which three members must have the private access modifier to ensure that this invariant is maintained?
A. The x field
B. The y field
C. The sum field
D. The ComputerSum ( ) constructor
E. The setX ( ) method
F. The setY ( ) method
*/
|
[
"Highchen918@gmail.com"
] |
Highchen918@gmail.com
|
a93a2490c69d088d30cb00c6c2af1c3df23c9cb6
|
57d7801f31d911cde6570e3e513e43fb33f2baa3
|
/src/main/java/nl/strohalm/cyclos/entities/accounts/external/ExternalTransferAction.java
|
6d74f5bcb5d8a4a98c5eef9acfe44bb68ca7e41b
|
[] |
no_license
|
kryzoo/cyclos
|
61f7f772db45b697fe010f11c5e6b2b2e34a8042
|
ead4176b832707d4568840e38d9795d7588943c8
|
refs/heads/master
| 2020-04-29T14:50:20.470400
| 2011-12-09T11:51:05
| 2011-12-09T11:51:05
| 54,712,705
| 0
| 1
| null | 2016-03-25T10:41:41
| 2016-03-25T10:41:41
| null |
UTF-8
|
Java
| false
| false
| 956
|
java
|
/*
This file is part of Cyclos.
Cyclos is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Cyclos is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Cyclos; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package nl.strohalm.cyclos.entities.accounts.external;
/**
* A possible action for an external transfer
* @author Jefferson Magno
*/
public enum ExternalTransferAction {
MARK_AS_CHECKED, MARK_AS_UNCHECKED, DELETE;
}
|
[
"mpr@touk.pl"
] |
mpr@touk.pl
|
41cc995ecf548f3b4d11035f5bac965294ebaebb
|
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
|
/project_1_3/src/b/d/h/b/Calc_1_3_13716.java
|
01ca3bc477b8f950edae0f9976ec67e47ba59515
|
[] |
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.h.b;
public class Calc_1_3_13716 {
/** @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
|
581ee15ddbd2675e1c996b45487604e6b5d4b91c
|
52c36ce3a9d25073bdbe002757f08a267abb91c6
|
/src/main/java/com/alipay/api/response/KoubeiServindustryExerciseRecordSyncResponse.java
|
775fd162126dc202131ba6ef6b7ea47f4377bc81
|
[
"Apache-2.0"
] |
permissive
|
itc7/alipay-sdk-java-all
|
d2f2f2403f3c9c7122baa9e438ebd2932935afec
|
c220e02cbcdda5180b76d9da129147e5b38dcf17
|
refs/heads/master
| 2022-08-28T08:03:08.497774
| 2020-05-27T10:16:10
| 2020-05-27T10:16:10
| 267,271,062
| 0
| 0
|
Apache-2.0
| 2020-05-27T09:02:04
| 2020-05-27T09:02:04
| null |
UTF-8
|
Java
| false
| false
| 391
|
java
|
package com.alipay.api.response;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: koubei.servindustry.exercise.record.sync response.
*
* @author auto create
* @since 1.0, 2019-01-24 20:45:00
*/
public class KoubeiServindustryExerciseRecordSyncResponse extends AlipayResponse {
private static final long serialVersionUID = 2285319748929812192L;
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
51e81f97d227661d179ab7ef04d80dbc83c70992
|
4bcc334d04b76d46a4edbc2eec1406cf01b8a352
|
/JSPMVCLastProject2/src/com/sist/model/MainModel.java
|
979c58cea6af1fdd47c58cecee4c0e0ff94eda8b
|
[] |
no_license
|
chaijewon/2021-09-01-MvcStudy
|
e0facd073cca6cdbdec1654aa9cfc33b57ae3932
|
c09d87b5beaf0c4888fe9f1bc3f7dd5d57b1b393
|
refs/heads/master
| 2023-09-04T17:55:21.605078
| 2021-09-17T08:40:19
| 2021-09-17T08:40:19
| 401,916,433
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 816
|
java
|
package com.sist.model;
import javax.servlet.http.HttpServletRequest;
import com.sist.controller.*;
//POJO => 일반 클래스 => 클래스명 자유롭다 (메소드도 마음되로 사용이 가능)
// 프로젝트 => 클래스명을 전한다 , 메소드명을 정한다 (X) =>
public class MainModel {
@RequestMapping("main/main.do")
public String main_page(HttpServletRequest request)
{
return "../main/main.jsp";
}
@RequestMapping("main/ko.do")
public String main_ko(HttpServletRequest request)
{
return "../main/ko.jsp";
}
@RequestMapping("main/ch.do")
public String main_ch(HttpServletRequest request)
{
return "../main/ch.jsp";
}
@RequestMapping("main/ja.do")
public String main_ja(HttpServletRequest request)
{
return "../main/ja.jsp";
}
}
|
[
"vcandjava@nate.com"
] |
vcandjava@nate.com
|
c32ab3965372f3db4e6c643d00a472697afbdcd6
|
9b01ffa3db998c4bca312fd28aa977f370c212e4
|
/app/src/streamC/java/com/loki/singlemoduleapp/stub/SampleClass4265.java
|
bba688defc3abbfd13e9eb6a4a67ec9c3d063abd
|
[] |
no_license
|
SergiiGrechukha/SingleModuleApp
|
932488a197cb0936785caf0e73f592ceaa842f46
|
b7fefea9f83fd55dbbb96b506c931cc530a4818a
|
refs/heads/master
| 2022-05-13T17:15:21.445747
| 2017-07-30T09:55:36
| 2017-07-30T09:56:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 281
|
java
|
package com.loki.singlemoduleapp.stub;
public class SampleClass4265 {
private SampleClass4266 sampleClass;
public SampleClass4265(){
sampleClass = new SampleClass4266();
}
public String getClassName() {
return sampleClass.getClassName();
}
}
|
[
"sergey.grechukha@gmail.com"
] |
sergey.grechukha@gmail.com
|
1abc65e9a38eea766ebd3b7a53d12577fc4053f7
|
384d5f2858142969e62379ca4b7aaa29935ee0ec
|
/godsoft.com351/src/main/java/godsoft/com/sub/service/Sub0104VO.java
|
40bbb672e18f2fa2086924f6a5fb8e973e126eb4
|
[] |
no_license
|
LeeBaekHaeng/godsoft2016
|
a2a848fe93941b638a5c6e1891904239c5644af1
|
0591946ad8b4bbc8a07b9aa614bca8bff2727f3b
|
refs/heads/master
| 2020-07-03T19:10:41.576309
| 2018-12-22T21:17:44
| 2018-12-22T21:17:44
| 66,688,625
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,121
|
java
|
package godsoft.com.sub.service;
import egovframework.com.cmm.ComDefaultVO;
/**
* 서브0104 VO
*
* @author 이백행<dlqorgod@naver.com>
*
*/
@SuppressWarnings("serial")
public class Sub0104VO extends ComDefaultVO {
/**
* COMTCCMMNDETAILCODE.CODE_ID 공통상세코드.코드ID
*/
private String codeId;
/**
* COMTCCMMNDETAILCODE.USE_AT 공통상세코드.사용여부
*/
private String useAt;
/**
* COMTCCMMNDETAILCODE.CODE_ID 공통상세코드.코드ID 값읽기
*
* @return
*/
public String getCodeId() {
return codeId;
}
/**
* COMTCCMMNDETAILCODE.CODE_ID 공통상세코드.코드ID 값설정
*
* @param codeId
*/
public void setCodeId(String codeId) {
this.codeId = codeId;
}
/**
* COMTCCMMNDETAILCODE.USE_AT 공통상세코드.사용여부 값읽기
*
* @return
*/
public String getUseAt() {
return useAt;
}
/**
* COMTCCMMNDETAILCODE.USE_AT 공통상세코드.사용여부 값설정
*
* @param useAt
*/
public void setUseAt(String useAt) {
this.useAt = useAt;
}
}
|
[
"dlqorgod@naver.com"
] |
dlqorgod@naver.com
|
751a19ca25c550463cfc59ee498ea62951ae8872
|
e0461c729dd134c853655a9749be9331a3c407e9
|
/booking-engine-gateway/entity/src/main/java/com/tl/booking/gateway/entity/constant/values/AddressParamValues.java
|
ee6288c7cf90fe236fcd94a8c368ab8d1c7f4789
|
[] |
no_license
|
dpokuri/microservice
|
5942600f546a146e32c8923e784ba6a826e0b31c
|
bbffacaab70b2d03f0c09eb6f469b5df4d910d05
|
refs/heads/master
| 2021-04-06T18:08:23.329478
| 2018-12-04T20:06:51
| 2018-12-04T20:06:51
| 125,348,484
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 441
|
java
|
package com.tl.booking.gateway.entity.constant.values;
public class AddressParamValues {
public static final Integer ADDRESS_ID_CITY = 13;
public static final String ADDRESS_TYPE_CITY = "city";
public static final String ADDRESS_ID_COUNTRY = "";
public static final String ADDRESS_ID_PROVINCE = "id";
public static final String ADDRESS_TYPE_COUNTRY = "country";
public static final String ADDRESS_TYPE_PROVINCE = "province";
}
|
[
"nikkidavid@Nikkis-MacBook-Pro.local"
] |
nikkidavid@Nikkis-MacBook-Pro.local
|
c2aee1fe0d030d772664f304d58d6d66edb6084a
|
cc612955bab98b9d08a2d6076c4e500fafd95b3d
|
/Lucky/jacklamb/src/main/java/com/lucky/jacklamb/annotation/mapper/QueryTr.java
|
a3fc01e3b9e6fdc391dc703583eafb4442791e87
|
[] |
no_license
|
yuanqi99/lucky
|
5e4174eee129f2d26c54e356f301c8e315d09cd6
|
7d9ab0e660df5a86051c2bedbd46eab94dae24a2
|
refs/heads/main
| 2023-06-06T00:42:34.223293
| 2021-06-20T10:16:39
| 2021-06-20T10:16:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 272
|
java
|
package com.lucky.jacklamb.annotation.mapper;
import java.lang.annotation.*;
/**
* @author fk7075
* @version 1.0
* @date 2020/8/18 14:42
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface QueryTr {
String value();
}
|
[
"1814375626@qq.com"
] |
1814375626@qq.com
|
904752ba1d67a52d0ed1059188bded74af62e269
|
f40747ed1b112514f5c7a9190708cb384dbf5f7a
|
/spi/src/main/java/io/machinecode/chainlink/spi/inject/ArtifactReference.java
|
27ca7e05823d9557c4acad8ab16ad782ba82c4f5
|
[
"Apache-2.0"
] |
permissive
|
machinecode-io/chainlink
|
aa755924d587377a8dcca8178e3359f9f417023e
|
31d5c367bd94ce83f3d0fa7a22b38c680651eb5a
|
refs/heads/master
| 2020-12-30T18:16:06.669427
| 2015-03-09T23:30:27
| 2015-03-09T23:30:27
| 21,302,325
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 858
|
java
|
package io.machinecode.chainlink.spi.inject;
import io.machinecode.chainlink.spi.context.ExecutionContext;
/**
* @author <a href="mailto:brent.n.douglas@gmail.com">Brent Douglas</a>
* @since 1.0
*/
public interface ArtifactReference {
/**
* @return The identifier of this artifact.
*/
String ref();
/**
* @param as The interface to load the artifact as.
* @param injectionContext
* @param context
* @param <T> The type of the loaded artifact.
* @return The artifact identified by {@link #ref()} or null if none can be found.
* @throws ArtifactOfWrongTypeException If the artifact loaded does not implement {@param as}.
* @throws Exception If an error occurs.
*/
<T> T load(final Class<T> as, final InjectionContext injectionContext, final ExecutionContext context) throws Exception;
}
|
[
"brent.n.douglas@gmail.com"
] |
brent.n.douglas@gmail.com
|
6800175cfd819401dae3f230ebbdd43d6968ff7e
|
62175f6420b447978e2ecd607171fc90df7f8a80
|
/src/main/java/com/dell/isg/smi/service/server/action/SimpleCORSFilter.java
|
52eb50fa029353ae5ab748a4634c04a3b3922ddb
|
[
"Apache-2.0"
] |
permissive
|
prashanthlgowda/smi-service-dell-server-action
|
7cef306506fd3cf2b4213511cbbdeab5f1522ae8
|
827e9e3ffcff3f0ab0541a9555910bb509ba3d47
|
refs/heads/master
| 2020-12-30T15:08:23.180780
| 2017-10-02T16:21:35
| 2017-10-02T16:21:35
| 91,109,584
| 0
| 0
| null | 2017-05-12T16:21:12
| 2017-05-12T16:21:11
| null |
WINDOWS-1252
|
Java
| false
| false
| 1,258
|
java
|
/**
* Copyright © 2017 DELL Inc. or its subsidiaries. All Rights Reserved.
*/
package com.dell.isg.smi.service.server.action;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Component;
@Component
public class SimpleCORSFilter implements Filter {
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
HttpServletResponse response = (HttpServletResponse) res;
response.setHeader("Access-Control-Allow-Origin", "*");
response.setHeader("Access-Control-Allow-Methods", "PULL, POST, GET, OPTIONS, DELETE");
response.setHeader("Access-Control-Max-Age", "3600");
response.setHeader("Access-Control-Allow-Headers", "x-requested-with");
response.setHeader("Access-Control-Allow-Headers", "Content-Type, api_key, Authorization");
chain.doFilter(req, res);
}
public void init(FilterConfig filterConfig) {
}
public void destroy() {
}
}
|
[
"Michael_Hepfer@dell.com"
] |
Michael_Hepfer@dell.com
|
952f4639a63e5a386915d085c0b71036f3e196f7
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/JetBrains--intellij-community/25c3f18240f0ff935f294f91253b333734201cf1/after/StringPattern.java
|
99b7df238521a2021cda1dce9734b6aa695e656c
|
[] |
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
| 7,043
|
java
|
/*
* Copyright 2000-2009 JetBrains s.r.o.
*
* 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.intellij.patterns;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.util.ProcessingContext;
import dk.brics.automaton.Automaton;
import dk.brics.automaton.DatatypesAutomatonProvider;
import dk.brics.automaton.RegExp;
import dk.brics.automaton.RunAutomaton;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Collection;
import java.util.Collections;
import java.util.regex.Pattern;
/**
* @author peter
*/
public class StringPattern extends ObjectPattern<String, StringPattern> {
private static final InitialPatternCondition<String> CONDITION = new InitialPatternCondition<String>(String.class) {
@Override
public boolean accepts(@Nullable final Object o, final ProcessingContext context) {
return o instanceof String;
}
@Override
public void append(@NotNull @NonNls final StringBuilder builder, final String indent) {
builder.append("string()");
}
};
protected StringPattern() {
super(CONDITION);
}
@NotNull
public StringPattern startsWith(@NonNls @NotNull final String s) {
return with(new PatternCondition<String>("startsWith") {
@Override
public boolean accepts(@NotNull final String str, final ProcessingContext context) {
return str.startsWith(s);
}
});
}
@NotNull
public StringPattern endsWith(@NonNls @NotNull final String s) {
return with(new PatternCondition<String>("endsWith") {
@Override
public boolean accepts(@NotNull final String str, final ProcessingContext context) {
return str.endsWith(s);
}
});
}
@NotNull
public StringPattern contains(@NonNls @NotNull final String s) {
return with(new PatternCondition<String>("contains") {
@Override
public boolean accepts(@NotNull final String str, final ProcessingContext context) {
return str.contains(s);
}
});
}
@NotNull
public StringPattern containsChars(@NonNls @NotNull final String s) {
return with(new PatternCondition<String>("containsChars") {
@Override
public boolean accepts(@NotNull final String str, final ProcessingContext context) {
for (int i=0, len=s.length(); i<len; i++) {
if (str.indexOf(s.charAt(i))>-1) return true;
}
return false;
}
});
}
@NotNull
public StringPattern matches(@NonNls @NotNull final String s) {
final String escaped = StringUtil.escapeToRegexp(s);
if (escaped.equals(s)) {
return equalTo(s);
}
// may throw PatternSyntaxException here
final Pattern pattern = Pattern.compile(s);
return with(new ValuePatternCondition<String>("matches") {
@Override
public boolean accepts(@NotNull final String str, final ProcessingContext context) {
return pattern.matcher(newBombedCharSequence(str)).matches();
}
@Override
public Collection<String> getValues() {
return Collections.singleton(s);
}
});
}
@NotNull
public StringPattern matchesBrics(@NonNls @NotNull final String s) {
final String escaped = StringUtil.escapeToRegexp(s);
if (escaped.equals(s)) {
return equalTo(s);
}
StringBuilder sb = new StringBuilder(s.length()*5);
for (int i = 0; i < s.length(); i++) {
final char c = s.charAt(i);
if(c == ' ') {
sb.append("<whitespace>");
}
else
//This is really stupid and inconvenient builder - it breaks any normal pattern with uppercase
if(Character.isUpperCase(c)) {
sb.append('[').append(Character.toUpperCase(c)).append(Character.toLowerCase(c)).append(']');
}
else
{
sb.append(c);
}
}
final RegExp regExp = new RegExp(sb.toString());
final Automaton automaton = regExp.toAutomaton(new DatatypesAutomatonProvider());
final RunAutomaton runAutomaton = new RunAutomaton(automaton, true);
return with(new ValuePatternCondition<String>("matchesBrics") {
@Override
public boolean accepts(@NotNull String str, final ProcessingContext context) {
if (!str.isEmpty() && (str.charAt(0) == '"' || str.charAt(0) == '\'')) str = str.substring(1);
return runAutomaton.run(str);
}
@Override
public Collection<String> getValues() {
return Collections.singleton(s);
}
});
}
@NotNull
public StringPattern contains(@NonNls @NotNull final ElementPattern<Character> pattern) {
return with(new PatternCondition<String>("contains") {
@Override
public boolean accepts(@NotNull final String str, final ProcessingContext context) {
for (int i = 0; i < str.length(); i++) {
if (pattern.accepts(str.charAt(i))) return true;
}
return false;
}
});
}
public StringPattern longerThan(final int minLength) {
return with(new PatternCondition<String>("longerThan") {
@Override
public boolean accepts(@NotNull final String s, final ProcessingContext context) {
return s.length() > minLength;
}
});
}
public StringPattern shorterThan(final int maxLength) {
return with(new PatternCondition<String>("shorterThan") {
@Override
public boolean accepts(@NotNull final String s, final ProcessingContext context) {
return s.length() < maxLength;
}
});
}
public StringPattern withLength(final int length) {
return with(new PatternCondition<String>("withLength") {
@Override
public boolean accepts(@NotNull final String s, final ProcessingContext context) {
return s.length() == length;
}
});
}
@Override
@NotNull
public StringPattern oneOf(@NonNls final String... values) {
return super.oneOf(values);
}
@NotNull
public StringPattern oneOfIgnoreCase(@NonNls final String... values) {
return with(new CaseInsensitiveValuePatternCondition("oneOfIgnoreCase", values));
}
@Override
@NotNull
public StringPattern oneOf(@NonNls final Collection<String> set) {
return super.oneOf(set);
}
@NotNull
public static CharSequence newBombedCharSequence(@NotNull CharSequence sequence) {
return new StringUtil.BombedCharSequence(sequence) {
@Override
protected void checkCanceled() {
ProgressManager.checkCanceled();
}
};
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
f844f4ba67ca3768d5c789862c22d23da92d7378
|
01dfb27f1288a9ed62f83be0e0aeedf121b4623a
|
/Contabilidade/src/java/com/t2tierp/contabilidade/cliente/ContabilHistoricoGridController.java
|
182d8b17c086b4372b6c1aed523d387e362e30a1
|
[
"MIT"
] |
permissive
|
FabinhuSilva/T2Ti-ERP-2.0-Java-OpenSwing
|
deb486a13c264268d82e5ea50d84d2270b75772a
|
9531c3b6eaeaf44fa1e31b11baa630dcae67c18e
|
refs/heads/master
| 2022-11-16T00:03:53.426837
| 2020-07-08T00:36:48
| 2020-07-08T00:36:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,675
|
java
|
/*
* The MIT License
*
* Copyright: Copyright (C) 2014 T2Ti.COM
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* The author may be contacted at: t2ti.com@gmail.com
*
* @author Claudio de Barros (T2Ti.com)
* @version 2.0
*/
package com.t2tierp.contabilidade.cliente;
import com.t2tierp.padrao.java.Constantes;
import com.t2tierp.contabilidade.java.ContabilHistoricoVO;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import org.openswing.swing.client.GridControl;
import org.openswing.swing.mdi.client.MDIFrame;
import org.openswing.swing.message.receive.java.Response;
import org.openswing.swing.message.receive.java.ValueObject;
import org.openswing.swing.message.send.java.GridParams;
import org.openswing.swing.table.client.GridController;
import org.openswing.swing.table.java.GridDataLocator;
import org.openswing.swing.util.client.ClientUtils;
public class ContabilHistoricoGridController extends GridController implements GridDataLocator {
private ContabilHistoricoGrid grid;
private String acaoServidor;
public ContabilHistoricoGridController() {
grid = new ContabilHistoricoGrid(this);
acaoServidor = "contabilHistoricoGridAction";
MDIFrame.add(grid);
}
public Response loadData(int action, int startIndex, Map filteredColumns, ArrayList currentSortedColumns, ArrayList currentSortedVersusColumns, Class valueObjectType, Map otherGridParams) {
//define os parametros da grid
otherGridParams.put("acao", Constantes.LOAD);
return ClientUtils.getData(acaoServidor, new GridParams(action, startIndex, filteredColumns, currentSortedColumns, currentSortedVersusColumns, otherGridParams));
}
@Override
public boolean beforeInsertGrid(GridControl grid) {
new ContabilHistoricoDetalheController(this.grid, null);
return false;
}
@Override
public void doubleClick(int rowNumber, ValueObject persistentObject) {
ContabilHistoricoVO contabilHistorico = (ContabilHistoricoVO) persistentObject;
new ContabilHistoricoDetalheController(grid, contabilHistorico.getId().toString());
}
@Override
public Response deleteRecords(ArrayList persistentObjects) throws Exception {
//define os parametros da grid
Map otherGridParams = new HashMap();
otherGridParams.put("acao", Constantes.DELETE);
otherGridParams.put("persistentObjects", persistentObjects);
//seta os parametros da grid
GridParams pars = new GridParams(0, 0, null, null, null, otherGridParams);
return ClientUtils.getData(acaoServidor, pars);
}
}
|
[
"claudiobsi@gmail.com"
] |
claudiobsi@gmail.com
|
dfc9fc1b30dfcb04e949a43099b7a67e2da6cbed
|
ceeacb5157b67b43d40615daf5f017ae345816db
|
/generated/sdk/storage/azure-resourcemanager-storage-generated/src/main/java/com/azure/resourcemanager/storage/generated/models/LeaseStatus.java
|
3ffce72b371fb50aee67f666918d08ae89acf4ce
|
[
"LicenseRef-scancode-generic-cla"
] |
no_license
|
ChenTanyi/autorest.java
|
1dd9418566d6b932a407bf8db34b755fe536ed72
|
175f41c76955759ed42b1599241ecd876b87851f
|
refs/heads/ci
| 2021-12-25T20:39:30.473917
| 2021-11-07T17:23:04
| 2021-11-07T17:23:04
| 218,717,967
| 0
| 0
| null | 2020-11-18T14:14:34
| 2019-10-31T08:24:24
|
Java
|
UTF-8
|
Java
| false
| false
| 1,160
|
java
|
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.storage.generated.models;
import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;
/** Defines values for LeaseStatus. */
public final class LeaseStatus extends ExpandableStringEnum<LeaseStatus> {
/** Static value Locked for LeaseStatus. */
public static final LeaseStatus LOCKED = fromString("Locked");
/** Static value Unlocked for LeaseStatus. */
public static final LeaseStatus UNLOCKED = fromString("Unlocked");
/**
* Creates or finds a LeaseStatus from its string representation.
*
* @param name a name to look for.
* @return the corresponding LeaseStatus.
*/
@JsonCreator
public static LeaseStatus fromString(String name) {
return fromString(name, LeaseStatus.class);
}
/** @return known LeaseStatus values. */
public static Collection<LeaseStatus> values() {
return values(LeaseStatus.class);
}
}
|
[
"actions@github.com"
] |
actions@github.com
|
e8616dcb156f3ed96a66380c723cc028bf7c9b21
|
17e8438486cb3e3073966ca2c14956d3ba9209ea
|
/dso/tags/2.7.0/code/base/common/tests.unit/com/tc/process/LinkedJavaProcessTest.java
|
1a8a133c4fda143d439cad5bc40e4ea4daec91b0
|
[] |
no_license
|
sirinath/Terracotta
|
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
|
00a7662b9cf530dfdb43f2dd821fa559e998c892
|
refs/heads/master
| 2021-01-23T05:41:52.414211
| 2015-07-02T15:21:54
| 2015-07-02T15:21:54
| 38,613,711
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,579
|
java
|
/*
* All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright
* notice. All rights reserved.
*/
package com.tc.process;
import com.tc.lcp.HeartBeatServer;
import com.tc.lcp.LinkedJavaProcess;
import com.tc.test.TCTestCase;
import java.io.File;
/**
* Unit test for {@link LinkedJavaProcess}.
*/
public class LinkedJavaProcessTest extends TCTestCase {
private static final boolean DEBUG = false;
public void testRunsRightCommand() throws Exception {
LinkedJavaProcess process = new LinkedJavaProcess(LinkedJavaProcessTestMain1.class.getName());
process.start();
// This is actually stdout...weird Java
StreamCollector outCollector = new StreamCollector(process.getInputStream());
// This is stderr
StreamCollector errCollector = new StreamCollector(process.getErrorStream());
outCollector.start();
errCollector.start();
process.waitFor();
outCollector.join(30000);
errCollector.join(30000);
assertEquals("Ho there!", ignoreStandardWarnings(errCollector.toString()).trim());
assertEquals("Hi there!", ignoreStandardWarnings(outCollector.toString()).trim());
}
private static String ignoreStandardWarnings(String input) {
debugPrintln("***** inputString=[" + input + "]");
String delimiter = System.getProperty("line.separator", "\n");
debugPrintln("***** delimiter=[" + delimiter + "]");
String[] output = input.split(delimiter);
StringBuffer out = new StringBuffer();
for (int i = 0; i < output.length; ++i) {
debugPrintln("***** piece=[" + output[i] + "]");
if (output[i].startsWith("DATA: ")) {
out.append(output[i].substring("DATA: ".length()) + delimiter);
debugPrintln("***** appending [" + output[i].substring("DATA: ".length()) + delimiter + "] to output string");
}
}
debugPrintln("***** outString=[" + out.toString() + "]");
return out.toString();
}
public void testIO() throws Exception {
LinkedJavaProcess process = new LinkedJavaProcess(LinkedJavaProcessTestMain2.class.getName());
process.start();
StreamCollector outCollector = new StreamCollector(process.getInputStream()); // stdout
StreamCollector errCollector = new StreamCollector(process.getErrorStream()); // stderr
outCollector.start();
errCollector.start();
process.getOutputStream().write("Test Input!\n".getBytes());
process.getOutputStream().flush();
process.waitFor();
outCollector.join(30000);
errCollector.join(30000);
assertEquals("out: <Test Input!>", ignoreStandardWarnings(outCollector.toString()).trim());
assertEquals("err: <Test Input!>", ignoreStandardWarnings(errCollector.toString()).trim());
}
public void testExitCode() throws Exception {
LinkedJavaProcess process = new LinkedJavaProcess(LinkedJavaProcessTestMain3.class.getName());
process.start();
process.waitFor();
assertEquals(57, process.exitValue());
}
public void testSetup() throws Exception {
LinkedJavaProcess process = new LinkedJavaProcess(LinkedJavaProcessTestMain4.class.getName());
File dir = getTempFile("mydir");
assertTrue(dir.mkdirs());
String pwd = dir.getCanonicalPath();
process.setDirectory(dir);
process.setEnvironment(new String[] { "LD_LIBRARY_PATH=myenv" });
process.setJavaArguments(new String[] { "-Dljpt.foo=myprop" });
process.start();
StreamCollector outCollector = new StreamCollector(process.getInputStream()); // stdout
StreamCollector errCollector = new StreamCollector(process.getErrorStream()); // stderr
outCollector.start();
errCollector.start();
process.waitFor();
outCollector.join(30000);
errCollector.join(30000);
String output = outCollector.toString();
String err = errCollector.toString();
assertEquals("", ignoreStandardWarnings(err).trim());
assertContains("ljpt.foo=myprop", output);
assertContains(pwd.toLowerCase(), output.toLowerCase());
}
public void testKillingParentKillsChildren() throws Exception {
File destFile = getTempFile("tkpkc-file");
File child1File = new File(destFile.getAbsolutePath() + "-child-1");
File child2File = new File(destFile.getAbsolutePath() + "-child-2");
LinkedJavaProcess process = new LinkedJavaProcess(LinkedJavaProcessTestMain5.class.getName(), new String[] {
destFile.getAbsolutePath(), "true" });
process.start();
StreamCollector stdout = new StreamCollector(process.STDOUT());
stdout.start();
StreamCollector stderr = new StreamCollector(process.STDERR());
stderr.start();
long origSize = destFile.length();
Thread.sleep(6000);
long newSize = destFile.length();
System.err.println("Parent first: new=" + newSize + " old=" + origSize);
assertTrue(newSize > origSize); // Make sure it's all started + working
long child1OrigSize = child1File.length();
long child2OrigSize = child2File.length();
Thread.sleep(5000);
long child1NewSize = child1File.length();
long child2NewSize = child2File.length();
System.err.println("Child 1 first: new=" + child1NewSize + " old=" + child1OrigSize);
System.err.println("Child 2 first: new=" + child2NewSize + " old=" + child2OrigSize);
// Make sure the children are all started + working
assertTrue(child1NewSize > child1OrigSize);
assertTrue(child2NewSize > child2OrigSize);
System.out.println(stdout.toString());
System.out.println(stderr.toString());
process.destroy();
// wait for child process heartbeat to time out and kill themselves
Thread.sleep(HeartBeatServer.PULSE_INTERVAL * 2);
origSize = destFile.length();
Thread.sleep(5000);
newSize = destFile.length();
System.err.println("Parent after kill: new=" + newSize + " old=" + origSize);
assertEquals(origSize, newSize); // Make sure the parent is dead
child1OrigSize = child1File.length();
child2OrigSize = child2File.length();
Thread.sleep(5000);
child1NewSize = child1File.length();
child2NewSize = child2File.length();
System.err.println("Child 1 after kill: new=" + child1NewSize + " old=" + child1OrigSize);
System.err.println("Child 2 after kill: new=" + child2NewSize + " old=" + child2OrigSize);
assertEquals(child1NewSize, child1OrigSize); // Make sure child 1 is dead
assertEquals(child2NewSize, child2OrigSize); // Make sure child 1 is dead
}
private static void debugPrintln(String s) {
if (DEBUG) {
System.err.println(s);
}
}
}
|
[
"foshea@7fc7bbf3-cf45-46d4-be06-341739edd864"
] |
foshea@7fc7bbf3-cf45-46d4-be06-341739edd864
|
3cf1fdc46c3eea4ced4cba0b11884373665be89d
|
07f661550199c25a74319bdb0e2452844af5612a
|
/智品惠/src/main/java/com/zph/commerce/eventbus/MsgEvent11.java
|
da49c6236c8a2aa7523d8f95e718556a34045ec3
|
[] |
no_license
|
yekai0115/ZhiPinHui
|
3e141314f7d6538f0be4ffcddcee38908d8bb482
|
ff5cce36d68d3b727b40597b895e85dc8c63b803
|
refs/heads/master
| 2021-09-01T05:43:51.773806
| 2017-12-25T05:57:03
| 2017-12-25T05:57:03
| 107,392,266
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 211
|
java
|
package com.zph.commerce.eventbus;
/**
*/
public class MsgEvent11 {
private int code;
public int getCode() {
return code;
}
public MsgEvent11(int code) {
this.code = code;
}
}
|
[
"244489565@qq.com"
] |
244489565@qq.com
|
5d75775222436a55c76e0b6d6357e996782c8a00
|
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
|
/aliyun-java-sdk-premiumpics/src/main/java/com/aliyuncs/premiumpics/transform/v20200505/QueryBarrelImageListResponseUnmarshaller.java
|
6153eb891bcee48a510a6dd323c855c0f514b2e6
|
[
"Apache-2.0"
] |
permissive
|
aliyun/aliyun-openapi-java-sdk
|
a263fa08e261f12d45586d1b3ad8a6609bba0e91
|
e19239808ad2298d32dda77db29a6d809e4f7add
|
refs/heads/master
| 2023-09-03T12:28:09.765286
| 2023-09-01T09:03:00
| 2023-09-01T09:03:00
| 39,555,898
| 1,542
| 1,317
|
NOASSERTION
| 2023-09-14T07:27:05
| 2015-07-23T08:41:13
|
Java
|
UTF-8
|
Java
| false
| false
| 4,099
|
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.premiumpics.transform.v20200505;
import java.util.ArrayList;
import java.util.List;
import com.aliyuncs.premiumpics.model.v20200505.QueryBarrelImageListResponse;
import com.aliyuncs.premiumpics.model.v20200505.QueryBarrelImageListResponse.Image;
import com.aliyuncs.premiumpics.model.v20200505.QueryBarrelImageListResponse.Image.Specification;
import com.aliyuncs.transform.UnmarshallerContext;
public class QueryBarrelImageListResponseUnmarshaller {
public static QueryBarrelImageListResponse unmarshall(QueryBarrelImageListResponse queryBarrelImageListResponse, UnmarshallerContext _ctx) {
queryBarrelImageListResponse.setRequestId(_ctx.stringValue("QueryBarrelImageListResponse.RequestId"));
queryBarrelImageListResponse.setPageSize(_ctx.integerValue("QueryBarrelImageListResponse.PageSize"));
queryBarrelImageListResponse.setErrorMsg(_ctx.stringValue("QueryBarrelImageListResponse.ErrorMsg"));
queryBarrelImageListResponse.setErrorCode(_ctx.stringValue("QueryBarrelImageListResponse.ErrorCode"));
queryBarrelImageListResponse.setHasNext(_ctx.booleanValue("QueryBarrelImageListResponse.HasNext"));
queryBarrelImageListResponse.setSuccess(_ctx.booleanValue("QueryBarrelImageListResponse.Success"));
queryBarrelImageListResponse.setNextId(_ctx.integerValue("QueryBarrelImageListResponse.NextId"));
List<Image> images = new ArrayList<Image>();
for (int i = 0; i < _ctx.lengthValue("QueryBarrelImageListResponse.Images.Length"); i++) {
Image image = new Image();
image.setBuy(_ctx.booleanValue("QueryBarrelImageListResponse.Images["+ i +"].Buy"));
image.setMidImage(_ctx.stringValue("QueryBarrelImageListResponse.Images["+ i +"].MidImage"));
image.setBigImage(_ctx.stringValue("QueryBarrelImageListResponse.Images["+ i +"].BigImage"));
image.setSmallImage(_ctx.stringValue("QueryBarrelImageListResponse.Images["+ i +"].SmallImage"));
image.setTitle(_ctx.stringValue("QueryBarrelImageListResponse.Images["+ i +"].Title"));
image.setTag(_ctx.stringValue("QueryBarrelImageListResponse.Images["+ i +"].Tag"));
image.setImageId(_ctx.stringValue("QueryBarrelImageListResponse.Images["+ i +"].ImageId"));
List<Specification> specifications = new ArrayList<Specification>();
for (int j = 0; j < _ctx.lengthValue("QueryBarrelImageListResponse.Images["+ i +"].Specifications.Length"); j++) {
Specification specification = new Specification();
specification.setPrice(_ctx.stringValue("QueryBarrelImageListResponse.Images["+ i +"].Specifications["+ j +"].Price"));
specification.setWidth(_ctx.integerValue("QueryBarrelImageListResponse.Images["+ i +"].Specifications["+ j +"].Width"));
specification.setHeight(_ctx.integerValue("QueryBarrelImageListResponse.Images["+ i +"].Specifications["+ j +"].Height"));
specification.setName(_ctx.stringValue("QueryBarrelImageListResponse.Images["+ i +"].Specifications["+ j +"].Name"));
specification.setImageId(_ctx.stringValue("QueryBarrelImageListResponse.Images["+ i +"].Specifications["+ j +"].ImageId"));
specification.setId(_ctx.longValue("QueryBarrelImageListResponse.Images["+ i +"].Specifications["+ j +"].Id"));
specification.setSuffix(_ctx.stringValue("QueryBarrelImageListResponse.Images["+ i +"].Specifications["+ j +"].Suffix"));
specifications.add(specification);
}
image.setSpecifications(specifications);
images.add(image);
}
queryBarrelImageListResponse.setImages(images);
return queryBarrelImageListResponse;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
90cab28fa75ef0d2ab9e6317081af9a5db30e2bb
|
7181f1d750f07f905f9121852d056730476b64f1
|
/kang/app/src/main/java/com/lanmei/kang/qrcode/NCodeActivity.java
|
56852f4d118050862e9c2d3bb4a986d8d4692551
|
[] |
no_license
|
xiongkai888/kang
|
f23e22daa24801023ce0d33f242a69c92ea2e3db
|
319af46e05b3839c4b3f0df0f9c3da102fc8b6cd
|
refs/heads/master
| 2020-03-29T18:42:55.552075
| 2019-01-18T08:26:38
| 2019-01-18T08:26:38
| 150,218,985
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,939
|
java
|
package com.lanmei.kang.qrcode;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.widget.ImageView;
import com.lanmei.kang.R;
import com.xson.common.app.BaseActivity;
import com.xson.common.utils.UIHelper;
import com.xson.common.widget.CenterTitleToolbar;
import butterknife.InjectView;
import cn.bingoogolapple.qrcode.core.BGAQRCodeUtil;
import cn.bingoogolapple.qrcode.zxing.QRCodeEncoder;
public class NCodeActivity extends BaseActivity {
@InjectView(R.id.toolbar)
CenterTitleToolbar mToolbar;
@InjectView(R.id.img_code)
ImageView imageView;
@Override
public int getContentViewId() {
return R.layout.activity_code;
}
@Override
protected void initAllMembersView(Bundle savedInstanceState) {
setSupportActionBar(mToolbar);
ActionBar actionbar = getSupportActionBar();
actionbar.setDisplayShowTitleEnabled(true);
actionbar.setDisplayHomeAsUpEnabled(true);
actionbar.setTitle("消费二维码");
actionbar.setHomeAsUpIndicator(R.mipmap.back_g);
String des3Code = getIntent().getStringExtra("value");
final String code = Des.encrypt(des3Code);
new AsyncTask<Void, Void, Bitmap>() {
@Override
protected Bitmap doInBackground(Void... params) {
return QRCodeEncoder.syncEncodeQRCode(code, BGAQRCodeUtil.dp2px(NCodeActivity.this, 250), Color.parseColor("#000000"));
}
@Override
protected void onPostExecute(Bitmap bitmap) {
if (bitmap != null) {
imageView.setImageBitmap(bitmap);
} else {
UIHelper.ToastMessage(NCodeActivity.this, "生成二维码失败");
finish();
}
}
}.execute();
}
}
|
[
"173422042@qq.com"
] |
173422042@qq.com
|
5bffa9b284c31f837ac335fa44438f4680192a8f
|
7d90834081b20312625c33c947df9afd3e11d0c0
|
/src/main/java/com/kh/onepart/manager/survey/model/service/ManagerSurveyServiceImpl.java
|
67917aacd82d7d289e2fb1345d4072b8ead247ff
|
[] |
no_license
|
kyj9168/onepart
|
9dd52420e6d43b4f708412953bf0f355f7af9e86
|
eee62e5ed10f3a85d3a0d65b1e7e4890e4ff8bd8
|
refs/heads/master
| 2023-04-19T12:44:45.503673
| 2021-05-04T16:56:47
| 2021-05-04T16:56:47
| 364,326,416
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,946
|
java
|
package com.kh.onepart.manager.survey.model.service;
import java.util.ArrayList;
import java.util.List;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.kh.onepart.common.PageInfo;
import com.kh.onepart.manager.survey.model.dao.ManagerSurveyDao;
import com.kh.onepart.manager.survey.model.vo.RequestSurveyQstn;
import com.kh.onepart.manager.survey.model.vo.RequestSurveyQstnOption;
import com.kh.onepart.manager.survey.model.vo.RequestSurveyVO;
import com.kh.onepart.manager.survey.model.vo.SurveyQstn;
import com.kh.onepart.manager.survey.model.vo.SurveyQstnOption;
import com.kh.onepart.manager.survey.model.vo.SurveyVO;
@Service
public class ManagerSurveyServiceImpl implements ManagerSurveyService{
@Autowired
ManagerSurveyDao managerSurveyDao;
@Autowired
private SqlSessionTemplate sqlSession;
/** 설문조사 리스트 전체 카운트 */
@Override
public int surveyListCount() {
// TODO Auto-generated method stub
int surveyListCount = managerSurveyDao.selectSurveyListCount(sqlSession);
return surveyListCount;
}
/** 설문조사 메인화면 */
@Override
public ArrayList<SurveyVO> getSurveyList(PageInfo pi) {
// TODO Auto-generated method stub
ArrayList<SurveyVO> surveyVOList = managerSurveyDao.selectSurveyList(sqlSession, pi);
return surveyVOList;
}
/** 설문조사 검색*/
@Override
public ArrayList<SurveyVO> getSearchSurvey(PageInfo pi, SurveyVO requestSurveyVO){
// TODO Auto-generated method stub
ArrayList<SurveyVO> surveyVOList = managerSurveyDao.selectSearchSurveyList(sqlSession, requestSurveyVO, pi);
return surveyVOList;
}
/** 설문조사 등록 */
@Override
public void insertSurvey(RequestSurveyVO requestSurveyVO, ArrayList<RequestSurveyQstn> requestSurveyQstn,
List<RequestSurveyQstnOption> surveyQstnOption) {
// TODO Auto-generated method stub
// INSERT SURVEY
int surveySeq = managerSurveyDao.insertSurvey(sqlSession, requestSurveyVO);
// INSERT SURVEY_QSTN
for(int i=0; i<requestSurveyQstn.size(); i++) {
requestSurveyQstn.get(i).setSurveySeq(surveySeq);
int surveyQstnSeq = managerSurveyDao.insertsurveyQstn(sqlSession, requestSurveyQstn.get(i));
// 객관식, 체크박스 일 경우
if (requestSurveyQstn.get(i).getSurveyQstnType() == 3 || requestSurveyQstn.get(i).getSurveyQstnType() == 4) {
// 받아온 전체 옵션 개수만큼 반복
for(int j=0; j<surveyQstnOption.size(); j++) {
// 문제 번호가 같은 것 끼리 INSERT
if(requestSurveyQstn.get(i).getSurveyQstnNum() == surveyQstnOption.get(j).getSurveyQstnNum()) {
surveyQstnOption.get(j).setSurveyQstnSeq(surveyQstnSeq);
managerSurveyDao.insertSurveyQstnOption(sqlSession, surveyQstnOption.get(j));
}
} // end for j
} // end if
} // end for i
}
/** 설문조사 상세정보 */
@Override
public ArrayList<Object> selectSurveyDetail(int surveySeq) {
// TODO Auto-generated method stub
ArrayList<Object> surveyDetailList = new ArrayList<Object>();
// 설문조사 기본 정보
SurveyVO surveyVO = managerSurveyDao.selectSurveyBasicInfo(sqlSession, surveySeq);
// 설문조사 문제 정보
ArrayList<SurveyQstn> surveyQstnList = managerSurveyDao.selectSurveyQstnList(sqlSession, surveySeq);
// 설문조사 옵션 정보
ArrayList<SurveyQstnOption> surveyQstnOptionList = managerSurveyDao.selectsurveyQstnOptionList(sqlSession, surveyQstnList);
System.out.println("==================== 상세정보 ====================");
System.out.println("surveyVO ::: " + surveyVO);
System.out.println("surveyQstnList ::: " + surveyQstnList);
System.out.println("surveyQstnOptionList ::: " + surveyQstnOptionList);
surveyDetailList.add(surveyVO);
surveyDetailList.add(surveyQstnList);
surveyDetailList.add(surveyQstnOptionList);
return surveyDetailList;
}
}
|
[
"youngjunkim-ibricks@gmail.com"
] |
youngjunkim-ibricks@gmail.com
|
9a185cffa5d5d49a4da4a1d511c33ae9147e5e39
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-14612-2-12-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/internal/parser/DefaultContentParser_ESTest.java
|
379edcde2c0a19b53a97166da61d646045f38935
|
[] |
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
| 1,013
|
java
|
/*
* This file was automatically generated by EvoSuite
* Fri Apr 03 21:55:26 UTC 2020
*/
package org.xwiki.rendering.internal.parser;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
import org.xwiki.model.reference.EntityReference;
import org.xwiki.rendering.internal.parser.DefaultContentParser;
import org.xwiki.rendering.syntax.Syntax;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DefaultContentParser_ESTest extends DefaultContentParser_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
DefaultContentParser defaultContentParser0 = new DefaultContentParser();
Syntax syntax0 = Syntax.XWIKI_2_0;
// Undeclared exception!
defaultContentParser0.parse("49ldTF)5xlG\u0000'pr", syntax0, (EntityReference) null);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
bf7bd7119b6e9059cccf96d2b92b400e0b14dbd0
|
340a6f937b50cf3c5dadc2499b6bece13d976767
|
/src/main/java/ru/dsoccer1980/repository/UserRepository.java
|
a64d4098588e2a4e55552b3f6de06cd9b6ee8ad7
|
[] |
no_license
|
dsoccer1980/restaurant_rating_system
|
d6b68ebb9a0c3566fcbcafe03561677845954f7d
|
f03bf6d3ebf3c23dea60f98455e74420d76c9ecb
|
refs/heads/master
| 2022-09-16T04:48:44.932680
| 2019-09-05T07:49:59
| 2019-09-05T07:49:59
| 199,267,677
| 0
| 0
| null | 2022-09-08T01:02:02
| 2019-07-28T09:31:20
|
Java
|
UTF-8
|
Java
| false
| false
| 415
|
java
|
package ru.dsoccer1980.repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;
import ru.dsoccer1980.domain.User;
import java.util.Optional;
@Transactional(readOnly = true)
public interface UserRepository extends JpaRepository<User, Long> {
User findByEmail(String email);
Optional<User> findByName(String username);
}
|
[
"dsoccer1980@gmail.com"
] |
dsoccer1980@gmail.com
|
416c61f6fdcb1c0ba3140b02f111872db4f89e0f
|
ed882885b1f9760d85dfb3125477aecc0e63d6a5
|
/net/minecraft/world/chunk/ChunkPrimer.java
|
3fa8f5e421bead60099e7ffae08fbabd26295a08
|
[] |
no_license
|
UserNumberOne/Nothing
|
6c43dd3c92e568252c3873859320b40e10d4a920
|
7d9a8a40599353cd6f5199653dbecee93b2df7c9
|
refs/heads/master
| 2021-01-10T15:25:23.957005
| 2017-09-13T15:55:46
| 2017-09-13T15:55:46
| 46,665,593
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,219
|
java
|
package net.minecraft.world.chunk;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
public class ChunkPrimer {
private static final IBlockState DEFAULT_STATE = Blocks.AIR.getDefaultState();
private final char[] data = new char[65536];
public IBlockState getBlockState(int var1, int var2, int var3) {
IBlockState var4 = (IBlockState)Block.BLOCK_STATE_IDS.getByValue(this.data[getBlockIndex(var1, var2, var3)]);
return var4 == null ? DEFAULT_STATE : var4;
}
public void setBlockState(int var1, int var2, int var3, IBlockState var4) {
this.data[getBlockIndex(var1, var2, var3)] = (char)Block.BLOCK_STATE_IDS.get(var4);
}
private static int getBlockIndex(int var0, int var1, int var2) {
return var0 << 12 | var2 << 8 | var1;
}
public int findGroundBlockIdx(int var1, int var2) {
int var3 = (var1 << 12 | var2 << 8) + 256 - 1;
for(int var4 = 255; var4 >= 0; --var4) {
IBlockState var5 = (IBlockState)Block.BLOCK_STATE_IDS.getByValue(this.data[var3 + var4]);
if (var5 != null && var5 != DEFAULT_STATE) {
return var4;
}
}
return 0;
}
}
|
[
"hazeevaidar@yandex.ru"
] |
hazeevaidar@yandex.ru
|
9204ea175e9864566ff2351d5ce37f3e6cb924b2
|
309120df8e3ee5d84f1099a585b73aec6d092fd2
|
/mqtt-spy/src/test/java/pl/baczkowicz/mqtt/spy/versions/VersionComparison.java
|
6fec85ef00f3d795ad3d8ef9b9e168ff398f062b
|
[] |
no_license
|
0x7678/mqtt-spy
|
52fd6fa653a615e4eac1917aa989e1f6b59c147a
|
f31a25b9b930a572703d50c744b4f752df11a4ef
|
refs/heads/main
| 2021-01-22T13:17:20.129801
| 2014-10-19T16:18:15
| 2014-10-19T16:18:15
| 38,623,648
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 955
|
java
|
package pl.baczkowicz.mqtt.spy.versions;
import static org.junit.Assert.*;
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
import org.junit.Before;
import org.junit.Test;
public class VersionComparison
{
@Before
public void setUp() throws Exception
{
}
@Test
public final void test()
{
final String v8b1 = "0.0.8-beta-1";
final String v8b10 = "0.0.8-beta-10";
final String v8b2 = "0.0.8-beta-2";
final String v8 = "0.0.8-11";
assertTrue(0 == new DefaultArtifactVersion(v8b1).compareTo(new DefaultArtifactVersion(v8b1)));
assertTrue(0 > new DefaultArtifactVersion(v8b1).compareTo(new DefaultArtifactVersion(v8b10)));
assertTrue(0 > new DefaultArtifactVersion(v8b1).compareTo(new DefaultArtifactVersion(v8b2)));
assertTrue(0 > new DefaultArtifactVersion(v8b2).compareTo(new DefaultArtifactVersion(v8b10)));
assertTrue(0 > new DefaultArtifactVersion(v8b2).compareTo(new DefaultArtifactVersion(v8)));
}
}
|
[
"kamil.baczkowicz@gmail.com"
] |
kamil.baczkowicz@gmail.com
|
550157b219a74ed3d501567881cbb322f87c5191
|
b8e078de1651c0a8434b71f816e3472dc295b734
|
/src/main/java/FindingKthSmallestElementInUnsortedArray.java
|
76350e8ccb26ddc8f85505fbe794b3c4d09dc527
|
[] |
no_license
|
nikhilagrwl07/Daily-Coding-Problem
|
07008042c1fc0ddd01651df50b24d0277ebe11b2
|
25f02d805b65c8a87e43b2b4d41b36f5c702457a
|
refs/heads/master
| 2020-05-21T00:17:17.640958
| 2019-06-28T18:08:40
| 2019-06-28T18:08:40
| 185,822,041
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,168
|
java
|
package main.java;
public class FindingKthSmallestElementInUnsortedArray {
public static void main(String[] args) {
Integer[] arr = new Integer[]{12, 3, 5, 7, 4, 19, 26};
int k = 3;
System.out.print("K'th smallest element is " +
kthSmallest(arr, 0, arr.length - 1, k));
}
// This function returns k'th smallest element
// in a[left..right] using QuickSort based method.
// ASSUMPTION: ALL ELEMENTS IN ARR[] ARE DISTINCT
public static int kthSmallest(Integer[] a, int left, int right, int k) {
// If k is smaller than number of elements
// in array
if (k > 0 && k <= right - left + 1) {
// Partition the array around last
// element and get position of pivot
// element in sorted array
int pos = partition(a, left, right);
// If position is same as k
if (pos - left == k - 1)
return a[pos];
// If position is more, recur for
// left subarray
if (pos - left > k - 1)
return kthSmallest(a, left, pos - 1, k);
// Else recur for right subarray
return kthSmallest(a, pos + 1, right, k - 1 + left - pos); // Not able to understand this part, hence
// ignoring the solution
}
// If k is more than number of elements
// in array
return Integer.MAX_VALUE;
}
// Standard partition process of QuickSort.
// It considers the last element as pivot
// and moves all smaller element to left of
// it and greater elements to right
public static int partition(Integer[] arr, int l,
int r) {
int x = arr[r], i = l;
for (int j = l; j <= r - 1; j++) {
if (arr[j] <= x) {
//Swapping arr[i] and arr[j]
int temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
i++;
}
}
//Swapping arr[i] and arr[r]
int temp = arr[i];
arr[i] = arr[r];
arr[r] = temp;
return i;
}
}
|
[
"nikhil.agrwl07@gmail.com"
] |
nikhil.agrwl07@gmail.com
|
9e596a6c7d5f63bc09eb7eacc2f31ab9ccd1d160
|
fadfc40528c5473c8454a4835ba534a83468bb3b
|
/domain-services/jbb-frontend/src/main/java/org/jbb/frontend/impl/faq/dao/FaqCategoryRepository.java
|
bd820e6953748b55485737293100c34a0f996385
|
[
"Apache-2.0"
] |
permissive
|
jbb-project/jbb
|
8d04e72b2f2d6c088b870e9a6c9dba8aa2e1768e
|
cefa12cda40804395b2d6e8bea0fb8352610b761
|
refs/heads/develop
| 2023-08-06T15:26:08.537367
| 2019-08-25T21:32:19
| 2019-08-25T21:32:19
| 60,918,871
| 4
| 3
|
Apache-2.0
| 2023-09-01T22:21:04
| 2016-06-11T17:20:33
|
Java
|
UTF-8
|
Java
| false
| false
| 671
|
java
|
/*
* Copyright (C) 2016 the original author or authors.
*
* This file is part of jBB Application Project.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*/
package org.jbb.frontend.impl.faq.dao;
import org.jbb.frontend.impl.faq.model.FaqCategoryEntity;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface FaqCategoryRepository extends CrudRepository<FaqCategoryEntity, Long> {
List<FaqCategoryEntity> findByOrderByPosition();
}
|
[
"baart92@gmail.com"
] |
baart92@gmail.com
|
0e3030903148dddfe3c7a47e81278ba7bec1329b
|
5da7b4a375df03902f21c21939451f653f12554d
|
/MaiBo/src/com/mb/android/maiboapp/activity/AddMBMenu.java
|
b90f22ffe931921bb0e73d489f7ede026107847b
|
[] |
no_license
|
cgy529387306/Maibo
|
d7d404d1b8279a05afe9f215a4a903298b8173b3
|
16d9b2e3f0b02788797723b70921c53b8d326c1e
|
refs/heads/master
| 2020-04-26T03:30:28.567125
| 2019-03-01T09:01:32
| 2019-03-01T09:01:32
| 173,269,015
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,032
|
java
|
package com.mb.android.maiboapp.activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.View;
import android.view.animation.AnimationUtils;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.mb.android.maiboapp.BaseActivity;
import com.mb.android.maiboapp.R;
import com.mb.android.maiboapp.constants.ProjectConstants;
import com.mb.android.maiboapp.entity.UserEntity;
import com.mb.android.maiboapp.utils.NavigationHelper;
import com.mb.android.maiboapp.utils.ProjectHelper;
import com.tandy.android.fw2.utils.PreferencesHelper;
/**
* Created by Administrator on 2015/8/30.
*/
public class AddMBMenu extends BaseActivity implements View.OnClickListener {
private TextView addText,addPicture,addFriend,addLong,addCamera;
private LinearLayout addCancle = null;
private LinearLayout add = null;
private RelativeLayout addBg = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_menu);
addText = findView(R.id.menu_add_text);
addPicture = findView(R.id.menu_add_pic);
addCamera = findView(R.id.menu_add_camera);
addFriend = findView(R.id.menu_add_friend);
addLong = findView(R.id.menu_add_long);
addCancle = findView(R.id.menu_add_cancle);
add = findView(R.id.menu_add_layout);
addBg = findView(R.id.menu_add_bg);
addText.setOnClickListener(this);
addPicture.setOnClickListener(this);
addCamera.setOnClickListener(this);
addFriend.setOnClickListener(this);
addLong.setOnClickListener(this);
addCancle.setOnClickListener(this);
addBg.setOnClickListener(this);
addText.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
ProjectHelper.startScaleAnimation(addText);
return false;
}
});
addPicture.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
ProjectHelper.startScaleAnimation(addPicture);
return false;
}
});
addCamera.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
ProjectHelper.startScaleAnimation(addCamera);
return false;
}
});
addFriend.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
ProjectHelper.startScaleAnimation(addFriend);
return false;
}
});
addLong.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
ProjectHelper.startScaleAnimation(addLong);
return false;
}
});
add.setAnimation(AnimationUtils.loadAnimation(this, R.anim.add_menu_in_from_down));
}
@Override
public void onClick(View view) {
Intent intent = null;
switch (view.getId()) {
case R.id.menu_add_text:
if (UserEntity.getInstance().born()){
intent = new Intent(getApplicationContext(), MBPostActivtiy.class);
intent.putExtra("type", MBPostActivtiy.AddType.Text.toString());
startActivity(intent);
}else {
Bundle bundle = new Bundle();
bundle.putBoolean(ProjectConstants.BundleExtra.KEY_IS_CLOSE, false);
NavigationHelper.startActivity(AddMBMenu.this, UserLoginActivity.class, bundle, false);
}
break;
case R.id.menu_add_pic:
if (UserEntity.getInstance().born()){
intent = new Intent(getApplicationContext(), MBPostActivtiy.class);
intent.putExtra("type", MBPostActivtiy.AddType.Picture.toString());
startActivity(intent);
}else {
Bundle bundle = new Bundle();
bundle.putBoolean(ProjectConstants.BundleExtra.KEY_IS_CLOSE, false);
NavigationHelper.startActivity(AddMBMenu.this, UserLoginActivity.class, bundle, false);
}
break;
case R.id.menu_add_camera:
if (UserEntity.getInstance().born()){
intent = new Intent(getApplicationContext(), MBPostActivtiy.class);
intent.putExtra("type", MBPostActivtiy.AddType.Camera.toString());
startActivity(intent);
}else {
Bundle bundle = new Bundle();
bundle.putBoolean(ProjectConstants.BundleExtra.KEY_IS_CLOSE, false);
NavigationHelper.startActivity(AddMBMenu.this, UserLoginActivity.class, bundle, false);
}
break;
case R.id.menu_add_friend:
if (UserEntity.getInstance().born()){
intent = new Intent(getApplicationContext(), MBPostActivtiy.class);
intent.putExtra("type", MBPostActivtiy.AddType.Friend.toString());
startActivity(intent);
}else {
Bundle bundle = new Bundle();
bundle.putBoolean(ProjectConstants.BundleExtra.KEY_IS_CLOSE, false);
NavigationHelper.startActivity(AddMBMenu.this, UserLoginActivity.class, bundle, false);
}
break;
case R.id.menu_add_long:
if (UserEntity.getInstance().born()){
intent = new Intent(getApplicationContext(), MBPostLongActivtiy.class);
startActivity(intent);
}else {
Bundle bundle = new Bundle();
bundle.putBoolean(ProjectConstants.BundleExtra.KEY_IS_CLOSE, false);
NavigationHelper.startActivity(AddMBMenu.this, UserLoginActivity.class, bundle, false);
}
break;
case R.id.menu_add_cancle:
boolean isOpen = PreferencesHelper.getInstance().getBoolean(ProjectConstants.Preferences.KEY_IS_OPEN_SOUND,true);
if (isOpen) {
showSound();
}
onBackPressed();
break;
case R.id.menu_add_bg:
break;
}
finish();
}
private void showSound() {
MediaPlayer player = MediaPlayer.create(AddMBMenu.this,
R.raw.radar_pop);
player.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
mp.release();
}
});
player.start();
}
}
|
[
"661005@nd.com"
] |
661005@nd.com
|
a273b61b01e4c535b2d7d52cef4a3fea5a171797
|
668496e4beee69591f98c5738a75f972093b805d
|
/carnival-spring-boot-starter-restful-flow/src/main/java/com/github/yingzhuo/carnival/restful/flow/signature/AbstractRSAAlgorithmGenerator.java
|
18ee0dacb8409f3f2bfc90024681595910282c58
|
[
"Apache-2.0"
] |
permissive
|
floodboad/carnival
|
ca1e4b181746f47248b0f3d82a54f6fe4c31b41f
|
9e18d5ce4dbc1e518102bc60ac13954156d93bd2
|
refs/heads/master
| 2023-01-04T07:18:35.514865
| 2020-10-28T04:15:31
| 2020-10-28T04:15:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,141
|
java
|
/*
* ____ _ ____ _ _ _____ ___ _
* / ___| / \ | _ \| \ | |_ _\ \ / / \ | |
* | | / _ \ | |_) | \| || | \ \ / / _ \ | |
* | |___/ ___ \| _ <| |\ || | \ V / ___ \| |___
* \____/_/ \_\_| \_\_| \_|___| \_/_/ \_\_____|
*
* https://github.com/yingzhuo/carnival
*/
package com.github.yingzhuo.carnival.restful.flow.signature;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
import java.util.Base64;
/**
* @author 应卓
* @since 1.6.1
*/
abstract class AbstractRSAAlgorithmGenerator implements AlgorithmGenerator {
private final static String RSA = "RSA";
private byte[] decryptBase64(String key) {
return Base64.getDecoder().decode(key);
}
protected RSAPublicKey toPublicKey(String key) {
try {
byte[] bytes = decryptBase64(key);
X509EncodedKeySpec spec = new X509EncodedKeySpec(bytes);
KeyFactory factory = KeyFactory.getInstance(RSA);
java.security.PublicKey result = factory.generatePublic(spec);
return (RSAPublicKey) result;
} catch (NoSuchAlgorithmException e) {
throw new AssertionError();
} catch (InvalidKeySpecException e) {
throw new IllegalArgumentException(e.getMessage(), e);
}
}
protected RSAPrivateKey toPrivateKey(String key) {
try {
byte[] bytes = decryptBase64(key);
PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(bytes);
KeyFactory factory = KeyFactory.getInstance(RSA);
java.security.PrivateKey result = factory.generatePrivate(spec);
return (RSAPrivateKey) result;
} catch (NoSuchAlgorithmException e) {
throw new AssertionError();
} catch (InvalidKeySpecException e) {
throw new IllegalArgumentException(e.getMessage(), e);
}
}
}
|
[
"yingzhor@gmail.com"
] |
yingzhor@gmail.com
|
ce8f4eb00cfb7aa047944ec9c451d8cfc24da5e0
|
3f62e9241f37b5d39ca8c885f308ee3971fdf7b8
|
/iotsys-obix/src/obix/contracts/Point.java
|
a7e77b07602e05edca8352d745acddb3166ffe55
|
[] |
no_license
|
niclash/iotsys
|
e014617c175a9e5b8648195459fdc53cce6b0a53
|
4d8a60d31b921306bae1069d082e451968ec8e5a
|
refs/heads/master
| 2021-01-22T18:23:46.892442
| 2014-09-10T15:34:52
| 2014-09-10T15:34:52
| 32,944,656
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 237
|
java
|
package obix.contracts;
import obix.*;
/**
* Point
*
* @author obix.tools.Obixc
* @creation 24 May 06
* @version $Revision$ $Date$
*/
public interface Point extends IObj
{
public static final String CONTRACT = "obix:Point";
}
|
[
"jschober88@gmail.com"
] |
jschober88@gmail.com
|
6709f2bc00f1b1b3b96d7ad114cd1efcbb70e8f6
|
08924e455a3659d2354e5c45bd89051a6f18bdca
|
/servlet/src/main/java/io/undertow/servlet/api/ServletInfo.java
|
524fcbefaa65d41cee59dde7f36f20ab370bda1c
|
[
"Apache-2.0"
] |
permissive
|
gnomix/undertow
|
c4ed56da83acca7c9279301b665a12f540069ad9
|
cbd85ca1ad28687742edeec39e517a55fe4a2401
|
refs/heads/master
| 2021-01-16T18:50:18.988289
| 2012-11-19T04:00:05
| 2012-11-19T04:00:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,516
|
java
|
/*
* JBoss, Home of Professional Open Source.
* Copyright 2012 Red Hat, Inc., and individual contributors
* as indicated by the @author tags.
*
* 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.undertow.servlet.api;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.MultipartConfigElement;
import javax.servlet.Servlet;
import io.undertow.servlet.UndertowServletMessages;
import io.undertow.servlet.util.ConstructorInstanceFactory;
/**
* @author Stuart Douglas
*/
public class ServletInfo implements Cloneable {
private final Class<? extends Servlet> servletClass;
private final String name;
private final List<String> mappings = new ArrayList<String>();
private final Map<String, String> initParams = new HashMap<String, String>();
private final List<SecurityRoleRef> securityRoleRefs = new ArrayList<SecurityRoleRef>();
private final List<HandlerChainWrapper> handlerChainWrappers = new ArrayList<HandlerChainWrapper>();
private volatile InstanceFactory<? extends Servlet> instanceFactory;
private volatile String jspFile;
private volatile Integer loadOnStartup;
private volatile boolean enabled;
private volatile boolean asyncSupported;
private volatile String runAs;
private volatile MultipartConfigElement multipartConfig;
public ServletInfo(final String name, final Class<? extends Servlet> servletClass) {
if (name == null) {
throw UndertowServletMessages.MESSAGES.paramCannotBeNull("name");
}
if (servletClass == null) {
throw UndertowServletMessages.MESSAGES.paramCannotBeNull("servletClass", "Servlet", name);
}
if (!Servlet.class.isAssignableFrom(servletClass)) {
throw UndertowServletMessages.MESSAGES.servletMustImplementServlet(name, servletClass);
}
try {
final Constructor<? extends Servlet> ctor = servletClass.getDeclaredConstructor();
ctor.setAccessible(true);
this.instanceFactory = new ConstructorInstanceFactory(ctor);
this.name = name;
this.servletClass = servletClass;
} catch (NoSuchMethodException e) {
throw UndertowServletMessages.MESSAGES.componentMustHaveDefaultConstructor("Servlet", servletClass);
}
}
public ServletInfo(final String name, final Class<? extends Servlet> servletClass, final InstanceFactory<? extends Servlet> instanceFactory) {
if (name == null) {
throw UndertowServletMessages.MESSAGES.paramCannotBeNull("name");
}
if (servletClass == null) {
throw UndertowServletMessages.MESSAGES.paramCannotBeNull("servletClass", "Servlet", name);
}
if (!Servlet.class.isAssignableFrom(servletClass)) {
throw UndertowServletMessages.MESSAGES.servletMustImplementServlet(name, servletClass);
}
this.instanceFactory = instanceFactory;
this.name = name;
this.servletClass = servletClass;
}
public void validate() {
//TODO
}
@Override
public ServletInfo clone() {
ServletInfo info = new ServletInfo(name, servletClass, instanceFactory)
.setJspFile(jspFile)
.setLoadOnStartup(loadOnStartup)
.setEnabled(enabled)
.setAsyncSupported(asyncSupported)
.setRunAs(runAs)
.setMultipartConfig(multipartConfig);
info.mappings.addAll(mappings);
info.initParams.putAll(initParams);
info.securityRoleRefs.addAll(securityRoleRefs);
info.handlerChainWrappers.addAll(handlerChainWrappers);
return info;
}
public Class<? extends Servlet> getServletClass() {
return servletClass;
}
public String getName() {
return name;
}
public void setInstanceFactory(final InstanceFactory<? extends Servlet> instanceFactory) {
if(instanceFactory == null) {
throw UndertowServletMessages.MESSAGES.paramCannotBeNull("instanceFactory");
}
this.instanceFactory = instanceFactory;
}
public InstanceFactory<? extends Servlet> getInstanceFactory() {
return instanceFactory;
}
public List<String> getMappings() {
return Collections.unmodifiableList(mappings);
}
public ServletInfo addMapping(final String mapping) {
mappings.add(mapping);
return this;
}
public ServletInfo addMappings(final Collection<String> mappings) {
this.mappings.addAll(mappings);
return this;
}
public ServletInfo addMappings(final String ... mappings) {
this.mappings.addAll(Arrays.asList(mappings));
return this;
}
public ServletInfo addInitParam(final String name, final String value) {
initParams.put(name, value);
return this;
}
public Map<String, String> getInitParams() {
return Collections.unmodifiableMap(initParams);
}
public String getJspFile() {
return jspFile;
}
public ServletInfo setJspFile(final String jspFile) {
this.jspFile = jspFile;
return this;
}
public Integer getLoadOnStartup() {
return loadOnStartup;
}
public ServletInfo setLoadOnStartup(final Integer loadOnStartup) {
this.loadOnStartup = loadOnStartup;
return this;
}
public boolean isAsyncSupported() {
return asyncSupported;
}
public ServletInfo setAsyncSupported(final boolean asyncSupported) {
this.asyncSupported = asyncSupported;
return this;
}
public boolean isEnabled() {
return enabled;
}
public ServletInfo setEnabled(final boolean enabled) {
this.enabled = enabled;
return this;
}
public String getRunAs() {
return runAs;
}
public ServletInfo setRunAs(final String runAs) {
this.runAs = runAs;
return this;
}
public MultipartConfigElement getMultipartConfig() {
return multipartConfig;
}
public ServletInfo setMultipartConfig(final MultipartConfigElement multipartConfig) {
this.multipartConfig = multipartConfig;
return this;
}
public void addSecurityRoleRef(final String role, final String linkedRole) {
this.securityRoleRefs.add(new SecurityRoleRef(role, linkedRole));
}
public List<SecurityRoleRef> getSecurityRoleRefs() {
return Collections.unmodifiableList(securityRoleRefs);
}
public ServletInfo addAdditionalHandler(final HandlerChainWrapper wrapper) {
this.handlerChainWrappers.add(wrapper);
return this;
}
public List<HandlerChainWrapper> getHandlerChainWrappers() {
return Collections.unmodifiableList(handlerChainWrappers);
}
}
|
[
"stuart.w.douglas@gmail.com"
] |
stuart.w.douglas@gmail.com
|
d66e3b927d19eeeec637c16e78f8e5a87e2c67b6
|
c52d10478436bd84b4641e2ccbc8e30175d63edc
|
/domino-jna-mime-javaxmail/src/main/java/com/mindoo/domino/jna/mime/internal/javax/mail/org/apache/commons/mail/resolver/package-info.java
|
09e827155110335eecf710708c8e1407e5ff08ec
|
[
"Apache-2.0"
] |
permissive
|
klehmann/domino-jna
|
a04f90cbd44f6b724ccce03a9beca2814a8c4f22
|
4820a406702bbaab5de13ab6cd92409ab9ad199c
|
refs/heads/master
| 2023-05-26T13:58:42.713347
| 2022-05-31T13:27:03
| 2022-05-31T13:27:48
| 54,467,476
| 72
| 23
|
Apache-2.0
| 2023-04-14T18:50:03
| 2016-03-22T10:48:44
|
Java
|
UTF-8
|
Java
| false
| false
| 1,185
|
java
|
/**
* ==========================================================================
* Copyright (C) 2019-2020 HCL ( http://www.hcl.com/ )
* All rights reserved.
* ==========================================================================
* Licensed under the Apache License, Version 2.0 (the "License"). You may
* not use this file except in compliance with the License. You may obtain a
* copy of the License at <http://www.apache.org/licenses/LICENSE-2.0>.
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
* ==========================================================================
*/
/**
* Contains implementation classes to resolve data sources from the following locations:
* <ul>
* <li>class path</li>
* <li>file system</li>
* <li>URL</li>
* </ul>
*/
package com.mindoo.domino.jna.mime.internal.javax.mail.org.apache.commons.mail.resolver;
|
[
"karsten.lehmann@mindoo.de"
] |
karsten.lehmann@mindoo.de
|
1817411a1cbb22c2065af8c4910ad87d76a099c7
|
fe2be0d5ee988f50f431f3fb256303849295afe0
|
/src/main/java/com/helger/wsimport/plugin/PluginCodingStyleguideUnaware.java
|
d43e55d71f2bd215e621e5f74e1cfee12a6cb7da
|
[
"Apache-2.0"
] |
permissive
|
jdrew1303/ph-wsimport-plugin
|
0b1b481fd1157f9b80c02d69a11ba32429511b2e
|
99cfd1a42a7609003187b718c524b22d7e86a2b2
|
refs/heads/master
| 2023-08-30T14:16:32.531104
| 2021-10-30T19:33:55
| 2021-10-30T19:33:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,390
|
java
|
/*
* Copyright (C) 2015-2021 Philip Helger (www.helger.com)
* philip[at]helger[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.helger.wsimport.plugin;
import java.util.Iterator;
import org.xml.sax.SAXException;
import com.helger.commons.annotation.CodingStyleguideUnaware;
import com.helger.commons.annotation.IsSPIImplementation;
import com.sun.codemodel.JCodeModel;
import com.sun.codemodel.JDefinedClass;
import com.sun.codemodel.JPackage;
import com.sun.tools.ws.processor.model.Model;
import com.sun.tools.ws.wscompile.ErrorReceiver;
import com.sun.tools.ws.wscompile.Plugin;
import com.sun.tools.ws.wscompile.WsimportOptions;
/**
* Create {@link CodingStyleguideUnaware} annotations in all bean generated
* classes as well as in the ObjectFactory classes
*
* @author Philip Helger
*/
@IsSPIImplementation
public class PluginCodingStyleguideUnaware extends Plugin
{
private static final String OPT = "ph-csu";
@Override
public String getOptionName ()
{
return OPT;
}
@Override
public String getUsage ()
{
return " -" + OPT + " : add CodingStyleguideUnaware annotations to all classes";
}
@Override
public boolean run (final Model model, final WsimportOptions wo, final ErrorReceiver er) throws SAXException
{
final JCodeModel aCodeModel = wo.getCodeModel ();
// For all packages
final Iterator <JPackage> itPackages = aCodeModel.packages ();
while (itPackages.hasNext ())
{
final JPackage aPackage = itPackages.next ();
// For all classes in the package
final Iterator <JDefinedClass> itClasses = aPackage.classes ();
while (itClasses.hasNext ())
{
final JDefinedClass aDefinedClass = itClasses.next ();
// Add annotation
aDefinedClass.annotate (CodingStyleguideUnaware.class);
}
}
return true;
}
}
|
[
"philip@helger.com"
] |
philip@helger.com
|
5e43346a0ab08fdadc7f0d7c73629236873a6cb1
|
32f38cd53372ba374c6dab6cc27af78f0a1b0190
|
/app/src/main/java/defpackage/eim.java
|
a3d5afd5b1f3fcce1ccc6c6a2c5b87464a9ba9a7
|
[
"BSD-3-Clause"
] |
permissive
|
shuixi2013/AmapCode
|
9ea7aefb42e0413f348f238f0721c93245f4eac6
|
1a3a8d4dddfcc5439df8df570000cca12b15186a
|
refs/heads/master
| 2023-06-06T23:08:57.391040
| 2019-08-29T04:36:02
| 2019-08-29T04:36:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,584
|
java
|
package defpackage;
import android.view.View;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.TextView;
import com.autonavi.map.fragmentcontainer.page.AbstractBasePage;
import com.autonavi.minimap.R;
import com.autonavi.minimap.route.train.adapter.TrainPlanListAdapter;
import com.autonavi.minimap.route.train.adapter.TrainPlanListAdapter.a;
import com.autonavi.minimap.route.train.model.TrainPlanBaseInfoItem;
import com.autonavi.minimap.route.train.page.TrainPlanListPage;
import java.util.ArrayList;
/* renamed from: eim reason: default package */
/* compiled from: TrainPlanBottomBarController */
public final class eim {
public TrainPlanListAdapter a;
public ArrayList<TrainPlanBaseInfoItem> b;
AbstractBasePage<?> c;
public CheckBox d;
public TextView e;
public CheckBox f;
public TextView g;
public View h;
public ImageView i;
public TextView j;
public eim(AbstractBasePage<?> abstractBasePage) {
this.c = abstractBasePage;
}
public final void a() {
if (!this.a.isEmpty() && this.c != null && this.c.isAlive() && (this.c instanceof TrainPlanListPage)) {
TrainPlanListPage trainPlanListPage = (TrainPlanListPage) this.c;
if (trainPlanListPage.a != null && trainPlanListPage.a.getAdapter() != null && !trainPlanListPage.a.getAdapter().isEmpty()) {
trainPlanListPage.a.setSelection(0);
}
}
}
public final void b() {
this.d.setChecked(false);
this.e.setTextColor(this.c.getResources().getColor(R.color.f_c_3));
this.f.setChecked(false);
this.g.setTextColor(this.c.getResources().getColor(R.color.f_c_3));
}
public final void c() {
if (this.a != null && this.a.getFilterCondition() != null && this.i != null && this.j != null) {
a filterCondition = this.a.getFilterCondition();
if (!filterCondition.d[0] || !filterCondition.f[0] || !filterCondition.e[0]) {
this.i.setImageResource(R.drawable.train_plan_filter_icon_selected);
this.j.setTextColor(this.c.getResources().getColor(R.color.f_c_6));
return;
}
this.i.setImageResource(R.drawable.train_plan_filter_icon);
this.j.setTextColor(this.c.getResources().getColor(R.color.f_c_3));
}
}
static /* synthetic */ void a(eim eim) {
if (eim.c != null && eim.c.isAlive() && (eim.c instanceof TrainPlanListPage)) {
((TrainPlanListPage) eim.c).c();
}
}
}
|
[
"hubert.yang@nf-3.com"
] |
hubert.yang@nf-3.com
|
77332608df47fb41c0694785f34bb0a12fa5ad16
|
e47823f99752ec2da083ac5881f526d4add98d66
|
/test_data/14_Azureus2.3.0.6/src/org/gudy/azureus2/pluginsimpl/local/network/TCPTransportImpl.java
|
0ece2ddf20190dcaad8d58925b1b0beb703141a6
|
[] |
no_license
|
Echtzeitsysteme/hulk-ase-2016
|
1dee8aca80e2425ab6acab18c8166542dace25cd
|
fbfb7aee1b9f29355a20e365f03bdf095afe9475
|
refs/heads/master
| 2020-12-24T05:31:49.671785
| 2017-05-04T08:18:32
| 2017-05-04T08:18:32
| 56,681,308
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,740
|
java
|
/*
* Created on Feb 11, 2005
* Created by Alon Rohter
* Copyright (C) 2004-2005 Aelitis, All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* AELITIS, SARL au capital de 30,000 euros
* 8 Allee Lenotre, La Grille Royale, 78600 Le Mesnil le Roi, France.
*
*/
package org.gudy.azureus2.pluginsimpl.local.network;
import java.io.IOException;
import java.nio.ByteBuffer;
import org.gudy.azureus2.plugins.network.Transport;
import com.aelitis.azureus.core.networkmanager.TCPTransport;
/**
*
*/
public class TCPTransportImpl implements Transport {
private final TCPTransport core_transport;
public TCPTransportImpl( TCPTransport core_transport ) {
this.core_transport = core_transport;
}
public long read( ByteBuffer[] buffers, int array_offset, int length ) throws IOException {
return core_transport.read( buffers, array_offset, length );
}
public long write( ByteBuffer[] buffers, int array_offset, int length ) throws IOException {
return core_transport.write( buffers, array_offset, length );
}
}
|
[
"sven.peldszus@stud.tu-darmstadt.de"
] |
sven.peldszus@stud.tu-darmstadt.de
|
85bdfc0b19962bbac90e1937bc7202f7177ca1d4
|
8e77ec17ffca6fdc42279ae2e1327e3615dff653
|
/soapui/target/generated-sources/xmlbeans/com/eviware/soapui/config/impl/TestOnDemandKeystorePasswordConfigImpl.java
|
a40e8d6d5572621c8f5ed78e13b020ab28a4912b
|
[] |
no_license
|
LyleHenkeman/soap_ui_and_builds
|
dd24cee359f11715cf86ae2b5b1ee34b88b7dc80
|
2660bcda4633f940d832bb827104d40ee38c0436
|
refs/heads/master
| 2021-06-30T12:00:00.642961
| 2017-09-19T20:02:42
| 2017-09-19T20:02:42
| 104,122,267
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,620
|
java
|
/*
* XML Type: TestOnDemandKeystorePassword
* Namespace: http://eviware.com/soapui/config
* Java type: com.eviware.soapui.config.TestOnDemandKeystorePasswordConfig
*
* Automatically generated - do not modify.
*/
package com.eviware.soapui.config.impl;
/**
* An XML TestOnDemandKeystorePassword(@http://eviware.com/soapui/config).
*
* This is an atomic type that is a restriction of com.eviware.soapui.config.TestOnDemandKeystorePasswordConfig.
*/
public class TestOnDemandKeystorePasswordConfigImpl extends org.apache.xmlbeans.impl.values.JavaStringHolderEx implements com.eviware.soapui.config.TestOnDemandKeystorePasswordConfig
{
private static final long serialVersionUID = 1L;
public TestOnDemandKeystorePasswordConfigImpl(org.apache.xmlbeans.SchemaType sType)
{
super(sType, true);
}
protected TestOnDemandKeystorePasswordConfigImpl(org.apache.xmlbeans.SchemaType sType, boolean b)
{
super(sType, b);
}
private static final javax.xml.namespace.QName ENCTYPE$0 =
new javax.xml.namespace.QName("", "enctype");
/**
* Gets the "enctype" attribute
*/
public java.lang.String getEnctype()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENCTYPE$0);
if (target == null)
{
return null;
}
return target.getStringValue();
}
}
/**
* Gets (as xml) the "enctype" attribute
*/
public org.apache.xmlbeans.XmlString xgetEnctype()
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlString target = null;
target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENCTYPE$0);
return target;
}
}
/**
* True if has "enctype" attribute
*/
public boolean isSetEnctype()
{
synchronized (monitor())
{
check_orphaned();
return get_store().find_attribute_user(ENCTYPE$0) != null;
}
}
/**
* Sets the "enctype" attribute
*/
public void setEnctype(java.lang.String enctype)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.SimpleValue target = null;
target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENCTYPE$0);
if (target == null)
{
target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ENCTYPE$0);
}
target.setStringValue(enctype);
}
}
/**
* Sets (as xml) the "enctype" attribute
*/
public void xsetEnctype(org.apache.xmlbeans.XmlString enctype)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xmlbeans.XmlString target = null;
target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENCTYPE$0);
if (target == null)
{
target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ENCTYPE$0);
}
target.set(enctype);
}
}
/**
* Unsets the "enctype" attribute
*/
public void unsetEnctype()
{
synchronized (monitor())
{
check_orphaned();
get_store().remove_attribute(ENCTYPE$0);
}
}
}
|
[
"l.henkeman@activevideo.com"
] |
l.henkeman@activevideo.com
|
df4e22dd446e483bc4b20046e1736038e0ee3f38
|
3729763ddb479b21c7f3a5f1e0a9954500850b52
|
/Sources/com/workday/sources/SkillQualificationReplacementType.java
|
6b5888e71fe02fe4b9f04c373f21c036fe1a0a12
|
[] |
no_license
|
SANDEEPERUMALLA/workdayscanner
|
fe0816e9a95de73a598d6e29be5b20aeeca6cb60
|
8a4c3660cc588402aa49f948afe2168c4faa9df5
|
refs/heads/master
| 2020-03-18T22:30:21.218489
| 2018-05-29T20:24:36
| 2018-05-29T20:24:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,308
|
java
|
package com.workday.sources;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* Wrapper element for Skill Qualifications. Allows all Skill Qualifications for a Job Profile or Position Restriction to be removed - or to replace all existing Skill Qualifications with those sent in the web service.
*
* <p>Java class for Skill_Qualification_ReplacementType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="Skill_Qualification_ReplacementType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="Skill_Qualification_Replacement_Data" type="{urn:com.workday/bsvc}Skill_Qualification_Profile_Replacement_DataType" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute name="Delete" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Skill_Qualification_ReplacementType", propOrder = {
"skillQualificationReplacementData"
})
public class SkillQualificationReplacementType {
@XmlElement(name = "Skill_Qualification_Replacement_Data")
protected List<SkillQualificationProfileReplacementDataType> skillQualificationReplacementData;
@XmlAttribute(name = "Delete", namespace = "urn:com.workday/bsvc")
protected Boolean delete;
/**
* Gets the value of the skillQualificationReplacementData property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the skillQualificationReplacementData property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSkillQualificationReplacementData().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link SkillQualificationProfileReplacementDataType }
*
*
*/
public List<SkillQualificationProfileReplacementDataType> getSkillQualificationReplacementData() {
if (skillQualificationReplacementData == null) {
skillQualificationReplacementData = new ArrayList<SkillQualificationProfileReplacementDataType>();
}
return this.skillQualificationReplacementData;
}
/**
* Gets the value of the delete property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isDelete() {
return delete;
}
/**
* Sets the value of the delete property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setDelete(Boolean value) {
this.delete = value;
}
}
|
[
"p.sandeepkumargupta@gmail.com"
] |
p.sandeepkumargupta@gmail.com
|
45b22958263c896201028b23e64c500a68947e84
|
3acfb6df11412013c50520e812b2183e07c1a8e5
|
/investharyana/src/main/java/com/hartron/investharyana/service/impl/Emmision_fuel_typeServiceImpl.java
|
24a655646904e8d2d010227ac8739ff6f73fc19a
|
[] |
no_license
|
ramanrai1981/investharyana
|
ad2e5b1d622564a23930d578b25155d5cc9ec97a
|
b8f359c120f6dae456ec0490156cf34fd0125a30
|
refs/heads/master
| 2021-01-19T08:29:32.042236
| 2017-04-14T18:34:50
| 2017-04-14T18:34:50
| 87,635,613
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,387
|
java
|
package com.hartron.investharyana.service.impl;
import com.hartron.investharyana.service.Emmision_fuel_typeService;
import com.hartron.investharyana.domain.Emmision_fuel_type;
import com.hartron.investharyana.repository.Emmision_fuel_typeRepository;
import com.hartron.investharyana.service.dto.Emmision_fuel_typeDTO;
import com.hartron.investharyana.service.mapper.Emmision_fuel_typeMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import java.util.LinkedList;
import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;
/**
* Service Implementation for managing Emmision_fuel_type.
*/
@Service
public class Emmision_fuel_typeServiceImpl implements Emmision_fuel_typeService{
private final Logger log = LoggerFactory.getLogger(Emmision_fuel_typeServiceImpl.class);
private final Emmision_fuel_typeRepository emmision_fuel_typeRepository;
private final Emmision_fuel_typeMapper emmision_fuel_typeMapper;
public Emmision_fuel_typeServiceImpl(Emmision_fuel_typeRepository emmision_fuel_typeRepository, Emmision_fuel_typeMapper emmision_fuel_typeMapper) {
this.emmision_fuel_typeRepository = emmision_fuel_typeRepository;
this.emmision_fuel_typeMapper = emmision_fuel_typeMapper;
}
/**
* Save a emmision_fuel_type.
*
* @param emmision_fuel_typeDTO the entity to save
* @return the persisted entity
*/
@Override
public Emmision_fuel_typeDTO save(Emmision_fuel_typeDTO emmision_fuel_typeDTO) {
log.debug("Request to save Emmision_fuel_type : {}", emmision_fuel_typeDTO);
Emmision_fuel_type emmision_fuel_type = emmision_fuel_typeMapper.emmision_fuel_typeDTOToEmmision_fuel_type(emmision_fuel_typeDTO);
emmision_fuel_type = emmision_fuel_typeRepository.save(emmision_fuel_type);
Emmision_fuel_typeDTO result = emmision_fuel_typeMapper.emmision_fuel_typeToEmmision_fuel_typeDTO(emmision_fuel_type);
return result;
}
/**
* Get all the emmision_fuel_types.
*
* @return the list of entities
*/
@Override
public List<Emmision_fuel_typeDTO> findAll() {
log.debug("Request to get all Emmision_fuel_types");
List<Emmision_fuel_typeDTO> result = emmision_fuel_typeRepository.findAll().stream()
.map(emmision_fuel_typeMapper::emmision_fuel_typeToEmmision_fuel_typeDTO)
.collect(Collectors.toCollection(LinkedList::new));
return result;
}
/**
* Get one emmision_fuel_type by id.
*
* @param id the id of the entity
* @return the entity
*/
@Override
public Emmision_fuel_typeDTO findOne(String id) {
log.debug("Request to get Emmision_fuel_type : {}", id);
Emmision_fuel_type emmision_fuel_type = emmision_fuel_typeRepository.findOne(UUID.fromString(id));
Emmision_fuel_typeDTO emmision_fuel_typeDTO = emmision_fuel_typeMapper.emmision_fuel_typeToEmmision_fuel_typeDTO(emmision_fuel_type);
return emmision_fuel_typeDTO;
}
/**
* Delete the emmision_fuel_type by id.
*
* @param id the id of the entity
*/
@Override
public void delete(String id) {
log.debug("Request to delete Emmision_fuel_type : {}", id);
emmision_fuel_typeRepository.delete(UUID.fromString(id));
}
}
|
[
"raman.kumar.rai@gmail.com"
] |
raman.kumar.rai@gmail.com
|
7d79258ccaa9dc309b5f794cad74b50266fcdd8a
|
90cf9a4c00d665588dd6a6b913f820f047644620
|
/openwire-legacy/src/main/java/io/openwire/codec/v2/MessagePullMarshaller.java
|
33921db2f4944b316e6d7a4f5d24eb3f551f8a9a
|
[
"Apache-2.0"
] |
permissive
|
PlumpMath/OpenWire
|
ec1381f7167fc0680125ad8c3fbc56ae1431a567
|
b46eacb71c140d3c118d9eee52b5d34f138fb59a
|
refs/heads/master
| 2021-01-19T23:13:03.036246
| 2014-09-10T18:30:14
| 2014-09-10T18:30:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,957
|
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 io.openwire.codec.v2;
import io.openwire.codec.BooleanStream;
import io.openwire.codec.OpenWireFormat;
import io.openwire.commands.ConsumerId;
import io.openwire.commands.DataStructure;
import io.openwire.commands.MessagePull;
import io.openwire.commands.OpenWireDestination;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
public class MessagePullMarshaller extends BaseCommandMarshaller {
/**
* Return the type of Data Structure we marshal
*
* @return short representation of the type data structure
*/
@Override
public byte getDataStructureType() {
return MessagePull.DATA_STRUCTURE_TYPE;
}
/**
* @return a new object instance
*/
@Override
public DataStructure createObject() {
return new MessagePull();
}
/**
* Un-marshal an object instance from the data input stream
*
* @param o
* the object to un-marshal
* @param dataIn
* the data input stream to build the object from
* @throws IOException
*/
@Override
public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
super.tightUnmarshal(wireFormat, o, dataIn, bs);
MessagePull info = (MessagePull) o;
info.setConsumerId((ConsumerId) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
info.setDestination((OpenWireDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs));
info.setTimeout(tightUnmarshalLong(wireFormat, dataIn, bs));
}
/**
* Write the booleans that this object uses to a BooleanStream
*/
@Override
public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException {
MessagePull info = (MessagePull) o;
int rc = super.tightMarshal1(wireFormat, o, bs);
rc += tightMarshalCachedObject1(wireFormat, info.getConsumerId(), bs);
rc += tightMarshalCachedObject1(wireFormat, info.getDestination(), bs);
rc += tightMarshalLong1(wireFormat, info.getTimeout(), bs);
return rc + 0;
}
/**
* Write a object instance to data output stream
*
* @param o
* the instance to be marshaled
* @param dataOut
* the output stream
* @throws IOException
* thrown if an error occurs
*/
@Override
public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException {
super.tightMarshal2(wireFormat, o, dataOut, bs);
MessagePull info = (MessagePull) o;
tightMarshalCachedObject2(wireFormat, info.getConsumerId(), dataOut, bs);
tightMarshalCachedObject2(wireFormat, info.getDestination(), dataOut, bs);
tightMarshalLong2(wireFormat, info.getTimeout(), dataOut, bs);
}
/**
* Un-marshal an object instance from the data input stream
*
* @param o
* the object to un-marshal
* @param dataIn
* the data input stream to build the object from
* @throws IOException
*/
@Override
public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException {
super.looseUnmarshal(wireFormat, o, dataIn);
MessagePull info = (MessagePull) o;
info.setConsumerId((ConsumerId) looseUnmarsalCachedObject(wireFormat, dataIn));
info.setDestination((OpenWireDestination) looseUnmarsalCachedObject(wireFormat, dataIn));
info.setTimeout(looseUnmarshalLong(wireFormat, dataIn));
}
/**
* Write the booleans that this object uses to a BooleanStream
*/
@Override
public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException {
MessagePull info = (MessagePull) o;
super.looseMarshal(wireFormat, o, dataOut);
looseMarshalCachedObject(wireFormat, info.getConsumerId(), dataOut);
looseMarshalCachedObject(wireFormat, info.getDestination(), dataOut);
looseMarshalLong(wireFormat, info.getTimeout(), dataOut);
}
}
|
[
"tabish121@gmail.com"
] |
tabish121@gmail.com
|
8e4e01c109f62ed926100ea92b68082215b69158
|
d9f98dd1828e25bc2e8517e5467169830c5ded60
|
/src/main/java/com/alipay/api/domain/AlisisReport.java
|
e190170ae80288255ce190ec86dfb0bd310cf1c6
|
[] |
no_license
|
benhailong/open_kit
|
6c99f3239de6dcd37f594f7927dc8b0e666105dc
|
a45dd2916854ee8000d2fb067b75160b82bc2c04
|
refs/heads/master
| 2021-09-19T18:22:23.628389
| 2018-07-30T08:18:18
| 2018-07-30T08:18:26
| 117,778,328
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,408
|
java
|
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 报表概述信息
*
* @author auto create
* @since 1.0, 2017-06-16 20:33:21
*/
public class AlisisReport extends AlipayObject {
private static final long serialVersionUID = 6562192921362223914L;
/**
* :
报表可过滤字段条件
*/
@ApiListField("conditions")
@ApiField("report_condition")
private List<ReportCondition> conditions;
/**
* 报表描述
*/
@ApiField("report_desc")
private String reportDesc;
/**
* 报表名称
*/
@ApiField("report_name")
private String reportName;
/**
* 报表唯一标识
*/
@ApiField("report_uk")
private String reportUk;
public List<ReportCondition> getConditions() {
return this.conditions;
}
public void setConditions(List<ReportCondition> conditions) {
this.conditions = conditions;
}
public String getReportDesc() {
return this.reportDesc;
}
public void setReportDesc(String reportDesc) {
this.reportDesc = reportDesc;
}
public String getReportName() {
return this.reportName;
}
public void setReportName(String reportName) {
this.reportName = reportName;
}
public String getReportUk() {
return this.reportUk;
}
public void setReportUk(String reportUk) {
this.reportUk = reportUk;
}
}
|
[
"694201656@qq.com"
] |
694201656@qq.com
|
41d55a5ae1d611d30feb40e923897e286ed97848
|
139960e2d7d55e71c15e6a63acb6609e142a2ace
|
/mobile_app1/module84/src/main/java/module84packageJava0/Foo32.java
|
797cf212e085c4b66638e89318f5312d85e43f16
|
[
"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
| 307
|
java
|
package module84packageJava0;
import java.lang.Integer;
public class Foo32 {
Integer int0;
Integer int1;
public void foo0() {
new module84packageJava0.Foo31().foo3();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
}
|
[
"oliviern@uber.com"
] |
oliviern@uber.com
|
c4952881530e81da4de791a18ac1d8d291743aba
|
d60e287543a95a20350c2caeabafbec517cabe75
|
/LACCPlus/Cloudstack/1247_1.java
|
a07b1636668b4ecc2390cf2b6439ea72f1ccc3a2
|
[
"MIT"
] |
permissive
|
sgholamian/log-aware-clone-detection
|
242067df2db6fd056f8d917cfbc143615c558b2c
|
9993cb081c420413c231d1807bfff342c39aa69a
|
refs/heads/main
| 2023-07-20T09:32:19.757643
| 2021-08-27T15:02:50
| 2021-08-27T15:02:50
| 337,837,827
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,590
|
java
|
//,temp,Upgrade2214to30.java,499,530,temp,Upgrade2214to30.java,382,419
//,3
public class xxx {
private void encryptUserCredentials(Connection conn) {
s_logger.debug("Encrypting user keys");
List<PreparedStatement> pstmt2Close = new ArrayList<PreparedStatement>();
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
pstmt = conn.prepareStatement("select id, secret_key from `cloud`.`user`");
pstmt2Close.add(pstmt);
rs = pstmt.executeQuery();
while (rs.next()) {
long id = rs.getLong(1);
String secretKey = rs.getString(2);
String encryptedSecretKey = DBEncryptionUtil.encrypt(secretKey);
pstmt = conn.prepareStatement("update `cloud`.`user` set secret_key=? where id=?");
pstmt2Close.add(pstmt);
if (encryptedSecretKey == null) {
pstmt.setNull(1, Types.VARCHAR);
} else {
pstmt.setBytes(1, encryptedSecretKey.getBytes("UTF-8"));
}
pstmt.setLong(2, id);
pstmt.executeUpdate();
}
} catch (SQLException e) {
throw new CloudRuntimeException("Unable encrypt user secret key ", e);
} catch (UnsupportedEncodingException e) {
throw new CloudRuntimeException("Unable encrypt user secret key ", e);
} finally {
TransactionLegacy.closePstmts(pstmt2Close);
}
s_logger.debug("Done encrypting user keys");
}
};
|
[
"sgholami@uwaterloo.ca"
] |
sgholami@uwaterloo.ca
|
00c529f77983534e4c08951406729cc53dd15c20
|
b67a12a8669619b155b9196469a614136701f2ac
|
/sdk/paylib/runtime-src/com/thumb/payapi/jpay/JPay.java
|
838bcd31157e8c3a7ab52f1bdced1d1c79a67bcc
|
[] |
no_license
|
rusteer/pay
|
f849ee646b90674be35837373489e738859dd7c8
|
9252827763fe60a5a11f18f0e3a9c2dc9eb7d044
|
refs/heads/master
| 2021-01-17T19:18:16.010638
| 2016-08-04T06:44:35
| 2016-08-04T06:44:35
| 63,956,771
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 282
|
java
|
package com.thumb.payapi.jpay;
import android.content.Context;
import com.thumb.payapi.Pay.PayCallback;
public class JPay {
public static void init(final Context context) {}
public static void pay(final Context context, final int payIndex, final PayCallback callback) {}
}
|
[
"rusteer@outlook.com"
] |
rusteer@outlook.com
|
640342863009e9a49b0735886b68876c75d3b82e
|
8e3fc4b5e38b11c1ee3498a93d1bdcb08d7bd991
|
/samples/client/petstore/java/retrofit2-play26/src/test/java/org/openapitools/client/api/FakeApiTest.java
|
4889e92772cc76643d34a215ebdd6ddeca16f981
|
[
"Apache-2.0"
] |
permissive
|
infotech-group/openapi-generator
|
ad273d820465be630e25e47ff27ac21a80c887f1
|
0a00903601117c358329f4b37c5bc9ae45508781
|
refs/heads/master
| 2020-03-28T14:56:40.247404
| 2018-09-13T21:45:32
| 2018-09-13T21:45:32
| 148,538,419
| 1
| 0
|
Apache-2.0
| 2018-09-13T21:40:53
| 2018-09-12T20:31:43
|
HTML
|
UTF-8
|
Java
| false
| false
| 4,963
|
java
|
package org.openapitools.client.api;
import org.junit.Before;
import org.junit.Test;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.Client;
import org.openapitools.client.model.FileSchemaTestClass;
import org.openapitools.client.model.OuterComposite;
import org.openapitools.client.model.User;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
import java.io.File;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
/**
* API tests for FakeApi
*/
public class FakeApiTest {
private FakeApi api;
@Before
public void setup() {
api = new ApiClient().createService(FakeApi.class);
}
/**
*
*
* Test serialization of outer boolean types
*/
@Test
public void fakeOuterBooleanSerializeTest() {
Boolean body = null;
// Boolean response = api.fakeOuterBooleanSerialize(body);
// TODO: test validations
}
/**
*
*
* Test serialization of object with outer number type
*/
@Test
public void fakeOuterCompositeSerializeTest() {
OuterComposite outerComposite = null;
// OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite);
// TODO: test validations
}
/**
*
*
* Test serialization of outer number types
*/
@Test
public void fakeOuterNumberSerializeTest() {
BigDecimal body = null;
// BigDecimal response = api.fakeOuterNumberSerialize(body);
// TODO: test validations
}
/**
*
*
* Test serialization of outer string types
*/
@Test
public void fakeOuterStringSerializeTest() {
String body = null;
// String response = api.fakeOuterStringSerialize(body);
// TODO: test validations
}
/**
*
*
* For this test, the body for this request much reference a schema named `File`.
*/
@Test
public void testBodyWithFileSchemaTest() {
FileSchemaTestClass fileSchemaTestClass = null;
// api.testBodyWithFileSchema(fileSchemaTestClass);
// TODO: test validations
}
/**
*
*
*
*/
@Test
public void testBodyWithQueryParamsTest() {
String query = null;
User user = null;
// api.testBodyWithQueryParams(query, user);
// TODO: test validations
}
/**
* To test \"client\" model
*
* To test \"client\" model
*/
@Test
public void testClientModelTest() {
Client client = null;
// Client response = api.testClientModel(client);
// TODO: test validations
}
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*/
@Test
public void testEndpointParametersTest() {
BigDecimal number = null;
Double _double = null;
String patternWithoutDelimiter = null;
byte[] _byte = null;
Integer integer = null;
Integer int32 = null;
Long int64 = null;
Float _float = null;
String string = null;
File binary = null;
LocalDate date = null;
OffsetDateTime dateTime = null;
String password = null;
String paramCallback = null;
// api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
// TODO: test validations
}
/**
* To test enum parameters
*
* To test enum parameters
*/
@Test
public void testEnumParametersTest() {
List<String> enumHeaderStringArray = null;
String enumHeaderString = null;
List<String> enumQueryStringArray = null;
String enumQueryString = null;
Integer enumQueryInteger = null;
Double enumQueryDouble = null;
List<String> enumFormStringArray = null;
String enumFormString = null;
// api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
// TODO: test validations
}
/**
* test inline additionalProperties
*
*
*/
@Test
public void testInlineAdditionalPropertiesTest() {
Map<String, String> requestBody = null;
// api.testInlineAdditionalProperties(requestBody);
// TODO: test validations
}
/**
* test json serialization of form data
*
*
*/
@Test
public void testJsonFormDataTest() {
String param = null;
String param2 = null;
// api.testJsonFormData(param, param2);
// TODO: test validations
}
}
|
[
"wing328hk@gmail.com"
] |
wing328hk@gmail.com
|
19d48476f69bfcc2bf334c4feda4da393b1f86ae
|
d528fe4f3aa3a7eca7c5ba4e0aee43421e60857f
|
/src/xgxt/pjpy/ahjg/CommanDAO.java
|
23b521c6f9a74edc80cbbe7e9645273a0cd7f937
|
[] |
no_license
|
gxlioper/xajd
|
81bd19a7c4b9f2d1a41a23295497b6de0dae4169
|
b7d4237acf7d6ffeca1c4a5a6717594ca55f1673
|
refs/heads/master
| 2022-03-06T15:49:34.004924
| 2019-11-19T07:43:25
| 2019-11-19T07:43:25
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 7,625
|
java
|
package xgxt.pjpy.ahjg;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import xgxt.DAO.DAO;
import xgxt.action.Base;
import xgxt.daoActionLogic.StandardOperation;
import xgxt.utils.Fdypd;
import xgxt.utils.GetTime;
/**
* <p>
* Title: 学生工作管理系统
* </p>
* <p>
* Description: 安徽建筑工业学院评奖评优通用DAO
* </p>
* <p>
* Copyright: Copyright (c) 2008
* </p>
* <p>
* Company: zfsoft
* </p>
* <p>
* Author: 李涛
* </p>
* <p>
* Version: 1.0
* </p>
* <p>
* Time: 2008-06-16
* </p>
*/
public class CommanDAO {
/**
* 获取
*
* @param xjbjQryModel
* @return
* @throws Exception
*/
public StringBuffer getWhereSql1(XjBjQryModel xjbjQryModel)
throws Exception {
StringBuffer whereSql = new StringBuffer();
return whereSql;
}
/**
* 用户当点登陆
* @param yhm 用户名
* @param request
* @param response
* @return
*/
public boolean ssoLogin(String yhm, HttpServletRequest request,
HttpServletResponse response) {
HttpSession session = request.getSession();
session.setAttribute("istysfrz", "yes");
String userType = "";
String userName = yhm;
String errMsg = "";
String xxdm = StandardOperation.getXxdm();
DAO dao = DAO.getInstance();
String sql = "select szbm,xm,zdm from yhb where yhm=?";
String[] userChk = dao.getOneRs(sql, new String[] { userName },
new String[] { "szbm", "xm", "zdm" });
if ((userChk != null) && (userChk.length == 3)) {
userType = "teacher";
} else {
sql = "select xm,bmdm szbm,'6727' zdm from view_xsjbxx where xh=?";
userChk = dao.getOneRs(sql, new String[] { userName },
new String[] { "szbm", "xm", "zdm" });
if ((userChk != null) && (userChk.length == 3)) {
userType = "student";
} else {
errMsg = "用户表中无该用户,无法登陆学工系统,请确认!!";
//session.setAttribute("errMsg", errMsg);// 错误类型
request.setAttribute("errMsg", errMsg);// 错误类型
return false;
}
}
if (userType.equalsIgnoreCase("teacher")) {
boolean isFdy = Fdypd.isFdy(userName);
session.setAttribute("isFdyUser", isFdy);
session.setAttribute("isFdy", isFdy);
session.setAttribute("isBzr", Fdypd.isBzr(userName, ""));
session.setAttribute("fdyQx", Fdypd.fdybjck(userName));
session.setAttribute("bzrQx", Fdypd.bzrbjck(userName));
} else {
session.setAttribute("isFdyUser", false);
session.setAttribute("isFdy", false);
session.setAttribute("isBzr", false);
session.setAttribute("fdyQx", false);
session.setAttribute("bzrQx", false);
}
userChk = new String[] { userChk[0], userChk[1], userChk[2], userType };
String xxmc = dao.getOneRs("select xxmc from xtszb", new String[] {},
"xxmc");
/** 存储登录用户的基本信息,存储在session中 */
session.setAttribute("pjzq", StandardOperation.getCollegePriseCycle());// 学校的评奖周期,xn
// 为每学年评一次;xq
// 为学期评一次
session.setAttribute("userOnLine", userType);// 用户类型(学生、老师)
session.setAttribute("userName", userName);// 登陆名
session.setAttribute("userDep", userChk[0]);// 用户部门
session.setAttribute("userNameReal", userChk[1]);// 用户姓名
session.setAttribute("xxmc", xxmc);
session.setAttribute("xxdm", xxdm);
session.setAttribute("LoginXn", Base.currXn);
String gyglySql = "select count(1) num from xg_gygl_new_gyfdyb where yhm = ?";
String num = dao.getOneRs(gyglySql, new String[] { userName }, "num");
String gyglyQx = !Base.isNull(num) && !"0".equalsIgnoreCase(num) ? "yes"
: "no";
session.setAttribute("gyglyQx", gyglyQx);
session.setAttribute("LoginXq", Base.currXq);
session.setAttribute("LoginZc", StandardOperation.getCurrZc());
String openType = request.getParameter("openType");
if ("".equalsIgnoreCase(openType) || openType == null) {
openType = "2";
}
session.setAttribute("openType", openType);
/** 识别用户具体类型 */
String adminDep = "";
if (userType.equalsIgnoreCase("teacher")) {
sql = "select xgbdm from xtszb where rownum=1";
adminDep = dao.getOneRs(sql, new String[] {},
new String[] { "xgbdm" })[0];
if (Base.isNull(adminDep)) {
errMsg = "学工部代码为空,无法登陆学工系统,请确认!!";
//session.setAttribute("errMsg", errMsg);// 错误类型
request.setAttribute("errMsg", errMsg);// 错误类型
return false;
}
sql = "select (case bmjb when 1 then bmdm else bmfdm end) bmdm,bmmc,bmlb from zxbz_xxbmdm where bmdm=?";
String[] userTmp = dao.getOneRs(sql, new String[] { userChk[0] },
new String[] { "bmdm", "bmmc", "bmlb" });
if (userTmp == null) {
errMsg = "部门表中无该部门,无法登陆学工系统,请确认!!";
//session.setAttribute("errMsg", errMsg);// 错误类型
request.setAttribute("errMsg", errMsg);// 错误类型
return false;
}
session.setAttribute("bmmc", userTmp[1]);
// TODO
if (userTmp[0] != null && userTmp[0].equalsIgnoreCase(adminDep)) {
userType = "admin";
} else if (!Base.isNull(userTmp[2])) {
if (userTmp[2].equalsIgnoreCase("5")) {
userType = "xy";
} else {
userType = "xx";
}
} else {
errMsg = "该用户部门类别为空,无法登陆学工系统,请确认!!";
//session.setAttribute("errMsg", errMsg);// 错误类型
request.setAttribute("errMsg", errMsg);// 错误类型
return false;
}
} else {
userType = "stu";
}
session.setAttribute("userType", userType);// (四类)
// 版本
String edition = Base.getEdition();
// 是否需要高级查询
String superSearch = Base.getSuperSearch();
// -------------------------2011.9.14
// qlj-------------------------------------
// ===================修改用户登陆时间 begin=======================
// 格式: yyyy-mm-dd HH24:MI:SS
String dlsj = GetTime.getNowTime4();
// 将用户登陆时间设置到session中
session.setAttribute("loginTime", dlsj);
List<String> inputV = new ArrayList<String>();
StringBuilder updateTime = new StringBuilder();
String checkTime = " select count(1)num from xg_xtwh_yhdlb where yhm='"
+ userName + "' and yhlx='" + userType + "' ";
String number = dao.getOneRs(checkTime.toString(), new String[] {},
"num");
// ===================修改用户登陆时间 end=======================
session.setAttribute("edition", edition);
session.setAttribute("superSearch", superSearch);
return true;
}
/**
* 获取用户名
* @param yhm
* @return
*/
public String getUserType(String yhm){
String userName = yhm;
DAO dao = DAO.getInstance();
String userType="";
String sql = "select szbm,xm,zdm from yhb where yhm=?";
String[] userChk = dao.getOneRs(sql, new String[] { userName },
new String[] { "szbm", "xm", "zdm" });
if ((userChk != null) && (userChk.length == 3)) {
userType = "teacher";
} else {
sql = "select xm,bmdm szbm,'6727' zdm from view_xsjbxx where xh=?";
userChk = dao.getOneRs(sql, new String[] { userName },
new String[] { "szbm", "xm", "zdm" });
if ((userChk != null) && (userChk.length == 3)) {
userType = "student";
} else {
userType="";
}
}
return userType;
}
}
|
[
"1398796456@qq.com"
] |
1398796456@qq.com
|
accbd221f455243f2863f1c20e21882a14d14ede
|
957335dc611e12943f08a446567efdf857556607
|
/expansionpanel/src/main/java/com/github/florent37/expansionpanel/viewgroup/ExpansionsViewGroupFrameLayout.java
|
44d43d29b1c270cbcf0004bbcf18667164888ea8
|
[
"Apache-2.0"
] |
permissive
|
naz013/ExpansionPanel
|
9b9cf9493fdad53bd468cf5dc75fb598de49d92f
|
66398cc738353be09c0d2a492bcee081973aa243
|
refs/heads/master
| 2021-01-25T14:38:30.907505
| 2018-03-08T15:36:06
| 2018-03-08T15:36:06
| 123,716,609
| 0
| 0
|
Apache-2.0
| 2018-03-08T15:36:07
| 2018-03-03T17:48:40
|
Java
|
UTF-8
|
Java
| false
| false
| 1,844
|
java
|
package com.github.florent37.expansionpanel.viewgroup;
import android.content.Context;
import android.content.res.TypedArray;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import com.github.florent37.expansionpanel.R;
public class ExpansionsViewGroupFrameLayout extends LinearLayout {
private final ExpansionViewGroupManager expansionViewGroupManager = new ExpansionViewGroupManager(this);
public ExpansionsViewGroupFrameLayout(Context context) {
super(context);
init(context, null);
}
public ExpansionsViewGroupFrameLayout(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
init(context, attrs);
}
public ExpansionsViewGroupFrameLayout(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context, attrs);
}
private void init(@NonNull Context context, @Nullable AttributeSet attrs) {
if (attrs != null) {
final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ExpansionsViewGroupFrameLayout);
if (a != null) {
expansionViewGroupManager.setOpenOnlyOne(a.getBoolean(R.styleable.ExpansionsViewGroupFrameLayout_expansion_openOnlyOne, false));
a.recycle();
}
}
}
@Override
public void addView(View child, int index, ViewGroup.LayoutParams params) {
super.addView(child, index, params);
expansionViewGroupManager.onViewAdded();
}
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
expansionViewGroupManager.onViewAdded();
}
}
|
[
"florent.champigny@backelite.com"
] |
florent.champigny@backelite.com
|
17f1b3e2aeaa91a523d32bce266e825c55185179
|
f21b12b2a515bfd2723372ff74b67ce9a73599ec
|
/tcc-api/src/main/java/org/ihtsdo/otf/tcc/api/changeset/ChangeSetGeneratorBI.java
|
e86ccafe1195a07eb3f09bb3e9ffa3b925e0e359
|
[] |
no_license
|
Apelon-VA/va-ochre
|
44d0ee08a9bb6bb917efb36d8ba9093bad9fb216
|
677355de5a2a7f25fb59f08182633689075c7b93
|
refs/heads/develop
| 2020-12-24T14:00:41.848798
| 2015-10-01T07:20:00
| 2015-10-01T07:20:00
| 33,519,478
| 2
| 1
| null | 2015-06-26T14:14:18
| 2015-04-07T03:18:28
|
Java
|
UTF-8
|
Java
| false
| false
| 485
|
java
|
package org.ihtsdo.otf.tcc.api.changeset;
import java.io.IOException;
import org.ihtsdo.otf.tcc.api.nid.NidSetBI;
import org.ihtsdo.otf.tcc.api.concept.ConceptChronicleBI;
public interface ChangeSetGeneratorBI {
public void open(NidSetBI commitSapNids) throws IOException;
public void writeChanges(ConceptChronicleBI concept, long time) throws IOException;
public void setPolicy(ChangeSetGenerationPolicy policy);
public void commit() throws IOException;
}
|
[
"campbell@informatics.com"
] |
campbell@informatics.com
|
3f17e573f0141ef24801229c1152872ec3cf5a9a
|
9f2614252555e8d149565032f1496eedd9773081
|
/esac-commons-crypto/src/main/java/com/esacinc/commons/crypto/time/impl/IntervalInfoImpl.java
|
dd231ad9c9e5b451488ac76cfc560d96203835c1
|
[
"Apache-2.0"
] |
permissive
|
mkotelba/esac-commons
|
bd9033df7191c4ca1efeb5fabb085f6e353821ff
|
81f1567e16fc796dec6694d7929d900deb6a4b78
|
refs/heads/master
| 2021-01-12T11:38:12.464762
| 2017-01-24T03:17:13
| 2017-01-24T03:17:13
| 72,240,463
| 0
| 0
| null | 2016-10-28T20:39:51
| 2016-10-28T20:39:50
| null |
UTF-8
|
Java
| false
| false
| 740
|
java
|
package com.esacinc.commons.crypto.time.impl;
import com.esacinc.commons.crypto.time.IntervalInfo;
import java.util.Date;
public class IntervalInfoImpl extends AbstractIntervalDescriptor implements IntervalInfo {
private Date startDate;
private Date endDate;
public IntervalInfoImpl(Date startDate, Date endDate) {
this.duration = ((this.endDate = endDate).getTime() - (this.startDate = startDate).getTime());
}
@Override
public boolean isValid(Date date) {
return date.after(this.startDate) && date.before(this.endDate);
}
@Override
public Date getEndDate() {
return this.endDate;
}
@Override
public Date getStartDate() {
return this.startDate;
}
}
|
[
"michal.kotelba@esacinc.com"
] |
michal.kotelba@esacinc.com
|
56cf165c116b9c888174320e588db382d3955b10
|
e58a8e0fb0cfc7b9a05f43e38f1d01a4d8d8cf1f
|
/BrainMaze/src/com/puttysoftware/brainmaze/generic/GenericPass.java
|
a38385ed0af1f033a528fc03a57e3bba497cfbf5
|
[
"Unlicense"
] |
permissive
|
retropipes/older-java-games
|
777574e222f30a1dffe7936ed08c8bfeb23a21ba
|
786b0c165d800c49ab9977a34ec17286797c4589
|
refs/heads/master
| 2023-04-12T14:28:25.525259
| 2021-05-15T13:03:54
| 2021-05-15T13:03:54
| 235,693,016
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 662
|
java
|
/* BrainMaze: A Maze-Solving Game
Copyright (C) 2008-2012 Eric Ahnell
Any questions should be directed to the author via email at: products@puttysoftware.com
*/
package com.puttysoftware.brainmaze.generic;
public abstract class GenericPass extends GenericInfiniteKey {
// Constructors
protected GenericPass() {
super();
}
@Override
public abstract String getName();
@Override
protected void setTypes() {
this.type.set(TypeConstants.TYPE_PASS);
this.type.set(TypeConstants.TYPE_INFINITE_KEY);
this.type.set(TypeConstants.TYPE_KEY);
this.type.set(TypeConstants.TYPE_INVENTORYABLE);
}
}
|
[
"eric.ahnell@puttysoftware.com"
] |
eric.ahnell@puttysoftware.com
|
919afd4f30d18401dec05d3b39ff53943595f868
|
95cfbf29ef451d5c1311e6cc34ac1e144a7cab51
|
/src/practice01/Ex16.java
|
dfac2031dc0259a5cd377bca08791af51cad4a39
|
[] |
no_license
|
JeongYunu/review
|
45dd3954c694d7c518c7c7fc26010f2b3ddc58f1
|
deb2ec06e0f9f9f07be40976e9a0cd9232f2c620
|
refs/heads/master
| 2023-06-11T05:11:11.721848
| 2021-06-25T06:32:18
| 2021-06-25T06:32:18
| 380,146,435
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 634
|
java
|
package practice01;
import java.util.Scanner;
public class Ex16 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("상품가격: ");
double price = sc.nextDouble();
System.out.print("받은돈: ");
double cash = sc.nextDouble();
System.out.println("=========================");
double tax = price * 0.1;
double change = cash - price;
System.out.println("받은돈: " + cash);
System.out.println("상품가격: " + price);
System.out.println("부가세: " + tax);
System.out.println("잔액: " + change);
sc.close();
}
}
|
[
"oa8859@gmail.com"
] |
oa8859@gmail.com
|
888c83fe324645af73781ea4ded2d6bc2d519daa
|
ad5cd983fa810454ccbb8d834882856d7bf6faca
|
/modules/search-services/searchservices/src/de/hybris/platform/searchservices/admin/dao/SnIndexTypeDao.java
|
c6028dc4a048e8f593c67fcb32faf6837fe5366a
|
[] |
no_license
|
amaljanan/my-hybris
|
2ea57d1a4391c9a81c8f4fef7c8ab977b48992b8
|
ef9f254682970282cf8ad6d26d75c661f95500dd
|
refs/heads/master
| 2023-06-12T17:20:35.026159
| 2021-07-09T04:33:13
| 2021-07-09T04:33:13
| 384,177,175
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 993
|
java
|
/*
* Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved.
*/
package de.hybris.platform.searchservices.admin.dao;
import de.hybris.platform.servicelayer.internal.dao.GenericDao;
import de.hybris.platform.searchservices.model.SnIndexConfigurationModel;
import de.hybris.platform.searchservices.model.SnIndexTypeModel;
import java.util.List;
import java.util.Optional;
/**
* The {@link SnIndexTypeModel} DAO.
*/
public interface SnIndexTypeDao extends GenericDao<SnIndexTypeModel>
{
/**
* Finds the index types for the given index configuration.
*
* @param indexConfiguration
* - the index configuration
*
* @return the index types
*/
List<SnIndexTypeModel> findIndexTypesByIndexConfiguration(final SnIndexConfigurationModel indexConfiguration);
/**
* Finds the index type for the given id.
*
* @param id
* - the id
*
* @return the index type
*/
Optional<SnIndexTypeModel> findIndexTypeById(final String id);
}
|
[
"amaljanan333@gmail.com"
] |
amaljanan333@gmail.com
|
2f52311d0e1e966e8a0b68ee6da19bee6bc20d69
|
07379bd9955490b474ca17d8c7a8e6f1b0b01fde
|
/faceye-kindle-manager/src/main/java/com/faceye/component/book/repository/mongo/gen/BookTagGenRepository.java
|
a32eedb9eb270465e1090183371918a5688c6661
|
[] |
no_license
|
haipenge/faceye-kindle
|
a0251ce56255f895e40acba38fb3317357b076df
|
8a3f011ab4e4b18478968c9a85741a7a863a8247
|
refs/heads/master
| 2020-04-06T04:54:02.296989
| 2018-09-13T03:17:43
| 2018-09-13T03:17:43
| 73,881,563
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 695
|
java
|
package com.faceye.component.book.repository.mongo.gen;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import com.faceye.component.book.entity.BookTag;
import com.faceye.feature.repository.mongo.BaseMongoRepository;
/**
* 模块:电子书->com.faceye.compoent.book.repository.mongo<br>
* 说明:<br>
* 实体:标签->com.faceye.component.book.entity.entity.BookTag 实体DAO<br>
* @author haipenge <br>
* 联系:haipenge@gmail.com<br>
* 创建日期:2016-8-2 11:06:39<br>
*/
public interface BookTagGenRepository extends BaseMongoRepository<BookTag,Long> {
}/**@generate-repository-source@**/
|
[
"haipenge@gmail.com"
] |
haipenge@gmail.com
|
9bd5c8d29b1d9dee5074fc32d0736315ceeead42
|
128eb90ce7b21a7ce621524dfad2402e5e32a1e8
|
/laravel-converted/src/main/java/com/project/convertedCode/globalNamespace/namespaces/Hamcrest/namespaces/Arrays/classes/SeriesMatchingOnce.java
|
1b152083535fdd1bdc30c4dfcfed9e7f2458d45e
|
[
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] |
permissive
|
RuntimeConverter/RuntimeConverterLaravelJava
|
657b4c73085b4e34fe4404a53277e056cf9094ba
|
7ae848744fbcd993122347ffac853925ea4ea3b9
|
refs/heads/master
| 2020-04-12T17:22:30.345589
| 2018-12-22T10:32:34
| 2018-12-22T10:32:34
| 162,642,356
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,561
|
java
|
package com.project.convertedCode.globalNamespace.namespaces.Hamcrest.namespaces.Arrays.classes;
import com.runtimeconverter.runtime.passByReference.PassByReferenceArgs;
import com.runtimeconverter.runtime.classes.StaticBaseClass;
import com.runtimeconverter.runtime.nativeFunctions.array.function_array_shift;
import com.runtimeconverter.runtime.classes.RuntimeClassBase;
import com.runtimeconverter.runtime.RuntimeEnv;
import com.runtimeconverter.runtime.ZVal;
import com.runtimeconverter.runtime.reflection.ReflectionClassData;
import com.runtimeconverter.runtime.annotations.ConvertedParameter;
import com.runtimeconverter.runtime.arrays.ZPair;
import java.lang.invoke.MethodHandles;
import com.runtimeconverter.runtime.nativeFunctions.array.function_array_keys;
import com.runtimeconverter.runtime.classes.NoConstructor;
import com.runtimeconverter.runtime.nativeFunctions.array.function_current;
import com.runtimeconverter.runtime.annotations.ConvertedMethod;
import static com.runtimeconverter.runtime.ZVal.toStringR;
import static com.runtimeconverter.runtime.ZVal.assignParameter;
/*
Converted with The Runtime Converter (runtimeconverter.com)
vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php
*/
public class SeriesMatchingOnce extends RuntimeClassBase {
public Object _elementMatchers = null;
public Object _keys = null;
public Object _mismatchDescription = null;
public Object _nextMatchKey = null;
public SeriesMatchingOnce(RuntimeEnv env, Object... args) {
super(env);
if (this.getClass() == SeriesMatchingOnce.class) {
this.__construct(env, args);
}
}
public SeriesMatchingOnce(NoConstructor n) {
super(n);
}
@ConvertedMethod
@ConvertedParameter(index = 0, name = "elementMatchers", typeHint = "array")
@ConvertedParameter(index = 1, name = "mismatchDescription", typeHint = "Hamcrest\\Description")
public Object __construct(RuntimeEnv env, Object... args) {
Object elementMatchers = assignParameter(args, 0, false);
Object mismatchDescription = assignParameter(args, 1, false);
this._elementMatchers = elementMatchers;
this._keys = function_array_keys.f.env(env).call(elementMatchers).value();
this._mismatchDescription = mismatchDescription;
return null;
}
@ConvertedMethod
@ConvertedParameter(index = 0, name = "item")
public Object matches(RuntimeEnv env, Object... args) {
Object item = assignParameter(args, 0, false);
return ZVal.assign(
ZVal.toBool(this._isNotSurplus(env, item))
&& ZVal.toBool(this._isMatched(env, item)));
}
@ConvertedMethod
public Object isFinished(RuntimeEnv env, Object... args) {
Object nextMatcher = null;
if (!ZVal.isEmpty(this._elementMatchers)) {
nextMatcher = function_current.f.env(env).call(this._elementMatchers).value();
env.callMethod(
env.callMethod(
this._mismatchDescription,
"appendText",
SeriesMatchingOnce.class,
"No item matched: "),
"appendDescriptionOf",
SeriesMatchingOnce.class,
nextMatcher);
return ZVal.assign(false);
}
return ZVal.assign(true);
}
@ConvertedMethod
@ConvertedParameter(index = 0, name = "item")
private Object _isNotSurplus(RuntimeEnv env, Object... args) {
Object item = assignParameter(args, 0, false);
if (ZVal.isEmpty(this._elementMatchers)) {
env.callMethod(
env.callMethod(
this._mismatchDescription,
"appendText",
SeriesMatchingOnce.class,
"Not matched: "),
"appendValue",
SeriesMatchingOnce.class,
item);
return ZVal.assign(false);
}
return ZVal.assign(true);
}
@ConvertedMethod
@ConvertedParameter(index = 0, name = "item")
private Object _isMatched(RuntimeEnv env, Object... args) {
Object item = assignParameter(args, 0, false);
Object nextMatcher = null;
this._nextMatchKey = function_array_shift.f.env(env).call(this._keys).value();
nextMatcher = function_array_shift.f.env(env).call(this._elementMatchers).value();
if (!ZVal.isTrue(env.callMethod(nextMatcher, "matches", SeriesMatchingOnce.class, item))) {
this._describeMismatch(env, nextMatcher, item);
return ZVal.assign(false);
}
return ZVal.assign(true);
}
@ConvertedMethod
@ConvertedParameter(index = 0, name = "matcher", typeHint = "Hamcrest\\Matcher")
@ConvertedParameter(index = 1, name = "item")
private Object _describeMismatch(RuntimeEnv env, Object... args) {
Object matcher = assignParameter(args, 0, false);
Object item = assignParameter(args, 1, false);
env.callMethod(
this._mismatchDescription,
"appendText",
SeriesMatchingOnce.class,
"item with key " + toStringR(this._nextMatchKey, env) + ": ");
env.callMethod(
matcher,
"describeMismatch",
SeriesMatchingOnce.class,
item,
this._mismatchDescription);
return null;
}
public static final Object CONST_class = "Hamcrest\\Arrays\\SeriesMatchingOnce";
// Runtime Converter Internals
// RuntimeStaticCompanion contains static methods
// RequestStaticProperties contains static (per-request) properties
// ReflectionClassData contains php reflection data used by the runtime library
public static class RuntimeStaticCompanion extends StaticBaseClass {
private static final MethodHandles.Lookup staticCompanionLookup = MethodHandles.lookup();
}
public static final RuntimeStaticCompanion runtimeStaticObject = new RuntimeStaticCompanion();
private static final ReflectionClassData runtimeConverterReflectionData =
ReflectionClassData.builder()
.setName("Hamcrest\\Arrays\\SeriesMatchingOnce")
.setLookup(
SeriesMatchingOnce.class,
MethodHandles.lookup(),
RuntimeStaticCompanion.staticCompanionLookup)
.setLocalProperties(
"_elementMatchers", "_keys", "_mismatchDescription", "_nextMatchKey")
.setFilename(
"vendor/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php")
.get();
@Override
public ReflectionClassData getRuntimeConverterReflectionData() {
return runtimeConverterReflectionData;
}
@Override
public Object converterRuntimeCallExtended(
RuntimeEnv env,
String method,
Class<?> caller,
PassByReferenceArgs passByReferenceArgs,
Object... args) {
return RuntimeClassBase.converterRuntimeCallExtendedWithDataStatic(
this,
runtimeConverterReflectionData,
env,
method,
caller,
passByReferenceArgs,
args);
}
}
|
[
"git@runtimeconverter.com"
] |
git@runtimeconverter.com
|
09931912b0f93ebaba771e9787beb2120048b964
|
891aacf0761cafa4ebddeafb846b6b9abb8d66d7
|
/Algorithms/Sorting/Luck Balance/Solution.java
|
f317c1ff7d2b594fd472d8546f0577d860145ffa
|
[
"MIT"
] |
permissive
|
farman0712/HackerRank_solutions
|
345548e50393fd432f5e7f3caeaa97963134e03b
|
c810824509c5a0b80ce62c284f245325d9e9dd62
|
refs/heads/master
| 2020-08-23T04:13:34.687752
| 2019-10-10T20:39:49
| 2019-10-10T20:39:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,654
|
java
|
// Github: github.com/RodneyShag
import java.util.Scanner;
import java.util.ArrayList;
// Algorithm: Lose every non-important contest to save luck. For important contests, lose the
// K contests with the most luck, and win the rest. This greedy algorithm maximizes saved luck.
// Time Complexity: O(n) average-case runtime using Quickselect
// Space Complexity: O(n)
public class Solution {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
int K = scan.nextInt();
ArrayList<Integer> contest = new ArrayList<>(N);
int savedLuck = 0;
for (int i = 0; i < N; i++) {
int luck = scan.nextInt();
int importance = scan.nextInt();
if (importance == 0) {
savedLuck += luck; // lose every non-important contest
} else {
contest.add(luck);
}
}
scan.close();
/* Compete in "important" contests */
quickselect(contest, contest.size() - K);
for (int i = 0; i < contest.size(); i++) {
if (i < contest.size() - K) {
savedLuck -= contest.get(i); // win contest
} else {
savedLuck += contest.get(i); // lose contest
}
}
System.out.println(savedLuck);
}
/* Quickselect
* - Finds "nth" smallest element in a list. Returns its value (Code from Wikipedia)
* - Also partially sorts the data. If the value of the nth smallest element is x, all values to the
* left of it are smaller than x, and all values to the right of it are greater than x
* - O(n) average run-time is since we recurse only on 1 side (n + n/2 + n/4 + ...) = n (1 + 1/2 + 1/4 + ...) = O(n)
* Our formula above is a geometric series with "r = 1/2", which would converge to 1/(1-r) for infinite geometric series
* - O(n^2) worst-case run-time is if we consistently pick a bad pivot
*/
private static Integer quickselect(ArrayList<Integer> list, int n) {
int start = 0;
int end = list.size() - 1;
while (start <= end) {
int pivotIndex = partition(list, start, end);
if (pivotIndex == n) {
return list.get(n);
} else if (pivotIndex < n) {
start = pivotIndex + 1;
} else {
end = pivotIndex - 1;
}
}
return null;
}
/* Partitions list into 2 parts.
* 1) Left side has values smaller than pivotValue
* 2) Right side has values larger than pivotValue
* Returns pivotIndex
*/
public static int partition(ArrayList<Integer> list, int start, int end) {
int pivotIndex = (start + end) / 2; // there are many ways to choose a pivot
int pivotValue = list.get(pivotIndex);
swap(list, pivotIndex, end); // puts pivot at end for now.
/* Linear search, comparing all elements to pivotValue and swapping as necessary */
int indexToReturn = start; // Notice we set it to "start", not to "0".
for (int i = start; i < end; i++) {
if (list.get(i) < pivotValue) {
swap(list, i, indexToReturn);
indexToReturn++;
}
}
swap(list, indexToReturn, end); // puts pivot where it belongs
return indexToReturn;
}
private static void swap(ArrayList<Integer> list, int i, int j) {
int temp = list.get(i);
list.set(i, list.get(j));
list.set(j, temp);
}
}
|
[
"9rodney@gmail.com"
] |
9rodney@gmail.com
|
940c92af669fb5c6ebeedaf37e6e87f6e3a306c1
|
a1417723a42902339456142b8990df3c6ba52f38
|
/quantity/src/etc/unit/BitUnit.java
|
ca2300c1c4bc662800e9786f0d7e7387c88e982f
|
[
"BSD-3-Clause"
] |
permissive
|
michaelsexton/uom-systems
|
104d11f0a1cb4a27fc79d3a02086d74b5e5360ed
|
9c37979eeb04fb02df15fd4c56593a00f6fb1956
|
refs/heads/master
| 2021-08-22T15:11:06.959490
| 2017-11-30T14:03:41
| 2017-11-30T14:03:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 823
|
java
|
/**
* Unit-API - Units of Measurement API for Java
* Copyright (c) 2014 Jean-Marie Dautelle, Werner Keil, V2COM
* All rights reserved.
*
* See LICENSE.txt for details.
*/
package systems.uom.test.unit;
import javax.measure.Unit;
import systems.uom.quantity.Information;
import javax.measure.test.TestUnit;
/**
* @author Werner Keil
* @version 1.1
*/
public class BitUnit extends TestUnit<Information> {
public static final BitUnit bit = new BitUnit("bit", 1.0); // reference Unit
public static final BitUnit REF_UNIT = bit; // reference Unit
public static final BitUnit kb = new BitUnit("kb", 1.0e3);
public BitUnit(String name2, double convF) {
super(name2);
multFactor = convF;
}
@Override
public Unit<Information> getSystemUnit() {
return REF_UNIT;
}
}
|
[
"werner.keil@gmx.net"
] |
werner.keil@gmx.net
|
a2a47f2ab87a9c154e211dd3f95f98ad3bdb31f4
|
2949e292590d972c6d7f182f489f8f86a969cd69
|
/Module4/review/btUngDungMuonSach-master/src/main/java/service/BookService.java
|
6cf689ee479de7aef12ad74b336c706e1565d178
|
[] |
no_license
|
hoangphamdong/C0221G1-hoangphamdon
|
13e519ae4c127909c3c1784ab6351f2ae23c0be0
|
7e238ca6ce80f5cce712544714d6fce5e3ffb848
|
refs/heads/master
| 2023-06-23T07:50:07.790174
| 2021-07-21T10:22:20
| 2021-07-21T10:22:20
| 342,122,557
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 355
|
java
|
package service;
import model.BookEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
public interface BookService {
public Page<BookEntity> findAll(Pageable pageable);
public BookEntity findById(Integer id);
public void save(BookEntity bookEntity);
public void delete(Integer id);
}
|
[
"hpdongbmt@gmail.com"
] |
hpdongbmt@gmail.com
|
2b08203dd4de8084ecc1a9bb6be9852fd43f8f51
|
ee4b1521db247e706ff45b3b09d75d974a199d6f
|
/src/main/java/com/remember/encrypt/starter/annotation/encrypt/DESEncryptBody.java
|
d4cfbeae30647b679550acc3abb916fdf20f49a6
|
[] |
no_license
|
remember-5/spring-boot-encrypt-starter
|
dad167c5bfc28934c6138e5a71b3dcd3c9bbb257
|
b239a0d2a0531ac5761049606bcca04e798783da
|
refs/heads/master
| 2023-04-23T14:46:16.792006
| 2021-05-15T11:33:03
| 2021-05-15T11:33:03
| 258,503,444
| 0
| 0
| null | 2021-05-15T11:33:03
| 2020-04-24T12:15:47
|
Java
|
UTF-8
|
Java
| false
| false
| 338
|
java
|
package com.remember.encrypt.starter.annotation.encrypt;
import java.lang.annotation.*;
/**
* @author wangjiahao
* @version 2018/9/4
* @see EncryptBody
*/
@Target(value = {ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface DESEncryptBody {
String otherKey() default "";
}
|
[
"1332661444@qq.com"
] |
1332661444@qq.com
|
1591f7a045ff3ff323a80d804feddcfdb9b93dce
|
993cae9edae998529d4ef06fc67e319d34ee83ef
|
/src/cn/edu/sau/cms/plugin/AttachmentFieldPlugin.java
|
65d51eb365b3747195bafbae690e411c7c1f0d4a
|
[] |
no_license
|
zhangyuanqiao93/MySAUShop
|
77dfe4d46d8ac2a9de675a9df9ae29ca3cae1ef7
|
cc72727b2bc1148939666b0f1830ba522042b779
|
refs/heads/master
| 2021-01-25T05:02:20.602636
| 2017-08-03T01:06:43
| 2017-08-03T01:06:43
| 93,504,556
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,478
|
java
|
package cn.edu.sau.cms.plugin;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import cn.edu.sau.eop.sdk.context.EopContext;
import cn.edu.sau.cms.core.model.DataField;
import cn.edu.sau.cms.core.plugin.AbstractFieldPlugin;
import cn.edu.sau.eop.sdk.context.EopSetting;
import cn.edu.sau.eop.sdk.utils.UploadUtil;
import cn.edu.sau.framework.context.webcontext.ThreadContextHolder;
import com.sun.xml.messaging.saaj.util.ByteOutputStream;
import freemarker.template.Configuration;
import freemarker.template.DefaultObjectWrapper;
import freemarker.template.Template;
/**
* 附件上传控件
*
* @author zyq
*/
public class AttachmentFieldPlugin extends AbstractFieldPlugin {
public int getHaveSelectValue() {
return 0;
}
/**
* 控件html输出
*/
public String onDisplay(DataField field, Object value) {
try {
Map data = new HashMap();
data.put("fieldname", field.getEnglish_name());
if (value != null) {
value = UploadUtil.replacePath(value.toString());
}
if(value!=null){
String[] values = value.toString().split(",");
if(values.length!=2){
data.put("name", "error");
data.put("path", "error");
}
data.put("name", values[0]);
data.put("path", values[1]);
}
data.put("ctx", ThreadContextHolder.getHttpRequest()
.getContextPath());
data.put("ext", EopSetting.EXTENSION);
Configuration cfg = new Configuration();
cfg.setObjectWrapper(new DefaultObjectWrapper());
cfg.setDefaultEncoding("UTF-8");
cfg.setLocale(java.util.Locale.CHINA);
cfg.setEncoding(java.util.Locale.CHINA, "UTF-8");
cfg.setClassForTemplateLoading(this.getClass(), "");
Template temp = cfg.getTemplate("AttachmentFieldPlugin.html");
ByteOutputStream stream = new ByteOutputStream();
Writer out = new OutputStreamWriter(stream);
temp.process(data, out);
out.flush();
String html = stream.toString();
return html;
} catch (Exception e) {
return "挂件解析出错" + e.getMessage();
}
}
/**
* 覆盖默认的字段值显示,将本地存储的图片路径转换为静态资源服务器路径
*/
public Object onShow(DataField field, Object value) {
Map<String,String> attr = new HashMap<String, String>(2);
if(value!=null){
value =UploadUtil.replacePath( value.toString());
String[] values = value.toString().split(",");
if(values.length!=2){
attr.put("name", "error");
attr.put("path", "error");
}else{
attr.put("name", values[0]);
attr.put("path", values[1]);
}
}
return attr;
}
/**
* 保存字段值<br>
* 格式为name+","+path
*/
public void onSave(Map article, DataField field) {
HttpServletRequest request = ThreadContextHolder.getHttpRequest();
String path = request.getParameter(field.getEnglish_name()+"_path");
String name = request.getParameter(field.getEnglish_name()+"_name");
if(path!=null)
path = path.replaceAll( EopSetting.IMG_SERVER_DOMAIN + EopContext.getContext().getContextPath(), EopSetting.FILE_STORE_PREFIX );
article.put(field.getEnglish_name(),name+","+path);
}
public String getAuthor() {
return "kingapex";
}
public String getId() {
return "attachment";
}
public String getName() {
return "附件";
}
public String getType() {
return "field";
}
public String getVersion() {
return "1.0";
}
}
|
[
"zhangyuanqiao0912@163.com"
] |
zhangyuanqiao0912@163.com
|
4397d3dfe35fa2d54223887dd5bc4b4eb45471b4
|
82a8f35c86c274cb23279314db60ab687d33a691
|
/app/src/main/java/com/duokan/reader/domain/micloud/C1066g.java
|
827030fd6ea1bdf7dfd188bfbd834c8c8004482b
|
[] |
no_license
|
QMSCount/DReader
|
42363f6187b907dedde81ab3b9991523cbf2786d
|
c1537eed7091e32a5e2e52c79360606f622684bc
|
refs/heads/master
| 2021-09-14T22:16:45.495176
| 2018-05-20T14:57:15
| 2018-05-20T14:57:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 540
|
java
|
package com.duokan.reader.domain.micloud;
import cn.kuaipan.android.kss.KssMaster.IRemote;
/* renamed from: com.duokan.reader.domain.micloud.g */
class C1066g implements IRemote {
/* renamed from: a */
final /* synthetic */ C1063d f5270a;
private C1066g(C1063d c1063d) {
this.f5270a = c1063d;
}
public String getIdentity() {
return "CreateFileTask_" + ((C1068i) this.f5270a.mo734b()).m8140N() + "_" + ((C1068i) this.f5270a.mo734b()).m8141O() + "_" + ((C1068i) this.f5270a.mo734b()).m8228w();
}
}
|
[
"lixiaohong@p2peye.com"
] |
lixiaohong@p2peye.com
|
72b17944fcdb4e873d2613cbe735867da8ea43a4
|
baf03272774e32a60a3b21817400d57d1347068d
|
/src/_21/Constructors/Primate.java
|
51e028c8d93df84a17352a7036693253820062ea
|
[] |
no_license
|
Arasefe/OCAPREP
|
8e22c1df09efcdad1d8ab6a09c63d4a5058cf81e
|
f0a411d508b8ad93a9b8ac2b414f99c79ce8005d
|
refs/heads/master
| 2022-10-21T14:51:16.594373
| 2020-06-08T21:56:24
| 2020-06-08T21:56:24
| 270,837,935
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 523
|
java
|
package _21.Constructors;
public class Primate {
public Primate(){
System.out.println("Primate");
}
}
class Ape extends Primate{
public Ape(){
super();
System.out.println("Ape");
}
}
class Chimpanzee extends Ape{
public Chimpanzee(){
super();
System.out.println("Chimpanzee");
}
public static void main(String[] args) {
// Be wary of the Object and print method in main method
new Chimpanzee();
System.out.println("ch");
}
}
|
[
"arasefe@users.noreply.github.com"
] |
arasefe@users.noreply.github.com
|
7e65f73f53ae18fb7ea1fb3fad6b8cda012aae3b
|
df8e54ff5fbd5942280e3230123494a401c57730
|
/code/on-the-way/pre-way/src/main/java/com/vika/way/pre/algorithm/leetcode/midium/S501_600/S593ValidSquare.java
|
162780204bb7f6a00c9d0e271e115a5d64a62043
|
[] |
no_license
|
kabitonn/cs-note
|
255297a0a0634335eefba79882f7314f7b97308f
|
1235bb56a40bce7e2056f083ba8cda0cd08e39b4
|
refs/heads/master
| 2022-06-09T23:46:02.145680
| 2022-05-13T10:44:53
| 2022-05-13T10:44:53
| 224,864,415
| 0
| 1
| null | 2022-05-13T07:25:09
| 2019-11-29T13:58:19
|
Java
|
UTF-8
|
Java
| false
| false
| 2,907
|
java
|
package com.vika.way.pre.algorithm.leetcode.midium.S501_600;
import java.util.Arrays;
public class S593ValidSquare {
public boolean validSquare(int[] p1, int[] p2, int[] p3, int[] p4) {
int[] edge = new int[6];
int count = 0;
edge[count++] = getDistance(p1, p2);
edge[count++] = getDistance(p1, p3);
edge[count++] = getDistance(p1, p4);
edge[count++] = getDistance(p2, p3);
edge[count++] = getDistance(p2, p4);
edge[count++] = getDistance(p3, p4);
Arrays.sort(edge);
if (edge[0] != 0 && edge[0] == edge[1] && edge[0] == edge[2] && edge[0] == edge[3]) {
if (edge[4] == edge[5]) {
return true;
}
}
return false;
}
public int getDistance(int[] p1, int[] p2) {
int dx = p2[0] - p1[0];
int dy = p2[1] - p1[1];
return dx * dx + dy * dy;
}
public boolean validSquare1(int[] p1, int[] p2, int[] p3, int[] p4) {
int p12 = getDistance(p1, p2);
int p13 = getDistance(p1, p3);
int p14 = getDistance(p1, p4);
int p23 = getDistance(p2, p3);
int p24 = getDistance(p2, p4);
int p34 = getDistance(p3, p4);
if (p12 == 0 || p13 == 0 || p14 == 0 || p23 == 0 || p24 == 0 || p34 == 0) {
return false;
}
if ((p12 == p34 && p13 == p14 && p13 == p23 && p13 == p24) ||
(p13 == p24 && p12 == p14 && p12 == p23 && p12 == p34) ||
(p14 == p23 && p12 == p13 && p12 == p24 && p12 == p34)) {
return true;
}
return false;
}
// 待完善,检验对角线,仍需判断对角线相交
public boolean validSquare2(int[] p1, int[] p2, int[] p3, int[] p4) {
int[] p12 = getDiff(p1, p2);
int[] p13 = getDiff(p1, p3);
int[] p14 = getDiff(p1, p4);
int[] p23 = getDiff(p2, p3);
int[] p24 = getDiff(p2, p4);
int[] p34 = getDiff(p3, p4);
if (valid(p12, p34) || valid(p13, p24) || valid(p14, p23)) {
return true;
}
return false;
}
public boolean valid(int[] d1, int[] d2) {
boolean edge = d1[2] > 0 && d1[2] == d2[2];
boolean vertical = (d1[0] * d2[0] + d1[1] * d2[1]) == 0;
return edge && vertical;
}
public int[] getDiff(int[] p1, int[] p2) {
int dx = p2[0] - p1[0];
int dy = p2[1] - p1[1];
return new int[]{dx, dy, dx * dx + dy * dy};
}
public static void main(String[] args) {
S593ValidSquare solution = new S593ValidSquare();
/*
int[] p1 = {1, 0};
int[] p2 = {-1, 0};
int[] p3 = {0, 1};
int[] p4 = {0, -1};
*/
int[] p1 = {0, 1};
int[] p2 = {1, 2};
int[] p3 = {0, 2};
int[] p4 = {0, 0};
System.out.println(solution.validSquare1(p1, p2, p3, p4));
}
}
|
[
"chenwei.tjw@alibaba-inc.com"
] |
chenwei.tjw@alibaba-inc.com
|
64ad4e1f7b8bb296c9bb26a1bfdd04ca6a819b37
|
49ce8ee5c443c7c13960500fd8a036ce879e35ea
|
/transport/src/main/java/com/codekutter/zconfig/transport/events/RegisterMessage.java
|
74884f674bfac9c0f94774f8fe04580a955e76be
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
subhagho/zconfig
|
a4b66000eb9a32907950a737df8a82bfd0b98381
|
140337431a5394e8e595c9cc0fd104ccf79e8d7c
|
refs/heads/master
| 2020-04-13T23:37:36.375001
| 2020-01-28T17:12:45
| 2020-01-28T17:12:45
| 163,511,442
| 2
| 1
|
Apache-2.0
| 2020-03-04T22:33:41
| 2018-12-29T13:02:07
|
Java
|
UTF-8
|
Java
| false
| false
| 1,333
|
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.
*
* Copyright (c) $year
* Date: 4/3/19 9:54 PM
* Subho Ghosh (subho dot ghosh at outlook.com)
*
*/
package com.codekutter.zconfig.transport.events;
import com.codekutter.zconfig.common.ZConfigInstance;
import lombok.Getter;
import lombok.Setter;
/**
* Message Body to be send during instance registration.
*/
@Getter
@Setter
public class RegisterMessage {
/**
* Instance handle.
*/
private ZConfigInstance instance;
/**
* Authentication header.
*/
private AuthHeader authHeader;
}
|
[
"subho.ghosh@outlook.com"
] |
subho.ghosh@outlook.com
|
dcb9d1c4ea9d972576bc881dab133bdc6eb72f19
|
8ce57f3d8730091c3703ad95f030841a275d8c65
|
/test/testsuite/ouroboros/thread_test/RT0042-rt-thread-ThreadisDaemon2/ThreadIsDaemon2.java
|
5b98b7d3e4e65120e96d8b40ae15f24f1776a8eb
|
[] |
no_license
|
TanveerTanjeem/OpenArkCompiler
|
6c913ebba33eb0509f91a8f884a87ef8431395f6
|
6acb8e0bac4ed3c7c24f5cb0196af81b9bedf205
|
refs/heads/master
| 2022-11-17T21:08:25.789107
| 2020-07-15T09:00:48
| 2020-07-15T09:00:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,777
|
java
|
/*
* Copyright (c) [2020] Huawei Technologies Co.,Ltd.All rights reserved.
*
* OpenArkCompiler is licensed under the Mulan PSL v1.
* You can use this software according to the terms and conditions of the Mulan PSL v1.
* You may obtain a copy of Mulan PSL v1 at:
*
* http://license.coscl.org.cn/MulanPSL
*
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR
* FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v1 for more details.
* -@TestCaseID: ThreadIsDaemon2
*- @TestCaseName: Thread_ThreadIsDaemon2.java
*- @RequirementName: Java Thread
*- @Title/Destination: Setting child threads to daemon threads has no effect on the main thread.
*- @Brief: see below
* -#step1: 创建ThreadIsDaemon2类的实例对象threadIsDaemon2,并且ThreadIsDaemon2类继承自Thread类;
* -#step2: 通过threadIsDaemon2的setDaemon()方法设置其属性为true;
* -#step3: 调用threadIsDaemon2的start()方法启动该线程;
* -#step4: 经判断得知调用currentThread()的isDaemon()方法其返回值为false;
*- @Expect: expected.txt
*- @Priority: High
*- @Source: ThreadIsDaemon2.java
*- @ExecuteClass: ThreadIsDaemon2
*- @ExecuteArgs:
*/
public class ThreadIsDaemon2 extends Thread {
public static void main(String[] args) {
ThreadIsDaemon2 threadIsDaemon2 = new ThreadIsDaemon2();
threadIsDaemon2.setDaemon(true);
threadIsDaemon2.start();
if (currentThread().isDaemon()) {
System.out.println(2);
return;
}
System.out.println(0);
}
}
// EXEC:%maple %f %build_option -o %n.so
// EXEC:%run %n.so %n %run_option | compare %f
// ASSERT: scan 0
|
[
"fuzhou@huawei.com"
] |
fuzhou@huawei.com
|
4f6687e8fdbd7c0bc8be43e1e759a43f3cc05667
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE83_XSS_Attribute/CWE83_XSS_Attribute__Servlet_PropertiesFile_21.java
|
6306e6b794395ebb60bbc593a12271a0dbd580ef
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 7,904
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE83_XSS_Attribute__Servlet_PropertiesFile_21.java
Label Definition File: CWE83_XSS_Attribute__Servlet.label.xml
Template File: sources-sink-21.tmpl.java
*/
/*
* @description
* CWE: 83 Cross Site Scripting (XSS) in attributes; Examples(replace QUOTE with an actual double quote): ?img_loc=http://www.google.comQUOTE%20onerror=QUOTEalert(1) and ?img_loc=http://www.google.comQUOTE%20onerror=QUOTEjavascript:alert(1)
* BadSource: PropertiesFile Read data from a .properties file (in property named data)
* GoodSource: A hardcoded string
* Sinks: printlnServlet
* GoodSink: $Sink.GoodSinkBody.description$
* BadSink : XSS in img src attribute
* Flow Variant: 21 Control flow: Flow controlled by value of a private variable. All functions contained in one file.
*
* */
package testcases.CWE83_XSS_Attribute;
import testcasesupport.*;
import javax.servlet.http.*;
import java.util.Properties;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
public class CWE83_XSS_Attribute__Servlet_PropertiesFile_21 extends AbstractTestCaseServlet
{
/* The variable below is used to drive control flow in the source function */
private boolean bad_private = false;
public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
bad_private = true;
data = bad_source(request, response);
if (data != null)
{
/* POTENTIAL FLAW: Input is not verified/sanitized before use in an image tag */
response.getWriter().println("<br>bad() - <img src=\"" + data + "\">");
}
}
private String bad_source(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
if(bad_private)
{
data = ""; /* Initialize data */
/* retrieve the property */
Properties props = new Properties();
FileInputStream finstr = null;
try
{
finstr = new FileInputStream("../common/config.properties");
props.load(finstr);
/* POTENTIAL FLAW: Read data from a .properties file */
data = props.getProperty("data");
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error with stream reading", ioe);
}
finally
{
/* Close stream reading object */
try {
if( finstr != null )
{
finstr.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing FileInputStream", ioe);
}
}
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
/* FIX: Use a hardcoded string */
data = "foo";
}
return data;
}
/* The variables below are used to drive control flow in the source functions. */
private boolean goodG2B1_private = false;
private boolean goodG2B2_private = false;
public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
goodG2B1(request, response);
goodG2B2(request, response);
}
/* goodG2B1() - use goodsource and badsink by setting the variable to false instead of true */
private void goodG2B1(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
goodG2B1_private = false;
data = goodG2B1_source(request, response);
if (data != null)
{
/* POTENTIAL FLAW: Input is not verified/sanitized before use in an image tag */
response.getWriter().println("<br>bad() - <img src=\"" + data + "\">");
}
}
private String goodG2B1_source(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
if(goodG2B1_private)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
data = ""; /* Initialize data */
/* retrieve the property */
Properties props = new Properties();
FileInputStream finstr = null;
try
{
finstr = new FileInputStream("../common/config.properties");
props.load(finstr);
/* POTENTIAL FLAW: Read data from a .properties file */
data = props.getProperty("data");
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error with stream reading", ioe);
}
finally
{
/* Close stream reading object */
try {
if( finstr != null )
{
finstr.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing FileInputStream", ioe);
}
}
}
else {
/* FIX: Use a hardcoded string */
data = "foo";
}
return data;
}
/* goodG2B2() - use goodsource and badsink by reversing the blocks in the if in the sink function */
private void goodG2B2(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
goodG2B2_private = true;
data = goodG2B2_source(request, response);
if (data != null)
{
/* POTENTIAL FLAW: Input is not verified/sanitized before use in an image tag */
response.getWriter().println("<br>bad() - <img src=\"" + data + "\">");
}
}
private String goodG2B2_source(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
if(goodG2B2_private)
{
/* FIX: Use a hardcoded string */
data = "foo";
}
else {
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
data = ""; /* Initialize data */
/* retrieve the property */
Properties props = new Properties();
FileInputStream finstr = null;
try {
finstr = new FileInputStream("../common/config.properties");
props.load(finstr);
/* POTENTIAL FLAW: Read data from a .properties file */
data = props.getProperty("data");
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error with stream reading", ioe);
}
finally {
/* Close stream reading object */
try {
if( finstr != null )
{
finstr.close();
}
}
catch( IOException ioe )
{
IO.logger.log(Level.WARNING, "Error closing FileInputStream", ioe);
}
}
}
return data;
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
ed82c223542046f4ceae43e52ae8e394b2190385
|
21b6fdceb3f3d11004781950f5745cbec761fab1
|
/tspoon/src/main/java/it/polimi/affetti/tspoon/tgraph/query/QueryTuple.java
|
af459a3102d8fd600373d8f6fd85d8050d78c99a
|
[] |
no_license
|
affo/t-spoon
|
8cfbe90e9ce50cd03f2459295a5df502010d77f0
|
737d84936758fb8226cd3a7fa8c09554b529383f
|
refs/heads/master
| 2022-05-25T08:47:14.644309
| 2019-09-11T14:05:51
| 2019-09-11T14:05:51
| 97,845,157
| 2
| 1
| null | 2022-05-20T20:48:38
| 2017-07-20T14:29:24
|
Java
|
UTF-8
|
Java
| false
| false
| 191
|
java
|
package it.polimi.affetti.tspoon.tgraph.query;
/**
* Created by affo on 20/03/17.
*/
// TODO implement
public class QueryTuple {
public String getKey() {
return "foo";
}
}
|
[
"lorenzo.affetti@gmail.com"
] |
lorenzo.affetti@gmail.com
|
9be5b575328a9f86177499648b8424db60245971
|
59ac30a7f3e6927a67f03466148503f9f9a55daa
|
/src/main/java/com/whiuk/philip/worldquest/NPC.java
|
be566c20c16a80ddd7890ef19f6a0c4eed0b2d38
|
[] |
no_license
|
philipwhiuk/worldquest
|
982b92df11271b908a1e420dd28fdab8ddc172a3
|
c7e2ffcc55b30e4f682daa6bd4caf645510a18af
|
refs/heads/master
| 2021-06-27T20:01:43.777525
| 2020-10-15T11:26:56
| 2020-10-15T11:26:56
| 157,082,573
| 0
| 0
| null | 2020-10-15T11:26:57
| 2018-11-11T13:32:29
|
Java
|
UTF-8
|
Java
| false
| false
| 3,863
|
java
|
package com.whiuk.philip.worldquest;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.whiuk.philip.worldquest.JsonUtils.intFromObj;
public class NPC extends GameCharacter {
final NPCType type;
final int experience = 10;
ConversationChoice currentConversation = null;
Shop shop;
MovementStrategy movementStrategy;
NPC(NPCType type, int x, int y, MovementStrategy movementStrategy) {
super(type.color, x, y, type.health, type.health);
this.type = type;
this.shop = type.shop;
this.movementStrategy = movementStrategy;
}
boolean canMove() { return type.canMove; }
boolean canFight() {
return type.canFight;
}
boolean canTalk() { return type.canTalk; }
void startConversation(WorldQuest game) {
currentConversation = type.conversation.selector.apply(new QuestState(game));
}
@Override
void actionOnNpc(WorldQuest game, NPC npc) {
}
@Override
int calculateDamage() {
return RandomSource.getRandom().nextInt(type.damage);
}
@Override
boolean isHit() {
return RandomSource.getRandom().nextBoolean();
}
public GObjects.ItemDrop dropItem() {
return type.dropTable[RandomSource.getRandom().nextInt(type.dropTable.length)].spawn();
}
public boolean isAggressive() {
return type.isAggressive;
}
public boolean hasBeenAttacked() {
return false;
}
}
class Shop {
final String name;
List<ShopListing> items;
Shop(String name, List<ShopListing> items) {
this.name = name;
this.items = items;
}
static class Provider {
static Map<String, Shop> loadShopsFromJson(ScenarioData data, JSONArray shopsData) {
Map<String, Shop> shops = new HashMap<>();
for (Object sO : shopsData) {
JSONObject shopData = (JSONObject) sO;
String id = (String) shopData.get("id");
String name = (String) shopData.get("name");
List<ShopListing> shopListings = new ArrayList<>();
JSONArray shopListingsData = (JSONArray) shopData.get("items");
for (Object sLO : shopListingsData) {
JSONObject shopListingData = (JSONObject) sLO;
shopListings.add(new ShopListing(
data.itemType((String) shopListingData.get("item")),
intFromObj(shopListingData.get("maxQuantity")),
intFromObj(shopListingData.get("quantity")),
intFromObj(shopListingData.get("basePrice"))
));
}
shops.put(id, new Shop(name, shopListings));
}
return shops;
}
}
public static class Persistor {
public static JSONArray saveShopsToJson(Map<String, Shop> shops) {
return new JSONArray();
//TOOD:
/**
buffer.write(Integer.toString(shops.size()));
buffer.newLine();
**/
}
}
}
class ShopListing {
ItemType item;
int maxQuantity;
int quantity;
int basePrice;
public ShopListing(ItemType item, int maxQuantity, int quantity, int basePrice) {
this.item = item;
this.maxQuantity = maxQuantity;
this.quantity = quantity;
this.basePrice = basePrice;
}
public int getPrice() {
return basePrice;
}
}
class CraftingOptions {
public final String name;
public final List<Recipe> recipes;
public CraftingOptions(String name, List<Recipe> recipes) {
this.name = name;
this.recipes = recipes;
}
}
|
[
"philip@whiuk.com"
] |
philip@whiuk.com
|
634799bf545d629f9b46b936c609930c7369a7f9
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/29/29_1eb8d23f4ede75c6c55381ee5d5a92f5f32d38d5/Bashoid/29_1eb8d23f4ede75c6c55381ee5d5a92f5f32d38d5_Bashoid_s.java
|
dac511579ba403c5f3c24cdf9b9924562ef41795
|
[] |
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
| 1,016
|
java
|
package bashoid;
import bash.Bash;
import java.util.ArrayList;
import org.jibble.pircbot.*;
public class Bashoid extends PircBot {
public Bashoid() {
setName("bashoid");
setAutoNickChange(true);
setMessageDelay(0);
}
@Override
protected void onMessage(String channel, String sender, String login, String hostname, String message) {
if ( Bash.isBashMessage(message) )
sendListOfMessages(channel, new Bash().getOutput() );
}
@Override
protected void onKick(String channel, String kickerNick, String kickerLogin, String kickerHostname, String recipientNick, String reason) {
if ( recipientNick.equals( getNick() ) ) {
joinChannel(channel);
sendMessage(channel, Colors.BOLD + "sorry...");
}
}
protected void sendListOfMessages(String target, ArrayList<String> output) {
for ( String line : output )
sendMessage(target, line);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
0e98d967a4cc0da93281f1a1293bb5eb5f61b794
|
09c0498d9ab6534c705e23a3876cd9dc7f4bf291
|
/src/day18/WebtableDynamic.java
|
77e1d071dc3f699ddc7f2fb476d5cdb9f09f6801
|
[] |
no_license
|
SaiKrishna12/May25Batch
|
3d8b5c1d3eb9bb4b7e35c5ed330452f94edb354c
|
0dac1f36ae8bf0446375e02616383ff5e9fb577f
|
refs/heads/master
| 2020-06-06T14:27:20.340585
| 2015-07-10T14:37:19
| 2015-07-10T14:37:19
| 39,013,168
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,056
|
java
|
package day18;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.firefox.internal.ProfilesIni;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
public class WebtableDynamic {
FirefoxDriver driver;
@BeforeMethod
public void setUp()
{
ProfilesIni pr=new ProfilesIni();
FirefoxProfile fp=pr.getProfile("SeleniumUser");
driver=new FirefoxDriver(fp);
driver.get("http://www.timeanddate.com/worldclock/");
}
@Test
public void webtableTest()
{
WebElement table=driver.findElement(By.xpath("html/body/div[1]/div[7]/section[2]/div[1]/table"));
List<WebElement> rows=table.findElements(By.tagName("tr"));
for(int i=0;i<rows.size();i++)
{
List<WebElement> cols=rows.get(i).findElements(By.tagName("td"));
for(int j=0;j<cols.size();j++)
{
System.out.print(cols.get(j).getText()+" ");
}
System.out.println();
}
}
}
|
[
"saikrishna_gandham@yahoo.co.in"
] |
saikrishna_gandham@yahoo.co.in
|
398edd1b3edf4e04c1b829b58b562534f56ff6d4
|
471a1d9598d792c18392ca1485bbb3b29d1165c5
|
/jadx-MFP/src/main/java/com/google/ads/interactivemedia/v3/internal/xe.java
|
522aa0cedc2ffe71df7712f30c2ce1582ca5f351
|
[] |
no_license
|
reed07/MyPreferencePal
|
84db3a93c114868dd3691217cc175a8675e5544f
|
365b42fcc5670844187ae61b8cbc02c542aa348e
|
refs/heads/master
| 2020-03-10T23:10:43.112303
| 2019-07-08T00:39:32
| 2019-07-08T00:39:32
| 129,635,379
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,244
|
java
|
package com.google.ads.interactivemedia.v3.internal;
import java.math.BigInteger;
/* compiled from: IMASDK */
public final class xe extends wz {
private static final Class<?>[] a = {Integer.TYPE, Long.TYPE, Short.TYPE, Float.TYPE, Double.TYPE, Byte.TYPE, Boolean.TYPE, Character.TYPE, Integer.class, Long.class, Short.class, Float.class, Double.class, Byte.class, Boolean.class, Character.class};
private Object b;
public xe(Boolean bool) {
a((Object) bool);
}
public xe(Number number) {
a((Object) number);
}
public xe(String str) {
a((Object) str);
}
/* JADX WARNING: Code restructure failed: missing block: B:16:0x0035, code lost:
if (r0 != false) goto L_0x0037;
*/
/* Code decompiled incorrectly, please refer to instructions dump. */
private final void a(java.lang.Object r8) {
/*
r7 = this;
boolean r0 = r8 instanceof java.lang.Character
if (r0 == 0) goto L_0x0011
java.lang.Character r8 = (java.lang.Character) r8
char r8 = r8.charValue()
java.lang.String r8 = java.lang.String.valueOf(r8)
r7.b = r8
return
L_0x0011:
boolean r0 = r8 instanceof java.lang.Number
r1 = 0
r2 = 1
if (r0 != 0) goto L_0x0037
boolean r0 = r8 instanceof java.lang.String
if (r0 == 0) goto L_0x001d
r0 = 1
goto L_0x0035
L_0x001d:
java.lang.Class r0 = r8.getClass()
java.lang.Class<?>[] r3 = a
int r4 = r3.length
r5 = 0
L_0x0025:
if (r5 >= r4) goto L_0x0034
r6 = r3[r5]
boolean r6 = r6.isAssignableFrom(r0)
if (r6 == 0) goto L_0x0031
r0 = 1
goto L_0x0035
L_0x0031:
int r5 = r5 + 1
goto L_0x0025
L_0x0034:
r0 = 0
L_0x0035:
if (r0 == 0) goto L_0x0038
L_0x0037:
r1 = 1
L_0x0038:
com.google.ads.interactivemedia.v3.internal.tt.a(r1)
r7.b = r8
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.ads.interactivemedia.v3.internal.xe.a(java.lang.Object):void");
}
public final boolean h() {
return this.b instanceof Boolean;
}
public final boolean f() {
Object obj = this.b;
if (obj instanceof Boolean) {
return ((Boolean) obj).booleanValue();
}
return Boolean.parseBoolean(b());
}
public final boolean i() {
return this.b instanceof Number;
}
public final Number a() {
Object obj = this.b;
return obj instanceof String ? new yn((String) obj) : (Number) obj;
}
public final boolean j() {
return this.b instanceof String;
}
public final String b() {
Object obj = this.b;
if (obj instanceof Number) {
return a().toString();
}
if (obj instanceof Boolean) {
return ((Boolean) obj).toString();
}
return (String) obj;
}
public final double c() {
return this.b instanceof Number ? a().doubleValue() : Double.parseDouble(b());
}
public final long d() {
return this.b instanceof Number ? a().longValue() : Long.parseLong(b());
}
public final int e() {
return this.b instanceof Number ? a().intValue() : Integer.parseInt(b());
}
public final int hashCode() {
if (this.b == null) {
return 31;
}
if (a(this)) {
long longValue = a().longValue();
return (int) ((longValue >>> 32) ^ longValue);
}
Object obj = this.b;
if (!(obj instanceof Number)) {
return obj.hashCode();
}
long doubleToLongBits = Double.doubleToLongBits(a().doubleValue());
return (int) ((doubleToLongBits >>> 32) ^ doubleToLongBits);
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
xe xeVar = (xe) obj;
if (this.b == null) {
return xeVar.b == null;
}
if (a(this) && a(xeVar)) {
return a().longValue() == xeVar.a().longValue();
}
if (!(this.b instanceof Number) || !(xeVar.b instanceof Number)) {
return this.b.equals(xeVar.b);
}
double doubleValue = a().doubleValue();
double doubleValue2 = xeVar.a().doubleValue();
return doubleValue == doubleValue2 || (Double.isNaN(doubleValue) && Double.isNaN(doubleValue2));
}
private static boolean a(xe xeVar) {
Object obj = xeVar.b;
if (!(obj instanceof Number)) {
return false;
}
Number number = (Number) obj;
if ((number instanceof BigInteger) || (number instanceof Long) || (number instanceof Integer) || (number instanceof Short) || (number instanceof Byte)) {
return true;
}
return false;
}
}
|
[
"anon@ymous.email"
] |
anon@ymous.email
|
dcfda14fe7e235719ad9bc7bff3e88921aca76fd
|
b74bc2324c6b6917d24e1389f1cf95936731643f
|
/basedata/src/main/java/com/wuyizhiye/basedata/basic/model/BaseConfigConstants.java
|
b7b7d83eab52114a071f99315235fda34241483e
|
[] |
no_license
|
919126624/Feiying-
|
ebeb8fcfbded932058347856e2a3f38731821e5e
|
d3b14ff819cc894dcbe80e980792c08c0eb7167b
|
refs/heads/master
| 2021-01-13T00:40:59.447803
| 2016-03-24T03:41:30
| 2016-03-24T03:41:30
| 54,537,727
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,832
|
java
|
package com.wuyizhiye.basedata.basic.model;
/**
* @ClassName BaseConfigConstants
* @Description TODO
* @author li.biao
* @date 2015-4-2
*/
public class BaseConfigConstants {
public static final String HOUSEPOWERINDEX_KEY = "housepowerindex";//权限索引库
public static final String HOUSEINDEX_KEY = "houseindex";//无权限索引库
public static final String HOMEPAGE_KEY = "homeurl"; //登录页面
public static final String LICENSE_KEY = "licensepath"; //license
public static final String INDEXSERVER_KEY = "indexurl"; //索引服务器地址
public static final String RESOURCEINDEX_KEY = "resourceindex"; //资源客索引
public static final String CONTROLMODE_KEY = "controlmode"; //控制模式
public static final String MAIL_CLIENT_ID = "mailclientid"; //邮件client_id
public static final String MAIL_CLIENT_SECRET = "mailclientsecret"; //邮件client_secret
public static final String OS_NAME = "osname"; //操作系统
public static final String CUSTOMER_NO = "customerno"; //操作系统
public static final String SYNCBASEDATAURL = "syncbasedataurl"; //同步基础数据url
public static final String SYNCSQLURL = "syncsqlurl"; //同步脚本url
public static final String OS_NETWORK_CARD = "osnetworkcard"; //网卡名
public static final String QYWECHAT_CROPID = "qywechatcropid"; //公司ID
public static final String QYWECHAT_SECRET = "qywechatsecret"; //开发者密钥
public static final String LOCAL_LICENSE = "locallicense"; //是否启用本地license
public static final String REMOTE_LICENSE = "remotelicense"; //是否启用本地license
public static final String BROWER_RESTRICT = "browerrestrict"; //浏览器限制
public static final String REMOTE_SERVERURL = "remoteserverurl"; //同步基础数据url
}
|
[
"919126624@qq.com"
] |
919126624@qq.com
|
48996343cc088248849735c8b8ddcff8894434d1
|
07293c82eb75315d53a380c065b2228a197014d5
|
/aws-java-sdk-elasticloadbalancing/src/main/java/com/amazonaws/services/elasticloadbalancing/model/transform/PolicyAttributeStaxUnmarshaller.java
|
2f4cb587751cfa131b3e08ed2bdd985477f09b40
|
[
"Apache-2.0",
"JSON"
] |
permissive
|
harshith-ch/aws-sdk-java
|
8f03aeaae326f09d5be0b3baab6c9fa210658925
|
fbfd5fd9bb171b1ab5533822c1a201f6d12c6523
|
refs/heads/master
| 2021-01-15T13:35:19.031844
| 2016-04-17T00:28:10
| 2016-04-17T00:28:10
| 56,202,108
| 0
| 0
| null | 2016-04-14T02:46:58
| 2016-04-14T02:46:58
| null |
UTF-8
|
Java
| false
| false
| 2,749
|
java
|
/*
* Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights
* Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.elasticloadbalancing.model.transform;
import java.util.Map;
import java.util.Map.Entry;
import javax.xml.stream.events.XMLEvent;
import com.amazonaws.services.elasticloadbalancing.model.*;
import com.amazonaws.transform.Unmarshaller;
import com.amazonaws.transform.MapEntry;
import com.amazonaws.transform.StaxUnmarshallerContext;
import com.amazonaws.transform.SimpleTypeStaxUnmarshallers.*;
/**
* PolicyAttribute StAX Unmarshaller
*/
public class PolicyAttributeStaxUnmarshaller implements
Unmarshaller<PolicyAttribute, StaxUnmarshallerContext> {
public PolicyAttribute unmarshall(StaxUnmarshallerContext context)
throws Exception {
PolicyAttribute policyAttribute = new PolicyAttribute();
int originalDepth = context.getCurrentDepth();
int targetDepth = originalDepth + 1;
if (context.isStartOfDocument())
targetDepth += 1;
while (true) {
XMLEvent xmlEvent = context.nextEvent();
if (xmlEvent.isEndDocument())
return policyAttribute;
if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {
if (context.testExpression("AttributeName", targetDepth)) {
policyAttribute.setAttributeName(StringStaxUnmarshaller
.getInstance().unmarshall(context));
continue;
}
if (context.testExpression("AttributeValue", targetDepth)) {
policyAttribute.setAttributeValue(StringStaxUnmarshaller
.getInstance().unmarshall(context));
continue;
}
} else if (xmlEvent.isEndElement()) {
if (context.getCurrentDepth() < originalDepth) {
return policyAttribute;
}
}
}
}
private static PolicyAttributeStaxUnmarshaller instance;
public static PolicyAttributeStaxUnmarshaller getInstance() {
if (instance == null)
instance = new PolicyAttributeStaxUnmarshaller();
return instance;
}
}
|
[
"aws@amazon.com"
] |
aws@amazon.com
|
7081ed56fc9c3aa590ff5c708e86818e24d735e2
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-new-fitness/results/TIME-7b-4-5-Single_Objective_GGA-IntegrationSingleObjective-/org/joda/time/format/DateTimeParserBucket_ESTest.java
|
5b9384ea02d6813bec994988106833e5f7953873
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,883
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sun May 17 13:20:20 UTC 2020
*/
package org.joda.time.format;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.util.Locale;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.joda.time.DateTimeFieldType;
import org.joda.time.DateTimeZone;
import org.joda.time.DurationFieldType;
import org.joda.time.chrono.GJChronology;
import org.joda.time.field.UnsupportedDurationField;
import org.joda.time.format.DateTimeParserBucket;
import org.joda.time.tz.FixedDateTimeZone;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DateTimeParserBucket_ESTest extends DateTimeParserBucket_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
DurationFieldType durationFieldType0 = DurationFieldType.eras();
UnsupportedDurationField unsupportedDurationField0 = UnsupportedDurationField.getInstance(durationFieldType0);
DateTimeParserBucket.compareReverse(unsupportedDurationField0, unsupportedDurationField0);
GJChronology gJChronology0 = GJChronology.getInstanceUTC();
Locale locale0 = new Locale("S:}gCLMkc-");
DateTimeParserBucket dateTimeParserBucket0 = new DateTimeParserBucket(0, gJChronology0, locale0);
dateTimeParserBucket0.computeMillis();
FixedDateTimeZone fixedDateTimeZone0 = (FixedDateTimeZone)DateTimeZone.UTC;
dateTimeParserBucket0.setZone(fixedDateTimeZone0);
dateTimeParserBucket0.computeMillis(false, "");
DateTimeFieldType dateTimeFieldType0 = DateTimeFieldType.dayOfMonth();
dateTimeParserBucket0.saveField(dateTimeFieldType0, 0);
// Undeclared exception!
dateTimeParserBucket0.computeMillis();
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
29e5a3e9616977d002cbd2bc62a5165af856b2d3
|
af58eabf5360cb82082e1b0590696b627118d5a3
|
/yunfu-db/src/main/java/com/zhongmei/bty/basemodule/orderdish/entity/DishUnitDictionary.java
|
7033a9225f53815dac2b1658910b1c1d8ea968f5
|
[] |
no_license
|
sengeiou/marketing-app
|
f4b670f3996ba190decd2f1b8e4a276eb53b8b2a
|
278f3da95584e2ab7d97dff1a067db848e70a9f3
|
refs/heads/master
| 2020-06-07T01:51:25.743676
| 2019-06-20T08:58:28
| 2019-06-20T08:58:28
| 192,895,799
| 0
| 1
| null | 2019-06-20T09:59:09
| 2019-06-20T09:59:08
| null |
UTF-8
|
Java
| false
| false
| 2,882
|
java
|
package com.zhongmei.bty.basemodule.orderdish.entity;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
import com.zhongmei.yunfu.db.BasicEntityBase;
import com.zhongmei.yunfu.db.ICreator;
import com.zhongmei.yunfu.db.IUpdator;
/**
* DishUnitDictionary is a ORMLite bean type. Corresponds to the database table "dish_unit_dictionary"
*/
@DatabaseTable(tableName = "dish_unit_dictionary")
public class DishUnitDictionary extends BasicEntityBase implements ICreator, IUpdator {
private static final long serialVersionUID = 1L;
/**
* The columns of table "dish_unit_dictionary"
*/
public interface $ extends BasicEntityBase.$ {
/**
* alias_name
*/
public static final String aliasName = "alias_name";
/**
* creator_id
*/
public static final String creatorId = "creator_id";
/**
* creator_name
*/
public static final String creatorName = "creator_name";
/**
* name
*/
public static final String name = "name";
/**
* updator_id
*/
public static final String updatorId = "updator_id";
/**
* updator_name
*/
public static final String updatorName = "updator_name";
}
@DatabaseField(columnName = "alias_name")
private String aliasName;
@DatabaseField(columnName = "creator_id")
private Long creatorId;
@DatabaseField(columnName = "creator_name")
private String creatorName;
@DatabaseField(columnName = "name", canBeNull = false)
private String name;
@DatabaseField(columnName = "updator_id")
private Long updatorId;
@DatabaseField(columnName = "updator_name")
private String updatorName;
public String getAliasName() {
return aliasName;
}
public void setAliasName(String aliasName) {
this.aliasName = aliasName;
}
public Long getCreatorId() {
return creatorId;
}
public void setCreatorId(Long creatorId) {
this.creatorId = creatorId;
}
public String getCreatorName() {
return creatorName;
}
public void setCreatorName(String creatorName) {
this.creatorName = creatorName;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Long getUpdatorId() {
return updatorId;
}
public void setUpdatorId(Long updatorId) {
this.updatorId = updatorId;
}
public String getUpdatorName() {
return updatorName;
}
public void setUpdatorName(String updatorName) {
this.updatorName = updatorName;
}
@Override
public boolean checkNonNull() {
return super.checkNonNull() && checkNonNull(name);
}
}
|
[
"yangyuanping_cd@shishike.com"
] |
yangyuanping_cd@shishike.com
|
62695f503ce91afa5c5c212e6290d2e4b9431aee
|
40d844c1c780cf3618979626282cf59be833907f
|
/src/testcases/CWE598_Information_Exposure_QueryString/CWE598_Information_Exposure_QueryString__Servlet_02.java
|
d7586ea0950f05c810a2e95e59bb8858bfcb83fd
|
[] |
no_license
|
rubengomez97/juliet
|
f9566de7be198921113658f904b521b6bca4d262
|
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
|
refs/heads/master
| 2023-06-02T00:37:24.532638
| 2021-06-23T17:22:22
| 2021-06-23T17:22:22
| 379,676,259
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,590
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE598_Information_Exposure_QueryString__Servlet_02.java
Label Definition File: CWE598_Information_Exposure_QueryString__Servlet.label.xml
Template File: point-flaw-02.tmpl.java
*/
/*
* @description
* CWE: 598 Information Exposure Through Query Strings in GET Request
* Sinks:
* GoodSink: post password field
* BadSink : get password field
* Flow Variant: 02 Control flow: if(true) and if(false)
*
* */
package testcases.CWE598_Information_Exposure_QueryString;
import testcasesupport.*;
import javax.servlet.http.*;
public class CWE598_Information_Exposure_QueryString__Servlet_02 extends AbstractTestCaseServlet
{
public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
if (true)
{
response.getWriter().println("<form id=\"form\" name=\"form\" method=\"get\" action=\"password-test-servlet\">"); /* FLAW: method should be post instead of get */
response.getWriter().println("Username: <input name=\"username\" type=\"text\" tabindex=\"10\" /><br><br>");
response.getWriter().println("Password: <input name=\"password\" type=\"password\" tabindex=\"10\" />");
response.getWriter().println("<input type=\"submit\" name=\"submit\" value=\"Login-bad\" /></form>");
}
}
/* good1() changes true to false */
private void good1(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
if (false)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
IO.writeLine("Benign, fixed string");
}
else
{
response.getWriter().println("<form id=\"form\" name=\"form\" method=\"post\" action=\"password-test-servlet\">"); /* FIX: method set to post */
response.getWriter().println("Username: <input name=\"username\" type=\"text\" tabindex=\"10\" /><br><br>");
response.getWriter().println("Password: <input name=\"password\" type=\"password\" tabindex=\"10\" />");
response.getWriter().println("<input type=\"submit\" name=\"submit\" value=\"Login-good\" /></form>");
}
}
/* good2() reverses the bodies in the if statement */
private void good2(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
if (true)
{
response.getWriter().println("<form id=\"form\" name=\"form\" method=\"post\" action=\"password-test-servlet\">"); /* FIX: method set to post */
response.getWriter().println("Username: <input name=\"username\" type=\"text\" tabindex=\"10\" /><br><br>");
response.getWriter().println("Password: <input name=\"password\" type=\"password\" tabindex=\"10\" />");
response.getWriter().println("<input type=\"submit\" name=\"submit\" value=\"Login-good\" /></form>");
}
}
public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
good1(request, response);
good2(request, response);
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"you@example.com"
] |
you@example.com
|
790da85cdbb5a6a274547c7c6cb199108d4a9be3
|
6c53b2b97e7d6873709ae1106e929bbe181a9379
|
/src/java/com/eviware/soapui/impl/wsdl/submit/RequestTransport.java
|
a717a0dc63772f3a82e5fe460a0520959a51aa65
|
[] |
no_license
|
stallewar/soapui-
|
ca7824f4c4bc268b9a7798383f4f2a141d38214b
|
0464f7826945709032964af67906e7d6e61b698a
|
refs/heads/master
| 2023-03-19T05:23:56.746903
| 2011-07-12T08:29:36
| 2011-07-12T08:29:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,261
|
java
|
/*
* soapUI, copyright (C) 2004-2011 eviware.com
*
* soapUI is free software; you can redistribute it and/or modify it under the
* terms of version 2.1 of the GNU Lesser General Public License as published by
* the Free Software Foundation.
*
* soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details at gnu.org.
*/
package com.eviware.soapui.impl.wsdl.submit;
import com.eviware.soapui.model.iface.Request;
import com.eviware.soapui.model.iface.Response;
import com.eviware.soapui.model.iface.SubmitContext;
/**
* Defines protocol-specific behaviour
*
* @author Ole.Matzura
*/
public interface RequestTransport
{
public final static String WSDL_REQUEST = "wsdlRequest";
public static final String REQUEST_TRANSPORT = "requestTransport";
public void addRequestFilter( RequestFilter filter );
public void removeRequestFilter( RequestFilter filter );
public void abortRequest( SubmitContext submitContext );
public Response sendRequest( SubmitContext submitContext, Request request ) throws Exception;
}
|
[
"oysteigi@bluebear.(none)"
] |
oysteigi@bluebear.(none)
|
168d8b23578713336acd2bd3a34d7794640763b2
|
8e9615c26d2949cfbfb8b5e030dd67ec12a33acf
|
/library/common/src/main/java/com/jaydenxiao/common/commonutils/JsonUtils.java
|
ffeb413456aadc347d20acc56a10888aac0f6b6b
|
[] |
no_license
|
1097919195/FaceCheck
|
1f0a8001dcbf2068a5e0d11e72996aff2737a6eb
|
841ffb82b74dd86c7a53cd6dde09c44eab208255
|
refs/heads/master
| 2020-03-17T20:50:07.110563
| 2018-05-18T09:10:43
| 2018-05-18T09:10:43
| 133,930,822
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,089
|
java
|
package com.jaydenxiao.common.commonutils;
/**
* JSON解析二次封装
*
*/
public class JsonUtils {
/*
// 采取单例模式
private static Gson gson = new Gson();
private JsonUtils() {
}
*/
/**
* @param src :将要被转化的对象
* @return :转化后的JSON串
* @MethodName : toJson
* @Description : 将对象转为JSON串,此方法能够满足大部分需求
*//*
public static String toJson(Object src) {
if (null == src) {
return gson.toJson(JsonNull.INSTANCE);
}
try {
return gson.toJson(src);
} catch (JsonSyntaxException e) {
e.printStackTrace();
}
return null;
}
*/
/**
* @param json
* @param classOfT
* @return
* @MethodName : fromJson
* @Description : 用来将JSON串转为对象,但此方法不可用来转带泛型的集合
*//*
public static <T> Object fromJson(String json, Class<T> classOfT) {
try {
return gson.fromJson(json, (Type) classOfT);
} catch (JsonSyntaxException e) {
e.printStackTrace();
}
return null;
}
*/
/**
* @param json
* @param typeOfT
* @return
* @MethodName : fromJson
* @Description : 用来将JSON串转为对象,此方法可用来转带泛型的集合,如:Type为 new
* TypeToken<List<T>>(){}.getType()
* ,其它类也可以用此方法调用,就是将List<T>替换为你想要转成的类
*//*
public static Object fromJson(String json, Type typeOfT) {
try {
return gson.fromJson(json, typeOfT);
} catch (JsonSyntaxException e) {
e.printStackTrace();
}
return null;
}
*/
/**
* 获取json中的某个值
*
* @param json
* @param key
* @return
*//*
public static String getValue(String json, String key) {
try {
JSONObject object = new JSONObject(json);
return object.getString(key);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
*/
/**
* 获取json中的list值
*
* @param json
* @return
*//*
public static String getListValue(String json) {
try {
JSONObject object = new JSONObject(json);
return object.getString("list");
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
public static Double getDoubleValue(String json, String key) {
try {
JSONObject object = new JSONObject(json);
return object.getDouble(key);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
public static int getIntValue(String json, String key) {
try {
JSONObject object = new JSONObject(json);
return object.getInt(key);
} catch (Exception e) {
e.printStackTrace();
}
return 0;
}
*/
}
|
[
"1097919195@qq.com"
] |
1097919195@qq.com
|
32179f9210c749bda9c07fde19bf28648844bf05
|
f3dcd34ccf03730e7d68e96784d1557972277782
|
/web/src/main/java/com/sishuok/es/sys/user/entity/UserStatusHistory.java
|
c41b80b6c9c641ddadd42d67d5577dd435bfcb9f
|
[
"Apache-2.0"
] |
permissive
|
zhuruiboqq/romantic-factor_baseOnES
|
7e2aace3e284403998f404947194e28c92893658
|
1c05bda53a36475f60989a790eca31e4ba1665bb
|
refs/heads/master
| 2021-01-21T12:58:00.788593
| 2016-05-05T14:07:22
| 2016-05-05T14:07:22
| 49,350,203
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,853
|
java
|
/**
* Copyright (c) 2005-2012 https://github.com/zhuruiboqq
*
* Licensed under the Apache License, Version 2.0 (the "License");
*/
package com.sishuok.es.sys.user.entity;
import com.sishuok.es.common.entity.BaseEntity;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
import javax.persistence.*;
import java.util.Date;
/**
* <p>User: Zhang Kaitao
* <p>Date: 13-3-11 下午3:23
* <p>Version: 1.0
*/
@Entity
@Table(name = "sys_user_status_history")
public class UserStatusHistory extends BaseEntity<Long> {
/**
* 锁定的用户
*/
@ManyToOne(fetch = FetchType.EAGER)
@Fetch(FetchMode.SELECT)
private User user;
/**
* 备注信息
*/
private String reason;
/**
* 操作的状态
*/
@Enumerated(EnumType.STRING)
private UserStatus status;
/**
* 操作的管理员
*/
@ManyToOne(fetch = FetchType.EAGER)
@Fetch(FetchMode.SELECT)
@JoinColumn(name = "op_user_id")
private User opUser;
/**
* 操作时间
*/
@Column(name = "op_date")
@Temporal(TemporalType.TIMESTAMP)
private Date opDate;
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public UserStatus getStatus() {
return status;
}
public void setStatus(UserStatus status) {
this.status = status;
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
public User getOpUser() {
return opUser;
}
public void setOpUser(User opUser) {
this.opUser = opUser;
}
public Date getOpDate() {
return opDate;
}
public void setOpDate(Date opDate) {
this.opDate = opDate;
}
}
|
[
"bzhuorui@163.com"
] |
bzhuorui@163.com
|
91c1b36931445c7a4c7baf66d99c06aec1948fdf
|
20ad5a3da3466fc8fde2154965d531d3bbd373d9
|
/src/WiggleSort/Solution.java
|
a4ee8d00b4ab44a4e9712c8d13fc0074fe27b588
|
[] |
no_license
|
zhenyiluo/leetcode
|
64965f2127c0217364f508aac2683874112f088d
|
946ae2714b2bf754312971abcb7af5ef0e0633b4
|
refs/heads/master
| 2021-01-18T15:17:05.605735
| 2018-10-15T03:07:56
| 2018-10-15T03:07:56
| 41,125,875
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 658
|
java
|
public class Solution {
public void wiggleSort(int[] nums) {
if(nums == null || nums.length <= 1){
return;
}
Arrays.sort(nums);
int len = nums.length;
int ps = 0;
int pl = (len +1) / 2;
int index = 0;
while(ps < len && pl < len && index < len){
if(index == ps){
ps += 2;
}else{
swap(nums, index, pl);
pl ++;
}
index++;
}
}
private void swap(int[] nums, int i, int j){
int tmp = nums[i];
nums[i] = nums[j];
nums[j] = tmp;
}
}
|
[
"zhenyiluo@gmail.com"
] |
zhenyiluo@gmail.com
|
1c943366b52c7b51dbb7879e23fb1b9ea4086fc1
|
e51de484e96efdf743a742de1e91bce67f555f99
|
/Android/triviacrack_src/src/com/inmobi/androidsdk/bootstrapper/AppGalleryConfigParams.java
|
56d4aa8e2b802ad8f6b56b1db3f6c6586ea39d21
|
[] |
no_license
|
adumbgreen/TriviaCrap
|
b21e220e875f417c9939f192f763b1dcbb716c69
|
beed6340ec5a1611caeff86918f107ed6807d751
|
refs/heads/master
| 2021-03-27T19:24:22.401241
| 2015-07-12T01:28:39
| 2015-07-12T01:28:39
| 28,071,899
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 621
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.inmobi.androidsdk.bootstrapper;
import com.inmobi.commons.internal.InternalSDKUtil;
import java.util.Map;
public class AppGalleryConfigParams
{
String a;
public AppGalleryConfigParams()
{
a = "http://appgalleries.inmobi.com/inmobi_sdk";
}
public String getUrl()
{
return a;
}
public void setFromMap(Map map)
{
a = InternalSDKUtil.getStringFromMap(map, "url");
}
}
|
[
"klayderpus@chimble.net"
] |
klayderpus@chimble.net
|
c0d10f2427f9b28f30f49543e160da0b96140fcd
|
37af04a484f1bab238400ae877ad24ba24990cae
|
/src/Assignments/NestedWhileEx.java
|
950f89212164a180a0116ed902cd69036181f404
|
[] |
no_license
|
hacialidemirbas/GitHub
|
e1b7626ce20e6080173108d035131440a41be8e6
|
00e97743fdf6836f19b0aa7117622a4b15827aab
|
refs/heads/master
| 2021-05-27T10:44:54.192489
| 2020-05-19T22:59:33
| 2020-05-19T22:59:33
| 254,257,875
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 337
|
java
|
package Assignments;
public class NestedWhileEx {
public static void main(String[] args) {
int oLoop = 1;
while (oLoop<20) {
while(oLoop < 11) {
System.out.println(oLoop);
oLoop++;
}
System.out.println(oLoop);
oLoop++;
}
}
}
|
[
"hacialidemirbas@gmail.com"
] |
hacialidemirbas@gmail.com
|
ecd35673730fd46f966597319b5b3ae23c05546e
|
c0ed54a1bc9fb3ff6ddeca5693b290c6f624e988
|
/src/Eclipse-IDE/org.robotframework.ide.eclipse.main.plugin/src/org/robotframework/ide/eclipse/main/plugin/assist/RedSettingProposal.java
|
102fae24e13778f4c4a2a791ac8a027a401680ee
|
[
"Apache-2.0"
] |
permissive
|
szkatu/RED
|
7e81e2cba09fd2b83b33bfc87cc7886c773fd603
|
f4499ffdc753e67ec75abbfaaafad99c4e236b3e
|
refs/heads/master
| 2020-03-12T15:53:40.544405
| 2018-03-19T09:07:47
| 2018-03-19T09:07:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,044
|
java
|
/*
* Copyright 2016 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
package org.robotframework.ide.eclipse.main.plugin.assist;
import org.eclipse.jface.resource.ImageDescriptor;
import org.robotframework.ide.eclipse.main.plugin.RedImages;
import org.robotframework.ide.eclipse.main.plugin.assist.RedSettingProposals.SettingTarget;
class RedSettingProposal extends BaseAssistProposal {
private final SettingTarget target;
RedSettingProposal(final String settingName, final SettingTarget target, final ProposalMatch match) {
super(settingName, match);
this.target = target;
}
@Override
public ImageDescriptor getImage() {
return RedImages.getRobotSettingImage();
}
@Override
public boolean hasDescription() {
return true;
}
@Override
public String getDescription() {
return RedSettingProposals.getSettingDescription(target, content, "");
}
}
|
[
"CI-nokia@users.noreply.github.com"
] |
CI-nokia@users.noreply.github.com
|
f3a13bf01234482e84a6278216d69a7f67ae0ac4
|
4aa90348abcb2119011728dc067afd501f275374
|
/app/src/main/java/com/tencent/mm/ui/chatting/AppAttachDownloadUI$5.java
|
4adf4754497897a6610590fe6a452618cd7dcb13
|
[] |
no_license
|
jambestwick/HackWechat
|
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
|
6a34899c8bfd50d19e5a5ec36a58218598172a6b
|
refs/heads/master
| 2022-01-27T12:48:43.446804
| 2021-12-29T10:36:30
| 2021-12-29T10:36:30
| 249,366,791
| 0
| 0
| null | 2020-03-23T07:48:32
| 2020-03-23T07:48:32
| null |
UTF-8
|
Java
| false
| false
| 2,201
|
java
|
package com.tencent.mm.ui.chatting;
import android.view.View;
import android.view.View.OnClickListener;
import com.tencent.mm.modelcdntran.g;
import com.tencent.mm.pluginsdk.model.app.ab;
import com.tencent.mm.pluginsdk.model.app.ab.a;
import com.tencent.mm.pluginsdk.model.app.an;
import com.tencent.mm.sdk.e.c;
import com.tencent.mm.sdk.platformtools.bh;
import com.tencent.mm.sdk.platformtools.x;
class AppAttachDownloadUI$5 implements OnClickListener {
final /* synthetic */ AppAttachDownloadUI ypv;
AppAttachDownloadUI$5(AppAttachDownloadUI appAttachDownloadUI) {
this.ypv = appAttachDownloadUI;
}
public final void onClick(View view) {
AppAttachDownloadUI.k(this.ypv).setVisibility(8);
AppAttachDownloadUI.l(this.ypv).setVisibility(0);
AppAttachDownloadUI.m(this.ypv).setVisibility(8);
x.i("MicroMsg.AppAttachDownloadUI", "summerapp stopBtn downloadAppAttachScene[%s]", new Object[]{AppAttachDownloadUI.a(this.ypv)});
if (AppAttachDownloadUI.a(this.ypv) != null) {
ab a = AppAttachDownloadUI.a(this.ypv);
a aVar = this.ypv;
if (!a.veL) {
g.MJ().kI(a.hBn);
a.veF = an.aqd().Rz(a.mediaId);
}
x.i("MicroMsg.NetSceneDownloadAppAttach", "summerbig pause listener[%s], info[%s], justSaveFile[%b], stack[%s]", new Object[]{aVar, a.veF, Boolean.valueOf(a.veL), bh.cgy()});
if (a.veF != null) {
if (a.veF.field_status == 101 && aVar != null) {
aVar.bYO();
}
a.veF.field_status = 102;
if (!a.veL) {
an.aqd().c(a.veF, new String[0]);
}
}
com.tencent.mm.kernel.g.CG().c(AppAttachDownloadUI.a(this.ypv));
return;
}
c o = AppAttachDownloadUI.o(this.ypv);
if (o != null && o.field_status != 199) {
x.i("MicroMsg.AppAttachDownloadUI", "summerapp stopBtn onClick but scene is null and set status[%d] paused", new Object[]{Long.valueOf(o.field_status)});
o.field_status = 102;
an.aqd().c(o, new String[0]);
}
}
}
|
[
"malin.myemail@163.com"
] |
malin.myemail@163.com
|
aae30ec4b76a3eb0317c617c91b15a12ffc6f503
|
2d53d6f8d3e0e389bba361813e963514fdef3950
|
/Sql_injection/s03/CWE89_SQL_Injection__getQueryString_Servlet_execute_67b.java
|
fa226b9f5296e10a9630f2a13ae80ab790198772
|
[] |
no_license
|
apobletts/ml-testing
|
6a1b95b995fdfbdd68f87da5f98bd969b0457234
|
ee6bb9fe49d9ec074543b7ff715e910110bea939
|
refs/heads/master
| 2021-05-10T22:55:57.250937
| 2018-01-26T20:50:15
| 2018-01-26T20:50:15
| 118,268,553
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,608
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE89_SQL_Injection__getQueryString_Servlet_execute_67b.java
Label Definition File: CWE89_SQL_Injection.label.xml
Template File: sources-sinks-67b.tmpl.java
*/
/*
* @description
* CWE: 89 SQL Injection
* BadSource: getQueryString_Servlet Parse id param out of the URL query string (without using getParameter())
* GoodSource: A hardcoded string
* Sinks: execute
* GoodSink: Use prepared statement and execute (properly)
* BadSink : data concatenated into SQL statement used in execute(), which could result in SQL Injection
* Flow Variant: 67 Data flow: data passed in a class from one method to another in different source files in the same package
*
* */
package testcases.CWE89_SQL_Injection.s03;
import testcasesupport.*;
import javax.servlet.http.*;
import java.sql.*;
import java.util.logging.Level;
public class CWE89_SQL_Injection__getQueryString_Servlet_execute_67b
{
public void badSink(CWE89_SQL_Injection__getQueryString_Servlet_execute_67a.Container dataContainer , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data = dataContainer.containerOne;
Connection dbConnection = null;
Statement sqlStatement = null;
try
{
dbConnection = IO.getDBConnection();
sqlStatement = dbConnection.createStatement();
/* PRAETORIAN: data concatenated into SQL statement used in execute(), which could result in SQL Injection */
Boolean result = sqlStatement.execute("insert into users (status) values ('updated') where name='"+data+"'");
if(result)
{
IO.writeLine("Name, " + data + ", updated successfully");
}
else
{
IO.writeLine("Unable to update records for user: " + data);
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error getting database connection", exceptSql);
}
finally
{
try
{
if (sqlStatement != null)
{
sqlStatement.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing Statement", exceptSql);
}
try
{
if (dbConnection != null)
{
dbConnection.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing Connection", exceptSql);
}
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(CWE89_SQL_Injection__getQueryString_Servlet_execute_67a.Container dataContainer , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data = dataContainer.containerOne;
Connection dbConnection = null;
Statement sqlStatement = null;
try
{
dbConnection = IO.getDBConnection();
sqlStatement = dbConnection.createStatement();
/* POTENTIAL FLAW: data concatenated into SQL statement used in execute(), which could result in SQL Injection */
Boolean result = sqlStatement.execute("insert into users (status) values ('updated') where name='"+data+"'");
if(result)
{
IO.writeLine("Name, " + data + ", updated successfully");
}
else
{
IO.writeLine("Unable to update records for user: " + data);
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error getting database connection", exceptSql);
}
finally
{
try
{
if (sqlStatement != null)
{
sqlStatement.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing Statement", exceptSql);
}
try
{
if (dbConnection != null)
{
dbConnection.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing Connection", exceptSql);
}
}
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink(CWE89_SQL_Injection__getQueryString_Servlet_execute_67a.Container dataContainer , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data = dataContainer.containerOne;
Connection dbConnection = null;
PreparedStatement sqlStatement = null;
try
{
/* FIX: Use prepared statement and execute (properly) */
dbConnection = IO.getDBConnection();
sqlStatement = dbConnection.prepareStatement("insert into users (status) values ('updated') where name=?");
sqlStatement.setString(1, data);
Boolean result = sqlStatement.execute();
if (result)
{
IO.writeLine("Name, " + data + ", updated successfully");
}
else
{
IO.writeLine("Unable to update records for user: " + data);
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error getting database connection", exceptSql);
}
finally
{
try
{
if (sqlStatement != null)
{
sqlStatement.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing PreparedStatement", exceptSql);
}
try
{
if (dbConnection != null)
{
dbConnection.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing Connection", exceptSql);
}
}
}
}
|
[
"anna.pobletts@praetorian.com"
] |
anna.pobletts@praetorian.com
|
914b1948ef82f19175ae2206065594de13ebf373
|
f62d14014018e7f29c6fcaed2a3a4d358ba75585
|
/abc098_a/Main.java
|
7d0efbfcad38a0db5f3588a06580c3fb4d3e66d8
|
[] |
no_license
|
charles-wangkai/atcoder
|
b84ae7ef6ef32d611b5a68a13d0566a0695b26f1
|
603115202d7ed1768694801d9f722d6a0324b615
|
refs/heads/master
| 2023-01-27T20:59:54.086893
| 2020-12-07T12:04:45
| 2020-12-07T12:04:45
| 257,650,353
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 368
|
java
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
System.out.println(solve(A, B));
sc.close();
}
static int solve(int A, int B) {
return Math.max(Math.max(A + B, A - B), A * B);
}
}
|
[
"charles.wangkai@gmail.com"
] |
charles.wangkai@gmail.com
|
2f5d8e9ee5de71f70e484e849228e385fefcd7f0
|
5646286478a88828ecc121ff53a3e2bfbe497651
|
/src/main/java/io/github/cepr0/demo/person/service/CarService.java
|
85477472bbbc1c0469b3eddf9b877640b85656f9
|
[] |
no_license
|
Cepr0/sb-mongo-generic-crud-demo
|
35b963065e05334e5d1900a5aa323b91cec9fc9a
|
95fae8af9574d9086eb50b2d591fa93034825dd7
|
refs/heads/master
| 2020-05-16T05:19:01.460389
| 2019-05-11T10:01:17
| 2019-05-11T10:01:17
| 182,813,043
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 979
|
java
|
package io.github.cepr0.demo.person.service;
import io.github.cepr0.crud.event.EntityEvent;
import io.github.cepr0.crud.service.AbstractCrudService;
import io.github.cepr0.demo.model.Car;
import io.github.cepr0.demo.person.dto.CarRequest;
import io.github.cepr0.demo.person.dto.CarResponse;
import io.github.cepr0.demo.person.mapper.CarMapper;
import io.github.cepr0.demo.person.repo.CarRepo;
import org.springframework.stereotype.Service;
@Service
public class CarService extends AbstractCrudService<Car, String, CarRequest, CarResponse> {
public CarService(final CarRepo repo, final CarMapper mapper) {
super(repo, mapper);
}
@Override
protected EntityEvent<Car> onCreateEvent(final Car entity) {
return new CarCreateEvent(entity);
}
@Override
protected EntityEvent<Car> onUpdateEvent(final Car entity) {
return new CarUpdateEvent(entity);
}
@Override
protected EntityEvent<Car> onDeleteEvent(final Car entity) {
return new CarDeleteEvent(entity);
}
}
|
[
"cepr0@ukr.net"
] |
cepr0@ukr.net
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.