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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1f19de836f6588354b89be1dfb430dbc9c7942cf
|
0b0dbdc0d12c8eb60fdfbd48c4afc37147d0082e
|
/itests/standalone/basic/src/test/java/org/wildfly/camel/test/mail/MailIntegrationCDITest.java
|
f7b3fba086d038d30b76b4dda27e82a0f9ae6a4a
|
[
"Apache-2.0"
] |
permissive
|
ppalaga/wildfly-camel
|
f99a35e36f9c80b8251d44ee1330c912a2916cb6
|
7376bb102149939da99063215c3f186424681fbc
|
refs/heads/master
| 2021-07-09T01:44:01.018465
| 2019-06-21T08:46:17
| 2019-06-21T08:47:04
| 101,184,017
| 0
| 1
|
Apache-2.0
| 2018-05-25T13:17:42
| 2017-08-23T13:36:21
|
Java
|
UTF-8
|
Java
| false
| false
| 5,606
|
java
|
/*
* #%L
* Wildfly Camel :: Testsuite
* %%
* Copyright (C) 2013 - 2014 RedHat
* %%
* 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.
* #L%
*/
package org.wildfly.camel.test.mail;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.component.mock.MockEndpoint;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.as.arquillian.api.ServerSetup;
import org.jboss.as.arquillian.api.ServerSetupTask;
import org.jboss.as.arquillian.container.ManagementClient;
import org.jboss.dmr.ModelNode;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.shrinkwrap.resolver.api.maven.Maven;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.wildfly.camel.test.common.utils.DMRUtils;
import org.wildfly.camel.test.mail.subA.MailSessionProducer;
import org.wildfly.extension.camel.CamelAware;
import org.wildfly.extension.camel.CamelContextRegistry;
@CamelAware
@ServerSetup({MailIntegrationCDITest.MailSessionSetupTask.class})
@RunWith(Arquillian.class)
public class MailIntegrationCDITest {
private static final String GREENMAIL_WAR = "greenmail.war";
@ArquillianResource
CamelContextRegistry contextRegistry;
static class MailSessionSetupTask implements ServerSetupTask {
@Override
public void setup(ManagementClient managementClient, String s) throws Exception {
ModelNode batchNode = DMRUtils.batchNode()
.addStep("socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-greenmail-smtp", "add(host=localhost, port=10025)")
.addStep("socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-greenmail-pop3", "add(host=localhost, port=10110)")
.addStep("subsystem=mail/mail-session=greenmail", "add(jndi-name=java:jboss/mail/greenmail)")
.addStep("subsystem=mail/mail-session=greenmail/server=smtp", "add(outbound-socket-binding-ref=mail-greenmail-smtp, username=user1, password=password)")
.addStep("subsystem=mail/mail-session=greenmail/server=pop3", "add(outbound-socket-binding-ref=mail-greenmail-pop3, username=user2, password=password2)")
.build();
managementClient.getControllerClient().execute(batchNode);
}
@Override
public void tearDown(ManagementClient managementClient, String s) throws Exception {
ModelNode batchNode = DMRUtils.batchNode()
.addStep("socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-greenmail-smtp", "remove")
.addStep("socket-binding-group=standard-sockets/remote-destination-outbound-socket-binding=mail-greenmail-pop3", "remove")
.addStep("subsystem=mail/mail-session=greenmail", "remove")
.addStep("subsystem=mail/mail-session=greenmail/server=smtp", "remove")
.addStep("subsystem=mail/mail-session=greenmail/server=pop3", "remove")
.build();
managementClient.getControllerClient().execute(batchNode);
}
}
@Deployment(order = 1, testable = false, name = GREENMAIL_WAR)
public static WebArchive createGreenmailDeployment() {
File mailDependencies = Maven.configureResolverViaPlugin().
resolve("com.icegreen:greenmail-webapp:war:1.4.0").
withoutTransitivity().
asSingleFile();
return ShrinkWrap.createFromZipFile(WebArchive.class, mailDependencies);
}
@Deployment(order = 2)
public static JavaArchive createDeployment() throws IOException {
final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "camel-mail-cdi-tests.jar");
archive.addPackage(MailSessionProducer.class.getPackage());
archive.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
return archive;
}
@Test
public void testMailEndpointWithCDIContext() throws Exception {
CamelContext camelctx = contextRegistry.getCamelContext("camel-mail-cdi-context");
Assert.assertNotNull("Camel context not null", camelctx);
MockEndpoint mockEndpoint = camelctx.getEndpoint("mock:result", MockEndpoint.class);
mockEndpoint.setExpectedMessageCount(1);
Map<String, Object> mailHeaders = new HashMap<>();
mailHeaders.put("from", "user1@localhost");
mailHeaders.put("to", "user2@localhost");
mailHeaders.put("message", "Hello Kermit");
ProducerTemplate template = camelctx.createProducerTemplate();
template.requestBodyAndHeaders("direct:start", null, mailHeaders);
mockEndpoint.assertIsSatisfied(5000);
}
}
|
[
"jamesnetherton@gmail.com"
] |
jamesnetherton@gmail.com
|
32d6e6d96cffb9022200b963100d3bf9697caf9a
|
20cf48c45546b3a4ffd201079b0189c137cb8e0f
|
/war/src/main/java-user/com/omdasoft/orderonline/gwt/order/client/userView/presenter/UserViewPresenterImpl.java
|
3dac9baee63a778c9e836a244e62cc95051d1bab
|
[] |
no_license
|
winglight/orderonline
|
6a1f4b5833cb77da344c3f405e8c5546bc8110db
|
2cd108e85ec702e7eb49a5a44174b9d926fd498a
|
refs/heads/master
| 2021-01-15T16:56:42.166403
| 2013-09-28T09:00:03
| 2013-09-28T09:00:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,442
|
java
|
package com.omdasoft.orderonline.gwt.order.client.userView.presenter;
import net.customware.gwt.dispatch.client.DispatchAsync;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.inject.Inject;
import com.omdasoft.orderonline.gwt.order.client.breadCrumbs.presenter.BreadCrumbsPresenter;
import com.omdasoft.orderonline.gwt.order.client.core.Platform;
import com.omdasoft.orderonline.gwt.order.client.mvp.BasePresenter;
import com.omdasoft.orderonline.gwt.order.client.mvp.ErrorHandler;
import com.omdasoft.orderonline.gwt.order.client.mvp.EventBus;
import com.omdasoft.orderonline.gwt.order.client.userAdd.dataprovider.UserWinAdapter;
import com.omdasoft.orderonline.gwt.order.client.userAdd.plugin.UserAddConstants;
import com.omdasoft.orderonline.gwt.order.client.userView.model.UserWinClient;
import com.omdasoft.orderonline.gwt.order.client.userView.request.UserViewRequest;
import com.omdasoft.orderonline.gwt.order.client.userView.request.UserViewResponse;
import com.omdasoft.orderonline.gwt.order.client.view.constant.CssStyleConstants;
import com.omdasoft.orderonline.gwt.order.client.widget.EltNewPager;
import com.omdasoft.orderonline.gwt.order.client.widget.ListCellTable;
import com.omdasoft.orderonline.gwt.order.client.win.Win;
import com.omdasoft.orderonline.gwt.order.model.user.UserRoleVo;
import com.omdasoft.orderonline.gwt.order.util.StringUtil;
public class UserViewPresenterImpl extends
BasePresenter<UserViewPresenter.UserViewDisplay> implements
UserViewPresenter {
private final DispatchAsync dispatch;
//private final SessionManager sessionManager;
private final Win win;
final ErrorHandler errorHandler;
private final BreadCrumbsPresenter breadCrumbs;
String staffId;
boolean colleague=false;
EltNewPager pager;
ListCellTable<UserWinClient> cellTable;
UserWinAdapter listViewAdapter;
@Inject
public UserViewPresenterImpl(EventBus eventBus, UserViewDisplay display,
DispatchAsync dispatch, Win win,
BreadCrumbsPresenter breadCrumbs, ErrorHandler errorHandler) {
super(eventBus, display);
this.dispatch = dispatch;
// this.sessionManager = sessionManager;
this.errorHandler = errorHandler;
this.win = win;
this.breadCrumbs = breadCrumbs;
}
@Override
public void bind() {
breadCrumbs.loadChildPage("用户详细信息");
display.setBreadCrumbs(breadCrumbs.getDisplay().asWidget());
init();
registerHandler(display.getupadateBtnClickHandlers().addClickHandler(
new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Platform.getInstance()
.getEditorRegistry()
.openEditor(
UserAddConstants.EDITOR_STAFFADD_SEARCH,
"EDITOR_STAFFADD_SEARCH_DO_ID", staffId);
}
}));
}
void init() {
if(colleague==true)
{
display.displayUpdateBtn(colleague);
}
dispatch.execute(new UserViewRequest(staffId),
new AsyncCallback<UserViewResponse>() {
@Override
public void onFailure(Throwable t) {
win.alert(t.getMessage());
}
@Override
public void onSuccess(UserViewResponse resp) {
display.setStaffNo(resp.getStaffNo());
display.setStaffName(resp.getStaffName());
display.setPhone(resp.getPhone());
if(resp.getUserRoleVos()!=null && resp.getUserRoleVos().size()>0)
{
String roleString="";
for (UserRoleVo role:resp.getUserRoleVos()) {
if(role==UserRoleVo.CORP_ADMIN)
roleString+="管理员;";
if(role==UserRoleVo.DEPT_MGR)
roleString+="分店管理员;";
}
if(!StringUtil.isEmpty(roleString))
display.getStaffRoles().setText(roleString);
else
display.getStaffRoles().getElement().getParentElement().getParentElement().addClassName(CssStyleConstants.hidden);
}
else
{
display.getStaffRoles().getElement().getParentElement().getParentElement().addClassName(CssStyleConstants.hidden);
}
}
});
}
@Override
public void initUserView(String staffId) {
this.staffId = staffId;
}
@Override
public void initUserView_Colleague(String staffId,boolean colleague) {
this.staffId = staffId;
this.colleague=colleague;
}
}
|
[
"wing_light@hotmail.com"
] |
wing_light@hotmail.com
|
bfd56f800e9e01f8b898cefe8dbefa863d078447
|
7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b
|
/Crawler/data/BillAction.java
|
fb6c3939f83e2e11b2dd60c398424fd3fd6e612a
|
[] |
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
| 6,470
|
java
|
12
https://raw.githubusercontent.com/Pingvin235/bgerp/master/src/ru/bgcrm/plugin/bgbilling/proto/struts/action/BillAction.java
package ru.bgcrm.plugin.bgbilling.proto.struts.action;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import ru.bgcrm.model.BGException;
import ru.bgcrm.model.SearchResult;
import ru.bgcrm.plugin.bgbilling.proto.dao.BillDAO;
import ru.bgcrm.plugin.bgbilling.proto.model.bill.Bill;
import ru.bgcrm.plugin.bgbilling.proto.model.bill.Invoice;
import ru.bgcrm.plugin.bgbilling.struts.action.BaseAction;
import ru.bgcrm.struts.form.DynActionForm;
import ru.bgcrm.util.Utils;
import ru.bgcrm.util.sql.ConnectionSet;
public class BillAction
extends BaseAction
{
public ActionForward attributeList( ActionMapping mapping,
DynActionForm form,
HttpServletRequest request,
HttpServletResponse response,
ConnectionSet conSet )
throws BGException
{
String billingId = form.getParam( "billingId" );
int contractId = form.getParamInt( "contractId" );
int moduleId = form.getParamInt( "moduleId" );
form.getResponse().setData( "list", new BillDAO( form.getUser(), billingId, moduleId ).getAttributeList( contractId ) );
return processUserTypedForward( conSet, mapping, form, response, "attributeList" );
}
public ActionForward docTypeList( ActionMapping mapping,
DynActionForm form,
HttpServletRequest request,
HttpServletResponse response,
ConnectionSet conSet )
throws BGException
{
String billingId = form.getParam( "billingId" );
int contractId = form.getParamInt( "contractId" );
int moduleId = form.getParamInt( "moduleId" );
BillDAO billDao = new BillDAO( form.getUser(), billingId, moduleId );
form.getResponse().setData( "billTypeList", billDao.getContractDocTypeList( contractId, "bill" ) );
form.getResponse().setData( "invoiceTypeList", billDao.getContractDocTypeList( contractId, "invoice" ) );
return processUserTypedForward( conSet, mapping, form, response, "docTypeList" );
}
public ActionForward docTypeAdd( ActionMapping mapping,
DynActionForm form,
HttpServletRequest request,
HttpServletResponse response,
ConnectionSet conSet )
throws BGException
{
String billingId = form.getParam( "billingId" );
int contractId = form.getParamInt( "contractId" );
int moduleId = form.getParamInt( "moduleId" );
new BillDAO( form.getUser(), billingId, moduleId ).contractDocTypeAdd( contractId, form.getParam( "typeIds" ) );
return processJsonForward( conSet, form, response );
}
public ActionForward docTypeDelete( ActionMapping mapping,
DynActionForm form,
HttpServletRequest request,
HttpServletResponse response,
ConnectionSet conSet )
throws BGException
{
String billingId = form.getParam( "billingId" );
int contractId = form.getParamInt( "contractId" );
int moduleId = form.getParamInt( "moduleId" );
new BillDAO( form.getUser(), billingId, moduleId ).contractDocTypeDelete( contractId, form.getParam( "typeIds" ) );
return processJsonForward( conSet, form, response );
}
public ActionForward documentList( ActionMapping mapping,
DynActionForm form,
HttpServletRequest request,
HttpServletResponse response,
ConnectionSet conSet )
throws BGException
{
String billingId = form.getParam( "billingId" );
int contractId = form.getParamInt( "contractId" );
int moduleId = form.getParamInt( "moduleId" );
String mode = form.getParam( "mode", "bill" );
form.setParam( "mode", mode );
BillDAO billDao = new BillDAO( form.getUser(), billingId, moduleId );
if( "bill".equals( mode ) )
{
billDao.searchBillList( contractId, new SearchResult<Bill>( form ) );
}
else
{
billDao.searchInvoiceList( contractId, new SearchResult<Invoice>( form ) );
}
return processUserTypedForward( conSet, mapping, form, response, "documentList" );
}
public ActionForward getDocument( ActionMapping mapping,
DynActionForm form,
HttpServletRequest request,
HttpServletResponse response,
ConnectionSet conSet )
throws BGException
{
String billingId = form.getParam( "billingId" );
int moduleId = form.getParamInt( "moduleId" );
String type = form.getParam( "type" );
String ids = form.getParam( "ids" );
try
{
OutputStream out = response.getOutputStream();
Utils.setFileNameHeades( response, type + ".pdf" );
out.write( new BillDAO( form.getUser(), billingId, moduleId ).getDocumentsPdf( ids, type ) );
}
catch( Exception ex )
{
throw new BGException( ex );
}
return null;
}
public ActionForward setPayed( ActionMapping mapping,
DynActionForm form,
HttpServletRequest request,
HttpServletResponse response,
ConnectionSet conSet )
throws BGException
{
String billingId = form.getParam( "billingId" );
int moduleId = form.getParamInt( "moduleId" );
String ids = form.getParam( "ids" );
Date date = form.getParamDate( "date" );
BigDecimal summa = Utils.parseBigDecimal( form.getParam( "summa" ) );
String comment = form.getParam( "comment" );
BillDAO billDao = new BillDAO( form.getUser(), billingId, moduleId );
if( date != null )
{
billDao.setPayed( ids, true, date, summa, comment );
}
else
{
billDao.setPayed( ids, false, null, null, null );
}
return processJsonForward( conSet, form, response );
}
}
|
[
"veronika.cucorova@gmail.com"
] |
veronika.cucorova@gmail.com
|
b7ff8a9b8acd3a0abda0cc6e97ad9d353d8a7e44
|
99c03face59ec13af5da080568d793e8aad8af81
|
/hom_classifier/2om_classifier/scratch/AOIS90AOIS9/Pawn.java
|
0eaaa9bf50b6b060b92da2ca1cdcb7656e14cf5a
|
[] |
no_license
|
fouticus/HOMClassifier
|
62e5628e4179e83e5df6ef350a907dbf69f85d4b
|
13b9b432e98acd32ae962cbc45d2f28be9711a68
|
refs/heads/master
| 2021-01-23T11:33:48.114621
| 2020-05-13T18:46:44
| 2020-05-13T18:46:44
| 93,126,040
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,761
|
java
|
// This is a mutant program.
// Author : ysma
import java.util.ArrayList;
public class Pawn extends ChessPiece
{
public Pawn( ChessBoard board, ChessPiece.Color color )
{
super( board, color );
}
public java.lang.String toString()
{
if (color == ChessPiece.Color.WHITE) {
return "♙";
} else {
return "♟";
}
}
public java.util.ArrayList<String> legalMoves()
{
java.util.ArrayList<String> returnList = new java.util.ArrayList<String>();
if (this.getColor().equals( ChessPiece.Color.WHITE )) {
int currentCol = this.getColumn();
int nextRow = this.getRow() + 1;
if (nextRow <= 7) {
if (board.getPiece( onePossibleMove( nextRow, ++currentCol ) ) == null) {
returnList.add( onePossibleMove( nextRow, currentCol ) );
}
}
if (this.getRow() == 1) {
int nextNextRow = this.getRow() + 2;
if (board.getPiece( onePossibleMove( nextRow, currentCol ) ) == null && board.getPiece( onePossibleMove( nextNextRow, currentCol ) ) == null) {
returnList.add( onePossibleMove( nextNextRow, currentCol ) );
}
}
int leftColumn = currentCol - 1;
int rightColumn = currentCol + 1;
if (leftColumn >= 0) {
if (board.getPiece( onePossibleMove( nextRow, leftColumn ) ) != null) {
if (!board.getPiece( onePossibleMove( nextRow, leftColumn ) ).getColor().equals( this.getColor() )) {
returnList.add( onePossibleMove( nextRow, leftColumn ) );
}
}
}
if (rightColumn <= 7) {
if (board.getPiece( onePossibleMove( nextRow, rightColumn ) ) != null) {
if (!board.getPiece( onePossibleMove( nextRow, rightColumn ) ).getColor().equals( this.getColor() )) {
returnList.add( onePossibleMove( nextRow, rightColumn ) );
}
}
}
} else {
int currentCol = this.getColumn();
int nextRow = this.getRow() - 1;
if (nextRow >= 0) {
if (board.getPiece( onePossibleMove( nextRow, currentCol ) ) == null) {
returnList.add( onePossibleMove( nextRow--, currentCol ) );
}
}
if (this.getRow() == 6) {
int nextNextRow = this.getRow() - 2;
if (board.getPiece( onePossibleMove( nextRow, currentCol ) ) == null && board.getPiece( onePossibleMove( nextNextRow, currentCol ) ) == null) {
returnList.add( onePossibleMove( nextNextRow, currentCol ) );
}
}
int leftColumn = currentCol - 1;
int rightColumn = currentCol + 1;
if (leftColumn >= 0) {
if (board.getPiece( onePossibleMove( nextRow, leftColumn ) ) != null) {
if (!board.getPiece( onePossibleMove( nextRow, leftColumn ) ).getColor().equals( this.getColor() )) {
returnList.add( onePossibleMove( nextRow, leftColumn ) );
}
}
}
if (rightColumn <= 7) {
if (board.getPiece( onePossibleMove( nextRow, rightColumn ) ) != null) {
if (!board.getPiece( onePossibleMove( nextRow, rightColumn ) ).getColor().equals( this.getColor() )) {
returnList.add( onePossibleMove( nextRow, rightColumn ) );
}
}
}
}
return returnList;
}
}
|
[
"fout.alex@gmail.com"
] |
fout.alex@gmail.com
|
305820bc3039753328eb71f7846ae6608184f5b2
|
4bd2ddf7cd2b0e3e87c78d7d81d6df1c5bdc1cda
|
/xh5/x5-bpmx-root/modules/x5-bpmx-core/src/main/java/com/hotent/bpmx/core/defxml/entity/CallConversation.java
|
132fccccde3f5a6d8a769dbbd96b7ea4d71ebd9c
|
[] |
no_license
|
codingOnGithub/hx
|
27a873a308528eb968632bbf97e6e25107f92a9f
|
c93d6c23032ff798d460ee9a0efaba214594a6b9
|
refs/heads/master
| 2021-05-27T14:40:05.776605
| 2014-10-22T16:52:34
| 2014-10-22T16:52:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,269
|
java
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.12.11 at 10:08:02 AM CST
//
package com.hotent.bpmx.core.defxml.entity;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;
/**
* <p>Java class for tCallConversation complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="tCallConversation">
* <complexContent>
* <extension base="{http://www.omg.org/spec/BPMN/20100524/MODEL}tConversationNode">
* <sequence>
* <element ref="{http://www.omg.org/spec/BPMN/20100524/MODEL}participantAssociation" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* <attribute name="calledCollaborationRef" type="{http://www.w3.org/2001/XMLSchema}QName" />
* <anyAttribute processContents='lax' namespace='##other'/>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "tCallConversation", propOrder = {
"participantAssociation"
})
public class CallConversation
extends ConversationNode
{
protected List<ParticipantAssociation> participantAssociation;
@XmlAttribute(name = "calledCollaborationRef")
protected QName calledCollaborationRef;
/**
* Gets the value of the participantAssociation property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the participantAssociation property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getParticipantAssociation().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ParticipantAssociation }
*
*
*/
public List<ParticipantAssociation> getParticipantAssociation() {
if (participantAssociation == null) {
participantAssociation = new ArrayList<ParticipantAssociation>();
}
return this.participantAssociation;
}
/**
* Gets the value of the calledCollaborationRef property.
*
* @return
* possible object is
* {@link QName }
*
*/
public QName getCalledCollaborationRef() {
return calledCollaborationRef;
}
/**
* Sets the value of the calledCollaborationRef property.
*
* @param value
* allowed object is
* {@link QName }
*
*/
public void setCalledCollaborationRef(QName value) {
this.calledCollaborationRef = value;
}
}
|
[
"wang2009long@126.com"
] |
wang2009long@126.com
|
eb6fa10f5235e4366e48c781160a1eb06e5e701c
|
947edc58e161933b70d595242d4663a6d0e68623
|
/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/CtcdMantissaService.java
|
a56df4b12d388aa5d94897b207d7a97a2743c940
|
[] |
no_license
|
jieke360/pig6
|
5a5de28b0e4785ff8872e7259fc46d1f5286d4d9
|
8413feed8339fab804b11af8d3fbab406eb80b68
|
refs/heads/master
| 2023-02-04T12:39:34.279157
| 2020-12-31T03:57:43
| 2020-12-31T03:57:43
| 325,705,631
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,118
|
java
|
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package com.pig4cloud.pigx.admin.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pig4cloud.pigx.admin.entity.CtcdMantissa;
/**
* 进位类型
*
* @author gaoxiao
* @date 2020-08-12 11:37:07
*/
public interface CtcdMantissaService extends IService<CtcdMantissa> {
}
|
[
"qdgaoxiao@163.com"
] |
qdgaoxiao@163.com
|
cb9c6d40a2144442aba4ed4a6b22dc421ada380d
|
98c049efdfebfafc5373897d491271b4370ab9b4
|
/src/main/java/lapr/project/data/PharmacyDB.java
|
13e4ba5a59d1a42e2a7a219fb038b76bfd504b30
|
[] |
no_license
|
antoniodanielbf-isep/LAPR3-2020
|
3a4f4cc608804f70cc87a3ccb29cbc05f5edf0f3
|
7ee16e8c995aea31c30c858f93e8ebdf1de7617f
|
refs/heads/main
| 2023-05-27T14:42:05.442427
| 2021-06-20T18:09:59
| 2021-06-20T18:09:59
| 378,709,095
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,568
|
java
|
package lapr.project.data;
import lapr.project.model.*;
import oracle.jdbc.OracleTypes;
import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
/**
* The type Pharmacy db.
*/
public class PharmacyDB extends DataHandler {
/**
* Gets all pharmacies.
*
* @return the all pharmacies
*/
public List<Pharmacy> getAllPharmacies() {
List<Pharmacy> pharmacys = new ArrayList<>();
try (CallableStatement callStmt =
getConnection().prepareCall("{ ? = call getAllPharmacys() }")) {
callStmt.registerOutParameter(1, OracleTypes.CURSOR);
callStmt.execute();
ResultSet rSet = (ResultSet) callStmt.getObject(1);
while (rSet.next()) {
int id = rSet.getInt(1);
String designation = rSet.getString(2);
String address = rSet.getString(3);
String pharmacyOwner = rSet.getString(4);
pharmacys.add(new Pharmacy(id, designation, address, pharmacyOwner));
}
return pharmacys;
} catch (SQLException e) {
e.printStackTrace();
}
throw new IllegalArgumentException("No Data Found");
}
/**
* Create pharmacy int.
*
* @param pharmacyOwner the pharmacy owner
* @param designation the designation
* @param address the address
* @return the int
*/
public int createPharmacy(String pharmacyOwner, String designation, Address address) {
Integer pharmacyID;
CallableStatement callStmt = null;
if (!pharmacyOwner.isEmpty() && !designation.isEmpty() && address != null) {
try {
callStmt = getConnection().prepareCall("{ ? = call createPharmacy(?,?,?) }");
callStmt.registerOutParameter(1, OracleTypes.INTEGER);
callStmt.setString(2, pharmacyOwner);
callStmt.setString(3, address.getCoordinates());
callStmt.setString(4, designation);
callStmt.execute();
pharmacyID = (Integer) callStmt.getObject(1);
return pharmacyID;
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
assert callStmt != null;
callStmt.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
}
return -1;
}
/**
* Update boolean.
*
* @param pharmacyOwner the pharmacy owner
* @param designation the designation
* @param address the address
* @return the boolean
*/
public boolean update(String pharmacyOwner, String designation, Address address) {
boolean isUpdated = false;
if (!pharmacyOwner.isEmpty() && !designation.isEmpty() && address != null) {
try (CallableStatement callStmt = getConnection().prepareCall("{ call updatePharmacy(?,?,?) }")) {
callStmt.setString(1, pharmacyOwner);
callStmt.setString(2, address.getCoordinates());
callStmt.setString(3, designation);
callStmt.execute();
isUpdated = true;
} catch (SQLException e) {
e.printStackTrace();
}
}
return isUpdated;
}
/**
* Gets pharmacy by user email.
*
* @param email the email
* @return the pharmacy by user email
*/
public Pharmacy getPharmacyByUserEmail(String email) {
CallableStatement callStmt;
Pharmacy pharmacy = null;
try {
callStmt = getConnection().prepareCall("{ ? = call getPharmacyByUserEmail(?) }");
callStmt.registerOutParameter(1, OracleTypes.CURSOR);
callStmt.setString(2, email);
callStmt.execute();
ResultSet rSet = (ResultSet) callStmt.getObject(1);
if (rSet.next()) {
int id = rSet.getInt(1);
String designation = rSet.getString(2);
String adress = rSet.getString(3);
String pharmacyOwner = rSet.getString(4);
closeAll();
pharmacy = new Pharmacy(id, designation, adress, pharmacyOwner);
}
} catch (SQLException e) {
e.printStackTrace();
}
return pharmacy;
}
}
|
[
"1190402@isep.ipp.pt"
] |
1190402@isep.ipp.pt
|
44492187b46fba284ebf3d8cf4a75f9fb5886002
|
f9f4b3244b60cf5107edafaaf1f225cbafc63cb4
|
/Assignment_PM/src/com/bcj/corejava/operators/lab2/MoonWeight.java
|
32913216b5d8eee3d78425865c60cdb620fea029
|
[] |
no_license
|
padmaja0922/corejava
|
eb10b18a4602edcb580a6618fd1569b2e4e1df6c
|
5c428c170487132835afb46be35b7308b9a01d9e
|
refs/heads/master
| 2021-07-16T22:18:28.484709
| 2017-10-23T15:47:44
| 2017-10-23T15:47:44
| 108,002,435
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 524
|
java
|
package com.bcj.corejava.operators.lab2;
import java.util.Scanner;
/* calculating weight on moon */
public class MoonWeight {
public double weightOnMoon(double w) {
double p = w * 0.17;
w = w - p;
return w;
}
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Enter the weight on earth :");
double d = scan.nextDouble();
MoonWeight m = new MoonWeight();
d = m.weightOnMoon(d);
System.out.println("Weight on moon is : " + d);
scan.close();
}
}
|
[
"pmutthoju.bcj@gmail.com"
] |
pmutthoju.bcj@gmail.com
|
446730cf20197d5b9a4a0227c4ed55148a840a05
|
9276f9c42a4feb5e5e89bce9dd99511d7f029f6b
|
/src/main/java/com/evacipated/cardcrawl/mod/stslib/fields/cards/AbstractCard/SneckoField.java
|
299facfbfb92c75b2a24b6d51d80ae1fa987aa4b
|
[
"MIT"
] |
permissive
|
kiooeht/StSLib
|
b520d67aeb11bc40de391f3f806134b911d36b2c
|
6d9b5e020ff7b608308ad1abb8f1f6b1682afecf
|
refs/heads/master
| 2023-08-17T05:04:50.315903
| 2023-08-15T21:26:33
| 2023-08-15T21:26:33
| 140,659,888
| 84
| 52
|
MIT
| 2023-09-13T06:00:52
| 2018-07-12T04:13:35
|
Java
|
UTF-8
|
Java
| false
| false
| 977
|
java
|
package com.evacipated.cardcrawl.mod.stslib.fields.cards.AbstractCard;
import com.evacipated.cardcrawl.modthespire.lib.SpireField;
import com.evacipated.cardcrawl.modthespire.lib.SpirePatch;
import com.megacrit.cardcrawl.cards.AbstractCard;
@SpirePatch(
cls="com.megacrit.cardcrawl.cards.AbstractCard",
method=SpirePatch.CLASS
)
public class SneckoField
{
public static SpireField<Boolean> snecko = new SneckoFieldType(() -> false);
// This is done so card cost is automatically set to -1
private static class SneckoFieldType extends SpireField<Boolean>
{
SneckoFieldType(DefaultValue<Boolean> defaultValue)
{
super(defaultValue);
}
@Override
public void set(Object __intance, Boolean value)
{
super.set(__intance, value);
if (value && __intance instanceof AbstractCard) {
((AbstractCard)__intance).cost = -1;
}
}
}
}
|
[
"kiooeht@gmail.com"
] |
kiooeht@gmail.com
|
ac314f805506a3413e897d2324c98f875d776490
|
ff0e2cd24bc598f2d40a1aef179f107c0b5986aa
|
/src/main/java/com/geekerstar/job/configure/ScheduleConfigure.java
|
1d0c878d7b2752a0b9827084b84c86c5c6e39231
|
[] |
no_license
|
geekerstar/geek-fast
|
8ecc7eabae4e3c35e9619d9f02876fb9d2484511
|
212ff294aaf5c04ac2cc2f6f0e5446db1932282a
|
refs/heads/master
| 2022-09-17T09:59:59.340773
| 2020-08-06T08:37:14
| 2020-08-06T08:37:14
| 226,278,168
| 1
| 0
| null | 2022-09-01T23:17:27
| 2019-12-06T08:11:18
|
Java
|
UTF-8
|
Java
| false
| false
| 2,268
|
java
|
package com.geekerstar.job.configure;
import com.baomidou.dynamic.datasource.DynamicRoutingDataSource;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
import javax.sql.DataSource;
import java.util.Properties;
/**
* @author geekerstar
* @date 2020/2/2 12:39
* @description
*/
@Configuration
@RequiredArgsConstructor
public class ScheduleConfigure {
private final DynamicRoutingDataSource dynamicRoutingDataSource;
@Bean
public SchedulerFactoryBean schedulerFactoryBean() {
SchedulerFactoryBean factory = new SchedulerFactoryBean();
// 手动从多数据源中获取 quartz数据源
DataSource quartz = dynamicRoutingDataSource.getDataSource("quartz");
factory.setDataSource(quartz);
// quartz参数
Properties prop = new Properties();
prop.put("org.quartz.scheduler.instanceName", "MyScheduler");
prop.put("org.quartz.scheduler.instanceId", "AUTO");
// 线程池配置
prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool");
prop.put("org.quartz.threadPool.threadCount", "20");
prop.put("org.quartz.threadPool.threadPriority", "5");
// JobStore配置
prop.put("org.quartz.jobStore.class", "org.quartz.impl.jdbcjobstore.JobStoreTX");
// 集群配置
prop.put("org.quartz.jobStore.isClustered", "true");
prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000");
prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1");
prop.put("org.quartz.jobStore.misfireThreshold", "12000");
prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_");
factory.setQuartzProperties(prop);
factory.setSchedulerName("Geek_Scheduler");
// 延时启动
factory.setStartupDelay(1);
factory.setApplicationContextSchedulerContextKey("applicationContextKey");
// 启动时更新己存在的 Job
factory.setOverwriteExistingJobs(true);
// 设置自动启动,默认为 true
factory.setAutoStartup(true);
return factory;
}
}
|
[
"247507792@qq.com"
] |
247507792@qq.com
|
9208433b3d7110553c3ddee77e110d193b218051
|
79595075622ded0bf43023f716389f61d8e96e94
|
/app/src/main/java/org/apache/http/impl/client/DefaultRedirectHandler.java
|
5818bd1865daeb29d2dafedcb4b273281bbd912c
|
[] |
no_license
|
dstmath/OppoR15
|
96f1f7bb4d9cfad47609316debc55095edcd6b56
|
b9a4da845af251213d7b4c1b35db3e2415290c96
|
refs/heads/master
| 2020-03-24T16:52:14.198588
| 2019-05-27T02:24:53
| 2019-05-27T02:24:53
| 142,840,716
| 7
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,493
|
java
|
package org.apache.http.impl.client;
import android.net.http.Headers;
import java.net.URI;
import java.net.URISyntaxException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.Header;
import org.apache.http.HttpHost;
import org.apache.http.HttpRequest;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.ProtocolException;
import org.apache.http.client.CircularRedirectException;
import org.apache.http.client.RedirectHandler;
import org.apache.http.client.params.ClientPNames;
import org.apache.http.client.utils.URIUtils;
import org.apache.http.params.HttpParams;
import org.apache.http.protocol.ExecutionContext;
import org.apache.http.protocol.HttpContext;
@Deprecated
public class DefaultRedirectHandler implements RedirectHandler {
private static final String REDIRECT_LOCATIONS = "http.protocol.redirect-locations";
private final Log log = LogFactory.getLog(getClass());
public boolean isRedirectRequested(HttpResponse response, HttpContext context) {
if (response == null) {
throw new IllegalArgumentException("HTTP response may not be null");
}
switch (response.getStatusLine().getStatusCode()) {
case HttpStatus.SC_MOVED_PERMANENTLY /*301*/:
case HttpStatus.SC_MOVED_TEMPORARILY /*302*/:
case HttpStatus.SC_SEE_OTHER /*303*/:
case HttpStatus.SC_TEMPORARY_REDIRECT /*307*/:
return true;
default:
return false;
}
}
public URI getLocationURI(HttpResponse response, HttpContext context) throws ProtocolException {
if (response == null) {
throw new IllegalArgumentException("HTTP response may not be null");
}
Header locationHeader = response.getFirstHeader(Headers.LOCATION);
if (locationHeader == null) {
throw new ProtocolException("Received redirect response " + response.getStatusLine() + " but no location header");
}
String location = locationHeader.getValue();
if (this.log.isDebugEnabled()) {
this.log.debug("Redirect requested to location '" + location + "'");
}
try {
URI uri = new URI(location);
HttpParams params = response.getParams();
if (!uri.isAbsolute()) {
if (params.isParameterTrue(ClientPNames.REJECT_RELATIVE_REDIRECT)) {
throw new ProtocolException("Relative redirect location '" + uri + "' not allowed");
}
HttpHost target = (HttpHost) context.getAttribute(ExecutionContext.HTTP_TARGET_HOST);
if (target == null) {
throw new IllegalStateException("Target host not available in the HTTP context");
}
try {
uri = URIUtils.resolve(URIUtils.rewriteURI(new URI(((HttpRequest) context.getAttribute(ExecutionContext.HTTP_REQUEST)).getRequestLine().getUri()), target, true), uri);
} catch (URISyntaxException ex) {
throw new ProtocolException(ex.getMessage(), ex);
}
}
if (params.isParameterFalse(ClientPNames.ALLOW_CIRCULAR_REDIRECTS)) {
URI redirectURI;
RedirectLocations redirectLocations = (RedirectLocations) context.getAttribute(REDIRECT_LOCATIONS);
if (redirectLocations == null) {
redirectLocations = new RedirectLocations();
context.setAttribute(REDIRECT_LOCATIONS, redirectLocations);
}
if (uri.getFragment() != null) {
try {
redirectURI = URIUtils.rewriteURI(uri, new HttpHost(uri.getHost(), uri.getPort(), uri.getScheme()), true);
} catch (URISyntaxException ex2) {
throw new ProtocolException(ex2.getMessage(), ex2);
}
}
redirectURI = uri;
if (redirectLocations.contains(redirectURI)) {
throw new CircularRedirectException("Circular redirect to '" + redirectURI + "'");
}
redirectLocations.add(redirectURI);
}
return uri;
} catch (URISyntaxException ex22) {
throw new ProtocolException("Invalid redirect URI: " + location, ex22);
}
}
}
|
[
"toor@debian.toor"
] |
toor@debian.toor
|
c6fa8ec576f42d4bbe96d03e25599ef0ad74ff1d
|
b39d7e1122ebe92759e86421bbcd0ad009eed1db
|
/sources/android/media/-$$Lambda$AudioRecordingMonitorImpl$2$cn04v8rie0OYr-_fiLO_SMYka7I.java
|
80ac29402da64f56fc8956fd7ed41f1af551b663
|
[] |
no_license
|
AndSource/miuiframework
|
ac7185dedbabd5f619a4f8fc39bfe634d101dcef
|
cd456214274c046663aefce4d282bea0151f1f89
|
refs/heads/master
| 2022-03-31T11:09:50.399520
| 2020-01-02T09:49:07
| 2020-01-02T09:49:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 688
|
java
|
package android.media;
import java.util.ArrayList;
/* compiled from: lambda */
public final /* synthetic */ class -$$Lambda$AudioRecordingMonitorImpl$2$cn04v8rie0OYr-_fiLO_SMYka7I implements Runnable {
private final /* synthetic */ AudioRecordingCallbackInfo f$0;
private final /* synthetic */ ArrayList f$1;
public /* synthetic */ -$$Lambda$AudioRecordingMonitorImpl$2$cn04v8rie0OYr-_fiLO_SMYka7I(AudioRecordingCallbackInfo audioRecordingCallbackInfo, ArrayList arrayList) {
this.f$0 = audioRecordingCallbackInfo;
this.f$1 = arrayList;
}
public final void run() {
this.f$0.mCb.onRecordingConfigChanged(this.f$1);
}
}
|
[
"shivatejapeddi@gmail.com"
] |
shivatejapeddi@gmail.com
|
2087ea21ce95685d05ab635e4344d3cc6e3aa433
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE470_Unsafe_Reflection/CWE470_Unsafe_Reflection__listen_tcp_54b.java
|
75fccc2cab795bff5b42cff86fb0d441341365ed
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 1,170
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE470_Unsafe_Reflection__listen_tcp_54b.java
Label Definition File: CWE470_Unsafe_Reflection.label.xml
Template File: sources-sink-54b.tmpl.java
*/
/*
* @description
* CWE: 470 Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')
* BadSource: listen_tcp Read data using a listening tcp connection
* GoodSource: Set data to a hardcoded class name
* Sinks:
* BadSink : Instantiate class named in data
* Flow Variant: 54 Data flow: data passed as an argument from one method through three others to a fifth; all five functions are in different classes in the same package
*
* */
package testcases.CWE470_Unsafe_Reflection;
import testcasesupport.*;
import javax.servlet.http.*;
public class CWE470_Unsafe_Reflection__listen_tcp_54b
{
public void bad_sink(String data ) throws Throwable
{
(new CWE470_Unsafe_Reflection__listen_tcp_54c()).bad_sink(data );
}
/* goodG2B() - use goodsource and badsink */
public void goodG2B_sink(String data ) throws Throwable
{
(new CWE470_Unsafe_Reflection__listen_tcp_54c()).goodG2B_sink(data );
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
a8bcbead62687a9ff453494821369b9d1d354328
|
a370ff524a6e317488970dac65d93a727039f061
|
/src/main/java/template/algo/MatroidIntersect.java
|
1ea28621f836baff608cc86b8072cade88348a85
|
[] |
no_license
|
taodaling/contest
|
235f4b2a033ecc30ec675a4526e3f031a27d8bbf
|
86824487c2e8d4fc405802fff237f710f4e73a5c
|
refs/heads/master
| 2023-04-14T12:41:41.718630
| 2023-04-10T14:12:47
| 2023-04-10T14:12:47
| 213,876,299
| 9
| 1
| null | 2021-06-12T06:33:05
| 2019-10-09T09:28:43
|
Java
|
UTF-8
|
Java
| false
| false
| 3,957
|
java
|
package template.algo;
import template.primitve.generated.datastructure.IntegerDequeImpl;
import java.util.Arrays;
import java.util.function.Consumer;
/**
* O(r) invoke computeAdj and extend. O(r^2n)
*/
public class MatroidIntersect {
protected IntegerDequeImpl dq;
protected int[] dists;
protected boolean[] added;
protected boolean[][] adj1;
protected boolean[][] adj2;
protected int n;
protected boolean[] x1;
protected boolean[] x2;
protected static int distInf = (int) 1e9;
protected int[] pre;
protected Consumer<boolean[]> callback;
protected static Consumer<boolean[]> nilCallback = x -> {
};
public void setCallback(Consumer<boolean[]> callback) {
if (callback == null) {
callback = nilCallback;
}
this.callback = callback;
}
public MatroidIntersect(int n) {
this.n = n;
dq = new IntegerDequeImpl(n);
dists = new int[n];
added = new boolean[n];
adj1 = new boolean[n][];
adj2 = new boolean[n][];
x1 = new boolean[n];
x2 = new boolean[n];
pre = new int[n];
setCallback(nilCallback);
}
protected boolean adj(int i, int j) {
if (added[i]) {
return adj1[i][j];
} else {
return adj2[j][i];
}
}
protected boolean expand(MatroidIndependentSet a, MatroidIndependentSet b, int round) {
Arrays.fill(x1, false);
Arrays.fill(x2, false);
a.prepare(added);
b.prepare(added);
a.extend(added, x1);
b.extend(added, x2);
for (int i = 0; i < n; i++) {
if (x1[i] && x2[i]) {
pre[i] = -1;
xorPath(i);
return true;
}
}
for (int i = 0; i < n; i++) {
if (added[i]) {
Arrays.fill(adj1[i], false);
Arrays.fill(adj2[i], false);
}
}
a.computeAdj(added, adj1);
b.computeAdj(added, adj2);
Arrays.fill(dists, distInf);
Arrays.fill(pre, -1);
dq.clear();
for (int i = 0; i < n; i++) {
if (added[i]) {
continue;
}
//right
if (x1[i]) {
dists[i] = 0;
dq.addLast(i);
}
}
int tail = -1;
while (!dq.isEmpty()) {
int head = dq.removeFirst();
if (x2[head]) {
tail = head;
break;
}
for (int j = 0; j < n; j++) {
if (added[head] != added[j] && adj(head, j) && dists[j] > dists[head] + 1) {
dists[j] = dists[head] + 1;
dq.addLast(j);
pre[j] = head;
}
}
}
if (tail == -1) {
return false;
}
xorPath(tail);
return true;
}
protected void xorPath(int tail) {
boolean[] last1 = new boolean[n];
boolean[] last2 = new boolean[n];
for (boolean add = true; tail != -1; tail = pre[tail], add = !add) {
assert added[tail] != add;
added[tail] = add;
if (add) {
adj1[tail] = last1;
adj2[tail] = last2;
} else {
last1 = adj1[tail];
last2 = adj2[tail];
adj1[tail] = null;
adj2[tail] = null;
}
}
}
/**
* Find a basis with largest possible size
*
* @param a
* @param b
* @return
*/
public boolean[] intersect(MatroidIndependentSet a, MatroidIndependentSet b) {
Arrays.fill(added, false);
int round = 0;
callback.accept(added);
while (expand(a, b, round)) {
round++;
callback.accept(added);
}
return added;
}
}
|
[
"taodaling@gmail.com"
] |
taodaling@gmail.com
|
df497b6018c63de4c527132bfde9144ff3b1be95
|
ceced64751c092feca544ab3654cf40d4141e012
|
/DesignModel/src/main/java/com/pri/observer/Client.java
|
03f11e71a0a87c553b01e96b26bbd5f42eb1bff3
|
[] |
no_license
|
1163646727/pri_play
|
80ec6fc99ca58cf717984db82de7db33ef1e71ca
|
fbd3644ed780c91bfc535444c54082f4414b8071
|
refs/heads/master
| 2022-06-30T05:14:02.082236
| 2021-01-05T08:02:40
| 2021-01-05T08:02:40
| 196,859,419
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,039
|
java
|
package com.pri.observer;
/**
* className: Client <BR>
* description: 客户端<BR>
* remark: 观察者模式测试<BR>
* author: ChenQi <BR>
* createDate: 2019-09-02 20:14 <BR>
*/
public class Client {
public static void main(String[] args) {
// 实例化具体观察者 ChenQi;
RealObserver realObserver = new RealObserver();
// 创建微信用户 ChenQi;
WeiXinUser weiXinUser1 = new WeiXinUser("张三");
WeiXinUser weiXinUser2 = new WeiXinUser("李四");
WeiXinUser weiXinUser3 = new WeiXinUser("王五");
// 添加订阅者,是一个订阅主题的行为 ChenQi;
realObserver.registerObserver(weiXinUser1);
realObserver.registerObserver(weiXinUser2);
realObserver.registerObserver(weiXinUser3);
// 公众号更新消息发布给订阅的微信用户,是一个发布行为 ChenQi;
realObserver.notifyAllObserver("公众号内容更新!");
realObserver.notifyAllObserver("测试是否消费成功!");
}
}
|
[
"1163646727@qq.com"
] |
1163646727@qq.com
|
594196c3133e18c06189259310b0641cede8dd00
|
86152af493decf40f53d7951d4c7f8a60f363d64
|
/seoulMarketDayAndroid/seoulMarketDayAndroid/app/src/main/java/com/stm/market/fragment/video/presenter/impl/MarketVideoPresenterImpl.java
|
1bd07a7ba95eb19e77d6ea3ba237cbc230f81c8f
|
[
"MIT"
] |
permissive
|
MobileSeoul/2017seoul-15
|
b54fb7d95c6bf685203d9948e4087385b02f6170
|
620eb72e4cdba9f355327b66a299da257c5b0b40
|
refs/heads/master
| 2021-09-05T14:39:35.702491
| 2018-01-29T00:15:01
| 2018-01-29T00:15:01
| 119,310,262
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,270
|
java
|
package com.stm.market.fragment.video.presenter.impl;
import com.stm.common.dao.File;
import com.stm.common.dao.Market;
import com.stm.common.dao.User;
import com.stm.common.dto.HttpErrorDto;
import com.stm.common.flag.DefaultFileFlag;
import com.stm.common.flag.InfiniteScrollFlag;
import com.stm.market.fragment.video.interactor.MarketVideoInteractor;
import com.stm.market.fragment.video.interactor.impl.MarketVideoInteractorImpl;
import com.stm.market.fragment.video.presenter.MarketVideoPresenter;
import com.stm.market.fragment.video.view.MarketVideoView;
import java.util.List;
/**
* Created by ㅇㅇ on 2017-08-24.
*/
public class MarketVideoPresenterImpl implements MarketVideoPresenter {
private MarketVideoInteractor marketVideoInteractor;
private MarketVideoView marketVideoView;
public MarketVideoPresenterImpl(MarketVideoView marketVideoView) {
this.marketVideoInteractor = new MarketVideoInteractorImpl(this);
this.marketVideoView = marketVideoView;
}
@Override
public void init(User user, Market market) {
marketVideoView.showProgressDialog();
marketVideoInteractor.setUser(user);
marketVideoInteractor.setMarket(market);
if (user != null) {
String accessToken = user.getAccessToken();
marketVideoInteractor.setMarketRepository(accessToken);
marketVideoInteractor.setFileRepository(accessToken);
} else {
marketVideoInteractor.setMarketRepository();
marketVideoInteractor.setFileRepository();
}
}
@Override
public void onCreateView() {
marketVideoView.setScrollViewOnScrollChangeListener();
Market market = marketVideoInteractor.getMarket();
long marketId = market.getId();
long offset = InfiniteScrollFlag.DEFAULT_OFFSET;
marketVideoView.setScrollViewOnScrollChangeListener();
marketVideoInteractor.getFileListByIdAndTypeAndOffset(marketId, DefaultFileFlag.VIDEO_THUMBNAIL_TYPE, offset);
}
@Override
public void onScrollChange(int difference) {
if (difference <= 0) {
marketVideoView.showProgressDialog();
Market market = marketVideoInteractor.getMarket();
long marketId = market.getId();
List<File> files = marketVideoInteractor.getFiles();
long offset = files.size();
marketVideoInteractor.getFileListByIdAndTypeAndOffset(marketId, DefaultFileFlag.VIDEO_THUMBNAIL_TYPE, offset);
}
}
@Override
public void onNetworkError(HttpErrorDto httpErrorDto) {
if (httpErrorDto == null) {
marketVideoView.showMessage("네트워크 불안정합니다. 다시 시도하세요.");
} else {
marketVideoView.showMessage(httpErrorDto.message());
}
}
@Override
public void onClickVideo(File file, int position) {
marketVideoView.showProgressDialog();
marketVideoInteractor.updateFileByHits(file, position);
}
@Override
public void onSuccessGetFileListByIdAndTypeAndOffset(List<File> newFiles) {
List<File> files = marketVideoInteractor.getFiles();
int fileSize = files.size();
int newFileSize = newFiles.size();
if (newFileSize > 0) {
if(fileSize == 0){
marketVideoInteractor.setFiles(newFiles);
marketVideoView.clearMarketVideoAdapter();
marketVideoView.setMarketVideoAdapterItem(newFiles);
} else {
marketVideoInteractor.setFilesAddAll(newFiles);
marketVideoView.marketVideoAdapterNotifyItemRangeInserted(fileSize, newFileSize);
}
} else {
marketVideoView.showEmptyView();
}
marketVideoView.goneProgressDialog();
}
@Override
public void onSuccessUpdateFileByHits(int position) {
List<File> files = marketVideoInteractor.getFiles();
File file = files.get(position);
int prevHit = file.getHits();
file.setHits(prevHit + 1);
marketVideoView.marketVideoAdapterNotifyItemChanged(position);
marketVideoView.goneProgressDialog();
marketVideoView.navigateToVideoPlayerActivity(file);
}
}
|
[
"mobile@seoul.go.kr"
] |
mobile@seoul.go.kr
|
0c9631cc8bfeeca79f6480a8a6397d0c1e5efa50
|
ed166738e5dec46078b90f7cca13a3c19a1fd04b
|
/minor/guice-OOM-error-reproduction/src/main/java/gen/I_Gen147.java
|
a1e25fb7ebde63c028903b30472205efeaa27fed
|
[] |
no_license
|
michalradziwon/script
|
39efc1db45237b95288fe580357e81d6f9f84107
|
1fd5f191621d9da3daccb147d247d1323fb92429
|
refs/heads/master
| 2021-01-21T21:47:16.432732
| 2016-03-23T02:41:50
| 2016-03-23T02:41:50
| 22,663,317
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 331
|
java
|
package gen;
public class I_Gen147 {
@com.google.inject.Inject
public I_Gen147(I_Gen148 i_gen148){
System.out.println(this.getClass().getCanonicalName() + " created. " + i_gen148 );
}
@com.google.inject.Inject public void injectInterfaceWithoutImpl(gen.InterfaceWithoutImpl i){} // should expolode :)
}
|
[
"michal.radzi.won@gmail.com"
] |
michal.radzi.won@gmail.com
|
7f26515e0b63603c5bb1e83d9221fafaa967e779
|
7a4a3daf299c451a7f5104e7632027240dace19b
|
/Week_07/itjun-week07-homework02/base-mysql-proxy/src/main/java/io/itjun/week07/work14/datasource/SlaveDatasource.java
|
a3e151f82092b27c5726e5e57010a54df70cbee8
|
[] |
no_license
|
itjun/JAVA-01
|
6135aefad5f660c8b805de27f1093d4c8e387c6c
|
bd1d1822625a0a70e1c16a1ae46029ac285fcc33
|
refs/heads/main
| 2023-05-01T15:37:28.874177
| 2021-05-16T13:56:31
| 2021-05-16T13:56:31
| 325,822,092
| 0
| 0
| null | 2020-12-31T15:03:19
| 2020-12-31T15:03:18
| null |
UTF-8
|
Java
| false
| false
| 736
|
java
|
package io.itjun.week07.work14.datasource;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import java.util.ArrayList;
import java.util.List;
@Configuration
@ConfigurationProperties(prefix = "datasource")
public class SlaveDatasource {
List<BaseDataSourceAttribute> slave = new ArrayList<BaseDataSourceAttribute>();
public SlaveDatasource() {
}
public SlaveDatasource(List<BaseDataSourceAttribute> slave) {
this.slave = slave;
}
public List<BaseDataSourceAttribute> getSlave() {
return slave;
}
public void setSlave(List<BaseDataSourceAttribute> slave) {
this.slave = slave;
}
}
|
[
"l1091462907@gmail.com"
] |
l1091462907@gmail.com
|
3e9dc9790fdd3ff340683642d2f62f93df831f89
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/10/10_ff53eaf3dd2a020888e9c9290f08a723f9be3dbb/ArchiveFragment/10_ff53eaf3dd2a020888e9c9290f08a723f9be3dbb_ArchiveFragment_s.java
|
7e28d25cbdc49a326ab2c0c0d50fc20faee497bc
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,801
|
java
|
package se.slashat.slashat.fragment;
import se.slashat.slashat.CallbackPair;
import se.slashat.slashat.R;
import se.slashat.slashat.adapter.EpisodeDetailAdapter;
import se.slashat.slashat.adapter.PersonAdapter;
import se.slashat.slashat.adapter.PersonalAdapter;
import se.slashat.slashat.androidservice.EpisodePlayer;
import se.slashat.slashat.async.EpisodeLoaderAsyncTask;
import se.slashat.slashat.model.Episode;
import se.slashat.slashat.model.Personal;
import se.slashat.slashat.service.PersonalService;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
public class ArchiveFragment extends ListFragment implements CallbackPair<Episode, Boolean> {
public final static String EPISODEPLAYER = "episodePlayer";
public static final String ADAPTER = "adapter";
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_archive, container, false);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Bundle bundle = savedInstanceState == null ? getArguments()
: savedInstanceState;
@SuppressWarnings("unchecked")
ArrayAdapter<Personal> adapter = (ArrayAdapter<Personal>) bundle.getSerializable(ADAPTER);
// If no adapter is found in the bundle create a new one with all
// people.
if (adapter == null) {
EpisodeLoaderAsyncTask episodeLoaderAsyncTask = new EpisodeLoaderAsyncTask(this);
episodeLoaderAsyncTask.execute();
}else{
setListAdapter(adapter);
}
}
/**
* Callback from the Adapter requesting an episode to be played.
*/
@Override
public void call(Episode episode, Boolean showDetails) {
if (showDetails) {
EpisodeDetailAdapter p = new EpisodeDetailAdapter(getActivity(), R.layout.archive_item_details, new Episode[] { episode },this);
Bundle bundle = new Bundle();
bundle.putSerializable(ADAPTER, p);
ArchiveFragment archiveFragment = new ArchiveFragment();
archiveFragment.setArguments(bundle);
FragmentSwitcher.getInstance().switchFragment(archiveFragment, true);
} else {
ProgressDialog progressDialog = new ProgressDialog(getActivity());
progressDialog.setTitle("Buffrar avsnitt");
progressDialog.setMessage(episode.getFullEpisodeName());
progressDialog.show();
EpisodePlayer.getEpisodePlayer().stopPlay();
EpisodePlayer.getEpisodePlayer().initializePlayer(episode.getStreamUrl(), episode.getFullEpisodeName(), 0, progressDialog);
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
14a7b07d8d1f72798c3ed3d9b501bf73dd0cf9d6
|
329307375d5308bed2311c178b5c245233ac6ff1
|
/src/com/tencent/mm/protocal/b/jy.java
|
80e1c0b84e0d9922f1791860d551f4b22f950753
|
[] |
no_license
|
ZoneMo/com.tencent.mm
|
6529ac4c31b14efa84c2877824fa3a1f72185c20
|
dc4f28aadc4afc27be8b099e08a7a06cee1960fe
|
refs/heads/master
| 2021-01-18T12:12:12.843406
| 2015-07-05T03:21:46
| 2015-07-05T03:21:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,785
|
java
|
package com.tencent.mm.protocal.b;
import java.util.LinkedList;
public final class jy
extends com.tencent.mm.al.a
{
public LinkedList bDC = new LinkedList();
protected final int a(int paramInt, Object... paramVarArgs)
{
if (paramInt == 0)
{
((a.a.a.c.a)paramVarArgs[0]).d(1, 8, bDC);
return 0;
}
if (paramInt == 1) {
return a.a.a.a.c(1, 8, bDC) + 0;
}
if (paramInt == 2)
{
paramVarArgs = (byte[])paramVarArgs[0];
bDC.clear();
paramVarArgs = new a.a.a.a.a(paramVarArgs, hfZ);
for (paramInt = com.tencent.mm.al.a.a(paramVarArgs); paramInt > 0; paramInt = com.tencent.mm.al.a.a(paramVarArgs)) {
if (!super.a(paramVarArgs, this, paramInt)) {
paramVarArgs.aVo();
}
}
return 0;
}
if (paramInt == 3)
{
Object localObject1 = (a.a.a.a.a)paramVarArgs[0];
jy localjy = (jy)paramVarArgs[1];
paramInt = ((Integer)paramVarArgs[2]).intValue();
switch (paramInt)
{
default:
return -1;
}
paramVarArgs = ((a.a.a.a.a)localObject1).pL(paramInt);
int i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
Object localObject2 = (byte[])paramVarArgs.get(paramInt);
localObject1 = new kc();
localObject2 = new a.a.a.a.a((byte[])localObject2, hfZ);
for (boolean bool = true; bool; bool = ((kc)localObject1).a((a.a.a.a.a)localObject2, (com.tencent.mm.al.a)localObject1, com.tencent.mm.al.a.a((a.a.a.a.a)localObject2))) {}
bDC.add(localObject1);
paramInt += 1;
}
return 0;
}
return -1;
}
}
/* Location:
* Qualified Name: com.tencent.mm.protocal.b.jy
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
6366dad17dcf192a7b523da78316506d749cd8df
|
12ddd902bc6a9ac00ecf03f7706ff827e925dbbe
|
/src/TemplateMethod/Multiliplty.java
|
59e2e44f6d8ce3b7129bc94529b445be06ab0e1f
|
[] |
no_license
|
chengyue5923/javaMethod
|
09bfa177ff5a3b24506d00c1127996d6b7e9d6d0
|
bd4d107ca42fb57c23c02100e89dd49868261be2
|
refs/heads/master
| 2021-01-20T13:07:05.653569
| 2017-05-06T09:15:49
| 2017-05-06T09:15:49
| 90,451,350
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 198
|
java
|
package TemplateMethod;
public class Multiliplty extends AnstractCalculator {
@Override
public int calculate(int num1, int num2) {
// TODO Auto-generated method stub
return num1*num2;
}
}
|
[
"chengyue5923@163.com"
] |
chengyue5923@163.com
|
5f6082bdedec0cd4a8cfe5f40ea9a70ab84b91cd
|
7e14a944b5e26a919d9bd286a4c7f62cf42a4ca7
|
/RM-EMPRESARIAL-ejb/src/main/java/com/rm/empresarial/servicio/ProvinciaServicio.java
|
c740fb498016701b3ac19edf72b480f05827ee2a
|
[] |
no_license
|
bryan1090/RegistroPropiedad
|
7bcca20dbb1a67da97c85716b67d516916aee3fa
|
182406c840187a6cc31458f38522f717cc34e258
|
refs/heads/master
| 2022-07-07T08:06:20.251959
| 2020-01-02T03:02:34
| 2020-01-02T03:02:34
| 231,295,897
| 0
| 0
| null | 2022-06-30T20:22:05
| 2020-01-02T02:50:13
|
Java
|
UTF-8
|
Java
| false
| false
| 444
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.rm.empresarial.servicio;
import com.rm.empresarial.puente.ProvinciaPuente;
import javax.ejb.LocalBean;
import javax.ejb.Stateless;
/**
*
* @author Prueba
*/
@LocalBean
@Stateless
public class ProvinciaServicio extends ProvinciaPuente{
}
|
[
"42019366+bryan1090@users.noreply.github.com"
] |
42019366+bryan1090@users.noreply.github.com
|
18e50b0d69d27f5df73a70221e61f34e3186f527
|
5245085c230929cdb91db049672f8f276646560c
|
/mula-base/src/main/java/org/mula/finance/core/io/RewireDBImporter.java
|
307180277fd8ff6285365f04fefdfd5cbef5a3e9
|
[] |
no_license
|
katrinaannhadi/MULAFinanceApp
|
9e7371778d2fe2fbcc61e94cd6d3832409cd6115
|
3130dbd1dfc7438268621cf0320c0856e836e00e
|
refs/heads/master
| 2022-04-25T04:50:36.130679
| 2020-04-30T03:51:17
| 2020-04-30T03:51:17
| 258,404,445
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,133
|
java
|
/* Mula */
package org.mula.finance.core.io;
import androidx.annotation.*;
import org.mula.finance.core.database.Cursor;
import org.mula.finance.core.database.Database;
import org.mula.finance.core.database.DatabaseOpener;
import org.mula.finance.core.models.Frequency;
import org.mula.finance.core.models.Habit;
import org.mula.finance.core.models.HabitList;
import org.mula.finance.core.models.ModelFactory;
import org.mula.finance.core.models.Reminder;
import org.mula.finance.core.models.Timestamp;
import org.mula.finance.core.models.WeekdayList;
import org.mula.finance.core.utils.DateUtils;
import java.io.*;
import java.util.*;
import javax.inject.*;
/**
* Class that imports database files exported by Rewire.
*/
public class RewireDBImporter extends AbstractImporter
{
private ModelFactory modelFactory;
@NonNull
private final DatabaseOpener opener;
@Inject
public RewireDBImporter(@NonNull HabitList habits,
@NonNull ModelFactory modelFactory,
@NonNull DatabaseOpener opener)
{
super(habits);
this.modelFactory = modelFactory;
this.opener = opener;
}
@Override
public boolean canHandle(@NonNull File file) throws IOException
{
if (!isSQLite3File(file)) return false;
Database db = opener.open(file);
Cursor c = db.query("select count(*) from SQLITE_MASTER " +
"where name='CHECKINS' or name='UNIT'");
boolean result = (c.moveToNext() && c.getInt(0) == 2);
c.close();
db.close();
return result;
}
@Override
public void importHabitsFromFile(@NonNull File file) throws IOException
{
Database db = opener.open(file);
db.beginTransaction();
createHabits(db);
db.setTransactionSuccessful();
db.endTransaction();
db.close();
}
private void createHabits(Database db)
{
Cursor c = null;
try
{
c = db.query("select _id, name, description, schedule, " +
"active_days, repeating_count, days, period " +
"from habits");
if (!c.moveToNext()) return;
do
{
int id = c.getInt(0);
String name = c.getString(1);
String description = c.getString(2);
int schedule = c.getInt(3);
String activeDays = c.getString(4);
int repeatingCount = c.getInt(5);
int days = c.getInt(6);
int periodIndex = c.getInt(7);
Habit habit = modelFactory.buildHabit();
habit.setName(name);
habit.setDescription(description == null ? "" : description);
int periods[] = { 7, 31, 365 };
int numerator, denominator;
switch (schedule)
{
case 0:
numerator = activeDays.split(",").length;
denominator = 7;
break;
case 1:
numerator = days;
denominator = (periods[periodIndex]);
break;
case 2:
numerator = 1;
denominator = repeatingCount;
break;
default:
throw new IllegalStateException();
}
habit.setFrequency(new Frequency(numerator, denominator));
habitList.add(habit);
createReminder(db, habit, id);
createCheckmarks(db, habit, id);
} while (c.moveToNext());
}
finally
{
if (c != null) c.close();
}
}
private void createCheckmarks(@NonNull Database db,
@NonNull Habit habit,
int rewireHabitId)
{
Cursor c = null;
try
{
String[] params = { Integer.toString(rewireHabitId) };
c = db.query(
"select distinct date from checkins where habit_id=? and type=2",
params);
if (!c.moveToNext()) return;
do
{
String date = c.getString(0);
int year = Integer.parseInt(date.substring(0, 4));
int month = Integer.parseInt(date.substring(4, 6));
int day = Integer.parseInt(date.substring(6, 8));
GregorianCalendar cal = DateUtils.getStartOfTodayCalendar();
cal.set(year, month - 1, day);
habit.getRepetitions().toggle(new Timestamp(cal));
} while (c.moveToNext());
}
finally
{
if (c != null) c.close();
}
}
private void createReminder(Database db, Habit habit, int rewireHabitId)
{
String[] params = { Integer.toString(rewireHabitId) };
Cursor c = null;
try
{
c = db.query(
"select time, active_days from reminders where habit_id=? limit 1",
params);
if (!c.moveToNext()) return;
int rewireReminder = Integer.parseInt(c.getString(0));
if (rewireReminder <= 0 || rewireReminder >= 1440) return;
boolean reminderDays[] = new boolean[7];
String activeDays[] = c.getString(1).split(",");
for (String d : activeDays)
{
int idx = (Integer.parseInt(d) + 1) % 7;
reminderDays[idx] = true;
}
int hour = rewireReminder / 60;
int minute = rewireReminder % 60;
WeekdayList days = new WeekdayList(reminderDays);
Reminder reminder = new Reminder(hour, minute, days);
habit.setReminder(reminder);
habitList.update(habit);
}
finally
{
if (c != null) c.close();
}
}
}
|
[
"katrinaann.abdulhadi@student.unsw.edu.au"
] |
katrinaann.abdulhadi@student.unsw.edu.au
|
a9a4a060abf3e9b3ffd1c4cb861fea01c4bc7d77
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/40/org/apache/commons/math/dfp/BracketingNthOrderBrentSolverDFP_getMaximalOrder_89.java
|
806ada00c334d637913bc3baa09e63488db2392e
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 854
|
java
|
org apach common math dfp
modif
href http mathworld wolfram brent method brentsmethod html brent algorithm
respect origin brent algorithm
return chosen current interv
user link allow solut allowedsolut
maxim order invert polynomi root search
user invert quadrat
interv bracket root
version
bracket nth order brent solver dfp bracketingnthorderbrentsolverdfp
maxim order
maxim order
maxim order getmaximalord
maxim order maximalord
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
94e300d887c7747d8961e2ecb5d32fc141e95369
|
3a47d7d1d6968daea4f2154de479ac18b17ad7db
|
/com.sg.vim/src/com/sg/vim/service/fuellabel/HelloWorld.java
|
e500f9a35db62297210c7c21714572f720c65f65
|
[] |
no_license
|
sgewuhan/vim
|
ef64fce49f9ab481521a21901157c81910e57e5e
|
d7d193f5be3b357bace4e0f7b703281ade15ae7f
|
refs/heads/master
| 2021-01-19T03:12:56.079503
| 2013-06-26T00:51:24
| 2013-06-26T00:51:24
| 9,443,167
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 762
|
java
|
package com.sg.vim.service.fuellabel;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "HelloWorld")
public class HelloWorld {
}
|
[
"ghuazh@gmail.com"
] |
ghuazh@gmail.com
|
9fa5670b26eeb6f84762e3764d27d001cfda9586
|
75c4712ae3f946db0c9196ee8307748231487e4b
|
/src/main/java/com/alipay/api/response/AlipayCommerceDataResultSendResponse.java
|
285dc2a1043abda5d342f1efb77aab1f17b0ef35
|
[
"Apache-2.0"
] |
permissive
|
yuanbaoMarvin/alipay-sdk-java-all
|
70a72a969f464d79c79d09af8b6b01fa177ac1be
|
25f3003d820dbd0b73739d8e32a6093468d9ed92
|
refs/heads/master
| 2023-06-03T16:54:25.138471
| 2021-06-25T14:48:21
| 2021-06-25T14:48:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 375
|
java
|
package com.alipay.api.response;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.commerce.data.result.send response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class AlipayCommerceDataResultSendResponse extends AlipayResponse {
private static final long serialVersionUID = 7489223471598993392L;
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
9fae828c0a42d665c103bff3c807572bfe046594
|
5598faaaaa6b3d1d8502cbdaca903f9037d99600
|
/code_changes/Apache_projects/HDFS-142/f0d8a5db10a28484ad3fcd66601475ebceee3c84/TestNameNodeMXBean.java
|
ec52d558b3e028e6aa7171cfcb81b294d1b17b93
|
[] |
no_license
|
SPEAR-SE/LogInBugReportsEmpirical_Data
|
94d1178346b4624ebe90cf515702fac86f8e2672
|
ab9603c66899b48b0b86bdf63ae7f7a604212b29
|
refs/heads/master
| 2022-12-18T02:07:18.084659
| 2020-09-09T16:49:34
| 2020-09-09T16:49:34
| 286,338,252
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,894
|
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.hadoop.hdfs.server.namenode;
import java.lang.management.ManagementFactory;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.hadoop.hdfs.server.namenode.FSNamesystem;
import org.junit.Test;
import junit.framework.Assert;
/**
* Class for testing {@link NameNodeMXBean} implementation
*/
public class TestNameNodeMXBean {
@Test
public void testNameNodeMXBeanInfo() throws Exception {
Configuration conf = new Configuration();
MiniDFSCluster cluster = null;
try {
cluster = new MiniDFSCluster(conf, 1, true, null);
cluster.waitActive();
FSNamesystem fsn = cluster.getNameNode().namesystem;
MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
ObjectName mxbeanName = new ObjectName("HadoopInfo:type=NameNodeInfo");
// get attribute "ClusterId"
String clusterId = (String) mbs.getAttribute(mxbeanName, "ClusterId");
Assert.assertEquals(fsn.getClusterId(), clusterId);
// get attribute "BlockpoolId"
String blockpoolId = (String) mbs.getAttribute(mxbeanName, "BlockpoolId");
Assert.assertEquals(fsn.getBlockpoolId(), blockpoolId);
// get attribute "Version"
String version = (String) mbs.getAttribute(mxbeanName, "Version");
Assert.assertEquals(fsn.getVersion(), version);
// get attribute "Used"
Long used = (Long) mbs.getAttribute(mxbeanName, "Used");
Assert.assertEquals(fsn.getUsed(), used.longValue());
// get attribute "Total"
Long total = (Long) mbs.getAttribute(mxbeanName, "Total");
Assert.assertEquals(fsn.getTotal(), total.longValue());
// get attribute "safemode"
String safemode = (String) mbs.getAttribute(mxbeanName, "Safemode");
Assert.assertEquals(fsn.getSafemode(), safemode);
// get attribute nondfs
Long nondfs = (Long) (mbs.getAttribute(mxbeanName, "NonDfsUsedSpace"));
Assert.assertEquals(fsn.getNonDfsUsedSpace(), nondfs.longValue());
// get attribute percentremaining
Float percentremaining = (Float) (mbs.getAttribute(mxbeanName,
"PercentRemaining"));
Assert.assertEquals(fsn.getPercentRemaining(), percentremaining
.floatValue());
// get attribute Totalblocks
Long totalblocks = (Long) (mbs.getAttribute(mxbeanName, "TotalBlocks"));
Assert.assertEquals(fsn.getTotalBlocks(), totalblocks.longValue());
// get attribute alivenodeinfo
String alivenodeinfo = (String) (mbs.getAttribute(mxbeanName,
"LiveNodes"));
Assert.assertEquals(fsn.getLiveNodes(), alivenodeinfo);
// get attribute deadnodeinfo
String deadnodeinfo = (String) (mbs.getAttribute(mxbeanName,
"DeadNodes"));
Assert.assertEquals(fsn.getDeadNodes(), deadnodeinfo);
} finally {
if (cluster != null) {
cluster.shutdown();
}
}
}
}
|
[
"archen94@gmail.com"
] |
archen94@gmail.com
|
abf6964a0eb2fb191e4dd4b854df205d6fa4666c
|
da68446ad3fa56c5d5f9a55b4428e21e0f0ed406
|
/src/main/java/mac/appkit/enums/NSStackViewGravity.java
|
01943e8b30d8a32c5793d63b219572ad0d55a91a
|
[] |
no_license
|
multi-os-engine/moe-mac-core
|
90d9764ab38807cac004aed70b68ca54c5c8a79b
|
0ffb7b52af9cdd75f25b33d0c4723903a521d2f7
|
refs/heads/master
| 2020-04-06T06:58:01.357013
| 2016-08-09T18:57:05
| 2016-08-09T18:57:05
| 65,319,982
| 4
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,083
|
java
|
/*
Copyright 2014-2016 Intel Corporation
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 mac.appkit.enums;
import org.moe.natj.general.ann.Generated;
@Generated
public final class NSStackViewGravity {
@Generated
private NSStackViewGravity() {
}
@Generated
public static final long Top = 0x0000000000000001L;
@Generated
public static final long Leading = 0x0000000000000001L;
@Generated
public static final long Center = 0x0000000000000002L;
@Generated
public static final long Bottom = 0x0000000000000003L;
@Generated
public static final long Trailing = 0x0000000000000003L;
}
|
[
"alexey.suhov@intel.com"
] |
alexey.suhov@intel.com
|
2b44c3f1f2e06b59a04eda7a1ad5829b1f531a1d
|
b863a4cb472574417305d085d11155f05a31f2b5
|
/src/goryachev/fxtexteditor/EditorSelection.java
|
61d5177d5d686407d2b7d46cfb38292351a529c5
|
[
"Apache-2.0"
] |
permissive
|
andy-goryachev/FxTextEditor
|
0d09a4eedb88bf4580b7d2647687124869b51877
|
44730cc1a24165c4214216cdbfaecb17d2949138
|
refs/heads/master
| 2023-02-23T19:46:15.865245
| 2023-02-06T00:18:56
| 2023-02-06T00:18:56
| 186,166,002
| 15
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,340
|
java
|
// Copyright © 2017-2023 Andy Goryachev <andy@goryachev.com>
package goryachev.fxtexteditor;
import goryachev.common.util.CKit;
/**
* An immutable object that represents text selection within FxEditor.
* FxTextEditor supports neither multiple carets nor multiple selection segments.
*/
public class EditorSelection
{
public static final EditorSelection EMPTY = createEmpty();
private final SelectionSegment segment;
public EditorSelection(SelectionSegment segment)
{
this.segment = segment;
}
public String toString()
{
return CKit.toStringOrNull(segment);
}
private static EditorSelection createEmpty()
{
return new EditorSelection(new SelectionSegment(Marker.ZERO, Marker.ZERO, false));
}
/** returns original segment array */
public SelectionSegment getSegment()
{
return segment;
}
public boolean isEmpty()
{
return (segment == null);
}
public boolean isNotEmpty()
{
return !isEmpty();
}
public EditorSelection getSelection()
{
return new EditorSelection(segment);
}
public Marker getCaret()
{
if(isEmpty())
{
return null;
}
return segment.getCaret();
}
public Marker getAnchor()
{
if(isEmpty())
{
return null;
}
return segment.getAnchor();
}
}
|
[
"andy@goryachev.com"
] |
andy@goryachev.com
|
f5fb9b2f619f31f7523605b056570e0dda6d8bff
|
a00326c0e2fc8944112589cd2ad638b278f058b9
|
/src/main/java/000/129/478/CWE190_Integer_Overflow__int_getParameter_Servlet_add_66b.java
|
1e7ab2ad09a1a28d10b534a72b5181963ddfb3e1
|
[] |
no_license
|
Lanhbao/Static-Testing-for-Juliet-Test-Suite
|
6fd3f62713be7a084260eafa9ab221b1b9833be6
|
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
|
refs/heads/master
| 2020-08-24T13:34:04.004149
| 2019-10-25T09:26:00
| 2019-10-25T09:26:00
| 216,822,684
| 0
| 1
| null | 2019-11-08T09:51:54
| 2019-10-22T13:37:13
|
Java
|
UTF-8
|
Java
| false
| false
| 2,058
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__int_getParameter_Servlet_add_66b.java
Label Definition File: CWE190_Integer_Overflow__int.label.xml
Template File: sources-sinks-66b.tmpl.java
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: getParameter_Servlet Read data from a querystring using getParameter()
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: add
* GoodSink: Ensure there will not be an overflow before adding 1 to data
* BadSink : Add 1 to data, which can cause an overflow
* Flow Variant: 66 Data flow: data passed in an array from one method to another in different source files in the same package
*
* */
import javax.servlet.http.*;
public class CWE190_Integer_Overflow__int_getParameter_Servlet_add_66b
{
public void badSink(int dataArray[] , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data = dataArray[2];
/* POTENTIAL FLAW: if data == Integer.MAX_VALUE, this will overflow */
int result = (int)(data + 1);
IO.writeLine("result: " + result);
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(int dataArray[] , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data = dataArray[2];
/* POTENTIAL FLAW: if data == Integer.MAX_VALUE, this will overflow */
int result = (int)(data + 1);
IO.writeLine("result: " + result);
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink(int dataArray[] , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data = dataArray[2];
/* FIX: Add a check to prevent an overflow from occurring */
if (data < Integer.MAX_VALUE)
{
int result = (int)(data + 1);
IO.writeLine("result: " + result);
}
else
{
IO.writeLine("data value is too large to perform addition.");
}
}
}
|
[
"anhtluet12@gmail.com"
] |
anhtluet12@gmail.com
|
eb5d9be61aeeb59b24b73175f7b6c0e31aa236c8
|
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
|
/sources/com/airbnb/android/contentframework/fragments/StoryFeedFragment$$Lambda$1.java
|
2b19f3abdffe1650a989d38083a1ea0940e2cf71
|
[] |
no_license
|
jasonnth/AirCode
|
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
|
d37db1baa493fca56f390c4205faf5c9bbe36604
|
refs/heads/master
| 2020-07-03T08:35:24.902940
| 2019-08-12T03:34:56
| 2019-08-12T03:34:56
| 201,842,970
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 652
|
java
|
package com.airbnb.android.contentframework.fragments;
import android.support.p000v4.widget.SwipeRefreshLayout.OnRefreshListener;
final /* synthetic */ class StoryFeedFragment$$Lambda$1 implements OnRefreshListener {
private final StoryFeedFragment arg$1;
private StoryFeedFragment$$Lambda$1(StoryFeedFragment storyFeedFragment) {
this.arg$1 = storyFeedFragment;
}
public static OnRefreshListener lambdaFactory$(StoryFeedFragment storyFeedFragment) {
return new StoryFeedFragment$$Lambda$1(storyFeedFragment);
}
public void onRefresh() {
StoryFeedFragment.lambda$onCreateView$0(this.arg$1);
}
}
|
[
"thanhhuu2apc@gmail.com"
] |
thanhhuu2apc@gmail.com
|
c5990f13110a107d3b12846502d5ea7315cb2d49
|
4d05782d86c549eeea0e78fdba5b40f1d03862dc
|
/app/src/main/java/tech/boshu/changjiangshidai/ui/activity/stockinfo/allocatehistory/IStockAllocateHistoryPresenter.java
|
f2c5d1729aec245d5236f84744f4aa335a53c491
|
[] |
no_license
|
JETYIN/changjiang
|
4898367cbff2b1c981aebb4b46df78a57d1d4967
|
ff16ed18dddc8e197f6b2458e6b71bb8f2941fb2
|
refs/heads/master
| 2020-09-22T06:05:35.757974
| 2016-08-29T14:24:14
| 2016-08-29T14:24:14
| 66,849,827
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 356
|
java
|
package tech.boshu.changjiangshidai.ui.activity.stockinfo.allocatehistory;
import tech.boshu.changjiangshidai.libs.activity.IBasePresenter;
/**
* @author allipper
* @version 1.00 2016/1/6
* @(#)IStockAllocateHistoryPresenter.java
*/
public interface IStockAllocateHistoryPresenter extends IBasePresenter {
void add();
void gotoSearch();
}
|
[
"494699974@qq.com"
] |
494699974@qq.com
|
be8f41680d056b05e46400dd81e89aee1fc19698
|
45dd9e8dc389f9f99e4f4e626dd2b03aec7329bc
|
/app/src/main/java/com/aiqing/kaiheiba/MyActivity.java
|
e507cce617f0e8ca0273734914431c4654a931b4
|
[] |
no_license
|
huxq17/app
|
fb0538f375ad2c85c677da58429bdc10ea5437ab
|
d80be52541ce064affbc4b87455a4e6861bc432c
|
refs/heads/master
| 2020-03-07T09:46:06.305994
| 2018-05-19T14:28:23
| 2018-05-19T14:28:23
| 127,415,644
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,023
|
java
|
package com.aiqing.kaiheiba;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import com.aiqing.kaiheiba.common.BaseActivity;
import com.aiqing.kaiheiba.login.LoginAct;
import com.aiqing.kaiheiba.neteasyim.IMActivity;
import com.aiqing.kaiheiba.personal.download.MyDownloadAct;
import com.aiqing.kaiheiba.personal.invite.InviteFriendAct;
import com.aiqing.kaiheiba.personal.profile.EditPersonProfileAct;
import com.aiqing.kaiheiba.personal.relationship.MyFansAct;
import com.aiqing.kaiheiba.personal.relationship.MyFollowAct;
import com.aiqing.kaiheiba.personal.wallet.MyWalletAct;
import com.aiqing.kaiheiba.personal.wallet.TradeRecordAct;
import com.aiqing.kaiheiba.settings.SettingsAct;
import pub.devrel.easypermissions.AfterPermissionGranted;
public class MyActivity extends BaseActivity {
private final int RC_BASIC_PERMISSIONS = 1;
/**
* 基本权限管理
*/
private final String[] BASIC_PERMISSIONS = new String[]{
android.Manifest.permission.WRITE_EXTERNAL_STORAGE,
android.Manifest.permission.READ_EXTERNAL_STORAGE,
android.Manifest.permission.CAMERA,
android.Manifest.permission.READ_PHONE_STATE,
android.Manifest.permission.RECORD_AUDIO,
android.Manifest.permission.ACCESS_COARSE_LOCATION,
android.Manifest.permission.ACCESS_FINE_LOCATION
};
@AfterPermissionGranted(RC_BASIC_PERMISSIONS)
private void onBasicPermissionGranted() {
// takePhoto();
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void jumpToPersonalProfile(View v) {
jumpTo(EditPersonProfileAct.class);
}
public void jumpToMyFollow(View v) {
jumpTo(MyFollowAct.class);
}
public void jumpToMyFans(View v) {
jumpTo(MyFansAct.class);
}
public void jumpToMyDowload(View v) {
jumpTo(MyDownloadAct.class);
}
public void jumpToMyWallet(View v) {
jumpTo(MyWalletAct.class);
}
public void jumpToTradeRecord(View v) {
jumpTo(TradeRecordAct.class);
}
public void jumpToInviteFriend(View v) {
jumpTo(InviteFriendAct.class);
}
public void jumpToSettings(View v) {
jumpTo(SettingsAct.class);
}
public void jumpToLogin(View v) {
jumpTo(LoginAct.class);
}
public void jumpToIM(View v) {
jumpTo(IMActivity.class);
}
private void jumpTo(Class<?> activity) {
Intent intent = new Intent(this, activity);
startActivity(intent);
}
public static void start(Context context) {
Intent intent = new Intent(context, MyActivity.class);
// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
context.startActivity(intent);
}
}
|
[
"huxq17@163.com"
] |
huxq17@163.com
|
7dd799a7d945b0f19b9b7f1c8668f90bcd93c860
|
b8afc09e004f705b06561d3540bf84f348d6d207
|
/core/src/main/java/org/kohsuke/stapler/compression/CompressionServletResponse.java
|
0bcf5aea59a9d65c3eb32ec5a0320808b8e609e8
|
[
"BSD-2-Clause"
] |
permissive
|
jglick/stapler
|
4341fa6226a785d76704b1aa673d173b040ab04c
|
c6f7b324ddcb082e9c810b89debe8a401178b279
|
refs/heads/master
| 2023-02-07T22:06:35.564420
| 2013-04-29T16:42:16
| 2013-04-29T16:42:16
| 9,800,974
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,027
|
java
|
package org.kohsuke.stapler.compression;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.zip.GZIPOutputStream;
/**
* {@link HttpServletResponse} that recognizes Content-Encoding: gzip in the response header
* and acts accoringly.
*
* @author Kohsuke Kawaguchi
*/
public class CompressionServletResponse extends HttpServletResponseWrapper {
/**
* If not null, we are compressing the stream.
*/
private ServletOutputStream stream;
private PrintWriter writer;
public CompressionServletResponse(HttpServletResponse response) {
super(response);
}
@Override
public void setHeader(String name, String value) {
super.setHeader(name, value);
activateCompressionIfNecessary(name,value);
}
@Override
public void addHeader(String name, String value) {
super.addHeader(name, value);
activateCompressionIfNecessary(name, value);
}
private void activateCompressionIfNecessary(String name, String value) {
try {
if (name.equals("Content-Encoding") && value.equals("gzip")) {
if (stream==null)
stream = new FilterServletOutputStream(new GZIPOutputStream(super.getOutputStream()));
}
} catch (IOException e) {
throw new RuntimeException(e);
}
}
@Override
public PrintWriter getWriter() throws IOException {
if (writer!=null) return writer;
if (stream!=null) {
writer = new PrintWriter(new OutputStreamWriter(stream,getCharacterEncoding()));
return writer;
}
return super.getWriter();
}
@Override
public ServletOutputStream getOutputStream() throws IOException {
if (stream!=null) return stream;
return super.getOutputStream();
}
}
|
[
"kk@kohsuke.org"
] |
kk@kohsuke.org
|
de2ffc79c4942b640115eb48ee77dc75961d5e77
|
ea91069f5ac25973d612d333c5dd29ee3c3f7d3b
|
/app/src/main/java/greencode/ir/consulant/dialog/FreeTimeInterface.java
|
fddd7ea1e6d512f99b0b41144f0da1ef971446e1
|
[] |
no_license
|
alirezat66/consultant
|
fe797cb9050f5dbc5f4387b2f4811767e7d81fb4
|
8df40a38ab68ecc33dd7ebbadf93908fd03fd4a2
|
refs/heads/master
| 2022-02-05T19:20:17.577589
| 2019-06-18T10:16:30
| 2019-06-18T10:16:30
| 192,516,171
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 155
|
java
|
package greencode.ir.consulant.dialog;
public interface FreeTimeInterface {
void onSuccess(String start,String end);
public void onRejected();
}
|
[
"alirezataghizadeh66@gmail.com"
] |
alirezataghizadeh66@gmail.com
|
c24c6f9100cbdb580d90214dc00f06880ef17e89
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Lang/31/org/apache/commons/lang3/exception/ContextedRuntimeException_getValue_162.java
|
ca812f519f0066a86cfaebacd114254b6e422611
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,589
|
java
|
org apach common lang3 except
runtim except easi safe add contextu inform
except trace insuffici provid rapid diagnosi issu
frequent need select piec local contextu data
provid data tricki due concern format null
context except approach except creat
map context valu addit inform automat includ
messag print stack trace
check version except provid context except contextedexcept
write code
pre
except
context except contextedexcept error post account transact
add addvalu account number accountnumb account number accountnumb
add addvalu amount post amountpost amount post amountpost
add addvalu previou balanc previousbal previou balanc previousbal
pre
output print stacktrac printstacktrac written log
pre
org apach common lang3 except context runtim except contextedruntimeexcept java lang except error post account transact
except context
account number accountnumb
amount post amountpost
previou balanc previousbal
org apach common lang3 except context runtim except test contextedruntimeexceptiontest test add testaddvalu context except test contextedexceptiontest java
rest trace
pre
context except contextedexcept
author apach softwar foundat
author ashmor
author ouml schaibl
context runtim except contextedruntimeexcept runtim except runtimeexcept except context exceptioncontext
retriev contextu data label
param label label contextu
contextu label
object getvalu string label
except context exceptioncontext getvalu label
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
4c001f4e022ab1151f7ed0b068c5cdbabad1357d
|
07b996b8440dbe5499b857f284e0aa86193f2faa
|
/src/test/java/com/sky/ddt/service/UserServiceTest2.java
|
b0499d7e01baedef2d7f1e39e2a4c2d65e2a5720
|
[] |
no_license
|
skywhitebai/ddt
|
2b0b35194199abf2126e8297316ad16fec2186b9
|
33ce8da01d75f185c832e32ac117e23a7040cf64
|
refs/heads/master
| 2023-06-07T00:29:53.206163
| 2023-06-04T04:19:53
| 2023-06-04T04:19:53
| 311,826,029
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 773
|
java
|
package com.sky.ddt.service;
import com.sky.ddt.BaseControllerTest;
import com.sky.ddt.entity.User;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import java.util.List;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@ContextConfiguration(locations = {"classpath*:/spring-mvc.xml","classpath*:spring-mybatis.xml"})
public class UserServiceTest2 {
@Autowired
public IUserService userService;
@Test
public void getUserList() {
System.out.println("123");
}
}
|
[
"baixueping@rfchina.com"
] |
baixueping@rfchina.com
|
b3d17cf12972f3710b71e91d5edf53a9c3c65da3
|
b93e801bb9a11fd820201ad56894b896e0831ff1
|
/CleverWeb-Service/src/main/java/com/cleverweb/service/fhdb/brdb/BRdbManager.java
|
53d5fd8bc89b6d8433d66cd24ca6e313dbe664bf
|
[
"Apache-2.0"
] |
permissive
|
showtofly/CleverWeb
|
c41569f7a238112196fa37a8cb7f317bc0a49a97
|
f7a9079f2e3206c255fe37ae6b750a3f453807c0
|
refs/heads/master
| 2023-04-13T13:34:35.442782
| 2017-02-06T14:29:10
| 2017-02-06T14:29:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,098
|
java
|
package com.cleverweb.service.fhdb.brdb;
import java.util.List;
import com.cleverweb.core.entity.Page;
import com.cleverweb.common.util.PageData;
/**
* 说明: 数据库管理接口
* 创建人:FH Q313596790
* 创建时间:2016-03-30
* @version
*/
public interface BRdbManager{
/**新增
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**删除
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**修改
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**列表
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**列表(全部)
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**通过id获取数据
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
/**批量删除
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
}
|
[
"863475209@qq.com"
] |
863475209@qq.com
|
63bf692c3bf4ba310ba353d93126af7b597463c0
|
6a14cc6ffacbe4459b19f882b33d307ab08e8783
|
/aliyun-java-sdk-drds/src/main/java/com/aliyuncs/drds/transform/v20150413/CreateTableResponseUnmarshaller.java
|
1edd45e0dc7ef1780df350ca1bd14da40e12d8e7
|
[
"Apache-2.0"
] |
permissive
|
425296516/aliyun-openapi-java-sdk
|
ea547c7dc8f05d1741848e1db65df91b19a390da
|
0ed6542ff71e907bab3cf21311db3bfbca6ca84c
|
refs/heads/master
| 2023-09-04T18:27:36.624698
| 2015-11-10T07:52:55
| 2015-11-10T07:52:55
| 46,623,385
| 1
| 2
| null | 2016-12-07T18:36:30
| 2015-11-21T16:28:33
|
Java
|
UTF-8
|
Java
| false
| false
| 1,354
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.aliyuncs.drds.transform.v20150413;
import com.aliyuncs.drds.model.v20150413.CreateTableResponse;
import com.aliyuncs.transform.UnmarshallerContext;
public class CreateTableResponseUnmarshaller {
public static CreateTableResponse unmarshall(CreateTableResponse createTableResponse, UnmarshallerContext context) {
createTableResponse.setRequestId(context.stringValue("CreateTableResponse.RequestId"));
createTableResponse.setTaskId(context.stringValue("CreateTableResponse.TaskId"));
return createTableResponse;
}
}
|
[
"lijie.ma@alibaba-inc.com"
] |
lijie.ma@alibaba-inc.com
|
2942da9b513be3e4c107165ac8350665fe66a199
|
514c4359c5379f0049ce4f9523aea4ef56a908a0
|
/sisyphos-core/src/main/java/org/ops4j/sisyphos/core/builder/DuringFluxBuilder.java
|
48964bf3dace5e35d8ac96f04053a36198a42df9
|
[
"Apache-2.0"
] |
permissive
|
hwellmann/org.ops4j.sisyphos
|
894a42a79f5dfea55d72eebfb45846bddb9acffa
|
05914831547d090b822ca2b1d9fac9f7762f08dd
|
refs/heads/master
| 2020-03-17T03:09:45.536428
| 2018-06-10T08:51:04
| 2018-06-10T08:51:04
| 133,223,042
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,442
|
java
|
/*
* Copyright 2018 OPS4J Contributors
*
* 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.ops4j.sisyphos.core.builder;
import org.ops4j.sisyphos.api.action.DuringBuilder;
import org.ops4j.sisyphos.api.session.Session;
import org.ops4j.sisyphos.core.common.ScenarioContext;
import reactor.core.publisher.Flux;
import reactor.retry.Repeat;
public class DuringFluxBuilder implements FluxBuilder {
private DuringBuilder duringBuilder;
public DuringFluxBuilder(DuringBuilder duringBuilder) {
this.duringBuilder = duringBuilder;
}
@Override
public Flux<Session> buildFlux(ScenarioContext context) {
FluxBuilderAdapter adapter = new FluxBuilderAdapter();
FluxBuilder fluxBuilder = adapter.adapt(duringBuilder.getStepBuilder());
return Repeat.times(Integer.MAX_VALUE).timeout(duringBuilder.getDuration())
.apply(fluxBuilder.buildFlux(context));
}
}
|
[
"harald.wellmann@gmx.de"
] |
harald.wellmann@gmx.de
|
ccc97b03a98579abe1a1076f8c4a156fe6430c1e
|
778d73eda9c72e1763d92a44f181d58d79205f8e
|
/framework/soa-web-framework/src/main/java/com/lebaoxun/soa/web/framework/http/UploadDownload.java
|
c436b499d5e52bfd3ea7abc3e27d4f394e8bed88
|
[] |
no_license
|
caiqianyi/guess
|
c3839e85dc600862fafa0901143b83719a773920
|
40784bcc7745371cd8ff6866031524942ba7c528
|
refs/heads/master
| 2021-09-25T21:56:50.024422
| 2018-10-26T02:37:17
| 2018-10-26T02:37:17
| 103,381,452
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,530
|
java
|
/**
*
*/
package com.lebaoxun.soa.web.framework.http;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.multipart.MultipartFile;
/**
* 上传下载
* @author xjc
*
*/
public class UploadDownload {
public static void dounload(HttpServletRequest request, HttpServletResponse response, String storeName) throws Exception{
request.setCharacterEncoding("UTF-8");
BufferedInputStream bis = null;
BufferedOutputStream bos = null;
//获取项目根目录
String ctxPath = request.getSession().getServletContext().getRealPath("");
//获取下载文件路径 (storeName 文件名称)
String downLoadPath = ctxPath+"/download/"+ storeName;
//获取文件的长度
long fileLength = new File(downLoadPath).length();
//设置文件输出类型
response.setContentType("application/octet-stream");
response.setHeader("Content-disposition", "attachment; filename=" + new String(storeName.getBytes("utf-8"), "ISO8859-1"));
//设置输出长度
response.setHeader("Content-Length", String.valueOf(fileLength));
//获取输入流
bis = new BufferedInputStream(new FileInputStream(downLoadPath));
//输出流
bos = new BufferedOutputStream(response.getOutputStream());
byte[] buff = new byte[2048];
int bytesRead;
while (-1 != (bytesRead = bis.read(buff, 0, buff.length))) {
bos.write(buff, 0, bytesRead);
}
//关闭流
bis.close();
bos.close();
}
public static Map<String, String> upload(MultipartFile file, HttpServletRequest request){
Map<String, String> resMap = new HashMap<String, String>();
String s = UUID.randomUUID().toString();
String replace = s.replace('-', '_');
String fileName = file.getOriginalFilename();
String newName = replace + "." + fileName.substring(fileName.lastIndexOf(".") + 1);
String path = request.getSession().getServletContext().getRealPath("upfile") + "/";
String pa = path+newName;
resMap.put("path", path+newName);
try {
file.transferTo(new File(path+newName));
resMap.put("flag", "VIP0000");
} catch (IllegalStateException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return resMap;
}
}
|
[
"270852221@qq.com"
] |
270852221@qq.com
|
0ba6c22ce7624b08b260b8663a1b569629ee86f6
|
6b1b0902a4000343820846ccaf57085287aeb311
|
/assignment2/at.ac.tuwien.big.forms.form/src/at/ac/tuwien/big/forms/form/FormRuntimeModule.java
|
68301a376889a8269f61c2a22e7c59666dd5417b
|
[] |
no_license
|
Model-Engineering-AG-34/model-engineering-ws14
|
5bdfd5e64152ec87d3644243d21039d7822689d8
|
95bf13fdd30c6296e4e39a7fd8f1ae7c0ccb3023
|
refs/heads/master
| 2020-03-29T13:47:47.026520
| 2015-01-12T21:22:56
| 2015-01-12T21:22:56
| 27,044,988
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 278
|
java
|
/*
* generated by Xtext
*/
package at.ac.tuwien.big.forms.form;
/**
* Use this class to register components to be used at runtime / without the Equinox extension registry.
*/
public class FormRuntimeModule extends at.ac.tuwien.big.forms.form.AbstractFormRuntimeModule {
}
|
[
"christian.beikov@gmail.com"
] |
christian.beikov@gmail.com
|
45c5c9691c0a6d4758c2d632c664bb8e2bfbc81a
|
146ab29e1d12a238c01019bb0c331790d97ecde7
|
/src/main/java/com/mashibing/service/WyCarSpaceManageService.java
|
359d70e8a046734046df7351953482096e108868
|
[] |
no_license
|
DT0352/family_service
|
9d4477af02e934614bc710b1f3f54bed1fe5856b
|
50dc5801dd74c0030f80f0c9a0588106174d0d40
|
refs/heads/master
| 2023-02-16T14:31:22.413132
| 2021-01-09T07:37:47
| 2021-01-09T07:37:47
| 328,101,063
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 307
|
java
|
package com.mashibing.service;
import com.mashibing.bean.WyCarSpaceManage;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 车位管理 服务类
* </p>
*
* @author lian
* @since 2021-01-09
*/
public interface WyCarSpaceManageService extends IService<WyCarSpaceManage> {
}
|
[
"18535222330fzd@gmail.com"
] |
18535222330fzd@gmail.com
|
1ca08178b025c77428a801454dda00676815d48a
|
3b539d430d8c66e9f726982737028f3aa7c707d3
|
/src/com/android/tradefed/targetprep/TargetSetupError.java
|
b501e8f8e22609072db2ea92d3710cbbfd928f02
|
[] |
no_license
|
hi-cbh/CrashMonkey4Android_tradefederation_C
|
e6ea1fdf5344021c29cab6b019613a4c53834369
|
6c539ad75bdf930bab00f8a789048e08a259b76f
|
refs/heads/master
| 2020-12-24T10:11:07.533244
| 2016-11-09T02:10:13
| 2016-11-09T02:10:13
| 73,245,095
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,519
|
java
|
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.tradefed.targetprep;
/**
* A fatal error occurred while preparing the target for testing.
*/
public class TargetSetupError extends Exception {
private static final long serialVersionUID = 2202987086655357201L;
/**
* Constructs a new (@link TargetSetupError} with a meaningful error message.
*
* @param reason a error message describing the cause of the error
*/
public TargetSetupError(String reason) {
super(reason);
}
/**
* Constructs a new (@link TargetSetupError} with a meaningful error message, and a
* cause.
*
* @param reason a detailed error message.
* @param cause a {@link Throwable} capturing the original cause of the TargetSetupError
*/
public TargetSetupError(String reason, Throwable cause) {
super(reason, cause);
}
}
|
[
"hi_cbh@qq.com"
] |
hi_cbh@qq.com
|
402fcc3b834966db82a00dd14c96c8b4bbd63670
|
2869fc39e2e63d994d5dd8876476e473cb8d3986
|
/pet/pet_public/src/test/java/com/lvmama/pet/mark/service/MarkCouponServcieTest.java
|
9637be0dd1915e799c1a2da88385824176187d93
|
[] |
no_license
|
kavt/feiniu_pet
|
bec739de7c4e2ee896de50962dbd5fb6f1e28fe9
|
82963e2e87611442d9b338d96e0343f67262f437
|
refs/heads/master
| 2020-12-25T17:45:16.166052
| 2016-06-13T10:02:42
| 2016-06-13T10:02:42
| 61,026,061
| 0
| 0
| null | 2016-06-13T10:02:01
| 2016-06-13T10:02:01
| null |
UTF-8
|
Java
| false
| false
| 2,033
|
java
|
/**
*
*/
package com.lvmama.pet.mark.service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.lvmama.comm.pet.po.mark.MarkCoupon;
import com.lvmama.comm.pet.service.mark.MarkCouponService;
import com.lvmama.pet.BaseTest;
/**
* @author liuyi
*
*/
@ContextConfiguration(locations = { "classpath:/applicationContext-pet-public-beans.xml" })
@RunWith(SpringJUnit4ClassRunner.class)
public class MarkCouponServcieTest extends BaseTest{
@Autowired
private MarkCouponService markCouponService;
@Test
public void testSelectAllCanUseMarkCoupon(){
Map<String,Object> map = new HashMap<String,Object>();
map.put("withCode", "true");
List<MarkCoupon> markCouponList = markCouponService.selectAllCanUseMarkCoupon(map);
System.out.println("test1111");
}
@Test
public void testSelectProductCanUseMarkCoupon(){
Map<String,Object> map = new HashMap<String,Object>();
map.put("productId", 30459l);
List<MarkCoupon> markCouponList = markCouponService.selectProductCanUseMarkCoupon(map);
System.out.println("test1111");
}
@Test
public void testAllCanUseMarkCoupon(){
Map<String,Object> map = new HashMap<String,Object>();
List<Long> idsList = new ArrayList<Long>();
idsList.add(63777l);
map.put("productIds", idsList);
List<String> subProductTypesList = new ArrayList<String>();
subProductTypesList.add("SINGLE");
map.put("subProductTypes", subProductTypesList);
map.put("withCode", "false");//只取优惠活动
List<MarkCoupon> markCouponList = markCouponService.selectAllCanUseAndProductCanUseMarkCoupon(map);
System.out.println("test1111");
}
}
|
[
"feiniu7903@163.com"
] |
feiniu7903@163.com
|
c3734e343b74d02b67c62a0af6bebf8c8a9d8085
|
12be2d3e318a5a4f7cebf95a366556c434ff379e
|
/phoss-smp-backend-mongodb/src/main/java/com/helger/phoss/smp/backend/mongodb/mgr/SMLInfoManagerMongoDB.java
|
caef1a3e940d0ca1d80938ab0c1dba2f769626de
|
[] |
no_license
|
vcgato29/phoss-smp
|
095e29a6d133a65bf110dd1a45bbc927053d39ed
|
e0684b16892825b41a1e4f28c2671131444ad6ca
|
refs/heads/master
| 2020-06-17T06:53:10.648209
| 2019-07-03T19:37:47
| 2019-07-03T19:37:47
| 195,836,728
| 1
| 0
| null | 2019-07-08T15:08:57
| 2019-07-08T15:08:57
| null |
UTF-8
|
Java
| false
| false
| 7,468
|
java
|
/**
* Copyright (C) 2014-2019 Philip Helger and contributors
* philip[at]helger[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.helger.phoss.smp.backend.mongodb.mgr;
import java.util.function.Consumer;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.bson.Document;
import com.helger.commons.annotation.Nonempty;
import com.helger.commons.annotation.ReturnsMutableCopy;
import com.helger.commons.collection.impl.CommonsArrayList;
import com.helger.commons.collection.impl.ICommonsList;
import com.helger.commons.state.EChange;
import com.helger.commons.string.StringHelper;
import com.helger.peppol.sml.CSMLDefault;
import com.helger.peppol.sml.ISMLInfo;
import com.helger.peppol.sml.SMLInfo;
import com.helger.phoss.smp.domain.sml.ISMLInfoManager;
import com.helger.photon.audit.AuditHelper;
import com.mongodb.client.model.Indexes;
import com.mongodb.client.model.Updates;
import com.mongodb.client.result.DeleteResult;
/**
* Implementation of {@link ISMLInfoManager} for MongoDB
*
* @author Philip Helger
*/
public class SMLInfoManagerMongoDB extends AbstractManagerMongoDB implements ISMLInfoManager
{
private static final String BSON_ID = "id";
private static final String BSON_DISPLAYNAME = "displayname";
private static final String BSON_DNSZONE = "dnszone";
private static final String BSON_SERVICEURL = "serviceurl";
private static final String BSON_CLIENTCERT = "clientcert";
public SMLInfoManagerMongoDB ()
{
super ("smp-smlinfo");
getCollection ().createIndex (Indexes.ascending (BSON_ID));
}
@Nonnull
@ReturnsMutableCopy
public static Document toBson (@Nonnull final ISMLInfo aValue)
{
return new Document ().append (BSON_ID, aValue.getID ())
.append (BSON_DISPLAYNAME, aValue.getDisplayName ())
.append (BSON_DNSZONE, aValue.getDNSZone ())
.append (BSON_SERVICEURL, aValue.getManagementServiceURL ())
.append (BSON_CLIENTCERT, Boolean.valueOf (aValue.isClientCertificateRequired ()));
}
@Nonnull
@ReturnsMutableCopy
public static SMLInfo toDomain (@Nonnull final Document aDoc)
{
return new SMLInfo (aDoc.getString (BSON_ID),
aDoc.getString (BSON_DISPLAYNAME),
aDoc.getString (BSON_DNSZONE),
aDoc.getString (BSON_SERVICEURL),
aDoc.getBoolean (BSON_CLIENTCERT).booleanValue ());
}
@Nonnull
public ISMLInfo createSMLInfo (@Nonnull @Nonempty final String sDisplayName,
@Nonnull @Nonempty final String sDNSZone,
@Nonnull @Nonempty final String sManagementServiceURL,
final boolean bClientCertificateRequired)
{
final SMLInfo aSMLInfo = new SMLInfo (sDisplayName, sDNSZone, sManagementServiceURL, bClientCertificateRequired);
getCollection ().insertOne (toBson (aSMLInfo));
AuditHelper.onAuditCreateSuccess (SMLInfo.OT,
aSMLInfo.getID (),
sDisplayName,
sDNSZone,
sManagementServiceURL,
Boolean.valueOf (bClientCertificateRequired));
return aSMLInfo;
}
@Nonnull
public EChange updateSMLInfo (@Nullable final String sSMLInfoID,
@Nonnull @Nonempty final String sDisplayName,
@Nonnull @Nonempty final String sDNSZone,
@Nonnull @Nonempty final String sManagementServiceURL,
final boolean bClientCertificateRequired)
{
final Document aOldDoc = getCollection ().findOneAndUpdate (new Document (BSON_ID, sSMLInfoID),
Updates.combine (Updates.set (BSON_DISPLAYNAME,
sDisplayName),
Updates.set (BSON_DNSZONE, sDNSZone),
Updates.set (BSON_SERVICEURL,
sManagementServiceURL),
Updates.set (BSON_CLIENTCERT,
Boolean.valueOf (bClientCertificateRequired))));
if (aOldDoc == null)
return EChange.UNCHANGED;
AuditHelper.onAuditModifySuccess (SMLInfo.OT,
"all",
sSMLInfoID,
sDisplayName,
sDNSZone,
sManagementServiceURL,
Boolean.valueOf (bClientCertificateRequired));
return EChange.CHANGED;
}
@Nullable
public EChange deleteSMLInfo (@Nullable final String sSMLInfoID)
{
if (StringHelper.hasNoText (sSMLInfoID))
return EChange.UNCHANGED;
final DeleteResult aDR = getCollection ().deleteOne (new Document (BSON_ID, sSMLInfoID));
if (!aDR.wasAcknowledged () || aDR.getDeletedCount () == 0)
{
AuditHelper.onAuditDeleteFailure (SMLInfo.OT, "no-such-id", sSMLInfoID);
return EChange.UNCHANGED;
}
AuditHelper.onAuditDeleteSuccess (SMLInfo.OT, sSMLInfoID);
return EChange.CHANGED;
}
@Nonnull
@ReturnsMutableCopy
public ICommonsList <ISMLInfo> getAllSMLInfos ()
{
final ICommonsList <ISMLInfo> ret = new CommonsArrayList <> ();
getCollection ().find ().forEach ((Consumer <Document>) x -> ret.add (toDomain (x)));
return ret;
}
@Nullable
public ISMLInfo getSMLInfoOfID (@Nullable final String sID)
{
return getCollection ().find (new Document (BSON_ID, sID)).map (x -> toDomain (x)).first ();
}
public boolean containsSMLInfoWithID (@Nullable final String sID)
{
return getCollection ().find (new Document (BSON_ID, sID)).first () != null;
}
@Nullable
public ISMLInfo findFirstWithManageParticipantIdentifierEndpointAddress (@Nullable final String sAddress)
{
if (StringHelper.hasNoText (sAddress))
return null;
// The stored field does not contain the suffix
final String sSearchAddress = StringHelper.trimEnd (sAddress,
'/' + CSMLDefault.MANAGEMENT_SERVICE_PARTICIPANTIDENTIFIER);
return getCollection ().find (new Document (BSON_SERVICEURL, sSearchAddress))
.map (SMLInfoManagerMongoDB::toDomain)
.first ();
}
}
|
[
"philip@helger.com"
] |
philip@helger.com
|
1358c4c4ccb2579d064246d300e9af7edd8bcbe8
|
0d0fa21ea897909578fed66e0d5e74ce3d080399
|
/src/test/java/com/thinkaurelius/faunus/FaunusElementTest.java
|
9b93ea377995b3f7c0a1a0caced778ea09f0593c
|
[
"Apache-2.0"
] |
permissive
|
bepcyc/faunus
|
d8291efb71c1c05c88afa396e9189c133e88b031
|
27142c8d6cc7e5a524b2a91d435e9de8b621aab5
|
refs/heads/master
| 2021-01-16T21:59:56.631656
| 2012-11-05T23:07:38
| 2012-11-05T23:07:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,454
|
java
|
package com.thinkaurelius.faunus;
import com.thinkaurelius.faunus.util.MicroElement;
import com.thinkaurelius.faunus.util.MicroVertex;
import junit.framework.TestCase;
import org.apache.hadoop.io.WritableUtils;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
public class FaunusElementTest extends TestCase {
public void testBasicSerialization() throws IOException {
FaunusVertex vertex1 = new FaunusVertex(10);
FaunusVertex vertex2 = new FaunusVertex(Long.MAX_VALUE);
ByteArrayOutputStream bytes1 = new ByteArrayOutputStream();
vertex1.write(new DataOutputStream(bytes1));
assertEquals(bytes1.size(), 9);
// 1 long id + 1 boolean path + 1 variable int paths + 1 short properties + 2 shorts edge types (4)
// ? + 1 + 1 + 2 + 2 + 2 = 11 bytes + 1 byte long id
ByteArrayOutputStream bytes2 = new ByteArrayOutputStream();
vertex2.write(new DataOutputStream(bytes2));
assertEquals(bytes2.size(), 17);
// 1 long id + 1 boolean path + 1 int paths + 1 short properties + 2 shorts edge types (4)
// ? + 1 + 1 + 2 + 2 + 2 = 11 bytes + 9 byte long id
final Long id1 = WritableUtils.readVLong(new DataInputStream(new ByteArrayInputStream(bytes1.toByteArray())));
final Long id2 = WritableUtils.readVLong(new DataInputStream(new ByteArrayInputStream(bytes2.toByteArray())));
assertEquals(id1, new Long(10l));
assertEquals(id2, new Long(Long.MAX_VALUE));
}
public void testElementComparator() throws IOException {
FaunusVertex a = new FaunusVertex(10);
FaunusVertex b = new FaunusVertex(Long.MAX_VALUE);
FaunusVertex c = new FaunusVertex(10);
FaunusVertex d = new FaunusVertex(12);
assertEquals(a.compareTo(a), 0);
assertEquals(a.compareTo(b), -1);
assertEquals(a.compareTo(c), 0);
assertEquals(a.compareTo(d), -1);
assertEquals(b.compareTo(a), 1);
assertEquals(b.compareTo(b), 0);
assertEquals(b.compareTo(c), 1);
assertEquals(b.compareTo(d), 1);
assertEquals(c.compareTo(a), 0);
assertEquals(c.compareTo(b), -1);
assertEquals(c.compareTo(c), 0);
assertEquals(c.compareTo(d), -1);
assertEquals(d.compareTo(a), 1);
assertEquals(d.compareTo(b), -1);
assertEquals(d.compareTo(c), 1);
assertEquals(d.compareTo(d), 0);
ByteArrayOutputStream aBytes = new ByteArrayOutputStream();
a.write(new DataOutputStream(aBytes));
ByteArrayOutputStream bBytes = new ByteArrayOutputStream();
b.write(new DataOutputStream(bBytes));
ByteArrayOutputStream cBytes = new ByteArrayOutputStream();
c.write(new DataOutputStream(cBytes));
ByteArrayOutputStream dBytes = new ByteArrayOutputStream();
d.write(new DataOutputStream(dBytes));
//////// test raw byte comparator
FaunusElement.Comparator comparator = new FaunusElement.Comparator();
assertEquals(0, comparator.compare(aBytes.toByteArray(), 0, aBytes.size(), aBytes.toByteArray(), 0, aBytes.size()));
assertEquals(-1, comparator.compare(aBytes.toByteArray(), 0, aBytes.size(), bBytes.toByteArray(), 0, bBytes.size()));
assertEquals(0, comparator.compare(aBytes.toByteArray(), 0, aBytes.size(), cBytes.toByteArray(), 0, cBytes.size()));
assertEquals(-1, comparator.compare(aBytes.toByteArray(), 0, aBytes.size(), dBytes.toByteArray(), 0, dBytes.size()));
assertEquals(1, comparator.compare(bBytes.toByteArray(), 0, bBytes.size(), aBytes.toByteArray(), 0, aBytes.size()));
assertEquals(0, comparator.compare(bBytes.toByteArray(), 0, bBytes.size(), bBytes.toByteArray(), 0, bBytes.size()));
assertEquals(1, comparator.compare(bBytes.toByteArray(), 0, bBytes.size(), cBytes.toByteArray(), 0, cBytes.size()));
assertEquals(1, comparator.compare(bBytes.toByteArray(), 0, bBytes.size(), dBytes.toByteArray(), 0, dBytes.size()));
assertEquals(0, comparator.compare(cBytes.toByteArray(), 0, cBytes.size(), aBytes.toByteArray(), 0, aBytes.size()));
assertEquals(-1, comparator.compare(cBytes.toByteArray(), 0, cBytes.size(), bBytes.toByteArray(), 0, bBytes.size()));
assertEquals(0, comparator.compare(cBytes.toByteArray(), 0, cBytes.size(), cBytes.toByteArray(), 0, cBytes.size()));
assertEquals(-1, comparator.compare(cBytes.toByteArray(), 0, cBytes.size(), dBytes.toByteArray(), 0, dBytes.size()));
assertEquals(1, comparator.compare(dBytes.toByteArray(), 0, dBytes.size(), aBytes.toByteArray(), 0, aBytes.size()));
assertEquals(-1, comparator.compare(dBytes.toByteArray(), 0, dBytes.size(), bBytes.toByteArray(), 0, bBytes.size()));
assertEquals(1, comparator.compare(dBytes.toByteArray(), 0, dBytes.size(), cBytes.toByteArray(), 0, cBytes.size()));
assertEquals(0, comparator.compare(dBytes.toByteArray(), 0, dBytes.size(), dBytes.toByteArray(), 0, dBytes.size()));
}
public void testPathIteratorRemove() {
FaunusVertex vertex1 = new FaunusVertex(10);
assertEquals(vertex1.pathCount(), 0);
vertex1.enablePath(true);
assertEquals(vertex1.pathCount(), 0);
vertex1.addPath((List) Arrays.asList(new MicroVertex(1l), new MicroVertex(2l)), false);
vertex1.addPath((List) Arrays.asList(new MicroVertex(1l), new MicroVertex(3l)), false);
vertex1.addPath((List) Arrays.asList(new MicroVertex(1l), new MicroVertex(4l)), false);
assertEquals(vertex1.pathCount(), 3);
Iterator<List<MicroElement>> itty = vertex1.getPaths().iterator();
while (itty.hasNext()) {
if (itty.next().get(1).getId() == 3l)
itty.remove();
}
assertEquals(vertex1.pathCount(), 2);
}
public void testPathHash() {
List<MicroElement> path1 = (List) Arrays.asList(new MicroVertex(1l), new MicroVertex(2l));
List<MicroElement> path2 = (List) Arrays.asList(new MicroVertex(1l), new MicroVertex(1l));
assertEquals(new HashSet(path1).size(), 2);
assertEquals(new HashSet(path2).size(), 1);
}
}
|
[
"okrammarko@gmail.com"
] |
okrammarko@gmail.com
|
6bfb54eff51be4fa03b028e8e0af1202856bef3b
|
e9dc4e9b5046322b02c54e6a035f6620f0abbc89
|
/lian_hjy_project/src/main/java/com/zhanghp/mapper/TblNetdiskUrlMapper.java
|
7f6a9631772bd446c468cdfc60e181daaafcbffe
|
[] |
no_license
|
zhp1221/hjy
|
333003784ca8c97b0ef2e5af6d7b8843c2c6eeb7
|
88db8f0aca84e0b837de6dc8ebb43de3f0cf8e85
|
refs/heads/master
| 2023-08-28T04:02:54.552694
| 2021-10-31T11:24:21
| 2021-10-31T11:24:21
| 406,342,462
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 319
|
java
|
package com.zhanghp.mapper;
import com.zhanghp.bean.TblNetdiskUrl;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 网络硬盘路径 Mapper 接口
* </p>
*
* @author zhanghp
* @since 2021-09-12
*/
public interface TblNetdiskUrlMapper extends BaseMapper<TblNetdiskUrl> {
}
|
[
"zhanghp1221@126.com"
] |
zhanghp1221@126.com
|
4ce88bc73a9dfb2ede55881339b0710618fb2852
|
486d70f8e449a5db7966c7ddc7ef3ffc93985d49
|
/jtsec-manager/jtsec-manager-pojo/src/main/java/com/jtsec/manager/pojo/vo/UserVo.java
|
bd0415a36965d854ac25fd8d0e813cad50f7ca6f
|
[] |
no_license
|
FatLi1989/jtsec-com
|
052bb4a841b134526a1aab3af64968ad58e1668a
|
ff4f2b3c4d7f79b94b4e9aca89edc3fc3d8c3f10
|
refs/heads/master
| 2020-04-19T08:02:41.900075
| 2019-01-29T01:16:40
| 2019-01-29T01:16:40
| 168,064,873
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,209
|
java
|
package com.jtsec.manager.pojo.vo;
import lombok.Data;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* @author NovLi
* @Title: userVo
* @ProjectName database_parent
* @Description: 登陆页面传接值
* @date 2018/7/916:00
*/
@Data
public class UserVo extends BasicVo {
private String userName;
private String password;
private Boolean rememberMe;
private String loginName;
private Integer userId;
private String phonenumber;
private Integer status;
private Date createTime;
private String createTimeBegin;
private String createTimeEnd;
private String email;
private String sex;
private List<Integer> roleIdList;
private Set<RoleVo> roles = new HashSet<> ();
private List<Integer> userIdList;
public UserVo (String username, String password, Boolean rememberMe, String loginName) {
this.userName = username;
this.password = password;
this.rememberMe = rememberMe;
this.loginName = loginName;
}
public UserVo (String password, String loginName) {
this.password = password;
this.loginName = loginName;
}
public UserVo (String loginName) {
this.loginName = loginName;
}
public UserVo () {
}
}
|
[
"514340686@qq.com"
] |
514340686@qq.com
|
ff7196c20694a8f257619601e30ee808f0bf6e78
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XRENDERING-481-38-6-MOEAD-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/security/authorization/DefaultAuthorExecutor_ESTest.java
|
ec8a36efd12fff3509d0bbc169ec1f812adf233e
|
[] |
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
| 594
|
java
|
/*
* This file was automatically generated by EvoSuite
* Wed Apr 08 14:33:47 UTC 2020
*/
package com.xpn.xwiki.internal.security.authorization;
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 DefaultAuthorExecutor_ESTest extends DefaultAuthorExecutor_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
740573818a2ecfb96ad30c18924c63c2965166d0
|
bcaa1a733700b8be816982c239d9079fa8c334b7
|
/eu.openanalytics.phaedra.calculation/src/eu/openanalytics/phaedra/calculation/pref/PreferencePage.java
|
340253d64e6e8979921d33f402a3bff629c417a1
|
[] |
no_license
|
openanalytics/phaedra
|
dfb16cc300d0d90ca9eab233068207452d458040
|
2b0b79000bfcac311072b91f31eb196b08d294fe
|
refs/heads/master
| 2020-12-31T07:01:38.108586
| 2020-12-16T12:30:35
| 2020-12-16T12:30:35
| 58,546,934
| 16
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,003
|
java
|
package eu.openanalytics.phaedra.calculation.pref;
import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import eu.openanalytics.phaedra.calculation.Activator;
public class PreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
public PreferencePage() {
super(GRID);
}
@Override
public void init(IWorkbench workbench) {
// Do nothing.
}
@Override
protected void createFieldEditors() {
Composite parent = getFieldEditorParent();
addField(new BooleanFieldEditor(Prefs.AUTO_DEFINE_ANNOTATIONS, "Prompt to define new annotation features", parent));
}
@Override
protected IPreferenceStore doGetPreferenceStore() {
return Activator.getDefault().getPreferenceStore();
}
}
|
[
"tobias.verbeke@openanalytics.eu"
] |
tobias.verbeke@openanalytics.eu
|
b1d5b228d8fa27a4ec556693a7eb9843d873dc5a
|
4da4927fe55f78fa256294e2580353fbea93800d
|
/webmodule/src/main/java/com/zhou/redis/RedisConfig.java
|
6d50b28486ad1ee0ccaad4709ff704478f8165e5
|
[] |
no_license
|
supermaniszhou/studySpringboot
|
78b47efa7f6e26741f96a0ee1e89f805c62298de
|
6e7d8a00b8890126bf35914ea6820a9e5dbb6c51
|
refs/heads/master
| 2022-10-22T13:17:41.888063
| 2020-04-26T05:48:14
| 2020-04-26T05:48:14
| 156,347,857
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,331
|
java
|
package com.zhou.redis;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.cache.RedisCacheManager;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import java.lang.reflect.Method;
@Configuration
@EnableCaching//开启注解
public class RedisConfig extends CachingConfigurerSupport {
@Bean
public KeyGenerator keyGenerator() {
return new KeyGenerator() {
@Override
public Object generate(Object target, Method method, Object... params) {
StringBuilder sb = new StringBuilder();
sb.append(target.getClass().getName());
sb.append(method.getName());
for (Object obj : params) {
sb.append(obj.toString());
}
return sb.toString();
}
};
}
/**
* 申明缓存管理器,会创建一个切面(aspect)并触发Spring缓存注解的切点(pointcut)
* 根据类或者方法所使用的注解以及缓存的状态,这个切面会从缓存中获取数据,将数据添加到缓存之中或者从缓存中移除某个值
*
* @return
*/
@Bean
public RedisCacheManager cacheManager(RedisTemplate redisTemplate) {
return new RedisCacheManager(redisTemplate);
}
//创建redis连接工厂 这个部分可以在application。properties 文件中配置。
// @Bean
// public RedisConnectionFactory redisFactory() {
// JedisConnectionFactory factory = new JedisConnectionFactory();
// factory.setPort(6379);
// factory.setHostName("127.0.0.1");
// return factory;
// }
@Bean
public RedisTemplate redisTemplate(RedisConnectionFactory factory) {
//创建一个模板类
RedisTemplate<String, Object> template = new RedisTemplate<>();
//将刚才的redis 工厂设置到模板类中
template.setConnectionFactory(factory);
//设置key的序列化器
template.setKeySerializer(new StringRedisSerializer());
//设置value的序列化器 使用jackson 2 ,将对象序列化为json
Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
//json转对象类,不设置默认的会将json转成hashmap
ObjectMapper om = new ObjectMapper();
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
jackson2JsonRedisSerializer.setObjectMapper(om);
template.setValueSerializer(jackson2JsonRedisSerializer);
return template;
}
}
|
[
"741963634@qq.com"
] |
741963634@qq.com
|
6076c32291016f0f8a45bc09d902b55d3402297f
|
8df952c107b2e2b12f4159ac4f5f775f9d7c175d
|
/spring-dsl-lsp-web/src/main/java/org/springframework/dsl/lsp/web/DocumentController.java
|
7fe3b8e56d4a235dd50747de9843627ee173269a
|
[
"Apache-2.0"
] |
permissive
|
julang2/spring-dsl
|
0a17f4c921aa9711edcf2f7085ef8422b9c03e67
|
cb7680273b2a91ba22d2783a0c03933802d658db
|
refs/heads/master
| 2022-07-02T16:22:00.830460
| 2020-05-17T16:20:33
| 2020-05-17T16:20:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,243
|
java
|
/*
* Copyright 2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.dsl.lsp.web;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.dsl.service.document.DocumentService;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* Controller providing integration into a {@link DocumentService}.
*
* @author Janne Valkealahti
*
*/
@RestController
@RequestMapping("${spring.dsl.lsp.web.document-services.base-path:/document}")
public class DocumentController {
private static final Logger log = LoggerFactory.getLogger(DocumentController.class);
private DocumentService documentService;
/**
* Instantiates a new document controller.
*
* @param documentService the document service
*/
public DocumentController(DocumentService documentService) {
Assert.notNull(documentService, "documentService must be set");
this.documentService = documentService;
}
@GetMapping
public String getDocument(@RequestParam("uri") String uri) {
log.debug("Get request for document {}", uri);
return this.documentService.get(uri);
}
@PostMapping
public void saveDocument(@RequestParam("uri") String uri, @RequestBody String document) {
log.debug("Save request for document {}, with content {}", uri, document);
this.documentService.save(uri, document);
}
}
|
[
"janne.valkealahti@gmail.com"
] |
janne.valkealahti@gmail.com
|
d62d99ea4c5c4615d83c0f4da53a5349192ac2c5
|
3e81486524e9f366b0cd4cb01ea1a78a84437beb
|
/kaleido-appengine/src/test/java/org/kaleidofoundry/core/cache/GaeCacheManagerTest.java
|
b78f022247e7c234363550bb0941c82f757ef3af
|
[
"Apache-2.0"
] |
permissive
|
jraduget/kaleido-repository
|
952a2bd21db5df5478657d73242da128154070d0
|
19b0b931874fa76cf69fb36d70596760ebd506e7
|
refs/heads/master
| 2023-06-30T09:33:00.020680
| 2022-01-05T22:24:07
| 2022-01-05T22:24:07
| 743,632
| 0
| 1
|
Apache-2.0
| 2023-06-20T02:53:54
| 2010-06-27T19:10:16
|
Java
|
UTF-8
|
Java
| false
| false
| 2,302
|
java
|
/*
* Copyright 2008-2021 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.kaleidofoundry.core.cache;
import java.io.IOException;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.kaleidofoundry.core.context.RuntimeContext;
import com.google.appengine.tools.development.testing.LocalMemcacheServiceTestConfig;
import com.google.appengine.tools.development.testing.LocalServiceTestHelper;
/**
* GAE Cache Manager
*
* @author jraduget
*/
public class GaeCacheManagerTest extends AbstractCacheManagerTest {
protected static LocalServiceTestHelper helper;
@BeforeClass
public static void init() throws IOException {
helper = new LocalServiceTestHelper(new LocalMemcacheServiceTestConfig());
helper.setUp();
}
@AfterClass
public static void tearDown() {
helper.tearDown();
}
@Override
protected String getAvailableConfiguration() {
return "classpath:/noneed";
}
@Override
protected String getCacheImplementationCode() {
return CacheProvidersEnum.gae.name();
}
@Override
protected RuntimeContext<CacheManager> getCacheManagerContext() {
return new RuntimeContext<CacheManager>("gaeCacheManager", CacheManager.class);
}
@Ignore
@Test
@Override
public void cacheDefinitionNotFoundException() {
super.cacheDefinitionNotFoundException();
}
@Ignore
@Test
@Override
public void configurationNotFoundException() {
super.configurationNotFoundException();
}
@Ignore
@Test
@Override
public void illegalConfiguration() {
super.illegalConfiguration();
}
@Ignore
@Test
@Override
public void invalidConfiguration() {
super.invalidConfiguration();
}
}
|
[
"jraduget@gmail.com"
] |
jraduget@gmail.com
|
3e15825ce05d00fc2c8dec77b80747a05985d6ed
|
1f70e39863c608c6b588ffc18441969e8d1a246a
|
/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/task/TaskIdentityLinkCollectionResource.java
|
f2127f02d0cc6fabda30342a0d5d42b21792b51e
|
[
"Apache-2.0"
] |
permissive
|
ttonl/flowable-engine
|
3d77443727c4dffcfbdf0945cf037e9250eb8e58
|
7911b88f56bc1dda8373db3ea420ac716d4b0ef8
|
refs/heads/master
| 2020-03-11T08:03:37.664757
| 2018-04-17T08:09:54
| 2018-04-17T08:09:54
| 129,873,778
| 0
| 0
|
Apache-2.0
| 2018-04-17T08:42:20
| 2018-04-17T08:42:19
| null |
UTF-8
|
Java
| false
| false
| 4,626
|
java
|
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.flowable.cmmn.rest.service.api.runtime.task;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.flowable.cmmn.rest.service.api.engine.RestIdentityLink;
import org.flowable.engine.common.api.FlowableIllegalArgumentException;
import org.flowable.task.api.Task;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import io.swagger.annotations.Authorization;
/**
* @author Frederik Heremans
*/
@RestController
@Api(tags = { "Task Identity Links" }, description = "Manage Tasks Identity Links", authorizations = { @Authorization(value = "basicAuth") })
public class TaskIdentityLinkCollectionResource extends TaskBaseResource {
@ApiOperation(value = "List identity links for a task", tags = { "Task Identity Links" }, nickname = "listTasksInstanceIdentityLinks")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Indicates the task was found and the requested identity links are returned."),
@ApiResponse(code = 404, message = "Indicates the requested task was not found.")
})
@GetMapping(value = "/cmmn-runtime/tasks/{taskId}/identitylinks", produces = "application/json")
public List<RestIdentityLink> getIdentityLinks(@ApiParam(name = "taskId") @PathVariable("taskId") String taskId, HttpServletRequest request) {
Task task = getTaskFromRequest(taskId);
return restResponseFactory.createRestIdentityLinks(taskService.getIdentityLinksForTask(task.getId()));
}
@ApiOperation(value = "Create an identity link on a task", tags = { "Task Identity Links" }, nickname = "createTaskInstanceIdentityLinks",
notes = "It's possible to add either a user or a group.")
@ApiResponses(value = {
@ApiResponse(code = 201, message = "Indicates the task was found and the identity link was created."),
@ApiResponse(code = 404, message = "Indicates the requested task was not found or the task doesn’t have the requested identityLink. The status contains additional information about this error.")
})
@PostMapping(value = "/cmmn-runtime/tasks/{taskId}/identitylinks", produces = "application/json")
public RestIdentityLink createIdentityLink(@ApiParam(name = "taskId") @PathVariable("taskId") String taskId, @RequestBody RestIdentityLink identityLink, HttpServletRequest request, HttpServletResponse response) {
Task task = getTaskFromRequest(taskId);
if (identityLink.getGroup() == null && identityLink.getUser() == null) {
throw new FlowableIllegalArgumentException("A group or a user is required to create an identity link.");
}
if (identityLink.getGroup() != null && identityLink.getUser() != null) {
throw new FlowableIllegalArgumentException("Only one of user or group can be used to create an identity link.");
}
if (identityLink.getType() == null) {
throw new FlowableIllegalArgumentException("The identity link type is required.");
}
if (identityLink.getGroup() != null) {
taskService.addGroupIdentityLink(task.getId(), identityLink.getGroup(), identityLink.getType());
} else {
taskService.addUserIdentityLink(task.getId(), identityLink.getUser(), identityLink.getType());
}
response.setStatus(HttpStatus.CREATED.value());
return restResponseFactory.createRestIdentityLink(identityLink.getType(), identityLink.getUser(), identityLink.getGroup(), task.getId(), null, null);
}
}
|
[
"tijs.rademakers@gmail.com"
] |
tijs.rademakers@gmail.com
|
6744e71094aaf305136c7a990d6600c45e073f17
|
013e83b707fe5cd48f58af61e392e3820d370c36
|
/spring-messaging/src/main/java/org/springframework/messaging/MessagingException.java
|
c174010eb74f857af5991cdc6e94a57776716ec9
|
[] |
no_license
|
yuexiaoguang/spring4
|
8376f551fefd33206adc3e04bc58d6d32a825c37
|
95ea25bbf46ee7bad48307e41dcd027f1a0c67ae
|
refs/heads/master
| 2020-05-27T20:27:54.768860
| 2019-09-02T03:39:57
| 2019-09-02T03:39:57
| 188,770,867
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,256
|
java
|
package org.springframework.messaging;
import org.springframework.core.NestedRuntimeException;
/**
* 与消息相关的任何失败的基本异常.
*/
@SuppressWarnings("serial")
public class MessagingException extends NestedRuntimeException {
private final Message<?> failedMessage;
public MessagingException(Message<?> message) {
super(null);
this.failedMessage = message;
}
public MessagingException(String description) {
super(description);
this.failedMessage = null;
}
public MessagingException(String description, Throwable cause) {
super(description, cause);
this.failedMessage = null;
}
public MessagingException(Message<?> message, String description) {
super(description);
this.failedMessage = message;
}
public MessagingException(Message<?> message, Throwable cause) {
super(null, cause);
this.failedMessage = message;
}
public MessagingException(Message<?> message, String description, Throwable cause) {
super(description, cause);
this.failedMessage = message;
}
public Message<?> getFailedMessage() {
return this.failedMessage;
}
@Override
public String toString() {
return super.toString() + (this.failedMessage == null ? ""
: (", failedMessage=" + this.failedMessage));
}
}
|
[
"yuexiaoguang@vortexinfo.cn"
] |
yuexiaoguang@vortexinfo.cn
|
54075ca2ed385db85a8ecf5fde17a9290492d4c7
|
91e67632d2a4d3e02b8ebe954c47fe5ae2bdfb33
|
/app/src/main/java/com/omneagate/activity/dialog/MenuAdapter.java
|
73b100360b6c07e1de873d993159d4c37856de85
|
[] |
no_license
|
RamprasathPnr/FpsPosUttarPradesh
|
a2b14022d59f41b5af0d7d8e6a564ee3abd1fbb3
|
99fb57ecb4b0df59b29119f398a83eaf434d2681
|
refs/heads/master
| 2021-08-31T13:32:10.236720
| 2017-12-21T13:47:01
| 2017-12-21T13:47:01
| 115,010,323
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,079
|
java
|
package com.omneagate.activity.dialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.omneagate.DTO.MenuDataDto;
import com.omneagate.activity.GlobalAppState;
import com.omneagate.activity.R;
import java.util.List;
public class MenuAdapter extends BaseAdapter {
Context ct;
List<MenuDataDto> menuList;
private LayoutInflater mInflater;
public MenuAdapter(Context context, List<MenuDataDto> orders) {
ct = context;
menuList = orders;
mInflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
public int getCount() {
return menuList.size();
}
public MenuDataDto getItem(int position) {
return menuList.get(position);
}
public long getItemId(int position) {
return position;
}
public View getView(final int position, View convertView, ViewGroup parent) {
final ViewHolder holder;
View view = convertView;
if (view == null) {
view = mInflater.inflate(R.layout.menu_background, null);
holder = new ViewHolder();
holder.number = (TextView) view.findViewById(R.id.textViewMenu);
holder.imageView = (ImageView) view.findViewById(R.id.imageViewMenu);
view.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
holder.number.setText(menuList.get(position).getName());
if (GlobalAppState.language != null && GlobalAppState.language.equalsIgnoreCase("te")) {
holder.number.setText(menuList.get(position).getLName());
}
// holder.imageView.setImageResource(menuList.get(position).getId());
return view;
}
class ViewHolder {
TextView number;
ImageView imageView;
}
}
|
[
"prasadram343@gmail.com"
] |
prasadram343@gmail.com
|
b6396c7ae13f65534b99cf122039be9e5773de94
|
ce2839b4a6d703ec5c7bc3cc3ddcc47df5fc5e4f
|
/src/main/java/com/tvm/trainingevents/config/LoggingConfiguration.java
|
de81a6caef34a8221111df191a145b6224537e5a
|
[] |
no_license
|
igormusic/trainingEvents
|
5ee9b7f36548a5eb42042d806b7eb4508f5f3e69
|
4a6b07e315a188c7b94337168a2b1430852281be
|
refs/heads/master
| 2021-04-15T04:00:10.420145
| 2018-03-22T11:20:42
| 2018-03-22T11:20:42
| 126,324,309
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,479
|
java
|
package com.tvm.trainingevents.config;
import java.net.InetSocketAddress;
import java.util.Iterator;
import io.github.jhipster.config.JHipsterProperties;
import ch.qos.logback.classic.AsyncAppender;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.boolex.OnMarkerEvaluator;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.classic.spi.LoggerContextListener;
import ch.qos.logback.core.Appender;
import ch.qos.logback.core.filter.EvaluatorFilter;
import ch.qos.logback.core.spi.ContextAwareBase;
import ch.qos.logback.core.spi.FilterReply;
import net.logstash.logback.appender.LogstashTcpSocketAppender;
import net.logstash.logback.encoder.LogstashEncoder;
import net.logstash.logback.stacktrace.ShortenedThrowableConverter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.netflix.eureka.EurekaInstanceConfigBean;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
@Configuration
@RefreshScope
public class LoggingConfiguration {
private static final String LOGSTASH_APPENDER_NAME = "LOGSTASH";
private static final String ASYNC_LOGSTASH_APPENDER_NAME = "ASYNC_LOGSTASH";
private final Logger log = LoggerFactory.getLogger(LoggingConfiguration.class);
private LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
private final String appName;
private final String serverPort;
private final EurekaInstanceConfigBean eurekaInstanceConfigBean;
private final String version;
private final JHipsterProperties jHipsterProperties;
public LoggingConfiguration(@Value("${spring.application.name}") String appName, @Value("${server.port}") String serverPort,
@Autowired(required = false) EurekaInstanceConfigBean eurekaInstanceConfigBean, @Value("${info.project.version}") String version, JHipsterProperties jHipsterProperties) {
this.appName = appName;
this.serverPort = serverPort;
this.eurekaInstanceConfigBean = eurekaInstanceConfigBean;
this.version = version;
this.jHipsterProperties = jHipsterProperties;
if (jHipsterProperties.getLogging().getLogstash().isEnabled()) {
addLogstashAppender(context);
addContextListener(context);
}
if (jHipsterProperties.getMetrics().getLogs().isEnabled()) {
setMetricsMarkerLogbackFilter(context);
}
}
private void addContextListener(LoggerContext context) {
LogbackLoggerContextListener loggerContextListener = new LogbackLoggerContextListener();
loggerContextListener.setContext(context);
context.addListener(loggerContextListener);
}
private void addLogstashAppender(LoggerContext context) {
log.info("Initializing Logstash logging");
LogstashTcpSocketAppender logstashAppender = new LogstashTcpSocketAppender();
logstashAppender.setName(LOGSTASH_APPENDER_NAME);
logstashAppender.setContext(context);
String optionalFields = "";
if (eurekaInstanceConfigBean != null) {
optionalFields = "\"instance_id\":\"" + eurekaInstanceConfigBean.getInstanceId() + "\",";
}
String customFields = "{\"app_name\":\"" + appName + "\",\"app_port\":\"" + serverPort + "\"," +
optionalFields + "\"version\":\"" + version + "\"}";
// More documentation is available at: https://github.com/logstash/logstash-logback-encoder
LogstashEncoder logstashEncoder=new LogstashEncoder();
// Set the Logstash appender config from JHipster properties
logstashEncoder.setCustomFields(customFields);
// Set the Logstash appender config from JHipster properties
logstashAppender.addDestinations(new InetSocketAddress(jHipsterProperties.getLogging().getLogstash().getHost(),jHipsterProperties.getLogging().getLogstash().getPort()));
ShortenedThrowableConverter throwableConverter = new ShortenedThrowableConverter();
throwableConverter.setRootCauseFirst(true);
logstashEncoder.setThrowableConverter(throwableConverter);
logstashEncoder.setCustomFields(customFields);
logstashAppender.setEncoder(logstashEncoder);
logstashAppender.start();
// Wrap the appender in an Async appender for performance
AsyncAppender asyncLogstashAppender = new AsyncAppender();
asyncLogstashAppender.setContext(context);
asyncLogstashAppender.setName(ASYNC_LOGSTASH_APPENDER_NAME);
asyncLogstashAppender.setQueueSize(jHipsterProperties.getLogging().getLogstash().getQueueSize());
asyncLogstashAppender.addAppender(logstashAppender);
asyncLogstashAppender.start();
context.getLogger("ROOT").addAppender(asyncLogstashAppender);
}
// Configure a log filter to remove "metrics" logs from all appenders except the "LOGSTASH" appender
private void setMetricsMarkerLogbackFilter(LoggerContext context) {
log.info("Filtering metrics logs from all appenders except the {} appender", LOGSTASH_APPENDER_NAME);
OnMarkerEvaluator onMarkerMetricsEvaluator = new OnMarkerEvaluator();
onMarkerMetricsEvaluator.setContext(context);
onMarkerMetricsEvaluator.addMarker("metrics");
onMarkerMetricsEvaluator.start();
EvaluatorFilter<ILoggingEvent> metricsFilter = new EvaluatorFilter<>();
metricsFilter.setContext(context);
metricsFilter.setEvaluator(onMarkerMetricsEvaluator);
metricsFilter.setOnMatch(FilterReply.DENY);
metricsFilter.start();
for (ch.qos.logback.classic.Logger logger : context.getLoggerList()) {
for (Iterator<Appender<ILoggingEvent>> it = logger.iteratorForAppenders(); it.hasNext();) {
Appender<ILoggingEvent> appender = it.next();
if (!appender.getName().equals(ASYNC_LOGSTASH_APPENDER_NAME)) {
log.debug("Filter metrics logs from the {} appender", appender.getName());
appender.setContext(context);
appender.addFilter(metricsFilter);
appender.start();
}
}
}
}
/**
* Logback configuration is achieved by configuration file and API.
* When configuration file change is detected, the configuration is reset.
* This listener ensures that the programmatic configuration is also re-applied after reset.
*/
class LogbackLoggerContextListener extends ContextAwareBase implements LoggerContextListener {
@Override
public boolean isResetResistant() {
return true;
}
@Override
public void onStart(LoggerContext context) {
addLogstashAppender(context);
}
@Override
public void onReset(LoggerContext context) {
addLogstashAppender(context);
}
@Override
public void onStop(LoggerContext context) {
// Nothing to do.
}
@Override
public void onLevelChange(ch.qos.logback.classic.Logger logger, Level level) {
// Nothing to do.
}
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
62f20562e3658d06a8cd8d475f5d1c0427a13568
|
71dc08ecd65afd5096645619eee08c09fc80f50d
|
/src/main/java/org/jetbrains/anko/c.java
|
ce42d5d15492e6786ec2f7cf9b7db10a7c36f7b0
|
[] |
no_license
|
lanshifu/FFmpegDemo
|
d5a4a738feadcb15d8728ee92f9eb00f00c77413
|
fdbafde0bb8150503ae68c42ae98361c030bf046
|
refs/heads/master
| 2020-06-25T12:24:12.590952
| 2019-09-08T07:35:16
| 2019-09-08T07:35:16
| 199,304,834
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 330
|
java
|
package org.jetbrains.anko;
import defpackage.xv;
import java.util.concurrent.Callable;
/* compiled from: Async.kt */
final class c implements Callable {
private final /* synthetic */ xv a;
c(xv xvVar) {
this.a = xvVar;
}
public final /* synthetic */ V call() {
return this.a.invoke();
}
}
|
[
"lanxiaobin@jiaxincloud.com"
] |
lanxiaobin@jiaxincloud.com
|
1b7cbfba70d98ec5c4963022644bd56c648c123e
|
fec4c1754adce762b5c4b1cba85ad057e0e4744a
|
/jf-base/src/main/java/com/jf/dao/TopFieldModuleFieldMapper.java
|
726b295f806c8c934e5ada41e2c7925ce38a9b99
|
[] |
no_license
|
sengeiou/workspace_xg
|
140b923bd301ff72ca4ae41bc83820123b2a822e
|
540a44d550bb33da9980d491d5c3fd0a26e3107d
|
refs/heads/master
| 2022-11-30T05:28:35.447286
| 2020-08-19T02:30:25
| 2020-08-19T02:30:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,175
|
java
|
package com.jf.dao;
import com.jf.common.base.BaseDao;
import com.jf.entity.TopFieldModuleField;
import com.jf.entity.TopFieldModuleFieldExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface TopFieldModuleFieldMapper extends BaseDao<TopFieldModuleField, TopFieldModuleFieldExample> {
int countByExample(TopFieldModuleFieldExample example);
int deleteByExample(TopFieldModuleFieldExample example);
int deleteByPrimaryKey(Integer id);
int insert(TopFieldModuleField record);
int insertSelective(TopFieldModuleField record);
List<TopFieldModuleField> selectByExample(TopFieldModuleFieldExample example);
TopFieldModuleField selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") TopFieldModuleField record, @Param("example") TopFieldModuleFieldExample example);
int updateByExample(@Param("record") TopFieldModuleField record, @Param("example") TopFieldModuleFieldExample example);
int updateByPrimaryKeySelective(TopFieldModuleField record);
int updateByPrimaryKey(TopFieldModuleField record);
}
|
[
"397716215@qq.com"
] |
397716215@qq.com
|
96fa1a23e3c66644151f11d98d07b6786dacc776
|
5440c44721728e87fb827fb130b1590b25f24989
|
/GPP/com/brt/gpp/comum/mapeamentos/entidade/OfertaPacoteDados.java
|
5f1b8dc6e7d00a454be8c6a4459e3fe65fa73d10
|
[] |
no_license
|
amigosdobart/gpp
|
b36a9411f39137b8378c5484c58d1023c5e40b00
|
b1fec4e32fa254f972a0568fb7ebfac7784ecdc2
|
refs/heads/master
| 2020-05-15T14:20:11.462484
| 2019-04-19T22:34:54
| 2019-04-19T22:34:54
| 182,328,708
| 0
| 0
| null | null | null | null |
ISO-8859-13
|
Java
| false
| false
| 4,716
|
java
|
package com.brt.gpp.comum.mapeamentos.entidade;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
/**
* Classe responsavel por conter as informacoes da
* tabela TBL_PRO_OFERTA_PACOTE_DADOS
*
* @author Joćo Paulo Galvagni
* @since 31/08/2007
*/
public class OfertaPacoteDados implements Entidade, Comparable
{
private int idtOferta;
private String desOferta;
private TipoSaldo tipoSaldo;
private PacoteDados pacoteDados;
private Date dataCadastro;
private Date dataInicioOferta;
private Date dataFimOferta;
private boolean enviaBroadcast;
private Collection assinantes;
public OfertaPacoteDados()
{
idtOferta = -1;
tipoSaldo = null;
pacoteDados = null;
dataCadastro = null;
dataInicioOferta = null;
dataFimOferta = null;
enviaBroadcast = false;
assinantes = new ArrayList();
}
/**
* @return the assinantes
*/
public Collection getAssinantes()
{
return assinantes;
}
/**
* @param assinantes the assinantes to set
*/
public void setAssinantes(Collection assinantes)
{
this.assinantes = assinantes;
}
/**
* @return the dataCadastro
*/
public Date getDataCadastro()
{
return dataCadastro;
}
/**
* @param dataCadastro the dataCadastro to set
*/
public void setDataCadastro(Date dataCadastro)
{
this.dataCadastro = dataCadastro;
}
/**
* @return the dataFimOferta
*/
public Date getDataFimOferta()
{
return dataFimOferta;
}
/**
* @param dataFimOferta the dataFimOferta to set
*/
public void setDataFimOferta(Date dataFimOferta)
{
this.dataFimOferta = dataFimOferta;
}
/**
* @return the dataInicioOferta
*/
public Date getDataInicioOferta()
{
return dataInicioOferta;
}
/**
* @param dataInicioOferta the dataInicioOferta to set
*/
public void setDataInicioOferta(Date dataInicioOferta)
{
this.dataInicioOferta = dataInicioOferta;
}
/**
* @return the enviaBroadcast
*/
public boolean isEnviaBroadcast()
{
return enviaBroadcast;
}
/**
* @param enviaBroadcast the enviaBroadcast to set
*/
public void setEnviaBroadcast(boolean enviaBroadcast)
{
this.enviaBroadcast = enviaBroadcast;
}
/**
* @return the idtOferta
*/
public int getIdtOferta()
{
return idtOferta;
}
/**
* @param idtOferta the idtOferta to set
*/
public void setIdtOferta(int idtOferta)
{
this.idtOferta = idtOferta;
}
/**
* @return the pacoteDados
*/
public PacoteDados getPacoteDados()
{
return pacoteDados;
}
/**
* @param pacoteDados the pacoteDados to set
*/
public void setPacoteDados(PacoteDados pacoteDados)
{
this.pacoteDados = pacoteDados;
}
/**
* @return the tipoSaldo
*/
public TipoSaldo getTipoSaldo()
{
return tipoSaldo;
}
/**
* @param tipoSaldo the tipoSaldo to set
*/
public void setTipoSaldo(TipoSaldo tipoSaldo)
{
this.tipoSaldo = tipoSaldo;
}
public boolean equals(Object obj)
{
if(!(obj instanceof OfertaPacoteDados))
return false;
return ((OfertaPacoteDados)obj).getIdtOferta() == idtOferta;
}
public String toString()
{
return "ID:" + idtOferta;
}
public int compareTo(Object obj)
{
if(!(obj instanceof OfertaPacoteDados))
throw new IllegalArgumentException();
return this.idtOferta - ((OfertaPacoteDados)obj).getIdtOferta();
}
/**
* Retorna o hash do objeto.
*
* @return int Hash do objeto.
*/
public int hashCode()
{
StringBuffer result = new StringBuffer();
result.append(this.getClass().getName());
result.append("||");
result.append(this.idtOferta);
return result.toString().hashCode();
}
/**
* Retorna uma nova instancia do mesmo objeto
*
*/
public Object clone()
{
OfertaPacoteDados oferta = new OfertaPacoteDados();
oferta.setIdtOferta(this.idtOferta);
oferta.setPacoteDados(this.pacoteDados);
oferta.setDataCadastro(this.dataCadastro);
oferta.setDataInicioOferta(this.dataInicioOferta);
oferta.setEnviaBroadcast(this.enviaBroadcast);
oferta.setAssinantes(this.assinantes);
return oferta;
}
/**
* @return the desOferta
*/
public String getDesOferta()
{
return desOferta;
}
/**
* @param desOferta the desOferta to set
*/
public void setDesOferta(String desOferta)
{
this.desOferta = desOferta;
}
}
|
[
"lucianovilela@gmail.com"
] |
lucianovilela@gmail.com
|
456c46fd9d55326696e013dc8227427c8242c8b7
|
3c762fba7c3ef9326cf9336bac723fc7ad445d5a
|
/src/test/java/io/appium/java_client/android/AndroidActivityTest.java
|
c130e0b655770524e817c79d169950c04428ee81
|
[
"Apache-2.0"
] |
permissive
|
hoangdang1449/java-client
|
a4b297a5bee379eac644ba60258ab644e6e12a69
|
395a9cd151fbbc3a646c2a693ab21b121db626bb
|
refs/heads/master
| 2020-12-24T12:47:53.410647
| 2016-06-15T20:44:31
| 2016-06-15T20:44:31
| 61,485,297
| 1
| 0
| null | 2016-06-19T14:55:14
| 2016-06-19T14:55:14
| null |
UTF-8
|
Java
| false
| false
| 2,704
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.appium.java_client.android;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
public class AndroidActivityTest extends BaseAndroidTest {
@Before public void setUp() throws Exception {
driver.startActivity("io.appium.android.apis", ".ApiDemos");
}
@Test public void startActivityInThisAppTestCase() {
driver.startActivity("io.appium.android.apis",
".accessibility.AccessibilityNodeProviderActivity");
assertEquals(driver.currentActivity(),
".accessibility.AccessibilityNodeProviderActivity");
}
@Test public void startActivityWithWaitingAppTestCase() {
driver.startActivity("io.appium.android.apis",
".accessibility.AccessibilityNodeProviderActivity",
"io.appium.android.apis", ".accessibility.AccessibilityNodeProviderActivity");
assertEquals(driver.currentActivity(),
".accessibility.AccessibilityNodeProviderActivity");
}
@Test public void startActivityInNewAppTestCase() {
driver.startActivity("com.android.contacts", ".ContactsListActivity");
assertEquals(driver.currentActivity(), ".ContactsListActivity");
driver.pressKeyCode(AndroidKeyCode.BACK);
assertEquals(driver.currentActivity(), ".ContactsListActivity");
}
@Test public void startActivityInNewAppTestCaseWithoutClosingApp() {
driver.startActivity("io.appium.android.apis",
".accessibility.AccessibilityNodeProviderActivity");
assertEquals(driver.currentActivity(), ".accessibility.AccessibilityNodeProviderActivity");
driver.startActivity("com.android.contacts", ".ContactsListActivity",
"com.android.contacts", ".ContactsListActivity", false);
assertEquals(driver.currentActivity(), ".ContactsListActivity");
driver.pressKeyCode(AndroidKeyCode.BACK);
assertEquals(driver.currentActivity(),
".accessibility.AccessibilityNodeProviderActivity");
}
}
|
[
"tichomirovsergey@gmail.com"
] |
tichomirovsergey@gmail.com
|
06bf081b57791f2fb3344f92aae28eefd2624e29
|
f27883bf0aeb2c65c1ea00035aea01059d2d5b37
|
/src/test/java/ru/patterns/creational/factory/FactoryTest.java
|
7bb95355defe5b727c0ed79d2bc38c23929d56bd
|
[
"Apache-2.0"
] |
permissive
|
Sir-Hedgehog/design_patterns
|
27e73fa83305d3cab903cabee110662379c7d433
|
c2b3d3355ad6d5e6d487c89a2705f3cbc09a662e
|
refs/heads/main
| 2023-05-29T03:55:02.590804
| 2021-06-02T20:15:10
| 2021-06-02T20:15:10
| 300,958,074
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,365
|
java
|
package ru.patterns.creational.factory;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
/**
* @author Sir-Hedgehog (mailto:quaresma_08@mail.ru)
* @version 1.0
* @since 03.10.2020
*/
public class FactoryTest {
@Test
public void checkSpecialtyOfFootballPlayerInSportsAcademy() {
FilterOfSpecialty filterOfSpecialty = new FilterOfSpecialty();
SportsAcademy academy = filterOfSpecialty.filter("football");
Sportsman sportsman = academy.preparesSportsman();
assertEquals(sportsman.sport(), "Football player kicks ball into the goal!");
}
@Test
public void checkSpecialtyOfBasketballPlayerInSportsAcademy() {
FilterOfSpecialty filterOfSpecialty = new FilterOfSpecialty();
SportsAcademy academy = filterOfSpecialty.filter("basketball");
Sportsman sportsman = academy.preparesSportsman();
assertEquals(sportsman.sport(), "Basketball player throws ball into the ring!");
}
@Test
public void checkUnknownSpecialtyOfPlayerInSportsAcademy() {
FilterOfSpecialty filterOfSpecialty = new FilterOfSpecialty();
try {
filterOfSpecialty.filter("tennis");
} catch (RuntimeException expected) {
assertEquals("Our sports academy doesn't prepare sportsmen of such type", expected.getMessage());
}
}
}
|
[
"mailto:quaresma_08@mail.ru"
] |
mailto:quaresma_08@mail.ru
|
ec02068fe74232b53a9f29a79d084dc6f5a7890b
|
e7ca3a996490d264bbf7e10818558e8249956eda
|
/aliyun-java-sdk-ons/src/main/java/com/aliyuncs/ons/model/v20170918/OnsMqttQueryHistoryOnlineResponse.java
|
8aaf4f2694466d36be3d984910adedc0ae94dc40
|
[
"Apache-2.0"
] |
permissive
|
AndyYHL/aliyun-openapi-java-sdk
|
6f0e73f11f040568fa03294de2bf9a1796767996
|
15927689c66962bdcabef0b9fc54a919d4d6c494
|
refs/heads/master
| 2020-03-26T23:18:49.532887
| 2018-08-21T04:12:23
| 2018-08-21T04:12:23
| 145,530,169
| 1
| 0
| null | 2018-08-21T08:14:14
| 2018-08-21T08:14:13
| null |
UTF-8
|
Java
| false
| false
| 2,610
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.ons.model.v20170918;
import java.util.List;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.ons.transform.v20170918.OnsMqttQueryHistoryOnlineResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class OnsMqttQueryHistoryOnlineResponse extends AcsResponse {
private String requestId;
private String helpUrl;
private Data data;
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public String getHelpUrl() {
return this.helpUrl;
}
public void setHelpUrl(String helpUrl) {
this.helpUrl = helpUrl;
}
public Data getData() {
return this.data;
}
public void setData(Data data) {
this.data = data;
}
public static class Data {
private String title;
private String xUnit;
private String yUnit;
private List<StatsDataDo> records;
public String getTitle() {
return this.title;
}
public void setTitle(String title) {
this.title = title;
}
public String getXUnit() {
return this.xUnit;
}
public void setXUnit(String xUnit) {
this.xUnit = xUnit;
}
public String getYUnit() {
return this.yUnit;
}
public void setYUnit(String yUnit) {
this.yUnit = yUnit;
}
public List<StatsDataDo> getRecords() {
return this.records;
}
public void setRecords(List<StatsDataDo> records) {
this.records = records;
}
public static class StatsDataDo {
private Long x;
private Float y;
public Long getX() {
return this.x;
}
public void setX(Long x) {
this.x = x;
}
public Float getY() {
return this.y;
}
public void setY(Float y) {
this.y = y;
}
}
}
@Override
public OnsMqttQueryHistoryOnlineResponse getInstance(UnmarshallerContext context) {
return OnsMqttQueryHistoryOnlineResponseUnmarshaller.unmarshall(this, context);
}
}
|
[
"haowei.yao@alibaba-inc.com"
] |
haowei.yao@alibaba-inc.com
|
fa8d651d51930bcde0580e92346f14846ecc0921
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/5/5_0707ad797384d8c326e412808e94c780bbd9dc64/ItemOreDirv/5_0707ad797384d8c326e412808e94c780bbd9dc64_ItemOreDirv_s.java
|
5c897bf7445921fb1018096b64e2c132ace4bedb
|
[] |
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
| 6,156
|
java
|
package com.builtbroken.assemblyline.item;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.oredict.OreDictionary;
import com.builtbroken.assemblyline.ALRecipeLoader;
import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.minecraft.DarkCore;
import com.builtbroken.minecraft.EnumMaterial;
import com.builtbroken.minecraft.EnumOrePart;
import com.builtbroken.minecraft.IExtraInfo.IExtraItemInfo;
import com.builtbroken.minecraft.LaserEvent;
import com.builtbroken.minecraft.prefab.ItemBasic;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
/** A series of items that are derived from a basic material
*
* @author DarkGuardsman */
public class ItemOreDirv extends ItemBasic implements IExtraItemInfo
{
public ItemOreDirv()
{
super(DarkCore.getNextItemId(), "Metal_Parts", AssemblyLine.CONFIGURATION);
this.setHasSubtypes(true);
this.setCreativeTab(CreativeTabs.tabMaterials);
MinecraftForge.EVENT_BUS.register(this);
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
if (itemStack != null)
{
return "item." + AssemblyLine.PREFIX + EnumOrePart.getFullName(itemStack.getItemDamage());
}
else
{
return this.getUnlocalizedName();
}
}
@Override
public Icon getIconFromDamage(int i)
{
return EnumMaterial.getIcon(i);
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IconRegister iconRegister)
{
for (EnumMaterial mat : EnumMaterial.values())
{
mat.itemIcons = new Icon[EnumOrePart.values().length];
for (EnumOrePart part : EnumOrePart.values())
{
if (mat.shouldCreateItem(part))
{
mat.itemIcons[part.ordinal()] = iconRegister.registerIcon(AssemblyLine.PREFIX + mat.simpleName + part.simpleName);
}
}
}
}
@Override
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List)
{
for (EnumMaterial mat : EnumMaterial.values())
{
for (EnumOrePart part : EnumOrePart.values())
{
ItemStack stack = EnumMaterial.getStack(this, mat, part, 1);
if (stack != null && mat.shouldCreateItem(part) && mat.itemIcons[part.ordinal()] != null)
{
par3List.add(stack);
}
}
}
}
@Override
public boolean hasExtraConfigs()
{
return false;
}
@Override
public void loadExtraConfigs(Configuration config)
{
// TODO Auto-generated method stub
}
@Override
public void loadOreNames()
{
for (EnumMaterial mat : EnumMaterial.values())
{
for (EnumOrePart part : EnumOrePart.values())
{
if (mat.shouldCreateItem(part))
{
//System.out.println(" N: " + mat.getOreName(part) + " R:" + mat.getOreNameReverse(part));
OreDictionary.registerOre(mat.getOreName(part), mat.getStack(this, part, 1));
OreDictionary.registerOre(mat.getOreNameReverse(part), mat.getStack(this, part, 1));
}
}
}
}
@ForgeSubscribe
public void LaserSmeltEvent(LaserEvent.LaserDropItemEvent event)
{
if (event.items != null)
{
for (int i = 0; i < event.items.size(); i++)
{
if (event.items.get(i).itemID == Block.blockIron.blockID)
{
event.items.set(i, EnumMaterial.getStack(this, EnumMaterial.IRON, EnumOrePart.MOLTEN, event.items.get(i).stackSize * 9));
}
else if (event.items.get(i).itemID == Block.blockGold.blockID)
{
event.items.set(i, EnumMaterial.getStack(this, EnumMaterial.GOLD, EnumOrePart.MOLTEN, event.items.get(i).stackSize * 9));
}
else if (event.items.get(i).itemID == Block.oreIron.blockID)
{
event.items.set(i, EnumMaterial.getStack(this, EnumMaterial.IRON, EnumOrePart.MOLTEN, event.items.get(i).stackSize));
}
else if (event.items.get(i).itemID == Block.oreGold.blockID)
{
event.items.set(i, EnumMaterial.getStack(this, EnumMaterial.GOLD, EnumOrePart.MOLTEN, event.items.get(i).stackSize));
}
String oreName = OreDictionary.getOreName(OreDictionary.getOreID(event.items.get(i)));
if (oreName != null)
{
for (EnumMaterial mat : EnumMaterial.values())
{
if (oreName.equalsIgnoreCase("ore" + mat.simpleName) || oreName.equalsIgnoreCase(mat.simpleName + "ore"))
{
event.items.set(i, mat.getStack(this, EnumOrePart.MOLTEN, event.items.get(i).stackSize + 1 + event.world.rand.nextInt(3)));
break;
}
else if (oreName.equalsIgnoreCase("ingot" + mat.simpleName) || oreName.equalsIgnoreCase(mat.simpleName + "ingot"))
{
event.items.set(i, mat.getStack(this, EnumOrePart.MOLTEN, event.items.get(i).stackSize));
break;
}
}
}
}
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
e67e917fea8be8b7676d2e91bea5fa88a4c6f509
|
92061aae80206f826a25296ece6ed56aaffe236f
|
/src/main/java/com/jianglibo/vaadin/dashboard/repositories/BoxRepository.java
|
fba56c363cff0cc42814e77819bebad68e69090d
|
[] |
no_license
|
jwangkun/easyinstaller
|
3132abb8ccd98092628c04b32aaadd3cabde1254
|
470a02a12c67d7dfc0ddc3aa0bf832adf8a64c5f
|
refs/heads/master
| 2021-01-12T13:07:35.868641
| 2016-10-27T13:03:57
| 2016-10-27T13:03:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,101
|
java
|
package com.jianglibo.vaadin.dashboard.repositories;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
import com.jianglibo.vaadin.dashboard.domain.Box;
@RepositoryRestResource(collectionResourceRel = "boxs", path = "boxs")
public interface BoxRepository extends JpaRepository<Box, Long>, BoxRepositoryCustom<Box>,
JpaSpecificationExecutor<Box>, RepositoryCommonMethod<Box> {
Page<Box> findByArchivedEquals(boolean trashed, Pageable pageable);
long countByArchivedEquals(boolean trashed);
Page<Box> findByIpContainingIgnoreCaseOrDescriptionContainingIgnoreCaseAndArchivedEquals(String filterStr,
String filterStr2, boolean trashed, Pageable pageable);
long countByIpContainingIgnoreCaseOrDescriptionContainingIgnoreCaseAndArchivedEquals(String filterStr,
String filterStr2, boolean trashed);
Box findByIp(String string);
}
|
[
"jianglibo@gmail.com"
] |
jianglibo@gmail.com
|
63dff6b2b9b6562a5f584728396b59592ea29582
|
8ec986726b3b60170aec4cb9772d3bdb163710af
|
/lib/lib-utils/src/main/java/org/sagebionetworks/util/TimeoutUtils.java
|
906b70caba1cb23be3645479c053a552105cfcfb
|
[
"Apache-2.0"
] |
permissive
|
marcomarasca/Synapse-Repository-Services
|
871446d7bc8e27ca9f4e3d16c4f2007e3f69f5d3
|
294e6f422ef9a1367deaf511bc97473623233da4
|
refs/heads/develop
| 2023-08-17T12:25:54.442901
| 2023-08-16T15:40:47
| 2023-08-16T15:40:47
| 190,295,841
| 0
| 0
|
Apache-2.0
| 2023-02-22T08:31:06
| 2019-06-04T23:55:19
|
Java
|
UTF-8
|
Java
| false
| false
| 699
|
java
|
package org.sagebionetworks.util;
/**
* Simple utility to determine if an event has expired. If the utility is
* injected into a dependency, expiration checks can be tested using a mock
* TimeoutUtils regardless of real time.
*
*/
public class TimeoutUtils {
/**
* Given a timeout (MS) and the start time of an event (epoch time), has the
* event expired?
*
* @param timeoutMS
* The timeout in MS.
* @param startEpochTime
* The s
* @return
*/
public boolean hasExpired(long timeoutMS, long startEpochTime) {
long now = System.currentTimeMillis();
long expires = startEpochTime + timeoutMS;
return now > expires;
}
}
|
[
"john.hill@sagebase.org"
] |
john.hill@sagebase.org
|
59125534e75743a7a2130b6bfe1cc7ec8d725757
|
fec4a09f54f4a1e60e565ff833523efc4cc6765a
|
/Dependencies/work/decompile-00fabbe5/net/minecraft/world/entity/ai/goal/PathfinderGoalArrowAttack.java
|
37283b01306046484574ee996116848ceb0fb186
|
[] |
no_license
|
DefiantBurger/SkyblockItems
|
012d2082ae3ea43b104ac4f5bf9eeb509889ec47
|
b849b99bd4dc52ae2f7144ddee9cbe2fd1e6bf03
|
refs/heads/master
| 2023-06-23T17:08:45.610270
| 2021-07-27T03:27:28
| 2021-07-27T03:27:28
| 389,780,883
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,367
|
java
|
package net.minecraft.world.entity.ai.goal;
import java.util.EnumSet;
import net.minecraft.util.MathHelper;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityInsentient;
import net.minecraft.world.entity.EntityLiving;
import net.minecraft.world.entity.monster.IRangedEntity;
public class PathfinderGoalArrowAttack extends PathfinderGoal {
private final EntityInsentient mob;
private final IRangedEntity rangedAttackMob;
private EntityLiving target;
private int attackTime;
private final double speedModifier;
private int seeTime;
private final int attackIntervalMin;
private final int attackIntervalMax;
private final float attackRadius;
private final float attackRadiusSqr;
public PathfinderGoalArrowAttack(IRangedEntity irangedentity, double d0, int i, float f) {
this(irangedentity, d0, i, i, f);
}
public PathfinderGoalArrowAttack(IRangedEntity irangedentity, double d0, int i, int j, float f) {
this.attackTime = -1;
if (!(irangedentity instanceof EntityLiving)) {
throw new IllegalArgumentException("ArrowAttackGoal requires Mob implements RangedAttackMob");
} else {
this.rangedAttackMob = irangedentity;
this.mob = (EntityInsentient) irangedentity;
this.speedModifier = d0;
this.attackIntervalMin = i;
this.attackIntervalMax = j;
this.attackRadius = f;
this.attackRadiusSqr = f * f;
this.a(EnumSet.of(PathfinderGoal.Type.MOVE, PathfinderGoal.Type.LOOK));
}
}
@Override
public boolean a() {
EntityLiving entityliving = this.mob.getGoalTarget();
if (entityliving != null && entityliving.isAlive()) {
this.target = entityliving;
return true;
} else {
return false;
}
}
@Override
public boolean b() {
return this.a() || !this.mob.getNavigation().m();
}
@Override
public void d() {
this.target = null;
this.seeTime = 0;
this.attackTime = -1;
}
@Override
public void e() {
double d0 = this.mob.h(this.target.locX(), this.target.locY(), this.target.locZ());
boolean flag = this.mob.getEntitySenses().a(this.target);
if (flag) {
++this.seeTime;
} else {
this.seeTime = 0;
}
if (d0 <= (double) this.attackRadiusSqr && this.seeTime >= 5) {
this.mob.getNavigation().o();
} else {
this.mob.getNavigation().a((Entity) this.target, this.speedModifier);
}
this.mob.getControllerLook().a(this.target, 30.0F, 30.0F);
if (--this.attackTime == 0) {
if (!flag) {
return;
}
float f = (float) Math.sqrt(d0) / this.attackRadius;
float f1 = MathHelper.a(f, 0.1F, 1.0F);
this.rangedAttackMob.a(this.target, f1);
this.attackTime = MathHelper.d(f * (float) (this.attackIntervalMax - this.attackIntervalMin) + (float) this.attackIntervalMin);
} else if (this.attackTime < 0) {
this.attackTime = MathHelper.floor(MathHelper.d(Math.sqrt(d0) / (double) this.attackRadius, (double) this.attackIntervalMin, (double) this.attackIntervalMax));
}
}
}
|
[
"joseph.cicalese@gmail.com"
] |
joseph.cicalese@gmail.com
|
75f3dba87f8a897a99ff5d2b67030b2cc4bf39ed
|
ba3bf48f5055fabcf066f3597d8a0325d89f86a6
|
/dameng/hazelcast-persistence/.svn/pristine/75/75f3dba87f8a897a99ff5d2b67030b2cc4bf39ed.svn-base
|
907e483ab6cbb547465b93c9a99d260f254c6b1c
|
[] |
no_license
|
rzs840707/EasyCache-TpcW
|
b04cb6f9846e78f8e597ab17cbfbe7a838e2cdc2
|
f390fa7a9f09bac52fdfcfd20feed924584dab46
|
refs/heads/master
| 2021-01-11T00:22:25.018813
| 2016-10-08T11:56:58
| 2016-10-08T11:56:58
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,521
|
/*
* Copyright (c) 2008-2013, 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.
*/
package com.hazelcast.spi;
import com.hazelcast.nio.ObjectDataInput;
import com.hazelcast.nio.ObjectDataOutput;
import java.io.IOException;
/**
* @mdogan 2/12/13
*/
public final class DefaultObjectNamespace implements ObjectNamespace {
private String service;
private Object objectId;
public DefaultObjectNamespace() {
}
public DefaultObjectNamespace(String serviceName, Object objectId) {
this.service = serviceName;
this.objectId = objectId;
}
public String getServiceName() {
return service;
}
public Object getObjectId() {
return objectId;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
DefaultObjectNamespace that = (DefaultObjectNamespace) o;
if (objectId != null ? !objectId.equals(that.objectId) : that.objectId != null) return false;
if (service != null ? !service.equals(that.service) : that.service != null) return false;
return true;
}
@Override
public int hashCode() {
int result = service != null ? service.hashCode() : 0;
result = 31 * result + (objectId != null ? objectId.hashCode() : 0);
return result;
}
public void writeData(ObjectDataOutput out) throws IOException {
out.writeUTF(service);
out.writeObject(objectId);
}
public void readData(ObjectDataInput in) throws IOException {
service = in.readUTF();
objectId = in.readObject();
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder();
sb.append("DefaultObjectNamespace");
sb.append("{service='").append(service).append('\'');
sb.append(", objectId=").append(objectId);
sb.append('}');
return sb.toString();
}
}
|
[
"duansky22@163.com"
] |
duansky22@163.com
|
|
3b3a08085a7027d6f1bdc2902e24cb1f41a26241
|
400ae0816bbf90fdb9a2dc1fc5d2e602b31a93b2
|
/app/src/main/java/com/dengzi/moduletest/activity/ImageActivity.java
|
dda2a7d6f6b3c29d9b30e8e669a108c229dd3c0a
|
[] |
no_license
|
xiaodengzi0812/ModuleTest
|
ea2562fcd52ab6d20381f3f50a49e2e10892c39c
|
9499aa725ba1d9084824522151ff78c399dab5c6
|
refs/heads/master
| 2021-01-20T04:22:50.664023
| 2018-01-17T15:06:53
| 2018-01-17T15:06:53
| 101,388,824
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,380
|
java
|
package com.dengzi.moduletest.activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import com.dengzi.moduletest.R;
import com.dengzi.moduletest.base.BaseBackActivity;
import com.dengzi.lib.util.ImageUtils;
import com.dengzi.lib.util.SizeUtils;
/**
* @Title:Image工具类Demo
* @Author: djk
* @Time: 2017/8/2
* @Version:1.0.0
*/
public class ImageActivity extends BaseBackActivity {
public static void start(Context context) {
Intent starter = new Intent(context, ImageActivity.class);
context.startActivity(starter);
}
private ImageView ivSrc;
private ImageView ivView2Bitmap;
@Override
public void initData(Bundle bundle) {
}
@Override
public int bindLayout() {
return R.layout.activity_image;
}
@Override
public void initView(Bundle savedInstanceState, View view) {
getToolBar().setTitle(getString(R.string.demo_image));
ivSrc = (ImageView) findViewById(R.id.iv_src);
ivView2Bitmap = (ImageView) findViewById(R.id.iv_view2Bitmap);
ImageView ivRound = (ImageView) findViewById(R.id.iv_round);
ImageView ivRoundCorner = (ImageView) findViewById(R.id.iv_round_corner);
ImageView ivFastBlur = (ImageView) findViewById(R.id.iv_fast_blur);
ImageView ivRenderScriptBlur = (ImageView) findViewById(R.id.iv_render_script_blur);
ImageView ivStackBlur = (ImageView) findViewById(R.id.iv_stack_blur);
ImageView ivAddFrame = (ImageView) findViewById(R.id.iv_add_frame);
ImageView ivAddReflection = (ImageView) findViewById(R.id.iv_add_reflection);
ImageView ivAddTextWatermark = (ImageView) findViewById(R.id.iv_add_text_watermark);
ImageView ivAddImageWatermark = (ImageView) findViewById(R.id.iv_add_image_watermark);
ImageView ivGray = (ImageView) findViewById(R.id.iv_gray);
Bitmap src = ImageUtils.getBitmap(R.drawable.lena);
Bitmap watermark = ImageUtils.getBitmap(R.mipmap.ic_launcher);
SizeUtils.onForceGetViewSize(ivSrc, new SizeUtils.onGetSizeListener() {
@Override
public void onGetSize(View view) {
ivView2Bitmap.setImageBitmap(ImageUtils.view2Bitmap(ivSrc));
}
});
ivRound.setImageBitmap(ImageUtils.toRound(src));
ivRoundCorner.setImageBitmap(ImageUtils.toRoundCorner(src, 60));
ivFastBlur.setImageBitmap(ImageUtils.fastBlur(src, 0.1f, 5));
ivRenderScriptBlur.setImageBitmap(ImageUtils.renderScriptBlur(src, 10));
src = ImageUtils.getBitmap(R.drawable.lena);
ivStackBlur.setImageBitmap(ImageUtils.stackBlur(src, 10, false));
ivAddFrame.setImageBitmap(ImageUtils.addFrame(src, 16, Color.GREEN));
ivAddReflection.setImageBitmap(ImageUtils.addReflection(src, 80));
ivAddTextWatermark.setImageBitmap(ImageUtils.addTextWatermark(src, "blankj", 40, 0x8800ff00, 0, 0));
ivAddImageWatermark.setImageBitmap(ImageUtils.addImageWatermark(src, watermark, 0, 0, 0x88));
ivGray.setImageBitmap(ImageUtils.toGray(src));
}
@Override
public void doBusiness(Context context) {
}
@Override
public void onWidgetClick(View view) {
}
}
|
[
"dengjiankai@wanda.cn"
] |
dengjiankai@wanda.cn
|
aff2add3f866911059f4be2dde273e271997edca
|
e66dfd2f3250e0e271dcdac4883227873e914429
|
/zml-appweb/src/main/java/weixin/guanjia/message/controller/UppicController.java
|
d0ffe41ea726dd10584998f4a58d00b757b67679
|
[] |
no_license
|
tianshency/zhuminle
|
d13b45a8a528f0da2142aab0fd999775fe476e0c
|
c864d0ab074dadf447504f54a82b2fc5b149b97e
|
refs/heads/master
| 2020-03-18T00:54:16.153820
| 2018-05-20T05:20:08
| 2018-05-20T05:20:08
| 134,118,245
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,278
|
java
|
package weixin.guanjia.message.controller;
import java.io.File;
import java.util.Map;
import java.util.UUID;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.FileCopyUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.jce.framework.core.common.controller.BaseController;
import com.jce.framework.core.util.ExceptionUtil;
import com.jce.framework.core.util.LogUtil;
import com.jce.framework.web.system.service.SystemService;
import weixin.util.DateUtils;
@Controller
@RequestMapping("/uppic")
public class UppicController extends BaseController {
private static final Logger logger = Logger
.getLogger(CkeUploadController.class);
@Autowired
private SystemService systemService;
//
private String sep = System.getProperty("file.separator");
/**
* 上传文件信息
* @param request
* @param response
* @return
*/
@RequestMapping(params = "doUpload")
public ModelAndView doUpload(HttpServletRequest request,
HttpServletResponse response) {
// 设置字符编码为UTF-8, 这样支持汉字显示
response.setCharacterEncoding("UTF-8");
//
MultipartHttpServletRequest mRequest = (MultipartHttpServletRequest) request;
//
String day = DateUtils.date2SStr();
//
String path = mRequest.getSession().getServletContext()
.getRealPath("/");
String base_save_path = "upload" + sep + day + sep;
//
String url_base_path = "upload/" + day + "/";
//
String save_path = path + base_save_path;
File save_folder = new File(save_path);
if (!save_folder.exists()) {
save_folder.mkdirs();
}
//
UUID uuid = UUID.randomUUID();
String callback = request.getParameter("CKEditorFuncNum");
String save_script = "<script type=\"text/javascript\">";
//
Map<String, MultipartFile> fileMap = mRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
MultipartFile mf = entity.getValue();// 获取上传文件对象
//
try {
// 取原文件名
String file_name = mf.getOriginalFilename().trim();
//
file_name = file_name.toLowerCase();
String save_file_name = uuid.toString().replaceAll("-", "")
+ file_name.substring(file_name.lastIndexOf("."));
//
String savePath = save_path + save_file_name;
//
save_script += "window.parent.setPicName('" + url_base_path
+ save_file_name + "');";
//
File savefile = new File(savePath);
//
FileCopyUtils.copy(mf.getBytes(), savefile);
//
savefile = null;
} catch (Exception e) {
logger.error(ExceptionUtil.getExceptionMessage(e));
}
}
save_script += "</script>";
//
request.setAttribute("list", save_script);
LogUtil.info("pic:" + save_script);
//
return new ModelAndView("weixin/guanjia/newstemplate/upload");
}
}
|
[
"tianshencaoyin@163.com"
] |
tianshencaoyin@163.com
|
86c58a33fe200568c39de094f3faf7903726ee6f
|
d9867d5ce94248519b3ef5d05647d10870d6acac
|
/generators/src/test/java/com/pholser/junit/quickcheck/generator/java/util/TimeZoneGeneratorTest.java
|
30be78485a2f977edd6de86de791e0bd2a190721
|
[
"MIT"
] |
permissive
|
framiere/junit-quickcheck
|
5fcb97f4fe3623994df82c56b891717c38608a3b
|
9f86970ab0f3b0d0d82f62f723cd5a66ed826fbf
|
refs/heads/master
| 2021-01-21T21:32:18.797017
| 2014-03-29T14:04:55
| 2014-03-29T14:04:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,240
|
java
|
/*
The MIT License
Copyright (c) 2010-2013 Paul R. Holser, Jr.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.pholser.junit.quickcheck.generator.java.util;
import java.lang.reflect.Type;
import java.util.List;
import java.util.Locale;
import java.util.TimeZone;
import com.pholser.junit.quickcheck.generator.BasicGeneratorTheoryParameterTest;
import static java.util.Arrays.*;
import static org.mockito.Mockito.*;
public class TimeZoneGeneratorTest extends BasicGeneratorTheoryParameterTest {
private static final String[] ZONES = TimeZone.getAvailableIDs();
@Override protected void primeSourceOfRandomness() {
when(randomForParameterGenerator.nextInt(0, ZONES.length - 1)).thenReturn(1).thenReturn(0).thenReturn(2);
}
@Override protected Type parameterType() {
return TimeZone.class;
}
@Override protected int sampleSize() {
return 3;
}
@Override protected List<?> randomValues() {
return asList(TimeZone.getTimeZone(ZONES[1]), TimeZone.getTimeZone(ZONES[0]), TimeZone.getTimeZone(ZONES[2]));
}
@Override public void verifyInteractionWithRandomness() {
verify(randomForParameterGenerator, times(3)).nextInt(0, ZONES.length - 1);
}
}
|
[
"pholser@alumni.rice.edu"
] |
pholser@alumni.rice.edu
|
bc006f0e218e6943f5ecdb052207fdf83d07dfe8
|
307706a5eddf823e18a0b779ed9123d02ddb0004
|
/src/main/java/com/josetesan/farmatify/web/rest/errors/ErrorConstants.java
|
cebfa15127300cf797051440e8d6475dc9c7fc8a
|
[] |
no_license
|
josetesan/farmatify-server
|
0a5609b2415349876cfcf26d32d59660743389c1
|
022dff78283571671e3b556486efddad345e8041
|
refs/heads/master
| 2021-07-06T00:51:06.784116
| 2019-04-21T19:00:35
| 2019-04-21T19:04:04
| 182,568,244
| 0
| 1
| null | 2020-09-18T09:02:30
| 2019-04-21T18:25:12
|
Java
|
UTF-8
|
Java
| false
| false
| 1,224
|
java
|
package com.josetesan.farmatify.web.rest.errors;
import java.net.URI;
public final class ErrorConstants {
public static final String ERR_CONCURRENCY_FAILURE = "error.concurrencyFailure";
public static final String ERR_VALIDATION = "error.validation";
public static final String PROBLEM_BASE_URL = "https://www.jhipster.tech/problem";
public static final URI DEFAULT_TYPE = URI.create(PROBLEM_BASE_URL + "/problem-with-message");
public static final URI CONSTRAINT_VIOLATION_TYPE = URI.create(PROBLEM_BASE_URL + "/constraint-violation");
public static final URI PARAMETERIZED_TYPE = URI.create(PROBLEM_BASE_URL + "/parameterized");
public static final URI ENTITY_NOT_FOUND_TYPE = URI.create(PROBLEM_BASE_URL + "/entity-not-found");
public static final URI INVALID_PASSWORD_TYPE = URI.create(PROBLEM_BASE_URL + "/invalid-password");
public static final URI EMAIL_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/email-already-used");
public static final URI LOGIN_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/login-already-used");
public static final URI EMAIL_NOT_FOUND_TYPE = URI.create(PROBLEM_BASE_URL + "/email-not-found");
private ErrorConstants() {
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
e5ec95cb4cb28e030aff7dbe464befc700100e1b
|
478106dd8b16402cc17cc39b8d65f6cd4e445042
|
/l2junity-gameserver/src/main/java/org/l2junity/gameserver/data/xml/impl/ClanRewardData.java
|
f841cbca2382be2a3066ec7e812c15d3828b1754
|
[] |
no_license
|
czekay22/L2JUnderGround
|
9f014cf87ddc10d7db97a2810cc5e49d74e26cdf
|
1597b28eab6ec4babbf333c11f6abbc1518b6393
|
refs/heads/master
| 2020-12-30T16:58:50.979574
| 2018-09-28T13:38:02
| 2018-09-28T13:38:02
| 91,043,466
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,070
|
java
|
/*
* Copyright (C) 2004-2015 L2J Unity
*
* This file is part of L2J Unity.
*
* L2J Unity 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.
*
* L2J Unity 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.l2junity.gameserver.data.xml.impl;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.l2junity.commons.util.IXmlReader;
import org.l2junity.gameserver.data.xml.IGameXmlReader;
import org.l2junity.gameserver.enums.ClanRewardType;
import org.l2junity.gameserver.model.holders.ItemHolder;
import org.l2junity.gameserver.model.holders.SkillHolder;
import org.l2junity.gameserver.model.pledge.ClanRewardBonus;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
/**
* @author UnAfraid
*/
public class ClanRewardData implements IGameXmlReader
{
private static final Logger LOGGER = LoggerFactory.getLogger(ClanRewardData.class);
private final Map<ClanRewardType, List<ClanRewardBonus>> _clanRewards = new ConcurrentHashMap<>();
protected ClanRewardData()
{
load();
}
@Override
public void load()
{
parseDatapackFile("config/ClanReward.xml");
for (ClanRewardType type : ClanRewardType.values())
{
LOGGER.info("Loaded: {} rewards for {}", _clanRewards.containsKey(type) ? _clanRewards.get(type).size() : 0, type);
}
}
@Override
public void parseDocument(Document doc, File f)
{
forEach(doc.getFirstChild(), IXmlReader::isNode, listNode ->
{
switch (listNode.getNodeName())
{
case "membersOnline":
{
parseMembersOnline(listNode);
break;
}
case "huntingBonus":
{
parseHuntingBonus(listNode);
break;
}
}
});
}
private void parseMembersOnline(Node node)
{
forEach(node, IXmlReader::isNode, memberNode ->
{
if ("players".equalsIgnoreCase(memberNode.getNodeName()))
{
final NamedNodeMap attrs = memberNode.getAttributes();
int requiredAmount = parseInteger(attrs, "size");
int level = parseInteger(attrs, "level");
final ClanRewardBonus bonus = new ClanRewardBonus(ClanRewardType.MEMBERS_ONLINE, level, requiredAmount);
forEach(memberNode, IXmlReader::isNode, skillNode ->
{
if ("skill".equalsIgnoreCase(skillNode.getNodeName()))
{
final NamedNodeMap skillAttr = skillNode.getAttributes();
final int skillId = parseInteger(skillAttr, "id");
final int skillLevel = parseInteger(skillAttr, "level");
bonus.setSkillReward(new SkillHolder(skillId, skillLevel));
}
});
_clanRewards.computeIfAbsent(bonus.getType(), key -> new ArrayList<>()).add(bonus);
}
});
}
private void parseHuntingBonus(Node node)
{
forEach(node, IXmlReader::isNode, memberNode ->
{
if ("hunting".equalsIgnoreCase(memberNode.getNodeName()))
{
final NamedNodeMap attrs = memberNode.getAttributes();
int requiredAmount = parseInteger(attrs, "points");
int level = parseInteger(attrs, "level");
final ClanRewardBonus bonus = new ClanRewardBonus(ClanRewardType.HUNTING_MONSTERS, level, requiredAmount);
forEach(memberNode, IXmlReader::isNode, itemsNode ->
{
if ("item".equalsIgnoreCase(itemsNode.getNodeName()))
{
final NamedNodeMap itemsAttr = itemsNode.getAttributes();
final int id = parseInteger(itemsAttr, "id");
final int count = parseInteger(itemsAttr, "count");
bonus.setItemReward(new ItemHolder(id, count));
}
});
_clanRewards.computeIfAbsent(bonus.getType(), key -> new ArrayList<>()).add(bonus);
}
});
}
public List<ClanRewardBonus> getClanRewardBonuses(ClanRewardType type)
{
return _clanRewards.get(type);
}
public ClanRewardBonus getHighestReward(ClanRewardType type)
{
ClanRewardBonus selectedBonus = null;
for (ClanRewardBonus currentBonus : _clanRewards.get(type))
{
if ((selectedBonus == null) || (selectedBonus.getLevel() < currentBonus.getLevel()))
{
selectedBonus = currentBonus;
}
}
return selectedBonus;
}
public Collection<List<ClanRewardBonus>> getClanRewardBonuses()
{
return _clanRewards.values();
}
/**
* Gets the single instance of ClanRewardData.
* @return single instance of ClanRewardData
*/
public static ClanRewardData getInstance()
{
return SingletonHolder.INSTANCE;
}
private static class SingletonHolder
{
protected static final ClanRewardData INSTANCE = new ClanRewardData();
}
}
|
[
"unafraid89@gmail.com"
] |
unafraid89@gmail.com
|
8a6af8d1a4a55a4fc72332b5e17e2fbd12077e92
|
1b105dde312926e19b5f07e5308e97015a320504
|
/src/main/java/de/intarsys/tools/serialize/StandardSerializationOutlet.java
|
e111dec87127e2f3b4cc3a72b047886b956de1a3
|
[
"BSD-3-Clause"
] |
permissive
|
RWTH-i5-IDSG/runtime
|
28444fe741247c91deeb2612b4a7424320711a26
|
eafbf169b7b848bb299b4e235c2941ac9f5d2fa0
|
refs/heads/master
| 2021-01-16T20:49:29.421226
| 2016-06-01T12:12:46
| 2016-06-01T12:15:30
| 60,166,551
| 0
| 0
| null | 2016-06-01T10:08:25
| 2016-06-01T10:08:24
| null |
UTF-8
|
Java
| false
| false
| 2,461
|
java
|
/*
* Copyright (c) 2007, intarsys consulting GmbH
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of intarsys nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package de.intarsys.tools.serialize;
import java.util.HashMap;
import java.util.Map;
/**
* A standard implementation for {@link ISerializationOutlet}.
*/
public class StandardSerializationOutlet implements ISerializationOutlet {
private Map<Class, ISerializationFactory> factories = new HashMap<Class, ISerializationFactory>();
public ISerializationFactory[] getSerializationFactories() {
return factories.values().toArray(
new ISerializationFactory[factories.size()]);
}
@Override
public ISerializationFactory lookupSerializationFactory(Class clazz,
SerializationContext context) {
return factories.get(clazz);
}
public void registerSerializationFactory(ISerializationFactory factory) {
factories.put(factory.getSerializationType(), factory);
}
public void unregisterSerializationFactory(ISerializationFactory factory) {
factories.remove(factory.getSerializationType());
}
}
|
[
"mtraut@intarsys.de"
] |
mtraut@intarsys.de
|
d7df5463048db0b1568964623297414619298ebe
|
a5d01febfd8d45a61f815b6f5ed447e25fad4959
|
/Source Code/5.5.1/sources/com/google/android/gms/internal/zzfha.java
|
e6542c84a6606c44d4f34a4a57fa2dd4674280c7
|
[] |
no_license
|
kkagill/Decompiler-IQ-Option
|
7fe5911f90ed2490687f5d216cb2940f07b57194
|
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
|
refs/heads/master
| 2020-09-14T20:44:49.115289
| 2019-11-04T06:58:55
| 2019-11-04T06:58:55
| 223,236,327
| 1
| 0
| null | 2019-11-21T18:17:17
| 2019-11-21T18:17:16
| null |
UTF-8
|
Java
| false
| false
| 340
|
java
|
package com.google.android.gms.internal;
final class zzfha implements zzfgw {
private zzfha() {
}
/* synthetic */ zzfha(zzfgt zzfgt) {
this();
}
public final byte[] zzg(byte[] bArr, int i, int i2) {
Object obj = new byte[i2];
System.arraycopy(bArr, i, obj, 0, i2);
return obj;
}
}
|
[
"yihsun1992@gmail.com"
] |
yihsun1992@gmail.com
|
91aff0fbc94922053ff582e5ab2afcacf6b1fc0c
|
0689f3b456ddce965659abcd4d2de68903de59a1
|
/src/main/java/com/example/jooq/demo_jooq/introduction/db/pg_catalog/routines/Notlike1.java
|
5b8bee656c7be03e20c20cd31b6f828063eae59f
|
[] |
no_license
|
vic0692/demo_spring_jooq
|
c92d2d188bbbb4aa851adab5cc301d1051c2f209
|
a5c1fd1cb915f313f40e6f4404fdc894fffc8e70
|
refs/heads/master
| 2022-09-18T09:38:30.362573
| 2020-01-23T17:09:40
| 2020-01-23T17:09:40
| 220,638,715
| 0
| 0
| null | 2022-09-08T01:04:47
| 2019-11-09T12:25:46
|
Java
|
UTF-8
|
Java
| false
| true
| 2,365
|
java
|
/*
* This file is generated by jOOQ.
*/
package com.example.jooq.demo_jooq.introduction.db.pg_catalog.routines;
import com.example.jooq.demo_jooq.introduction.db.pg_catalog.PgCatalog;
import javax.annotation.Generated;
import org.jooq.Field;
import org.jooq.Parameter;
import org.jooq.impl.AbstractRoutine;
import org.jooq.impl.Internal;
/**
* This class is generated by jOOQ.
*/
@Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.12.3"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Notlike1 extends AbstractRoutine<Boolean> {
private static final long serialVersionUID = 1923430821;
/**
* The parameter <code>pg_catalog.notlike.RETURN_VALUE</code>.
*/
public static final Parameter<Boolean> RETURN_VALUE = Internal.createParameter("RETURN_VALUE", org.jooq.impl.SQLDataType.BOOLEAN, false, false);
/**
* The parameter <code>pg_catalog.notlike._1</code>.
*/
public static final Parameter<String> _1 = Internal.createParameter("_1", org.jooq.impl.SQLDataType.CLOB, false, true);
/**
* The parameter <code>pg_catalog.notlike._2</code>.
*/
public static final Parameter<String> _2 = Internal.createParameter("_2", org.jooq.impl.SQLDataType.CLOB, false, true);
/**
* Create a new routine call instance
*/
public Notlike1() {
super("notlike", PgCatalog.PG_CATALOG, org.jooq.impl.SQLDataType.BOOLEAN);
setReturnParameter(RETURN_VALUE);
addInParameter(_1);
addInParameter(_2);
setOverloaded(true);
}
/**
* Set the <code>_1</code> parameter IN value to the routine
*/
public void set__1(String value) {
setValue(_1, value);
}
/**
* Set the <code>_1</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void set__1(Field<String> field) {
setField(_1, field);
}
/**
* Set the <code>_2</code> parameter IN value to the routine
*/
public void set__2(String value) {
setValue(_2, value);
}
/**
* Set the <code>_2</code> parameter to the function to be used with a {@link org.jooq.Select} statement
*/
public void set__2(Field<String> field) {
setField(_2, field);
}
}
|
[
"vic0692@gmail.com"
] |
vic0692@gmail.com
|
67f9b5c46d962e9fbaf200b613fb420a6186a882
|
b48f7fee57c532dd6e02f58d1fb4f3232662d2b0
|
/winter-framework/src/main/java/de/uni_mannheim/informatik/dws/winter/matrices/matcher/BestChoiceMatching.java
|
94363ad4987f998175173ca65e781c3e8e5b65e0
|
[
"Apache-2.0"
] |
permissive
|
olehmberg/winter
|
9fd0bccdec57b04bef1e3271748e1add4ee08456
|
9715392e6b9069a484eb3a99813538c7584277ee
|
refs/heads/master
| 2022-05-27T12:39:43.778646
| 2021-12-17T11:21:54
| 2021-12-17T11:21:54
| 88,765,628
| 113
| 38
|
Apache-2.0
| 2022-05-20T20:48:08
| 2017-04-19T16:16:31
|
Java
|
UTF-8
|
Java
| false
| false
| 3,388
|
java
|
/*
* Copyright (c) 2017 Data and Web Science Group, University of Mannheim, Germany (http://dws.informatik.uni-mannheim.de/)
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*/
package de.uni_mannheim.informatik.dws.winter.matrices.matcher;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import de.uni_mannheim.informatik.dws.winter.matrices.SimilarityMatrix;
/**
* Greedy approach that selects the best stable match for each instance of the first dimension
* @author Oliver
*
*/
public class BestChoiceMatching extends MatrixMatcher {
private boolean forceOneToOneMapping = true;
public boolean isForceOneToOneMapping() {
return forceOneToOneMapping;
}
public void setForceOneToOneMapping(boolean forceOneToOneMapping) {
this.forceOneToOneMapping = forceOneToOneMapping;
}
public <T extends Comparable<? super T>> SimilarityMatrix<T> match(SimilarityMatrix<T> input) {
SimilarityMatrix<T> sim = getSimilarityMatrixFactory().createSimilarityMatrix(input.getFirstDimension().size(), input.getSecondDimension().size());
Set<T> alreadyMatched = new HashSet<T>();
// order all items so that we get consistent results in cases where the score is equal
ArrayList<T> dimension = new ArrayList<>(input.getFirstDimension());
Collections.sort(dimension);
for(T instance : dimension) {
double max = 0.0;
T best = null;
ArrayList<T> matches = new ArrayList<>(input.getMatches(instance));
Collections.sort(matches);
// determine best match
for(T candidate : matches) {
if(!alreadyMatched.contains(candidate) && input.get(instance, candidate)>max) {
max = input.get(instance, candidate);
best = candidate;
}
}
// make sure instance is also the best match for candidate (i.e. is this a stable pair)
for(T instance2 : input.getFirstDimension()) {
if(instance2!=instance && !alreadyMatched.contains(instance2) && input.get(instance2, best)!=null && input.get(instance2, best)>max) {
best = null;
break;
}
}
// if we found a stable pair
if(best!=null) {
sim.set(instance, best, max);
if(isForceOneToOneMapping()) {
alreadyMatched.add(instance);
alreadyMatched.add(best);
}
}
}
return sim;
}
}
|
[
"oliver.lehmberg@live.de"
] |
oliver.lehmberg@live.de
|
0b73ce14d1d7153a5f27c1376f130843d9f57141
|
6c986b31636574dc9a7c4f5a1e23b1e09f209211
|
/Struts2Log4j/src/main/java/actions/HomeAction.java
|
fb0962d04792cbc4f2007addec660623695330ed
|
[] |
no_license
|
kidaak/Examples
|
62f27c0e09e44fd5177b4168e2b4cdafb1fbe4a8
|
d782b337ef5da415a61f31031268308926a7a3ab
|
refs/heads/master
| 2021-01-17T19:55:00.456881
| 2015-12-22T22:50:29
| 2015-12-22T22:50:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 426
|
java
|
package actions;
import org.apache.log4j.Logger;
import com.opensymphony.xwork2.Action;
import org.apache.struts2.convention.annotation.*;
/**
* @author Oleg Romanenchuk
*/
public class HomeAction implements Action {
private static final Logger logger = Logger.getLogger(HomeAction.class);
public String execute(){
logger.info("inside HomeAction execute method");
return SUCCESS;
}
}
|
[
"marloncheg182@gmail.com"
] |
marloncheg182@gmail.com
|
90ef453abffe51fa486a587d3488f99e9c357ca6
|
62e334192393326476756dfa89dce9f0f08570d4
|
/tk_code/push/push-server/src/main/java/com/huatu/tiku/push/quartz/factory/MockJobFactory.java
|
401bdab08e65d584419294b14984e28ea02a38ca
|
[] |
no_license
|
JellyB/code_back
|
4796d5816ba6ff6f3925fded9d75254536a5ddcf
|
f5cecf3a9efd6851724a1315813337a0741bd89d
|
refs/heads/master
| 2022-07-16T14:19:39.770569
| 2019-11-22T09:22:12
| 2019-11-22T09:22:12
| 223,366,837
| 1
| 2
| null | 2022-06-30T20:21:38
| 2019-11-22T09:15:50
|
Java
|
UTF-8
|
Java
| false
| false
| 160
|
java
|
package com.huatu.tiku.push.quartz.factory;
/**
* 描述:
*
* @author biguodong
* Create time 2018-11-08 下午9:43
**/
public class MockJobFactory {
}
|
[
"jelly_b@126.com"
] |
jelly_b@126.com
|
5a41cc655dd93e6d2b9e20814ef6b5f019de7bf8
|
7a2c91813117a8d949571521510895ee53daad49
|
/src/main/java/com/alipay/api/domain/AntMerchantExpandIndirectActivityCreateModel.java
|
1829fb32c0fbae923bb89e07bf1d9bf6441c3e94
|
[
"Apache-2.0"
] |
permissive
|
dut3062796s/alipay-sdk-java-all
|
eb5afb5b570fb0deb40d8c960b85a01d13506568
|
559180f4c370f7fcfef67a1c559768d11475c745
|
refs/heads/master
| 2020-07-03T21:00:06.124387
| 2019-06-23T01:13:43
| 2019-06-23T01:13:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 9,859
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 间联商户运营活动报名接口
*
* @author auto create
* @since 1.0, 2018-12-29 11:01:33
*/
public class AntMerchantExpandIndirectActivityCreateModel extends AlipayObject {
private static final long serialVersionUID = 1613566542484329175L;
/**
* 活动类型,间连商户报名的支付宝活动类型。
蓝海行动:BLUE_SEA
特殊行业优惠费率:INDUSTRY_SPECIAL
*/
@ApiField("activity_type")
private String activityType;
/**
* 商户简称,门头照的名称或者大众点评、美团、饿了么、口碑、百度外卖入驻平台名称。需和进件时别名保持一致。
*/
@ApiField("alias_name")
private String aliasName;
/**
* 银行卡信息。
特殊行业,请参见<a href="https://docs.open.alipay.com/10933">间连特殊行业上传资质</a>
*/
@ApiField("bank_account")
private BankCardInfo bankAccount;
/**
* 营业执照,要求营业执照文本信息清晰可见。
请上传照片OSSKey(参见应用场景说明)。
蓝海行动必传。
特殊行业,请参见<a href="https://docs.open.alipay.com/10933">间连特殊行业上传资质</a>
*/
@ApiField("business_license_pic")
private String businessLicensePic;
/**
* 证明文件图片。
请上传照片OSSKey(参见应用场景说明)。
特殊行业,请参见<a href="https://docs.open.alipay.com/10933">间连特殊行业上传资质</a>
*/
@ApiField("certificate_file")
private String certificateFile;
/**
* 收费样本。
请上传照片OSSKey(参见应用场景说明)。
特殊行业,请参见<a href="https://docs.open.alipay.com/10933">间连特殊行业上传资质</a>
*/
@ApiField("charge_sample")
private String chargeSample;
/**
* 收银台照片
请上传照片OSSKey(参见应用场景说明)。
蓝海活动必须包含:①主扫:扫码支付场景需要展示具有支付宝logo和“推荐使用支付宝 或 支付就用支付宝”露出的二维码物料或立牌;②被
扫:展示具有支付宝logo和推荐使用支付宝 或 支付就用支付宝”的扫码机具(盒子 )
特殊行业,请参见<a href="https://docs.open.alipay.com/10933">间连特殊行业上传资质</a>
*/
@ApiField("checkstand_pic")
private String checkstandPic;
/**
* 照会。
请上传照片OSSKey(参见应用场景说明)。
特殊行业,请参见<a href="https://docs.open.alipay.com/10933">间连特殊行业上传资质</a>
*/
@ApiField("diplomatic_note")
private String diplomaticNote;
/**
* 店内环境照,要求照片清晰可见。
请上传照片OSSKey(参见应用场景说明)。
蓝海活动必传。
特殊行业,请参见<a href="https://docs.open.alipay.com/10933">间连特殊行业上传资质</a>
*/
@ApiField("indoor_pic")
private String indoorPic;
/**
* 事业单位法人证书图片。
请上传照片OSSKey(参见应用场景说明)。
特殊行业,请参见<a href="https://docs.open.alipay.com/10933">间连特殊行业上传资质</a>
*/
@ApiField("institutional_organization_pic")
private String institutionalOrganizationPic;
/**
* 法人身份证图片。需上传包含正反面的法人身份证图片。
请上传照片OSSKey(参见应用场景说明)。
特殊行业,请参见<a href="https://docs.open.alipay.com/10933">间连特殊行业上传资质</a>
*/
@ApiField("legal_person_pic")
private String legalPersonPic;
/**
* 法人登记证书图片。
请上传照片OSSKey(参见应用场景说明)。
特殊行业,请参见<a href="https://docs.open.alipay.com/10933">间连特殊行业上传资质</a>
*/
@ApiField("legal_person_registration_pic")
private String legalPersonRegistrationPic;
/**
* 医疗执业许可证图片。
请上传照片OSSKey(参见应用场景说明)。
特殊行业,请参见<a href="https://docs.open.alipay.com/10933">间连特殊行业上传资质</a>
*/
@ApiField("medical_instrument_practice_license_pic")
private String medicalInstrumentPracticeLicensePic;
/**
* 商户名称,营业执照上的名称,需和进件名称保持一致。
*/
@ApiField("name")
private String name;
/**
* 组织机构代码证图片。
请上传照片OSSKey(参见应用场景说明)。
特殊行业,请参见<a href="https://docs.open.alipay.com/10933">间连特殊行业上传资质</a>
*/
@ApiField("org_cert_pic")
private String orgCertPic;
/**
* 民办非企业单位登记证书图片。
请上传照片OSSKey(参见应用场景说明)。
特殊行业,请参见<a href="https://docs.open.alipay.com/10933">间连特殊行业上传资质</a>
*/
@ApiField("private_nonenterprise_units")
private String privateNonenterpriseUnits;
/**
* 办学资质图片。
请上传照片OSSKey(参见应用场景说明)。
特殊行业,请参见<a href="https://docs.open.alipay.com/10933">间连特殊行业上传资质</a>
*/
@ApiField("run_school_license_pic")
private String runSchoolLicensePic;
/**
* 主流餐饮平台入驻证明(任选一个即可):大众点评、美团、饿了么、口碑、百度外卖餐饮平台商户展示页面。
请上传照片OSSKey(参见应用场景说明)。
蓝海活动必传。
特殊行业,请参见<a href="https://docs.open.alipay.com/10933">间连特殊行业上传资质</a>
*/
@ApiField("settled_pic")
private String settledPic;
/**
* 门头照。
请上传照片OSSKey(参见应用场景说明)。
蓝海行动必传。
特殊行业,请参见<a href="https://docs.open.alipay.com/10933">间连特殊行业上传资质</a>
*/
@ApiField("shop_entrance_pic")
private String shopEntrancePic;
/**
* 商户在支付宝入驻成功后,生成的支付宝内全局唯一的商户编号
*/
@ApiField("sub_merchant_id")
private String subMerchantId;
public String getActivityType() {
return this.activityType;
}
public void setActivityType(String activityType) {
this.activityType = activityType;
}
public String getAliasName() {
return this.aliasName;
}
public void setAliasName(String aliasName) {
this.aliasName = aliasName;
}
public BankCardInfo getBankAccount() {
return this.bankAccount;
}
public void setBankAccount(BankCardInfo bankAccount) {
this.bankAccount = bankAccount;
}
public String getBusinessLicensePic() {
return this.businessLicensePic;
}
public void setBusinessLicensePic(String businessLicensePic) {
this.businessLicensePic = businessLicensePic;
}
public String getCertificateFile() {
return this.certificateFile;
}
public void setCertificateFile(String certificateFile) {
this.certificateFile = certificateFile;
}
public String getChargeSample() {
return this.chargeSample;
}
public void setChargeSample(String chargeSample) {
this.chargeSample = chargeSample;
}
public String getCheckstandPic() {
return this.checkstandPic;
}
public void setCheckstandPic(String checkstandPic) {
this.checkstandPic = checkstandPic;
}
public String getDiplomaticNote() {
return this.diplomaticNote;
}
public void setDiplomaticNote(String diplomaticNote) {
this.diplomaticNote = diplomaticNote;
}
public String getIndoorPic() {
return this.indoorPic;
}
public void setIndoorPic(String indoorPic) {
this.indoorPic = indoorPic;
}
public String getInstitutionalOrganizationPic() {
return this.institutionalOrganizationPic;
}
public void setInstitutionalOrganizationPic(String institutionalOrganizationPic) {
this.institutionalOrganizationPic = institutionalOrganizationPic;
}
public String getLegalPersonPic() {
return this.legalPersonPic;
}
public void setLegalPersonPic(String legalPersonPic) {
this.legalPersonPic = legalPersonPic;
}
public String getLegalPersonRegistrationPic() {
return this.legalPersonRegistrationPic;
}
public void setLegalPersonRegistrationPic(String legalPersonRegistrationPic) {
this.legalPersonRegistrationPic = legalPersonRegistrationPic;
}
public String getMedicalInstrumentPracticeLicensePic() {
return this.medicalInstrumentPracticeLicensePic;
}
public void setMedicalInstrumentPracticeLicensePic(String medicalInstrumentPracticeLicensePic) {
this.medicalInstrumentPracticeLicensePic = medicalInstrumentPracticeLicensePic;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getOrgCertPic() {
return this.orgCertPic;
}
public void setOrgCertPic(String orgCertPic) {
this.orgCertPic = orgCertPic;
}
public String getPrivateNonenterpriseUnits() {
return this.privateNonenterpriseUnits;
}
public void setPrivateNonenterpriseUnits(String privateNonenterpriseUnits) {
this.privateNonenterpriseUnits = privateNonenterpriseUnits;
}
public String getRunSchoolLicensePic() {
return this.runSchoolLicensePic;
}
public void setRunSchoolLicensePic(String runSchoolLicensePic) {
this.runSchoolLicensePic = runSchoolLicensePic;
}
public String getSettledPic() {
return this.settledPic;
}
public void setSettledPic(String settledPic) {
this.settledPic = settledPic;
}
public String getShopEntrancePic() {
return this.shopEntrancePic;
}
public void setShopEntrancePic(String shopEntrancePic) {
this.shopEntrancePic = shopEntrancePic;
}
public String getSubMerchantId() {
return this.subMerchantId;
}
public void setSubMerchantId(String subMerchantId) {
this.subMerchantId = subMerchantId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
0a0e842662bcc93ce2dc1a0261ce12875b1f3ac6
|
1c5e8605c1a4821bc2a759da670add762d0a94a2
|
/src/dahua/fdc/basedata/app/AbstractContractTypeF7UIHandler.java
|
1d41606f8f6f7346f424df618c687b3b6b10567a
|
[] |
no_license
|
shxr/NJG
|
8195cfebfbda1e000c30081399c5fbafc61bb7be
|
1b60a4a7458da48991de4c2d04407c26ccf2f277
|
refs/heads/master
| 2020-12-24T06:51:18.392426
| 2016-04-25T03:09:27
| 2016-04-25T03:09:27
| 19,804,797
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 403
|
java
|
/**
* output package name
*/
package com.kingdee.eas.fdc.basedata.app;
import com.kingdee.bos.Context;
import com.kingdee.eas.framework.batchHandler.RequestContext;
import com.kingdee.eas.framework.batchHandler.ResponseContext;
/**
* output class name
*/
public abstract class AbstractContractTypeF7UIHandler extends com.kingdee.eas.fdc.basedata.app.ContractTypeListUIHandler
{
}
|
[
"shxr_code@126.com"
] |
shxr_code@126.com
|
49f30445a3ee9eb69cf9dd8ef70ed6eaa57563e9
|
22e9aae293443a93d04192f9510bb6585c1f77c3
|
/express2/express-client/src/main/java/express/Client/Client.java
|
91bf13bbaa57605dc27f072aee6189f8d728bb60
|
[] |
no_license
|
Goldenbullet/presentationCODE
|
212ff5abe50ac5eb1b3406f4d4f542ce50e6483c
|
e5f172e1e95d8a3e646a02a9c50527285d959f93
|
refs/heads/master
| 2021-01-10T16:42:45.447261
| 2015-12-08T16:56:17
| 2015-12-08T16:56:17
| 46,796,185
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,567
|
java
|
//package express.Client;
//
//
//import java.awt.CardLayout;
//import java.awt.Color;
//import java.awt.Frame;
//import java.awt.event.ActionEvent;
//import java.awt.event.ActionListener;
//import java.awt.event.MouseEvent;
//import java.awt.event.MouseListener;
//
//import javax.swing.JButton;
//import javax.swing.JFrame;
//import javax.swing.JLabel;
//import javax.swing.JPanel;
//
//import express.presentation.mainUI.MainUI;
//import express.presentation.mainUI.MainUIService;
//import express.presentation.managerUI.managerLogUI;
//import express.presentation.managerUI.managerMenuUI;
//import express.presentation.userUI.SignInUI;
//
//public class Client extends JFrame{
// private SignInUI signin;
// private CardLayout card;
// private JPanel container;
// private MainUIService main;
//
// public Client(){
//
// this.setLayout(null);
// container = new JPanel();
// container.setBounds(0,0,400,400);
//// this.setContentPane(container);
// card= new CardLayout();
// container.setLayout(card);
//
// main = new MainUI(card,container);
// signin = new SignInUI(main);
// this.add(container);
// container.add("signin", signin);
// card.show(container, "signin");
//
// this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// this.setSize(400, 400);
// this.setVisible(true);
// }
//
// public static void main(String[] args) {
// // TODO Auto-generated method stub
//
// new Client();
//
// }
//
//}
/*
AdminBLService adminservice = new AdminBLService_stub("卢海龙","1001001",UserRole.DeliverMan,"123456");
AdminBLService_Driver admindriver = new AdminBLService_Driver();
admindriver.drive(adminservice);
ExamDocumentBLService examdocumentservice = new ExamdocumentBL_stub(new DocumentListVO());
ExamDocumentBLService_Driver examdriver = new ExamDocumentBLService_Driver();
examdriver.drive(examdocumentservice);
ArrayList<LogVO> log = new ArrayList<LogVO>();
SyslogBLService sysloservice = new SyslogBLService_stub(log);
SyslogBLService_Driver syslodriver = new SyslogBLService_Driver();
syslodriver.drive(sysloservice);
//
AdjustRepoBLService adjustRepoBLService=new AdjustRepoBLService_stub();
AdjustRepoBLService_Driver adjustRepo=new AdjustRepoBLService_Driver();
adjustRepo.drive(adjustRepoBLService);
BankAccountBLService bankAccountBLService=new BankAccountBLService_stub(null);
BankAccountBLService_Driver bankAccount=new BankAccountBLService_Driver();
bankAccount.drive(bankAccountBLService);
InventoryRepoBLService inventoryRepoBLService=new InventoryRepoBLService_stub(null);
InventoryRepoBLService_Driver inventory=new InventoryRepoBLService_Driver();
inventory.drive(inventoryRepoBLService);
PaymentBLService paymentBLService=new PaymentBLService_stub(null);
PaymentBLService_Driver payment=new PaymentBLService_Driver();
payment.drive(paymentBLService);
ScanRepoBLService scanRepoBLService=new ScanRepoBLService_stub(null);
ScanRepoBLService_Driver scanRepo=new ScanRepoBLService_Driver();
scanRepo.drive(scanRepoBLService);
StatisticFinancialBLService statisticFinancialBLservice=new StatisticFinancialBLservice_stub(null, null, null, null);
StatisticFinancialBLService_Driver statisticFinancial=new StatisticFinancialBLService_Driver();
statisticFinancial.drive(statisticFinancialBLservice);
StatisticManagerBLService statisticManagerBLService=new StatisticManagerBLService_stub(null,null,null,null);
StatisticManagerBLService_Driver statisticManager=new StatisticManagerBLService_Driver();
statisticManager.drive(statisticManagerBLService);
InnerAccountBLService innerAccountBLService=new InnerAccountBLService_stub();
InnerAccountBLService_Driver innerAccountBL=new InnerAccountBLService_Driver();
innerAccountBL.drive(innerAccountBLService);
//Lu Hailong
BusinessSaleArrivalDocumentblService arrivalDocservice=new BusinessSaleArrivalDocumentblService_stub("","","","",null);
BusinessSaleArrivalDocumentblService_Driver arrivalDocdriver=new BusinessSaleArrivalDocumentblService_Driver();
arrivalDocdriver.drive(arrivalDocservice);
BusinessSaleDeliverDocumentblService deliverDocservice=new BusinessSaleDeliverDocumentblService_stub(null, null, null);
BusinessSaleDeliverDocumentblService_Driver deliverDocdriver=new BusinessSaleDeliverDocumentblService_Driver();
deliverDocdriver.drive(deliverDocservice);
BusinessSaleReceiveDocumentblService receiveDocservice=new BusinessSaleReceiveDocumentblService_stub(null, 0, null, null);
BusinessSaleReceiveDocumentblService_Driver receiveDocdriver=new BusinessSaleReceiveDocumentblService_Driver();
receiveDocdriver.drive(receiveDocservice);
BusinessSaleShipmentDocumentblService shipmentDocservice=new BusinessSaleShipmentDocumentblService_stub(null, null, null, null, null, null, null, null, 0);
BusinessSaleShipmentDocumentblService_Driver shipmentDocdriver =new BusinessSaleShipmentDocumentblService_Driver();
shipmentDocdriver.drive(shipmentDocservice);
DriverBusinessSaleblService driverservice=new DriverBusinessSaleblService_stub(null, null, null);
DriverBusinessSaleblService_Driver driverdriver=new DriverBusinessSaleblService_Driver();
driverdriver.drive(driverservice);
VehicleBusinessSaleblService vehicleservice =new VehicleBusinessSaleblService_stub(null, null);
VehicleBusinessSaleblService_Driver vehicledriver=new VehicleBusinessSaleblService_Driver();
vehicledriver.drive(vehicleservice);
}
}*/
|
[
"hzluhailong@163.com"
] |
hzluhailong@163.com
|
22ce9f0c1c91d375bc99305b4a138d908040b4af
|
47bd92b0ec19cef05398478e93f141e985cc0e05
|
/comparer/comparer.synchro/comparer.synchro.reader/comparer.synchro.reader.processbookmaker/src/main/java/com/comparadorad/bet/comparer/synchro/reader/processbookmaker/exception/BetInactiveException.java
|
ce2aa338ecdca761748bc0319de1aa7b3cd585cb
|
[] |
no_license
|
chuguet/my-comparer
|
f43c0c3dbf7f635864bbf346c0c11c455f3cb831
|
471e7d83d1c5c5400f90d901faa4f24f8e755490
|
refs/heads/master
| 2021-01-15T21:03:21.584668
| 2014-08-07T08:57:20
| 2014-08-07T08:57:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 533
|
java
|
/**
*
* Copyright (C) FACTORIA ETSIA S.L.
* All Rights Reserved.
* www.factoriaetsia.com
*
*/
package com.comparadorad.bet.comparer.synchro.reader.processbookmaker.exception;
/**
* The Class SportNotFoundException.
*/
@SuppressWarnings("serial")
public class BetInactiveException extends InactiveElementException {
/**
* Instantiates a new sport not found exception.
*
* @param message
* the message
*/
public BetInactiveException(String message) {
super(message);
}
}
|
[
"huguet10@gmail.com@7daf7316-15a6-36d4-e5e8-a3ca7c335dfd"
] |
huguet10@gmail.com@7daf7316-15a6-36d4-e5e8-a3ca7c335dfd
|
49ad24ccf8be0dd753fa513539dace4dd5d7e4db
|
81e941866052c898768c23da985e9642bf6cd185
|
/sport/src/main/java/network/StephenRequestMyCallback.java
|
6c4a72b29224fc5f7556c56a50632da6913d521f
|
[] |
no_license
|
duboAndroid/PayAlibabaAndWeiXin
|
0093e8f2fbbaf7eaa995f20ab9d1bbd0d6905b37
|
6c92c5826b5d3909cc7aad1d019463824ea0dbfb
|
refs/heads/master
| 2020-03-22T11:20:48.219074
| 2018-07-09T07:01:39
| 2018-07-09T07:01:39
| 139,965,097
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 394
|
java
|
package network;
public abstract class StephenRequestMyCallback implements StephenRequestAsyncTask.RequestCallback {
@Override
public void onRequestPrepare() {}
@Override
public void onChangeProgress(int progress, int successFlag) {}
@Override
public void onCompleted(String returnMsg) {}
@Override
public boolean onCancel() {
return false;
}
}
|
[
"277627117@qq.com"
] |
277627117@qq.com
|
b8afa6a18570d700a6083984807a3d3645d13ac4
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdas/applicationModule/src/main/java/applicationModulepackageJava17/Foo835.java
|
16b4a5b95a5713b80211960ca7630e63a8e6eeb9
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 348
|
java
|
package applicationModulepackageJava17;
public class Foo835 {
public void foo0() {
new applicationModulepackageJava17.Foo834().foo5();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
6b96edf8a08641ab93d82c7b125a8a1bd93fcd4c
|
6c7c1614087af4375b13f9ff4fd62ae1f847af20
|
/JAICore/jaicore-ml/src/jaicore/ml/evaluation/evaluators/weka/MonteCarloCrossValidationEvaluator.java
|
7077e7387eebb66f776bcd755383da958746b073
|
[] |
no_license
|
alexanderwerning/AILibs
|
2fc24335397c23cb9a121306b9ff7953c2cd0249
|
47835caf4964cd31ec2aba3ed94b0875a46edf3f
|
refs/heads/master
| 2020-04-27T08:43:39.498853
| 2019-03-07T09:41:42
| 2019-03-07T09:41:42
| 162,276,055
| 0
| 0
| null | 2018-12-18T11:12:17
| 2018-12-18T11:12:16
| null |
UTF-8
|
Java
| false
| false
| 2,903
|
java
|
package jaicore.ml.evaluation.evaluators.weka;
import java.util.List;
import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import jaicore.basic.algorithm.exceptions.ObjectEvaluationFailedException;
import jaicore.ml.WekaUtil;
import weka.classifiers.Classifier;
import weka.core.Instances;
/**
* A classifier evaluator that can perform a (monte-carlo)cross-validation on
* the given dataset. Thereby, it uses the
* {@link AbstractEvaluatorMeasureBridge} to evaluate the classifier on a random
* split of the dataset.
*
* @author joshua
*
*/
public class MonteCarloCrossValidationEvaluator implements IClassifierEvaluator {
static final Logger logger = LoggerFactory.getLogger(MonteCarloCrossValidationEvaluator.class);
private boolean canceled = false;
private final int repeats;
private final Instances data;
private final double trainingPortion;
private final long seed;
/* Can either compute the loss or cache it */
private final AbstractEvaluatorMeasureBridge<Double, Double> bridge;
private final DescriptiveStatistics stats = new DescriptiveStatistics();
public MonteCarloCrossValidationEvaluator(AbstractEvaluatorMeasureBridge<Double, Double> bridge, final int repeats, final Instances data, final double trainingPortion, final long seed) {
super();
this.repeats = repeats;
this.bridge = bridge;
this.data = data;
this.trainingPortion = trainingPortion;
this.seed = seed;
}
public void cancel() {
logger.info("Received cancel");
this.canceled = true;
}
@Override
public Double evaluate(final Classifier pl) throws ObjectEvaluationFailedException, InterruptedException {
if (pl == null) {
throw new IllegalArgumentException("Cannot compute score for null pipeline!");
}
/* perform random stratified split */
logger.info("Starting evaluation of {}", pl);
for (int i = 0; i < this.repeats && !this.canceled && !Thread.currentThread().isInterrupted(); i++) {
logger.debug("Obtaining predictions of {} for split #{}/{}", pl, i + 1, this.repeats);
List<Instances> split = WekaUtil.getStratifiedSplit(data, seed + i, trainingPortion);
try {
double score = bridge.evaluateSplit(pl, split.get(0), split.get(1));
logger.info("Score for evaluation of {} with split #{}/{}: {}", pl, i + 1, this.repeats, score);
stats.addValue(score);
}
catch (Exception e) {
throw new ObjectEvaluationFailedException(e, "Could not evaluate classifier!");
}
}
if (Thread.currentThread().isInterrupted())
throw new InterruptedException("MCCV has been interrupted");
Double score = stats.getMean();
logger.info("Obtained score of {} for classifier {}.", score, pl);
return score;
}
public DescriptiveStatistics getStats() {
return stats;
}
public AbstractEvaluatorMeasureBridge<Double, Double> getBridge() {
return bridge;
}
}
|
[
"wever@mail.uni-paderborn.de"
] |
wever@mail.uni-paderborn.de
|
a0efa9418dd16b34b1b939f0b267d882d725a07f
|
adaad49512645463be44a148a82026d4cf11aea2
|
/modules/andes-core/common/src/main/java/org/wso2/andes/framing/ContentHeaderBodyFactory.java
|
ad1cd460fc874c60374469734fa8b97329f479c4
|
[
"Apache-2.0"
] |
permissive
|
isurulucky/andes
|
d0ec4a036124060363c25e50f95537271308e842
|
0d23e9507a8e3076cb3789c42d3539cd80c744e9
|
refs/heads/master
| 2022-06-03T00:37:00.994308
| 2022-05-31T04:26:11
| 2022-05-31T04:26:11
| 66,438,011
| 0
| 0
|
Apache-2.0
| 2022-05-31T04:18:05
| 2016-08-24T06:41:47
|
Java
|
UTF-8
|
Java
| false
| false
| 1,731
|
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.wso2.andes.framing;
import org.apache.mina.common.ByteBuffer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ContentHeaderBodyFactory implements BodyFactory
{
private static final Logger _log = LoggerFactory.getLogger(AMQMethodBodyFactory.class);
private static final ContentHeaderBodyFactory _instance = new ContentHeaderBodyFactory();
public static ContentHeaderBodyFactory getInstance()
{
return _instance;
}
private ContentHeaderBodyFactory()
{
_log.debug("Creating content header body factory");
}
public AMQBody createBody(ByteBuffer in, long bodySize) throws AMQFrameDecodingException
{
// all content headers are the same - it is only the properties that differ.
// the content header body further delegates construction of properties
return new ContentHeaderBody(in, bodySize);
}
}
|
[
"shammi@Shammis-MacBook-Pro.local"
] |
shammi@Shammis-MacBook-Pro.local
|
cbd4039101dbad4c823d6e6580f779bddd8471bf
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-13316-6-3-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/template/InternalTemplateManager_ESTest.java
|
240448866d6750f86d37fa69cae88109515695cf
|
[] |
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
| 584
|
java
|
/*
* This file was automatically generated by EvoSuite
* Fri Apr 03 23:51:55 UTC 2020
*/
package com.xpn.xwiki.internal.template;
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 InternalTemplateManager_ESTest extends InternalTemplateManager_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
9d97450f53f807ecf87417e54df9d426ad337ecc
|
9b01ffa3db998c4bca312fd28aa977f370c212e4
|
/app/src/streamD/java/com/loki/singlemoduleapp/stub/SampleClass7281.java
|
e00a65e1cd6d3b6091d4ba9aceb41670ea249ae5
|
[] |
no_license
|
SergiiGrechukha/SingleModuleApp
|
932488a197cb0936785caf0e73f592ceaa842f46
|
b7fefea9f83fd55dbbb96b506c931cc530a4818a
|
refs/heads/master
| 2022-05-13T17:15:21.445747
| 2017-07-30T09:55:36
| 2017-07-30T09:56:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 281
|
java
|
package com.loki.singlemoduleapp.stub;
public class SampleClass7281 {
private SampleClass7282 sampleClass;
public SampleClass7281(){
sampleClass = new SampleClass7282();
}
public String getClassName() {
return sampleClass.getClassName();
}
}
|
[
"sergey.grechukha@gmail.com"
] |
sergey.grechukha@gmail.com
|
781fe295313d4c1c775632ebea2bcb8cd8cd9322
|
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
|
/src_cfr/com/google/security/zynamics/zylib/gui/JStackView/IStackModel.java
|
6ea8407da9892b704969283f4b3deafd5a0952dc
|
[] |
no_license
|
fjh658/bindiff
|
c98c9c24b0d904be852182ecbf4f81926ce67fb4
|
2a31859b4638404cdc915d7ed6be19937d762743
|
refs/heads/master
| 2021-01-20T06:43:12.134977
| 2016-06-29T17:09:03
| 2016-06-29T17:09:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 502
|
java
|
/*
* Decompiled with CFR 0_115.
*/
package com.google.security.zynamics.zylib.gui.JStackView;
import com.google.security.zynamics.zylib.gui.JStackView.IStackModelListener;
public interface IStackModel {
public void addListener(IStackModelListener var1);
public String getElement(long var1);
public int getNumberOfEntries();
public long getStackPointer();
public long getStartAddress();
public boolean hasData(long var1, long var3);
public boolean keepTrying();
}
|
[
"manouchehri@riseup.net"
] |
manouchehri@riseup.net
|
84ec47e1f2924a70ac5a385be4ac811493b42096
|
182b7e5ca415043908753d8153c541ee0e34711c
|
/spring-basics/spring-core/xml/src/main/java/com/vinaylogics/springbasics/core/xml/LifeCycleBean.java
|
b445ece5c267d8a4dab2849bfe7892080756f492
|
[] |
no_license
|
akamatagi/Java9AndAbove
|
2b62886441241ef4cd62990243d7b29e895452f7
|
ff002a2395edf506091b3571a470c15fa0742550
|
refs/heads/master
| 2023-02-09T17:38:21.467950
| 2020-12-30T14:47:59
| 2020-12-30T14:47:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 155
|
java
|
package com.vinaylogics.springbasics.core.xml;
public interface LifeCycleBean {
void init() throws Exception;
void destroy() throws Exception;
}
|
[
"vinayagam.d.ganesh@gmail.com"
] |
vinayagam.d.ganesh@gmail.com
|
352c0d7d65376a51dd546d501e1907a9e9b7070e
|
311f1237e7498e7d1d195af5f4bcd49165afa63a
|
/sourcedata/lucene-solr-releases-lucene-2.2.0/contrib/gdata-server/src/core/src/java/org/apache/lucene/gdata/storage/ResourceNotFoundException.java
|
f7470fa48ffd545e5772a339f18d4dc2cae597be
|
[
"Apache-2.0"
] |
permissive
|
DXYyang/SDP
|
86ee0e9fb7032a0638b8bd825bcf7585bccc8021
|
6ad0daf242d4062888ceca6d4a1bd4c41fd99b63
|
refs/heads/master
| 2023-01-11T02:29:36.328694
| 2019-11-02T09:38:34
| 2019-11-02T09:38:34
| 219,128,146
| 10
| 1
|
Apache-2.0
| 2023-01-02T21:53:42
| 2019-11-02T08:54:26
|
Java
|
UTF-8
|
Java
| false
| false
| 2,233
|
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.lucene.gdata.storage;
/**
* This exception will be thrown if an requested resource of a resource to modify can not be found
* @author Simon Willnauer
*
*/
public class ResourceNotFoundException extends StorageException {
private static final long serialVersionUID = -8549987918130998249L;
/**
* Constructs an empty ResourceNotFoundException
*/
public ResourceNotFoundException() {
super();
// TODO Auto-generated constructor stub
}
/**
* Constructs a new ResourceNotFoundException with an exception message
* @param message - the exception message
*/
public ResourceNotFoundException(String message) {
super(message);
// TODO Auto-generated constructor stub
}
/**
* Constructs a new ResourceNotFoundException with an exception message and a root cause
* @param message - the exception message
* @param cause - the root cause of this exception
*/
public ResourceNotFoundException(String message, Throwable cause) {
super(message, cause);
// TODO Auto-generated constructor stub
}
/**
* Constructs a new ResourceNotFoundException with a root cause
* @param cause - the root cause of this exception
*
*/
public ResourceNotFoundException(Throwable cause) {
super(cause);
// TODO Auto-generated constructor stub
}
}
|
[
"512463514@qq.com"
] |
512463514@qq.com
|
ec8c4069c6c12cde22ffef505a0f4a403c3ea099
|
4c19b724f95682ed21a82ab09b05556b5beea63c
|
/XMSYGame/java2/server/zxyy-webhome/src/main/java/com/xmsy/server/zxyy/webhome/modules/manager/webhomepopulargames/entity/WebhomePopularGamesEntity.java
|
1098c11d6c5bee0d43eeeb9450ad4a241774c64d
|
[] |
no_license
|
angel-like/angel
|
a66f8fda992fba01b81c128dd52b97c67f1ef027
|
3f7d79a61dc44a9c4547a60ab8648bc390c0f01e
|
refs/heads/master
| 2023-03-11T03:14:49.059036
| 2022-11-17T11:35:37
| 2022-11-17T11:35:37
| 222,582,930
| 3
| 5
| null | 2023-02-22T05:29:45
| 2019-11-19T01:41:25
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,053
|
java
|
package com.xmsy.server.zxyy.webhome.modules.manager.webhomepopulargames.entity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.xmsy.server.zxyy.webhome.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* 官网热门游戏
*
* @author xiaoliu
* @email xxxxx
* @date 2019-01-29 16:07:37
*/
@Data
@EqualsAndHashCode(callSuper=false)
@Accessors(chain=true)
@TableName("webhome_popular_games")
public class WebhomePopularGamesEntity extends BaseEntity<WebhomePopularGamesEntity> {
private static final long serialVersionUID = 1L;
/**
* 名称
*/
private String name;
/**
* 附件ID
*/
private Long enclosureId;
/**
* 介绍
*/
private String introduction;
/**
* 类型(menu,game)
*/
private String type;
/**
* 类型Id
*/
private Long typeId;
/**
* 路径
*/
private String url;
/**
* 状态
*/
private Boolean enable;
/**
* 排序号
*/
private Integer orderNum;
}
|
[
"163@qq.com"
] |
163@qq.com
|
7d584684a309bf0fb46c75cb91951ce6955ffe40
|
e75be673baeeddee986ece49ef6e1c718a8e7a5d
|
/submissions/blizzard/Corpus/eclipse.jdt.ui/1154.java
|
da704d5bfc94322b63fb982a2c309f0f6a2d59bf
|
[
"MIT"
] |
permissive
|
zhendong2050/fse18
|
edbea132be9122b57e272a20c20fae2bb949e63e
|
f0f016140489961c9e3c2e837577f698c2d4cf44
|
refs/heads/master
| 2020-12-21T11:31:53.800358
| 2018-07-23T10:10:57
| 2018-07-23T10:10:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,444
|
java
|
/*******************************************************************************
* Copyright (c) 2007, 2012 IBM Corporation and others.
* 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:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.jdt.internal.ui.text.spelling;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext;
import org.eclipse.ui.texteditor.spelling.SpellingService;
import org.eclipse.ui.editors.text.EditorsUI;
import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.JavaUIMessages;
import org.eclipse.jdt.internal.ui.text.correction.IProposalRelevance;
/**
* Proposal to disable spell checking.
*
* @since 3.3
*/
public class DisableSpellCheckingProposal implements IJavaCompletionProposal {
/** The invocation context */
private IQuickAssistInvocationContext fContext;
/**
* Creates a new proposal.
*
* @param context the invocation context
*/
public DisableSpellCheckingProposal(IQuickAssistInvocationContext context) {
fContext = context;
}
/*
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#apply(org.eclipse.jface.text.IDocument)
*/
@Override
public final void apply(final IDocument document) {
IPreferenceStore store = EditorsUI.getPreferenceStore();
store.setValue(SpellingService.PREFERENCE_SPELLING_ENABLED, false);
}
/*
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo()
*/
@Override
public String getAdditionalProposalInfo() {
return JavaUIMessages.Spelling_disable_info;
}
/*
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getContextInformation()
*/
@Override
public final IContextInformation getContextInformation() {
return null;
}
/*
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString()
*/
@Override
public String getDisplayString() {
return JavaUIMessages.Spelling_disable_label;
}
/*
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage()
*/
@Override
public Image getImage() {
return JavaPluginImages.get(JavaPluginImages.IMG_OBJS_NLS_NEVER_TRANSLATE);
}
/*
* @see org.eclipse.jdt.ui.text.java.IJavaCompletionProposal#getRelevance()
*/
@Override
public final int getRelevance() {
return IProposalRelevance.DISABLE_SPELL_CHECKING;
}
/*
* @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument)
*/
@Override
public final Point getSelection(final IDocument document) {
return new Point(fContext.getOffset(), fContext.getLength());
}
}
|
[
"tim.menzies@gmail.com"
] |
tim.menzies@gmail.com
|
cea2eee87153d1279a6eb8dff255aa2e5afe163a
|
7f20b1bddf9f48108a43a9922433b141fac66a6d
|
/coreplugins/tags/Cyto-2.5.0-beta3/RFilters/src/RFilters/cytoscape/CsFilter.java
|
46140b867c49a41eeb650331ccbaa777b4bfac05
|
[] |
no_license
|
ahdahddl/cytoscape
|
bf783d44cddda313a5b3563ea746b07f38173022
|
a3df8f63dba4ec49942027c91ecac6efa920c195
|
refs/heads/master
| 2020-06-26T16:48:19.791722
| 2013-08-28T04:08:31
| 2013-08-28T04:08:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,613
|
java
|
/*
Copyright (c) 2006, 2007, The Cytoscape Consortium (www.cytoscape.org)
The Cytoscape Consortium is:
- Institute for Systems Biology
- University of California San Diego
- Memorial Sloan-Kettering Cancer Center
- Institut Pasteur
- Agilent Technologies
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation; either version 2.1 of the License, or
any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and
documentation provided hereunder is on an "as is" basis, and the
Institute for Systems Biology and the Whitehead Institute
have no obligations to provide maintenance, support,
updates, enhancements or modifications. In no event shall the
Institute for Systems Biology and the Whitehead Institute
be liable to any party for direct, indirect, special,
incidental or consequential damages, including lost profits, arising
out of the use of this software and its documentation, even if the
Institute for Systems Biology and the Whitehead Institute
have been advised of the possibility of such damage. 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 library; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
package filter.cytoscape;
import cytoscape.*;
import cytoscape.data.*;
import cytoscape.plugin.*;
import cytoscape.util.*;
import cytoscape.view.*;
import filter.model.*;
import filter.view.*;
import java.awt.event.*;
import java.beans.*;
import java.io.*;
import java.util.*;
import javax.swing.*;
/**
*
*/
public class CsFilter extends CytoscapePlugin implements PropertyChangeListener {
protected JFrame frame;
protected FilterUsePanel filterUsePanel;
/**
* Creates a new CsFilter object.
*/
public CsFilter() {
initialize();
}
/**
* DOCUMENT ME!
*
* @param e DOCUMENT ME!
*/
public void propertyChange(PropertyChangeEvent e) {
if (e.getPropertyName() == Cytoscape.CYTOSCAPE_EXIT) {
Iterator i = FilterManager.defaultManager().getFilters();
// StringBuffer buffer = new StringBuffer();
try {
File filter_file = CytoscapeInit.getConfigFile("filter.props");
BufferedWriter writer = new BufferedWriter(new FileWriter(filter_file));
while (i.hasNext()) {
try {
Filter f = (Filter) i.next();
writer.write(FilterManager.defaultManager().getFilterID(f) + "\t"
+ f.getClass() + "\t" + f.output());
writer.newLine();
} catch (Exception ex) {
System.out.println("Error with Filter output");
}
}
writer.close();
} catch (Exception ex) {
System.out.println("Filter Write error");
ex.printStackTrace();
}
}
}
/**
* DOCUMENT ME!
*/
public void initialize() {
Cytoscape.getSwingPropertyChangeSupport().addPropertyChangeListener(this);
try {
File filter_file = CytoscapeInit.getConfigFile("filter.props");
BufferedReader in = new BufferedReader(new FileReader(filter_file));
String oneLine = in.readLine();
while (oneLine != null) {
if (oneLine.startsWith("#")) {
// comment
} else {
FilterManager.defaultManager().createFilterFromString(oneLine);
}
oneLine = in.readLine();
}
in.close();
} catch (Exception ex) {
System.out.println("Filter Read error");
ex.printStackTrace();
}
// create icons
ImageIcon icon = new ImageIcon(getClass().getResource("/stock_filter-data-by-criteria.png"));
ImageIcon icon2 = new ImageIcon(getClass()
.getResource("/stock_filter-data-by-criteria-16.png"));
//
//FilterPlugin action = new FilterPlugin(icon, this);
FilterMenuItem menu_action = new FilterMenuItem(icon2, this);
//Cytoscape.getDesktop().getCyMenus().addCytoscapeAction( ( CytoscapeAction )action );
Cytoscape.getDesktop().getCyMenus().addCytoscapeAction((CytoscapeAction) menu_action);
//CytoscapeDesktop desktop = Cytoscape.getDesktop();
//CyMenus cyMenus = desktop.getCyMenus();
//CytoscapeToolBar toolBar = cyMenus.getToolBar();
//JButton button = new JButton(icon);
//button.addActionListener(action);
//button.setToolTipText("Create and apply filters");
//button.setBorderPainted(false);
//toolBar.add(button);
FilterEditorManager.defaultManager().addEditor(new NumericAttributeFilterEditor());
FilterEditorManager.defaultManager().addEditor(new StringPatternFilterEditor());
FilterEditorManager.defaultManager().addEditor(new NodeTopologyFilterEditor());
FilterEditorManager.defaultManager().addEditor(new BooleanMetaFilterEditor());
FilterEditorManager.defaultManager().addEditor(new NodeInteractionFilterEditor());
FilterEditorManager.defaultManager().addEditor(new EdgeInteractionFilterEditor());
}
/**
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*/
public FilterUsePanel getFilterUsePanel() {
if (filterUsePanel == null) {
filterUsePanel = new FilterUsePanel(frame);
}
return filterUsePanel;
}
/**
* DOCUMENT ME!
*/
public void show() {
if (frame == null) {
frame = new JFrame("Use Filters");
frame.getContentPane().add(getFilterUsePanel());
frame.pack();
//Cytoscape.getDesktop().getCytoPanel( SwingConstants.SOUTH ).add(getFilterUsePanel());
}
frame.setVisible(true);
}
}
|
[
"mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5"
] |
mes@0ecc0d97-ab19-0410-9704-bfe1a75892f5
|
ea4802fe554a9b1b30320998559606129cd3d627
|
db2cd2a4803e546d35d5df2a75b7deb09ffadc01
|
/nemo-tfl-batch/src/main/java/com/novacroft/nemo/tfl/batch/action/impl/cubic/ReconcileAutoLoadChangeActionImpl.java
|
7200f586a42383934cd2b9494b174ee24b631945
|
[] |
no_license
|
balamurugan678/nemo
|
66d0d6f7062e340ca8c559346e163565c2628814
|
1319daafa5dc25409ae1a1872b1ba9b14e5a297e
|
refs/heads/master
| 2021-01-19T17:47:22.002884
| 2015-06-18T12:03:43
| 2015-06-18T12:03:43
| 37,656,983
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,281
|
java
|
package com.novacroft.nemo.tfl.batch.action.impl.cubic;
import com.novacroft.nemo.tfl.batch.action.cubic.ImportRecordAction;
import com.novacroft.nemo.tfl.batch.domain.ImportRecord;
import com.novacroft.nemo.tfl.batch.domain.cubic.AutoLoadChangeRecord;
import com.novacroft.nemo.tfl.common.application_service.ReconcileAutoLoadChangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* Action to reconcile all auto load change records from CUBIC
*/
@Component("reconcileAutoLoadChangeAction")
public class ReconcileAutoLoadChangeActionImpl implements ImportRecordAction {
@Autowired
protected ReconcileAutoLoadChangeService reconcileAutoLoadChangeService;
@Override
public void handle(ImportRecord record) {
AutoLoadChangeRecord autoLoadChangeRecord = (AutoLoadChangeRecord) record;
this.reconcileAutoLoadChangeService
.reconcileChange(autoLoadChangeRecord.getRequestSequenceNumber(), autoLoadChangeRecord.getPrestigeId(),
autoLoadChangeRecord.getNewAutoLoadConfiguration(), autoLoadChangeRecord.getStatusOfAttemptedAction(),
autoLoadChangeRecord.getFailureReasonCode());
}
}
|
[
"balamurugan678@yahoo.co.in"
] |
balamurugan678@yahoo.co.in
|
29ab8e86a05b814df8b69c8ccf43558e17f5cfef
|
ea43f4cbcd1a1ae58dea0b6fbe51ffd4ec37a017
|
/src/me/xiaopan/pullview/PullTouchListener.java
|
6c9658256e3113ffd7817f7948929fd367a24117
|
[
"Apache-2.0"
] |
permissive
|
wang9090980/Android-PullView
|
d83dadc65faa7683de0373912be7bda97000d71f
|
05088663d30df3b26551110441faeb070f1a0d3e
|
refs/heads/master
| 2021-01-22T10:22:39.029272
| 2014-03-26T09:17:37
| 2014-03-26T09:17:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,890
|
java
|
/*
* Copyright (C) 2013 Peng fei Pan <sky@xiaopan.me>
*
* 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 me.xiaopan.pullview;
import me.xiaopan.pullview.PullGestureDetector.OnTouchListener;
import me.xiaopan.pullview.PullViewBase.PullStatus;
import android.view.MotionEvent;
/**
* 触摸事件处理监听器
*/
@SuppressWarnings("rawtypes")
public class PullTouchListener implements OnTouchListener {
private PullViewBase pullViewBase;
public PullTouchListener(PullViewBase pullViewBase) {
super();
this.pullViewBase = pullViewBase;
}
@Override
public boolean onTouchDown(MotionEvent e) {
if(pullViewBase.getPullScroller().isScrolling()){
pullViewBase.getPullScroller().abortScroll();
}
pullViewBase.setInterceptTouchEvent(false);
return true;
}
@SuppressWarnings("unchecked")
@Override
public boolean onTouchScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
switch(pullViewBase.getPullStatus()){
case PULL_HEADER :
if(pullViewBase.isVerticalPull()){
pullViewBase.scrollBy(0, (int) (distanceY * pullViewBase.getElasticForce()));
if(pullViewBase.getScrollY() >= 0 && Math.abs(distanceY) <= 10){
pullViewBase.setPullStatus(PullStatus.NORMAL);
}
}else{
pullViewBase.scrollBy((int) (distanceX * pullViewBase.getElasticForce()), 0);
if(pullViewBase.getScrollX() >= 0 && Math.abs(distanceX) <= 10){
pullViewBase.setPullStatus(PullStatus.NORMAL);
}
}
if(pullViewBase.getPullHeaderView() != null){
pullViewBase.getPullHeaderView().onScroll(Math.abs(pullViewBase.isVerticalPull()?pullViewBase.getScrollY():pullViewBase.getScrollX()));
}
pullViewBase.scrollPullViewToHeader(pullViewBase.getPullView());
break;
case PULL_FOOTER :
if(pullViewBase.isVerticalPull()){
pullViewBase.scrollBy(0, (int) (distanceY * pullViewBase.getElasticForce()));
if(pullViewBase.getScrollY() <= 0 && Math.abs(distanceY) <= 10){
pullViewBase.setPullStatus(PullStatus.NORMAL);
}
}else{
pullViewBase.scrollBy((int) (distanceX * pullViewBase.getElasticForce()), 0);
if(pullViewBase.getScrollX() <= 0 && Math.abs(distanceX) <= 10){
pullViewBase.setPullStatus(PullStatus.NORMAL);
}
}
if(pullViewBase.getPullFooterView() != null){
pullViewBase.getPullFooterView().onScroll(Math.abs(pullViewBase.isVerticalPull()?pullViewBase.getScrollY():pullViewBase.getScrollX()));
}
pullViewBase.scrollPullViewToFooter(pullViewBase.getPullView());
break;
default :
if(pullViewBase.isVerticalPull()){
if(distanceY < 0){ //如果向下拉
if(pullViewBase.getScrollY() > 0){
//如果Footer正在显示就先通过滚动隐藏Footer
pullViewBase.logD("滚动:手动回滚Footer,ScrollY=" + pullViewBase.getScrollY());
pullViewBase.scrollBy(0, (int) (distanceY));
pullViewBase.scrollPullViewToFooter(pullViewBase.getPullView());
}else{
//如果可以拉伸Header并且
if(pullViewBase.isCanPullHeader(pullViewBase.getPullView())){
if(pullViewBase.getScrollY() <= (pullViewBase.getPullHeaderView() != null?pullViewBase.getPullHeaderView().getMinScrollValue():0)){
pullViewBase.logD("滚动:开始拉伸头部,ScrollY=" + pullViewBase.getScrollY());
pullViewBase.setPullStatus(PullStatus.PULL_HEADER);
}
}
}
}else if(distanceY > 0){ //如果向上拉
if(pullViewBase.getScrollY() < 0){
//如果Header正在显示就先通过滚动隐藏Header
pullViewBase.logD("滚动:手动回滚Header,ScrollY=" + pullViewBase.getScrollY());
pullViewBase.scrollBy(0, (int) (distanceY));
pullViewBase.scrollPullViewToHeader(pullViewBase.getPullView());
}else{
//如果可以拉伸Footer
if(pullViewBase.isCanPullFooter(pullViewBase.getPullView())){
pullViewBase.logD("滚动:开始拉伸尾部,ScrollY=" + pullViewBase.getScrollY());
pullViewBase.setPullStatus(PullStatus.PULL_FOOTER);
}
}
}
}else{
if(distanceX < 0){ //如果向右拉
if(pullViewBase.getScrollX() > 0){
//如果Footer正在显示就先通过滚动隐藏Footer
pullViewBase.logD("滚动:手动回滚Footer,ScrollX=" + pullViewBase.getScrollX());
pullViewBase.scrollBy((int) (distanceX), 0);
pullViewBase.scrollPullViewToFooter(pullViewBase.getPullView());
}else{
//如果可以拉伸Header并且
if(pullViewBase.isCanPullHeader(pullViewBase.getPullView())){
if(pullViewBase.getScrollX() <= (pullViewBase.getPullHeaderView() != null?pullViewBase.getPullHeaderView().getMinScrollValue():0)){
pullViewBase.logD("滚动:开始拉伸头部,ScrollX=" + pullViewBase.getScrollX());
pullViewBase.setPullStatus(PullStatus.PULL_HEADER);
}
}
}
}else if(distanceX > 0){ //如果向左拉
if(pullViewBase.getScrollX() < 0){
//如果Header正在显示就先通过滚动隐藏Header
pullViewBase.logD("滚动:手动回滚Header,ScrollX=" + pullViewBase.getScrollX());
pullViewBase.scrollBy((int) (distanceX), 0);
pullViewBase.scrollPullViewToHeader(pullViewBase.getPullView());
}else{
//如果可以拉伸Footer
if(pullViewBase.isCanPullFooter(pullViewBase.getPullView())){
pullViewBase.logD("滚动:开始拉伸尾部,ScrollX=" + pullViewBase.getScrollX());
pullViewBase.setPullStatus(PullStatus.PULL_FOOTER);
}
}
}
}
break;
}
return true;
}
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
pullViewBase.setInterceptTouchEvent(pullViewBase.getPullStatus() != PullStatus.NORMAL);
return true;
}
@Override
public void onTouchUpOrCancel() {
pullViewBase.getPullScroller().rollback();
}
}
|
[
"sky@xiaopan.me"
] |
sky@xiaopan.me
|
5b09c167fe7f5fd3d356a636d68145114f84375c
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/12/12_34939cea663c63f64a18549e15787e3a8de964c6/OpenStackAuthenticationHeaderManager/12_34939cea663c63f64a18549e15787e3a8de964c6_OpenStackAuthenticationHeaderManager_s.java
|
515efaf21c671be7c54959f48515ac5a3701f31c
|
[] |
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
| 7,969
|
java
|
package com.rackspace.papi.components.clientauth.openstack.v1_0;
import com.rackspace.auth.AuthGroup;
import com.rackspace.auth.AuthToken;
import com.rackspace.papi.commons.util.StringUtilities;
import com.rackspace.papi.commons.util.http.HttpStatusCode;
import com.rackspace.papi.commons.util.http.IdentityStatus;
import com.rackspace.papi.commons.util.http.OpenStackServiceHeader;
import com.rackspace.papi.commons.util.http.PowerApiHeader;
import com.rackspace.papi.filter.logic.FilterAction;
import com.rackspace.papi.filter.logic.FilterDirector;
import com.rackspace.papi.commons.util.http.header.HeaderValueImpl;
import org.slf4j.Logger;
import java.util.Date;
import com.rackspace.papi.commons.util.http.HttpDate;
import java.util.List;
/**
* Responsible for adding Authentication headers from validating token response
*/
public class OpenStackAuthenticationHeaderManager {
private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(OpenStackAuthenticationHeaderManager.class);
// Proxy is specified in the OpenStack auth blue print:
// http://wiki.openstack.org/openstack-authn
private static final String X_AUTH_PROXY = "Proxy";
private final String authToken;
private final AuthToken cachableToken;
private final Boolean isDelagable;
private final FilterDirector filterDirector;
private final String tenantId;
private final Boolean validToken;
private final List<AuthGroup> groups;
// Hard code QUALITY for now as the auth component will have
// the highest QUALITY in terms of using the user it supplies for rate limiting
private static final String QUALITY = ";q=1.0";
private final String wwwAuthHeaderContents;
private static final String WWW_AUTHENTICATE_HEADER = "WWW-Authenticate";
private final String endpointsBase64;
//add base 64 string in here
public OpenStackAuthenticationHeaderManager(String authToken, AuthToken token, Boolean isDelegatable,
FilterDirector filterDirector, String tenantId, List<AuthGroup> groups, String wwwAuthHeaderContents, String endpointsBase64) {
this.authToken = authToken;
this.cachableToken = token;
this.isDelagable = isDelegatable;
this.filterDirector = filterDirector;
this.tenantId = tenantId;
this.validToken = token != null && token.getTokenId() != null;
this.groups = groups;
this.wwwAuthHeaderContents = wwwAuthHeaderContents;
this.endpointsBase64 = endpointsBase64;
}
//set header with base64 string here
public void setFilterDirectorValues() {
if (validToken) {
filterDirector.setFilterAction(FilterAction.PASS);
setExtendedAuthorization();
setUser();
setRoles();
setGroups();
setTenant();
setImpersonator();
setEndpoints();
setExpirationDate();
setDefaultRegion();
if (isDelagable) {
setIdentityStatus();
}
} else if (isDelagable && nullCredentials() && filterDirector.getResponseStatus() != HttpStatusCode.INTERNAL_SERVER_ERROR) {
filterDirector.setFilterAction(FilterAction.PROCESS_RESPONSE);
setExtendedAuthorization();
setIdentityStatus();
} else if (filterDirector.getResponseStatusCode() == HttpStatusCode.UNAUTHORIZED.intValue()) {
filterDirector.responseHeaderManager().putHeader(WWW_AUTHENTICATE_HEADER, wwwAuthHeaderContents);
}
}
private boolean nullCredentials() {
final boolean nullCreds = StringUtilities.isBlank(authToken) && StringUtilities.isBlank(tenantId);
LOG.debug("Credentials null = " + nullCreds);
return nullCreds;
}
/**
* EXTENDED AUTHORIZATION
*/
private void setExtendedAuthorization() {
filterDirector.requestHeaderManager().putHeader(OpenStackServiceHeader.EXTENDED_AUTHORIZATION.toString(), StringUtilities.isBlank(tenantId) ? X_AUTH_PROXY : X_AUTH_PROXY + " " + tenantId);
}
/**
* IDENTITY STATUS
*/
private void setIdentityStatus() {
IdentityStatus identityStatus = IdentityStatus.Confirmed;
if (!validToken) {
identityStatus = IdentityStatus.Indeterminate;
}
filterDirector.requestHeaderManager().putHeader(OpenStackServiceHeader.IDENTITY_STATUS.toString(), identityStatus.name());
}
private void setImpersonator() {
filterDirector.requestHeaderManager().removeHeader(OpenStackServiceHeader.IMPERSONATOR_NAME.toString());
filterDirector.requestHeaderManager().removeHeader(OpenStackServiceHeader.IMPERSONATOR_ID.toString());
if (StringUtilities.isNotBlank(cachableToken.getImpersonatorTenantId())) {
filterDirector.requestHeaderManager().putHeader(OpenStackServiceHeader.IMPERSONATOR_NAME.toString(), cachableToken.getImpersonatorUsername());
filterDirector.requestHeaderManager().putHeader(OpenStackServiceHeader.IMPERSONATOR_ID.toString(), cachableToken.getImpersonatorTenantId());
}
}
/**
* TENANT
*/
private void setTenant() {
filterDirector.requestHeaderManager().putHeader(OpenStackServiceHeader.TENANT_NAME.toString(), cachableToken.getTenantName());
filterDirector.requestHeaderManager().putHeader(OpenStackServiceHeader.TENANT_ID.toString(), cachableToken.getTenantId());
}
/**
* USER
* The PowerApiHeader is used for Rate Limiting
* The OpenStackServiceHeader is used for an OpenStack service
*/
private void setUser() {
filterDirector.requestHeaderManager().appendHeader(PowerApiHeader.USER.toString(), cachableToken.getUsername() + QUALITY);
filterDirector.requestHeaderManager().putHeader(OpenStackServiceHeader.USER_NAME.toString(), cachableToken.getUsername());
filterDirector.requestHeaderManager().putHeader(OpenStackServiceHeader.USER_ID.toString(), cachableToken.getUserId());
}
/**
* ROLES
* The OpenStackServiceHeader is used for an OpenStack service
*/
private void setRoles() {
String roles = cachableToken.getRoles();
if (StringUtilities.isNotBlank(roles)) {
filterDirector.requestHeaderManager().putHeader(OpenStackServiceHeader.ROLES.toString(), roles);
}
}
/**
* GROUPS
* The PowerApiHeader is used for Rate Limiting
*/
private void setGroups() {
for (AuthGroup group : groups) {
filterDirector.requestHeaderManager().appendHeader(PowerApiHeader.GROUPS.toString(), group.getId() + QUALITY);
}
}
/**
* ENDPOINTS
* The base 64 encoded list of endpoints in an x-catalog header.
*/
private void setEndpoints() {
if (!StringUtilities.isBlank(endpointsBase64)) {
filterDirector.requestHeaderManager().putHeader(PowerApiHeader.X_CATALOG.toString(), endpointsBase64);
}
}
/**
* ExpirationDate
* token expiration date in x-token-expires header that follows http spec rfc1123 GMT time format
*/
private void setExpirationDate() {
if (cachableToken.getExpires()>0) {
HttpDate date = new HttpDate(new Date(cachableToken.getExpires()));
filterDirector.requestHeaderManager().putHeader(OpenStackServiceHeader.X_EXPIRATION.toString(), date.toRFC1123());
}
}
/**
* Default Region
* Default region of user
*/
private void setDefaultRegion(){
String region = cachableToken.getDefaultRegion();
if(!StringUtilities.isBlank(region)){
filterDirector.requestHeaderManager().putHeader(OpenStackServiceHeader.DEFAULT_REGION.toString(), region);
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
506f8e2ff5f765bb2adc28a88c59d7997dbba5c5
|
7efbda1bff2d304f9f86259ece5127dc9ee69111
|
/BIServer/src/main/java/com/tonbeller/wcf/table/TableModelChangeListener.java
|
abaa176fdb51b7e579b2ea2a894870def4df5b62
|
[] |
no_license
|
kalyansvm/biproject
|
8f1bafd57b4cb8affa443a394dee2e774b9a9992
|
482b461f3b05b33b9a468526c5a59ed98dd4551c
|
refs/heads/master
| 2021-01-10T09:34:25.669950
| 2009-05-13T01:50:17
| 2009-05-13T01:50:17
| 50,026,186
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 668
|
java
|
/*
* ====================================================================
* This software is subject to the terms of the Common Public License
* Agreement, available at the following URL:
* http://www.opensource.org/licenses/cpl.html .
* Copyright (C) 2003-2004 TONBELLER AG.
* All Rights Reserved.
* You must accept the terms of that agreement to use this software.
* ====================================================================
*
*
*/
package com.tonbeller.wcf.table;
import java.util.EventListener;
public interface TableModelChangeListener extends EventListener {
void tableModelChanged(TableModelChangeEvent event);
}
|
[
"wuyiding@gmail.com"
] |
wuyiding@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.