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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
277c48916620cd9c4d69730c822974428cb4f2e9
|
4eefccd03b49ed93f9aaa497a3a9aadb5968900e
|
/src/main/java/spring/study/day01/ex03/LgTV.java
|
1b41d8defdf43eea4ea6446ca0da728155240ecb
|
[] |
no_license
|
joeunseong/spring-study
|
8e35a208919c74dcfd5d36515083a90d6119546a
|
12b6a56c09bbae1e7f6eca25636d42ed809f8f15
|
refs/heads/master
| 2022-06-06T06:00:43.448492
| 2020-04-18T07:55:52
| 2020-04-18T07:55:52
| 256,688,269
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 431
|
java
|
package spring.study.day01.ex03;
public class LgTV implements TV {
@Override
public void powerOn() {
System.out.println("LgTV :: powerOn()");
}
@Override
public void powerOff() {
System.out.println("LgTV :: powerOff()");
}
@Override
public void volumeUp() {
System.out.println("LgTV :: volumeUp()");
}
@Override
public void volumeDown() {
System.out.println("LgTV :: volumeDown()");
}
}
|
[
"euns29@naver.com"
] |
euns29@naver.com
|
c4c0f76944b819d89cfdb2cedeca44eebce772fb
|
7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b
|
/Crawler/data/HasValueEnumTypeHandler.java
|
b2d98a7a628a3bea7a08f38e6b41719d6ea0fdd5
|
[] |
no_license
|
NayrozD/DD2476-Project
|
b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0
|
94dfb3c0a470527b069e2e0fd9ee375787ee5532
|
refs/heads/master
| 2023-03-18T04:04:59.111664
| 2021-03-10T15:03:07
| 2021-03-10T15:03:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,103
|
java
|
15
https://raw.githubusercontent.com/zjjxxlgb/mybatis2sql/master/src/test/java/org/apache/ibatis/submitted/enum_interface_type_handler/HasValueEnumTypeHandler.java
/**
* Copyright ${license.git.copyrightYears} the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ibatis.submitted.enum_interface_type_handler;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.MappedTypes;
@MappedTypes(HasValue.class)
public class HasValueEnumTypeHandler<E extends Enum<E> & HasValue> extends
BaseTypeHandler<E> {
private Class<E> type;
private final E[] enums;
public HasValueEnumTypeHandler(Class<E> type) {
if (type == null)
throw new IllegalArgumentException("Type argument cannot be null");
this.type = type;
this.enums = type.getEnumConstants();
if (!type.isInterface() && this.enums == null)
throw new IllegalArgumentException(type.getSimpleName()
+ " does not represent an enum type.");
}
@Override
public void setNonNullParameter(PreparedStatement ps, int i, E parameter,
JdbcType jdbcType) throws SQLException {
ps.setInt(i, parameter.getValue());
}
@Override
public E getNullableResult(ResultSet rs, String columnName)
throws SQLException {
int value = rs.getInt(columnName);
if (rs.wasNull()) {
return null;
}
for (E enm : enums) {
if (value == enm.getValue()) {
return enm;
}
}
throw new IllegalArgumentException("Cannot convert "
+ value + " to " + type.getSimpleName());
}
@Override
public E getNullableResult(ResultSet rs, int columnIndex)
throws SQLException {
int value = rs.getInt(columnIndex);
if (rs.wasNull()) {
return null;
}
for (E enm : enums) {
if (value == enm.getValue()) {
return enm;
}
}
throw new IllegalArgumentException("Cannot convert "
+ value + " to " + type.getSimpleName());
}
@Override
public E getNullableResult(CallableStatement cs, int columnIndex)
throws SQLException {
int value = cs.getInt(columnIndex);
if (cs.wasNull()) {
return null;
}
for (E enm : enums) {
if (value == enm.getValue()) {
return enm;
}
}
throw new IllegalArgumentException("Cannot convert "
+ value + " to " + type.getSimpleName());
}
}
|
[
"veronika.cucorova@gmail.com"
] |
veronika.cucorova@gmail.com
|
893cd25cacdf85207d1a56c72de8f45ab16a3c63
|
1ce6f9deac932e27a977558345d0df7202c20503
|
/javase_prj/src/kr/co/sist/memo/run/RunJavaMemo.java
|
b3485757c5faaba02b1da12c15134c652bfca56a
|
[] |
no_license
|
minj0i/sist-java
|
3782bfaa6e0561ae2160bab4202f405c324c1894
|
e7c800c8433434617f564d905207f49cbac7733f
|
refs/heads/master
| 2020-04-09T12:00:15.732203
| 2019-04-22T08:11:22
| 2019-04-22T08:11:22
| 160,332,230
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 1,446
|
java
|
package kr.co.sist.memo.run;
import java.awt.Font;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.ObjectInputStream;
import kr.co.sist.memo.view.JavaMemo;
/**
* 메모장 클래스를 실행하는 일.
* @author owner
*/
public class RunJavaMemo {
/////////////2018-12-21 코드 추가(OIS)//////////
public Font readFontInfo() throws IOException, ClassNotFoundException {
// BufferedReader br= null;
ObjectInputStream ois = null;
Font font = null;
try {
ois = new ObjectInputStream(new FileInputStream("c:/dev/temp/memo.dat"));
font = (Font)ois.readObject();
// br = new BufferedReader(new FileReader("c:/dev/temp/memo.dat"));
// String readFont= br.readLine();
// String[] temp = readFont.split(",");
// font = new Font(temp[0], Integer.parseInt(temp[1]), Integer.parseInt(temp[2]));
}finally {
if(ois!=null) {ois.close();}//end if
// if(br!=null) {br.close();}//end if
}//end finally
return font;
}//readFontInfo
/**
* 자바클래스를 실행하는 일 : Java Application
* @param args
*/
public static void main(String[] args) {
RunJavaMemo rjm = new RunJavaMemo();
Font font = null;
try {
font = rjm.readFontInfo();
} catch (ClassNotFoundException cnfe) {
cnfe.printStackTrace();
}catch (IOException e) {
e.printStackTrace();
}//
new JavaMemo(font);
}//main
}//class
|
[
"h_hoh@naver.com"
] |
h_hoh@naver.com
|
8eb0ae061db81429a04dcc444aa91240c676d760
|
d43b1cb3c37a7aed947e7d99d97fdea5f25a24f4
|
/org.ualerts.fixed/org.ualerts.fixed.service/src/test/java/org/ualerts/fixed/service/commands/FindAllActiveBuildingsCommandTest.java
|
6eb03dd9f72a8c4090c3c3992fc4dfef7e1ebe7f
|
[
"Apache-2.0"
] |
permissive
|
mukpal/ualerts-server
|
088dbb6ae6f3faaff69e04dedb6f6bc0b682393c
|
58e921d9251e548e86e84b8041df17f64e746bc2
|
refs/heads/master
| 2020-12-31T06:32:28.561201
| 2013-10-21T14:42:16
| 2013-10-21T14:42:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,124
|
java
|
/*
* File created on Oct 9, 2013
*
* Copyright 2008-2011 Virginia Polytechnic Institute and State University
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.ualerts.fixed.service.commands;
import java.util.ArrayList;
import java.util.List;
import org.jmock.Expectations;
import org.jmock.Mockery;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.ualerts.fixed.Building;
import org.ualerts.fixed.repository.BuildingRepository;
/**
* Unit tests for {@link FindAllActiveBuildingsCommand}.
*
* @author Brian Early
* @author Michael Irwin
*/
public class FindAllActiveBuildingsCommandTest {
private Mockery context;
private BuildingRepository repository;
private FindAllActiveBuildingsCommand command;
/**
* @throws java.lang.Exception
*/
@Before
public void setUp() throws Exception {
context = new Mockery();
repository = context.mock(BuildingRepository.class);
command = new FindAllActiveBuildingsCommand();
command.setBuildingRepository(repository);
}
/**
* @throws java.lang.Exception
*/
@After
public void tearDown() throws Exception {
command = null;
repository = null;
}
/**
* Test method for
* {@link FindAllActiveBuildingsCommand#onExecute()}.
*/
@Test
public void testOnExecute() throws Exception {
final List<Building> buildings = new ArrayList<Building>();
context.checking(new Expectations() { {
oneOf(repository).findAllActiveBuildings();
will(returnValue(buildings));
} });
command.onExecute();
context.assertIsSatisfied();
}
}
|
[
"mikesir87@gmail.com"
] |
mikesir87@gmail.com
|
d1d41adc6c821e5f27ae839891fff74e4cee09c3
|
ebd0bcf2a5dd9edfab82ff30ca2b952e21dfee88
|
/src/org/jglrxavpok/blocky/ui/UIConfirmMenu.java
|
4291021f89dabd4d750532f8c13d9cde96ec48c6
|
[] |
no_license
|
OurCraft/Blocky
|
044c9f18f9532539e8e663e182a17532b987111f
|
3d4d8e6e00cf1aab5a2952f75134c73f81b9d7a2
|
refs/heads/master
| 2016-09-05T15:46:51.633864
| 2014-10-22T19:51:04
| 2014-10-22T19:51:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,293
|
java
|
package org.jglrxavpok.blocky.ui;
import org.jglrxavpok.blocky.ui.UILabel.LabelAlignment;
import org.jglrxavpok.blocky.utils.Lang;
public class UIConfirmMenu extends UIMenu
{
private int color;
private String text;
private UIMenu noMenu;
private UIMenu yesMenu;
private UIButton yesButton;
private UIButton noButton;
public UIConfirmMenu(UIMenu yesMenu, UIMenu noMenu, String questionText, int questionColor)
{
this.yesMenu = yesMenu;
this.noMenu = noMenu;
this.text = questionText;
this.color = questionColor;
}
public void initMenu()
{
UILabel label = new UILabel(text,w/2,h/2+50, LabelAlignment.CENTERED);
comps.add(label);
label.color = color;
yesButton = new UIButton(this, w/2-360,h/2-60,350,40,Lang.getLocalized("confirm.yes"));
noButton = new UIButton(this, w/2+10,h/2-60,350,40,Lang.getLocalized("confirm.no"));
comps.add(yesButton);
comps.add(noButton);
}
public void componentClicked(UIComponentBase b)
{
if(b == yesButton)
{
UI.displayMenu(yesMenu);
}
else if(b == noButton)
{
UI.displayMenu(noMenu);
}
}
public void renderOverlay(int mx, int my, boolean[] buttons)
{
super.renderOverlay(mx, my, buttons);
}
public void render(int mx, int my, boolean[] buttons)
{
super.render(mx, my, buttons);
}
}
|
[
"jglrxavpok@gmail.com"
] |
jglrxavpok@gmail.com
|
0b5bdc4f70c862ab6fd1b31e0522369e4232a262
|
714a1d3230c66c57285f7da234b94b505ef964c9
|
/src/main/java/com/toceansoft/permission/service/UserService.java
|
7ef774af02d1e6376b50db834a7f26d0ced980c2
|
[] |
no_license
|
narci2010/permission
|
ffbadf138686618f09cc40aefcd616155f9dbcac
|
0ecf69668295fdb65c3a0da4a501c30b8560f22a
|
refs/heads/master
| 2021-01-21T21:38:13.540481
| 2017-07-27T09:51:44
| 2017-07-27T09:51:44
| 98,519,230
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,059
|
java
|
package com.toceansoft.permission.service;
import com.toceansoft.permission.entity.User;
import java.util.List;
import java.util.Set;
/**
* <p>User: Narci Lee
* <p>Date: 17-7-27
* <p>Version: 1.0
*/
public interface UserService {
/**
* 创建用户
* @param user
*/
public User createUser(User user);
public User updateUser(User user);
public void deleteUser(Long userId);
/**
* 修改密码
* @param userId
* @param newPassword
*/
public void changePassword(Long userId, String newPassword);
User findOne(Long userId);
List<User> findAll();
/**
* 根据用户名查找用户
* @param username
* @return
*/
public User findByUsername(String username);
/**
* 根据用户名查找其角色
* @param username
* @return
*/
public Set<String> findRoles(String username);
/**
* 根据用户名查找其权限
* @param username
* @return
*/
public Set<String> findPermissions(String username);
}
|
[
"narci.ltc@toceansoft.com"
] |
narci.ltc@toceansoft.com
|
5f306260d9e4d040d8f4d6445637c2b2f52a7704
|
6253283b67c01a0d7395e38aeeea65e06f62504b
|
/decompile/app/HwDeskClock/src/main/java/android/support/v4/app/NotificationCompatSideChannelService.java
|
470e41e2105fe6c973cf9131d5a278651b8bc24e
|
[] |
no_license
|
sufadi/decompile-hw
|
2e0457a0a7ade103908a6a41757923a791248215
|
4c3efd95f3e997b44dd4ceec506de6164192eca3
|
refs/heads/master
| 2023-03-15T15:56:03.968086
| 2017-11-08T03:29:10
| 2017-11-08T03:29:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,828
|
java
|
package android.support.v4.app;
import android.app.Notification;
import android.app.Service;
import android.content.Intent;
import android.os.Build.VERSION;
import android.os.IBinder;
import android.os.RemoteException;
import android.support.v4.app.INotificationSideChannel.Stub;
public abstract class NotificationCompatSideChannelService extends Service {
private class NotificationSideChannelStub extends Stub {
private NotificationSideChannelStub() {
}
public void notify(String packageName, int id, String tag, Notification notification) throws RemoteException {
NotificationCompatSideChannelService.this.checkPermission(getCallingUid(), packageName);
long idToken = clearCallingIdentity();
try {
NotificationCompatSideChannelService.this.notify(packageName, id, tag, notification);
} finally {
restoreCallingIdentity(idToken);
}
}
public void cancel(String packageName, int id, String tag) throws RemoteException {
NotificationCompatSideChannelService.this.checkPermission(getCallingUid(), packageName);
long idToken = clearCallingIdentity();
try {
NotificationCompatSideChannelService.this.cancel(packageName, id, tag);
} finally {
restoreCallingIdentity(idToken);
}
}
public void cancelAll(String packageName) {
NotificationCompatSideChannelService.this.checkPermission(getCallingUid(), packageName);
long idToken = clearCallingIdentity();
try {
NotificationCompatSideChannelService.this.cancelAll(packageName);
} finally {
restoreCallingIdentity(idToken);
}
}
}
public abstract void cancel(String str, int i, String str2);
public abstract void cancelAll(String str);
public abstract void notify(String str, int i, String str2, Notification notification);
public IBinder onBind(Intent intent) {
if (!intent.getAction().equals("android.support.BIND_NOTIFICATION_SIDE_CHANNEL") || VERSION.SDK_INT > 19) {
return null;
}
return new NotificationSideChannelStub();
}
private void checkPermission(int callingUid, String packageName) {
String[] packagesForUid = getPackageManager().getPackagesForUid(callingUid);
int i = 0;
int length = packagesForUid.length;
while (i < length) {
if (!packagesForUid[i].equals(packageName)) {
i++;
} else {
return;
}
}
throw new SecurityException("NotificationSideChannelService: Uid " + callingUid + " is not authorized for package " + packageName);
}
}
|
[
"liming@droi.com"
] |
liming@droi.com
|
72db2b46f6e8f482ec0d75929829b5eb557f5a6a
|
b0d1dd5611bd6deb4cd5549dc778d7c6cd77477a
|
/sams-fee-0.0.8/src/com/narendra/sams/fee/service/impl/FeePaymentServiceImpl.java
|
bdef85c85063108fc084044981453586e4346701
|
[] |
no_license
|
kajubaba/kamlesh
|
a28496e4bb8a277532ed01c9c9e0ced31b27b064
|
3419fd55afe8044660948cd6ed5342ed025b81e8
|
refs/heads/master
| 2021-07-06T16:22:47.738261
| 2017-10-02T06:59:23
| 2017-10-02T06:59:23
| 105,502,681
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,470
|
java
|
package com.narendra.sams.fee.service.impl;
import com.narendra.sams.admission.dao.FeePaymentDAO;
import com.narendra.sams.admission.dao.StudentDAO;
import com.narendra.sams.admission.domain.FeeTransaction;
import com.narendra.sams.admission.domain.Student;
import com.narendra.sams.admission.service.StudentIdGeneratorService;
import com.narendra.sams.admission.service.StudentService;
import com.narendra.sams.communication.service.SmsSender;
import com.narendra.sams.core.domain.AcademicYear;
import com.narendra.sams.core.domain.AcademicYearAdmissionCount;
import com.narendra.sams.core.domain.InstituteSetting;
import com.narendra.sams.core.domain.StudentStatus;
import com.narendra.sams.core.exception.OperationCanNotSucceedException;
import com.narendra.sams.core.service.AcademicYearFeeService;
import com.narendra.sams.core.service.InstituteSettingService;
import com.narendra.sams.fee.domain.PayFeeReturn;
import com.narendra.sams.fee.service.CustomizeStudentFeeService;
import com.narendra.sams.fee.service.FeePaymentService;
import com.narendra.sams.fee.service.StudentActivityService;
public class FeePaymentServiceImpl implements FeePaymentService {
private AcademicYearFeeService academicYearFeeService;
private CustomizeStudentFeeService customizeStudentFeeService;
private FeePaymentDAO feePaymentDAO;
private InstituteSettingService instituteSettingService;
private SmsSender smsSender;
private StudentActivityService studentActivityService;
private StudentDAO studentDAO;
private StudentIdGeneratorService studentIdGeneratorService;
private StudentService studentService;
public FeePaymentDAO getFeePaymentDAO() {
return this.feePaymentDAO;
}
public void setFeePaymentDAO(FeePaymentDAO feePaymentDAO) {
this.feePaymentDAO = feePaymentDAO;
}
public StudentDAO getStudentDAO() {
return this.studentDAO;
}
public void setStudentDAO(StudentDAO studentDAO) {
this.studentDAO = studentDAO;
}
public StudentActivityService getStudentActivityService() {
return this.studentActivityService;
}
public void setStudentActivityService(StudentActivityService studentActivityService) {
this.studentActivityService = studentActivityService;
}
public StudentService getStudentService() {
return this.studentService;
}
public void setStudentService(StudentService studentService) {
this.studentService = studentService;
}
public AcademicYearFeeService getAcademicYearFeeService() {
return this.academicYearFeeService;
}
public void setAcademicYearFeeService(AcademicYearFeeService academicYearFeeService) {
this.academicYearFeeService = academicYearFeeService;
}
public CustomizeStudentFeeService getCustomizeStudentFeeService() {
return this.customizeStudentFeeService;
}
public void setCustomizeStudentFeeService(CustomizeStudentFeeService customizeStudentFeeService) {
this.customizeStudentFeeService = customizeStudentFeeService;
}
public SmsSender getSmsSender() {
return this.smsSender;
}
public void setSmsSender(SmsSender smsSender) {
this.smsSender = smsSender;
}
public InstituteSettingService getInstituteSettingService() {
return this.instituteSettingService;
}
public void setInstituteSettingService(InstituteSettingService instituteSettingService) {
this.instituteSettingService = instituteSettingService;
}
public StudentIdGeneratorService getStudentIdGeneratorService() {
return this.studentIdGeneratorService;
}
public void setStudentIdGeneratorService(StudentIdGeneratorService studentIdGeneratorService) {
this.studentIdGeneratorService = studentIdGeneratorService;
}
public synchronized PayFeeReturn payFee(FeeTransaction feeTransaction, Long userId) {
PayFeeReturn payFeeReturn;
if (feeTransaction == null) {
payFeeReturn = null;
} else {
if (feeTransaction.getCustomizeInstallment() != null) {
feeTransaction.setAcademicYear(this.customizeStudentFeeService.getCustomizeInstallment(feeTransaction.getCustomizeInstallment().getId()).getAcademicYearFee().getAcademicYear());
} else {
feeTransaction.setAcademicYear(this.academicYearFeeService.getAcademicYearFeeInstallment(feeTransaction.getAcademicYearFeeInstallment().getId()).getAcademicYearFee().getAcademicYear());
}
Student student = this.studentDAO.getStudentById(feeTransaction.getStudent().getId());
feeTransaction.setInstitute(student.getInstitute());
AcademicYearAdmissionCount academicYearAdmissionCount = this.studentDAO.loadAcademicYearAdmissionCount(feeTransaction.getAcademicYear().getId());
String transactionId = prepareTransactionId(academicYearAdmissionCount.getTransactionCount(), feeTransaction.getAcademicYear());
feeTransaction.setTransactionId(transactionId);
InstituteSetting instituteSetting = this.instituteSettingService.getInstituteSetting(student.getInstitute().getId());
long recieptNo = instituteSetting.getFeeSettings().getLastFeeReceiptNo().longValue() + 1;
Long dbTransactionId = this.feePaymentDAO.payFee(feeTransaction, userId);
this.smsSender.sendFeeDepositSMS(student.getId(), feeTransaction.getFeeSum(), feeTransaction.getPaymentDate());
academicYearAdmissionCount.setTransactionCount(Long.valueOf(academicYearAdmissionCount.getTransactionCount().longValue() + 1));
instituteSetting.getFeeSettings().setLastFeeReceiptNo(Long.valueOf(recieptNo));
feeTransaction.setRecieptNo(Long.valueOf(recieptNo));
if (!StudentStatus.CONFIRMED.equals(student.getStudentStatus().getId())) {
try {
this.studentActivityService.updateStudentStatus(student.getId(), StudentStatus.CONFIRMED, userId, "System automtically confirmed student on fee payment");
} catch (OperationCanNotSucceedException e) {
e.printStackTrace();
}
}
this.studentIdGeneratorService.generateStudentId(student.getId());
payFeeReturn = new PayFeeReturn();
payFeeReturn.setRecieptNo(Long.valueOf(recieptNo));
payFeeReturn.setTransactionId(transactionId);
payFeeReturn.setDbTransactionId(dbTransactionId);
}
return payFeeReturn;
}
private synchronized String prepareTransactionId(Long transactionCount, AcademicYear academicYear) {
StringBuffer sb;
sb = new StringBuffer();
long count = transactionCount.longValue() + 1;
sb.append(academicYear.getName().trim().substring(2, 4));
if (count < 10) {
sb.append("0000000");
} else if (count < 100) {
sb.append("000000");
} else if (count < 1000) {
sb.append("00000");
} else if (count < 10000) {
sb.append("0000");
} else if (count < 100000) {
sb.append("000");
} else if (count < 1000000) {
sb.append("00");
} else if (count < 10000000) {
sb.append("0");
} else if (count < 100000000) {
sb.append("");
}
sb.append(count);
return sb.toString();
}
}
|
[
"34kamlesh@gmail.com"
] |
34kamlesh@gmail.com
|
ee675c92970ce023ec82a565c1a40996c250f4d4
|
5a8f5a920830155f8ed98c61aac9ce41446a3812
|
/login-service/src/main/java/com/ecochain/user/entity/BaseEntity.java
|
c2c143b384bbeb0d8c00aada34fa0b3145198695
|
[] |
no_license
|
tonels/RBAC
|
8fea0d2446fda34d192cd2bbae3508b92cacd62d
|
4b5b0c574e044cce653be6a934476a72050da4e8
|
refs/heads/master
| 2023-01-13T01:04:14.966331
| 2020-04-16T06:41:07
| 2020-04-16T06:41:07
| 226,763,305
| 2
| 0
| null | 2023-01-12T12:18:45
| 2019-12-09T01:57:20
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 214
|
java
|
package com.ecochain.user.entity;
import java.io.Serializable;
public class BaseEntity implements Serializable {
/**
*
*/
private static final long serialVersionUID = -2040361328380381222L;
}
|
[
"1589900136@qq.com"
] |
1589900136@qq.com
|
d1473c0205f8289de60e4015a4403d5375c20b23
|
e175eb50cc5b29a766344ecc1fb5a3e1c32e16f2
|
/Android_Dev/Hackaton_Project/.svn/pristine/d1/d1473c0205f8289de60e4015a4403d5375c20b23.svn-base
|
357308fa7e4358890a5c12ebed595b7657b25787
|
[] |
no_license
|
rajpalparyani/RajRepo
|
28fddd8eef7cc83b2194ba25105628ee7fd887ca
|
5f3e215bcf39f0a7542b3bb8dfc458854ae25cde
|
refs/heads/master
| 2020-04-12T18:25:07.276246
| 2013-12-09T22:41:51
| 2013-12-09T22:41:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 943
|
/**
*
* Copyright 2012 TeleNav, Inc. All rights reserved.
* HttpController.java
*
*/
package com.telenav.carconnect.provider.tnlink.module.http;
import com.telenav.carconnect.CarConnectManager;
import com.telenav.navsdk.events.HttpProxyEvents.HttpProxyResponse;
/**
*@author xiangli
*@date 2012-3-1
*/
public class HttpController
{
public static void sendResponse(int id, String headers, byte[] data, int responseCode)
{
HttpProxyResponse.Builder builder = HttpProxyResponse.newBuilder();
builder.setHeaders(headers);
com.google.protobuf.ByteString payLoad = com.google.protobuf.ByteString.copyFrom(data);
builder.setPayload(payLoad);
builder.setRequestId(id);
builder.setHttpResponseCode(responseCode);
HttpProxyResponse response = builder.build();
CarConnectManager.getEventBus().broadcast("HttpProxyResponse", response);
}
}
|
[
"x"
] |
x
|
|
5d1f50c9c50bba16dde02e6ece78584040ae1ac1
|
fd788168bf16156330c5509ae59addeeff9ef111
|
/integration/src/test/java/org/hibernate/validator/integration/wildfly/xml/JaxpContainedInDeploymentIT.java
|
9813abefd65a6892e76752bb220d25098a3ababb
|
[
"LicenseRef-scancode-dco-1.1",
"Apache-2.0"
] |
permissive
|
vootan/hibernate-validator
|
0f3c8e1593818be55e8dc03abe870c01508bbbf3
|
8c60b9938f7c18666e266067c45a69d5f78e7878
|
refs/heads/main
| 2023-07-07T21:36:20.669362
| 2021-08-10T20:04:47
| 2021-08-10T20:04:47
| 394,723,290
| 0
| 0
|
NOASSERTION
| 2021-08-10T17:09:27
| 2021-08-10T17:09:27
| null |
UTF-8
|
Java
| false
| false
| 4,064
|
java
|
/*
* Hibernate Validator, declare and validate application constraints
*
* License: Apache License, Version 2.0
* See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
*/
package org.hibernate.validator.integration.wildfly.xml;
import static org.assertj.core.api.Assertions.assertThat;
import java.util.Set;
import javax.inject.Inject;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.Validator;
import jakarta.validation.constraints.NotNull;
import org.hibernate.validator.integration.AbstractArquillianIT;
import org.jboss.arquillian.container.test.api.Deployer;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.test.api.RunAsClient;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.asset.Asset;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.shrinkwrap.descriptor.api.Descriptors;
import org.jboss.shrinkwrap.descriptor.api.validationConfiguration11.ValidationConfigurationDescriptor;
import org.jboss.shrinkwrap.descriptor.api.validationMapping11.ValidationMappingDescriptor;
import org.jboss.shrinkwrap.resolver.api.maven.Maven;
import org.testng.annotations.Test;
/**
* Test for https://hibernate.atlassian.net/browse/HV-1280. To reproduce the issue, the deployment must be done twice
* (it will only show up during the 2nd deploy), which is why the test is managing the deployment itself via client-side
* test methods.
*
* @author Gunnar Morling
*/
public class JaxpContainedInDeploymentIT extends AbstractArquillianIT {
private static final String WAR_FILE_NAME = JaxpContainedInDeploymentIT.class.getSimpleName() + ".war";
@ArquillianResource
private Deployer deployer;
@Inject
private Validator validator;
@Deployment(name = "jaxpit", managed = false)
public static Archive<?> createTestArchive() {
return buildTestArchive( WAR_FILE_NAME )
.addClass( Camera.class )
.addAsResource( validationXml(), "META-INF/validation.xml" )
.addAsResource( mappingXml(), "META-INF/my-mapping.xml" )
.addAsLibrary( Maven.resolver().resolve( "xerces:xercesImpl:2.9.1" ).withoutTransitivity().asSingleFile() )
.addAsWebInfResource( EmptyAsset.INSTANCE, "beans.xml" );
}
private static Asset validationXml() {
String validationXml = Descriptors.create( ValidationConfigurationDescriptor.class )
.version( "1.1" )
.constraintMapping( "META-INF/my-mapping.xml" )
.exportAsString();
return new StringAsset( validationXml );
}
private static Asset mappingXml() {
String mappingXml = Descriptors.create( ValidationMappingDescriptor.class )
.version( "1.1" )
.createBean()
.clazz( Camera.class.getName() )
.createField()
.name( "brand" )
.createConstraint()
.annotation( "jakarta.validation.constraints.NotNull" )
.up()
.up()
.up()
.exportAsString();
return new StringAsset( mappingXml );
}
@Test
@RunAsClient
public void deploy1() throws Exception {
deployer.deploy( "jaxpit" );
}
@Test(dependsOnMethods = "deploy1")
public void test1() throws Exception {
doTest();
}
@Test(dependsOnMethods = "test1")
@RunAsClient
public void undeploy1() throws Exception {
deployer.undeploy( "jaxpit" );
}
@Test(dependsOnMethods = "undeploy1")
@RunAsClient
public void deploy2() throws Exception {
deployer.deploy( "jaxpit" );
}
@Test(dependsOnMethods = "deploy2")
public void test2() throws Exception {
doTest();
}
@Test(dependsOnMethods = "test2")
@RunAsClient
public void undeploy2() throws Exception {
deployer.undeploy( "jaxpit" );
}
private void doTest() {
Set<ConstraintViolation<Camera>> violations = validator.validate( new Camera() );
assertThat( violations ).hasSize( 1 );
assertThat( violations.iterator()
.next()
.getConstraintDescriptor()
.getAnnotation()
.annotationType()
).isSameAs( NotNull.class );
}
}
|
[
"guillaume.smet@gmail.com"
] |
guillaume.smet@gmail.com
|
df163e05ff36660d8861630f980a66552f38da8a
|
d7452b9df968de07286903ea5f541f9ff680eeb0
|
/cosmetic-core/src/main/java/com/cyberlink/core/service/impl/RedisBasedCacheService.java
|
30bac0ffe3c0ed740118a8f576b4ba58ba49c5c9
|
[
"Apache-2.0"
] |
permissive
|
datree-demo/bcserver_demo
|
21075c94726932d325b291fb0c26b82cacc26b5b
|
852a8d4780d3724236e1d5069cccf2dbe7a4dce9
|
refs/heads/master
| 2020-04-07T08:28:28.382766
| 2017-03-14T03:16:35
| 2017-03-14T03:16:35
| 158,215,647
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,014
|
java
|
package com.cyberlink.core.service.impl;
import org.springframework.cache.Cache;
import org.springframework.cache.Cache.ValueWrapper;
import org.springframework.data.redis.cache.RedisCacheManager;
import com.cyberlink.core.service.AbstractService;
import com.cyberlink.core.service.CacheService;
public class RedisBasedCacheService<K, V> extends AbstractService implements
CacheService<K, V> {
private final Cache cache;
public RedisBasedCacheService(RedisCacheManager manager, String cacheName) {
this.cache = manager.getCache(cacheName);
}
@SuppressWarnings("unchecked")
@Override
public V get(K k) {
ValueWrapper vw = cache.get(k);
if (vw == null) {
return null;
}
return (V) vw.get();
}
@Override
public void put(K k, V v) {
cache.put(k, v);
}
@Override
public void remove(K k) {
cache.evict(k);
}
@Override
public void removeAll() {
cache.clear();
}
}
|
[
"wuyongwen@gmail.com"
] |
wuyongwen@gmail.com
|
4e2635f718228656e5212c7cddd0ed065ecc2d2b
|
ffa68d024f31a1a635e92ec21d7c6f8ff63e46e5
|
/asakusafw-spi/src/main/java/jp/hishidama/asakusafw_spi/dmdl/template/driver/beans/TemplatePropertyBean.java
|
aeb1a2a7174537b2b22e2f5f830d928d4415eb3a
|
[] |
no_license
|
hishidama/asakusafw-spi
|
966e4c6d8739b0223c7d8484a58a1e48506d6eb8
|
8681b34915774103261825a8726b8ff6eab4d28a
|
refs/heads/master
| 2021-01-24T16:10:22.882159
| 2018-12-03T10:47:28
| 2018-12-03T10:47:28
| 39,774,096
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,866
|
java
|
package jp.hishidama.asakusafw_spi.dmdl.template.driver.beans;
import jp.hishidama.asakusafw_spi.dmdl.template.driver.TemplateFieldTrait;
import jp.hishidama.asakusafw_spi.dmdl.template.driver.TemplateFieldTraits;
import com.asakusafw.dmdl.model.AstDescription;
import com.asakusafw.dmdl.semantics.PropertyDeclaration;
public class TemplatePropertyBean extends AbstractTemplateBean {
protected final PropertyDeclaration declaration;
public TemplatePropertyBean(TemplateRootBean root, PropertyDeclaration declaration) {
super(root);
this.declaration = declaration;
}
public String getName() {
return declaration.getName().identifier;
}
public String getCamelName() {
return TemplateBeanUtil.toCamelCase(getName());
}
public String getDescription() {
AstDescription d = declaration.getDescription();
if (d == null) {
return null;
}
return d.getText();
}
private TemplateTypeBean typeBean;
public TemplateTypeBean getType() {
if (typeBean == null) {
typeBean = factory().createTypeBean(rootBean, declaration.getType());
}
return typeBean;
}
public String getJavaType() {
return getType().getJavaClass().getSimpleName();
}
public String getJavaTypeAs() {
String type = getType().getName();
if ("TEXT".equals(type)) {
return "String";
} else {
return getJavaType();
}
}
public String getOptionType() {
return getType().getOptionClass().getSimpleName();
}
public String getGetter() {
return "get" + getCamelName();
}
public String getSetter() {
return "set" + getCamelName();
}
public String getGetterAs() {
String type = getType().getName();
if ("TEXT".equals(type)) {
return getGetterAsString();
} else {
return getGetter();
}
}
public String getSetterAs() {
String type = getType().getName();
if ("TEXT".equals(type)) {
return getSetterAsString();
} else {
return getSetter();
}
}
public String getGetterOption() {
return "get" + getCamelName() + "Option";
}
public String getSetterOption() {
return "set" + getCamelName() + "Option";
}
public String getGetterAsString() {
return "get" + getCamelName() + "AsString";
}
public String getSetterAsString() {
return "set" + getCamelName() + "AsString";
}
public String getRole() {
TemplateFieldTraits traits = declaration.getTrait(TemplateFieldTraits.class);
if (traits == null) {
return null;
}
String modelId = modelTrait().getConfiguration().getId();
for (TemplateFieldTrait trait : traits) {
String id = trait.getConfiguration().getId();
if (modelId == null || id == null || modelId.equals(id)) {
return trait.getConfiguration().getRole();
}
}
return null;
}
@Override
public String toString() {
return getName();
}
}
|
[
"hishi.dama@asahi.email.ne.jp"
] |
hishi.dama@asahi.email.ne.jp
|
b87b6cd7fa1d62370ae86cb34c654b50a94b8399
|
49996b5a950bca6707baacb094a212648414446a
|
/xwiki-platform-core/xwiki-platform-mail/xwiki-platform-mail-send/xwiki-platform-mail-send-default/src/test/java/org/xwiki/mail/internal/RecipientConverterTest.java
|
59227218927965a102889dc7483e3e3ac47a53cb
|
[] |
no_license
|
toannh/xwiki-platform
|
09cbe140ac114ca37746e5a20d8db3f2e925c16b
|
8e34825faf02ea9e2a08aa99b8af63e33b86072c
|
refs/heads/master
| 2020-12-29T00:56:30.029730
| 2015-01-26T10:11:39
| 2015-01-26T10:11:39
| 29,856,505
| 0
| 1
| null | 2015-01-26T10:38:41
| 2015-01-26T10:38:41
| null |
UTF-8
|
Java
| false
| false
| 2,606
|
java
|
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.xwiki.mail.internal;
import javax.mail.Message;
import javax.mail.internet.MimeMessage;
import org.junit.Rule;
import org.junit.Test;
import org.xwiki.properties.converter.ConversionException;
import org.xwiki.test.mockito.MockitoComponentMockingRule;
import static org.junit.Assert.*;
/**
* Unit tests for {@link org.xwiki.mail.internal.RecipientConverter}.
*
* @version $Id$
* @since 6.1RC1
*/
public class RecipientConverterTest
{
@Rule
public MockitoComponentMockingRule<RecipientConverter> mocker =
new MockitoComponentMockingRule<>(RecipientConverter.class);
@Test
public void convert() throws Exception
{
assertEquals(Message.RecipientType.TO,
this.mocker.getComponentUnderTest().convert(Message.RecipientType.class, "to"));
assertEquals("To",
this.mocker.getComponentUnderTest().convert(String.class, Message.RecipientType.TO));
assertEquals(Message.RecipientType.CC,
this.mocker.getComponentUnderTest().convert(Message.RecipientType.class, "cc"));
assertEquals(Message.RecipientType.BCC,
this.mocker.getComponentUnderTest().convert(Message.RecipientType.class, "bcc"));
assertEquals(MimeMessage.RecipientType.NEWSGROUPS,
this.mocker.getComponentUnderTest().convert(Message.RecipientType.class, "newsgroups"));
try {
this.mocker.getComponentUnderTest().convert(Message.RecipientType.class, "something");
fail("Should have thrown an exception here");
} catch (ConversionException e) {
assertEquals("Cannot convert [something] to [javax.mail.Message$RecipientType]", e.getMessage());
}
}
}
|
[
"vincent@massol.net"
] |
vincent@massol.net
|
abca021e27df6313d8b2c7218504de2882d7e161
|
1fd42ba538470df5b0f1995e451c9ac7c0f01ee5
|
/src/api/java/mekanism/api/gas/GasTags.java
|
5def816801316ee27e79ffbfe4d471199a6b2906
|
[
"MIT"
] |
permissive
|
owmii/Mekanism
|
3cf248b9def64fb4be4dfd656db5c54a5e25ca3b
|
47c4df4817da613d482b8cb7060f467a93dd652c
|
refs/heads/master
| 2021-02-10T22:59:17.280490
| 2020-02-25T17:10:18
| 2020-02-25T17:10:18
| 244,426,819
| 1
| 0
|
MIT
| 2020-03-02T17:03:25
| 2020-03-02T17:03:24
| null |
UTF-8
|
Java
| false
| false
| 2,057
|
java
|
package mekanism.api.gas;
import java.util.Collection;
import java.util.Optional;
import javax.annotation.Nonnull;
import net.minecraft.tags.Tag;
import net.minecraft.tags.TagCollection;
import net.minecraft.util.ResourceLocation;
public class GasTags {
private static TagCollection<Gas> collection = new TagCollection<>(location -> Optional.empty(), "", false, "");
private static int generation;
public static void setCollection(TagCollection<Gas> collectionIn) {
collection = collectionIn;
generation++;
}
public static TagCollection<Gas> getCollection() {
return collection;
}
public static int getGeneration() {
return generation;
}
public static class Wrapper extends Tag<Gas> {
private int lastKnownGeneration = -1;
private Tag<Gas> cachedTag;
public Wrapper(ResourceLocation resourceLocation) {
super(resourceLocation);
}
@Override
public boolean contains(@Nonnull Gas gas) {
if (this.lastKnownGeneration != GasTags.generation) {
this.cachedTag = GasTags.collection.getOrCreate(this.getId());
this.lastKnownGeneration = GasTags.generation;
}
return this.cachedTag.contains(gas);
}
@Nonnull
@Override
public Collection<Gas> getAllElements() {
if (this.lastKnownGeneration != GasTags.generation) {
this.cachedTag = GasTags.collection.getOrCreate(this.getId());
this.lastKnownGeneration = GasTags.generation;
}
return this.cachedTag.getAllElements();
}
@Nonnull
@Override
public Collection<Tag.ITagEntry<Gas>> getEntries() {
if (this.lastKnownGeneration != GasTags.generation) {
this.cachedTag = GasTags.collection.getOrCreate(this.getId());
this.lastKnownGeneration = GasTags.generation;
}
return this.cachedTag.getEntries();
}
}
}
|
[
"richard@freimer.com"
] |
richard@freimer.com
|
91e85047d5bb50bdd98db6c8c08acc75955aa4dc
|
c945e4e2ed5f7a2ed43cef6ec2b13b49757905d0
|
/extras/perst/src/main/java/at/jku/isse/ecco/storage/perst/dao/PerstAbstractGenericDao.java
|
dd542cb3a9060fbc2efda559f18b6c9e269211dc
|
[] |
no_license
|
jku-isse/ecco
|
8c879df0b8621ce268b792529c29db935e780370
|
370c975416bd38d883463093d1bf13ace6946430
|
refs/heads/master
| 2023-09-06T01:08:30.444151
| 2023-09-04T23:13:13
| 2023-09-05T00:19:49
| 49,525,917
| 12
| 17
| null | 2023-09-14T20:44:09
| 2016-01-12T20:08:57
|
Java
|
UTF-8
|
Java
| false
| false
| 2,600
|
java
|
package at.jku.isse.ecco.storage.perst.dao;
import at.jku.isse.ecco.dao.GenericDao;
import at.jku.isse.ecco.dao.Persistable;
import com.google.inject.Inject;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Abstract generic perst dao that initializes the database and indexers.
*
* @param <T> type of the key
* @author Hannes Thaller
* @version 1.0
*/
public abstract class PerstAbstractGenericDao<T extends Persistable> implements GenericDao {
protected PerstTransactionStrategy transactionStrategy;
// protected final String connectionString;
// protected Storage database = null;
// protected boolean initialized = false;
/**
* Constructs a new AbstractGenericDao with the given connection string that contains the path to the database file. If no database file exists on the given path than a new
* database will be initialized.
*
* @param transactionStrategy the transaction strategy
*/
@Inject
public PerstAbstractGenericDao(PerstTransactionStrategy transactionStrategy) {
checkNotNull(transactionStrategy);
this.transactionStrategy = transactionStrategy;
}
@Override
public void init() {
// if (!this.initialized) {
// database = StorageFactory.getInstance().createStorage();
//
// database.open(connectionString);
// if (database.getRoot() == null) {
// database.setRoot(createDatabaseRoot());
// }
// database.close();
//
// initialized = true;
// }
}
@Override
public void open() {
//this.openDatabase();
}
@Override
public void close() {
//this.closeDatabase();
}
// /**
// * Creates a new root object for a new initialized database.
// *
// * @return The root of the database.
// */
// private DatabaseRoot createDatabaseRoot() {
//
// final FieldIndex<PerstFeature> featureIndex = database.<PerstFeature>createFieldIndex(PerstFeature.class, "name", true);
// final FieldIndex<PerstAssociation> associationIndex = database.<PerstAssociation>createFieldIndex(PerstAssociation.class, "id", true);
// final FieldIndex<PerstCommit> commitIndex = database.<PerstCommit>createFieldIndex(PerstCommit.class, "id", true);
// final FieldIndex<PerstVariant> variantIndex = database.<PerstVariant>createFieldIndex(PerstVariant.class, "name", true);
//
// return new DatabaseRoot(associationIndex, featureIndex, commitIndex, variantIndex);
// }
//
// protected void closeDatabase() {
// if (this.database.isOpened())
// this.database.close();
// }
//
// protected DatabaseRoot openDatabase() {
// if (!database.isOpened())
// database.open(connectionString);
// return database.getRoot();
// }
}
|
[
"llinsbauer@users.noreply.github.com"
] |
llinsbauer@users.noreply.github.com
|
21bbb0f273b601f1c359ace9728547ad48e70990
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XRENDERING-418-15-27-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/rendering/internal/parser/xhtml/wikimodel/XHTMLXWikiGeneratorListener_ESTest.java
|
2065cec5cf619095c5b602deee79a4d2f683d8df
|
[] |
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
| 612
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sat Apr 04 04:20:23 UTC 2020
*/
package org.xwiki.rendering.internal.parser.xhtml.wikimodel;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class XHTMLXWikiGeneratorListener_ESTest extends XHTMLXWikiGeneratorListener_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
ac2d18b4dc50ffeba39b369739f92c54f75d3674
|
2fd9d77d529e9b90fd077d0aa5ed2889525129e3
|
/DecompiledViberSrc/app/src/main/java/com/yandex/mobile/ads/impl/gi.java
|
b6d71069f90377165f5bcae5e033da490317dfc4
|
[] |
no_license
|
cga2351/code
|
703f5d49dc3be45eafc4521e931f8d9d270e8a92
|
4e35fb567d359c252c2feca1e21b3a2a386f2bdb
|
refs/heads/master
| 2021-07-08T15:11:06.299852
| 2021-05-06T13:22:21
| 2021-05-06T13:22:21
| 60,314,071
| 1
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 446
|
java
|
package com.yandex.mobile.ads.impl;
public abstract interface gi
{
public abstract ge a(ds paramds, dn paramdn, gp paramgp, dr paramdr);
public abstract gf a(ds paramds, dn paramdn);
public abstract gf a(ds paramds, dn paramdn, dk paramdk);
}
/* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_4_dex2jar.jar
* Qualified Name: com.yandex.mobile.ads.impl.gi
* JD-Core Version: 0.6.2
*/
|
[
"yu.liang@navercorp.com"
] |
yu.liang@navercorp.com
|
28b792fdfbcc9099642fc1d8a8c401fdaf27cbff
|
e29f051ecfb77c66e6a1f5a5c1e7f434375893eb
|
/src/test/java/com/maxdemarzi/MyServiceWebIntegrationTests.java
|
0e9de5d81f7d11e49f6b929239178ee39524db0b
|
[] |
no_license
|
maxdemarzi/SBRM
|
38e2c39ec067306bc88c28187a0ac47ead2006b0
|
6ebd761dc641c8465dd212ceccd32391251e3c01
|
refs/heads/master
| 2021-01-13T08:40:47.607851
| 2016-10-29T02:51:25
| 2016-10-29T02:51:25
| 72,261,237
| 0
| 0
| null | 2016-10-29T03:16:56
| 2016-10-29T02:51:22
|
Shell
|
UTF-8
|
Java
| false
| false
| 874
|
java
|
package com.maxdemarzi;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.web.client.RestTemplate;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = MyServiceApplication.class, webEnvironment = WebEnvironment.DEFINED_PORT)
public class MyServiceWebIntegrationTests {
private static final int PORT = 8080;
// Parameterize tests like this
private static final String AN_APP_PATH = "http://localhost:" + PORT + "/path";
// Use this to run tests
private RestTemplate restTemplate = new RestTemplate();
@Test
public void sampleTest() {
// Use RestTemplate to hit chosen URLs
}
}
|
[
"maxdemarzi@hotmail.com"
] |
maxdemarzi@hotmail.com
|
db55de2f37c05eed211697e1defc180df0979720
|
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
|
/services/gaussdbfornosql/src/main/java/com/huaweicloud/sdk/gaussdbfornosql/v3/model/SwitchSlowlogDesensitizationRequest.java
|
7b4fa72a8dc3544df3c2c64e7b46ef91609127f3
|
[
"Apache-2.0"
] |
permissive
|
huaweicloud/huaweicloud-sdk-java-v3
|
51b32a451fac321a0affe2176663fed8a9cd8042
|
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
|
refs/heads/master
| 2023-08-29T06:50:15.642693
| 2023-08-24T08:34:48
| 2023-08-24T08:34:48
| 262,207,545
| 91
| 57
|
NOASSERTION
| 2023-09-08T12:24:55
| 2020-05-08T02:27:00
|
Java
|
UTF-8
|
Java
| false
| false
| 3,001
|
java
|
package com.huaweicloud.sdk.gaussdbfornosql.v3.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;
import java.util.function.Consumer;
/**
* Request Object
*/
public class SwitchSlowlogDesensitizationRequest {
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "instance_id")
private String instanceId;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "body")
private SwitchSlowlogDesensitizationRequestBody body;
public SwitchSlowlogDesensitizationRequest withInstanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
/**
* 实例ID,可以调用5.3.3 查询实例列表和详情接口获取。如果未申请实例,可以调用5.3.1 创建实例接口创建。
* @return instanceId
*/
public String getInstanceId() {
return instanceId;
}
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
public SwitchSlowlogDesensitizationRequest withBody(SwitchSlowlogDesensitizationRequestBody body) {
this.body = body;
return this;
}
public SwitchSlowlogDesensitizationRequest withBody(Consumer<SwitchSlowlogDesensitizationRequestBody> bodySetter) {
if (this.body == null) {
this.body = new SwitchSlowlogDesensitizationRequestBody();
bodySetter.accept(this.body);
}
return this;
}
/**
* Get body
* @return body
*/
public SwitchSlowlogDesensitizationRequestBody getBody() {
return body;
}
public void setBody(SwitchSlowlogDesensitizationRequestBody body) {
this.body = body;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
SwitchSlowlogDesensitizationRequest that = (SwitchSlowlogDesensitizationRequest) obj;
return Objects.equals(this.instanceId, that.instanceId) && Objects.equals(this.body, that.body);
}
@Override
public int hashCode() {
return Objects.hash(instanceId, body);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SwitchSlowlogDesensitizationRequest {\n");
sb.append(" instanceId: ").append(toIndentedString(instanceId)).append("\n");
sb.append(" body: ").append(toIndentedString(body)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
ab15305f320d85fe1fb24e39c1c5e103e633fbc9
|
f159aeec3408fe36a9376c50ebb42a9174d89959
|
/171.Excel-Sheet-Column-Number.java
|
5127bdf261f920252ba5342753564825c104fce3
|
[
"MIT"
] |
permissive
|
mickey0524/leetcode
|
83b2d11ab226fad5da7198bb37eeedcd8d17635a
|
fc5b1744af7be93f4dd01d6ad58d2bd12f7ed33f
|
refs/heads/master
| 2023-09-04T00:01:13.138858
| 2023-08-27T07:43:53
| 2023-08-27T07:43:53
| 140,945,128
| 27
| 9
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 536
|
java
|
// https://leetcode.com/problems/excel-sheet-column-number/
//
// algorithms
// Easy (52.25%)
// Total Accepted: 237,025
// Total Submissions: 453,594
// beats 100.0% of java submissions
class Solution {
public int titleToNumber(String s) {
char[] chs = s.toCharArray();
int length = chs.length;
int base = 1, res = 0;
for (int i = length - 1; i >= 0; i--) {
int bit = (chs[i] - 'A') + 1;
res += bit * base;
base *= 26;
}
return res;
}
}
|
[
"buptbh@163.com"
] |
buptbh@163.com
|
69a7007458ec01eeef1d3e7777ea9353fbc258b0
|
1d60b2f757ea3eff26b0ac7937fbdb3f5a19c1cd
|
/lock-redisson-spring-boot-starter-parent/lock-redisson-spring-boot-autoconfigure/src/main/java/com/itopener/lock/redisson/spring/boot/autoconfigure/LockType.java
|
b70c211e49338375c49d2968c5d8df1aa368d779
|
[] |
no_license
|
xie-summer/spring-boot-starters-parent
|
405ad6b8276c623a80bd0c34fe9e710836e7280b
|
cd85592b53e707d2277bdde911f73bf03d1a5e98
|
refs/heads/master
| 2023-07-23T09:38:05.802793
| 2019-12-02T09:36:50
| 2019-12-02T09:36:50
| 123,099,286
| 1
| 6
| null | 2023-09-12T13:55:30
| 2018-02-27T08:42:33
|
Java
|
UTF-8
|
Java
| false
| false
| 295
|
java
|
package com.itopener.lock.redisson.spring.boot.autoconfigure;
/**
* @author summer
* @date 2018年1月9日 上午11:25:59
* @version 1.0.0
*/
public enum LockType {
/** 可重入锁*/
REENTRANT_LOCK,
/** 公平锁*/
FAIR_LOCK,
/** 读锁*/
READ_LOCK,
/** 写锁*/
WRITE_LOCK;
}
|
[
"xieshengrong@live.com"
] |
xieshengrong@live.com
|
16b9bf1f7dbe6d400357c48fad1f9502f905eeaa
|
9cf2e19f081b680e93cedc52a1736dddf57cd0fb
|
/src/com/company/工厂方法模式/NYStyleCheesePizza.java
|
84d6ecc19296012ecd96e75c54c67a27d2e1bc78
|
[] |
no_license
|
Yuwenbiao/DesignPattern
|
8632160e5e3ba1842b994720cb6eecbb674e74d8
|
da4722c8b7156ebf998f417fc16d724c379b3879
|
refs/heads/master
| 2021-07-05T05:11:53.205832
| 2017-09-30T01:08:59
| 2017-09-30T01:08:59
| 105,329,712
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 420
|
java
|
package com.company.工厂方法模式;
import com.company.工厂方法模式.Pizza;
/**
* 纽约风味披萨
*/
public class NYStyleCheesePizza extends Pizza {
public NYStyleCheesePizza() {
name="NY Style Sauce and Cheese Pizza";
dough="Thin Crust Dough";
sauce="Marinara Sauce";
toppings.add("Grated Reggiano Cheese");//上面覆盖的是意大利reggiano高级干酪
}
}
|
[
"2383299053@qq.com"
] |
2383299053@qq.com
|
4385c154627dce9e7a7787c15c9b42ab6c8d83dc
|
7c4477a4bd2f5a3662338893ffdb87edbcce3257
|
/net/minecraft/server/BlockSign.java
|
1c4410cb3ea30f2d78a1d70f3fb86c53b4e09830
|
[] |
no_license
|
Xolsom/mc-dev
|
5921997d1793cf2a0ccc443c1c8b175a7f59ef1f
|
1a792ed860ebe2c6d4c40c52f3bc7b9e0789ca23
|
refs/heads/master
| 2020-12-24T11:17:37.185992
| 2011-07-08T12:23:08
| 2011-07-12T21:28:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,664
|
java
|
package net.minecraft.server;
import java.util.Random;
public class BlockSign extends BlockContainer {
private Class a;
private boolean b;
protected BlockSign(int i, Class oclass, boolean flag) {
super(i, Material.WOOD);
this.b = flag;
this.textureId = 4;
this.a = oclass;
float f = 0.25F;
float f1 = 1.0F;
this.a(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f1, 0.5F + f);
}
public AxisAlignedBB e(World world, int i, int j, int k) {
return null;
}
public void a(IBlockAccess iblockaccess, int i, int j, int k) {
if (!this.b) {
int l = iblockaccess.getData(i, j, k);
float f = 0.28125F;
float f1 = 0.78125F;
float f2 = 0.0F;
float f3 = 1.0F;
float f4 = 0.125F;
this.a(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
if (l == 2) {
this.a(f2, f, 1.0F - f4, f3, f1, 1.0F);
}
if (l == 3) {
this.a(f2, f, 0.0F, f3, f1, f4);
}
if (l == 4) {
this.a(1.0F - f4, f, f2, 1.0F, f1, f3);
}
if (l == 5) {
this.a(0.0F, f, f2, f4, f1, f3);
}
}
}
public boolean b() {
return false;
}
public boolean a() {
return false;
}
protected TileEntity a_() {
try {
return (TileEntity) this.a.newInstance();
} catch (Exception exception) {
throw new RuntimeException(exception);
}
}
public int a(int i, Random random) {
return Item.SIGN.id;
}
public void doPhysics(World world, int i, int j, int k, int l) {
boolean flag = false;
if (this.b) {
if (!world.getMaterial(i, j - 1, k).isBuildable()) {
flag = true;
}
} else {
int i1 = world.getData(i, j, k);
flag = true;
if (i1 == 2 && world.getMaterial(i, j, k + 1).isBuildable()) {
flag = false;
}
if (i1 == 3 && world.getMaterial(i, j, k - 1).isBuildable()) {
flag = false;
}
if (i1 == 4 && world.getMaterial(i + 1, j, k).isBuildable()) {
flag = false;
}
if (i1 == 5 && world.getMaterial(i - 1, j, k).isBuildable()) {
flag = false;
}
}
if (flag) {
this.g(world, i, j, k, world.getData(i, j, k));
world.setTypeId(i, j, k, 0);
}
super.doPhysics(world, i, j, k, l);
}
}
|
[
"erikbroes@grum.nl"
] |
erikbroes@grum.nl
|
3fe11df0474381deb918631553c4f3860f9a7391
|
b765ff986f0cd8ae206fde13105321838e246a0a
|
/Inspect/app/src/main/java/com/growingio_rewriter/a/a/f/p.java
|
f4b0a3245bfe53affb393915032d61d274fc4eb7
|
[] |
no_license
|
piece-the-world/inspect
|
fe3036409b20ba66343815c3c5c9f4b0b768c355
|
a660dd65d7f40501d95429f8d2b126bd8f59b8db
|
refs/heads/master
| 2020-11-29T15:28:39.406874
| 2016-10-09T06:24:32
| 2016-10-09T06:24:32
| 66,539,462
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,373
|
java
|
/*
* Decompiled with CFR 0_115.
*/
package com.growingio.a.a.f;
import com.growingio.a.a.b.aU;
import com.growingio.a.a.f.a;
import com.growingio.a.a.f.m;
import com.growingio.a.a.f.q;
import com.growingio.a.a.f.r;
import com.growingio.a.a.f.s;
import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.concurrent.Executor;
class p {
private m b;
final Object a;
private final Method c;
private final Executor d;
static p a(m m2, Object object, Method method) {
return p.a(method) ? new p(m2, object, method) : new r(m2, object, method, null);
}
private p(m m2, Object object, Method method) {
this.b = m2;
this.a = aU.a(object);
this.c = method;
method.setAccessible(true);
this.d = m2.b();
}
final void a(Object object) {
this.d.execute(new q(this, object));
}
void b(Object object) throws InvocationTargetException {
try {
this.c.invoke(this.a, aU.a(object));
}
catch (IllegalArgumentException var2_2) {
throw new Error("Method rejected target/argument: " + object, var2_2);
}
catch (IllegalAccessException var2_3) {
throw new Error("Method became inaccessible: " + object, var2_3);
}
catch (InvocationTargetException var2_4) {
if (var2_4.getCause() instanceof Error) {
throw (Error)var2_4.getCause();
}
throw var2_4;
}
}
private s c(Object object) {
return new s(this.b, object, this.a, this.c);
}
public final int hashCode() {
return (31 + this.c.hashCode()) * 31 + System.identityHashCode(this.a);
}
public final boolean equals(Object object) {
if (object instanceof p) {
p p2 = (p)object;
return this.a == p2.a && this.c.equals(p2.c);
}
return false;
}
private static boolean a(Method method) {
return method.getAnnotation(a.class) != null;
}
static /* synthetic */ s a(p p2, Object object) {
return p2.c(object);
}
static /* synthetic */ m a(p p2) {
return p2.b;
}
/* synthetic */ p(m m2, Object object, Method method, q q2) {
this(m2, object, method);
}
}
|
[
"taochao@corp.netease.com"
] |
taochao@corp.netease.com
|
24618d7c98cf743d87ecbd76627c4ca8b29a9b81
|
68997877e267f71388a878d37e3380e161f2f1bb
|
/app/src/main/java/com/sy/bottle/view/LineControllerView.java
|
6fc5daf5e9da71b7e85e2174e4d508526bb25c1a
|
[] |
no_license
|
jiangadmin/Bottle
|
1af8555efb6d54a314c500ec8e83fe795c20f796
|
582c7ab0eb216400980cd4aae830a3db131b66f6
|
refs/heads/master
| 2020-03-20T00:53:31.757289
| 2018-07-25T01:22:42
| 2018-07-25T01:22:42
| 137,059,653
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,258
|
java
|
package com.sy.bottle.view;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Switch;
import android.widget.TextView;
import com.sy.bottle.R;
/**
* 设置等页面条状控制或显示信息的控件
*/
public class LineControllerView extends LinearLayout {
private String name;
private boolean isBottom;
private String substance;
private boolean canNav;
private boolean isSwitch;
public LineControllerView(Context context, AttributeSet attrs) {
super(context, attrs);
LayoutInflater.from(context).inflate(R.layout.view_line_controller, this);
TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.LineControllerView, 0, 0);
try {
name = ta.getString(R.styleable.LineControllerView_name);
substance = ta.getString(R.styleable.LineControllerView_substance);
isBottom = ta.getBoolean(R.styleable.LineControllerView_isBottom, false);
canNav = ta.getBoolean(R.styleable.LineControllerView_canNav, false);
isSwitch = ta.getBoolean(R.styleable.LineControllerView_isSwitch, false);
setUpView();
} finally {
ta.recycle();
}
}
private void setUpView() {
TextView tvName = findViewById(R.id.name);
tvName.setText(name);
TextView tvContent = findViewById(R.id.content);
tvContent.setText(substance);
ImageView navArrow = findViewById(R.id.rightArrow);
navArrow.setVisibility(canNav ? VISIBLE : GONE);
LinearLayout contentPanel = findViewById(R.id.contentText);
contentPanel.setVisibility(isSwitch ? GONE : VISIBLE);
Switch switchPanel = findViewById(R.id.btnSwitch);
switchPanel.setVisibility(isSwitch ? VISIBLE : GONE);
}
/**
* 设置文字内容
*
* @param substance 内容
*/
public void setContent(String substance) {
this.substance = substance;
TextView tvContent = findViewById(R.id.content);
tvContent.setText(substance);
}
/**
* 获取内容
*/
public String getContent() {
TextView tvContent = findViewById(R.id.content);
return tvContent.getText().toString();
}
/**
* 设置是否可以跳转
*
* @param canNav 是否可以跳转
*/
public void setCanNav(boolean canNav) {
this.canNav = canNav;
ImageView navArrow = findViewById(R.id.rightArrow);
navArrow.setVisibility(canNav ? VISIBLE : GONE);
}
/**
* 设置开关状态
*
* @param on 开关
*/
public void setSwitch(boolean on) {
Switch mSwitch = findViewById(R.id.btnSwitch);
mSwitch.setChecked(on);
}
/**
* 设置开关监听
*
* @param listener 监听
*/
public void setCheckListener(CompoundButton.OnCheckedChangeListener listener) {
Switch mSwitch = findViewById(R.id.btnSwitch);
mSwitch.setOnCheckedChangeListener(listener);
}
}
|
[
"www.fangmu@qq.com"
] |
www.fangmu@qq.com
|
522154fd2bf165750c2c1da784a42547f6565a13
|
4184ccc6c63cee6e9a32716ed5f6966b9007a8d3
|
/normalSpringJDBCTxn1/src/com/ddlab/spring/jdbc/txn/User.java
|
683f9e7ea2f6d51c7d51aab7c51bba82ac507234
|
[] |
no_license
|
debjava/OLD-Spring-Projects
|
21230f7551de16889dc891bc4a2826b11537e443
|
a5085bac5ea47c2e6cc9050479fa5cd84a47a276
|
refs/heads/master
| 2020-04-09T04:20:06.996725
| 2018-12-02T06:17:35
| 2018-12-02T06:17:35
| 160,018,704
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 455
|
java
|
package com.ddlab.spring.jdbc.txn;
public class User {
private int id;
private String username;
private String name;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
[
"deba.java@gmail.com"
] |
deba.java@gmail.com
|
9144751945c31a457012f7faa76fc4bf6099e433
|
9ab2aafe171e5613321cba8db46f9668817294cf
|
/hazelcast/src/main/java/com/hazelcast/spi/merge/package-info.java
|
6185c8107a190732ebf3653c9d9a077af0ba5986
|
[
"Apache-2.0"
] |
permissive
|
aboluo/hazelcast
|
230fa59932de877457e5b149752383891f2c63da
|
9aa3fb6870f19a48f3773296b774a8912f9082df
|
refs/heads/master
| 2021-05-13T13:04:06.815260
| 2018-01-08T11:58:18
| 2018-01-08T11:58:18
| 116,690,170
| 2
| 0
| null | 2018-01-08T14:56:59
| 2018-01-08T14:56:58
| null |
UTF-8
|
Java
| false
| false
| 736
|
java
|
/*
* Copyright (c) 2008-2017, Hazelcast, Inc. 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.
*/
/**
* This package contains out-of-the-box split brain merge policies.
*/
package com.hazelcast.spi.merge;
|
[
"github@thunderphreak.de"
] |
github@thunderphreak.de
|
34eda9ed74e4ca646fe61e25c05764ab5793f7d1
|
26736b2f502752f01f5f10d6789ca2f18f921901
|
/app/src/main/java/com/eleganzit/brightlet/adapters/MyTabAdapter.java
|
954472263f4aecfafb584a47d8d9fb3745d8a65f
|
[] |
no_license
|
ritueleganzit/BrightLET
|
b9fd2b6edb47d5959f82f615e0f30513d776b596
|
612fc391264e50c7b78abd5e55be570b5f61bafb
|
refs/heads/master
| 2020-03-17T23:20:51.516171
| 2018-07-03T11:58:37
| 2018-07-03T11:58:37
| 134,031,584
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,061
|
java
|
package com.eleganzit.brightlet.adapters;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import java.util.ArrayList;
/**
* Created by Uv on 5/20/2018.
*/
public class MyTabAdapter extends FragmentPagerAdapter {
ArrayList<String> titleArrayList=new ArrayList<>();
ArrayList<Fragment> fragmentArrayList=new ArrayList<>();
public MyTabAdapter(FragmentManager fm) {
super(fm);
}
@Override
public Fragment getItem(int position) {
return fragmentArrayList.get(position);
}
@Override
public int getCount() {
return fragmentArrayList.size();
}
public void addFragment(Fragment fragment,String title)
{
fragmentArrayList.add(fragment);
titleArrayList.add(title);
}
@Override
public int getItemPosition(Object object) {
return POSITION_NONE;
}
public CharSequence getPageTitle(int position)
{
return titleArrayList.get(position);
}
}
|
[
"ritu.eleganzit@gmail.com"
] |
ritu.eleganzit@gmail.com
|
c8d5ef06446949cfe0fe28334ce7471c369b0bee
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/tests-without-trycatch/Math-6/org.apache.commons.math3.optim.nonlinear.vector.jacobian.LevenbergMarquardtOptimizer/BBC-F0-opt-10/19/org/apache/commons/math3/optim/nonlinear/vector/jacobian/LevenbergMarquardtOptimizer_ESTest.java
|
4312dc715df3d99e3b8f7b3a97968bc97d960391
|
[
"CC-BY-4.0",
"MIT"
] |
permissive
|
pderakhshanfar/EMSE-BBC-experiment
|
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
|
fea1a92c2e7ba7080b8529e2052259c9b697bbda
|
refs/heads/main
| 2022-11-25T00:39:58.983828
| 2022-04-12T16:04:26
| 2022-04-12T16:04:26
| 309,335,889
| 0
| 1
| null | 2021-11-05T11:18:43
| 2020-11-02T10:30:38
| null |
UTF-8
|
Java
| false
| false
| 2,790
|
java
|
/*
* This file was automatically generated by EvoSuite
* Thu Oct 21 11:54:17 GMT 2021
*/
package org.apache.commons.math3.optim.nonlinear.vector.jacobian;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.apache.commons.math3.optim.ConvergenceChecker;
import org.apache.commons.math3.optim.PointVectorValuePair;
import org.apache.commons.math3.optim.SimpleVectorValueChecker;
import org.apache.commons.math3.optim.nonlinear.vector.jacobian.LevenbergMarquardtOptimizer;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true)
public class LevenbergMarquardtOptimizer_ESTest extends LevenbergMarquardtOptimizer_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
LevenbergMarquardtOptimizer levenbergMarquardtOptimizer0 = new LevenbergMarquardtOptimizer(0.0, 2.0, 0.0);
assertEquals(0.0, levenbergMarquardtOptimizer0.getChiSquare(), 0.01);
}
@Test(timeout = 4000)
public void test1() throws Throwable {
LevenbergMarquardtOptimizer levenbergMarquardtOptimizer0 = new LevenbergMarquardtOptimizer(100.0, 703.3750025, 0.5, 0.5, 0.5);
assertEquals(0.0, levenbergMarquardtOptimizer0.getChiSquare(), 0.01);
}
@Test(timeout = 4000)
public void test2() throws Throwable {
SimpleVectorValueChecker simpleVectorValueChecker0 = new SimpleVectorValueChecker(1.0, 1.0);
LevenbergMarquardtOptimizer levenbergMarquardtOptimizer0 = new LevenbergMarquardtOptimizer(Double.NaN, simpleVectorValueChecker0, Double.NaN, 1494.8208, 0.0, Double.NaN);
// Undeclared exception!
// try {
levenbergMarquardtOptimizer0.doOptimize();
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("org.apache.commons.math3.optim.nonlinear.vector.MultivariateVectorOptimizer", e);
// }
}
@Test(timeout = 4000)
public void test3() throws Throwable {
LevenbergMarquardtOptimizer levenbergMarquardtOptimizer0 = new LevenbergMarquardtOptimizer();
assertEquals(0.0, levenbergMarquardtOptimizer0.getChiSquare(), 0.01);
}
@Test(timeout = 4000)
public void test4() throws Throwable {
LevenbergMarquardtOptimizer levenbergMarquardtOptimizer0 = new LevenbergMarquardtOptimizer((ConvergenceChecker<PointVectorValuePair>) null);
assertEquals(0.0, levenbergMarquardtOptimizer0.getChiSquare(), 0.01);
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
f4549fa6b1ed7b7413df255538374ceb28adc0b4
|
47615faf90f578bdad1fde4ef3edae469d995358
|
/practise/SCJP Java 5 專業認證手冊/第二次練習/unit 3/P14.java
|
0b895aef4a194658532a5265b03c3a22f96799c8
|
[] |
no_license
|
hungmans6779/JavaWork-student-practice
|
dca527895e7dbb37aa157784f96658c90cbcf3bd
|
9473ca55c22f30f63fcd1d84c2559b9c609d5829
|
refs/heads/master
| 2020-04-14T01:26:54.467903
| 2018-12-30T04:52:38
| 2018-12-30T04:52:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 422
|
java
|
class Bird
{
{System.out.print("b1 "); }
public Bird()
{ System.out.print("b2 "); }
}
class Raptor extends Bird
{
static {System.out.print("r1 "); }
public Raptor()
{ System.out.print("r2 "); }
{ System.out.print("r3 "); }
static {System.out.print("r4 "); }
}
public class P14 extends Raptor
{
public static void main(String argv[])
{
System.out.print("pre ");
new P14();
System.out.print("hawk ");
}
}
|
[
"hungmans6779@msn.com"
] |
hungmans6779@msn.com
|
f342bf35096cc3a52daf208a5a5fe4f11ab551b0
|
27f7409f76c6f6d8e4ac698115f3741e5208bec7
|
/oneMovieWebApp/src/controller/member/JoinFormCommand.java
|
9b547df7569cf37f156723c1659481b61575dc5d
|
[] |
no_license
|
whsanha55/oneMovieWepApp
|
857c78940dc443187626685b0bb704bd6eda0262
|
1df276f096f0c71eb86d68e03a88282ac844e7cf
|
refs/heads/master
| 2021-05-06T00:54:36.240003
| 2017-12-29T08:35:38
| 2017-12-29T08:35:38
| 114,337,917
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 636
|
java
|
package controller.member;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import controller.ActionForward;
import controller.Command;
public class JoinFormCommand implements Command {
@Override
public ActionForward execute(HttpServletRequest req, HttpServletResponse resp)
throws IOException, ServletException {
ActionForward forward = new ActionForward();
forward.setPath("/layoutUser.jsp?article=/user/member/joinForm.jsp");
forward.setRedirect(false);
return forward;
}
}
|
[
"USER@USER-PC"
] |
USER@USER-PC
|
f31d5805a41e5b3935df944937488873b2c1a12a
|
e89dc01c95b8b45404f971517c2789fd21657749
|
/src/main/java/com/alipay/api/domain/InterTradeContractPartner.java
|
4d1fcd5f40415578c8535bae3e50304912aa2561
|
[
"Apache-2.0"
] |
permissive
|
guoweiecust/alipay-sdk-java-all
|
3370466eec70c5422c8916c62a99b1e8f37a3f46
|
bb2b0dc8208a7a0ab8521a52f8a5e1fcef61aeb9
|
refs/heads/master
| 2023-05-05T07:06:47.823723
| 2021-05-25T15:26:21
| 2021-05-25T15:26:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 899
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 合约参与方
*
* @author auto create
* @since 1.0, 2019-12-20 17:58:55
*/
public class InterTradeContractPartner extends AlipayObject {
private static final long serialVersionUID = 3558487582623738867L;
/**
* 参与方类型(包括:OU、NAME、PID、CID、UID、
MID)
*/
@ApiField("type")
private String type;
/**
* 根据参与类型来设置具体的值(如:type=NAME, value=网商银行;type=PID, value=2088xxxxxxxx)
*/
@ApiField("value")
private String value;
public String getType() {
return this.type;
}
public void setType(String type) {
this.type = type;
}
public String getValue() {
return this.value;
}
public void setValue(String value) {
this.value = value;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
5b9662d44af40cf2cb26116981c5599199c7a559
|
1708f73319c7de31d5c25f9050538399625f6271
|
/src/main/java/cn/qnxx/modules/admin/controller/VolumeBrandController.java
|
17da4efac39a2425da1231369a1a6f90036f39c2
|
[] |
no_license
|
weilengdeyu/qnb
|
fc05c7af2e770a82842e5739b895bda1557e1485
|
f10c08e3fd371b123a95c2348ff053b5a773bf94
|
refs/heads/master
| 2022-06-22T20:46:11.359720
| 2019-06-22T03:50:35
| 2019-06-22T03:50:38
| 193,187,726
| 0
| 0
| null | 2022-06-21T01:19:40
| 2019-06-22T03:45:19
|
CSS
|
UTF-8
|
Java
| false
| false
| 2,486
|
java
|
package cn.qnxx.modules.admin.controller;
import cn.qnxx.modules.admin.entity.SalesTop;
import cn.qnxx.modules.admin.entity.VolumeBrand;
import cn.qnxx.modules.admin.service.ISalesTopService;
import cn.qnxx.modules.admin.service.IVolumeBrandService;
import cn.qnxx.modules.admin.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.math.BigDecimal;
import java.util.*;
/**
* @Classname SalesPmController
* @Description 微冷的雨训练营 www.cnblogs.com/weilengdeyu
* @Date 2019/6/18 14:06
* @Created by Happy-微冷的雨
*/
@RestController
@RequestMapping("/sales")
public class VolumeBrandController {
@Autowired
private IVolumeBrandService volumeBrandService;
@RequestMapping("/findAllVolumeBrandpAjax")
public R findAllVolumeBrandpAjax(String date){
Map<String, Object> datamap=new HashMap<String,Object>();
datamap.put("date",date);
List<VolumeBrand> list=volumeBrandService.selectList(datamap);
//品牌集合
List<String> brandList=new ArrayList<String>();
//销售额集合
List<Integer> numList=new ArrayList<Integer>();
for (VolumeBrand item:list) {
brandList.add(item.getPlatform());
numList.add(item.getCount());
}
Map<String,Object> map=new TreeMap<String,Object>();
map.put("brandlist",brandList); //
map.put("numlist",numList); //
return R.success("sales",map);
}
//获取所有的品牌名称
@RequestMapping("/getDataByBrand")
public R getDataByBrand(String brand){
Map<String, Object> datamap=new HashMap<String,Object>();
datamap.put("commodity",brand);
List<VolumeBrand> list=volumeBrandService.selectList(datamap);
//品牌集合
List<String> brandList=new ArrayList<String>();
for (VolumeBrand item:list) {
brandList.add(item.getCommodity());
}
Map<String,Object> map=new TreeMap<String,Object>();
map.put("brandlist2",brandList); //
return R.success("sales",map);
}
@RequestMapping("/getAllBrand")
public R getAllBrand(){
List<VolumeBrand> list=volumeBrandService.selectAll(null);
Map<String,Object> map=new TreeMap<String,Object>();
map.put("list",list); //
return R.success("sales",map);
}
}
|
[
"yymqqc@126.com"
] |
yymqqc@126.com
|
084645cd4436a35dc11218e365c1b57dc339963f
|
83dbd433aeed1f15f6501f39fe152abc0dc803d9
|
/design_pattern_study/geek_design_pattern/src/main/java/com/bd/geek/design/pattern/observer/observable/WeatherData.java
|
f5ceb8a4255a45b47511be1ea4b630442ec1eaa8
|
[] |
no_license
|
pylrichard/web_service_study
|
d0d42ea0c511b9b15a235a99cde5b4b025c33c6d
|
c1bd8753c6aee69c87707db7f3fb8e0d7f5ddbc0
|
refs/heads/master
| 2021-09-14T23:31:12.454640
| 2018-05-22T06:26:14
| 2018-05-22T06:26:14
| 104,879,563
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,253
|
java
|
package com.bd.geek.design.pattern.observer.observable;
import lombok.Getter;
import java.util.Observable;
/**
* Observable是类不是接口
*/
@Getter
public class WeatherData extends Observable {
private float temperature;
private float pressure;
private float humidity;
public void dataChange() {
//可设定满足一定条件才通知观察者,提高灵活性
this.setChanged();
/*
notifyObservers()只通知观察者有变化,不发送数据
notifyObservers(arg)通知观察者有变化,并发送数据
*/
this.notifyObservers(new Data(getTemperature(), getPressure(), getHumidity()));
}
public void setData(float temperature, float pressure, float humidity) {
this.temperature = temperature;
this.pressure = pressure;
this.humidity = humidity;
dataChange();
}
@Getter
public class Data {
private float temperature;
private float pressure;
private float humidity;
public Data(float temperature, float pressure, float humidity) {
this.temperature = temperature;
this.pressure = pressure;
this.humidity = humidity;
}
}
}
|
[
"pylrichard@qq.com"
] |
pylrichard@qq.com
|
3e59baeb0726f5bc0e705763329d0e7634305e21
|
aa4f8a91f2e45ddcfd828ad8aa302d45bc69c0f2
|
/integration-tests/telegram/src/test/java/org/apache/camel/quarkus/component/telegram/it/TelegramTest.java
|
38e40ffd8a7ea0f3e918a9cd5ddff51b6182311b
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
caobingsheng/camel-quarkus
|
a981e70d1d83edea9ed1e63bf29938620642385b
|
9b52e1f568217cd780a21c868a4f20950f3ced4d
|
refs/heads/master
| 2023-01-01T17:46:05.676216
| 2020-10-27T03:04:47
| 2020-10-27T03:04:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,249
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.quarkus.component.telegram.it;
import java.io.IOException;
import java.io.InputStream;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import io.restassured.http.ContentType;
import org.apache.camel.component.telegram.model.EditMessageLiveLocationMessage;
import org.apache.camel.component.telegram.model.MessageResult;
import org.apache.camel.component.telegram.model.SendLocationMessage;
import org.apache.camel.component.telegram.model.SendVenueMessage;
import org.apache.camel.component.telegram.model.StopMessageLiveLocationMessage;
import org.apache.camel.quarkus.test.TrustStoreResource;
import org.awaitility.Awaitility;
import org.jboss.logging.Logger;
import org.junit.jupiter.api.Test;
import static org.hamcrest.Matchers.both;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.lessThan;
@QuarkusTest
@QuarkusTestResource(TrustStoreResource.class)
public class TelegramTest {
private static final Logger LOG = Logger.getLogger(TelegramTest.class);
@Test
public void postText() {
final String uuid = UUID.randomUUID().toString().replace("-", "");
final String msg = String.format("A message from camel-quarkus-telegram %s", uuid);
/* Send a message */
RestAssured.given()
.contentType(ContentType.TEXT)
.body(msg)
.post("/telegram/messages")
.then()
.statusCode(201);
}
@Test
public void getText() {
/* Telegram bots by design see neither their own messages nor other bots' messages.
* So receiving messages is currently possible only if you ping the bot manually.
* If you do so, you should see your messages in the test log. */
for (int i = 0; i < 5; i++) { // For some reason several iterations are needed to pick the messages
final String body = RestAssured.get("/telegram/messages")
.then()
.statusCode(is(both(greaterThanOrEqualTo(200)).and(lessThan(300))))
.extract().body().asString();
LOG.info("Telegram Bot received messages: " + body);
}
}
@Test
public void png() throws IOException {
try (InputStream in = getClass().getClassLoader().getResourceAsStream("camel-quarkus-rocks.png")) {
/* Send a message */
RestAssured.given()
.contentType("image/png")
.body(in)
.post("/telegram/media")
.then()
.statusCode(201);
}
}
@Test
public void mp3() throws IOException {
try (InputStream in = getClass().getClassLoader().getResourceAsStream("camel-quarkus-rocks.mp3")) {
/* Send a message */
RestAssured.given()
.contentType("audio/mpeg")
.body(in)
.post("/telegram/media")
.then()
.statusCode(201);
}
}
@Test
public void mp4() throws IOException {
try (InputStream in = getClass().getClassLoader().getResourceAsStream("camel-quarkus-rocks.mp4")) {
/* Send a message */
RestAssured.given()
.contentType("video/mp4")
.body(in)
.post("/telegram/media")
.then()
.statusCode(201);
}
}
@Test
public void pdf() throws IOException {
try (InputStream in = getClass().getClassLoader().getResourceAsStream("camel-quarkus-rocks.pdf")) {
/* Send a message */
RestAssured.given()
.contentType("application/pdf")
.body(in)
.post("/telegram/media")
.then()
.statusCode(201);
}
}
@Test
public void location() throws IOException {
final SendLocationMessage sendLoc = new SendLocationMessage(29.974834, 31.138577);
sendLoc.setLivePeriod(120);
final MessageResult result = RestAssured.given()
.contentType(ContentType.JSON)
.body(sendLoc)
.post("/telegram/send-location")
.then()
.statusCode(201)
.extract().body().as(MessageResult.class);
/* Update the location */
final EditMessageLiveLocationMessage edit = new EditMessageLiveLocationMessage(29.974928, 31.131115);
edit.setChatId(result.getMessage().getChat().getId());
edit.setMessageId(result.getMessage().getMessageId());
/* The edit fails with various 400 errors unless we wait a bit */
Awaitility.await()
.pollDelay(500, TimeUnit.MILLISECONDS)
.pollInterval(100, TimeUnit.MILLISECONDS)
.atMost(10, TimeUnit.SECONDS).until(() -> {
final int code = RestAssured.given()
.contentType(ContentType.JSON)
.body(edit)
.post("/telegram/edit-location")
.then()
.extract().statusCode();
return code != 201;
});
/* Stop updating */
final StopMessageLiveLocationMessage stop = new StopMessageLiveLocationMessage();
stop.setChatId(result.getMessage().getChat().getId());
stop.setMessageId(result.getMessage().getMessageId());
RestAssured.given()
.contentType(ContentType.JSON)
.body(stop)
.post("/telegram/stop-location")
.then()
.statusCode(201);
}
@Test
public void venue() throws IOException {
final SendVenueMessage venue = new SendVenueMessage(29.977818, 31.136329, "Pyramid of Queen Henutsen",
"El-Hussein Ibn Ali Ln, Nazlet El-Semman, Al Haram, Giza Governorate, Egypt");
RestAssured.given()
.contentType(ContentType.JSON)
.body(venue)
.post("/telegram/venue")
.then()
.statusCode(201);
}
}
|
[
"jamesnetherton@users.noreply.github.com"
] |
jamesnetherton@users.noreply.github.com
|
3347a541da7a54078b987148c4bf9b5bd2f28a98
|
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
|
/large/module2097_public/tests/unittests/src/java/module2097_public_tests_unittests/a/IFoo3.java
|
9aa942d1aacc78b204a90e020fb6e4b39782e886
|
[
"BSD-3-Clause"
] |
permissive
|
salesforce/bazel-ls-demo-project
|
5cc6ef749d65d6626080f3a94239b6a509ef145a
|
948ed278f87338edd7e40af68b8690ae4f73ebf0
|
refs/heads/master
| 2023-06-24T08:06:06.084651
| 2023-03-14T11:54:29
| 2023-03-14T11:54:29
| 241,489,944
| 0
| 5
|
BSD-3-Clause
| 2023-03-27T11:28:14
| 2020-02-18T23:30:47
|
Java
|
UTF-8
|
Java
| false
| false
| 842
|
java
|
package module2097_public_tests_unittests.a;
import java.util.zip.*;
import javax.annotation.processing.*;
import javax.lang.model.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see java.awt.datatransfer.DataFlavor
* @see java.beans.beancontext.BeanContext
* @see java.io.File
*/
@SuppressWarnings("all")
public interface IFoo3<V> extends module2097_public_tests_unittests.a.IFoo2<V> {
java.rmi.Remote f0 = null;
java.nio.file.FileStore f1 = null;
java.sql.Array f2 = null;
String getName();
void setName(String s);
V get();
void set(V e);
}
|
[
"gwagenknecht@salesforce.com"
] |
gwagenknecht@salesforce.com
|
0e2d96f4a03def06175315a2559a5e49de48693d
|
354ed8b713c775382b1e2c4d91706eeb1671398b
|
/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/package-info.java
|
e5ac4fee8edee1eacab50589da0f4030642c615b
|
[] |
no_license
|
JessenPan/spring-framework
|
8c7cc66252c2c0e8517774d81a083664e1ad4369
|
c0c588454a71f8245ec1d6c12f209f95d3d807ea
|
refs/heads/master
| 2021-06-30T00:54:08.230154
| 2019-10-08T10:20:25
| 2019-10-08T10:20:25
| 91,221,166
| 2
| 0
| null | 2017-05-14T05:01:43
| 2017-05-14T05:01:42
| null |
UTF-8
|
Java
| false
| false
| 695
|
java
|
/**
* Package allowing MVC Controller implementations to handle requests
* at <i>method</i> rather than <i>class</i> level. This is useful when
* we want to avoid having many trivial controller classes, as can
* easily happen when using an MVC framework.
* <p>
* <p>Typically a controller that handles multiple request types will
* extend MultiActionController, and implement multiple request handling
* methods that will be invoked by reflection if they follow this class'
* naming convention. Classes are analyzed at startup and methods cached,
* so the performance overhead of reflection in this approach is negligible.
*/
package org.springframework.web.servlet.mvc.multiaction;
|
[
"jessenpan@qq.com"
] |
jessenpan@qq.com
|
e05d9c01d020daa0ffd0f2facf54bf1225a05e52
|
79a33795eed2bbf921e426fdaaf285ed4a38a68f
|
/laijie/app/build/generated/source/buildConfig/androidTest/debug/com/example/laijie/test/BuildConfig.java
|
ae986d4492bf705c59c23e28a8c076a6e175c655
|
[] |
no_license
|
bluelzx/miaobaitiao
|
d809c6cf778852998513f0ae73624567d0798ca1
|
b8be0d5256cb029fef8784069dae7704bb16ad85
|
refs/heads/master
| 2021-01-20T01:51:21.518301
| 2017-04-20T02:53:42
| 2017-04-20T02:53:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 453
|
java
|
/**
* Automatically generated file. DO NOT MODIFY
*/
package com.example.laijie.test;
public final class BuildConfig {
public static final boolean DEBUG = Boolean.parseBoolean("true");
public static final String APPLICATION_ID = "com.example.laijie.test";
public static final String BUILD_TYPE = "debug";
public static final String FLAVOR = "";
public static final int VERSION_CODE = 2;
public static final String VERSION_NAME = "2.0";
}
|
[
"mexicande@hotmail.com"
] |
mexicande@hotmail.com
|
59f1551329656eeff3dfc279b1d6910c22de2a80
|
f72ef8fc9d2c78bab604e96186cbaf218c631d44
|
/mat/src/main/java/mat/shared/RadioButtonGroupCell.java
|
490fa16171fb2598fee543388dc24edde420213a
|
[
"LicenseRef-scancode-free-unknown",
"CC0-1.0",
"Apache-2.0"
] |
permissive
|
MeasureAuthoringTool/MeasureAuthoringTool_LatestSprint
|
77d2047405d55d8b1466b17f57bca1a6c9b6d74d
|
71bf83060239e1c6e99a041c43b351e7ed6b4815
|
refs/heads/master
| 2021-01-25T15:56:22.149610
| 2019-12-10T17:13:34
| 2019-12-10T17:13:34
| 14,151,459
| 7
| 6
|
Apache-2.0
| 2019-12-10T17:13:36
| 2013-11-05T19:24:31
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 5,043
|
java
|
package mat.shared;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import com.google.gwt.cell.client.AbstractInputCell;
import com.google.gwt.cell.client.ValueUpdater;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.InputElement;
import com.google.gwt.dom.client.NativeEvent;
import com.google.gwt.dom.client.Node;
import com.google.gwt.dom.client.NodeList;
import com.google.gwt.safehtml.client.SafeHtmlTemplates;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
/**
* The Class RadioButtonGroupCell.
*/
public class RadioButtonGroupCell extends AbstractInputCell<String, String> {
/**
* The Interface Template.
*/
interface Template extends SafeHtmlTemplates {
/**
* Deselected.
*
* @param choice
* the choice
* @return the safe html
*/
@Template("<input type=\"radio\" name=\"choices\" tabindex=\"-1\" value=\"{0}\" /> {0}</>")
SafeHtml deselected(String choice);
/**
* Selected.
*
* @param choice
* the choice
* @return the safe html
*/
@Template("<input type=\"radio\" name=\"choices\" tabindex=\"-1\" checked=\"checked\" value=\"{0}\" /> {0}</>")
SafeHtml selected(String choice);
}
/** The template. */
private static Template template;
/** The index for option. */
private final HashMap<String, Integer> indexForOption = new HashMap<String, Integer>();
/** The options. */
private final List<String> options;
/**
* Construct a new RadioButtonGroupCell with the specified options.
*
* @param options
* the options in the cell
*/
public RadioButtonGroupCell(List<String> options) {
super("change");
if (template == null) {
template = GWT.create(Template.class);
}
this.options = new ArrayList<String>(options);
int index = 0;
for (String option : options) {
indexForOption.put(option, index++);
}
}
/* (non-Javadoc)
* @see com.google.gwt.cell.client.AbstractInputCell#onBrowserEvent(com.google.gwt.cell.client.Cell.Context, com.google.gwt.dom.client.Element, java.lang.Object, com.google.gwt.dom.client.NativeEvent, com.google.gwt.cell.client.ValueUpdater)
*/
@Override
public void onBrowserEvent(Context context, Element parent, String value, NativeEvent event, ValueUpdater<String> valueUpdater) {
super.onBrowserEvent(context, parent, value, event, valueUpdater);
String type = event.getType();
if ("change".equals(type)) {
Object key = context.getKey();
InputElement select;
NodeList<Node> nodeList = parent.getChildNodes();
int nodesNum = nodeList.getLength();
String newValue = null;
for (int i = 0; i < nodesNum; i++) {
select = parent.getChild(i).cast();
if (select.isChecked()) {
newValue = select.getPropertyString("value");
break;
}
}
setViewData(key, newValue);
finishEditing(parent, newValue, key, valueUpdater);
if (valueUpdater != null) {
valueUpdater.update(newValue);
}
}
}
/* (non-Javadoc)
* @see com.google.gwt.cell.client.AbstractCell#render(com.google.gwt.cell.client.Cell.Context, java.lang.Object, com.google.gwt.safehtml.shared.SafeHtmlBuilder)
*/
@Override
public void render(Context context, String value, SafeHtmlBuilder sb) {
// Get the view data.
Object key = context.getKey();
String viewData = getViewData(key);
if (viewData != null && viewData.equals(value)) {
clearViewData(key);
viewData = null;
}
int selectedIndex = getSelectedIndex(viewData == null ? value : viewData);
int index = 0;
for (String option : options) {
if (index++ == selectedIndex) {
sb.append(template.selected(option));
} else {
sb.append(template.deselected(option));
}
}
}
/**
* Gets the selected index.
*
* @param value
* the value
* @return the selected index
*/
private int getSelectedIndex(String value) {
Integer index = indexForOption.get(value);
if (index == null) {
return -1;
}
return index.intValue();
}
}
|
[
"support@emeasuretool.org"
] |
support@emeasuretool.org
|
7044ff4a59755ae371b38a3fca8d384bd87fb075
|
7e1511cdceeec0c0aad2b9b916431fc39bc71d9b
|
/flakiness-predicter/input_data/original_tests/qos-ch-logback/nonFlakyMethods/ch.qos.logback.core.spi.AppenderAttachableImplLockTest-getAppenderBoom.java
|
5cac0c3e2e93a8a489f925d8bc9917b390c18211
|
[
"BSD-3-Clause"
] |
permissive
|
Taher-Ghaleb/FlakeFlagger
|
6fd7c95d2710632fd093346ce787fd70923a1435
|
45f3d4bc5b790a80daeb4d28ec84f5e46433e060
|
refs/heads/main
| 2023-07-14T16:57:24.507743
| 2021-08-26T14:50:16
| 2021-08-26T14:50:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 413
|
java
|
@SuppressWarnings("unchecked") @Test(timeout=5000) public void getAppenderBoom(){
Appender<Integer> mockAppender1=mock(Appender.class);
when(mockAppender1.getName()).thenThrow(new OutOfMemoryError("oops"));
aai.addAppender(mockAppender1);
try {
aai.getAppender("foo");
}
catch ( OutOfMemoryError e) {
}
Appender<Integer> mockAppender2=mock(Appender.class);
aai.addAppender(mockAppender2);
}
|
[
"aalsha2@masonlive.gmu.edu"
] |
aalsha2@masonlive.gmu.edu
|
77f21436f3892afa0f807569e43496dbf0c636aa
|
eaec4795e768f4631df4fae050fd95276cd3e01b
|
/src/cmps252/HW4_2/UnitTesting/record_4784.java
|
5781a19a530af75248f8b0f5d0fc51e8a7f34472
|
[
"MIT"
] |
permissive
|
baraabilal/cmps252_hw4.2
|
debf5ae34ce6a7ff8d3bce21b0345874223093bc
|
c436f6ae764de35562cf103b049abd7fe8826b2b
|
refs/heads/main
| 2023-01-04T13:02:13.126271
| 2020-11-03T16:32:35
| 2020-11-03T16:32:35
| 307,839,669
| 1
| 0
|
MIT
| 2020-10-27T22:07:57
| 2020-10-27T22:07:56
| null |
UTF-8
|
Java
| false
| false
| 2,466
|
java
|
package cmps252.HW4_2.UnitTesting;
import static org.junit.jupiter.api.Assertions.*;
import java.io.FileNotFoundException;
import java.util.List;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import cmps252.HW4_2.Customer;
import cmps252.HW4_2.FileParser;
@Tag("49")
class Record_4784 {
private static List<Customer> customers;
@BeforeAll
public static void init() throws FileNotFoundException {
customers = FileParser.getCustomers(Configuration.CSV_File);
}
@Test
@DisplayName("Record 4784: FirstName is Monte")
void FirstNameOfRecord4784() {
assertEquals("Monte", customers.get(4783).getFirstName());
}
@Test
@DisplayName("Record 4784: LastName is Topping")
void LastNameOfRecord4784() {
assertEquals("Topping", customers.get(4783).getLastName());
}
@Test
@DisplayName("Record 4784: Company is Wheatland Abstract Co")
void CompanyOfRecord4784() {
assertEquals("Wheatland Abstract Co", customers.get(4783).getCompany());
}
@Test
@DisplayName("Record 4784: Address is 6850 Manhattan Blvd #-202")
void AddressOfRecord4784() {
assertEquals("6850 Manhattan Blvd #-202", customers.get(4783).getAddress());
}
@Test
@DisplayName("Record 4784: City is Fort Worth")
void CityOfRecord4784() {
assertEquals("Fort Worth", customers.get(4783).getCity());
}
@Test
@DisplayName("Record 4784: County is Tarrant")
void CountyOfRecord4784() {
assertEquals("Tarrant", customers.get(4783).getCounty());
}
@Test
@DisplayName("Record 4784: State is TX")
void StateOfRecord4784() {
assertEquals("TX", customers.get(4783).getState());
}
@Test
@DisplayName("Record 4784: ZIP is 76120")
void ZIPOfRecord4784() {
assertEquals("76120", customers.get(4783).getZIP());
}
@Test
@DisplayName("Record 4784: Phone is 817-446-2384")
void PhoneOfRecord4784() {
assertEquals("817-446-2384", customers.get(4783).getPhone());
}
@Test
@DisplayName("Record 4784: Fax is 817-446-5162")
void FaxOfRecord4784() {
assertEquals("817-446-5162", customers.get(4783).getFax());
}
@Test
@DisplayName("Record 4784: Email is monte@topping.com")
void EmailOfRecord4784() {
assertEquals("monte@topping.com", customers.get(4783).getEmail());
}
@Test
@DisplayName("Record 4784: Web is http://www.montetopping.com")
void WebOfRecord4784() {
assertEquals("http://www.montetopping.com", customers.get(4783).getWeb());
}
}
|
[
"mbdeir@aub.edu.lb"
] |
mbdeir@aub.edu.lb
|
fe7a8dbbdb737a163d2aa006af7bd493244bcf09
|
dbf5adca095d04d7d069ecaa916e883bc1e5c73d
|
/x_okr_assemble_control/src/main/java/com/x/okr/assemble/control/jaxrs/okrworkbaseinfo/ExcuteDeleteForce.java
|
8dd858c1c9e05e925ab1960253a04674a172e313
|
[
"BSD-3-Clause"
] |
permissive
|
fancylou/o2oa
|
713529a9d383de5d322d1b99073453dac79a9353
|
e7ec39fc586fab3d38b62415ed06448e6a9d6e26
|
refs/heads/master
| 2020-03-25T00:07:41.775230
| 2018-08-02T01:40:40
| 2018-08-02T01:40:40
| 143,169,936
| 0
| 0
|
BSD-3-Clause
| 2018-08-01T14:49:45
| 2018-08-01T14:49:44
| null |
UTF-8
|
Java
| false
| false
| 3,581
|
java
|
package com.x.okr.assemble.control.jaxrs.okrworkbaseinfo;
import javax.servlet.http.HttpServletRequest;
import com.x.base.core.http.ActionResult;
import com.x.base.core.http.EffectivePerson;
import com.x.base.core.http.WrapOutId;
import com.x.base.core.logger.Logger;
import com.x.base.core.logger.LoggerFactory;
import com.x.okr.assemble.control.OkrUserCache;
import com.x.okr.assemble.control.jaxrs.okrworkbaseinfo.exception.GetOkrUserCacheException;
import com.x.okr.assemble.control.jaxrs.okrworkbaseinfo.exception.WorkBaseInfoProcessException;
import com.x.okr.assemble.control.jaxrs.okrworkbaseinfo.exception.WorkIdEmptyException;
import com.x.okr.assemble.control.service.OkrWorkBaseInfoOperationService;
import com.x.okr.entity.OkrWorkBaseInfo;
public class ExcuteDeleteForce extends ExcuteBase {
private Logger logger = LoggerFactory.getLogger( ExcuteDeleteForce.class );
private OkrWorkBaseInfoOperationService okrWorkBaseInfoOperationService = new OkrWorkBaseInfoOperationService();
protected ActionResult<WrapOutId> execute( HttpServletRequest request,EffectivePerson effectivePerson, String id ) throws Exception {
ActionResult<WrapOutId> result = new ActionResult<>();
OkrWorkBaseInfo okrWorkBaseInfo = null;
Boolean check = true;
OkrUserCache okrUserCache = null;
if( check ){
try {
okrUserCache = okrUserInfoService.getOkrUserCacheWithPersonName( effectivePerson.getName() );
} catch ( Exception e ) {
check = false;
Exception exception = new GetOkrUserCacheException( e, effectivePerson.getName() );
result.error( exception );
logger.error( e, effectivePerson, request, null);
}
}
if( check ){
if( id == null || id.isEmpty() ){
check = false;
Exception exception = new WorkIdEmptyException();
result.error( exception );
}
}
if( check ){
try{
okrWorkBaseInfo = okrWorkBaseInfoService.get( id );
}catch(Exception e){
check = false;
Exception exception = new WorkBaseInfoProcessException( e, "查询指定ID的具体工作信息时发生异常。ID:" + id );
result.error( exception );
logger.error( e, effectivePerson, request, null);
}
}
if( check ){
try{
okrWorkBaseInfoOperationService.deleteForce( id );
}catch(Exception e){
check = false;
Exception exception = new WorkBaseInfoProcessException( e, "工作删除过程中发生异常。"+id );
result.error( exception );
logger.error( e, effectivePerson, request, null);
}
}
if( check ){
if( okrWorkBaseInfo != null ){
try{
okrWorkDynamicsService.workDynamic(
okrWorkBaseInfo.getCenterId(),
okrWorkBaseInfo.getId(),
okrWorkBaseInfo.getTitle(),
"删除具体工作",
effectivePerson.getName(),
okrUserCache.getLoginUserName(),
okrUserCache.getLoginIdentityName() ,
"删除具体工作:" + okrWorkBaseInfo.getTitle(),
"具体工作删除成功!"
);
}catch(Exception e){
logger.warn( "system save work dynamic got an exception." );
logger.error( e );
}
}else{
try{
okrWorkDynamicsService.workDynamic(
"0000-0000-0000-0000",
id,
"未知",
"删除具体工作",
effectivePerson.getName(),
okrUserCache.getLoginUserName(),
okrUserCache.getLoginIdentityName() ,
"删除具体工作:未知",
"具体工作删除成功!"
);
}catch(Exception e){
logger.warn( "system save work dynamic got an exception." );
logger.error( e );
}
}
}
return result;
}
}
|
[
"caixiangyi2004@126.com"
] |
caixiangyi2004@126.com
|
b8d9eacb483e0c1cabb2777616d96d02e191aa98
|
dcd728452dafe52478cee18eeb823dc27e51c9e1
|
/guice/src/example/java/org/kasource/kaevent/example/guice/custom/Thermometer.java
|
a1127eeebd2f7b7dc4e69041d321a34dbd63a519
|
[] |
no_license
|
wigforss/Ka-Event
|
261c3e16df5323f11e3a96fd7105438db7ef6840
|
48eabe1646928516fa3469f9bc6d9eea20b219d4
|
refs/heads/master
| 2023-09-02T19:26:30.624661
| 2012-12-20T17:15:48
| 2012-12-20T17:15:48
| 2,278,719
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,253
|
java
|
package org.kasource.kaevent.example.guice.custom;
import org.kasource.kaevent.event.EventDispatcher;
import org.kasource.kaevent.example.guice.custom.event.TemperatureChangeEvent;
import com.google.inject.Inject;
//CHECKSTYLE:OFF
///CLOVER:OFF
public class Thermometer implements Runnable {
private double optimalTemperatur = 22.0d;
private double currentTemperatur = 0.0d;
@Inject
private Cooler cooler;
@Inject
private Heater heater;
@Inject
private EventDispatcher eventDispatcher;
public double getOptimalTemperatur() {
return optimalTemperatur;
}
public void setOptimalTemperatur(double optimalTemperatur) {
this.optimalTemperatur = optimalTemperatur;
}
public void run() {
for (int i = 0; i < 100; ++i) {
if (cooler.isEnabled()) {
currentTemperatur -= Math.random() * 3.0d;
} else if (heater.isEnabled()) {
currentTemperatur += Math.random() * 3.0d;
} else {
currentTemperatur += 1.0d;
}
System.out.println("Temp is now: " + currentTemperatur);
eventDispatcher.fireBlocked(new TemperatureChangeEvent(this, currentTemperatur));
try {
Thread.sleep(200);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
|
[
"rikard.wigforss@gmail.com"
] |
rikard.wigforss@gmail.com
|
9cc5bcd26add58c1d5ad875601e4f6af99b88468
|
3b30f392e996250bd02714d6066aaa4b4f37a5b6
|
/pet-fetch/src/main/java/com/pet/fetch/PetClient.java
|
18745961a5a194492fce8241b143b4e515d907e5
|
[] |
no_license
|
khaliyo/pet
|
1d4ec5ff2d21388c008177f44e810483f012a249
|
4ea1d08b8e75a6fcd4e20e4096c38c318e8af53b
|
refs/heads/master
| 2021-01-14T11:57:54.447524
| 2013-05-21T12:36:30
| 2013-05-21T12:36:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,238
|
java
|
package com.pet.fetch;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.NameValuePair;
import org.apache.commons.httpclient.methods.GetMethod;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.pet.core.domain.Comment;
import com.taobao.api.ApiException;
import com.taobao.api.Constants;
import com.taobao.api.DefaultTaobaoClient;
import com.taobao.api.TaobaoClient;
import com.taobao.api.domain.ItemCat;
import com.taobao.api.domain.ItemProp;
import com.taobao.api.domain.PropValue;
import com.taobao.api.domain.TaobaokeItem;
import com.taobao.api.domain.TaobaokeItemDetail;
import com.taobao.api.request.ItemcatsGetRequest;
import com.taobao.api.request.ItempropsGetRequest;
import com.taobao.api.request.TaobaokeItemsDetailGetRequest;
import com.taobao.api.request.TaobaokeItemsGetRequest;
import com.taobao.api.response.ItemcatsGetResponse;
import com.taobao.api.response.ItempropsGetResponse;
import com.taobao.api.response.TaobaokeItemsDetailGetResponse;
import com.taobao.api.response.TaobaokeItemsGetResponse;
public class PetClient {
private static final String serverUrl = "http://gw.api.taobao.com/router/rest";
private static final String appKey = "21501927";
private static final String appSecret = "4b7d7dcfc1c216375ac48a97e706c1e1";
private static final String NICK = "tb46969797";
private static final String COMMENT_URL = "a.m.taobao.com";
private static final String COMMENT_PATH = "/ajax/rate_list.do";
private static TaobaoClient client = new DefaultTaobaoClient(
serverUrl.trim(), appKey.trim(), appSecret.trim(), Constants.FORMAT_JSON);
private static PetClient petClient = new PetClient();
private static Object lock = new Object();
private PetClient() {
}
public List<ItemCat> getItemCats(String cid, long parentCid) {
List<ItemCat> itemCats = null;
try {
ItemcatsGetRequest req = new ItemcatsGetRequest();
req.setFields("cid,parent_cid,name,is_parent");
cid = cid.trim();
if (cid != null && !cid.equals("")) {
if (cid.trim().endsWith(",")) {
req.setCids(cid.substring(0, cid.lastIndexOf(",") - 1));
} else {
req.setCids(cid);
}
}
if (parentCid != 0) {
req.setParentCid(parentCid);
}
ItemcatsGetResponse response = client.execute(req);
itemCats = response.getItemCats();
} catch (ApiException e) {
e.printStackTrace();
}
return itemCats;
}
public static PetClient getInstance() {
synchronized (lock) {
if (petClient == null) {
petClient = new PetClient();
}
}
return petClient;
}
public List<TaobaokeItemDetail> getTaobaokeItemDetails(String numIid)
throws ApiException {
List<TaobaokeItemDetail> taobaokeItemDetails = null;
TaobaokeItemsDetailGetRequest req = new TaobaokeItemsDetailGetRequest();
req.setFields("click_url,shop_click_url,seller_credit_score,num_iid,title,nick");
req.setNick(NICK);
req.setNumIids(numIid);
TaobaokeItemsDetailGetResponse response = client.execute(req);
taobaokeItemDetails = response.getTaobaokeItemDetails();
return taobaokeItemDetails;
}
public List<ItemProp> getItemProps(long cid) {
ItempropsGetRequest request = new ItempropsGetRequest();
List<ItemProp> itemProps = null;
try {
request.setCid(cid);
ItempropsGetResponse response = client.execute(request);
itemProps = response.getItemProps();
for (ItemProp prop : itemProps) {
List<PropValue> propValues = prop.getPropValues();
if (propValues != null) {
for (PropValue value : prop.getPropValues()) {
System.out.println(prop.getName() + ":"
+ value.getName());
}
}
}
} catch (ApiException e) {
e.printStackTrace();
}
return itemProps;
}
public List<Comment> getComment(long itemId, int page) {
JSONObject json = null;
List<Comment> comments = new ArrayList<Comment>();
try {
HttpClient client = new HttpClient();
client.getHostConfiguration().setHost(COMMENT_URL, 80, "http");
// client.getParams().setParameter(HttpMethodParams.SO_TIMEOUT,
// 10000);
HttpMethod method = new GetMethod(COMMENT_PATH);
NameValuePair itemPair = new NameValuePair("item_id", itemId + "");
NameValuePair ratePair = new NameValuePair("rateRs", page + "");
NameValuePair psPair = new NameValuePair("ps", 100 + "");
method.setQueryString(new NameValuePair[] { itemPair, ratePair,
psPair });
client.executeMethod(method);
// 打印服务器返回的状态
int methodstatus = method.getStatusCode();
StringBuffer sb = new StringBuffer();
if (methodstatus == 200) {
try {
BufferedReader rd = new BufferedReader(
new InputStreamReader(
method.getResponseBodyAsStream(), "UTF-8"));
String line;
while ((line = rd.readLine()) != null) {
sb.append(line);
}
json = JSON.parseObject(sb.toString().toString());
rd.close();
} catch (IOException e) {
throw new RuntimeException("error", e);
}
}
method.releaseConnection();
if (json != null) {
JSONArray array = json.getJSONArray("items");
if (array != null) {
for (Object object : array) {
try {
SimpleDateFormat sdf = new SimpleDateFormat(
"yyyy-MM-dd");
JSONObject objectVal = (JSONObject) object;
Comment comment = new Comment();
comment.setCommodityId(itemId);
comment.setAnnoy(objectVal.getIntValue("annoy"));
comment.setBuyerName(objectVal.getString("buyer"));
comment.setCredit(objectVal.getIntValue("credit"));
comment.setDate(sdf.parse(objectVal
.getString("date")));
comment.setDeal(objectVal.getString("deal"));
comment.setRateId(objectVal.getLongValue("rateId"));
comment.setText(objectVal.getString("text"));
comment.setType(objectVal.getIntValue("type"));
comments.add(comment);
} catch (ParseException e) {
e.printStackTrace();
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
return comments;
}
public static void main(String[] args) {
for (TaobaokeItem taobaokeItem : PetClient.getInstance()
.getTaobaokeItems(50006121)) {
System.out.println(taobaokeItem.getClickUrl());
System.out.println(taobaokeItem.getPicUrl());
PetClient.getInstance().getComment(taobaokeItem.getNumIid(), 1);
}
;
}
public List<TaobaokeItem> getTaobaokeItems(long cid) {
List<TaobaokeItem> taobaokeItems = null;
try {
TaobaokeItemsGetRequest req = new TaobaokeItemsGetRequest();
req.setFields("num_iid,title,nick,pic_url,price,click_url,commission,commission_rate,commission_num,commission_volume,shop_click_url,seller_credit_score,item_location,volume");
req.setNick(NICK);
req.setCid(cid);
TaobaokeItemsGetResponse response = client.execute(req);
taobaokeItems = response.getTaobaokeItems();
} catch (ApiException e) {
e.printStackTrace();
}
return taobaokeItems;
}
}
|
[
"ordinary1792207542@gmail.com"
] |
ordinary1792207542@gmail.com
|
5ac9fb83bb1c476fe2b298c26bc7adfa26d8ea7c
|
d6ab38714f7a5f0dc6d7446ec20626f8f539406a
|
/backend/collecting/dsfj/Java/edited/mustache.MustacheResourceTemplateLoader.java
|
b65a67506f06f8590fa65b8eff37c2d1f618ad89
|
[] |
no_license
|
haditabatabaei/webproject
|
8db7178affaca835b5d66daa7d47c28443b53c3d
|
86b3f253e894f4368a517711bbfbe257be0259fd
|
refs/heads/master
| 2020-04-10T09:26:25.819406
| 2018-12-08T12:21:52
| 2018-12-08T12:21:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,321
|
java
|
package org.springframework.boot.autoconfigure.mustache;
import java.io.InputStreamReader;
import java.io.Reader;
import com.samskivert.mustache.Mustache;
import com.samskivert.mustache.Mustache.Compiler;
import com.samskivert.mustache.Mustache.TemplateLoader;
import org.springframework.context.ResourceLoaderAware;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
public class MustacheResourceTemplateLoader
implements TemplateLoader, ResourceLoaderAware {
private String prefix = "";
private String suffix = "";
private String charSet = "UTF-8";
private ResourceLoader resourceLoader = new DefaultResourceLoader();
public MustacheResourceTemplateLoader() {
}
public MustacheResourceTemplateLoader(String prefix, String suffix) {
this.prefix = prefix;
this.suffix = suffix;
}
public void setCharset(String charSet) {
this.charSet = charSet;
}
@Override
public void setResourceLoader(ResourceLoader resourceLoader) {
this.resourceLoader = resourceLoader;
}
@Override
public Reader getTemplate(String name) throws Exception {
return new InputStreamReader(this.resourceLoader
.getResource(this.prefix + name + this.suffix).getInputStream(),
this.charSet);
}
}
|
[
"mahdisadeghzadeh24@gamil.com"
] |
mahdisadeghzadeh24@gamil.com
|
39f19eae8f4978f0466cf63752fad0a497b02912
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/vs-20181212/src/main/java/com/aliyun/vs20181212/models/SetVsStreamsNotifyUrlConfigResponse.java
|
8d64259111a34281b3b11c63006e101dc622b219
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,168
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.vs20181212.models;
import com.aliyun.tea.*;
public class SetVsStreamsNotifyUrlConfigResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("body")
@Validation(required = true)
public SetVsStreamsNotifyUrlConfigResponseBody body;
public static SetVsStreamsNotifyUrlConfigResponse build(java.util.Map<String, ?> map) throws Exception {
SetVsStreamsNotifyUrlConfigResponse self = new SetVsStreamsNotifyUrlConfigResponse();
return TeaModel.build(map, self);
}
public SetVsStreamsNotifyUrlConfigResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public SetVsStreamsNotifyUrlConfigResponse setBody(SetVsStreamsNotifyUrlConfigResponseBody body) {
this.body = body;
return this;
}
public SetVsStreamsNotifyUrlConfigResponseBody getBody() {
return this.body;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
dcf7512ad3176b320bb4a95660a4d03b784f869d
|
127c82b80b8603493a3e3b0cabfd92b5fd74fb1d
|
/whp-visual/whp-monitor/src/main/java/com/cloud/whp/monitor/support/RedisEventStore.java
|
4c2fc32a602e102c0a78e190101fb4c2ef0e4275
|
[] |
no_license
|
fengclondy/whp-cloud
|
ff6fe61494b93856e9e481a429ba7ec5e4fc8d20
|
824fd5b2290d6744d214d755d97be7401feda36f
|
refs/heads/master
| 2020-04-24T02:14:48.884067
| 2018-12-26T10:27:19
| 2018-12-26T10:27:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,284
|
java
|
package com.cloud.whp.monitor.support;
import com.cloud.whp.common.core.constant.CommonConstant;
import de.codecentric.boot.admin.server.domain.events.InstanceEvent;
import de.codecentric.boot.admin.server.eventstore.InMemoryEventStore;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import reactor.core.publisher.Mono;
import java.util.List;
/**
* @author whp
* @date 2018-12-20
* <p>
* redis store event
* default 100
*/
@Slf4j
@Configuration
public class RedisEventStore extends InMemoryEventStore {
@Autowired
private RedisTemplate redisTemplate;
@Override
public Mono<Void> append(List<InstanceEvent> events) {
events.forEach(event -> {
String key = event.getInstance().getValue() + "_" + event.getTimestamp().toString();
log.info("保存实例事件的KEY:{},EVENT: {}", key, event.getType());
redisTemplate.setHashValueSerializer(new Jackson2JsonRedisSerializer<>(InstanceEvent.class));
redisTemplate.opsForHash().put(CommonConstant.EVENT_KEY, key, event);
});
return super.append(events);
}
}
|
[
"1032998173@qq.com"
] |
1032998173@qq.com
|
43ab109047434d203c823742c2d937cb0b7d7e20
|
ef12a03a0dd66aafb20a2847c851fbd44dc45bc8
|
/Guice/ch05.02-ProviderInterface Inject Constants/my-guice-app/src/main/java/com/app01/ch01/module/AppModule.java
|
80cab4eb01fe43d308437c410776972dca1b2a11
|
[] |
no_license
|
softwareengineerhub/learning
|
24727a07e646a134c9d4db9d424ba546f90c0b52
|
dc572f685ffdf8f356ee82b1d28ad940871d05fb
|
refs/heads/master
| 2023-07-27T04:16:26.988338
| 2022-11-10T09:40:46
| 2022-11-10T09:40:46
| 179,563,742
| 0
| 0
| null | 2023-09-05T21:58:38
| 2019-04-04T19:28:55
|
Java
|
UTF-8
|
Java
| false
| false
| 722
|
java
|
package com.app01.ch01.module;
import com.app01.ch01.providers.DrawSquareProvider;
import com.app01.ch01.request.SquareColorValue;
import com.app01.ch01.shape.DrawShape;
import com.app01.ch01.shape.DrawSquare;
import com.google.inject.AbstractModule;
import com.google.inject.Provides;
import com.google.inject.Scopes;
import com.google.inject.Singleton;
public class AppModule extends AbstractModule {
public void configure(){
// not gives a singletone from get()
bind(DrawShape.class).toProvider(DrawSquareProvider.class).in(Scopes.SINGLETON);
//bind(String.class).toInstance("MyColor");
bind(String.class).annotatedWith(SquareColorValue.class).toInstance("MyColor2");
}
}
|
[
"denis.prokopiuk@yahoo.com"
] |
denis.prokopiuk@yahoo.com
|
dc0c0501d3f77be5fb6ebad544ca082f60d57020
|
5f783378eb66481617346c3ea9aa8df20c683b0a
|
/src/main/java/com/netsuite/suitetalk/proxy/v2018_1/lists/accounting/types/RevRecScheduleAmortizationStatus.java
|
9a9ba662b7029dfc7a61acb670f309ea764e961a
|
[] |
no_license
|
djXplosivo/suitetalk-axis-proxy
|
b9bd506bcb43e4254439baf3a46c7ef688c7e57f
|
0ffba614f117962f9de2867a0677ec8494a2605a
|
refs/heads/master
| 2020-03-28T02:49:27.612364
| 2018-09-06T02:36:05
| 2018-09-06T02:36:05
| 147,599,598
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,960
|
java
|
package com.netsuite.suitetalk.proxy.v2018_1.lists.accounting.types;
import java.io.ObjectStreamException;
import java.io.Serializable;
import java.util.HashMap;
import javax.xml.namespace.QName;
import org.apache.axis.description.TypeDesc;
import org.apache.axis.encoding.Deserializer;
import org.apache.axis.encoding.Serializer;
import org.apache.axis.encoding.ser.EnumDeserializer;
import org.apache.axis.encoding.ser.EnumSerializer;
public class RevRecScheduleAmortizationStatus implements Serializable {
private String _value_;
private static HashMap _table_ = new HashMap();
public static final String __notStarted = "_notStarted";
public static final String __inProgress = "_inProgress";
public static final String __completed = "_completed";
public static final String __onHold = "_onHold";
public static final RevRecScheduleAmortizationStatus _notStarted = new RevRecScheduleAmortizationStatus("_notStarted");
public static final RevRecScheduleAmortizationStatus _inProgress = new RevRecScheduleAmortizationStatus("_inProgress");
public static final RevRecScheduleAmortizationStatus _completed = new RevRecScheduleAmortizationStatus("_completed");
public static final RevRecScheduleAmortizationStatus _onHold = new RevRecScheduleAmortizationStatus("_onHold");
private static TypeDesc typeDesc = new TypeDesc(RevRecScheduleAmortizationStatus.class);
protected RevRecScheduleAmortizationStatus(String value) {
super();
this._value_ = value;
_table_.put(this._value_, this);
}
public String getValue() {
return this._value_;
}
public static RevRecScheduleAmortizationStatus fromValue(String value) throws IllegalArgumentException {
RevRecScheduleAmortizationStatus enumeration = (RevRecScheduleAmortizationStatus)_table_.get(value);
if (enumeration == null) {
throw new IllegalArgumentException();
} else {
return enumeration;
}
}
public static RevRecScheduleAmortizationStatus fromString(String value) throws IllegalArgumentException {
return fromValue(value);
}
public boolean equals(Object obj) {
return obj == this;
}
public int hashCode() {
return this.toString().hashCode();
}
public String toString() {
return this._value_;
}
public Object readResolve() throws ObjectStreamException {
return fromValue(this._value_);
}
public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
return new EnumSerializer(_javaType, _xmlType);
}
public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
return new EnumDeserializer(_javaType, _xmlType);
}
public static TypeDesc getTypeDesc() {
return typeDesc;
}
static {
typeDesc.setXmlType(new QName("urn:types.accounting_2018_1.lists.webservices.netsuite.com", "RevRecScheduleAmortizationStatus"));
}
}
|
[
"ccolon@git.eandjmedia.com"
] |
ccolon@git.eandjmedia.com
|
dad3a193bfe870da3aea2e76c3edacd20d376269
|
e108d65747c07078ae7be6dcd6369ac359d098d7
|
/com/itextpdf/text/pdf/security/VerificationException.java
|
0feccf3954eb0d86dd1ff164bd9df9a7b602f597
|
[
"MIT"
] |
permissive
|
kelu124/pyS3
|
50f30b51483bf8f9581427d2a424e239cfce5604
|
86eb139d971921418d6a62af79f2868f9c7704d5
|
refs/heads/master
| 2020-03-13T01:51:42.054846
| 2018-04-24T21:03:03
| 2018-04-24T21:03:03
| 130,913,008
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 651
|
java
|
package com.itextpdf.text.pdf.security;
import java.security.GeneralSecurityException;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;
public class VerificationException extends GeneralSecurityException {
private static final long serialVersionUID = 2978604513926438256L;
public VerificationException(Certificate cert, String message) {
String str = "Certificate %s failed: %s";
Object[] objArr = new Object[2];
objArr[0] = cert == null ? "Unknown" : ((X509Certificate) cert).getSubjectDN().getName();
objArr[1] = message;
super(String.format(str, objArr));
}
}
|
[
"kelu124@gmail.com"
] |
kelu124@gmail.com
|
cadf31679220831282c6c95f67c65a12addfd74a
|
b66bdee811ed0eaea0b221fea851f59dd41e66ec
|
/src/com/google/android/gms/d/af$1.java
|
da329beb0f2268f82f1261161ec8998409cc3081
|
[] |
no_license
|
reverseengineeringer/com.grubhub.android
|
3006a82613df5f0183e28c5e599ae5119f99d8da
|
5f035a4c036c9793483d0f2350aec2997989f0bb
|
refs/heads/master
| 2021-01-10T05:08:31.437366
| 2016-03-19T20:41:23
| 2016-03-19T20:41:23
| 54,286,207
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 654
|
java
|
package com.google.android.gms.d;
import android.os.RemoteException;
import com.google.android.gms.appdatasearch.UsageInfo;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.Status;
class af$1
extends ah<Status>
{
af$1(af paramaf, GoogleApiClient paramGoogleApiClient, String paramString, UsageInfo[] paramArrayOfUsageInfo)
{
super(paramGoogleApiClient);
}
protected void a(w paramw)
throws RemoteException
{
paramw.a(new ai(this), b, c);
}
}
/* Location:
* Qualified Name: com.google.android.gms.d.af.1
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
f9ea90de29f95eeece230f237f875d9cc58cd10c
|
7e1b1b0cee00c321ee8852ea788ecebce68b53c7
|
/DiamonShop/src/main/java/DiamonShop/Controller/User/CartController.java
|
519234ca7d6a318d6cc6acbd9ff7465569c03ede
|
[] |
no_license
|
tungLC99999/tung81098
|
e34a8cb97637e8e28887eb0c90a7b60630c1e324
|
2d6c48f78b9c04bdc44ff42dbb95831afe695b42
|
refs/heads/master
| 2022-11-29T16:22:21.048769
| 2020-08-12T06:23:17
| 2020-08-12T06:23:17
| 286,931,833
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,644
|
java
|
package DiamonShop.Controller.User;
import java.util.HashMap;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
import DiamonShop.Dto.CartDto;
import DiamonShop.Entity.Bills;
import DiamonShop.Entity.Users;
import DiamonShop.Service.User.BillsServiceImpl;
import DiamonShop.Service.User.CartServiceImpl;
@Controller
public class CartController extends BaseController {
@Autowired
private CartServiceImpl cartService = new CartServiceImpl();
@Autowired
private BillsServiceImpl billsService = new BillsServiceImpl();
@RequestMapping(value = "gio-hang")
public ModelAndView Index() {
_mvShare.addObject("slides", _homeService.GetDataSlide());
_mvShare.addObject("categorys", _homeService.GetDataCategorys());
_mvShare.addObject("products", _homeService.GetDataProducts());
_mvShare.setViewName("user/cart/list_cart");
return _mvShare;
}
@RequestMapping(value = "AddCart/{id}")
public String AddCart(HttpServletRequest request, HttpSession session, @PathVariable long id) {
HashMap<Long, CartDto> cart = (HashMap<Long, CartDto>) session.getAttribute("Cart");
if (cart == null) {
cart = new HashMap<Long, CartDto>();
}
cartService.AddCart(id, cart);
session.setAttribute("Cart", cart);
session.setAttribute("TotalQuantyCart", cartService.TotalQuanty(cart));
session.setAttribute("TotalPriceCart", cartService.TotalPrice(cart));
return "redirect:" + request.getHeader("Referer");
}
@RequestMapping(value = "EditCart/{id}/{quanty}")
public String EditCart(HttpServletRequest request, HttpSession session, @PathVariable long id,@PathVariable int quanty) {
HashMap<Long, CartDto> cart = (HashMap<Long, CartDto>) session.getAttribute("Cart");
if (cart == null) {
cart = new HashMap<Long, CartDto>();
}
cartService.EditCart(id,quanty, cart);
session.setAttribute("Cart", cart);
session.setAttribute("TotalQuantyCart", cartService.TotalQuanty(cart));
session.setAttribute("TotalPriceCart", cartService.TotalPrice(cart));
return "redirect:" + request.getHeader("Referer");
}
@RequestMapping(value = "DeleteCart/{id}")
public String DeleteCart(HttpServletRequest request, HttpSession session, @PathVariable long id) {
HashMap<Long, CartDto> cart = (HashMap<Long, CartDto>) session.getAttribute("Cart");
if (cart == null) {
cart = new HashMap<Long, CartDto>();
}
cartService.DeleteCart(id, cart);
session.setAttribute("Cart", cart);
session.setAttribute("TotalQuantyCart", cartService.TotalQuanty(cart));
session.setAttribute("TotalPriceCart", cartService.TotalPrice(cart));
return "redirect:" + request.getHeader("Referer");
}
@RequestMapping(value = "checkout",method = RequestMethod.GET)
public ModelAndView CheckOut(HttpServletRequest request, HttpSession session) {
_mvShare.setViewName("user/bills/checkout");
Bills bills = new Bills();
Users loginInfo = (Users)session.getAttribute("LoginInfo");
if(loginInfo != null) {
bills.setAddress(loginInfo.getAddress());
bills.setDisplay_name(loginInfo.getDisplay_name());
bills.setUsername(loginInfo.getUsername());
}
_mvShare.addObject("bills",bills);
return _mvShare;
}
@RequestMapping(value = "checkout",method = RequestMethod.POST)
public String CheckOutBill(HttpServletRequest request, HttpSession session,@ModelAttribute("bills") Bills bill) {
if(billsService.AddBills(bill)>0) {
HashMap<Long, CartDto> carts = (HashMap<Long, CartDto>)session.getAttribute("Cart");
billsService.AddBillsDetail(carts);
}
session.removeAttribute("Cart");
return "redirect:gio-hang";
}
// @RequestMapping(value = "checkout",method = RequestMethod.POST)
// public String CheckOutBill(HttpServletRequest request, HttpSession session,@ModelAttribute("bills") Bills bill) {
//
// bill.setQuanty(Integer.parseInt((String) session.getAttribute("TotalPriceCart")));
// bill.setTotal(Double.parseDouble( (String) session.getAttribute("TotalQuantyCart")));
// if(billsService.AddBills(bill)>0) {
// HashMap<Long, CartDto> carts = (HashMap<Long, CartDto>)session.getAttribute("Cart");
// billsService.AddBillsDetail(carts);
// }
// session.removeAttribute("Cart");
// return "redirect:gio-hang";
// }
}
|
[
"you@example.com"
] |
you@example.com
|
ae62f78b0f097a9d7e4dccbfd7a02c32f20a2224
|
3370a0d2a9e3c73340b895de3566f6e32aa3ca4a
|
/alwin-middleware-grapescode/alwin-rest/src/main/java/com/codersteam/alwin/rest/ContactDetailResource.java
|
a8a8ef6315165b3b0f769063767d9539c3bafcbe
|
[] |
no_license
|
Wilczek01/alwin-projects
|
8af8e14601bd826b2ec7b3a4ce31a7d0f522b803
|
17cebb64f445206320fed40c3281c99949c47ca3
|
refs/heads/master
| 2023-01-11T16:37:59.535951
| 2020-03-24T09:01:01
| 2020-03-24T09:01:01
| 249,659,398
| 0
| 0
| null | 2023-01-07T16:18:14
| 2020-03-24T09:02:28
|
Java
|
UTF-8
|
Java
| false
| false
| 6,417
|
java
|
package com.codersteam.alwin.rest;
import com.codersteam.alwin.auth.annotation.Secured;
import com.codersteam.alwin.core.api.model.customer.ContactDetailDto;
import com.codersteam.alwin.core.api.model.customer.ContactStateDto;
import com.codersteam.alwin.core.api.model.customer.ContactTypeDto;
import com.codersteam.alwin.core.api.model.customer.PhoneNumberDto;
import com.codersteam.alwin.core.api.service.customer.ContactDetailService;
import com.codersteam.alwin.core.api.service.customer.PhoneNumberService;
import io.swagger.annotations.*;
import io.swagger.jaxrs.PATCH;
import javax.inject.Inject;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import java.util.List;
import static com.codersteam.alwin.comparator.ContactDetailDtoComparatorProvider.CONTACT_DETAIL_DTO_COMPARATOR;
import static com.codersteam.alwin.core.api.model.customer.ContactStateDto.ALL_CONTACT_STATES_WITH_ORDER;
import static com.codersteam.alwin.core.api.model.customer.ContactTypeDto.ALL_CONTACT_TYPES_WITH_ORDER;
import static javax.ws.rs.core.HttpHeaders.AUTHORIZATION;
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
@Path("/contactDetails")
@Api("/contactDetails")
@Consumes(APPLICATION_JSON)
@Produces(APPLICATION_JSON)
public class ContactDetailResource {
private ContactDetailService contactDetailService;
private PhoneNumberService phoneNumberService;
public ContactDetailResource() {
}
@Inject
public ContactDetailResource(final ContactDetailService contactDetailService, final PhoneNumberService phoneNumberService) {
this.contactDetailService = contactDetailService;
this.phoneNumberService = phoneNumberService;
}
@GET
@Path("company/{companyId}")
@Secured(all = true)
@ApiOperation("Pobieranie wszystkich kontaktów dla danej firmy")
@ApiImplicitParams({@ApiImplicitParam(name = AUTHORIZATION, value = "Token", dataType = "string", paramType = "header")})
public List<ContactDetailDto> findAllContactDetailsForCompany(@ApiParam(name = "companyId", value = "Identyfikator firmy") @PathParam("companyId") final long companyId) {
final List<ContactDetailDto> allContactDetailsForCompany = contactDetailService.findAllContactDetailsForCompany(companyId);
allContactDetailsForCompany.sort(CONTACT_DETAIL_DTO_COMPARATOR);
return allContactDetailsForCompany;
}
@POST
@Path("company/{companyId}")
@Secured(all = true)
@ApiOperation("Dodanie nowego kontaktu dla firmy")
@ApiImplicitParams({@ApiImplicitParam(name = AUTHORIZATION, value = "Token", dataType = "string", paramType = "header")})
public Response createNewContactDetailsForCompany(@ApiParam(name = "companyId", value = "Identyfikator firmy") @PathParam("companyId") final long companyId,
@ApiParam(required = true, value = "Kontakt do utworzenia") final ContactDetailDto contactDetail) {
contactDetailService.createNewContactDetailForCompany(companyId, contactDetail);
return Response.created(null).build();
}
@GET
@Path("person/{personId}")
@Secured(all = true)
@ApiOperation("Pobieranie wszystkich kontaktów dla danej osoby")
@ApiImplicitParams({@ApiImplicitParam(name = AUTHORIZATION, value = "Token", dataType = "string", paramType = "header")})
public List<ContactDetailDto> findAllContactDetailsForPerson(@ApiParam(name = "personId", value = "Identyfikator osoby") @PathParam("personId") final long personId) {
final List<ContactDetailDto> allContactDetailsForPerson = contactDetailService.findAllContactDetailsForPerson(personId);
allContactDetailsForPerson.sort(CONTACT_DETAIL_DTO_COMPARATOR);
return allContactDetailsForPerson;
}
@POST
@Path("person/{personId}")
@Secured(all = true)
@ApiOperation("Dodanie nowego kontaktu dla osoby")
@ApiImplicitParams({@ApiImplicitParam(name = AUTHORIZATION, value = "Token", dataType = "string", paramType = "header")})
public Response createNewContactDetailsForPerson(@ApiParam(name = "personId", value = "Identyfikator osoby") @PathParam("personId") final long personId,
@ApiParam(required = true, value = "Kontakt do utworzenia") final ContactDetailDto contactDetailDto) {
contactDetailService.createNewContactDetailForPerson(personId, contactDetailDto);
return Response.created(null).build();
}
@PATCH
@Path("/{contactDetailId}")
@Secured(all = true)
@ApiOperation("Edycja kontaktu dla firmy")
@ApiImplicitParams({@ApiImplicitParam(name = AUTHORIZATION, value = "Token", dataType = "string", paramType = "header")})
public Response updateContactDetail(@ApiParam(name = "contactDetailId", value = "Identyfikator kontaktu") @PathParam("contactDetailId") final long contactDetailId,
@ApiParam(required = true, value = "Kontakt do edycji") final ContactDetailDto contactDetail) {
contactDetail.setId(contactDetailId);
contactDetailService.updateContactDetail(contactDetail);
return Response.accepted().build();
}
@GET
@Path("types")
@Secured(all = true)
@ApiOperation("Pobieranie wszystkich typów kontaktów")
@ApiImplicitParams({@ApiImplicitParam(name = AUTHORIZATION, value = "Token", dataType = "string", paramType = "header")})
public List<ContactTypeDto> findAllContactDetailsTypes() {
return ALL_CONTACT_TYPES_WITH_ORDER;
}
@GET
@Path("states")
@Secured(all = true)
@ApiOperation("Pobieranie wszystkich statusów kontaktów")
@ApiImplicitParams({@ApiImplicitParam(name = AUTHORIZATION, value = "Token", dataType = "string", paramType = "header")})
public List<ContactStateDto> findAllContactDetailsStates() {
return ALL_CONTACT_STATES_WITH_ORDER;
}
@GET
@Path("suggestedPhoneNumbers/{companyId}")
@Secured(all = true)
@ApiOperation("Pobieranie wszystkich kontaktów dla danej osoby")
@ApiImplicitParams({@ApiImplicitParam(name = AUTHORIZATION, value = "Token", dataType = "string", paramType = "header")})
public List<PhoneNumberDto> findSuggestedPhoneNumbers(@ApiParam(name = "companyId", value = "Identyfikator firmy") @PathParam("companyId") final long companyId) {
return phoneNumberService.findSuggestedPhoneNumbers(companyId);
}
}
|
[
"grogus@ad.aliorleasing.pl"
] |
grogus@ad.aliorleasing.pl
|
d163e86bddd3f50f3b7d6364427bc3ab2a06a30e
|
0627853f21d57fd3a8040218f78a96c8086dacf9
|
/app/src/main/java/com/xiaoying/bocool/widget/LoadingView.java
|
ca5664fcd233f6e913e450e414c59e310ce83acf
|
[] |
no_license
|
joyhooei/BoCool
|
262f9d3a2a95d2fe2c279a4f69503c3ed99bdf3b
|
711dcebf47a687a83551613d7209b7134699be56
|
refs/heads/master
| 2020-03-30T06:18:35.815333
| 2016-11-15T04:31:27
| 2016-11-15T04:31:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,703
|
java
|
/*
* Copyright (C) 2015. The BoCool Project.
*
* yinglovezhuzhu@gmail.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.xiaoying.bocool.widget;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.xiaoying.bocool.R;
/**
* 加载提示控件
* Created by XIAOYING on 2015/6/7.
*/
public class LoadingView extends LinearLayout {
private ProgressBar mPbProgress;
private TextView mTvMessage;
public LoadingView(Context context) {
super(context);
initView(context);
}
public LoadingView(Context context, AttributeSet attrs) {
super(context, attrs);
initView(context);
}
public LoadingView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
initView(context);
}
public void setOnClickListener(View.OnClickListener l) {
this.setOnClickListener(l);
}
public void setMessage(CharSequence text) {
this.mTvMessage.setText(text);
}
public void setMessage(int resId) {
this.mTvMessage.setText(resId);
}
public void setProgressVisibility(int visibility) {
mPbProgress.setVisibility(visibility);
}
/**
* 显示
* @param msg
*/
public void show(CharSequence msg) {
mTvMessage.setText(msg);
this.setVisibility(View.VISIBLE);
}
/**
* 显示
* @param resid
*/
public void show(int resid) {
mTvMessage.setText(resid);
this.setVisibility(View.VISIBLE);
}
/**
* 显示
*/
public void show() {
this.setVisibility(View.VISIBLE);
}
/**
* 隐藏
*/
public void dismiss() {
this.setVisibility(View.GONE);
}
private void initView(Context context) {
View.inflate(context, R.layout.layout_loading_view, this);
mPbProgress = (ProgressBar) findViewById(R.id.pb_loading_progress);
mTvMessage = (TextView) findViewById(R.id.tv_loading_msg);
}
}
|
[
"yinglovezhuzhu@139.com"
] |
yinglovezhuzhu@139.com
|
9dd440eec3bd9f6e415055562066280bf8c93ac4
|
94c338a26b03c07ea852e0b9d40390a001a8a04d
|
/Native/Android/LunarConsole/lunarConsole/src/main/java/spacemadness/com/lunarconsole/json/Rename.java
|
12402bc0e92b4cd6d55aa16013e2deeabd2d459d
|
[
"Apache-2.0"
] |
permissive
|
shackerlong/lunar-unity-console
|
75e34b3355cdcbff665ccb300af3283694a5c135
|
db209eddcb9274515a76b85a1b50d2c613345be9
|
refs/heads/master
| 2022-11-28T10:30:30.295375
| 2020-07-29T04:08:29
| 2020-07-29T04:08:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,054
|
java
|
//
// Rename.java
//
// Lunar Unity Mobile Console
// https://github.com/SpaceMadness/lunar-unity-console
//
// Copyright 2015-2020 Alex Lementuev, SpaceMadness.
//
// 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 spacemadness.com.lunarconsole.json;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface Rename {
String value();
}
|
[
"a.lementuev@gmail.com"
] |
a.lementuev@gmail.com
|
58526e8d12a1007df0e88187950e346153fde4b0
|
c1d8a2f4250503b33c4a9ab33366553b3af226b4
|
/src/test/java/com/imz1/service/security/jwt/JWTFilterTest.java
|
95052e59aa8f516e32e0acb10b3f35093c15cd7d
|
[] |
no_license
|
anupgupta100/imz1-utdb-service-sample2
|
8b02e65436e59fec83fbcad9d97bf49f6069ddf2
|
a1b3312e82de7beccbf42f8981bca3441b86a8b2
|
refs/heads/master
| 2022-11-25T08:06:08.841660
| 2020-07-31T12:01:40
| 2020-07-31T12:01:40
| 284,026,851
| 0
| 0
| null | 2020-07-31T12:18:52
| 2020-07-31T12:01:21
|
Java
|
UTF-8
|
Java
| false
| false
| 5,559
|
java
|
package com.imz1.service.security.jwt;
import static org.assertj.core.api.Assertions.assertThat;
import com.imz1.service.security.AuthoritiesConstants;
import io.github.jhipster.config.JHipsterProperties;
import io.jsonwebtoken.io.Decoders;
import io.jsonwebtoken.security.Keys;
import java.util.Collections;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.http.HttpStatus;
import org.springframework.mock.web.MockFilterChain;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.test.util.ReflectionTestUtils;
public class JWTFilterTest {
private TokenProvider tokenProvider;
private JWTFilter jwtFilter;
@BeforeEach
public void setup() {
JHipsterProperties jHipsterProperties = new JHipsterProperties();
tokenProvider = new TokenProvider(jHipsterProperties);
ReflectionTestUtils.setField(
tokenProvider,
"key",
Keys.hmacShaKeyFor(
Decoders.BASE64.decode("fd54a45s65fds737b9aafcb3412e07ed99b267f33413274720ddbb7f6c5e64e9f14075f2d7ed041592f0b7657baf8")
)
);
ReflectionTestUtils.setField(tokenProvider, "tokenValidityInMilliseconds", 60000);
jwtFilter = new JWTFilter(tokenProvider);
SecurityContextHolder.getContext().setAuthentication(null);
}
@Test
public void testJWTFilter() throws Exception {
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(
"test-user",
"test-password",
Collections.singletonList(new SimpleGrantedAuthority(AuthoritiesConstants.USER))
);
String jwt = tokenProvider.createToken(authentication, false);
MockHttpServletRequest request = new MockHttpServletRequest();
request.addHeader(JWTFilter.AUTHORIZATION_HEADER, "Bearer " + jwt);
request.setRequestURI("/api/test");
MockHttpServletResponse response = new MockHttpServletResponse();
MockFilterChain filterChain = new MockFilterChain();
jwtFilter.doFilter(request, response, filterChain);
assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value());
assertThat(SecurityContextHolder.getContext().getAuthentication().getName()).isEqualTo("test-user");
assertThat(SecurityContextHolder.getContext().getAuthentication().getCredentials().toString()).isEqualTo(jwt);
}
@Test
public void testJWTFilterInvalidToken() throws Exception {
String jwt = "wrong_jwt";
MockHttpServletRequest request = new MockHttpServletRequest();
request.addHeader(JWTFilter.AUTHORIZATION_HEADER, "Bearer " + jwt);
request.setRequestURI("/api/test");
MockHttpServletResponse response = new MockHttpServletResponse();
MockFilterChain filterChain = new MockFilterChain();
jwtFilter.doFilter(request, response, filterChain);
assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value());
assertThat(SecurityContextHolder.getContext().getAuthentication()).isNull();
}
@Test
public void testJWTFilterMissingAuthorization() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest();
request.setRequestURI("/api/test");
MockHttpServletResponse response = new MockHttpServletResponse();
MockFilterChain filterChain = new MockFilterChain();
jwtFilter.doFilter(request, response, filterChain);
assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value());
assertThat(SecurityContextHolder.getContext().getAuthentication()).isNull();
}
@Test
public void testJWTFilterMissingToken() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest();
request.addHeader(JWTFilter.AUTHORIZATION_HEADER, "Bearer ");
request.setRequestURI("/api/test");
MockHttpServletResponse response = new MockHttpServletResponse();
MockFilterChain filterChain = new MockFilterChain();
jwtFilter.doFilter(request, response, filterChain);
assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value());
assertThat(SecurityContextHolder.getContext().getAuthentication()).isNull();
}
@Test
public void testJWTFilterWrongScheme() throws Exception {
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(
"test-user",
"test-password",
Collections.singletonList(new SimpleGrantedAuthority(AuthoritiesConstants.USER))
);
String jwt = tokenProvider.createToken(authentication, false);
MockHttpServletRequest request = new MockHttpServletRequest();
request.addHeader(JWTFilter.AUTHORIZATION_HEADER, "Basic " + jwt);
request.setRequestURI("/api/test");
MockHttpServletResponse response = new MockHttpServletResponse();
MockFilterChain filterChain = new MockFilterChain();
jwtFilter.doFilter(request, response, filterChain);
assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value());
assertThat(SecurityContextHolder.getContext().getAuthentication()).isNull();
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
f6211050ae14d953dcf6eb6209289dbaa70d51c9
|
5d82f3ced50601af2b804cee3cf967945da5ff97
|
/execution-monitoring/retrieve-monitoring-data/src/main/java/org/choreos/services/enactchoreography/client/client/Client.java
|
25dcbdd7c6c8e88d1fd2aec70db2aeefad439548
|
[
"Apache-2.0"
] |
permissive
|
sesygroup/choreography-synthesis-enactment
|
7f345fe7a9e0288bbde539fc373b43f1f0bd1eb5
|
6eb43ea97203853c40f8e447597570f21ea5f52f
|
refs/heads/master
| 2022-01-26T13:20:50.701514
| 2020-03-20T12:18:44
| 2020-03-20T12:18:44
| 141,552,936
| 0
| 1
|
Apache-2.0
| 2022-01-06T19:56:05
| 2018-07-19T09:04:05
|
Java
|
UTF-8
|
Java
| false
| false
| 3,485
|
java
|
package org.choreos.services.enactchoreography.client.client;
import java.util.List;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.Action;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
/**
* This class was generated by the JAX-WS RI.
* JAX-WS RI 2.2.8
* Generated source version: 2.2
*
*/
@WebService(name = "Client", targetNamespace = "http://services.choreos.org/")
@XmlSeeAlso({
ObjectFactory.class
})
public interface Client {
/**
*
*/
@WebMethod
@RequestWrapper(localName = "scenarioSetup", targetNamespace = "http://services.choreos.org/", className = "org.choreos.services.enactchoreography.client.client.ScenarioSetup")
@ResponseWrapper(localName = "scenarioSetupResponse", targetNamespace = "http://services.choreos.org/", className = "org.choreos.services.enactchoreography.client.client.ScenarioSetupResponse")
@Action(input = "http://services.choreos.org/Client/scenarioSetupRequest", output = "http://services.choreos.org/Client/scenarioSetupResponse")
public void scenarioSetup();
/**
*
* @param arg0
*/
@WebMethod
@RequestWrapper(localName = "setEndpointAddress", targetNamespace = "http://services.choreos.org/", className = "org.choreos.services.enactchoreography.client.client.SetEndpointAddress")
@ResponseWrapper(localName = "setEndpointAddressResponse", targetNamespace = "http://services.choreos.org/", className = "org.choreos.services.enactchoreography.client.client.SetEndpointAddressResponse")
@Action(input = "http://services.choreos.org/Client/setEndpointAddressRequest", output = "http://services.choreos.org/Client/setEndpointAddressResponse")
public void setEndpointAddress(
@WebParam(name = "arg0", targetNamespace = "")
String arg0);
/**
*
* @param arg0
*/
@WebMethod
@RequestWrapper(localName = "start", targetNamespace = "http://services.choreos.org/", className = "org.choreos.services.enactchoreography.client.client.Start")
@ResponseWrapper(localName = "startResponse", targetNamespace = "http://services.choreos.org/", className = "org.choreos.services.enactchoreography.client.client.StartResponse")
@Action(input = "http://services.choreos.org/Client/startRequest", output = "http://services.choreos.org/Client/startResponse")
public void start(
@WebParam(name = "arg0", targetNamespace = "")
String arg0);
/**
*
* @param arg2
* @param arg1
* @param arg0
*/
@WebMethod
@RequestWrapper(localName = "setInvocationAddress", targetNamespace = "http://services.choreos.org/", className = "org.choreos.services.enactchoreography.client.client.SetInvocationAddress")
@ResponseWrapper(localName = "setInvocationAddressResponse", targetNamespace = "http://services.choreos.org/", className = "org.choreos.services.enactchoreography.client.client.SetInvocationAddressResponse")
@Action(input = "http://services.choreos.org/Client/setInvocationAddressRequest", output = "http://services.choreos.org/Client/setInvocationAddressResponse")
public void setInvocationAddress(
@WebParam(name = "arg0", targetNamespace = "")
String arg0,
@WebParam(name = "arg1", targetNamespace = "")
String arg1,
@WebParam(name = "arg2", targetNamespace = "")
List<String> arg2);
}
|
[
"alexander.perucci@gmail.com"
] |
alexander.perucci@gmail.com
|
036ae019b06c12b27ee84813aee68ea9ee77c020
|
61602d4b976db2084059453edeafe63865f96ec5
|
/com/xunlei/downloadprovider/homepage/choiceness/ui/items/aj.java
|
fa0294366ab7acdc2cb30680e91467f47b557a91
|
[] |
no_license
|
ZoranLi/thunder
|
9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0
|
0778679ef03ba1103b1d9d9a626c8449b19be14b
|
refs/heads/master
| 2020-03-20T23:29:27.131636
| 2018-06-19T06:43:26
| 2018-06-19T06:43:26
| 137,848,886
| 12
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 787
|
java
|
package com.xunlei.downloadprovider.homepage.choiceness.ui.items;
import com.xunlei.downloadprovider.homepage.follow.aa;
import java.util.List;
/* compiled from: ChoicenessRecommendUserView */
final class aj implements aa {
final /* synthetic */ b a;
aj(b bVar) {
this.a = bVar;
}
public final void a(boolean z, List<String> list) {
if (this.a.e != null) {
if (this.a.e.c != null) {
String uid = this.a.e.c.getUid();
if (!(list == null || list.isEmpty() || list.contains(uid) == null)) {
if (z) {
this.a.a((boolean) null);
return;
}
this.a.a(true);
}
}
}
}
}
|
[
"lizhangliao@xiaohongchun.com"
] |
lizhangliao@xiaohongchun.com
|
b1c5d0ec42019ee594089c802397fa9f499e7050
|
1d38ce849f26c93b0f7b6faf3ed2a7169c1d52b3
|
/src/xtbg/main/java/com/chinacreator/xtbg/tjy/detectionsupplies/list/OsupplieTypeList.java
|
dacbc8dfbeb5bf2d37cfa5d4eae6228159146d57
|
[] |
no_license
|
zhaoy1992/xtbg-whtjy-new
|
074f45e589be11d890ce301636f7585542680591
|
6d5cc068efd597ce8d20944dd7c88ff5aa525e40
|
refs/heads/master
| 2020-05-20T04:36:46.145223
| 2019-05-07T10:01:52
| 2019-05-07T10:01:52
| 185,377,218
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,100
|
java
|
/**
* [Product]
* xtbg-tjy
* [Copyright]
* Copyright © 2014 ICSS All Rights Reserved.
* [FileName]
* OsupplieTypeList.java
* [History]
* Version Date Author Content
* -------- --------- ---------- ------------------------
* 1.0.0 2014-2-17 Administrator 最初版本
*/
package com.chinacreator.xtbg.tjy.detectionsupplies.list;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.chinacreator.xtbg.core.common.commonlist.DataInfoImpl;
import com.chinacreator.xtbg.core.common.commonlist.PagingBean;
import com.chinacreator.xtbg.core.common.startup.LoadSpringContext;
import com.chinacreator.xtbg.tjy.detectionsupplies.dao.OsupplieTypeDao;
import com.chinacreator.xtbg.tjy.detectionsupplies.dao.impl.OsupplieTypeDaoImpl;
/**
*<p>Title:OsupplieTypeList.java</p>
*<p>Description:</p>
*<p>Copyright:Copyright (c) 2013</p>
*<p>Company:湖南科创</p>
*@author 邱炼
*@version 1.0
*2014-2-17
*/
public class OsupplieTypeList extends DataInfoImpl {
private static final Log LOG=LogFactory.getLog(OsupplieTypeList.class);
/**
*
* <b>Summary: </b>
* 复写方法 getDataList
* @param parmjson
* @param sortName
* @param sortOrder
* @param offset
* @param maxPagesize
* @return
* @see com.chinacreator.xtbg.core.common.commonlist.DataInfoImpl#getDataList(java.lang.String, java.lang.String, java.lang.String, long, int)
*/
public PagingBean getDataList(String parmjson, String sortName,
String sortOrder, long offset, int maxPagesize) {
PagingBean pb=new PagingBean();
OsupplieTypeDao osupplietypedao = new OsupplieTypeDaoImpl();
try {
pb=osupplietypedao.selOsupplieTypeList(parmjson, sortName, sortOrder, offset, maxPagesize);
} catch (Exception e) {
LOG.error(e.getMessage(),e);
}
return pb;
}
@Override
public PagingBean getDataList(String parmjson, String sortName,
String sortOrder) {
// TODO Auto-generated method stub
return null;
}
}
|
[
"creator@creator"
] |
creator@creator
|
d46aaba0c501af93c81d34f302b351e433937f2d
|
82a8f35c86c274cb23279314db60ab687d33a691
|
/duokan/reader/domain/bookshelf/gb.java
|
724c9861e9271bb85a32a0d218e406ed33209261
|
[] |
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
| 372
|
java
|
package com.duokan.reader.domain.bookshelf;
import java.util.HashMap;
class gb implements Runnable {
final /* synthetic */ HashMap a;
final /* synthetic */ ga b;
gb(ga gaVar, HashMap hashMap) {
this.b = gaVar;
this.a = hashMap;
}
public void run() {
if (this.b.b != null) {
this.b.b.a(this.a);
}
}
}
|
[
"lixiaohong@p2peye.com"
] |
lixiaohong@p2peye.com
|
b28b1dee46c140f80cab7ddf38eda8f761a0b08a
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/neo4j--neo4j/e50473ec0ff19786fae997c4f9b09bca368d5bae/after/Step.java
|
b0517b7563aea9a862da2375babd7682f9b5acee
|
[] |
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
| 3,327
|
java
|
/**
* Copyright (c) 2002-2014 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.unsafe.impl.batchimport.staging;
import org.neo4j.unsafe.impl.batchimport.stats.StepStats;
/**
* One step in {@link Stage}, where a {@link Stage} is a sequence of steps. Each step works on batches.
* Batches are typically received from an upstream step, or produced in the step itself. If there are more steps
* {@link #setDownstream(Step) downstream} then processed batches are passed down. Each step has maximum
* "work-ahead" size where it awaits the downstream step to catch up if the queue size goes beyond that number.
*
* Batches are associated with a ticket, which is simply a long value incremented for each batch.
* It's the first step that is responsible for generating these tickets, which will stay unchanged with
* each batch all the way through the stage. Steps that have multiple threads processing batches can process
* received batches in any order, but must make sure to send batches to its downstream
* (i.e. calling {@link #receive(long, Object)} on its downstream step) ordered by ticket.
*
* @param <T> the type of batch objects received from upstream.
*/
public interface Step<T>
{
/**
* @return name of this step.
*/
String name();
/**
* Receives a batch from upstream, queues it for processing.
*
* @param ticket ticket associates with the batch. Tickets are generated by producing steps and must follow
* each batch all the way through a stage.
* @param batch the batch object to queue for processing.
* @return how long it time (millis) was spent waiting for a spot in the queue.
*/
long receive( long ticket, T batch );
/**
* @return statistics about this step at this point in time.
*/
StepStats stats();
/**
* Called by upstream to let this step know that it will not send any more batches.
*/
void endOfUpstream();
/**
* @return {@code true} if this step has received AND processed all batches from upstream, or in
* the case of a producer, that this step has produced all batches.
*/
boolean isCompleted();
/**
* Called by the {@link Stage} when setting up the stage. This will form a pipeline of steps,
* making up the stage.
* @param downstreamStep {@link Step} to send batches to downstream.
*/
void setDownstream( Step<?> downstreamStep );
/**
* Receives a panic, asking to shut down as soon as possible.
* @param cause cause for the panic.
*/
void receivePanic( Throwable cause );
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
02463ae842dadcea21a0576648a9ae31dd2df344
|
b456d6dcf42e41da7a831bc1acc3a75d3d18eb91
|
/src/main/java/fredboat/command/maintenance/VersionCommand.java
|
e507761fccac6fd37dcfe8bb3a19f232a23b1d4c
|
[] |
no_license
|
SinSiXX/FredBoat
|
73f8b7da12b39a4dacc9cf0e8f033e1310dcb231
|
576c57aacf7de5a572d7ef693a75830e191cd91b
|
refs/heads/master
| 2021-01-18T04:22:03.736684
| 2016-06-02T14:04:29
| 2016-06-03T05:14:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 517
|
java
|
package fredboat.command.maintenance;
import fredboat.commandmeta.Command;
import net.dv8tion.jda.JDAInfo;
import net.dv8tion.jda.entities.Guild;
import net.dv8tion.jda.entities.Message;
import net.dv8tion.jda.entities.TextChannel;
import net.dv8tion.jda.entities.User;
public class VersionCommand extends Command {
@Override
public void onInvoke(Guild guild, TextChannel channel, User invoker, Message message, String[] args) {
channel.sendMessage("JDA Version: " + JDAInfo.VERSION);
}
}
|
[
"frogkr@gmail.com"
] |
frogkr@gmail.com
|
26a15f4c93f093857f8b16a884bb5634070ba34b
|
a19a201152599eae8c5ec84c695ef47242257b8f
|
/src/main/java/com/eshipper/service/ApPayableCreditNotesTransService.java
|
f12732b24c20d7c237060d95760c0a5d1bf565c1
|
[] |
no_license
|
RajasekharAnisetti/eshipper2
|
278b92d0e1b5b19840bf5ebd37fbbd911928c7d2
|
19cb5195ff2696b53c3239f288da1787f1171ae6
|
refs/heads/master
| 2022-12-27T05:20:42.781472
| 2019-10-22T10:21:52
| 2019-10-22T10:21:52
| 216,559,606
| 0
| 0
| null | 2019-10-21T12:16:51
| 2019-10-21T12:13:39
|
Java
|
UTF-8
|
Java
| false
| false
| 1,054
|
java
|
package com.eshipper.service;
import com.eshipper.service.dto.ApPayableCreditNotesTransDTO;
import java.util.List;
import java.util.Optional;
/**
* Service Interface for managing {@link com.eshipper.domain.ApPayableCreditNotesTrans}.
*/
public interface ApPayableCreditNotesTransService {
/**
* Save a apPayableCreditNotesTrans.
*
* @param apPayableCreditNotesTransDTO the entity to save.
* @return the persisted entity.
*/
ApPayableCreditNotesTransDTO save(ApPayableCreditNotesTransDTO apPayableCreditNotesTransDTO);
/**
* Get all the apPayableCreditNotesTrans.
*
* @return the list of entities.
*/
List<ApPayableCreditNotesTransDTO> findAll();
/**
* Get the "id" apPayableCreditNotesTrans.
*
* @param id the id of the entity.
* @return the entity.
*/
Optional<ApPayableCreditNotesTransDTO> findOne(Long id);
/**
* Delete the "id" apPayableCreditNotesTrans.
*
* @param id the id of the entity.
*/
void delete(Long id);
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
87cdbc8a0070f0cd08415716265756b0d9c52368
|
47798511441d7b091a394986afd1f72e8f9ff7ab
|
/src/main/java/com/alipay/api/domain/AntMerchantExpandItemOpenQueryModel.java
|
98e20d8917d058fa59ce41353ac2a611f38deb86
|
[
"Apache-2.0"
] |
permissive
|
yihukurama/alipay-sdk-java-all
|
c53d898371032ed5f296b679fd62335511e4a310
|
0bf19c486251505b559863998b41636d53c13d41
|
refs/heads/master
| 2022-07-01T09:33:14.557065
| 2020-05-07T11:20:51
| 2020-05-07T11:20:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,512
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 查询商品接口
*
* @author auto create
* @since 1.0, 2019-09-17 17:21:31
*/
public class AntMerchantExpandItemOpenQueryModel extends AlipayObject {
private static final long serialVersionUID = 7397228774572121352L;
/**
* 场景码(具体值请参见产品文档)
*/
@ApiField("scene")
private String scene;
/**
* 商品状态:EFFECT(有效)、INVALID(无效)
*/
@ApiField("status")
private String status;
/**
* 商品归属主体ID
例:商品归属主体类型为店铺,则商品归属主体ID为店铺ID;归属主体为小程序,则归属主体ID为小程序ID
*/
@ApiField("target_id")
private String targetId;
/**
* 商品归属主体类型:
5(店铺)
8(小程序)
*/
@ApiField("target_type")
private String targetType;
public String getScene() {
return this.scene;
}
public void setScene(String scene) {
this.scene = scene;
}
public String getStatus() {
return this.status;
}
public void setStatus(String status) {
this.status = status;
}
public String getTargetId() {
return this.targetId;
}
public void setTargetId(String targetId) {
this.targetId = targetId;
}
public String getTargetType() {
return this.targetType;
}
public void setTargetType(String targetType) {
this.targetType = targetType;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
af4d1952c2461e00899faccff94dff886f29411f
|
8aefee1609bb581dabbb972740fed17a91047810
|
/src/org/zwobble/shed/compiler/modules/Module.java
|
002992fbef4d385dff31f378950c3b08eed731a2
|
[] |
no_license
|
mwilliamson/shed
|
24013de71af53b0238f0bef11296fba0a8d75254
|
65fef492344f5effd68356a353b760abcda09d1d
|
refs/heads/master
| 2020-12-24T15:22:58.130607
| 2012-02-12T15:50:39
| 2012-02-12T15:50:39
| 1,815,372
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 261
|
java
|
package org.zwobble.shed.compiler.modules;
import org.zwobble.shed.compiler.naming.FullyQualifiedName;
import org.zwobble.shed.compiler.parsing.nodes.Declaration;
public interface Module {
Declaration getDeclaration();
FullyQualifiedName getName();
}
|
[
"mike@zwobble.org"
] |
mike@zwobble.org
|
a03dfade031fd00fbb90af42713dd67bdc9be9c6
|
6f5980157d734eb0638b836faf0a7818f59bebde
|
/cronner-core/src/main/java/cronner/jfaster/org/model/JsonResponse.java
|
4e44776ec5f2700253e0d60ebb49d84cb558ad5a
|
[] |
no_license
|
gongzishuye/cronner
|
f83c8aac550ab293ea5baf90d48d22d533a12b90
|
1d8db1d7eeebd883984ef97e29a88b0da5aed03d
|
refs/heads/master
| 2021-07-03T03:06:34.379878
| 2017-09-22T10:21:13
| 2017-09-22T10:21:13
| 104,467,587
| 1
| 0
| null | 2017-09-22T11:35:20
| 2017-09-22T11:35:20
| null |
UTF-8
|
Java
| false
| false
| 2,379
|
java
|
package cronner.jfaster.org.model;
import java.io.Serializable;
/**
* json 统一返回
*
* @author fangyanpeng
*/
public class JsonResponse implements Serializable {
private static final long serialVersionUID = -4761871227325502579L;
public static final Integer OK = 200;
public static final Integer REDIRECT = 302;
public static final Integer ERR = 500;
public static final JsonResponse NEED_LOGIN = JsonResponse.notOk(403, "用户未登录");
public static final JsonResponse AUTH_FAIL = JsonResponse.notOk(401, "认证失败");
public static final JsonResponse PARAM_MISSING = JsonResponse.notOk(400, "参数缺失");
public static final JsonResponse SERVER_ERR = JsonResponse.notOk(ERR, "服务器异常");
/**
* 响应码
*/
private Integer status;
/**
* 错误信息
*/
private Object err;
/**
* 响应数据
*/
private Object data;
public static JsonResponse ok(){
JsonResponse r = new JsonResponse();
r.status = OK;
return r;
}
public static JsonResponse ok(Object data){
JsonResponse r = new JsonResponse();
r.status = OK;
r.data = data;
return r;
}
public static JsonResponse notOk(Object err){
JsonResponse r = new JsonResponse();
r.status = ERR;
r.err = err;
return r;
}
public static JsonResponse notOk(Integer status, Object err){
JsonResponse r = new JsonResponse();
r.status = status;
r.err = err;
return r;
}
public static JsonResponse redirect(String url){
JsonResponse r = new JsonResponse();
r.status = REDIRECT;
r.data = url;
return r;
}
public Integer getStatus() {
return status;
}
public Object getErr() {
return err;
}
public void setErr(Object err) {
this.err = err;
}
public Object getData() {
return data;
}
public void setData(Object data) {
this.data = data;
}
public Boolean isSuccess(){
return status.intValue() == OK.intValue();
}
@Override
public String toString() {
return "JsonResponse{" +
"status=" + status +
", err=" + err +
", data=" + data +
'}';
}
}
|
[
"13120336627@163.com"
] |
13120336627@163.com
|
d7394f84b64b82774fb37b4cf96db3e15d92df8a
|
f889ee846d2a15c8d069e492d08ce836aaa2925b
|
/src/cli/org/codehaus/griffon/plugins/BasicGriffonPluginInfo.java
|
f1d8c5bed38ec0bf91b6298e1f7970ef62d2440d
|
[
"Apache-2.0"
] |
permissive
|
shemnon/griffon
|
eb2ab14c177852f33bb249267cb71e5d90a6c2f5
|
2e6b75000cdf1c3e54f4c6561a171ff71a9deedd
|
refs/heads/master
| 2020-04-07T15:36:19.091537
| 2010-08-02T11:32:43
| 2010-08-02T11:32:43
| 268,379
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,766
|
java
|
/*
* Copyright 2004-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codehaus.griffon.plugins;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.springframework.core.io.Resource;
import groovy.lang.GroovyObjectSupport;
import groovy.lang.MissingPropertyException;
/**
* Simple Javabean implementation of the GriffonPluginInfo interface
*
* @author Graeme Rocher (Grails 1.3)
*/
public class BasicGriffonPluginInfo extends GroovyObjectSupport implements GriffonPluginInfo {
private String name;
private String version;
private Map<String,Object> attributes = new ConcurrentHashMap<String,Object>();
private Resource descriptor;
public BasicGriffonPluginInfo(Resource pluginLocation) {
this.descriptor = pluginLocation;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
@Override
public void setProperty(String property, Object newValue) {
try {
super.setProperty(property, newValue);
} catch (MissingPropertyException e) {
attributes.put(property, newValue);
}
}
@Override
public Object getProperty(String property) {
try {
return super.getProperty(property);
} catch (MissingPropertyException e) {
return attributes.get(property);
}
}
public String getFullName() {
return this.name + '-' + this.version;
}
public Resource getDescriptor() {
return this.descriptor;
}
public Resource getPluginDir() {
try {
return this.descriptor.createRelative(".");
} catch (IOException e) {
return null;
}
}
public Map getProperties() {
Map props = new HashMap();
props.putAll(attributes);
props.put(NAME, name);
props.put(VERSION, version);
return props;
}
}
|
[
"aalmiray@gmail.com"
] |
aalmiray@gmail.com
|
5fb37fa0ef8f442a5753113de58569451f674323
|
1c785b15245b122d974c300e5004de60056ef55d
|
/projects/wfe/wfe-core/src/test/java/ru/runa/wfe/commons/bc/BusinessDurationParserTest.java
|
0fd323d8b687e71f053ad905d0aa00f3e7e8ae36
|
[] |
no_license
|
kuimovvg/RunaWFE-4.x
|
13e58f873d0fb751751a10294473d18b394a4b17
|
9b7d34f1e402d963213efda9dab9c305b090db0d
|
refs/heads/trunk
| 2020-12-25T20:30:53.442175
| 2015-07-29T16:03:24
| 2015-07-29T16:03:24
| 39,517,577
| 0
| 0
| null | 2015-07-22T16:36:09
| 2015-07-22T16:36:08
| null |
UTF-8
|
Java
| false
| false
| 1,840
|
java
|
package ru.runa.wfe.commons.bc;
import java.util.Calendar;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
public class BusinessDurationParserTest extends Assert {
@DataProvider
public Object[][] getDurations() {
return new Object[][] { { "1 business hours", new BusinessDuration(Calendar.MINUTE, 60, true) },
{ "1 hours", new BusinessDuration(Calendar.HOUR, 1, false) },
{ "15 business minutes", new BusinessDuration(Calendar.MINUTE, 15, true) },
{ "101 minutes", new BusinessDuration(Calendar.MINUTE, 101, false) },
{ "3 business days", new BusinessDuration(Calendar.DAY_OF_YEAR, 3, true) },
{ "14 days", new BusinessDuration(Calendar.DAY_OF_YEAR, 14, false) },
{ "11 seconds", new BusinessDuration(Calendar.SECOND, 11, false) },
{ "2 business weeks", new BusinessDuration(Calendar.DAY_OF_YEAR, 10, true) },
{ "1 business years", new BusinessDuration(Calendar.DAY_OF_YEAR, 220, true) },
{ "1 business months", new BusinessDuration(Calendar.DAY_OF_YEAR, 21, true) },
{ "1 months", new BusinessDuration(Calendar.MONTH, 1, false) },
{ "10 weeks", new BusinessDuration(Calendar.WEEK_OF_YEAR, 10, false) } };
}
@Test(dataProvider = "getDurations")
public void parseDurations(String durationString, BusinessDuration expected) {
BusinessDuration businessDuration = BusinessDurationParser.parse(durationString);
assertEquals(businessDuration, expected);
}
@Test(expectedExceptions = IllegalArgumentException.class)
public void parseBadDuration() {
BusinessDurationParser.parse("1 business week");
}
}
|
[
"gritsenko_s@999c22fd-c5eb-e245-b5be-d41808c6d2cd"
] |
gritsenko_s@999c22fd-c5eb-e245-b5be-d41808c6d2cd
|
850789652242b31af17b6cccbda806c0950005d1
|
863acb02a064a0fc66811688a67ce3511f1b81af
|
/sources/com/google/android/gms/internal/location/zzan.java
|
f0d0d7c45fd2133514e12e38f41c788cbd6d78bf
|
[
"MIT"
] |
permissive
|
Game-Designing/Custom-Football-Game
|
98d33eb0c04ca2c48620aa4a763b91bc9c1b7915
|
47283462b2066ad5c53b3c901182e7ae62a34fc8
|
refs/heads/master
| 2020-08-04T00:02:04.876780
| 2019-10-06T06:55:08
| 2019-10-06T06:55:08
| 211,914,568
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 890
|
java
|
package com.google.android.gms.internal.location;
import android.app.PendingIntent;
import android.os.Parcel;
import android.os.RemoteException;
public abstract class zzan extends zzb implements zzam {
public zzan() {
super("com.google.android.gms.location.internal.IGeofencerCallbacks");
}
/* access modifiers changed from: protected */
/* renamed from: a */
public final boolean mo32494a(int i, Parcel parcel, Parcel parcel2, int i2) throws RemoteException {
if (i == 1) {
mo32496a(parcel.readInt(), parcel.createStringArray());
} else if (i == 2) {
mo32497b(parcel.readInt(), parcel.createStringArray());
} else if (i != 3) {
return false;
} else {
mo32495a(parcel.readInt(), (PendingIntent) zzc.m31756a(parcel, PendingIntent.CREATOR));
}
return true;
}
}
|
[
"tusharchoudhary0003@gmail.com"
] |
tusharchoudhary0003@gmail.com
|
00772c1f9f4e6037e8b39438d9acaad9fb182edf
|
19b1ed801a2453c4f93e758ee4e2c39cb0fbe913
|
/PartitionList.java
|
b133643455059c3d278f70535a8391fcac880678
|
[] |
no_license
|
guaguahuahua/Leetcode
|
c1ea867b98f2e493c3686fa9b8d089af5ecccecc
|
95b5554b6d8e44cd0c4fe4e23b316517791dd1a7
|
refs/heads/master
| 2021-01-23T01:56:09.973798
| 2017-04-07T14:26:12
| 2017-04-07T14:26:12
| 85,947,329
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,576
|
java
|
package com.xjtuse.easy;
public class PartitionList {
public static ListNode partition(ListNode head, int x){
ListNode virtual=new ListNode(0);
ListNode insert=null,back,temp,t;
boolean flag=false;//如果删除节点的行为发生,那么不移动t的位置
virtual.next=head;
t=virtual;
//第一次遍历,找到插入点
while(t.next!=null){
if(t.next.val>=x){
insert=t;
t=t.next;//将遍历指针t向后移动一位
break;
}
t=t.next;
}
System.out.print(insert.val+"\t");
t=head;
//第二次遍历,第二个参数是保证了找到了插入点
while(t!=null && t.next!=null){//第二次遍历,寻找小于x的节点,并插入到相应的位置
if(t.next.val<x){
temp=t.next;
t.next=t.next.next;//删除节点
back=insert.next;//将该节点插入到insert位置之后
insert.next=temp;
temp.next=back;
insert=insert.next;//向后移动插入节点,保证相对顺序
flag=true;
}
if(flag){
flag=false;
continue;
}
t=t.next;
}
return virtual.next;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
ListNode n1=new ListNode(1);
ListNode n2=new ListNode(4);
ListNode n3=new ListNode(3);
ListNode n4=new ListNode(2);
ListNode n5=new ListNode(5);
ListNode n6=new ListNode(2);
// ListNode n7=new ListNode(5);
n1.next=n2;
n2.next=n3;
n3.next=n4;
n4.next=n5;
n5.next=n6;
// n6.next=n7;
ListNode head=partition(n1,3);
while(head!=null){
System.out.print(head.val+" ");
head=head.next;
}
}
}
|
[
"dante.zyd@gmail.com"
] |
dante.zyd@gmail.com
|
ddd68a56d52631a2183f380118dffc759cba1c54
|
764419bfba54f2701729abbc4423e856c8d22f09
|
/sm-shop-model/src/main/java/com/salesmanager/shop/model/catalog/product/ReadableProduct.java
|
7fdb7bd03ded5881af28c2f6823e3f2cf5472dca
|
[
"Apache-2.0"
] |
permissive
|
shopizer-ecommerce/shopizer
|
972c86b7bebc607bfa7b6138ddb47fa3c1e90cc7
|
054a3bde1ea8894d13b0a8fb4e28f9db17262224
|
refs/heads/main
| 2023-08-30T16:24:57.981774
| 2023-04-26T02:47:50
| 2023-04-26T02:47:50
| 6,789,509
| 3,532
| 3,174
|
Apache-2.0
| 2023-09-13T14:37:38
| 2012-11-21T03:42:39
|
Java
|
UTF-8
|
Java
| false
| false
| 4,398
|
java
|
package com.salesmanager.shop.model.catalog.product;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import com.salesmanager.shop.model.catalog.category.ReadableCategory;
import com.salesmanager.shop.model.catalog.manufacturer.ReadableManufacturer;
import com.salesmanager.shop.model.catalog.product.attribute.ReadableProductAttribute;
import com.salesmanager.shop.model.catalog.product.attribute.ReadableProductOption;
import com.salesmanager.shop.model.catalog.product.attribute.ReadableProductProperty;
import com.salesmanager.shop.model.catalog.product.product.ProductEntity;
import com.salesmanager.shop.model.catalog.product.product.variant.ReadableProductVariant;
import com.salesmanager.shop.model.catalog.product.type.ReadableProductType;
public class ReadableProduct extends ProductEntity implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private ProductDescription description;
private ReadableProductPrice productPrice;
private String finalPrice = "0";
private String originalPrice = null;
private boolean discounted = false;
private ReadableImage image;
private List<ReadableImage> images = new ArrayList<ReadableImage>();
private ReadableManufacturer manufacturer;
private List<ReadableProductAttribute> attributes = new ArrayList<ReadableProductAttribute>();
private List<ReadableProductOption> options = new ArrayList<ReadableProductOption>();
private List<ReadableProductVariant> variants = new ArrayList<ReadableProductVariant>();
private List<ReadableProductProperty> properties = new ArrayList<ReadableProductProperty>();
private List<ReadableCategory> categories = new ArrayList<ReadableCategory>();
private ReadableProductType type;
private boolean canBePurchased = false;
// RENTAL
private RentalOwner owner;
public ProductDescription getDescription() {
return description;
}
public void setDescription(ProductDescription description) {
this.description = description;
}
public String getFinalPrice() {
return finalPrice;
}
public void setFinalPrice(String finalPrice) {
this.finalPrice = finalPrice;
}
public String getOriginalPrice() {
return originalPrice;
}
public void setOriginalPrice(String originalPrice) {
this.originalPrice = originalPrice;
}
public boolean isDiscounted() {
return discounted;
}
public void setDiscounted(boolean discounted) {
this.discounted = discounted;
}
public void setImages(List<ReadableImage> images) {
this.images = images;
}
public List<ReadableImage> getImages() {
return images;
}
public void setImage(ReadableImage image) {
this.image = image;
}
public ReadableImage getImage() {
return image;
}
public void setAttributes(List<ReadableProductAttribute> attributes) {
this.attributes = attributes;
}
public List<ReadableProductAttribute> getAttributes() {
return attributes;
}
public void setManufacturer(ReadableManufacturer manufacturer) {
this.manufacturer = manufacturer;
}
public ReadableManufacturer getManufacturer() {
return manufacturer;
}
public boolean isCanBePurchased() {
return canBePurchased;
}
public void setCanBePurchased(boolean canBePurchased) {
this.canBePurchased = canBePurchased;
}
public RentalOwner getOwner() {
return owner;
}
public void setOwner(RentalOwner owner) {
this.owner = owner;
}
public List<ReadableCategory> getCategories() {
return categories;
}
public void setCategories(List<ReadableCategory> categories) {
this.categories = categories;
}
public List<ReadableProductOption> getOptions() {
return options;
}
public void setOptions(List<ReadableProductOption> options) {
this.options = options;
}
public ReadableProductType getType() {
return type;
}
public void setType(ReadableProductType type) {
this.type = type;
}
public ReadableProductPrice getProductPrice() {
return productPrice;
}
public void setProductPrice(ReadableProductPrice productPrice) {
this.productPrice = productPrice;
}
public List<ReadableProductProperty> getProperties() {
return properties;
}
public void setProperties(List<ReadableProductProperty> properties) {
this.properties = properties;
}
public List<ReadableProductVariant> getVariants() {
return variants;
}
public void setVariants(List<ReadableProductVariant> variants) {
this.variants = variants;
}
}
|
[
"csamson777@yahoo.com"
] |
csamson777@yahoo.com
|
af4679f1d1047dbd403c025b4a3e3b55ca39ffdc
|
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
|
/ast_results/cgeo_c-geo-opensource/main/src/cgeo/geocaching/files/ImportLocFileThread.java
|
3779fd8076f8bf6887a33312b356bec466294462
|
[] |
no_license
|
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
|
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
|
0564143d92f8024ff5fa6b659c2baebf827582b1
|
refs/heads/master
| 2020-07-13T13:53:40.297493
| 2019-01-11T11:51:18
| 2019-01-11T11:51:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,193
|
java
|
// isComment
package cgeo.geocaching.files;
import cgeo.geocaching.R;
import cgeo.geocaching.models.Geocache;
import cgeo.geocaching.utils.DisposableHandler;
import cgeo.geocaching.utils.Log;
import android.os.Handler;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
class isClassOrIsInterface extends AbstractImportThread {
private final File isVariable;
isConstructor(final File isParameter, final int isParameter, final Handler isParameter, final DisposableHandler isParameter) {
super(isNameExpr, isNameExpr, isNameExpr);
this.isFieldAccessExpr = isNameExpr;
}
@Override
protected Collection<Geocache> isMethod() throws IOException, ParserException {
isNameExpr.isMethod("isStringConstant" + isNameExpr.isMethod());
isNameExpr.isMethod(isNameExpr.isMethod(isNameExpr.isFieldAccessExpr, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, (int) isNameExpr.isMethod(), isMethod()));
final LocParser isVariable = new LocParser(isNameExpr);
return isNameExpr.isMethod(isNameExpr, isNameExpr);
}
@Override
protected String isMethod() {
return isNameExpr.isMethod();
}
}
|
[
"matheus@melsolucoes.net"
] |
matheus@melsolucoes.net
|
f097d2673707b650108df48b6a923ccc35afd55e
|
90dc888dd24c9ed3fea097f0ed0f41c8f9a52439
|
/src/main/java/com/cxg/weChat/core/config/BDSessionListener.java
|
f5cc9bbaef925579d0188a5837d5b82376eb5c00
|
[
"Apache-2.0"
] |
permissive
|
NULLcaption/wxappH5
|
ec9b55f8012112ca96a3523f0e28d1c320549d5c
|
4f3aeb670b79719315afc85fd11e10ac0e86e77d
|
refs/heads/master
| 2022-07-19T23:03:32.678701
| 2021-05-28T02:01:37
| 2021-05-28T02:01:37
| 183,537,104
| 1
| 0
|
Apache-2.0
| 2022-07-06T20:41:30
| 2019-04-26T01:47:52
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 646
|
java
|
package com.cxg.weChat.core.config;
import org.apache.shiro.session.Session;
import org.apache.shiro.session.SessionListener;
import java.util.concurrent.atomic.AtomicInteger;
public class BDSessionListener implements SessionListener {
private final AtomicInteger sessionCount = new AtomicInteger(0);
@Override
public void onStart(Session session) {
sessionCount.incrementAndGet();
}
@Override
public void onStop(Session session) {
sessionCount.decrementAndGet();
}
@Override
public void onExpiration(Session session) {
sessionCount.decrementAndGet();
}
public int getSessionCount() {
return sessionCount.get();
}
}
|
[
"cxg1207@126.com"
] |
cxg1207@126.com
|
98881558438702fda94c0ee33b4ac17807598939
|
46719835215b0c92e191a12d6adbbb115fef653d
|
/src/test/java/omid/springframework/repositories/UnitOfMeasureRepositoryIT.java
|
c6c6cf2e0030c7eab4209088dbdd97fb9ed8c9ca
|
[] |
no_license
|
omid-joukar/spring5-recipe-app
|
caba47cefe47f5c62455dc6c3ca32138e6453c41
|
97786769385f8310c47ba794373fac6e3cdd2e39
|
refs/heads/master
| 2023-02-13T20:42:15.289853
| 2020-12-28T22:58:40
| 2020-12-28T22:58:40
| 322,797,075
| 1
| 0
| null | 2020-12-24T10:01:53
| 2020-12-19T08:01:39
|
Java
|
UTF-8
|
Java
| false
| false
| 1,129
|
java
|
package omid.springframework.repositories;
import omid.springframework.domain.UnitOfMeasure;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.Optional;
import static org.junit.Assert.*;
@RunWith(SpringRunner.class)
@DataJpaTest
public class UnitOfMeasureRepositoryIT {
@Autowired
UnitOfMeasureRepository unitOfMeasureRepository;
@Before
public void setUp() throws Exception {
}
@Test
public void findByDescription() {
Optional<UnitOfMeasure> unitOfMeasureOptional = unitOfMeasureRepository.findByDescription("Teaspoon");
assertEquals("Teaspoon",unitOfMeasureOptional.get().getDescription());
}
@Test
public void findByDescriptionCup() {
Optional<UnitOfMeasure> unitOfMeasureOptional = unitOfMeasureRepository.findByDescription("Cup");
assertEquals("Cup",unitOfMeasureOptional.get().getDescription());
}
}
|
[
"joukaromid6@gmail.com"
] |
joukaromid6@gmail.com
|
36243aa7ade2eeb18685a0b239f00b3b9ae9fda7
|
a422de59c29d077c512d66b538ff17d179cc077a
|
/hsxt/hsxt-lcs/hsxt-lcs-service/src/main/java/com/gy/hsxt/lcs/interfaces/IErrorMsgService.java
|
73787ae19763faaf6f66810ba6eee5ea2139bc0e
|
[] |
no_license
|
liveqmock/hsxt
|
c554e4ebfd891e4cc3d57e920d8a79ecc020b4dd
|
40bb7a1fe5c22cb5b4f1d700e5d16371a3a74c04
|
refs/heads/master
| 2020-03-28T14:09:31.939168
| 2018-09-12T10:20:46
| 2018-09-12T10:20:46
| 148,461,898
| 0
| 0
| null | 2018-09-12T10:19:11
| 2018-09-12T10:19:10
| null |
UTF-8
|
Java
| false
| false
| 1,320
|
java
|
/***************************************************************************
*
* This document contains confidential and proprietary information
* subject to non-disclosure agreements with GUIYI Technology, Ltd.
* This information shall not be distributed or copied without written
* permission from GUIYI technology, Ltd.
*
***************************************************************************/
package com.gy.hsxt.lcs.interfaces;
import java.util.List;
import com.gy.hsxt.lcs.bean.ErrorMsg;
/***************************************************************************
* <PRE>
* Project Name : hsxt-lcs-service
*
* Package Name : com.gy.hsxt.lcs.interfaces
*
* File Name : IErrorMsgService.java
*
* Creation Date : 2015-7-6
*
* Author : xiaofl
*
* Purpose : 错误信息接口
*
*
* History : TODO
*
* </PRE>
***************************************************************************/
public interface IErrorMsgService {
/**
* 查询错误信息
*
* @param errorMsg
* @return
*/
public ErrorMsg queryErrorMsgWithPK(String languageCode,int errorCode);
/**
* 插入或更新错误信息
* @param list
* @param version
* @return
*/
public int addOrUpdateErrorMsg(List<ErrorMsg> list,Long version);
}
|
[
"864201042@qq.com"
] |
864201042@qq.com
|
78f6b24b12cebc592fff55a7ef7271ac3e001d12
|
eb9f655206c43c12b497c667ba56a0d358b6bc3a
|
/java/typeMigration/testData/inspections/guava/optionalTransform2.java
|
d0a3d52c583f6b260cab4f309aa1dc6d58b2a199
|
[
"Apache-2.0"
] |
permissive
|
JetBrains/intellij-community
|
2ed226e200ecc17c037dcddd4a006de56cd43941
|
05dbd4575d01a213f3f4d69aa4968473f2536142
|
refs/heads/master
| 2023-09-03T17:06:37.560889
| 2023-09-03T11:51:00
| 2023-09-03T12:12:27
| 2,489,216
| 16,288
| 6,635
|
Apache-2.0
| 2023-09-12T07:41:58
| 2011-09-30T13:33:05
| null |
UTF-8
|
Java
| false
| false
| 232
|
java
|
import com.google.common.base.Function;
import com.google.common.base.Optional;
class Transformer {
public Optio<caret>nal<String> transform(Optional<Integer> p1, Function<Integer, String> p2) {
return p1.transform(p2);
}
}
|
[
"dmitry.batkovich@jetbrains.com"
] |
dmitry.batkovich@jetbrains.com
|
0e3f4926f114ff20b076959ae931189002dfc47b
|
c823afba560493971fbe5b5df3fbd5e7169036d5
|
/src/com/th/source/org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java
|
32caea3ac80c7e8914ee0a60318fa7e8170aa35e
|
[] |
no_license
|
HWenTing/JavaSourceLearn
|
034e7e7e6e2b2d6ece11a7b3403e89489473a599
|
9297397d38ffe593b10fe927a1a95396c5d61e21
|
refs/heads/main
| 2023-01-23T23:24:48.690473
| 2020-12-04T08:11:34
| 2020-12-04T08:11:34
| 318,447,213
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 967
|
java
|
package org.omg.PortableInterceptor.ORBInitInfoPackage;
/**
* org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateName.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u101/7261/corba/src/share/classes/org/omg/PortableInterceptor/Interceptors.idl
* Wednesday, June 22, 2016 1:22:40 AM PDT
*/
public final class DuplicateName extends org.omg.CORBA.UserException
{
/**
* The name for which there was already an interceptor registered.
*/
public String name = null;
public DuplicateName ()
{
super(DuplicateNameHelper.id());
} // ctor
public DuplicateName (String _name)
{
super(DuplicateNameHelper.id());
name = _name;
} // ctor
public DuplicateName (String $reason, String _name)
{
super(DuplicateNameHelper.id() + " " + $reason);
name = _name;
} // ctor
} // class DuplicateName
|
[
"982740445@qq.com"
] |
982740445@qq.com
|
9b06e27cc4748ec37188b1ad3c665702cf1ce518
|
186372e2bb690197c8e2f8a2f526112c9ab17500
|
/jeevOMLibs/src/main/java/com/schoolteacher/mylibrary/model/State.java
|
9fced8ce947e785d838737ba1daf60100530e7c7
|
[] |
no_license
|
shah00070/techer
|
a57f76e9f4be212caf8350e0330a860b55e83ccb
|
c26143fde45a1f0f0eed6a7c1abe1b3fba16202a
|
refs/heads/master
| 2021-01-19T11:42:29.707386
| 2016-06-03T08:46:39
| 2016-06-03T08:46:39
| 61,519,634
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 409
|
java
|
package com.schoolteacher.mylibrary.model;
import java.io.Serializable;
public class State implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private int Id;
private String Name;
public int getId() {
return Id;
}
public void setId(int id) {
Id = id;
}
public String getName() {
return Name;
}
public void setName(String name) {
Name = name;
}
}
|
[
"shah.h@jeevom.com"
] |
shah.h@jeevom.com
|
5ab60940179cd7fa716bba7aa67e3465ff31f874
|
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
|
/classes5/hxy.java
|
5c8735df077100fbbe7221d148895af9995aa6d1
|
[] |
no_license
|
meeidol-luo/qooq
|
588a4ca6d8ad579b28dec66ec8084399fb0991ef
|
e723920ac555e99d5325b1d4024552383713c28d
|
refs/heads/master
| 2020-03-27T03:16:06.616300
| 2016-10-08T07:33:58
| 2016-10-08T07:33:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,323
|
java
|
import com.tencent.biz.pubaccount.readinjoy.common.ReadInJoyUtils;
import com.tencent.biz.pubaccount.readinjoy.model.ArticleInfoModule;
import com.tencent.biz.pubaccount.readinjoy.struct.ArticleInfo;
import com.tencent.biz.pubaccount.readinjoy.struct.DislikeInfo;
import com.tencent.mobileqq.app.QQAppInterface;
import com.tencent.mobileqq.hotpatch.NotVerifyClass;
import com.tencent.qphone.base.util.QLog;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class hxy
implements Runnable
{
public hxy(ArticleInfoModule paramArticleInfoModule, long paramLong1, int paramInt, byte[] paramArrayOfByte, boolean paramBoolean1, List paramList1, boolean paramBoolean2, long paramLong2, List paramList2)
{
paramBoolean1 = NotVerifyClass.DO_VERIFY_CLASS;
}
public void run()
{
boolean bool3 = false;
if (this.jdField_a_of_type_Long == -1L) {}
StringBuilder localStringBuilder;
int i;
for (boolean bool1 = true;; bool1 = false)
{
this.jdField_a_of_type_ComTencentBizPubaccountReadinjoyModelArticleInfoModule.a(Integer.valueOf(this.jdField_a_of_type_Int), this.jdField_a_of_type_ArrayOfByte);
if (!this.jdField_a_of_type_Boolean) {
break label408;
}
localStringBuilder = new StringBuilder("\n");
if (this.jdField_a_of_type_JavaUtilList == null) {
break label261;
}
localObject1 = this.jdField_a_of_type_JavaUtilList.iterator();
i = 0;
if (!((Iterator)localObject1).hasNext()) {
break label261;
}
localObject2 = (ArticleInfo)((Iterator)localObject1).next();
localStringBuilder.append("article【" + i + "】 id : " + ((ArticleInfo)localObject2).mArticleID + " seq : " + ((ArticleInfo)localObject2).mRecommendSeq + " title : " + ReadInJoyUtils.c(((ArticleInfo)localObject2).mTitle));
if ((!QLog.isColorLevel()) || (((ArticleInfo)localObject2).mDislikeInfos == null) || (((ArticleInfo)localObject2).mDislikeInfos.size() <= 0)) {
break label251;
}
localStringBuilder.append(" dislik【 ");
localObject2 = ((ArticleInfo)localObject2).mDislikeInfos.iterator();
while (((Iterator)localObject2).hasNext())
{
localStringBuilder.append(((DislikeInfo)((Iterator)localObject2).next()).b);
localStringBuilder.append(",");
}
}
localStringBuilder.append("】\n");
for (;;)
{
i += 1;
break;
label251:
localStringBuilder.append("\n");
}
label261:
Object localObject1 = ArticleInfoModule.jdField_a_of_type_JavaLangString;
Object localObject2 = new StringBuilder().append("handleRefreshChannel success=").append(this.jdField_a_of_type_Boolean).append(" channelId=").append(this.jdField_a_of_type_Int).append(" noMoreData=").append(this.jdField_b_of_type_Boolean).append(" beginRecommendSeq=").append(this.jdField_a_of_type_Long).append(" endRecommendSeq=").append(this.jdField_b_of_type_Long).append(" isInMsgTab : ");
boolean bool2 = bool3;
if (this.jdField_a_of_type_ComTencentBizPubaccountReadinjoyModelArticleInfoModule.jdField_a_of_type_ComTencentCommonAppAppInterface != null)
{
bool2 = bool3;
if ((this.jdField_a_of_type_ComTencentBizPubaccountReadinjoyModelArticleInfoModule.jdField_a_of_type_ComTencentCommonAppAppInterface instanceof QQAppInterface)) {
bool2 = true;
}
}
QLog.i((String)localObject1, 1, bool2 + " isRefresh : " + bool1 + ", " + localStringBuilder.toString());
label408:
if (bool1)
{
ArticleInfoModule.a(this.jdField_a_of_type_ComTencentBizPubaccountReadinjoyModelArticleInfoModule, this.jdField_a_of_type_Boolean, this.jdField_a_of_type_Int, this.jdField_b_of_type_Boolean, this.jdField_a_of_type_JavaUtilList, this.jdField_a_of_type_Long, this.jdField_b_of_type_Long, this.jdField_b_of_type_JavaUtilList);
return;
}
ArticleInfoModule.a(this.jdField_a_of_type_ComTencentBizPubaccountReadinjoyModelArticleInfoModule, this.jdField_a_of_type_Boolean, this.jdField_a_of_type_Int, this.jdField_b_of_type_Boolean, this.jdField_a_of_type_JavaUtilList, this.jdField_a_of_type_Long, this.jdField_b_of_type_Long);
}
}
/* Location: E:\apk\QQ_91\classes5-dex2jar.jar!\hxy.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
6bb8179f272a37ea07c7b0896e57e046aded97e8
|
f1461dab5257e18a09d96519be6e33c2231b323a
|
/src/main/java/com/huisam/querydsl/repository/MemberTestRepository.java
|
646524f1de9f7334c026f5d2c03580280f1c051c
|
[] |
no_license
|
huisam/QueryDsl
|
bceca8ce14824012bf7229d4e8053d724b5e354e
|
b10fac5de2498ed87dd713dfbbcbbf66df60da00
|
refs/heads/master
| 2023-02-16T23:19:08.903058
| 2021-01-07T14:35:37
| 2021-01-07T14:38:34
| 262,557,743
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,065
|
java
|
package com.huisam.querydsl.repository;
import com.huisam.querydsl.dto.MemberSearchCondition;
import com.huisam.querydsl.entity.Member;
import com.huisam.querydsl.repository.support.QueryDsl4RepositorySupport;
import com.querydsl.core.types.dsl.BooleanExpression;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import java.util.List;
import static com.huisam.querydsl.entity.QMember.member;
import static com.huisam.querydsl.entity.QTeam.team;
import static org.springframework.util.StringUtils.hasText;
public class MemberTestRepository extends QueryDsl4RepositorySupport {
public MemberTestRepository(Class<?> domainClass) {
super(Member.class);
}
public List<Member> basicSelect() {
return select(member)
.from(member)
.fetch();
}
public List<Member> basicSelectFrom() {
return selectFrom(member)
.fetch();
}
public Page<Member> applyPagination(MemberSearchCondition condition, Pageable pageable) {
return applyPagination(pageable, query ->
query.selectFrom(member)
.leftJoin(member.team, team)
.where(
userNameEq(condition.getUserName()),
teamNameEq(condition.getTeamName()),
ageGoe(condition.getAgeGoe()),
ageLoe(condition.getAgeLoe())
)
);
}
public Page<Member> applyPagination2(MemberSearchCondition condition, Pageable pageable) {
return applyPagination(pageable, contentQuery ->
contentQuery.selectFrom(member)
.leftJoin(member.team, team)
.where(
userNameEq(condition.getUserName()),
teamNameEq(condition.getTeamName()),
ageGoe(condition.getAgeGoe()),
ageLoe(condition.getAgeLoe())
), countQuery -> countQuery
.select(member.id)
.from(member)
.leftJoin(member.team, team)
.where(
userNameEq(condition.getUserName()),
teamNameEq(condition.getTeamName()),
ageGoe(condition.getAgeGoe()),
ageLoe(condition.getAgeLoe())
)
);
}
private BooleanExpression userNameEq(String userName) {
return hasText(userName) ? member.username.eq(userName) : null;
}
private BooleanExpression teamNameEq(String teamName) {
return hasText(teamName) ? team.name.eq(teamName) : null;
}
private BooleanExpression ageGoe(Integer ageGoe) {
return ageGoe != null ? member.age.goe(ageGoe) : null;
}
private BooleanExpression ageLoe(Integer ageLoe) {
return ageLoe != null ? member.age.loe(ageLoe) : null;
}
}
|
[
"huisam@naver.com"
] |
huisam@naver.com
|
624999b402206ca622b2394e7a21625eccfb00e9
|
2621ecdf9c799b316244d802382bc44843a6f7ce
|
/open-iam-sms-aliyun/src/main/java/com/rnkrsoft/opensource/iam/services/AliyunSmsService.java
|
dc02f882c9a9b02ece8ef3619e99143be5592b6a
|
[] |
no_license
|
artoruis/OpenIAM
|
cf0b879c06b0056893c31fa07fa38d03c278b6c4
|
efbbfe323af42a48f83c263ec408c5018ab4cf4e
|
refs/heads/master
| 2023-04-09T21:28:19.574902
| 2019-08-29T17:44:50
| 2019-08-29T17:44:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,415
|
java
|
package com.rnkrsoft.opensource.iam.services;
import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsRequest;
import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.profile.IClientProfile;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.rnkrsoft.opensource.iam.internal.config.SmsConfig;
import com.rnkrsoft.opensource.iam.internal.sms.services.SmsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.HashMap;
import java.util.Map;
/**
* Created by woate on 2019/7/17.
*/
@Slf4j
public class AliyunSmsService implements SmsService {
@Autowired
SmsConfig smsConfig;
final static Gson GSON = new GsonBuilder().serializeNulls().create();
@Override
public void sendValidateMessage(String mobileNo, String code) {
IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", smsConfig.getAliyunAccessKeyId(), smsConfig.getAliyunAccessKeySecret());
try {
DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", "Dysmsapi", "dysmsapi.aliyuncs.com");
} catch (ClientException e) {
e.printStackTrace();
}
IAcsClient acsClient = new DefaultAcsClient(profile);
SendSmsRequest sendSmsRequest = new SendSmsRequest();
sendSmsRequest.setPhoneNumbers(mobileNo);
sendSmsRequest.setSignName(smsConfig.getAliyunSignName());
sendSmsRequest.setTemplateCode(smsConfig.getValidateSmsTemplateCode());
Map params = new HashMap();
params.put("code", code);
sendSmsRequest.setTemplateParam(GSON.toJson(params));
SendSmsResponse sendSmsResponse = null;
try {
sendSmsResponse = acsClient.getAcsResponse(sendSmsRequest);
} catch (ClientException e) {
e.printStackTrace();
}
log.info("手机号:{} 发送验证码结果{}:{}", mobileNo, sendSmsResponse.getCode(), sendSmsResponse.getMessage());
}
@Override
public void sendNoticeMessage(String mobileNo, String message) {
IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", smsConfig.getAliyunAccessKeyId(), smsConfig.getAliyunAccessKeySecret());
try {
DefaultProfile.addEndpoint("cn-hangzhou", "cn-hangzhou", "Dysmsapi", "dysmsapi.aliyuncs.com");
} catch (ClientException e) {
e.printStackTrace();
}
IAcsClient acsClient = new DefaultAcsClient(profile);
SendSmsRequest sendSmsRequest = new SendSmsRequest();
sendSmsRequest.setPhoneNumbers(mobileNo);
sendSmsRequest.setSignName(smsConfig.getAliyunSignName());
sendSmsRequest.setTemplateCode(smsConfig.getNoticeSmsTemplateCode());
Map params = new HashMap();
params.put("message", message);
sendSmsRequest.setTemplateParam(GSON.toJson(params));
SendSmsResponse sendSmsResponse = null;
try {
sendSmsResponse = acsClient.getAcsResponse(sendSmsRequest);
} catch (ClientException e) {
e.printStackTrace();
}
log.info("手机号:{} 发送通知结果{}:{}", mobileNo, sendSmsResponse.getCode(), sendSmsResponse.getMessage());
}
}
|
[
"master@qq.com"
] |
master@qq.com
|
5ab51b2b2dd3c61a2e7112a477cdeb063b5e1280
|
45f213223f8afdcceee98a1a3f6a5e90cfb73687
|
/jcore-xmi-db-writer/src/test/java/de/julielab/jcore/consumer/xmi/XmiDBWriterMonolithicDocumentTest.java
|
6f8611d2965349b6883517d51878b686f5f81f9a
|
[
"BSD-2-Clause"
] |
permissive
|
JULIELab/jcore-base
|
1b74ad8e70ad59e2179ba58301738ba3bf17ef38
|
20902abb41b3bc2afd246f2e72068bd7c6fa3a93
|
refs/heads/master
| 2023-08-29T02:16:40.302455
| 2022-12-09T10:38:41
| 2022-12-09T10:38:41
| 45,028,592
| 29
| 14
|
BSD-2-Clause
| 2023-07-07T21:58:41
| 2015-10-27T08:59:13
|
Java
|
UTF-8
|
Java
| false
| false
| 4,560
|
java
|
package de.julielab.jcore.consumer.xmi;
import de.julielab.costosys.dbconnection.CoStoSysConnection;
import de.julielab.costosys.dbconnection.DataBaseConnector;
import de.julielab.jcore.db.test.DBTestUtils;
import de.julielab.jcore.types.Header;
import de.julielab.jcore.types.Sentence;
import de.julielab.jcore.types.Token;
import org.apache.commons.configuration2.ex.ConfigurationException;
import org.apache.uima.UIMAException;
import org.apache.uima.analysis_engine.AnalysisEngine;
import org.apache.uima.cas.impl.XmiCasDeserializer;
import org.apache.uima.fit.factory.AnalysisEngineFactory;
import org.apache.uima.fit.factory.JCasFactory;
import org.apache.uima.fit.util.JCasUtil;
import org.apache.uima.jcas.JCas;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.testcontainers.containers.PostgreSQLContainer;
import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers;
import java.io.ByteArrayInputStream;
import java.sql.ResultSet;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatCode;
import static org.junit.jupiter.api.Assertions.assertTrue;
@Testcontainers
public class XmiDBWriterMonolithicDocumentTest {
@Container
public static PostgreSQLContainer postgres = new PostgreSQLContainer("postgres:"+DataBaseConnector.POSTGRES_VERSION);
private static String costosysConfig;
private static DataBaseConnector dbc;
@BeforeAll
public static void setup() throws ConfigurationException {
dbc = DBTestUtils.getDataBaseConnector(postgres);
costosysConfig = DBTestUtils.createTestCostosysConfig("medline_2017", 1, postgres);
DBTestUtils.createAndSetHiddenConfig("src/test/resources/hiddenConfig.txt", postgres);
}
@AfterAll
public static void shutDown() {
dbc.close();
}
public static JCas getJCasWithRequiredTypes() throws UIMAException {
return JCasFactory.createJCas("de.julielab.jcore.types.jcore-morpho-syntax-types",
"de.julielab.jcore.types.jcore-document-meta-pubmed-types",
"de.julielab.jcore.types.jcore-document-structure-pubmed-types",
"de.julielab.jcore.types.extensions.jcore-document-meta-extension-types",
"de.julielab.jcore.types.jcore-xmi-splitter-types");
}
@Test
public void testXmiDBWriterSplitAnnotations() throws Exception {
AnalysisEngine xmiWriter = AnalysisEngineFactory.createEngine("de.julielab.jcore.consumer.xmi.desc.jcore-xmi-db-writer",
XMIDBWriter.PARAM_COSTOSYS_CONFIG, costosysConfig,
XMIDBWriter.PARAM_STORE_ALL, true,
XMIDBWriter.PARAM_STORE_BASE_DOCUMENT, false,
XMIDBWriter.PARAM_TABLE_DOCUMENT, "_data.documents",
XMIDBWriter.PARAM_DO_GZIP, false,
XMIDBWriter.PARAM_UPDATE_MODE, true,
XMIDBWriter.PARAM_STORE_RECURSIVELY, false
);
JCas jCas = getJCasWithRequiredTypes();
final Header header = new Header(jCas);
header.setDocId("789");
header.addToIndexes();
jCas.setDocumentText("This is a sentence. This is another one.");
new Sentence(jCas, 0, 19).addToIndexes();
new Sentence(jCas, 20, 40).addToIndexes();
// Of course, these token offsets are wrong, but it doesn't matter to the test
new Token(jCas, 0, 19).addToIndexes();
new Token(jCas, 20, 40).addToIndexes();
assertThatCode(() -> xmiWriter.process(jCas)).doesNotThrowAnyException();
jCas.reset();
xmiWriter.collectionProcessComplete();
dbc = DBTestUtils.getDataBaseConnector(postgres);
try (CoStoSysConnection costoConn = dbc.obtainOrReserveConnection()) {
assertThat(dbc.tableExists("_data.documents")).isTrue();
assertThat(dbc.isEmpty("_data.documents")).isFalse();
final ResultSet rs = costoConn.createStatement().executeQuery("SELECT xmi FROM _data.documents");
assertTrue(rs.next());
final byte[] xmiData = rs.getBytes(1);
jCas.reset();
XmiCasDeserializer.deserialize(new ByteArrayInputStream(xmiData), jCas.getCas());
assertThat(JCasUtil.select(jCas, Header.class)).isNotEmpty();
assertThat(JCasUtil.select(jCas, Token.class)).isNotEmpty();
assertThat(JCasUtil.select(jCas, Sentence.class)).isNotEmpty();
}
}
}
|
[
"chew@gmx.net"
] |
chew@gmx.net
|
dd339ad7d8e82515ae7c3e5758381982ea428268
|
be093e98761393c91928f9512c4e3a3386d797bb
|
/git-java/src/main/java/com/bjpowernode/git/Test.java
|
9bb7faada897562a9c3c7241d9d6080139d71a71
|
[] |
no_license
|
cc20120914/git-project
|
729aff52f13252ffaf85a4e310544283f319f505
|
43fab7dafd6063974d35c7844a795bb4c17883ae
|
refs/heads/master
| 2023-01-27T11:54:19.320311
| 2020-12-12T06:50:31
| 2020-12-12T06:50:31
| 320,775,536
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 186
|
java
|
package com.bjpowernode.git;
/**
* 2005田超凡
* 2020/12/12
*/
public class Test {
public static void main(String[] args) {
System.out.println("hello world@");
}
}
|
[
"zhangsan@163.com"
] |
zhangsan@163.com
|
5ca1f49645c420fbec1739c798fe68e46523a1f0
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/11/11_d90c4b024d2aff68a914bd93df157ee23410bb2e/IBPELModuleFacetConstants/11_d90c4b024d2aff68a914bd93df157ee23410bb2e_IBPELModuleFacetConstants_s.java
|
5f63b61f511451f38d02c7ebe7f172f999b2c3ce
|
[] |
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,450
|
java
|
/*******************************************************************************
* Copyright (c) 2006 University College London Software Systems Engineering
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Bruno Wassermann - initial API and implementation
*******************************************************************************/
package org.eclipse.bpel.runtimes;
/**
*
*
* @author Bruno Wassermann, written Jun 29, 2006
*/
public interface IBPELModuleFacetConstants {
// module types
public final static String BPEL20_MODULE_TYPE = "bpel.module"; //$NON-NLS-1$
// module type versions
public final static String BPEL11_MODULE_VERSION = "1.1"; // $NON-NLS-1$
public final static String BPEL20_MODULE_VERSION = "2.0"; // $NON-NLS-1$
// facet template
public final static String BPEL20_FACET_TEMPLATE = "template.bpel.core"; //$NON-NLS-1$
// facet
public final static String BPEL20_PROJECT_FACET = "bpel.facet.core"; //$NON-NLS-1$
// bpel file extension
public final static String BPEL_FILE_EXTENSION = "bpel"; //$NON-NLS-1$
public final static String DOT_BPEL_FILE_EXTENSION = "." + BPEL_FILE_EXTENSION; //$NON-NLS-1$
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
03e8334d988a28400bcce7f8b2a677dc046a2f47
|
563c6dae5141ee42174c95ff53852045e5de9b61
|
/20180504 SP4(validVSschedVSremot)/src/validation/lesson03p495/ConvServExample.java
|
5915fc5688953c7a4476fd0eb1c56a31dfd84226
|
[] |
no_license
|
VictorLeonidovich/SpringHibernateLessons
|
79510b5a569b0e43449b78328b047397d75106ec
|
54bd8408c9b0174c2a9e311885005578b52271e7
|
refs/heads/master
| 2020-04-01T14:19:10.990814
| 2018-10-16T13:41:55
| 2018-10-16T13:41:55
| 153,289,407
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,349
|
java
|
package validation.lesson03p495;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.springframework.context.support.GenericXmlApplicationContext;
import org.springframework.core.convert.ConversionService;
public class ConvServExample {
public static void main(String[] args) {
GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
ctx.load("classpath:META-INF/validation/lesson03/app-context.xml");
ctx.refresh();
Contact chris = ctx.getBean("chris", Contact.class);
System.out.println("Chris info: " + chris);
ConversionService conversionService = ctx.getBean(ConversionService.class);
AnotherContact anotherContact = conversionService.convert(chris, AnotherContact.class);
System.out.println("AnotherContact info: " + anotherContact);
String[] stringArray = conversionService.convert("a,b,c", String[].class);
System.out.println("String array: " + stringArray[0] + stringArray[1] + stringArray[2]);
List<String> listString = new ArrayList<>();
listString.add("a");
listString.add("b");
listString.add("c");
Set<String> setString = conversionService.convert(listString, HashSet.class);
for (String string : setString) {
System.out.println("Set: " + string);
}
}
}
|
[
"k-v-l@tut.by"
] |
k-v-l@tut.by
|
f7b52df1554c762ffbffdefd61e902637c9acfed
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/apks_from_phone/data_app_com_monefy_app_lite-2/source/android/support/a/a/e.java
|
02937e777ecaa1bdc9a00894e7d5941bf29d7614
|
[
"Apache-2.0"
] |
permissive
|
iantal/AndroidPermissions
|
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
|
d623b732734243590b5f004d167e542e2e2ae249
|
refs/heads/master
| 2023-07-19T01:29:26.689186
| 2019-09-30T19:01:42
| 2019-09-30T19:01:42
| 107,239,248
| 0
| 0
|
Apache-2.0
| 2023-07-16T07:41:38
| 2017-10-17T08:22:57
| null |
UTF-8
|
Java
| false
| false
| 1,467
|
java
|
package android.support.a.a;
import android.content.res.TypedArray;
import org.xmlpull.v1.XmlPullParser;
class e
{
public static float a(TypedArray paramTypedArray, XmlPullParser paramXmlPullParser, String paramString, int paramInt, float paramFloat)
{
if (!a(paramXmlPullParser, paramString)) {
return paramFloat;
}
return paramTypedArray.getFloat(paramInt, paramFloat);
}
public static int a(TypedArray paramTypedArray, XmlPullParser paramXmlPullParser, String paramString, int paramInt1, int paramInt2)
{
if (!a(paramXmlPullParser, paramString)) {
return paramInt2;
}
return paramTypedArray.getInt(paramInt1, paramInt2);
}
public static boolean a(TypedArray paramTypedArray, XmlPullParser paramXmlPullParser, String paramString, int paramInt, boolean paramBoolean)
{
if (!a(paramXmlPullParser, paramString)) {
return paramBoolean;
}
return paramTypedArray.getBoolean(paramInt, paramBoolean);
}
public static boolean a(XmlPullParser paramXmlPullParser, String paramString)
{
return paramXmlPullParser.getAttributeValue("http://schemas.android.com/apk/res/android", paramString) != null;
}
public static int b(TypedArray paramTypedArray, XmlPullParser paramXmlPullParser, String paramString, int paramInt1, int paramInt2)
{
if (!a(paramXmlPullParser, paramString)) {
return paramInt2;
}
return paramTypedArray.getColor(paramInt1, paramInt2);
}
}
|
[
"antal.micky@yahoo.com"
] |
antal.micky@yahoo.com
|
cfa394aab2a73b2b9da6efc6caad00adddf8a09f
|
fbf95d693ad5beddfb6ded0be170a9e810a10677
|
/core-services/egov-user/src/main/java/org/egov/user/web/adapters/errors/UserInvalidUpdatePasswordRequest.java
|
f8e13093597449bbd7a1a1bcc9e08892d06c251a
|
[
"MIT",
"LicenseRef-scancode-generic-cla"
] |
permissive
|
egovernments/DIGIT-OSS
|
330cc364af1b9b66db8914104f64a0aba666426f
|
bf02a2c7eb783bf9fdf4b173faa37f402e05e96e
|
refs/heads/master
| 2023-08-15T21:26:39.992558
| 2023-08-08T10:14:31
| 2023-08-08T10:14:31
| 353,807,330
| 25
| 91
|
MIT
| 2023-09-10T13:23:31
| 2021-04-01T19:35:55
|
Java
|
UTF-8
|
Java
| false
| false
| 1,204
|
java
|
package org.egov.user.web.adapters.errors;
import java.util.Collections;
import java.util.List;
import org.egov.common.contract.response.Error;
import org.egov.common.contract.response.ErrorField;
import org.egov.common.contract.response.ErrorResponse;
import org.springframework.http.HttpStatus;
public class UserInvalidUpdatePasswordRequest implements ErrorAdapter<Void> {
private static final String INVALIDTOKEN_NAME_CODE = "InvalidPasswordRequest";
private static final String INVALIDTOKEN_FIELD = "InvalidPasswordRequest";
public ErrorResponse adapt(Void model) {
final Error error = getError();
return new ErrorResponse(null, error);
}
private Error getError() {
String error = "Since We configured login otp enabled is true,So we can't update the password.";
return Error.builder().code(HttpStatus.BAD_REQUEST.value()).message(error).fields(getUserNameFieldError(error))
.build();
}
private List<ErrorField> getUserNameFieldError(String error) {
return Collections.singletonList(
ErrorField.builder().field(INVALIDTOKEN_FIELD).code(INVALIDTOKEN_NAME_CODE).message(error).build());
}
}
|
[
"36623418+nithindv@users.noreply.github.com"
] |
36623418+nithindv@users.noreply.github.com
|
699de5364a2564e24536c9ca9f8a9138bfb09855
|
ad5fcc36c5872e5580e6a67c777eec8fabece9c3
|
/app/src/main/java/com/wf/andos/tab/fragment/SubFragment1.java
|
ac84f7a0076adc365d8da8db4f80af79408bcfad
|
[] |
no_license
|
wangpf2011/platform
|
2cda0549b7ead6cf0ac7c36bcb0ca7e6cad11ac2
|
ee8edacc4f0e28869632479baa98ee7ad0fac0c7
|
refs/heads/master
| 2021-01-21T05:10:13.188377
| 2019-05-22T01:42:11
| 2019-05-22T01:42:11
| 83,135,305
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 770
|
java
|
package com.wf.andos.tab.fragment;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;
public class SubFragment1 extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
Toast.makeText(getActivity(), "SubFragment1==onCreateView", Toast.LENGTH_LONG).show();
TextView tv = new TextView(getActivity());
tv.setTextSize(25);
tv.setBackgroundColor(Color.parseColor("#FFA07A"));
tv.setText("SubFragment1");
tv.setGravity(Gravity.CENTER);
return tv;
}
}
|
[
"wangpf2011@163.com"
] |
wangpf2011@163.com
|
836598ac8a408caef560ff46d16a0091fcfb4c5c
|
e62419162eb9377d4d8e05ccd53336aea81b645f
|
/cognitiveservices/azure-contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/contentmoderator/implementation/OCRInner.java
|
f65b96f5384c2de284692b1bd34f22b7d536bd41
|
[
"MIT"
] |
permissive
|
pgbhagat/azure-sdk-for-java
|
7c1511e7c37c39c7689b6c27a153031c7084b0dc
|
86f5e099ab5cd4f87139992e49d3e86d1fd48087
|
refs/heads/master
| 2023-08-24T14:08:58.354824
| 2018-02-28T15:29:57
| 2018-02-28T15:29:57
| 122,472,102
| 0
| 0
|
MIT
| 2018-02-22T11:53:44
| 2018-02-22T11:53:43
| null |
UTF-8
|
Java
| false
| false
| 4,352
|
java
|
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
package com.microsoft.azure.cognitiveservices.contentmoderator.implementation;
import com.microsoft.azure.cognitiveservices.contentmoderator.Status;
import java.util.List;
import com.microsoft.azure.cognitiveservices.contentmoderator.KeyValuePair;
import com.microsoft.azure.cognitiveservices.contentmoderator.Candidate;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Contains the text found in image for the language specified.
*/
public class OCRInner {
/**
* The evaluate status.
*/
@JsonProperty(value = "Status")
private Status status;
/**
* Array of KeyValue.
*/
@JsonProperty(value = "Metadata")
private List<KeyValuePair> metadata;
/**
* The tracking id.
*/
@JsonProperty(value = "TrackingId")
private String trackingId;
/**
* The cache id.
*/
@JsonProperty(value = "CacheId")
private String cacheId;
/**
* The ISO 639-3 code.
*/
@JsonProperty(value = "Language")
private String language;
/**
* The found text.
*/
@JsonProperty(value = "Text")
private String text;
/**
* The list of candidate text.
*/
@JsonProperty(value = "Candidates")
private List<Candidate> candidates;
/**
* Get the status value.
*
* @return the status value
*/
public Status status() {
return this.status;
}
/**
* Set the status value.
*
* @param status the status value to set
* @return the OCRInner object itself.
*/
public OCRInner withStatus(Status status) {
this.status = status;
return this;
}
/**
* Get the metadata value.
*
* @return the metadata value
*/
public List<KeyValuePair> metadata() {
return this.metadata;
}
/**
* Set the metadata value.
*
* @param metadata the metadata value to set
* @return the OCRInner object itself.
*/
public OCRInner withMetadata(List<KeyValuePair> metadata) {
this.metadata = metadata;
return this;
}
/**
* Get the trackingId value.
*
* @return the trackingId value
*/
public String trackingId() {
return this.trackingId;
}
/**
* Set the trackingId value.
*
* @param trackingId the trackingId value to set
* @return the OCRInner object itself.
*/
public OCRInner withTrackingId(String trackingId) {
this.trackingId = trackingId;
return this;
}
/**
* Get the cacheId value.
*
* @return the cacheId value
*/
public String cacheId() {
return this.cacheId;
}
/**
* Set the cacheId value.
*
* @param cacheId the cacheId value to set
* @return the OCRInner object itself.
*/
public OCRInner withCacheId(String cacheId) {
this.cacheId = cacheId;
return this;
}
/**
* Get the language value.
*
* @return the language value
*/
public String language() {
return this.language;
}
/**
* Set the language value.
*
* @param language the language value to set
* @return the OCRInner object itself.
*/
public OCRInner withLanguage(String language) {
this.language = language;
return this;
}
/**
* Get the text value.
*
* @return the text value
*/
public String text() {
return this.text;
}
/**
* Set the text value.
*
* @param text the text value to set
* @return the OCRInner object itself.
*/
public OCRInner withText(String text) {
this.text = text;
return this;
}
/**
* Get the candidates value.
*
* @return the candidates value
*/
public List<Candidate> candidates() {
return this.candidates;
}
/**
* Set the candidates value.
*
* @param candidates the candidates value to set
* @return the OCRInner object itself.
*/
public OCRInner withCandidates(List<Candidate> candidates) {
this.candidates = candidates;
return this;
}
}
|
[
"jianghaolu@users.noreply.github.com"
] |
jianghaolu@users.noreply.github.com
|
ee969feedc769a3776583efc26e336c84116c04e
|
ec6087bfcfba20306748b2ff5cd559cb32b35ff6
|
/leetcode/191.number-of-1-bits.281228005.ac.java
|
cb4d4ef3ac552afc559248c89332aa8611554d51
|
[
"BSD-3-Clause"
] |
permissive
|
lang010/acit
|
20bc1ea2956f83853551e398d86e3a14672e0aeb
|
5c43d6400e55992e9cf059d2bdf05536b776f71b
|
refs/heads/master
| 2021-01-20T09:45:24.832154
| 2020-12-16T04:05:10
| 2020-12-16T04:05:10
| 25,975,369
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,974
|
java
|
/*
* @lc app=leetcode id=191 lang=java
*
* [191] Number of 1 Bits
*
* https://leetcode.com/problems/number-of-1-bits/description/
*
* algorithms
* Easy (51.53%)
* Total Accepted: 409.5K
* Total Submissions: 794.7K
* Testcase Example: '00000000000000000000000000001011'
*
* Write a function that takes an unsigned integer and returns the number of
* '1' bits it has (also known as the Hamming weight).
*
* Note:
*
*
* Note that in some languages such as Java, there is no unsigned integer type.
* In this case, the input will be given as a signed integer type. It should
* not affect your implementation, as the integer's internal binary
* representation is the same, whether it is signed or unsigned.
* In Java, the compiler represents the signed integers using 2's complement
* notation. Therefore, in Example 3 above, the input represents the signed
* integer. -3.
*
*
* Follow up: If this function is called many times, how would you optimize
* it?
*
*
* Example 1:
*
*
* Input: n = 00000000000000000000000000001011
* Output: 3
* Explanation: The input binary string 00000000000000000000000000001011 has a
* total of three '1' bits.
*
*
* Example 2:
*
*
* Input: n = 00000000000000000000000010000000
* Output: 1
* Explanation: The input binary string 00000000000000000000000010000000 has a
* total of one '1' bit.
*
*
* Example 3:
*
*
* Input: n = 11111111111111111111111111111101
* Output: 31
* Explanation: The input binary string 11111111111111111111111111111101 has a
* total of thirty one '1' bits.
*
*
*
* Constraints:
*
*
* The input must be a binary string of length 32
*
*
*/
public class Solution {
// you need to treat n as an unsigned value
public int hammingWeight(int n) {
int cnt = 0;
while (n != 0) {
if ((n & 1) > 0) {
cnt++;
}
n = n >>> 1;
}
return cnt;
}
}
|
[
"lianglee@amazon.com"
] |
lianglee@amazon.com
|
0e2ce49c3a4509b401dfe78625d29a46d74a9ff4
|
781e2692049e87a4256320c76e82a19be257a05d
|
/all_data/cs61bl/lab22/cs61bl-dj/IntList.java
|
d6d01354886cd32f3b886b4cbb89d04f2ccef596
|
[] |
no_license
|
itsolutionscorp/AutoStyle-Clustering
|
54bde86fe6dbad35b568b38cfcb14c5ffaab51b0
|
be0e2f635a7558f56c61bc0b36c6146b01d1e6e6
|
refs/heads/master
| 2020-12-11T07:27:19.291038
| 2016-03-16T03:18:00
| 2016-03-16T03:18:42
| 59,454,921
| 4
| 0
| null | 2016-05-23T05:40:56
| 2016-05-23T05:40:56
| null |
UTF-8
|
Java
| false
| false
| 7,109
|
java
|
public class IntList {
ListNode myHead;
ListNode myTail;
int mySize;
public IntList() {
myHead = null;
myTail = null;
mySize = 0;
}
/**
* Constructs an IntList with one node. Head and tail are the same.
*/
public IntList(ListNode head) {
myHead = myTail = head;
}
/**
* Returns true if this list is empty, false otherwise.
*/
public boolean isEmpty() {
return mySize == 0;
}
/**
* Adds a new node with the given value to the front of this list.
*/
public void addToFront(int k) {
if (myHead == null) {
myHead = myTail = new ListNode(k);
} else {
myHead = new ListNode(k, null, myHead);
myHead.myNext.myPrev = myHead;
}
mySize++;
}
/**
* Adds a new node with the given value to the end of this list.
*/
public void addToEnd(int k) {
if (myHead == null) {
myHead = myTail = new ListNode(k);
} else {
myTail.myNext = new ListNode(k, myTail, null);
myTail = myTail.myNext;
}
mySize++;
}
/**
* Attaches the input list to the end of this list.
*/
public void append(IntList list) {
if (list.isEmpty()) {
return;
}
if (isEmpty()) {
myHead = list.myHead;
myTail = list.myTail;
mySize = list.mySize;
return;
}
myTail.myNext = list.myHead;
list.myHead.myPrev = myTail;
myTail = list.myTail;
mySize += list.mySize;
}
/**
* Removes the node reference by p from this list.
*/
private void remove(ListNode p) {
if (myHead == myTail) {
myHead = myTail = null;
} else if (p == myHead) {
myHead = myHead.myNext;
myHead.myPrev = null;
} else if (p == myTail) {
myTail = myTail.myPrev;
myTail.myNext = null;
} else {
p.myNext.myPrev = p.myPrev;
p.myPrev.myNext = p.myNext;
}
}
@Override
public String toString() {
String s = "";
for (ListNode p = myHead; p != null; p = p.myNext) {
s = s + p.myItem + " ";
}
return s;
}
private class ListNode {
int myItem;
ListNode myPrev;
ListNode myNext;
public ListNode(int k) {
myItem = k;
myPrev = myNext = null;
}
public ListNode(int k, ListNode prev, ListNode next) {
myItem = k;
myPrev = prev;
myNext = next;
}
}
/**
* Returns the result of sorting the values in this list using the insertion
* sort algorithm. This list is no longer usable after this operation; you
* have to use the returned list.
*/
public IntList insertionSort() {
ListNode soFar = null;
for (ListNode p = myHead; p != null; p = p.myNext) {
soFar = insert(p, soFar);
}
return new IntList(soFar);
}
/**
* Inserts the node p into the list headed by head so that the node values
* are in increasing order.
*/
private ListNode insert(ListNode p, ListNode head) {
// TODO you fill this out!
ListNode soFar = head;
if (soFar == null) {
return new ListNode(p.myItem);
}
if (p.myItem > soFar.myItem) {
soFar.myNext = insert(new ListNode(p.myItem), soFar.myNext);
} if (p.myItem < soFar.myItem) {
soFar.myPrev = new ListNode(p.myItem);
soFar.myPrev.myNext = soFar;
soFar = soFar.myPrev;
}
return soFar;
}
/**
* Sorts this list using the selection sort algorithm.
*/
public void selectionSort() {
IntList sorted = new IntList();
while (myHead != null) {
int minSoFar = myHead.myItem;
ListNode minPtr = myHead;
// Find the node in the list pointed to by myHead
// whose value is largest.
for (ListNode p = myHead; p != null; p = p.myNext) {
if (p.myItem < minSoFar) {
minSoFar = p.myItem;
minPtr = p;
}
}
sorted.addToEnd(minSoFar);
remove(minPtr);
}
myHead = sorted.myHead;
}
/**
* Returns the result of sorting the values in this list using the Quicksort
* algorithm. This list is no longer usable after this operation.
*/
public IntList quicksort() {
if (mySize <= 1) {
return this;
}
// Assume first element is the divider.
IntList smallElements = new IntList();
IntList largeElements = new IntList();
int divider = myHead.myItem;
// TODO your code here!
for (ListNode p = myHead.myNext; p!=null; p = p.myNext){
if (p.myItem < divider) {
smallElements.addToEnd(p.myItem);
}
if (p.myItem > divider) {
largeElements.addToEnd(p.myItem);
}
}
IntList sortedSmall = smallElements.quicksort();
sortedSmall.addToEnd(divider);
IntList sortedLarge = largeElements.quicksort();
sortedSmall.append(sortedLarge);
return sortedSmall;
}
/**
* Returns the result of sorting the values in this list using the merge
* sort algorithm. This list is no longer usable after this operation.
*/
public IntList mergeSort() {
if (mySize <= 1) {
return this;
}
IntList oneHalf = new IntList();
IntList otherHalf = new IntList();
// TODO your code here!
for (int i = 0; i < mySize/2; i ++) {
oneHalf.addToEnd(myHead.myItem);
myHead = myHead.myNext;
}
for (int j = mySize/2; j < mySize; j ++) {
otherHalf.addToEnd(myHead.myItem);
myHead = myHead.myNext;
}
IntList sortedLeft = oneHalf.mergeSort();
IntList sortedRight = otherHalf.mergeSort();
return merge(sortedLeft.myHead, sortedRight.myHead);
}
/**
* Returns the result of merging the two sorted lists / represented by list1
* and list2.
*/
private static IntList merge(ListNode list1, ListNode list2) {
IntList rtn = new IntList();
while (list1 != null && list2 != null) {
if (list1.myItem < list2.myItem) {
rtn.addToEnd(list1.myItem);
list1 = list1.myNext;
} else {
rtn.addToEnd(list2.myItem);
list2 = list2.myNext;
}
}
while (list1 != null) {
rtn.addToEnd(list1.myItem);
list1 = list1.myNext;
}
while (list2 != null) {
rtn.addToEnd(list2.myItem);
list2 = list2.myNext;
}
return rtn;
}
/**
* Returns a random integer between 0 and 99.
*/
private static int randomInt() {
return (int) (100 * Math.random());
}
public static void main(String[] args) {
IntList values;
IntList sortedValues;
values = new IntList();
/*
System.out.print("Before selection sort: ");
for (int k = 0; k < 10; k++) {
values.addToFront(randomInt());
}
System.out.println(values);
values.selectionSort();
System.out.print("After selection sort: ");
System.out.println(values);
values = new IntList();
System.out.print("Before insertion sort: ");
for (int k = 0; k < 10; k++) {
values.addToFront(randomInt());
}
System.out.println(values);
sortedValues = values.insertionSort();
System.out.print("After insertion sort: ");
System.out.println(sortedValues);
*/
values = new IntList();
System.out.print("Before quicksort: ");
for (int k = 0; k < 10; k++) {
values.addToFront(randomInt());
}
System.out.println(values);
sortedValues = values.quicksort();
System.out.print("After quicksort: ");
System.out.println(sortedValues);
/*
values = new IntList();
System.out.print("Before merge sort: ");
for (int k = 0; k < 10; k++) {
values.addToFront(randomInt());
}
System.out.println(values);
sortedValues = values.mergeSort();
System.out.print("After merge sort: ");
System.out.println(sortedValues);
*/
}
}
|
[
"moghadam.joseph@gmail.com"
] |
moghadam.joseph@gmail.com
|
bcfc8e9de69cbfc33fe8989cece40201c8921ab3
|
eb5af3e0f13a059749b179c988c4c2f5815feb0f
|
/cloud/auth/src/main/java/com/woniu/auth/mbg/Generator.java
|
5d63ed2c8f1407f8033c8bc7b4b3c7a85f06f792
|
[] |
no_license
|
xiakai007/wokniuxcode
|
ae686753da5ec3dd607b0246ec45fb11cf6b8968
|
d9918fb349bc982f0ee9d3ea3bf7537e11d062a2
|
refs/heads/master
| 2023-04-13T02:54:15.675440
| 2021-05-02T05:09:47
| 2021-05-02T05:09:47
| 363,570,147
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,052
|
java
|
package com.woniu.auth.mbg;
import org.mybatis.generator.api.MyBatisGenerator;
import org.mybatis.generator.config.Configuration;
import org.mybatis.generator.config.xml.ConfigurationParser;
import org.mybatis.generator.internal.DefaultShellCallback;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
public class Generator {
public static void main(String[] args) throws Exception {
List<String> warnings=new ArrayList<String>();
boolean overwrite=true;
InputStream is = Generator.class.getResourceAsStream("/generatorConfig.xml");
ConfigurationParser cp = new ConfigurationParser(warnings);
Configuration config = cp.parseConfiguration(is);
is.close();
DefaultShellCallback callback = new DefaultShellCallback(overwrite);
MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
myBatisGenerator.generate(null);
for (String warning : warnings) {
System.out.println(warning);
}
}
}
|
[
"980385778@qq.com"
] |
980385778@qq.com
|
d20cb0975fb7d5214515577fcf6d87cdc90cbdfd
|
f42d7da85f9633cfb84371ae67f6d3469f80fdcb
|
/com4j-20120426-2/samples/excel/build/src/excel/IGridlines.java
|
b8fd61cc91e0877016dfba6cc6c5acc3094cfbce
|
[
"BSD-2-Clause"
] |
permissive
|
LoongYou/Wanda
|
ca89ac03cc179cf761f1286172d36ead41f036b5
|
2c2c4d1d14e95e98c0a3af365495ec53775cc36b
|
refs/heads/master
| 2023-03-14T13:14:38.476457
| 2021-03-06T10:20:37
| 2021-03-06T10:20:37
| 231,610,760
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,697
|
java
|
package excel ;
import com4j.*;
@IID("{000208C3-0001-0000-C000-000000000046}")
public interface IGridlines extends Com4jObject {
// Methods:
/**
* <p>
* Getter method for the COM property "Application"
* </p>
* @return Returns a value of type excel._Application
*/
@VTID(7)
excel._Application getApplication();
/**
* <p>
* Getter method for the COM property "Creator"
* </p>
* @return Returns a value of type excel.XlCreator
*/
@VTID(8)
excel.XlCreator getCreator();
/**
* <p>
* Getter method for the COM property "Parent"
* </p>
* @return Returns a value of type com4j.Com4jObject
*/
@VTID(9)
@ReturnValue(type=NativeType.Dispatch)
com4j.Com4jObject getParent();
/**
* <p>
* Getter method for the COM property "Name"
* </p>
* @return Returns a value of type java.lang.String
*/
@VTID(10)
java.lang.String getName();
/**
* @return Returns a value of type java.lang.Object
*/
@VTID(11)
@ReturnValue(type=NativeType.VARIANT)
java.lang.Object select();
/**
* <p>
* Getter method for the COM property "Border"
* </p>
* @return Returns a value of type excel.Border
*/
@VTID(12)
excel.Border getBorder();
/**
* @return Returns a value of type java.lang.Object
*/
@VTID(13)
@ReturnValue(type=NativeType.VARIANT)
java.lang.Object delete();
/**
* <p>
* Getter method for the COM property "Format"
* </p>
* @return Returns a value of type excel.ChartFormat
*/
@VTID(14)
excel.ChartFormat getFormat();
// Properties:
}
|
[
"815234949@qq.com"
] |
815234949@qq.com
|
8e963841e87bb06d5f5e49db5c326a1eb27f552d
|
7e9593dd15d6550502e8119d6c7ea5176b61d2a7
|
/Day58_ZeroSpringMVC/src/main/java/com/yy/controller/ConverterController.java
|
772beba65fdc50aae97027fec95837dd12166fd1
|
[] |
no_license
|
FineDreams/JavaStudy
|
67ec98fc3a6c086ffb717b19af1dfcc52585e245
|
b513b9a3df332673f445e2fd2b900b6b123e7460
|
refs/heads/master
| 2021-09-10T21:55:45.059112
| 2018-04-03T01:22:33
| 2018-04-03T01:22:33
| 113,833,680
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 509
|
java
|
package com.yy.controller;
import com.yy.domain.DemoObj;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class ConverterController {
@RequestMapping(value = "/convert",produces = {"application/x-yy"})
public @ResponseBody DemoObj convert(@RequestBody DemoObj obj){
return obj;
}
}
|
[
"1411374327@qq.com"
] |
1411374327@qq.com
|
05d68f6762455cd83a3a08cb3b5dab04882a156f
|
1465bbefeaf484c893d72b95b2996a504ce30577
|
/zcommon/src/org/zkoss/lang/SystemException.java
|
c49e92a32d2ed246bca9bfd684a55ab577542c5a
|
[] |
no_license
|
dije/zk
|
a2c74889d051f988e23cb056096d07f8b41133e9
|
17b8d24a970d63f65f1f3a9ffe4be999b5000304
|
refs/heads/master
| 2021-01-15T19:40:42.842829
| 2011-10-21T03:23:53
| 2011-10-21T03:23:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,018
|
java
|
/* SystemException.java
Purpose: Thrown if a caught exception is not in the exception list.
Description:
History:
2001/5/15, Tom M. Yeh: Created.
Copyright (C) 2001 Potix Corporation. All Rights Reserved.
{{IS_RIGHT
This program is distributed under LGPL Version 3.0 in the hope that
it will be useful, but WITHOUT ANY WARRANTY.
}}IS_RIGHT
*/
package org.zkoss.lang;
import org.zkoss.mesg.Messageable;
/**
* Indicates a system exception.
*
* @author tomyeh
*/
public class SystemException extends RuntimeException implements Messageable {
/** Utilities.
*
* <p>The reason to use a class to hold static utilities is we can
* override the method's return type later.
*/
public static class Aide {
/** Converts an exception to SystemException or OperationException
* depending on whether t implements Expetable.
* @see Exceptions#wrap
*/
public static SystemException wrap(Throwable t) {
t = Exceptions.unwrap(t);
if (t instanceof Warning)
return (WarningException)
Exceptions.wrap(t, WarningException.class);
if (t instanceof Expectable)
return (OperationException)
Exceptions.wrap(t, OperationException.class);
return (SystemException)
Exceptions.wrap(t, SystemException.class);
}
/** Converts an exception to SystemException or OperationException
* depending on whether t implements Expetable.
* @see Exceptions#wrap
*/
public static SystemException wrap(Throwable t, String msg) {
t = Exceptions.unwrap(t);
if (t instanceof Warning)
return (WarningException)
Exceptions.wrap(t, WarningException.class, msg);
if (t instanceof Expectable)
return (OperationException)
Exceptions.wrap(t, OperationException.class, msg);
return (SystemException)
Exceptions.wrap(t, SystemException.class, msg);
}
/** Converts an exception to SystemException or OperationException
* depending on whether t implements Expetable.
* @see Exceptions#wrap
*/
public static SystemException wrap(Throwable t, int code, Object[] fmtArgs) {
t = Exceptions.unwrap(t);
if (t instanceof Warning)
return (WarningException)
Exceptions.wrap(t, WarningException.class, code, fmtArgs);
if (t instanceof Expectable)
return (OperationException)
Exceptions.wrap(t, OperationException.class, code, fmtArgs);
return (SystemException)
Exceptions.wrap(t, SystemException.class, code, fmtArgs);
}
/** Converts an exception to SystemException or OperationException
* depending on whether t implements Expetable.
* @see Exceptions#wrap
*/
public static SystemException wrap(Throwable t, int code, Object fmtArg) {
t = Exceptions.unwrap(t);
if (t instanceof Warning)
return (WarningException)
Exceptions.wrap(t, WarningException.class, code, fmtArg);
if (t instanceof Expectable)
return (OperationException)
Exceptions.wrap(t, OperationException.class, code, fmtArg);
return (SystemException)
Exceptions.wrap(t, SystemException.class, code, fmtArg);
}
/** Converts an exception to SystemException or OperationException
* depending on whether t implements Expetable.
* @see Exceptions#wrap
*/
public static SystemException wrap(Throwable t, int code) {
t = Exceptions.unwrap(t);
if (t instanceof Warning)
return (WarningException)
Exceptions.wrap(t, WarningException.class, code);
if (t instanceof Expectable)
return (OperationException)
Exceptions.wrap(t, OperationException.class, code);
return (SystemException)
Exceptions.wrap(t, SystemException.class, code);
}
}
protected int _code = NULL_CODE;
/**
* Constructs a SystemException by specifying message directly.
*/
public SystemException(String msg, Throwable cause) {
super(msg, cause);
}
public SystemException(String msg) {
super(msg);
}
public SystemException(Throwable cause) {
super(cause);
}
public SystemException() {
}
/**
* Constructs an SystemException by use of an error code.
* The error code must be defined in
* one of properties files, e.g., msgsys.properties.
*
* @param code the error code
* @param fmtArgs the format arguments
* @param cause the chained throwable object
*/
public SystemException(int code, Object[] fmtArgs, Throwable cause) {
super(Exceptions.getMessage(code, fmtArgs), cause);
_code = code;
}
public SystemException(int code, Object fmtArg, Throwable cause) {
super(Exceptions.getMessage(code, fmtArg), cause);
_code = code;
}
public SystemException(int code, Object[] fmtArgs) {
super(Exceptions.getMessage(code, fmtArgs));
_code = code;
}
public SystemException(int code, Object fmtArg) {
super(Exceptions.getMessage(code, fmtArg));
_code = code;
}
public SystemException(int code, Throwable cause) {
super(Exceptions.getMessage(code), cause);
_code = code;
}
public SystemException(int code) {
super(Exceptions.getMessage(code));
_code = code;
}
//-- Messageable --//
public final int getCode() {
return _code;
}
}
|
[
"tomyeh@zkoss.org"
] |
tomyeh@zkoss.org
|
1a84c95508a6b3f1772bce3f37f7016c3c2e3272
|
39b7e86a2b5a61a1f7befb47653f63f72e9e4092
|
/src/main/java/com/alipay/api/domain/FundBillListEco.java
|
15325e03206fa3aad0b8ad344b9a7b3009ffb553
|
[
"Apache-2.0"
] |
permissive
|
slin1972/alipay-sdk-java-all
|
dbec0604c2d0b76d8a1ebf3fd8b64d4dd5d21708
|
63095792e900bbcc0e974fc242d69231ec73689a
|
refs/heads/master
| 2020-08-12T14:18:07.203276
| 2019-10-13T09:00:11
| 2019-10-13T09:00:11
| 214,782,009
| 0
| 0
|
Apache-2.0
| 2019-10-13T07:56:34
| 2019-10-13T07:56:34
| null |
UTF-8
|
Java
| false
| false
| 976
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 交易支付的渠道属性
*
* @author auto create
* @since 1.0, 2017-09-08 11:37:41
*/
public class FundBillListEco extends AlipayObject {
private static final long serialVersionUID = 5218252184642853281L;
/**
* 该支付工具类型所使用的金额
*/
@ApiField("amount")
private String amount;
/**
* 交易使用的资金渠道,详见 <a href="https://doc.open.alipay.com/doc2/detail?treeId=26&articleId=103259&docType=1">支付渠道列表</a>
*/
@ApiField("fund_channel")
private String fundChannel;
public String getAmount() {
return this.amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getFundChannel() {
return this.fundChannel;
}
public void setFundChannel(String fundChannel) {
this.fundChannel = fundChannel;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
d8415e34f85550de384a38fae58ed8d4b617d91a
|
c3445da9eff3501684f1e22dd8709d01ff414a15
|
/LIS/sinosoft-parents/lis-business/src/main/java/com/sinosoft/lis/tbgrp/GroupContUI.java
|
6c2ca3c2f05e5ca7ccc5de0991bca2403ac4b46c
|
[] |
no_license
|
zhanght86/HSBC20171018
|
954403d25d24854dd426fa9224dfb578567ac212
|
c1095c58c0bdfa9d79668db9be4a250dd3f418c5
|
refs/heads/master
| 2021-05-07T03:30:31.905582
| 2017-11-08T08:54:46
| 2017-11-08T08:54:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,751
|
java
|
package com.sinosoft.lis.tbgrp;
import org.apache.log4j.Logger;
import com.sinosoft.lis.db.LCGrpAddressDB;
import com.sinosoft.lis.db.LCGrpAppntDB;
import com.sinosoft.lis.db.LCGrpContDB;
import com.sinosoft.lis.db.LDGrpDB;
import com.sinosoft.lis.pubfun.GlobalInput;
import com.sinosoft.lis.schema.LCGrpAddressSchema;
import com.sinosoft.lis.schema.LCGrpAppntSchema;
import com.sinosoft.lis.schema.LCGrpContSchema;
import com.sinosoft.lis.schema.LDGrpSchema;
import com.sinosoft.utility.CErrors;
import com.sinosoft.utility.TransferData;
import com.sinosoft.utility.VData;
import com.sinosoft.service.BusinessService;
/**
* <p>
* Title:团单保存(IUD)UI层
* </p>
* <p>
* Description:
* </p>
* <p>
* Copyright: Copyright (c) 2004
* </p>
* <p>
* Company:
* </p>
*
* @author wzw
* @version 1.0
*/
public class GroupContUI implements BusinessService{
private static Logger logger = Logger.getLogger(GroupContUI.class);
/** 传入数据的容器 */
private VData mInputData = new VData();
/** 往前面传输数据的容器 */
private VData mResult = new VData();
/** 数据操作字符串 */
private String mOperate;
/** 错误处理类 */
public CErrors mErrors = new CErrors();
public GroupContUI() {
}
/**
* 不执行任何操作,只传递数据给下一层
*
* @param cInputData
* VData
* @param cOperate
* String
* @return boolean
*/
public boolean submitData(VData cInputData, String cOperate) {
// 数据操作字符串拷贝到本类中
this.mOperate = cOperate;
GroupContBL tGroupContBL = new GroupContBL();
if (tGroupContBL.submitData(cInputData, mOperate) == false) {
// @@错误处理
this.mErrors.copyAllErrors(tGroupContBL.mErrors);
return false;
} else {
mResult = tGroupContBL.getResult();
}
return true;
}
/**
* 获取从BL层取得的结果
*
* @return VData
*/
public VData getResult() {
return mResult;
}
public static void main(String agrs[]) {
LCGrpContSchema tLCGrpContSchema = new LCGrpContSchema(); // 集体保单
LCGrpAppntSchema tLCGrpAppntSchema = new LCGrpAppntSchema(); // 团单投保人
LDGrpSchema tLDGrpSchema = new LDGrpSchema(); // 团体客户
LCGrpAddressSchema tLCGrpAddressSchema = new LCGrpAddressSchema(); // 团体客户地址
LCGrpContDB tLCGrpContDB = new LCGrpContDB(); // 集体保单
LCGrpAppntDB tLCGrpAppntDB = new LCGrpAppntDB(); // 团单投保人
LDGrpDB tLDGrpDB = new LDGrpDB(); // 团体客户
LCGrpAddressDB tLCGrpAddressDB = new LCGrpAddressDB(); // 团体客户地址
GlobalInput mGlobalInput = new GlobalInput();
TransferData tTransferData = new TransferData();
mGlobalInput.ManageCom = "86";
mGlobalInput.Operator = "001";
tLCGrpContDB.setGrpContNo("120110000000064");
tLCGrpContDB.getInfo();
tLCGrpAppntDB.setGrpContNo("120110000000064");
tLCGrpAppntDB.setCustomerNo("0000001660");
tLCGrpAppntDB.getInfo();
tLDGrpDB.setCustomerNo("0000001660");
tLDGrpDB.getInfo();
tLCGrpAddressDB.setAddressNo("86110000000169");
tLCGrpAddressDB.setCustomerNo("0000001660");
tLCGrpAddressDB.getInfo();
tLCGrpAppntDB
.setAddressNo("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
VData tVData = new VData();
tVData.add(tLCGrpContDB.getSchema());
tVData.add(tLCGrpAppntDB.getSchema());
tVData.add(tLDGrpDB.getSchema());
tVData.add(tLCGrpAddressDB.getSchema());
tVData.add(mGlobalInput);
GroupContBL tgrlbl = new GroupContBL();
tgrlbl.submitData(tVData, "UPDATE||GROUPPOL");
if (tgrlbl.mErrors.needDealError()) {
logger.debug(tgrlbl.mErrors.getFirstError());
}
}
public CErrors getErrors() {
// TODO Auto-generated method stub
return mErrors;
}
}
|
[
"dingzansh@sinosoft.com.cn"
] |
dingzansh@sinosoft.com.cn
|
8ac44e7886d9260950a80930bcf2e8cc62b69652
|
c2d8181a8e634979da48dc934b773788f09ffafb
|
/storyteller/output/mazdasalestool/SetExhibitionReportUsedOrderdetailabnewotherAction.java
|
49d102d4d1b6a3b39d280f0bd197340760e6f404
|
[] |
no_license
|
toukubo/storyteller
|
ccb8281cdc17b87758e2607252d2d3c877ffe40c
|
6128b8d275efbf18fd26d617c8503a6e922c602d
|
refs/heads/master
| 2021-05-03T16:30:14.533638
| 2016-04-20T12:52:46
| 2016-04-20T12:52:46
| 9,352,300
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,793
|
java
|
package net.mazdasalestool.web;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.mazdasalestool.model.*;
import net.mazdasalestool.model.crud.*;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.hibernate.Criteria;
import org.hibernate.Transaction;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.web.context.support.WebApplicationContextUtils;
import net.enclosing.util.HibernateSession;
import net.enclosing.util.HTTPGetRedirection;
public class SetExhibitionReportUsedOrderdetailabnewotherAction extends Action{
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest req,
HttpServletResponse res) throws Exception{
Session session = new HibernateSession().currentSession(this
.getServlet().getServletContext());
Transaction transaction = session.beginTransaction();
Criteria criteria = session.createCriteria(ExhibitionReportUsed.class);
criteria.add(Restrictions.idEq(Integer.valueOf(req.getParameter("id"))));
ExhibitionReportUsed exhibitionReportUsed = (ExhibitionReportUsed) criteria.uniqueResult();
exhibitionReportUsed.setOrderdetailabnewother(true);
session.saveOrUpdate(exhibitionReportUsed);
transaction.commit();
session.flush();
new HTTPGetRedirection(req, res, "ExhibitionReportUseds.do", exhibitionReportUsed.getId().toString());
return null;
}
}
|
[
"toukubo@gmail.com"
] |
toukubo@gmail.com
|
0ce9c9b9b795bf0704f0842c70c6c4e91f4b1063
|
c0ebaf41405f597cbc78682d86fe480f4ef9ead0
|
/Account/src/main/java/br/com/hubfintech/account/config/ServletSpringMVC.java
|
a9fb9ae8c310dcbd717b1403123cbaaa4890376b
|
[] |
no_license
|
daniloJava/api-Conta
|
e76188899066dc8b7d92b47ccdf7b8f7f69af564
|
a1e4fa77e8e6eca7d38d7e4a7acda024d22f3c16
|
refs/heads/master
| 2020-12-30T12:44:01.970920
| 2017-05-15T15:09:08
| 2017-05-15T15:09:08
| 91,351,045
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,088
|
java
|
package br.com.hubfintech.account.config;
import javax.servlet.Filter;
import javax.servlet.MultipartConfigElement;
import javax.servlet.ServletRegistration.Dynamic;
import org.springframework.web.filter.CharacterEncodingFilter;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
public class ServletSpringMVC extends AbstractAnnotationConfigDispatcherServletInitializer{
@Override
protected Class<?>[] getRootConfigClasses() {
return null;
}
@Override
protected Class<?>[] getServletConfigClasses() {
return new Class[]{AppWebConfiguration.class, JPAConfiguration.class};
}
@Override
protected String[] getServletMappings() {
return new String[] {"/"};
}
@Override
protected Filter[] getServletFilters() {
CharacterEncodingFilter encodingFilter = new CharacterEncodingFilter();
encodingFilter.setEncoding("UTF-8");
return new Filter[] {encodingFilter};
}
@Override
protected void customizeRegistration(Dynamic registration) {
registration.setMultipartConfig(new MultipartConfigElement(""));
}
}
|
[
"you@example.com"
] |
you@example.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.